MINI Sh3ll

Path : /var/www/html/solarwindia/public/theme/vendors/base/
File Upload :
Current File : /var/www/html/solarwindia/public/theme/vendors/base/old_vendors.bundle.js

if(function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function i(t,e){var i=(e=e||et).createElement("script");i.text=t,e.head.appendChild(i).parentNode.removeChild(i)}function n(t){var e=!!t&&"length"in t&&t.length,i=pt.type(t);return"function"!==i&&!pt.isWindow(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function r(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function o(t,e,i){return pt.isFunction(e)?pt.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?pt.grep(t,function(t){return t===e!==i}):"string"!=typeof e?pt.grep(t,function(t){return st.call(e,t)>-1!==i}):kt.test(e)?pt.filter(e,t,i):(e=pt.filter(e,t),pt.grep(t,function(t){return st.call(e,t)>-1!==i&&1===t.nodeType}))}function s(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function a(t){var e={};return pt.each(t.match(At)||[],function(t,i){e[i]=!0}),e}function l(t){return t}function c(t){throw t}function h(t,e,i,n){var r;try{t&&pt.isFunction(r=t.promise)?r.call(t).done(e).fail(i):t&&pt.isFunction(r=t.then)?r.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}function d(){et.removeEventListener("DOMContentLoaded",d),t.removeEventListener("load",d),pt.ready()}function u(){this.expando=pt.expando+u.uid++}function p(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Ft.test(t)?JSON.parse(t):t)}function f(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(Lt,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=p(i)}catch(t){}Nt.set(t,e,i)}else i=void 0;return i}function m(t,e,i,n){var r,o=1,s=20,a=n?function(){return n.cur()}:function(){return pt.css(t,e,"")},l=a(),c=i&&i[3]||(pt.cssNumber[e]?"":"px"),h=(pt.cssNumber[e]||"px"!==c&&+l)&&Rt.exec(pt.css(t,e));if(h&&h[3]!==c){c=c||h[3],i=i||[],h=+l||1;do{h/=o=o||".5",pt.style(t,e,h+c)}while(o!==(o=a()/l)&&1!==o&&--s)}return i&&(h=+h||+l||0,r=i[1]?h+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=h,n.end=r)),r}function g(t){var e,i=t.ownerDocument,n=t.nodeName,r=zt[n];return r||(e=i.body.appendChild(i.createElement(n)),r=pt.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),zt[n]=r,r)}function v(t,e){for(var i,n,r=[],o=0,s=t.length;o<s;o++)(n=t[o]).style&&(i=n.style.display,e?("none"===i&&(r[o]=Ot.get(n,"display")||null,r[o]||(n.style.display="")),""===n.style.display&&Ht(n)&&(r[o]=g(n))):"none"!==i&&(r[o]="none",Ot.set(n,"display",i)));for(o=0;o<s;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}function y(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&r(t,e)?pt.merge([t],i):i}function b(t,e){for(var i=0,n=t.length;i<n;i++)Ot.set(t[i],"globalEval",!e||Ot.get(e[i],"globalEval"))}function _(t,e,i,n,r){for(var o,s,a,l,c,h,d=e.createDocumentFragment(),u=[],p=0,f=t.length;p<f;p++)if((o=t[p])||0===o)if("object"===pt.type(o))pt.merge(u,o.nodeType?[o]:o);else if(qt.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(Wt.exec(o)||["",""])[1].toLowerCase(),l=Vt[a]||Vt._default,s.innerHTML=l[1]+pt.htmlPrefilter(o)+l[2],h=l[0];h--;)s=s.lastChild;pt.merge(u,s.childNodes),(s=d.firstChild).textContent=""}else u.push(e.createTextNode(o));for(d.textContent="",p=0;o=u[p++];)if(n&&pt.inArray(o,n)>-1)r&&r.push(o);else if(c=pt.contains(o.ownerDocument,o),s=y(d.appendChild(o),"script"),c&&b(s),i)for(h=0;o=s[h++];)Yt.test(o.type||"")&&i.push(o);return d}function x(){return!0}function w(){return!1}function k(){try{return et.activeElement}catch(t){}}function S(t,e,i,n,r,o){var s,a;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=void 0);for(a in e)S(t,a,i,n,e[a],o);return t}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=w;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return pt().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=pt.guid++)),t.each(function(){pt.event.add(this,e,r,n,i)})}function C(t,e){return r(t,"table")&&r(11!==e.nodeType?e:e.firstChild,"tr")?pt(">tbody",t)[0]||t:t}function D(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function T(t){var e=ee.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function A(t,e){var i,n,r,o,s,a,l,c;if(1===e.nodeType){if(Ot.hasData(t)&&(o=Ot.access(t),s=Ot.set(e,o),c=o.events)){delete s.handle,s.events={};for(r in c)for(i=0,n=c[r].length;i<n;i++)pt.event.add(e,r,c[r][i])}Nt.hasData(t)&&(a=Nt.access(t),l=pt.extend({},a),Nt.set(e,l))}}function M(t,e){var i=e.nodeName.toLowerCase();"input"===i&&Ut.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function E(t,e,n,r){e=rt.apply([],e);var o,s,a,l,c,h,d=0,u=t.length,p=u-1,f=e[0],m=pt.isFunction(f);if(m||u>1&&"string"==typeof f&&!ut.checkClone&&te.test(f))return t.each(function(i){var o=t.eq(i);m&&(e[0]=f.call(this,i,o.html())),E(o,e,n,r)});if(u&&(o=_(e,t[0].ownerDocument,!1,t,r),s=o.firstChild,1===o.childNodes.length&&(o=s),s||r)){for(l=(a=pt.map(y(o,"script"),D)).length;d<u;d++)c=o,d!==p&&(c=pt.clone(c,!0,!0),l&&pt.merge(a,y(c,"script"))),n.call(t[d],c,d);if(l)for(h=a[a.length-1].ownerDocument,pt.map(a,T),d=0;d<l;d++)c=a[d],Yt.test(c.type||"")&&!Ot.access(c,"globalEval")&&pt.contains(h,c)&&(c.src?pt._evalUrl&&pt._evalUrl(c.src):i(c.textContent.replace(ie,""),h))}return t}function P(t,e,i){for(var n,r=e?pt.filter(e,t):t,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||pt.cleanData(y(n)),n.parentNode&&(i&&pt.contains(n.ownerDocument,n)&&b(y(n,"script")),n.parentNode.removeChild(n));return t}function I(t,e,i){var n,r,o,s,a=t.style;return(i=i||oe(t))&&(""!==(s=i.getPropertyValue(e)||i[e])||pt.contains(t.ownerDocument,t)||(s=pt.style(t,e)),!ut.pixelMarginRight()&&re.test(s)&&ne.test(e)&&(n=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function O(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}function N(t){if(t in de)return t;for(var e=t[0].toUpperCase()+t.slice(1),i=he.length;i--;)if((t=he[i]+e)in de)return t}function F(t){var e=pt.cssProps[t];return e||(e=pt.cssProps[t]=N(t)||t),e}function L(t,e,i){var n=Rt.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function j(t,e,i,n,r){var o,s=0;for(o=i===(n?"border":"content")?4:"width"===e?1:0;o<4;o+=2)"margin"===i&&(s+=pt.css(t,i+$t[o],!0,r)),n?("content"===i&&(s-=pt.css(t,"padding"+$t[o],!0,r)),"margin"!==i&&(s-=pt.css(t,"border"+$t[o]+"Width",!0,r))):(s+=pt.css(t,"padding"+$t[o],!0,r),"padding"!==i&&(s+=pt.css(t,"border"+$t[o]+"Width",!0,r)));return s}function R(t,e,i){var n,r=oe(t),o=I(t,e,r),s="border-box"===pt.css(t,"boxSizing",!1,r);return re.test(o)?o:(n=s&&(ut.boxSizingReliable()||o===t.style[e]),"auto"===o&&(o=t["offset"+e[0].toUpperCase()+e.slice(1)]),(o=parseFloat(o)||0)+j(t,e,i||(s?"border":"content"),n,r)+"px")}function $(t,e,i,n,r){return new $.prototype.init(t,e,i,n,r)}function H(){pe&&(!1===et.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(H):t.setTimeout(H,pt.fx.interval),pt.fx.tick())}function B(){return t.setTimeout(function(){ue=void 0}),ue=pt.now()}function z(t,e){var i,n=0,r={height:t};for(e=e?1:0;n<4;n+=2-e)r["margin"+(i=$t[n])]=r["padding"+i]=t;return e&&(r.opacity=r.width=t),r}function U(t,e,i){for(var n,r=(Y.tweeners[e]||[]).concat(Y.tweeners["*"]),o=0,s=r.length;o<s;o++)if(n=r[o].call(i,e,t))return n}function W(t,e){var i,n,r,o,s;for(i in t)if(n=pt.camelCase(i),r=e[n],o=t[i],Array.isArray(o)&&(r=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),(s=pt.cssHooks[n])&&"expand"in s){o=s.expand(o),delete t[n];for(i in o)i in t||(t[i]=o[i],e[i]=r)}else e[n]=r}function Y(t,e,i){var n,r,o=0,s=Y.prefilters.length,a=pt.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=ue||B(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(n);return a.notifyWith(t,[c,n,i]),n<1&&s?i:(s||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:pt.extend({},e),opts:pt.extend(!0,{specialEasing:{},easing:pt.easing._default},i),originalProperties:e,originalOptions:i,startTime:ue||B(),duration:i.duration,tweens:[],createTween:function(e,i){var n=pt.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)c.tweens[i].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),h=c.props;for(W(h,c.opts.specialEasing);o<s;o++)if(n=Y.prefilters[o].call(c,t,h,c.opts))return pt.isFunction(n.stop)&&(pt._queueHooks(c.elem,c.opts.queue).stop=pt.proxy(n.stop,n)),n;return pt.map(h,U,c),pt.isFunction(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),pt.fx.timer(pt.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}function V(t){return(t.match(At)||[]).join(" ")}function q(t){return t.getAttribute&&t.getAttribute("class")||""}function G(t,e,i,n){var r;if(Array.isArray(e))pt.each(e,function(e,r){i||Ce.test(t)?n(t,r):G(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,i,n)});else if(i||"object"!==pt.type(e))n(t,e);else for(r in e)G(t+"["+r+"]",e[r],i,n)}function K(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(At)||[];if(pt.isFunction(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function X(t,e,i,n){function r(a){var l;return o[a]=!0,pt.each(t[a]||[],function(t,a){var c=a(e,i,n);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}var o={},s=t===je;return r(e.dataTypes[0])||!o["*"]&&r("*")}function Q(t,e){var i,n,r=pt.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&pt.extend(!0,t,n),t}function Z(t,e,i){for(var n,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),i[o]}function J(t,e,i,n){var r,o,s,a,l,c={},h=t.dataTypes.slice();if(h[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=h.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=h.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],h.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}var tt=[],et=t.document,it=Object.getPrototypeOf,nt=tt.slice,rt=tt.concat,ot=tt.push,st=tt.indexOf,at={},lt=at.toString,ct=at.hasOwnProperty,ht=ct.toString,dt=ht.call(Object),ut={},pt=function(t,e){return new pt.fn.init(t,e)},ft=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,mt=/^-ms-/,gt=/-([a-z])/g,vt=function(t,e){return e.toUpperCase()};pt.fn=pt.prototype={jquery:"3.2.1",constructor:pt,length:0,toArray:function(){return nt.call(this)},get:function(t){return null==t?nt.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=pt.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return pt.each(this,t)},map:function(t){return this.pushStack(pt.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(nt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:ot,sort:tt.sort,splice:tt.splice},pt.extend=pt.fn.extend=function(){var t,e,i,n,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||pt.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)i=s[e],s!==(n=t[e])&&(c&&n&&(pt.isPlainObject(n)||(r=Array.isArray(n)))?(r?(r=!1,o=i&&Array.isArray(i)?i:[]):o=i&&pt.isPlainObject(i)?i:{},s[e]=pt.extend(c,o,n)):void 0!==n&&(s[e]=n));return s},pt.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===pt.type(t)},isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=pt.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==lt.call(t))&&(!(e=it(t))||"function"==typeof(i=ct.call(e,"constructor")&&e.constructor)&&ht.call(i)===dt)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?at[lt.call(t)]||"object":typeof t},globalEval:function(t){i(t)},camelCase:function(t){return t.replace(mt,"ms-").replace(gt,vt)},each:function(t,e){var i,r=0;if(n(t))for(i=t.length;r<i&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},trim:function(t){return null==t?"":(t+"").replace(ft,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?pt.merge(i,"string"==typeof t?[t]:t):ot.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:st.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,r=t.length;n<i;n++)t[r++]=e[n];return t.length=r,t},grep:function(t,e,i){for(var n=[],r=0,o=t.length,s=!i;r<o;r++)!e(t[r],r)!==s&&n.push(t[r]);return n},map:function(t,e,i){var r,o,s=0,a=[];if(n(t))for(r=t.length;s<r;s++)null!=(o=e(t[s],s,i))&&a.push(o);else for(s in t)null!=(o=e(t[s],s,i))&&a.push(o);return rt.apply([],a)},guid:1,proxy:function(t,e){var i,n,r;if("string"==typeof e&&(i=t[e],e=t,t=i),pt.isFunction(t))return n=nt.call(arguments,2),r=function(){return t.apply(e||this,n.concat(nt.call(arguments)))},r.guid=t.guid=t.guid||pt.guid++,r},now:Date.now,support:ut}),"function"==typeof Symbol&&(pt.fn[Symbol.iterator]=tt[Symbol.iterator]),pt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){at["[object "+e+"]"]=e.toLowerCase()});var yt=function(t){function e(t,e,i,n){var r,o,s,a,l,h,u,p=e&&e.ownerDocument,f=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==f&&9!==f&&11!==f)return i;if(!n&&((e?e.ownerDocument||e:$)!==P&&E(e),e=e||P,O)){if(11!==f&&(l=mt.exec(t)))if(r=l[1]){if(9===f){if(!(s=e.getElementById(r)))return i;if(s.id===r)return i.push(s),i}else if(p&&(s=p.getElementById(r))&&j(e,s)&&s.id===r)return i.push(s),i}else{if(l[2])return X.apply(i,e.getElementsByTagName(t)),i;if((r=l[3])&&_.getElementsByClassName&&e.getElementsByClassName)return X.apply(i,e.getElementsByClassName(r)),i}if(_.qsa&&!W[t+" "]&&(!N||!N.test(t))){if(1!==f)p=e,u=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(bt,_t):e.setAttribute("id",a=R),o=(h=S(t)).length;o--;)h[o]="#"+a+" "+d(h[o]);u=h.join(","),p=gt.test(t)&&c(e.parentNode)||e}if(u)try{return X.apply(i,p.querySelectorAll(u)),i}catch(t){}finally{a===R&&e.removeAttribute("id")}}}return D(t.replace(ot,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>x.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[R]=!0,t}function r(t){var e=P.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var i=t.split("|"),n=i.length;n--;)x.attrHandle[i[n]]=e}function s(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&wt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function l(t){return n(function(e){return e=+e,n(function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))})})}function c(t){return t&&void 0!==t.getElementsByTagName&&t}function h(){}function d(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function u(t,e,i){var n=e.dir,r=e.next,o=r||n,s=i&&"parentNode"===o,a=B++;return e.first?function(e,i,r){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,r);return!1}:function(e,i,l){var c,h,d,u=[H,a];if(l){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,l))return!0}else for(;e=e[n];)if(1===e.nodeType||s)if(d=e[R]||(e[R]={}),h=d[e.uniqueID]||(d[e.uniqueID]={}),r&&r===e.nodeName.toLowerCase())e=e[n]||e;else{if((c=h[o])&&c[0]===H&&c[1]===a)return u[2]=c[2];if(h[o]=u,u[2]=t(e,i,l))return!0}return!1}}function p(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function f(t,i,n){for(var r=0,o=i.length;r<o;r++)e(t,i[r],n);return n}function m(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(o=t[a])&&(i&&!i(o,n,r)||(s.push(o),c&&e.push(a)));return s}function g(t,e,i,r,o,s){return r&&!r[R]&&(r=g(r)),o&&!o[R]&&(o=g(o,s)),n(function(n,s,a,l){var c,h,d,u=[],p=[],g=s.length,v=n||f(e||"*",a.nodeType?[a]:a,[]),y=!t||!n&&e?v:m(v,u,t,a,l),b=i?o||(n?t:g||r)?[]:s:y;if(i&&i(y,b,a,l),r)for(c=m(b,p),r(c,[],a,l),h=c.length;h--;)(d=c[h])&&(b[p[h]]=!(y[p[h]]=d));if(n){if(o||t){if(o){for(c=[],h=b.length;h--;)(d=b[h])&&c.push(y[h]=d);o(null,b=[],c,l)}for(h=b.length;h--;)(d=b[h])&&(c=o?Z(n,d):u[h])>-1&&(n[c]=!(s[c]=d))}}else b=m(b===s?b.splice(g,b.length):b),o?o(null,s,b,l):X.apply(s,b)})}function v(t){for(var e,i,n,r=t.length,o=x.relative[t[0].type],s=o||x.relative[" "],a=o?1:0,l=u(function(t){return t===e},s,!0),c=u(function(t){return Z(e,t)>-1},s,!0),h=[function(t,i,n){var r=!o&&(n||i!==T)||((e=i).nodeType?l(t,i,n):c(t,i,n));return e=null,r}];a<r;a++)if(i=x.relative[t[a].type])h=[u(p(h),i)];else{if((i=x.filter[t[a].type].apply(null,t[a].matches))[R]){for(n=++a;n<r&&!x.relative[t[n].type];n++);return g(a>1&&p(h),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(ot,"$1"),i,a<n&&v(t.slice(a,n)),n<r&&v(t=t.slice(n)),n<r&&d(t))}h.push(i)}return p(h)}function y(t,i){var r=i.length>0,o=t.length>0,s=function(n,s,a,l,c){var h,d,u,p=0,f="0",g=n&&[],v=[],y=T,b=n||o&&x.find.TAG("*",c),_=H+=null==y?1:Math.random()||.1,w=b.length;for(c&&(T=s===P||s||c);f!==w&&null!=(h=b[f]);f++){if(o&&h){for(d=0,s||h.ownerDocument===P||(E(h),a=!O);u=t[d++];)if(u(h,s||P,a)){l.push(h);break}c&&(H=_)}r&&((h=!u&&h)&&p--,n&&g.push(h))}if(p+=f,r&&f!==p){for(d=0;u=i[d++];)u(g,v,s,a);if(n){if(p>0)for(;f--;)g[f]||v[f]||(v[f]=G.call(l));v=m(v)}X.apply(l,v),c&&!n&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return c&&(H=_,T=y),g};return r?n(s):s}var b,_,x,w,k,S,C,D,T,A,M,E,P,I,O,N,F,L,j,R="sizzle"+1*new Date,$=t.document,H=0,B=0,z=i(),U=i(),W=i(),Y=function(t,e){return t===e&&(M=!0),0},V={}.hasOwnProperty,q=[],G=q.pop,K=q.push,X=q.push,Q=q.slice,Z=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",tt="[\\x20\\t\\r\\n\\f]",et="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",it="\\["+tt+"*("+et+")(?:"+tt+"*([*^$|!~]?=)"+tt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+et+"))|)"+tt+"*\\]",nt=":("+et+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+it+")*)|.*)\\)|)",rt=new RegExp(tt+"+","g"),ot=new RegExp("^"+tt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+tt+"+$","g"),st=new RegExp("^"+tt+"*,"+tt+"*"),at=new RegExp("^"+tt+"*([>+~]|"+tt+")"+tt+"*"),lt=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ct=new RegExp(nt),ht=new RegExp("^"+et+"$"),dt={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+nt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},ut=/^(?:input|select|textarea|button)$/i,pt=/^h\d$/i,ft=/^[^{]+\{\s*\[native \w/,mt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,vt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),yt=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},bt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_t=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},xt=function(){E()},wt=u(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{X.apply(q=Q.call($.childNodes),$.childNodes),q[$.childNodes.length].nodeType}catch(t){X={apply:q.length?function(t,e){K.apply(t,Q.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}_=e.support={},k=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},E=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:$;return n!==P&&9===n.nodeType&&n.documentElement?(P=n,I=P.documentElement,O=!k(P),$!==P&&(i=P.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",xt,!1):i.attachEvent&&i.attachEvent("onunload",xt)),_.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),_.getElementsByTagName=r(function(t){return t.appendChild(P.createComment("")),!t.getElementsByTagName("*").length}),_.getElementsByClassName=ft.test(P.getElementsByClassName),_.getById=r(function(t){return I.appendChild(t).id=R,!P.getElementsByName||!P.getElementsByName(R).length}),_.getById?(x.filter.ID=function(t){var e=t.replace(vt,yt);return function(t){return t.getAttribute("id")===e}},x.find.ID=function(t,e){if(void 0!==e.getElementById&&O){var i=e.getElementById(t);return i?[i]:[]}}):(x.filter.ID=function(t){var e=t.replace(vt,yt);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},x.find.ID=function(t,e){if(void 0!==e.getElementById&&O){var i,n,r,o=e.getElementById(t);if(o){if((i=o.getAttributeNode("id"))&&i.value===t)return[o];for(r=e.getElementsByName(t),n=0;o=r[n++];)if((i=o.getAttributeNode("id"))&&i.value===t)return[o]}return[]}}),x.find.TAG=_.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):_.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},x.find.CLASS=_.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&O)return e.getElementsByClassName(t)},F=[],N=[],(_.qsa=ft.test(P.querySelectorAll))&&(r(function(t){I.appendChild(t).innerHTML="<a id='"+R+"'></a><select id='"+R+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&N.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||N.push("\\["+tt+"*(?:value|"+J+")"),t.querySelectorAll("[id~="+R+"-]").length||N.push("~="),t.querySelectorAll(":checked").length||N.push(":checked"),t.querySelectorAll("a#"+R+"+*").length||N.push(".#.+[+~]")}),r(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=P.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&N.push("name"+tt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&N.push(":enabled",":disabled"),I.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&N.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),N.push(",.*:")})),(_.matchesSelector=ft.test(L=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&r(function(t){_.disconnectedMatch=L.call(t,"*"),L.call(t,"[s!='']:x"),F.push("!=",nt)}),N=N.length&&new RegExp(N.join("|")),F=F.length&&new RegExp(F.join("|")),e=ft.test(I.compareDocumentPosition),j=e||ft.test(I.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Y=e?function(t,e){if(t===e)return M=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!_.sortDetached&&e.compareDocumentPosition(t)===i?t===P||t.ownerDocument===$&&j($,t)?-1:e===P||e.ownerDocument===$&&j($,e)?1:A?Z(A,t)-Z(A,e):0:4&i?-1:1)}:function(t,e){if(t===e)return M=!0,0;var i,n=0,r=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!r||!o)return t===P?-1:e===P?1:r?-1:o?1:A?Z(A,t)-Z(A,e):0;if(r===o)return s(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?s(a[n],l[n]):a[n]===$?-1:l[n]===$?1:0},P):P},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==P&&E(t),i=i.replace(lt,"='$1']"),_.matchesSelector&&O&&!W[i+" "]&&(!F||!F.test(i))&&(!N||!N.test(i)))try{var n=L.call(t,i);if(n||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return e(i,P,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==P&&E(t),j(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==P&&E(t);var i=x.attrHandle[e.toLowerCase()],n=i&&V.call(x.attrHandle,e.toLowerCase())?i(t,e,!O):void 0;return void 0!==n?n:_.attributes||!O?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.escape=function(t){return(t+"").replace(bt,_t)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,r=0;if(M=!_.detectDuplicates,A=!_.sortStable&&t.slice(0),t.sort(Y),M){for(;e=t[r++];)e===t[r]&&(n=i.push(r));for(;n--;)t.splice(i[n],1)}return A=null,t},w=e.getText=function(t){var e,i="",n=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=w(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[n++];)i+=w(e);return i},(x=e.selectors={cacheLength:50,createPseudo:n,match:dt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(vt,yt),t[3]=(t[3]||t[4]||t[5]||"").replace(vt,yt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return dt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ct.test(i)&&(e=S(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(vt,yt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=z[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&z(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(r){var o=e.attr(r,t);return null==o?"!="===i:!i||(o+="","="===i?o===n:"!="===i?o!==n:"^="===i?n&&0===o.indexOf(n):"*="===i?n&&o.indexOf(n)>-1:"$="===i?n&&o.slice(-n.length)===n:"~="===i?(" "+o.replace(rt," ")+" ").indexOf(n)>-1:"|="===i&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var c,h,d,u,p,f,m=o!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(o){for(;m;){for(u=e;u=u[m];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(b=(p=(c=(h=(d=(u=g)[R]||(u[R]={}))[u.uniqueID]||(d[u.uniqueID]={}))[t]||[])[0]===H&&c[1])&&c[2],u=p&&g.childNodes[p];u=++p&&u&&u[m]||(b=p=0)||f.pop();)if(1===u.nodeType&&++b&&u===e){h[t]=[H,p,b];break}}else if(y&&(b=p=(c=(h=(d=(u=e)[R]||(u[R]={}))[u.uniqueID]||(d[u.uniqueID]={}))[t]||[])[0]===H&&c[1]),!1===b)for(;(u=++p&&u&&u[m]||(b=p=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++b||(y&&((h=(d=u[R]||(u[R]={}))[u.uniqueID]||(d[u.uniqueID]={}))[t]=[H,b]),u!==e)););return(b-=r)===n||b%n==0&&b/n>=0}}},PSEUDO:function(t,i){var r,o=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[R]?o(i):o.length>1?(r=[t,t,"",i],x.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,r=o(t,i),s=r.length;s--;)t[n=Z(t,r[s])]=!(e[n]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:n(function(t){var e=[],i=[],r=C(t.replace(ot,"$1"));return r[R]?n(function(t,e,i,n){for(var o,s=r(t,null,n,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,n,o){return e[0]=t,r(e,null,o,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(vt,yt),function(e){return(e.textContent||e.innerText||w(e)).indexOf(t)>-1}}),lang:n(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(vt,yt).toLowerCase(),function(e){var i;do{if(i=O?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===I},focus:function(t){return t===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:a(!1),disabled:a(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return ut.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:l(function(){return[0]}),last:l(function(t,e){return[e-1]}),eq:l(function(t,e,i){return[i<0?i+e:i]}),even:l(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:l(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:l(function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t}),gt:l(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}}).pseudos.nth=x.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[b]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(b);for(b in{submit:!0,reset:!0})x.pseudos[b]=function(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}(b);return h.prototype=x.filters=x.pseudos,x.setFilters=new h,S=e.tokenize=function(t,i){var n,r,o,s,a,l,c,h=U[t+" "];if(h)return i?0:h.slice(0);for(a=t,l=[],c=x.preFilter;a;){n&&!(r=st.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=at.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(ot," ")}),a=a.slice(n.length));for(s in x.filter)!(r=dt[s].exec(a))||c[s]&&!(r=c[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return i?a.length:a?e.error(t):U(t,l).slice(0)},C=e.compile=function(t,e){var i,n=[],r=[],o=W[t+" "];if(!o){for(e||(e=S(t)),i=e.length;i--;)(o=v(e[i]))[R]?n.push(o):r.push(o);(o=W(t,y(r,n))).selector=t}return o},D=e.select=function(t,e,i,n){var r,o,s,a,l,h="function"==typeof t&&t,u=!n&&S(t=h.selector||t);if(i=i||[],1===u.length){if((o=u[0]=u[0].slice(0)).length>2&&"ID"===(s=o[0]).type&&9===e.nodeType&&O&&x.relative[o[1].type]){if(!(e=(x.find.ID(s.matches[0].replace(vt,yt),e)||[])[0]))return i;h&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=dt.needsContext.test(t)?0:o.length;r--&&(s=o[r],!x.relative[a=s.type]);)if((l=x.find[a])&&(n=l(s.matches[0].replace(vt,yt),gt.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(r,1),!(t=n.length&&d(o)))return X.apply(i,n),i;break}}return(h||C(t,u))(n,e,!O,i,!e||gt.test(t)&&c(e.parentNode)||e),i},_.sortStable=R.split("").sort(Y).join("")===R,_.detectDuplicates=!!M,E(),_.sortDetached=r(function(t){return 1&t.compareDocumentPosition(P.createElement("fieldset"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),_.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(J,function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(t);pt.find=yt,pt.expr=yt.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=yt.uniqueSort,pt.text=yt.getText,pt.isXMLDoc=yt.isXML,pt.contains=yt.contains,pt.escapeSelector=yt.escape;var bt=function(t,e,i){for(var n=[],r=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&pt(t).is(i))break;n.push(t)}return n},_t=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},xt=pt.expr.match.needsContext,wt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,kt=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?pt.find.matchesSelector(n,t)?[n]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,i,n=this.length,r=this;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;e<n;e++)if(pt.contains(r[e],this))return!0}));for(i=this.pushStack([]),e=0;e<n;e++)pt.find(t,r[e],i);return n>1?pt.uniqueSort(i):i},filter:function(t){return this.pushStack(o(this,t||[],!1))},not:function(t){return this.pushStack(o(this,t||[],!0))},is:function(t){return!!o(this,"string"==typeof t&&xt.test(t)?pt(t):t||[],!1).length}});var St,Ct=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(pt.fn.init=function(t,e,i){var n,r;if(!t)return this;if(i=i||St,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:Ct.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:et,!0)),wt.test(n[1])&&pt.isPlainObject(e))for(n in e)pt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(r=et.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):pt.isFunction(t)?void 0!==i.ready?i.ready(t):t(pt):pt.makeArray(t,this)}).prototype=pt.fn,St=pt(et);var Dt=/^(?:parents|prev(?:Until|All))/,Tt={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e=pt(t,this),i=e.length;return this.filter(function(){for(var t=0;t<i;t++)if(pt.contains(this,e[t]))return!0})},closest:function(t,e){var i,n=0,r=this.length,o=[],s="string"!=typeof t&&pt(t);if(!xt.test(t))for(;n<r;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&pt.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?pt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?st.call(pt(t),this[0]):st.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return bt(t,"parentNode")},parentsUntil:function(t,e,i){return bt(t,"parentNode",i)},next:function(t){return s(t,"nextSibling")},prev:function(t){return s(t,"previousSibling")},nextAll:function(t){return bt(t,"nextSibling")},prevAll:function(t){return bt(t,"previousSibling")},nextUntil:function(t,e,i){return bt(t,"nextSibling",i)},prevUntil:function(t,e,i){return bt(t,"previousSibling",i)},siblings:function(t){return _t((t.parentNode||{}).firstChild,t)},children:function(t){return _t(t.firstChild)},contents:function(t){return r(t,"iframe")?t.contentDocument:(r(t,"template")&&(t=t.content||t),pt.merge([],t.childNodes))}},function(t,e){pt.fn[t]=function(i,n){var r=pt.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=pt.filter(n,r)),this.length>1&&(Tt[t]||pt.uniqueSort(r),Dt.test(t)&&r.reverse()),this.pushStack(r)}});var At=/[^\x20\t\r\n\f]+/g;pt.Callbacks=function(t){t="string"==typeof t?a(t):pt.extend({},t);var e,i,n,r,o=[],s=[],l=-1,c=function(){for(r=r||t.once,n=e=!0;s.length;l=-1)for(i=s.shift();++l<o.length;)!1===o[l].apply(i[0],i[1])&&t.stopOnFalse&&(l=o.length,i=!1);t.memory||(i=!1),e=!1,r&&(o=i?[]:"")},h={add:function(){return o&&(i&&!e&&(l=o.length-1,s.push(i)),function e(i){pt.each(i,function(i,n){pt.isFunction(n)?t.unique&&h.has(n)||o.push(n):n&&n.length&&"string"!==pt.type(n)&&e(n)})}(arguments),i&&!e&&c()),this},remove:function(){return pt.each(arguments,function(t,e){for(var i;(i=pt.inArray(e,o,i))>-1;)o.splice(i,1),i<=l&&l--}),this},has:function(t){return t?pt.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=i="",this},disabled:function(){return!o},lock:function(){return r=s=[],i||e||(o=i=""),this},locked:function(){return!!r},fireWith:function(t,i){return r||(i=[t,(i=i||[]).slice?i.slice():i],s.push(i),e||c()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!n}};return h},pt.extend({Deferred:function(e){var i=[["notify","progress",pt.Callbacks("memory"),pt.Callbacks("memory"),2],["resolve","done",pt.Callbacks("once memory"),pt.Callbacks("once memory"),0,"resolved"],["reject","fail",pt.Callbacks("once memory"),pt.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return pt.Deferred(function(e){pt.each(i,function(i,n){var r=pt.isFunction(t[n[4]])&&t[n[4]];o[n[1]](function(){var t=r&&r.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[n[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(e,n,r){function o(e,i,n,r){return function(){var a=this,h=arguments,d=function(){var t,d;if(!(e<s)){if((t=n.apply(a,h))===i.promise())throw new TypeError("Thenable self-resolution");d=t&&("object"==typeof t||"function"==typeof t)&&t.then,pt.isFunction(d)?r?d.call(t,o(s,i,l,r),o(s,i,c,r)):(s++,d.call(t,o(s,i,l,r),o(s,i,c,r),o(s,i,l,i.notifyWith))):(n!==l&&(a=void 0,h=[t]),(r||i.resolveWith)(a,h))}},u=r?d:function(){try{d()}catch(t){pt.Deferred.exceptionHook&&pt.Deferred.exceptionHook(t,u.stackTrace),e+1>=s&&(n!==c&&(a=void 0,h=[t]),i.rejectWith(a,h))}};e?u():(pt.Deferred.getStackHook&&(u.stackTrace=pt.Deferred.getStackHook()),t.setTimeout(u))}}var s=0;return pt.Deferred(function(t){i[0][3].add(o(0,t,pt.isFunction(r)?r:l,t.notifyWith)),i[1][3].add(o(0,t,pt.isFunction(e)?e:l)),i[2][3].add(o(0,t,pt.isFunction(n)?n:c))}).promise()},promise:function(t){return null!=t?pt.extend(t,r):r}},o={};return pt.each(i,function(t,e){var s=e[2],a=e[5];r[e[1]]=s.add,a&&s.add(function(){n=a},i[3-t][2].disable,i[0][2].lock),s.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(t){var e=arguments.length,i=e,n=Array(i),r=nt.call(arguments),o=pt.Deferred(),s=function(t){return function(i){n[t]=this,r[t]=arguments.length>1?nt.call(arguments):i,--e||o.resolveWith(n,r)}};if(e<=1&&(h(t,o.done(s(i)).resolve,o.reject,!e),"pending"===o.state()||pt.isFunction(r[i]&&r[i].then)))return o.then();for(;i--;)h(r[i],s(i),o.reject);return o.promise()}});var Mt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;pt.Deferred.exceptionHook=function(e,i){t.console&&t.console.warn&&e&&Mt.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},pt.readyException=function(e){t.setTimeout(function(){throw e})};var Et=pt.Deferred();pt.fn.ready=function(t){return Et.then(t).catch(function(t){pt.readyException(t)}),this},pt.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--pt.readyWait:pt.isReady)||(pt.isReady=!0,!0!==t&&--pt.readyWait>0||Et.resolveWith(et,[pt]))}}),pt.ready.then=Et.then,"complete"===et.readyState||"loading"!==et.readyState&&!et.documentElement.doScroll?t.setTimeout(pt.ready):(et.addEventListener("DOMContentLoaded",d),t.addEventListener("load",d));var Pt=function(t,e,i,n,r,o,s){var a=0,l=t.length,c=null==i;if("object"===pt.type(i)){r=!0;for(a in i)Pt(t,e,a,i[a],!0,o,s)}else if(void 0!==n&&(r=!0,pt.isFunction(n)||(s=!0),c&&(s?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(pt(t),i)})),e))for(;a<l;a++)e(t[a],i,s?n:n.call(t[a],a,e(t[a],i)));return r?t:c?e.call(t):l?e(t[0],i):o},It=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};u.uid=1,u.prototype={cache:function(t){var e=t[this.expando];return e||(e={},It(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,r=this.cache(t);if("string"==typeof e)r[pt.camelCase(e)]=i;else for(n in e)r[pt.camelCase(n)]=e[n];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][pt.camelCase(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(pt.camelCase):(e=pt.camelCase(e))in n?[e]:e.match(At)||[]).length;for(;i--;)delete n[e[i]]}(void 0===e||pt.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!pt.isEmptyObject(e)}};var Ot=new u,Nt=new u,Ft=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Lt=/[A-Z]/g;pt.extend({hasData:function(t){return Nt.hasData(t)||Ot.hasData(t)},data:function(t,e,i){return Nt.access(t,e,i)},removeData:function(t,e){Nt.remove(t,e)},_data:function(t,e,i){return Ot.access(t,e,i)},_removeData:function(t,e){Ot.remove(t,e)}}),pt.fn.extend({data:function(t,e){var i,n,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=Nt.get(o),1===o.nodeType&&!Ot.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&0===(n=s[i].name).indexOf("data-")&&(n=pt.camelCase(n.slice(5)),f(o,n,r[n]));Ot.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each(function(){Nt.set(this,t)}):Pt(this,function(e){var i;if(o&&void 0===e){if(void 0!==(i=Nt.get(o,t)))return i;if(void 0!==(i=f(o,t)))return i}else this.each(function(){Nt.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){Nt.remove(this,t)})}}),pt.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=Ot.get(t,e),i&&(!n||Array.isArray(i)?n=Ot.access(t,e,pt.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=pt.queue(t,e),n=i.length,r=i.shift(),o=pt._queueHooks(t,e);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),delete o.stop,r.call(t,function(){pt.dequeue(t,e)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return Ot.get(t,i)||Ot.access(t,i,{empty:pt.Callbacks("once memory").add(function(){Ot.remove(t,[e+"queue",i])})})}}),pt.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?pt.queue(this[0],t):void 0===e?this:this.each(function(){var i=pt.queue(this,t,e);pt._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&pt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){pt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,r=pt.Deferred(),o=this,s=this.length,a=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(i=Ot.get(o[s],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(e)}});var jt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Rt=new RegExp("^(?:([+-])=|)("+jt+")([a-z%]*)$","i"),$t=["Top","Right","Bottom","Left"],Ht=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&pt.contains(t.ownerDocument,t)&&"none"===pt.css(t,"display")},Bt=function(t,e,i,n){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=i.apply(t,n||[]);for(o in e)t.style[o]=s[o];return r},zt={};pt.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ht(this)?pt(this).show():pt(this).hide()})}});var Ut=/^(?:checkbox|radio)$/i,Wt=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Yt=/^$|\/(?:java|ecma)script/i,Vt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Vt.optgroup=Vt.option,Vt.tbody=Vt.tfoot=Vt.colgroup=Vt.caption=Vt.thead,Vt.th=Vt.td;var qt=/<|&#?\w+;/;!function(){var t=et.createDocumentFragment().appendChild(et.createElement("div")),e=et.createElement("input");e.setAttribute("type","radio"),e.setAttribute("checked","checked"),e.setAttribute("name","t"),t.appendChild(e),ut.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ut.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Gt=et.documentElement,Kt=/^key/,Xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qt=/^([^.]*)(?:\.(.+)|)/;pt.event={global:{},add:function(t,e,i,n,r){var o,s,a,l,c,h,d,u,p,f,m,g=Ot.get(t);if(g)for(i.handler&&(i=(o=i).handler,r=o.selector),r&&pt.find.matchesSelector(Gt,r),i.guid||(i.guid=pt.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==pt&&pt.event.triggered!==e.type?pt.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(At)||[""]).length;c--;)p=m=(a=Qt.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=pt.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,d=pt.event.special[p]||{},h=pt.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&pt.expr.match.needsContext.test(r),namespace:f.join(".")},o),(u=l[p])||((u=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,n,f,s)||t.addEventListener&&t.addEventListener(p,s)),d.add&&(d.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),r?u.splice(u.delegateCount++,0,h):u.push(h),pt.event.global[p]=!0)},remove:function(t,e,i,n,r){var o,s,a,l,c,h,d,u,p,f,m,g=Ot.hasData(t)&&Ot.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(At)||[""]).length;c--;)if(a=Qt.exec(e[c])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p){for(d=pt.event.special[p]||{},u=l[p=(n?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=u.length;o--;)h=u[o],!r&&m!==h.origType||i&&i.guid!==h.guid||a&&!a.test(h.namespace)||n&&n!==h.selector&&("**"!==n||!h.selector)||(u.splice(o,1),h.selector&&u.delegateCount--,d.remove&&d.remove.call(t,h));s&&!u.length&&(d.teardown&&!1!==d.teardown.call(t,f,g.handle)||pt.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)pt.event.remove(t,p+e[c],i,n,!0);pt.isEmptyObject(l)&&Ot.remove(t,"handle events")}},dispatch:function(t){var e,i,n,r,o,s,a=pt.event.fix(t),l=new Array(arguments.length),c=(Ot.get(this,"events")||{})[a.type]||[],h=pt.event.special[a.type]||{};for(l[0]=a,e=1;e<arguments.length;e++)l[e]=arguments[e];if(a.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,a)){for(s=pt.event.handlers.call(this,a,c),e=0;(r=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(n=((pt.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l))&&!1===(a.result=n)&&(a.preventDefault(),a.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,a),a.result}},handlers:function(t,e){var i,n,r,o,s,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],s={},i=0;i<l;i++)void 0===s[r=(n=e[i]).selector+" "]&&(s[r]=n.needsContext?pt(r,this).index(c)>-1:pt.find(r,this,null,[c]).length),s[r]&&o.push(n);o.length&&a.push({elem:c,handlers:o})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(pt.Event.prototype,t,{enumerable:!0,configurable:!0,get:pt.isFunction(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[pt.expando]?t:new pt.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==k()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===k()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r(this,"input"))return this.click(),!1},_default:function(t){return r(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},pt.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},pt.Event=function(t,e){if(!(this instanceof pt.Event))return new pt.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?x:w,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&pt.extend(this,e),this.timeStamp=t&&t.timeStamp||pt.now(),this[pt.expando]=!0},pt.Event.prototype={constructor:pt.Event,isDefaultPrevented:w,isPropagationStopped:w,isImmediatePropagationStopped:w,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=x,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=x,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=x,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},pt.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&Kt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&Xt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},pt.event.addProp),pt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){pt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===n||pt.contains(n,r))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),pt.fn.extend({on:function(t,e,i,n){return S(this,t,e,i,n)},one:function(t,e,i,n){return S(this,t,e,i,n,1)},off:function(t,e,i){var n,r;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,pt(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=w),this.each(function(){pt.event.remove(this,t,i,e)})}});var Zt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Jt=/<script|<style|<link/i,te=/checked\s*(?:[^=]|=\s*.checked.)/i,ee=/^true\/(.*)/,ie=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;pt.extend({htmlPrefilter:function(t){return t.replace(Zt,"<$1></$2>")},clone:function(t,e,i){var n,r,o,s,a=t.cloneNode(!0),l=pt.contains(t.ownerDocument,t);if(!(ut.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(s=y(a),n=0,r=(o=y(t)).length;n<r;n++)M(o[n],s[n]);if(e)if(i)for(o=o||y(t),s=s||y(a),n=0,r=o.length;n<r;n++)A(o[n],s[n]);else A(t,a);return(s=y(a,"script")).length>0&&b(s,!l&&y(t,"script")),a},cleanData:function(t){for(var e,i,n,r=pt.event.special,o=0;void 0!==(i=t[o]);o++)if(It(i)){if(e=i[Ot.expando]){if(e.events)for(n in e.events)r[n]?pt.event.remove(i,n):pt.removeEvent(i,n,e.handle);i[Ot.expando]=void 0}i[Nt.expando]&&(i[Nt.expando]=void 0)}}}),pt.fn.extend({detach:function(t){return P(this,t,!0)},remove:function(t){return P(this,t)},text:function(t){return Pt(this,function(t){return void 0===t?pt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return E(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||C(this,t).appendChild(t)})},prepend:function(){return E(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=C(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return E(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return E(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(pt.cleanData(y(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return pt.clone(this,t,e)})},html:function(t){return Pt(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Jt.test(t)&&!Vt[(Wt.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(pt.cleanData(y(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return E(this,arguments,function(e){var i=this.parentNode;pt.inArray(this,t)<0&&(pt.cleanData(y(this)),i&&i.replaceChild(e,this))},t)}}),pt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){pt.fn[t]=function(t){for(var i,n=[],r=pt(t),o=r.length-1,s=0;s<=o;s++)i=s===o?this:this.clone(!0),pt(r[s])[e](i),ot.apply(n,i.get());return this.pushStack(n)}});var ne=/^margin/,re=new RegExp("^("+jt+")(?!px)[a-z%]+$","i"),oe=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)};!function(){function e(){if(a){a.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Gt.appendChild(s);var e=t.getComputedStyle(a);i="1%"!==e.top,o="2px"===e.marginLeft,n="4px"===e.width,a.style.marginRight="50%",r="4px"===e.marginRight,Gt.removeChild(s),a=null}}var i,n,r,o,s=et.createElement("div"),a=et.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",ut.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),pt.extend(ut,{pixelPosition:function(){return e(),i},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),o}}))}();var se=/^(none|table(?!-c[ea]).+)/,ae=/^--/,le={position:"absolute",visibility:"hidden",display:"block"},ce={letterSpacing:"0",fontWeight:"400"},he=["Webkit","Moz","ms"],de=et.createElement("div").style;pt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=I(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=pt.camelCase(e),l=ae.test(e),c=t.style;if(l||(e=F(a)),s=pt.cssHooks[e]||pt.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(t,!1,n))?r:c[e];"string"==(o=typeof i)&&(r=Rt.exec(i))&&r[1]&&(i=m(t,e,r),o="number"),null!=i&&i===i&&("number"===o&&(i+=r&&r[3]||(pt.cssNumber[a]?"":"px")),ut.clearCloneStyle||""!==i||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,n))||(l?c.setProperty(e,i):c[e]=i))}},css:function(t,e,i,n){var r,o,s,a=pt.camelCase(e);return ae.test(e)||(e=F(a)),(s=pt.cssHooks[e]||pt.cssHooks[a])&&"get"in s&&(r=s.get(t,!0,i)),void 0===r&&(r=I(t,e,n)),"normal"===r&&e in ce&&(r=ce[e]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),pt.each(["height","width"],function(t,e){pt.cssHooks[e]={get:function(t,i,n){if(i)return!se.test(pt.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?R(t,e,n):Bt(t,le,function(){return R(t,e,n)})},set:function(t,i,n){var r,o=n&&oe(t),s=n&&j(t,e,n,"border-box"===pt.css(t,"boxSizing",!1,o),o);return s&&(r=Rt.exec(i))&&"px"!==(r[3]||"px")&&(t.style[e]=i,i=pt.css(t,e)),L(0,i,s)}}}),pt.cssHooks.marginLeft=O(ut.reliableMarginLeft,function(t,e){if(e)return(parseFloat(I(t,"marginLeft"))||t.getBoundingClientRect().left-Bt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),pt.each({margin:"",padding:"",border:"Width"},function(t,e){pt.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+$t[n]+e]=o[n]||o[n-2]||o[0];return r}},ne.test(t)||(pt.cssHooks[t+e].set=L)}),pt.fn.extend({css:function(t,e){return Pt(this,function(t,e,i){var n,r,o={},s=0;if(Array.isArray(e)){for(n=oe(t),r=e.length;s<r;s++)o[e[s]]=pt.css(t,e[s],!1,n);return o}return void 0!==i?pt.style(t,e,i):pt.css(t,e)},t,e,arguments.length>1)}}),pt.Tween=$,$.prototype={constructor:$,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||pt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(pt.cssNumber[i]?"":"px")},cur:function(){var t=$.propHooks[this.prop];return t&&t.get?t.get(this):$.propHooks._default.get(this)},run:function(t){var e,i=$.propHooks[this.prop];return this.options.duration?this.pos=e=pt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):$.propHooks._default.set(this),this}},$.prototype.init.prototype=$.prototype,$.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=pt.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){pt.fx.step[t.prop]?pt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[pt.cssProps[t.prop]]&&!pt.cssHooks[t.prop]?t.elem[t.prop]=t.now:pt.style(t.elem,t.prop,t.now+t.unit)}}},$.propHooks.scrollTop=$.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},pt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},pt.fx=$.prototype.init,pt.fx.step={};var ue,pe,fe=/^(?:toggle|show|hide)$/,me=/queueHooks$/;pt.Animation=pt.extend(Y,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return m(i.elem,t,Rt.exec(e),i),i}]},tweener:function(t,e){pt.isFunction(t)?(e=t,t=["*"]):t=t.match(At);for(var i,n=0,r=t.length;n<r;n++)i=t[n],Y.tweeners[i]=Y.tweeners[i]||[],Y.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,r,o,s,a,l,c,h,d="width"in e||"height"in e,u=this,p={},f=t.style,m=t.nodeType&&Ht(t),g=Ot.get(t,"fxshow");i.queue||(null==(s=pt._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,pt.queue(t,"fx").length||s.empty.fire()})}));for(n in e)if(r=e[n],fe.test(r)){if(delete e[n],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[n])continue;m=!0}p[n]=g&&g[n]||pt.style(t,n)}if((l=!pt.isEmptyObject(e))||!pt.isEmptyObject(p)){d&&1===t.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=Ot.get(t,"display")),"none"===(h=pt.css(t,"display"))&&(c?h=c:(v([t],!0),c=t.style.display||c,h=pt.css(t,"display"),v([t]))),("inline"===h||"inline-block"===h&&null!=c)&&"none"===pt.css(t,"float")&&(l||(u.done(function(){f.display=c}),null==c&&(h=f.display,c="none"===h?"":h)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",u.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})),l=!1;for(n in p)l||(g?"hidden"in g&&(m=g.hidden):g=Ot.access(t,"fxshow",{display:c}),o&&(g.hidden=!m),m&&v([t],!0),u.done(function(){m||v([t]),Ot.remove(t,"fxshow");for(n in p)pt.style(t,n,p[n])})),l=U(m?g[n]:0,n,u),n in g||(g[n]=l.start,m&&(l.end=l.start,l.start=0))}}],prefilter:function(t,e){e?Y.prefilters.unshift(t):Y.prefilters.push(t)}}),pt.speed=function(t,e,i){var n=t&&"object"==typeof t?pt.extend({},t):{complete:i||!i&&e||pt.isFunction(t)&&t,duration:t,easing:i&&e||e&&!pt.isFunction(e)&&e};return pt.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in pt.fx.speeds?n.duration=pt.fx.speeds[n.duration]:n.duration=pt.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){pt.isFunction(n.old)&&n.old.call(this),n.queue&&pt.dequeue(this,n.queue)},n},pt.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Ht).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=pt.isEmptyObject(t),o=pt.speed(e,i,n),s=function(){var e=Y(this,pt.extend({},t),o);(r||Ot.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=pt.timers,s=Ot.get(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&me.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(i),e=!1,o.splice(r,1));!e&&i||pt.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,i=Ot.get(this),n=i[t+"queue"],r=i[t+"queueHooks"],o=pt.timers,s=n?n.length:0;for(i.finish=!0,pt.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),pt.each(["toggle","show","hide"],function(t,e){var i=pt.fn[e];pt.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(z(e,!0),t,n,r)}}),pt.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){pt.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),pt.timers=[],pt.fx.tick=function(){var t,e=0,i=pt.timers;for(ue=pt.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||pt.fx.stop(),ue=void 0},pt.fx.timer=function(t){pt.timers.push(t),pt.fx.start()},pt.fx.interval=13,pt.fx.start=function(){pe||(pe=!0,H())},pt.fx.stop=function(){pe=null},pt.fx.speeds={slow:600,fast:200,_default:400},pt.fn.delay=function(e,i){return e=pt.fx?pt.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,n){var r=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(r)}})},function(){var t=et.createElement("input"),e=et.createElement("select").appendChild(et.createElement("option"));t.type="checkbox",ut.checkOn=""!==t.value,ut.optSelected=e.selected,(t=et.createElement("input")).value="t",t.type="radio",ut.radioValue="t"===t.value}();var ge,ve=pt.expr.attrHandle;pt.fn.extend({attr:function(t,e){return Pt(this,pt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){pt.removeAttr(this,t)})}}),pt.extend({attr:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?pt.prop(t,e,i):(1===o&&pt.isXMLDoc(t)||(r=pt.attrHooks[e.toLowerCase()]||(pt.expr.match.bool.test(e)?ge:void 0)),void 0!==i?null===i?void pt.removeAttr(t,e):r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:(t.setAttribute(e,i+""),i):r&&"get"in r&&null!==(n=r.get(t,e))?n:null==(n=pt.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!ut.radioValue&&"radio"===e&&r(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,r=e&&e.match(At);if(r&&1===t.nodeType)for(;i=r[n++];)t.removeAttribute(i)}}),ge={set:function(t,e,i){return!1===e?pt.removeAttr(t,i):t.setAttribute(i,i),i}},pt.each(pt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=ve[e]||pt.find.attr;ve[e]=function(t,e,n){var r,o,s=e.toLowerCase();return n||(o=ve[s],ve[s]=r,r=null!=i(t,e,n)?s:null,ve[s]=o),r}});var ye=/^(?:input|select|textarea|button)$/i,be=/^(?:a|area)$/i;pt.fn.extend({prop:function(t,e){return Pt(this,pt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[pt.propFix[t]||t]})}}),pt.extend({prop:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pt.isXMLDoc(t)||(e=pt.propFix[e]||e,r=pt.propHooks[e]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:t[e]=i:r&&"get"in r&&null!==(n=r.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=pt.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||be.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ut.optSelected||(pt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),pt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pt.propFix[this.toLowerCase()]=this}),pt.fn.extend({addClass:function(t){var e,i,n,r,o,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).addClass(t.call(this,e,q(this)))});if("string"==typeof t&&t)for(e=t.match(At)||[];i=this[l++];)if(r=q(i),n=1===i.nodeType&&" "+V(r)+" "){for(s=0;o=e[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");r!==(a=V(n))&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,n,r,o,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).removeClass(t.call(this,e,q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(At)||[];i=this[l++];)if(r=q(i),n=1===i.nodeType&&" "+V(r)+" "){for(s=0;o=e[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r!==(a=V(n))&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):pt.isFunction(t)?this.each(function(i){pt(this).toggleClass(t.call(this,i,q(this),e),e)}):this.each(function(){var e,n,r,o;if("string"===i)for(n=0,r=pt(this),o=t.match(At)||[];e=o[n++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==i||((e=q(this))&&Ot.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Ot.get(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+V(q(i))+" ").indexOf(e)>-1)return!0;return!1}});var _e=/\r/g;pt.fn.extend({val:function(t){var e,i,n,r=this[0];{if(arguments.length)return n=pt.isFunction(t),this.each(function(i){var r;1===this.nodeType&&(null==(r=n?t.call(this,i,pt(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=pt.map(r,function(t){return null==t?"":t+""})),(e=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return(e=pt.valHooks[r.type]||pt.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(_e,""):null==i?"":i}}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:V(pt.text(t))}},select:{get:function(t){var e,i,n,o=t.options,s=t.selectedIndex,a="select-one"===t.type,l=a?null:[],c=a?s+1:o.length;for(n=s<0?c:a?s:0;n<c;n++)if(((i=o[n]).selected||n===s)&&!i.disabled&&(!i.parentNode.disabled||!r(i.parentNode,"optgroup"))){if(e=pt(i).val(),a)return e;l.push(e)}return l},set:function(t,e){for(var i,n,r=t.options,o=pt.makeArray(e),s=r.length;s--;)((n=r[s]).selected=pt.inArray(pt.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),pt.each(["radio","checkbox"],function(){pt.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=pt.inArray(pt(t).val(),e)>-1}},ut.checkOn||(pt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var xe=/^(?:focusinfocus|focusoutblur)$/;pt.extend(pt.event,{trigger:function(e,i,n,r){var o,s,a,l,c,h,d,u=[n||et],p=ct.call(e,"type")?e.type:e,f=ct.call(e,"namespace")?e.namespace.split("."):[];if(s=a=n=n||et,3!==n.nodeType&&8!==n.nodeType&&!xe.test(p+pt.event.triggered)&&(p.indexOf(".")>-1&&(p=(f=p.split(".")).shift(),f.sort()),c=p.indexOf(":")<0&&"on"+p,e=e[pt.expando]?e:new pt.Event(p,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:pt.makeArray(i,[e]),d=pt.event.special[p]||{},r||!d.trigger||!1!==d.trigger.apply(n,i))){if(!r&&!d.noBubble&&!pt.isWindow(n)){for(l=d.delegateType||p,xe.test(l+p)||(s=s.parentNode);s;s=s.parentNode)u.push(s),a=s;a===(n.ownerDocument||et)&&u.push(a.defaultView||a.parentWindow||t)}for(o=0;(s=u[o++])&&!e.isPropagationStopped();)e.type=o>1?l:d.bindType||p,(h=(Ot.get(s,"events")||{})[e.type]&&Ot.get(s,"handle"))&&h.apply(s,i),(h=c&&s[c])&&h.apply&&It(s)&&(e.result=h.apply(s,i),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(u.pop(),i)||!It(n)||c&&pt.isFunction(n[p])&&!pt.isWindow(n)&&((a=n[c])&&(n[c]=null),pt.event.triggered=p,n[p](),pt.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(t,e,i){var n=pt.extend(new pt.Event,i,{type:t,isSimulated:!0});pt.event.trigger(n,null,e)}}),pt.fn.extend({trigger:function(t,e){return this.each(function(){pt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return pt.event.trigger(t,e,i,!0)}}),pt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){pt.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),pt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),ut.focusin="onfocusin"in t,ut.focusin||pt.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){pt.event.simulate(e,t.target,pt.event.fix(t))};pt.event.special[e]={setup:function(){var n=this.ownerDocument||this,r=Ot.access(n,e);r||n.addEventListener(t,i,!0),Ot.access(n,e,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this,r=Ot.access(n,e)-1;r?Ot.access(n,e,r):(n.removeEventListener(t,i,!0),Ot.remove(n,e))}}});var we=t.location,ke=pt.now(),Se=/\?/;pt.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||pt.error("Invalid XML: "+e),i};var Ce=/\[\]$/,De=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Ae=/^(?:input|select|textarea|keygen)/i;pt.param=function(t,e){var i,n=[],r=function(t,e){var i=pt.isFunction(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(Array.isArray(t)||t.jquery&&!pt.isPlainObject(t))pt.each(t,function(){r(this.name,this.value)});else for(i in t)G(i,t[i],e,r);return n.join("&")},pt.fn.extend({serialize:function(){return pt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=pt.prop(this,"elements");return t?pt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!pt(this).is(":disabled")&&Ae.test(this.nodeName)&&!Te.test(t)&&(this.checked||!Ut.test(t))}).map(function(t,e){var i=pt(this).val();return null==i?null:Array.isArray(i)?pt.map(i,function(t){return{name:e.name,value:t.replace(De,"\r\n")}}):{name:e.name,value:i.replace(De,"\r\n")}}).get()}});var Me=/%20/g,Ee=/#.*$/,Pe=/([?&])_=[^&]*/,Ie=/^(.*?):[ \t]*([^\r\n]*)$/gm,Oe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ne=/^(?:GET|HEAD)$/,Fe=/^\/\//,Le={},je={},Re="*/".concat("*"),$e=et.createElement("a");$e.href=we.href,pt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:we.href,type:"GET",isLocal:Oe.test(we.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":pt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Q(Q(t,pt.ajaxSettings),e):Q(pt.ajaxSettings,t)},ajaxPrefilter:K(Le),ajaxTransport:K(je),ajax:function(e,i){function n(e,i,n,a){var c,u,p,_,x,w=i;h||(h=!0,l&&t.clearTimeout(l),r=void 0,s=a||"",k.readyState=e>0?4:0,c=e>=200&&e<300||304===e,n&&(_=Z(f,k,n)),_=J(f,_,k,c),c?(f.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(pt.lastModified[o]=x),(x=k.getResponseHeader("etag"))&&(pt.etag[o]=x)),204===e||"HEAD"===f.type?w="nocontent":304===e?w="notmodified":(w=_.state,u=_.data,c=!(p=_.error))):(p=w,!e&&w||(w="error",e<0&&(e=0))),k.status=e,k.statusText=(i||w)+"",c?v.resolveWith(m,[u,w,k]):v.rejectWith(m,[k,w,p]),k.statusCode(b),b=void 0,d&&g.trigger(c?"ajaxSuccess":"ajaxError",[k,f,c?u:p]),y.fireWith(m,[k,w]),d&&(g.trigger("ajaxComplete",[k,f]),--pt.active||pt.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=void 0),i=i||{};var r,o,s,a,l,c,h,d,u,p,f=pt.ajaxSetup({},i),m=f.context||f,g=f.context&&(m.nodeType||m.jquery)?pt(m):pt.event,v=pt.Deferred(),y=pt.Callbacks("once memory"),b=f.statusCode||{},_={},x={},w="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(h){if(!a)for(a={};e=Ie.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return h?s:null},setRequestHeader:function(t,e){return null==h&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,_[t]=e),this},overrideMimeType:function(t){return null==h&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)k.always(t[k.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||w;return r&&r.abort(e),n(0,e),this}};if(v.promise(k),f.url=((e||f.url||we.href)+"").replace(Fe,we.protocol+"//"),f.type=i.method||i.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(At)||[""],null==f.crossDomain){c=et.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=$e.protocol+"//"+$e.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=pt.param(f.data,f.traditional)),X(Le,f,i,k),h)return k;(d=pt.event&&f.global)&&0==pt.active++&&pt.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ne.test(f.type),o=f.url.replace(Ee,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Me,"+")):(p=f.url.slice(o.length),f.data&&(o+=(Se.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(Pe,"$1"),p=(Se.test(o)?"&":"?")+"_="+ke+++p),f.url=o+p),f.ifModified&&(pt.lastModified[o]&&k.setRequestHeader("If-Modified-Since",pt.lastModified[o]),pt.etag[o]&&k.setRequestHeader("If-None-Match",pt.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||i.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Re+"; q=0.01":""):f.accepts["*"]);for(u in f.headers)k.setRequestHeader(u,f.headers[u]);if(f.beforeSend&&(!1===f.beforeSend.call(m,k,f)||h))return k.abort();if(w="abort",y.add(f.complete),k.done(f.success),k.fail(f.error),r=X(je,f,i,k)){if(k.readyState=1,d&&g.trigger("ajaxSend",[k,f]),h)return k;f.async&&f.timeout>0&&(l=t.setTimeout(function(){k.abort("timeout")},f.timeout));try{h=!1,r.send(_,n)}catch(t){if(h)throw t;n(-1,t)}}else n(-1,"No Transport");return k},getJSON:function(t,e,i){return pt.get(t,e,i,"json")},getScript:function(t,e){return pt.get(t,void 0,e,"script")}}),pt.each(["get","post"],function(t,e){pt[e]=function(t,i,n,r){return pt.isFunction(i)&&(r=r||n,n=i,i=void 0),pt.ajax(pt.extend({url:t,type:e,dataType:r,data:i,success:n},pt.isPlainObject(t)&&t))}}),pt._evalUrl=function(t){return pt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pt.fn.extend({wrapAll:function(t){var e;return this[0]&&(pt.isFunction(t)&&(t=t.call(this[0])),e=pt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return pt.isFunction(t)?this.each(function(e){pt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=pt(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=pt.isFunction(t);return this.each(function(i){pt(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){pt(this).replaceWith(this.childNodes)}),this}}),pt.expr.pseudos.hidden=function(t){return!pt.expr.pseudos.visible(t)},pt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},pt.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var He={0:200,1223:204},Be=pt.ajaxSettings.xhr();ut.cors=!!Be&&"withCredentials"in Be,ut.ajax=Be=!!Be,pt.ajaxTransport(function(e){var i,n;if(ut.cors||Be&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(s in r)a.setRequestHeader(s,r[s]);i=function(t){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(He[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),n=a.onerror=i("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){i&&n()})},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(i)throw t}},abort:function(){i&&i()}}}),pt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),pt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return pt.globalEval(t),t}}}),pt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),pt.ajaxTransport("script",function(t){if(t.crossDomain){var e,i;return{send:function(n,r){e=pt("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&r("error"===t.type?404:200,t.type)}),et.head.appendChild(e[0])},abort:function(){i&&i()}}}});var ze=[],Ue=/(=)\?(?=&|$)|\?\?/;pt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ze.pop()||pt.expando+"_"+ke++;return this[t]=!0,t}}),pt.ajaxPrefilter("json jsonp",function(e,i,n){var r,o,s,a=!1!==e.jsonp&&(Ue.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ue.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=pt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ue,"$1"+r):!1!==e.jsonp&&(e.url+=(Se.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||pt.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},n.always(function(){void 0===o?pt(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=i.jsonpCallback,ze.push(r)),s&&pt.isFunction(o)&&o(s[0]),s=o=void 0}),"script"}),ut.createHTMLDocument=function(){var t=et.implementation.createHTMLDocument("").body;return t.innerHTML="<form></form><form></form>",2===t.childNodes.length}(),pt.parseHTML=function(t,e,i){if("string"!=typeof t)return[];"boolean"==typeof e&&(i=e,e=!1);var n,r,o;return e||(ut.createHTMLDocument?((n=(e=et.implementation.createHTMLDocument("")).createElement("base")).href=et.location.href,e.head.appendChild(n)):e=et),r=wt.exec(t),o=!i&&[],r?[e.createElement(r[1])]:(r=_([t],e,o),o&&o.length&&pt(o).remove(),pt.merge([],r.childNodes))},pt.fn.load=function(t,e,i){var n,r,o,s=this,a=t.indexOf(" ");return a>-1&&(n=V(t.slice(a)),t=t.slice(0,a)),pt.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&pt.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,s.html(n?pt("<div>").append(pt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},pt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){pt.fn[e]=function(t){return this.on(e,t)}}),pt.expr.pseudos.animated=function(t){return pt.grep(pt.timers,function(e){return t===e.elem}).length},pt.offset={setOffset:function(t,e,i){var n,r,o,s,a,l,c=pt.css(t,"position"),h=pt(t),d={};"static"===c&&(t.style.position="relative"),a=h.offset(),o=pt.css(t,"top"),l=pt.css(t,"left"),("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1?(s=(n=h.position()).top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),pt.isFunction(e)&&(e=e.call(t,i,pt.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):h.css(d)}},pt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){pt.offset.setOffset(this,t,e)});var e,i,n,r,o=this[0];if(o)return o.getClientRects().length?(n=o.getBoundingClientRect(),e=o.ownerDocument,i=e.documentElement,r=e.defaultView,{top:n.top+r.pageYOffset-i.clientTop,left:n.left+r.pageXOffset-i.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var t,e,i=this[0],n={top:0,left:0};return"fixed"===pt.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),r(t[0],"html")||(n=t.offset()),n={top:n.top+pt.css(t[0],"borderTopWidth",!0),left:n.left+pt.css(t[0],"borderLeftWidth",!0)}),{top:e.top-n.top-pt.css(i,"marginTop",!0),left:e.left-n.left-pt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===pt.css(t,"position");)t=t.offsetParent;return t||Gt})}}),pt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;pt.fn[t]=function(n){return Pt(this,function(t,n,r){var o;if(pt.isWindow(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r)return o?o[e]:t[n];o?o.scrollTo(i?o.pageXOffset:r,i?r:o.pageYOffset):t[n]=r},t,n,arguments.length)}}),pt.each(["top","left"],function(t,e){pt.cssHooks[e]=O(ut.pixelPosition,function(t,i){if(i)return i=I(t,e),re.test(i)?pt(t).position()[e]+"px":i})}),pt.each({Height:"height",Width:"width"},function(t,e){pt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){pt.fn[n]=function(r,o){var s=arguments.length&&(i||"boolean"!=typeof r),a=i||(!0===r||!0===o?"margin":"border");return Pt(this,function(e,i,r){var o;return pt.isWindow(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?pt.css(e,i,a):pt.style(e,i,r,a)},e,s?r:void 0,s)}})}),pt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),pt.holdReady=function(t){t?pt.readyWait++:pt.ready(!0)},pt.isArray=Array.isArray,pt.parseJSON=JSON.parse,pt.nodeName=r,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pt});var We=t.jQuery,Ye=t.$;return pt.noConflict=function(e){return t.$===pt&&(t.$=Ye),e&&t.jQuery===pt&&(t.jQuery=We),pt},e||(t.jQuery=t.$=pt),pt}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,function(){"use strict";function t(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function e(e,i){Object.keys(i).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&t(i[n])&&(r="px"),e.style[n]=i[n]+r})}function i(t){var e={};return t&&"[object Function]"===e.toString.call(t)}function n(t,e){if(1!==t.nodeType)return[];var i=window.getComputedStyle(t,null);return e?i[e]:i}function r(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function o(t){if(!t||-1!==["HTML","BODY","#document"].indexOf(t.nodeName))return window.document.body;var e=n(t),i=e.overflow,s=e.overflowX,a=e.overflowY;return/(auto|scroll)/.test(i+a+s)?t:o(r(t))}function s(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||t.firstElementChild.offsetParent===t)}function a(t){return null!==t.parentNode?a(t.parentNode):t}function l(t){var e=t&&t.offsetParent,i=e&&e.nodeName;return i&&"BODY"!==i&&"HTML"!==i?e:window.document.documentElement}function c(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return window.document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,r=i?e:t,o=document.createRange();o.setStart(n,0),o.setEnd(r,0);var h=o.commonAncestorContainer;if(t!==h&&e!==h||n.contains(r))return s(h)?h:l(h);var d=a(t);return d.host?c(d.host,e):c(t,a(e).host)}function h(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var n=window.document.documentElement;return(window.document.scrollingElement||n)[e]}return t[e]}function d(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=h(e,"top"),r=h(e,"left"),o=i?-1:1;return t.top+=n*o,t.bottom+=n*o,t.left+=r*o,t.right+=r*o,t}function u(t,e){var i="x"===e?"Left":"Top",n="Left"===i?"Right":"Bottom";return+t["border"+i+"Width"].split("px")[0]+ +t["border"+n+"Width"].split("px")[0]}function p(){var t=window.document.body,e=window.document.documentElement;return{height:Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight),width:Math.max(t.scrollWidth,t.offsetWidth,e.clientWidth,e.scrollWidth,e.offsetWidth)}}function f(t){return Z({},t,{right:t.left+t.width,bottom:t.top+t.height})}function m(t){var e={};if(tt())try{e=t.getBoundingClientRect();var i=h(t,"top"),r=h(t,"left");e.top+=i,e.left+=r,e.bottom+=i,e.right+=r}catch(t){}else e=t.getBoundingClientRect();var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},s="HTML"===t.nodeName?p():{},a=s.width||t.clientWidth||o.right-o.left,l=s.height||t.clientHeight||o.bottom-o.top,c=t.offsetWidth-a,d=t.offsetHeight-l;if(c||d){var m=n(t);c-=u(m,"x"),d-=u(m,"y"),o.width-=c,o.height-=d}return f(o)}function g(t,e){var i=tt(),r="HTML"===e.nodeName,s=m(t),a=m(e),l=o(t),c=f({top:s.top-a.top,left:s.left-a.left,width:s.width,height:s.height});if(r||"BODY"===e.nodeName){var h=n(e),u=i&&r?0:+h.borderTopWidth.split("px")[0],p=i&&r?0:+h.borderLeftWidth.split("px")[0],g=i&&r?0:+h.marginTop.split("px")[0],v=i&&r?0:+h.marginLeft.split("px")[0];c.top-=u-g,c.bottom-=u-g,c.left-=p-v,c.right-=p-v,c.marginTop=g,c.marginLeft=v}return e.contains(l)&&(i||"BODY"!==l.nodeName)&&(c=d(c,e)),c}function v(t){var e=window.document.documentElement,i=g(t,e),n=Math.max(e.clientWidth,window.innerWidth||0),r=Math.max(e.clientHeight,window.innerHeight||0),o=h(e),s=h(e,"left");return f({top:o-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:n,height:r})}function y(t){var e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===n(t,"position")||y(r(t)))}function b(t,e,i,n){var s={top:0,left:0},a=c(t,e);if("viewport"===n)s=v(a);else{var l=void 0;"scrollParent"===n?"BODY"===(l=o(r(t))).nodeName&&(l=window.document.documentElement):l="window"===n?window.document.documentElement:n;var h=g(l,a);if("HTML"!==l.nodeName||y(a))s=h;else{var d=p(),u=d.height,f=d.width;s.top+=h.top-h.marginTop,s.bottom=u+h.top,s.left+=h.left-h.marginLeft,s.right=f+h.left}}return s.left+=i,s.top+=i,s.right-=i,s.bottom-=i,s}function _(t,e,i,n,r){if(-1===t.indexOf("auto"))return t;var o=b(i,n,0,r),s={top:e.top-o.top,right:o.right-e.right,bottom:o.bottom-e.bottom,left:e.left-o.left},a=Object.keys(s).sort(function(t,e){return s[e]-s[t]})[0],l=t.split("-")[1];return a+(l?"-"+l:"")}function x(t,e,i){return g(i,c(e,i))}function w(t){var e=window.getComputedStyle(t),i=parseFloat(e.marginTop)+parseFloat(e.marginBottom),n=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+n,height:t.offsetHeight+i}}function k(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function S(t,e,i){i=i.split("-")[0];var n=w(t),r={width:n.width,height:n.height},o=-1!==["right","left"].indexOf(i),s=o?"top":"left",a=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return r[s]=e[s]+e[l]/2-n[l]/2,r[a]=i===a?e[a]-n[c]:e[k(a)],r}function C(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function D(t,e,i){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===i});var n=C(t,function(t){return t[e]===i});return t.indexOf(n)}function T(t,e,n){return(void 0===n?t:t.slice(0,D(t,"name",n))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&i(n)&&(e=n(e,t))}),e}function A(){if(!this.state.isDestroyed){var t={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=x(this.state,this.popper,this.reference),t.placement=_(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement),t.originalPlacement=t.placement,t.offsets.popper=S(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=T(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function M(t,e){return t.some(function(t){var i=t.name;return t.enabled&&i===e})}function E(t){for(var e=[!1,"ms","webkit","moz","o"],i=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length-1;n++){var r=e[n],o=r?""+r+i:t;if(void 0!==window.document.body.style[o])return o}return null}function P(){return this.state.isDestroyed=!0,M(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[E("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function I(t,e,i,n){var r="BODY"===t.nodeName,s=r?window:t;s.addEventListener(e,i,{passive:!0}),r||I(o(s.parentNode),e,i,n),n.push(s)}function O(t,e,i,n){i.updateBound=n,window.addEventListener("resize",i.updateBound,{passive:!0});var r=o(t);return I(r,"scroll",i.updateBound,i.scrollParents),i.scrollElement=r,i.eventsEnabled=!0,i}function N(){this.state.eventsEnabled||(this.state=O(this.reference,this.options,this.state,this.scheduleUpdate))}function F(t,e){return window.removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function L(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=F(this.reference,this.state))}function j(t,e){Object.keys(e).forEach(function(i){!1!==e[i]?t.setAttribute(i,e[i]):t.removeAttribute(i)})}function R(t,e,i){var n=C(t,function(t){return t.name===e}),r=!!n&&t.some(function(t){return t.name===i&&t.enabled&&t.order<n.order});if(!r){var o="`"+e+"`",s="`"+i+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}function $(t){return"end"===t?"start":"start"===t?"end":t}function H(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=it.indexOf(t),n=it.slice(i+1).concat(it.slice(0,i));return e?n.reverse():n}function B(t,e,i,n){var r=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],s=r[2];if(!o)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=i;break;case"%":case"%r":default:a=n}return f(a)[e]/100*o}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}function z(e,i,n,r){var o=[0,0],s=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(t){return t.trim()}),l=a.indexOf(C(a,function(t){return-1!==t.search(/,|\s/)}));a[l]&&-1===a[l].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,h=-1!==l?[a.slice(0,l).concat([a[l].split(c)[0]]),[a[l].split(c)[1]].concat(a.slice(l+1))]:[a];return(h=h.map(function(t,e){var r=(1===e?!s:s)?"height":"width",o=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,o=!0,t):o?(t[t.length-1]+=e,o=!1,t):t.concat(e)},[]).map(function(t){return B(t,r,i,n)})})).forEach(function(e,i){e.forEach(function(n,r){t(n)&&(o[i]+=n*("-"===e[r-1]?-1:1))})}),o}for(var U=["native code","[object MutationObserverConstructor]"],W="undefined"!=typeof window,Y=["Edge","Trident","Firefox"],V=0,q=0;q<Y.length;q+=1)if(W&&navigator.userAgent.indexOf(Y[q])>=0){V=1;break}var G=W&&function(t){return U.some(function(e){return(t||"").toString().indexOf(e)>-1})}(window.MutationObserver)?function(t){var e=!1,i=0,n=document.createElement("span");return new MutationObserver(function(){t(),e=!1}).observe(n,{attributes:!0}),function(){e||(e=!0,n.setAttribute("x-index",i),i+=1)}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},V))}},K=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},X=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}}(),Q=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},Z=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},J=void 0,tt=function(){return void 0===J&&(J=-1!==navigator.appVersion.indexOf("MSIE 10")),J},et=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],it=et.slice(3),nt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},rt={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var r=t.offsets.reference,o=f(t.offsets.popper),s=-1!==["bottom","top"].indexOf(i),a=s?"left":"top",l=s?"width":"height",c={start:Q({},a,r[a]),end:Q({},a,r[a]+r[l]-o[l])};t.offsets.popper=Z({},o,c[n])}return t}},offset:{order:200,enabled:!0,fn:function(e,i){var n=i.offset,r=e.placement,o=e.offsets,s=o.popper,a=o.reference,l=r.split("-")[0],c=void 0;return c=t(+n)?[+n,0]:z(n,s,a,l),"left"===l?(s.top+=c[0],s.left-=c[1]):"right"===l?(s.top+=c[0],s.left+=c[1]):"top"===l?(s.left+=c[0],s.top-=c[1]):"bottom"===l&&(s.left+=c[0],s.top+=c[1]),e.popper=s,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var i=e.boundariesElement||l(t.instance.popper),n=b(t.instance.popper,t.instance.reference,e.padding,i);e.boundaries=n;var r=e.priority,o=f(t.offsets.popper),s={primary:function(t){var i=o[t];return o[t]<n[t]&&!e.escapeWithReference&&(i=Math.max(o[t],n[t])),Q({},t,i)},secondary:function(t){var i="right"===t?"left":"top",r=o[i];return o[t]>n[t]&&!e.escapeWithReference&&(r=Math.min(o[i],n[t]-("right"===t?o.width:o.height))),Q({},i,r)}};return r.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";o=Z({},o,s[e](t))}),t.offsets.popper=o,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=f(t.offsets.popper),i=t.offsets.reference,n=t.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(n),s=o?"right":"bottom",a=o?"left":"top",l=o?"width":"height";return e[s]<r(i[a])&&(t.offsets.popper[a]=r(i[a])-e[l]),e[a]>r(i[s])&&(t.offsets.popper[a]=r(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){if(!R(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var n=t.placement.split("-")[0],r=f(t.offsets.popper),o=t.offsets.reference,s=-1!==["left","right"].indexOf(n),a=s?"height":"width",l=s?"top":"left",c=s?"left":"top",h=s?"bottom":"right",d=w(i)[a];o[h]-d<r[l]&&(t.offsets.popper[l]-=r[l]-(o[h]-d)),o[l]+d>r[h]&&(t.offsets.popper[l]+=o[l]+d-r[h]);var u=o[l]+o[a]/2-d/2-f(t.offsets.popper)[l];return u=Math.max(Math.min(r[a]-d,u),0),t.arrowElement=i,t.offsets.arrow={},t.offsets.arrow[l]=u,t.offsets.arrow[c]="",t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(M(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=b(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement),n=t.placement.split("-")[0],r=k(n),o=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case nt.FLIP:s=[n,r];break;case nt.CLOCKWISE:s=H(n);break;case nt.COUNTERCLOCKWISE:s=H(n,!0);break;default:s=e.behavior}return s.forEach(function(a,l){if(n!==a||s.length===l+1)return t;n=t.placement.split("-")[0],r=k(n);var c=f(t.offsets.popper),h=t.offsets.reference,d=Math.floor,u="left"===n&&d(c.right)>d(h.left)||"right"===n&&d(c.left)<d(h.right)||"top"===n&&d(c.bottom)>d(h.top)||"bottom"===n&&d(c.top)<d(h.bottom),p=d(c.left)<d(i.left),m=d(c.right)>d(i.right),g=d(c.top)<d(i.top),v=d(c.bottom)>d(i.bottom),y="left"===n&&p||"right"===n&&m||"top"===n&&g||"bottom"===n&&v,b=-1!==["top","bottom"].indexOf(n),_=!!e.flipVariations&&(b&&"start"===o&&p||b&&"end"===o&&m||!b&&"start"===o&&g||!b&&"end"===o&&v);(u||y||_)&&(t.flipped=!0,(u||y)&&(n=s[l+1]),_&&(o=$(o)),t.placement=n+(o?"-"+o:""),t.offsets.popper=S(t.instance.popper,t.offsets.reference,t.placement),t=T(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=f(t.offsets.popper),r=f(t.offsets.reference),o=-1!==["left","right"].indexOf(i),s=-1===["top","left"].indexOf(i);return n[o?"left":"top"]=r[e]-(s?n[o?"width":"height"]:0),t.placement=k(e),t.offsets.popper=f(n),t}},hide:{order:800,enabled:!0,fn:function(t){if(!R(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=C(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<i.top||e.left>i.right||e.top>i.bottom||e.right<i.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},applyStyle:{order:900,enabled:!0,fn:function(t,i){var n={position:t.offsets.popper.position},r={"x-placement":t.placement},o=Math.round(t.offsets.popper.left),s=Math.round(t.offsets.popper.top),a=E("transform");return i.gpuAcceleration&&a?(n[a]="translate3d("+o+"px, "+s+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=o,n.top=s,n.willChange="top, left"),e(t.instance.popper,Z({},n,t.styles)),j(t.instance.popper,Z({},r,t.attributes)),t.offsets.arrow&&e(t.arrowElement,t.offsets.arrow),t},onLoad:function(t,e,i,n,r){var o=x(r,e,t),s=_(i.placement,o,e,t,i.modifiers.flip.boundariesElement);return e.setAttribute("x-placement",s),i},gpuAcceleration:!0}}},ot=function(){function t(n,r){var o=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};K(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=G(this.update.bind(this)),this.options=Z({},t.Defaults,s),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=n.jquery?n[0]:n,this.popper=r.jquery?r[0]:r,e(this.popper,{position:"absolute"}),this.modifiers=Object.keys(t.Defaults.modifiers).map(function(e){return Z({name:e},t.Defaults.modifiers[e])}),this.modifiers=this.modifiers.map(function(t){var e=s.modifiers&&s.modifiers[t.name]||{};return Z({},t,e)}),s.modifiers&&(this.options.modifiers=Z({},t.Defaults.modifiers,s.modifiers),Object.keys(s.modifiers).forEach(function(e){if(void 0===t.Defaults.modifiers[e]){var i=s.modifiers[e];i.name=e,o.modifiers.push(i)}})),this.modifiers=this.modifiers.sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&i(t.onLoad)&&t.onLoad(o.reference,o.popper,o.options,t,o.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return X(t,[{key:"update",value:function(){return A.call(this)}},{key:"destroy",value:function(){return P.call(this)}},{key:"enableEventListeners",value:function(){return N.call(this)}},{key:"disableEventListeners",value:function(){return L.call(this)}}]),t}();return ot.Utils=("undefined"!=typeof window?window:global).PopperUtils,ot.placements=et,ot.Defaults=rt,ot}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");!function(t){var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(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)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=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}}(),o=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function i(t){return(t[0]||t).nodeType}function n(){return{bindType:s.end,delegateType:s.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function r(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in a)if(void 0!==t.style[e])return{end:a[e]};return!1}function o(e){var i=this,n=!1;return t(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(i)},e),this}var s=!1,a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var i=e.getAttribute("data-target");i&&"#"!==i||(i=e.getAttribute("href")||"");try{return t(i).length>0?i:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(s.end)},supportsTransitionEnd:function(){return Boolean(s)},typeCheckConfig:function(t,n,r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o],a=n[o],l=a&&i(a)?"element":e(a);if(!new RegExp(s).test(l))throw new Error(t.toUpperCase()+': Option "'+o+'" provided type "'+l+'" but expected type "'+s+'".')}}};return s=r(),t.fn.emulateTransitionEnd=o,l.supportsTransitionEnd()&&(t.event.special[l.TRANSITION_END]=n()),l}(jQuery),s=(function(t){var e="alert",n=t.fn[e],s={DISMISS:'[data-dismiss="alert"]'},a={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},l={ALERT:"alert",FADE:"fade",SHOW:"show"},c=function(){function e(t){i(this,e),this._element=t}return e.prototype.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.prototype.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},e.prototype._getRootElement=function(e){var i=o.getSelectorFromElement(e),n=!1;return i&&(n=t(i)[0]),n||(n=t(e).closest("."+l.ALERT)[0]),n},e.prototype._triggerCloseEvent=function(e){var i=t.Event(a.CLOSE);return t(e).trigger(i),i},e.prototype._removeElement=function(e){var i=this;t(e).removeClass(l.SHOW),o.supportsTransitionEnd()&&t(e).hasClass(l.FADE)?t(e).one(o.TRANSITION_END,function(t){return i._destroyElement(e,t)}).emulateTransitionEnd(150):this._destroyElement(e)},e.prototype._destroyElement=function(e){t(e).detach().trigger(a.CLOSED).remove()},e._jQueryInterface=function(i){return this.each(function(){var n=t(this),r=n.data("bs.alert");r||(r=new e(this),n.data("bs.alert",r)),"close"===i&&r[i](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(a.CLICK_DATA_API,s.DISMISS,c._handleDismiss(new c)),t.fn[e]=c._jQueryInterface,t.fn[e].Constructor=c,t.fn[e].noConflict=function(){return t.fn[e]=n,c._jQueryInterface}}(jQuery),function(t){var e="button",n=t.fn[e],o={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},s={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},a={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},l=function(){function e(t){i(this,e),this._element=t}return e.prototype.toggle=function(){var e=!0,i=!0,n=t(this._element).closest(s.DATA_TOGGLE)[0];if(n){var r=t(this._element).find(s.INPUT)[0];if(r){if("radio"===r.type)if(r.checked&&t(this._element).hasClass(o.ACTIVE))e=!1;else{var a=t(n).find(s.ACTIVE)[0];a&&t(a).removeClass(o.ACTIVE)}if(e){if(r.hasAttribute("disabled")||n.hasAttribute("disabled")||r.classList.contains("disabled")||n.classList.contains("disabled"))return;r.checked=!t(this._element).hasClass(o.ACTIVE),t(r).trigger("change")}r.focus(),i=!1}}i&&this._element.setAttribute("aria-pressed",!t(this._element).hasClass(o.ACTIVE)),e&&t(this._element).toggleClass(o.ACTIVE)},e.prototype.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},e._jQueryInterface=function(i){return this.each(function(){var n=t(this).data("bs.button");n||(n=new e(this),t(this).data("bs.button",n)),"toggle"===i&&n[i]()})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(a.CLICK_DATA_API,s.DATA_TOGGLE_CARROT,function(e){e.preventDefault();var i=e.target;t(i).hasClass(o.BUTTON)||(i=t(i).closest(s.BUTTON)),l._jQueryInterface.call(t(i),"toggle")}).on(a.FOCUS_BLUR_DATA_API,s.DATA_TOGGLE_CARROT,function(e){var i=t(e.target).closest(s.BUTTON)[0];t(i).toggleClass(o.FOCUS,/^focus(in)?$/.test(e.type))}),t.fn[e]=l._jQueryInterface,t.fn[e].Constructor=l,t.fn[e].noConflict=function(){return t.fn[e]=n,l._jQueryInterface}}(jQuery),function(t){var e="carousel",s="bs.carousel",a="."+s,l=t.fn[e],c={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},h={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},d={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},u={SLIDE:"slide"+a,SLID:"slid"+a,KEYDOWN:"keydown"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a,TOUCHEND:"touchend"+a,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},p={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},f={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},m=function(){function l(e,n){i(this,l),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(f.INDICATORS)[0],this._addEventListeners()}return l.prototype.next=function(){this._isSliding||this._slide(d.NEXT)},l.prototype.nextWhenVisible=function(){document.hidden||this.next()},l.prototype.prev=function(){this._isSliding||this._slide(d.PREV)},l.prototype.pause=function(e){e||(this._isPaused=!0),t(this._element).find(f.NEXT_PREV)[0]&&o.supportsTransitionEnd()&&(o.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},l.prototype.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},l.prototype.to=function(e){var i=this;this._activeElement=t(this._element).find(f.ACTIVE_ITEM)[0];var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(u.SLID,function(){return i.to(e)});else{if(n===e)return this.pause(),void this.cycle();var r=e>n?d.NEXT:d.PREV;this._slide(r,this._items[e])}},l.prototype.dispose=function(){t(this._element).off(a),t.removeData(this._element,s),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(i){return i=t.extend({},c,i),o.typeCheckConfig(e,i,h),i},l.prototype._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(u.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(u.MOUSEENTER,function(t){return e.pause(t)}).on(u.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(u.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},l.prototype._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next();break;default:return}},l.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(f.ITEM)),this._items.indexOf(e)},l.prototype._getItemByDirection=function(t,e){var i=t===d.NEXT,n=t===d.PREV,r=this._getItemIndex(e),o=this._items.length-1;if((n&&0===r||i&&r===o)&&!this._config.wrap)return e;var s=(r+(t===d.PREV?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(e,i){var n=this._getItemIndex(e),r=this._getItemIndex(t(this._element).find(f.ACTIVE_ITEM)[0]),o=t.Event(u.SLIDE,{relatedTarget:e,direction:i,from:r,to:n});return t(this._element).trigger(o),o},l.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(f.ACTIVE).removeClass(p.ACTIVE);var i=this._indicatorsElement.children[this._getItemIndex(e)];i&&t(i).addClass(p.ACTIVE)}},l.prototype._slide=function(e,i){var n=this,r=t(this._element).find(f.ACTIVE_ITEM)[0],s=this._getItemIndex(r),a=i||r&&this._getItemByDirection(e,r),l=this._getItemIndex(a),c=Boolean(this._interval),h=void 0,m=void 0,g=void 0;if(e===d.NEXT?(h=p.LEFT,m=p.NEXT,g=d.LEFT):(h=p.RIGHT,m=p.PREV,g=d.RIGHT),a&&t(a).hasClass(p.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(a,g).isDefaultPrevented()&&r&&a){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(a);var v=t.Event(u.SLID,{relatedTarget:a,direction:g,from:s,to:l});o.supportsTransitionEnd()&&t(this._element).hasClass(p.SLIDE)?(t(a).addClass(m),o.reflow(a),t(r).addClass(h),t(a).addClass(h),t(r).one(o.TRANSITION_END,function(){t(a).removeClass(h+" "+m).addClass(p.ACTIVE),t(r).removeClass(p.ACTIVE+" "+m+" "+h),n._isSliding=!1,setTimeout(function(){return t(n._element).trigger(v)},0)}).emulateTransitionEnd(600)):(t(r).removeClass(p.ACTIVE),t(a).addClass(p.ACTIVE),this._isSliding=!1,t(this._element).trigger(v)),c&&this.cycle()}},l._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(s),r=t.extend({},c,t(this).data());"object"===(void 0===e?"undefined":n(e))&&t.extend(r,e);var o="string"==typeof e?e:r.slide;if(i||(i=new l(this,r),t(this).data(s,i)),"number"==typeof e)i.to(e);else if("string"==typeof o){if(void 0===i[o])throw new Error('No method named "'+o+'"');i[o]()}else r.interval&&(i.pause(),i.cycle())})},l._dataApiClickHandler=function(e){var i=o.getSelectorFromElement(this);if(i){var n=t(i)[0];if(n&&t(n).hasClass(p.CAROUSEL)){var r=t.extend({},t(n).data(),t(this).data()),a=this.getAttribute("data-slide-to");a&&(r.interval=!1),l._jQueryInterface.call(t(n),r),a&&t(n).data(s).to(a),e.preventDefault()}}},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return c}}]),l}();t(document).on(u.CLICK_DATA_API,f.DATA_SLIDE,m._dataApiClickHandler),t(window).on(u.LOAD_DATA_API,function(){t(f.DATA_RIDE).each(function(){var e=t(this);m._jQueryInterface.call(e,e.data())})}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=l,m._jQueryInterface}}(jQuery),function(t){var e="collapse",s="bs.collapse",a=t.fn[e],l={toggle:!0,parent:""},c={toggle:"boolean",parent:"string"},h={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},d={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},u={WIDTH:"width",HEIGHT:"height"},p={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},f=function(){function a(e,n){i(this,a),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var r=t(p.DATA_TOGGLE),s=0;s<r.length;s++){var l=r[s],c=o.getSelectorFromElement(l);null!==c&&t(c).filter(e).length>0&&this._triggerArray.push(l)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return a.prototype.toggle=function(){t(this._element).hasClass(d.SHOW)?this.hide():this.show()},a.prototype.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(d.SHOW)){var i=void 0,n=void 0;if(this._parent&&((i=t.makeArray(t(this._parent).children().children(p.ACTIVES))).length||(i=null)),!(i&&(n=t(i).data(s))&&n._isTransitioning)){var r=t.Event(h.SHOW);if(t(this._element).trigger(r),!r.isDefaultPrevented()){i&&(a._jQueryInterface.call(t(i),"hide"),n||t(i).data(s,null));var l=this._getDimension();t(this._element).removeClass(d.COLLAPSE).addClass(d.COLLAPSING),this._element.style[l]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(d.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var c=function(){t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).addClass(d.SHOW),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(h.SHOWN)};if(o.supportsTransitionEnd()){var u="scroll"+(l[0].toUpperCase()+l.slice(1));t(this._element).one(o.TRANSITION_END,c).emulateTransitionEnd(600),this._element.style[l]=this._element[u]+"px"}else c()}}}},a.prototype.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(d.SHOW)){var i=t.Event(h.HIDE);if(t(this._element).trigger(i),!i.isDefaultPrevented()){var n=this._getDimension();if(this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",o.reflow(this._element),t(this._element).addClass(d.COLLAPSING).removeClass(d.COLLAPSE).removeClass(d.SHOW),this._triggerArray.length)for(var r=0;r<this._triggerArray.length;r++){var s=this._triggerArray[r],a=o.getSelectorFromElement(s);null!==a&&(t(a).hasClass(d.SHOW)||t(s).addClass(d.COLLAPSED).attr("aria-expanded",!1))}this.setTransitioning(!0);var l=function(){e.setTransitioning(!1),t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).trigger(h.HIDDEN)};this._element.style[n]="",o.supportsTransitionEnd()?t(this._element).one(o.TRANSITION_END,l).emulateTransitionEnd(600):l()}}},a.prototype.setTransitioning=function(t){this._isTransitioning=t},a.prototype.dispose=function(){t.removeData(this._element,s),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},a.prototype._getConfig=function(i){return i=t.extend({},l,i),i.toggle=Boolean(i.toggle),o.typeCheckConfig(e,i,c),i},a.prototype._getDimension=function(){return t(this._element).hasClass(u.WIDTH)?u.WIDTH:u.HEIGHT},a.prototype._getParent=function(){var e=this,i=t(this._config.parent)[0],n='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(i).find(n).each(function(t,i){e._addAriaAndCollapsedClass(a._getTargetFromElement(i),[i])}),i},a.prototype._addAriaAndCollapsedClass=function(e,i){if(e){var n=t(e).hasClass(d.SHOW);i.length&&t(i).toggleClass(d.COLLAPSED,!n).attr("aria-expanded",n)}},a._getTargetFromElement=function(e){var i=o.getSelectorFromElement(e);return i?t(i)[0]:null},a._jQueryInterface=function(e){return this.each(function(){var i=t(this),r=i.data(s),o=t.extend({},l,i.data(),"object"===(void 0===e?"undefined":n(e))&&e);if(!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||(r=new a(this,o),i.data(s,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e]()}})},r(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),a}();t(document).on(h.CLICK_DATA_API,p.DATA_TOGGLE,function(e){/input|textarea/i.test(e.target.tagName)||e.preventDefault();var i=t(this),n=o.getSelectorFromElement(this);t(n).each(function(){var e=t(this),n=e.data(s)?"toggle":i.data();f._jQueryInterface.call(e,n)})}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=a,f._jQueryInterface}}(jQuery),function(t){if("undefined"==typeof Popper)throw new Error("Bootstrap dropdown require Popper.js (https://popper.js.org)");var e="dropdown",s="bs.dropdown",a="."+s,l=t.fn[e],c=new RegExp("38|40|27"),h={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},d={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left"},u={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},p={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end"},f={placement:p.BOTTOM,offset:0,flip:!0},m={placement:"string",offset:"(number|string)",flip:"boolean"},g=function(){function l(t,e){i(this,l),this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}return l.prototype.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(d.DISABLED)){var e=l._getParentFromElement(this._element),i=t(this._menu).hasClass(d.SHOW);if(l._clearMenus(),!i){var n={relatedTarget:this._element},r=t.Event(h.SHOW,n);if(t(e).trigger(r),!r.isDefaultPrevented()){var o=this._element;t(e).hasClass(d.DROPUP)&&(t(this._menu).hasClass(d.MENULEFT)||t(this._menu).hasClass(d.MENURIGHT))&&(o=e),this._popper=new Popper(o,this._menu,this._getPopperConfig()),"ontouchstart"in document.documentElement&&!t(e).closest(u.NAVBAR_NAV).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(d.SHOW),t(e).toggleClass(d.SHOW).trigger(t.Event(h.SHOWN,n))}}}},l.prototype.dispose=function(){t.removeData(this._element,s),t(this._element).off(a),this._element=null,this._menu=null,null!==this._popper&&this._popper.destroy(),this._popper=null},l.prototype.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},l.prototype._addEventListeners=function(){var e=this;t(this._element).on(h.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},l.prototype._getConfig=function(i){var n=t(this._element).data();return void 0!==n.placement&&(n.placement=p[n.placement.toUpperCase()]),i=t.extend({},this.constructor.Default,t(this._element).data(),i),o.typeCheckConfig(e,i,this.constructor.DefaultType),i},l.prototype._getMenuElement=function(){if(!this._menu){var e=l._getParentFromElement(this._element);this._menu=t(e).find(u.MENU)[0]}return this._menu},l.prototype._getPlacement=function(){var e=t(this._element).parent(),i=this._config.placement;return e.hasClass(d.DROPUP)||this._config.placement===p.TOP?(i=p.TOP,t(this._menu).hasClass(d.MENURIGHT)&&(i=p.TOPEND)):t(this._menu).hasClass(d.MENURIGHT)&&(i=p.BOTTOMEND),i},l.prototype._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},l.prototype._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:{offset:this._config.offset},flip:{enabled:this._config.flip}}};return this._inNavbar&&(t.modifiers.applyStyle={enabled:!this._inNavbar}),t},l._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(s),r="object"===(void 0===e?"undefined":n(e))?e:null;if(i||(i=new l(this,r),t(this).data(s,i)),"string"==typeof e){if(void 0===i[e])throw new Error('No method named "'+e+'"');i[e]()}})},l._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var i=t.makeArray(t(u.DATA_TOGGLE)),n=0;n<i.length;n++){var r=l._getParentFromElement(i[n]),o=t(i[n]).data(s),a={relatedTarget:i[n]};if(o){var c=o._menu;if(t(r).hasClass(d.SHOW)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&t.contains(r,e.target))){var p=t.Event(h.HIDE,a);t(r).trigger(p),p.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),i[n].setAttribute("aria-expanded","false"),t(c).removeClass(d.SHOW),t(r).removeClass(d.SHOW).trigger(t.Event(h.HIDDEN,a)))}}}},l._getParentFromElement=function(e){var i=void 0,n=o.getSelectorFromElement(e);return n&&(i=t(n)[0]),i||e.parentNode},l._dataApiKeydownHandler=function(e){if(!(!c.test(e.which)||/button/i.test(e.target.tagName)&&32===e.which||/input|textarea/i.test(e.target.tagName)||(e.preventDefault(),e.stopPropagation(),this.disabled||t(this).hasClass(d.DISABLED)))){var i=l._getParentFromElement(this),n=t(i).hasClass(d.SHOW);if((n||27===e.which&&32===e.which)&&(!n||27!==e.which&&32!==e.which)){var r=t(i).find(u.VISIBLE_ITEMS).get();if(r.length){var o=r.indexOf(e.target);38===e.which&&o>0&&o--,40===e.which&&o<r.length-1&&o++,o<0&&(o=0),r[o].focus()}}else{if(27===e.which){var s=t(i).find(u.DATA_TOGGLE)[0];t(s).trigger("focus")}t(this).trigger("click")}}},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return f}},{key:"DefaultType",get:function(){return m}}]),l}();t(document).on(h.KEYDOWN_DATA_API,u.DATA_TOGGLE,g._dataApiKeydownHandler).on(h.KEYDOWN_DATA_API,u.MENU,g._dataApiKeydownHandler).on(h.CLICK_DATA_API+" "+h.KEYUP_DATA_API,g._clearMenus).on(h.CLICK_DATA_API,u.DATA_TOGGLE,function(e){e.preventDefault(),e.stopPropagation(),g._jQueryInterface.call(t(this),"toggle")}).on(h.CLICK_DATA_API,u.FORM_CHILD,function(t){t.stopPropagation()}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=l,g._jQueryInterface}}(jQuery),function(t){var e="modal",s=".bs.modal",a=t.fn[e],l={backdrop:!0,keyboard:!0,focus:!0,show:!0},c={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},h={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},d={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},u={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},p=function(){function a(e,n){i(this,a),this._config=this._getConfig(n),this._element=e,this._dialog=t(e).find(u.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return a.prototype.toggle=function(t){return this._isShown?this.hide():this.show(t)},a.prototype.show=function(e){var i=this;if(!this._isTransitioning){o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE)&&(this._isTransitioning=!0);var n=t.Event(h.SHOW,{relatedTarget:e});t(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),t(document.body).addClass(d.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(h.CLICK_DISMISS,u.DATA_DISMISS,function(t){return i.hide(t)}),t(this._dialog).on(h.MOUSEDOWN_DISMISS,function(){t(i._element).one(h.MOUSEUP_DISMISS,function(e){t(e.target).is(i._element)&&(i._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return i._showElement(e)}))}},a.prototype.hide=function(e){var i=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var n=o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE);n&&(this._isTransitioning=!0);var r=t.Event(h.HIDE);t(this._element).trigger(r),this._isShown&&!r.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),t(document).off(h.FOCUSIN),t(this._element).removeClass(d.SHOW),t(this._element).off(h.CLICK_DISMISS),t(this._dialog).off(h.MOUSEDOWN_DISMISS),n?t(this._element).one(o.TRANSITION_END,function(t){return i._hideModal(t)}).emulateTransitionEnd(300):this._hideModal())}},a.prototype.dispose=function(){t.removeData(this._element,"bs.modal"),t(window,document,this._element,this._backdrop).off(s),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},a.prototype.handleUpdate=function(){this._adjustDialog()},a.prototype._getConfig=function(i){return i=t.extend({},l,i),o.typeCheckConfig(e,i,c),i},a.prototype._showElement=function(e){var i=this,n=o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,n&&o.reflow(this._element),t(this._element).addClass(d.SHOW),this._config.focus&&this._enforceFocus();var r=t.Event(h.SHOWN,{relatedTarget:e}),s=function(){i._config.focus&&i._element.focus(),i._isTransitioning=!1,t(i._element).trigger(r)};n?t(this._dialog).one(o.TRANSITION_END,s).emulateTransitionEnd(300):s()},a.prototype._enforceFocus=function(){var e=this;t(document).off(h.FOCUSIN).on(h.FOCUSIN,function(i){document===i.target||e._element===i.target||t(e._element).has(i.target).length||e._element.focus()})},a.prototype._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(h.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||t(this._element).off(h.KEYDOWN_DISMISS)},a.prototype._setResizeEvent=function(){var e=this;this._isShown?t(window).on(h.RESIZE,function(t){return e.handleUpdate(t)}):t(window).off(h.RESIZE)},a.prototype._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(d.OPEN),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(h.HIDDEN)})},a.prototype._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},a.prototype._showBackdrop=function(e){var i=this,n=t(this._element).hasClass(d.FADE)?d.FADE:"";if(this._isShown&&this._config.backdrop){var r=o.supportsTransitionEnd()&&n;if(this._backdrop=document.createElement("div"),this._backdrop.className=d.BACKDROP,n&&t(this._backdrop).addClass(n),t(this._backdrop).appendTo(document.body),t(this._element).on(h.CLICK_DISMISS,function(t){i._ignoreBackdropClick?i._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===i._config.backdrop?i._element.focus():i.hide())}),r&&o.reflow(this._backdrop),t(this._backdrop).addClass(d.SHOW),!e)return;if(!r)return void e();t(this._backdrop).one(o.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(d.SHOW);var s=function(){i._removeBackdrop(),e&&e()};o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE)?t(this._backdrop).one(o.TRANSITION_END,s).emulateTransitionEnd(150):s()}else e&&e()},a.prototype._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},a.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},a.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},a.prototype._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){t(u.FIXED_CONTENT).each(function(i,n){var r=t(n)[0].style.paddingRight,o=t(n).css("padding-right");t(n).data("padding-right",r).css("padding-right",parseFloat(o)+e._scrollbarWidth+"px")}),t(u.NAVBAR_TOGGLER).each(function(i,n){var r=t(n)[0].style.marginRight,o=t(n).css("margin-right");t(n).data("margin-right",r).css("margin-right",parseFloat(o)+e._scrollbarWidth+"px")});var i=document.body.style.paddingRight,n=t("body").css("padding-right");t("body").data("padding-right",i).css("padding-right",parseFloat(n)+this._scrollbarWidth+"px")}},a.prototype._resetScrollbar=function(){t(u.FIXED_CONTENT).each(function(e,i){var n=t(i).data("padding-right");void 0!==n&&t(i).css("padding-right",n).removeData("padding-right")}),t(u.NAVBAR_TOGGLER).each(function(e,i){var n=t(i).data("margin-right");void 0!==n&&t(i).css("margin-right",n).removeData("margin-right")});var e=t("body").data("padding-right");void 0!==e&&t("body").css("padding-right",e).removeData("padding-right")},a.prototype._getScrollbarWidth=function(){var t=document.createElement("div");t.className=d.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},a._jQueryInterface=function(e,i){return this.each(function(){var r=t(this).data("bs.modal"),o=t.extend({},a.Default,t(this).data(),"object"===(void 0===e?"undefined":n(e))&&e);if(r||(r=new a(this,o),t(this).data("bs.modal",r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e](i)}else o.show&&r.show(i)})},r(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),a}();t(document).on(h.CLICK_DATA_API,u.DATA_TOGGLE,function(e){var i=this,n=void 0,r=o.getSelectorFromElement(this);r&&(n=t(r)[0]);var s=t(n).data("bs.modal")?"toggle":t.extend({},t(n).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var a=t(n).one(h.SHOW,function(e){e.isDefaultPrevented()||a.one(h.HIDDEN,function(){t(i).is(":visible")&&i.focus()})});p._jQueryInterface.call(t(n),s,this)}),t.fn[e]=p._jQueryInterface,t.fn[e].Constructor=p,t.fn[e].noConflict=function(){return t.fn[e]=a,p._jQueryInterface}}(jQuery),function(t){var e="scrollspy",s=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},c={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},h={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},d={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},u={OFFSET:"offset",POSITION:"position"},p=function(){function s(e,n){var r=this;i(this,s),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+d.NAV_LINKS+","+this._config.target+" "+d.LIST_ITEMS+","+this._config.target+" "+d.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(c.SCROLL,function(t){return r._process(t)}),this.refresh(),this._process()}return s.prototype.refresh=function(){var e=this,i=this._scrollElement!==this._scrollElement.window?u.POSITION:u.OFFSET,n="auto"===this._config.method?i:this._config.method,r=n===u.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var i=void 0,s=o.getSelectorFromElement(e);if(s&&(i=t(s)[0]),i){var a=i.getBoundingClientRect();if(a.width||a.height)return[t(i)[n]().top+r,s]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},s.prototype.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},s.prototype._getConfig=function(i){if("string"!=typeof(i=t.extend({},a,i)).target){var n=t(i.target).attr("id");n||(n=o.getUID(e),t(i.target).attr("id",n)),i.target="#"+n}return o.typeCheckConfig(e,i,l),i},s.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},s.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},s.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},s.prototype._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;)this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}},s.prototype._activate=function(e){this._activeTarget=e,this._clear();var i=this._selector.split(",");i=i.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var n=t(i.join(","));n.hasClass(h.DROPDOWN_ITEM)?(n.closest(d.DROPDOWN).find(d.DROPDOWN_TOGGLE).addClass(h.ACTIVE),n.addClass(h.ACTIVE)):(n.addClass(h.ACTIVE),n.parents(d.NAV_LIST_GROUP).prev(d.NAV_LINKS+", "+d.LIST_ITEMS).addClass(h.ACTIVE)),t(this._scrollElement).trigger(c.ACTIVATE,{relatedTarget:e})},s.prototype._clear=function(){t(this._selector).filter(d.ACTIVE).removeClass(h.ACTIVE)},s._jQueryInterface=function(e){return this.each(function(){var i=t(this).data("bs.scrollspy"),r="object"===(void 0===e?"undefined":n(e))&&e;if(i||(i=new s(this,r),t(this).data("bs.scrollspy",i)),"string"==typeof e){if(void 0===i[e])throw new Error('No method named "'+e+'"');i[e]()}})},r(s,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return a}}]),s}();t(window).on(c.LOAD_DATA_API,function(){for(var e=t.makeArray(t(d.DATA_SPY)),i=e.length;i--;){var n=t(e[i]);p._jQueryInterface.call(n,n.data())}}),t.fn[e]=p._jQueryInterface,t.fn[e].Constructor=p,t.fn[e].noConflict=function(){return t.fn[e]=s,p._jQueryInterface}}(jQuery),function(t){var e=t.fn.tab,n={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},s={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},a={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},l=function(){function e(t){i(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(s.ACTIVE)||t(this._element).hasClass(s.DISABLED))){var i=void 0,r=void 0,l=t(this._element).closest(a.NAV_LIST_GROUP)[0],c=o.getSelectorFromElement(this._element);l&&(r=t.makeArray(t(l).find(a.ACTIVE)),r=r[r.length-1]);var h=t.Event(n.HIDE,{relatedTarget:this._element}),d=t.Event(n.SHOW,{relatedTarget:r});if(r&&t(r).trigger(h),t(this._element).trigger(d),!d.isDefaultPrevented()&&!h.isDefaultPrevented()){c&&(i=t(c)[0]),this._activate(this._element,l);var u=function(){var i=t.Event(n.HIDDEN,{relatedTarget:e._element}),o=t.Event(n.SHOWN,{relatedTarget:r});t(r).trigger(i),t(e._element).trigger(o)};i?this._activate(i,i.parentNode,u):u()}}},e.prototype.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},e.prototype._activate=function(e,i,n){var r=this,l=t(i).find(a.ACTIVE)[0],c=n&&o.supportsTransitionEnd()&&l&&t(l).hasClass(s.FADE),h=function(){return r._transitionComplete(e,l,c,n)};l&&c?t(l).one(o.TRANSITION_END,h).emulateTransitionEnd(150):h(),l&&t(l).removeClass(s.SHOW)},e.prototype._transitionComplete=function(e,i,n,r){if(i){t(i).removeClass(s.ACTIVE);var l=t(i.parentNode).find(a.DROPDOWN_ACTIVE_CHILD)[0];l&&t(l).removeClass(s.ACTIVE),i.setAttribute("aria-expanded",!1)}if(t(e).addClass(s.ACTIVE),e.setAttribute("aria-expanded",!0),n?(o.reflow(e),t(e).addClass(s.SHOW)):t(e).removeClass(s.FADE),e.parentNode&&t(e.parentNode).hasClass(s.DROPDOWN_MENU)){var c=t(e).closest(a.DROPDOWN)[0];c&&t(c).find(a.DROPDOWN_TOGGLE).addClass(s.ACTIVE),e.setAttribute("aria-expanded",!0)}r&&r()},e._jQueryInterface=function(i){return this.each(function(){var n=t(this),r=n.data("bs.tab");if(r||(r=new e(this),n.data("bs.tab",r)),"string"==typeof i){if(void 0===r[i])throw new Error('No method named "'+i+'"');r[i]()}})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(n.CLICK_DATA_API,a.DATA_TOGGLE,function(e){e.preventDefault(),l._jQueryInterface.call(t(this),"show")}),t.fn.tab=l._jQueryInterface,t.fn.tab.Constructor=l,t.fn.tab.noConflict=function(){return t.fn.tab=e,l._jQueryInterface}}(jQuery),function(t){if("undefined"==typeof Popper)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");var e="tooltip",s=".bs.tooltip",a=t.fn[e],l=new RegExp("(^|\\s)bs-tooltip\\S+","g"),c={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)"},h={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},d={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip"},u={SHOW:"show",OUT:"out"},p={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},f={FADE:"fade",SHOW:"show"},m={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},g={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},v=function(){function a(t,e){i(this,a),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return a.prototype.enable=function(){this._isEnabled=!0},a.prototype.disable=function(){this._isEnabled=!1},a.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},a.prototype.toggle=function(e){if(e){var i=this.constructor.DATA_KEY,n=t(e.currentTarget).data(i);n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(t(this.getTipElement()).hasClass(f.SHOW))return void this._leave(null,this);this._enter(null,this)}},a.prototype.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},a.prototype.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var n=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!n)return;var r=this.getTipElement(),s=o.getUID(this.constructor.NAME);r.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(r).addClass(f.FADE);var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,c=this._getAttachment(l);this.addAttachmentClass(c);var h=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(h),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Popper(this.element,r,{placement:c,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:m.ARROW}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(f.SHOW),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var d=function(){e.config.animation&&e._fixTransition();var i=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),i===u.OUT&&e._leave(null,e)};o.supportsTransitionEnd()&&t(this.tip).hasClass(f.FADE)?t(this.tip).one(o.TRANSITION_END,d).emulateTransitionEnd(a._TRANSITION_DURATION):d()}},a.prototype.hide=function(e){var i=this,n=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE),s=function(){i._hoverState!==u.SHOW&&n.parentNode&&n.parentNode.removeChild(n),i._cleanTipClass(),i.element.removeAttribute("aria-describedby"),t(i.element).trigger(i.constructor.Event.HIDDEN),null!==i._popper&&i._popper.destroy(),e&&e()};t(this.element).trigger(r),r.isDefaultPrevented()||(t(n).removeClass(f.SHOW),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[g.CLICK]=!1,this._activeTrigger[g.FOCUS]=!1,this._activeTrigger[g.HOVER]=!1,o.supportsTransitionEnd()&&t(this.tip).hasClass(f.FADE)?t(n).one(o.TRANSITION_END,s).emulateTransitionEnd(150):s(),this._hoverState="")},a.prototype.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},a.prototype.isWithContent=function(){return Boolean(this.getTitle())},a.prototype.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},a.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},a.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m.TOOLTIP_INNER),this.getTitle()),e.removeClass(f.FADE+" "+f.SHOW)},a.prototype.setElementContent=function(e,i){var r=this.config.html;"object"===(void 0===i?"undefined":n(i))&&(i.nodeType||i.jquery)?r?t(i).parent().is(e)||e.empty().append(i):e.text(t(i).text()):e[r?"html":"text"](i)},a.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},a.prototype._getAttachment=function(t){return h[t.toUpperCase()]},a.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(i){if("click"===i)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(i!==g.MANUAL){var n=i===g.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=i===g.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(n,e.config.selector,function(t){return e._enter(t)}).on(r,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},a.prototype._fixTitle=function(){var t=n(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},a.prototype._enter=function(e,i){var n=this.constructor.DATA_KEY;(i=i||t(e.currentTarget).data(n))||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),e&&(i._activeTrigger["focusin"===e.type?g.FOCUS:g.HOVER]=!0),t(i.getTipElement()).hasClass(f.SHOW)||i._hoverState===u.SHOW?i._hoverState=u.SHOW:(clearTimeout(i._timeout),i._hoverState=u.SHOW,i.config.delay&&i.config.delay.show?i._timeout=setTimeout(function(){i._hoverState===u.SHOW&&i.show()},i.config.delay.show):i.show())},a.prototype._leave=function(e,i){var n=this.constructor.DATA_KEY;(i=i||t(e.currentTarget).data(n))||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),e&&(i._activeTrigger["focusout"===e.type?g.FOCUS:g.HOVER]=!1),i._isWithActiveTrigger()||(clearTimeout(i._timeout),i._hoverState=u.OUT,i.config.delay&&i.config.delay.hide?i._timeout=setTimeout(function(){i._hoverState===u.OUT&&i.hide()},i.config.delay.hide):i.hide())},a.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},a.prototype._getConfig=function(i){return(i=t.extend({},this.constructor.Default,t(this.element).data(),i)).delay&&"number"==typeof i.delay&&(i.delay={show:i.delay,hide:i.delay}),i.title&&"number"==typeof i.title&&(i.title=i.title.toString()),i.content&&"number"==typeof i.content&&(i.content=i.content.toString()),o.typeCheckConfig(e,i,this.constructor.DefaultType),i},a.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},a.prototype._cleanTipClass=function(){var e=t(this.getTipElement()),i=e.attr("class").match(l);null!==i&&i.length>0&&e.removeClass(i.join(""))},a.prototype._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},a.prototype._fixTransition=function(){var e=this.getTipElement(),i=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(f.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=i)},a._jQueryInterface=function(e){return this.each(function(){var i=t(this).data("bs.tooltip"),r="object"===(void 0===e?"undefined":n(e))&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new a(this,r),t(this).data("bs.tooltip",i)),"string"==typeof e)){if(void 0===i[e])throw new Error('No method named "'+e+'"');i[e]()}})},r(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return c}}]),a}();return t.fn[e]=v._jQueryInterface,t.fn[e].Constructor=v,t.fn[e].noConflict=function(){return t.fn[e]=a,v._jQueryInterface},v}(jQuery));!function(o){var a="popover",l=".bs.popover",c=o.fn[a],h=new RegExp("(^|\\s)bs-popover\\S+","g"),d=o.extend({},s.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),u=o.extend({},s.DefaultType,{content:"(string|element|function)"}),p={FADE:"fade",SHOW:"show"},f={TITLE:".popover-header",CONTENT:".popover-body"},m={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},g=function(s){function c(){return i(this,c),t(this,s.apply(this,arguments))}return e(c,s),c.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},c.prototype.addAttachmentClass=function(t){o(this.getTipElement()).addClass("bs-popover-"+t)},c.prototype.getTipElement=function(){return this.tip=this.tip||o(this.config.template)[0]},c.prototype.setContent=function(){var t=o(this.getTipElement());this.setElementContent(t.find(f.TITLE),this.getTitle()),this.setElementContent(t.find(f.CONTENT),this._getContent()),t.removeClass(p.FADE+" "+p.SHOW)},c.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},c.prototype._cleanTipClass=function(){var t=o(this.getTipElement()),e=t.attr("class").match(h);null!==e&&e.length>0&&t.removeClass(e.join(""))},c._jQueryInterface=function(t){return this.each(function(){var e=o(this).data("bs.popover"),i="object"===(void 0===t?"undefined":n(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new c(this,i),o(this).data("bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},r(c,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return a}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return m}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return u}}]),c}(s);o.fn[a]=g._jQueryInterface,o.fn[a].Constructor=g,o.fn[a].noConflict=function(){return o.fn[a]=c,g._jQueryInterface}}(jQuery)}(),function(t){var e=!1;if("function"==typeof define&&define.amd&&(define(t),e=!0),"object"==typeof exports&&(module.exports=t(),e=!0),!e){var i=window.Cookies,n=window.Cookies=t();n.noConflict=function(){return window.Cookies=i,n}}}(function(){function t(){for(var t=0,e={};t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}function e(i){function n(e,r,o){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(o=t({path:"/"},n.defaults,o)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(r),/^[\{\[]/.test(s)&&(r=s)}catch(t){}r=i.write?i.write(r,e):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var c in o)o[c]&&(l+="; "+c,!0!==o[c]&&(l+="="+o[c]));return document.cookie=e+"="+r+l}e||(s={});for(var h=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<h.length;u++){var p=h[u].split("="),f=p.slice(1).join("=");'"'===f.charAt(0)&&(f=f.slice(1,-1));try{var m=p[0].replace(d,decodeURIComponent);if(f=i.read?i.read(f,m):i(f,m)||f.replace(d,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(t){}if(e===m){s=f;break}e||(s[m]=f)}catch(t){}}return s}}return n.set=n,n.get=function(t){return n.call(n,t)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(e,i){n(e,"",t(i,{expires:-1}))},n.withConverter=e,n}return e(function(){})}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";function t(){return ye.apply(null,arguments)}function e(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function i(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function n(t){var e;for(e in t)return!1;return!0}function r(t){return void 0===t}function o(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function s(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function a(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t,e){for(var i in e)l(e,i)&&(t[i]=e[i]);return l(e,"toString")&&(t.toString=e.toString),l(e,"valueOf")&&(t.valueOf=e.valueOf),t}function h(t,e,i,n){return Ft(t,e,i,n,!0).utc()}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function u(t){return null==t._pf&&(t._pf=d()),t._pf}function p(t){if(null==t._isValid){var e=u(t),i=_e.call(e.parsedDateParts,function(t){return null!=t}),n=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(n=n&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return n;t._isValid=n}return t._isValid}function f(t){var e=h(NaN);return null!=t?c(u(e),t):u(e).userInvalidated=!0,e}function m(t,e){var i,n,o;if(r(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),r(e._i)||(t._i=e._i),r(e._f)||(t._f=e._f),r(e._l)||(t._l=e._l),r(e._strict)||(t._strict=e._strict),r(e._tzm)||(t._tzm=e._tzm),r(e._isUTC)||(t._isUTC=e._isUTC),r(e._offset)||(t._offset=e._offset),r(e._pf)||(t._pf=u(e)),r(e._locale)||(t._locale=e._locale),xe.length>0)for(i=0;i<xe.length;i++)n=xe[i],o=e[n],r(o)||(t[n]=o);return t}function g(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===we&&(we=!0,t.updateOffset(this),we=!1)}function v(t){return t instanceof g||null!=t&&null!=t._isAMomentObject}function y(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function b(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=y(e)),i}function _(t,e,i){var n,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(n=0;n<r;n++)(i&&t[n]!==e[n]||!i&&b(t[n])!==b(e[n]))&&s++;return s+o}function x(e){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function w(e,i){var n=!0;return c(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),n){for(var r,o=[],s=0;s<arguments.length;s++){if(r="","object"==typeof arguments[s]){r+="\n["+s+"] ";for(var a in arguments[0])r+=a+": "+arguments[0][a]+", ";r=r.slice(0,-2)}else r=arguments[s];o.push(r)}x(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return i.apply(this,arguments)},i)}function k(e,i){null!=t.deprecationHandler&&t.deprecationHandler(e,i),ke[e]||(x(i),ke[e]=!0)}function S(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function C(t,e){var n,r=c({},t);for(n in e)l(e,n)&&(i(t[n])&&i(e[n])?(r[n]={},c(r[n],t[n]),c(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)l(t,n)&&!l(e,n)&&i(t[n])&&(r[n]=c({},r[n]));return r}function D(t){null!=t&&this.set(t)}function T(t,e){var i=t.toLowerCase();Pe[i]=Pe[i+"s"]=Pe[e]=t}function A(t){return"string"==typeof t?Pe[t]||Pe[t.toLowerCase()]:void 0}function M(t){var e,i,n={};for(i in t)l(t,i)&&(e=A(i))&&(n[e]=t[i]);return n}function E(t,e){Ie[t]=e}function P(t){var e=[];for(var i in t)e.push({unit:i,priority:Ie[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function I(e,i){return function(n){return null!=n?(N(this,e,n),t.updateOffset(this,i),this):O(this,e)}}function O(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function N(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function F(t,e,i){var n=""+Math.abs(t),r=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function L(t,e,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),t&&(Le[t]=r),e&&(Le[e[0]]=function(){return F(r.apply(this,arguments),e[1],e[2])}),i&&(Le[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function j(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function R(t){var e,i,n=t.match(Oe);for(e=0,i=n.length;e<i;e++)Le[n[e]]?n[e]=Le[n[e]]:n[e]=j(n[e]);return function(e){var r,o="";for(r=0;r<i;r++)o+=S(n[r])?n[r].call(e,t):n[r];return o}}function $(t,e){return t.isValid()?(e=H(e,t.localeData()),Fe[e]=Fe[e]||R(e),Fe[e](t)):t.localeData().invalidDate()}function H(t,e){var i=5;for(Ne.lastIndex=0;i>=0&&Ne.test(t);)t=t.replace(Ne,function(t){return e.longDateFormat(t)||t}),Ne.lastIndex=0,i-=1;return t}function B(t,e,i){ti[t]=S(e)?e:function(t,n){return t&&i?i:e}}function z(t,e){return l(ti,t)?ti[t](e._strict,e._locale):new RegExp(U(t))}function U(t){return W(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,r){return e||i||n||r}))}function W(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),o(e)&&(n=function(t,i){i[e]=b(t)}),i=0;i<t.length;i++)ei[t[i]]=n}function V(t,e){Y(t,function(t,i,n,r){n._w=n._w||{},e(t,n._w,n,r)})}function q(t,e,i){null!=e&&l(ei,t)&&ei[t](e,i._a,i,t)}function G(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function K(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=h([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(r=di.call(this._shortMonthsParse,s))?r:null:-1!==(r=di.call(this._longMonthsParse,s))?r:null:"MMM"===e?-1!==(r=di.call(this._shortMonthsParse,s))?r:-1!==(r=di.call(this._longMonthsParse,s))?r:null:-1!==(r=di.call(this._longMonthsParse,s))?r:-1!==(r=di.call(this._shortMonthsParse,s))?r:null}function X(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=b(e);else if(e=t.localeData().monthsParse(e),!o(e))return t;return i=Math.min(t.date(),G(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function Q(e){return null!=e?(X(this,e),t.updateOffset(this,!0),this):O(this,"Month")}function Z(){function t(t,e){return e.length-t.length}var e,i,n=[],r=[],o=[];for(e=0;e<12;e++)i=h([2e3,e]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(n.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)n[e]=W(n[e]),r[e]=W(r[e]);for(e=0;e<24;e++)o[e]=W(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function J(t){return tt(t)?366:365}function tt(t){return t%4==0&&t%100!=0||t%400==0}function et(t,e,i,n,r,o,s){var a=new Date(t,e,i,n,r,o,s);return t<100&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function it(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function nt(t,e,i){var n=7+e-i;return-((7+it(t,0,n).getUTCDay()-e)%7)+n-1}function rt(t,e,i,n,r){var o,s,a=1+7*(e-1)+(7+i-n)%7+nt(t,n,r);return a<=0?(o=t-1,s=J(o)+a):a>J(t)?(o=t+1,s=a-J(t)):(o=t,s=a),{year:o,dayOfYear:s}}function ot(t,e,i){var n,r,o=nt(t.year(),e,i),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?(r=t.year()-1,n=s+st(r,e,i)):s>st(t.year(),e,i)?(n=s-st(t.year(),e,i),r=t.year()+1):(r=t.year(),n=s),{week:n,year:r}}function st(t,e,i){var n=nt(t,e,i),r=nt(t+1,e,i);return(J(t)-n+r)/7}function at(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function lt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function ct(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(r=di.call(this._weekdaysParse,s))?r:null:"ddd"===e?-1!==(r=di.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=di.call(this._minWeekdaysParse,s))?r:null:"dddd"===e?-1!==(r=di.call(this._weekdaysParse,s))?r:-1!==(r=di.call(this._shortWeekdaysParse,s))?r:-1!==(r=di.call(this._minWeekdaysParse,s))?r:null:"ddd"===e?-1!==(r=di.call(this._shortWeekdaysParse,s))?r:-1!==(r=di.call(this._weekdaysParse,s))?r:-1!==(r=di.call(this._minWeekdaysParse,s))?r:null:-1!==(r=di.call(this._minWeekdaysParse,s))?r:-1!==(r=di.call(this._weekdaysParse,s))?r:-1!==(r=di.call(this._shortWeekdaysParse,s))?r:null}function ht(){function t(t,e){return e.length-t.length}var e,i,n,r,o,s=[],a=[],l=[],c=[];for(e=0;e<7;e++)i=h([2e3,1]).day(e),n=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),o=this.weekdays(i,""),s.push(n),a.push(r),l.push(o),c.push(n),c.push(r),c.push(o);for(s.sort(t),a.sort(t),l.sort(t),c.sort(t),e=0;e<7;e++)a[e]=W(a[e]),l[e]=W(l[e]),c[e]=W(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function dt(){return this.hours()%12||12}function ut(t,e){L(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function pt(t,e){return e._meridiemParse}function ft(t){return t?t.toLowerCase().replace("_","-"):t}function mt(t){for(var e,i,n,r,o=0;o<t.length;){for(e=(r=ft(t[o]).split("-")).length,i=(i=ft(t[o+1]))?i.split("-"):null;e>0;){if(n=gt(r.slice(0,e).join("-")))return n;if(i&&i.length>=e&&_(r,i,!0)>=e-1)break;e--}o++}return null}function gt(t){var e=null;if(!Mi[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=Ci._abbr,require("./locale/"+t),vt(e)}catch(t){}return Mi[t]}function vt(t,e){var i;return t&&(i=r(e)?bt(t):yt(t,e))&&(Ci=i),Ci._abbr}function yt(t,e){if(null!==e){var i=Ai;if(e.abbr=t,null!=Mi[t])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Mi[t]._config;else if(null!=e.parentLocale){if(null==Mi[e.parentLocale])return Ei[e.parentLocale]||(Ei[e.parentLocale]=[]),Ei[e.parentLocale].push({name:t,config:e}),null;i=Mi[e.parentLocale]._config}return Mi[t]=new D(C(i,e)),Ei[t]&&Ei[t].forEach(function(t){yt(t.name,t.config)}),vt(t),Mi[t]}return delete Mi[t],null}function bt(t){var i;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ci;if(!e(t)){if(i=gt(t))return i;t=[t]}return mt(t)}function _t(t){var e,i=t._a;return i&&-2===u(t).overflow&&(e=i[ni]<0||i[ni]>11?ni:i[ri]<1||i[ri]>G(i[ii],i[ni])?ri:i[oi]<0||i[oi]>24||24===i[oi]&&(0!==i[si]||0!==i[ai]||0!==i[li])?oi:i[si]<0||i[si]>59?si:i[ai]<0||i[ai]>59?ai:i[li]<0||i[li]>999?li:-1,u(t)._overflowDayOfYear&&(e<ii||e>ri)&&(e=ri),u(t)._overflowWeeks&&-1===e&&(e=ci),u(t)._overflowWeekday&&-1===e&&(e=hi),u(t).overflow=e),t}function xt(t){var e,i,n,r,o,s,a=t._i,l=Pi.exec(a)||Ii.exec(a);if(l){for(u(t).iso=!0,e=0,i=Ni.length;e<i;e++)if(Ni[e][1].exec(l[1])){r=Ni[e][0],n=!1!==Ni[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=Fi.length;e<i;e++)if(Fi[e][1].exec(l[3])){o=(l[2]||" ")+Fi[e][0];break}if(null==o)return void(t._isValid=!1)}if(!n&&null!=o)return void(t._isValid=!1);if(l[4]){if(!Oi.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=r+(o||"")+(s||""),At(t)}else t._isValid=!1}function wt(t){var e,i,n,r,o,s,a,l,c={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"};if(e=t._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),i=ji.exec(e)){if(n=i[1]?"ddd"+(5===i[1].length?", ":" "):"",r="D MMM "+(i[2].length>10?"YYYY ":"YY "),o="HH:mm"+(i[4]?":ss":""),i[1]){var h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][new Date(i[2]).getDay()];if(i[1].substr(0,3)!==h)return u(t).weekdayMismatch=!0,void(t._isValid=!1)}switch(i[5].length){case 2:0===l?a=" +0000":(l="YXWVUTSRQPONZABCDEFGHIKLM".indexOf(i[5][1].toUpperCase())-12,a=(l<0?" -":" +")+(""+l).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:a=c[i[5]];break;default:a=c[" GMT"]}i[5]=a,t._i=i.splice(1).join(""),s=" ZZ",t._f=n+r+o+s,At(t),u(t).rfc2822=!0}else t._isValid=!1}function kt(e){var i=Li.exec(e._i);return null!==i?void(e._d=new Date(+i[1])):(xt(e),void(!1===e._isValid&&(delete e._isValid,wt(e),!1===e._isValid&&(delete e._isValid,t.createFromInputFallback(e)))))}function St(t,e,i){return null!=t?t:null!=e?e:i}function Ct(e){var i=new Date(t.now());return e._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function Dt(t){var e,i,n,r,o=[];if(!t._d){for(n=Ct(t),t._w&&null==t._a[ri]&&null==t._a[ni]&&Tt(t),null!=t._dayOfYear&&(r=St(t._a[ii],n[ii]),(t._dayOfYear>J(r)||0===t._dayOfYear)&&(u(t)._overflowDayOfYear=!0),i=it(r,0,t._dayOfYear),t._a[ni]=i.getUTCMonth(),t._a[ri]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=n[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[oi]&&0===t._a[si]&&0===t._a[ai]&&0===t._a[li]&&(t._nextDay=!0,t._a[oi]=0),t._d=(t._useUTC?it:et).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[oi]=24)}}function Tt(t){var e,i,n,r,o,s,a,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,s=4,i=St(e.GG,t._a[ii],ot(Lt(),1,4).year),n=St(e.W,1),((r=St(e.E,1))<1||r>7)&&(l=!0);else{o=t._locale._week.dow,s=t._locale._week.doy;var c=ot(Lt(),o,s);i=St(e.gg,t._a[ii],c.year),n=St(e.w,c.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}n<1||n>st(i,o,s)?u(t)._overflowWeeks=!0:null!=l?u(t)._overflowWeekday=!0:(a=rt(i,n,r,o,s),t._a[ii]=a.year,t._dayOfYear=a.dayOfYear)}function At(e){if(e._f!==t.ISO_8601)if(e._f!==t.RFC_2822){e._a=[],u(e).empty=!0;var i,n,r,o,s,a=""+e._i,l=a.length,c=0;for(r=H(e._f,e._locale).match(Oe)||[],i=0;i<r.length;i++)o=r[i],(n=(a.match(z(o,e))||[])[0])&&((s=a.substr(0,a.indexOf(n))).length>0&&u(e).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),c+=n.length),Le[o]?(n?u(e).empty=!1:u(e).unusedTokens.push(o),q(o,n,e)):e._strict&&!n&&u(e).unusedTokens.push(o);u(e).charsLeftOver=l-c,a.length>0&&u(e).unusedInput.push(a),e._a[oi]<=12&&!0===u(e).bigHour&&e._a[oi]>0&&(u(e).bigHour=void 0),u(e).parsedDateParts=e._a.slice(0),u(e).meridiem=e._meridiem,e._a[oi]=Mt(e._locale,e._a[oi],e._meridiem),Dt(e),_t(e)}else wt(e);else xt(e)}function Mt(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function Et(t){var e,i,n,r,o;if(0===t._f.length)return u(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<t._f.length;r++)o=0,e=m({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],At(e),p(e)&&(o+=u(e).charsLeftOver,o+=10*u(e).unusedTokens.length,u(e).score=o,(null==n||o<n)&&(n=o,i=e));c(t,i||e)}function Pt(t){if(!t._d){var e=M(t._i);t._a=a([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Dt(t)}}function It(t){var e=new g(_t(Ot(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Ot(t){var i=t._i,n=t._f;return t._locale=t._locale||bt(t._l),null===i||void 0===n&&""===i?f({nullInput:!0}):("string"==typeof i&&(t._i=i=t._locale.preparse(i)),v(i)?new g(_t(i)):(s(i)?t._d=i:e(n)?Et(t):n?At(t):Nt(t),p(t)||(t._d=null),t))}function Nt(n){var l=n._i;r(l)?n._d=new Date(t.now()):s(l)?n._d=new Date(l.valueOf()):"string"==typeof l?kt(n):e(l)?(n._a=a(l.slice(0),function(t){return parseInt(t,10)}),Dt(n)):i(l)?Pt(n):o(l)?n._d=new Date(l):t.createFromInputFallback(n)}function Ft(t,r,o,s,a){var l={};return!0!==o&&!1!==o||(s=o,o=void 0),(i(t)&&n(t)||e(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=o,l._i=t,l._f=r,l._strict=s,It(l)}function Lt(t,e,i,n){return Ft(t,e,i,n,!1)}function jt(t,i){var n,r;if(1===i.length&&e(i[0])&&(i=i[0]),!i.length)return Lt();for(n=i[0],r=1;r<i.length;++r)i[r].isValid()&&!i[r][t](n)||(n=i[r]);return n}function Rt(t){for(var e in t)if(-1===Hi.indexOf(e)||null!=t[e]&&isNaN(t[e]))return!1;for(var i=!1,n=0;n<Hi.length;++n)if(t[Hi[n]]){if(i)return!1;parseFloat(t[Hi[n]])!==b(t[Hi[n]])&&(i=!0)}return!0}function $t(t){var e=M(t),i=e.year||0,n=e.quarter||0,r=e.month||0,o=e.week||0,s=e.day||0,a=e.hour||0,l=e.minute||0,c=e.second||0,h=e.millisecond||0;this._isValid=Rt(e),this._milliseconds=+h+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*n+12*i,this._data={},this._locale=bt(),this._bubble()}function Ht(t){return t instanceof $t}function Bt(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function zt(t,e){L(t,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+F(~~(t/60),2)+e+F(~~t%60,2)})}function Ut(t,e){var i=(e||"").match(t);if(null===i)return null;var n=((i[i.length-1]||[])+"").match(Bi)||["-",0,0],r=60*n[1]+b(n[2]);return 0===r?0:"+"===n[0]?r:-r}function Wt(e,i){var n,r;return i._isUTC?(n=i.clone(),r=(v(e)||s(e)?e.valueOf():Lt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),t.updateOffset(n,!1),n):Lt(e).local()}function Yt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&this._isUTC&&0===this._offset}function qt(t,e){var i,n,r,s=t,a=null;return Ht(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:o(t)?(s={},e?s[e]=t:s.milliseconds=t):(a=zi.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:b(a[ri])*i,h:b(a[oi])*i,m:b(a[si])*i,s:b(a[ai])*i,ms:b(Bt(1e3*a[li]))*i}):(a=Ui.exec(t))?(i="-"===a[1]?-1:1,s={y:Gt(a[2],i),M:Gt(a[3],i),w:Gt(a[4],i),d:Gt(a[5],i),h:Gt(a[6],i),m:Gt(a[7],i),s:Gt(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=Xt(Lt(s.from),Lt(s.to)),s={},s.ms=r.milliseconds,s.M=r.months),n=new $t(s),Ht(t)&&l(t,"_locale")&&(n._locale=t._locale),n}function Gt(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Kt(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Xt(t,e){var i;return t.isValid()&&e.isValid()?(e=Wt(e,t),t.isBefore(e)?i=Kt(t,e):(i=Kt(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Qt(t,e){return function(i,n){var r,o;return null===n||isNaN(+n)||(k(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),i="string"==typeof i?+i:i,r=qt(i,n),Zt(this,r,t),this}}function Zt(e,i,n,r){var o=i._milliseconds,s=Bt(i._days),a=Bt(i._months);e.isValid()&&(r=null==r||r,o&&e._d.setTime(e._d.valueOf()+o*n),s&&N(e,"Date",O(e,"Date")+s*n),a&&X(e,O(e,"Month")+a*n),r&&t.updateOffset(e,s||a))}function Jt(t,e){var i,n,r=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(r,"months");return e-o<0?(i=t.clone().add(r-1,"months"),n=(e-o)/(o-i)):(i=t.clone().add(r+1,"months"),n=(e-o)/(i-o)),-(r+n)||0}function te(t){var e;return void 0===t?this._locale._abbr:(null!=(e=bt(t))&&(this._locale=e),this)}function ee(){return this._locale}function ie(t,e){L(0,[t,t.length],0,e)}function ne(t,e,i,n,r){var o;return null==t?ot(this,n,r).year:(o=st(t,n,r),e>o&&(e=o),re.call(this,t,e,i,n,r))}function re(t,e,i,n,r){var o=rt(t,e,i,n,r),s=it(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function oe(t){return t}function se(t,e,i,n){var r=bt(),o=h().set(n,e);return r[i](o,t)}function ae(t,e,i){if(o(t)&&(e=t,t=void 0),t=t||"",null!=e)return se(t,e,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=se(t,n,i,"month");return r}function le(t,e,i,n){"boolean"==typeof t?(o(e)&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,o(e)&&(i=e,e=void 0),e=e||"");var r=bt(),s=t?r._week.dow:0;if(null!=i)return se(e,(i+s)%7,n,"day");var a,l=[];for(a=0;a<7;a++)l[a]=se(e,(a+s)%7,n,"day");return l}function ce(t,e,i,n){var r=qt(e,i);return t._milliseconds+=n*r._milliseconds,t._days+=n*r._days,t._months+=n*r._months,t._bubble()}function he(t){return t<0?Math.floor(t):Math.ceil(t)}function de(t){return 4800*t/146097}function ue(t){return 146097*t/4800}function pe(t){return function(){return this.as(t)}}function fe(t){return function(){return this.isValid()?this._data[t]:NaN}}function me(t,e,i,n,r){return r.relativeTime(e||1,!!i,t,n)}function ge(t,e,i){var n=qt(t).abs(),r=vn(n.as("s")),o=vn(n.as("m")),s=vn(n.as("h")),a=vn(n.as("d")),l=vn(n.as("M")),c=vn(n.as("y")),h=r<=yn.ss&&["s",r]||r<yn.s&&["ss",r]||o<=1&&["m"]||o<yn.m&&["mm",o]||s<=1&&["h"]||s<yn.h&&["hh",s]||a<=1&&["d"]||a<yn.d&&["dd",a]||l<=1&&["M"]||l<yn.M&&["MM",l]||c<=1&&["y"]||["yy",c];return h[2]=e,h[3]=+t>0,h[4]=i,me.apply(null,h)}function ve(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n=bn(this._milliseconds)/1e3,r=bn(this._days),o=bn(this._months);e=y((t=y(n/60))/60),n%=60,t%=60;var s=i=y(o/12),a=o%=12,l=r,c=e,h=t,d=n,u=this.asSeconds();return u?(u<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(l?l+"D":"")+(c||h||d?"T":"")+(c?c+"H":"")+(h?h+"M":"")+(d?d+"S":""):"P0D"}var ye,be,_e=be=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1},xe=t.momentProperties=[],we=!1,ke={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var Se,Ce,De=Se=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)l(t,e)&&i.push(e);return i},Te={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ae={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Me=/\d{1,2}/,Ee={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Pe={},Ie={},Oe=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Fe={},Le={},je=/\d/,Re=/\d\d/,$e=/\d{3}/,He=/\d{4}/,Be=/[+-]?\d{6}/,ze=/\d\d?/,Ue=/\d\d\d\d?/,We=/\d\d\d\d\d\d?/,Ye=/\d{1,3}/,Ve=/\d{1,4}/,qe=/[+-]?\d{1,6}/,Ge=/\d+/,Ke=/[+-]?\d+/,Xe=/Z|[+-]\d\d:?\d\d/gi,Qe=/Z|[+-]\d\d(?::?\d\d)?/gi,Ze=/[+-]?\d+(\.\d{1,3})?/,Je=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ti={},ei={},ii=0,ni=1,ri=2,oi=3,si=4,ai=5,li=6,ci=7,hi=8,di=Ce=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};L("M",["MM",2],"Mo",function(){return this.month()+1}),L("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),L("MMMM",0,0,function(t){return this.localeData().months(this,t)}),T("month","M"),E("month",8),B("M",ze),B("MM",ze,Re),B("MMM",function(t,e){return e.monthsShortRegex(t)}),B("MMMM",function(t,e){return e.monthsRegex(t)}),Y(["M","MM"],function(t,e){e[ni]=b(t)-1}),Y(["MMM","MMMM"],function(t,e,i,n){var r=i._locale.monthsParse(t,n,i._strict);null!=r?e[ni]=r:u(i).invalidMonth=t});var ui=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,pi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),fi="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),mi=Je,gi=Je;L("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),L(0,["YY",2],0,function(){return this.year()%100}),L(0,["YYYY",4],0,"year"),L(0,["YYYYY",5],0,"year"),L(0,["YYYYYY",6,!0],0,"year"),T("year","y"),E("year",1),B("Y",Ke),B("YY",ze,Re),B("YYYY",Ve,He),B("YYYYY",qe,Be),B("YYYYYY",qe,Be),Y(["YYYYY","YYYYYY"],ii),Y("YYYY",function(e,i){i[ii]=2===e.length?t.parseTwoDigitYear(e):b(e)}),Y("YY",function(e,i){i[ii]=t.parseTwoDigitYear(e)}),Y("Y",function(t,e){e[ii]=parseInt(t,10)}),t.parseTwoDigitYear=function(t){return b(t)+(b(t)>68?1900:2e3)};var vi=I("FullYear",!0);L("w",["ww",2],"wo","week"),L("W",["WW",2],"Wo","isoWeek"),T("week","w"),T("isoWeek","W"),E("week",5),E("isoWeek",5),B("w",ze),B("ww",ze,Re),B("W",ze),B("WW",ze,Re),V(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=b(t)});var yi={dow:0,doy:6};L("d",0,"do","day"),L("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),L("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),L("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),L("e",0,0,"weekday"),L("E",0,0,"isoWeekday"),T("day","d"),T("weekday","e"),T("isoWeekday","E"),E("day",11),E("weekday",11),E("isoWeekday",11),B("d",ze),B("e",ze),B("E",ze),B("dd",function(t,e){return e.weekdaysMinRegex(t)}),B("ddd",function(t,e){return e.weekdaysShortRegex(t)}),B("dddd",function(t,e){return e.weekdaysRegex(t)}),V(["dd","ddd","dddd"],function(t,e,i,n){var r=i._locale.weekdaysParse(t,n,i._strict);null!=r?e.d=r:u(i).invalidWeekday=t}),V(["d","e","E"],function(t,e,i,n){e[n]=b(t)});var bi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),_i="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),wi=Je,ki=Je,Si=Je;L("H",["HH",2],0,"hour"),L("h",["hh",2],0,dt),L("k",["kk",2],0,function(){return this.hours()||24}),L("hmm",0,0,function(){return""+dt.apply(this)+F(this.minutes(),2)}),L("hmmss",0,0,function(){return""+dt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),L("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),L("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),ut("a",!0),ut("A",!1),T("hour","h"),E("hour",13),B("a",pt),B("A",pt),B("H",ze),B("h",ze),B("k",ze),B("HH",ze,Re),B("hh",ze,Re),B("kk",ze,Re),B("hmm",Ue),B("hmmss",We),B("Hmm",Ue),B("Hmmss",We),Y(["H","HH"],oi),Y(["k","kk"],function(t,e,i){var n=b(t);e[oi]=24===n?0:n}),Y(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),Y(["h","hh"],function(t,e,i){e[oi]=b(t),u(i).bigHour=!0}),Y("hmm",function(t,e,i){var n=t.length-2;e[oi]=b(t.substr(0,n)),e[si]=b(t.substr(n)),u(i).bigHour=!0}),Y("hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[oi]=b(t.substr(0,n)),e[si]=b(t.substr(n,2)),e[ai]=b(t.substr(r)),u(i).bigHour=!0}),Y("Hmm",function(t,e,i){var n=t.length-2;e[oi]=b(t.substr(0,n)),e[si]=b(t.substr(n))}),Y("Hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[oi]=b(t.substr(0,n)),e[si]=b(t.substr(n,2)),e[ai]=b(t.substr(r))});var Ci,Di=/[ap]\.?m?\.?/i,Ti=I("Hours",!0),Ai={calendar:Te,longDateFormat:Ae,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:Me,relativeTime:Ee,months:pi,monthsShort:fi,week:yi,weekdays:bi,weekdaysMin:xi,weekdaysShort:_i,meridiemParse:Di},Mi={},Ei={},Pi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ii=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Oi=/Z|[+-]\d\d(?::?\d\d)?/,Ni=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Fi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Li=/^\/?Date\((\-?\d+)/i,ji=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;t.createFromInputFallback=w("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),t.ISO_8601=function(){},t.RFC_2822=function(){};var Ri=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Lt.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:f()}),$i=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Lt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:f()}),Hi=["year","quarter","month","week","day","hour","minute","second","millisecond"];zt("Z",":"),zt("ZZ",""),B("Z",Qe),B("ZZ",Qe),Y(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Ut(Qe,t)});var Bi=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var zi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ui=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;qt.fn=$t.prototype,qt.invalid=function(){return qt(NaN)};var Wi=Qt(1,"add"),Yi=Qt(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Vi=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});L(0,["gg",2],0,function(){return this.weekYear()%100}),L(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ie("gggg","weekYear"),ie("ggggg","weekYear"),ie("GGGG","isoWeekYear"),ie("GGGGG","isoWeekYear"),T("weekYear","gg"),T("isoWeekYear","GG"),E("weekYear",1),E("isoWeekYear",1),B("G",Ke),B("g",Ke),B("GG",ze,Re),B("gg",ze,Re),B("GGGG",Ve,He),B("gggg",Ve,He),B("GGGGG",qe,Be),B("ggggg",qe,Be),V(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=b(t)}),V(["gg","GG"],function(e,i,n,r){i[r]=t.parseTwoDigitYear(e)}),L("Q",0,"Qo","quarter"),T("quarter","Q"),E("quarter",7),B("Q",je),Y("Q",function(t,e){e[ni]=3*(b(t)-1)}),L("D",["DD",2],"Do","date"),T("date","D"),E("date",9),B("D",ze),B("DD",ze,Re),B("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Y(["D","DD"],ri),Y("Do",function(t,e){e[ri]=b(t.match(ze)[0],10)});var qi=I("Date",!0);L("DDD",["DDDD",3],"DDDo","dayOfYear"),T("dayOfYear","DDD"),E("dayOfYear",4),B("DDD",Ye),B("DDDD",$e),Y(["DDD","DDDD"],function(t,e,i){i._dayOfYear=b(t)}),L("m",["mm",2],0,"minute"),T("minute","m"),E("minute",14),B("m",ze),B("mm",ze,Re),Y(["m","mm"],si);var Gi=I("Minutes",!1);L("s",["ss",2],0,"second"),T("second","s"),E("second",15),B("s",ze),B("ss",ze,Re),Y(["s","ss"],ai);var Ki=I("Seconds",!1);L("S",0,0,function(){return~~(this.millisecond()/100)}),L(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),L(0,["SSS",3],0,"millisecond"),L(0,["SSSS",4],0,function(){return 10*this.millisecond()}),L(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),L(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),L(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),L(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),L(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),T("millisecond","ms"),E("millisecond",16),B("S",Ye,je),B("SS",Ye,Re),B("SSS",Ye,$e);var Xi;for(Xi="SSSS";Xi.length<=9;Xi+="S")B(Xi,Ge);for(Xi="S";Xi.length<=9;Xi+="S")Y(Xi,function(t,e){e[li]=b(1e3*("0."+t))});var Qi=I("Milliseconds",!1);L("z",0,0,"zoneAbbr"),L("zz",0,0,"zoneName");var Zi=g.prototype;Zi.add=Wi,Zi.calendar=function(e,i){var n=e||Lt(),r=Wt(n,this).startOf("day"),o=t.calendarFormat(this,r)||"sameElse",s=i&&(S(i[o])?i[o].call(this,n):i[o]);return this.format(s||this.localeData().calendar(o,this,Lt(n)))},Zi.clone=function(){return new g(this)},Zi.diff=function(t,e,i){var n,r,o,s;return this.isValid()&&(n=Wt(t,this)).isValid()?(r=6e4*(n.utcOffset()-this.utcOffset()),"year"===(e=A(e))||"month"===e||"quarter"===e?(s=Jt(this,n),"quarter"===e?s/=3:"year"===e&&(s/=12)):(o=this-n,s="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-r)/864e5:"week"===e?(o-r)/6048e5:o),i?s:y(s)):NaN},Zi.endOf=function(t){return void 0===(t=A(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},Zi.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=$(this,e);return this.localeData().postformat(i)},Zi.from=function(t,e){return this.isValid()&&(v(t)&&t.isValid()||Lt(t).isValid())?qt({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Zi.fromNow=function(t){return this.from(Lt(),t)},Zi.to=function(t,e){return this.isValid()&&(v(t)&&t.isValid()||Lt(t).isValid())?qt({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Zi.toNow=function(t){return this.to(Lt(),t)},Zi.get=function(t){return t=A(t),S(this[t])?this[t]():this},Zi.invalidAt=function(){return u(this).overflow},Zi.isAfter=function(t,e){var i=v(t)?t:Lt(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=A(r(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},Zi.isBefore=function(t,e){var i=v(t)?t:Lt(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=A(r(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},Zi.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},Zi.isSame=function(t,e){var i,n=v(t)?t:Lt(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=A(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},Zi.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},Zi.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},Zi.isValid=function(){return p(this)},Zi.lang=Vi,Zi.locale=te,Zi.localeData=ee,Zi.max=$i,Zi.min=Ri,Zi.parsingFlags=function(){return c({},u(this))},Zi.set=function(t,e){if("object"==typeof t)for(var i=P(t=M(t)),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit]);else if(t=A(t),S(this[t]))return this[t](e);return this},Zi.startOf=function(t){switch(t=A(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},Zi.subtract=Yi,Zi.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},Zi.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},Zi.toDate=function(){return new Date(this.valueOf())},Zi.toISOString=function(){if(!this.isValid())return null;var t=this.clone().utc();return t.year()<0||t.year()>9999?$(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):S(Date.prototype.toISOString)?this.toDate().toISOString():$(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},Zi.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=e+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+r)},Zi.toJSON=function(){return this.isValid()?this.toISOString():null},Zi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Zi.unix=function(){return Math.floor(this.valueOf()/1e3)},Zi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Zi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Zi.year=vi,Zi.isLeapYear=function(){return tt(this.year())},Zi.weekYear=function(t){return ne.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Zi.isoWeekYear=function(t){return ne.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},Zi.quarter=Zi.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},Zi.month=Q,Zi.daysInMonth=function(){return G(this.year(),this.month())},Zi.week=Zi.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},Zi.isoWeek=Zi.isoWeeks=function(t){var e=ot(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},Zi.weeksInYear=function(){var t=this.localeData()._week;return st(this.year(),t.dow,t.doy)},Zi.isoWeeksInYear=function(){return st(this.year(),1,4)},Zi.date=qi,Zi.day=Zi.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=at(t,this.localeData()),this.add(t-e,"d")):e},Zi.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},Zi.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=lt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},Zi.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},Zi.hour=Zi.hours=Ti,Zi.minute=Zi.minutes=Gi,Zi.second=Zi.seconds=Ki,Zi.millisecond=Zi.milliseconds=Qi,Zi.utcOffset=function(e,i,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(Qe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&i&&(r=Yt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!i||this._changeInProgress?Zt(this,qt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Yt(this)},Zi.utc=function(t){return this.utcOffset(0,t)},Zi.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Yt(this),"m")),this},Zi.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ut(Xe,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},Zi.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Lt(t).utcOffset():0,(this.utcOffset()-t)%60==0)},Zi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Zi.isLocal=function(){return!!this.isValid()&&!this._isUTC},Zi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Zi.isUtc=Vt,Zi.isUTC=Vt,Zi.zoneAbbr=function(){return this._isUTC?"UTC":""},Zi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Zi.dates=w("dates accessor is deprecated. Use date instead.",qi),Zi.months=w("months accessor is deprecated. Use month instead",Q),Zi.years=w("years accessor is deprecated. Use year instead",vi),Zi.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),Zi.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=Ot(t))._a){var e=t._isUTC?h(t._a):Lt(t._a);this._isDSTShifted=this.isValid()&&_(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var Ji=D.prototype;Ji.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return S(n)?n.call(e,i):n},Ji.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},Ji.invalidDate=function(){return this._invalidDate},Ji.ordinal=function(t){return this._ordinal.replace("%d",t)},Ji.preparse=oe,Ji.postformat=oe,Ji.relativeTime=function(t,e,i,n){var r=this._relativeTime[i];return S(r)?r(t,e,i,n):r.replace(/%d/i,t)},Ji.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return S(i)?i(e):i.replace(/%s/i,e)},Ji.set=function(t){var e,i;for(i in t)e=t[i],S(e)?this[i]=e:this["_"+i]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Ji.months=function(t,i){return t?e(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||ui).test(i)?"format":"standalone"][t.month()]:e(this._months)?this._months:this._months.standalone},Ji.monthsShort=function(t,i){return t?e(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[ui.test(i)?"format":"standalone"][t.month()]:e(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Ji.monthsParse=function(t,e,i){var n,r,o;if(this._monthsParseExact)return K.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=h([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},Ji.monthsRegex=function(t){return this._monthsParseExact?(l(this,"_monthsRegex")||Z.call(this),t?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=gi),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},Ji.monthsShortRegex=function(t){return this._monthsParseExact?(l(this,"_monthsRegex")||Z.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=mi),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},Ji.week=function(t){return ot(t,this._week.dow,this._week.doy).week},Ji.firstDayOfYear=function(){return this._week.doy},Ji.firstDayOfWeek=function(){return this._week.dow},Ji.weekdays=function(t,i){return t?e(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(i)?"format":"standalone"][t.day()]:e(this._weekdays)?this._weekdays:this._weekdays.standalone},Ji.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},Ji.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},Ji.weekdaysParse=function(t,e,i){var n,r,o;if(this._weekdaysParseExact)return ct.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=h([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},Ji.weekdaysRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||ht.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=wi),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},Ji.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||ht.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ki),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Ji.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||ht.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Si),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Ji.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},Ji.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},vt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===b(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),t.lang=w("moment.lang is deprecated. Use moment.locale instead.",vt),t.langData=w("moment.langData is deprecated. Use moment.localeData instead.",bt);var tn=Math.abs,en=pe("ms"),nn=pe("s"),rn=pe("m"),on=pe("h"),sn=pe("d"),an=pe("w"),ln=pe("M"),cn=pe("y"),hn=fe("milliseconds"),dn=fe("seconds"),un=fe("minutes"),pn=fe("hours"),fn=fe("days"),mn=fe("months"),gn=fe("years"),vn=Math.round,yn={ss:44,s:45,m:45,h:22,d:26,M:11},bn=Math.abs,_n=$t.prototype;return _n.isValid=function(){return this._isValid},_n.abs=function(){var t=this._data;return this._milliseconds=tn(this._milliseconds),this._days=tn(this._days),this._months=tn(this._months),t.milliseconds=tn(t.milliseconds),t.seconds=tn(t.seconds),t.minutes=tn(t.minutes),t.hours=tn(t.hours),t.months=tn(t.months),t.years=tn(t.years),this},_n.add=function(t,e){return ce(this,t,e,1)},_n.subtract=function(t,e){return ce(this,t,e,-1)},_n.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=A(t))||"year"===t)return e=this._days+n/864e5,i=this._months+de(e),"month"===t?i:i/12;switch(e=this._days+Math.round(ue(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},_n.asMilliseconds=en,_n.asSeconds=nn,_n.asMinutes=rn,_n.asHours=on,_n.asDays=sn,_n.asWeeks=an,_n.asMonths=ln,_n.asYears=cn,_n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*b(this._months/12):NaN},_n._bubble=function(){var t,e,i,n,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*he(ue(a)+s),s=0,a=0),l.milliseconds=o%1e3,t=y(o/1e3),l.seconds=t%60,e=y(t/60),l.minutes=e%60,i=y(e/60),l.hours=i%24,s+=y(i/24),r=y(de(s)),a+=r,s-=he(ue(r)),n=y(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},_n.get=function(t){return t=A(t),this.isValid()?this[t+"s"]():NaN},_n.milliseconds=hn,_n.seconds=dn,_n.minutes=un,_n.hours=pn,_n.days=fn,_n.weeks=function(){return y(this.days()/7)},_n.months=mn,_n.years=gn,_n.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=ge(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)},_n.toISOString=ve,_n.toString=ve,_n.toJSON=ve,_n.locale=te,_n.localeData=ee,_n.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ve),_n.lang=Vi,L("X",0,0,"unix"),L("x",0,0,"valueOf"),B("x",Ke),B("X",Ze),Y("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),Y("x",function(t,e,i){i._d=new Date(b(t))}),t.version="2.18.1",function(t){ye=t}(Lt),t.fn=Zi,t.min=function(){return jt("isBefore",[].slice.call(arguments,0))},t.max=function(){return jt("isAfter",[].slice.call(arguments,0))},t.now=function(){return Date.now?Date.now():+new Date},t.utc=h,t.unix=function(t){return Lt(1e3*t)},t.months=function(t,e){return ae(t,e,"months")},t.isDate=s,t.locale=vt,t.invalid=f,t.duration=qt,t.isMoment=v,t.weekdays=function(t,e,i){return le(t,e,i,"weekdays")},t.parseZone=function(){return Lt.apply(null,arguments).parseZone()},t.localeData=bt,t.isDuration=Ht,t.monthsShort=function(t,e){return ae(t,e,"monthsShort")},t.weekdaysMin=function(t,e,i){return le(t,e,i,"weekdaysMin")},t.defineLocale=yt,t.updateLocale=function(t,e){if(null!=e){var i,n=Ai;null!=Mi[t]&&(n=Mi[t]._config),(i=new D(e=C(n,e))).parentLocale=Mi[t],Mi[t]=i,vt(t)}else null!=Mi[t]&&(null!=Mi[t].parentLocale?Mi[t]=Mi[t].parentLocale:null!=Mi[t]&&delete Mi[t]);return Mi[t]},t.locales=function(){return De(Mi)},t.weekdaysShort=function(t,e,i){return le(t,e,i,"weekdaysShort")},t.normalizeUnits=A,t.relativeTimeRounding=function(t){return void 0===t?vn:"function"==typeof t&&(vn=t,!0)},t.relativeTimeThreshold=function(t,e){return void 0!==yn[t]&&(void 0===e?yn[t]:(yn[t]=e,"s"===t&&(yn.ss=e-1),!0))},t.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},t.prototype=Zi,t}),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.wNumb=t()}(function(){"use strict";function t(t){return t.split("").reverse().join("")}function e(t,e){return t.substring(0,e.length)===e}function i(t,e){return t.slice(-1*e.length)===e}function n(t,e,i){if((t[e]||t[i])&&t[e]===t[i])throw new Error(e)}function r(t){return"number"==typeof t&&isFinite(t)}function o(t,e){return t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]+e:e))),(+((t=t.toString().split("e"))[0]+"e"+(t[1]?+t[1]-e:-e))).toFixed(e)}function s(e,i,n,s,a,l,c,h,d,u,p,f){var m,g,v,y=f,b="",_="";return l&&(f=l(f)),!!r(f)&&(!1!==e&&0===parseFloat(f.toFixed(e))&&(f=0),f<0&&(m=!0,f=Math.abs(f)),!1!==e&&(f=o(f,e)),-1!==(f=f.toString()).indexOf(".")?(v=(g=f.split("."))[0],n&&(b=n+g[1])):v=f,i&&(v=t((v=t(v).match(/.{1,3}/g)).join(t(i)))),m&&h&&(_+=h),s&&(_+=s),m&&d&&(_+=d),_+=v,_+=b,a&&(_+=a),u&&(_=u(_,y)),_)}function a(t,n,o,s,a,l,c,h,d,u,p,f){var m,g="";return p&&(f=p(f)),!(!f||"string"!=typeof f)&&(h&&e(f,h)&&(f=f.replace(h,""),m=!0),s&&e(f,s)&&(f=f.replace(s,"")),d&&e(f,d)&&(f=f.replace(d,""),m=!0),a&&i(f,a)&&(f=f.slice(0,-1*a.length)),n&&(f=f.split(n).join("")),o&&(f=f.replace(o,".")),m&&(g+="-"),g+=f,""!==(g=g.replace(/[^0-9\.\-.]/g,""))&&(g=Number(g),c&&(g=c(g)),!!r(g)&&g))}function l(t){var e,i,r,o={};for(void 0===t.suffix&&(t.suffix=t.postfix),e=0;e<d.length;e+=1)if(i=d[e],void 0===(r=t[i]))"negative"!==i||o.negativeBefore?"mark"===i&&"."!==o.thousand?o[i]=".":o[i]=!1:o[i]="-";else if("decimals"===i){if(!(r>=0&&r<8))throw new Error(i);o[i]=r}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof r)throw new Error(i);o[i]=r}else{if("string"!=typeof r)throw new Error(i);o[i]=r}return n(o,"mark","thousand"),n(o,"prefix","negative"),n(o,"prefix","negativeBefore"),o}function c(t,e,i){var n,r=[];for(n=0;n<d.length;n+=1)r.push(t[d[n]]);return r.push(i),e.apply("",r)}function h(t){if(!(this instanceof h))return new h(t);"object"==typeof t&&(t=l(t),this.to=function(e){return c(t,s,e)},this.from=function(e){return c(t,a,e)})}var d=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];return h}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).closest("form").ajaxSubmit(i))}function i(e){var i=e.target,n=t(i);if(!n.is("[type=submit],[type=image]")){var r=n.closest("[type=submit]");if(0===r.length)return;i=r[0]}var o=i.form;if(o.clk=i,"image"===i.type)if(void 0!==e.offsetX)o.clk_x=e.offsetX,o.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var s=n.offset();o.clk_x=e.pageX-s.left,o.clk_y=e.pageY-s.top}else o.clk_x=e.pageX-i.offsetLeft,o.clk_y=e.pageY-i.offsetTop;setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function n(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var r=/\r?\n/g,o={};o.fileapi=void 0!==t('<input type="file">').get(0).files,o.formdata=void 0!==window.FormData;var s=!!t.fn.prop;t.fn.attr2=function(){if(!s)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e,i,r,a){function l(i){var n,r,o=t.param(i,e.traditional).split("&"),s=o.length,a=[];for(n=0;n<s;n++)o[n]=o[n].replace(/\+/g," "),r=o[n].split("="),a.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return a}function c(i){function r(t){var e=null;try{t.contentWindow&&(e=t.contentWindow.document)}catch(t){n("cannot get iframe.contentWindow document: "+t)}if(e)return e;try{e=t.contentDocument?t.contentDocument:t.document}catch(i){n("cannot get iframe.contentDocument: "+i),e=t.document}return e}function o(){function e(){try{var t=r(g).readyState;n("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(t){n("Server abort: ",t," (",t.name,")"),a(A),w&&clearTimeout(w),w=void 0}}var i=p.attr2("target"),o=p.attr2("action"),s=p.attr("enctype")||p.attr("encoding")||"multipart/form-data";k.setAttribute("target",f),h&&!/post/i.test(h)||k.setAttribute("method","POST"),o!==d.url&&k.setAttribute("action",d.url),d.skipEncodingOverride||h&&!/post/i.test(h)||p.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),d.timeout&&(w=setTimeout(function(){x=!0,a(T)},d.timeout));var l=[];try{if(d.extraData)for(var c in d.extraData)d.extraData.hasOwnProperty(c)&&(t.isPlainObject(d.extraData[c])&&d.extraData[c].hasOwnProperty("name")&&d.extraData[c].hasOwnProperty("value")?l.push(t('<input type="hidden" name="'+d.extraData[c].name+'">',C).val(d.extraData[c].value).appendTo(k)[0]):l.push(t('<input type="hidden" name="'+c+'">',C).val(d.extraData[c]).appendTo(k)[0]));d.iframeTarget||m.appendTo(D),g.attachEvent?g.attachEvent("onload",a):g.addEventListener("load",a,!1),setTimeout(e,15);try{k.submit()}catch(t){document.createElement("form").submit.apply(k)}}finally{k.setAttribute("action",o),k.setAttribute("enctype",s),i?k.setAttribute("target",i):p.removeAttr("target"),t(l).remove()}}function a(e){if(!y.aborted&&!O){if((I=r(g))||(n("cannot access response document"),e=A),e===T&&y)return y.abort("timeout"),void S.reject(y,"timeout");if(e===A&&y)return y.abort("server abort"),void S.reject(y,"error","server abort");if(I&&I.location.href!==d.iframeSrc||x){g.detachEvent?g.detachEvent("onload",a):g.removeEventListener("load",a,!1);var i,o="success";try{if(x)throw"timeout";var s="xml"===d.dataType||I.XMLDocument||t.isXMLDoc(I);if(n("isXml="+s),!s&&window.opera&&(null===I.body||!I.body.innerHTML)&&--N)return n("requeing onLoad callback, DOM not available"),void setTimeout(a,250);var l=I.body?I.body:I.documentElement;y.responseText=l?l.innerHTML:null,y.responseXML=I.XMLDocument?I.XMLDocument:I,s&&(d.dataType="xml"),y.getResponseHeader=function(t){return{"content-type":d.dataType}[t.toLowerCase()]},l&&(y.status=Number(l.getAttribute("status"))||y.status,y.statusText=l.getAttribute("statusText")||y.statusText);var c=(d.dataType||"").toLowerCase(),h=/(json|script|text)/.test(c);if(h||d.textarea){var p=I.getElementsByTagName("textarea")[0];if(p)y.responseText=p.value,y.status=Number(p.getAttribute("status"))||y.status,y.statusText=p.getAttribute("statusText")||y.statusText;else if(h){var f=I.getElementsByTagName("pre")[0],v=I.getElementsByTagName("body")[0];f?y.responseText=f.textContent?f.textContent:f.innerText:v&&(y.responseText=v.textContent?v.textContent:v.innerText)}}else"xml"===c&&!y.responseXML&&y.responseText&&(y.responseXML=F(y.responseText));try{P=j(y,c,d)}catch(t){o="parsererror",y.error=i=t||o}}catch(t){n("error caught: ",t),o="error",y.error=i=t||o}y.aborted&&(n("upload aborted"),o=null),y.status&&(o=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===o?(d.success&&d.success.call(d.context,P,"success",y),S.resolve(y.responseText,"success",y),u&&t.event.trigger("ajaxSuccess",[y,d])):o&&(void 0===i&&(i=y.statusText),d.error&&d.error.call(d.context,y,o,i),S.reject(y,"error",i),u&&t.event.trigger("ajaxError",[y,d,i])),u&&t.event.trigger("ajaxComplete",[y,d]),u&&!--t.active&&t.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,y,o),O=!0,d.timeout&&clearTimeout(w),setTimeout(function(){d.iframeTarget?m.attr("src",d.iframeSrc):m.remove(),y.responseXML=null},100)}}}var l,c,d,u,f,m,g,y,b,_,x,w,k=p[0],S=t.Deferred();if(S.abort=function(t){y.abort(t)},i)for(c=0;c<v.length;c++)l=t(v[c]),s?l.prop("disabled",!1):l.removeAttr("disabled");(d=t.extend(!0,{},t.ajaxSettings,e)).context=d.context||d,f="jqFormIO"+(new Date).getTime();var C=k.ownerDocument,D=p.closest("body");if(d.iframeTarget?(_=(m=t(d.iframeTarget,C)).attr2("name"))?f=_:m.attr2("name",f):(m=t('<iframe name="'+f+'" src="'+d.iframeSrc+'" />',C)).css({position:"absolute",top:"-1000px",left:"-1000px"}),g=m[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(t){}m.attr("src",d.iframeSrc),y.error=i,d.error&&d.error.call(d.context,y,i,e),u&&t.event.trigger("ajaxError",[y,d,i]),d.complete&&d.complete.call(d.context,y,i)}},(u=d.global)&&0==t.active++&&t.event.trigger("ajaxStart"),u&&t.event.trigger("ajaxSend",[y,d]),d.beforeSend&&!1===d.beforeSend.call(d.context,y,d))return d.global&&t.active--,S.reject(),S;if(y.aborted)return S.reject(),S;(b=k.clk)&&(_=b.name)&&!b.disabled&&(d.extraData=d.extraData||{},d.extraData[_]=b.value,"image"===b.type&&(d.extraData[_+".x"]=k.clk_x,d.extraData[_+".y"]=k.clk_y));var T=1,A=2,M=t("meta[name=csrf-token]").attr("content"),E=t("meta[name=csrf-param]").attr("content");E&&M&&(d.extraData=d.extraData||{},d.extraData[E]=M),d.forceSync?o():setTimeout(o,10);var P,I,O,N=50,F=t.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!==e.documentElement.nodeName?e:null},L=t.parseJSON||function(t){return window.eval("("+t+")")},j=function(e,i,n){var r=e.getResponseHeader("content-type")||"",o=("xml"===i||!i)&&r.indexOf("xml")>=0,s=o?e.responseXML:e.responseText;return o&&"parsererror"===s.documentElement.nodeName&&t.error&&t.error("parsererror"),n&&n.dataFilter&&(s=n.dataFilter(s,i)),"string"==typeof s&&(("json"===i||!i)&&r.indexOf("json")>=0?s=L(s):("script"===i||!i)&&r.indexOf("javascript")>=0&&t.globalEval(s)),s};return S}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var h,d,u,p=this;"function"==typeof e?e={success:e}:"string"==typeof e||!1===e&&arguments.length>0?(e={url:e,data:i,dataType:r},"function"==typeof a&&(e.success=a)):void 0===e&&(e={}),h=e.method||e.type||this.attr2("method"),(u=(u="string"==typeof(d=e.url||this.attr2("action"))?t.trim(d):"")||window.location.href||"")&&(u=(u.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:u,success:t.ajaxSettings.success,type:h||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var f={};if(this.trigger("form-pre-serialize",[this,e,f]),f.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&!1===e.beforeSerialize(this,e))return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var m=e.traditional;void 0===m&&(m=t.ajaxSettings.traditional);var g,v=[],y=this.formToArray(e.semantic,v,e.filtering);if(e.data){var b=t.isFunction(e.data)?e.data(y):e.data;e.extraData=b,g=t.param(b,m)}if(e.beforeSubmit&&!1===e.beforeSubmit(y,this,e))return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[y,this,e,f]),f.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var _=t.param(y,m);g&&(_=_?_+"&"+g:g),"GET"===e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+_,e.data=null):e.data=_;var x=[];if(e.resetForm&&x.push(function(){p.resetForm()}),e.clearForm&&x.push(function(){p.clearForm(e.includeHidden)}),!e.dataType&&e.target){var w=e.success||function(){};x.push(function(i,n,r){var o=arguments,s=e.replaceTarget?"replaceWith":"html";t(e.target)[s](i).each(function(){w.apply(this,o)})})}else e.success&&(t.isArray(e.success)?t.merge(x,e.success):x.push(e.success));if(e.success=function(t,i,n){for(var r=e.context||this,o=0,s=x.length;o<s;o++)x[o].apply(r,[t,i,n||p,p])},e.error){var k=e.error;e.error=function(t,i,n){var r=e.context||this;k.apply(r,[t,i,n,p])}}if(e.complete){var S=e.complete;e.complete=function(t,i){var n=e.context||this;S.apply(n,[t,i,p])}}var C=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}).length>0,D="multipart/form-data",T=p.attr("enctype")===D||p.attr("encoding")===D,A=o.fileapi&&o.formdata;n("fileAPI :"+A);var M,E=(C||T)&&!A;!1!==e.iframe&&(e.iframe||E)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){M=c(y)}):M=c(y):M=(C||T)&&A?function(i){for(var n=new FormData,r=0;r<i.length;r++)n.append(i[r].name,i[r].value);if(e.extraData){var o=l(e.extraData);for(r=0;r<o.length;r++)o[r]&&n.append(o[r][0],o[r][1])}e.data=null;var s=t.extend(!0,{},t.ajaxSettings,e,{contentType:!1,processData:!1,cache:!1,type:h||"POST"});e.uploadProgress&&(s.xhr=function(){var i=t.ajaxSettings.xhr();return i.upload&&i.upload.addEventListener("progress",function(t){var i=0,n=t.loaded||t.position,r=t.total;t.lengthComputable&&(i=Math.ceil(n/r*100)),e.uploadProgress(t,n,r,i)},!1),i}),s.data=null;var a=s.beforeSend;return s.beforeSend=function(t,i){e.formData?i.data=e.formData:i.data=n,a&&a.call(this,t,i)},t.ajax(s)}(y):t.ajax(e),p.removeData("jqxhr").data("jqxhr",M);for(var P=0;P<v.length;P++)v[P]=null;return this.trigger("form-submit-notify",[this,e]),this},t.fn.ajaxForm=function(r,o,s,a){if(("string"==typeof r||!1===r&&arguments.length>0)&&(r={url:r,data:o,dataType:s},"function"==typeof a&&(r.success=a)),r=r||{},r.delegation=r.delegation&&t.isFunction(t.fn.on),!r.delegation&&0===this.length){var l={s:this.selector,c:this.context};return!t.isReady&&l.s?(n("DOM not ready, queuing ajaxForm"),t(function(){t(l.s,l.c).ajaxForm(r)}),this):(n("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return r.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,r,e).on("click.form-plugin",this.selector,r,i),this):this.ajaxFormUnbind().on("submit.form-plugin",r,e).on("click.form-plugin",r,i)},t.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i,n){var r=[];if(0===this.length)return r;var s,a=this[0],l=this.attr("id"),c=e||void 0===a.elements?a.getElementsByTagName("*"):a.elements;if(c&&(c=t.makeArray(c)),l&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(s=t(':input[form="'+l+'"]').get()).length&&(c=(c||[]).concat(s)),!c||!c.length)return r;t.isFunction(n)&&(c=t.map(c,n));var h,d,u,p,f,m,g;for(h=0,m=c.length;h<m;h++)if(f=c[h],(u=f.name)&&!f.disabled)if(e&&a.clk&&"image"===f.type)a.clk===f&&(r.push({name:u,value:t(f).val(),type:f.type}),r.push({name:u+".x",value:a.clk_x},{name:u+".y",value:a.clk_y}));else if((p=t.fieldValue(f,!0))&&p.constructor===Array)for(i&&i.push(f),d=0,g=p.length;d<g;d++)r.push({name:u,value:p[d]});else if(o.fileapi&&"file"===f.type){i&&i.push(f);var v=f.files;if(v.length)for(d=0;d<v.length;d++)r.push({name:u,value:v[d],type:f.type});else r.push({name:u,value:"",type:f.type})}else null!==p&&void 0!==p&&(i&&i.push(f),r.push({name:u,value:p,type:f.type,required:f.required}));if(!e&&a.clk){var y=t(a.clk),b=y[0];(u=b.name)&&!b.disabled&&"image"===b.type&&(r.push({name:u,value:y.val()}),r.push({name:u+".x",value:a.clk_x},{name:u+".y",value:a.clk_y}))}return r},t.fn.formSerialize=function(e){return t.param(this.formToArray(e))},t.fn.fieldSerialize=function(e){var i=[];return this.each(function(){var n=this.name;if(n){var r=t.fieldValue(this,e);if(r&&r.constructor===Array)for(var o=0,s=r.length;o<s;o++)i.push({name:n,value:r[o]});else null!==r&&void 0!==r&&i.push({name:this.name,value:r})}}),t.param(i)},t.fn.fieldValue=function(e){for(var i=[],n=0,r=this.length;n<r;n++){var o=this[n],s=t.fieldValue(o,e);null===s||void 0===s||s.constructor===Array&&!s.length||(s.constructor===Array?t.merge(i,s):i.push(s))}return i},t.fieldValue=function(e,i){var n=e.name,o=e.type,s=e.tagName.toLowerCase();if(void 0===i&&(i=!0),i&&(!n||e.disabled||"reset"===o||"button"===o||("checkbox"===o||"radio"===o)&&!e.checked||("submit"===o||"image"===o)&&e.form&&e.form.clk!==e||"select"===s&&-1===e.selectedIndex))return null;if("select"===s){var a=e.selectedIndex;if(a<0)return null;for(var l=[],c=e.options,h="select-one"===o,d=h?a+1:c.length,u=h?a:0;u<d;u++){var p=c[u];if(p.selected&&!p.disabled){var f=p.value;if(f||(f=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),h)return f;l.push(f)}}return l}return t(e).val().replace(r,"\r\n")},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var n=this.type,r=this.tagName.toLowerCase();i.test(n)||"textarea"===r?this.value="":"checkbox"===n||"radio"===n?this.checked=!1:"select"===r?this.selectedIndex=-1:"file"===n?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(!0===e&&/hidden/.test(n)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){var e=t(this),i=this.tagName.toLowerCase();switch(i){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var n=e.parents("select");return n.length&&n[0].multiple?"option"===i?this.selected=this.defaultSelected:e.find("option").resetForm():n.resetForm(),!0;case"select":return e.find("option").each(function(t){if(this.selected=this.defaultSelected,this.defaultSelected&&!e[0].multiple)return e[0].selectedIndex=t,!1}),!0;case"label":var r=t(e.attr("for")),o=e.find("input,select,textarea");return r[0]&&o.unshift(r[0]),o.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return e.find("form,input,label,select,textarea").resetForm(),!0}})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var i=this.type;if("checkbox"===i||"radio"===i)this.checked=e;else if("option"===this.tagName.toLowerCase()){var n=t(this).parent("select");e&&n[0]&&"select-one"===n[0].type&&n.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function e(e){var s=e||window.event,a=l.call(arguments,1),c=0,d=0,u=0,p=0,f=0,m=0;if(e=t.event.fix(s),e.type="mousewheel","detail"in s&&(u=-1*s.detail),"wheelDelta"in s&&(u=s.wheelDelta),"wheelDeltaY"in s&&(u=s.wheelDeltaY),"wheelDeltaX"in s&&(d=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=-1*u,u=0),c=0===u?d:u,"deltaY"in s&&(u=-1*s.deltaY,c=u),"deltaX"in s&&(d=s.deltaX,0===u&&(c=-1*d)),0!==u||0!==d){if(1===s.deltaMode){var g=t.data(this,"mousewheel-line-height");c*=g,u*=g,d*=g}else if(2===s.deltaMode){var v=t.data(this,"mousewheel-page-height");c*=v,u*=v,d*=v}if(p=Math.max(Math.abs(u),Math.abs(d)),(!o||o>p)&&(o=p,n(s,p)&&(o/=40)),n(s,p)&&(c/=40,d/=40,u/=40),c=Math[c>=1?"floor":"ceil"](c/o),d=Math[d>=1?"floor":"ceil"](d/o),u=Math[u>=1?"floor":"ceil"](u/o),h.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=e.clientX-y.left,m=e.clientY-y.top}return e.deltaX=d,e.deltaY=u,e.deltaFactor=o,e.offsetX=f,e.offsetY=m,e.deltaMode=0,a.unshift(e,c,d,u),r&&clearTimeout(r),r=setTimeout(i,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function i(){o=null}function n(t,e){return h.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}var r,o,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var c=s.length;c;)t.event.fixHooks[s[--c]]=t.event.mouseHooks;var h=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=a.length;i;)this.addEventListener(a[--i],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",h.getLineHeight(this)),t.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=a.length;i;)this.removeEventListener(a[--i],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function e(e){var s=e||window.event,a=l.call(arguments,1),c=0,d=0,u=0,p=0,f=0,m=0;if(e=t.event.fix(s),e.type="mousewheel","detail"in s&&(u=-1*s.detail),"wheelDelta"in s&&(u=s.wheelDelta),"wheelDeltaY"in s&&(u=s.wheelDeltaY),"wheelDeltaX"in s&&(d=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=-1*u,u=0),c=0===u?d:u,"deltaY"in s&&(u=-1*s.deltaY,c=u),"deltaX"in s&&(d=s.deltaX,0===u&&(c=-1*d)),0!==u||0!==d){if(1===s.deltaMode){var g=t.data(this,"mousewheel-line-height");c*=g,u*=g,d*=g}else if(2===s.deltaMode){var v=t.data(this,"mousewheel-page-height");c*=v,u*=v,d*=v}if(p=Math.max(Math.abs(u),Math.abs(d)),(!o||o>p)&&(o=p,n(s,p)&&(o/=40)),n(s,p)&&(c/=40,d/=40,u/=40),c=Math[c>=1?"floor":"ceil"](c/o),d=Math[d>=1?"floor":"ceil"](d/o),u=Math[u>=1?"floor":"ceil"](u/o),h.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=e.clientX-y.left,m=e.clientY-y.top}return e.deltaX=d,e.deltaY=u,e.deltaFactor=o,e.offsetX=f,e.offsetY=m,e.deltaMode=0,a.unshift(e,c,d,u),r&&clearTimeout(r),r=setTimeout(i,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function i(){o=null}function n(t,e){return h.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}var r,o,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var c=s.length;c;)t.event.fixHooks[s[--c]]=t.event.mouseHooks;var h=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=a.length;i;)this.addEventListener(a[--i],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",h.getLineHeight(this)),t.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=a.length;i;)this.removeEventListener(a[--i],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t:t(jQuery,window,document)}(function(t){!function(e){var i="function"==typeof define&&define.amd,n="undefined"!=typeof module&&module.exports,r="https:"==document.location.protocol?"https:":"http:";i||(n?require("jquery-mousewheel")(t):t.event.special.mousewheel||t("head").append(decodeURI("%3Cscript src="+r+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),e()}(function(){var e,i="mCustomScrollbar",n="mCS",r=".mCustomScrollbar",o={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},s=0,a={},l=window.attachEvent&&!window.addEventListener?1:0,c=!1,h=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],d={init:function(e){var e=t.extend(!0,{},o,e),i=u.call(this);if(e.live){var l=e.liveSelector||this.selector||r,c=t(l);if("off"===e.live)return void f(l);a[l]=setTimeout(function(){c.mCustomScrollbar(e),"once"===e.live&&c.length&&f(l)},500)}else f(l);return e.setWidth=e.set_width?e.set_width:e.setWidth,e.setHeight=e.set_height?e.set_height:e.setHeight,e.axis=e.horizontalScroll?"x":m(e.axis),e.scrollInertia=e.scrollInertia>0&&e.scrollInertia<17?17:e.scrollInertia,"object"!=typeof e.mouseWheel&&1==e.mouseWheel&&(e.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),e.mouseWheel.scrollAmount=e.mouseWheelPixels?e.mouseWheelPixels:e.mouseWheel.scrollAmount,e.mouseWheel.normalizeDelta=e.advanced.normalizeMouseWheelDelta?e.advanced.normalizeMouseWheelDelta:e.mouseWheel.normalizeDelta,e.scrollButtons.scrollType=g(e.scrollButtons.scrollType),p(e),t(i).each(function(){var i=t(this);if(!i.data(n)){i.data(n,{idx:++s,opt:e,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:i.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var r=i.data(n),o=r.opt,a=i.data("mcs-axis"),l=i.data("mcs-scrollbar-position"),c=i.data("mcs-theme");a&&(o.axis=a),l&&(o.scrollbarPosition=l),c&&(o.theme=c,p(o)),v.call(this),r&&o.callbacks.onCreate&&"function"==typeof o.callbacks.onCreate&&o.callbacks.onCreate.call(this),t("#mCSB_"+r.idx+"_container img:not(."+h[2]+")").addClass(h[2]),d.update.call(null,i)}})},update:function(e,i){var r=e||u.call(this);return t(r).each(function(){var e=t(this);if(e.data(n)){var r=e.data(n),o=r.opt,s=t("#mCSB_"+r.idx+"_container"),a=t("#mCSB_"+r.idx),l=[t("#mCSB_"+r.idx+"_dragger_vertical"),t("#mCSB_"+r.idx+"_dragger_horizontal")];if(!s.length)return;r.tweenRunning&&G(e),i&&r&&o.callbacks.onBeforeUpdate&&"function"==typeof o.callbacks.onBeforeUpdate&&o.callbacks.onBeforeUpdate.call(this),e.hasClass(h[3])&&e.removeClass(h[3]),e.hasClass(h[4])&&e.removeClass(h[4]),a.css("max-height","none"),a.height()!==e.height()&&a.css("max-height",e.height()),b.call(this),"y"===o.axis||o.advanced.autoExpandHorizontalScroll||s.css("width",y(s)),r.overflowed=S.call(this),A.call(this),o.autoDraggerLength&&x.call(this),w.call(this),D.call(this);var c=[Math.abs(s[0].offsetTop),Math.abs(s[0].offsetLeft)];"x"!==o.axis&&(r.overflowed[0]?l[0].height()>l[0].parent().height()?C.call(this):(K(e,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),r.contentReset.y=null):(C.call(this),"y"===o.axis?T.call(this):"yx"===o.axis&&r.overflowed[1]&&K(e,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==o.axis&&(r.overflowed[1]?l[1].width()>l[1].parent().width()?C.call(this):(K(e,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),r.contentReset.x=null):(C.call(this),"x"===o.axis?T.call(this):"yx"===o.axis&&r.overflowed[0]&&K(e,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),i&&r&&(2===i&&o.callbacks.onImageLoad&&"function"==typeof o.callbacks.onImageLoad?o.callbacks.onImageLoad.call(this):3===i&&o.callbacks.onSelectorChange&&"function"==typeof o.callbacks.onSelectorChange?o.callbacks.onSelectorChange.call(this):o.callbacks.onUpdate&&"function"==typeof o.callbacks.onUpdate&&o.callbacks.onUpdate.call(this)),V.call(this)}})},scrollTo:function(e,i){if(void 0!==e&&null!=e){var r=u.call(this);return t(r).each(function(){var r=t(this);if(r.data(n)){var o=r.data(n),s=o.opt,a={trigger:"external",scrollInertia:s.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},l=t.extend(!0,{},a,i),c=W.call(this,e),h=l.scrollInertia>0&&l.scrollInertia<17?17:l.scrollInertia;c[0]=Y.call(this,c[0],"y"),c[1]=Y.call(this,c[1],"x"),l.moveDragger&&(c[0]*=o.scrollRatio.y,c[1]*=o.scrollRatio.x),l.dur=rt()?0:h,setTimeout(function(){null!==c[0]&&void 0!==c[0]&&"x"!==s.axis&&o.overflowed[0]&&(l.dir="y",l.overwrite="all",K(r,c[0].toString(),l)),null!==c[1]&&void 0!==c[1]&&"y"!==s.axis&&o.overflowed[1]&&(l.dir="x",l.overwrite="none",K(r,c[1].toString(),l))},l.timeout)}})}},stop:function(){var e=u.call(this);return t(e).each(function(){var e=t(this);e.data(n)&&G(e)})},disable:function(e){var i=u.call(this);return t(i).each(function(){var i=t(this);i.data(n)&&(i.data(n),V.call(this,"remove"),T.call(this),e&&C.call(this),A.call(this,!0),i.addClass(h[3]))})},destroy:function(){var e=u.call(this);return t(e).each(function(){var r=t(this);if(r.data(n)){var o=r.data(n),s=o.opt,a=t("#mCSB_"+o.idx),l=t("#mCSB_"+o.idx+"_container"),c=t(".mCSB_"+o.idx+"_scrollbar");s.live&&f(s.liveSelector||t(e).selector),V.call(this,"remove"),T.call(this),C.call(this),r.removeData(n),J(this,"mcs"),c.remove(),l.find("img."+h[2]).removeClass(h[2]),a.replaceWith(l.contents()),r.removeClass(i+" _"+n+"_"+o.idx+" "+h[6]+" "+h[7]+" "+h[5]+" "+h[3]).addClass(h[4])}})}},u=function(){return"object"!=typeof t(this)||t(this).length<1?r:this},p=function(e){var i=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],n=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],r=["minimal","minimal-dark"],o=["minimal","minimal-dark"],s=["minimal","minimal-dark"];e.autoDraggerLength=!(t.inArray(e.theme,i)>-1)&&e.autoDraggerLength,e.autoExpandScrollbar=!(t.inArray(e.theme,n)>-1)&&e.autoExpandScrollbar,e.scrollButtons.enable=!(t.inArray(e.theme,r)>-1)&&e.scrollButtons.enable,e.autoHideScrollbar=t.inArray(e.theme,o)>-1||e.autoHideScrollbar,e.scrollbarPosition=t.inArray(e.theme,s)>-1?"outside":e.scrollbarPosition},f=function(t){a[t]&&(clearTimeout(a[t]),J(a,t))},m=function(t){return"yx"===t||"xy"===t||"auto"===t?"yx":"x"===t||"horizontal"===t?"x":"y"},g=function(t){return"stepped"===t||"pixels"===t||"step"===t||"click"===t?"stepped":"stepless"},v=function(){var e=t(this),r=e.data(n),o=r.opt,s=o.autoExpandScrollbar?" "+h[1]+"_expand":"",a=["<div id='mCSB_"+r.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+r.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+s+"'><div class='"+h[12]+"'><div id='mCSB_"+r.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+r.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+r.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+s+"'><div class='"+h[12]+"'><div id='mCSB_"+r.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],l="yx"===o.axis?"mCSB_vertical_horizontal":"x"===o.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===o.axis?a[0]+a[1]:"x"===o.axis?a[1]:a[0],d="yx"===o.axis?"<div id='mCSB_"+r.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",u=o.autoHideScrollbar?" "+h[6]:"",p="x"!==o.axis&&"rtl"===r.langDir?" "+h[7]:"";o.setWidth&&e.css("width",o.setWidth),o.setHeight&&e.css("height",o.setHeight),o.setLeft="y"!==o.axis&&"rtl"===r.langDir?"989999px":o.setLeft,e.addClass(i+" _"+n+"_"+r.idx+u+p).wrapInner("<div id='mCSB_"+r.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+l+"'><div id='mCSB_"+r.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir='"+r.langDir+"' /></div>");var f=t("#mCSB_"+r.idx),m=t("#mCSB_"+r.idx+"_container");"y"===o.axis||o.advanced.autoExpandHorizontalScroll||m.css("width",y(m)),"outside"===o.scrollbarPosition?("static"===e.css("position")&&e.css("position","relative"),e.css("overflow","visible"),f.addClass("mCSB_outside").after(c)):(f.addClass("mCSB_inside").append(c),m.wrap(d)),_.call(this);var g=[t("#mCSB_"+r.idx+"_dragger_vertical"),t("#mCSB_"+r.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},y=function(e){var i=[e[0].scrollWidth,Math.max.apply(Math,e.children().map(function(){return t(this).outerWidth(!0)}).get())],n=e.parent().width();return i[0]>n?i[0]:i[1]>n?i[1]:"100%"},b=function(){var e=t(this).data(n),i=e.opt,r=t("#mCSB_"+e.idx+"_container");if(i.advanced.autoExpandHorizontalScroll&&"y"!==i.axis){r.css({width:"auto","min-width":0,"overflow-x":"scroll"});var o=Math.ceil(r[0].scrollWidth);3===i.advanced.autoExpandHorizontalScroll||2!==i.advanced.autoExpandHorizontalScroll&&o>r.parent().width()?r.css({width:o,"min-width":"100%","overflow-x":"inherit"}):r.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(r[0].getBoundingClientRect().right+.4)-Math.floor(r[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},_=function(){var e=t(this).data(n),i=e.opt,r=t(".mCSB_"+e.idx+"_scrollbar:first"),o=it(i.scrollButtons.tabindex)?"tabindex='"+i.scrollButtons.tabindex+"'":"",s=["<a href='#' class='"+h[13]+"' "+o+" />","<a href='#' class='"+h[14]+"' "+o+" />","<a href='#' class='"+h[15]+"' "+o+" />","<a href='#' class='"+h[16]+"' "+o+" />"],a=["x"===i.axis?s[2]:s[0],"x"===i.axis?s[3]:s[1],s[2],s[3]];i.scrollButtons.enable&&r.prepend(a[0]).append(a[1]).next(".mCSB_scrollTools").prepend(a[2]).append(a[3])},x=function(){var e=t(this).data(n),i=t("#mCSB_"+e.idx),r=t("#mCSB_"+e.idx+"_container"),o=[t("#mCSB_"+e.idx+"_dragger_vertical"),t("#mCSB_"+e.idx+"_dragger_horizontal")],s=[i.height()/r.outerHeight(!1),i.width()/r.outerWidth(!1)],a=[parseInt(o[0].css("min-height")),Math.round(s[0]*o[0].parent().height()),parseInt(o[1].css("min-width")),Math.round(s[1]*o[1].parent().width())],c=l&&a[1]<a[0]?a[0]:a[1],h=l&&a[3]<a[2]?a[2]:a[3];o[0].css({height:c,"max-height":o[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":a[0]+"px"}),o[1].css({width:h,"max-width":o[1].parent().width()-10})},w=function(){var e=t(this).data(n),i=t("#mCSB_"+e.idx),r=t("#mCSB_"+e.idx+"_container"),o=[t("#mCSB_"+e.idx+"_dragger_vertical"),t("#mCSB_"+e.idx+"_dragger_horizontal")],s=[r.outerHeight(!1)-i.height(),r.outerWidth(!1)-i.width()],a=[s[0]/(o[0].parent().height()-o[0].height()),s[1]/(o[1].parent().width()-o[1].width())];e.scrollRatio={y:a[0],x:a[1]}},k=function(t,e,i){var n=i?h[0]+"_expanded":"",r=t.closest(".mCSB_scrollTools");"active"===e?(t.toggleClass(h[0]+" "+n),r.toggleClass(h[1]),t[0]._draggable=t[0]._draggable?0:1):t[0]._draggable||("hide"===e?(t.removeClass(h[0]),r.removeClass(h[1])):(t.addClass(h[0]),r.addClass(h[1])))},S=function(){var e=t(this).data(n),i=t("#mCSB_"+e.idx),r=t("#mCSB_"+e.idx+"_container"),o=null==e.overflowed?r.height():r.outerHeight(!1),s=null==e.overflowed?r.width():r.outerWidth(!1),a=r[0].scrollHeight,l=r[0].scrollWidth;return a>o&&(o=a),l>s&&(s=l),[o>i.height(),s>i.width()]},C=function(){var e=t(this),i=e.data(n),r=i.opt,o=t("#mCSB_"+i.idx),s=t("#mCSB_"+i.idx+"_container"),a=[t("#mCSB_"+i.idx+"_dragger_vertical"),t("#mCSB_"+i.idx+"_dragger_horizontal")];if(G(e),("x"!==r.axis&&!i.overflowed[0]||"y"===r.axis&&i.overflowed[0])&&(a[0].add(s).css("top",0),K(e,"_resetY")),"y"!==r.axis&&!i.overflowed[1]||"x"===r.axis&&i.overflowed[1]){var l=dx=0;"rtl"===i.langDir&&(l=o.width()-s.outerWidth(!1),dx=Math.abs(l/i.scrollRatio.x)),s.css("left",l),a[1].css("left",dx),K(e,"_resetX")}},D=function(){function e(){s=setTimeout(function(){t.event.special.mousewheel?(clearTimeout(s),O.call(i[0])):e()},100)}var i=t(this),r=i.data(n),o=r.opt;if(!r.bindEvents){if(E.call(this),o.contentTouchScroll&&P.call(this),I.call(this),o.mouseWheel.enable){var s;e()}R.call(this),H.call(this),o.advanced.autoScrollOnFocus&&$.call(this),o.scrollButtons.enable&&B.call(this),o.keyboard.enable&&z.call(this),r.bindEvents=!0}},T=function(){var e=t(this),i=e.data(n),r=i.opt,o=n+"_"+i.idx,s=".mCSB_"+i.idx+"_scrollbar",a=t("#mCSB_"+i.idx+",#mCSB_"+i.idx+"_container,#mCSB_"+i.idx+"_container_wrapper,"+s+" ."+h[12]+",#mCSB_"+i.idx+"_dragger_vertical,#mCSB_"+i.idx+"_dragger_horizontal,"+s+">a"),l=t("#mCSB_"+i.idx+"_container");r.advanced.releaseDraggableSelectors&&a.add(t(r.advanced.releaseDraggableSelectors)),r.advanced.extraDraggableSelectors&&a.add(t(r.advanced.extraDraggableSelectors)),i.bindEvents&&(t(document).add(t(!F()||top.document)).unbind("."+o),a.each(function(){t(this).unbind("."+o)}),clearTimeout(e[0]._focusTimeout),J(e[0],"_focusTimeout"),clearTimeout(i.sequential.step),J(i.sequential,"step"),clearTimeout(l[0].onCompleteTimeout),J(l[0],"onCompleteTimeout"),i.bindEvents=!1)},A=function(e){var i=t(this),r=i.data(n),o=r.opt,s=t("#mCSB_"+r.idx+"_container_wrapper"),a=s.length?s:t("#mCSB_"+r.idx+"_container"),l=[t("#mCSB_"+r.idx+"_scrollbar_vertical"),t("#mCSB_"+r.idx+"_scrollbar_horizontal")],c=[l[0].find(".mCSB_dragger"),l[1].find(".mCSB_dragger")];"x"!==o.axis&&(r.overflowed[0]&&!e?(l[0].add(c[0]).add(l[0].children("a")).css("display","block"),a.removeClass(h[8]+" "+h[10])):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&c[0].css("display","none"),a.removeClass(h[10])):(l[0].css("display","none"),a.addClass(h[10])),a.addClass(h[8]))),"y"!==o.axis&&(r.overflowed[1]&&!e?(l[1].add(c[1]).add(l[1].children("a")).css("display","block"),a.removeClass(h[9]+" "+h[11])):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&c[1].css("display","none"),a.removeClass(h[11])):(l[1].css("display","none"),a.addClass(h[11])),a.addClass(h[9]))),r.overflowed[0]||r.overflowed[1]?i.removeClass(h[5]):i.addClass(h[5])},M=function(e){var i=e.type,n=e.target.ownerDocument!==document&&null!==frameElement?[t(frameElement).offset().top,t(frameElement).offset().left]:null,r=F()&&e.target.ownerDocument!==top.document&&null!==frameElement?[t(e.view.frameElement).offset().top,t(e.view.frameElement).offset().left]:[0,0];switch(i){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return n?[e.originalEvent.pageY-n[0]+r[0],e.originalEvent.pageX-n[1]+r[1],!1]:[e.originalEvent.pageY,e.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var o=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],s=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return e.target.ownerDocument!==document?[o.screenY,o.screenX,s>1]:[o.pageY,o.pageX,s>1];default:return n?[e.pageY-n[0]+r[0],e.pageX-n[1]+r[1],!1]:[e.pageY,e.pageX,!1]}},E=function(){function e(t,e,n,r){if(p[0].idleTimer=h.scrollInertia<233?250:0,i.attr("id")===u[1])var o="x",l=(i[0].offsetLeft-e+r)*a.scrollRatio.x;else var o="y",l=(i[0].offsetTop-t+n)*a.scrollRatio.y;K(s,l.toString(),{dir:o,drag:!0})}var i,r,o,s=t(this),a=s.data(n),h=a.opt,d=n+"_"+a.idx,u=["mCSB_"+a.idx+"_dragger_vertical","mCSB_"+a.idx+"_dragger_horizontal"],p=t("#mCSB_"+a.idx+"_container"),f=t("#"+u[0]+",#"+u[1]),m=h.advanced.releaseDraggableSelectors?f.add(t(h.advanced.releaseDraggableSelectors)):f,g=h.advanced.extraDraggableSelectors?t(!F()||top.document).add(t(h.advanced.extraDraggableSelectors)):t(!F()||top.document);f.bind("contextmenu."+d,function(t){t.preventDefault()}).bind("mousedown."+d+" touchstart."+d+" pointerdown."+d+" MSPointerDown."+d,function(e){if(e.stopImmediatePropagation(),e.preventDefault(),tt(e)){c=!0,l&&(document.onselectstart=function(){return!1}),L.call(p,!1),G(s);var n=(i=t(this)).offset(),a=M(e)[0]-n.top,d=M(e)[1]-n.left,u=i.height()+n.top,f=i.width()+n.left;u>a&&a>0&&f>d&&d>0&&(r=a,o=d),k(i,"active",h.autoExpandScrollbar)}}).bind("touchmove."+d,function(t){t.stopImmediatePropagation(),t.preventDefault();var n=i.offset(),s=M(t)[0]-n.top,a=M(t)[1]-n.left;e(r,o,s,a)}),t(document).add(g).bind("mousemove."+d+" pointermove."+d+" MSPointerMove."+d,function(t){if(i){var n=i.offset(),s=M(t)[0]-n.top,a=M(t)[1]-n.left;if(r===s&&o===a)return;e(r,o,s,a)}}).add(m).bind("mouseup."+d+" touchend."+d+" pointerup."+d+" MSPointerUp."+d,function(){i&&(k(i,"active",h.autoExpandScrollbar),i=null),c=!1,l&&(document.onselectstart=null),L.call(p,!0)})},P=function(){function i(t){if(!et(t)||c||M(t)[2])e=0;else{e=1,w=0,k=0,h=1,S.removeClass("mCS_touch_action");var i=E.offset();d=M(t)[0]-i.top,u=M(t)[1]-i.left,j=[M(t)[0],M(t)[1]]}}function r(t){if(et(t)&&!c&&!M(t)[2]&&(D.documentTouchScroll||t.preventDefault(),t.stopImmediatePropagation(),(!k||w)&&h)){g=Q();var e=A.offset(),i=M(t)[0]-e.top,n=M(t)[1]-e.left,r="mcsLinearOut";if(I.push(i),O.push(n),j[2]=Math.abs(M(t)[0]-j[0]),j[3]=Math.abs(M(t)[1]-j[1]),C.overflowed[0])var o=P[0].parent().height()-P[0].height(),s=d-i>0&&i-d>-o*C.scrollRatio.y&&(2*j[3]<j[2]||"yx"===D.axis);if(C.overflowed[1])var a=P[1].parent().width()-P[1].width(),p=u-n>0&&n-u>-a*C.scrollRatio.x&&(2*j[2]<j[3]||"yx"===D.axis);s||p?(H||t.preventDefault(),w=1):(k=1,S.addClass("mCS_touch_action")),H&&t.preventDefault(),_="yx"===D.axis?[d-i,u-n]:"x"===D.axis?[null,u-n]:[d-i,null],E[0].idleTimer=250,C.overflowed[0]&&l(_[0],N,r,"y","all",!0),C.overflowed[1]&&l(_[1],N,r,"x",L,!0)}}function o(t){if(!et(t)||c||M(t)[2])e=0;else{e=1,t.stopImmediatePropagation(),G(S),m=Q();var i=A.offset();p=M(t)[0]-i.top,f=M(t)[1]-i.left,I=[],O=[]}}function s(t){if(et(t)&&!c&&!M(t)[2]){h=0,t.stopImmediatePropagation(),w=0,k=0,v=Q();var e=A.offset(),i=M(t)[0]-e.top,n=M(t)[1]-e.left;if(!(v-g>30)){var r="mcsEaseOut",o=2.5>(b=1e3/(v-m)),s=o?[I[I.length-2],O[O.length-2]]:[0,0];y=o?[i-s[0],n-s[1]]:[i-p,n-f];var d=[Math.abs(y[0]),Math.abs(y[1])];b=o?[Math.abs(y[0]/4),Math.abs(y[1]/4)]:[b,b];var u=[Math.abs(E[0].offsetTop)-y[0]*a(d[0]/b[0],b[0]),Math.abs(E[0].offsetLeft)-y[1]*a(d[1]/b[1],b[1])];_="yx"===D.axis?[u[0],u[1]]:"x"===D.axis?[null,u[1]]:[u[0],null],x=[4*d[0]+D.scrollInertia,4*d[1]+D.scrollInertia];var S=parseInt(D.contentTouchScroll)||0;_[0]=d[0]>S?_[0]:0,_[1]=d[1]>S?_[1]:0,C.overflowed[0]&&l(_[0],x[0],r,"y",L,!1),C.overflowed[1]&&l(_[1],x[1],r,"x",L,!1)}}}function a(t,e){var i=[1.5*e,2*e,e/1.5,e/2];return t>90?e>4?i[0]:i[3]:t>60?e>3?i[3]:i[2]:t>30?e>8?i[1]:e>6?i[0]:e>4?e:i[2]:e>8?e:i[3]}function l(t,e,i,n,r,o){t&&K(S,t.toString(),{dur:e,scrollEasing:i,dir:n,overwrite:r,drag:o})}var h,d,u,p,f,m,g,v,y,b,_,x,w,k,S=t(this),C=S.data(n),D=C.opt,T=n+"_"+C.idx,A=t("#mCSB_"+C.idx),E=t("#mCSB_"+C.idx+"_container"),P=[t("#mCSB_"+C.idx+"_dragger_vertical"),t("#mCSB_"+C.idx+"_dragger_horizontal")],I=[],O=[],N=0,L="yx"===D.axis?"none":"all",j=[],R=E.find("iframe"),$=["touchstart."+T+" pointerdown."+T+" MSPointerDown."+T,"touchmove."+T+" pointermove."+T+" MSPointerMove."+T,"touchend."+T+" pointerup."+T+" MSPointerUp."+T],H=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;E.bind($[0],function(t){i(t)}).bind($[1],function(t){r(t)}),A.bind($[0],function(t){o(t)}).bind($[2],function(t){s(t)}),R.length&&R.each(function(){t(this).bind("load",function(){F(this)&&t(this.contentDocument||this.contentWindow.document).bind($[0],function(t){i(t),o(t)}).bind($[1],function(t){r(t)}).bind($[2],function(t){s(t)})})})},I=function(){function i(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function r(t,e,i){h.type=i&&o?"stepped":"stepless",h.scrollAmount=10,U(s,t,e,"mcsLinearOut",i?60:null)}var o,s=t(this),a=s.data(n),l=a.opt,h=a.sequential,d=n+"_"+a.idx,u=t("#mCSB_"+a.idx+"_container"),p=u.parent();u.bind("mousedown."+d,function(){e||o||(o=1,c=!0)}).add(document).bind("mousemove."+d,function(t){if(!e&&o&&i()){var n=u.offset(),s=M(t)[0]-n.top+u[0].offsetTop,c=M(t)[1]-n.left+u[0].offsetLeft;s>0&&s<p.height()&&c>0&&c<p.width()?h.step&&r("off",null,"stepped"):("x"!==l.axis&&a.overflowed[0]&&(0>s?r("on",38):s>p.height()&&r("on",40)),"y"!==l.axis&&a.overflowed[1]&&(0>c?r("on",37):c>p.width()&&r("on",39)))}}).bind("mouseup."+d+" dragend."+d,function(){e||(o&&(o=0,r("off",null)),c=!1)})},O=function(){function e(e,n){if(G(i),!j(i,e.target)){var s="auto"!==o.mouseWheel.deltaFactor?parseInt(o.mouseWheel.deltaFactor):l&&e.deltaFactor<100?100:e.deltaFactor||100,h=o.scrollInertia;if("x"===o.axis||"x"===o.mouseWheel.axis)var d="x",u=[Math.round(s*r.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)],p="auto"!==o.mouseWheel.scrollAmount?u[1]:u[0]>=a.width()?.9*a.width():u[0],f=Math.abs(t("#mCSB_"+r.idx+"_container")[0].offsetLeft),m=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===o.mouseWheel.axis?e.deltaY||n:e.deltaX;else var d="y",u=[Math.round(s*r.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)],p="auto"!==o.mouseWheel.scrollAmount?u[1]:u[0]>=a.height()?.9*a.height():u[0],f=Math.abs(t("#mCSB_"+r.idx+"_container")[0].offsetTop),m=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=e.deltaY||n;"y"===d&&!r.overflowed[0]||"x"===d&&!r.overflowed[1]||((o.mouseWheel.invert||e.webkitDirectionInvertedFromDevice)&&(v=-v),o.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==m||0>v&&m!==g||o.mouseWheel.preventDefault)&&(e.stopImmediatePropagation(),e.preventDefault()),e.deltaFactor<5&&!o.mouseWheel.normalizeDelta&&(p=e.deltaFactor,h=17),K(i,(f-v*p).toString(),{dir:d,dur:h}))}}if(t(this).data(n)){var i=t(this),r=i.data(n),o=r.opt,s=n+"_"+r.idx,a=t("#mCSB_"+r.idx),c=[t("#mCSB_"+r.idx+"_dragger_vertical"),t("#mCSB_"+r.idx+"_dragger_horizontal")],h=t("#mCSB_"+r.idx+"_container").find("iframe");h.length&&h.each(function(){t(this).bind("load",function(){F(this)&&t(this.contentDocument||this.contentWindow.document).bind("mousewheel."+s,function(t,i){e(t,i)})})}),a.bind("mousewheel."+s,function(t,i){e(t,i)})}},N=new Object,F=function(e){var i=!1,n=!1,r=null;if(void 0===e?n="#empty":void 0!==t(e).attr("id")&&(n=t(e).attr("id")),!1!==n&&void 0!==N[n])return N[n];if(e){try{r=(o=e.contentDocument||e.contentWindow.document).body.innerHTML}catch(t){}i=null!==r}else{try{var o=top.document;r=o.body.innerHTML}catch(t){}i=null!==r}return!1!==n&&(N[n]=i),i},L=function(t){var e=this.find("iframe");if(e.length){var i=t?"auto":"none";e.css("pointer-events",i)}},j=function(e,i){var r=i.nodeName.toLowerCase(),o=e.data(n).opt.mouseWheel.disableOver,s=["select","textarea"];return t.inArray(r,o)>-1&&!(t.inArray(r,s)>-1&&!t(i).is(":focus"))},R=function(){var e,i=t(this),r=i.data(n),o=n+"_"+r.idx,s=t("#mCSB_"+r.idx+"_container"),a=s.parent();t(".mCSB_"+r.idx+"_scrollbar ."+h[12]).bind("mousedown."+o+" touchstart."+o+" pointerdown."+o+" MSPointerDown."+o,function(i){c=!0,t(i.target).hasClass("mCSB_dragger")||(e=1)}).bind("touchend."+o+" pointerup."+o+" MSPointerUp."+o,function(){c=!1}).bind("click."+o,function(n){if(e&&(e=0,t(n.target).hasClass(h[12])||t(n.target).hasClass("mCSB_draggerRail"))){G(i);var o=t(this),l=o.find(".mCSB_dragger");if(o.parent(".mCSB_scrollTools_horizontal").length>0){if(!r.overflowed[1])return;var c="x",d=n.pageX>l.offset().left?-1:1,u=Math.abs(s[0].offsetLeft)-d*(.9*a.width())}else{if(!r.overflowed[0])return;var c="y",d=n.pageY>l.offset().top?-1:1,u=Math.abs(s[0].offsetTop)-d*(.9*a.height())}K(i,u.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},$=function(){var e=t(this),i=e.data(n),r=i.opt,o=n+"_"+i.idx,s=t("#mCSB_"+i.idx+"_container"),a=s.parent();s.bind("focusin."+o,function(){var i=t(document.activeElement),n=s.find(".mCustomScrollBox").length;i.is(r.advanced.autoScrollOnFocus)&&(G(e),clearTimeout(e[0]._focusTimeout),e[0]._focusTimer=n?17*n:0,e[0]._focusTimeout=setTimeout(function(){var t=[nt(i)[0],nt(i)[1]],n=[s[0].offsetTop,s[0].offsetLeft],o=[n[0]+t[0]>=0&&n[0]+t[0]<a.height()-i.outerHeight(!1),n[1]+t[1]>=0&&n[0]+t[1]<a.width()-i.outerWidth(!1)],l="yx"!==r.axis||o[0]||o[1]?"all":"none";"x"===r.axis||o[0]||K(e,t[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:l,dur:0}),"y"===r.axis||o[1]||K(e,t[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:l,dur:0})},e[0]._focusTimer))})},H=function(){var e=t(this).data(n),i=n+"_"+e.idx,r=t("#mCSB_"+e.idx+"_container").parent();r.bind("scroll."+i,function(){0===r.scrollTop()&&0===r.scrollLeft()||t(".mCSB_"+e.idx+"_scrollbar").css("visibility","hidden")})},B=function(){var e=t(this),i=e.data(n),r=i.opt,o=i.sequential,s=n+"_"+i.idx,a=".mCSB_"+i.idx+"_scrollbar";t(a+">a").bind("contextmenu."+s,function(t){t.preventDefault()}).bind("mousedown."+s+" touchstart."+s+" pointerdown."+s+" MSPointerDown."+s+" mouseup."+s+" touchend."+s+" pointerup."+s+" MSPointerUp."+s+" mouseout."+s+" pointerout."+s+" MSPointerOut."+s+" click."+s,function(n){function s(t,i){o.scrollAmount=r.scrollButtons.scrollAmount,U(e,t,i)}if(n.preventDefault(),tt(n)){var a=t(this).attr("class");switch(o.type=r.scrollButtons.scrollType,n.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===o.type)return;c=!0,i.tweenRunning=!1,s("on",a);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===o.type)return;c=!1,o.dir&&s("off",a);break;case"click":if("stepped"!==o.type||i.tweenRunning)return;s("on",a)}}})},z=function(){function e(e){function n(t,e){s.type=o.keyboard.scrollType,s.scrollAmount=o.keyboard.scrollAmount,"stepped"===s.type&&r.tweenRunning||U(i,t,e)}switch(e.type){case"blur":r.tweenRunning&&s.dir&&n("off",null);break;case"keydown":case"keyup":var a=e.keyCode?e.keyCode:e.which,l="on";if("x"!==o.axis&&(38===a||40===a)||"y"!==o.axis&&(37===a||39===a)){if((38===a||40===a)&&!r.overflowed[0]||(37===a||39===a)&&!r.overflowed[1])return;"keyup"===e.type&&(l="off"),t(document.activeElement).is(d)||(e.preventDefault(),e.stopImmediatePropagation(),n(l,a))}else if(33===a||34===a){if((r.overflowed[0]||r.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type){G(i);var u=34===a?-1:1;if("x"===o.axis||"yx"===o.axis&&r.overflowed[1]&&!r.overflowed[0])var p="x",f=Math.abs(c[0].offsetLeft)-u*(.9*h.width());else var p="y",f=Math.abs(c[0].offsetTop)-u*(.9*h.height());K(i,f.toString(),{dir:p,scrollEasing:"mcsEaseInOut"})}}else if((35===a||36===a)&&!t(document.activeElement).is(d)&&((r.overflowed[0]||r.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type)){if("x"===o.axis||"yx"===o.axis&&r.overflowed[1]&&!r.overflowed[0])var p="x",f=35===a?Math.abs(h.width()-c.outerWidth(!1)):0;else var p="y",f=35===a?Math.abs(h.height()-c.outerHeight(!1)):0;K(i,f.toString(),{dir:p,scrollEasing:"mcsEaseInOut"})}}}var i=t(this),r=i.data(n),o=r.opt,s=r.sequential,a=n+"_"+r.idx,l=t("#mCSB_"+r.idx),c=t("#mCSB_"+r.idx+"_container"),h=c.parent(),d="input,textarea,select,datalist,keygen,[contenteditable='true']",u=c.find("iframe"),p=["blur."+a+" keydown."+a+" keyup."+a];u.length&&u.each(function(){t(this).bind("load",function(){F(this)&&t(this.contentDocument||this.contentWindow.document).bind(p[0],function(t){e(t)})})}),l.attr("tabindex","0").bind(p[0],function(t){e(t)})},U=function(e,i,r,o,s){function a(t){c.snapAmount&&(d.scrollAmount=c.snapAmount instanceof Array?"x"===d.dir[0]?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount);var i="stepped"!==d.type,n=s||(t?i?f/1.5:m:1e3/60),r=t?i?7.5:40:2.5,h=[Math.abs(u[0].offsetTop),Math.abs(u[0].offsetLeft)],p=[l.scrollRatio.y>10?10:l.scrollRatio.y,l.scrollRatio.x>10?10:l.scrollRatio.x],g="x"===d.dir[0]?h[1]+d.dir[1]*(p[1]*r):h[0]+d.dir[1]*(p[0]*r),v="x"===d.dir[0]?h[1]+d.dir[1]*parseInt(d.scrollAmount):h[0]+d.dir[1]*parseInt(d.scrollAmount),y="auto"!==d.scrollAmount?v:g,b=o||(t?i?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),_=!!t;return t&&17>n&&(y="x"===d.dir[0]?h[1]:h[0]),K(e,y.toString(),{dir:d.dir[0],scrollEasing:b,dur:n,onComplete:_}),t?void(d.dir=!1):(clearTimeout(d.step),void(d.step=setTimeout(function(){a()},n)))}var l=e.data(n),c=l.opt,d=l.sequential,u=t("#mCSB_"+l.idx+"_container"),p="stepped"===d.type,f=c.scrollInertia<26?26:c.scrollInertia,m=c.scrollInertia<1?17:c.scrollInertia;switch(i){case"on":if(d.dir=[r===h[16]||r===h[15]||39===r||37===r?"x":"y",r===h[13]||r===h[15]||38===r||37===r?-1:1],G(e),it(r)&&"stepped"===d.type)return;a(p);break;case"off":clearTimeout(d.step),J(d,"step"),G(e),(p||l.tweenRunning&&d.dir)&&a(!0)}},W=function(e){var i=t(this).data(n).opt,r=[];return"function"==typeof e&&(e=e()),e instanceof Array?r=e.length>1?[e[0],e[1]]:"x"===i.axis?[null,e[0]]:[e[0],null]:(r[0]=e.y?e.y:e.x||"x"===i.axis?null:e,r[1]=e.x?e.x:e.y||"y"===i.axis?null:e),"function"==typeof r[0]&&(r[0]=r[0]()),"function"==typeof r[1]&&(r[1]=r[1]()),r},Y=function(e,i){if(null!=e&&void 0!==e){var r=t(this),o=r.data(n),s=o.opt,a=t("#mCSB_"+o.idx+"_container"),l=a.parent(),c=typeof e;i||(i="x"===s.axis?"x":"y");var h="x"===i?a.outerWidth(!1)-l.width():a.outerHeight(!1)-l.height(),u="x"===i?a[0].offsetLeft:a[0].offsetTop,p="x"===i?"left":"top";switch(c){case"function":return e();case"object":if(!(m=e.jquery?e:t(e)).length)return;return"x"===i?nt(m)[1]:nt(m)[0];case"string":case"number":if(it(e))return Math.abs(e);if(-1!==e.indexOf("%"))return Math.abs(h*parseInt(e)/100);if(-1!==e.indexOf("-="))return Math.abs(u-parseInt(e.split("-=")[1]));if(-1!==e.indexOf("+=")){var f=u+parseInt(e.split("+=")[1]);return f>=0?0:Math.abs(f)}if(-1!==e.indexOf("px")&&it(e.split("px")[0]))return Math.abs(e.split("px")[0]);if("top"===e||"left"===e)return 0;if("bottom"===e)return Math.abs(l.height()-a.outerHeight(!1));if("right"===e)return Math.abs(l.width()-a.outerWidth(!1));if("first"===e||"last"===e){var m=a.find(":"+e);return"x"===i?nt(m)[1]:nt(m)[0]}return t(e).length?"x"===i?nt(t(e))[1]:nt(t(e))[0]:(a.css(p,e),void d.update.call(null,r[0]))}}},V=function(e){function i(){return clearTimeout(u[0].autoUpdate),0===a.parents("html").length?void(a=null):void(u[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(l.poll.change.n=o(),l.poll.change.n!==l.poll.change.o)?(l.poll.change.o=l.poll.change.n,void s(3)):c.advanced.updateOnContentResize&&(l.poll.size.n=a[0].scrollHeight+a[0].scrollWidth+u[0].offsetHeight+a[0].offsetHeight+a[0].offsetWidth,l.poll.size.n!==l.poll.size.o)?(l.poll.size.o=l.poll.size.n,void s(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(l.poll.img.n=u.find("img").length,l.poll.img.n===l.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&i()):(l.poll.img.o=l.poll.img.n,void u.find("img").each(function(){r(this)}))},c.advanced.autoUpdateTimeout))}function r(e){if(t(e).hasClass(h[2]))s();else{var i=new Image;i.onload=function(t,e){return function(){return e.apply(t,arguments)}}(i,function(){this.onload=null,t(e).addClass(h[2]),s(2)}),i.src=e.src}}function o(){!0===c.advanced.updateOnSelectorChange&&(c.advanced.updateOnSelectorChange="*");var t=0,e=u.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&e.length>0&&e.each(function(){t+=this.offsetHeight+this.offsetWidth}),t}function s(t){clearTimeout(u[0].autoUpdate),d.update.call(null,a[0],t)}var a=t(this),l=a.data(n),c=l.opt,u=t("#mCSB_"+l.idx+"_container");return e?(clearTimeout(u[0].autoUpdate),void J(u[0],"autoUpdate")):void i()},q=function(t,e,i){return Math.round(t/e)*e-i},G=function(e){var i=e.data(n);t("#mCSB_"+i.idx+"_container,#mCSB_"+i.idx+"_container_wrapper,#mCSB_"+i.idx+"_dragger_vertical,#mCSB_"+i.idx+"_dragger_horizontal").each(function(){Z.call(this)})},K=function(e,i,r){function o(t){return l&&c.callbacks[t]&&"function"==typeof c.callbacks[t]}function s(){return[c.callbacks.alwaysTriggerOffsets||_>=x[0]+S,c.callbacks.alwaysTriggerOffsets||-C>=_]}function a(){var t=[p[0].offsetTop,p[0].offsetLeft],i=[y[0].offsetTop,y[0].offsetLeft],n=[p.outerHeight(!1),p.outerWidth(!1)],o=[u.height(),u.width()];e[0].mcs={content:p,top:t[0],left:t[1],draggerTop:i[0],draggerLeft:i[1],topPct:Math.round(100*Math.abs(t[0])/(Math.abs(n[0])-o[0])),leftPct:Math.round(100*Math.abs(t[1])/(Math.abs(n[1])-o[1])),direction:r.dir}}var l=e.data(n),c=l.opt,h={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},d=[(r=t.extend(h,r)).dur,r.drag?0:r.dur],u=t("#mCSB_"+l.idx),p=t("#mCSB_"+l.idx+"_container"),f=p.parent(),m=c.callbacks.onTotalScrollOffset?W.call(e,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?W.call(e,c.callbacks.onTotalScrollBackOffset):[0,0];if(l.trigger=r.trigger,0===f.scrollTop()&&0===f.scrollLeft()||(t(".mCSB_"+l.idx+"_scrollbar").css("visibility","visible"),f.scrollTop(0).scrollLeft(0)),"_resetY"!==i||l.contentReset.y||(o("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(e[0]),l.contentReset.y=1),"_resetX"!==i||l.contentReset.x||(o("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(e[0]),l.contentReset.x=1),"_resetY"!==i&&"_resetX"!==i){if(!l.contentReset.y&&e[0].mcs||!l.overflowed[0]||(o("onOverflowY")&&c.callbacks.onOverflowY.call(e[0]),l.contentReset.x=null),!l.contentReset.x&&e[0].mcs||!l.overflowed[1]||(o("onOverflowX")&&c.callbacks.onOverflowX.call(e[0]),l.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===r.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;i=q(i,v,c.snapOffset)}switch(r.dir){case"x":var y=t("#mCSB_"+l.idx+"_dragger_horizontal"),b="left",_=p[0].offsetLeft,x=[u.width()-p.outerWidth(!1),y.parent().width()-y.width()],w=[i,0===i?0:i/l.scrollRatio.x],S=m[1],C=g[1],D=S>0?S/l.scrollRatio.x:0,T=C>0?C/l.scrollRatio.x:0;break;case"y":var y=t("#mCSB_"+l.idx+"_dragger_vertical"),b="top",_=p[0].offsetTop,x=[u.height()-p.outerHeight(!1),y.parent().height()-y.height()],w=[i,0===i?0:i/l.scrollRatio.y],S=m[0],C=g[0],D=S>0?S/l.scrollRatio.y:0,T=C>0?C/l.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=x[1]?w=[x[0],x[1]]:w[0]=-w[0],e[0].mcs||(a(),o("onInit")&&c.callbacks.onInit.call(e[0])),clearTimeout(p[0].onCompleteTimeout),X(y[0],b,Math.round(w[1]),d[1],r.scrollEasing),!l.tweenRunning&&(0===_&&w[0]>=0||_===x[0]&&w[0]<=x[0])||X(p[0],b,Math.round(w[0]),d[0],r.scrollEasing,r.overwrite,{onStart:function(){r.callbacks&&r.onStart&&!l.tweenRunning&&(o("onScrollStart")&&(a(),c.callbacks.onScrollStart.call(e[0])),l.tweenRunning=!0,k(y),l.cbOffsets=s())},onUpdate:function(){r.callbacks&&r.onUpdate&&o("whileScrolling")&&(a(),c.callbacks.whileScrolling.call(e[0]))},onComplete:function(){if(r.callbacks&&r.onComplete){"yx"===c.axis&&clearTimeout(p[0].onCompleteTimeout);var t=p[0].idleTimer||0;p[0].onCompleteTimeout=setTimeout(function(){o("onScroll")&&(a(),c.callbacks.onScroll.call(e[0])),o("onTotalScroll")&&w[1]>=x[1]-D&&l.cbOffsets[0]&&(a(),c.callbacks.onTotalScroll.call(e[0])),o("onTotalScrollBack")&&w[1]<=T&&l.cbOffsets[1]&&(a(),c.callbacks.onTotalScrollBack.call(e[0])),l.tweenRunning=!1,p[0].idleTimer=0,k(y,"hide")},t)}}})}},X=function(t,e,i,n,r,o,s){function a(){b.stop||(g||u.call(),g=Q()-m,l(),g>=b.time&&(b.time=g>b.time?g+h-(g-b.time):g+h-1,b.time<g+1&&(b.time=g+1)),b.time<n?b.id=d(a):f.call())}function l(){n>0?(b.currVal=c(b.time,v,_,n,r),y[e]=Math.round(b.currVal)+"px"):y[e]=i+"px",p.call()}function c(t,e,i,n,r){switch(r){case"linear":case"mcsLinear":return i*t/n+e;case"mcsLinearOut":return t/=n,t--,i*Math.sqrt(1-t*t)+e;case"easeInOutSmooth":return 1>(t/=n/2)?i/2*t*t+e:(t--,-i/2*(t*(t-2)-1)+e);case"easeInOutStrong":return 1>(t/=n/2)?i/2*Math.pow(2,10*(t-1))+e:(t--,i/2*(2-Math.pow(2,-10*t))+e);case"easeInOut":case"mcsEaseInOut":return 1>(t/=n/2)?i/2*t*t*t+e:(t-=2,i/2*(t*t*t+2)+e);case"easeOutSmooth":return t/=n,t--,-i*(t*t*t*t-1)+e;case"easeOutStrong":return i*(1-Math.pow(2,-10*t/n))+e;case"easeOut":case"mcsEaseOut":default:var o=(t/=n)*t,s=o*t;return e+i*(.499999999999997*s*o+-2.5*o*o+5.5*s+-6.5*o+4*t)}}t._mTween||(t._mTween={top:{},left:{}});var h,d,u=(s=s||{}).onStart||function(){},p=s.onUpdate||function(){},f=s.onComplete||function(){},m=Q(),g=0,v=t.offsetTop,y=t.style,b=t._mTween[e];"left"===e&&(v=t.offsetLeft);var _=i-v;b.stop=0,"none"!==o&&null!=b.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(b.id):clearTimeout(b.id),b.id=null),h=1e3/60,b.time=g+h,d=window.requestAnimationFrame?window.requestAnimationFrame:function(t){return l(),setTimeout(t,.01)},b.id=d(a)},Q=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var t=this;t._mTween||(t._mTween={top:{},left:{}});for(var e=["top","left"],i=0;i<e.length;i++){var n=e[i];t._mTween[n].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(t._mTween[n].id):clearTimeout(t._mTween[n].id),t._mTween[n].id=null,t._mTween[n].stop=1)}},J=function(t,e){try{delete t[e]}catch(i){t[e]=null}},tt=function(t){return!(t.which&&1!==t.which)},et=function(t){var e=t.originalEvent.pointerType;return!(e&&"touch"!==e&&2!==e)},it=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},nt=function(t){var e=t.parents(".mCSB_container");return[t.offset().top-e.offset().top,t.offset().left-e.offset().left]},rt=function(){var t=function(){var t=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var e=0;e<t.length;e++)if(t[e]+"Hidden"in document)return t[e]+"Hidden";return null}();return!!t&&document[t]};t.fn[i]=function(e){return d[e]?d[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist"):d.init.apply(this,arguments)},t[i]=function(e){return d[e]?d[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist"):d.init.apply(this,arguments)},t[i].defaults=o,window[i]=!0,t(window).bind("load",function(){t(r)[i](),t.extend(t.expr[":"],{mcsInView:t.expr[":"].mcsInView||function(e){var i,n,r=t(e),o=r.parents(".mCSB_container");if(o.length)return i=o.parent(),(n=[o[0].offsetTop,o[0].offsetLeft])[0]+nt(r)[0]>=0&&n[0]+nt(r)[0]<i.height()-r.outerHeight(!1)&&n[1]+nt(r)[1]>=0&&n[1]+nt(r)[1]<i.width()-r.outerWidth(!1)},mcsInSight:t.expr[":"].mcsInSight||function(e,i,n){var r,o,s,a,l=t(e),c=l.parents(".mCSB_container"),h="exact"===n[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return r=[l.outerHeight(!1),l.outerWidth(!1)],s=[c[0].offsetTop+nt(l)[0],c[0].offsetLeft+nt(l)[1]],o=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],a=[r[0]<o[0]?h[0]:h[1],r[1]<o[1]?h[0]:h[1]],s[0]-o[0]*a[0][0]<0&&s[0]+r[0]-o[0]*a[0][1]>=0&&s[1]-o[1]*a[1][0]<0&&s[1]+r[1]-o[1]*a[1][1]>=0},mcsOverflow:t.expr[":"].mcsOverflow||function(e){var i=t(e).data(n);if(i)return i.overflowed[0]||i.overflowed[1]}})})})}),function(){"use strict";function t(t){function e(e,n){var o,m,g=e==window,v=n&&void 0!==n.message?n.message:void 0;if(!(n=t.extend({},t.blockUI.defaults,n||{})).ignoreIfBlocked||!t(e).data("blockUI.isBlocked")){if(n.overlayCSS=t.extend({},t.blockUI.defaults.overlayCSS,n.overlayCSS||{}),o=t.extend({},t.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),m=t.extend({},t.blockUI.defaults.themedCSS,n.themedCSS||{}),v=void 0===v?n.message:v,g&&p&&i(window,{fadeOut:0}),v&&"string"!=typeof v&&(v.parentNode||v.jquery)){var y=v.jquery?v[0]:v,b={};t(e).data("blockUI.history",b),b.el=y,b.parent=y.parentNode,b.display=y.style.display,b.position=y.style.position,b.parent&&b.parent.removeChild(y)}t(e).data("blockUI.onUnblock",n.onUnblock);var _,x,w,k,S=n.baseZ;_=t(h||n.forceIframe?'<iframe class="blockUI" style="z-index:'+S+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+n.iframeSrc+'"></iframe>':'<div class="blockUI" style="display:none"></div>'),x=t(n.theme?'<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+S+++';display:none"></div>':'<div class="blockUI blockOverlay" style="z-index:'+S+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),n.theme&&g?(k='<div class="blockUI '+n.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(S+10)+';display:none;position:fixed">',n.title&&(k+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(n.title||"&nbsp;")+"</div>"),k+='<div class="ui-widget-content ui-dialog-content"></div>',k+="</div>"):n.theme?(k='<div class="blockUI '+n.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(S+10)+';display:none;position:absolute">',n.title&&(k+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(n.title||"&nbsp;")+"</div>"),k+='<div class="ui-widget-content ui-dialog-content"></div>',k+="</div>"):k=g?'<div class="blockUI '+n.blockMsgClass+' blockPage" style="z-index:'+(S+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+n.blockMsgClass+' blockElement" style="z-index:'+(S+10)+';display:none;position:absolute"></div>',w=t(k),v&&(n.theme?(w.css(m),w.addClass("ui-widget-content")):w.css(o)),n.theme||x.css(n.overlayCSS),x.css("position",g?"fixed":"absolute"),(h||n.forceIframe)&&_.css("opacity",0);var C=[_,x,w],D=t(g?"body":e);t.each(C,function(){this.appendTo(D)}),n.theme&&n.draggable&&t.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var T=u&&(!t.support.boxModel||t("object,embed",g?null:e).length>0);if(d||T){if(g&&n.allowBodyStretch&&t.support.boxModel&&t("html,body").css("height","100%"),(d||!t.support.boxModel)&&!g)var A=l(e,"borderTopWidth"),M=l(e,"borderLeftWidth"),E=A?"(0 - "+A+")":0,P=M?"(0 - "+M+")":0;t.each(C,function(t,e){var i=e[0].style;if(i.position="absolute",t<2)g?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),g?i.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),P&&i.setExpression("left",P),E&&i.setExpression("top",E);else if(n.centerY)g&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0;else if(!n.centerY&&g){var r="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(n.css&&n.css.top?parseInt(n.css.top,10):0)+') + "px"';i.setExpression("top",r)}})}if(v&&(n.theme?w.find(".ui-widget-content").append(v):w.append(v),(v.jquery||v.nodeType)&&t(v).show()),(h||n.forceIframe)&&n.showOverlay&&_.show(),n.fadeIn){var I=n.onBlock?n.onBlock:c,O=n.showOverlay&&!v?I:c,N=v?I:c;n.showOverlay&&x._fadeIn(n.fadeIn,O),v&&w._fadeIn(n.fadeIn,N)}else n.showOverlay&&x.show(),v&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(r(1,e,n),g?(p=w[0],f=t(n.focusableElements,p),n.focusInput&&setTimeout(s,20)):a(w[0],n.centerX,n.centerY),n.timeout){var F=setTimeout(function(){g?t.unblockUI(n):t(e).unblock(n)},n.timeout);t(e).data("blockUI.timeout",F)}}}function i(e,i){var o,s=e==window,a=t(e),l=a.data("blockUI.history"),c=a.data("blockUI.timeout");c&&(clearTimeout(c),a.removeData("blockUI.timeout")),i=t.extend({},t.blockUI.defaults,i||{}),r(0,e,i),null===i.onUnblock&&(i.onUnblock=a.data("blockUI.onUnblock"),a.removeData("blockUI.onUnblock"));var h;h=s?t("body").children().filter(".blockUI").add("body > .blockUI"):a.find(">.blockUI"),i.cursorReset&&(h.length>1&&(h[1].style.cursor=i.cursorReset),h.length>2&&(h[2].style.cursor=i.cursorReset)),s&&(p=f=null),i.fadeOut?(o=h.length,h.stop().fadeOut(i.fadeOut,function(){0==--o&&n(h,l,i,e)})):n(h,l,i,e)}function n(e,i,n,r){var o=t(r);if(!o.data("blockUI.isBlocked")){e.each(function(t,e){this.parentNode&&this.parentNode.removeChild(this)}),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.el.style.cursor="default",i.parent&&i.parent.appendChild(i.el),o.removeData("blockUI.history")),o.data("blockUI.static")&&o.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(r,n);var s=t(document.body),a=s.width(),l=s[0].style.width;s.width(a-1).width(a),s[0].style.width=l}}function r(e,i,n){var r=i==window,s=t(i);if((e||(!r||p)&&(r||s.data("blockUI.isBlocked")))&&(s.data("blockUI.isBlocked",e),r&&n.bindEvents&&(!e||n.showOverlay))){var a="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";e?t(document).bind(a,n,o):t(document).unbind(a,o)}}function o(e){if("keydown"===e.type&&e.keyCode&&9==e.keyCode&&p&&e.data.constrainTabKey){var i=f,n=!e.shiftKey&&e.target===i[i.length-1],r=e.shiftKey&&e.target===i[0];if(n||r)return setTimeout(function(){s(r)},10),!1}var o=e.data,a=t(e.target);return a.hasClass("blockOverlay")&&o.onOverlayClick&&o.onOverlayClick(e),a.parents("div."+o.blockMsgClass).length>0||0===a.parents().children().filter("div.blockUI").length}function s(t){if(f){var e=f[!0===t?f.length-1:0];e&&e.focus()}}function a(t,e,i){var n=t.parentNode,r=t.style,o=(n.offsetWidth-t.offsetWidth)/2-l(n,"borderLeftWidth"),s=(n.offsetHeight-t.offsetHeight)/2-l(n,"borderTopWidth");e&&(r.left=o>0?o+"px":"0"),i&&(r.top=s>0?s+"px":"0")}function l(e,i){return parseInt(t.css(e,i),10)||0}t.fn._fadeIn=t.fn.fadeIn;var c=t.noop||function(){},h=/MSIE/.test(navigator.userAgent),d=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),u=(document.documentMode,t.isFunction(document.createElement("div").style.setExpression));t.blockUI=function(t){e(window,t)},t.unblockUI=function(t){i(window,t)},t.growlUI=function(e,i,n,r){var o=t('<div class="growlUI"></div>');e&&o.append("<h1>"+e+"</h1>"),i&&o.append("<h2>"+i+"</h2>"),void 0===n&&(n=3e3);var s=function(e){e=e||{},t.blockUI({message:o,fadeIn:void 0!==e.fadeIn?e.fadeIn:700,fadeOut:void 0!==e.fadeOut?e.fadeOut:1e3,timeout:void 0!==e.timeout?e.timeout:n,centerY:!1,showOverlay:!1,onUnblock:r,css:t.blockUI.defaults.growlCSS})};s();o.css("opacity");o.mouseover(function(){s({fadeIn:0,timeout:3e4});var e=t(".blockMsg");e.stop(),e.fadeTo(300,1)}).mouseout(function(){t(".blockMsg").fadeOut(1e3)})},t.fn.block=function(i){if(this[0]===window)return t.blockUI(i),this;var n=t.extend({},t.blockUI.defaults,i||{});return this.each(function(){var e=t(this);n.ignoreIfBlocked&&e.data("blockUI.isBlocked")||e.unblock({fadeOut:0})}),this.each(function(){"static"==t.css(this,"position")&&(this.style.position="relative",t(this).data("blockUI.static",!0)),this.style.zoom=1,e(this,i)})},t.fn.unblock=function(e){return this[0]===window?(t.unblockUI(e),this):this.each(function(){i(this,e)})},t.blockUI.version=2.7,t.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var p=null,f=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],t):t(jQuery)}(),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):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 r(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)}}function s(t){return t&&!isNaN(t.getTime())}function a(e,i){var n,r=t(e).data(),o={},s=new RegExp("^"+i.toLowerCase()+"([A-Z])");i=new RegExp("^"+i.toLowerCase());for(var a in r)i.test(a)&&(n=a.replace(s,function(t,e){return e.toLowerCase()}),o[n]=r[a]);return o}function l(e){var i={};if(g[e]||(e=e.split("-")[0],g[e])){var n=g[e];return t.each(m,function(t,e){e in n&&(i[e]=n[e])}),i}}var c=function(){var e={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 c;return t.replace(this),t}};return function(){var i=[];return i.push.apply(i,arguments),t.extend(i,e),i}}(),h=function(e,i){t.data(e,"datepicker",this),this._process_options(i),this.dates=new c,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, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=t(v.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()};h.prototype={constructor:h,_resolveViewName:function(e){return t.each(v.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 r=this.o=t.extend({},this._o),o=r.language;g[o]||(o=o.split("-")[0],g[o]||(o=f.language)),r.language=o,r.startView=this._resolveViewName(r.startView),r.minViewMode=this._resolveViewName(r.minViewMode),r.maxViewMode=this._resolveViewName(r.maxViewMode),r.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,r.startView)),!0!==r.multidate&&(r.multidate=Number(r.multidate)||!1,!1!==r.multidate&&(r.multidate=Math.max(0,r.multidate))),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-1/0&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language,r.assumeNearbyYear):r.startDate=-1/0),r.endDate!==1/0&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language,r.assumeNearbyYear):r.endDate=1/0),r.daysOfWeekDisabled=this._resolveDaysOfWeek(r.daysOfWeekDisabled||[]),r.daysOfWeekHighlighted=this._resolveDaysOfWeek(r.daysOfWeekHighlighted||[]),r.datesDisabled=r.datesDisabled||[],t.isArray(r.datesDisabled)||(r.datesDisabled=r.datesDisabled.split(",")),r.datesDisabled=t.map(r.datesDisabled,function(t){return v.parseDate(t,s,r.language,r.assumeNearbyYear)});var a=String(r.orientation).toLowerCase().split(/\s+/g),l=r.orientation.toLowerCase();if(a=t.grep(a,function(t){return/^auto|left|right|top|bottom$/.test(t)}),r.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===a.length)switch(a[0]){case"top":case"bottom":r.orientation.y=a[0];break;case"left":case"right":r.orientation.x=a[0]}else l=t.grep(a,function(t){return/^left|right$/.test(t)}),r.orientation.x=l[0]||"auto",l=t.grep(a,function(t){return/^top|bottom$/.test(t)}),r.orientation.y=l[0]||"auto";if(r.defaultViewDate instanceof Date||"string"==typeof r.defaultViewDate)r.defaultViewDate=v.parseDate(r.defaultViewDate,s,r.language,r.assumeNearbyYear);else if(r.defaultViewDate){var c=r.defaultViewDate.year||(new Date).getFullYear(),h=r.defaultViewDate.month||0,d=r.defaultViewDate.day||1;r.defaultViewDate=i(c,h,d)}else r.defaultViewDate=n()},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var i,n,r,o=0;o<t.length;o++)i=t[o][0],2===t[o].length?(n=e,r=t[o][1]):3===t[o].length&&(n=t[o][1],r=t[o][2]),i.on(r,n)},_unapplyEvents:function(t){for(var i,n,r,o=0;o<t.length;o++)i=t[o][0],2===t[o].length?(r=e,n=t[o][1]):3===t[o].length&&(r=t[o][1],n=t[o][2]),i.off(n,r)},_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),r=this._utc_to_local(n);this.element.trigger({type:e,date:r,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 v.formatDate(i,e,this.o.language)},this)})},show:function(){if(!(this.inputField.prop("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 v.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),r=n.width(),o="body"===this.o.container?t(document).scrollTop():n.scrollTop(),s=n.offset(),a=[0];this.element.parents().each(function(){var e=t(this).css("z-index");"auto"!==e&&0!==Number(e)&&a.push(Number(e))});var l=Math.max.apply(Math,a)+this.o.zIndexOffset,c=this.component?this.component.parent().offset():this.element.offset(),h=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),d=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),u=c.left-s.left,p=c.top-s.top;"body"!==this.o.container&&(p+=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&&(u-=e-d)):c.left<0?(this.picker.addClass("datepicker-orient-left"),u-=c.left-10):u+e>r?(this.picker.addClass("datepicker-orient-right"),u+=d-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var f,m=this.o.orientation.y;if("auto"===m&&(f=-o+p-i,m=f<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+m),"top"===m?p-=i+parseInt(this.picker.css("padding-top")):p+=h,this.o.rtl){var g=r-(u+d);this.picker.css({top:p,right:g,zIndex:l})}else this.picker.css({top:p,left:u,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=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),i=i&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy(function(t){return v.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+='">'+g[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t,e=this._utc_to_local(this.viewDate),i="",n=0;n<12;n++)t=e&&e.getMonth()===n?" focused":"",i+='<span class="month'+t+'">'+g[this.o.language].monthsShort[n]+"</span>";this.picker.find(".datepicker-months td").html(i)},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(),s=this.viewDate.getUTCMonth(),a=n();return e.getUTCFullYear()<o||e.getUTCFullYear()===o&&e.getUTCMonth()<s?i.push("old"):(e.getUTCFullYear()>o||e.getUTCFullYear()===o&&e.getUTCMonth()>s)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&r(e,a)&&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,r,o,s,a,l){for(var c,h,d,u="",p=r/10,f=this.picker.find(i),m=Math.floor(o/r)*r,g=m+9*p,v=Math.floor(this.viewDate.getFullYear()/p)*p,y=t.map(this.dates,function(t){return Math.floor(t.getUTCFullYear()/p)*p}),b=m-p;b<=g+p;b+=p)c=[n],h=null,b===m-p?c.push("old"):b===g+p&&c.push("new"),-1!==t.inArray(b,y)&&c.push("active"),(b<s||b>a)&&c.push("disabled"),b===v&&c.push("focused"),l!==t.noop&&((d=l(new Date(b,0,1)))===e?d={}:"boolean"==typeof d?d={enabled:d}:"string"==typeof d&&(d={classes:d}),!1===d.enabled&&c.push("disabled"),d.classes&&(c=c.concat(d.classes.split(/\s+/))),d.tooltip&&(h=d.tooltip)),u+='<span class="'+c.join(" ")+'"'+(h?' title="'+h+'"':"")+">"+b+"</span>";f.find(".datepicker-switch").text(m+"-"+g),f.find("td").html(u)},fill:function(){var n,r,o=new Date(this.viewDate),s=o.getUTCFullYear(),a=o.getUTCMonth(),l=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,c=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,d=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,u=g[this.o.language].today||g.en.today||"",p=g[this.o.language].clear||g.en.clear||"",f=g[this.o.language].titleFormat||g.en.titleFormat;if(!isNaN(s)&&!isNaN(a)){this.picker.find(".datepicker-days .datepicker-switch").text(v.formatDate(o,f,this.o.language)),this.picker.find("tfoot .today").text(u).css("display",!0===this.o.todayBtn||"linked"===this.o.todayBtn?"table-cell":"none"),this.picker.find("tfoot .clear").text(p).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 m=i(s,a,0),y=m.getUTCDate();m.setUTCDate(y-(m.getUTCDay()-this.o.weekStart+7)%7);var b=new Date(m);m.getUTCFullYear()<100&&b.setUTCFullYear(m.getUTCFullYear()),b.setUTCDate(b.getUTCDate()+42),b=b.valueOf();for(var _,x,w=[];m.valueOf()<b;){if((_=m.getUTCDay())===this.o.weekStart&&(w.push("<tr>"),this.o.calendarWeeks)){var k=new Date(+m+(this.o.weekStart-_-7)%7*864e5),S=new Date(Number(k)+(11-k.getUTCDay())%7*864e5),C=new Date(Number(C=i(S.getUTCFullYear(),0,1))+(11-C.getUTCDay())%7*864e5),D=(S-C)/864e5/7+1;w.push('<td class="cw">'+D+"</td>")}(x=this.getClassNames(m)).push("day");var T=m.getUTCDate();this.o.beforeShowDay!==t.noop&&((r=this.o.beforeShowDay(this._utc_to_local(m)))===e?r={}:"boolean"==typeof r?r={enabled:r}:"string"==typeof r&&(r={classes:r}),!1===r.enabled&&x.push("disabled"),r.classes&&(x=x.concat(r.classes.split(/\s+/))),r.tooltip&&(n=r.tooltip),r.content&&(T=r.content)),x=t.isFunction(t.uniqueSort)?t.uniqueSort(x):t.unique(x),w.push('<td class="'+x.join(" ")+'"'+(n?' title="'+n+'"':"")+' data-date="'+m.getTime().toString()+'">'+T+"</td>"),n=null,_===this.o.weekEnd&&w.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(w.join(""));var A=g[this.o.language].monthsTitle||g.en.monthsTitle||"Months",M=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?A:s).end().find("tbody span").removeClass("active");if(t.each(this.dates,function(t,e){e.getUTCFullYear()===s&&M.eq(e.getUTCMonth()).addClass("active")}),(s<l||s>h)&&M.addClass("disabled"),s===l&&M.slice(0,c).addClass("disabled"),s===h&&M.slice(d+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var E=this;t.each(M,function(i,n){var r=new Date(s,i,1),o=E.o.beforeShowMonth(r);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,s,l,h,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,s,l,h,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,s,l,h,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,i=new Date(this.viewDate),n=i.getUTCFullYear(),r=i.getUTCMonth(),o=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,s=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,c=1;switch(this.viewMode){case 0:t=n<=o&&r<=s,e=n>=a&&r>=l;break;case 4:c*=10;case 3:c*=10;case 2:c*=10;case 1:t=Math.floor(n/c)*c<=o,e=Math.floor(n/c)*c+c>=a}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(e){e.preventDefault(),e.stopPropagation();var r,o,s,a;(r=t(e.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(n(),"linked"===this.o.todayBtn?null:"view")),r.hasClass("clear")&&this.clearDates(),r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),o=1,1===this.viewMode?(a=r.parent().find("span").index(r),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(a)):(a=0,s=Number(r.text()),this.viewDate.setUTCFullYear(s)),this._trigger(v.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(i(s,a,o)):(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*v.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,i),this._trigger(v.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(!s(t))return this.o.defaultViewDate;if(!e)return t;var i,n,r=new Date(t.valueOf()),o=r.getUTCDate(),a=r.getUTCMonth(),l=Math.abs(e);if(e=e>0?1:-1,1===l)n=-1===e?function(){return r.getUTCMonth()===a}:function(){return r.getUTCMonth()!==i},i=a+e,r.setUTCMonth(i),i=(i+12)%12;else{for(var c=0;c<l;c++)r=this.moveMonth(r,e);i=r.getUTCMonth(),r.setUTCDate(o),n=function(){return i!==r.getUTCMonth()}}for(;n();)r.setUTCDate(--o),r.setUTCMonth(i);return r},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 r(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,r=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(r,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(i=this.moveAvailableDate(r,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?i=this.moveAvailableDate(r,e,"moveDay"):this.weekOfDateIsDisabled(r)||(i=this.moveAvailableDate(r,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(r,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(r,e,"moveYear")),i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(r),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-"+v.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var d=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,p.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()};d.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)})},dateUpdated:function(i){if(!this.updating){this.updating=!0;var n=t.data(i.target,"datepicker");if(n!==e){var r=n.getUTCDate(),o=this.keepEmptyValues,s=t.inArray(i.target,this.inputs),a=s-1,l=s+1,c=this.inputs.length;if(-1!==s){if(t.each(this.pickers,function(t,e){e.getUTCDate()||e!==n&&o||e.setUTCDate(r)}),r<this.dates[a])for(;a>=0&&r<this.dates[a];)this.pickers[a--].setUTCDate(r);else if(r>this.dates[l])for(;l<c&&r>this.dates[l];)this.pickers[l++].setUTCDate(r);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,p=function(i){var n=Array.apply(null,arguments);n.shift();var r;if(this.each(function(){var e=t(this),o=e.data("datepicker"),s="object"==typeof i&&i;if(!o){var c=a(this,"date"),u=l(t.extend({},f,c,s).language),p=t.extend({},f,u,c,s);e.hasClass("input-daterange")||p.inputs?(t.extend(p,{inputs:p.inputs||e.find("input").toArray()}),o=new d(this,p)):o=new h(this,p),e.data("datepicker",o)}"string"==typeof i&&"function"==typeof o[i]&&(r=o[i].apply(o,n))}),r===e||r instanceof h||r instanceof d)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return r};t.fn.datepicker=p;var f=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},m=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=h;var g=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"}},v={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,r,o,s){function a(t,e){return!0===e&&(e=10),t<100&&(t+=2e3)>(new Date).getFullYear()+e&&(t-=100),t}function l(){var t=this.slice(0,c[p].length),e=c[p].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!i)return e;if(i instanceof Date)return i;if("string"==typeof r&&(r=v.parseFormat(r)),r.toValue)return r.toValue(i,r,o);var c,d,u,p,f,m={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},y={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(i in y&&(i=y[i]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(i)){for(c=i.match(/([\-+]\d+)([dmwy])/gi),i=new Date,p=0;p<c.length;p++)d=c[p].match(/([\-+]\d+)([dmwy])/i),u=Number(d[1]),f=m[d[2].toLowerCase()],i=h.prototype[f](i,u);return h.prototype._zero_utc_time(i)}c=i&&i.match(this.nonpunctuation)||[];var b,_,x={},w=["yyyy","yy","M","MM","m","mm","d","dd"],k={yyyy:function(t,e){return t.setUTCFullYear(s?a(e,s):e)},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)}};k.yy=k.yyyy,k.M=k.MM=k.mm=k.m,k.dd=k.d,i=n();var S=r.parts.slice();if(c.length!==S.length&&(S=t(S).filter(function(e,i){return-1!==t.inArray(i,w)}).toArray()),c.length===S.length){var C;for(p=0,C=S.length;p<C;p++){if(b=parseInt(c[p],10),d=S[p],isNaN(b))switch(d){case"MM":_=t(g[o].months).filter(l),b=t.inArray(_[0],g[o].months)+1;break;case"M":_=t(g[o].monthsShort).filter(l),b=t.inArray(_[0],g[o].monthsShort)+1}x[d]=b}var D,T;for(p=0;p<w.length;p++)(T=w[p])in x&&!isNaN(x[T])&&(D=new Date(i),k[T](D,x[T]),isNaN(D)||(i=D))}return i},formatDate:function(e,i,n){if(!e)return"";if("string"==typeof i&&(i=v.parseFormat(i)),i.toDisplay)return i.toDisplay(e,i,n);var r={d:e.getUTCDate(),D:g[n].daysShort[e.getUTCDay()],DD:g[n].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:g[n].monthsShort[e.getUTCMonth()],MM:g[n].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};r.dd=(r.d<10?"0":"")+r.d,r.mm=(r.m<10?"0":"")+r.m,e=[];for(var o=t.extend([],i.separators),s=0,a=i.parts.length;s<=a;s++)o.length&&e.push(o.shift()),e.push(r[i.parts[s]]);return e.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+f.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+f.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>'};v.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=v,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=u,this},t.fn.datepicker.version="1.7.1",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(),p.call(i,"show"))}),t(function(){p.call(t('[data-provide="datepicker-inline"]'))})}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t,e){function i(){var t,e,i,n,r;if(e=(new Date).toString(),(i=(null!=(r=e.split("(")[1])?r.slice(0,-1):0)||e.split(" "))instanceof Array){n=[];for(var o=0,s=i.length;o<s;o++)((t=null!==(r=i[o].match(/\b[A-Z]+\b/)))?r[0]:0)&&n.push(t);i=n.pop()}return i}function n(){return new Date(Date.UTC.apply(Date,arguments))}"indexOf"in Array.prototype||(Array.prototype.indexOf=function(t,i){i===e&&(i=0),i<0&&(i+=this.length),i<0&&(i=0);for(var n=this.length;i<n;i++)if(i in this&&this[i]===t)return i;return-1});var r=function(n,r){var o=this;this.element=t(n),this.container=r.container||"body",this.language=r.language||this.element.data("date-language")||"en",this.language=this.language in s?this.language:this.language.split("-")[0],this.language=this.language in s?this.language:"en",this.isRTL=s[this.language].rtl||!1,this.formatType=r.formatType||this.element.data("format-type")||"standard",this.format=a.parseFormat(r.format||this.element.data("date-format")||s[this.language].format||a.getDefaultFormat(this.formatType,"input"),this.formatType),this.isInline=!1,this.isVisible=!1,this.isInput=this.element.is("input"),this.fontAwesome=r.fontAwesome||this.element.data("font-awesome")||!1,this.bootcssVer=r.bootcssVer||(this.isInput?this.element.is(".form-control")?3:2:this.bootcssVer=this.element.is(".input-group")?3:2),this.component=!!this.element.is(".date")&&(3===this.bootcssVer?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o").parent()),this.componentReset=!!this.element.is(".date")&&(3===this.bootcssVer?this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent():this.element.find(".add-on .icon-remove, .add-on .fa-times").parent()),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.linkField=r.linkField||this.element.data("link-field")||!1,this.linkFormat=a.parseFormat(r.linkFormat||this.element.data("link-format")||a.getDefaultFormat(this.formatType,"link"),this.formatType),this.minuteStep=r.minuteStep||this.element.data("minute-step")||5,this.pickerPosition=r.pickerPosition||this.element.data("picker-position")||"bottom-right",this.showMeridian=r.showMeridian||this.element.data("show-meridian")||!1,this.initialDate=r.initialDate||new Date,this.zIndex=r.zIndex||this.element.data("z-index")||e,this.title=void 0!==r.title&&r.title,this.timezone=r.timezone||i(),this.icons={leftArrow:this.fontAwesome?"fa-arrow-left":3===this.bootcssVer?"glyphicon-arrow-left":"icon-arrow-left",rightArrow:this.fontAwesome?"fa-arrow-right":3===this.bootcssVer?"glyphicon-arrow-right":"icon-arrow-right"},this.icontype=this.fontAwesome?"fa":"glyphicon",this._attachEvents(),this.clickedOutside=function(e){0===t(e.target).closest(".datetimepicker").length&&o.hide()},this.formatViewType="datetime","formatViewType"in r?this.formatViewType=r.formatViewType:"formatViewType"in this.element.data()&&(this.formatViewType=this.element.data("formatViewType")),this.minView=0,"minView"in r?this.minView=r.minView:"minView"in this.element.data()&&(this.minView=this.element.data("min-view")),this.minView=a.convertViewMode(this.minView),this.maxView=a.modes.length-1,"maxView"in r?this.maxView=r.maxView:"maxView"in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=a.convertViewMode(this.maxView),this.wheelViewModeNavigation=!1,"wheelViewModeNavigation"in r?this.wheelViewModeNavigation=r.wheelViewModeNavigation:"wheelViewModeNavigation"in this.element.data()&&(this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")),this.wheelViewModeNavigationInverseDirection=!1,"wheelViewModeNavigationInverseDirection"in r?this.wheelViewModeNavigationInverseDirection=r.wheelViewModeNavigationInverseDirection:"wheelViewModeNavigationInverseDirection"in this.element.data()&&(this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")),this.wheelViewModeNavigationDelay=100,"wheelViewModeNavigationDelay"in r?this.wheelViewModeNavigationDelay=r.wheelViewModeNavigationDelay:"wheelViewModeNavigationDelay"in this.element.data()&&(this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")),this.startViewMode=2,"startView"in r?this.startViewMode=r.startView:"startView"in this.element.data()&&(this.startViewMode=this.element.data("start-view")),this.startViewMode=a.convertViewMode(this.startViewMode),this.viewMode=this.startViewMode,this.viewSelect=this.minView,"viewSelect"in r?this.viewSelect=r.viewSelect:"viewSelect"in this.element.data()&&(this.viewSelect=this.element.data("view-select")),this.viewSelect=a.convertViewMode(this.viewSelect),this.forceParse=!0,"forceParse"in r?this.forceParse=r.forceParse:"dateForceParse"in this.element.data()&&(this.forceParse=this.element.data("date-force-parse"));for(var l=3===this.bootcssVer?a.templateV3:a.template;-1!==l.indexOf("{iconType}");)l=l.replace("{iconType}",this.icontype);for(;-1!==l.indexOf("{leftArrow}");)l=l.replace("{leftArrow}",this.icons.leftArrow);for(;-1!==l.indexOf("{rightArrow}");)l=l.replace("{rightArrow}",this.icons.rightArrow);if(this.picker=t(l).appendTo(this.isInline?this.element:this.container).on({click:t.proxy(this.click,this),mousedown:t.proxy(this.mousedown,this)}),this.wheelViewModeNavigation&&(t.fn.mousewheel?this.picker.on({mousewheel:t.proxy(this.mousewheel,this)}):console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")),this.isInline?this.picker.addClass("datetimepicker-inline"):this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu"),this.isRTL){this.picker.addClass("datetimepicker-rtl");var c=3===this.bootcssVer?".prev span, .next span":".prev i, .next i";this.picker.find(c).toggleClass(this.icons.leftArrow+" "+this.icons.rightArrow)}t(document).on("mousedown touchend",this.clickedOutside),this.autoclose=!1,"autoclose"in r?this.autoclose=r.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation"in r?this.keyboardNavigation=r.keyboardNavigation:"dateKeyboardNavigation"in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.todayBtn=r.todayBtn||this.element.data("date-today-btn")||!1,this.clearBtn=r.clearBtn||this.element.data("date-clear-btn")||!1,this.todayHighlight=r.todayHighlight||this.element.data("date-today-highlight")||!1,this.weekStart=0,void 0!==r.weekStart?this.weekStart=r.weekStart:void 0!==this.element.data("date-weekstart")?this.weekStart=this.element.data("date-weekstart"):void 0!==s[this.language].weekStart&&(this.weekStart=s[this.language].weekStart),this.weekStart=this.weekStart%7,this.weekEnd=(this.weekStart+6)%7,this.onRenderDay=function(t){var e=(r.onRenderDay||function(){return[]})(t);return"string"==typeof e&&(e=[e]),["day"].concat(e||[])},this.onRenderHour=function(t){var e=(r.onRenderHour||function(){return[]})(t),i=["hour"];return"string"==typeof e&&(e=[e]),i.concat(e||[])},this.onRenderMinute=function(t){var e=(r.onRenderMinute||function(){return[]})(t),i=["minute"];return"string"==typeof e&&(e=[e]),t<this.startDate||t>this.endDate?i.push("disabled"):Math.floor(this.date.getUTCMinutes()/this.minuteStep)===Math.floor(t.getUTCMinutes()/this.minuteStep)&&i.push("active"),i.concat(e||[])},this.onRenderYear=function(t){var e=(r.onRenderYear||function(){return[]})(t),i=["year"];"string"==typeof e&&(e=[e]),this.date.getUTCFullYear()===t.getUTCFullYear()&&i.push("active");var n=t.getUTCFullYear(),o=this.endDate.getUTCFullYear();return(t<this.startDate||n>o)&&i.push("disabled"),i.concat(e||[])},this.onRenderMonth=function(t){var e=(r.onRenderMonth||function(){return[]})(t),i=["month"];return"string"==typeof e&&(e=[e]),i.concat(e||[])},this.startDate=new Date(-8639968443048e3),this.endDate=new Date(8639968443048e3),this.datesDisabled=[],this.daysOfWeekDisabled=[],this.setStartDate(r.startDate||this.element.data("date-startdate")),this.setEndDate(r.endDate||this.element.data("date-enddate")),this.setDatesDisabled(r.datesDisabled||this.element.data("date-dates-disabled")),this.setDaysOfWeekDisabled(r.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.setMinutesDisabled(r.minutesDisabled||this.element.data("date-minute-disabled")),this.setHoursDisabled(r.hoursDisabled||this.element.data("date-hour-disabled")),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show()};r.prototype={constructor:r,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this._events=[[this.element,{focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}]]:this.component&&this.hasInput?(this._events=[[this.element.find("input"),{focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}],[this.component,{click:t.proxy(this.show,this)}]],this.componentReset&&this._events.push([this.componentReset,{click:t.proxy(this.reset,this)}])):this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:t.proxy(this.show,this)}]];for(var e,i,n=0;n<this._events.length;n++)e=this._events[n][0],i=this._events[n][1],e.on(i)},_detachEvents:function(){for(var t,e,i=0;i<this._events.length;i++)t=this._events[i][0],e=this._events[i][1],t.off(e);this._events=[]},show:function(e){this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.forceParse&&this.update(),this.place(),t(window).on("resize",t.proxy(this.place,this)),e&&(e.stopPropagation(),e.preventDefault()),this.isVisible=!0,this.element.trigger({type:"show",date:this.date})},hide:function(){this.isVisible&&(this.isInline||(this.picker.hide(),t(window).off("resize",this.place),this.viewMode=this.startViewMode,this.showMode(),this.isInput||t(document).off("mousedown",this.hide),this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this.isVisible=!1,this.element.trigger({type:"hide",date:this.date})))},remove:function(){this._detachEvents(),t(document).off("mousedown",this.clickedOutside),this.picker.remove(),delete this.picker,delete this.element.data().datetimepicker},getDate:function(){var t=this.getUTCDate();return null===t?null:new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},getInitialDate:function(){return this.initialDate},setInitialDate:function(t){this.initialDate=t},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){t>=this.startDate&&t<=this.endDate?(this.date=t,this.setValue(),this.viewDate=this.date,this.fill()):this.element.trigger({type:"outOfRange",date:t,startDate:this.startDate,endDate:this.endDate})},setFormat:function(t){this.format=a.parseFormat(t,this.formatType);var e;this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val()&&this.setValue()},setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e):(this.component&&this.element.find("input").val(e),this.element.data("date",e)),this.linkField&&t("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))},getFormattedDate:function(t){return t=t||this.format,a.formatDate(this.date,t,this.language,this.formatType,this.timezone)},setStartDate:function(t){this.startDate=t||this.startDate,8639968443048e3!==this.startDate.valueOf()&&(this.startDate=a.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setEndDate:function(t){this.endDate=t||this.endDate,8639968443048e3!==this.endDate.valueOf()&&(this.endDate=a.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setDatesDisabled:function(e){this.datesDisabled=e||[],t.isArray(this.datesDisabled)||(this.datesDisabled=this.datesDisabled.split(/,\s*/));var i=this;this.datesDisabled=t.map(this.datesDisabled,function(t){return a.parseDate(t,i.format,i.language,i.formatType,i.timezone).toDateString()}),this.update(),this.updateNavArrows()},setTitle:function(t,e){return this.picker.find(t).find("th:eq(1)").text(!1===this.title?e:this.title)},setDaysOfWeekDisabled:function(e){this.daysOfWeekDisabled=e||[],t.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=t.map(this.daysOfWeekDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},setMinutesDisabled:function(e){this.minutesDisabled=e||[],t.isArray(this.minutesDisabled)||(this.minutesDisabled=this.minutesDisabled.split(/,\s*/)),this.minutesDisabled=t.map(this.minutesDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},setHoursDisabled:function(e){this.hoursDisabled=e||[],t.isArray(this.hoursDisabled)||(this.hoursDisabled=this.hoursDisabled.split(/,\s*/)),this.hoursDisabled=t.map(this.hoursDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){if(!this.zIndex){var e=0;t("div").each(function(){var i=parseInt(t(this).css("zIndex"),10);i>e&&(e=i)}),this.zIndex=e+10}var i,n,r,o;o=this.container instanceof t?this.container.offset():t(this.container).offset(),this.component?(r=(i=this.component.offset()).left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition||(r+=this.component.outerWidth()-this.picker.outerWidth())):(r=(i=this.element.offset()).left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition||(r+=this.element.outerWidth()-this.picker.outerWidth()));var s=document.body.clientWidth||window.innerWidth;r+220>s&&(r=s-220),n="top-left"===this.pickerPosition||"top-right"===this.pickerPosition?i.top-this.picker.outerHeight():i.top+this.height,n-=o.top,r-=o.left,this.picker.css({top:n,left:r,zIndex:this.zIndex})}},hour_minute:"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]",update:function(){var t,e=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):"string"==typeof(t=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate)&&(t=t.replace(/^\s+|\s+$/g,"")),t||(t=new Date,e=!1),"string"==typeof t&&(new RegExp(this.hour_minute).test(t)||new RegExp(this.hour_minute+":[0-5][0-9]").test(t))&&(t=this.getDate()),this.date=a.parseDate(t,this.format,this.language,this.formatType,this.timezone),e&&this.setValue(),this.date<this.startDate?this.viewDate=new Date(this.startDate):this.date>this.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:function(){for(var t=this.weekStart,e="<tr>";t<this.weekStart+7;)e+='<th class="dow">'+s[this.language].daysMin[t++%7]+"</th>";e+="</tr>",this.picker.find(".datetimepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=new Date(this.viewDate),i=0;i<12;i++)e.setUTCMonth(i),t+='<span class="'+this.onRenderMonth(e).join(" ")+'">'+s[this.language].monthsShort[i]+"</span>";this.picker.find(".datetimepicker-months td").html(t)},fill:function(){if(this.date&&this.viewDate){var e=new Date(this.viewDate),i=e.getUTCFullYear(),r=e.getUTCMonth(),l=e.getUTCDate(),c=e.getUTCHours(),h=this.startDate.getUTCFullYear(),d=this.startDate.getUTCMonth(),u=this.endDate.getUTCFullYear(),p=this.endDate.getUTCMonth()+1,f=new n(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),m=new Date;if(this.setTitle(".datetimepicker-days",s[this.language].months[r]+" "+i),"time"===this.formatViewType){var g=this.getFormattedDate();this.setTitle(".datetimepicker-hours",g),this.setTitle(".datetimepicker-minutes",g)}else this.setTitle(".datetimepicker-hours",l+" "+s[this.language].months[r]+" "+i),this.setTitle(".datetimepicker-minutes",l+" "+s[this.language].months[r]+" "+i);this.picker.find("tfoot th.today").text(s[this.language].today||s.en.today).toggle(!1!==this.todayBtn),this.picker.find("tfoot th.clear").text(s[this.language].clear||s.en.clear).toggle(!1!==this.clearBtn),this.updateNavArrows(),this.fillMonths();var v=n(i,r-1,28,0,0,0,0),y=a.getDaysInMonth(v.getUTCFullYear(),v.getUTCMonth());v.setUTCDate(y),v.setUTCDate(y-(v.getUTCDay()-this.weekStart+7)%7);var b=new Date(v);b.setUTCDate(b.getUTCDate()+42),b=b.valueOf();for(var _,x=[];v.valueOf()<b;)v.getUTCDay()===this.weekStart&&x.push("<tr>"),_=this.onRenderDay(v),v.getUTCFullYear()<i||v.getUTCFullYear()===i&&v.getUTCMonth()<r?_.push("old"):(v.getUTCFullYear()>i||v.getUTCFullYear()===i&&v.getUTCMonth()>r)&&_.push("new"),this.todayHighlight&&v.getUTCFullYear()===m.getFullYear()&&v.getUTCMonth()===m.getMonth()&&v.getUTCDate()===m.getDate()&&_.push("today"),v.valueOf()===f&&_.push("active"),(v.valueOf()+864e5<=this.startDate||v.valueOf()>this.endDate||-1!==t.inArray(v.getUTCDay(),this.daysOfWeekDisabled)||-1!==t.inArray(v.toDateString(),this.datesDisabled))&&_.push("disabled"),x.push('<td class="'+_.join(" ")+'">'+v.getUTCDate()+"</td>"),v.getUTCDay()===this.weekEnd&&x.push("</tr>"),v.setUTCDate(v.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(x.join("")),x=[];var w="",k="",S="",C=this.hoursDisabled||[];e=new Date(this.viewDate);for(P=0;P<24;P++){e.setUTCHours(P),_=this.onRenderHour(e),-1!==C.indexOf(P)&&_.push("disabled");var D=n(i,r,l,P);D.valueOf()+36e5<=this.startDate||D.valueOf()>this.endDate?_.push("disabled"):c===P&&_.push("active"),this.showMeridian&&2===s[this.language].meridiem.length?((k=P<12?s[this.language].meridiem[0]:s[this.language].meridiem[1])!==S&&(""!==S&&x.push("</fieldset>"),x.push('<fieldset class="hour"><legend>'+k.toUpperCase()+"</legend>")),S=k,w=P%12?P%12:12,P<12?_.push("hour_am"):_.push("hour_pm"),x.push('<span class="'+_.join(" ")+'">'+w+"</span>"),23===P&&x.push("</fieldset>")):(w=P+":00",x.push('<span class="'+_.join(" ")+'">'+w+"</span>"))}this.picker.find(".datetimepicker-hours td").html(x.join("")),x=[],w="",k="",S="";var T=this.minutesDisabled||[];e=new Date(this.viewDate);for(P=0;P<60;P+=this.minuteStep)-1===T.indexOf(P)&&(e.setUTCMinutes(P),e.setUTCSeconds(0),_=this.onRenderMinute(e),this.showMeridian&&2===s[this.language].meridiem.length?((k=c<12?s[this.language].meridiem[0]:s[this.language].meridiem[1])!==S&&(""!==S&&x.push("</fieldset>"),x.push('<fieldset class="minute"><legend>'+k.toUpperCase()+"</legend>")),S=k,w=c%12?c%12:12,x.push('<span class="'+_.join(" ")+'">'+w+":"+(P<10?"0"+P:P)+"</span>"),59===P&&x.push("</fieldset>")):(w=P+":00",x.push('<span class="'+_.join(" ")+'">'+c+":"+(P<10?"0"+P:P)+"</span>")));this.picker.find(".datetimepicker-minutes td").html(x.join(""));var A=this.date.getUTCFullYear(),M=this.setTitle(".datetimepicker-months",i).end().find(".month").removeClass("active");A===i&&M.eq(this.date.getUTCMonth()).addClass("active"),(i<h||i>u)&&M.addClass("disabled"),i===h&&M.slice(0,d).addClass("disabled"),i===u&&M.slice(p).addClass("disabled"),x="",i=10*parseInt(i/10,10);var E=this.setTitle(".datetimepicker-years",i+"-"+(i+9)).end().find("td");i-=1,e=new Date(this.viewDate);for(var P=-1;P<11;P++)e.setUTCFullYear(i),_=this.onRenderYear(e),-1!==P&&10!==P||_.push(o),x+='<span class="'+_.join(" ")+'">'+i+"</span>",i+=1;E.html(x),this.place()}},updateNavArrows:function(){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth(),n=t.getUTCDate(),r=t.getUTCHours();switch(this.viewMode){case 0:e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&n<=this.startDate.getUTCDate()&&r<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&n>=this.endDate.getUTCDate()&&r>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&n<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&n>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:e<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(e){if(e.preventDefault(),e.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var i=e.originalEvent.wheelDelta,n=i>0?1:0===i?0:-1;this.wheelViewModeNavigationInverseDirection&&(n=-n),this.showMode(n),setTimeout(t.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(e){e.stopPropagation(),e.preventDefault();var i=t(e.target).closest("span, td, th, legend");if(i.is("."+this.icontype)&&(i=t(i).parent().closest("span, td, th, legend")),1===i.length){if(i.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(i[0].nodeName.toLowerCase()){case"th":switch(i[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var r=a.modes[this.viewMode].navStep*("prev"===i[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,r);break;case 1:this.viewDate=this.moveDate(this.viewDate,r);break;case 2:this.viewDate=this.moveMonth(this.viewDate,r);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,r)}this.fill(),this.element.trigger({type:i[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset(),this.autoclose&&this.hide();break;case"today":var o=new Date;(o=n(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),0))<this.startDate?o=this.startDate:o>this.endDate&&(o=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(o),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!i.is(".disabled")){var s=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),c=this.viewDate.getUTCDate(),h=this.viewDate.getUTCHours(),d=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(i.is(".month")?(this.viewDate.setUTCDate(1),l=i.parent().find("span").index(i),c=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(l),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(n(s,l,c,h,d,u,0))):i.is(".year")?(this.viewDate.setUTCDate(1),s=parseInt(i.text(),10)||0,this.viewDate.setUTCFullYear(s),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(n(s,l,c,h,d,u,0))):i.is(".hour")?(h=parseInt(i.text(),10)||0,(i.hasClass("hour_am")||i.hasClass("hour_pm"))&&(12===h&&i.hasClass("hour_am")?h=0:12!==h&&i.hasClass("hour_pm")&&(h+=12)),this.viewDate.setUTCHours(h),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(n(s,l,c,h,d,u,0))):i.is(".minute")&&(d=parseInt(i.text().substr(i.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(d),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(n(s,l,c,h,d,u,0))),0!==this.viewMode){p=this.viewMode;this.showMode(-1),this.fill(),p===this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(i.is(".day")&&!i.is(".disabled")){var c=parseInt(i.text(),10)||1,s=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),h=this.viewDate.getUTCHours(),d=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();i.is(".old")?0===l?(l=11,s-=1):l-=1:i.is(".new")&&(11===l?(l=0,s+=1):l+=1),this.viewDate.setUTCFullYear(s),this.viewDate.setUTCMonth(l,c),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(n(s,l,c,h,d,u,0))}var p=this.viewMode;this.showMode(-1),this.fill(),p===this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(t,e){e&&"date"!==e||(this.date=t),e&&"view"!==e||(this.viewDate=t),this.fill(),this.setValue();var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&i.change(),this.element.trigger({type:"changeDate",date:this.getDate()}),null===t&&(this.date=this.viewDate)},moveMinute:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCMinutes(i.getUTCMinutes()+e*this.minuteStep),i},moveHour:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCHours(i.getUTCHours()+e),i},moveDate:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCDate(i.getUTCDate()+e),i},moveMonth:function(t,e){if(!e)return t;var i,n,r=new Date(t.valueOf()),o=r.getUTCDate(),s=r.getUTCMonth(),a=Math.abs(e);if(e=e>0?1:-1,1===a)n=-1===e?function(){return r.getUTCMonth()===s}:function(){return r.getUTCMonth()!==i},i=s+e,r.setUTCMonth(i),(i<0||i>11)&&(i=(i+12)%12);else{for(var l=0;l<a;l++)r=this.moveMonth(r,e);i=r.getUTCMonth(),r.setUTCDate(o),n=function(){return i!==r.getUTCMonth()}}for(;n();)r.setUTCDate(--o),r.setUTCMonth(i);return r},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.startDate&&t<=this.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27===t.keyCode&&this.show();else{var e,i,n,r=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;e=37===t.keyCode?-1:1;var o=this.viewMode;t.ctrlKey?o+=2:t.shiftKey&&(o+=1),4===o?(i=this.moveYear(this.date,e),n=this.moveYear(this.viewDate,e)):3===o?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):2===o?(i=this.moveDate(this.date,e),n=this.moveDate(this.viewDate,e)):1===o?(i=this.moveHour(this.date,e),n=this.moveHour(this.viewDate,e)):0===o&&(i=this.moveMinute(this.date,e),n=this.moveMinute(this.viewDate,e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),r=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;e=38===t.keyCode?-1:1,o=this.viewMode,t.ctrlKey?o+=2:t.shiftKey&&(o+=1),4===o?(i=this.moveYear(this.date,e),n=this.moveYear(this.viewDate,e)):3===o?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):2===o?(i=this.moveDate(this.date,7*e),n=this.moveDate(this.viewDate,7*e)):1===o?this.showMeridian?(i=this.moveHour(this.date,6*e),n=this.moveHour(this.viewDate,6*e)):(i=this.moveHour(this.date,4*e),n=this.moveHour(this.viewDate,4*e)):0===o&&(i=this.moveMinute(this.date,4*e),n=this.moveMinute(this.viewDate,4*e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),r=!0);break;case 13:if(0!==this.viewMode){var s=this.viewMode;this.showMode(-1),this.fill(),s===this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();t.preventDefault();break;case 9:this.hide()}if(r){var a;this.isInput?a=this.element:this.component&&(a=this.element.find("input")),a&&a.change(),this.element.trigger({type:"changeDate",date:this.getDate()})}}},showMode:function(t){if(t){var e=Math.max(0,Math.min(a.modes.length-1,this.viewMode+t));e>=this.minView&&e<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:e}),this.viewMode=e)}this.picker.find(">div").hide().filter(".datetimepicker-"+a.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(){this._setDate(null,"date")},convertViewModeText:function(t){switch(t){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var o=t.fn.datetimepicker;t.fn.datetimepicker=function(i){var n=Array.apply(null,arguments);n.shift();var o;return this.each(function(){var s=t(this),a=s.data("datetimepicker"),l="object"==typeof i&&i;if(a||s.data("datetimepicker",a=new r(this,t.extend({},t.fn.datetimepicker.defaults,l))),"string"==typeof i&&"function"==typeof a[i]&&(o=a[i].apply(a,n))!==e)return!1}),o!==e?o:this},t.fn.datetimepicker.defaults={},t.fn.datetimepicker.Constructor=r;var s=t.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],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"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today",clear:"Clear"}},a={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,a.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},getDefaultFormat:function(t,e){if("standard"===t)return"input"===e?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss";if("php"===t)return"input"===e?"Y-m-d H:i":"Y-m-d H:i:s";throw new Error("Invalid format type.")},validParts:function(t){if("standard"===t)return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;if("php"===t)return/[dDjlNwzFmMnStyYaABgGhHis]/g;throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(t,e){var i=t.replace(this.validParts(e),"\0").split("\0"),n=t.match(this.validParts(e));if(!i||!i.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:i,parts:n}},parseDate:function(e,i,o,a,l){if(e instanceof Date){var c=new Date(e.valueOf()-6e4*e.getTimezoneOffset());return c.setMilliseconds(0),c}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(e)&&(i=this.parseFormat("yyyy-mm-dd",a)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(e)&&(i=this.parseFormat("yyyy-mm-dd hh:ii",a)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(e)&&(i=this.parseFormat("yyyy-mm-dd hh:ii:ss",a)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(e)){var h,d=/([-+]\d+)([dmwy])/,u=e.match(/([-+]\d+)([dmwy])/g);e=new Date;for(b=0;b<u.length;b++)switch(m=d.exec(u[b]),h=parseInt(m[1]),m[2]){case"d":e.setUTCDate(e.getUTCDate()+h);break;case"m":e=r.prototype.moveMonth.call(r.prototype,e,h);break;case"w":e.setUTCDate(e.getUTCDate()+7*h);break;case"y":e=r.prototype.moveYear.call(r.prototype,e,h)}return n(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),0)}var p,f,m,u=e&&e.toString().match(this.nonpunctuation)||[],e=new Date(0,0,0,0,0,0,0),g={},v=["hh","h","ii","i","ss","s","yyyy","yy","M","MM","m","mm","D","DD","d","dd","H","HH","p","P","z","Z"],y={hh:function(t,e){return t.setUTCHours(e)},h:function(t,e){return t.setUTCHours(e)},HH:function(t,e){return t.setUTCHours(12===e?0:e)},H:function(t,e){return t.setUTCHours(12===e?0:e)},ii:function(t,e){return t.setUTCMinutes(e)},i:function(t,e){return t.setUTCMinutes(e)},ss:function(t,e){return t.setUTCSeconds(e)},s:function(t,e){return t.setUTCSeconds(e)},yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;){if(isNaN(t.getUTCMonth()))return t;t.setUTCDate(t.getUTCDate()-1)}return t},d:function(t,e){return t.setUTCDate(e)},p:function(t,e){return t.setUTCHours(1===e?t.getUTCHours()+12:t.getUTCHours())},z:function(){return l}};if(y.M=y.MM=y.mm=y.m,y.dd=y.d,y.P=y.p,y.Z=y.z,e=n(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()),u.length===i.parts.length){for(var b=0,_=i.parts.length;b<_;b++){if(p=parseInt(u[b],10),m=i.parts[b],isNaN(p))switch(m){case"MM":f=t(s[o].months).filter(function(){var t=this.slice(0,u[b].length);return t===u[b].slice(0,t.length)}),p=t.inArray(f[0],s[o].months)+1;break;case"M":f=t(s[o].monthsShort).filter(function(){var t=this.slice(0,u[b].length),e=u[b].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}),p=t.inArray(f[0],s[o].monthsShort)+1;break;case"p":case"P":p=t.inArray(u[b].toLowerCase(),s[o].meridiem)}g[m]=p}for(var x,b=0;b<v.length;b++)(x=v[b])in g&&!isNaN(g[x])&&y[x](e,g[x])}return e},formatDate:function(e,i,n,r,o){if(null===e)return"";var l;if("standard"===r)l={t:e.getTime(),yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear(),m:e.getUTCMonth()+1,M:s[n].monthsShort[e.getUTCMonth()],MM:s[n].months[e.getUTCMonth()],d:e.getUTCDate(),D:s[n].daysShort[e.getUTCDay()],DD:s[n].days[e.getUTCDay()],p:2===s[n].meridiem.length?s[n].meridiem[e.getUTCHours()<12?0:1]:"",h:e.getUTCHours(),i:e.getUTCMinutes(),s:e.getUTCSeconds(),z:o},2===s[n].meridiem.length?l.H=l.h%12==0?12:l.h%12:l.H=l.h,l.HH=(l.H<10?"0":"")+l.H,l.P=l.p.toUpperCase(),l.Z=l.z,l.hh=(l.h<10?"0":"")+l.h,l.ii=(l.i<10?"0":"")+l.i,l.ss=(l.s<10?"0":"")+l.s,l.dd=(l.d<10?"0":"")+l.d,l.mm=(l.m<10?"0":"")+l.m;else{if("php"!==r)throw new Error("Invalid format type.");(l={y:e.getUTCFullYear().toString().substring(2),Y:e.getUTCFullYear(),F:s[n].months[e.getUTCMonth()],M:s[n].monthsShort[e.getUTCMonth()],n:e.getUTCMonth()+1,t:a.getDaysInMonth(e.getUTCFullYear(),e.getUTCMonth()),j:e.getUTCDate(),l:s[n].days[e.getUTCDay()],D:s[n].daysShort[e.getUTCDay()],w:e.getUTCDay(),N:0===e.getUTCDay()?7:e.getUTCDay(),S:e.getUTCDate()%10<=s[n].suffix.length?s[n].suffix[e.getUTCDate()%10-1]:"",a:2===s[n].meridiem.length?s[n].meridiem[e.getUTCHours()<12?0:1]:"",g:e.getUTCHours()%12==0?12:e.getUTCHours()%12,G:e.getUTCHours(),i:e.getUTCMinutes(),s:e.getUTCSeconds()}).m=(l.n<10?"0":"")+l.n,l.d=(l.j<10?"0":"")+l.j,l.A=l.a.toString().toUpperCase(),l.h=(l.g<10?"0":"")+l.g,l.H=(l.G<10?"0":"")+l.G,l.i=(l.i<10?"0":"")+l.i,l.s=(l.s<10?"0":"")+l.s}for(var e=[],c=t.extend([],i.separators),h=0,d=i.parts.length;h<d;h++)c.length&&e.push(c.shift()),e.push(l[i.parts[h]]);return c.length&&e.push(c.shift()),e.join("")},convertViewMode:function(t){switch(t){case 4:case"decade":t=4;break;case 3:case"year":t=3;break;case 2:case"month":t=2;break;case 1:case"day":t=1;break;case 0:case"hour":t=0}return t},headTemplate:'<thead><tr><th class="prev"><i class="{iconType} {leftArrow}"/></th><th colspan="5" class="switch"></th><th class="next"><i class="{iconType} {rightArrow}"/></th></tr></thead>',headTemplateV3:'<thead><tr><th class="prev"><span class="{iconType} {leftArrow}"></span> </th><th colspan="5" class="switch"></th><th class="next"><span class="{iconType} {rightArrow}"></span> </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>'};a.template='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+a.headTemplate+a.contTemplate+a.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+a.headTemplate+a.contTemplate+a.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+a.headTemplate+"<tbody></tbody>"+a.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+a.headTemplate+a.contTemplate+a.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+a.headTemplate+a.contTemplate+a.footTemplate+"</table></div></div>",a.templateV3='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+a.headTemplateV3+a.contTemplate+a.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+a.headTemplateV3+a.contTemplate+a.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+a.headTemplateV3+"<tbody></tbody>"+a.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+a.headTemplateV3+a.contTemplate+a.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+a.headTemplateV3+a.contTemplate+a.footTemplate+"</table></div></div>",t.fn.datetimepicker.DPGlobal=a,t.fn.datetimepicker.noConflict=function(){return t.fn.datetimepicker=o,this},t(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(e){var i=t(this);i.data("datetimepicker")||(e.preventDefault(),i.datetimepicker("show"))}),t(function(){t('[data-provide="datetimepicker-inline"]').datetimepicker()})}),function(t,e,i){"use strict";var n=function(e,i){this.widget="",this.$element=t(e),this.defaultTime=i.defaultTime,this.disableFocus=i.disableFocus,this.disableMousewheel=i.disableMousewheel,this.isOpen=i.isOpen,this.minuteStep=i.minuteStep,this.modalBackdrop=i.modalBackdrop,this.orientation=i.orientation,this.secondStep=i.secondStep,this.snapToStep=i.snapToStep,this.showInputs=i.showInputs,this.showMeridian=i.showMeridian,this.showSeconds=i.showSeconds,this.template=i.template,this.appendWidgetTo=i.appendWidgetTo,this.showWidgetOnAddonClick=i.showWidgetOnAddonClick,this.icons=i.icons,this.maxHours=i.maxHours,this.explicitMode=i.explicitMode,this.handleDocumentClick=function(t){var e=t.data.scope;e.$element.parent().find(t.target).length||e.$widget.is(t.target)||e.$widget.find(t.target).length||e.hideWidget()},this._init()};n.prototype={constructor:n,_init:function(){var e=this;this.showWidgetOnAddonClick&&this.$element.parent().hasClass("input-group")&&this.$element.parent().hasClass("bootstrap-timepicker")?(this.$element.parent(".input-group.bootstrap-timepicker").find(".input-group-addon").on({"click.timepicker":t.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":t.proxy(this.highlightUnit,this),"click.timepicker":t.proxy(this.highlightUnit,this),"keydown.timepicker":t.proxy(this.elementKeydown,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":t.proxy(this.showWidget,this),"click.timepicker":t.proxy(this.showWidget,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":t.proxy(this.highlightUnit,this),"click.timepicker":t.proxy(this.highlightUnit,this),"keydown.timepicker":t.proxy(this.elementKeydown,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=t(this.getTemplate()).on("click",t.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each(function(){t(this).on({"click.timepicker":function(){t(this).select()},"keydown.timepicker":t.proxy(e.widgetKeydown,e),"keyup.timepicker":t.proxy(e.widgetKeyup,e)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=this.maxHours-1:this.hour--},decrementMinute:function(t){var e;0>(e=t?this.minute-t:this.minute-this.minuteStep)?(this.decrementHour(),this.minute=e+60):this.minute=e},decrementSecond:function(){var t=this.second-this.secondStep;0>t?(this.decrementMinute(!0),this.second=t+60):this.second=t},elementKeydown:function(t){switch(t.which){case 9:if(t.shiftKey){if("hour"===this.highlightedUnit){this.hideWidget();break}this.highlightPrevUnit()}else{if(this.showMeridian&&"meridian"===this.highlightedUnit||this.showSeconds&&"second"===this.highlightedUnit||!this.showMeridian&&!this.showSeconds&&"minute"===this.highlightedUnit){this.hideWidget();break}this.highlightNextUnit()}t.preventDefault(),this.updateFromElementVal();break;case 27:this.updateFromElementVal();break;case 37:t.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:t.preventDefault(),this.highlightNextUnit(),this.updateFromElementVal();break;case 40:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var t=this.$element.get(0);if("selectionStart"in t)return t.selectionStart;if(i.selection){t.focus();var e=i.selection.createRange(),n=i.selection.createRange().text.length;return e.moveStart("character",-t.value.length),e.text.length-n}},getTemplate:function(){var t,e,i,n,r,o;switch(this.showInputs?(e='<input type="text" class="bootstrap-timepicker-hour" maxlength="2"/>',i='<input type="text" class="bootstrap-timepicker-minute" maxlength="2"/>',n='<input type="text" class="bootstrap-timepicker-second" maxlength="2"/>',r='<input type="text" class="bootstrap-timepicker-meridian" maxlength="2"/>'):(e='<span class="bootstrap-timepicker-hour"></span>',i='<span class="bootstrap-timepicker-minute"></span>',n='<span class="bootstrap-timepicker-second"></span>',r='<span class="bootstrap-timepicker-meridian"></span>'),o='<table><tr><td><a href="#" data-action="incrementHour"><span class="'+this.icons.up+'"></span></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="incrementMinute"><span class="'+this.icons.up+'"></span></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="incrementSecond"><span class="'+this.icons.up+'"></span></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><span class="'+this.icons.up+'"></span></a></td>':"")+"</tr><tr><td>"+e+'</td> <td class="separator">:</td><td>'+i+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+n+"</td>":"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td>'+r+"</td>":"")+'</tr><tr><td><a href="#" data-action="decrementHour"><span class="'+this.icons.down+'"></span></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><span class="'+this.icons.down+'"></span></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="decrementSecond"><span class="'+this.icons.down+'"></span></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td><a href="#" data-action="toggleMeridian"><span class="'+this.icons.down+'"></span></a></td>':"")+"</tr></table>",this.template){case"modal":t='<div class="bootstrap-timepicker-widget modal hide fade in" data-backdrop="'+(this.modalBackdrop?"true":"false")+'"><div class="modal-header"><a href="#" class="close" data-dismiss="modal">&times;</a><h3>Pick a Time</h3></div><div class="modal-content">'+o+'</div><div class="modal-footer"><a href="#" class="btn btn-primary" data-dismiss="modal">OK</a></div></div>';break;case"dropdown":t='<div class="bootstrap-timepicker-widget dropdown-menu">'+o+"</div>"}return t},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),t(i).off("mousedown.timepicker, touchend.timepicker",this.handleDocumentClick),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="hour",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(0,1):t.setSelectionRange(0,2)},0)},highlightMinute:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="minute",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(2,4):t.setSelectionRange(3,5)},0)},highlightSecond:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="second",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)},0)},highlightMeridian:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="meridian",t.setSelectionRange&&(this.showSeconds?setTimeout(function(){e.hour<10?t.setSelectionRange(8,10):t.setSelectionRange(9,11)},0):setTimeout(function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}return this.hour===this.maxHours-1?void(this.hour=0):void this.hour++},incrementMinute:function(t){var e;(e=t?this.minute+t:this.minute+this.minuteStep-this.minute%this.minuteStep)>59?(this.incrementHour(),this.minute=e-60):this.minute=e},incrementSecond:function(){var t=this.second+this.secondStep-this.second%this.secondStep;t>59?(this.incrementMinute(!0),this.second=t-60):this.second=t},mousewheel:function(e){if(!this.disableMousewheel){e.preventDefault(),e.stopPropagation();var i=e.originalEvent.wheelDelta||-e.originalEvent.detail,n=null;switch("mousewheel"===e.type?n=-1*e.originalEvent.wheelDelta:"DOMMouseScroll"===e.type&&(n=40*e.originalEvent.detail),n&&(e.preventDefault(),t(this).scrollTop(n+t(this).scrollTop())),this.highlightedUnit){case"minute":i>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":i>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:i>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},changeToNearestStep:function(t,e){return t%e==0?t:Math.round(t%e/e)?(t+(e-t%e))%60:t-t%e},place:function(){if(!this.isInline){var i=this.$widget.outerWidth(),n=this.$widget.outerHeight(),r=t(e).width(),o=t(e).height(),s=t(e).scrollTop(),a=parseInt(this.$element.parents().filter(function(){return"auto"!==t(this).css("z-index")}).first().css("z-index"),10)+10,l=this.component?this.component.parent().offset():this.$element.offset(),c=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),h=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),d=l.left,u=l.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.$widget.addClass("timepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(d-=i-h)):(this.$widget.addClass("timepicker-orient-left"),l.left<0?d-=l.left-10:l.left+i>r&&(d=r-i-10));var p,f,m=this.orientation.y;"auto"===m&&(p=-s+l.top-n,f=s+o-(l.top+c+n),m=Math.max(p,f)===f?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+m),"top"===m?u+=c:u-=n+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:u,left:d,zIndex:a})}},remove:function(){t("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(t){if(this.$element.val())this.updateFromElementVal();else if("current"===t){var e=new Date,i=e.getHours(),n=e.getMinutes(),r=e.getSeconds(),o="AM";0!==r&&60==(r=Math.ceil(e.getSeconds()/this.secondStep)*this.secondStep)&&(n+=1,r=0),0!==n&&60==(n=Math.ceil(e.getMinutes()/this.minuteStep)*this.minuteStep)&&(i+=1,n=0),this.showMeridian&&(0===i?i=12:i>=12?(i>12&&(i-=12),o="PM"):o="AM"),this.hour=i,this.minute=n,this.second=r,this.meridian=o,this.update()}else!1===t?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(t)},setTime:function(t,e){if(t){var i,n,r,o,s,a;if("object"==typeof t&&t.getMonth)r=t.getHours(),o=t.getMinutes(),s=t.getSeconds(),this.showMeridian&&(a="AM",r>12&&(a="PM",r%=12),12===r&&(a="PM"));else{if((i=(/a/i.test(t)?1:0)+(/p/i.test(t)?2:0))>2)return void this.clear();if(n=t.replace(/[^0-9\:]/g,"").split(":"),r=n[0]?n[0].toString():n.toString(),this.explicitMode&&r.length>2&&r.length%2!=0)return void this.clear();o=n[1]?n[1].toString():"",s=n[2]?n[2].toString():"",r.length>4&&(s=r.slice(-2),r=r.slice(0,-2)),r.length>2&&(o=r.slice(-2),r=r.slice(0,-2)),o.length>2&&(s=o.slice(-2),o=o.slice(0,-2)),r=parseInt(r,10),o=parseInt(o,10),s=parseInt(s,10),isNaN(r)&&(r=0),isNaN(o)&&(o=0),isNaN(s)&&(s=0),s>59&&(s=59),o>59&&(o=59),r>=this.maxHours&&(r=this.maxHours-1),this.showMeridian?(r>12&&(i=2,r-=12),i||(i=1),0===r&&(r=12),a=1===i?"AM":"PM"):12>r&&2===i?r+=12:r>=this.maxHours?r=this.maxHours-1:(0>r||12===r&&1===i)&&(r=0)}this.hour=r,this.snapToStep?(this.minute=this.changeToNearestStep(o,this.minuteStep),this.second=this.changeToNearestStep(s,this.secondStep)):(this.minute=o,this.second=s),this.meridian=a,this.update(e)}else this.clear()},showWidget:function(){this.isOpen||this.$element.is(":disabled")||(this.$widget.appendTo(this.appendWidgetTo),t(i).on("mousedown.timepicker, touchend.timepicker",{scope:this},this.handleDocumentClick),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",t.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.isOpen=!0)},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(t){this.updateElement(),t||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var t=this.hour,e=1===this.minute.toString().length?"0"+this.minute:this.minute,i=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(t),this.$widget.find("input.bootstrap-timepicker-minute").val(e),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(i),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(t),this.$widget.find("span.bootstrap-timepicker-minute").text(e),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(i),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var t=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(t,!0)}},widgetClick:function(e){e.stopPropagation(),e.preventDefault();var i=t(e.target),n=i.closest("a").data("action");n&&this[n](),this.update(),i.is("input")&&i.get(0).setSelectionRange(0,2)},widgetKeydown:function(e){var i=t(e.target),n=i.attr("class").replace("bootstrap-timepicker-","");switch(e.which){case 9:if(e.shiftKey){if("hour"===n)return this.hideWidget()}else if(this.showMeridian&&"meridian"===n||this.showSeconds&&"second"===n||!this.showMeridian&&!this.showSeconds&&"minute"===n)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(e.preventDefault(),n){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),i.get(0).setSelectionRange(0,2);break;case 40:switch(e.preventDefault(),n){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),i.get(0).setSelectionRange(0,2)}},widgetKeyup:function(t){(65===t.which||77===t.which||80===t.which||46===t.which||8===t.which||t.which>=48&&t.which<=57||t.which>=96&&t.which<=105)&&this.updateFromWidgetInputs()}},t.fn.timepicker=function(e){var i=Array.apply(null,arguments);return i.shift(),this.each(function(){var r=t(this),o=r.data("timepicker"),s="object"==typeof e&&e;o||r.data("timepicker",o=new n(this,t.extend({},t.fn.timepicker.defaults,s,t(this).data()))),"string"==typeof e&&o[e].apply(o,i)})},t.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,snapToStep:!1,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0,icons:{up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},maxHours:24,explicitMode:!1},t.fn.timepicker.Constructor=n,t(i).on("focus.timepicker.data-api click.timepicker.data-api",'[data-provide="timepicker"]',function(e){var i=t(this);i.data("timepicker")||(e.preventDefault(),i.timepicker())})}(jQuery,window,document),$.fn.timepicker.defaults=$.extend(!0,{},$.fn.timepicker.defaults,{icons:{up:"la la-angle-up",down:"la la-angle-down"}}),function(t,e){if("function"==typeof define&&define.amd)define(["moment","jquery"],function(i,n){return t.daterangepicker=e(i,n)});else if("object"==typeof module&&module.exports){var i="undefined"!=typeof window?window.jQuery:void 0;i||(i=require("jquery")).fn||(i.fn={}),module.exports=e(require("moment"),i)}else t.daterangepicker=e(t.moment,t.jQuery)}(this,function(t,e){var i=function(i,n,r){if(this.parentEl="body",this.element=e(i),this.startDate=t().startOf("day"),this.endDate=t().endOf("day"),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyClass="btn-success",this.cancelClass="btn-default",this.locale={direction:"ltr",format:t.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:t.weekdaysMin(),monthNames:t.monthsShort(),firstDay:t.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof n&&null!==n||(n={}),"string"==typeof(n=e.extend(this.element.data(),n)).template||n.template instanceof e||(n.template='<div class="daterangepicker dropdown-menu"><div class="calendar left"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_start" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="calendar right"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_end" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="ranges"><div class="range_inputs"><button class="applyBtn" disabled="disabled" type="button"></button> <button class="cancelBtn" type="button"></button></div></div></div>'),this.parentEl=e(n.parentEl&&e(n.parentEl).length?n.parentEl:this.parentEl),this.container=e(n.template).appendTo(this.parentEl),"object"==typeof n.locale&&("string"==typeof n.locale.direction&&(this.locale.direction=n.locale.direction),"string"==typeof n.locale.format&&(this.locale.format=n.locale.format),"string"==typeof n.locale.separator&&(this.locale.separator=n.locale.separator),"object"==typeof n.locale.daysOfWeek&&(this.locale.daysOfWeek=n.locale.daysOfWeek.slice()),"object"==typeof n.locale.monthNames&&(this.locale.monthNames=n.locale.monthNames.slice()),"number"==typeof n.locale.firstDay&&(this.locale.firstDay=n.locale.firstDay),"string"==typeof n.locale.applyLabel&&(this.locale.applyLabel=n.locale.applyLabel),"string"==typeof n.locale.cancelLabel&&(this.locale.cancelLabel=n.locale.cancelLabel),"string"==typeof n.locale.weekLabel&&(this.locale.weekLabel=n.locale.weekLabel),"string"==typeof n.locale.customRangeLabel)){(u=document.createElement("textarea")).innerHTML=n.locale.customRangeLabel;p=u.value;this.locale.customRangeLabel=p}if(this.container.addClass(this.locale.direction),"string"==typeof n.startDate&&(this.startDate=t(n.startDate,this.locale.format)),"string"==typeof n.endDate&&(this.endDate=t(n.endDate,this.locale.format)),"string"==typeof n.minDate&&(this.minDate=t(n.minDate,this.locale.format)),"string"==typeof n.maxDate&&(this.maxDate=t(n.maxDate,this.locale.format)),"object"==typeof n.startDate&&(this.startDate=t(n.startDate)),"object"==typeof n.endDate&&(this.endDate=t(n.endDate)),"object"==typeof n.minDate&&(this.minDate=t(n.minDate)),"object"==typeof n.maxDate&&(this.maxDate=t(n.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof n.applyClass&&(this.applyClass=n.applyClass),"string"==typeof n.cancelClass&&(this.cancelClass=n.cancelClass),"object"==typeof n.dateLimit&&(this.dateLimit=n.dateLimit),"string"==typeof n.opens&&(this.opens=n.opens),"string"==typeof n.drops&&(this.drops=n.drops),"boolean"==typeof n.showWeekNumbers&&(this.showWeekNumbers=n.showWeekNumbers),"boolean"==typeof n.showISOWeekNumbers&&(this.showISOWeekNumbers=n.showISOWeekNumbers),"string"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses),"object"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses.join(" ")),"boolean"==typeof n.showDropdowns&&(this.showDropdowns=n.showDropdowns),"boolean"==typeof n.showCustomRangeLabel&&(this.showCustomRangeLabel=n.showCustomRangeLabel),"boolean"==typeof n.singleDatePicker&&(this.singleDatePicker=n.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof n.timePicker&&(this.timePicker=n.timePicker),"boolean"==typeof n.timePickerSeconds&&(this.timePickerSeconds=n.timePickerSeconds),"number"==typeof n.timePickerIncrement&&(this.timePickerIncrement=n.timePickerIncrement),"boolean"==typeof n.timePicker24Hour&&(this.timePicker24Hour=n.timePicker24Hour),"boolean"==typeof n.autoApply&&(this.autoApply=n.autoApply),"boolean"==typeof n.autoUpdateInput&&(this.autoUpdateInput=n.autoUpdateInput),"boolean"==typeof n.linkedCalendars&&(this.linkedCalendars=n.linkedCalendars),"function"==typeof n.isInvalidDate&&(this.isInvalidDate=n.isInvalidDate),"function"==typeof n.isCustomDate&&(this.isCustomDate=n.isCustomDate),"boolean"==typeof n.alwaysShowCalendars&&(this.alwaysShowCalendars=n.alwaysShowCalendars),0!=this.locale.firstDay)for(var o=this.locale.firstDay;o>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),o--;var s,a,l;if(void 0===n.startDate&&void 0===n.endDate&&e(this.element).is("input[type=text]")){var c=e(this.element).val(),h=c.split(this.locale.separator);s=a=null,2==h.length?(s=t(h[0],this.locale.format),a=t(h[1],this.locale.format)):this.singleDatePicker&&""!==c&&(s=t(c,this.locale.format),a=t(c,this.locale.format)),null!==s&&null!==a&&(this.setStartDate(s),this.setEndDate(a))}if("object"==typeof n.ranges){for(l in n.ranges){s="string"==typeof n.ranges[l][0]?t(n.ranges[l][0],this.locale.format):t(n.ranges[l][0]),a="string"==typeof n.ranges[l][1]?t(n.ranges[l][1],this.locale.format):t(n.ranges[l][1]),this.minDate&&s.isBefore(this.minDate)&&(s=this.minDate.clone());var d=this.maxDate;if(this.dateLimit&&d&&s.clone().add(this.dateLimit).isAfter(d)&&(d=s.clone().add(this.dateLimit)),d&&a.isAfter(d)&&(a=d.clone()),!(this.minDate&&a.isBefore(this.minDate,this.timepicker?"minute":"day")||d&&s.isAfter(d,this.timepicker?"minute":"day"))){var u=document.createElement("textarea");u.innerHTML=l;var p=u.value;this.ranges[p]=[s,a]}}var f="<ul>";for(l in this.ranges)f+='<li data-range-key="'+l+'">'+l+"</li>";this.showCustomRangeLabel&&(f+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+"</li>"),f+="</ul>",this.container.find(".ranges").prepend(f)}"function"==typeof r&&(this.callback=r),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&"object"!=typeof n.ranges?this.container.find(".ranges").hide():this.autoApply&&this.container.find(".applyBtn, .cancelBtn").addClass("hide"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".calendar.left").addClass("single"),this.container.find(".calendar.left").show(),this.container.find(".calendar.right").hide(),this.container.find(".daterangepicker_input input, .daterangepicker_input > i").hide(),this.timePicker?this.container.find(".ranges ul").hide():this.container.find(".ranges").hide()),(void 0===n.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),void 0!==n.ranges&&"right"==this.opens&&this.container.find(".ranges").prependTo(this.container.find(".calendar.left").parent()),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",e.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)).on("click.daterangepicker",".daterangepicker_input input",e.proxy(this.showCalendars,this)).on("focus.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsFocused,this)).on("blur.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsBlurred,this)).on("change.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsChanged,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)).on("click.daterangepicker","li",e.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",e.proxy(this.hoverRange,this)).on("mouseleave.daterangepicker","li",e.proxy(this.updateFormInputs,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))};return i.prototype={constructor:i,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.dateLimit&&this.startDate.clone().add(this.dateLimit).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit)),this.previousRightTime=this.endDate.clone(),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate?(this.container.find('input[name="daterangepicker_end"]').removeClass("active"),this.container.find('input[name="daterangepicker_start"]').addClass("active")):(this.container.find('input[name="daterangepicker_end"]').addClass("active"),this.container.find('input[name="daterangepicker_start"]').removeClass("active")),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){if(this.timePicker){var t,e,i;if(this.endDate)t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),i=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(n=this.container.find(".left .ampmselect").val())&&t<12&&(t+=12),"AM"===n&&12===t&&(t=0));else if(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),i=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour){var n=this.container.find(".right .ampmselect").val();"PM"===n&&t<12&&(t+=12),"AM"===n&&12===t&&(t=0)}this.leftCalendar.month.hour(t).minute(e).second(i),this.rightCalendar.month.hour(t).minute(e).second(i)}this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(i){var n="left"==i?this.leftCalendar:this.rightCalendar,r=n.month.month(),o=n.month.year(),s=n.month.hour(),a=n.month.minute(),l=n.month.second(),c=t([o,r]).daysInMonth(),h=t([o,r,1]),d=t([o,r,c]),u=t(h).subtract(1,"month").month(),p=t(h).subtract(1,"month").year(),f=t([p,u]).daysInMonth(),m=h.day();(n=[]).firstDay=h,n.lastDay=d;for(y=0;y<6;y++)n[y]=[];var g=f-m+this.locale.firstDay+1;g>f&&(g-=7),m==this.locale.firstDay&&(g=f-6);for(var v=t([p,u,g,12,a,l]),y=0,b=0,_=0;y<42;y++,b++,v=t(v).add(24,"hour"))y>0&&b%7==0&&(b=0,_++),n[_][b]=v.clone().hour(s).minute(a).second(l),v.hour(12),this.minDate&&n[_][b].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&n[_][b].isBefore(this.minDate)&&"left"==i&&(n[_][b]=this.minDate.clone()),this.maxDate&&n[_][b].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&n[_][b].isAfter(this.maxDate)&&"right"==i&&(n[_][b]=this.maxDate.clone());"left"==i?this.leftCalendar.calendar=n:this.rightCalendar.calendar=n;var x="left"==i?this.minDate:this.startDate,w=this.maxDate,k=("left"==i?this.startDate:this.endDate,"ltr"==this.locale.direction?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"}),S='<table class="table-condensed">';S+="<thead>",S+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(S+="<th></th>"),x&&!x.isBefore(n.firstDay)||this.linkedCalendars&&"left"!=i?S+="<th></th>":S+='<th class="prev available"><i class="fa fa-'+k.left+" glyphicon glyphicon-"+k.left+'"></i></th>';var C=this.locale.monthNames[n[1][1].month()]+n[1][1].format(" YYYY");if(this.showDropdowns){for(var D=n[1][1].month(),T=n[1][1].year(),A=w&&w.year()||T+5,M=x&&x.year()||T-50,E=T==M,P=T==A,I='<select class="monthselect">',O=0;O<12;O++)(!E||O>=x.month())&&(!P||O<=w.month())?I+="<option value='"+O+"'"+(O===D?" selected='selected'":"")+">"+this.locale.monthNames[O]+"</option>":I+="<option value='"+O+"'"+(O===D?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[O]+"</option>";I+="</select>";for(var N='<select class="yearselect">',F=M;F<=A;F++)N+='<option value="'+F+'"'+(F===T?' selected="selected"':"")+">"+F+"</option>";C=I+(N+="</select>")}if(S+='<th colspan="5" class="month">'+C+"</th>",w&&!w.isAfter(n.lastDay)||this.linkedCalendars&&"right"!=i&&!this.singleDatePicker?S+="<th></th>":S+='<th class="next available"><i class="fa fa-'+k.right+" glyphicon glyphicon-"+k.right+'"></i></th>',S+="</tr>",S+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(S+='<th class="week">'+this.locale.weekLabel+"</th>"),e.each(this.locale.daysOfWeek,function(t,e){S+="<th>"+e+"</th>"}),S+="</tr>",S+="</thead>",S+="<tbody>",null==this.endDate&&this.dateLimit){var L=this.startDate.clone().add(this.dateLimit).endOf("day");w&&!L.isBefore(w)||(w=L)}for(_=0;_<6;_++){S+="<tr>",this.showWeekNumbers?S+='<td class="week">'+n[_][0].week()+"</td>":this.showISOWeekNumbers&&(S+='<td class="week">'+n[_][0].isoWeek()+"</td>");for(b=0;b<7;b++){var j=[];n[_][b].isSame(new Date,"day")&&j.push("today"),n[_][b].isoWeekday()>5&&j.push("weekend"),n[_][b].month()!=n[1][1].month()&&j.push("off"),this.minDate&&n[_][b].isBefore(this.minDate,"day")&&j.push("off","disabled"),w&&n[_][b].isAfter(w,"day")&&j.push("off","disabled"),this.isInvalidDate(n[_][b])&&j.push("off","disabled"),n[_][b].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&j.push("active","start-date"),null!=this.endDate&&n[_][b].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&j.push("active","end-date"),null!=this.endDate&&n[_][b]>this.startDate&&n[_][b]<this.endDate&&j.push("in-range");var R=this.isCustomDate(n[_][b]);!1!==R&&("string"==typeof R?j.push(R):Array.prototype.push.apply(j,R));for(var $="",H=!1,y=0;y<j.length;y++)$+=j[y]+" ","disabled"==j[y]&&(H=!0);H||($+="available"),S+='<td class="'+$.replace(/^\s+|\s+$/g,"")+'" data-title="r'+_+"c"+b+'">'+n[_][b].date()+"</td>"}S+="</tr>"}S+="</tbody>",S+="</table>",this.container.find(".calendar."+i+" .calendar-table").html(S)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,i,n,r=this.maxDate;if(!this.dateLimit||this.maxDate&&!this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)||(r=this.startDate.clone().add(this.dateLimit)),"left"==t)i=this.startDate.clone(),n=this.minDate;else if("right"==t){i=this.endDate.clone(),n=this.startDate;var o=this.container.find(".calendar.right .calendar-time div");if(""!=o.html()&&(i.hour(o.find(".hourselect option:selected").val()||i.hour()),i.minute(o.find(".minuteselect option:selected").val()||i.minute()),i.second(o.find(".secondselect option:selected").val()||i.second()),!this.timePicker24Hour)){var s=o.find(".ampmselect option:selected").val();"PM"===s&&i.hour()<12&&i.hour(i.hour()+12),"AM"===s&&12===i.hour()&&i.hour(0)}i.isBefore(this.startDate)&&(i=this.startDate.clone()),r&&i.isAfter(r)&&(i=r.clone())}e='<select class="hourselect">';for(var a=this.timePicker24Hour?0:1,l=this.timePicker24Hour?23:12,c=a;c<=l;c++){var h=c;this.timePicker24Hour||(h=i.hour()>=12?12==c?12:c+12:12==c?0:c);var d=i.clone().hour(h),u=!1;n&&d.minute(59).isBefore(n)&&(u=!0),r&&d.minute(0).isAfter(r)&&(u=!0),h!=i.hour()||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+c+"</option>":'<option value="'+c+'">'+c+"</option>":e+='<option value="'+c+'" selected="selected">'+c+"</option>"}e+="</select> ",e+=': <select class="minuteselect">';for(c=0;c<60;c+=this.timePickerIncrement){var p=c<10?"0"+c:c,d=i.clone().minute(c),u=!1;n&&d.second(59).isBefore(n)&&(u=!0),r&&d.second(0).isAfter(r)&&(u=!0),i.minute()!=c||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+p+"</option>":'<option value="'+c+'">'+p+"</option>":e+='<option value="'+c+'" selected="selected">'+p+"</option>"}if(e+="</select> ",this.timePickerSeconds){e+=': <select class="secondselect">';for(c=0;c<60;c++){var p=c<10?"0"+c:c,d=i.clone().second(c),u=!1;n&&d.isBefore(n)&&(u=!0),r&&d.isAfter(r)&&(u=!0),i.second()!=c||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+p+"</option>":'<option value="'+c+'">'+p+"</option>":e+='<option value="'+c+'" selected="selected">'+p+"</option>"}e+="</select> "}if(!this.timePicker24Hour){e+='<select class="ampmselect">';var f="",m="";n&&i.clone().hour(12).minute(0).second(0).isBefore(n)&&(f=' disabled="disabled" class="disabled"'),r&&i.clone().hour(0).minute(0).second(0).isAfter(r)&&(m=' disabled="disabled" class="disabled"'),i.hour()>=12?e+='<option value="AM"'+f+'>AM</option><option value="PM" selected="selected"'+m+">PM</option>":e+='<option value="AM" selected="selected"'+f+'>AM</option><option value="PM"'+m+">PM</option>",e+="</select>"}this.container.find(".calendar."+t+" .calendar-time div").html(e)}},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)),this.endDate&&this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)),this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled"))},move:function(){var t,i={top:0,left:0},n=e(window).width();this.parentEl.is("body")||(i={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},n=this.parentEl[0].clientWidth+this.parentEl.offset().left),t="up"==this.drops?this.element.offset().top-this.container.outerHeight()-i.top:this.element.offset().top+this.element.outerHeight()-i.top,this.container["up"==this.drops?"addClass":"removeClass"]("dropup"),"left"==this.opens?(this.container.css({top:t,right:n-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:t,left:this.element.offset().left-i.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:t,left:this.element.offset().left-i.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>e(window).width()&&this.container.css({left:"auto",right:0}))},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy(function(t){this.outsideClick(t)},this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy(function(t){this.move(t)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate,this.endDate,this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var i=e(t.target);"focusin"==t.type||i.closest(this.element).length||i.closest(this.container).length||i.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},hoverRange:function(t){if(!this.container.find("input[name=daterangepicker_start]").is(":focus")&&!this.container.find("input[name=daterangepicker_end]").is(":focus")){var e=t.target.getAttribute("data-range-key");if(e==this.locale.customRangeLabel)this.updateView();else{var i=this.ranges[e];this.container.find("input[name=daterangepicker_start]").val(i[0].format(this.locale.format)),this.container.find("input[name=daterangepicker_end]").val(i[1].format(this.locale.format))}}},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var i=this.ranges[e];this.startDate=i[0],this.endDate=i[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){e(t.target).parents(".calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),n=i.substr(1,1),r=i.substr(3,1),o=e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.calendar[n][r]:this.rightCalendar.calendar[n][r];this.endDate&&!this.container.find("input[name=daterangepicker_start]").is(":focus")?this.container.find("input[name=daterangepicker_start]").val(o.format(this.locale.format)):this.endDate||this.container.find("input[name=daterangepicker_end]").is(":focus")||this.container.find("input[name=daterangepicker_end]").val(o.format(this.locale.format));var s=this.leftCalendar,a=this.rightCalendar,l=this.startDate;this.endDate||this.container.find(".calendar tbody td").each(function(t,i){if(!e(i).hasClass("week")){var n=e(i).attr("data-title"),r=n.substr(1,1),c=n.substr(3,1),h=e(i).parents(".calendar").hasClass("left")?s.calendar[r][c]:a.calendar[r][c];h.isAfter(l)&&h.isBefore(o)||h.isSame(o,"day")?e(i).addClass("in-range"):e(i).removeClass("in-range")}})}},clickDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),n=i.substr(1,1),r=i.substr(3,1),o=e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.calendar[n][r]:this.rightCalendar.calendar[n][r];if(this.endDate||o.isBefore(this.startDate,"day")){if(this.timePicker){l=parseInt(this.container.find(".left .hourselect").val(),10);this.timePicker24Hour||("PM"===(c=this.container.find(".left .ampmselect").val())&&l<12&&(l+=12),"AM"===c&&12===l&&(l=0));var s=parseInt(this.container.find(".left .minuteselect").val(),10),a=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;o=o.clone().hour(l).minute(s).second(a)}this.endDate=null,this.setStartDate(o.clone())}else if(!this.endDate&&o.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{if(this.timePicker){var l=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour){var c=this.container.find(".right .ampmselect").val();"PM"===c&&l<12&&(l+=12),"AM"===c&&12===l&&(l=0)}var s=parseInt(this.container.find(".right .minuteselect").val(),10),a=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;o=o.clone().hour(l).minute(s).second(a)}this.setEndDate(o.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var i in this.ranges){if(this.timePicker){if(this.startDate.isSame(this.ranges[i][0])&&this.endDate.isSame(this.ranges[i][1])){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[i][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[i][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}e++}t&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html():this.chosenLabel=null,this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var i=e(t.target).closest(".calendar").hasClass("left"),n=i?"left":"right",r=this.container.find(".calendar."+n),o=parseInt(r.find(".monthselect").val(),10),s=r.find(".yearselect").val();i||(s<this.startDate.year()||s==this.startDate.year()&&o<this.startDate.month())&&(o=this.startDate.month(),s=this.startDate.year()),this.minDate&&(s<this.minDate.year()||s==this.minDate.year()&&o<this.minDate.month())&&(o=this.minDate.month(),s=this.minDate.year()),this.maxDate&&(s>this.maxDate.year()||s==this.maxDate.year()&&o>this.maxDate.month())&&(o=this.maxDate.month(),s=this.maxDate.year()),i?(this.leftCalendar.month.month(o).year(s),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(o).year(s),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var i=e(t.target).closest(".calendar"),n=i.hasClass("left"),r=parseInt(i.find(".hourselect").val(),10),o=parseInt(i.find(".minuteselect").val(),10),s=this.timePickerSeconds?parseInt(i.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var a=i.find(".ampmselect").val();"PM"===a&&r<12&&(r+=12),"AM"===a&&12===r&&(r=0)}if(n){var l=this.startDate.clone();l.hour(r),l.minute(o),l.second(s),this.setStartDate(l),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==l.format("YYYY-MM-DD")&&this.endDate.isBefore(l)&&this.setEndDate(l.clone())}else if(this.endDate){var c=this.endDate.clone();c.hour(r),c.minute(o),c.second(s),this.setEndDate(c)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},formInputsChanged:function(i){var n=e(i.target).closest(".calendar").hasClass("right"),r=t(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),o=t(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);r.isValid()&&o.isValid()&&(n&&o.isBefore(r)&&(r=o.clone()),this.setStartDate(r),this.setEndDate(o),n?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))),this.updateView()},formInputsFocused:function(t){this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass("active"),e(t.target).addClass("active"),e(t.target).closest(".calendar").hasClass("right")&&(this.endDate=null,this.setStartDate(this.startDate.clone()),this.updateView())},formInputsBlurred:function(e){if(!this.endDate){var i=this.container.find('input[name="daterangepicker_end"]').val(),n=t(i,this.locale.format);n.isValid()&&(this.setEndDate(n),this.updateView())}},elementChanged:function(){if(this.element.is("input")&&this.element.val().length&&!(this.element.val().length<this.locale.format.length)){var e=this.element.val().split(this.locale.separator),i=null,n=null;2===e.length&&(i=t(e[0],this.locale.format),n=t(e[1],this.locale.format)),(this.singleDatePicker||null===i||null===n)&&(n=i=t(this.element.val(),this.locale.format)),i.isValid()&&n.isValid()&&(this.setStartDate(i),this.setEndDate(n),this.updateView())}},keydown:function(t){9!==t.keyCode&&13!==t.keyCode||this.hide()},updateElement:function(){this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},e.fn.daterangepicker=function(t,n){return this.each(function(){var r=e(this);r.data("daterangepicker")&&r.data("daterangepicker").remove(),r.data("daterangepicker",new i(r,t,n))}),this},i}),function(t){"use strict";function e(t,e){return t+".touchspin_"+e}function i(i,n){return t.map(i,function(t){return e(t,n)})}var n=0;t.fn.TouchSpin=function(e){if("destroy"!==e){var r={min:0,max:100,initval:"",replacementval:"",step:1,decimals:0,stepinterval:100,forcestepdivisibility:"round",stepintervaldelay:500,verticalbuttons:!1,verticalupclass:"glyphicon glyphicon-chevron-up",verticaldownclass:"glyphicon glyphicon-chevron-down",prefix:"",postfix:"",prefix_extraclass:"",postfix_extraclass:"",booster:!0,boostat:10,maxboostedstep:!1,mousewheel:!0,buttondown_class:"btn btn-default",buttonup_class:"btn btn-default",buttondown_txt:"-",buttonup_txt:"+"},o={min:"min",max:"max",initval:"init-val",replacementval:"replacement-val",step:"step",decimals:"decimals",stepinterval:"step-interval",verticalbuttons:"vertical-buttons",verticalupclass:"vertical-up-class",verticaldownclass:"vertical-down-class",forcestepdivisibility:"force-step-divisibility",stepintervaldelay:"step-interval-delay",prefix:"prefix",postfix:"postfix",prefix_extraclass:"prefix-extra-class",postfix_extraclass:"postfix-extra-class",booster:"booster",boostat:"boostat",maxboostedstep:"max-boosted-step",mousewheel:"mouse-wheel",buttondown_class:"button-down-class",buttonup_class:"button-up-class",buttondown_txt:"button-down-txt",buttonup_txt:"button-up-txt"};return this.each(function(){function s(){""!==D.initval&&""===N.val()&&N.val(D.initval)}function a(t){h(t),b();var e=A.input.val();""!==e&&(e=Number(A.input.val()),A.input.val(e.toFixed(D.decimals)))}function l(){D=t.extend({},r,F,c(),e)}function c(){var e={};return t.each(o,function(t,i){var n="bts-"+i;N.is("[data-"+n+"]")&&(e[t]=N.data(n))}),e}function h(e){D=t.extend({},D,e),e.postfix&&N.parent().find(".bootstrap-touchspin-postfix").text(e.postfix),e.prefix&&N.parent().find(".bootstrap-touchspin-prefix").text(e.prefix)}function d(){var t=N.val(),e=N.parent();""!==t&&(t=Number(t).toFixed(D.decimals)),N.data("initvalue",t).val(t),N.addClass("form-control"),e.hasClass("input-group")?u(e):p()}function u(e){e.addClass("bootstrap-touchspin");var i,n,r=N.prev(),o=N.next(),s='<span class="input-group-addon bootstrap-touchspin-prefix">'+D.prefix+"</span>",a='<span class="input-group-addon bootstrap-touchspin-postfix">'+D.postfix+"</span>";r.hasClass("input-group-btn")?(i='<button class="'+D.buttondown_class+' bootstrap-touchspin-down" type="button">'+D.buttondown_txt+"</button>",r.append(i)):(i='<span class="input-group-btn"><button class="'+D.buttondown_class+' bootstrap-touchspin-down" type="button">'+D.buttondown_txt+"</button></span>",t(i).insertBefore(N)),o.hasClass("input-group-btn")?(n='<button class="'+D.buttonup_class+' bootstrap-touchspin-up" type="button">'+D.buttonup_txt+"</button>",o.prepend(n)):(n='<span class="input-group-btn"><button class="'+D.buttonup_class+' bootstrap-touchspin-up" type="button">'+D.buttonup_txt+"</button></span>",t(n).insertAfter(N)),t(s).insertBefore(N),t(a).insertAfter(N),T=e}function p(){var e;e=D.verticalbuttons?'<div class="input-group bootstrap-touchspin"><span class="input-group-addon bootstrap-touchspin-prefix">'+D.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+D.postfix+'</span><span class="input-group-btn-vertical"><button class="'+D.buttondown_class+' bootstrap-touchspin-up" type="button"><i class="'+D.verticalupclass+'"></i></button><button class="'+D.buttonup_class+' bootstrap-touchspin-down" type="button"><i class="'+D.verticaldownclass+'"></i></button></span></div>':'<div class="input-group bootstrap-touchspin"><span class="input-group-btn"><button class="'+D.buttondown_class+' bootstrap-touchspin-down" type="button">'+D.buttondown_txt+'</button></span><span class="input-group-addon bootstrap-touchspin-prefix">'+D.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+D.postfix+'</span><span class="input-group-btn"><button class="'+D.buttonup_class+' bootstrap-touchspin-up" type="button">'+D.buttonup_txt+"</button></span></div>",T=t(e).insertBefore(N),t(".bootstrap-touchspin-prefix",T).after(N),N.hasClass("input-sm")?T.addClass("input-group-sm"):N.hasClass("input-lg")&&T.addClass("input-group-lg")}function f(){A={down:t(".bootstrap-touchspin-down",T),up:t(".bootstrap-touchspin-up",T),input:t("input",T),prefix:t(".bootstrap-touchspin-prefix",T).addClass(D.prefix_extraclass),postfix:t(".bootstrap-touchspin-postfix",T).addClass(D.postfix_extraclass)}}function m(){""===D.prefix&&A.prefix.hide(),""===D.postfix&&A.postfix.hide()}function g(){N.on("keydown",function(t){var e=t.keyCode||t.which;38===e?("up"!==j&&(x(),S()),t.preventDefault()):40===e&&("down"!==j&&(w(),k()),t.preventDefault())}),N.on("keyup",function(t){var e=t.keyCode||t.which;38===e?C():40===e&&C()}),N.on("blur",function(){b()}),A.down.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("down"!==j&&(w(),k()),t.preventDefault())}),A.down.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||C()}),A.up.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("up"!==j&&(x(),S()),t.preventDefault())}),A.up.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||C()}),A.down.on("mousedown.touchspin",function(t){A.down.off("touchstart.touchspin"),N.is(":disabled")||(w(),k(),t.preventDefault(),t.stopPropagation())}),A.down.on("touchstart.touchspin",function(t){A.down.off("mousedown.touchspin"),N.is(":disabled")||(w(),k(),t.preventDefault(),t.stopPropagation())}),A.up.on("mousedown.touchspin",function(t){A.up.off("touchstart.touchspin"),N.is(":disabled")||(x(),S(),t.preventDefault(),t.stopPropagation())}),A.up.on("touchstart.touchspin",function(t){A.up.off("mousedown.touchspin"),N.is(":disabled")||(x(),S(),t.preventDefault(),t.stopPropagation())}),A.up.on("mouseout touchleave touchend touchcancel",function(t){j&&(t.stopPropagation(),C())}),A.down.on("mouseout touchleave touchend touchcancel",function(t){j&&(t.stopPropagation(),C())}),A.down.on("mousemove touchmove",function(t){j&&(t.stopPropagation(),t.preventDefault())}),A.up.on("mousemove touchmove",function(t){j&&(t.stopPropagation(),t.preventDefault())}),t(document).on(i(["mouseup","touchend","touchcancel"],n).join(" "),function(t){j&&(t.preventDefault(),C())}),t(document).on(i(["mousemove","touchmove","scroll","scrollstart"],n).join(" "),function(t){j&&(t.preventDefault(),C())}),N.on("mousewheel DOMMouseScroll",function(t){if(D.mousewheel&&N.is(":focus")){var e=t.originalEvent.wheelDelta||-t.originalEvent.deltaY||-t.originalEvent.detail;t.stopPropagation(),t.preventDefault(),e<0?w():x()}})}function v(){N.on("touchspin.uponce",function(){C(),x()}),N.on("touchspin.downonce",function(){C(),w()}),N.on("touchspin.startupspin",function(){S()}),N.on("touchspin.startdownspin",function(){k()}),N.on("touchspin.stopspin",function(){C()}),N.on("touchspin.updatesettings",function(t,e){a(e)})}function y(t){switch(D.forcestepdivisibility){case"round":return(Math.round(t/D.step)*D.step).toFixed(D.decimals);case"floor":return(Math.floor(t/D.step)*D.step).toFixed(D.decimals);case"ceil":return(Math.ceil(t/D.step)*D.step).toFixed(D.decimals);default:return t}}function b(){var t,e,i;""!==(t=N.val())?D.decimals>0&&"."===t||(e=parseFloat(t),isNaN(e)&&(e=""!==D.replacementval?D.replacementval:0),i=e,e.toString()!==t&&(i=e),e<D.min&&(i=D.min),e>D.max&&(i=D.max),i=y(i),Number(t).toString()!==i.toString()&&(N.val(i),N.trigger("change"))):""!==D.replacementval&&(N.val(D.replacementval),N.trigger("change"))}function _(){if(D.booster){var t=Math.pow(2,Math.floor(L/D.boostat))*D.step;return D.maxboostedstep&&t>D.maxboostedstep&&(t=D.maxboostedstep,M=Math.round(M/t)*t),Math.max(D.step,t)}return D.step}function x(){b(),M=parseFloat(A.input.val()),isNaN(M)&&(M=0);var t=M,e=_();(M+=e)>D.max&&(M=D.max,N.trigger("touchspin.on.max"),C()),A.input.val(Number(M).toFixed(D.decimals)),t!==M&&N.trigger("change")}function w(){b(),M=parseFloat(A.input.val()),isNaN(M)&&(M=0);var t=M,e=_();(M-=e)<D.min&&(M=D.min,N.trigger("touchspin.on.min"),C()),A.input.val(M.toFixed(D.decimals)),t!==M&&N.trigger("change")}function k(){C(),L=0,j="down",N.trigger("touchspin.on.startspin"),N.trigger("touchspin.on.startdownspin"),I=setTimeout(function(){E=setInterval(function(){L++,w()},D.stepinterval)},D.stepintervaldelay)}function S(){C(),L=0,j="up",N.trigger("touchspin.on.startspin"),N.trigger("touchspin.on.startupspin"),O=setTimeout(function(){P=setInterval(function(){L++,x()},D.stepinterval)},D.stepintervaldelay)}function C(){switch(clearTimeout(I),clearTimeout(O),clearInterval(E),clearInterval(P),j){case"up":N.trigger("touchspin.on.stopupspin"),N.trigger("touchspin.on.stopspin");break;case"down":N.trigger("touchspin.on.stopdownspin"),N.trigger("touchspin.on.stopspin")}L=0,j=!1}var D,T,A,M,E,P,I,O,N=t(this),F=N.data(),L=0,j=!1;N.data("alreadyinitialized")||(N.data("alreadyinitialized",!0),n+=1,N.data("spinnerid",n),N.is("input")?(l(),s(),b(),d(),f(),m(),g(),v(),A.input.css("display","block")):console.log("Must be an input."))})}this.each(function(){var e=t(this).data();t(document).off(i(["mouseup","touchend","touchcancel","mousemove","touchmove","scroll","scrollstart"],e.spinnerid).join(" "))})}}(jQuery),function(t){"use strict";t.event.special.destroyed||(t.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}),t.fn.extend({maxlength:function(e,i){function n(t){var i=t.val();i=e.twoCharLinebreak?i.replace(/\r(?!\n)|\n(?!\r)/g,"\r\n"):i.replace(new RegExp("\r?\n","g"),"\n");return e.utf8?o(i):i.length}function r(t,i){var n=t.val(),r=0;e.twoCharLinebreak&&"\n"===(n=n.replace(/\r(?!\n)|\n(?!\r)/g,"\r\n")).substr(n.length-1)&&n.length%2==1&&(r=1),t.val(n.substr(0,i-r))}function o(t){for(var e=0,i=0;i<t.length;i++){var n=t.charCodeAt(i);n<128?e++:e+=n>127&&n<2048?2:3}return e}function s(t,i,r){var o=!0;return!e.alwaysShow&&r-n(t)>i&&(o=!1),o}function a(t,e){return e-n(t)}function l(t,e){e.css({display:"block"}),t.trigger("maxlength.shown")}function c(t,i){e.alwaysShow||(i.css({display:"none"}),t.trigger("maxlength.hidden"))}function h(t,i,n){var r="";return e.message?r="function"==typeof e.message?e.message(t,i):e.message.replace("%charsTyped%",n).replace("%charsRemaining%",i-n).replace("%charsTotal%",i):(e.preText&&(r+=e.preText),e.showCharsTyped?r+=n:r+=i-n,e.showMaxLength&&(r+=e.separator+i),e.postText&&(r+=e.postText)),r}function d(t,i,n,r){r&&(r.html(h(i.val(),n,n-t)),t>0?s(i,e.threshold,n)?l(i,r.removeClass(e.limitReachedClass).addClass(e.warningClass)):c(i,r):l(i,r.removeClass(e.warningClass).addClass(e.limitReachedClass))),e.customMaxAttribute&&(t<0?i.addClass("overmax"):i.removeClass("overmax"))}function u(e){var i=e[0];return t.extend({},"function"==typeof i.getBoundingClientRect?i.getBoundingClientRect():{width:i.offsetWidth,height:i.offsetHeight},e.offset())}function p(i,n){var r=u(i);if("function"!==t.type(e.placement))if(t.isPlainObject(e.placement))f(e.placement,n);else{var o=i.outerWidth(),s=n.outerWidth(),a=n.width(),l=n.height();switch(e.appendToParent&&(r.top-=i.parent().offset().top,r.left-=i.parent().offset().left),e.placement){case"bottom":n.css({top:r.top+r.height,left:r.left+r.width/2-a/2});break;case"top":n.css({top:r.top-l,left:r.left+r.width/2-a/2});break;case"left":n.css({top:r.top+r.height/2-l/2,left:r.left-a});break;case"right":n.css({top:r.top+r.height/2-l/2,left:r.left+r.width});break;case"bottom-right":n.css({top:r.top+r.height,left:r.left+r.width});break;case"top-right":n.css({top:r.top-l,left:r.left+o});break;case"top-left":n.css({top:r.top-l,left:r.left-s});break;case"bottom-left":n.css({top:r.top+i.outerHeight(),left:r.left-s});break;case"centered-right":n.css({top:r.top+l/2,left:r.left+o-s-3});break;case"bottom-right-inside":n.css({top:r.top+r.height,left:r.left+r.width-s});break;case"top-right-inside":n.css({top:r.top-l,left:r.left+o-s});break;case"top-left-inside":n.css({top:r.top-l,left:r.left});break;case"bottom-left-inside":n.css({top:r.top+i.outerHeight(),left:r.left})}}else e.placement(i,n,r)}function f(i,n){if(i&&n){var r=["top","bottom","left","right","position"],o={};t.each(r,function(t,i){var n=e.placement[i];void 0!==n&&(o[i]=n)}),n.css(o)}}function m(){return"bottom-right-inside"===e.placement||"top-right-inside"===e.placement||"function"==typeof e.placement||e.message&&"function"==typeof e.message}function g(t){var i=t.attr("maxlength")||e.customMaxAttribute;if(e.customMaxAttribute&&!e.allowOverMax){var n=t.attr(e.customMaxAttribute);(!i||n<i)&&(i=n)}return i||(i=t.attr("size")),i}var v=t("body"),y={showOnReady:!1,alwaysShow:!1,threshold:10,warningClass:"label label-success",limitReachedClass:"label label-important label-danger",separator:" / ",preText:"",postText:"",showMaxLength:!0,placement:"bottom",message:null,showCharsTyped:!0,validate:!1,utf8:!1,appendToParent:!1,twoCharLinebreak:!0,customMaxAttribute:null,allowOverMax:!1};return t.isFunction(e)&&!i&&(i=e,e={}),e=t.extend(y,e),this.each(function(){function i(){var i=h(s.val(),n,"0");n=g(s),o||(o=t('<span class="bootstrap-maxlength"></span>').css({display:"none",position:"absolute",whiteSpace:"nowrap",zIndex:1099}).html(i)),s.is("textarea")&&(s.data("maxlenghtsizex",s.outerWidth()),s.data("maxlenghtsizey",s.outerHeight()),s.mouseup(function(){s.outerWidth()===s.data("maxlenghtsizex")&&s.outerHeight()===s.data("maxlenghtsizey")||p(s,o),s.data("maxlenghtsizex",s.outerWidth()),s.data("maxlenghtsizey",s.outerHeight())})),e.appendToParent?(s.parent().append(o),s.parent().css("position","relative")):v.append(o),d(a(s,g(s)),s,n,o),p(s,o)}var n,o,s=t(this);t(window).resize(function(){o&&p(s,o)}),e.showOnReady?s.ready(function(){i()}):s.focus(function(){i()}),s.on("maxlength.reposition",function(){p(s,o)}),s.on("destroyed",function(){o&&o.remove()}),s.on("blur",function(){!o||e.showOnReady||e.alwaysShow||o.remove()}),s.on("input",function(){var t=g(s),i=a(s,t),l=!0;return e.validate&&i<0?(r(s,t),l=!1):d(i,s,n,o),m()&&p(s,o),l})})}})}(jQuery),function(t,e){if("function"==typeof define&&define.amd)define(["jquery"],e);else if("undefined"!=typeof exports)e(require("jquery"));else{var i={exports:{}};e(t.jquery),t.bootstrapSwitch=i.exports}}(this,function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(t){return t&&t.__esModule?t:{default:t}}(t),n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},r=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}}(),o=i.default||window.jQuery||window.$,s=function(){function t(i){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(this,t),this.$element=o(i),this.options=o.extend({},o.fn.bootstrapSwitch.defaults,this._getElementOptions(),r),this.prevOptions={},this.$wrapper=o("<div>",{class:function(){var t=[];return t.push(n.options.state?"on":"off"),n.options.size&&t.push(n.options.size),n.options.disabled&&t.push("disabled"),n.options.readonly&&t.push("readonly"),n.options.indeterminate&&t.push("indeterminate"),n.options.inverse&&t.push("inverse"),n.$element.attr("id")&&t.push("id-"+n.$element.attr("id")),t.map(n._getClass.bind(n)).concat([n.options.baseClass],n._getClasses(n.options.wrapperClass)).join(" ")}}),this.$container=o("<div>",{class:this._getClass("container")}),this.$on=o("<span>",{html:this.options.onText,class:this._getClass("handle-on")+" "+this._getClass(this.options.onColor)}),this.$off=o("<span>",{html:this.options.offText,class:this._getClass("handle-off")+" "+this._getClass(this.options.offColor)}),this.$label=o("<span>",{html:this.options.labelText,class:this._getClass("label")}),this.$element.on("init.bootstrapSwitch",this.options.onInit.bind(this,i)),this.$element.on("switchChange.bootstrapSwitch",function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];!1===n.options.onSwitchChange.apply(i,e)&&(n.$element.is(":radio")?o('[name="'+n.$element.attr("name")+'"]').trigger("previousState.bootstrapSwitch",!0):n.$element.trigger("previousState.bootstrapSwitch",!0))}),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return r(t,[{key:"setPrevOptions",value:function(){this.prevOptions=n({},this.options)}},{key:"state",value:function(t,e){return void 0===t?this.options.state:this.options.disabled||this.options.readonly||this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.$element.is(":radio")?o('[name="'+this.$element.attr("name")+'"]').trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),this.$element.prop("checked",Boolean(t)).trigger("change.bootstrapSwitch",e),this.$element)}},{key:"toggleState",value:function(t){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",t)}},{key:"size",value:function(t){return void 0===t?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this._getClass(this.options.size)),t&&this.$wrapper.addClass(this._getClass(t)),this._width(),this._containerPosition(),this.options.size=t,this.$element)}},{key:"animate",value:function(t){return void 0===t?this.options.animate:this.options.animate===Boolean(t)?this.$element:this.toggleAnimate()}},{key:"toggleAnimate",value:function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this._getClass("animate")),this.$element}},{key:"disabled",value:function(t){return void 0===t?this.options.disabled:this.options.disabled===Boolean(t)?this.$element:this.toggleDisabled()}},{key:"toggleDisabled",value:function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this._getClass("disabled")),this.$element}},{key:"readonly",value:function(t){return void 0===t?this.options.readonly:this.options.readonly===Boolean(t)?this.$element:this.toggleReadonly()}},{key:"toggleReadonly",value:function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this._getClass("readonly")),this.$element}},{key:"indeterminate",value:function(t){return void 0===t?this.options.indeterminate:this.options.indeterminate===Boolean(t)?this.$element:this.toggleIndeterminate()}},{key:"toggleIndeterminate",value:function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this._getClass("indeterminate")),this._containerPosition(),this.$element}},{key:"inverse",value:function(t){return void 0===t?this.options.inverse:this.options.inverse===Boolean(t)?this.$element:this.toggleInverse()}},{key:"toggleInverse",value:function(){this.$wrapper.toggleClass(this._getClass("inverse"));var t=this.$on.clone(!0),e=this.$off.clone(!0);return this.$on.replaceWith(e),this.$off.replaceWith(t),this.$on=e,this.$off=t,this.options.inverse=!this.options.inverse,this.$element}},{key:"onColor",value:function(t){return void 0===t?this.options.onColor:(this.options.onColor&&this.$on.removeClass(this._getClass(this.options.onColor)),this.$on.addClass(this._getClass(t)),this.options.onColor=t,this.$element)}},{key:"offColor",value:function(t){return void 0===t?this.options.offColor:(this.options.offColor&&this.$off.removeClass(this._getClass(this.options.offColor)),this.$off.addClass(this._getClass(t)),this.options.offColor=t,this.$element)}},{key:"onText",value:function(t){return void 0===t?this.options.onText:(this.$on.html(t),this._width(),this._containerPosition(),this.options.onText=t,this.$element)}},{key:"offText",value:function(t){return void 0===t?this.options.offText:(this.$off.html(t),this._width(),this._containerPosition(),this.options.offText=t,this.$element)}},{key:"labelText",value:function(t){return void 0===t?this.options.labelText:(this.$label.html(t),this._width(),this.options.labelText=t,this.$element)}},{key:"handleWidth",value:function(t){return void 0===t?this.options.handleWidth:(this.options.handleWidth=t,this._width(),this._containerPosition(),this.$element)}},{key:"labelWidth",value:function(t){return void 0===t?this.options.labelWidth:(this.options.labelWidth=t,this._width(),this._containerPosition(),this.$element)}},{key:"baseClass",value:function(t){return this.options.baseClass}},{key:"wrapperClass",value:function(t){return void 0===t?this.options.wrapperClass:(t||(t=o.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(t).join(" ")),this.options.wrapperClass=t,this.$element)}},{key:"radioAllOff",value:function(t){if(void 0===t)return this.options.radioAllOff;var e=Boolean(t);return this.options.radioAllOff===e?this.$element:(this.options.radioAllOff=e,this.$element)}},{key:"onInit",value:function(t){return void 0===t?this.options.onInit:(t||(t=o.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=t,this.$element)}},{key:"onSwitchChange",value:function(t){return void 0===t?this.options.onSwitchChange:(t||(t=o.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=t,this.$element)}},{key:"destroy",value:function(){var t=this.$element.closest("form");return t.length&&t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element}},{key:"_getElementOptions",value:function(){return{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")}}},{key:"_width",value:function(){var t=this,e=this.$on.add(this.$off).add(this.$label).css("width",""),i="auto"===this.options.handleWidth?Math.round(Math.max(this.$on.width(),this.$off.width())):this.options.handleWidth;return e.width(i),this.$label.width(function(e,n){return"auto"!==t.options.labelWidth?t.options.labelWidth:n<i?i:n}),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)}},{key:"_containerPosition",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.state;arguments[1];this.$container.css("margin-left",function(){var i=[0,"-"+t._handleWidth+"px"];return t.options.indeterminate?"-"+t._handleWidth/2+"px":e?t.options.inverse?i[1]:i[0]:t.options.inverse?i[0]:i[1]})}},{key:"_init",value:function(){var t=this,e=function(){t.setPrevOptions(),t._width(),t._containerPosition(),setTimeout(function(){if(t.options.animate)return t.$wrapper.addClass(t._getClass("animate"))},50)};if(this.$wrapper.is(":visible"))e();else var i=window.setInterval(function(){if(t.$wrapper.is(":visible"))return e(),window.clearInterval(i)},50)}},{key:"_elementHandlers",value:function(){var t=this;return this.$element.on({"setPreviousOptions.bootstrapSwitch":this.setPrevOptions.bind(this),"previousState.bootstrapSwitch":function(){t.options=t.prevOptions,t.options.indeterminate&&t.$wrapper.addClass(t._getClass("indeterminate")),t.$element.prop("checked",t.options.state).trigger("change.bootstrapSwitch",!0)},"change.bootstrapSwitch":function(e,i){e.preventDefault(),e.stopImmediatePropagation();var n=t.$element.is(":checked");t._containerPosition(n),n!==t.options.state&&(t.options.state=n,t.$wrapper.toggleClass(t._getClass("off")).toggleClass(t._getClass("on")),i||(t.$element.is(":radio")&&o('[name="'+t.$element.attr("name")+'"]').not(t.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),t.$element.trigger("switchChange.bootstrapSwitch",[n])))},"focus.bootstrapSwitch":function(e){e.preventDefault(),t.$wrapper.addClass(t._getClass("focused"))},"blur.bootstrapSwitch":function(e){e.preventDefault(),t.$wrapper.removeClass(t._getClass("focused"))},"keydown.bootstrapSwitch":function(e){!e.which||t.options.disabled||t.options.readonly||37!==e.which&&39!==e.which||(e.preventDefault(),e.stopImmediatePropagation(),t.state(39===e.which))}})}},{key:"_handleHandlers",value:function(){var t=this;return this.$on.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!1),t.$element.trigger("focus.bootstrapSwitch")}),this.$off.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!0),t.$element.trigger("focus.bootstrapSwitch")})}},{key:"_labelHandlers",value:function(){var t=this,e={click:function(t){t.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(e){t._dragStart||t.options.disabled||t.options.readonly||(e.preventDefault(),e.stopPropagation(),t._dragStart=(e.pageX||e.originalEvent.touches[0].pageX)-parseInt(t.$container.css("margin-left"),10),t.options.animate&&t.$wrapper.removeClass(t._getClass("animate")),t.$element.trigger("focus.bootstrapSwitch"))},"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(e){if(null!=t._dragStart){var i=(e.pageX||e.originalEvent.touches[0].pageX)-t._dragStart;e.preventDefault(),i<-t._handleWidth||i>0||(t._dragEnd=i,t.$container.css("margin-left",t._dragEnd+"px"))}},"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(e){if(t._dragStart){if(e.preventDefault(),t.options.animate&&t.$wrapper.addClass(t._getClass("animate")),t._dragEnd){var i=t._dragEnd>-t._handleWidth/2;t._dragEnd=!1,t.state(t.options.inverse?!i:i)}else t.state(!t.options.state);t._dragStart=!1}},"mouseleave.bootstrapSwitch":function(){t.$label.trigger("mouseup.bootstrapSwitch")}};this.$label.on(e)}},{key:"_externalLabelHandler",value:function(){var t=this,e=this.$element.closest("label");e.on("click",function(i){i.preventDefault(),i.stopImmediatePropagation(),i.target===e[0]&&t.toggleState()})}},{key:"_formHandler",value:function(){var t=this.$element.closest("form");t.data("bootstrap-switch")||t.on("reset.bootstrapSwitch",function(){window.setTimeout(function(){t.find("input").filter(function(){return o(this).data("bootstrap-switch")}).each(function(){return o(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)}},{key:"_getClass",value:function(t){return this.options.baseClass+"-"+t}},{key:"_getClasses",value:function(t){return o.isArray(t)?t.map(this._getClass.bind(this)):[this._getClass(t)]}}]),t}();o.fn.bootstrapSwitch=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Array.prototype.reduce.call(this,function(e,n){var r=o(n),a=r.data("bootstrap-switch"),l=a||new s(n,t);return a||r.data("bootstrap-switch",l),"string"==typeof t?l[t].apply(l,i):e},this)},o.fn.bootstrapSwitch.Constructor=s,o.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:"&nbsp",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}}),function(t){"use strict";var e=function(t,e){this.init("multiselectsplitter",t,e)};e.DEFAULTS={selectSize:null,maxSelectSize:null,clearOnFirstChange:!1,onlySameGroup:!1,groupCounter:!1,maximumSelected:null,afterInitialize:null,maximumAlert:function(t){alert("Only "+t+" values can be selected")},createFirstSelect:function(t,e){return"<option>"+t+"</option>"},createSecondSelect:function(t,e){return"<option>"+t+"</option>"},template:'<div class="row" data-multiselectsplitter-wrapper-selector><div class="col-xs-6 col-sm-6"><select class="form-control" data-multiselectsplitter-firstselect-selector></select></div> \x3c!-- Add the extra clearfix for only the required viewport --\x3e<div class="col-xs-6 col-sm-6"><select class="form-control" data-multiselectsplitter-secondselect-selector></select></div></div>'},e.prototype.init=function(i,n,r){var o=this;o.type=i,o.last$ElementSelected=[],o.initialized=!1,o.$element=t(n),o.$element.hide(),o.options=t.extend({},e.DEFAULTS,r),o.$element.after(o.options.template),o.$wrapper=o.$element.next("div[data-multiselectsplitter-wrapper-selector]"),o.$firstSelect=t("select[data-multiselectsplitter-firstselect-selector]",o.$wrapper),o.$secondSelect=t("select[data-multiselectsplitter-secondselect-selector]",o.$wrapper);var s=0,a=0;if(0!=o.$element.find("optgroup").length){o.$element.find("optgroup").each(function(){var e=t(this).attr("label"),i=t(o.options.createFirstSelect(e,o.$element));i.val(e),i.attr("data-current-label",i.text()),o.$firstSelect.append(i);var n=t(this).find("option").length;n>a&&(a=n),s++});var l=Math.max(s,a);l=Math.min(l,10),o.options.selectSize?l=o.options.selectSize:o.options.maxSelectSize&&(l=Math.min(l,o.options.maxSelectSize)),o.$firstSelect.attr("size",l),o.$secondSelect.attr("size",l),o.$element.attr("multiple")&&o.$secondSelect.attr("multiple","multiple"),o.$element.is(":disabled")&&o.disable(),o.$firstSelect.on("change",t.proxy(o.updateParentCategory,o)),o.$secondSelect.on("click change",t.proxy(o.updateChildCategory,o)),o.update=function(){if(!(o.$element.find("option").length<1)){var t,e=o.$element.find("option:selected:first");t=e.length?e.parent().attr("label"):o.$element.find("option:first").parent().attr("label"),o.$firstSelect.find('option[value="'+t+'"]').prop("selected",!0),o.$firstSelect.trigger("change")}},o.update(),o.initialized=!0,o.options.afterInitialize&&o.options.afterInitialize(o.$firstSelect,o.$secondSelect)}},e.prototype.disable=function(){this.$secondSelect.prop("disabled",!0),this.$firstSelect.prop("disabled",!0)},e.prototype.enable=function(){this.$secondSelect.prop("disabled",!1),this.$firstSelect.prop("disabled",!1)},e.prototype.createSecondSelect=function(){var e=this;e.$secondSelect.empty(),t.each(e.$element.find('optgroup[label="'+e.$firstSelect.val()+'"] option'),function(i,n){var r=t(this).val(),o=t(this).text(),s=t(e.options.createSecondSelect(o,e.$firstSelect));s.val(r),t.each(e.$element.find("option:selected"),function(e,i){t(i).val()==r&&s.prop("selected",!0)}),e.$secondSelect.append(s)})},e.prototype.updateParentCategory=function(){var t=this;t.last$ElementSelected=t.$element.find("option:selected"),t.options.clearOnFirstChange&&t.initialized&&t.$element.find("option:selected").prop("selected",!1),t.createSecondSelect(),t.checkSelected(),t.updateCounter()},e.prototype.updateCounter=function(){var e=this;e.$element.attr("multiple")&&e.options.groupCounter&&t.each(e.$firstSelect.find("option"),function(i,n){var r=t(n).val(),o=t(n).data("currentLabel"),s=e.$element.find('optgroup[label="'+r+'"] option:selected').length;s>0&&(o+=" ("+s+")"),t(n).html(o)})},e.prototype.checkSelected=function(){var e=this;if(e.$element.attr("multiple")&&e.options.maximumSelected){var i=0;if(!((i="function"==typeof e.options.maximumSelected?e.options.maximumSelected(e.$firstSelect,e.$secondSelect):e.options.maximumSelected)<1)&&e.$element.find("option:selected").length>i){e.$firstSelect.find("option:selected").prop("selected",!1),e.$secondSelect.find("option:selected").prop("selected",!1),e.initialized?(e.$element.find("option:selected").prop("selected",!1),e.last$ElementSelected.prop("selected",!0)):t.each(e.$element.find("option:selected"),function(e,n){e>i-1&&t(n).prop("selected",!1)});var n=e.last$ElementSelected.first().parent().attr("label");e.$firstSelect.find('option[value="'+n+'"]').prop("selected",!0),e.createSecondSelect(),e.options.maximumAlert(i)}}},e.prototype.basicUpdateChildCategory=function(e,i){var n=this;n.last$ElementSelected=n.$element.find("option:selected");var r=n.$secondSelect.val();t.isArray(r)||(r=[r]);var o=n.$firstSelect.val(),s=!1;n.$element.attr("multiple")?n.options.onlySameGroup?t.each(n.$element.find("option:selected"),function(e,i){if(t(i).parent().attr("label")!=o)return s=!0,!1}):i||(s=!0):s=!0,s?n.$element.find("option:selected").prop("selected",!1):t.each(n.$element.find("option:selected"),function(e,i){o==t(i).parent().attr("label")&&-1==t.inArray(t(i).val(),r)&&t(i).prop("selected",!1)}),t.each(r,function(t,e){n.$element.find('option[value="'+e+'"]').prop("selected",!0)}),n.checkSelected(),n.updateCounter(),n.$element.trigger("change")},e.prototype.updateChildCategory=function(e){"change"==e.type?this.timeOut=setTimeout(t.proxy(function(){this.basicUpdateChildCategory(e,e.ctrlKey)},this),10):"click"==e.type&&(clearTimeout(this.timeOut),this.basicUpdateChildCategory(e,e.ctrlKey))},e.prototype.destroy=function(){this.$wrapper.remove(),this.$element.removeData(this.type),this.$element.show()},t.fn.multiselectsplitter=function(i){return this.each(function(){var n=t(this),r=n.data("multiselectsplitter"),o="object"==typeof i&&i;(r||"destroy"!=i)&&(r||n.data("multiselectsplitter",r=new e(this,o)),"string"==typeof i&&r[i]())})},t.fn.multiselectsplitter.Constructor=e,t.fn.multiselectsplitter.VERSION="1.0.1"}(jQuery),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){!function(t){"use strict";function e(e){var i=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return t.each(i,function(){e=e?e.replace(this.re,this.ch):""}),e}function i(e){var i=arguments,n=e;[].shift.apply(i);var r,o=this.each(function(){var e=t(this);if(e.is("select")){var o=e.data("selectpicker"),s="object"==typeof n&&n;if(o){if(s)for(var a in s)s.hasOwnProperty(a)&&(o.options[a]=s[a])}else{var l=t.extend({},h.DEFAULTS,t.fn.selectpicker.defaults||{},e.data(),s);l.template=t.extend({},h.DEFAULTS.template,t.fn.selectpicker.defaults?t.fn.selectpicker.defaults.template:{},e.data().template,s.template),e.data("selectpicker",o=new h(this,l))}"string"==typeof n&&(r=o[n]instanceof Function?o[n].apply(o,i):o.options[n])}});return void 0!==r?r:o}String.prototype.includes||function(){var t={}.toString,e=function(){try{var t={},e=Object.defineProperty,i=e(t,t,t)&&e}catch(t){}return i}(),i="".indexOf,n=function(e){if(null==this)throw new TypeError;var n=String(this);if(e&&"[object RegExp]"==t.call(e))throw new TypeError;var r=n.length,o=String(e),s=o.length,a=arguments.length>1?arguments[1]:void 0,l=a?Number(a):0;return l!=l&&(l=0),!(s+Math.min(Math.max(l,0),r)>r)&&-1!=i.call(n,o,l)};e?e(String.prototype,"includes",{value:n,configurable:!0,writable:!0}):String.prototype.includes=n}(),String.prototype.startsWith||function(){var t=function(){try{var t={},e=Object.defineProperty,i=e(t,t,t)&&e}catch(t){}return i}(),e={}.toString,i=function(t){if(null==this)throw new TypeError;var i=String(this);if(t&&"[object RegExp]"==e.call(t))throw new TypeError;var n=i.length,r=String(t),o=r.length,s=arguments.length>1?arguments[1]:void 0,a=s?Number(s):0;a!=a&&(a=0);var l=Math.min(Math.max(a,0),n);if(o+l>n)return!1;for(var c=-1;++c<o;)if(i.charCodeAt(l+c)!=r.charCodeAt(c))return!1;return!0};t?t(String.prototype,"startsWith",{value:i,configurable:!0,writable:!0}):String.prototype.startsWith=i}(),Object.keys||(Object.keys=function(t,e,i){i=[];for(e in t)i.hasOwnProperty.call(t,e)&&i.push(e);return i});var n={useDefault:!1,_set:t.valHooks.select.set};t.valHooks.select.set=function(e,i){return i&&!n.useDefault&&t(e).data("selected",!0),n._set.apply(this,arguments)};var r=null,o=function(){try{return new Event("change"),!0}catch(t){return!1}}();t.fn.triggerNative=function(t){var e,i=this[0];i.dispatchEvent?(o?e=new Event(t,{bubbles:!0}):(e=document.createEvent("Event")).initEvent(t,!0,!1),i.dispatchEvent(e)):i.fireEvent?((e=document.createEventObject()).eventType=t,i.fireEvent("on"+t,e)):this.trigger(t)},t.expr.pseudos.icontains=function(e,i,n){var r=t(e).find("a");return(r.data("tokens")||r.text()).toString().toUpperCase().includes(n[3].toUpperCase())},t.expr.pseudos.ibegins=function(e,i,n){var r=t(e).find("a");return(r.data("tokens")||r.text()).toString().toUpperCase().startsWith(n[3].toUpperCase())},t.expr.pseudos.aicontains=function(e,i,n){var r=t(e).find("a");return(r.data("tokens")||r.data("normalizedText")||r.text()).toString().toUpperCase().includes(n[3].toUpperCase())},t.expr.pseudos.aibegins=function(e,i,n){var r=t(e).find("a");return(r.data("tokens")||r.data("normalizedText")||r.text()).toString().toUpperCase().startsWith(n[3].toUpperCase())};var s={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x60;":"`"},a=function(t){var e=function(e){return t[e]},i="(?:"+Object.keys(t).join("|")+")",n=RegExp(i),r=RegExp(i,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(r,e):t}},l=a({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"}),c=a(s),h=function(e,i){n.useDefault||(t.valHooks.select.set=n._set,n.useDefault=!0),this.$element=t(e),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=i,null===this.options.title&&(this.options.title=this.$element.attr("title"));var r=this.options.windowPadding;"number"==typeof r&&(this.options.windowPadding=[r,r,r,r]),this.val=h.prototype.val,this.render=h.prototype.render,this.refresh=h.prototype.refresh,this.setStyle=h.prototype.setStyle,this.selectAll=h.prototype.selectAll,this.deselectAll=h.prototype.deselectAll,this.destroy=h.prototype.destroy,this.remove=h.prototype.remove,this.show=h.prototype.show,this.hide=h.prototype.hide,this.init()};h.VERSION="1.12.4",h.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(t,e){return 1==t?"{0} item selected":"{0} items selected"},maxOptionsText:function(t,e){return[1==t?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==e?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",showTick:!1,template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0},h.prototype={constructor:h,init:function(){var e=this,i=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement).appendTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element.removeClass("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),void 0!==i&&(this.$button.attr("data-id",i),t('label[for="'+i+'"]').click(function(t){t.preventDefault(),e.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(t){e.$menuInner.attr("aria-expanded",!1),e.$element.trigger("hide.bs.select",t)},"hidden.bs.dropdown":function(t){e.$element.trigger("hidden.bs.select",t)},"show.bs.dropdown":function(t){e.$menuInner.attr("aria-expanded",!0),e.$element.trigger("show.bs.select",t)},"shown.bs.dropdown":function(t){e.$element.trigger("shown.bs.select",t)}}),e.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){e.$button.addClass("bs-invalid"),e.$element.on({"focus.bs.select":function(){e.$button.focus(),e.$element.off("focus.bs.select")},"shown.bs.select":function(){e.$element.val(e.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&e.$button.removeClass("bs-invalid"),e.$element.off("rendered.bs.select")}}),e.$button.on("blur.bs.select",function(){e.$element.focus().blur(),e.$button.off("blur.bs.select")})}),setTimeout(function(){e.$element.trigger("loaded.bs.select")})},createDropdown:function(){var e=this.multiple||this.options.showTick?" show-tick":"",i=this.$element.parent().hasClass("input-group")?" input-group-btn":"",n=this.autofocus?" autofocus":"",r=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>":"",o=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+l(this.options.liveSearchPlaceholder)+'"')+' role="textbox" aria-label="Search"></div>':"",s=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"</button></div></div>":"",a=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"</button></div></div>":"",c='<div class="btn-group bootstrap-select'+e+i+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+n+' role="button"><span class="filter-option pull-left"></span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'</span></button><div class="dropdown-menu open" role="combobox">'+r+o+s+'<ul class="dropdown-menu inner" role="listbox" aria-expanded="false"></ul>'+a+"</div></div>";return t(c)},createView:function(){var t=this.createDropdown(),e=this.createLi();return t.find("ul")[0].innerHTML=e,t},reloadLi:function(){var t=this.createLi();this.$menuInner[0].innerHTML=t},createLi:function(){var i=this,n=[],r=0,o=document.createElement("option"),s=-1,a=function(t,e,i,n){return"<li"+(void 0!==i&&""!==i?' class="'+i+'"':"")+(void 0!==e&&null!==e?' data-original-index="'+e+'"':"")+(void 0!==n&&null!==n?'data-optgroup="'+n+'"':"")+">"+t+"</li>"},c=function(n,r,o,s){return'<a tabindex="0"'+(void 0!==r?' class="'+r+'"':"")+(o?' style="'+o+'"':"")+(i.options.liveSearchNormalize?' data-normalized-text="'+e(l(t(n).html()))+'"':"")+(void 0!==s||null!==s?' data-tokens="'+s+'"':"")+' role="option">'+n+'<span class="'+i.options.iconBase+" "+i.options.tickIcon+' check-mark"></span></a>'};if(this.options.title&&!this.multiple&&(s--,!this.$element.find(".bs-title-option").length)){var h=this.$element[0];o.className="bs-title-option",o.innerHTML=this.options.title,o.value="",h.insertBefore(o,h.firstChild),void 0===t(h.options[h.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected")&&(o.selected=!0)}var d=this.$element.find("option");return d.each(function(e){var o=t(this);if(s++,!o.hasClass("bs-title-option")){var h,u=this.className||"",p=l(this.style.cssText),f=o.data("content")?o.data("content"):o.html(),m=o.data("tokens")?o.data("tokens"):null,g=void 0!==o.data("subtext")?'<small class="text-muted">'+o.data("subtext")+"</small>":"",v=void 0!==o.data("icon")?'<span class="'+i.options.iconBase+" "+o.data("icon")+'"></span> ':"",y=o.parent(),b="OPTGROUP"===y[0].tagName,_=b&&y[0].disabled,x=this.disabled||_;if(""!==v&&x&&(v="<span>"+v+"</span>"),i.options.hideDisabled&&(x&&!b||_))return h=o.data("prevHiddenIndex"),o.next().data("prevHiddenIndex",void 0!==h?h:e),void s--;if(o.data("content")||(f=v+'<span class="text">'+f+g+"</span>"),b&&!0!==o.data("divider")){if(i.options.hideDisabled&&x){if(void 0===y.data("allOptionsDisabled")){var w=y.children();y.data("allOptionsDisabled",w.filter(":disabled").length===w.length)}if(y.data("allOptionsDisabled"))return void s--}var k=" "+y[0].className||"";if(0===o.index()){r+=1;var S=y[0].label,C=void 0!==y.data("subtext")?'<small class="text-muted">'+y.data("subtext")+"</small>":"";S=(y.data("icon")?'<span class="'+i.options.iconBase+" "+y.data("icon")+'"></span> ':"")+'<span class="text">'+l(S)+C+"</span>",0!==e&&n.length>0&&(s++,n.push(a("",null,"divider",r+"div"))),s++,n.push(a(S,null,"dropdown-header"+k,r))}if(i.options.hideDisabled&&x)return void s--;n.push(a(c(f,"opt "+u+k,p,m),e,"",r))}else if(!0===o.data("divider"))n.push(a("",e,"divider"));else if(!0===o.data("hidden"))h=o.data("prevHiddenIndex"),o.next().data("prevHiddenIndex",void 0!==h?h:e),n.push(a(c(f,u,p,m),e,"hidden is-hidden"));else{var D=this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName;if(!D&&i.options.hideDisabled&&void 0!==(h=o.data("prevHiddenIndex"))){var T=d.eq(h)[0].previousElementSibling;T&&"OPTGROUP"===T.tagName&&!T.disabled&&(D=!0)}D&&(s++,n.push(a("",null,"divider",r+"div"))),n.push(a(c(f,u,p,m),e))}i.liObj[e]=s}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),n.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(e){var i,n=this,r=this.$element.find("option");!1!==e&&r.each(function(t){var e=n.findLis().eq(n.liObj[t]);n.setDisabled(t,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,e),n.setSelected(t,this.selected,e)}),this.togglePlaceholder(),this.tabIndex();var o=r.map(function(){if(this.selected){if(n.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var e,i=t(this),r=i.data("icon")&&n.options.showIcon?'<i class="'+n.options.iconBase+" "+i.data("icon")+'"></i> ':"";return e=n.options.showSubtext&&i.data("subtext")&&!n.multiple?' <small class="text-muted">'+i.data("subtext")+"</small>":"",void 0!==i.attr("title")?i.attr("title"):i.data("content")&&n.options.showContent?i.data("content").toString():r+i.html()+e}}).toArray(),s=this.multiple?o.join(this.options.multipleSeparator):o[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var a=this.options.selectedTextFormat.split(">");if(a.length>1&&o.length>a[1]||1==a.length&&o.length>=2){i=this.options.hideDisabled?", [disabled]":"";var l=r.not('[data-divider="true"], [data-hidden="true"]'+i).length;s=("function"==typeof this.options.countSelectedText?this.options.countSelectedText(o.length,l):this.options.countSelectedText).replace("{0}",o.length.toString()).replace("{1}",l.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(s=this.options.title),s||(s=void 0!==this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",c(t.trim(s.replace(/<[^>]*>?/g,"")))),this.$button.children(".filter-option").html(s),this.$element.trigger("rendered.bs.select")},setStyle:function(t,e){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=t||this.options.style;"add"==e?this.$button.addClass(i):"remove"==e?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(e){if(e||!1!==this.options.size&&!this.sizeInfo){var i=document.createElement("div"),n=document.createElement("div"),r=document.createElement("ul"),o=document.createElement("li"),s=document.createElement("li"),a=document.createElement("a"),l=document.createElement("span"),c=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,h=this.options.liveSearch?document.createElement("div"):null,d=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,u=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(l.className="text",i.className=this.$menu[0].parentNode.className+" open",n.className="dropdown-menu open",r.className="dropdown-menu inner",o.className="divider",l.appendChild(document.createTextNode("Inner text")),a.appendChild(l),s.appendChild(a),r.appendChild(s),r.appendChild(o),c&&n.appendChild(c),h){var p=document.createElement("input");h.className="bs-searchbox",p.className="form-control",h.appendChild(p),n.appendChild(h)}d&&n.appendChild(d),n.appendChild(r),u&&n.appendChild(u),i.appendChild(n),document.body.appendChild(i);var f=a.offsetHeight,m=c?c.offsetHeight:0,g=h?h.offsetHeight:0,v=d?d.offsetHeight:0,y=u?u.offsetHeight:0,b=t(o).outerHeight(!0),_="function"==typeof getComputedStyle&&getComputedStyle(n),x=_?null:t(n),w={vert:parseInt(_?_.paddingTop:x.css("paddingTop"))+parseInt(_?_.paddingBottom:x.css("paddingBottom"))+parseInt(_?_.borderTopWidth:x.css("borderTopWidth"))+parseInt(_?_.borderBottomWidth:x.css("borderBottomWidth")),horiz:parseInt(_?_.paddingLeft:x.css("paddingLeft"))+parseInt(_?_.paddingRight:x.css("paddingRight"))+parseInt(_?_.borderLeftWidth:x.css("borderLeftWidth"))+parseInt(_?_.borderRightWidth:x.css("borderRightWidth"))},k={vert:w.vert+parseInt(_?_.marginTop:x.css("marginTop"))+parseInt(_?_.marginBottom:x.css("marginBottom"))+2,horiz:w.horiz+parseInt(_?_.marginLeft:x.css("marginLeft"))+parseInt(_?_.marginRight:x.css("marginRight"))+2};document.body.removeChild(i),this.sizeInfo={liHeight:f,headerHeight:m,searchHeight:g,actionsHeight:v,doneButtonHeight:y,dividerHeight:b,menuPadding:w,menuExtras:k}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var e,i,n,r,o,s,a,l,c=this,h=this.$menu,d=this.$menuInner,u=t(window),p=this.$newElement[0].offsetHeight,f=this.$newElement[0].offsetWidth,m=this.sizeInfo.liHeight,g=this.sizeInfo.headerHeight,v=this.sizeInfo.searchHeight,y=this.sizeInfo.actionsHeight,b=this.sizeInfo.doneButtonHeight,_=this.sizeInfo.dividerHeight,x=this.sizeInfo.menuPadding,w=this.sizeInfo.menuExtras,k=this.options.hideDisabled?".disabled":"",S=function(){var e,i=c.$newElement.offset(),n=t(c.options.container);c.options.container&&!n.is("body")?((e=n.offset()).top+=parseInt(n.css("borderTopWidth")),e.left+=parseInt(n.css("borderLeftWidth"))):e={top:0,left:0};var r=c.options.windowPadding;o=i.top-e.top-u.scrollTop(),s=u.height()-o-p-e.top-r[2],a=i.left-e.left-u.scrollLeft(),l=u.width()-a-f-e.left-r[1],o-=r[0],a-=r[3]};if(S(),"auto"===this.options.size){var C=function(){var u,p=function(e,i){return function(n){return i?n.classList?n.classList.contains(e):t(n).hasClass(e):!(n.classList?n.classList.contains(e):t(n).hasClass(e))}},_=c.$menuInner[0].getElementsByTagName("li"),k=Array.prototype.filter?Array.prototype.filter.call(_,p("hidden",!1)):c.$lis.not(".hidden"),C=Array.prototype.filter?Array.prototype.filter.call(k,p("dropdown-header",!0)):k.filter(".dropdown-header");S(),e=s-w.vert,i=l-w.horiz,c.options.container?(h.data("height")||h.data("height",h.height()),n=h.data("height"),h.data("width")||h.data("width",h.width()),r=h.data("width")):(n=h.height(),r=h.width()),c.options.dropupAuto&&c.$newElement.toggleClass("dropup",o>s&&e-w.vert<n),c.$newElement.hasClass("dropup")&&(e=o-w.vert),"auto"===c.options.dropdownAlignRight&&h.toggleClass("dropdown-menu-right",a>l&&i-w.horiz<r-f),u=k.length+C.length>3?3*m+w.vert-2:0,h.css({"max-height":e+"px",overflow:"hidden","min-height":u+g+v+y+b+"px"}),d.css({"max-height":e-g-v-y-b-x.vert+"px","overflow-y":"auto","min-height":Math.max(u-x.vert,0)+"px"})};C(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",C),u.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",C)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(k).length>this.options.size){var D=this.$lis.not(".divider").not(k).children().slice(0,this.options.size).last().parent().index(),T=this.$lis.slice(0,D+1).filter(".divider").length;e=m*this.options.size+T*_+x.vert,c.options.container?(h.data("height")||h.data("height",h.height()),n=h.data("height")):n=h.height(),c.options.dropupAuto&&this.$newElement.toggleClass("dropup",o>s&&e-w.vert<n),h.css({"max-height":e+g+v+y+b+"px",overflow:"hidden","min-height":""}),d.css({"max-height":e-x.vert+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var t=this.$menu.parent().clone().appendTo("body"),e=this.options.container?this.$newElement.clone().appendTo("body"):t,i=t.children(".dropdown-menu").outerWidth(),n=e.css("width","auto").children("button").outerWidth();t.remove(),e.remove(),this.$newElement.css("width",Math.max(i,n)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=t('<div class="bs-container" />');var e,i,n,r=this,o=t(this.options.container),s=function(t){r.$bsContainer.addClass(t.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",t.hasClass("dropup")),e=t.offset(),o.is("body")?i={top:0,left:0}:((i=o.offset()).top+=parseInt(o.css("borderTopWidth"))-o.scrollTop(),i.left+=parseInt(o.css("borderLeftWidth"))-o.scrollLeft()),n=t.hasClass("dropup")?0:t[0].offsetHeight,r.$bsContainer.css({top:e.top-i.top+n,left:e.left-i.left,width:t[0].offsetWidth})};this.$button.on("click",function(){var e=t(this);r.isDisabled()||(s(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass("open",!e.hasClass("open")).append(r.$menu))}),t(window).on("resize scroll",function(){s(r.$newElement)}),this.$element.on("hide.bs.select",function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setSelected:function(t,e,i){i||(this.togglePlaceholder(),i=this.findLis().eq(this.liObj[t])),i.toggleClass("selected",e).find("a").attr("aria-selected",e)},setDisabled:function(t,e,i){i||(i=this.findLis().eq(this.liObj[t])),e?i.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1).attr("aria-disabled",!0):i.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0).attr("aria-disabled",!1)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var t=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled").attr("aria-disabled",!1)),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!t.isDisabled()})},togglePlaceholder:function(){var t=this.$element.val();this.$button.toggleClass("bs-placeholder",null===t||""===t||t.constructor===Array&&0===t.length)},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){var e=this,i=t(document);i.data("spaceSelect",!1),this.$button.on("keyup",function(t){/(32)/.test(t.keyCode.toString(10))&&i.data("spaceSelect")&&(t.preventDefault(),i.data("spaceSelect",!1))}),this.$button.on("click",function(){e.setSize()}),this.$element.on("shown.bs.select",function(){if(e.options.liveSearch||e.multiple){if(!e.multiple){var t=e.liObj[e.$element[0].selectedIndex];if("number"!=typeof t||!1===e.options.size)return;var i=e.$lis.eq(t)[0].offsetTop-e.$menuInner[0].offsetTop;i=i-e.$menuInner[0].offsetHeight/2+e.sizeInfo.liHeight/2,e.$menuInner[0].scrollTop=i}}else e.$menuInner.find(".selected a").focus()}),this.$menuInner.on("click","li a",function(i){var n=t(this),o=n.parent().data("originalIndex"),s=e.$element.val(),a=e.$element.prop("selectedIndex"),l=!0;if(e.multiple&&1!==e.options.maxOptions&&i.stopPropagation(),i.preventDefault(),!e.isDisabled()&&!n.parent().hasClass("disabled")){var c=e.$element.find("option"),h=c.eq(o),d=h.prop("selected"),u=h.parent("optgroup"),p=e.options.maxOptions,f=u.data("maxOptions")||!1;if(e.multiple){if(h.prop("selected",!d),e.setSelected(o,!d),n.blur(),!1!==p||!1!==f){var m=p<c.filter(":selected").length,g=f<u.find("option:selected").length;if(p&&m||f&&g)if(p&&1==p)c.prop("selected",!1),h.prop("selected",!0),e.$menuInner.find(".selected").removeClass("selected"),e.setSelected(o,!0);else if(f&&1==f){u.find("option:selected").prop("selected",!1),h.prop("selected",!0);var v=n.parent().data("optgroup");e.$menuInner.find('[data-optgroup="'+v+'"]').removeClass("selected"),e.setSelected(o,!0)}else{var y="string"==typeof e.options.maxOptionsText?[e.options.maxOptionsText,e.options.maxOptionsText]:e.options.maxOptionsText,b="function"==typeof y?y(p,f):y,_=b[0].replace("{n}",p),x=b[1].replace("{n}",f),w=t('<div class="notify"></div>');b[2]&&(_=_.replace("{var}",b[2][p>1?0:1]),x=x.replace("{var}",b[2][f>1?0:1])),h.prop("selected",!1),e.$menu.append(w),p&&m&&(w.append(t("<div>"+_+"</div>")),l=!1,e.$element.trigger("maxReached.bs.select")),f&&g&&(w.append(t("<div>"+x+"</div>")),l=!1,e.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){e.setSelected(o,!1)},10),w.delay(750).fadeOut(300,function(){t(this).remove()})}}}else c.prop("selected",!1),h.prop("selected",!0),e.$menuInner.find(".selected").removeClass("selected").find("a").attr("aria-selected",!1),e.setSelected(o,!0);!e.multiple||e.multiple&&1===e.options.maxOptions?e.$button.focus():e.options.liveSearch&&e.$searchbox.focus(),l&&(s!=e.$element.val()&&e.multiple||a!=e.$element.prop("selectedIndex")&&!e.multiple)&&(r=[o,h.prop("selected"),d],e.$element.triggerNative("change"))}}),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(i){i.currentTarget==this&&(i.preventDefault(),i.stopPropagation(),e.options.liveSearch&&!t(i.target).hasClass("close")?e.$searchbox.focus():e.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(t){t.preventDefault(),t.stopPropagation(),e.options.liveSearch?e.$searchbox.focus():e.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){e.$button.click()}),this.$searchbox.on("click",function(t){t.stopPropagation()}),this.$menu.on("click",".actions-btn",function(i){e.options.liveSearch?e.$searchbox.focus():e.$button.focus(),i.preventDefault(),i.stopPropagation(),t(this).hasClass("bs-select-all")?e.selectAll():e.deselectAll()}),this.$element.change(function(){e.render(!1),e.$element.trigger("changed.bs.select",r),r=null})},liveSearchListener:function(){var i=this,n=t('<li class="no-results"></li>');this.$button.on("click.dropdown.data-api",function(){i.$menuInner.find(".active").removeClass("active"),i.$searchbox.val()&&(i.$searchbox.val(""),i.$lis.not(".is-hidden").removeClass("hidden"),n.parent().length&&n.remove()),i.multiple||i.$menuInner.find(".selected").addClass("active"),setTimeout(function(){i.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(t){t.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(i.$lis.not(".is-hidden").removeClass("hidden"),i.$lis.filter(".active").removeClass("active"),n.remove(),i.$searchbox.val()){var r,o=i.$lis.not(".is-hidden, .divider, .dropdown-header");if((r=i.options.liveSearchNormalize?o.not(":a"+i._searchStyle()+'("'+e(i.$searchbox.val())+'")'):o.not(":"+i._searchStyle()+'("'+i.$searchbox.val()+'")')).length===o.length)n.html(i.options.noneResultsText.replace("{0}",'"'+l(i.$searchbox.val())+'"')),i.$menuInner.append(n),i.$lis.addClass("hidden");else{r.addClass("hidden");var s,a=i.$lis.not(".hidden");a.each(function(e){var i=t(this);i.hasClass("divider")?void 0===s?i.addClass("hidden"):(s&&s.addClass("hidden"),s=i):i.hasClass("dropdown-header")&&a.eq(e+1).data("optgroup")!==i.data("optgroup")?i.addClass("hidden"):s=null}),s&&s.addClass("hidden"),o.not(".hidden").first().addClass("active"),i.$menuInner.scrollTop(0)}}})},_searchStyle:function(){return{begins:"ibegins",startsWith:"ibegins"}[this.options.liveSearchStyle]||"icontains"},val:function(t){return void 0!==t?(this.$element.val(t),this.render(),this.$element):this.$element.val()},changeAll:function(e){if(this.multiple){void 0===e&&(e=!0),this.findLis();var i=this.$element.find("option"),n=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden"),r=n.length,o=[];if(e){if(n.filter(".selected").length===n.length)return}else if(0===n.filter(".selected").length)return;n.toggleClass("selected",e);for(var s=0;s<r;s++){var a=n[s].getAttribute("data-original-index");o[o.length]=i.eq(a)[0]}t(o).prop("selected",e),this.render(!1),this.togglePlaceholder(),this.$element.triggerNative("change")}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(t){(t=t||window.event)&&t.stopPropagation(),this.$button.trigger("click")},keydown:function(e){var i,n,r,o,s=t(this),a=(s.is("input")?s.parent().parent():s.parent()).data("this"),l=":not(.disabled, .hidden, .dropdown-header, .divider)",c={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(!(o=a.$newElement.hasClass("open"))&&(e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105||e.keyCode>=65&&e.keyCode<=90))return a.options.container?a.$button.trigger("click"):(a.setSize(),a.$menu.parent().addClass("open"),o=!0),void a.$searchbox.focus();if(a.options.liveSearch&&/(^9$|27)/.test(e.keyCode.toString(10))&&o&&(e.preventDefault(),e.stopPropagation(),a.$menuInner.click(),a.$button.focus()),/(38|40)/.test(e.keyCode.toString(10))){if(!(i=a.$lis.filter(l)).length)return;n=a.options.liveSearch?i.index(i.filter(".active")):i.index(i.find("a").filter(":focus").parent()),r=a.$menuInner.data("prevIndex"),38==e.keyCode?(!a.options.liveSearch&&n!=r||-1==n||n--,n<0&&(n+=i.length)):40==e.keyCode&&((a.options.liveSearch||n==r)&&n++,n%=i.length),a.$menuInner.data("prevIndex",n),a.options.liveSearch?(e.preventDefault(),s.hasClass("dropdown-toggle")||(i.removeClass("active").eq(n).addClass("active").children("a").focus(),s.focus())):i.eq(n).children("a").focus()}else if(!s.is("input")){var h,d=[];(i=a.$lis.filter(l)).each(function(i){t.trim(t(this).children("a").text().toLowerCase()).substring(0,1)==c[e.keyCode]&&d.push(i)}),h=t(document).data("keycount"),h++,t(document).data("keycount",h),t.trim(t(":focus").text().toLowerCase()).substring(0,1)!=c[e.keyCode]?(h=1,t(document).data("keycount",h)):h>=d.length&&(t(document).data("keycount",0),h>d.length&&(h=1)),i.eq(d[h-1]).children("a").focus()}if((/(13|32)/.test(e.keyCode.toString(10))||/(^9$)/.test(e.keyCode.toString(10))&&a.options.selectOnTab)&&o){if(/(32)/.test(e.keyCode.toString(10))||e.preventDefault(),a.options.liveSearch)/(32)/.test(e.keyCode.toString(10))||(a.$menuInner.find(".active a").click(),s.focus());else{var u=t(":focus");u.click(),u.focus(),e.preventDefault(),t(document).data("spaceSelect",!0)}t(document).data("keycount",0)}(/(^9$|27)/.test(e.keyCode.toString(10))&&o&&(a.multiple||a.options.liveSearch)||/(27)/.test(e.keyCode.toString(10))&&!o)&&(a.$menu.parent().removeClass("open"),a.options.container&&a.$newElement.removeClass("open"),a.$button.focus())},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var d=t.fn.selectpicker;t.fn.selectpicker=i,t.fn.selectpicker.Constructor=h,t.fn.selectpicker.noConflict=function(){return t.fn.selectpicker=d,this},t(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',h.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',function(t){t.stopPropagation()}),t(window).on("load.bs.select.data-api",function(){t(".selectpicker").each(function(){var e=t(this);i.call(e,e.data())})})}(t)}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)e=t.fn.select2.amd;var e;return function(){if(!e||!e.requirejs){e?i=e:e={};var t,i,n;!function(e){function r(t,e){return _.call(t,e)}function o(t,e){var i,n,r,o,s,a,l,c,h,d,u,p=e&&e.split("/"),f=y.map,m=f&&f["*"]||{};if(t&&"."===t.charAt(0))if(e){for(s=(t=t.split("/")).length-1,y.nodeIdCompat&&w.test(t[s])&&(t[s]=t[s].replace(w,"")),t=p.slice(0,p.length-1).concat(t),h=0;h<t.length;h+=1)if("."===(u=t[h]))t.splice(h,1),h-=1;else if(".."===u){if(1===h&&(".."===t[2]||".."===t[0]))break;h>0&&(t.splice(h-1,2),h-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((p||m)&&f){for(h=(i=t.split("/")).length;h>0;h-=1){if(n=i.slice(0,h).join("/"),p)for(d=p.length;d>0;d-=1)if((r=f[p.slice(0,d).join("/")])&&(r=r[n])){o=r,a=h;break}if(o)break;!l&&m&&m[n]&&(l=m[n],c=h)}!o&&l&&(o=l,a=c),o&&(i.splice(0,a,o),t=i.join("/"))}return t}function s(t,i){return function(){var n=x.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),p.apply(e,n.concat([t,i]))}}function a(t){return function(e){return o(e,t)}}function l(t){return function(e){g[t]=e}}function c(t){if(r(v,t)){var i=v[t];delete v[t],b[t]=!0,u.apply(e,i)}if(!r(g,t)&&!r(b,t))throw new Error("No "+t);return g[t]}function h(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function d(t){return function(){return y&&y.config&&y.config[t]||{}}}var u,p,f,m,g={},v={},y={},b={},_=Object.prototype.hasOwnProperty,x=[].slice,w=/\.js$/;f=function(t,e){var i,n=h(t),r=n[0];return t=n[1],r&&(i=c(r=o(r,e))),r?t=i&&i.normalize?i.normalize(t,a(e)):o(t,e):(r=(n=h(t=o(t,e)))[0],t=n[1],r&&(i=c(r))),{f:r?r+"!"+t:t,n:t,pr:r,p:i}},m={require:function(t){return s(t)},exports:function(t){var e=g[t];return void 0!==e?e:g[t]={}},module:function(t){return{id:t,uri:"",exports:g[t],config:d(t)}}},u=function(t,i,n,o){var a,h,d,u,p,y,_=[],x=typeof n;if(o=o||t,"undefined"===x||"function"===x){for(i=!i.length&&n.length?["require","exports","module"]:i,p=0;p<i.length;p+=1)if(u=f(i[p],o),"require"===(h=u.f))_[p]=m.require(t);else if("exports"===h)_[p]=m.exports(t),y=!0;else if("module"===h)a=_[p]=m.module(t);else if(r(g,h)||r(v,h)||r(b,h))_[p]=c(h);else{if(!u.p)throw new Error(t+" missing "+h);u.p.load(u.n,s(o,!0),l(h),{}),_[p]=g[h]}d=n?n.apply(g[t],_):void 0,t&&(a&&a.exports!==e&&a.exports!==g[t]?g[t]=a.exports:d===e&&y||(g[t]=d))}else t&&(g[t]=n)},t=i=p=function(t,i,n,r,o){if("string"==typeof t)return m[t]?m[t](i):c(f(t,i).f);if(!t.splice){if((y=t).deps&&p(y.deps,y.callback),!i)return;i.splice?(t=i,i=n,n=null):t=e}return i=i||function(){},"function"==typeof n&&(n=r,r=o),r?u(e,t,i,n):setTimeout(function(){u(e,t,i,n)},4),p},p.config=function(t){return p(t)},t._defined=g,(n=function(t,e,i){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(i=e,e=[]),r(g,t)||r(v,t)||(v[t]=[t,e,i])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=i,e.define=n}}(),e.define("almond",function(){}),e.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(t){function e(t){var e=t.prototype,i=[];for(var n in e)"function"==typeof e[n]&&"constructor"!==n&&i.push(n);return i}var i={};i.Extend=function(t,e){function i(){this.constructor=t}var n={}.hasOwnProperty;for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},i.Decorate=function(t,i){function n(){var e=Array.prototype.unshift,n=i.prototype.constructor.length,r=t.prototype.constructor;n>0&&(e.call(arguments,t.prototype.constructor),r=i.prototype.constructor),r.apply(this,arguments)}var r=e(i),o=e(t);i.displayName=t.displayName,n.prototype=new function(){this.constructor=n};for(var s=0;s<o.length;s++){var a=o[s];n.prototype[a]=t.prototype[a]}for(var l=0;l<r.length;l++){var c=r[l];n.prototype[c]=function(t){var e=function(){};t in n.prototype&&(e=n.prototype[t]);var r=i.prototype[t];return function(){return Array.prototype.unshift.call(arguments,e),r.apply(this,arguments)}}(c)}return n};var n=function(){this.listeners={}};return n.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},n.prototype.trigger=function(t){var e=Array.prototype.slice,i=e.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),i[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},n.prototype.invoke=function(t,e){for(var i=0,n=t.length;i<n;i++)t[i].apply(this,e)},i.Observable=n,i.generateChars=function(t){for(var e="",i=0;i<t;i++)e+=Math.floor(36*Math.random()).toString(36);return e},i.bind=function(t,e){return function(){t.apply(e,arguments)}},i._convertData=function(t){for(var e in t){var i=e.split("-"),n=t;if(1!==i.length){for(var r=0;r<i.length;r++){var o=i[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in n||(n[o]={}),r==i.length-1&&(n[o]=t[e]),n=n[o]}delete t[e]}}return t},i.hasScroll=function(e,i){var n=t(i),r=i.style.overflowX,o=i.style.overflowY;return(r!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===r||"scroll"===o||(n.innerHeight()<i.scrollHeight||n.innerWidth()<i.scrollWidth))},i.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},i.appendMany=function(e,i){if("1.7"===t.fn.jquery.substr(0,3)){var n=t();t.map(i,function(t){n=n.add(t)}),i=n}e.append(i)},i}),e.define("select2/results",["jquery","./utils"],function(t,e){function i(t,e,n){this.$element=t,this.data=n,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var i=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=t('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);n.append(i(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var i=0;i<t.results.length;i++){var n=t.results[i],r=this.option(n);e.push(r)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(t,e){e.find(".select2-results").append(t)},i.prototype.sort=function(t){return this.options.get("sorter")(t)},i.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var e=this;this.data.current(function(i){var n=t.map(i,function(t){return t.id.toString()});e.$results.find(".select2-results__option[aria-selected]").each(function(){var e=t(this),i=t.data(this,"data"),r=""+i.id;null!=i.element&&i.element.selected||null==i.element&&t.inArray(r,n)>-1?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},i=this.option(e);i.className+=" loading-results",this.$results.prepend(i)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var i=document.createElement("li");i.className="select2-results__option";var n={role:"treeitem","aria-selected":"false"};e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(i.id=e._resultId),e.title&&(i.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]);for(var r in n){var o=n[r];i.setAttribute(r,o)}if(e.children){var s=t(i),a=document.createElement("strong");a.className="select2-results__group";t(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var h=e.children[c],d=this.option(h);l.push(d)}var u=t("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});u.append(l),s.append(a),s.append(u)}else this.template(e,i);return t.data(i,"data",e),i},i.prototype.bind=function(e,i){var n=this,r=e.id+"-results";this.$results.attr("id",r),e.on("results:all",function(t){n.clear(),n.append(t.data),e.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),e.on("results:append",function(t){n.append(t.data),e.isOpen()&&n.setClasses()}),e.on("query",function(t){n.hideMessages(),n.showLoading(t)}),e.on("select",function(){e.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),e.on("unselect",function(){e.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),e.on("open",function(){n.$results.attr("aria-expanded","true"),n.$results.attr("aria-hidden","false"),n.setClasses(),n.ensureHighlightVisible()}),e.on("close",function(){n.$results.attr("aria-expanded","false"),n.$results.attr("aria-hidden","true"),n.$results.removeAttr("aria-activedescendant")}),e.on("results:toggle",function(){var t=n.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),e.on("results:select",function(){var t=n.getHighlightedResults();if(0!==t.length){var e=t.data("data");"true"==t.attr("aria-selected")?n.trigger("close",{}):n.trigger("select",{data:e})}}),e.on("results:previous",function(){var t=n.getHighlightedResults(),e=n.$results.find("[aria-selected]"),i=e.index(t);if(0!==i){var r=i-1;0===t.length&&(r=0);var o=e.eq(r);o.trigger("mouseenter");var s=n.$results.offset().top,a=o.offset().top,l=n.$results.scrollTop()+(a-s);0===r?n.$results.scrollTop(0):a-s<0&&n.$results.scrollTop(l)}}),e.on("results:next",function(){var t=n.getHighlightedResults(),e=n.$results.find("[aria-selected]"),i=e.index(t)+1;if(!(i>=e.length)){var r=e.eq(i);r.trigger("mouseenter");var o=n.$results.offset().top+n.$results.outerHeight(!1),s=r.offset().top+r.outerHeight(!1),a=n.$results.scrollTop()+s-o;0===i?n.$results.scrollTop(0):s>o&&n.$results.scrollTop(a)}}),e.on("results:focus",function(t){t.element.addClass("select2-results__option--highlighted")}),e.on("results:message",function(t){n.displayMessage(t)}),t.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=n.$results.scrollTop(),i=n.$results.get(0).scrollHeight-e+t.deltaY,r=t.deltaY>0&&e-t.deltaY<=0,o=t.deltaY<0&&i<=n.$results.height();r?(n.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):o&&(n.$results.scrollTop(n.$results.get(0).scrollHeight-n.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var i=t(this),r=i.data("data");"true"!==i.attr("aria-selected")?n.trigger("select",{originalEvent:e,data:r}):n.options.get("multiple")?n.trigger("unselect",{originalEvent:e,data:r}):n.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var i=t(this).data("data");n.getHighlightedResults().removeClass("select2-results__option--highlighted"),n.trigger("results:focus",{data:i,element:t(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),i=this.$results.offset().top,n=t.offset().top,r=this.$results.scrollTop()+(n-i),o=n-i;r-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,i){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=n(e,i);null==o?i.style.display="none":"string"==typeof o?i.innerHTML=r(o):t(i).append(o)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e,e},n.prototype.bind=function(t,e){var n=this,r=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",function(t){n.trigger("focus",t)}),this.$selection.on("blur",function(t){n._handleBlur(t)}),this.$selection.on("keydown",function(t){n.trigger("keypress",t),t.which===i.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){n.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){n.update(t.data)}),t.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(t)}),t.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(t)}),t.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),t.on("disable",function(){n.$selection.attr("tabindex","-1")})},n.prototype._handleBlur=function(e){var i=this;window.setTimeout(function(){document.activeElement==i.$selection[0]||t.contains(i.$selection[0],document.activeElement)||i.trigger("blur",e)},1)},n.prototype._attachCloseHandler=function(e){t(document.body).on("mousedown.select2."+e.id,function(e){var i=t(e.target).closest(".select2");t(".select2.select2-container--open").each(function(){var e=t(this);this!=i[0]&&e.data("element").select2("close")})})},n.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(t,e,i,n){function r(){r.__super__.constructor.apply(this,arguments)}return i.Extend(r,e),r.prototype.render=function(){var t=r.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},r.prototype.bind=function(t,e){var i=this;r.__super__.bind.apply(this,arguments);var n=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(t){1===t.which&&i.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),t.on("focus",function(e){t.isOpen()||i.$selection.focus()}),t.on("selection:update",function(t){i.update(t.data)})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},r.prototype.selectionContainer=function(){return t("<span></span>")},r.prototype.update=function(t){if(0!==t.length){var e=t[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(e,i);i.empty().append(n),i.prop("title",e.title||e.text)}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(t,e,i){function n(t,e){n.__super__.constructor.apply(this,arguments)}return i.Extend(n,e),n.prototype.render=function(){var t=n.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},n.prototype.bind=function(e,i){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){r.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.options.get("disabled")){var i=t(this).parent().data("data");r.trigger("unselect",{originalEvent:e,data:i})}})},n.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},n.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},n.prototype.selectionContainer=function(){return t('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],n=0;n<t.length;n++){var r=t[n],o=this.selectionContainer(),s=this.display(r,o);o.append(s),o.prop("title",r.title||r.text),o.data("data",r),e.push(o)}var a=this.$selection.find(".select2-selection__rendered");i.appendMany(a,e)}},n}),e.define("select2/selection/placeholder",["../utils"],function(t){function e(t,e,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var i=this.selectionContainer();return i.html(this.display(e)),i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),i},e.prototype.update=function(t,e){var i=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||i)return t.call(this,e);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},e}),e.define("select2/selection/allowClear",["jquery","../keys"],function(t,e){function i(){}return i.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(t){n._handleClear(t)}),e.on("keypress",function(t){n._handleKeyboardClear(t,e)})},i.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){e.stopPropagation();for(var n=i.data("data"),r=0;r<n.length;r++){var o={data:n[r]};if(this.trigger("unselect",o),o.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},i.prototype._handleKeyboardClear=function(t,i,n){n.isOpen()||i.which!=e.DELETE&&i.which!=e.BACKSPACE||this._handleClear(i)},i.prototype.update=function(e,i){if(e.call(this,i),!(this.$selection.find(".select2-selection__placeholder").length>0||0===i.length)){var n=t('<span class="select2-selection__clear">&times;</span>');n.data("data",i),this.$selection.find(".select2-selection__rendered").prepend(n)}},i}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(t,e,i){function n(t,e,i){t.call(this,e,i)}return n.prototype.render=function(e){var i=t('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=i,this.$search=i.find("input");var n=e.call(this);return this._transferTabIndex(),n},n.prototype.bind=function(t,e,n){var r=this;t.call(this,e,n),e.on("open",function(){r.$search.trigger("focus")}),e.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),e.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),e.on("disable",function(){r.$search.prop("disabled",!0)}),e.on("focus",function(t){r.$search.trigger("focus")}),e.on("results:focus",function(t){r.$search.attr("aria-activedescendant",t.id)}),this.$selection.on("focusin",".select2-search--inline",function(t){r.trigger("focus",t)}),this.$selection.on("focusout",".select2-search--inline",function(t){r._handleBlur(t)}),this.$selection.on("keydown",".select2-search--inline",function(t){if(t.stopPropagation(),r.trigger("keypress",t),r._keyUpPrevented=t.isDefaultPrevented(),t.which===i.BACKSPACE&&""===r.$search.val()){var e=r.$searchContainer.prev(".select2-selection__choice");if(e.length>0){var n=e.data("data");r.searchRemoveChoice(n),t.preventDefault()}}});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(t){s?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(t){if(s&&"input"===t.type)r.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=i.SHIFT&&e!=i.CTRL&&e!=i.ALT&&e!=i.TAB&&r.handleSearch(t)}})},n.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},n.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},n.prototype.update=function(t,e){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i&&this.$search.focus()},n.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},n.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";t=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",t)},n}),e.define("select2/selection/eventRelay",["jquery"],function(t){function e(){}return e.prototype.bind=function(e,i,n){var r=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];e.call(this,i,n),i.on("*",function(e,i){if(-1!==t.inArray(e,o)){i=i||{};var n=t.Event("select2:"+e,{params:i});r.$element.trigger(n),-1!==t.inArray(e,s)&&(i.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,e){function i(t){this.dict=t||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(t){return this.dict[t]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(t){if(!(t in i._cache)){var n=e(t);i._cache[t]=n}return new i(i._cache[t])},i}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("select2/data/base",["../utils"],function(t){function e(t,i){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,i){var n=e.id+"-result-";return n+=t.generateChars(4),null!=i.id?n+="-"+i.id.toString():n+="-"+t.generateChars(4),n},e}),e.define("select2/data/select",["./base","../utils","jquery"],function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,t),n.prototype.current=function(t){var e=[],n=this;this.$element.find(":selected").each(function(){var t=i(this),r=n.item(t);e.push(r)}),t(e)},n.prototype.select=function(t){var e=this;if(t.selected=!0,i(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(n){var r=[];(t=[t]).push.apply(t,n);for(var o=0;o<t.length;o++){var s=t[o].id;-1===i.inArray(s,r)&&r.push(s)}e.$element.val(r),e.$element.trigger("change")});else{var n=t.id;this.$element.val(n),this.$element.trigger("change")}},n.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,i(t.element).is("option"))return t.element.selected=!1,void this.$element.trigger("change");this.current(function(n){for(var r=[],o=0;o<n.length;o++){var s=n[o].id;s!==t.id&&-1===i.inArray(s,r)&&r.push(s)}e.$element.val(r),e.$element.trigger("change")})}},n.prototype.bind=function(t,e){var i=this;this.container=t,t.on("select",function(t){i.select(t.data)}),t.on("unselect",function(t){i.unselect(t.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){i.removeData(this,"data")})},n.prototype.query=function(t,e){var n=[],r=this;this.$element.children().each(function(){var e=i(this);if(e.is("option")||e.is("optgroup")){var o=r.item(e),s=r.matches(t,o);null!==s&&n.push(s)}}),e({results:n})},n.prototype.addOptions=function(t){e.appendMany(this.$element,t)},n.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup")).label=t.text:void 0!==(e=document.createElement("option")).textContent?e.textContent=t.text:e.innerText=t.text,t.id&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var n=i(e),r=this._normalizeItem(t);return r.element=e,i.data(e,"data",r),n},n.prototype.item=function(t){var e={};if(null!=(e=i.data(t[0],"data")))return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var n=t.children("option"),r=[],o=0;o<n.length;o++){var s=i(n[o]),a=this.item(s);r.push(a)}e.children=r}return e=this._normalizeItem(e),e.element=t[0],i.data(t[0],"data",e),e},n.prototype._normalizeItem=function(t){i.isPlainObject(t)||(t={id:t,text:t});var e={selected:!1,disabled:!1};return null!=(t=i.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),i.extend({},e,t)},n.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(t,e,i){function n(t,e){var i=e.get("data")||[];n.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(i))}return e.Extend(n,t),n.prototype.select=function(t){var e=this.$element.find("option").filter(function(e,i){return i.value==t.id.toString()});0===e.length&&(e=this.option(t),this.addOptions(e)),n.__super__.select.call(this,t)},n.prototype.convertToOptions=function(t){for(var n=this,r=this.$element.find("option"),o=r.map(function(){return n.item(i(this)).id}).get(),s=[],a=0;a<t.length;a++){var l=this._normalizeItem(t[a]);if(i.inArray(l.id,o)>=0){var c=r.filter(function(t){return function(){return i(this).val()==t.id}}(l)),h=this.item(c),d=i.extend(!0,{},l,h),u=this.option(d);c.replaceWith(u)}else{var p=this.option(l);if(l.children){var f=this.convertToOptions(l.children);e.appendMany(p,f)}s.push(p)}}return s},n}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(t,e,i){function n(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype._applyDefaults=function(t){var e={data:function(t){return i.extend({},t,{q:t.term})},transport:function(t,e,n){var r=i.ajax(t);return r.then(e),r.fail(n),r}};return i.extend({},e,t,!0)},n.prototype.processResults=function(t){return t},n.prototype.query=function(t,e){function n(){var n=o.transport(o,function(n){var o=r.processResults(n,t);r.options.get("debug")&&window.console&&console.error&&(o&&o.results&&i.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(o)},function(){n.status&&"0"===n.status||r.trigger("results:message",{message:"errorLoading"})});r._request=n}var r=this;null!=this._request&&(i.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=i.extend({type:"GET"},this.ajaxOptions);"function"==typeof o.url&&(o.url=o.url.call(this.$element,t)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(n,this.ajaxOptions.delay)):n()},n}),e.define("select2/data/tags",["jquery"],function(t){function e(e,i,n){var r=n.get("tags"),o=n.get("createTag");void 0!==o&&(this.createTag=o);var s=n.get("insertTag");if(void 0!==s&&(this.insertTag=s),e.call(this,i,n),t.isArray(r))for(var a=0;a<r.length;a++){var l=r[a],c=this._normalizeItem(l),h=this.option(c);this.$element.append(h)}}return e.prototype.query=function(t,e,i){function n(t,o){for(var s=t.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!n({results:l.children},!0);if(l.text===e.term||c)return!o&&(t.data=s,void i(t))}if(o)return!0;var h=r.createTag(e);if(null!=h){var d=r.option(h);d.attr("data-select2-tag",!0),r.addOptions([d]),r.insertTag(s,h)}t.results=s,i(t)}var r=this;this._removeOldTags(),null!=e.term&&null==e.page?t.call(this,e,n):t.call(this,e,i)},e.prototype.createTag=function(e,i){var n=t.trim(i.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(t,e,i){e.unshift(i)},e.prototype._removeOldTags=function(e){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(t){function e(t,e,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),t.call(this,e,i)}return e.prototype.bind=function(t,e,i){t.call(this,e,i),this.$search=e.dropdown.$search||e.selection.$search||i.find(".select2-search__field")},e.prototype.query=function(e,i,n){function r(t){o.trigger("select",{data:t})}var o=this;i.term=i.term||"";var s=this.tokenizer(i,this.options,function(e){var i=o._normalizeItem(e);if(!o.$element.find("option").filter(function(){return t(this).val()===i.id}).length){var n=o.option(i);n.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([n])}r(i)});s.term!==i.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),i.term=s.term),e.call(this,i,n)},e.prototype.tokenizer=function(e,i,n,r){for(var o=n.get("tokenSeparators")||[],s=i.term,a=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};a<s.length;){var c=s[a];if(-1!==t.inArray(c,o)){var h=s.substr(0,a),d=l(t.extend({},i,{term:h}));null!=d?(r(d),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},e}),e.define("select2/data/minimumInputLength",[],function(){function t(t,e,i){this.minimumInputLength=i.get("minimumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),e.define("select2/data/maximumInputLength",[],function(){function t(t,e,i){this.maximumInputLength=i.get("maximumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),e.define("select2/data/maximumSelectionLength",[],function(){function t(t,e,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){var n=this;this.current(function(r){var o=null!=r?r.length:0;n.maximumSelectionLength>0&&o>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t.call(n,e,i)})},t}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},i.prototype.bind=function(){},i.prototype.position=function(t,e){},i.prototype.destroy=function(){this.$dropdown.remove()},i}),e.define("select2/dropdown/search",["jquery","../utils"],function(t,e){function i(){}return i.prototype.render=function(e){var i=e.call(this),n=t('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),i.prepend(n),i},i.prototype.bind=function(e,i,n){var r=this;e.call(this,i,n),this.$search.on("keydown",function(t){r.trigger("keypress",t),r._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(e){t(this).off("keyup")}),this.$search.on("keyup input",function(t){r.handleSearch(t)}),i.on("open",function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout(function(){r.$search.focus()},0)}),i.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val("")}),i.on("focus",function(){i.isOpen()&&r.$search.focus()}),i.on("results:all",function(t){null!=t.query.term&&""!==t.query.term||(r.showSearch(t)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})},i.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.showSearch=function(t,e){return!0},i}),e.define("select2/dropdown/hidePlaceholder",[],function(){function t(t,e,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i,n)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var i=e.slice(0),n=e.length-1;n>=0;n--){var r=e[n];this.placeholder.id===r.id&&i.splice(n,1)}return i},t}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(t){function e(t,e,i,n){this.lastParams={},t.call(this,e,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,i,n){var r=this;e.call(this,i,n),i.on("query",function(t){r.lastParams=t,r.loading=!0}),i.on("query:append",function(t){r.lastParams=t,r.loading=!0}),this.$results.on("scroll",function(){var e=t.contains(document.documentElement,r.$loadingMore[0]);!r.loading&&e&&r.$results.offset().top+r.$results.outerHeight(!1)+50>=r.$loadingMore.offset().top+r.$loadingMore.outerHeight(!1)&&r.loadMore()})},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),i=this.options.get("translations").get("loadingMore");return e.html(i(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(t,e){function i(e,i,n){this.$dropdownParent=n.get("dropdownParent")||t(document.body),e.call(this,i,n)}return i.prototype.bind=function(t,e,i){var n=this,r=!1;t.call(this,e,i),e.on("open",function(){n._showDropdown(),n._attachPositioningHandler(e),r||(r=!0,e.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),e.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}))}),e.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},i.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},i.prototype.position=function(t,e,i){e.attr("class",i.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=i},i.prototype.render=function(e){var i=t("<span></span>"),n=e.call(this);return i.append(n),this.$dropdownContainer=i,i},i.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},i.prototype._attachPositioningHandler=function(i,n){var r=this,o="scroll.select2."+n.id,s="resize.select2."+n.id,a="orientationchange.select2."+n.id,l=this.$container.parents().filter(e.hasScroll);l.each(function(){t(this).data("select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})}),l.on(o,function(e){var i=t(this).data("select2-scroll-position");t(this).scrollTop(i.y)}),t(window).on(o+" "+s+" "+a,function(t){r._positionDropdown(),r._resizeDropdown()})},i.prototype._detachPositioningHandler=function(i,n){var r="scroll.select2."+n.id,o="resize.select2."+n.id,s="orientationchange.select2."+n.id;this.$container.parents().filter(e.hasScroll).off(r),t(window).off(r+" "+o+" "+s)},i.prototype._positionDropdown=function(){var e=t(window),i=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:e.scrollTop(),bottom:e.scrollTop()+e.height()},c=l.top<o.top-a.height,h=l.bottom>o.bottom+a.height,d={left:o.left,top:s.bottom},u=this.$dropdownParent;"static"===u.css("position")&&(u=u.offsetParent());var p=u.offset();d.top-=p.top,d.left-=p.left,i||n||(r="below"),h||!c||i?!c&&h&&i&&(r="below"):r="above",("above"==r||i&&"below"!==r)&&(d.top=s.top-p.top-a.height),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},i.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},i.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},i}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function t(e){for(var i=0,n=0;n<e.length;n++){var r=e[n];r.children?i+=t(r.children):i++}return i}function e(t,e,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,i,n)}return e.prototype.showSearch=function(e,i){return!(t(i.data.results)<this.minimumResultsForSearch)&&e.call(this,i)},e}),e.define("select2/dropdown/selectOnClose",[],function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("close",function(t){n._handleSelectOnClose(t)})},t.prototype._handleSelectOnClose=function(t,e){if(e&&null!=e.originalSelect2Event){var i=e.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var n=this.getHighlightedResults();if(!(n.length<1)){var r=n.data("data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},t}),e.define("select2/dropdown/closeOnSelect",[],function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",function(t){n._selectTriggered(t)}),e.on("unselect",function(t){n._selectTriggered(t)})},t.prototype._selectTriggered=function(t,e){var i=e.originalEvent;i&&i.ctrlKey||this.trigger("close",{originalEvent:i,originalSelect2Event:e})},t}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,i="Please delete "+e+" character";return 1!=e&&(i+="s"),i},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(t,e,i,n,r,o,s,a,l,c,h,d,u,p,f,m,g,v,y,b,_,x,w,k,S,C,D,T,A){function M(){this.reset()}return M.prototype.apply=function(d){if(null==(d=t.extend(!0,{},this.defaults,d)).dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=p:d.dataAdapter=u,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,b)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null!=d.query){var A=e(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,A)}if(null!=d.initSelection){var M=e(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,M)}}if(null==d.resultsAdapter&&(d.resultsAdapter=i,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,k)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,w)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,D))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=_;else{var E=c.Decorate(_,x);d.dropdownAdapter=E}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,C)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,T)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var P=e(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,P)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,S)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=r:d.selectionAdapter=n,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,o)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var I=e(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,I)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var O=d.language.split("-")[0];d.language=[d.language,O]}else d.language=[d.language];if(t.isArray(d.language)){var N=new h;d.language.push("en");for(var F=d.language,L=0;L<F.length;L++){var j=F[L],R={};try{R=h.loadPath(j)}catch(t){try{j=this.defaults.amdLanguageBase+j,R=h.loadPath(j)}catch(t){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+j+'" could not be automatically loaded. A fallback will be used instead.');continue}}N.extend(R)}d.translations=N}else{var $=h.loadPath(this.defaults.amdLanguageBase+"en"),H=new h(d.language);H.extend($),d.translations=H}return d},M.prototype.reset=function(){function e(t){return t.replace(/[^\u0000-\u007E]/g,function(t){return d[t]||t})}function i(n,r){if(""===t.trim(n.term))return r;if(r.children&&r.children.length>0){for(var o=t.extend(!0,{},r),s=r.children.length-1;s>=0;s--)null==i(n,r.children[s])&&o.children.splice(s,1);return o.children.length>0?o:i(n,o)}var a=e(r.text).toUpperCase(),l=e(n.term).toUpperCase();return a.indexOf(l)>-1?r:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:A,matcher:i,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},M.prototype.set=function(e,i){var n={};n[t.camelCase(e)]=i;var r=c._convertData(n);t.extend(this.defaults,r)},new M}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(t,e,i,n){function r(e,r){if(this.options=e,null!=r&&this.fromElement(r),this.options=i.apply(this.options),r&&r.is("input")){var o=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=n.Decorate(this.options.dataAdapter,o)}}return r.prototype.fromElement=function(t){var i=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),t.data("data",t.data("select2Tags")),t.data("tags",!0)),t.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",t.data("ajaxUrl")),t.data("ajax--url",t.data("ajaxUrl")));var r={};r=e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset?e.extend(!0,{},t[0].dataset,t.data()):t.data();var o=e.extend(!0,{},r);o=n._convertData(o);for(var s in o)e.inArray(s,i)>-1||(e.isPlainObject(this.options[s])?e.extend(this.options[s],o[s]):this.options[s]=o[s]);return this},r.prototype.get=function(t){return this.options[t]},r.prototype.set=function(t,e){this.options[t]=e},r}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(t,e,i,n){var r=function(t,i){null!=t.data("select2")&&t.data("select2").destroy(),this.$element=t,this.id=this._generateId(t),i=i||{},this.options=new e(i,t),r.__super__.constructor.call(this);var n=t.attr("tabindex")||0;t.data("old-tabindex",n),t.attr("tabindex","-1");var o=this.options.get("dataAdapter");this.dataAdapter=new o(t,this.options);var s=this.render();this._placeContainer(s);var a=this.options.get("selectionAdapter");this.selection=new a(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var l=this.options.get("dropdownAdapter");this.dropdown=new l(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var h=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){h.trigger("selection:update",{data:t})}),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),t.data("select2",this)};return i.Extend(r,i.Observable),r.prototype._generateId=function(t){var e="";return e=null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+i.generateChars(2):i.generateChars(4),e=e.replace(/(:|\.|\[|\]|,)/g,""),e="select2-"+e},r.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},r.prototype._resolveWidth=function(t,e){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var n=this._resolveWidth(t,"style");return null!=n?n:this._resolveWidth(t,"element")}if("element"==e){var r=t.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==e){var o=t.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(i);if(null!==c&&c.length>=1)return c[1]}return null}return e},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2",function(t){e.trigger("focus",t)}),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=n?(this._observer=new n(function(i){t.each(i,e._syncA),t.each(i,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},r.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerSelectionEvents=function(){var e=this,i=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(t){e.focus(t)}),this.selection.on("*",function(n,r){-1===t.inArray(n,i)&&e.trigger(n,r)})},r.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerEvents=function(){var t=this;this.on("open",function(){t.$container.addClass("select2-container--open")}),this.on("close",function(){t.$container.removeClass("select2-container--open")}),this.on("enable",function(){t.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){t.$container.addClass("select2-container--disabled")}),this.on("blur",function(){t.$container.removeClass("select2-container--focus")}),this.on("query",function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,function(i){t.trigger("results:all",{data:i,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(i){t.trigger("results:append",{data:i,query:e})})}),this.on("keypress",function(e){var i=e.which;t.isOpen()?i===n.ESC||i===n.TAB||i===n.UP&&e.altKey?(t.close(),e.preventDefault()):i===n.ENTER?(t.trigger("results:select",{}),e.preventDefault()):i===n.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):i===n.UP?(t.trigger("results:previous",{}),e.preventDefault()):i===n.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(i===n.ENTER||i===n.SPACE||i===n.DOWN&&e.altKey)&&(t.open(),e.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._syncSubtree=function(t,e){var i=!1,n=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&e.addedNodes.length>0)for(var r=0;r<e.addedNodes.length;r++)e.addedNodes[r].selected&&(i=!0);else e.removedNodes&&e.removedNodes.length>0&&(i=!0);else i=!0;i&&this.dataAdapter.current(function(t){n.trigger("selection:update",{data:t})})}},r.prototype.trigger=function(t,e){var i=r.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===e&&(e={}),t in n){var o=n[t],s={prevented:!1,name:t,args:e};if(i.call(this,o,s),s.prevented)return void(e.prevented=!0)}i.call(this,t,e)},r.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.trigger("query",{})},r.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},r.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},r.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var i=e[0];t.isArray(i)&&(i=t.map(i,function(t){return t.toString()})),this.$element.val(i).trigger("change")},r.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},r}),e.define("jquery-mousewheel",["jquery"],function(t){return t}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(t,e,i,n){if(null==t.fn.select2){var r=["open","close","destroy"];t.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each(function(){var n=t.extend(!0,{},e);new i(t(this),n)}),this;if("string"==typeof e){var n,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var i=t(this).data("select2");null==i&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),n=i[e].apply(i,o)}),t.inArray(e,r)>-1?this:n}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=n),i}),{define:e.define,require:e.require}}(),i=e.require("jquery.select2");return t.fn.select2.amd=e,i}),function(t,e){"function"==typeof define&&define.amd?define("bloodhound",["jquery"],function(i){return t.Bloodhound=e(i)}):"object"==typeof exports?module.exports=e(require("jquery")):t.Bloodhound=e(jQuery)}(this,function(t){var e=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(e){return e instanceof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,i){t.each(e,function(t,e){return i(e,t)})},map:t.map,filter:t.grep,every:function(e,i){var n=!0;return e?(t.each(e,function(t,r){if(!(n=i.call(null,r,t,e)))return!1}),!!n):n},some:function(e,i){var n=!1;return e?(t.each(e,function(t,r){if(n=i.call(null,r,t,e))return!1}),!!n):n},mixin:t.extend,identity:function(t){return t},clone:function(e){return t.extend(!0,{},e)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(e){return t.isFunction(e)?e:function(){return String(e)}},defer:function(t){setTimeout(t,0)},debounce:function(t,e,i){var n,r;return function(){var o,s,a=this,l=arguments;return o=function(){n=null,i||(r=t.apply(a,l))},s=i&&!n,clearTimeout(n),n=setTimeout(o,e),s&&(r=t.apply(a,l)),r}},throttle:function(t,e){var i,n,r,o,s,a;return s=0,a=function(){s=new Date,r=null,o=t.apply(i,n)},function(){var l=new Date,c=e-(l-s);return i=this,n=arguments,c<=0?(clearTimeout(r),r=null,s=l,o=t.apply(i,n)):r||(r=setTimeout(a,c)),o}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),i="0.11.1",n=function(){"use strict";function t(t){return(t=e.toStr(t))?t.split(/\s+/):[]}function i(t){return(t=e.toStr(t))?t.split(/\W+/):[]}function n(t){return function(i){return i=e.isArray(i)?i:[].slice.call(arguments,0),function(n){var r=[];return e.each(i,function(i){r=r.concat(t(e.toStr(n[i])))}),r}}}return{nonword:i,whitespace:t,obj:{nonword:n(i),whitespace:n(t)}}}(),r=function(){"use strict";function i(i){this.maxSize=e.isNumber(i)?i:100,this.reset(),this.maxSize<=0&&(this.set=this.get=t.noop)}function n(){this.head=this.tail=null}function r(t,e){this.key=t,this.val=e,this.prev=this.next=null}return e.mixin(i.prototype,{set:function(t,e){var i,n=this.list.tail;this.size>=this.maxSize&&(this.list.remove(n),delete this.hash[n.key],this.size--),(i=this.hash[t])?(i.val=e,this.list.moveToFront(i)):(i=new r(t,e),this.list.add(i),this.hash[t]=i,this.size++)},get:function(t){var e=this.hash[t];if(e)return this.list.moveToFront(e),e.val},reset:function(){this.size=0,this.hash={},this.list=new n}}),e.mixin(n.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),i}(),o=function(){"use strict";function i(t,i){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+e.escapeRegExChars(this.prefix)),this.ls=i||a,!this.ls&&this._noop()}function n(){return(new Date).getTime()}function r(t){return JSON.stringify(e.isUndefined(t)?null:t)}function o(e){return t.parseJSON(e)}function s(t){var e,i,n=[],r=a.length;for(e=0;e<r;e++)(i=a.key(e)).match(t)&&n.push(i.replace(t,""));return n}var a;try{(a=window.localStorage).setItem("~~~","!"),a.removeItem("~~~")}catch(t){a=null}return e.mixin(i.prototype,{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=e.noop},_safeSet:function(t,e){try{this.ls.setItem(t,e)}catch(t){"QuotaExceededError"===t.name&&(this.clear(),this._noop())}},get:function(t){return this.isExpired(t)&&this.remove(t),o(this.ls.getItem(this._prefix(t)))},set:function(t,i,o){return e.isNumber(o)?this._safeSet(this._ttlKey(t),r(n()+o)):this.ls.removeItem(this._ttlKey(t)),this._safeSet(this._prefix(t),r(i))},remove:function(t){return this.ls.removeItem(this._ttlKey(t)),this.ls.removeItem(this._prefix(t)),this},clear:function(){var t,e=s(this.keyMatcher);for(t=e.length;t--;)this.remove(e[t]);return this},isExpired:function(t){var i=o(this.ls.getItem(this._ttlKey(t)));return!!(e.isNumber(i)&&n()>i)}}),i}(),s=function(){"use strict";function i(t){t=t||{},this.cancelled=!1,this.lastReq=null,this._send=t.transport,this._get=t.limiter?t.limiter(this._get):this._get,this._cache=!1===t.cache?new r(0):a}var n=0,o={},s=6,a=new r(10);return i.setMaxPendingRequests=function(t){s=t},i.resetCache=function(){a.reset()},e.mixin(i.prototype,{_fingerprint:function(e){return(e=e||{}).url+e.type+t.param(e.data||{})},_get:function(t,e){function i(t){e(null,t),c._cache.set(a,t)}function r(){e(!0)}var a,l,c=this;a=this._fingerprint(t),this.cancelled||a!==this.lastReq||((l=o[a])?l.done(i).fail(r):n<s?(n++,o[a]=this._send(t).done(i).fail(r).always(function(){n--,delete o[a],c.onDeckRequestArgs&&(c._get.apply(c,c.onDeckRequestArgs),c.onDeckRequestArgs=null)})):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(i,n){var r,o;n=n||t.noop,i=e.isString(i)?{url:i}:i||{},o=this._fingerprint(i),this.cancelled=!1,this.lastReq=o,(r=this._cache.get(o))?n(null,r):this._get(i,n)},cancel:function(){this.cancelled=!0}}),i}(),a=window.SearchIndex=function(){"use strict";function i(i){(i=i||{}).datumTokenizer&&i.queryTokenizer||t.error("datumTokenizer and queryTokenizer are both required"),this.identify=i.identify||e.stringify,this.datumTokenizer=i.datumTokenizer,this.queryTokenizer=i.queryTokenizer,this.reset()}function n(t){return t=e.filter(t,function(t){return!!t}),t=e.map(t,function(t){return t.toLowerCase()})}function r(){var t={};return t[l]=[],t[a]={},t}function o(t){for(var e={},i=[],n=0,r=t.length;n<r;n++)e[t[n]]||(e[t[n]]=!0,i.push(t[n]));return i}function s(t,e){var i=0,n=0,r=[];t=t.sort(),e=e.sort();for(var o=t.length,s=e.length;i<o&&n<s;)t[i]<e[n]?i++:t[i]>e[n]?n++:(r.push(t[i]),i++,n++);return r}var a="c",l="i";return e.mixin(i.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var i=this;t=e.isArray(t)?t:[t],e.each(t,function(t){var o,s;i.datums[o=i.identify(t)]=t,s=n(i.datumTokenizer(t)),e.each(s,function(t){var e,n,s;for(e=i.trie,n=t.split("");s=n.shift();)(e=e[a][s]||(e[a][s]=r()))[l].push(o)})})},get:function(t){var i=this;return e.map(t,function(t){return i.datums[t]})},search:function(t){var i,r,c=this;return i=n(this.queryTokenizer(t)),e.each(i,function(t){var e,i,n,o;if(r&&0===r.length)return!1;for(e=c.trie,i=t.split("");e&&(n=i.shift());)e=e[a][n];if(!e||0!==i.length)return r=[],!1;o=e[l].slice(0),r=r?s(r,o):o}),r?e.map(o(r),function(t){return c.datums[t]}):[]},all:function(){var t=[];for(var e in this.datums)t.push(this.datums[e]);return t},reset:function(){this.datums={},this.trie=r()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),i}(),l=function(){"use strict";function t(t){this.url=t.url,this.ttl=t.ttl,this.cache=t.cache,this.prepare=t.prepare,this.transform=t.transform,this.transport=t.transport,this.thumbprint=t.thumbprint,this.storage=new o(t.cacheKey)}var i;return i={data:"data",protocol:"protocol",thumbprint:"thumbprint"},e.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(t){this.cache&&(this.storage.set(i.data,t,this.ttl),this.storage.set(i.protocol,location.protocol,this.ttl),this.storage.set(i.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var t,e={};return this.cache?(e.data=this.storage.get(i.data),e.protocol=this.storage.get(i.protocol),e.thumbprint=this.storage.get(i.thumbprint),t=e.thumbprint!==this.thumbprint||e.protocol!==location.protocol,e.data&&!t?e.data:null):null},fromNetwork:function(t){var e,i=this;t&&(e=this.prepare(this._settings()),this.transport(e).fail(function(){t(!0)}).done(function(e){t(null,i.transform(e))}))},clear:function(){return this.storage.clear(),this}}),t}(),c=function(){"use strict";function t(t){this.url=t.url,this.prepare=t.prepare,this.transform=t.transform,this.transport=new s({cache:t.cache,limiter:t.limiter,transport:t.transport})}return e.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(t,e){var i,n=this;if(e)return t=t||"",i=this.prepare(t,this._settings()),this.transport.get(i,function(t,i){e(t?[]:n.transform(i))})},cancelLastRequest:function(){this.transport.cancel()}}),t}(),h=function(){"use strict";function n(n){var r;return n?(r={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:e.identity,transform:e.identity,transport:null},n=e.isString(n)?{url:n}:n,!(n=e.mixin(r,n)).url&&t.error("prefetch requires url to be set"),n.transform=n.filter||n.transform,n.cacheKey=n.cacheKey||n.url,n.thumbprint=i+n.thumbprint,n.transport=n.transport?a(n.transport):t.ajax,n):null}function r(i){var n;if(i)return n={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:e.identity,transport:null},i=e.isString(i)?{url:i}:i,!(i=e.mixin(n,i)).url&&t.error("remote requires url to be set"),i.transform=i.filter||i.transform,i.prepare=o(i),i.limiter=s(i),i.transport=i.transport?a(i.transport):t.ajax,delete i.replace,delete i.wildcard,delete i.rateLimitBy,delete i.rateLimitWait,i}function o(t){var e,i,n;return e=t.prepare,i=t.replace,n=t.wildcard,e||(e=i?function(t,e){return e.url=i(e.url,t),e}:t.wildcard?function(t,e){return e.url=e.url.replace(n,encodeURIComponent(t)),e}:function(t,e){return e})}function s(t){var i,n,r;return i=t.limiter,n=t.rateLimitBy,r=t.rateLimitWait,i||(i=/^throttle$/i.test(n)?function(t){return function(i){return e.throttle(i,t)}}(r):function(t){return function(i){return e.debounce(i,t)}}(r)),i}function a(i){return function(n){var r=t.Deferred();return i(n,function(t){e.defer(function(){r.resolve(t)})},function(t){e.defer(function(){r.reject(t)})}),r}}return function(i){var o,s;return o={initialize:!0,identify:e.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},!(i=e.mixin(o,i||{})).datumTokenizer&&t.error("datumTokenizer is required"),!i.queryTokenizer&&t.error("queryTokenizer is required"),s=i.sorter,i.sorter=s?function(t){return t.sort(s)}:e.identity,i.local=e.isFunction(i.local)?i.local():i.local,i.prefetch=n(i.prefetch),i.remote=r(i.remote),i}}();return function(){"use strict";function i(t){t=h(t),this.sorter=t.sorter,this.identify=t.identify,this.sufficient=t.sufficient,this.local=t.local,this.remote=t.remote?new c(t.remote):null,this.prefetch=t.prefetch?new l(t.prefetch):null,this.index=new a({identify:this.identify,datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),!1!==t.initialize&&this.initialize()}var r;return r=window&&window.Bloodhound,i.noConflict=function(){return window&&(window.Bloodhound=r),i},i.tokenizers=n,e.mixin(i.prototype,{__ttAdapter:function(){var t=this;return this.remote?function(e,i,n){return t.search(e,i,n)}:function(e,i){return t.search(e,i)}},_loadPrefetch:function(){var e,i,n=this;return e=t.Deferred(),this.prefetch?(i=this.prefetch.fromCache())?(this.index.bootstrap(i),e.resolve()):this.prefetch.fromNetwork(function(t,i){if(t)return e.reject();n.add(i),n.prefetch.store(n.index.serialize()),e.resolve()}):e.resolve(),e.promise()},_initialize:function(){var t=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(function(){t.add(t.local)}),this.initPromise},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){return this.index.add(t),this},get:function(t){return t=e.isArray(t)?t:[].slice.call(arguments),this.index.get(t)},search:function(t,i,n){var r,o=this;return r=this.sorter(this.index.search(t)),i(this.remote?r.slice():r),this.remote&&r.length<this.sufficient?this.remote.get(t,function(t){var i=[];e.each(t,function(t){!e.some(r,function(e){return o.identify(t)===o.identify(e)})&&i.push(t)}),n&&n(i)}):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return s.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),i}()}),function(t,e){"function"==typeof define&&define.amd?define("typeahead.js",["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(0,function(t){var e=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(e){return e instanceof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,i){t.each(e,function(t,e){return i(e,t)})},map:t.map,filter:t.grep,every:function(e,i){var n=!0;return e?(t.each(e,function(t,r){if(!(n=i.call(null,r,t,e)))return!1}),!!n):n},some:function(e,i){var n=!1;return e?(t.each(e,function(t,r){if(n=i.call(null,r,t,e))return!1}),!!n):n},mixin:t.extend,identity:function(t){return t},clone:function(e){return t.extend(!0,{},e)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(e){return t.isFunction(e)?e:function(){return String(e)}},defer:function(t){setTimeout(t,0)},debounce:function(t,e,i){var n,r;return function(){var o,s,a=this,l=arguments;return o=function(){n=null,i||(r=t.apply(a,l))},s=i&&!n,clearTimeout(n),n=setTimeout(o,e),s&&(r=t.apply(a,l)),r}},throttle:function(t,e){var i,n,r,o,s,a;return s=0,a=function(){s=new Date,r=null,o=t.apply(i,n)},function(){var l=new Date,c=e-(l-s);return i=this,n=arguments,c<=0?(clearTimeout(r),r=null,s=l,o=t.apply(i,n)):r||(r=setTimeout(a,c)),o}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),i=function(){"use strict";function t(t){return{wrapper:'<span class="'+t.wrapper+'"></span>',menu:'<div class="'+t.menu+'"></div>'}}function i(t){var i={};return e.each(t,function(t,e){i[e]="."+t}),i}function n(){var t={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return e.isMsie()&&e.mixin(t.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t}var r={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return function(o){var s,a;return a=e.mixin({},r,o),s={css:n(),classes:a,html:t(a),selectors:i(a)},{css:s.css,html:s.html,classes:s.classes,selectors:s.selectors,mixin:function(t){e.mixin(t,s)}}}}(),n=function(){"use strict";function i(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}var n;return"typeahead:",n={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},e.mixin(i.prototype,{_trigger:function(e,i){var n;return n=t.Event("typeahead:"+e),(i=i||[]).unshift(n),this.$el.trigger.apply(this.$el,i),n},before:function(t){var e;return e=[].slice.call(arguments,1),this._trigger("before"+t,e).isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=n[t])&&this._trigger(e,[].slice.call(arguments,1))}}),i}(),r=function(){"use strict";function t(t,e,r,o){var s;if(!r)return this;for(e=e.split(n),r=o?i(r,o):r,this._callbacks=this._callbacks||{};s=e.shift();)this._callbacks[s]=this._callbacks[s]||{sync:[],async:[]},this._callbacks[s][t].push(r);return this}function e(t,e,i){return function(){for(var n,r=0,o=t.length;!n&&r<o;r+=1)n=!1===t[r].apply(e,i);return!n}}function i(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}var n=/\s+/,r=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)};return{onSync:function(e,i,n){return t.call(this,"sync",e,i,n)},onAsync:function(e,i,n){return t.call(this,"async",e,i,n)},off:function(t){var e;if(!this._callbacks)return this;for(t=t.split(n);e=t.shift();)delete this._callbacks[e];return this},trigger:function(t){var i,o,s,a,l;if(!this._callbacks)return this;for(t=t.split(n),s=[].slice.call(arguments,1);(i=t.shift())&&(o=this._callbacks[i]);)a=e(o.sync,this,[i].concat(s)),l=e(o.async,this,[i].concat(s)),a()&&r(l);return this}}}(),o=function(t){"use strict";function i(t,i,n){for(var r,o=[],s=0,a=t.length;s<a;s++)o.push(e.escapeRegExChars(t[s]));return r=n?"\\b("+o.join("|")+")\\b":"("+o.join("|")+")",i?new RegExp(r):new RegExp(r,"i")}var n={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(r){function o(t,e){for(var i,n=0;n<t.childNodes.length;n++)3===(i=t.childNodes[n]).nodeType?n+=e(i)?1:0:o(i,e)}var s;(r=e.mixin({},n,r)).node&&r.pattern&&(r.pattern=e.isArray(r.pattern)?r.pattern:[r.pattern],s=i(r.pattern,r.caseSensitive,r.wordsOnly),o(r.node,function(e){var i,n,o;return(i=s.exec(e.data))&&(o=t.createElement(r.tagName),r.className&&(o.className=r.className),(n=e.splitText(i.index)).splitText(i[0].length),o.appendChild(n.cloneNode(!0)),e.parentNode.replaceChild(o,n)),!!i}))}}(window.document),s=function(){"use strict";function i(i,r){(i=i||{}).input||t.error("input is missing"),r.mixin(this),this.$hint=t(i.hint),this.$input=t(i.input),this.query=this.$input.val(),this.queryWhenFocused=this.hasFocus()?this.query:null,this.$overflowHelper=n(this.$input),this._checkLanguageDirection(),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=e.noop)}function n(e){return t('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:e.css("font-family"),fontSize:e.css("font-size"),fontStyle:e.css("font-style"),fontVariant:e.css("font-variant"),fontWeight:e.css("font-weight"),wordSpacing:e.css("word-spacing"),letterSpacing:e.css("letter-spacing"),textIndent:e.css("text-indent"),textRendering:e.css("text-rendering"),textTransform:e.css("text-transform")}).insertAfter(e)}function o(t,e){return i.normalizeQuery(t)===i.normalizeQuery(e)}function s(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}var a;return a={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(t){return e.toStr(t).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},e.mixin(i.prototype,r,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(t){var e=a[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(t,e){var i;switch(t){case"up":case"down":i=!s(e);break;default:i=!1}i&&e.preventDefault()},_shouldTrigger:function(t,e){var i;switch(t){case"tab":i=!s(e);break;default:i=!0}return i},_checkLanguageDirection:function(){var t=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==t&&(this.dir=t,this.$hint.attr("dir",t),this.trigger("langDirChanged",t))},_setQuery:function(t,e){var i,n;n=!!(i=o(t,this.query))&&this.query.length!==t.length,this.query=t,e||i?!e&&n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var t,i,n,r,o=this;return t=e.bind(this._onBlur,this),i=e.bind(this._onFocus,this),n=e.bind(this._onKeydown,this),r=e.bind(this._onInput,this),this.$input.on("blur.tt",t).on("focus.tt",i).on("keydown.tt",n),!e.isMsie()||e.isMsie()>9?this.$input.on("input.tt",r):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){a[t.which||t.keyCode]||e.defer(e.bind(o._onInput,o,t))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(t,e){this.setInputValue(t),this._setQuery(t,e)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(t){this.$input.val(t),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,i;i=(t=this.getInputValue())!==(e=this.getHint())&&0===e.indexOf(t),!(""!==t&&i&&!this.hasOverflow())&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,i,n;return t=this.$input.val().length,i=this.$input[0].selectionStart,e.isNumber(i)?i===t:!document.selection||((n=document.selection.createRange()).moveStart("character",-t),t===n.text.length)},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=t("<div>")}}),i}(),a=function(){"use strict";function i(i,r){(i=i||{}).templates=i.templates||{},i.templates.notFound=i.templates.notFound||i.templates.empty,i.source||t.error("missing source"),i.node||t.error("missing node"),i.name&&!a(i.name)&&t.error("invalid dataset name: "+i.name),r.mixin(this),this.highlight=!!i.highlight,this.name=i.name||c(),this.limit=i.limit||5,this.displayFn=n(i.display||i.displayKey),this.templates=s(i.templates,this.displayFn),this.source=i.source.__ttAdapter?i.source.__ttAdapter():i.source,this.async=e.isUndefined(i.async)?this.source.length>2:!!i.async,this._resetLastSuggestion(),this.$el=t(i.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}function n(t){return t=t||e.stringify,e.isFunction(t)?t:function(e){return e[t]}}function s(i,n){return{notFound:i.notFound&&e.templatify(i.notFound),pending:i.pending&&e.templatify(i.pending),header:i.header&&e.templatify(i.header),footer:i.footer&&e.templatify(i.footer),suggestion:i.suggestion||function(e){return t("<div>").text(n(e))}}}function a(t){return/^[_a-zA-Z0-9-]+$/.test(t)}var l,c;return l={val:"tt-selectable-display",obj:"tt-selectable-object"},c=e.getIdGenerator(),i.extractData=function(e){var i=t(e);return i.data(l.obj)?{val:i.data(l.val)||"",obj:i.data(l.obj)||null}:null},e.mixin(i.prototype,r,{_overwrite:function(t,e){(e=e||[]).length?this._renderSuggestions(t,e):this.async&&this.templates.pending?this._renderPending(t):!this.async&&this.templates.notFound?this._renderNotFound(t):this._empty(),this.trigger("rendered",this.name,e,!1)},_append:function(t,e){(e=e||[]).length&&this.$lastSuggestion.length?this._appendSuggestions(t,e):e.length?this._renderSuggestions(t,e):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(t),this.trigger("rendered",this.name,e,!0)},_renderSuggestions:function(t,e){var i;i=this._getSuggestionsFragment(t,e),this.$lastSuggestion=i.children().last(),this.$el.html(i).prepend(this._getHeader(t,e)).append(this._getFooter(t,e))},_appendSuggestions:function(t,e){var i,n;n=(i=this._getSuggestionsFragment(t,e)).children().last(),this.$lastSuggestion.after(i),this.$lastSuggestion=n},_renderPending:function(t){var e=this.templates.pending;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_renderNotFound:function(t){var e=this.templates.notFound;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(i,n){var r,s=this;return r=document.createDocumentFragment(),e.each(n,function(e){var n,o;o=s._injectQuery(i,e),n=t(s.templates.suggestion(o)).data(l.obj,e).data(l.val,s.displayFn(e)).addClass(s.classes.suggestion+" "+s.classes.selectable),r.appendChild(n[0])}),this.highlight&&o({className:this.classes.highlight,node:r,pattern:i}),t(r)},_getFooter:function(t,e){return this.templates.footer?this.templates.footer({query:t,suggestions:e,dataset:this.name}):null},_getHeader:function(t,e){return this.templates.header?this.templates.header({query:t,suggestions:e,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=t()},_injectQuery:function(t,i){return e.isObject(i)?e.mixin({_query:t},i):i},update:function(e){function i(t){o||(o=!0,t=(t||[]).slice(0,n.limit),s=t.length,n._overwrite(e,t),s<n.limit&&n.async&&n.trigger("asyncRequested",e))}var n=this,r=!1,o=!1,s=0;this.cancel(),this.cancel=function(){r=!0,n.cancel=t.noop,n.async&&n.trigger("asyncCanceled",e)},this.source(e,i,function(i){i=i||[],!r&&s<n.limit&&(n.cancel=t.noop,s+=i.length,n._append(e,i.slice(0,n.limit-s)),n.async&&n.trigger("asyncReceived",e))}),!o&&i([])},cancel:t.noop,clear:function(){this._empty(),this.cancel(),this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=t("<div>")}}),i}(),l=function(){"use strict";function i(i,n){var r=this;(i=i||{}).node||t.error("node is required"),n.mixin(this),this.$node=t(i.node),this.query=null,this.datasets=e.map(i.datasets,function(e){var i=r.$node.find(e.node).first();return e.node=i.length?i:t("<div>").appendTo(r.$node),new a(e,n)})}return e.mixin(i.prototype,r,{_onSelectableClick:function(e){this.trigger("selectableClicked",t(e.currentTarget))},_onRendered:function(t,e,i,n){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",e,i,n)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){return e.every(this.datasets,function(t){return t.isEmpty()})},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var t=this.getActiveSelectable();t&&t.removeClass(this.classes.cursor)},_ensureVisible:function(t){var e,i,n,r;i=(e=t.position().top)+t.outerHeight(!0),n=this.$node.scrollTop(),r=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),e<0?this.$node.scrollTop(n+e):r<i&&this.$node.scrollTop(n+(i-r))},bind:function(){var t,i=this;return t=e.bind(this._onSelectableClick,this),this.$node.on("click.tt",this.selectors.selectable,t),e.each(this.datasets,function(t){t.onSync("asyncRequested",i._propagate,i).onSync("asyncCanceled",i._propagate,i).onSync("asyncReceived",i._propagate,i).onSync("rendered",i._onRendered,i).onSync("cleared",i._onCleared,i)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.addClass(this.classes.open)},close:function(){this.$node.removeClass(this.classes.open),this._removeCursor()},setLanguageDirection:function(t){this.$node.attr("dir",t)},selectableRelativeToCursor:function(t){var e,i,n,r;return i=this.getActiveSelectable(),e=this._getSelectables(),n=i?e.index(i):-1,r=n+t,r=(r+1)%(e.length+1)-1,-1===(r=r<-1?e.length-1:r)?null:e.eq(r)},setCursor:function(t){this._removeCursor(),(t=t&&t.first())&&(t.addClass(this.classes.cursor),this._ensureVisible(t))},getSelectableData:function(t){return t&&t.length?a.extractData(t):null},getActiveSelectable:function(){var t=this._getSelectables().filter(this.selectors.cursor).first();return t.length?t:null},getTopSelectable:function(){var t=this._getSelectables().first();return t.length?t:null},update:function(t){var i=t!==this.query;return i&&(this.query=t,e.each(this.datasets,function(e){e.update(t)})),i},empty:function(){e.each(this.datasets,function(t){t.clear()}),this.query=null,this.$node.addClass(this.classes.empty)},destroy:function(){this.$node.off(".tt"),this.$node=t("<div>"),e.each(this.datasets,function(t){t.destroy()})}}),i}(),c=function(){"use strict";function t(){l.apply(this,[].slice.call(arguments,0))}var i=l.prototype;return e.mixin(t.prototype,l.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),i.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),i.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),i._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),i._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(t){return this.$node.css("ltr"===t?this.css.ltr:this.css.rtl),i.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),t}(),h=function(){"use strict";function i(i,r){var o,s,a,l,c,h,d,u,p,f,m;(i=i||{}).input||t.error("missing input"),i.menu||t.error("missing menu"),i.eventBus||t.error("missing event bus"),r.mixin(this),this.eventBus=i.eventBus,this.minLength=e.isNumber(i.minLength)?i.minLength:1,this.input=i.input,this.menu=i.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),o=n(this,"activate","open","_onFocused"),s=n(this,"deactivate","_onBlurred"),a=n(this,"isActive","isOpen","_onEnterKeyed"),l=n(this,"isActive","isOpen","_onTabKeyed"),c=n(this,"isActive","_onEscKeyed"),h=n(this,"isActive","open","_onUpKeyed"),d=n(this,"isActive","open","_onDownKeyed"),u=n(this,"isActive","isOpen","_onLeftKeyed"),p=n(this,"isActive","isOpen","_onRightKeyed"),f=n(this,"_openIfActive","_onQueryChanged"),m=n(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",o,this).onSync("blurred",s,this).onSync("enterKeyed",a,this).onSync("tabKeyed",l,this).onSync("escKeyed",c,this).onSync("upKeyed",h,this).onSync("downKeyed",d,this).onSync("leftKeyed",u,this).onSync("rightKeyed",p,this).onSync("queryChanged",f,this).onSync("whitespaceChanged",m,this).onSync("langDirChanged",this._onLangDirChanged,this)}function n(t){var i=[].slice.call(arguments,1);return function(){var n=[].slice.call(arguments);e.each(i,function(e){return t[e].apply(t,n)})}}return e.mixin(i.prototype,{_hacks:function(){var i,n;i=this.input.$input||t("<div>"),n=this.menu.$node||t("<div>"),i.on("blur.tt",function(t){var r,o,s;r=document.activeElement,o=n.is(r),s=n.has(r).length>0,e.isMsie()&&(o||s)&&(t.preventDefault(),t.stopImmediatePropagation(),e.defer(function(){i.focus()}))}),n.on("mousedown.tt",function(t){t.preventDefault()})},_onSelectableClicked:function(t,e){this.select(e)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(t,e,i,n){this._updateHint(),this.eventBus.trigger("render",i,n,e)},_onAsyncRequested:function(t,e,i){this.eventBus.trigger("asyncrequest",i,e)},_onAsyncCanceled:function(t,e,i){this.eventBus.trigger("asynccancel",i,e)},_onAsyncReceived:function(t,e,i){this.eventBus.trigger("asyncreceive",i,e)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(t,e){var i;(i=this.menu.getActiveSelectable())&&this.select(i)&&e.preventDefault()},_onTabKeyed:function(t,e){var i;(i=this.menu.getActiveSelectable())?this.select(i)&&e.preventDefault():(i=this.menu.getTopSelectable())&&this.autocomplete(i)&&e.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(t,e){this._minLengthMet(e)?this.menu.update(e):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(t,e){this.dir!==e&&(this.dir=e,this.menu.setLanguageDirection(e))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(t){return(t=e.isString(t)?t:this.input.getQuery()||"").length>=this.minLength},_updateHint:function(){var t,i,n,r,o,a;t=this.menu.getTopSelectable(),i=this.menu.getSelectableData(t),n=this.input.getInputValue(),!i||e.isBlankString(n)||this.input.hasOverflow()?this.input.clearHint():(r=s.normalizeQuery(n),o=e.escapeRegExChars(r),(a=new RegExp("^(?:"+o+")(.+$)","i").exec(i.val))&&this.input.setHint(n+a[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(e.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(t){var e=this.menu.getSelectableData(t);return!(!e||this.eventBus.before("select",e.obj))&&(this.input.setQuery(e.val,!0),this.eventBus.trigger("select",e.obj),this.close(),!0)},autocomplete:function(t){var e,i;return e=this.input.getQuery(),i=this.menu.getSelectableData(t),!(!(i&&e!==i.val)||this.eventBus.before("autocomplete",i.obj))&&(this.input.setQuery(i.val),this.eventBus.trigger("autocomplete",i.obj),!0)},moveCursor:function(t){var e,i,n,r;return e=this.input.getQuery(),i=this.menu.selectableRelativeToCursor(t),n=this.menu.getSelectableData(i),r=n?n.obj:null,!(this._minLengthMet()&&this.menu.update(e))&&!this.eventBus.before("cursorchange",r)&&(this.menu.setCursor(i),n?this.input.setInputValue(n.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",r),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),i}();!function(){"use strict";function r(e,i){e.each(function(){var e,n=t(this);(e=n.data(m.typeahead))&&i(e,n)})}function o(t,e){return t.clone().addClass(e.classes.hint).removeData().css(e.css.hint).css(d(t)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function a(t,e){t.data(m.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(t){}return t}function d(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}function u(t){var i,n;i=t.data(m.www),n=t.parent().filter(i.selectors.wrapper),e.each(t.data(m.attrs),function(i,n){e.isUndefined(i)?t.removeAttr(n):t.attr(n,i)}),t.removeData(m.typeahead).removeData(m.www).removeData(m.attr).removeClass(i.classes.input),n.length&&(t.detach().insertAfter(n),n.remove())}function p(i){var n,r;return n=e.isJQuery(i)||e.isElement(i),(r=n?t(i).first():[]).length?r:null}var f,m,g;f=t.fn.typeahead,m={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},g={initialize:function(r,d){var u;return d=e.isArray(d)?d:[].slice.call(arguments,1),r=r||{},u=i(r.classNames),this.each(function(){var i,f,g,v,y,b,_,x,w,k,S;e.each(d,function(t){t.highlight=!!r.highlight}),i=t(this),f=t(u.html.wrapper),g=p(r.hint),v=p(r.menu),y=!1!==r.hint&&!g,b=!1!==r.menu&&!v,y&&(g=o(i,u)),b&&(v=t(u.html.menu).css(u.css.menu)),g&&g.val(""),i=a(i,u),(y||b)&&(f.css(u.css.wrapper),i.css(y?u.css.input:u.css.inputWithNoHint),i.wrap(f).parent().prepend(y?g:null).append(b?v:null)),S=b?c:l,_=new n({el:i}),x=new s({hint:g,input:i},u),w=new S({node:v,datasets:d},u),k=new h({input:x,menu:w,eventBus:_,minLength:r.minLength},u),i.data(m.www,u),i.data(m.typeahead,k)})},isEnabled:function(){var t;return r(this.first(),function(e){t=e.isEnabled()}),t},enable:function(){return r(this,function(t){t.enable()}),this},disable:function(){return r(this,function(t){t.disable()}),this},isActive:function(){var t;return r(this.first(),function(e){t=e.isActive()}),t},activate:function(){return r(this,function(t){t.activate()}),this},deactivate:function(){return r(this,function(t){t.deactivate()}),this},isOpen:function(){var t;return r(this.first(),function(e){t=e.isOpen()}),t},open:function(){return r(this,function(t){t.open()}),this},close:function(){return r(this,function(t){t.close()}),this},select:function(e){var i=!1,n=t(e);return r(this.first(),function(t){i=t.select(n)}),i},autocomplete:function(e){var i=!1,n=t(e);return r(this.first(),function(t){i=t.autocomplete(n)}),i},moveCursor:function(t){var e=!1;return r(this.first(),function(i){e=i.moveCursor(t)}),e},val:function(t){var e;return arguments.length?(r(this,function(e){e.setVal(t)}),this):(r(this.first(),function(t){e=t.getVal()}),e)},destroy:function(){return r(this,function(t,e){u(e),t.destroy()}),this}},t.fn.typeahead=function(t){return g[t]?g[t].apply(this,[].slice.call(arguments,1)):g.initialize.apply(this,arguments)},t.fn.typeahead.noConflict=function(){return t.fn.typeahead=f,this}}()}),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";function n(){var t=u();return t.compile=function(e,i){return l.compile(e,i,t)},t.precompile=function(e,i){return l.precompile(e,i,t)},t.AST=s.default,t.Compiler=l.Compiler,t.JavaScriptCompiler=c.default,t.Parser=a.parser,t.parse=a.parse,t}var r=i(1).default;e.__esModule=!0;var o=r(i(2)),s=r(i(35)),a=i(36),l=i(41),c=r(i(42)),h=r(i(39)),d=r(i(34)),u=o.default.create,p=n();p.create=n,d.default(p),p.Visitor=h.default,p.default=p,e.default=p,t.exports=e.default},function(t,e){"use strict";e.default=function(t){return t&&t.__esModule?t:{default:t}},e.__esModule=!0},function(t,e,i){"use strict";function n(){var t=new s.HandlebarsEnvironment;return c.extend(t,s),t.SafeString=a.default,t.Exception=l.default,t.Utils=c,t.escapeExpression=c.escapeExpression,t.VM=h,t.template=function(e){return h.template(e,t)},t}var r=i(3).default,o=i(1).default;e.__esModule=!0;var s=r(i(4)),a=o(i(21)),l=o(i(6)),c=r(i(5)),h=r(i(22)),d=o(i(34)),u=n();u.create=n,d.default(u),u.default=u,e.default=u,t.exports=e.default},function(t,e){"use strict";e.default=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e},e.__esModule=!0},function(t,e,i){"use strict";function n(t,e,i){this.helpers=t||{},this.partials=e||{},this.decorators=i||{},a.registerDefaultHelpers(this),l.registerDefaultDecorators(this)}var r=i(1).default;e.__esModule=!0,e.HandlebarsEnvironment=n;var o=i(5),s=r(i(6)),a=i(10),l=i(18),c=r(i(20));e.VERSION="4.0.10";e.COMPILER_REVISION=7;var h={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};e.REVISION_CHANGES=h;n.prototype={constructor:n,logger:c.default,log:c.default.log,registerHelper:function(t,e){if("[object Object]"===o.toString.call(t)){if(e)throw new s.default("Arg not supported with multiple helpers");o.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if("[object Object]"===o.toString.call(t))o.extend(this.partials,t);else{if(void 0===e)throw new s.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if("[object Object]"===o.toString.call(t)){if(e)throw new s.default("Arg not supported with multiple decorators");o.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var d=c.default.log;e.log=d,e.createFrame=o.createFrame,e.logger=c.default},function(t,e){"use strict";function i(t){return r[t]}function n(t){for(var e=1;e<arguments.length;e++)for(var i in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],i)&&(t[i]=arguments[e][i]);return t}e.__esModule=!0,e.extend=n,e.indexOf=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},e.escapeExpression=function(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}return s.test(t)?t.replace(o,i):t},e.isEmpty=function(t){return!t&&0!==t||!(!c(t)||0!==t.length)},e.createFrame=function(t){var e=n({},t);return e._parent=t,e},e.blockParams=function(t,e){return t.path=e,t},e.appendContextPath=function(t,e){return(t?t+".":"")+e};var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},o=/[&<>"'`=]/g,s=/[&<>"'`=]/,a=Object.prototype.toString;e.toString=a;var l=function(t){return"function"==typeof t};l(/x/)&&(e.isFunction=l=function(t){return"function"==typeof t&&"[object Function]"===a.call(t)}),e.isFunction=l;var c=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===a.call(t)};e.isArray=c},function(t,e,i){"use strict";function n(t,e){var i=e&&e.loc,s=void 0,a=void 0;i&&(t+=" - "+(s=i.start.line)+":"+(a=i.start.column));for(var l=Error.prototype.constructor.call(this,t),c=0;c<o.length;c++)this[o[c]]=l[o[c]];Error.captureStackTrace&&Error.captureStackTrace(this,n);try{i&&(this.lineNumber=s,r?Object.defineProperty(this,"column",{value:a,enumerable:!0}):this.column=a)}catch(t){}}var r=i(7).default;e.__esModule=!0;var o=["description","fileName","lineNumber","message","name","number","stack"];n.prototype=new Error,e.default=n,t.exports=e.default},function(t,e,i){t.exports={default:i(8),__esModule:!0}},function(t,e,i){var n=i(9);t.exports=function(t,e,i){return n.setDesc(t,e,i)}},function(t,e){var i=Object;t.exports={create:i.create,getProto:i.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:i.getOwnPropertyDescriptor,setDesc:i.defineProperty,setDescs:i.defineProperties,getKeys:i.keys,getNames:i.getOwnPropertyNames,getSymbols:i.getOwnPropertySymbols,each:[].forEach}},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0,e.registerDefaultHelpers=function(t){r.default(t),o.default(t),s.default(t),a.default(t),l.default(t),c.default(t),h.default(t)};var r=n(i(11)),o=n(i(12)),s=n(i(13)),a=n(i(14)),l=n(i(15)),c=n(i(16)),h=n(i(17))},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5);e.default=function(t){t.registerHelper("blockHelperMissing",function(e,i){var r=i.inverse,o=i.fn;if(!0===e)return o(this);if(!1===e||null==e)return r(this);if(n.isArray(e))return e.length>0?(i.ids&&(i.ids=[i.name]),t.helpers.each(e,i)):r(this);if(i.data&&i.ids){var s=n.createFrame(i.data);s.contextPath=n.appendContextPath(i.data.contextPath,i.name),i={data:s}}return o(e,i)})},t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var r=i(5),o=n(i(6));e.default=function(t){t.registerHelper("each",function(t,e){function i(e,i,o){c&&(c.key=e,c.index=i,c.first=0===i,c.last=!!o,h&&(c.contextPath=h+e)),l+=n(t[e],{data:c,blockParams:r.blockParams([t[e],e],[h+e,null])})}if(!e)throw new o.default("Must pass iterator to #each");var n=e.fn,s=e.inverse,a=0,l="",c=void 0,h=void 0;if(e.data&&e.ids&&(h=r.appendContextPath(e.data.contextPath,e.ids[0])+"."),r.isFunction(t)&&(t=t.call(this)),e.data&&(c=r.createFrame(e.data)),t&&"object"==typeof t)if(r.isArray(t))for(var d=t.length;a<d;a++)a in t&&i(a,a,a===t.length-1);else{var u=void 0;for(var p in t)t.hasOwnProperty(p)&&(void 0!==u&&i(u,a-1),u=p,a++);void 0!==u&&i(u,a-1,!0)}return 0===a&&(l=s(this)),l})},t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var r=n(i(6));e.default=function(t){t.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5);e.default=function(t){t.registerHelper("if",function(t,e){return n.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||n.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,i){return t.helpers.if.call(this,e,{fn:i.inverse,inverse:i.fn,hash:i.hash})})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],i=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var r=1;null!=i.hash.level?r=i.hash.level:i.data&&null!=i.data.level&&(r=i.data.level),e[0]=r,t.log.apply(t,e)})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",function(t,e){return t&&t[e]})},t.exports=e.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5);e.default=function(t){t.registerHelper("with",function(t,e){n.isFunction(t)&&(t=t.call(this));var i=e.fn;if(n.isEmpty(t))return e.inverse(this);var r=e.data;return e.data&&e.ids&&((r=n.createFrame(e.data)).contextPath=n.appendContextPath(e.data.contextPath,e.ids[0])),i(t,{data:r,blockParams:n.blockParams([t],[r&&r.contextPath])})})},t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0,e.registerDefaultDecorators=function(t){r.default(t)};var r=n(i(19))},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5);e.default=function(t){t.registerDecorator("inline",function(t,e,i,r){var o=t;return e.partials||(e.partials={},o=function(r,o){var s=i.partials;i.partials=n.extend({},s,e.partials);var a=t(r,o);return i.partials=s,a}),e.partials[r.args[0]]=r.fn,o})},t.exports=e.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=n.indexOf(r.methodMap,t.toLowerCase());t=e>=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];console[e].apply(console,n)}}};e.default=r,t.exports=e.default},function(t,e){"use strict";function i(t){this.string=t}e.__esModule=!0,i.prototype.toString=i.prototype.toHTML=function(){return""+this.string},e.default=i,t.exports=e.default},function(t,e,i){"use strict";function n(t,e,i,n,r,o,a){function l(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=a;return!a||e==a[0]||e===t.nullContext&&null===a[0]||(s=[e].concat(a)),i(t,e,t.helpers,t.partials,r.data||n,o&&[r.blockParams].concat(o),s)}return l=s(i,l,t,a,n,o),l.program=e,l.depth=a?a.length:0,l.blockParams=r||0,l}function r(){return""}function o(t,e){return e&&"root"in e||((e=e?u.createFrame(e):{}).root=t),e}function s(t,e,i,n,r,o){if(t.decorator){var s={};e=t.decorator(e,s,i,n&&n[0],r,o,n),h.extend(e,s)}return e}var a=i(23).default,l=i(3).default,c=i(1).default;e.__esModule=!0,e.checkRevision=function(t){var e=t&&t[0]||1,i=u.COMPILER_REVISION;if(e!==i){if(e<i){var n=u.REVISION_CHANGES[i],r=u.REVISION_CHANGES[e];throw new d.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+r+").")}throw new d.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}},e.template=function(t,e){function i(e){function n(e){return""+t.main(r,e,r.helpers,r.partials,l,h,c)}var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],l=a.data;i._setup(a),!a.partial&&t.useData&&(l=o(e,l));var c=void 0,h=t.useBlockParams?[]:void 0;return t.useDepths&&(c=a.depths?e!=a.depths[0]?[e].concat(a.depths):a.depths:[e]),(n=s(t.main,n,r,a.depths||[],l,h))(e,a)}if(!e)throw new d.default("No environment passed to template");if(!t||!t.main)throw new d.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r={strict:function(t,e){if(!(e in t))throw new d.default('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n]&&null!=t[n][e])return t[n][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:h.escapeExpression,invokePartial:function(i,n,r){r.hash&&(n=h.extend({},n,r.hash),r.ids&&(r.ids[0]=!0)),i=e.VM.resolvePartial.call(this,i,n,r);var o=e.VM.invokePartial.call(this,i,n,r);if(null==o&&e.compile&&(r.partials[r.name]=e.compile(i,t.compilerOptions,e),o=r.partials[r.name](n,r)),null!=o){if(r.indent){for(var s=o.split("\n"),a=0,l=s.length;a<l&&(s[a]||a+1!==l);a++)s[a]=r.indent+s[a];o=s.join("\n")}return o}throw new d.default("The partial "+r.name+" could not be compiled when running in runtime-only mode")},fn:function(e){var i=t[e];return i.decorator=t[e+"_d"],i},programs:[],program:function(t,e,i,r,o){var s=this.programs[t],a=this.fn(t);return e||o||r||i?s=n(this,t,a,e,i,r,o):s||(s=this.programs[t]=n(this,t,a)),s},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var i=t||e;return t&&e&&t!==e&&(i=h.extend({},e,t)),i},nullContext:a({}),noop:e.VM.noop,compilerInfo:t.compiler};return i.isTop=!0,i._setup=function(i){i.partial?(r.helpers=i.helpers,r.partials=i.partials,r.decorators=i.decorators):(r.helpers=r.merge(i.helpers,e.helpers),t.usePartial&&(r.partials=r.merge(i.partials,e.partials)),(t.usePartial||t.useDecorators)&&(r.decorators=r.merge(i.decorators,e.decorators)))},i._child=function(e,i,o,s){if(t.useBlockParams&&!o)throw new d.default("must pass block params");if(t.useDepths&&!s)throw new d.default("must pass parent depths");return n(r,e,t[e],i,0,o,s)},i},e.wrapProgram=n,e.resolvePartial=function(t,e,i){return t?t.call||i.name||(i.name=t,t=i.partials[t]):t="@partial-block"===i.name?i.data["partial-block"]:i.partials[i.name],t},e.invokePartial=function(t,e,i){var n=i.data&&i.data["partial-block"];i.partial=!0,i.ids&&(i.data.contextPath=i.ids[0]||i.data.contextPath);var o=void 0;if(i.fn&&i.fn!==r&&function(){i.data=u.createFrame(i.data);var t=i.fn;o=i.data["partial-block"]=function(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return i.data=u.createFrame(i.data),i.data["partial-block"]=n,t(e,i)},t.partials&&(i.partials=h.extend({},i.partials,t.partials))}(),void 0===t&&o&&(t=o),void 0===t)throw new d.default("The partial "+i.name+" could not be found");if(t instanceof Function)return t(e,i)},e.noop=r;var h=l(i(5)),d=c(i(6)),u=i(4)},function(t,e,i){t.exports={default:i(24),__esModule:!0}},function(t,e,i){i(25),t.exports=i(30).Object.seal},function(t,e,i){var n=i(26);i(27)("seal",function(t){return function(e){return t&&n(e)?t(e):e}})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){var n=i(28),r=i(30),o=i(33);t.exports=function(t,e){var i=(r.Object||{})[t]||Object[t],s={};s[t]=e(i),n(n.S+n.F*o(function(){i(1)}),"Object",s)}},function(t,e,i){var n=i(29),r=i(30),o=i(31),s=function(t,e,i){var a,l,c,h=t&s.F,d=t&s.G,u=t&s.S,p=t&s.P,f=t&s.B,m=t&s.W,g=d?r:r[e]||(r[e]={}),v=d?n:u?n[e]:(n[e]||{}).prototype;d&&(i=e);for(a in i)(l=!h&&v&&a in v)&&a in g||(c=l?v[a]:i[a],g[a]=d&&"function"!=typeof v[a]?i[a]:f&&l?o(c,n):m&&v[a]==c?function(t){var e=function(e){return this instanceof t?new t(e):t(e)};return e.prototype=t.prototype,e}(c):p&&"function"==typeof c?o(Function.call,c):c,p&&((g.prototype||(g.prototype={}))[a]=c))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e){var i=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=i)},function(t,e,i){var n=i(32);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){(function(i){"use strict";e.__esModule=!0,e.default=function(t){var e=void 0!==i?i:window,n=e.Handlebars;t.noConflict=function(){return e.Handlebars===t&&(e.Handlebars=n),t}},t.exports=e.default}).call(e,function(){return this}())},function(t,e){"use strict";e.__esModule=!0;var i={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!i.helpers.scopedId(t)&&!t.depth}}};e.default=i,t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default,r=i(3).default;e.__esModule=!0,e.parse=function(t,e){return"Program"===t.type?t:(o.default.yy=c,c.locInfo=function(t){return new c.SourceLocation(e&&e.srcName,t)},new s.default(e).accept(o.default.parse(t)))};var o=n(i(37)),s=n(i(38)),a=r(i(40)),l=i(5);e.parser=o.default;var c={};l.extend(c,a)},function(t,e){"use strict";e.__esModule=!0;var i=function(){function t(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(t,e,i,n,r,o,s){var a=o.length-1;switch(r){case 1:return o[a-1];case 2:this.$=n.prepareProgram(o[a]);break;case 3:case 4:case 5:case 6:case 7:case 8:this.$=o[a];break;case 9:this.$={type:"CommentStatement",value:n.stripComment(o[a]),strip:n.stripFlags(o[a],o[a]),loc:n.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:o[a],value:o[a],loc:n.locInfo(this._$)};break;case 11:this.$=n.prepareRawBlock(o[a-2],o[a-1],o[a],this._$);break;case 12:this.$={path:o[a-3],params:o[a-2],hash:o[a-1]};break;case 13:this.$=n.prepareBlock(o[a-3],o[a-2],o[a-1],o[a],!1,this._$);break;case 14:this.$=n.prepareBlock(o[a-3],o[a-2],o[a-1],o[a],!0,this._$);break;case 15:this.$={open:o[a-5],path:o[a-4],params:o[a-3],hash:o[a-2],blockParams:o[a-1],strip:n.stripFlags(o[a-5],o[a])};break;case 16:case 17:this.$={path:o[a-4],params:o[a-3],hash:o[a-2],blockParams:o[a-1],strip:n.stripFlags(o[a-5],o[a])};break;case 18:this.$={strip:n.stripFlags(o[a-1],o[a-1]),program:o[a]};break;case 19:var l=n.prepareBlock(o[a-2],o[a-1],o[a],o[a],!1,this._$),c=n.prepareProgram([l],o[a-1].loc);c.chained=!0,this.$={strip:o[a-2].strip,program:c,chain:!0};break;case 20:this.$=o[a];break;case 21:this.$={path:o[a-1],strip:n.stripFlags(o[a-2],o[a])};break;case 22:case 23:this.$=n.prepareMustache(o[a-3],o[a-2],o[a-1],o[a-4],n.stripFlags(o[a-4],o[a]),this._$);break;case 24:this.$={type:"PartialStatement",name:o[a-3],params:o[a-2],hash:o[a-1],indent:"",strip:n.stripFlags(o[a-4],o[a]),loc:n.locInfo(this._$)};break;case 25:this.$=n.preparePartialBlock(o[a-2],o[a-1],o[a],this._$);break;case 26:this.$={path:o[a-3],params:o[a-2],hash:o[a-1],strip:n.stripFlags(o[a-4],o[a])};break;case 27:case 28:this.$=o[a];break;case 29:this.$={type:"SubExpression",path:o[a-3],params:o[a-2],hash:o[a-1],loc:n.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:o[a],loc:n.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:n.id(o[a-2]),value:o[a],loc:n.locInfo(this._$)};break;case 32:this.$=n.id(o[a-1]);break;case 33:case 34:this.$=o[a];break;case 35:this.$={type:"StringLiteral",value:o[a],original:o[a],loc:n.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(o[a]),original:Number(o[a]),loc:n.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===o[a],original:"true"===o[a],loc:n.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:n.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:n.locInfo(this._$)};break;case 40:case 41:this.$=o[a];break;case 42:this.$=n.preparePath(!0,o[a],this._$);break;case 43:this.$=n.preparePath(!1,o[a],this._$);break;case 44:o[a-2].push({part:n.id(o[a]),original:o[a],separator:o[a-1]}),this.$=o[a-2];break;case 45:this.$=[{part:n.id(o[a]),original:o[a]}];break;case 46:this.$=[];break;case 47:o[a-1].push(o[a]);break;case 48:this.$=[o[a]];break;case 49:o[a-1].push(o[a]);break;case 50:this.$=[];break;case 51:o[a-1].push(o[a]);break;case 58:this.$=[];break;case 59:o[a-1].push(o[a]);break;case 64:this.$=[];break;case 65:o[a-1].push(o[a]);break;case 70:this.$=[];break;case 71:o[a-1].push(o[a]);break;case 78:this.$=[];break;case 79:o[a-1].push(o[a]);break;case 82:this.$=[];break;case 83:o[a-1].push(o[a]);break;case 86:this.$=[];break;case 87:o[a-1].push(o[a]);break;case 90:this.$=[];break;case 91:o[a-1].push(o[a]);break;case 94:this.$=[];break;case 95:o[a-1].push(o[a]);break;case 98:this.$=[o[a]];break;case 99:o[a-1].push(o[a]);break;case 100:this.$=[o[a]];break;case 101:o[a-1].push(o[a])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(t,e){throw new Error(t)},parse:function(t){var e=this,i=[0],n=[null],r=[],o=this.table,s="",a=0,l=0,c=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;r.push(h);var d=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var u,p,f,m,g,v,y,b,_,x={};;){if(f=i[i.length-1],this.defaultActions[f]?m=this.defaultActions[f]:(null!==u&&void 0!==u||(u=function(){var t;return"number"!=typeof(t=e.lexer.lex()||1)&&(t=e.symbols_[t]||t),t}()),m=o[f]&&o[f][u]),void 0===m||!m.length||!m[0]){var w="";if(!c){_=[];for(v in o[f])this.terminals_[v]&&v>2&&_.push("'"+this.terminals_[v]+"'");w=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[u]||u)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==u?"end of input":"'"+(this.terminals_[u]||u)+"'"),this.parseError(w,{text:this.lexer.match,token:this.terminals_[u]||u,line:this.lexer.yylineno,loc:h,expected:_})}}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+u);switch(m[0]){case 1:i.push(u),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),i.push(m[1]),u=null,p?(u=p,p=null):(l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,c>0&&c--);break;case 2:if(y=this.productions_[m[1]][1],x.$=n[n.length-y],x._$={first_line:r[r.length-(y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(y||1)].first_column,last_column:r[r.length-1].last_column},d&&(x._$.range=[r[r.length-(y||1)].range[0],r[r.length-1].range[1]]),void 0!==(g=this.performAction.call(x,s,l,a,this.yy,m[1],n,r)))return g;y&&(i=i.slice(0,-1*y*2),n=n.slice(0,-1*y),r=r.slice(0,-1*y)),i.push(this.productions_[m[1]][0]),n.push(x.$),r.push(x._$),b=o[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,i,n,r;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),s=0;s<o.length&&(!(i=this._input.match(this.rules[o[s]]))||e&&!(i[0].length>e[0].length)||(e=i,n=s,this.options.flex));s++);return e?((r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,o[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,i,n){function r(t,i){return e.yytext=e.yytext.substr(t,e.yyleng-i)}switch(i){case 0:if("\\\\"===e.yytext.slice(-2)?(r(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(r(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=r(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=r(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},t}();return e.lexer=i,t.prototype=e,e.Parser=t,new t}();e.default=i,t.exports=e.default},function(t,e,i){"use strict";function n(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function r(t,e,i){void 0===e&&(e=t.length);var n=t[e-1],r=t[e-2];return n?"ContentStatement"===n.type?(r||!i?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original):void 0:i}function o(t,e,i){void 0===e&&(e=-1);var n=t[e+1],r=t[e+2];return n?"ContentStatement"===n.type?(r||!i?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original):void 0:i}function s(t,e,i){var n=t[null==e?0:e+1];if(n&&"ContentStatement"===n.type&&(i||!n.rightStripped)){var r=n.value;n.value=n.value.replace(i?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==r}}function a(t,e,i){var n=t[null==e?t.length-1:e-1];if(n&&"ContentStatement"===n.type&&(i||!n.leftStripped)){var r=n.value;return n.value=n.value.replace(i?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==r,n.leftStripped}}var l=i(1).default;e.__esModule=!0;var c=l(i(39));(n.prototype=new c.default).Program=function(t){var e=!this.options.ignoreStandalone,i=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,l=0,c=n.length;l<c;l++){var h=n[l],d=this.accept(h);if(d){var u=r(n,l,i),p=o(n,l,i),f=d.openStandalone&&u,m=d.closeStandalone&&p,g=d.inlineStandalone&&u&&p;d.close&&s(n,l,!0),d.open&&a(n,l,!0),e&&g&&(s(n,l),a(n,l)&&"PartialStatement"===h.type&&(h.indent=/([ \t]+$)/.exec(n[l-1].original)[1])),e&&f&&(s((h.program||h.inverse).body),a(n,l)),e&&m&&(s(n,l),a((h.inverse||h.program).body))}}return t},n.prototype.BlockStatement=n.prototype.DecoratorBlock=n.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,i=t.program&&t.inverse,n=i,l=i;if(i&&i.chained)for(n=i.body[0].program;l.chained;)l=l.body[l.body.length-1].program;var c={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:o(e.body),closeStandalone:r((n||e).body)};if(t.openStrip.close&&s(e.body,null,!0),i){var h=t.inverseStrip;h.open&&a(e.body,null,!0),h.close&&s(n.body,null,!0),t.closeStrip.open&&a(l.body,null,!0),!this.options.ignoreStandalone&&r(e.body)&&o(n.body)&&(a(e.body),s(n.body))}else t.closeStrip.open&&a(e.body,null,!0);return c},n.prototype.Decorator=n.prototype.MustacheStatement=function(t){return t.strip},n.prototype.PartialStatement=n.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e.default=n,t.exports=e.default},function(t,e,i){"use strict";function n(){this.parents=[]}function r(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function o(t){r.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function s(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}var a=i(1).default;e.__esModule=!0;var l=a(i(6));n.prototype={constructor:n,mutating:!1,acceptKey:function(t,e){var i=this.accept(t[e]);if(this.mutating){if(i&&!n.prototype[i.type])throw new l.default('Unexpected node type "'+i.type+'" found when accepting '+e+" on "+t.type);t[e]=i}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new l.default(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,i=t.length;e<i;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,i--)},accept:function(t){if(t){if(!this[t.type])throw new l.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:!1!==e?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:r,Decorator:r,BlockStatement:o,DecoratorBlock:o,PartialStatement:s,PartialBlockStatement:function(t){s.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:r,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e.default=n,t.exports=e.default},function(t,e,i){"use strict";function n(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var i={loc:t.path.loc};throw new o.default(t.path.original+" doesn't match "+e,i)}}var r=i(1).default;e.__esModule=!0,e.SourceLocation=function(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}},e.id=function(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t},e.stripFlags=function(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}},e.stripComment=function(t){return t.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")},e.preparePath=function(t,e,i){i=this.locInfo(i);for(var n=t?"@":"",r=[],s=0,a=0,l=e.length;a<l;a++){var c=e[a].part,h=e[a].original!==c;if(n+=(e[a].separator||"")+c,h||".."!==c&&"."!==c&&"this"!==c)r.push(c);else{if(r.length>0)throw new o.default("Invalid path: "+n,{loc:i});".."===c&&s++}}return{type:"PathExpression",data:t,depth:s,parts:r,original:n,loc:i}},e.prepareMustache=function(t,e,i,n,r,o){var s=n.charAt(3)||n.charAt(2),a="{"!==s&&"&"!==s;return{type:/\*/.test(n)?"Decorator":"MustacheStatement",path:t,params:e,hash:i,escaped:a,strip:r,loc:this.locInfo(o)}},e.prepareRawBlock=function(t,e,i,r){n(t,i);var o={type:"Program",body:e,strip:{},loc:r=this.locInfo(r)};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}},e.prepareBlock=function(t,e,i,r,s,a){r&&r.path&&n(t,r);var l=/\*/.test(t.open);e.blockParams=t.blockParams;var c=void 0,h=void 0;if(i){if(l)throw new o.default("Unexpected inverse block on decorator",i);i.chain&&(i.program.body[0].closeStrip=r.strip),h=i.strip,c=i.program}return s&&(s=c,c=e,e=s),{type:l?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:c,openStrip:t.strip,inverseStrip:h,closeStrip:r&&r.strip,loc:this.locInfo(a)}},e.prepareProgram=function(t,e){if(!e&&t.length){var i=t[0].loc,n=t[t.length-1].loc;i&&n&&(e={source:i.source,start:{line:i.start.line,column:i.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,i,r){return n(t,i),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:i&&i.strip,loc:this.locInfo(r)}};var o=r(i(6))},function(t,e,i){"use strict";function n(){}function r(t,e){if(t===e)return!0;if(l.isArray(t)&&l.isArray(e)&&t.length===e.length){for(var i=0;i<t.length;i++)if(!r(t[i],e[i]))return!1;return!0}}function o(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}var s=i(1).default;e.__esModule=!0,e.Compiler=n,e.precompile=function(t,e,i){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new a.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0),e.compat&&(e.useDepths=!0);var n=i.parse(t,e),r=(new i.Compiler).compile(n,e);return(new i.JavaScriptCompiler).compile(r,e)},e.compile=function(t,e,i){function n(){var n=i.parse(t,e),r=(new i.Compiler).compile(n,e),o=(new i.JavaScriptCompiler).compile(r,e,void 0,!0);return i.template(o)}function r(t,e){return o||(o=n()),o.call(this,t,e)}if(void 0===e&&(e={}),null==t||"string"!=typeof t&&"Program"!==t.type)throw new a.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in(e=l.extend({},e))||(e.data=!0),e.compat&&(e.useDepths=!0);var o=void 0;return r._setup=function(t){return o||(o=n()),o._setup(t)},r._child=function(t,e,i,r){return o||(o=n()),o._child(t,e,i,r)},r};var a=s(i(6)),l=i(5),c=s(i(35)),h=[].slice;n.prototype={compiler:n,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(o=0;o<e;o++){var i=this.opcodes[o],n=t.opcodes[o];if(i.opcode!==n.opcode||!r(i.args,n.args))return!1}e=this.children.length;for(var o=0;o<e;o++)if(!this.children[o].equals(t.children[o]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var i=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},i)for(var n in i)n in i&&(this.options.knownHelpers[n]=i[n]);return this.accept(t)},compileProgram:function(t){var e=(new this.compiler).compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||e.usePartial,this.children[i]=e,this.useDepths=this.useDepths||e.useDepths,i},accept:function(t){if(!this[t.type])throw new a.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,i=e.length,n=0;n<i;n++)this.accept(e[n]);return this.options.blockParams.shift(),this.isSimple=1===i,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){o(t);var e=t.program,i=t.inverse;e=e&&this.compileProgram(e),i=i&&this.compileProgram(i);var n=this.classifySexpr(t);"helper"===n?this.helperSexpr(t,e,i):"simple"===n?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,i),this.opcode("pushProgram",e),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),i=this.setupFullMustacheParams(t,e,void 0),n=t.path;this.useDecorators=!0,this.opcode("registerDecorator",i.length,n.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var i=t.params;if(i.length>1)throw new a.default("Unsupported number of partial arguments: "+i.length,t);i.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):i.push({type:"PathExpression",parts:[],depth:0}));var n=t.name.original,r="SubExpression"===t.name.type;r&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var o=t.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",r,n,o),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){o(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,i){var n=t.path,r=n.parts[0],o=null!=e||null!=i;this.opcode("getContext",n.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",i),n.strict=!0,this.accept(n),this.opcode("invokeAmbiguous",r,o)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,i){var n=this.setupFullMustacheParams(t,e,i),r=t.path,o=r.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",n.length,o);else{if(this.options.knownHelpersOnly)throw new a.default("You specified knownHelpersOnly, but used the unknown helper "+o,t);r.strict=!0,r.falsy=!0,this.accept(r),this.opcode("invokeHelper",n.length,r.original,c.default.helpers.simpleId(r))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],i=c.default.helpers.scopedId(t),n=!t.depth&&!i&&this.blockParamIndex(e);n?this.opcode("lookupBlockParam",n,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,i):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,i=0,n=e.length;for(this.opcode("pushHash");i<n;i++)this.pushParam(e[i].value);for(;i--;)this.opcode("assignToHash",e[i].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:h.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=c.default.helpers.simpleId(t.path),i=e&&!!this.blockParamIndex(t.path.parts[0]),n=!i&&c.default.helpers.helperExpression(t),r=!i&&(n||e);if(r&&!n){var o=t.path.parts[0],s=this.options;s.knownHelpers[o]?n=!0:s.knownHelpersOnly&&(r=!1)}return n?"helper":r?"ambiguous":"simple"},pushParams:function(t){for(var e=0,i=t.length;e<i;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var i=void 0;if(!t.parts||c.default.helpers.scopedId(t)||t.depth||(i=this.blockParamIndex(t.parts[0])),i){var n=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,n)}else(e=t.original||e).replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,i,n){var r=t.params;return this.pushParams(r),this.opcode("pushProgram",e),this.opcode("pushProgram",i),t.hash?this.accept(t.hash):this.opcode("emptyHash",n),r},blockParamIndex:function(t){for(var e=0,i=this.options.blockParams.length;e<i;e++){var n=this.options.blockParams[e],r=n&&l.indexOf(n,t);if(n&&r>=0)return[e,r]}}}},function(t,e,i){"use strict";function n(t){this.value=t}function r(){}function o(t,e,i,n){var r=e.popStack(),o=0,s=i.length;for(t&&s--;o<s;o++)r=e.nameLookup(r,i[o],n);return t?[e.aliasable("container.strict"),"(",r,", ",e.quotedString(i[o]),")"]:r}var s=i(1).default;e.__esModule=!0;var a=i(4),l=s(i(6)),c=i(5),h=s(i(43));r.prototype={nameLookup:function(t,e){return r.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"[",JSON.stringify(e),"]"]},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=a.COMPILER_REVISION;return[t,a.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,i){return c.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:i?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,i,n){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!n,this.name=this.environment.name,this.isChild=!!i,this.context=i||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var r=t.opcodes,o=void 0,s=void 0,a=void 0,c=void 0;for(a=0,c=r.length;a<c;a++)o=r[a],this.source.currentLocation=o.loc,s=s||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=s,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new l.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),n?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var h=this.createFunctionContext(n);if(this.isChild)return h;var d={compiler:this.compilerInfo(),main:h};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var u=this.context,p=u.programs,f=u.decorators;for(a=0,c=p.length;a<c;a++)p[a]&&(d[a]=p[a],f[a]&&(d[a+"_d"]=f[a],d.useDecorators=!0));return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),n?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),e.srcName?(d=d.toStringWithSourceMap({file:e.destName})).map=d.map&&d.map.toString():d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new h.default(this.options.srcName),this.decorators=new h.default(this.options.srcName)},createFunctionContext:function(t){var e="",i=this.stackVars.concat(this.registers.list);i.length>0&&(e+=", "+i.join(", "));var n=0;for(var r in this.aliases){var o=this.aliases[r];this.aliases.hasOwnProperty(r)&&o.children&&o.referenceCount>1&&(e+=", alias"+ ++n+"="+r,o.children[0]="alias"+n)}var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(e);return t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),") {\n  ",a,"}"])},mergeSource:function(t){var e=this.environment.isSimple,i=!this.forceBuffer,n=void 0,r=void 0,o=void 0,s=void 0;return this.source.each(function(t){t.appendToBuffer?(o?t.prepend("  + "):o=t,s=t):(o&&(r?o.prepend("buffer += "):n=!0,s.add(";"),o=s=void 0),r=!0,e||(i=!1))}),i?o?(o.prepend("return "),s.add(";")):r||this.source.push('return "";'):(t+=", buffer = "+(n?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(n?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),i=[this.contextName(0)];this.setupHelperArgs(t,0,i);var n=this.popStack();i.splice(1,0,n),this.push(this.source.functionCall(e,"call",i))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var i=this.topStack();e.splice(1,0,i),this.pushSource(["if (!",this.lastHelper,") { ",i," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,i,n){var r=0;n||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[r++])),this.resolvePath("context",t,r,e,i)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,i){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,i)},resolvePath:function(t,e,i,n,r){var s=this;if(this.options.strict||this.options.assumeObjects)this.push(o(this.options.strict&&r,this,e,t));else for(var a=e.length;i<a;i++)this.replaceStack(function(r){var o=s.nameLookup(r,e[i],t);return n?[" && ",o]:[" != null ? ",o," : ",r]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){var i=this.nameLookup("decorators",e,"decorator"),n=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(i,"",["fn","props","container",n])," || fn;"])},invokeHelper:function(t,e,i){var n=this.popStack(),r=this.setupHelper(t,e),o=i?[r.name," || "]:"",s=["("].concat(o,n);this.options.strict||s.push(" || ",this.aliasable("helpers.helperMissing")),s.push(")"),this.push(this.source.functionCall(s,"call",r.callParams))},invokeKnownHelper:function(t,e){var i=this.setupHelper(t,e);this.push(this.source.functionCall(i.name,"call",i.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var i=this.popStack();this.emptyHash();var n=this.setupHelper(0,t,e),r=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",t,"helper")," || ",i,")"];this.options.strict||(r[0]="(helper = ",r.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",r,n.paramsInit?["),(",n.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",n.callParams)," : helper))"])},invokePartial:function(t,e,i){var n=[],r=this.setupParams(e,1,n);t&&(e=this.popStack(),delete r.name),i&&(r.indent=JSON.stringify(i)),r.helpers="helpers",r.partials="partials",r.decorators="container.decorators",t?n.unshift(e):n.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(r.depths="depths"),r=this.objectLiteral(r),n.push(r),this.push(this.source.functionCall("container.invokePartial","",n))},assignToHash:function(t){var e=this.popStack(),i=void 0,n=void 0,r=void 0;this.trackIds&&(r=this.popStack()),this.stringParams&&(n=this.popStack(),i=this.popStack());var o=this.hash;i&&(o.contexts[t]=i),n&&(o.types[t]=n),r&&(o.ids[t]=r),o.values[t]=e},pushId:function(t,e,i){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(i?" + "+JSON.stringify("."+i):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:r,compileChildren:function(t,e){for(var i=t.children,n=void 0,r=void 0,o=0,s=i.length;o<s;o++){n=i[o],r=new this.compiler;var a=this.matchExistingProgram(n);if(null==a){this.context.programs.push("");var l=this.context.programs.length;n.index=l,n.name="program"+l,this.context.programs[l]=r.compile(n,e,this.context,!this.precompile),this.context.decorators[l]=r.decorators,this.context.environments[l]=n,this.useDepths=this.useDepths||r.useDepths,this.useBlockParams=this.useBlockParams||r.useBlockParams,n.useDepths=this.useDepths,n.useBlockParams=this.useBlockParams}else n.index=a.index,n.name="program"+a.index,this.useDepths=this.useDepths||a.useDepths,this.useBlockParams=this.useBlockParams||a.useBlockParams}},matchExistingProgram:function(t){for(var e=0,i=this.context.environments.length;e<i;e++){var n=this.context.environments[e];if(n&&n.equals(t))return n}},programExpression:function(t){var e=this.environment.children[t],i=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&i.push("blockParams"),this.useDepths&&i.push("depths"),"container.program("+i.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof n||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new n(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],i=void 0,r=void 0,o=void 0;if(!this.isInline())throw new l.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof n)e=["(",i=[s.value]],o=!0;else{r=!0;var a=this.incrStack();e=["((",this.push(a)," = ",s,")"],i=this.topStack()}var c=t.call(this,i);o||this.popStack(),r&&this.stackSlot--,this.push(e.concat(c,")"))},incrStack:function(){return++this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,i=t.length;e<i;e++){var r=t[e];if(r instanceof n)this.compileStack.push(r);else{var o=this.incrStack();this.pushSource([o," = ",r,";"]),this.compileStack.push(o)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),i=(e?this.inlineStack:this.compileStack).pop();if(!t&&i instanceof n)return i.value;if(!e){if(!this.stackSlot)throw new l.default("Invalid stack pop");this.stackSlot--}return i},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof n?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):(e=this.aliases[t]=this.source.wrap(t),e.aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,i){var n=[];return{params:n,paramsInit:this.setupHelperArgs(e,t,n,i),name:this.nameLookup("helpers",e,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(n)}},setupParams:function(t,e,i){var n={},r=[],o=[],s=[],a=!i,l=void 0;a&&(i=[]),n.name=this.quotedString(t),n.hash=this.popStack(),this.trackIds&&(n.hashIds=this.popStack()),this.stringParams&&(n.hashTypes=this.popStack(),n.hashContexts=this.popStack());var c=this.popStack(),h=this.popStack();(h||c)&&(n.fn=h||"container.noop",n.inverse=c||"container.noop");for(var d=e;d--;)l=this.popStack(),i[d]=l,this.trackIds&&(s[d]=this.popStack()),this.stringParams&&(o[d]=this.popStack(),r[d]=this.popStack());return a&&(n.args=this.source.generateArray(i)),this.trackIds&&(n.ids=this.source.generateArray(s)),this.stringParams&&(n.types=this.source.generateArray(o),n.contexts=this.source.generateArray(r)),this.options.data&&(n.data="data"),this.useBlockParams&&(n.blockParams="blockParams"),n},setupHelperArgs:function(t,e,i,n){var r=this.setupParams(t,e,i);return r=this.objectLiteral(r),n?(this.useRegister("options"),i.push("options"),["options=",r]):i?(i.push(r),""):r}},function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=r.RESERVED_WORDS={},i=0,n=t.length;i<n;i++)e[t[i]]=!0}(),r.isValidJavaScriptVariableName=function(t){return!r.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e.default=r,t.exports=e.default},function(t,e,i){"use strict";function n(t,e,i){if(o.isArray(t)){for(var n=[],r=0,s=t.length;r<s;r++)n.push(e.wrap(t[r],i));return n}return"boolean"==typeof t||"number"==typeof t?t+"":t}function r(t){this.srcFile=t,this.source=[]}e.__esModule=!0;var o=i(5),s=void 0;try{}catch(t){}s||((s=function(t,e,i,n){this.src="",n&&this.add(n)}).prototype={add:function(t){o.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){o.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),r.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each(function(e){t.add(["  ",e,"\n"])}),t},each:function(t){for(var e=0,i=this.source.length;e<i;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new s(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof s?t:(t=n(t,this,e),new s(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,i){return i=this.generateList(i),this.wrap([t,e?"."+e+"(":"(",i,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var i in t)if(t.hasOwnProperty(i)){var r=n(t[i],this);"undefined"!==r&&e.push([this.quotedString(i),":",r])}var o=this.generateList(e);return o.prepend("{"),o.add("}"),o},generateList:function(t){for(var e=this.empty(),i=0,r=t.length;i<r;i++)i&&e.add(","),e.add(n(t[i],this));return e},generateArray:function(t){var e=this.generateList(t);return e.prepend("["),e.add("]"),e}},e.default=r,t.exports=e.default}])}),function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}([function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,function(s){r=[i(2)],void 0!==(o="function"==typeof(n=s)?n.apply(e,r):n)&&(t.exports=o)}(function(t){return t})},function(t,e,i){"use strict";var n,r,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(s){r=[i(0),i(12),i(11)],void 0!==(o="function"==typeof(n=s)?n.apply(e,r):n)&&(t.exports=o)}(function(t,e,i,n){function r(e,i,s){if(!(this instanceof r))return new r(e,i,s);this.el=n,this.events={},this.maskset=n,this.refreshValue=!1,!0!==s&&(t.isPlainObject(e)?i=e:(i=i||{},i.alias=e),this.opts=t.extend(!0,{},this.defaults,i),this.noMasksCache=i&&i.definitions!==n,this.userOptions=i||{},this.isRTL=this.opts.numericInput,o(this.opts.alias,i,this.opts))}function o(e,i,s){var a=r.prototype.aliases[e];return a?(a.alias&&o(a.alias,n,s),t.extend(!0,s,a),t.extend(!0,s,i),!0):(null===s.mask&&(s.mask=e),!1)}function a(e,i){function o(e,o,s){var a=!1;if(null!==e&&""!==e||((a=null!==s.regex)?(e=s.regex,e=e.replace(/^(\^)(.*)(\$)$/,"$2")):(a=!0,e=".*")),1===e.length&&!1===s.greedy&&0!==s.repeat&&(s.placeholder=""),s.repeat>0||"*"===s.repeat||"+"===s.repeat){var l="*"===s.repeat?0:"+"===s.repeat?1:s.repeat;e=s.groupmarker.start+e+s.groupmarker.end+s.quantifiermarker.start+l+","+s.repeat+s.quantifiermarker.end}var c,h=a?"regex_"+s.regex:s.numericInput?e.split("").reverse().join(""):e;return r.prototype.masksCache[h]===n||!0===i?(c={mask:e,maskToken:r.prototype.analyseMask(e,a,s),validPositions:{},_buffer:n,buffer:n,tests:{},metadata:o,maskLength:n},!0!==i&&(r.prototype.masksCache[h]=c,c=t.extend(!0,{},r.prototype.masksCache[h]))):c=t.extend(!0,{},r.prototype.masksCache[h]),c}if(t.isFunction(e.mask)&&(e.mask=e.mask(e)),t.isArray(e.mask)){if(e.mask.length>1){e.keepStatic=null===e.keepStatic||e.keepStatic;var s=e.groupmarker.start;return t.each(e.numericInput?e.mask.reverse():e.mask,function(i,r){s.length>1&&(s+=e.groupmarker.end+e.alternatormarker+e.groupmarker.start),r.mask===n||t.isFunction(r.mask)?s+=r:s+=r.mask}),s+=e.groupmarker.end,o(s,e.mask,e)}e.mask=e.mask.pop()}return e.mask&&e.mask.mask!==n&&!t.isFunction(e.mask.mask)?o(e.mask.mask,e.mask,e):o(e.mask,e.mask,e)}function l(o,a,c){function f(t,e,i){e=e||0;var r,o,s,a=[],l=0,h=v();do{!0===t&&m().validPositions[l]?(s=m().validPositions[l],o=s.match,r=s.locator.slice(),a.push(!0===i?s.input:!1===i?o.nativeDef:F(l,o))):(s=_(l,r,l-1),o=s.match,r=s.locator.slice(),(!1===c.jitMasking||l<h||"number"==typeof c.jitMasking&&isFinite(c.jitMasking)&&c.jitMasking>l)&&a.push(!1===i?o.nativeDef:F(l,o))),l++}while((q===n||l<q)&&(null!==o.fn||""!==o.def)||e>l);return""===a[a.length-1]&&a.pop(),m().maskLength=l+1,a}function m(){return a}function g(t){var e=m();e.buffer=n,!0!==t&&(e.validPositions={},e.p=0)}function v(t,e,i){var r=-1,o=-1,s=i||m().validPositions;t===n&&(t=-1);for(var a in s){var l=parseInt(a);s[l]&&(e||!0!==s[l].generatedInput)&&(l<=t&&(r=l),l>=t&&(o=l))}return-1!==r&&t-r>1||o<t?r:o}function y(e,i,r,o){var s,a=e,l=t.extend(!0,{},m().validPositions),h=!1;for(m().p=e,s=i-1;s>=a;s--)m().validPositions[s]!==n&&(!0!==r&&(!m().validPositions[s].match.optionality&&function(t){var e=m().validPositions[t];if(e!==n&&null===e.match.fn){var i=m().validPositions[t-1],r=m().validPositions[t+1];return i!==n&&r!==n}return!1}(s)||!1===c.canClearPosition(m(),s,v(),o,c))||delete m().validPositions[s]);for(g(!0),s=a+1;s<=v();){for(;m().validPositions[a]!==n;)a++;if(s<a&&(s=a+1),m().validPositions[s]===n&&E(s))s++;else{var d=_(s);!1===h&&l[a]&&l[a].match.def===d.match.def?(m().validPositions[a]=t.extend(!0,{},l[a]),m().validPositions[a].input=d.input,delete m().validPositions[s],s++):w(a,d.match.def)?!1!==M(a,d.input||F(s),!0)&&(delete m().validPositions[s],s++,h=!0):E(s)||(s++,a--),a++}}g(!0)}function b(t,e){for(var i,r=t,o=v(),s=m().validPositions[o]||k(0)[0],a=s.alternation!==n?s.locator[s.alternation].toString().split(","):[],l=0;l<r.length&&(!((i=r[l]).match&&(c.greedy&&!0!==i.match.optionalQuantifier||(!1===i.match.optionality||!1===i.match.newBlockMarker)&&!0!==i.match.optionalQuantifier)&&(s.alternation===n||s.alternation!==i.alternation||i.locator[s.alternation]!==n&&A(i.locator[s.alternation].toString().split(","),a)))||!0===e&&(null!==i.match.fn||/[0-9a-bA-Z]/.test(i.match.def)));l++);return i}function _(t,e,i){return m().validPositions[t]||b(k(t,e?e.slice():e,i))}function x(t){return m().validPositions[t]?m().validPositions[t]:k(t)[0]}function w(t,e){for(var i=!1,n=k(t),r=0;r<n.length;r++)if(n[r].match&&n[r].match.def===e){i=!0;break}return i}function k(e,i,r){function o(i,r,s,l){function d(s,l,g){function v(e,i){var n=0===t.inArray(e,i.matches);return n||t.each(i.matches,function(t,r){if(!0===r.isQuantifier&&(n=v(e,i.matches[t-1])))return!1}),n}function y(e,i,r){var o,s;if(m().validPositions[e-1]&&r&&m().tests[e])for(var a=m().validPositions[e-1].locator,l=m().tests[e][0].locator,c=0;c<r;c++)if(a[c]!==l[c])return a.slice(r+1);return(m().tests[e]||m().validPositions[e])&&t.each(m().tests[e]||[m().validPositions[e]],function(t,e){var a=r!==n?r:e.alternation,l=e.locator[a]!==n?e.locator[a].toString().indexOf(i):-1;(s===n||l<s)&&-1!==l&&(o=e,s=l)}),o?o.locator.slice((r!==n?r:o.alternation)+1):r!==n?y(e,i):n}if(h>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+m().mask;if(h===e&&s.matches===n)return u.push({match:s,locator:l.reverse(),cd:f}),!0;if(s.matches!==n){if(s.isGroup&&g!==s){if(s=d(i.matches[t.inArray(s,i.matches)+1],l))return!0}else if(s.isOptional){var b=s;if(s=o(s,r,l,g)){if(a=u[u.length-1].match,!v(a,b))return!0;p=!0,h=e}}else if(s.isAlternator){var _,x=s,w=[],k=u.slice(),S=l.length,C=r.length>0?r.shift():-1;if(-1===C||"string"==typeof C){var D,T=h,A=r.slice(),M=[];if("string"==typeof C)M=C.split(",");else for(D=0;D<x.matches.length;D++)M.push(D);for(var E=0;E<M.length;E++){if(D=parseInt(M[E]),u=[],r=y(h,D,S)||A.slice(),!0!==(s=d(x.matches[D]||i.matches[D],[D].concat(l),g)||s)&&s!==n&&M[M.length-1]<x.matches.length){var P=t.inArray(s,i.matches)+1;i.matches.length>P&&(s=d(i.matches[P],[P].concat(l.slice(1,l.length)),g))&&(M.push(P.toString()),t.each(u,function(t,e){e.alternation=l.length-1}))}_=u.slice(),h=T,u=[];for(var I=0;I<_.length;I++){var O=_[I],N=!1;O.alternation=O.alternation||S;for(var F=0;F<w.length;F++){var L=w[F];if("string"!=typeof C||-1!==t.inArray(O.locator[O.alternation].toString(),M)){if(function(t,e){return t.match.nativeDef===e.match.nativeDef||t.match.def===e.match.nativeDef||t.match.nativeDef===e.match.def}(O,L)){N=!0,O.alternation===L.alternation&&-1===L.locator[L.alternation].toString().indexOf(O.locator[O.alternation])&&(L.locator[L.alternation]=L.locator[L.alternation]+","+O.locator[O.alternation],L.alternation=O.alternation),O.match.nativeDef===L.match.def&&(O.locator[O.alternation]=L.locator[L.alternation],w.splice(w.indexOf(L),1,O));break}if(O.match.def===L.match.def){N=!1;break}if(function(t,i){return null===t.match.fn&&null!==i.match.fn&&i.match.fn.test(t.match.def,m(),e,!1,c,!1)}(O,L)||function(t,i){return null!==t.match.fn&&null!==i.match.fn&&i.match.fn.test(t.match.def.replace(/[\[\]]/g,""),m(),e,!1,c,!1)}(O,L)){O.alternation===L.alternation&&-1===O.locator[O.alternation].toString().indexOf(L.locator[L.alternation].toString().split("")[0])&&(O.na=O.na||O.locator[O.alternation].toString(),-1===O.na.indexOf(O.locator[O.alternation].toString().split("")[0])&&(O.na=O.na+","+O.locator[L.alternation].toString().split("")[0]),N=!0,O.locator[O.alternation]=L.locator[L.alternation].toString().split("")[0]+","+O.locator[O.alternation],w.splice(w.indexOf(L),0,O));break}}}N||w.push(O)}}"string"==typeof C&&(w=t.map(w,function(e,i){if(isFinite(i)){var r=e.alternation,o=e.locator[r].toString().split(",");e.locator[r]=n,e.alternation=n;for(var s=0;s<o.length;s++)-1!==t.inArray(o[s],M)&&(e.locator[r]!==n?(e.locator[r]+=",",e.locator[r]+=o[s]):e.locator[r]=parseInt(o[s]),e.alternation=r);if(e.locator[r]!==n)return e}})),u=k.concat(w),h=e,p=u.length>0,s=w.length>0,r=A.slice()}else s=d(x.matches[C]||i.matches[C],[C].concat(l),g);if(s)return!0}else if(s.isQuantifier&&g!==i.matches[t.inArray(s,i.matches)-1])for(var j=s,R=r.length>0?r.shift():0;R<(isNaN(j.quantifier.max)?R+1:j.quantifier.max)&&h<=e;R++){var $=i.matches[t.inArray(j,i.matches)-1];if(s=d($,[R].concat(l),$)){if(a=u[u.length-1].match,a.optionalQuantifier=R>j.quantifier.min-1,v(a,$)){if(R>j.quantifier.min-1){p=!0,h=e;break}return!0}return!0}}else if(s=o(s,r,l,g))return!0}else h++}for(var g=r.length>0?r.shift():0;g<i.matches.length;g++)if(!0!==i.matches[g].isQuantifier){var v=d(i.matches[g],[g].concat(s),l);if(v&&h===e)return v;if(h>e)break}}function s(t){if(c.keepStatic&&e>0&&t.length>1+(""===t[t.length-1].match.def?1:0)&&!0!==t[0].match.optionality&&!0!==t[0].match.optionalQuantifier&&null===t[0].match.fn&&!/[0-9a-bA-Z]/.test(t[0].match.def)){if(m().validPositions[e-1]===n)return[b(t)];if(m().validPositions[e-1].alternation===t[0].alternation)return[b(t)];if(m().validPositions[e-1])return[b(t)]}return t}var a,l=m().maskToken,h=i?r:0,d=i?i.slice():[0],u=[],p=!1,f=i?i.join(""):"";if(e>-1){if(i===n){for(var g,v=e-1;(g=m().validPositions[v]||m().tests[v])===n&&v>-1;)v--;g!==n&&v>-1&&(d=function(e){var i=[];return t.isArray(e)||(e=[e]),e.length>0&&(e[0].alternation===n?0===(i=b(e.slice()).locator.slice()).length&&(i=e[0].locator.slice()):t.each(e,function(t,e){if(""!==e.def)if(0===i.length)i=e.locator.slice();else for(var n=0;n<i.length;n++)e.locator[n]&&-1===i[n].toString().indexOf(e.locator[n])&&(i[n]+=","+e.locator[n])})),i}(g),f=d.join(""),h=v)}if(m().tests[e]&&m().tests[e][0].cd===f)return s(m().tests[e]);for(var y=d.shift();y<l.length&&!(o(l[y],d,[y])&&h===e||h>e);y++);}return(0===u.length||p)&&u.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:f}),i!==n&&m().tests[e]?s(t.extend(!0,[],u)):(m().tests[e]=t.extend(!0,[],u),s(m().tests[e]))}function S(){return m()._buffer===n&&(m()._buffer=f(!1,1),m().buffer===n&&(m().buffer=m()._buffer.slice())),m()._buffer}function C(t){return m().buffer!==n&&!0!==t||(m().buffer=f(!0,v(),!0)),m().buffer}function D(t,e,i){var r,o;if(!0===t)g(),t=0,e=i.length;else for(r=t;r<e;r++)delete m().validPositions[r];for(o=t,r=t;r<e;r++)if(g(!0),i[r]!==c.skipOptionalPartCharacter){var s=M(o,i[r],!0,!0);!1!==s&&(g(!0),o=s.caret!==n?s.caret:s.pos+1)}}function T(e,i,n){switch(c.casing||i.casing){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break;case"title":var o=m().validPositions[n-1];e=0===n||o&&o.input===String.fromCharCode(r.keyCode.SPACE)?e.toUpperCase():e.toLowerCase();break;default:if(t.isFunction(c.casing)){var s=Array.prototype.slice.call(arguments);s.push(m().validPositions),e=c.casing.apply(this,s)}}return e}function A(e,i,r){for(var o,s=c.greedy?i:i.slice(0,1),a=!1,l=r!==n?r.split(","):[],h=0;h<l.length;h++)-1!==(o=e.indexOf(l[h]))&&e.splice(o,1);for(var d=0;d<e.length;d++)if(-1!==t.inArray(e[d],s)){a=!0;break}return a}function M(e,i,o,s,a,l){function h(t){var e=Q?t.begin-t.end>1||t.begin-t.end==1:t.end-t.begin>1||t.end-t.begin==1;return e&&0===t.begin&&t.end===m().maskLength?"full":e}function d(i,r,o){var a=!1;return t.each(k(i),function(l,d){for(var p=d.match,f=r?1:0,b="",_=p.cardinality;_>f;_--)b+=O(i-(_-1));if(r&&(b+=r),C(!0),!1!==(a=null!=p.fn?p.fn.test(b,m(),i,o,c,h(e)):(r===p.def||r===c.skipOptionalPartCharacter)&&""!==p.def&&{c:F(i,p,!0)||p.def,pos:i})){var x=a.c!==n?a.c:r;x=x===c.skipOptionalPartCharacter&&null===p.fn?F(i,p,!0)||p.def:x;var w=i,k=C();if(a.remove!==n&&(t.isArray(a.remove)||(a.remove=[a.remove]),t.each(a.remove.sort(function(t,e){return e-t}),function(t,e){y(e,e+1,!0)})),a.insert!==n&&(t.isArray(a.insert)||(a.insert=[a.insert]),t.each(a.insert.sort(function(t,e){return t-e}),function(t,e){M(e.pos,e.c,!0,s)})),a.refreshFromBuffer){var S=a.refreshFromBuffer;if(D(!0===S?S:S.start,S.end,k),a.pos===n&&a.c===n)return a.pos=v(),!1;if((w=a.pos!==n?a.pos:i)!==i)return a=t.extend(a,M(w,x,!0,s)),!1}else if(!0!==a&&a.pos!==n&&a.pos!==i&&(w=a.pos,D(i,w,C().slice()),w!==i))return a=t.extend(a,M(w,x,!0)),!1;return(!0===a||a.pos!==n||a.c!==n)&&(l>0&&g(!0),u(w,t.extend({},d,{input:T(x,p,w)}),s,h(e))||(a=!1),!1)}}),a}function u(e,i,r,o){if(o||c.insertMode&&m().validPositions[e]!==n&&r===n){var s,a=t.extend(!0,{},m().validPositions),l=v(n,!0);for(s=e;s<=l;s++)delete m().validPositions[s];m().validPositions[e]=t.extend(!0,{},i);var h,d=!0,u=m().validPositions,f=!1,y=m().maskLength;for(s=h=e;s<=l;s++){var b=a[s];if(b!==n)for(var _=h;_<m().maskLength&&(null===b.match.fn&&u[s]&&(!0===u[s].match.optionalQuantifier||!0===u[s].match.optionality)||null!=b.match.fn);){if(_++,!1===f&&a[_]&&a[_].match.def===b.match.def)m().validPositions[_]=t.extend(!0,{},a[_]),m().validPositions[_].input=b.input,p(_),h=_,d=!0;else if(w(_,b.match.def)){var x=M(_,b.input,!0,!0);d=!1!==x,h=x.caret||x.insert?v():_,f=!0}else if(!(d=!0===b.generatedInput)&&_>=m().maskLength-1)break;if(m().maskLength<y&&(m().maskLength=y),d)break}if(!d)break}if(!d)return m().validPositions=t.extend(!0,{},a),g(!0),!1}else m().validPositions[e]=t.extend(!0,{},i);return g(!0),!0}function p(e){for(var i=e-1;i>-1&&!m().validPositions[i];i--);var r,o;for(i++;i<e;i++)m().validPositions[i]===n&&(!1===c.jitMasking||c.jitMasking>i)&&(""===(o=k(i,_(i-1).locator,i-1).slice())[o.length-1].match.def&&o.pop(),(r=b(o))&&(r.match.def===c.radixPointDefinitionSymbol||!E(i,!0)||t.inArray(c.radixPoint,C())<i&&r.match.fn&&r.match.fn.test(F(i),m(),i,!1,c))&&!1!==(x=d(i,F(i,r.match,!0)||(null==r.match.fn?r.match.def:""!==F(i)?F(i):C()[i]),!0))&&(m().validPositions[x.pos||i].generatedInput=!0))}o=!0===o;var f=e;e.begin!==n&&(f=Q&&!h(e)?e.end:e.begin);var x=!0,S=t.extend(!0,{},m().validPositions);if(t.isFunction(c.preValidation)&&!o&&!0!==s&&!0!==l&&(x=c.preValidation(C(),f,i,h(e),c)),!0===x){if(p(f),h(e)&&(z(n,r.keyCode.DELETE,e,!0,!0),f=m().p),f<m().maskLength&&(q===n||f<q)&&(x=d(f,i,o),(!o||!0===s)&&!1===x&&!0!==l)){var I=m().validPositions[f];if(!I||null!==I.match.fn||I.match.def!==i&&i!==c.skipOptionalPartCharacter){if((c.insertMode||m().validPositions[P(f)]===n)&&!E(f,!0))for(var N=f+1,L=P(f);N<=L;N++)if(!1!==(x=d(N,i,o))){!function(e,i){var r=m().validPositions[i];if(r)for(var o=r.locator,s=o.length,a=e;a<i;a++)if(m().validPositions[a]===n&&!E(a,!0)){var l=k(a).slice(),c=b(l,!0),h=-1;""===l[l.length-1].match.def&&l.pop(),t.each(l,function(t,e){for(var i=0;i<s;i++){if(e.locator[i]===n||!A(e.locator[i].toString().split(","),o[i].toString().split(","),e.na)){var r=o[i],a=c.locator[i],l=e.locator[i];r-a>Math.abs(r-l)&&(c=e);break}h<i&&(h=i,c=e)}}),(c=t.extend({},c,{input:F(a,c.match,!0)||c.match.def})).generatedInput=!0,u(a,c,!0),m().validPositions[i]=n,d(i,r.input,!0)}}(f,x.pos!==n?x.pos:N),f=N;break}}else x={caret:P(f)}}!1===x&&c.keepStatic&&!o&&!0!==a&&(x=function(e,i,r){var o,a,l,h,d,u,p,f,y=t.extend(!0,{},m().validPositions),b=!1,_=v();for(h=m().validPositions[_];_>=0;_--)if((l=m().validPositions[_])&&l.alternation!==n){if(o=_,a=m().validPositions[o].alternation,h.locator[l.alternation]!==l.locator[l.alternation])break;h=l}if(a!==n){f=parseInt(o);var x=h.locator[h.alternation||a]!==n?h.locator[h.alternation||a]:p[0];x.length>0&&(x=x.split(",")[0]);var w=m().validPositions[f],S=m().validPositions[f-1];t.each(k(f,S?S.locator:n,f-1),function(o,l){p=l.locator[a]?l.locator[a].toString().split(","):[];for(var h=0;h<p.length;h++){var _=[],k=0,S=0,C=!1;if(x<p[h]&&(l.na===n||-1===t.inArray(p[h],l.na.split(","))||-1===t.inArray(x.toString(),p))){m().validPositions[f]=t.extend(!0,{},l);var D=m().validPositions[f].locator;for(m().validPositions[f].locator[a]=parseInt(p[h]),null==l.match.fn?(w.input!==l.match.def&&(C=!0,!0!==w.generatedInput&&_.push(w.input)),S++,m().validPositions[f].generatedInput=!/[0-9a-bA-Z]/.test(l.match.def),m().validPositions[f].input=l.match.def):m().validPositions[f].input=w.input,d=f+1;d<v(n,!0)+1;d++)(u=m().validPositions[d])&&!0!==u.generatedInput&&/[0-9a-bA-Z]/.test(u.input)?_.push(u.input):d<e&&k++,delete m().validPositions[d];for(C&&_[0]===l.match.def&&_.shift(),g(!0),b=!0;_.length>0;){var T=_.shift();if(T!==c.skipOptionalPartCharacter&&!(b=M(v(n,!0)+1,T,!1,s,!0)))break}if(b){m().validPositions[f].locator=D;var A=v(e)+1;for(d=f+1;d<v()+1;d++)((u=m().validPositions[d])===n||null==u.match.fn)&&d<e+(S-k)&&S++;b=M((e+=S-k)>A?A:e,i,r,s,!0)}if(b)return!1;g(),m().validPositions=t.extend(!0,{},y)}}})}return b}(f,i,o)),!0===x&&(x={pos:f})}if(t.isFunction(c.postValidation)&&!1!==x&&!o&&!0!==s&&!0!==l){var j=c.postValidation(C(!0),x,c);if(j.refreshFromBuffer&&j.buffer){var R=j.refreshFromBuffer;D(!0===R?R:R.start,R.end,j.buffer)}x=!0===j?x:j}return x&&x.pos===n&&(x.pos=f),!1!==x&&!0!==l||(g(!0),m().validPositions=t.extend(!0,{},S)),x}function E(t,e){var i=_(t).match;if(""===i.def&&(i=x(t).match),null!=i.fn)return i.fn;if(!0!==e&&t>-1){var n=k(t);return n.length>1+(""===n[n.length-1].match.def?1:0)}return!1}function P(t,e){var i=m().maskLength;if(t>=i)return i;var n=t;for(k(i+1).length>1&&(f(!0,i+1,!0),i=m().maskLength);++n<i&&(!0===e&&(!0!==x(n).match.newBlockMarker||!E(n))||!0!==e&&!E(n)););return n}function I(t,e){var i,n=t;if(n<=0)return 0;for(;--n>0&&(!0===e&&!0!==x(n).match.newBlockMarker||!0!==e&&!E(n)&&((i=k(n)).length<2||2===i.length&&""===i[1].match.def)););return n}function O(t){return m().validPositions[t]===n?F(t):m().validPositions[t].input}function N(e,i,r,o,s){if(o&&t.isFunction(c.onBeforeWrite)){var a=c.onBeforeWrite.call(K,o,i,r,c);if(a){if(a.refreshFromBuffer){var l=a.refreshFromBuffer;D(!0===l?l:l.start,l.end,a.buffer||i),i=C(!0)}r!==n&&(r=a.caret!==n?a.caret:r)}}e!==n&&(e.inputmask._valueSet(i.join("")),r===n||o!==n&&"blur"===o.type?W(e,r,0===i.length):p&&o&&"input"===o.type?setTimeout(function(){R(e,r)},0):R(e,r),!0===s&&(J=!0,t(e).trigger("input")))}function F(e,i,r){if((i=i||x(e).match).placeholder!==n||!0===r)return t.isFunction(i.placeholder)?i.placeholder(c):i.placeholder;if(null===i.fn){if(e>-1&&m().validPositions[e]===n){var o,s=k(e),a=[];if(s.length>1+(""===s[s.length-1].match.def?1:0))for(var l=0;l<s.length;l++)if(!0!==s[l].match.optionality&&!0!==s[l].match.optionalQuantifier&&(null===s[l].match.fn||o===n||!1!==s[l].match.fn.test(o.match.def,m(),e,!0,c))&&(a.push(s[l]),null===s[l].match.fn&&(o=s[l]),a.length>1&&/[0-9a-bA-Z]/.test(a[0].match.def)))return c.placeholder.charAt(e%c.placeholder.length)}return i.def}return c.placeholder.charAt(e%c.placeholder.length)}function L(e,o,s,a,l){function h(t,e){return-1!==S().slice(t,P(t)).join("").indexOf(e)&&!E(t)&&x(t).match.nativeDef===e.charAt(e.length-1)}var d=a.slice(),u="",p=-1,f=n;if(g(),s||!0===c.autoUnmask)p=P(p);else{var y=S().slice(0,P(-1)).join(""),b=d.join("").match(new RegExp("^"+r.escapeRegex(y),"g"));b&&b.length>0&&(d.splice(0,b.length*y.length),p=P(p))}if(-1===p?(m().p=P(p),p=0):m().p=p,t.each(d,function(i,r){if(r!==n)if(m().validPositions[i]===n&&d[i]===F(i)&&E(i,!0)&&!1===M(i,d[i],!0,n,n,!0))m().p++;else{var o=new t.Event("_checkval");o.which=r.charCodeAt(0),u+=r;var a=v(n,!0),l=m().validPositions[a],y=_(a+1,l?l.locator.slice():n,a);if(!h(p,u)||s||c.autoUnmask){var b=s?i:null==y.match.fn&&y.match.optionality&&a+1<m().p?a+1:m().p;f=nt.keypressEvent.call(e,o,!0,!1,s,b),p=b+1,u=""}else f=nt.keypressEvent.call(e,o,!0,!1,!0,a+1);if(!1!==f&&!s&&t.isFunction(c.onBeforeWrite)){var x=f;if(f=c.onBeforeWrite.call(K,o,C(),f.forwardPosition,c),(f=t.extend(x,f))&&f.refreshFromBuffer){var w=f.refreshFromBuffer;D(!0===w?w:w.start,w.end,f.buffer),g(!0),f.caret&&(m().p=f.caret,f.forwardPosition=f.caret)}}}}),o){var w=n;i.activeElement===e&&f&&(w=c.numericInput?I(f.forwardPosition):f.forwardPosition),N(e,C(),w,l||new t.Event("checkval"),l&&"input"===l.type)}}function j(e){if(e){if(e.inputmask===n)return e.value;e.inputmask&&e.inputmask.refreshValue&&nt.setValueEvent.call(e)}var i=[],r=m().validPositions;for(var o in r)r[o].match&&null!=r[o].match.fn&&i.push(r[o].input);var s=0===i.length?"":(Q?i.reverse():i).join("");if(t.isFunction(c.onUnMask)){var a=(Q?C().slice().reverse():C()).join("");s=c.onUnMask.call(K,a,s,c)}return s}function R(t,r,o,s){function a(t){return!0===s||!Q||"number"!=typeof t||c.greedy&&""===c.placeholder||(t=C().join("").length-t),t}var l;if(r===n)return t.setSelectionRange?(r=t.selectionStart,o=t.selectionEnd):e.getSelection?(l=e.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==t&&l.commonAncestorContainer!==t||(r=l.startOffset,o=l.endOffset):i.selection&&i.selection.createRange&&(l=i.selection.createRange(),r=0-l.duplicate().moveStart("character",-t.inputmask._valueGet().length),o=r+l.text.length),{begin:a(r),end:a(o)};if(r.begin!==n&&(o=r.end,r=r.begin),"number"==typeof r){r=a(r),o="number"==typeof(o=a(o))?o:r;var d=parseInt(((t.ownerDocument.defaultView||e).getComputedStyle?(t.ownerDocument.defaultView||e).getComputedStyle(t,null):t.currentStyle).fontSize)*o;if(t.scrollLeft=d>t.scrollWidth?d:0,h||!1!==c.insertMode||r!==o||o++,t.setSelectionRange)t.selectionStart=r,t.selectionEnd=o;else if(e.getSelection){if(l=i.createRange(),t.firstChild===n||null===t.firstChild){var u=i.createTextNode("");t.appendChild(u)}l.setStart(t.firstChild,r<t.inputmask._valueGet().length?r:t.inputmask._valueGet().length),l.setEnd(t.firstChild,o<t.inputmask._valueGet().length?o:t.inputmask._valueGet().length),l.collapse(!0);var p=e.getSelection();p.removeAllRanges(),p.addRange(l)}else t.createTextRange&&((l=t.createTextRange()).collapse(!0),l.moveEnd("character",o),l.moveStart("character",r),l.select());W(t,{begin:r,end:o})}}function $(e){var i,r,o=C(),s=o.length,a=v(),l={},c=m().validPositions[a],h=c!==n?c.locator.slice():n;for(i=a+1;i<o.length;i++)r=_(i,h,i-1),h=r.locator.slice(),l[i]=t.extend(!0,{},r);var d=c&&c.alternation!==n?c.locator[c.alternation]:n;for(i=s-1;i>a&&((r=l[i]).match.optionality||r.match.optionalQuantifier&&r.match.newBlockMarker||d&&(d!==l[i].locator[c.alternation]&&null!=r.match.fn||null===r.match.fn&&r.locator[c.alternation]&&A(r.locator[c.alternation].toString().split(","),d.toString().split(","))&&""!==k(i)[0].def))&&o[i]===F(i,r.match);i--)s--;return e?{l:s,def:l[s]?l[s].match:n}:s}function H(t){for(var e,i=$(),r=t.length,o=m().validPositions[v()];i<r&&!E(i,!0)&&(e=o!==n?_(i,o.locator.slice(""),o):x(i))&&!0!==e.match.optionality&&(!0!==e.match.optionalQuantifier&&!0!==e.match.newBlockMarker||i+1===r&&""===(o!==n?_(i+1,o.locator.slice(""),o):x(i+1)).match.def);)i++;for(;(e=m().validPositions[i-1])&&e&&e.match.optionality&&e.input===c.skipOptionalPartCharacter;)i--;return t.splice(i),t}function B(e){if(t.isFunction(c.isComplete))return c.isComplete(e,c);if("*"===c.repeat)return n;var i=!1,r=$(!0),o=I(r.l);if(r.def===n||r.def.newBlockMarker||r.def.optionality||r.def.optionalQuantifier){i=!0;for(var s=0;s<=o;s++){var a=_(s).match;if(null!==a.fn&&m().validPositions[s]===n&&!0!==a.optionality&&!0!==a.optionalQuantifier||null===a.fn&&e[s]!==F(s,a)){i=!1;break}}}return i}function z(e,i,o,s,a){if((c.numericInput||Q)&&(i===r.keyCode.BACKSPACE?i=r.keyCode.DELETE:i===r.keyCode.DELETE&&(i=r.keyCode.BACKSPACE),Q)){var l=o.end;o.end=o.begin,o.begin=l}i===r.keyCode.BACKSPACE&&(o.end-o.begin<1||!1===c.insertMode)?(o.begin=I(o.begin),m().validPositions[o.begin]!==n&&m().validPositions[o.begin].input===c.groupSeparator&&o.begin--):i===r.keyCode.DELETE&&o.begin===o.end&&(o.end=E(o.end,!0)&&m().validPositions[o.end]&&m().validPositions[o.end].input!==c.radixPoint?o.end+1:P(o.end)+1,m().validPositions[o.begin]!==n&&m().validPositions[o.begin].input===c.groupSeparator&&o.end++),y(o.begin,o.end,!1,s),!0!==s&&function(){if(c.keepStatic){for(var i=[],r=v(-1,!0),o=t.extend(!0,{},m().validPositions),s=m().validPositions[r];r>=0;r--){var a=m().validPositions[r];if(a){if(!0!==a.generatedInput&&/[0-9a-bA-Z]/.test(a.input)&&i.push(a.input),delete m().validPositions[r],a.alternation!==n&&a.locator[a.alternation]!==s.locator[a.alternation])break;s=a}}if(r>-1)for(m().p=P(v(-1,!0));i.length>0;){var l=new t.Event("keypress");l.which=i.pop().charCodeAt(0),nt.keypressEvent.call(e,l,!0,!1,!1,m().p)}else m().validPositions=t.extend(!0,{},o)}}();var h=v(o.begin,!0);if(h<o.begin)m().p=P(h);else if(!0!==s&&(m().p=o.begin,!0!==a))for(;m().p<h&&m().validPositions[m().p]===n;)m().p++}function U(n){function r(t){var e,r=i.createElement("span");for(var s in o)isNaN(s)&&-1!==s.indexOf("font")&&(r.style[s]=o[s]);r.style.textTransform=o.textTransform,r.style.letterSpacing=o.letterSpacing,r.style.position="absolute",r.style.height="auto",r.style.width="auto",r.style.visibility="hidden",r.style.whiteSpace="nowrap",i.body.appendChild(r);var a,l=n.inputmask._valueGet(),c=0;for(e=0,a=l.length;e<=a;e++){if(r.innerHTML+=l.charAt(e)||"_",r.offsetWidth>=t){var h=t-c,d=r.offsetWidth-t;r.innerHTML=l.charAt(e),e=(h-=r.offsetWidth/3)<d?e-1:e;break}c=r.offsetWidth}return i.body.removeChild(r),e}var o=(n.ownerDocument.defaultView||e).getComputedStyle(n,null),s=i.createElement("div");s.style.width=o.width,s.style.textAlign=o.textAlign,(G=i.createElement("div")).className="im-colormask",n.parentNode.insertBefore(G,n),n.parentNode.removeChild(n),G.appendChild(s),G.appendChild(n),n.style.left=s.offsetLeft+"px",t(n).on("click",function(t){return R(n,r(t.clientX)),nt.clickEvent.call(n,[t])}),t(n).on("keydown",function(t){t.shiftKey||!1===c.insertMode||setTimeout(function(){W(n)},0)})}function W(t,e,r){function o(){u||null!==a.fn&&l.input!==n?u&&(null!==a.fn&&l.input!==n||""===a.def)&&(u=!1,d+="</span>"):(u=!0,d+="<span class='im-static'>")}function s(n){!0!==n&&p!==e.begin||i.activeElement!==t||(d+="<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>")}var a,l,h,d="",u=!1,p=0;if(G!==n){var f=C();if(e===n?e=R(t):e.begin===n&&(e={begin:e,end:e}),!0!==r){var g=v();do{s(),m().validPositions[p]?(l=m().validPositions[p],a=l.match,h=l.locator.slice(),o(),d+=f[p]):(l=_(p,h,p-1),a=l.match,h=l.locator.slice(),(!1===c.jitMasking||p<g||"number"==typeof c.jitMasking&&isFinite(c.jitMasking)&&c.jitMasking>p)&&(o(),d+=F(p,a))),p++}while((q===n||p<q)&&(null!==a.fn||""!==a.def)||g>p||u);-1===d.indexOf("im-caret")&&s(!0),u&&o()}var y=G.getElementsByTagName("div")[0];y.innerHTML=d,t.inputmask.positionColorMask(t,y)}}a=a||this.maskset,c=c||this.opts;var Y,V,q,G,K=this,X=this.el,Q=this.isRTL,Z=!1,J=!1,tt=!1,et=!1,it={on:function(e,i,o){var s=function(e){if(this.inputmask===n&&"FORM"!==this.nodeName){var i=t.data(this,"_inputmask_opts");i?new r(i).mask(this):it.off(this)}else{if("setvalue"===e.type||"FORM"===this.nodeName||!(this.disabled||this.readOnly&&!("keydown"===e.type&&e.ctrlKey&&67===e.keyCode||!1===c.tabThrough&&e.keyCode===r.keyCode.TAB))){switch(e.type){case"input":if(!0===J)return J=!1,e.preventDefault();break;case"keydown":Z=!1,J=!1;break;case"keypress":if(!0===Z)return e.preventDefault();Z=!0;break;case"click":if(d||u){var s=this,a=arguments;return setTimeout(function(){o.apply(s,a)},0),!1}}var l=o.apply(this,arguments);return!1===l&&(e.preventDefault(),e.stopPropagation()),l}e.preventDefault()}};e.inputmask.events[i]=e.inputmask.events[i]||[],e.inputmask.events[i].push(s),-1!==t.inArray(i,["submit","reset"])?null!==e.form&&t(e.form).on(i,s):t(e).on(i,s)},off:function(e,i){if(e.inputmask&&e.inputmask.events){var n;i?(n=[],n[i]=e.inputmask.events[i]):n=e.inputmask.events,t.each(n,function(i,n){for(;n.length>0;){var r=n.pop();-1!==t.inArray(i,["submit","reset"])?null!==e.form&&t(e.form).off(i,r):t(e).off(i,r)}delete e.inputmask.events[i]})}}},nt={keydownEvent:function(e){var n=this,o=t(n),s=e.keyCode,a=R(n);if(s===r.keyCode.BACKSPACE||s===r.keyCode.DELETE||u&&s===r.keyCode.BACKSPACE_SAFARI||e.ctrlKey&&s===r.keyCode.X&&!function(t){var e=i.createElement("input"),n="oncut"in e;return n||(e.setAttribute("oncut","return;"),n="function"==typeof e.oncut),e=null,n}())e.preventDefault(),z(n,s,a),N(n,C(!0),m().p,e,n.inputmask._valueGet()!==C().join("")),n.inputmask._valueGet()===S().join("")?o.trigger("cleared"):!0===B(C())&&o.trigger("complete");else if(s===r.keyCode.END||s===r.keyCode.PAGE_DOWN){e.preventDefault();var l=P(v());c.insertMode||l!==m().maskLength||e.shiftKey||l--,R(n,e.shiftKey?a.begin:l,l,!0)}else s===r.keyCode.HOME&&!e.shiftKey||s===r.keyCode.PAGE_UP?(e.preventDefault(),R(n,0,e.shiftKey?a.begin:0,!0)):(c.undoOnEscape&&s===r.keyCode.ESCAPE||90===s&&e.ctrlKey)&&!0!==e.altKey?(L(n,!0,!1,Y.split("")),o.trigger("click")):s!==r.keyCode.INSERT||e.shiftKey||e.ctrlKey?!0===c.tabThrough&&s===r.keyCode.TAB?(!0===e.shiftKey?(null===x(a.begin).match.fn&&(a.begin=P(a.begin)),a.end=I(a.begin,!0),a.begin=I(a.end,!0)):(a.begin=P(a.begin,!0),a.end=P(a.begin,!0),a.end<m().maskLength&&a.end--),a.begin<m().maskLength&&(e.preventDefault(),R(n,a.begin,a.end))):e.shiftKey||!1===c.insertMode&&(s===r.keyCode.RIGHT?setTimeout(function(){var t=R(n);R(n,t.begin)},0):s===r.keyCode.LEFT&&setTimeout(function(){var t=R(n);R(n,Q?t.begin+1:t.begin-1)},0)):(c.insertMode=!c.insertMode,R(n,c.insertMode||a.begin!==m().maskLength?a.begin:a.begin-1));c.onKeyDown.call(this,e,C(),R(n).begin,c),tt=-1!==t.inArray(s,c.ignorables)},keypressEvent:function(e,i,o,s,a){var l=this,h=t(l),d=e.which||e.charCode||e.keyCode;if(!(!0===i||e.ctrlKey&&e.altKey)&&(e.ctrlKey||e.metaKey||tt))return d===r.keyCode.ENTER&&Y!==C().join("")&&(Y=C().join(""),setTimeout(function(){h.trigger("change")},0)),!0;if(d){46===d&&!1===e.shiftKey&&""!==c.radixPoint&&(d=c.radixPoint.charCodeAt(0));var u,p=i?{begin:a,end:a}:R(l),f=String.fromCharCode(d);m().writeOutBuffer=!0;var v=M(p,f,s);if(!1!==v&&(g(!0),u=v.caret!==n?v.caret:i?v.pos+1:P(v.pos),m().p=u),!1!==o&&(setTimeout(function(){c.onKeyValidation.call(l,d,v,c)},0),m().writeOutBuffer&&!1!==v)){var y=C();N(l,y,c.numericInput&&v.caret===n?I(u):u,e,!0!==i),!0!==i&&setTimeout(function(){!0===B(y)&&h.trigger("complete")},0)}if(e.preventDefault(),i)return!1!==v&&(v.forwardPosition=u),v}},pasteEvent:function(i){var n,r=this,o=i.originalEvent||i,s=t(r),a=r.inputmask._valueGet(!0),l=R(r);Q&&(n=l.end,l.end=l.begin,l.begin=n);var h=a.substr(0,l.begin),d=a.substr(l.end,a.length);if(h===(Q?S().reverse():S()).slice(0,l.begin).join("")&&(h=""),d===(Q?S().reverse():S()).slice(l.end).join("")&&(d=""),Q&&(n=h,h=d,d=n),e.clipboardData&&e.clipboardData.getData)a=h+e.clipboardData.getData("Text")+d;else{if(!o.clipboardData||!o.clipboardData.getData)return!0;a=h+o.clipboardData.getData("text/plain")+d}var u=a;if(t.isFunction(c.onBeforePaste)){if(!1===(u=c.onBeforePaste.call(K,a,c)))return i.preventDefault();u||(u=a)}return L(r,!1,!1,Q?u.split("").reverse():u.toString().split("")),N(r,C(),P(v()),i,Y!==C().join("")),!0===B(C())&&s.trigger("complete"),i.preventDefault()},inputFallBackEvent:function(e){var i=this,n=i.inputmask._valueGet();if(C().join("")!==n){var o=R(i);if(!1===function(e,i,n){if("."===i.charAt(n.begin-1)&&""!==c.radixPoint&&(i=i.split(""),i[n.begin-1]=c.radixPoint.charAt(0),i=i.join("")),i.charAt(n.begin-1)===c.radixPoint&&i.length>C().length){var r=new t.Event("keypress");return r.which=c.radixPoint.charCodeAt(0),nt.keypressEvent.call(e,r,!0,!0,!1,n.begin-1),!1}}(i,n,o))return!1;if(n=n.replace(new RegExp("("+r.escapeRegex(S().join(""))+")*"),""),!1===function(e,i,n){if(d){var r=i.replace(C().join(""),"");if(1===r.length){var o=new t.Event("keypress");return o.which=r.charCodeAt(0),nt.keypressEvent.call(e,o,!0,!0,!1,m().validPositions[n.begin-1]?n.begin:n.begin-1),!1}}}(i,n,o))return!1;o.begin>n.length&&(R(i,n.length),o=R(i));var s=C().join(""),a=n.substr(0,o.begin),l=n.substr(o.begin),h=s.substr(0,o.begin),u=s.substr(o.begin),p=o,f="",g=!1;if(a!==h){p.begin=0;for(var v=(g=a.length>=h.length)?a.length:h.length,y=0;a.charAt(y)===h.charAt(y)&&y<v;y++)p.begin++;g&&(f+=a.slice(p.begin,p.end))}l!==u&&(l.length>u.length?g&&(p.end=p.begin):l.length<u.length?p.end+=u.length-l.length:l.charAt(0)!==u.charAt(0)&&p.end++),N(i,C(),p),f.length>0?t.each(f.split(""),function(e,n){var r=new t.Event("keypress");r.which=n.charCodeAt(0),tt=!1,nt.keypressEvent.call(i,r)}):(p.begin===p.end-1&&R(i,I(p.begin+1),p.end),e.keyCode=r.keyCode.DELETE,nt.keydownEvent.call(i,e)),e.preventDefault()}},setValueEvent:function(e){this.inputmask.refreshValue=!1;var i=this,n=i.inputmask._valueGet(!0);t.isFunction(c.onBeforeMask)&&(n=c.onBeforeMask.call(K,n,c)||n),n=n.split(""),L(i,!0,!1,Q?n.reverse():n),Y=C().join(""),(c.clearMaskOnLostFocus||c.clearIncomplete)&&i.inputmask._valueGet()===S().join("")&&i.inputmask._valueSet("")},focusEvent:function(t){var e=this,i=e.inputmask._valueGet();c.showMaskOnFocus&&(!c.showMaskOnHover||c.showMaskOnHover&&""===i)&&(e.inputmask._valueGet()!==C().join("")?N(e,C(),P(v())):!1===et&&R(e,P(v()))),!0===c.positionCaretOnTab&&!1===et&&""!==i&&(N(e,C(),R(e)),nt.clickEvent.apply(e,[t,!0])),Y=C().join("")},mouseleaveEvent:function(t){var e=this;if(et=!1,c.clearMaskOnLostFocus&&i.activeElement!==e){var n=C().slice(),r=e.inputmask._valueGet();r!==e.getAttribute("placeholder")&&""!==r&&(-1===v()&&r===S().join("")?n=[]:H(n),N(e,n))}},clickEvent:function(e,r){function o(e){if(""!==c.radixPoint){var i=m().validPositions;if(i[e]===n||i[e].input===F(e)){if(e<P(-1))return!0;var r=t.inArray(c.radixPoint,C());if(-1!==r){for(var o in i)if(r<o&&i[o].input!==F(o))return!1;return!0}}}return!1}var s=this;setTimeout(function(){if(i.activeElement===s){var t=R(s);if(r&&(Q?t.end=t.begin:t.begin=t.end),t.begin===t.end)switch(c.positionCaretOnClick){case"none":break;case"radixFocus":if(o(t.begin)){var e=C().join("").indexOf(c.radixPoint);R(s,c.numericInput?P(e):e);break}default:var a=t.begin,l=v(a,!0),h=P(l);if(a<h)R(s,E(a,!0)||E(a-1,!0)?a:P(a));else{var d=m().validPositions[l],u=_(h,d?d.match.locator:n,d),p=F(h,u.match);if(""!==p&&C()[h]!==p&&!0!==u.match.optionalQuantifier&&!0!==u.match.newBlockMarker||!E(h,!0)&&u.match.def===p){var f=P(h);(a>=f||a===h)&&(h=f)}R(s,h)}}}},0)},dblclickEvent:function(t){var e=this;setTimeout(function(){R(e,0,P(v()))},0)},cutEvent:function(n){var o=this,s=t(o),a=R(o),l=n.originalEvent||n,c=e.clipboardData||l.clipboardData,h=Q?C().slice(a.end,a.begin):C().slice(a.begin,a.end);c.setData("text",Q?h.reverse().join(""):h.join("")),i.execCommand&&i.execCommand("copy"),z(o,r.keyCode.DELETE,a),N(o,C(),m().p,n,Y!==C().join("")),o.inputmask._valueGet()===S().join("")&&s.trigger("cleared")},blurEvent:function(e){var i=t(this),r=this;if(r.inputmask){var o=r.inputmask._valueGet(),s=C().slice();""!==o&&(c.clearMaskOnLostFocus&&(-1===v()&&o===S().join("")?s=[]:H(s)),!1===B(s)&&(setTimeout(function(){i.trigger("incomplete")},0),c.clearIncomplete&&(g(),s=c.clearMaskOnLostFocus?[]:S().slice())),N(r,s,n,e)),Y!==C().join("")&&(Y=s.join(""),i.trigger("change"))}},mouseenterEvent:function(t){var e=this;et=!0,i.activeElement!==e&&c.showMaskOnHover&&e.inputmask._valueGet()!==C().join("")&&N(e,C())},submitEvent:function(t){Y!==C().join("")&&V.trigger("change"),c.clearMaskOnLostFocus&&-1===v()&&X.inputmask._valueGet&&X.inputmask._valueGet()===S().join("")&&X.inputmask._valueSet(""),c.removeMaskOnSubmit&&(X.inputmask._valueSet(X.inputmask.unmaskedvalue(),!0),setTimeout(function(){N(X,C())},0))},resetEvent:function(t){X.inputmask.refreshValue=!0,setTimeout(function(){V.trigger("setvalue")},0)}};r.prototype.positionColorMask=function(t,e){t.style.left=e.offsetLeft+"px"};var rt;if(o!==n)switch(o.action){case"isComplete":return X=o.el,B(C());case"unmaskedvalue":return X!==n&&o.value===n||(rt=o.value,rt=(t.isFunction(c.onBeforeMask)?c.onBeforeMask.call(K,rt,c)||rt:rt).split(""),L(n,!1,!1,Q?rt.reverse():rt),t.isFunction(c.onBeforeWrite)&&c.onBeforeWrite.call(K,n,C(),0,c)),j(X);case"mask":!function(e){it.off(e);var r=function(e,r){var o=e.getAttribute("type"),a="INPUT"===e.tagName&&-1!==t.inArray(o,r.supportsInputType)||e.isContentEditable||"TEXTAREA"===e.tagName;if(!a)if("INPUT"===e.tagName){var l=i.createElement("input");l.setAttribute("type",o),a="text"===l.type,l=null}else a="partial";return!1!==a?function(e){function o(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==v()||!0!==r.nullable?i.activeElement===this&&r.clearMaskOnLostFocus?(Q?H(C().slice()).reverse():H(C().slice())).join(""):l.call(this):"":l.call(this)}function a(e){c.call(this,e),this.inputmask&&t(this).trigger("setvalue")}var l,c;if(!e.inputmask.__valueGet){if(!0!==r.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===s("test".__proto__)?function(t){return t.__proto__}:function(t){return t.constructor.prototype});var h=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"):n;h&&h.get&&h.set?(l=h.get,c=h.set,Object.defineProperty(e,"value",{get:o,set:a,configurable:!0})):"INPUT"!==e.tagName&&(l=function(){return this.textContent},c=function(t){this.textContent=t},Object.defineProperty(e,"value",{get:o,set:a,configurable:!0}))}else i.__lookupGetter__&&e.__lookupGetter__("value")&&(l=e.__lookupGetter__("value"),c=e.__lookupSetter__("value"),e.__defineGetter__("value",o),e.__defineSetter__("value",a));e.inputmask.__valueGet=l,e.inputmask.__valueSet=c}e.inputmask._valueGet=function(t){return Q&&!0!==t?l.call(this.el).split("").reverse().join(""):l.call(this.el)},e.inputmask._valueSet=function(t,e){c.call(this.el,null===t||t===n?"":!0!==e&&Q?t.split("").reverse().join(""):t)},l===n&&(l=function(){return this.value},c=function(t){this.value=t},function(e){if(t.valHooks&&(t.valHooks[e]===n||!0!==t.valHooks[e].inputmaskpatch)){var i=t.valHooks[e]&&t.valHooks[e].get?t.valHooks[e].get:function(t){return t.value},o=t.valHooks[e]&&t.valHooks[e].set?t.valHooks[e].set:function(t,e){return t.value=e,t};t.valHooks[e]={get:function(t){if(t.inputmask){if(t.inputmask.opts.autoUnmask)return t.inputmask.unmaskedvalue();var e=i(t);return-1!==v(n,n,t.inputmask.maskset.validPositions)||!0!==r.nullable?e:""}return i(t)},set:function(e,i){var n,r=t(e);return n=o(e,i),e.inputmask&&r.trigger("setvalue"),n},inputmaskpatch:!0}}}(e.type),function(e){it.on(e,"mouseenter",function(e){var i=t(this);this.inputmask._valueGet()!==C().join("")&&i.trigger("setvalue")})}(e))}}(e):e.inputmask=n,a}(e,c);if(!1!==r&&(X=e,V=t(X),-1===(q=X!==n?X.maxLength:n)&&(q=n),!0===c.colorMask&&U(X),p&&(X.hasOwnProperty("inputmode")&&(X.inputmode=c.inputmode,X.setAttribute("inputmode",c.inputmode)),"rtfm"===c.androidHack&&(!0!==c.colorMask&&U(X),X.type="password")),!0===r&&(it.on(X,"submit",nt.submitEvent),it.on(X,"reset",nt.resetEvent),it.on(X,"mouseenter",nt.mouseenterEvent),it.on(X,"blur",nt.blurEvent),it.on(X,"focus",nt.focusEvent),it.on(X,"mouseleave",nt.mouseleaveEvent),!0!==c.colorMask&&it.on(X,"click",nt.clickEvent),it.on(X,"dblclick",nt.dblclickEvent),it.on(X,"paste",nt.pasteEvent),it.on(X,"dragdrop",nt.pasteEvent),it.on(X,"drop",nt.pasteEvent),it.on(X,"cut",nt.cutEvent),it.on(X,"complete",c.oncomplete),it.on(X,"incomplete",c.onincomplete),it.on(X,"cleared",c.oncleared),p||!0===c.inputEventOnly?X.removeAttribute("maxLength"):(it.on(X,"keydown",nt.keydownEvent),it.on(X,"keypress",nt.keypressEvent)),it.on(X,"compositionstart",t.noop),it.on(X,"compositionupdate",t.noop),it.on(X,"compositionend",t.noop),it.on(X,"keyup",t.noop),it.on(X,"input",nt.inputFallBackEvent),it.on(X,"beforeinput",t.noop)),it.on(X,"setvalue",nt.setValueEvent),Y=S().join(""),""!==X.inputmask._valueGet(!0)||!1===c.clearMaskOnLostFocus||i.activeElement===X)){var o=t.isFunction(c.onBeforeMask)?c.onBeforeMask.call(K,X.inputmask._valueGet(!0),c)||X.inputmask._valueGet(!0):X.inputmask._valueGet(!0);""!==o&&L(X,!0,!1,Q?o.split("").reverse():o.split(""));var a=C().slice();Y=a.join(""),!1===B(a)&&c.clearIncomplete&&g(),c.clearMaskOnLostFocus&&i.activeElement!==X&&(-1===v()?a=[]:H(a)),N(X,a),i.activeElement===X&&R(X,P(v()))}}(X);break;case"format":return rt=(t.isFunction(c.onBeforeMask)?c.onBeforeMask.call(K,o.value,c)||o.value:o.value).split(""),L(n,!0,!1,Q?rt.reverse():rt),o.metadata?{value:Q?C().slice().reverse().join(""):C().join(""),metadata:l.call(this,{action:"getmetadata"},a,c)}:Q?C().slice().reverse().join(""):C().join("");case"isValid":o.value?(rt=o.value.split(""),L(n,!0,!0,Q?rt.reverse():rt)):o.value=C().join("");for(var ot=C(),st=$(),at=ot.length-1;at>st&&!E(at);at--);return ot.splice(st,at+1-st),B(ot)&&o.value===C().join("");case"getemptymask":return S().join("");case"remove":return X&&X.inputmask&&(V=t(X),X.inputmask._valueSet(c.autoUnmask?j(X):X.inputmask._valueGet(!0)),it.off(X),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(X),"value")&&X.inputmask.__valueGet&&Object.defineProperty(X,"value",{get:X.inputmask.__valueGet,set:X.inputmask.__valueSet,configurable:!0}):i.__lookupGetter__&&X.__lookupGetter__("value")&&X.inputmask.__valueGet&&(X.__defineGetter__("value",X.inputmask.__valueGet),X.__defineSetter__("value",X.inputmask.__valueSet)),X.inputmask=n),X;case"getmetadata":if(t.isArray(a.metadata)){var lt=f(!0,0,!1).join("");return t.each(a.metadata,function(t,e){if(e.mask===lt)return lt=e,!1}),lt}return a.metadata}}var c=navigator.userAgent,h=/mobile/i.test(c),d=/iemobile/i.test(c),u=/iphone/i.test(c)&&!d,p=/android/i.test(c)&&!d;return r.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:t.noop,onincomplete:t.noop,oncleared:t.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:t.noop,onBeforeMask:null,onBeforePaste:function(e,i){return t.isFunction(i.onBeforeMask)?i.onBeforeMask.call(this,e,i):e},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:t.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:n,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,canClearPosition:t.noop,preValidation:null,postValidation:null,staticDefinitionSymbol:n,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,androidHack:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-91-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},aliases:{},masksCache:{},mask:function(s){function c(i,r,s,a){if(!0===r.importDataAttributes){var l,c,h,d,u=function(t,r){null!==(r=r!==n?r:i.getAttribute(a+"-"+t))&&("string"==typeof r&&(0===t.indexOf("on")?r=e[r]:"false"===r?r=!1:"true"===r&&(r=!0)),s[t]=r)},p=i.getAttribute(a);if(p&&""!==p&&(p=p.replace(new RegExp("'","g"),'"'),c=JSON.parse("{"+p+"}")),c){h=n;for(d in c)if("alias"===d.toLowerCase()){h=c[d];break}}u("alias",h),s.alias&&o(s.alias,s,r);for(l in r){if(c){h=n;for(d in c)if(d.toLowerCase()===l.toLowerCase()){h=c[d];break}}u(l,h)}}return t.extend(!0,r,s),("rtl"===i.dir||r.rightAlign)&&(i.style.textAlign="right"),("rtl"===i.dir||r.numericInput)&&(i.dir="ltr",i.removeAttribute("dir"),r.isRTL=!0),r}var h=this;return"string"==typeof s&&(s=i.getElementById(s)||i.querySelectorAll(s)),s=s.nodeName?[s]:s,t.each(s,function(e,i){var o=t.extend(!0,{},h.opts);c(i,o,t.extend(!0,{},h.userOptions),h.dataAttribute);var s=a(o,h.noMasksCache);s!==n&&(i.inputmask!==n&&(i.inputmask.opts.autoUnmask=!0,i.inputmask.remove()),i.inputmask=new r(n,n,!0),i.inputmask.opts=o,i.inputmask.noMasksCache=h.noMasksCache,i.inputmask.userOptions=t.extend(!0,{},h.userOptions),i.inputmask.isRTL=o.isRTL||o.numericInput,i.inputmask.el=i,i.inputmask.maskset=s,t.data(i,"_inputmask_opts",o),l.call(i.inputmask,{action:"mask"}))}),s&&s[0]?s[0].inputmask||this:this},option:function(e,i){return"string"==typeof e?this.opts[e]:"object"===(void 0===e?"undefined":s(e))?(t.extend(this.userOptions,e),this.el&&!0!==i&&this.mask(this.el),this):void 0},unmaskedvalue:function(t){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"unmaskedvalue",value:t})},remove:function(){return l.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"getmetadata"})},isValid:function(t){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"isValid",value:t})},format:function(t,e){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"format",value:t,metadata:e})},analyseMask:function(e,i,o){function s(t,e,i,n){this.matches=[],this.openGroup=t||!1,this.alternatorGroup=!1,this.isGroup=t||!1,this.isOptional=e||!1,this.isQuantifier=i||!1,this.isAlternator=n||!1,this.quantifier={min:1,max:1}}function a(e,s,a){a=a!==n?a:e.matches.length;var l=e.matches[a-1];if(i)0===s.indexOf("[")||_&&/\\d|\\s|\\w]/i.test(s)||"."===s?e.matches.splice(a++,0,{fn:new RegExp(s,o.casing?"i":""),cardinality:1,optionality:e.isOptional,newBlockMarker:l===n||l.def!==s,casing:null,def:s,placeholder:n,nativeDef:s}):(_&&(s=s[s.length-1]),t.each(s.split(""),function(t,i){l=e.matches[a-1],e.matches.splice(a++,0,{fn:null,cardinality:0,optionality:e.isOptional,newBlockMarker:l===n||l.def!==i&&null!==l.fn,casing:null,def:o.staticDefinitionSymbol||i,placeholder:o.staticDefinitionSymbol!==n?i:n,nativeDef:i})})),_=!1;else{var c=(o.definitions?o.definitions[s]:n)||r.prototype.definitions[s];if(c&&!_){for(var h=c.prevalidator,d=h?h.length:0,u=1;u<c.cardinality;u++){var p=d>=u?h[u-1]:[],f=p.validator,m=p.cardinality;e.matches.splice(a++,0,{fn:f?"string"==typeof f?new RegExp(f,o.casing?"i":""):new function(){this.test=f}:new RegExp("."),cardinality:m||1,optionality:e.isOptional,newBlockMarker:l===n||l.def!==(c.definitionSymbol||s),casing:c.casing,def:c.definitionSymbol||s,placeholder:c.placeholder,nativeDef:s}),l=e.matches[a-1]}e.matches.splice(a++,0,{fn:c.validator?"string"==typeof c.validator?new RegExp(c.validator,o.casing?"i":""):new function(){this.test=c.validator}:new RegExp("."),cardinality:c.cardinality,optionality:e.isOptional,newBlockMarker:l===n||l.def!==(c.definitionSymbol||s),casing:c.casing,def:c.definitionSymbol||s,placeholder:c.placeholder,nativeDef:s})}else e.matches.splice(a++,0,{fn:null,cardinality:0,optionality:e.isOptional,newBlockMarker:l===n||l.def!==s&&null!==l.fn,casing:null,def:o.staticDefinitionSymbol||s,placeholder:o.staticDefinitionSymbol!==n?s:n,nativeDef:s}),_=!1}}function l(e){e&&e.matches&&t.each(e.matches,function(t,r){var s=e.matches[t+1];(s===n||s.matches===n||!1===s.isQuantifier)&&r&&r.isGroup&&(r.isGroup=!1,i||(a(r,o.groupmarker.start,0),!0!==r.openGroup&&a(r,o.groupmarker.end))),l(r)})}function c(){if(w.length>0){if(f=w[w.length-1],a(f,u),f.isAlternator){m=w.pop();for(var t=0;t<m.matches.length;t++)m.matches[t].isGroup=!1;w.length>0?(f=w[w.length-1]).matches.push(m):x.matches.push(m)}}else a(x,u)}function h(t){t.matches=t.matches.reverse();for(var e in t.matches)if(t.matches.hasOwnProperty(e)){var i=parseInt(e);if(t.matches[e].isQuantifier&&t.matches[i+1]&&t.matches[i+1].isGroup){var r=t.matches[e];t.matches.splice(e,1),t.matches.splice(i+1,0,r)}t.matches[e].matches!==n?t.matches[e]=h(t.matches[e]):t.matches[e]=function(t){return t===o.optionalmarker.start?t=o.optionalmarker.end:t===o.optionalmarker.end?t=o.optionalmarker.start:t===o.groupmarker.start?t=o.groupmarker.end:t===o.groupmarker.end&&(t=o.groupmarker.start),t}(t.matches[e])}return t}var d,u,p,f,m,g,v,y=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,b=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,_=!1,x=new s,w=[],k=[];for(i&&(o.optionalmarker.start=n,o.optionalmarker.end=n);d=i?b.exec(e):y.exec(e);){if(u=d[0],i)switch(u.charAt(0)){case"?":u="{0,1}";break;case"+":case"*":u="{"+u+"}"}if(_)c();else switch(u.charAt(0)){case o.escapeChar:_=!0,i&&c();break;case o.optionalmarker.end:case o.groupmarker.end:if(p=w.pop(),p.openGroup=!1,p!==n)if(w.length>0){if((f=w[w.length-1]).matches.push(p),f.isAlternator){m=w.pop();for(var S=0;S<m.matches.length;S++)m.matches[S].isGroup=!1,m.matches[S].alternatorGroup=!1;w.length>0?(f=w[w.length-1]).matches.push(m):x.matches.push(m)}}else x.matches.push(p);else c();break;case o.optionalmarker.start:w.push(new s(!1,!0));break;case o.groupmarker.start:w.push(new s(!0));break;case o.quantifiermarker.start:var C=new s(!1,!1,!0),D=(u=u.replace(/[{}]/g,"")).split(","),T=isNaN(D[0])?D[0]:parseInt(D[0]),A=1===D.length?T:isNaN(D[1])?D[1]:parseInt(D[1]);if("*"!==A&&"+"!==A||(T="*"===A?0:1),C.quantifier={min:T,max:A},w.length>0){var M=w[w.length-1].matches;(d=M.pop()).isGroup||((v=new s(!0)).matches.push(d),d=v),M.push(d),M.push(C)}else(d=x.matches.pop()).isGroup||(i&&null===d.fn&&"."===d.def&&(d.fn=new RegExp(d.def,o.casing?"i":"")),(v=new s(!0)).matches.push(d),d=v),x.matches.push(d),x.matches.push(C);break;case o.alternatormarker:if(w.length>0){var E=(f=w[w.length-1]).matches[f.matches.length-1];g=f.openGroup&&(E.matches===n||!1===E.isGroup&&!1===E.isAlternator)?w.pop():f.matches.pop()}else g=x.matches.pop();if(g.isAlternator)w.push(g);else if(g.alternatorGroup?(m=w.pop(),g.alternatorGroup=!1):m=new s(!1,!1,!1,!0),m.matches.push(g),w.push(m),g.openGroup){g.openGroup=!1;var P=new s(!0);P.alternatorGroup=!0,w.push(P)}break;default:c()}}for(;w.length>0;)p=w.pop(),x.matches.push(p);return x.matches.length>0&&(l(x),k.push(x)),(o.numericInput||o.isRTL)&&h(k[0]),k}},r.extendDefaults=function(e){t.extend(!0,r.prototype.defaults,e)},r.extendDefinitions=function(e){t.extend(!0,r.prototype.definitions,e)},r.extendAliases=function(e){t.extend(!0,r.prototype.aliases,e)},r.format=function(t,e,i){return r(e).format(t,i)},r.unmask=function(t,e){return r(e).unmaskedvalue(t)},r.isValid=function(t,e){return r(e).isValid(t)},r.remove=function(e){t.each(e,function(t,e){e.inputmask&&e.inputmask.remove()})},r.escapeRegex=function(t){var e=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];return t.replace(new RegExp("(\\"+e.join("|\\")+")","gim"),"\\$1")},r.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88},r})},function(t,e){t.exports=jQuery},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,function(s){r=[i(0),i(1)],void 0!==(o="function"==typeof(n=s)?n.apply(e,r):n)&&(t.exports=o)}(function(t,e){function i(t){return isNaN(t)||29===new Date(t,2,0).getDate()}return e.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+i+"[01])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9])"+i+"(0[1-9]|1[012]))|(30"+i+"(0[13-9]|1[012]))|(31"+i+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(t,e,i){if(isNaN(t))return!1;var n=parseInt(t.concat(e.toString().slice(t.length))),r=parseInt(t.concat(i.toString().slice(t.length)));return!isNaN(n)&&e<=n&&n<=i||!isNaN(r)&&e<=r&&r<=i},determinebaseyear:function(t,e,i){var n=(new Date).getFullYear();if(t>n)return t;if(e<n){for(var r=e.toString().slice(0,2),o=e.toString().slice(2,4);e<r+i;)r--;var s=r+o;return t>s?t:s}if(t<=n&&n<=e){for(var a=n.toString().slice(0,2);e<a+i;)a--;var l=a+i;return l<t?t:l}return n},onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val(a.getDate().toString()+(a.getMonth()+1).toString()+a.getFullYear().toString()),s.trigger("setvalue")}},getFrontValue:function(t,e,i){for(var n=0,r=0,o=0;o<t.length&&"2"!==t.charAt(o);o++){var s=i.definitions[t.charAt(o)];s?(n+=r,r=s.cardinality):r++}return e.join("").substr(n,r)},postValidation:function(t,e,n){var r,o,s=t.join("");return 0===n.mask.indexOf("y")?(o=s.substr(0,4),r=s.substring(4,10)):(o=s.substring(6,10),r=s.substr(0,6)),e&&(r!==n.leapday||i(o))},definitions:{1:{validator:function(t,e,i,n,r){if("3"==t.charAt(0)&&new RegExp("[2-9]").test(t.charAt(1)))return t="30",e.buffer[i]="0",i++,{pos:i};var o=r.regex.val1.test(t);return n||o||t.charAt(1)!==r.separator&&-1==="-./".indexOf(t.charAt(1))||!(o=r.regex.val1.test("0"+t.charAt(0)))?o:(e.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=t;isNaN(e.buffer[i+1])||(o+=e.buffer[i+1]);var s=1===o.length?r.regex.val1pre.test(o):r.regex.val1.test(o);if(!n&&!s){if(s=r.regex.val1.test(t+"0"))return e.buffer[i]=t,e.buffer[++i]="0",{pos:i,c:"0"};if(s=r.regex.val1.test("0"+t))return e.buffer[i]="0",i++,{pos:i}}return s},cardinality:1}]},2:{validator:function(t,e,i,n,r){var o=r.getFrontValue(e.mask,e.buffer,r);if(-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator),"1"==t.charAt(0)&&new RegExp("[3-9]").test(t.charAt(1)))return t="10",e.buffer[i]="0",i++,{pos:i};var s=r.regex.val2(r.separator).test(o+t);return n||s||t.charAt(1)!==r.separator&&-1==="-./".indexOf(t.charAt(1))||!(s=r.regex.val2(r.separator).test(o+"0"+t.charAt(0)))?s:(e.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){isNaN(e.buffer[i+1])||(t+=e.buffer[i+1]);var o=r.getFrontValue(e.mask,e.buffer,r);-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator);var s=1===t.length?r.regex.val2pre(r.separator).test(o+t):r.regex.val2(r.separator).test(o+t);return n||s||!(s=r.regex.val2(r.separator).test(o+"0"+t))?s:(e.buffer[i]="0",i++,{pos:i})},cardinality:1}]},y:{validator:function(t,e,i,n,r){return r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(t,e,i,n,r){var o=r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear);if(!n&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t+"0").toString().slice(0,1);if(o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(0),{pos:i};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t+"0").toString().slice(0,2),o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(0),e.buffer[i++]=s.charAt(1),{pos:i}}return o},cardinality:1},{validator:function(t,e,i,n,r){var o=r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear);if(!n&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t).toString().slice(0,2);if(o=r.isInYearRange(t[0]+s[1]+t[1],r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(1),{pos:i};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t).toString().slice(0,2),o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i-1]=s.charAt(0),e.buffer[i++]=s.charAt(1),e.buffer[i++]=t.charAt(0),{refreshFromBuffer:{start:i-3,end:i},pos:i}}return o},cardinality:2},{validator:function(t,e,i,n,r){return r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val(a.getFullYear().toString()+(a.getMonth()+1).toString()+a.getDate().toString()),s.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(t,e,i,n,r){if("24"===r.hourFormat&&24===parseInt(t,10))return e.buffer[i-1]="0",e.buffer[i]="0",{refreshFromBuffer:{start:i-1,end:i},c:"0"};var o=r.regex.hrs.test(t);if(!n&&!o&&(t.charAt(1)===r.timeseparator||-1!=="-.:".indexOf(t.charAt(1)))&&(o=r.regex.hrs.test("0"+t.charAt(0))))return e.buffer[i-1]="0",e.buffer[i]=t.charAt(0),i++,{refreshFromBuffer:{start:i-2,end:i},pos:i,c:r.timeseparator};if(o&&"24"!==r.hourFormat&&r.regex.hrs24.test(t)){var s=parseInt(t,10);return 24===s?(e.buffer[i+5]="a",e.buffer[i+6]="m"):(e.buffer[i+5]="p",e.buffer[i+6]="m"),(s-=12)<10?(e.buffer[i]=s.toString(),e.buffer[i-1]="0"):(e.buffer[i]=s.toString().charAt(1),e.buffer[i-1]=s.toString().charAt(0)),{refreshFromBuffer:{start:i-1,end:i+6},c:e.buffer[i]}}return o},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=r.regex.hrspre.test(t);return n||o||!(o=r.regex.hrs.test("0"+t))?o:(e.buffer[i]="0",i++,{pos:i})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=r.regex.mspre.test(t);return n||o||!(o=r.regex.ms.test("0"+t))?o:(e.buffer[i]="0",i++,{pos:i})},cardinality:1}]},t:{validator:function(t,e,i,n,r){return r.regex.ampm.test(t+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"[0-3])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+i+"30)|((0[1-6])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0},"yyyy-mm-dd hh:mm:ss":{mask:"y-1-2 h:s:s",placeholder:"yyyy-mm-dd hh:mm:ss",alias:"datetime",separator:"-",leapday:"-02-29",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},onKeyDown:function(t,e,i,n){}}}),e})},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,function(s){r=[i(0),i(1)],void 0!==(o="function"==typeof(n=s)?n.apply(e,r):n)&&(t.exports=o)}(function(t,e){return e.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),e.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(t,e,i,n,r){return i-1>-1&&"."!==e.buffer[i-1]?(t=e.buffer[i-1]+t,t=i-2>-1&&"."!==e.buffer[i-2]?e.buffer[i-2]+t:"0"+t):t="00"+t,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(t)},cardinality:1}},onUnMask:function(t,e,i){return t},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(t,e){return(t=t.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(t,e,i){return t},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),e})},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,function(s){r=[i(0),i(1)],void 0!==(o="function"==typeof(n=s)?n.apply(e,r):n)&&(t.exports=o)}(function(t,e,i){function n(t,i){for(var n="",r=0;r<t.length;r++)e.prototype.definitions[t.charAt(r)]||i.definitions[t.charAt(r)]||i.optionalmarker.start===t.charAt(r)||i.optionalmarker.end===t.charAt(r)||i.quantifiermarker.start===t.charAt(r)||i.quantifiermarker.end===t.charAt(r)||i.groupmarker.start===t.charAt(r)||i.groupmarker.end===t.charAt(r)||i.alternatormarker===t.charAt(r)?n+="\\"+t.charAt(r):n+=t.charAt(r);return n}return e.extendAliases({numeric:{mask:function(t){if(0!==t.repeat&&isNaN(t.integerDigits)&&(t.integerDigits=t.repeat),t.repeat=0,t.groupSeparator===t.radixPoint&&("."===t.radixPoint?t.groupSeparator=",":","===t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=i),t.autoGroup=t.autoGroup&&""!==t.groupSeparator,t.autoGroup&&("string"==typeof t.groupSize&&isFinite(t.groupSize)&&(t.groupSize=parseInt(t.groupSize)),isFinite(t.integerDigits))){var e=Math.floor(t.integerDigits/t.groupSize),r=t.integerDigits%t.groupSize;t.integerDigits=parseInt(t.integerDigits)+(0===r?e-1:e),t.integerDigits<1&&(t.integerDigits="*")}t.placeholder.length>1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&!1===t.integerOptional&&(t.positionCaretOnClick="lvp"),t.definitions[";"]=t.definitions["~"],t.definitions[";"].definitionSymbol="~",!0===t.numericInput&&(t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t.decimalProtect=!1);var o="[+]";if(o+=n(t.prefix,t),!0===t.integerOptional?o+="~{1,"+t.integerDigits+"}":o+="~{"+t.integerDigits+"}",t.digits!==i){t.radixPointDefinitionSymbol=t.decimalProtect?":":t.radixPoint;var s=t.digits.toString().split(",");isFinite(s[0]&&s[1]&&isFinite(s[1]))?o+=t.radixPointDefinitionSymbol+";{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional?o+="["+t.radixPointDefinitionSymbol+";{1,"+t.digits+"}]":o+=t.radixPointDefinitionSymbol+";{"+t.digits+"}")}return o+=n(t.suffix,t),o+="[-]",t.greedy=!1,o},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(e,n,r,o,s){if("-"===r||r===s.negationSymbol.front)return!0===s.allowMinus&&(s.isNegative=s.isNegative===i||!s.isNegative,""===e.join("")||{caret:n,dopost:!0});if(!1===o&&r===s.radixPoint&&s.digits!==i&&(isNaN(s.digits)||parseInt(s.digits)>0)){var a=t.inArray(s.radixPoint,e);if(-1!==a)return!0===s.numericInput?n===a:{caret:a+1}}return!0},postValidation:function(n,r,o){var s=o.suffix.split(""),a=o.prefix.split("");if(r.pos===i&&r.caret!==i&&!0!==r.dopost)return r;var l=r.caret!==i?r.caret:r.pos,c=n.slice();o.numericInput&&(l=c.length-l-1,c=c.reverse());var h=c[l];if(h===o.groupSeparator&&(l+=1,h=c[l]),l===c.length-o.suffix.length-1&&h===o.radixPoint)return r;h!==i&&h!==o.radixPoint&&h!==o.negationSymbol.front&&h!==o.negationSymbol.back&&(c[l]="?",o.prefix.length>0&&l>=(!1===o.isNegative?1:0)&&l<o.prefix.length-1+(!1===o.isNegative?1:0)?a[l-(!1===o.isNegative?1:0)]="?":o.suffix.length>0&&l>=c.length-o.suffix.length-(!1===o.isNegative?1:0)&&(s[l-(c.length-o.suffix.length-(!1===o.isNegative?1:0))]="?")),a=a.join(""),s=s.join("");var d=c.join("").replace(a,"");if(d=d.replace(s,""),d=d.replace(new RegExp(e.escapeRegex(o.groupSeparator),"g"),""),d=d.replace(new RegExp("[-"+e.escapeRegex(o.negationSymbol.front)+"]","g"),""),d=d.replace(new RegExp(e.escapeRegex(o.negationSymbol.back)+"$"),""),isNaN(o.placeholder)&&(d=d.replace(new RegExp(e.escapeRegex(o.placeholder),"g"),"")),d.length>1&&1!==d.indexOf(o.radixPoint)&&("0"===h&&(d=d.replace(/^\?/g,"")),d=d.replace(/^0/g,"")),d.charAt(0)===o.radixPoint&&""!==o.radixPoint&&!0!==o.numericInput&&(d="0"+d),""!==d){if(d=d.split(""),(!o.digitsOptional||o.enforceDigitsOnBlur&&"blur"===r.event)&&isFinite(o.digits)){var u=t.inArray(o.radixPoint,d),p=t.inArray(o.radixPoint,c);-1===u&&(d.push(o.radixPoint),u=d.length-1);for(var f=1;f<=o.digits;f++)o.digitsOptional&&(!o.enforceDigitsOnBlur||"blur"!==r.event)||d[u+f]!==i&&d[u+f]!==o.placeholder.charAt(0)?-1!==p&&c[p+f]!==i&&(d[u+f]=d[u+f]||c[p+f]):d[u+f]=r.placeholder||o.placeholder.charAt(0)}if(!0!==o.autoGroup||""===o.groupSeparator||h===o.radixPoint&&r.pos===i&&!r.dopost)d=d.join("");else{var m=d[d.length-1]===o.radixPoint&&r.c===o.radixPoint;d=e(function(t,e){var i="";if(i+="("+e.groupSeparator+"*{"+e.groupSize+"}){*}",""!==e.radixPoint){var n=t.join("").split(e.radixPoint);n[1]&&(i+=e.radixPoint+"*{"+n[1].match(/^\d*\??\d*/)[0].length+"}")}return i}(d,o),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(d.join("")),m&&(d+=o.radixPoint),d.charAt(0)===o.groupSeparator&&d.substr(1)}}if(o.isNegative&&"blur"===r.event&&(o.isNegative="0"!==d),d=a+d,d+=s,o.isNegative&&(d=o.negationSymbol.front+d,d+=o.negationSymbol.back),d=d.split(""),h!==i)if(h!==o.radixPoint&&h!==o.negationSymbol.front&&h!==o.negationSymbol.back)(l=t.inArray("?",d))>-1?d[l]=h:l=r.caret||0;else if(h===o.radixPoint||h===o.negationSymbol.front||h===o.negationSymbol.back){var g=t.inArray(h,d);-1!==g&&(l=g)}o.numericInput&&(l=d.length-l-1,d=d.reverse());var v={caret:h===i||r.pos!==i?l+(o.numericInput?-1:1):l,buffer:d,refreshFromBuffer:r.dopost||n.join("")!==d.join("")};return v.refreshFromBuffer?v:r},onBeforeWrite:function(n,r,o,s){if(n)switch(n.type){case"keydown":return s.postValidation(r,{caret:o,dopost:!0},s);case"blur":case"checkval":var a;if(function(t){t.parseMinMaxOptions===i&&(null!==t.min&&(t.min=t.min.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.min=t.min.replace(t.radixPoint,".")),t.min=isFinite(t.min)?parseFloat(t.min):NaN,isNaN(t.min)&&(t.min=Number.MIN_VALUE)),null!==t.max&&(t.max=t.max.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.max=t.max.replace(t.radixPoint,".")),t.max=isFinite(t.max)?parseFloat(t.max):NaN,isNaN(t.max)&&(t.max=Number.MAX_VALUE)),t.parseMinMaxOptions="done")}(s),null!==s.min||null!==s.max){if(a=s.onUnMask(r.join(""),i,t.extend({},s,{unmaskAsNumber:!0})),null!==s.min&&a<s.min)return s.isNegative=s.min<0,s.postValidation(s.min.toString().replace(".",s.radixPoint).split(""),{caret:o,dopost:!0,placeholder:"0"},s);if(null!==s.max&&a>s.max)return s.isNegative=s.max<0,s.postValidation(s.max.toString().replace(".",s.radixPoint).split(""),{caret:o,dopost:!0,placeholder:"0"},s)}return s.postValidation(r,{caret:o,placeholder:"0",event:"blur"},s);case"_checkval":return{caret:o}}},regex:{integerPart:function(t,i){return i?new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?"):new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?\\d+")},integerNPart:function(t){return new RegExp("[\\d"+e.escapeRegex(t.groupSeparator)+e.escapeRegex(t.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(t,n,r,o,s,a){var l=o?new RegExp("[0-9"+e.escapeRegex(s.groupSeparator)+"]").test(t):new RegExp("[0-9]").test(t);if(!0===l){if(!0!==s.numericInput&&n.validPositions[r]!==i&&"~"===n.validPositions[r].match.def&&!a){var c=n.buffer.join(""),h=(c=(c=c.replace(new RegExp("[-"+e.escapeRegex(s.negationSymbol.front)+"]","g"),"")).replace(new RegExp(e.escapeRegex(s.negationSymbol.back)+"$"),"")).split(s.radixPoint);h.length>1&&(h[1]=h[1].replace(/0/g,s.placeholder.charAt(0))),"0"===h[0]&&(h[0]=h[0].replace(/0/g,s.placeholder.charAt(0))),c=h[0]+s.radixPoint+h[1]||"";var d=n._buffer.join("");for(c===s.radixPoint&&(c=d);null===c.match(e.escapeRegex(d)+"$");)d=d.slice(1);l=(c=(c=c.replace(d,"")).split(""))[r]===i?{pos:r,remove:r}:{pos:r}}}else o||t!==s.radixPoint||n.validPositions[r-1]!==i||(n.buffer[r]="0",l={pos:r+1});return l},cardinality:1},"+":{validator:function(t,e,i,n,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(t,e,i,n,r){return r.allowMinus&&t===r.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(t,i,n,r,o){var s="["+e.escapeRegex(o.radixPoint)+"]",a=new RegExp(s).test(t);return a&&i.validPositions[n]&&i.validPositions[n].match.placeholder===o.radixPoint&&(a={caret:n+1}),a},cardinality:1,placeholder:function(t){return t.radixPoint}}},onUnMask:function(t,i,n){if(""===i&&!0===n.nullable)return i;var r=t.replace(n.prefix,"");return r=r.replace(n.suffix,""),r=r.replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),""!==n.placeholder.charAt(0)&&(r=r.replace(new RegExp(n.placeholder.charAt(0),"g"),"0")),n.unmaskAsNumber?(""!==n.radixPoint&&-1!==r.indexOf(n.radixPoint)&&(r=r.replace(e.escapeRegex.call(this,n.radixPoint),".")),r=r.replace(new RegExp("^"+e.escapeRegex(n.negationSymbol.front)),"-"),r=r.replace(new RegExp(e.escapeRegex(n.negationSymbol.back)+"$"),""),Number(r)):r},isComplete:function(t,i){var n=t.join("");if(t.slice().join("")!==n)return!1;var r=n.replace(i.prefix,"");return r=r.replace(i.suffix,""),r=r.replace(new RegExp(e.escapeRegex(i.groupSeparator),"g"),""),","===i.radixPoint&&(r=r.replace(e.escapeRegex(i.radixPoint),".")),isFinite(r)},onBeforeMask:function(t,n){if(n.isNegative=i,t=t.toString().charAt(t.length-1)===n.radixPoint?t.toString().substr(0,t.length-1):t.toString(),""!==n.radixPoint&&isFinite(t)){var r=t.split("."),o=""!==n.groupSeparator?parseInt(n.groupSize):0;2===r.length&&(r[0].length>o||r[1].length>o||r[0].length<=o&&r[1].length<o)&&(t=t.replace(".",n.radixPoint))}var s=t.match(/,/g),a=t.match(/\./g);if(a&&s?a.length>s.length?(t=t.replace(/\./g,""),t=t.replace(",",n.radixPoint)):s.length>a.length?(t=t.replace(/,/g,""),t=t.replace(".",n.radixPoint)):t=t.indexOf(".")<t.indexOf(",")?t.replace(/\./g,""):t.replace(/,/g,""):t=t.replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),0===n.digits&&(-1!==t.indexOf(".")?t=t.substring(0,t.indexOf(".")):-1!==t.indexOf(",")&&(t=t.substring(0,t.indexOf(",")))),""!==n.radixPoint&&isFinite(n.digits)&&-1!==t.indexOf(n.radixPoint)){var l=t.split(n.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(n.digits)<l.toString().length){var c=Math.pow(10,parseInt(n.digits));t=t.replace(e.escapeRegex(n.radixPoint),"."),t=(t=Math.round(parseFloat(t)*c)/c).toString().replace(".",n.radixPoint)}}return t},canClearPosition:function(t,e,i,n,r){var o=t.validPositions[e],s=o.input!==r.radixPoint||null!==t.validPositions[e].match.fn&&!1===r.decimalProtect||o.input===r.radixPoint&&t.validPositions[e+1]&&null===t.validPositions[e+1].match.fn||isFinite(o.input)||e===i||o.input===r.groupSeparator||o.input===r.negationSymbol.front||o.input===r.negationSymbol.back;return!s||"+"!==o.match.nativeDef&&"-"!==o.match.nativeDef||(r.isNegative=!1),s},onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey)switch(i.keyCode){case e.keyCode.UP:s.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(o.step)),s.trigger("setvalue");break;case e.keyCode.DOWN:s.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(o.step)),s.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),e})},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,function(s){r=[i(0),i(1)],void 0!==(o="function"==typeof(n=s)?n.apply(e,r):n)&&(t.exports=o)}(function(t,e){function i(t,e){var i=(t.mask||t).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),n=(e.mask||e).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),r=(t.mask||t).split("#")[0],o=(e.mask||e).split("#")[0];return 0===o.indexOf(r)?-1:0===r.indexOf(o)?1:i.localeCompare(n)}var n=e.prototype.analyseMask;return e.prototype.analyseMask=function(e,i,r){function o(t,i,n){i=i||"",n=n||a,""!==i&&(n[i]={});for(var r="",s=n[i]||n,l=t.length-1;l>=0;l--)e=t[l].mask||t[l],r=e.substr(0,1),s[r]=s[r]||[],s[r].unshift(e.substr(1)),t.splice(l,1);for(var c in s)s[c].length>500&&o(s[c].slice(),c,s)}function s(e){var i="",n=[];for(var o in e)t.isArray(e[o])?1===e[o].length?n.push(o+e[o]):n.push(o+r.groupmarker.start+e[o].join(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)+r.groupmarker.end):n.push(o+s(e[o]));return 1===n.length?i+=n[0]:i+=r.groupmarker.start+n.join(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)+r.groupmarker.end,i}var a={};return r.phoneCodes&&(r.phoneCodes&&r.phoneCodes.length>1e3&&(e=e.substr(1,e.length-2),o(e.split(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)),e=s(a)),e=e.replace(/9/g,"\\9")),n.call(this,e,i,r)},e.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(t){return t.definitions={"#":e.prototype.definitions[9]},t.phoneCodes.sort(i)},keepStatic:!0,onBeforeMask:function(t,e){var i=t.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(i.indexOf(e.countrycode)>1||-1===i.indexOf(e.countrycode))&&(i="+"+e.countrycode+i),i},onUnMask:function(t,e,i){return t.replace(/[()#-]/g,"")},inputmode:"tel"}}),e})},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,function(s){r=[i(0),i(1)],void 0!==(o="function"==typeof(n=s)?n.apply(e,r):n)&&(t.exports=o)}(function(t,e){return e.extendAliases({Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,quantifierFilter:/[0-9]+[^,]/,isComplete:function(t,e){return new RegExp(e.regex,e.casing?"i":"").test(t.join(""))},definitions:{r:{validator:function(e,i,n,r,o){function s(t,e){this.matches=[],this.isGroup=t||!1,this.isQuantifier=e||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function a(e,i){var n=!1;i&&(d+="(",p++);for(var r=0;r<e.matches.length;r++){var s=e.matches[r];if(!0===s.isGroup)n=a(s,!0);else if(!0===s.isQuantifier){var c=t.inArray(s,e.matches),h=e.matches[c-1],u=d;if(isNaN(s.quantifier.max)){for(;s.repeaterPart&&s.repeaterPart!==d&&s.repeaterPart.length>d.length&&!(n=a(h,!0)););(n=n||a(h,!0))&&(s.repeaterPart=d),d=u+s.quantifier.max}else{for(var f=0,m=s.quantifier.max-1;f<m&&!(n=a(h,!0));f++);d=u+"{"+s.quantifier.min+","+s.quantifier.max+"}"}}else if(void 0!==s.matches)for(var g=0;g<s.length&&!(n=a(s[g],i));g++);else{var v;if("["==s.charAt(0)){v=d,v+=s;for(_=0;_<p;_++)v+=")";n=(x=new RegExp("^("+v+")$",o.casing?"i":"")).test(l)}else for(var y=0,b=s.length;y<b;y++)if("\\"!==s.charAt(y)){v=d,v=(v+=s.substr(0,y+1)).replace(/\|$/,"");for(var _=0;_<p;_++)v+=")";var x=new RegExp("^("+v+")$",o.casing?"i":"");if(n=x.test(l))break}d+=s}if(n)break}return i&&(d+=")",p--),n}var l,c,h=i.buffer.slice(),d="",u=!1,p=0;null===o.regexTokens&&function(){var t,e,i=new s,n=[];for(o.regexTokens=[];t=o.tokenizer.exec(o.regex);)switch((e=t[0]).charAt(0)){case"(":n.push(new s(!0));break;case")":c=n.pop(),n.length>0?n[n.length-1].matches.push(c):i.matches.push(c);break;case"{":case"+":case"*":var r=new s(!1,!0),a=(e=e.replace(/[{}]/g,"")).split(","),l=isNaN(a[0])?a[0]:parseInt(a[0]),h=1===a.length?l:isNaN(a[1])?a[1]:parseInt(a[1]);if(r.quantifier={min:l,max:h},n.length>0){var d=n[n.length-1].matches;(t=d.pop()).isGroup||((c=new s(!0)).matches.push(t),t=c),d.push(t),d.push(r)}else(t=i.matches.pop()).isGroup||((c=new s(!0)).matches.push(t),t=c),i.matches.push(t),i.matches.push(r);break;default:n.length>0?n[n.length-1].matches.push(e):i.matches.push(e)}i.matches.length>0&&o.regexTokens.push(i)}(),h.splice(n,0,e),l=h.join("");for(var f=0;f<o.regexTokens.length;f++){var m=o.regexTokens[f];if(u=a(m,m.isGroup))break}return u},cardinality:1}}}}),e})},function(t,e,i){"use strict";var n,r,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(s){r=[i(2),i(1)],void 0!==(o="function"==typeof(n=s)?n.apply(e,r):n)&&(t.exports=o)}(function(t,e){return void 0===t.fn.inputmask&&(t.fn.inputmask=function(i,n){var r,o=this[0];if(void 0===n&&(n={}),"string"==typeof i)switch(i){case"unmaskedvalue":return o&&o.inputmask?o.inputmask.unmaskedvalue():t(o).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return o&&o.inputmask?o.inputmask.getemptymask():"";case"hasMaskedValue":return!(!o||!o.inputmask)&&o.inputmask.hasMaskedValue();case"isComplete":return!o||!o.inputmask||o.inputmask.isComplete();case"getmetadata":return o&&o.inputmask?o.inputmask.getmetadata():void 0;case"setvalue":t(o).val(n),o&&void 0===o.inputmask&&t(o).triggerHandler("setvalue");break;case"option":if("string"!=typeof n)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(n)});if(o&&void 0!==o.inputmask)return o.inputmask.option(n);break;default:return n.alias=i,r=new e(n),this.each(function(){r.mask(this)})}else{if("object"==(void 0===i?"undefined":s(i)))return r=new e(i),void 0===i.mask&&void 0===i.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(i);r.mask(this)}):this.each(function(){r.mask(this)});if(void 0===i)return this.each(function(){(r=new e(n)).mask(this)})}}),t.fn.inputmask})},function(t,e,i){var n=i(13);"string"==typeof n&&(n=[[t.i,n,""]]),i(15)(n,{}),n.locals&&(t.exports=n.locals)},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}i(9),i(3),i(4),i(5),i(6),i(7);var r=n(i(1)),o=n(i(0)),s=n(i(2));o.default===s.default&&i(8),window.Inputmask=r.default},function(t,e,i){"use strict";var n;"function"==typeof Symbol&&Symbol.iterator,void 0!==(n=function(){return document}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n;"function"==typeof Symbol&&Symbol.iterator,void 0!==(n=function(){return window}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){(t.exports=i(14)(void 0)).push([t.i,".im-caret {\r\n\t-webkit-animation: 1s blink step-end infinite;\r\n\tanimation: 1s blink step-end infinite;\r\n}\r\n\r\n@keyframes blink {\r\n\tfrom, to {\r\n\t\tborder-right-color: black;\r\n\t}\r\n\t50% {\r\n\t\tborder-right-color: transparent;\r\n\t}\r\n}\r\n\r\n@-webkit-keyframes blink {\r\n\tfrom, to {\r\n\t\tborder-right-color: black;\r\n\t}\r\n\t50% {\r\n\t\tborder-right-color: transparent;\r\n\t}\r\n}\r\n\r\n.im-static {\r\n\tcolor: grey;\r\n}\r\n",""])},function(t,e){function i(t,e){var i=t[1]||"",r=t[3];if(!r)return i;if(e&&"function"==typeof btoa){var o=n(r),s=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[i].concat(s).concat([o]).join("\n")}return[i].join("\n")}function n(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=i(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(n[o]=!0)}for(r=0;r<t.length;r++){var s=t[r];"number"==typeof s[0]&&n[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),e.push(s))}},e}},function(t,e,i){function n(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=f[n.id];if(r){r.refs++;for(s=0;s<r.parts.length;s++)r.parts[s](n.parts[s]);for(;s<n.parts.length;s++)r.parts.push(h(n.parts[s],e))}else{for(var o=[],s=0;s<n.parts.length;s++)o.push(h(n.parts[s],e));f[n.id]={id:n.id,refs:1,parts:o}}}}function r(t){for(var e=[],i={},n=0;n<t.length;n++){var r=t[n],o=r[0],s={css:r[1],media:r[2],sourceMap:r[3]};i[o]?i[o].parts.push(s):e.push(i[o]={id:o,parts:[s]})}return e}function o(t,e){var i=g(t.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=b[b.length-1];if("top"===t.insertAt)n?n.nextSibling?i.insertBefore(e,n.nextSibling):i.appendChild(e):i.insertBefore(e,i.firstChild),b.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");i.appendChild(e)}}function s(t){t.parentNode.removeChild(t);var e=b.indexOf(t);e>=0&&b.splice(e,1)}function a(t){var e=document.createElement("style");return t.attrs.type="text/css",c(e,t.attrs),o(t,e),e}function l(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",c(e,t.attrs),o(t,e),e}function c(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}function h(t,e){var i,n,r;if(e.singleton){var o=y++;i=v||(v=a(e)),n=d.bind(null,i,o,!1),r=d.bind(null,i,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=l(e),n=p.bind(null,i,e),r=function(){s(i),i.href&&URL.revokeObjectURL(i.href)}):(i=a(e),n=u.bind(null,i),r=function(){s(i)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else r()}}function d(t,e,i,n){var r=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=x(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function u(t,e){var i=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}function p(t,e,i){var n=i.css,r=i.sourceMap,o=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||o)&&(n=_(n)),r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var s=new Blob([n],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}var f={},m=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),g=function(t){var e={};return function(i){return void 0===e[i]&&(e[i]=t.call(this,i)),e[i]}}(function(t){return document.querySelector(t)}),v=null,y=0,b=[],_=i(16);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},void 0===e.singleton&&(e.singleton=m()),void 0===e.insertInto&&(e.insertInto="head"),void 0===e.insertAt&&(e.insertAt="bottom");var i=r(t);return n(i,e),function(t){for(var o=[],s=0;s<i.length;s++){var a=i[s];(l=f[a.id]).refs--,o.push(l)}t&&n(r(t),e);for(s=0;s<o.length;s++){var l=o[s];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete f[l.id]}}}};var x=function(){var t=[];return function(e,i){return t[e]=i,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(r))return t;var o;return o=0===r.indexOf("//")?r:0===r.indexOf("/")?i+r:n+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}}]),function(t){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],t):"object"==typeof exports?module.exports=t(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):t(window.dependencyLib||jQuery,window.Inputmask)}(function(t,e){function i(t){return isNaN(t)||29===new Date(t,2,0).getDate()}return e.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+i+"[01])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9])"+i+"(0[1-9]|1[012]))|(30"+i+"(0[13-9]|1[012]))|(31"+i+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(t,e,i){if(isNaN(t))return!1;var n=parseInt(t.concat(e.toString().slice(t.length))),r=parseInt(t.concat(i.toString().slice(t.length)));return!isNaN(n)&&e<=n&&n<=i||!isNaN(r)&&e<=r&&r<=i},determinebaseyear:function(t,e,i){var n=(new Date).getFullYear();if(t>n)return t;if(e<n){for(var r=e.toString().slice(0,2),o=e.toString().slice(2,4);e<r+i;)r--;var s=r+o;return t>s?t:s}if(t<=n&&n<=e){for(var a=n.toString().slice(0,2);e<a+i;)a--;var l=a+i;return l<t?t:l}return n},onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val(a.getDate().toString()+(a.getMonth()+1).toString()+a.getFullYear().toString()),s.trigger("setvalue")}},getFrontValue:function(t,e,i){for(var n=0,r=0,o=0;o<t.length&&"2"!==t.charAt(o);o++){var s=i.definitions[t.charAt(o)];s?(n+=r,r=s.cardinality):r++}return e.join("").substr(n,r)},postValidation:function(t,e,n){var r,o,s=t.join("");return 0===n.mask.indexOf("y")?(o=s.substr(0,4),r=s.substring(4,10)):(o=s.substring(6,10),r=s.substr(0,6)),e&&(r!==n.leapday||i(o))},definitions:{1:{validator:function(t,e,i,n,r){if("3"==t.charAt(0)&&new RegExp("[2-9]").test(t.charAt(1)))return t="30",e.buffer[i]="0",i++,{pos:i};var o=r.regex.val1.test(t);return n||o||t.charAt(1)!==r.separator&&-1==="-./".indexOf(t.charAt(1))||!(o=r.regex.val1.test("0"+t.charAt(0)))?o:(e.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=t;isNaN(e.buffer[i+1])||(o+=e.buffer[i+1]);var s=1===o.length?r.regex.val1pre.test(o):r.regex.val1.test(o);if(!n&&!s){if(s=r.regex.val1.test(t+"0"))return e.buffer[i]=t,e.buffer[++i]="0",{pos:i,c:"0"};if(s=r.regex.val1.test("0"+t))return e.buffer[i]="0",i++,{pos:i}}return s},cardinality:1}]},2:{validator:function(t,e,i,n,r){var o=r.getFrontValue(e.mask,e.buffer,r);if(-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator),"1"==t.charAt(0)&&new RegExp("[3-9]").test(t.charAt(1)))return t="10",e.buffer[i]="0",i++,{pos:i};var s=r.regex.val2(r.separator).test(o+t);return n||s||t.charAt(1)!==r.separator&&-1==="-./".indexOf(t.charAt(1))||!(s=r.regex.val2(r.separator).test(o+"0"+t.charAt(0)))?s:(e.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){isNaN(e.buffer[i+1])||(t+=e.buffer[i+1]);var o=r.getFrontValue(e.mask,e.buffer,r);-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator);var s=1===t.length?r.regex.val2pre(r.separator).test(o+t):r.regex.val2(r.separator).test(o+t);return n||s||!(s=r.regex.val2(r.separator).test(o+"0"+t))?s:(e.buffer[i]="0",i++,{pos:i})},cardinality:1}]},y:{validator:function(t,e,i,n,r){return r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(t,e,i,n,r){var o=r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear);if(!n&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t+"0").toString().slice(0,1);if(o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(0),{pos:i};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t+"0").toString().slice(0,2),o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(0),e.buffer[i++]=s.charAt(1),{pos:i}}return o},cardinality:1},{validator:function(t,e,i,n,r){var o=r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear);if(!n&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t).toString().slice(0,2);if(o=r.isInYearRange(t[0]+s[1]+t[1],r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(1),{pos:i};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t).toString().slice(0,2),o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i-1]=s.charAt(0),e.buffer[i++]=s.charAt(1),e.buffer[i++]=t.charAt(0),{refreshFromBuffer:{start:i-3,end:i},pos:i}}return o},cardinality:2},{validator:function(t,e,i,n,r){return r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val(a.getFullYear().toString()+(a.getMonth()+1).toString()+a.getDate().toString()),s.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(t,e,i,n,r){if("24"===r.hourFormat&&24===parseInt(t,10))return e.buffer[i-1]="0",e.buffer[i]="0",{refreshFromBuffer:{start:i-1,end:i},c:"0"};var o=r.regex.hrs.test(t);if(!n&&!o&&(t.charAt(1)===r.timeseparator||-1!=="-.:".indexOf(t.charAt(1)))&&(o=r.regex.hrs.test("0"+t.charAt(0))))return e.buffer[i-1]="0",e.buffer[i]=t.charAt(0),i++,{refreshFromBuffer:{start:i-2,end:i},pos:i,c:r.timeseparator};if(o&&"24"!==r.hourFormat&&r.regex.hrs24.test(t)){var s=parseInt(t,10);return 24===s?(e.buffer[i+5]="a",e.buffer[i+6]="m"):(e.buffer[i+5]="p",e.buffer[i+6]="m"),(s-=12)<10?(e.buffer[i]=s.toString(),e.buffer[i-1]="0"):(e.buffer[i]=s.toString().charAt(1),e.buffer[i-1]=s.toString().charAt(0)),{refreshFromBuffer:{start:i-1,end:i+6},c:e.buffer[i]}}return o},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=r.regex.hrspre.test(t);return n||o||!(o=r.regex.hrs.test("0"+t))?o:(e.buffer[i]="0",i++,{pos:i})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=r.regex.mspre.test(t);return n||o||!(o=r.regex.ms.test("0"+t))?o:(e.buffer[i]="0",i++,{pos:i})},cardinality:1}]},t:{validator:function(t,e,i,n,r){return r.regex.ampm.test(t+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"[0-3])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+i+"30)|((0[1-6])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0},"yyyy-mm-dd hh:mm:ss":{mask:"y-1-2 h:s:s",placeholder:"yyyy-mm-dd hh:mm:ss",alias:"datetime",separator:"-",leapday:"-02-29",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},onKeyDown:function(t,e,i,n){}}}),e}),function(t){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],t):"object"==typeof exports?module.exports=t(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):t(window.dependencyLib||jQuery,window.Inputmask)}(function(t,e,i){function n(t,i){for(var n="",r=0;r<t.length;r++)e.prototype.definitions[t.charAt(r)]||i.definitions[t.charAt(r)]||i.optionalmarker.start===t.charAt(r)||i.optionalmarker.end===t.charAt(r)||i.quantifiermarker.start===t.charAt(r)||i.quantifiermarker.end===t.charAt(r)||i.groupmarker.start===t.charAt(r)||i.groupmarker.end===t.charAt(r)||i.alternatormarker===t.charAt(r)?n+="\\"+t.charAt(r):n+=t.charAt(r);return n}return e.extendAliases({numeric:{mask:function(t){if(0!==t.repeat&&isNaN(t.integerDigits)&&(t.integerDigits=t.repeat),t.repeat=0,t.groupSeparator===t.radixPoint&&("."===t.radixPoint?t.groupSeparator=",":","===t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=i),t.autoGroup=t.autoGroup&&""!==t.groupSeparator,t.autoGroup&&("string"==typeof t.groupSize&&isFinite(t.groupSize)&&(t.groupSize=parseInt(t.groupSize)),isFinite(t.integerDigits))){var e=Math.floor(t.integerDigits/t.groupSize),r=t.integerDigits%t.groupSize;t.integerDigits=parseInt(t.integerDigits)+(0===r?e-1:e),t.integerDigits<1&&(t.integerDigits="*")}t.placeholder.length>1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&!1===t.integerOptional&&(t.positionCaretOnClick="lvp"),t.definitions[";"]=t.definitions["~"],t.definitions[";"].definitionSymbol="~",!0===t.numericInput&&(t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t.decimalProtect=!1);var o="[+]";if(o+=n(t.prefix,t),!0===t.integerOptional?o+="~{1,"+t.integerDigits+"}":o+="~{"+t.integerDigits+"}",t.digits!==i){t.radixPointDefinitionSymbol=t.decimalProtect?":":t.radixPoint;var s=t.digits.toString().split(",");isFinite(s[0]&&s[1]&&isFinite(s[1]))?o+=t.radixPointDefinitionSymbol+";{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional?o+="["+t.radixPointDefinitionSymbol+";{1,"+t.digits+"}]":o+=t.radixPointDefinitionSymbol+";{"+t.digits+"}")}return o+=n(t.suffix,t),o+="[-]",t.greedy=!1,o},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(e,n,r,o,s){if("-"===r||r===s.negationSymbol.front)return!0===s.allowMinus&&(s.isNegative=s.isNegative===i||!s.isNegative,""===e.join("")||{caret:n,dopost:!0});if(!1===o&&r===s.radixPoint&&s.digits!==i&&(isNaN(s.digits)||parseInt(s.digits)>0)){var a=t.inArray(s.radixPoint,e);if(-1!==a)return!0===s.numericInput?n===a:{caret:a+1}}return!0},postValidation:function(n,r,o){var s=o.suffix.split(""),a=o.prefix.split("");if(r.pos===i&&r.caret!==i&&!0!==r.dopost)return r;var l=r.caret!==i?r.caret:r.pos,c=n.slice();o.numericInput&&(l=c.length-l-1,c=c.reverse());var h=c[l];if(h===o.groupSeparator&&(l+=1,h=c[l]),l===c.length-o.suffix.length-1&&h===o.radixPoint)return r;h!==i&&h!==o.radixPoint&&h!==o.negationSymbol.front&&h!==o.negationSymbol.back&&(c[l]="?",o.prefix.length>0&&l>=(!1===o.isNegative?1:0)&&l<o.prefix.length-1+(!1===o.isNegative?1:0)?a[l-(!1===o.isNegative?1:0)]="?":o.suffix.length>0&&l>=c.length-o.suffix.length-(!1===o.isNegative?1:0)&&(s[l-(c.length-o.suffix.length-(!1===o.isNegative?1:0))]="?")),a=a.join(""),s=s.join("");var d=c.join("").replace(a,"");if(d=d.replace(s,""),d=d.replace(new RegExp(e.escapeRegex(o.groupSeparator),"g"),""),d=d.replace(new RegExp("[-"+e.escapeRegex(o.negationSymbol.front)+"]","g"),""),d=d.replace(new RegExp(e.escapeRegex(o.negationSymbol.back)+"$"),""),isNaN(o.placeholder)&&(d=d.replace(new RegExp(e.escapeRegex(o.placeholder),"g"),"")),d.length>1&&1!==d.indexOf(o.radixPoint)&&("0"===h&&(d=d.replace(/^\?/g,"")),d=d.replace(/^0/g,"")),d.charAt(0)===o.radixPoint&&""!==o.radixPoint&&!0!==o.numericInput&&(d="0"+d),""!==d){if(d=d.split(""),(!o.digitsOptional||o.enforceDigitsOnBlur&&"blur"===r.event)&&isFinite(o.digits)){var u=t.inArray(o.radixPoint,d),p=t.inArray(o.radixPoint,c);-1===u&&(d.push(o.radixPoint),u=d.length-1);for(var f=1;f<=o.digits;f++)o.digitsOptional&&(!o.enforceDigitsOnBlur||"blur"!==r.event)||d[u+f]!==i&&d[u+f]!==o.placeholder.charAt(0)?-1!==p&&c[p+f]!==i&&(d[u+f]=d[u+f]||c[p+f]):d[u+f]=r.placeholder||o.placeholder.charAt(0)}if(!0!==o.autoGroup||""===o.groupSeparator||h===o.radixPoint&&r.pos===i&&!r.dopost)d=d.join("");else{var m=d[d.length-1]===o.radixPoint&&r.c===o.radixPoint;d=e(function(t,e){var i="";if(i+="("+e.groupSeparator+"*{"+e.groupSize+"}){*}",""!==e.radixPoint){var n=t.join("").split(e.radixPoint);n[1]&&(i+=e.radixPoint+"*{"+n[1].match(/^\d*\??\d*/)[0].length+"}")}return i}(d,o),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(d.join("")),m&&(d+=o.radixPoint),d.charAt(0)===o.groupSeparator&&d.substr(1)}}if(o.isNegative&&"blur"===r.event&&(o.isNegative="0"!==d),d=a+d,d+=s,o.isNegative&&(d=o.negationSymbol.front+d,d+=o.negationSymbol.back),d=d.split(""),h!==i)if(h!==o.radixPoint&&h!==o.negationSymbol.front&&h!==o.negationSymbol.back)(l=t.inArray("?",d))>-1?d[l]=h:l=r.caret||0;else if(h===o.radixPoint||h===o.negationSymbol.front||h===o.negationSymbol.back){var g=t.inArray(h,d);-1!==g&&(l=g)}o.numericInput&&(l=d.length-l-1,d=d.reverse());var v={caret:h===i||r.pos!==i?l+(o.numericInput?-1:1):l,buffer:d,refreshFromBuffer:r.dopost||n.join("")!==d.join("")};return v.refreshFromBuffer?v:r},onBeforeWrite:function(n,r,o,s){if(n)switch(n.type){case"keydown":return s.postValidation(r,{caret:o,dopost:!0},s);case"blur":case"checkval":var a;if(function(t){t.parseMinMaxOptions===i&&(null!==t.min&&(t.min=t.min.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.min=t.min.replace(t.radixPoint,".")),t.min=isFinite(t.min)?parseFloat(t.min):NaN,isNaN(t.min)&&(t.min=Number.MIN_VALUE)),null!==t.max&&(t.max=t.max.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.max=t.max.replace(t.radixPoint,".")),t.max=isFinite(t.max)?parseFloat(t.max):NaN,isNaN(t.max)&&(t.max=Number.MAX_VALUE)),t.parseMinMaxOptions="done")}(s),null!==s.min||null!==s.max){if(a=s.onUnMask(r.join(""),i,t.extend({},s,{unmaskAsNumber:!0})),null!==s.min&&a<s.min)return s.isNegative=s.min<0,s.postValidation(s.min.toString().replace(".",s.radixPoint).split(""),{caret:o,dopost:!0,placeholder:"0"},s);if(null!==s.max&&a>s.max)return s.isNegative=s.max<0,s.postValidation(s.max.toString().replace(".",s.radixPoint).split(""),{caret:o,dopost:!0,placeholder:"0"},s)}return s.postValidation(r,{caret:o,placeholder:"0",event:"blur"},s);case"_checkval":return{caret:o}}},regex:{integerPart:function(t,i){return i?new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?"):new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?\\d+")},integerNPart:function(t){return new RegExp("[\\d"+e.escapeRegex(t.groupSeparator)+e.escapeRegex(t.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(t,n,r,o,s,a){var l=o?new RegExp("[0-9"+e.escapeRegex(s.groupSeparator)+"]").test(t):new RegExp("[0-9]").test(t);if(!0===l){if(!0!==s.numericInput&&n.validPositions[r]!==i&&"~"===n.validPositions[r].match.def&&!a){var c=n.buffer.join(""),h=(c=(c=c.replace(new RegExp("[-"+e.escapeRegex(s.negationSymbol.front)+"]","g"),"")).replace(new RegExp(e.escapeRegex(s.negationSymbol.back)+"$"),"")).split(s.radixPoint);h.length>1&&(h[1]=h[1].replace(/0/g,s.placeholder.charAt(0))),"0"===h[0]&&(h[0]=h[0].replace(/0/g,s.placeholder.charAt(0))),c=h[0]+s.radixPoint+h[1]||"";var d=n._buffer.join("");for(c===s.radixPoint&&(c=d);null===c.match(e.escapeRegex(d)+"$");)d=d.slice(1);l=(c=(c=c.replace(d,"")).split(""))[r]===i?{pos:r,remove:r}:{pos:r}}}else o||t!==s.radixPoint||n.validPositions[r-1]!==i||(n.buffer[r]="0",l={pos:r+1});return l},cardinality:1},"+":{validator:function(t,e,i,n,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(t,e,i,n,r){return r.allowMinus&&t===r.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(t,i,n,r,o){var s="["+e.escapeRegex(o.radixPoint)+"]",a=new RegExp(s).test(t);return a&&i.validPositions[n]&&i.validPositions[n].match.placeholder===o.radixPoint&&(a={caret:n+1}),a},cardinality:1,placeholder:function(t){return t.radixPoint}}},onUnMask:function(t,i,n){if(""===i&&!0===n.nullable)return i;var r=t.replace(n.prefix,"");return r=r.replace(n.suffix,""),r=r.replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),""!==n.placeholder.charAt(0)&&(r=r.replace(new RegExp(n.placeholder.charAt(0),"g"),"0")),n.unmaskAsNumber?(""!==n.radixPoint&&-1!==r.indexOf(n.radixPoint)&&(r=r.replace(e.escapeRegex.call(this,n.radixPoint),".")),r=r.replace(new RegExp("^"+e.escapeRegex(n.negationSymbol.front)),"-"),r=r.replace(new RegExp(e.escapeRegex(n.negationSymbol.back)+"$"),""),Number(r)):r},isComplete:function(t,i){var n=t.join("");if(t.slice().join("")!==n)return!1;var r=n.replace(i.prefix,"");return r=r.replace(i.suffix,""),r=r.replace(new RegExp(e.escapeRegex(i.groupSeparator),"g"),""),","===i.radixPoint&&(r=r.replace(e.escapeRegex(i.radixPoint),".")),isFinite(r)},onBeforeMask:function(t,n){if(n.isNegative=i,t=t.toString().charAt(t.length-1)===n.radixPoint?t.toString().substr(0,t.length-1):t.toString(),""!==n.radixPoint&&isFinite(t)){var r=t.split("."),o=""!==n.groupSeparator?parseInt(n.groupSize):0;2===r.length&&(r[0].length>o||r[1].length>o||r[0].length<=o&&r[1].length<o)&&(t=t.replace(".",n.radixPoint))}var s=t.match(/,/g),a=t.match(/\./g);if(a&&s?a.length>s.length?(t=t.replace(/\./g,""),t=t.replace(",",n.radixPoint)):s.length>a.length?(t=t.replace(/,/g,""),t=t.replace(".",n.radixPoint)):t=t.indexOf(".")<t.indexOf(",")?t.replace(/\./g,""):t.replace(/,/g,""):t=t.replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),0===n.digits&&(-1!==t.indexOf(".")?t=t.substring(0,t.indexOf(".")):-1!==t.indexOf(",")&&(t=t.substring(0,t.indexOf(",")))),""!==n.radixPoint&&isFinite(n.digits)&&-1!==t.indexOf(n.radixPoint)){var l=t.split(n.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(n.digits)<l.toString().length){var c=Math.pow(10,parseInt(n.digits));t=t.replace(e.escapeRegex(n.radixPoint),"."),t=(t=Math.round(parseFloat(t)*c)/c).toString().replace(".",n.radixPoint)}}return t},canClearPosition:function(t,e,i,n,r){var o=t.validPositions[e],s=o.input!==r.radixPoint||null!==t.validPositions[e].match.fn&&!1===r.decimalProtect||o.input===r.radixPoint&&t.validPositions[e+1]&&null===t.validPositions[e+1].match.fn||isFinite(o.input)||e===i||o.input===r.groupSeparator||o.input===r.negationSymbol.front||o.input===r.negationSymbol.back;return!s||"+"!==o.match.nativeDef&&"-"!==o.match.nativeDef||(r.isNegative=!1),s},onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey)switch(i.keyCode){case e.keyCode.UP:s.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(o.step)),s.trigger("setvalue");break;case e.keyCode.DOWN:s.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(o.step)),s.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),e}),function(t){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],t):"object"==typeof exports?module.exports=t(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):t(window.dependencyLib||jQuery,window.Inputmask)}(function(t,e){function i(t,e){var i=(t.mask||t).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),n=(e.mask||e).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),r=(t.mask||t).split("#")[0],o=(e.mask||e).split("#")[0];return 0===o.indexOf(r)?-1:0===r.indexOf(o)?1:i.localeCompare(n)}var n=e.prototype.analyseMask;return e.prototype.analyseMask=function(e,i,r){function o(t,i,n){i=i||"",n=n||a,""!==i&&(n[i]={});for(var r="",s=n[i]||n,l=t.length-1;l>=0;l--)e=t[l].mask||t[l],r=e.substr(0,1),s[r]=s[r]||[],s[r].unshift(e.substr(1)),t.splice(l,1);for(var c in s)s[c].length>500&&o(s[c].slice(),c,s)}function s(e){var i="",n=[];for(var o in e)t.isArray(e[o])?1===e[o].length?n.push(o+e[o]):n.push(o+r.groupmarker.start+e[o].join(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)+r.groupmarker.end):n.push(o+s(e[o]));return 1===n.length?i+=n[0]:i+=r.groupmarker.start+n.join(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)+r.groupmarker.end,i}var a={};return r.phoneCodes&&(r.phoneCodes&&r.phoneCodes.length>1e3&&(e=e.substr(1,e.length-2),o(e.split(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)),e=s(a)),e=e.replace(/9/g,"\\9")),n.call(this,e,i,r)},e.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(t){return t.definitions={"#":e.prototype.definitions[9]},t.phoneCodes.sort(i)},keepStatic:!0,onBeforeMask:function(t,e){var i=t.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(i.indexOf(e.countrycode)>1||-1===i.indexOf(e.countrycode))&&(i="+"+e.countrycode+i),i},onUnMask:function(t,e,i){return t.replace(/[()#-]/g,"")},inputmode:"tel"}}),e}),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function t(t){return"object"==typeof t&&"function"==typeof t.to&&"function"==typeof t.from}function e(t){t.parentElement.removeChild(t)}function i(t){t.preventDefault()}function n(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function r(t,e){return Math.round(t/e)*e}function o(t,e){var i=t.getBoundingClientRect(),n=t.ownerDocument,r=n.documentElement,o=f(n);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o.x=0),e?i.top+o.y-r.clientTop:i.left+o.x-r.clientLeft}function s(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function a(t,e,i){i>0&&(d(t,e),setTimeout(function(){u(t,e)},i))}function l(t){return Math.max(Math.min(t,100),0)}function c(t){return Array.isArray(t)?t:[t]}function h(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function d(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function u(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function p(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function f(t){var e=void 0!==window.pageXOffset,i="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:i?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:i?t.documentElement.scrollTop:t.body.scrollTop}}function m(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function g(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function v(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function y(t,e){return 100/(e-t)}function b(t,e){return 100*e/(t[1]-t[0])}function _(t,e){return b(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}function x(t,e){return e*(t[1]-t[0])/100+t[0]}function w(t,e){for(var i=1;t>=e[i];)i+=1;return i}function k(t,e,i){if(i>=t.slice(-1)[0])return 100;var n,r,o,s,a=w(i,t);return n=t[a-1],r=t[a],o=e[a-1],s=e[a],o+_([n,r],i)/y(o,s)}function S(t,e,i){if(i>=100)return t.slice(-1)[0];var n,r,o,s,a=w(i,e);return n=t[a-1],r=t[a],o=e[a-1],s=e[a],x([n,r],(i-o)*y(o,s))}function C(t,e,i,n){if(100===n)return n;var o,s,a=w(n,t);return i?(o=t[a-1],s=t[a],n-o>(s-o)/2?s:o):e[a-1]?t[a-1]+r(n-t[a-1],e[a-1]):n}function D(t,e,i){var n;if("number"==typeof e&&(e=[e]),"[object Array]"!==Object.prototype.toString.call(e))throw new Error("noUiSlider ("+Z+"): 'range' contains invalid value.");if(n="min"===t?0:"max"===t?100:parseFloat(t),!s(n)||!s(e[0]))throw new Error("noUiSlider ("+Z+"): 'range' value isn't numeric.");i.xPct.push(n),i.xVal.push(e[0]),n?i.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(i.xSteps[0]=e[1]),i.xHighestCompleteStep.push(0)}function T(t,e,i){if(!e)return!0;i.xSteps[t]=b([i.xVal[t],i.xVal[t+1]],e)/y(i.xPct[t],i.xPct[t+1]);var n=(i.xVal[t+1]-i.xVal[t])/i.xNumSteps[t],r=Math.ceil(Number(n.toFixed(3))-1),o=i.xVal[t]+i.xNumSteps[t]*r;i.xHighestCompleteStep[t]=o}function A(t,e,i){this.xPct=[],this.xVal=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var n,r=[];for(n in t)t.hasOwnProperty(n)&&r.push([t[n],n]);for(r.length&&"object"==typeof r[0][0]?r.sort(function(t,e){return t[0][0]-e[0][0]}):r.sort(function(t,e){return t[0]-e[0]}),n=0;n<r.length;n++)D(r[n][1],r[n][0],this);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)T(n,this.xNumSteps[n],this)}function M(e){if(t(e))return!0;throw new Error("noUiSlider ("+Z+"): 'format' requires 'to' and 'from' methods.")}function E(t,e){if(!s(e))throw new Error("noUiSlider ("+Z+"): 'step' is not numeric.");t.singleStep=e}function P(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider ("+Z+"): 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider ("+Z+"): Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider ("+Z+"): 'range' 'min' and 'max' cannot be equal.");t.spectrum=new A(e,t.snap,t.singleStep)}function I(t,e){if(e=c(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider ("+Z+"): 'start' option is incorrect.");t.handles=e.length,t.start=e}function O(t,e){if(t.snap=e,"boolean"!=typeof e)throw new Error("noUiSlider ("+Z+"): 'snap' option must be a boolean.")}function N(t,e){if(t.animate=e,"boolean"!=typeof e)throw new Error("noUiSlider ("+Z+"): 'animate' option must be a boolean.")}function F(t,e){if(t.animationDuration=e,"number"!=typeof e)throw new Error("noUiSlider ("+Z+"): 'animationDuration' option must be a number.")}function L(t,e){var i,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(i=1;i<t.handles;i++)n.push(e);n.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider ("+Z+"): 'connect' option doesn't match handle count.");n=e}t.connect=n}function j(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider ("+Z+"): 'orientation' option is invalid.")}}function R(t,e){if(!s(e))throw new Error("noUiSlider ("+Z+"): 'margin' option must be numeric.");if(0!==e&&(t.margin=t.spectrum.getMargin(e),!t.margin))throw new Error("noUiSlider ("+Z+"): 'margin' option is only supported on linear sliders.")}function $(t,e){if(!s(e))throw new Error("noUiSlider ("+Z+"): 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(e),!t.limit||t.handles<2)throw new Error("noUiSlider ("+Z+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function H(t,e){if(!s(e))throw new Error("noUiSlider ("+Z+"): 'padding' option must be numeric.");if(0!==e){if(t.padding=t.spectrum.getMargin(e),!t.padding)throw new Error("noUiSlider ("+Z+"): 'padding' option is only supported on linear sliders.");if(t.padding<0)throw new Error("noUiSlider ("+Z+"): 'padding' option must be a positive number.");if(t.padding>=50)throw new Error("noUiSlider ("+Z+"): 'padding' option must be less than half the range.")}}function B(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider ("+Z+"): 'direction' option was not recognized.")}}function z(t,e){if("string"!=typeof e)throw new Error("noUiSlider ("+Z+"): 'behaviour' must be a string containing options.");var i=e.indexOf("tap")>=0,n=e.indexOf("drag")>=0,r=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,s=e.indexOf("hover")>=0;if(r){if(2!==t.handles)throw new Error("noUiSlider ("+Z+"): 'fixed' behaviour must be used with 2 handles");R(t,t.start[1]-t.start[0])}t.events={tap:i||o,drag:n,fixed:r,snap:o,hover:s}}function U(t,e){if(t.multitouch=e,"boolean"!=typeof e)throw new Error("noUiSlider ("+Z+"): 'multitouch' option must be a boolean.")}function W(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var i=0;i<t.handles;i++)t.tooltips.push(!0)}else{if(t.tooltips=c(e),t.tooltips.length!==t.handles)throw new Error("noUiSlider ("+Z+"): must pass a formatter for all handles.");t.tooltips.forEach(function(t){if("boolean"!=typeof t&&("object"!=typeof t||"function"!=typeof t.to))throw new Error("noUiSlider ("+Z+"): 'tooltips' must be passed a formatter or 'false'.")})}}function Y(t,e){t.ariaFormat=e,M(e)}function V(t,e){t.format=e,M(e)}function q(t,e){if(void 0!==e&&"string"!=typeof e&&!1!==e)throw new Error("noUiSlider ("+Z+"): 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function G(t,e){if(void 0!==e&&"object"!=typeof e)throw new Error("noUiSlider ("+Z+"): 'cssClasses' must be an object.");if("string"==typeof t.cssPrefix){t.cssClasses={};for(var i in e)e.hasOwnProperty(i)&&(t.cssClasses[i]=t.cssPrefix+e[i])}else t.cssClasses=e}function K(t,e){if(!0!==e&&!1!==e)throw new Error("noUiSlider ("+Z+"): 'useRequestAnimationFrame' option should be true (default) or false.");t.useRequestAnimationFrame=e}function X(t){var e={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:J,format:J},i={step:{r:!1,t:E},start:{r:!0,t:I},connect:{r:!0,t:L},direction:{r:!0,t:B},snap:{r:!1,t:O},animate:{r:!1,t:N},animationDuration:{r:!1,t:F},range:{r:!0,t:P},orientation:{r:!1,t:j},margin:{r:!1,t:R},limit:{r:!1,t:$},padding:{r:!1,t:H},behaviour:{r:!0,t:z},multitouch:{r:!0,t:U},ariaFormat:{r:!1,t:Y},format:{r:!1,t:V},tooltips:{r:!1,t:W},cssPrefix:{r:!1,t:q},cssClasses:{r:!1,t:G},useRequestAnimationFrame:{r:!1,t:K}},n={connect:!1,direction:"ltr",behaviour:"tap",multitouch:!1,orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},useRequestAnimationFrame:!0};t.format&&!t.ariaFormat&&(t.ariaFormat=t.format),Object.keys(i).forEach(function(r){if(void 0===t[r]&&void 0===n[r]){if(i[r].r)throw new Error("noUiSlider ("+Z+"): '"+r+"' is required.");return!0}i[r].t(e,void 0===t[r]?n[r]:t[r])}),e.pips=t.pips;var r=[["left","top"],["right","bottom"]];return e.style=r[e.dir][e.ort],e.styleOposite=r[e.dir?0:1][e.ort],e}function Q(t,r,s){function h(t,e){var i=dt.createElement("div");return e&&d(i,e),t.appendChild(i),i}function y(t,e){var i=h(t,r.cssClasses.origin),n=h(i,r.cssClasses.handle);return n.setAttribute("data-handle",e),n.setAttribute("tabindex","0"),n.setAttribute("role","slider"),n.setAttribute("aria-orientation",r.ort?"vertical":"horizontal"),0===e?d(n,r.cssClasses.handleLower):e===r.handles-1&&d(n,r.cssClasses.handleUpper),i}function b(t,e){return!!e&&h(t,r.cssClasses.connect)}function _(t,e){return!!r.tooltips[e]&&h(t.firstChild,r.cssClasses.tooltip)}function x(t,e,i){if("range"===t||"steps"===t)return lt.xVal;if("count"===t){if(!e)throw new Error("noUiSlider ("+Z+"): 'values' required for mode 'count'.");var n,r=100/(e-1),o=0;for(e=[];(n=o++*r)<=100;)e.push(n);t="positions"}return"positions"===t?e.map(function(t){return lt.fromStepping(i?lt.getStep(t):t)}):"values"===t?i?e.map(function(t){return lt.fromStepping(lt.getStep(lt.toStepping(t)))}):e:void 0}function w(t,e,i){function r(t,e){return(t+e).toFixed(7)/1}var o={},s=lt.xVal[0],a=lt.xVal[lt.xVal.length-1],l=!1,c=!1,h=0;return(i=n(i.slice().sort(function(t,e){return t-e})))[0]!==s&&(i.unshift(s),l=!0),i[i.length-1]!==a&&(i.push(a),c=!0),i.forEach(function(n,s){var a,d,u,p,f,m,g,v,y,b=n,_=i[s+1];if("steps"===e&&(a=lt.xNumSteps[s]),a||(a=_-b),!1!==b&&void 0!==_)for(a=Math.max(a,1e-7),d=b;d<=_;d=r(d,a)){for(g=(f=(p=lt.toStepping(d))-h)/t,y=f/(v=Math.round(g)),u=1;u<=v;u+=1)o[(h+u*y).toFixed(5)]=["x",0];m=i.indexOf(d)>-1?1:"steps"===e?2:0,!s&&l&&(m=0),d===_&&c||(o[p.toFixed(5)]=[d,m]),h=p}}),o}function k(t,e,i){function n(t,e){var i=e===r.cssClasses.value,n=i?c:u,o=i?a:l;return e+" "+n[r.ort]+" "+o[t]}function o(t,o){o[1]=o[1]&&e?e(o[0],o[1]):o[1];var a=h(s,!1);a.className=n(o[1],r.cssClasses.marker),a.style[r.style]=t+"%",o[1]&&((a=h(s,!1)).className=n(o[1],r.cssClasses.value),a.style[r.style]=t+"%",a.innerText=i.to(o[0]))}var s=dt.createElement("div"),a=[r.cssClasses.valueNormal,r.cssClasses.valueLarge,r.cssClasses.valueSub],l=[r.cssClasses.markerNormal,r.cssClasses.markerLarge,r.cssClasses.markerSub],c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],u=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];return d(s,r.cssClasses.pips),d(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(t).forEach(function(e){o(e,t[e])}),s}function S(){et&&(e(et),et=null)}function C(t){S();var e=t.mode,i=t.density||1,n=t.filter||!1,r=w(i,e,x(e,t.values||!1,t.stepped||!1)),o=t.format||{to:Math.round};return et=rt.appendChild(k(r,n,o))}function D(){var t=K.getBoundingClientRect(),e="offset"+["Width","Height"][r.ort];return 0===r.ort?t.width||K[e]:t.height||K[e]}function T(t,e,i,n){var o=function(o){return!rt.hasAttribute("disabled")&&(!p(rt,r.cssClasses.tap)&&(!!(o=A(o,n.pageOffset,n.target||e))&&(!(t===it.start&&void 0!==o.buttons&&o.buttons>1)&&((!n.hover||!o.buttons)&&(nt||o.preventDefault(),o.calcPoint=o.points[r.ort],void i(o,n))))))},s=[];return t.split(" ").forEach(function(t){e.addEventListener(t,o,!!nt&&{passive:!0}),s.push([t,o])}),s}function A(t,e,i){var n,o,s=0===t.type.indexOf("touch"),a=0===t.type.indexOf("mouse"),l=0===t.type.indexOf("pointer");if(0===t.type.indexOf("MSPointer")&&(l=!0),s&&r.multitouch){var c=function(t){return t.target===i||i.contains(t.target)};if("touchstart"===t.type){var h=Array.prototype.filter.call(t.touches,c);if(h.length>1)return!1;n=h[0].pageX,o=h[0].pageY}else{var d=Array.prototype.find.call(t.changedTouches,c);if(!d)return!1;n=d.pageX,o=d.pageY}}else if(s){if(t.touches.length>1)return!1;n=t.changedTouches[0].pageX,o=t.changedTouches[0].pageY}return e=e||f(dt),(a||l)&&(n=t.clientX+e.x,o=t.clientY+e.y),t.pageOffset=e,t.points=[n,o],t.cursor=a||l,t}function M(t){var e=100*(t-o(K,r.ort))/D();return r.dir?100-e:e}function E(t){var e=100,i=!1;return Q.forEach(function(n,r){if(!n.hasAttribute("disabled")){var o=Math.abs(ot[r]-t);o<e&&(i=r,e=o)}}),i}function P(t,e,i,n){var r=i.slice(),o=[!t,t],s=[t,!t];n=n.slice(),t&&n.reverse(),n.length>1?n.forEach(function(t,i){var n=$(r,t,r[t]+e,o[i],s[i],!1);!1===n?e=0:(e=n-r[t],r[t]=n)}):o=s=[!0];var a=!1;n.forEach(function(t,n){a=U(t,i[t]+e,o[n],s[n])||a}),a&&n.forEach(function(t){I("update",t),I("slide",t)})}function I(t,e,i){Object.keys(ht).forEach(function(n){var o=n.split(".")[0];t===o&&ht[n].forEach(function(t){t.call(tt,ct.map(r.format.to),e,ct.slice(),i||!1,ot.slice())})})}function O(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&F(t,e)}function N(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return F(t,e);var i=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint);P(i>0,100*i/e.baseSize,e.locations,e.handleNumbers)}function F(t,e){e.handle&&(u(e.handle,r.cssClasses.active),at-=1),e.listeners.forEach(function(t){ut.removeEventListener(t[0],t[1])}),0===at&&(u(rt,r.cssClasses.drag),z(),t.cursor&&(pt.style.cursor="",pt.removeEventListener("selectstart",i))),e.handleNumbers.forEach(function(t){I("change",t),I("set",t),I("end",t)})}function L(t,e){var n;if(1===e.handleNumbers.length){var o=Q[e.handleNumbers[0]];if(o.hasAttribute("disabled"))return!1;n=o.children[0],at+=1,d(n,r.cssClasses.active)}t.stopPropagation();var s=[],a=T(it.move,ut,N,{target:t.target,handle:n,listeners:s,startCalcPoint:t.calcPoint,baseSize:D(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:ot.slice()}),l=T(it.end,ut,F,{target:t.target,handle:n,listeners:s,handleNumbers:e.handleNumbers}),c=T("mouseout",ut,O,{target:t.target,handle:n,listeners:s,handleNumbers:e.handleNumbers});s.push.apply(s,a.concat(l,c)),t.cursor&&(pt.style.cursor=getComputedStyle(t.target).cursor,Q.length>1&&d(rt,r.cssClasses.drag),pt.addEventListener("selectstart",i,!1)),e.handleNumbers.forEach(function(t){I("start",t)})}function j(t){t.stopPropagation();var e=M(t.calcPoint),i=E(e);if(!1===i)return!1;r.events.snap||a(rt,r.cssClasses.tap,r.animationDuration),U(i,e,!0,!0),z(),I("slide",i,!0),I("update",i,!0),I("change",i,!0),I("set",i,!0),r.events.snap&&L(t,{handleNumbers:[i]})}function R(t){var e=M(t.calcPoint),i=lt.getStep(e),n=lt.fromStepping(i);Object.keys(ht).forEach(function(t){"hover"===t.split(".")[0]&&ht[t].forEach(function(t){t.call(tt,n)})})}function $(t,e,i,n,o,s){return Q.length>1&&(n&&e>0&&(i=Math.max(i,t[e-1]+r.margin)),o&&e<Q.length-1&&(i=Math.min(i,t[e+1]-r.margin))),Q.length>1&&r.limit&&(n&&e>0&&(i=Math.min(i,t[e-1]+r.limit)),o&&e<Q.length-1&&(i=Math.max(i,t[e+1]-r.limit))),r.padding&&(0===e&&(i=Math.max(i,r.padding)),e===Q.length-1&&(i=Math.min(i,100-r.padding))),i=lt.getStep(i),!((i=l(i))===t[e]&&!s)&&i}function H(t){return t+"%"}function B(t,e){ot[t]=e,ct[t]=lt.fromStepping(e);var i=function(){Q[t].style[r.style]=H(e),W(t),W(t+1)};window.requestAnimationFrame&&r.useRequestAnimationFrame?window.requestAnimationFrame(i):i()}function z(){st.forEach(function(t){var e=ot[t]>50?-1:1,i=3+(Q.length+e*t);Q[t].childNodes[0].style.zIndex=i})}function U(t,e,i,n){return!1!==(e=$(ot,t,e,i,n,!1))&&(B(t,e),!0)}function W(t){if(J[t]){var e=0,i=100;0!==t&&(e=ot[t-1]),t!==J.length-1&&(i=ot[t]),J[t].style[r.style]=H(e),J[t].style[r.styleOposite]=H(100-i)}}function Y(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=r.format.from(t))||isNaN(t)||U(e,lt.toStepping(t),!1,!1))}function V(t,e){var i=c(t),n=void 0===ot[0];e=void 0===e||!!e,i.forEach(Y),r.animate&&!n&&a(rt,r.cssClasses.tap,r.animationDuration),st.forEach(function(t){U(t,ot[t],!0,!1)}),z(),st.forEach(function(t){I("update",t),null!==i[t]&&e&&I("set",t)})}function q(){var t=ct.map(r.format.to);return 1===t.length?t[0]:t}function G(t,e){ht[t]=ht[t]||[],ht[t].push(e),"update"===t.split(".")[0]&&Q.forEach(function(t,e){I("update",e)})}var K,Q,J,tt,et,it=m(),nt=v()&&g(),rt=t,ot=[],st=[],at=0,lt=r.spectrum,ct=[],ht={},dt=t.ownerDocument,ut=dt.documentElement,pt=dt.body;if(rt.noUiSlider)throw new Error("noUiSlider ("+Z+"): Slider was already initialized.");return function(t){d(t,r.cssClasses.target),0===r.dir?d(t,r.cssClasses.ltr):d(t,r.cssClasses.rtl),0===r.ort?d(t,r.cssClasses.horizontal):d(t,r.cssClasses.vertical),K=h(t,r.cssClasses.base)}(rt),function(t,e){Q=[],(J=[]).push(b(e,t[0]));for(var i=0;i<r.handles;i++)Q.push(y(e,i)),st[i]=i,J.push(b(e,t[i+1]))}(r.connect,K),tt={destroy:function(){for(var t in r.cssClasses)r.cssClasses.hasOwnProperty(t)&&u(rt,r.cssClasses[t]);for(;rt.firstChild;)rt.removeChild(rt.firstChild);delete rt.noUiSlider},steps:function(){return ot.map(function(t,e){var i=lt.getNearbySteps(t),n=ct[e],r=i.thisStep.step,o=null;!1!==r&&n+r>i.stepAfter.startValue&&(r=i.stepAfter.startValue-n),o=n>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&n-i.stepBefore.highestStep,100===t?r=null:0===t&&(o=null);var s=lt.countStepDecimals();return null!==r&&!1!==r&&(r=Number(r.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,r]})},on:G,off:function(t){var e=t&&t.split(".")[0],i=e&&t.substring(e.length);Object.keys(ht).forEach(function(t){var n=t.split(".")[0],r=t.substring(n.length);e&&e!==n||i&&i!==r||delete ht[t]})},get:q,set:V,reset:function(t){V(r.start,t)},__moveHandles:function(t,e,i){P(t,e,ot,i)},options:s,updateOptions:function(t,e){var i=q(),n=["margin","limit","padding","range","animate","snap","step","format"];n.forEach(function(e){void 0!==t[e]&&(s[e]=t[e])});var o=X(s);n.forEach(function(e){void 0!==t[e]&&(r[e]=o[e])}),lt=o.spectrum,r.margin=o.margin,r.limit=o.limit,r.padding=o.padding,r.pips&&C(r.pips),ot=[],V(t.start||i,e)},target:rt,removePips:S,pips:C},function(t){t.fixed||Q.forEach(function(t,e){T(it.start,t.children[0],L,{handleNumbers:[e]})}),t.tap&&T(it.start,K,j,{}),t.hover&&T(it.move,K,R,{hover:!0}),t.drag&&J.forEach(function(e,i){if(!1!==e&&0!==i&&i!==J.length-1){var n=Q[i-1],o=Q[i],s=[e];d(e,r.cssClasses.draggable),t.fixed&&(s.push(n.children[0]),s.push(o.children[0])),s.forEach(function(t){T(it.start,t,L,{handles:[n,o],handleNumbers:[i-1,i]})})}})}(r.events),V(r.start),r.pips&&C(r.pips),r.tooltips&&function(){var t=Q.map(_);G("update",function(e,i,n){if(t[i]){var o=e[i];!0!==r.tooltips[i]&&(o=r.tooltips[i].to(n[i])),t[i].innerHTML=o}})}(),G("update",function(t,e,i,n,o){st.forEach(function(t){var e=Q[t],n=$(ot,t,0,!0,!0,!0),s=$(ot,t,100,!0,!0,!0),a=o[t],l=r.ariaFormat.to(i[t]);e.children[0].setAttribute("aria-valuemin",n.toFixed(1)),e.children[0].setAttribute("aria-valuemax",s.toFixed(1)),e.children[0].setAttribute("aria-valuenow",a.toFixed(1)),e.children[0].setAttribute("aria-valuetext",l)})}),tt}var Z="10.1.0";A.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!=0)throw new Error("noUiSlider ("+Z+"): 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&b(this.xVal,t)},A.prototype.toStepping=function(t){return t=k(this.xVal,this.xPct,t)},A.prototype.fromStepping=function(t){return S(this.xVal,this.xPct,t)},A.prototype.getStep=function(t){return t=C(this.xPct,this.xSteps,this.snap,t)},A.prototype.getNearbySteps=function(t){var e=w(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},A.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(h);return Math.max.apply(null,t)},A.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var J={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};return{version:Z,create:function(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider ("+Z+"): create requires a single element, got: "+t);var i=Q(t,X(e,t),e);return t.noUiSlider=i,i}}}),function(t,e){if("function"==typeof define&&define.amd)define(["exports","module"],e);else if("undefined"!=typeof exports&&"undefined"!=typeof module)e(exports,module);else{var i={exports:{}};e(i.exports,i),t.autosize=i.exports}}(this,function(t,e){"use strict";function i(t){function e(e){var i=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=i,t.style.overflowY=e}function i(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}function n(){var e=t.style.height,n=i(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="";var o=t.scrollHeight+a;0!==t.scrollHeight?(t.style.height=o+"px",l=t.clientWidth,n.forEach(function(t){t.node.scrollTop=t.scrollTop}),r&&(document.documentElement.scrollTop=r)):t.style.height=e}function r(){n();var i=Math.round(parseFloat(t.style.height)),r=window.getComputedStyle(t,null),o="content-box"===r.boxSizing?Math.round(parseFloat(r.height)):t.offsetHeight;if(o!==i?"hidden"===r.overflowY&&(e("scroll"),n(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==r.overflowY&&(e("hidden"),n(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),c!==o){c=o;var a=s("autosize:resized");try{t.dispatchEvent(a)}catch(t){}}}if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!o.has(t)){var a=null,l=t.clientWidth,c=null,h=function(){t.clientWidth!==l&&r()},d=function(e){window.removeEventListener("resize",h,!1),t.removeEventListener("input",r,!1),t.removeEventListener("keyup",r,!1),t.removeEventListener("autosize:destroy",d,!1),t.removeEventListener("autosize:update",r,!1),Object.keys(e).forEach(function(i){t.style[i]=e[i]}),o.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",d,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",r,!1),window.addEventListener("resize",h,!1),t.addEventListener("input",r,!1),t.addEventListener("autosize:update",r,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",o.set(t,{destroy:d,update:r}),function(){var e=window.getComputedStyle(t,null);"vertical"===e.resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),a="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(a)&&(a=0),r()}()}}function n(t){var e=o.get(t);e&&e.destroy()}function r(t){var e=o.get(t);e&&e.update()}var o="function"==typeof Map?new Map:function(){var t=[],e=[];return{has:function(e){return t.indexOf(e)>-1},get:function(i){return e[t.indexOf(i)]},set:function(i,n){-1===t.indexOf(i)&&(t.push(i),e.push(n))},delete:function(i){var n=t.indexOf(i);n>-1&&(t.splice(n,1),e.splice(n,1))}}}(),s=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){s=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(t){return t}).destroy=function(t){return t},a.update=function(t){return t}):((a=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return i(t)}),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],n),t},a.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],r),t}),e.exports=a}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=t()}}(function(){return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[s]={exports:{}};e[s][0].call(h.exports,function(t){return r(e[s][1][t]||t)},h,h.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){var n=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}e.exports=function(t,e){for(;t&&t.nodeType!==n;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},{}],2:[function(t,e,i){function n(t,e,i,n){return function(i){i.delegateTarget=r(i.target,e),i.delegateTarget&&n.call(t,i)}}var r=t("./closest");e.exports=function(t,e,i,r,o){var s=n.apply(this,arguments);return t.addEventListener(i,s,o),{destroy:function(){t.removeEventListener(i,s,o)}}}},{"./closest":1}],3:[function(t,e,i){i.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},i.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||i.node(t[0]))},i.string=function(t){return"string"==typeof t||t instanceof String},i.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},{}],4:[function(t,e,i){function n(t,e,i){return t.addEventListener(e,i),{destroy:function(){t.removeEventListener(e,i)}}}function r(t,e,i){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,i)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,i)})}}}function o(t,e,i){return a(document.body,t,e,i)}var s=t("./is"),a=t("delegate");e.exports=function(t,e,i){if(!t&&!e&&!i)throw new Error("Missing required arguments");if(!s.string(e))throw new TypeError("Second argument must be a String");if(!s.fn(i))throw new TypeError("Third argument must be a Function");if(s.node(t))return n(t,e,i);if(s.nodeList(t))return r(t,e,i);if(s.string(t))return o(t,e,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},{"./is":3,delegate:2}],5:[function(t,e,i){e.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var i=t.hasAttribute("readonly");i||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),i||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r),e=n.toString()}return e}},{}],6:[function(t,e,i){function n(){}n.prototype={on:function(t,e,i){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){function n(){r.off(t,n),e.apply(i,arguments)}var r=this;return n._=e,this.on(t,n,i)},emit:function(t){var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),n=0,r=i.length;for(n;n<r;n++)i[n].fn.apply(i[n].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),n=i[t],r=[];if(n&&e)for(var o=0,s=n.length;o<s;o++)n[o].fn!==e&&n[o].fn._!==e&&r.push(n[o]);return r.length?i[t]=r:delete i[t],this}},e.exports=n},{}],7:[function(t,e,i){!function(n,r){if(void 0!==i)r(e,t("select"));else{var o={exports:{}};r(o,n.select),n.clipboardAction=o.exports}}(this,function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(t){return t&&t.__esModule?t:{default:t}}(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=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}}(),s=function(){function t(e){i(this,t),this.resolveOptions(e),this.initSelection()}return o(t,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=i+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,n.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,n.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=s})},{select:5}],8:[function(t,e,i){!function(n,r){if(void 0!==i)r(e,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var o={exports:{}};r(o,n.clipboardAction,n.tinyEmitter,n.goodListener),n.clipboard=o.exports}}(this,function(t,e,i,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(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)}function l(t,e){var i="data-clipboard-"+t;if(e.hasAttribute(i))return e.getAttribute(i)}var c=r(e),h=r(i),d=r(n),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p=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}}(),f=function(t){function e(t,i){o(this,e);var n=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.resolveOptions(i),n.listenClick(t),n}return a(e,h.default),p(e,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===u(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,d.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return l("action",t)}},{key:"defaultTarget",value:function(t){var e=l("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return l("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,i=!!document.queryCommandSupported;return e.forEach(function(t){i=i&&!!document.queryCommandSupported(t)}),i}}]),e}();t.exports=f})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,document,window,navigator)}):"object"==typeof exports?t(require("jquery"),document,window,navigator):t(jQuery,document,window,navigator)}(function(t,e,i,n,r){"use strict";var o=0,s=function(){var e,i=n.userAgent,r=/msie\s\d+/i;return i.search(r)>0&&(e=r.exec(i).toString(),(e=e.split(" ")[1])<9)&&(t("html").addClass("lt-ie9"),!0)}();Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,i=[].slice;if("function"!=typeof e)throw new TypeError;var n=i.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=e.prototype;var s=new o,a=e.apply(s,n.concat(i.call(arguments)));return Object(a)===a?a:s}return e.apply(t,n.concat(i.call(arguments)))};return r}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var i;if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return-1;var o=+e||0;if(Math.abs(o)===1/0&&(o=0),o>=r)return-1;for(i=Math.max(o>=0?o:r-Math.abs(o),0);i<r;){if(i in n&&n[i]===t)return i;i++}return-1});var a=function(n,o,s){this.VERSION="2.2.0",this.input=n,this.plugin_count=s,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,o=o||{},this.$cache={win:t(i),body:t(e.body),input:t(n),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var a,l,c,h=this.$cache.input,d=h.prop("value");a={type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==h[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",h[0]),(l={type:h.data("type"),min:h.data("min"),max:h.data("max"),from:h.data("from"),to:h.data("to"),step:h.data("step"),min_interval:h.data("minInterval"),max_interval:h.data("maxInterval"),drag_interval:h.data("dragInterval"),values:h.data("values"),from_fixed:h.data("fromFixed"),from_min:h.data("fromMin"),from_max:h.data("fromMax"),from_shadow:h.data("fromShadow"),to_fixed:h.data("toFixed"),to_min:h.data("toMin"),to_max:h.data("toMax"),to_shadow:h.data("toShadow"),prettify_enabled:h.data("prettifyEnabled"),prettify_separator:h.data("prettifySeparator"),force_edges:h.data("forceEdges"),keyboard:h.data("keyboard"),grid:h.data("grid"),grid_margin:h.data("gridMargin"),grid_num:h.data("gridNum"),grid_snap:h.data("gridSnap"),hide_min_max:h.data("hideMinMax"),hide_from_to:h.data("hideFromTo"),prefix:h.data("prefix"),postfix:h.data("postfix"),max_postfix:h.data("maxPostfix"),decorate_both:h.data("decorateBoth"),values_separator:h.data("valuesSeparator"),input_values_separator:h.data("inputValuesSeparator"),disable:h.data("disable"),block:h.data("block"),extra_classes:h.data("extraClasses")}).values=l.values&&l.values.split(",");for(c in l)l.hasOwnProperty(c)&&(l[c]!==r&&""!==l[c]||delete l[c]);d!==r&&""!==d&&((d=d.split(l.input_values_separator||o.input_values_separator||";"))[0]&&d[0]==+d[0]&&(d[0]=+d[0]),d[1]&&d[1]==+d[1]&&(d[1]=+d[1]),o&&o.values&&o.values.length?(a.from=d[0]&&o.values.indexOf(d[0]),a.to=d[1]&&o.values.indexOf(d[1])):(a.from=d[0]&&+d[0],a.to=d[1]&&+d[1])),t.extend(a,o),t.extend(a,l),this.options=a,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};a.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='<span class="irs js-irs-'+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="0"><span class="irs-line-left"></span><span class="irs-line-mid"></span><span class="irs-line-right"></span></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span><span class="irs-bar"></span>'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar-edge"></span><span class="irs-shadow shadow-single"></span><span class="irs-slider single"></span>'),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-slider from"></span><span class="irs-slider to"></span>'),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,e=this.options.max,i=this.options.from,n=this.options.to;i>t&&n===e?this.$cache.s_from.addClass("type_last"):n<e&&this.$cache.s_to.addClass("type_last")},changeLevel:function(t){switch(t){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),s&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),s&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){if(!this.target){var e,i;e=(i="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,e+=i.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:e})}},pointerMove:function(t){if(this.dragging){var e=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=e-this.coords.x_gap,this.calc()}},pointerUp:function(e){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,s&&t("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(t.contains(this.$cache.cont[0],e.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(e,i){i.preventDefault();var n=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&("both"===e&&this.setTempMinInterval(),e||(e=this.target||"from"),this.current_plugin=this.plugin_count,this.target=e,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=n-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(e),s&&t("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,e){e.preventDefault();var i=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;2!==e.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(i-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,e){if(!(this.current_plugin!==this.plugin_count||e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)){switch(e.which){case 83:case 65:case 40:case 37:e.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:e.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var e=this.coords.p_pointer,i=(this.options.max-this.options.min)/100;i=this.options.step/i,t?e+=i:e-=i,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*e),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),e=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=e,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(e,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&((10===++this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var e=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,e=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,e=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(e)),this.target){case"base":var i=(this.options.max-this.options.min)/100,n=(this.result.from-this.options.min)/i,r=(this.result.to-this.options.min)/i;this.coords.p_single_real=this.toFixed(n),this.coords.p_from_real=this.toFixed(n),this.coords.p_to_real=this.toFixed(r),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(e),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(e),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(e),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;e=this.toFixed(e+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(e)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(e)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var o=this.convertToRealPercent(e),s=this.result.from_percent,a=this.result.to_percent-s,l=a/2,c=o-l,h=o+l;c<0&&(h=(c=0)+a),h>100&&(c=(h=100)-a),this.coords.p_from_real=this.calcWithStep(c),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(h),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,e=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return e<0?e=0:e>t&&(e=t),e},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(t){return"single"===this.options.type?"single":t>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)&&(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",(this.old_from!==this.result.from||this.force_redraw)&&(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),(this.old_to!==this.result.to||this.force_redraw)&&(this.$cache.to[0].style.left=this.labels.p_to_left+"%"),this.$cache.single[0].style.left=this.labels.p_single_left+"%"),this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var t,e,i,n,r,o=this.options.values.length,s=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)o?(t=this.decorate(s[this.result.from]),this.$cache.single.html(t)):(n=this._prettify(this.result.from),t=this.decorate(n,this.result.from),this.$cache.single.html(t)),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{o?(this.options.decorate_both?(t=this.decorate(s[this.result.from]),t+=this.options.values_separator,t+=this.decorate(s[this.result.to])):t=this.decorate(s[this.result.from]+this.options.values_separator+s[this.result.to]),e=this.decorate(s[this.result.from]),i=this.decorate(s[this.result.to]),this.$cache.single.html(t),this.$cache.from.html(e),this.$cache.to.html(i)):(n=this._prettify(this.result.from),r=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(n,this.result.from),t+=this.options.values_separator,t+=this.decorate(r,this.result.to)):t=this.decorate(n+this.options.values_separator+r,this.result.to),e=this.decorate(n,this.result.from),i=this.decorate(r,this.result.to),this.$cache.single.html(t),this.$cache.from.html(e),this.$cache.to.html(i)),this.calcLabels();var a=Math.min(this.labels.p_single_left,this.labels.p_from_left),l=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,h=Math.max(l,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",h=c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",h=Math.max(l,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),a<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",h>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,e,i,n,r=this.options,o=this.$cache,s="number"==typeof r.from_min&&!isNaN(r.from_min),a="number"==typeof r.from_max&&!isNaN(r.from_max),l="number"==typeof r.to_min&&!isNaN(r.to_min),c="number"==typeof r.to_max&&!isNaN(r.to_max);"single"===r.type?r.from_shadow&&(s||a)?(t=this.convertToPercent(s?r.from_min:r.min),e=this.convertToPercent(a?r.from_max:r.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,o.shad_single[0].style.display="block",o.shad_single[0].style.left=t+"%",o.shad_single[0].style.width=e+"%"):o.shad_single[0].style.display="none":(r.from_shadow&&(s||a)?(t=this.convertToPercent(s?r.from_min:r.min),e=this.convertToPercent(a?r.from_max:r.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,o.shad_from[0].style.display="block",o.shad_from[0].style.left=t+"%",o.shad_from[0].style.width=e+"%"):o.shad_from[0].style.display="none",r.to_shadow&&(l||c)?(i=this.convertToPercent(l?r.to_min:r.min),n=this.convertToPercent(c?r.to_max:r.max)-i,i=this.toFixed(i-this.coords.p_handle/100*i),n=this.toFixed(n-this.coords.p_handle/100*n),i+=this.coords.p_handle/2,o.shad_to[0].style.display="block",o.shad_to[0].style.left=i+"%",o.shad_to[0].style.width=n+"%"):o.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,e){var i,n,r=this.options.max-this.options.min,o=r/100;return r?(i=e?t:t-this.options.min,n=i/o,this.toFixed(n)):(this.no_diapason=!0,0)},convertToValue:function(t){var e,i,n=this.options.min,r=this.options.max,o=n.toString().split(".")[1],s=r.toString().split(".")[1],a=0,l=0;if(0===t)return this.options.min;if(100===t)return this.options.max;o&&(a=e=o.length),s&&(a=i=s.length),e&&i&&(a=e>=i?e:i),n<0&&(n=+(n+(l=Math.abs(n))).toFixed(a),r=+(r+l).toFixed(a));var c,h=(r-n)/100*t+n,d=this.options.step.toString().split(".")[1];return d?h=+h.toFixed(d.length):(h/=this.options.step,h=+(h*=this.options.step).toFixed(0)),l&&(h-=l),(c=d?+h.toFixed(d.length):this.toFixed(h))<this.options.min?c=this.options.min:c>this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var e=Math.round(t/this.coords.p_step)*this.coords.p_step;return e>100&&(e=100),100===t&&(e=100),this.toFixed(e)},checkMinInterval:function(t,e,i){var n,r,o=this.options;return o.min_interval?(n=this.convertToValue(t),r=this.convertToValue(e),"from"===i?r-n<o.min_interval&&(n=r-o.min_interval):n-r<o.min_interval&&(n=r+o.min_interval),this.convertToPercent(n)):t},checkMaxInterval:function(t,e,i){var n,r,o=this.options;return o.max_interval?(n=this.convertToValue(t),r=this.convertToValue(e),"from"===i?r-n>o.max_interval&&(n=r-o.max_interval):n-r>o.max_interval&&(n=r+o.max_interval),this.convertToPercent(n)):t},checkDiapason:function(t,e,i){var n=this.convertToValue(t),r=this.options;return"number"!=typeof e&&(e=r.min),"number"!=typeof i&&(i=r.max),n<e&&(n=e),n>i&&(n=i),this.convertToPercent(n)},toFixed:function(t){return+(t=t.toFixed(20))},_prettify:function(t){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(t):this.prettify(t):t},prettify:function(t){return t.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(t,e){return this.options.force_edges?(t<0?t=0:t>100-e&&(t=100-e),this.toFixed(t)):this.toFixed(t)},validate:function(){var t,e,i=this.options,n=this.result,r=i.values,o=r.length;if("string"==typeof i.min&&(i.min=+i.min),"string"==typeof i.max&&(i.max=+i.max),"string"==typeof i.from&&(i.from=+i.from),"string"==typeof i.to&&(i.to=+i.to),"string"==typeof i.step&&(i.step=+i.step),"string"==typeof i.from_min&&(i.from_min=+i.from_min),"string"==typeof i.from_max&&(i.from_max=+i.from_max),"string"==typeof i.to_min&&(i.to_min=+i.to_min),"string"==typeof i.to_max&&(i.to_max=+i.to_max),"string"==typeof i.grid_num&&(i.grid_num=+i.grid_num),i.max<i.min&&(i.max=i.min),o)for(i.p_values=[],i.min=0,i.max=o-1,i.step=1,i.grid_num=i.max,i.grid_snap=!0,e=0;e<o;e++)t=+r[e],isNaN(t)?t=r[e]:(r[e]=t,t=this._prettify(t)),i.p_values.push(t);("number"!=typeof i.from||isNaN(i.from))&&(i.from=i.min),("number"!=typeof i.to||isNaN(i.to))&&(i.to=i.max),"single"===i.type?(i.from<i.min&&(i.from=i.min),i.from>i.max&&(i.from=i.max)):(i.from<i.min&&(i.from=i.min),i.from>i.max&&(i.from=i.max),i.to<i.min&&(i.to=i.min),i.to>i.max&&(i.to=i.max),this.update_check.from&&(this.update_check.from!==i.from&&i.from>i.to&&(i.from=i.to),this.update_check.to!==i.to&&i.to<i.from&&(i.to=i.from)),i.from>i.to&&(i.from=i.to),i.to<i.from&&(i.to=i.from)),("number"!=typeof i.step||isNaN(i.step)||!i.step||i.step<0)&&(i.step=1),"number"==typeof i.from_min&&i.from<i.from_min&&(i.from=i.from_min),"number"==typeof i.from_max&&i.from>i.from_max&&(i.from=i.from_max),"number"==typeof i.to_min&&i.to<i.to_min&&(i.to=i.to_min),"number"==typeof i.to_max&&i.from>i.to_max&&(i.to=i.to_max),n&&(n.min!==i.min&&(n.min=i.min),n.max!==i.max&&(n.max=i.max),(n.from<n.min||n.from>n.max)&&(n.from=i.from),(n.to<n.min||n.to>n.max)&&(n.to=i.to)),("number"!=typeof i.min_interval||isNaN(i.min_interval)||!i.min_interval||i.min_interval<0)&&(i.min_interval=0),("number"!=typeof i.max_interval||isNaN(i.max_interval)||!i.max_interval||i.max_interval<0)&&(i.max_interval=0),i.min_interval&&i.min_interval>i.max-i.min&&(i.min_interval=i.max-i.min),i.max_interval&&i.max_interval>i.max-i.min&&(i.max_interval=i.max-i.min)},decorate:function(t,e){var i="",n=this.options;return n.prefix&&(i+=n.prefix),i+=t,n.max_postfix&&(n.values.length&&t===n.p_values[n.max]?(i+=n.max_postfix,n.postfix&&(i+=" ")):e===n.max&&(i+=n.max_postfix,n.postfix&&(i+=" "))),n.postfix&&(i+=n.postfix),i},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,e,i,n,r,o=this.options,s=o.max-o.min,a=o.grid_num,l=0,c=0,h=4,d="";for(this.calcGridMargin(),o.grid_snap?s>50?(a=50/o.step,l=this.toFixed(o.step/.5)):(a=s/o.step,l=this.toFixed(o.step/(s/100))):l=this.toFixed(100/a),a>4&&(h=3),a>7&&(h=2),a>14&&(h=1),a>28&&(h=0),t=0;t<a+1;t++){for(i=h,(c=this.toFixed(l*t))>100&&(c=100),this.coords.big[t]=c,n=(c-l*(t-1))/(i+1),e=1;e<=i&&0!==c;e++)d+='<span class="irs-grid-pol small" style="left: '+this.toFixed(c-n*e)+'%"></span>';d+='<span class="irs-grid-pol" style="left: '+c+'%"></span>',r=this.convertToValue(c),d+='<span class="irs-grid-text js-grid-text-'+t+'" style="left: '+c+'%">'+(r=o.values.length?o.p_values[r]:this._prettify(r))+"</span>"}this.coords.big_num=Math.ceil(a+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(d),this.cacheGridLabels()}},cacheGridLabels:function(){var t,e,i=this.coords.big_num;for(e=0;e<i;e++)t=this.$cache.grid.find(".js-grid-text-"+e),this.$cache.grid_labels.push(t);this.calcGridLabels()},calcGridLabels:function(){var t,e,i=[],n=[],r=this.coords.big_num;for(t=0;t<r;t++)this.coords.big_w[t]=this.$cache.grid_labels[t].outerWidth(!1),this.coords.big_p[t]=this.toFixed(this.coords.big_w[t]/this.coords.w_rs*100),this.coords.big_x[t]=this.toFixed(this.coords.big_p[t]/2),i[t]=this.toFixed(this.coords.big[t]-this.coords.big_x[t]),n[t]=this.toFixed(i[t]+this.coords.big_p[t]);for(this.options.force_edges&&(i[0]<-this.coords.grid_gap&&(i[0]=-this.coords.grid_gap,n[0]=this.toFixed(i[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),n[r-1]>100+this.coords.grid_gap&&(n[r-1]=100+this.coords.grid_gap,i[r-1]=this.toFixed(n[r-1]-this.coords.big_p[r-1]),this.coords.big_x[r-1]=this.toFixed(this.coords.big_p[r-1]-this.coords.grid_gap))),this.calcGridCollision(2,i,n),this.calcGridCollision(4,i,n),t=0;t<r;t++)e=this.$cache.grid_labels[t][0],this.coords.big_x[t]!==Number.POSITIVE_INFINITY&&(e.style.marginLeft=-this.coords.big_x[t]+"%")},calcGridCollision:function(t,e,i){var n,r,o,s=this.coords.big_num;for(n=0;n<s&&!((r=n+t/2)>=s);n+=t)o=this.$cache.grid_labels[r][0],i[n]<=e[r]?o.style.visibility="visible":o.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(e){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=t.extend(this.options,e),this.validate(),this.updateResult(e),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),t.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},t.fn.ionRangeSlider=function(e){return this.each(function(){t.data(this,"ionRangeSlider")||t.data(this,"ionRangeSlider",new a(this,e,o++))})},function(){for(var t=0,e=["ms","moz","webkit","o"],n=0;n<e.length&&!i.requestAnimationFrame;++n)i.requestAnimationFrame=i[e[n]+"RequestAnimationFrame"],i.cancelAnimationFrame=i[e[n]+"CancelAnimationFrame"]||i[e[n]+"CancelRequestAnimationFrame"];i.requestAnimationFrame||(i.requestAnimationFrame=function(e,n){var r=(new Date).getTime(),o=Math.max(0,16-(r-t)),s=i.setTimeout(function(){e(r+o)},o);return t=r+o,s}),i.cancelAnimationFrame||(i.cancelAnimationFrame=function(t){clearTimeout(t)})}()}),function(){var t,e,i,n,r,o,s,a,l,c=[].slice,h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;a=function(){},e=function(){function t(){}return t.prototype.addEventListener=t.prototype.on,t.prototype.on=function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this},t.prototype.emit=function(){var t,e,i,n,r;if(i=arguments[0],t=2<=arguments.length?c.call(arguments,1):[],this._callbacks=this._callbacks||{},e=this._callbacks[i])for(n=0,r=e.length;n<r;n++)e[n].apply(this,t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.off=function(t,e){var i,n,r,o;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(!(i=this._callbacks[t]))return this;if(1===arguments.length)return delete this._callbacks[t],this;for(n=r=0,o=i.length;r<o;n=++r)if(i[n]===e){i.splice(n,1);break}return this},t}(),(t=function(t){function n(t,e){var i,o,s;if(this.element=t,this.version=n.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(n.instances.push(this),this.element.dropzone=this,i=null!=(s=n.optionsForElement(this.element))?s:{},this.options=r({},this.defaultOptions,i,null!=e?e:{}),this.options.forceFallback||!n.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),null!=this.options.renameFilename&&(this.options.renameFile=function(t){return function(e){return t.options.renameFilename.call(t,e.name,e)}}(this)),this.options.method=this.options.method.toUpperCase(),(o=this.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=n.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=n.getElements(this.options.clickable,"clickable")),this.init()}var r,o;return h(n,e),n.prototype.Emitter=e,n.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],n.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,params:{},headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){return a},accept:function(t,e){return e()},fallback:function(){var t,e,i,r,o,s;for(this.element.className=this.element.className+" dz-browser-not-supported",e=0,i=(o=this.element.getElementsByTagName("div")).length;e<i;e++)t=o[e],/(^| )dz-message($| )/.test(t.className)&&(r=t,t.className="dz-message");return r||(r=n.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(r)),(s=r.getElementsByTagName("span")[0])&&(null!=s.textContent?s.textContent=this.options.dictFallbackMessage:null!=s.innerText&&(s.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,i,n){var r,o,s;if(r={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height,null==e&&null==i?(e=r.srcWidth,i=r.srcHeight):null==e?e=i*o:null==i&&(i=e/o),e=Math.min(e,r.srcWidth),i=Math.min(i,r.srcHeight),s=e/i,r.srcWidth>e||r.srcHeight>i)if("crop"===n)o>s?(r.srcHeight=t.height,r.srcWidth=r.srcHeight*s):(r.srcWidth=t.width,r.srcHeight=r.srcWidth/s);else{if("contain"!==n)throw new Error("Unknown resizeMethod '"+n+"'");o>s?i=e/o:e=i*o}return r.srcX=(t.width-r.srcWidth)/2,r.srcY=(t.height-r.srcHeight)/2,r.trgWidth=e,r.trgHeight=i,r},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail /></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size></span></div>\n    <div class="dz-filename"><span data-dz-name></span></div>\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n  <div class="dz-success-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Check</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n      </g>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Error</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n          <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:a,dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:a,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e,i,r,o,s,a,l,c,h,d,u,p;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(t.previewElement=n.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),e=0,o=(l=t.previewElement.querySelectorAll("[data-dz-name]")).length;e<o;e++)l[e].textContent=t.name;for(i=0,s=(c=t.previewElement.querySelectorAll("[data-dz-size]")).length;i<s;i++)c[i].innerHTML=this.filesize(t.size);for(this.options.addRemoveLinks&&(t._removeLink=n.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),t.previewElement.appendChild(t._removeLink)),d=function(e){return function(i){return i.preventDefault(),i.stopPropagation(),t.status===n.UPLOADING?n.confirm(e.options.dictCancelUploadConfirmation,function(){return e.removeFile(t)}):e.options.dictRemoveFileConfirmation?n.confirm(e.options.dictRemoveFileConfirmation,function(){return e.removeFile(t)}):e.removeFile(t)}}(this),p=[],r=0,a=(h=t.previewElement.querySelectorAll("[data-dz-remove]")).length;r<a;r++)u=h[r],p.push(u.addEventListener("click",d));return p}},removedfile:function(t){var e;return t.previewElement&&null!=(e=t.previewElement)&&e.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){var i,n,r,o;if(t.previewElement){for(t.previewElement.classList.remove("dz-file-preview"),i=0,n=(r=t.previewElement.querySelectorAll("[data-dz-thumbnail]")).length;i<n;i++)(o=r[i]).alt=t.name,o.src=e;return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){var i,n,r,o,s;if(t.previewElement){for(t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error),s=[],i=0,n=(o=t.previewElement.querySelectorAll("[data-dz-errormessage]")).length;i<n;i++)r=o[i],s.push(r.textContent=e);return s}},errormultiple:a,processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:a,uploadprogress:function(t,e,i){var n,r,o,s,a;if(t.previewElement){for(a=[],n=0,r=(s=t.previewElement.querySelectorAll("[data-dz-uploadprogress]")).length;n<r;n++)"PROGRESS"===(o=s[n]).nodeName?a.push(o.value=e):a.push(o.style.width=e+"%");return a}},totaluploadprogress:a,sending:a,sendingmultiple:a,success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:a,canceled:function(t){return this.emit("error",t,"Upload canceled.")},canceledmultiple:a,complete:function(t){if(t._removeLink&&(t._removeLink.textContent=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:a,maxfilesexceeded:a,maxfilesreached:a,queuecomplete:a,addedfiles:a},r=function(){var t,e,i,n,r,o,s;for(o=arguments[0],t=0,i=(r=2<=arguments.length?c.call(arguments,1):[]).length;t<i;t++){n=r[t];for(e in n)s=n[e],o[e]=s}return o},n.prototype.getAcceptedFiles=function(){var t,e,i,n,r;for(r=[],e=0,i=(n=this.files).length;e<i;e++)(t=n[e]).accepted&&r.push(t);return r},n.prototype.getRejectedFiles=function(){var t,e,i,n,r;for(r=[],e=0,i=(n=this.files).length;e<i;e++)(t=n[e]).accepted||r.push(t);return r},n.prototype.getFilesWithStatus=function(t){var e,i,n,r,o;for(o=[],i=0,n=(r=this.files).length;i<n;i++)(e=r[i]).status===t&&o.push(e);return o},n.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(n.QUEUED)},n.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(n.UPLOADING)},n.prototype.getAddedFiles=function(){return this.getFilesWithStatus(n.ADDED)},n.prototype.getActiveFiles=function(){var t,e,i,r,o;for(o=[],e=0,i=(r=this.files).length;e<i;e++)(t=r[e]).status!==n.UPLOADING&&t.status!==n.QUEUED||o.push(t);return o},n.prototype.init=function(){var t,e,i,r,o,s,a;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(n.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&(a=function(t){return function(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null==t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!=t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!=t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",document.querySelector(t.options.hiddenInputContainer).appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var e,i,n,r;if((i=t.hiddenFileInput.files).length)for(n=0,r=i.length;n<r;n++)e=i[n],t.addFile(e);return t.emit("addedfiles",i),a()})}}(this))(),this.URL=null!=(o=window.URL)?o:window.webkitURL,e=0,i=(s=this.events).length;e<i;e++)t=s[e],this.on(t,this.options[t]);return this.on("uploadprogress",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("canceled",function(t){return function(e){return t.emit("complete",e)}}(this)),this.on("complete",function(t){return function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout(function(){return t.emit("queuecomplete")},0)}}(this)),r=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(t){return function(e){return t.emit("dragstart",e)}}(this),dragenter:function(t){return function(e){return r(e),t.emit("dragenter",e)}}(this),dragover:function(t){return function(e){var i;try{i=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",r(e),t.emit("dragover",e)}}(this),dragleave:function(t){return function(e){return t.emit("dragleave",e)}}(this),drop:function(t){return function(e){return r(e),t.drop(e)}}(this),dragend:function(t){return function(e){return t.emit("dragend",e)}}(this)}}],this.clickableElements.forEach(function(t){return function(e){return t.listeners.push({element:e,events:{click:function(i){return(e!==t.element||i.target===t.element||n.elementInside(i.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},n.prototype.destroy=function(){var t;return this.disable(),this.removeAllFiles(!0),(null!=(t=this.hiddenFileInput)?t.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,n.instances.splice(n.instances.indexOf(this),1)},n.prototype.updateTotalUploadProgress=function(){var t,e,i,n,r,o,s;if(o=0,r=0,this.getActiveFiles().length){for(e=0,i=(n=this.getActiveFiles()).length;e<i;e++)o+=(t=n[e]).upload.bytesSent,r+=t.upload.total;s=100*o/r}else s=100;return this.emit("totaluploadprogress",s,r,o)},n.prototype._getParamName=function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")},n.prototype._renameFile=function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)},n.prototype.getFallbackForm=function(){var t,e,i,r;return(t=this.getExistingFallback())?t:(i='<div class="dz-fallback">',this.options.dictFallbackText&&(i+="<p>"+this.options.dictFallbackText+"</p>"),i+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>',e=n.createElement(i),"FORM"!==this.element.tagName?(r=n.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>')).appendChild(e):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=r?r:e)},n.prototype.getExistingFallback=function(){var t,e,i,n,r,o;for(e=function(t){var e,i,n;for(i=0,n=t.length;i<n;i++)if(e=t[i],/(^| )fallback($| )/.test(e.className))return e},i=0,n=(r=["div","form"]).length;i<n;i++)if(o=r[i],t=e(this.element.getElementsByTagName(o)))return t},n.prototype.setupEventListeners=function(){var t,e,i,n,r,o,s;for(s=[],i=0,n=(o=this.listeners).length;i<n;i++)t=o[i],s.push(function(){var i,n;i=t.events,n=[];for(e in i)r=i[e],n.push(t.element.addEventListener(e,r,!1));return n}());return s},n.prototype.removeEventListeners=function(){var t,e,i,n,r,o,s;for(s=[],i=0,n=(o=this.listeners).length;i<n;i++)t=o[i],s.push(function(){var i,n;i=t.events,n=[];for(e in i)r=i[e],n.push(t.element.removeEventListener(e,r,!1));return n}());return s},n.prototype.disable=function(){var t,e,i,n,r;for(this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),r=[],e=0,i=(n=this.files).length;e<i;e++)t=n[e],r.push(this.cancelUpload(t));return r},n.prototype.enable=function(){return this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()},n.prototype.filesize=function(t){var e,i,n,r,o,s,a,l;if(o=0,s="b",t>0){for(i=n=0,r=(l=["tb","gb","mb","kb","b"]).length;n<r;i=++n)if(a=l[i],e=Math.pow(this.options.filesizeBase,4-i)/10,t>=e){o=t/Math.pow(this.options.filesizeBase,4-i),s=a;break}o=Math.round(10*o)/10}return"<strong>"+o+"</strong> "+this.options.dictFileSizeUnits[s]},n.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},n.prototype.drop=function(t){var e,i;t.dataTransfer&&(this.emit("drop",t),e=t.dataTransfer.files,this.emit("addedfiles",e),e.length&&((i=t.dataTransfer.items)&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)))},n.prototype.paste=function(t){var e,i;if(null!=(null!=t&&null!=(i=t.clipboardData)?i.items:void 0))return this.emit("paste",t),(e=t.clipboardData.items).length?this._addFilesFromItems(e):void 0},n.prototype.handleFiles=function(t){var e,i,n,r;for(r=[],i=0,n=t.length;i<n;i++)e=t[i],r.push(this.addFile(e));return r},n.prototype._addFilesFromItems=function(t){var e,i,n,r,o;for(o=[],n=0,r=t.length;n<r;n++)null!=(i=t[n]).webkitGetAsEntry&&(e=i.webkitGetAsEntry())?e.isFile?o.push(this.addFile(i.getAsFile())):e.isDirectory?o.push(this._addFilesFromDirectory(e,e.name)):o.push(void 0):null!=i.getAsFile&&(null==i.kind||"file"===i.kind)?o.push(this.addFile(i.getAsFile())):o.push(void 0);return o},n.prototype._addFilesFromDirectory=function(t,e){var i,n,r;return i=t.createReader(),n=function(t){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(t):void 0},(r=function(t){return function(){return i.readEntries(function(i){var n,o,s;if(i.length>0){for(o=0,s=i.length;o<s;o++)(n=i[o]).isFile?n.file(function(i){if(!t.options.ignoreHiddenFiles||"."!==i.name.substring(0,1))return i.fullPath=e+"/"+i.name,t.addFile(i)}):n.isDirectory&&t._addFilesFromDirectory(n,e+"/"+n.name);r()}return null},n)}}(this))()},n.prototype.accept=function(t,e){return t.size>1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)},n.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=n.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){return function(i){return i?(t.accepted=!1,e._errorProcessing([t],i)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}}(this))},n.prototype.enqueueFiles=function(t){var e,i,n;for(i=0,n=t.length;i<n;i++)e=t[i],this.enqueueFile(e);return null},n.prototype.enqueueFile=function(t){if(t.status!==n.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=n.QUEUED,this.options.autoProcessQueue)return setTimeout(function(t){return function(){return t.processQueue()}}(this),0)},n.prototype._thumbnailQueue=[],n.prototype._processingThumbnail=!1,n.prototype._enqueueThumbnail=function(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(t){return function(){return t._processThumbnailQueue()}}(this),0)},n.prototype._processThumbnailQueue=function(){var t;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length)return this._processingThumbnail=!0,t=this._thumbnailQueue.shift(),this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(e){return function(i){return e.emit("thumbnail",t,i),e._processingThumbnail=!1,e._processThumbnailQueue()}}(this))},n.prototype.removeFile=function(t){if(t.status===n.UPLOADING&&this.cancelUpload(t),this.files=l(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")},n.prototype.removeAllFiles=function(t){var e,i,r,o;for(null==t&&(t=!1),i=0,r=(o=this.files.slice()).length;i<r;i++)((e=o[i]).status!==n.UPLOADING||t)&&this.removeFile(e);return null},n.prototype.resizeImage=function(t,e,r,o,s){return this.createThumbnail(t,e,r,o,!1,function(e){return function(r,o){var a,l;return null===o?s(t):(null==(a=e.options.resizeMimeType)&&(a=t.type),l=o.toDataURL(a,e.options.resizeQuality),"image/jpeg"!==a&&"image/jpg"!==a||(l=i.restore(t.dataURL,l)),s(n.dataURItoBlob(l)))}}(this))},n.prototype.createThumbnail=function(t,e,i,n,r,o){var s;return s=new FileReader,s.onload=function(a){return function(){t.dataURL=s.result;{if("image/svg+xml"!==t.type)return a.createThumbnailFromUrl(t,e,i,n,r,o);null!=o&&o(s.result)}}}(this),s.readAsDataURL(t)},n.prototype.createThumbnailFromUrl=function(t,e,i,n,r,o,a){var l;return l=document.createElement("img"),a&&(l.crossOrigin=a),l.onload=function(a){return function(){var c;return c=function(t){return t(1)},"undefined"!=typeof EXIF&&null!==EXIF&&r&&(c=function(t){return EXIF.getData(l,function(){return t(EXIF.getTag(this,"Orientation"))})}),c(function(r){var c,h,d,u,p,f,m,g;switch(t.width=l.width,t.height=l.height,m=a.options.resize.call(a,t,e,i,n),c=document.createElement("canvas"),h=c.getContext("2d"),c.width=m.trgWidth,c.height=m.trgHeight,r>4&&(c.width=m.trgHeight,c.height=m.trgWidth),r){case 2:h.translate(c.width,0),h.scale(-1,1);break;case 3:h.translate(c.width,c.height),h.rotate(Math.PI);break;case 4:h.translate(0,c.height),h.scale(1,-1);break;case 5:h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:h.rotate(.5*Math.PI),h.translate(0,-c.height);break;case 7:h.rotate(.5*Math.PI),h.translate(c.width,-c.height),h.scale(-1,1);break;case 8:h.rotate(-.5*Math.PI),h.translate(-c.width,0)}if(s(h,l,null!=(d=m.srcX)?d:0,null!=(u=m.srcY)?u:0,m.srcWidth,m.srcHeight,null!=(p=m.trgX)?p:0,null!=(f=m.trgY)?f:0,m.trgWidth,m.trgHeight),g=c.toDataURL("image/png"),null!=o)return o(g,c)})}}(this),null!=o&&(l.onerror=o),l.src=t.dataURL},n.prototype.processQueue=function(){var t,e,i,n;if(e=this.options.parallelUploads,i=this.getUploadingFiles().length,t=i,!(i>=e)&&(n=this.getQueuedFiles()).length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,e-i));for(;t<e;){if(!n.length)return;this.processFile(n.shift()),t++}}},n.prototype.processFile=function(t){return this.processFiles([t])},n.prototype.processFiles=function(t){var e,i,r;for(i=0,r=t.length;i<r;i++)(e=t[i]).processing=!0,e.status=n.UPLOADING,this.emit("processing",e);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)},n.prototype._getFilesWithXhr=function(t){var e;return function(){var i,n,r,o;for(o=[],i=0,n=(r=this.files).length;i<n;i++)(e=r[i]).xhr===t&&o.push(e);return o}.call(this)},n.prototype.cancelUpload=function(t){var e,i,r,o,s,a,l;if(t.status===n.UPLOADING){for(r=0,s=(i=this._getFilesWithXhr(t.xhr)).length;r<s;r++)(e=i[r]).status=n.CANCELED;for(t.xhr.abort(),o=0,a=i.length;o<a;o++)e=i[o],this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else(l=t.status)!==n.ADDED&&l!==n.QUEUED||(t.status=n.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()},o=function(){var t,e;return e=arguments[0],t=2<=arguments.length?c.call(arguments,1):[],"function"==typeof e?e.apply(this,t):e},n.prototype.uploadFile=function(t){return this.uploadFiles([t])},n.prototype.uploadFiles=function(t){var e,i,s,a,l,c,h,d,u,p,f,m,g,v,y,b,_,x,w,k,S,C,D,T,A,M,E,P,I,O,N,F,L,j,R,$;for($=new XMLHttpRequest,g=0,_=t.length;g<_;g++)(s=t[g]).xhr=$;C=o(this.options.method,t),j=o(this.options.url,t),$.open(C,j,!0),$.timeout=o(this.options.timeout,t),$.withCredentials=!!this.options.withCredentials,N=null,l=function(e){return function(){var i,n,r;for(r=[],i=0,n=t.length;i<n;i++)s=t[i],r.push(e._errorProcessing(t,N||e.options.dictResponseError.replace("{{statusCode}}",$.status),$));return r}}(this),L=function(e){return function(i){var n,r,o,a,l,c,h,d,u;if(null!=i)for(d=100*i.loaded/i.total,r=0,a=t.length;r<a;r++)(s=t[r]).upload.progress=d,s.upload.total=i.total,s.upload.bytesSent=i.loaded;else{for(n=!0,d=100,o=0,l=t.length;o<l;o++)100===(s=t[o]).upload.progress&&s.upload.bytesSent===s.upload.total||(n=!1),s.upload.progress=d,s.upload.bytesSent=s.upload.total;if(n)return}for(u=[],h=0,c=t.length;h<c;h++)s=t[h],u.push(e.emit("uploadprogress",s,d,s.upload.bytesSent));return u}}(this),$.onload=function(e){return function(i){var r;if(t[0].status!==n.CANCELED&&4===$.readyState){if("arraybuffer"!==$.responseType&&"blob"!==$.responseType&&(N=$.responseText,$.getResponseHeader("content-type")&&~$.getResponseHeader("content-type").indexOf("application/json")))try{N=JSON.parse(N)}catch(t){i=t,N="Invalid JSON response from server."}return L(),200<=(r=$.status)&&r<300?e._finished(t,N,i):l()}}}(this),$.onerror=function(){if(t[0].status!==n.CANCELED)return l()},(null!=(A=$.upload)?A:$).onprogress=L,d={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&r(d,this.options.headers);for(c in d)(h=d[c])&&$.setRequestHeader(c,h);if(a=new FormData,this.options.params){M=this.options.params;for(y in M)R=M[y],a.append(y,R)}for(v=0,x=t.length;v<x;v++)s=t[v],this.emit("sending",s,$,a);if(this.options.uploadMultiple&&this.emit("sendingmultiple",t,$,a),"FORM"===this.element.tagName)for(b=0,w=(E=this.element.querySelectorAll("input, textarea, select, button")).length;b<w;b++)if(p=E[b],f=p.getAttribute("name"),m=p.getAttribute("type"),"SELECT"===p.tagName&&p.hasAttribute("multiple"))for(S=0,k=(P=p.options).length;S<k;S++)(T=P[S]).selected&&a.append(f,T.value);else(!m||"checkbox"!==(I=m.toLowerCase())&&"radio"!==I||p.checked)&&a.append(f,p.value);for(e=0,F=[],u=D=0,O=t.length-1;0<=O?D<=O:D>=O;u=0<=O?++D:--D)i=function(i){return function(n,r,o){return function(n){if(a.append(r,n,o),++e===t.length)return i.submitRequest($,a,t)}}}(this),F.push(this.options.transformFile.call(this,t[u],i(t[u],this._getParamName(u),t[u].upload.filename)));return F},n.prototype.submitRequest=function(t,e,i){return t.send(e)},n.prototype._finished=function(t,e,i){var r,o,s;for(o=0,s=t.length;o<s;o++)(r=t[o]).status=n.SUCCESS,this.emit("success",r,e,i),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("successmultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()},n.prototype._errorProcessing=function(t,e,i){var r,o,s;for(o=0,s=t.length;o<s;o++)(r=t[o]).status=n.ERROR,this.emit("error",r,e,i),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("errormultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()},n}()).version="5.1.1",t.options={},t.optionsForElement=function(e){return e.getAttribute("id")?t.options[n(e.getAttribute("id"))]:void 0},t.instances=[],t.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},t.autoDiscover=!0,t.discover=function(){var e,i,n,r,o,s;for(document.querySelectorAll?n=document.querySelectorAll(".dropzone"):(n=[],(e=function(t){var e,i,r,o;for(o=[],i=0,r=t.length;i<r;i++)e=t[i],/(^| )dropzone($| )/.test(e.className)?o.push(n.push(e)):o.push(void 0);return o})(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))),s=[],r=0,o=n.length;r<o;r++)i=n[r],!1!==t.optionsForElement(i)?s.push(new t(i)):s.push(void 0);return s},t.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],t.isBrowserSupported=function(){var e,i,n,r;if(e=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(i=0,n=(r=t.blacklistedBrowsers).length;i<n;i++)r[i].test(navigator.userAgent)&&(e=!1);else e=!1;else e=!1;return e},t.dataURItoBlob=function(t){var e,i,n,r,o,s,a;for(i=atob(t.split(",")[1]),s=t.split(",")[0].split(":")[1].split(";")[0],e=new ArrayBuffer(i.length),r=new Uint8Array(e),n=o=0,a=i.length;0<=a?o<=a:o>=a;n=0<=a?++o:--o)r[n]=i.charCodeAt(n);return new Blob([e],{type:s})},l=function(t,e){var i,n,r,o;for(o=[],n=0,r=t.length;n<r;n++)(i=t[n])!==e&&o.push(i);return o},n=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})},t.createElement=function(t){var e;return e=document.createElement("div"),e.innerHTML=t,e.childNodes[0]},t.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},t.getElement=function(t,e){var i;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},t.getElements=function(t,e){var i,n,r,o,s,a,l;if(t instanceof Array){n=[];try{for(r=0,s=t.length;r<s;r++)i=t[r],n.push(this.getElement(i,e))}catch(t){t,n=null}}else if("string"==typeof t)for(n=[],o=0,a=(l=document.querySelectorAll(t)).length;o<a;o++)i=l[o],n.push(i);else null!=t.nodeType&&(n=[t]);if(null==n||!n.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return n},t.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},t.isValidFile=function(t,e){var i,n,r,o,s;if(!e)return!0;for(e=e.split(","),i=(o=t.type).replace(/\/.*$/,""),n=0,r=e.length;n<r;n++)if(s=e[n],"."===(s=s.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(s.toLowerCase(),t.name.length-s.length))return!0}else if(/\/\*$/.test(s)){if(i===s.replace(/\/.*$/,""))return!0}else if(o===s)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new t(this,e)})}),"undefined"!=typeof module&&null!==module?module.exports=t:window.Dropzone=t,t.ADDED="added",t.QUEUED="queued",t.ACCEPTED=t.QUEUED,t.UPLOADING="uploading",t.PROCESSING=t.UPLOADING,t.CANCELED="canceled",t.ERROR="error",t.SUCCESS="success",o=function(t){var e,i,n,r,o,s,a,l;for(t.naturalWidth,o=t.naturalHeight,(e=document.createElement("canvas")).width=1,e.height=o,(i=e.getContext("2d")).drawImage(t,0,0),n=i.getImageData(1,0,1,o).data,l=0,r=o,s=o;s>l;)0===n[4*(s-1)+3]?r=s:l=s,s=r+l>>1;return 0===(a=s/o)?1:a},s=function(t,e,i,n,r,s,a,l,c,h){var d;return d=o(e),t.drawImage(e,i,n,r,s,a,l,c,h/d)},i=function(){function t(){}return t.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t.encode64=function(t){var e,i,n,r,o,s,a,l,c;for(c="",e=void 0,i=void 0,n="",r=void 0,o=void 0,s=void 0,a="",l=0;;)if(e=t[l++],i=t[l++],n=t[l++],r=e>>2,o=(3&e)<<4|i>>4,s=(15&i)<<2|n>>6,a=63&n,isNaN(i)?s=a=64:isNaN(n)&&(a=64),c=c+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(a),e=i=n="",r=o=s=a="",!(l<t.length))break;return c},t.restore=function(t,e){var i,n,r;return t.match("data:image/jpeg;base64,")?(n=this.decode64(t.replace("data:image/jpeg;base64,","")),r=this.slice2Segments(n),i=this.exifManipulation(e,r),"data:image/jpeg;base64,"+this.encode64(i)):e},t.exifManipulation=function(t,e){var i,n;return i=this.getExifArray(e),n=this.insertExif(t,i),new Uint8Array(n)},t.getExifArray=function(t){var e,i;for(e=void 0,i=0;i<t.length;){if(255===(e=t[i])[0]&225===e[1])return e;i++}return[]},t.insertExif=function(t,e){var i,n,r,o,s,a;return o=t.replace("data:image/jpeg;base64,",""),r=this.decode64(o),a=r.indexOf(255,3),s=r.slice(0,a),n=r.slice(a),i=s,i=i.concat(e),i=i.concat(n)},t.slice2Segments=function(t){var e,i,n,r;for(i=0,r=[];;){if(255===t[i]&218===t[i+1])break;if(255===t[i]&216===t[i+1]?i+=2:(e=i+(256*t[i+2]+t[i+3])+2,n=t.slice(i,e),r.push(n),i=e),i>t.length)break}return r},t.decode64=function(t){var e,i,n,r,o,s,a,l,c;for("",i=void 0,n=void 0,r="",o=void 0,s=void 0,a=void 0,l="",c=0,e=[],/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warning("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");;)if(o=this.KEY_STR.indexOf(t.charAt(c++)),s=this.KEY_STR.indexOf(t.charAt(c++)),a=this.KEY_STR.indexOf(t.charAt(c++)),l=this.KEY_STR.indexOf(t.charAt(c++)),i=o<<2|s>>4,n=(15&s)<<4|a>>2,r=(3&a)<<6|l,e.push(i),64!==a&&e.push(n),64!==l&&e.push(r),i=n=r="",o=s=a=l="",!(c<t.length))break;return e},t}(),r=function(t,e){var i,n,r,o,s,a,l,c,h;if(r=!1,h=!0,n=t.document,c=n.documentElement,i=n.addEventListener?"addEventListener":"attachEvent",l=n.addEventListener?"removeEventListener":"detachEvent",a=n.addEventListener?"":"on",o=function(i){if("readystatechange"!==i.type||"complete"===n.readyState)return("load"===i.type?t:n)[l](a+i.type,o,!1),!r&&(r=!0)?e.call(t,i.type||i):void 0},s=function(){try{c.doScroll("left")}catch(t){return t,void setTimeout(s,50)}return o("poll")},"complete"!==n.readyState){if(n.createEventObject&&c.doScroll){try{h=!t.frameElement}catch(t){}h&&s()}return n[i](a+"DOMContentLoaded",o,!1),n[i](a+"readystatechange",o,!1),t[i](a+"load",o,!1)}},t._autoDiscoverFunction=function(){if(t.autoDiscover)return t.discover()},r(window,t._autoDiscoverFunction)}.call(this),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(window.jQuery)}(function($){"use strict";var isSupportAmd="function"==typeof define&&define.amd,isFontInstalled=function(t){var e="Comic Sans MS"===t?"Courier New":"Comic Sans MS",i=$("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),n=i.css("fontFamily",e).width(),r=i.css("fontFamily",t+","+e).width();return i.remove(),n!==r},userAgent=navigator.userAgent,isMSIE=/MSIE|Trident/i.test(userAgent),browserVersion;if(isMSIE){var matches=/MSIE (\d+[.]\d+)/.exec(userAgent);matches&&(browserVersion=parseFloat(matches[1])),matches=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(userAgent),matches&&(browserVersion=parseFloat(matches[1]))}var isEdge=/Edge\/\d+/.test(userAgent),hasCodeMirror=!!window.CodeMirror;if(!hasCodeMirror&&isSupportAmd&&"undefined"!=typeof require)if(void 0!==require.resolve)try{require.resolve("codemirror"),hasCodeMirror=!0}catch(t){}else void 0!==eval("require").specified&&(hasCodeMirror=eval("require").specified("codemirror"));var isSupportTouch="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,agent={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:isMSIE,isEdge:isEdge,isFF:!isEdge&&/firefox/i.test(userAgent),isPhantom:/PhantomJS/i.test(userAgent),isWebkit:!isEdge&&/webkit/i.test(userAgent),isChrome:!isEdge&&/chrome/i.test(userAgent),isSafari:!isEdge&&/safari/i.test(userAgent),browserVersion:browserVersion,jqueryVersion:parseFloat($.fn.jquery),isSupportAmd:isSupportAmd,isSupportTouch:isSupportTouch,hasCodeMirror:hasCodeMirror,isFontInstalled:isFontInstalled,isW3CRangeSupport:!!document.createRange},func=function(){var t=0;return{eq:function(t){return function(e){return t===e}},eq2:function(t,e){return t===e},peq2:function(t){return function(e,i){return e[t]===i[t]}},ok:function(){return!0},fail:function(){return!1},self:function(t){return t},not:function(t){return function(){return!t.apply(t,arguments)}},and:function(t,e){return function(i){return t(i)&&e(i)}},invoke:function(t,e){return function(){return t[e].apply(t,arguments)}},uniqueId:function(e){var i=++t+"";return e?e+i:i},rect2bnd:function(t){var e=$(document);return{top:t.top+e.scrollTop(),left:t.left+e.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e},namespaceToCamel:function(t,e){return(e=e||"")+t.split(".").map(function(t){return t.substring(0,1).toUpperCase()+t.substring(1)}).join("")},debounce:function(t,e,i){var n;return function(){var r=this,o=arguments,s=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||t.apply(r,o)},e),s&&t.apply(r,o)}}}}(),list=function(){var t=function(t){return t[0]},e=function(t){return t[t.length-1]},i=function(t){return t.slice(1)},n=function(t,e){return $.inArray(e,t)},r=function(t,e){return-1!==n(t,e)};return{head:t,last:e,initial:function(t){return t.slice(0,t.length-1)},tail:i,prev:function(t,e){var i=n(t,e);return-1===i?null:t[i-1]},next:function(t,e){var i=n(t,e);return-1===i?null:t[i+1]},find:function(t,e){for(var i=0,n=t.length;i<n;i++){var r=t[i];if(e(r))return r}},contains:r,all:function(t,e){for(var i=0,n=t.length;i<n;i++)if(!e(t[i]))return!1;return!0},sum:function(t,e){return e=e||func.self,t.reduce(function(t,i){return t+e(i)},0)},from:function(t){for(var e=[],i=-1,n=t.length;++i<n;)e[i]=t[i];return e},isEmpty:function(t){return!t||!t.length},clusterBy:function(n,r){return n.length?i(n).reduce(function(t,i){var n=e(t);return r(e(n),i)?n[n.length]=i:t[t.length]=[i],t},[[t(n)]]):[]},compact:function(t){for(var e=[],i=0,n=t.length;i<n;i++)t[i]&&e.push(t[i]);return e},unique:function(t){for(var e=[],i=0,n=t.length;i<n;i++)r(e,t[i])||e.push(t[i]);return e}}}(),NBSP_CHAR=String.fromCharCode(160),ZERO_WIDTH_NBSP_CHAR="\ufeff",dom=function(){var t=function(t){return t&&$(t).hasClass("note-editable")},e=function(t){return t=t.toUpperCase(),function(e){return e&&e.nodeName.toUpperCase()===t}},i=function(t){return t&&3===t.nodeType},n=function(t){return t&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT/.test(t.nodeName.toUpperCase())},r=function(e){return!t(e)&&(e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase()))},o=e("PRE"),s=e("LI"),a=e("TABLE"),l=e("DATA"),c=function(t){return!(f(t)||h(t)||d(t)||r(t)||a(t)||p(t)||l(t))},h=function(t){return t&&/^UL|^OL/.test(t.nodeName.toUpperCase())},d=e("HR"),u=function(t){return t&&/^TD|^TH/.test(t.nodeName.toUpperCase())},p=e("BLOCKQUOTE"),f=function(e){return u(e)||p(e)||t(e)},m=e("A"),g=e("BODY"),v=agent.isMSIE&&agent.browserVersion<11?"&nbsp;":"<br>",y=function(t){return i(t)?t.nodeValue.length:t?t.childNodes.length:0},b=function(t){var e=y(t);return 0===e||(!i(t)&&1===e&&t.innerHTML===v||!(!list.all(t.childNodes,i)||""!==t.innerHTML))},_=function(t){n(t)||y(t)||(t.innerHTML=v)},x=function(e,i){for(;e;){if(i(e))return e;if(t(e))break;e=e.parentNode}return null},w=function(e,i){i=i||func.fail;var n=[];return x(e,function(e){return t(e)||n.push(e),i(e)}),n},k=function(t,e){e=e||func.fail;for(var i=[];t&&!e(t);)i.push(t),t=t.nextSibling;return i},S=function(t,e){var i=e.nextSibling,n=e.parentNode;return i?n.insertBefore(t,i):n.appendChild(t),t},C=function(t,e){return $.each(e,function(e,i){t.appendChild(i)}),t},D=function(t){return 0===t.offset},T=function(t){return t.offset===y(t.node)},A=function(t){return D(t)||T(t)},M=function(t,e){for(;t&&t!==e;){if(0!==P(t))return!1;t=t.parentNode}return!0},E=function(t,e){if(!e)return!1;for(;t&&t!==e;){if(P(t)!==y(t.parentNode)-1)return!1;t=t.parentNode}return!0},P=function(t){for(var e=0;t=t.previousSibling;)e+=1;return e},I=function(t){return!!(t&&t.childNodes&&t.childNodes.length)},O=function(e,i){var n,r;if(0===e.offset){if(t(e.node))return null;n=e.node.parentNode,r=P(e.node)}else I(e.node)?(n=e.node.childNodes[e.offset-1],r=y(n)):(n=e.node,r=i?0:e.offset-1);return{node:n,offset:r}},N=function(e,i){var n,r;if(y(e.node)===e.offset){if(t(e.node))return null;n=e.node.parentNode,r=P(e.node)+1}else I(e.node)?(n=e.node.childNodes[e.offset],r=0):(n=e.node,r=i?y(e.node):e.offset+1);return{node:n,offset:r}},F=function(t,e){return t.node===e.node&&t.offset===e.offset},L=function(t,e){var n=e&&e.isSkipPaddingBlankHTML,r=e&&e.isNotSplitEdgePoint;if(A(t)&&(i(t.node)||r)){if(D(t))return t.node;if(T(t))return t.node.nextSibling}if(i(t.node))return t.node.splitText(t.offset);var o=t.node.childNodes[t.offset],s=S(t.node.cloneNode(!1),t.node);return C(s,k(o)),n||(_(t.node),_(s)),s},j=function(t,e,i){var n=w(e.node,func.eq(t));return n.length?1===n.length?L(e,i):n.reduce(function(t,n){return t===e.node&&(t=L(e,i)),L({node:n,offset:t?dom.position(t):y(n)},i)}):null},R=function(t){return document.createElement(t)},H=function(t,e){if(t&&t.parentNode){if(t.removeNode)return t.removeNode(e);var i=t.parentNode;if(!e){var n,r,o=[];for(n=0,r=t.childNodes.length;n<r;n++)o.push(t.childNodes[n]);for(n=0,r=o.length;n<r;n++)i.insertBefore(o[n],t)}i.removeChild(t)}},B=e("TEXTAREA"),z=function(t,e){var i=B(t[0])?t.val():t.html();return e?i.replace(/[\n\r]/g,""):i};return{NBSP_CHAR:NBSP_CHAR,ZERO_WIDTH_NBSP_CHAR:ZERO_WIDTH_NBSP_CHAR,blank:v,emptyPara:"<p>"+v+"</p>",makePredByNodeName:e,isEditable:t,isControlSizing:function(t){return t&&$(t).hasClass("note-control-sizing")},isText:i,isElement:function(t){return t&&1===t.nodeType},isVoid:n,isPara:r,isPurePara:function(t){return r(t)&&!s(t)},isHeading:function(t){return t&&/^H[1-7]/.test(t.nodeName.toUpperCase())},isInline:c,isBlock:func.not(c),isBodyInline:function(t){return c(t)&&!x(t,r)},isBody:g,isParaInline:function(t){return c(t)&&!!x(t,r)},isPre:o,isList:h,isTable:a,isData:l,isCell:u,isBlockquote:p,isBodyContainer:f,isAnchor:m,isDiv:e("DIV"),isLi:s,isBR:e("BR"),isSpan:e("SPAN"),isB:e("B"),isU:e("U"),isS:e("S"),isI:e("I"),isImg:e("IMG"),isTextarea:B,isEmpty:b,isEmptyAnchor:func.and(m,b),isClosestSibling:function(t,e){return t.nextSibling===e||t.previousSibling===e},withClosestSiblings:function(t,e){e=e||func.ok;var i=[];return t.previousSibling&&e(t.previousSibling)&&i.push(t.previousSibling),i.push(t),t.nextSibling&&e(t.nextSibling)&&i.push(t.nextSibling),i},nodeLength:y,isLeftEdgePoint:D,isRightEdgePoint:T,isEdgePoint:A,isLeftEdgeOf:M,isRightEdgeOf:E,isLeftEdgePointOf:function(t,e){return D(t)&&M(t.node,e)},isRightEdgePointOf:function(t,e){return T(t)&&E(t.node,e)},prevPoint:O,nextPoint:N,isSamePoint:F,isVisiblePoint:function(t){if(i(t.node)||!I(t.node)||b(t.node))return!0;var e=t.node.childNodes[t.offset-1],r=t.node.childNodes[t.offset];return!(e&&!n(e)||r&&!n(r))},prevPointUntil:function(t,e){for(;t;){if(e(t))return t;t=O(t)}return null},nextPointUntil:function(t,e){for(;t;){if(e(t))return t;t=N(t)}return null},isCharPoint:function(t){if(!i(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return e&&" "!==e&&e!==NBSP_CHAR},walkPoint:function(t,e,i,n){for(var r=t;r&&(i(r),!F(r,e));){var o=n&&t.node!==r.node&&e.node!==r.node;r=N(r,o)}},ancestor:x,singleChildAncestor:function(e,i){for(e=e.parentNode;e&&1===y(e);){if(i(e))return e;if(t(e))break;e=e.parentNode}return null},listAncestor:w,lastAncestor:function(t,e){var i=w(t);return list.last(i.filter(e))},listNext:k,listPrev:function(t,e){e=e||func.fail;for(var i=[];t&&!e(t);)i.push(t),t=t.previousSibling;return i},listDescendant:function(t,e){var i=[];return e=e||func.ok,function n(r){t!==r&&e(r)&&i.push(r);for(var o=0,s=r.childNodes.length;o<s;o++)n(r.childNodes[o])}(t),i},commonAncestor:function(t,e){for(var i=w(t),n=e;n;n=n.parentNode)if($.inArray(n,i)>-1)return n;return null},wrap:function(t,e){var i=t.parentNode,n=$("<"+e+">")[0];return i.insertBefore(n,t),n.appendChild(t),n},insertAfter:S,appendChildNodes:C,position:P,hasChildren:I,makeOffsetPath:function(t,e){return w(e,func.eq(t)).map(P).reverse()},fromOffsetPath:function(t,e){for(var i=t,n=0,r=e.length;n<r;n++)i=i.childNodes.length<=e[n]?i.childNodes[i.childNodes.length-1]:i.childNodes[e[n]];return i},splitTree:j,splitPoint:function(t,e){var i,n,o=e?r:f,s=w(t.node,o),a=list.last(s)||t.node;o(a)?(i=s[s.length-2],n=a):n=(i=a).parentNode;var l=i&&j(i,t,{isSkipPaddingBlankHTML:e,isNotSplitEdgePoint:e});return l||n!==t.node||(l=t.node.childNodes[t.offset]),{rightNode:l,container:n}},create:R,createText:function(t){return document.createTextNode(t)},remove:H,removeWhile:function(e,i){for(;e&&!t(e)&&i(e);){var n=e.parentNode;H(e),e=n}},replace:function(t,e){if(t.nodeName.toUpperCase()===e.toUpperCase())return t;var i=R(e);return t.style.cssText&&(i.style.cssText=t.style.cssText),C(i,list.from(t.childNodes)),S(i,t),H(t),i},html:function(t,e){var i=z(t);if(e){var n=/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g;i=i.replace(n,function(t,e,i){i=i.toUpperCase();var n=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(i)&&!!e,r=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(i);return t+(n||r?"\n":"")}),i=$.trim(i)}return i},value:z,posFromPlaceholder:function(t){var e=$(t),i=e.offset(),n=e.outerHeight(!0);return{left:i.left,top:i.top+n}},attachEvents:function(t,e){Object.keys(e).forEach(function(i){t.on(i,e[i])})},detachEvents:function(t,e){Object.keys(e).forEach(function(i){t.off(i,e[i])})},isCustomStyleTag:function(t){return t&&!dom.isText(t)&&list.contains(t.classList,"note-styletag")}}}(),Context=function(t,e){var i=this,n=$.summernote.ui;return this.memos={},this.modules={},this.layoutInfo={},this.options=e,this.initialize=function(){return this.layoutInfo=n.createLayout(t,e),this._initialize(),t.hide(),this},this.destroy=function(){this._destroy(),t.removeData("summernote"),n.removeLayout(t,this.layoutInfo)},this.reset=function(){var t=i.isDisabled();this.code(dom.emptyPara),this._destroy(),this._initialize(),t&&i.disable()},this._initialize=function(){var t=$.extend({},this.options.buttons);Object.keys(t).forEach(function(e){i.memo("button."+e,t[e])});var e=$.extend({},this.options.modules,$.summernote.plugins||{});Object.keys(e).forEach(function(t){i.module(t,e[t],!0)}),Object.keys(this.modules).forEach(function(t){i.initializeModule(t)})},this._destroy=function(){Object.keys(this.modules).reverse().forEach(function(t){i.removeModule(t)}),Object.keys(this.memos).forEach(function(t){i.removeMemo(t)}),this.triggerEvent("destroy",this)},this.code=function(e){var i=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),i?this.layoutInfo.codable.val():this.layoutInfo.editable.html();i?this.layoutInfo.codable.val(e):this.layoutInfo.editable.html(e),t.val(e),this.triggerEvent("change",e)},this.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},this.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1)},this.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)},this.triggerEvent=function(){var e=list.head(arguments),i=list.tail(list.from(arguments)),n=this.options.callbacks[func.namespaceToCamel(e,"on")];n&&n.apply(t[0],i),t.trigger("summernote."+e,i)},this.initializeModule=function(e){var i=this.modules[e];i.shouldInitialize=i.shouldInitialize||func.ok,i.shouldInitialize()&&(i.initialize&&i.initialize(),i.events&&dom.attachEvents(t,i.events))},this.module=function(t,e,i){if(1===arguments.length)return this.modules[t];this.modules[t]=new e(this),i||this.initializeModule(t)},this.removeModule=function(e){var i=this.modules[e];i.shouldInitialize()&&(i.events&&dom.detachEvents(t,i.events),i.destroy&&i.destroy()),delete this.modules[e]},this.memo=function(t,e){if(1===arguments.length)return this.memos[t];this.memos[t]=e},this.removeMemo=function(t){this.memos[t]&&this.memos[t].destroy&&this.memos[t].destroy(),delete this.memos[t]},this.createInvokeHandlerAndUpdateState=function(t,e){return function(n){i.createInvokeHandler(t,e)(n),i.invoke("buttons.updateCurrentStyle")}},this.createInvokeHandler=function(t,e){return function(n){n.preventDefault();var r=$(n.target);i.invoke(t,e||r.closest("[data-value]").data("value"),r)}},this.invoke=function(){var t=list.head(arguments),e=list.tail(list.from(arguments)),i=t.split("."),n=i.length>1,r=n&&list.head(i),o=n?list.last(i):list.head(i),s=this.modules[r||"editor"];return!r&&this[o]?this[o].apply(this,e):s&&s[o]&&s.shouldInitialize()?s[o].apply(s,e):void 0},this.initialize()};$.fn.extend({summernote:function(){var t=$.type(list.head(arguments)),e="string"===t,i="object"===t?list.head(arguments):{};(i=$.extend({},$.summernote.options,i)).langInfo=$.extend(!0,{},$.summernote.lang["en-US"],$.summernote.lang[i.lang]),i.icons=$.extend(!0,{},$.summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!agent.isSupportTouch:i.tooltip,this.each(function(t,e){var n=$(e);if(!n.data("summernote")){var r=new Context(n,i);n.data("summernote",r),n.data("summernote").triggerEvent("init",r.layoutInfo)}});var n=this.first();if(n.length){var r=n.data("summernote");if(e)return r.invoke.apply(r,list.from(arguments));i.focus&&r.invoke("editor.focus")}return this}});var Renderer=function(t,e,i,n){this.render=function(r){var o=$(t);if(i&&i.contents&&o.html(i.contents),i&&i.className&&o.addClass(i.className),i&&i.data&&$.each(i.data,function(t,e){o.attr("data-"+t,e)}),i&&i.click&&o.on("click",i.click),e){var s=o.find(".note-children-container");e.forEach(function(t){t.render(s.length?s:o)})}return n&&n(o,i),i&&i.callback&&i.callback(o),r&&r.append(o),o}},renderer={create:function(t,e){return function(){var i=$.isArray(arguments[0])?arguments[0]:[],n="object"==typeof arguments[1]?arguments[1]:arguments[0];return n&&n.children&&(i=n.children),new Renderer(t,i,n,e)}}},editor=renderer.create('<div class="note-editor note-frame panel panel-default"/>'),toolbar=renderer.create('<div class="note-toolbar panel-heading"/>'),editingArea=renderer.create('<div class="note-editing-area"/>'),codable=renderer.create('<textarea class="note-codable"/>'),editable=renderer.create('<div class="note-editable panel-body" contentEditable="true"/>'),statusbar=renderer.create(['<div class="note-statusbar">','  <div class="note-resizebar">','    <div class="note-icon-bar"/>','    <div class="note-icon-bar"/>','    <div class="note-icon-bar"/>',"  </div>","</div>"].join("")),airEditor=renderer.create('<div class="note-editor"/>'),airEditable=renderer.create('<div class="note-editable" contentEditable="true"/>'),buttonGroup=renderer.create('<div class="note-btn-group btn-group">'),dropdown=renderer.create('<div class="dropdown-menu">',function(t,e){var i=$.isArray(e.items)?e.items.map(function(t){var i="string"==typeof t?t:t.value||"",n=e.template?e.template(t):t,r="object"==typeof t?t.option:void 0;return'<li><a href="#" '+('data-value="'+i+'"'+(void 0!==r?' data-option="'+r+'"':""))+">"+n+"</a></li>"}).join(""):e.items;t.html(i)}),dropdownCheck=renderer.create('<div class="dropdown-menu note-check">',function(t,e){var i=$.isArray(e.items)?e.items.map(function(t){var i="string"==typeof t?t:t.value||"",n=e.template?e.template(t):t;return'<li><a href="#" data-value="'+i+'">'+icon(e.checkClassName)+" "+n+"</a></li>"}).join(""):e.items;t.html(i)}),palette=renderer.create('<div class="note-color-palette"/>',function(t,e){for(var i=[],n=0,r=e.colors.length;n<r;n++){for(var o=e.eventName,s=e.colors[n],a=[],l=0,c=s.length;l<c;l++){var h=s[l];a.push(['<button type="button" class="note-color-btn"','style="background-color:',h,'" ','data-event="',o,'" ','data-value="',h,'" ','title="',h,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}i.push('<div class="note-color-row">'+a.join("")+"</div>")}t.html(i.join("")),e.tooltip&&t.find(".note-color-btn").tooltip({container:"body",trigger:"hover",placement:"bottom"})}),dialog=renderer.create('<div class="modal" aria-hidden="false" tabindex="-1"/>',function(t,e){e.fade&&t.addClass("fade"),t.html(['<div class="modal-dialog">','  <div class="modal-content">',e.title?'    <div class="modal-header">      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>      <h4 class="modal-title">'+e.title+"</h4>    </div>":"",'    <div class="modal-body">'+e.body+"</div>",e.footer?'    <div class="modal-footer">'+e.footer+"</div>":"","  </div>","</div>"].join(""))}),popover=renderer.create(['<div class="note-popover popover in">','  <div class="arrow"/>','  <div class="popover-content note-children-container"/>',"</div>"].join(""),function(t,e){var i=void 0!==e.direction?e.direction:"bottom";t.addClass(i),e.hideArrow&&t.find(".arrow").hide()}),icon=function(t,e){return"<"+(e=e||"i")+' class="'+t+'"/>'},ui={editor:editor,toolbar:toolbar,editingArea:editingArea,codable:codable,editable:editable,statusbar:statusbar,airEditor:airEditor,airEditable:airEditable,buttonGroup:buttonGroup,dropdown:dropdown,dropdownCheck:dropdownCheck,palette:palette,dialog:dialog,popover:popover,icon:icon,options:{},button:function(t,e){return renderer.create('<button type="button" class="note-btn btn btn-default btn-sm" tabindex="-1">',function(t,e){e&&e.tooltip&&self.options.tooltip&&t.attr({title:e.tooltip}).tooltip({container:"body",trigger:"hover",placement:"bottom"})})(t,e)},toggleBtn:function(t,e){t.toggleClass("disabled",!e),t.attr("disabled",!e)},toggleBtnActive:function(t,e){t.toggleClass("active",e)},onDialogShown:function(t,e){t.one("shown.bs.modal",e)},onDialogHidden:function(t,e){t.one("hidden.bs.modal",e)},showDialog:function(t){t.modal("show")},hideDialog:function(t){t.modal("hide")},createLayout:function(t,e){self.options=e;var i=(e.airMode?ui.airEditor([ui.editingArea([ui.airEditable()])]):ui.editor([ui.toolbar(),ui.editingArea([ui.codable(),ui.editable()]),ui.statusbar()])).render();return i.insertAfter(t),{note:t,editor:i,toolbar:i.find(".note-toolbar"),editingArea:i.find(".note-editing-area"),editable:i.find(".note-editable"),codable:i.find(".note-codable"),statusbar:i.find(".note-statusbar")}},removeLayout:function(t,e){t.html(e.editable.html()),e.editor.remove(),t.show()}};$.summernote=$.summernote||{lang:{}},$.extend($.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL?",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});var key=function(){var t={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221};return{isEdit:function(e){return list.contains([t.BACKSPACE,t.TAB,t.ENTER,t.SPACE,t.DELETE],e)},isMove:function(e){return list.contains([t.LEFT,t.UP,t.RIGHT,t.DOWN],e)},nameFromCode:func.invertObject(t),code:t}}(),range=function(){var t=function(t,e){var i,n,r=t.parentElement(),o=document.body.createTextRange(),s=list.from(r.childNodes);for(i=0;i<s.length;i++)if(!dom.isText(s[i])){if(o.moveToElementText(s[i]),o.compareEndPoints("StartToStart",t)>=0)break;n=s[i]}if(0!==i&&dom.isText(s[i-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(n||r),a.collapse(!n),l=n?n.nextSibling:r.firstChild;var c=t.duplicate();c.setEndPoint("StartToStart",a);for(var h=c.text.replace(/[\r\n]/g,"").length;h>l.nodeValue.length&&l.nextSibling;)h-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;e&&l.nextSibling&&dom.isText(l.nextSibling)&&h===l.nodeValue.length&&(h-=l.nodeValue.length,l=l.nextSibling),r=l,i=h}return{cont:r,offset:i}},e=function(t){var e=function(t,i){var n,r;if(dom.isText(t)){var o=dom.listPrev(t,func.not(dom.isText)),s=list.last(o).previousSibling;n=s||t.parentNode,i+=list.sum(list.tail(o),dom.nodeLength),r=!s}else{if(n=t.childNodes[i]||t,dom.isText(n))return e(n,0);i=0,r=!1}return{node:n,collapseToStart:r,offset:i}},i=document.body.createTextRange(),n=e(t.node,t.offset);return i.moveToElementText(n.node),i.collapse(n.collapseToStart),i.moveStart("character",n.offset),i},i=function(t,n,r,o){this.sc=t,this.so=n,this.ec=r,this.eo=o;var s=function(){if(agent.isW3CRangeSupport){var i=document.createRange();return i.setStart(t,n),i.setEnd(r,o),i}var s=e({node:t,offset:n});return s.setEndPoint("EndToEnd",e({node:r,offset:o})),s};this.getPoints=function(){return{sc:t,so:n,ec:r,eo:o}},this.getStartPoint=function(){return{node:t,offset:n}},this.getEndPoint=function(){return{node:r,offset:o}},this.select=function(){var t=s();if(agent.isW3CRangeSupport){var e=document.getSelection();e.rangeCount>0&&e.removeAllRanges(),e.addRange(t)}else t.select();return this},this.scrollIntoView=function(t){var e=$(t).height();return t.scrollTop+e<this.sc.offsetTop&&(t.scrollTop+=Math.abs(t.scrollTop+e-this.sc.offsetTop)),this},this.normalize=function(){var t=function(t,e){if(dom.isVisiblePoint(t)&&!dom.isEdgePoint(t)||dom.isVisiblePoint(t)&&dom.isRightEdgePoint(t)&&!e||dom.isVisiblePoint(t)&&dom.isLeftEdgePoint(t)&&e||dom.isVisiblePoint(t)&&dom.isBlock(t.node)&&dom.isEmpty(t.node))return t;var i=dom.ancestor(t.node,dom.isBlock);if((dom.isLeftEdgePointOf(t,i)||dom.isVoid(dom.prevPoint(t).node))&&!e||(dom.isRightEdgePointOf(t,i)||dom.isVoid(dom.nextPoint(t).node))&&e){if(dom.isVisiblePoint(t))return t;e=!e}return(e?dom.nextPointUntil(dom.nextPoint(t),dom.isVisiblePoint):dom.prevPointUntil(dom.prevPoint(t),dom.isVisiblePoint))||t},e=t(this.getEndPoint(),!1),n=this.isCollapsed()?e:t(this.getStartPoint(),!0);return new i(n.node,n.offset,e.node,e.offset)},this.nodes=function(t,e){t=t||func.ok;var i=e&&e.includeAncestor,n=e&&e.fullyContains,r=this.getStartPoint(),o=this.getEndPoint(),s=[],a=[];return dom.walkPoint(r,o,function(e){if(!dom.isEditable(e.node)){var r;n?(dom.isLeftEdgePoint(e)&&a.push(e.node),dom.isRightEdgePoint(e)&&list.contains(a,e.node)&&(r=e.node)):r=i?dom.ancestor(e.node,t):e.node,r&&t(r)&&s.push(r)}},!0),list.unique(s)},this.commonAncestor=function(){return dom.commonAncestor(t,r)},this.expand=function(e){var s=dom.ancestor(t,e),a=dom.ancestor(r,e);if(!s&&!a)return new i(t,n,r,o);var l=this.getPoints();return s&&(l.sc=s,l.so=0),a&&(l.ec=a,l.eo=dom.nodeLength(a)),new i(l.sc,l.so,l.ec,l.eo)},this.collapse=function(e){return e?new i(t,n,t,n):new i(r,o,r,o)},this.splitText=function(){var e=t===r,s=this.getPoints();return dom.isText(r)&&!dom.isEdgePoint(this.getEndPoint())&&r.splitText(o),dom.isText(t)&&!dom.isEdgePoint(this.getStartPoint())&&(s.sc=t.splitText(n),s.so=0,e&&(s.ec=s.sc,s.eo=o-n)),new i(s.sc,s.so,s.ec,s.eo)},this.deleteContents=function(){if(this.isCollapsed())return this;var t=this.splitText(),e=t.nodes(null,{fullyContains:!0}),n=dom.prevPointUntil(t.getStartPoint(),function(t){return!list.contains(e,t.node)}),r=[];return $.each(e,function(t,e){var i=e.parentNode;n.node!==i&&1===dom.nodeLength(i)&&r.push(i),dom.remove(e,!1)}),$.each(r,function(t,e){dom.remove(e,!1)}),new i(n.node,n.offset,n.node,n.offset).normalize()};var a=function(e){return function(){var i=dom.ancestor(t,e);return!!i&&i===dom.ancestor(r,e)}};this.isOnEditable=a(dom.isEditable),this.isOnList=a(dom.isList),this.isOnAnchor=a(dom.isAnchor),this.isOnCell=a(dom.isCell),this.isOnData=a(dom.isData),this.isLeftEdgeOf=function(t){if(!dom.isLeftEdgePoint(this.getStartPoint()))return!1;var e=dom.ancestor(this.sc,t);return e&&dom.isLeftEdgeOf(this.sc,e)},this.isCollapsed=function(){return t===r&&n===o},this.wrapBodyInlineWithPara=function(){if(dom.isBodyContainer(t)&&dom.isEmpty(t))return t.innerHTML=dom.emptyPara,new i(t.firstChild,0,t.firstChild,0);var e=this.normalize();if(dom.isParaInline(t)||dom.isPara(t))return e;var n;if(dom.isInline(e.sc)){var r=dom.listAncestor(e.sc,func.not(dom.isInline));n=list.last(r),dom.isInline(n)||(n=r[r.length-2]||e.sc.childNodes[e.so])}else n=e.sc.childNodes[e.so>0?e.so-1:0];var o=dom.listPrev(n,dom.isParaInline).reverse();if((o=o.concat(dom.listNext(n.nextSibling,dom.isParaInline))).length){var s=dom.wrap(list.head(o),"p");dom.appendChildNodes(s,list.tail(o))}return this.normalize()},this.insertNode=function(t){var e=this.wrapBodyInlineWithPara().deleteContents(),i=dom.splitPoint(e.getStartPoint(),dom.isInline(t));return i.rightNode?i.rightNode.parentNode.insertBefore(t,i.rightNode):i.container.appendChild(t),t},this.pasteHTML=function(t){var e=$("<div></div>").html(t)[0],i=list.from(e.childNodes),n=this.wrapBodyInlineWithPara().deleteContents();return i.reverse().map(function(t){return n.insertNode(t)}).reverse()},this.toString=function(){var t=s();return agent.isW3CRangeSupport?t.toString():t.text},this.getWordRange=function(t){var e=this.getEndPoint();if(!dom.isCharPoint(e))return this;var n=dom.prevPointUntil(e,function(t){return!dom.isCharPoint(t)});return t&&(e=dom.nextPointUntil(e,function(t){return!dom.isCharPoint(t)})),new i(n.node,n.offset,e.node,e.offset)},this.bookmark=function(e){return{s:{path:dom.makeOffsetPath(e,t),offset:n},e:{path:dom.makeOffsetPath(e,r),offset:o}}},this.paraBookmark=function(e){return{s:{path:list.tail(dom.makeOffsetPath(list.head(e),t)),offset:n},e:{path:list.tail(dom.makeOffsetPath(list.last(e),r)),offset:o}}},this.getClientRects=function(){return s().getClientRects()}};return{create:function(t,e,n,r){if(4===arguments.length)return new i(t,e,n,r);if(2===arguments.length)return n=t,r=e,new i(t,e,n,r);var o=this.createFromSelection();return o||1!==arguments.length?o:(o=this.createFromNode(arguments[0])).collapse(dom.emptyPara===arguments[0].innerHTML)},createFromSelection:function(){var e,n,r,o;if(agent.isW3CRangeSupport){var s=document.getSelection();if(!s||0===s.rangeCount)return null;if(dom.isBody(s.anchorNode))return null;var a=s.getRangeAt(0);e=a.startContainer,n=a.startOffset,r=a.endContainer,o=a.endOffset}else{var l=document.selection.createRange(),c=l.duplicate();c.collapse(!1);var h=l;h.collapse(!0);var d=t(h,!0),u=t(c,!1);dom.isText(d.node)&&dom.isLeftEdgePoint(d)&&dom.isTextNode(u.node)&&dom.isRightEdgePoint(u)&&u.node.nextSibling===d.node&&(d=u),e=d.cont,n=d.offset,r=u.cont,o=u.offset}return new i(e,n,r,o)},createFromNode:function(t){var e=t,i=0,n=t,r=dom.nodeLength(n);return dom.isVoid(e)&&(i=dom.listPrev(e).length-1,e=e.parentNode),dom.isBR(n)?(r=dom.listPrev(n).length-1,n=n.parentNode):dom.isVoid(n)&&(r=dom.listPrev(n).length,n=n.parentNode),this.create(e,i,n,r)},createFromNodeBefore:function(t){return this.createFromNode(t).collapse(!0)},createFromNodeAfter:function(t){return this.createFromNode(t).collapse()},createFromBookmark:function(t,e){var n=dom.fromOffsetPath(t,e.s.path),r=e.s.offset,o=dom.fromOffsetPath(t,e.e.path),s=e.e.offset;return new i(n,r,o,s)},createFromParaBookmark:function(t,e){var n=t.s.offset,r=t.e.offset,o=dom.fromOffsetPath(list.head(e),t.s.path),s=dom.fromOffsetPath(list.last(e),t.e.path);return new i(o,n,s,r)}}}(),async={readFileAsDataURL:function(t){return $.Deferred(function(e){$.extend(new FileReader,{onload:function(t){var i=t.target.result;e.resolve(i)},onerror:function(){e.reject(this)}}).readAsDataURL(t)}).promise()},createImage:function(t){return $.Deferred(function(e){var i=$("<img>");i.one("load",function(){i.off("error abort"),e.resolve(i)}).one("error abort",function(){i.off("load").detach(),e.reject(i)}).css({display:"none"}).appendTo(document.body).attr("src",t)}).promise()}},History=function(t){var e=[],i=-1,n=t[0],r=function(){var e=range.create(n),i={s:{path:[],offset:0},e:{path:[],offset:0}};return{contents:t.html(),bookmark:e?e.bookmark(n):i}},o=function(e){null!==e.contents&&t.html(e.contents),null!==e.bookmark&&range.createFromBookmark(n,e.bookmark).select()};this.rewind=function(){t.html()!==e[i].contents&&this.recordUndo(),o(e[i=0])},this.reset=function(){e=[],i=-1,t.html(""),this.recordUndo()},this.undo=function(){t.html()!==e[i].contents&&this.recordUndo(),0<i&&o(e[--i])},this.redo=function(){e.length-1>i&&o(e[++i])},this.recordUndo=function(){i++,e.length>i&&(e=e.slice(0,i)),e.push(r())}},Style=function(){var t=function(t,e){if(agent.jqueryVersion<1.9){var i={};return $.each(e,function(e,n){i[n]=t.css(n)}),i}return t.css.call(t,e)};this.fromNode=function(e){var i=t(e,["font-family","font-size","text-align","list-style-type","line-height"])||{};return i["font-size"]=parseInt(i["font-size"],10),i},this.stylePara=function(t,e){$.each(t.nodes(dom.isPara,{includeAncestor:!0}),function(t,i){$(i).css(e)})},this.styleNodes=function(t,e){t=t.splitText();var i=e&&e.nodeName||"SPAN",n=!(!e||!e.expandClosestSibling),r=!(!e||!e.onlyPartialContains);if(t.isCollapsed())return[t.insertNode(dom.create(i))];var o=dom.makePredByNodeName(i),s=t.nodes(dom.isText,{fullyContains:!0}).map(function(t){return dom.singleChildAncestor(t,o)||dom.wrap(t,i)});if(n){if(r){var a=t.nodes();o=func.and(o,function(t){return list.contains(a,t)})}return s.map(function(t){var e=dom.withClosestSiblings(t,o),i=list.head(e),n=list.tail(e);return $.each(n,function(t,e){dom.appendChildNodes(i,e.childNodes),dom.remove(e)}),list.head(e)})}return s},this.current=function(t){var e=$(dom.isElement(t.sc)?t.sc:t.sc.parentNode),i=this.fromNode(e);try{i=$.extend(i,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||i["font-family"]})}catch(t){}if(t.isOnList()){var n=["circle","disc","disc-leading-zero","square"],r=$.inArray(i["list-style-type"],n)>-1;i["list-style"]=r?"unordered":"ordered"}else i["list-style"]="none";var o=dom.ancestor(t.sc,dom.isPara);if(o&&o.style["line-height"])i["line-height"]=o.style.lineHeight;else{var s=parseInt(i["line-height"],10)/parseInt(i["font-size"],10);i["line-height"]=s.toFixed(1)}return i.anchor=t.isOnAnchor()&&dom.ancestor(t.sc,dom.isAnchor),i.ancestors=dom.listAncestor(t.sc,dom.isEditable),i.range=t,i}},Bullet=function(){var t=this;this.insertOrderedList=function(t){this.toggleList("OL",t)},this.insertUnorderedList=function(t){this.toggleList("UL",t)},this.indent=function(t){var e=this,i=range.create(t).wrapBodyInlineWithPara(),n=i.nodes(dom.isPara,{includeAncestor:!0}),r=list.clusterBy(n,func.peq2("parentNode"));$.each(r,function(t,i){var n=list.head(i);dom.isLi(n)?e.wrapList(i,n.parentNode.nodeName):$.each(i,function(t,e){$(e).css("marginLeft",function(t,e){return(parseInt(e,10)||0)+25})})}),i.select()},this.outdent=function(t){var e=this,i=range.create(t).wrapBodyInlineWithPara(),n=i.nodes(dom.isPara,{includeAncestor:!0}),r=list.clusterBy(n,func.peq2("parentNode"));$.each(r,function(t,i){var n=list.head(i);dom.isLi(n)?e.releaseList([i]):$.each(i,function(t,e){$(e).css("marginLeft",function(t,e){return(e=parseInt(e,10)||0)>25?e-25:""})})}),i.select()},this.toggleList=function(e,i){var n=range.create(i).wrapBodyInlineWithPara(),r=n.nodes(dom.isPara,{includeAncestor:!0}),o=n.paraBookmark(r),s=list.clusterBy(r,func.peq2("parentNode"));if(list.find(r,dom.isPurePara)){var a=[];$.each(s,function(i,n){a=a.concat(t.wrapList(n,e))}),r=a}else{var l=n.nodes(dom.isList,{includeAncestor:!0}).filter(function(t){return!$.nodeName(t,e)});l.length?$.each(l,function(t,i){dom.replace(i,e)}):r=this.releaseList(s,!0)}range.createFromParaBookmark(o,r).select()},this.wrapList=function(t,e){var i=list.head(t),n=list.last(t),r=dom.isList(i.previousSibling)&&i.previousSibling,o=dom.isList(n.nextSibling)&&n.nextSibling,s=r||dom.insertAfter(dom.create(e||"UL"),n);return t=t.map(function(t){return dom.isPurePara(t)?dom.replace(t,"LI"):t}),dom.appendChildNodes(s,t),o&&(dom.appendChildNodes(s,list.from(o.childNodes)),dom.remove(o)),t},this.releaseList=function(t,e){var i=[];return $.each(t,function(t,n){var r=list.head(n),o=list.last(n),s=e?dom.lastAncestor(r,dom.isList):r.parentNode,a=s.childNodes.length>1?dom.splitTree(s,{node:o.parentNode,offset:dom.position(o)+1},{isSkipPaddingBlankHTML:!0}):null,l=dom.splitTree(s,{node:r.parentNode,offset:dom.position(r)},{isSkipPaddingBlankHTML:!0});n=e?dom.listDescendant(l,dom.isLi):list.from(l.childNodes).filter(dom.isLi),!e&&dom.isList(s.parentNode)||(n=n.map(function(t){return dom.replace(t,"P")})),$.each(list.from(n).reverse(),function(t,e){dom.insertAfter(e,s)});var c=list.compact([s,l,a]);$.each(c,function(t,e){var i=[e].concat(dom.listDescendant(e,dom.isList));$.each(i.reverse(),function(t,e){dom.nodeLength(e)||dom.remove(e,!0)})}),i=i.concat(n)}),i}},Typing=function(){var t=new Bullet;this.insertTab=function(t,e){var i=dom.createText(new Array(e+1).join(dom.NBSP_CHAR));(t=t.deleteContents()).insertNode(i,!0),(t=range.create(i,e)).select()},this.insertParagraph=function(e){var i=range.create(e);i=(i=i.deleteContents()).wrapBodyInlineWithPara();var n,r=dom.ancestor(i.sc,dom.isPara);if(r){if(dom.isEmpty(r)&&dom.isLi(r))return void t.toggleList(r.parentNode.nodeName);if(dom.isEmpty(r)&&dom.isPara(r)&&dom.isBlockquote(r.parentNode))dom.insertAfter(r,r.parentNode),n=r;else{n=dom.splitTree(r,i.getStartPoint());var o=dom.listDescendant(r,dom.isEmptyAnchor);o=o.concat(dom.listDescendant(n,dom.isEmptyAnchor)),$.each(o,function(t,e){dom.remove(e)}),(dom.isHeading(n)||dom.isPre(n)||dom.isCustomStyleTag(n))&&dom.isEmpty(n)&&(n=dom.replace(n,"p"))}}else{var s=i.sc.childNodes[i.so];n=$(dom.emptyPara)[0],s?i.sc.insertBefore(n,s):i.sc.appendChild(n)}range.create(n,0).normalize().select().scrollIntoView(e)}},TableResultAction=function(t,e,i,n){function r(){t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())?(p.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()?p.rowPos=t.parentElement.rowIndex:console.error("Impossible to identify start Row point.",t)):console.error("Impossible to identify start Cell point.",t)}function o(t,e,i,n,r,o,s){var a={baseRow:i,baseCell:n,isRowSpan:r,isColSpan:o,isVirtual:s};f[t]||(f[t]=[]),f[t][e]=a}function s(t,e,i,n){return{baseCell:t.baseCell,action:e,virtualTable:{rowIndex:i,cellIndex:n}}}function a(t,e){if(!f[t])return e;if(!f[t][e])return e;for(var i=e;f[t][i];)if(i++,!f[t][i])return i}function l(t,e){var i=a(t.rowIndex,e.cellIndex),n=e.colSpan>1,r=e.rowSpan>1,s=t.rowIndex===p.rowPos&&e.cellIndex===p.colPos;o(t.rowIndex,i,t,e,r,n,!1);var l=e.attributes.rowSpan?parseInt(e.attributes.rowSpan.value,10):0;if(l>1)for(var h=1;h<l;h++){var d=t.rowIndex+h;c(d,i,e,s),o(d,i,t,e,!0,n,!0)}var u=e.attributes.colSpan?parseInt(e.attributes.colSpan.value,10):0;if(u>1)for(var f=1;f<u;f++){var m=a(t.rowIndex,i+f);c(t.rowIndex,m,e,s),o(t.rowIndex,m,t,e,r,!0,!0)}}function c(t,e,i,n){t===p.rowPos&&p.colPos>=i.cellIndex&&i.cellIndex<=e&&!n&&p.colPos++}function h(){for(var t=n.rows,e=0;e<t.length;e++)for(var i=t[e].cells,r=0;r<i.length;r++)l(t[e],i[r])}function d(t){switch(e){case TableResultAction.where.Column:if(t.isColSpan)return TableResultAction.resultAction.SubtractSpanCount;break;case TableResultAction.where.Row:if(!t.isVirtual&&t.isRowSpan)return TableResultAction.resultAction.AddCell;if(t.isRowSpan)return TableResultAction.resultAction.SubtractSpanCount}return TableResultAction.resultAction.RemoveCell}function u(t){switch(e){case TableResultAction.where.Column:if(t.isColSpan)return TableResultAction.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return TableResultAction.resultAction.Ignore;break;case TableResultAction.where.Row:if(t.isRowSpan)return TableResultAction.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return TableResultAction.resultAction.Ignore}return TableResultAction.resultAction.AddCell}var p={colPos:0,rowPos:0},f=[],m=[];this.getActionList=function(){for(var t=e===TableResultAction.where.Row?p.rowPos:-1,n=e===TableResultAction.where.Column?p.colPos:-1,r=0,o=!0;o;){var a=t>=0?t:r,l=n>=0?n:r,c=f[a];if(!c)return o=!1,m;var h=c[l];if(!h)return o=!1,m;var g=TableResultAction.resultAction.Ignore;switch(i){case TableResultAction.requestAction.Add:g=u(h);break;case TableResultAction.requestAction.Delete:g=d(h)}m.push(s(h,g,a,l)),r++}return m},r(),h()};TableResultAction.where={Row:0,Column:1},TableResultAction.requestAction={Add:0,Delete:1},TableResultAction.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Table=function(){this.tab=function(t,e){var i=dom.ancestor(t.commonAncestor(),dom.isCell),n=dom.ancestor(i,dom.isTable),r=dom.listDescendant(n,dom.isCell),o=list[e?"prev":"next"](r,i);o&&range.create(o,0).select()},this.addRow=function(t,e){for(var i=dom.ancestor(t.commonAncestor(),dom.isCell),n=$(i).closest("tr"),r=this.recoverAttributes(n),o=$("<tr"+r+"></tr>"),s=new TableResultAction(i,TableResultAction.where.Row,TableResultAction.requestAction.Add,$(n).closest("table")[0]).getActionList(),a=0;a<s.length;a++){var l=s[a],c=this.recoverAttributes(l.baseCell);switch(l.action){case TableResultAction.resultAction.AddCell:o.append("<td"+c+">"+dom.blank+"</td>");break;case TableResultAction.resultAction.SumSpanCount:if("top"===e&&(l.baseCell.parent?l.baseCell.closest("tr").rowIndex:0)<=n[0].rowIndex){var h=$("<div></div>").append($("<td"+c+">"+dom.blank+"</td>").removeAttr("rowspan")).html();o.append(h);break}var d=parseInt(l.baseCell.rowSpan,10);d++,l.baseCell.setAttribute("rowSpan",d)}}if("top"===e)n.before(o);else{if(i.rowSpan>1){var u=n[0].rowIndex+(i.rowSpan-2);return void $($(n).parent().find("tr")[u]).after($(o))}n.after(o)}},this.addCol=function(t,e){var i=dom.ancestor(t.commonAncestor(),dom.isCell),n=$(i).closest("tr");$(n).siblings().push(n);for(var r=new TableResultAction(i,TableResultAction.where.Column,TableResultAction.requestAction.Add,$(n).closest("table")[0]).getActionList(),o=0;o<r.length;o++){var s=r[o],a=this.recoverAttributes(s.baseCell);switch(s.action){case TableResultAction.resultAction.AddCell:"right"===e?$(s.baseCell).after("<td"+a+">"+dom.blank+"</td>"):$(s.baseCell).before("<td"+a+">"+dom.blank+"</td>");break;case TableResultAction.resultAction.SumSpanCount:if("right"===e){var l=parseInt(s.baseCell.colSpan,10);l++,s.baseCell.setAttribute("colSpan",l)}else $(s.baseCell).before("<td"+a+">"+dom.blank+"</td>")}}},this.recoverAttributes=function(t){var e="";if(!t)return e;for(var i=t.attributes||[],n=0;n<i.length;n++)"id"!==i[n].name.toLowerCase()&&i[n].specified&&(e+=" "+i[n].name+"='"+i[n].value+"'");return e},this.deleteRow=function(t){for(var e=dom.ancestor(t.commonAncestor(),dom.isCell),i=$(e).closest("tr"),n=i.children("td, th").index($(e)),r=i[0].rowIndex,o=new TableResultAction(e,TableResultAction.where.Row,TableResultAction.requestAction.Delete,$(i).closest("table")[0]).getActionList(),s=0;s<o.length;s++)if(o[s]){var a=o[s].baseCell,l=o[s].virtualTable,c=a.rowSpan&&a.rowSpan>1,h=c?parseInt(a.rowSpan,10):0;switch(o[s].action){case TableResultAction.resultAction.Ignore:continue;case TableResultAction.resultAction.AddCell:var d=i.next("tr")[0];if(!d)continue;var u=i[0].cells[n];c&&(h>2?(h--,d.insertBefore(u,d.cells[n]),d.cells[n].setAttribute("rowSpan",h),d.cells[n].innerHTML=""):2===h&&(d.insertBefore(u,d.cells[n]),d.cells[n].removeAttribute("rowSpan"),d.cells[n].innerHTML=""));continue;case TableResultAction.resultAction.SubtractSpanCount:c&&(h>2?(h--,a.setAttribute("rowSpan",h),l.rowIndex!==r&&a.cellIndex===n&&(a.innerHTML="")):2===h&&(a.removeAttribute("rowSpan"),l.rowIndex!==r&&a.cellIndex===n&&(a.innerHTML="")));continue;case TableResultAction.resultAction.RemoveCell:continue}}i.remove()},this.deleteCol=function(t){for(var e=dom.ancestor(t.commonAncestor(),dom.isCell),i=$(e).closest("tr"),n=i.children("td, th").index($(e)),r=new TableResultAction(e,TableResultAction.where.Column,TableResultAction.requestAction.Delete,$(i).closest("table")[0]).getActionList(),o=0;o<r.length;o++)if(r[o])switch(r[o].action){case TableResultAction.resultAction.Ignore:continue;case TableResultAction.resultAction.SubtractSpanCount:var s=r[o].baseCell;if(s.colSpan&&s.colSpan>1){var a=s.colSpan?parseInt(s.colSpan,10):0;a>2?(a--,s.setAttribute("colSpan",a),s.cellIndex===n&&(s.innerHTML="")):2===a&&(s.removeAttribute("colSpan"),s.cellIndex===n&&(s.innerHTML=""))}continue;case TableResultAction.resultAction.RemoveCell:dom.remove(r[o].baseCell,!0);continue}},this.createTable=function(t,e,i){for(var n,r=[],o=0;o<t;o++)r.push("<td>"+dom.blank+"</td>");n=r.join("");for(var s,a=[],l=0;l<e;l++)a.push("<tr>"+n+"</tr>");s=a.join("");var c=$("<table>"+s+"</table>");return i&&i.tableClassName&&c.addClass(i.tableClassName),c[0]},this.deleteTable=function(t){var e=dom.ancestor(t.commonAncestor(),dom.isCell);$(e).closest("table").remove()}},KEY_BOGUS="bogus",Editor=function(t){var e=this,i=t.layoutInfo.note,n=t.layoutInfo.editor,r=t.layoutInfo.editable,o=t.options,s=o.langInfo,a=r[0],l=null,c=new Style,h=new Table,d=new Typing,u=new Bullet,p=new History(r);this.initialize=function(){r.on("keydown",function(i){i.keyCode===key.code.ENTER&&t.triggerEvent("enter",i),t.triggerEvent("keydown",i),i.isDefaultPrevented()||(o.shortcuts?e.handleKeyMap(i):e.preventDefaultEditableShortCuts(i))}).on("keyup",function(e){t.triggerEvent("keyup",e)}).on("focus",function(e){t.triggerEvent("focus",e)}).on("blur",function(e){t.triggerEvent("blur",e)}).on("mousedown",function(e){t.triggerEvent("mousedown",e)}).on("mouseup",function(e){t.triggerEvent("mouseup",e)}).on("scroll",function(e){t.triggerEvent("scroll",e)}).on("paste",function(e){t.triggerEvent("paste",e)}),r.html(dom.html(i)||dom.emptyPara);var s=agent.isMSIE?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";r.on(s,func.debounce(function(){t.triggerEvent("change",r.html())},250)),n.on("focusin",function(e){t.triggerEvent("focusin",e)}).on("focusout",function(e){t.triggerEvent("focusout",e)}),o.airMode||(o.width&&n.outerWidth(o.width),o.height&&r.outerHeight(o.height),o.maxHeight&&r.css("max-height",o.maxHeight),o.minHeight&&r.css("min-height",o.minHeight)),p.recordUndo()},this.destroy=function(){r.off()},this.handleKeyMap=function(e){var i=o.keyMap[agent.isMac?"mac":"pc"],n=[];e.metaKey&&n.push("CMD"),e.ctrlKey&&!e.altKey&&n.push("CTRL"),e.shiftKey&&n.push("SHIFT");var r=key.nameFromCode[e.keyCode];r&&n.push(r);var s=i[n.join("+")];s?(e.preventDefault(),t.invoke(s)):key.isEdit(e.keyCode)&&this.afterCommand()},this.preventDefaultEditableShortCuts=function(t){(t.ctrlKey||t.metaKey)&&list.contains([66,73,85],t.keyCode)&&t.preventDefault()},this.createRange=function(){return this.focus(),range.create(a)},this.saveRange=function(t){l=this.createRange(),t&&l.collapse().select()},this.restoreRange=function(){l&&(l.select(),this.focus())},this.saveTarget=function(t){r.data("target",t)},this.clearTarget=function(){r.removeData("target")},this.restoreTarget=function(){return r.data("target")},this.currentStyle=function(){var t=range.create();return t&&(t=t.normalize()),t?c.current(t):c.fromNode(r)},this.styleFromNode=function(t){return c.fromNode(t)},this.undo=function(){t.triggerEvent("before.command",r.html()),p.undo(),t.triggerEvent("change",r.html())},t.memo("help.undo",s.help.undo),this.redo=function(){t.triggerEvent("before.command",r.html()),p.redo(),t.triggerEvent("change",r.html())},t.memo("help.redo",s.help.redo);for(var f=this.beforeCommand=function(){t.triggerEvent("before.command",r.html()),e.focus()},m=this.afterCommand=function(e){p.recordUndo(),e||t.triggerEvent("change",r.html())},g=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor","foreColor","fontName"],v=0,y=g.length;v<y;v++)this[g[v]]=function(t){return function(e){f(),document.execCommand(t,!1,e),m(!0)}}(g[v]),t.memo("help."+g[v],s.help[g[v]]);this.tab=function(){var t=this.createRange();t.isCollapsed()&&t.isOnCell()?h.tab(t):(f(),d.insertTab(t,o.tabSize),m())},t.memo("help.tab",s.help.tab),this.untab=function(){var t=this.createRange();t.isCollapsed()&&t.isOnCell()&&h.tab(t,!0)},t.memo("help.untab",s.help.untab),this.wrapCommand=function(t){return function(){f(),t.apply(e,arguments),m()}},this.insertParagraph=this.wrapCommand(function(){d.insertParagraph(a)}),t.memo("help.insertParagraph",s.help.insertParagraph),this.insertOrderedList=this.wrapCommand(function(){u.insertOrderedList(a)}),t.memo("help.insertOrderedList",s.help.insertOrderedList),this.insertUnorderedList=this.wrapCommand(function(){u.insertUnorderedList(a)}),t.memo("help.insertUnorderedList",s.help.insertUnorderedList),this.indent=this.wrapCommand(function(){u.indent(a)}),t.memo("help.indent",s.help.indent),this.outdent=this.wrapCommand(function(){u.outdent(a)}),t.memo("help.outdent",s.help.outdent),this.insertImage=function(e,i){return async.createImage(e,i).then(function(t){f(),"function"==typeof i?i(t):("string"==typeof i&&t.attr("data-filename",i),t.css("width",Math.min(r.width(),t.width()))),t.show(),range.create(a).insertNode(t[0]),range.createFromNodeAfter(t[0]).select(),m()}).fail(function(e){t.triggerEvent("image.upload.error",e)})},this.insertImages=function(i){$.each(i,function(i,n){var r=n.name;o.maximumImageFileSize&&o.maximumImageFileSize<n.size?t.triggerEvent("image.upload.error",s.image.maximumFileSizeError):async.readFileAsDataURL(n).then(function(t){return e.insertImage(t,r)}).fail(function(){t.triggerEvent("image.upload.error")})})},this.insertImagesOrCallback=function(e){o.callbacks.onImageUpload?t.triggerEvent("image.upload",e):this.insertImages(e)},this.insertNode=this.wrapCommand(function(t){this.createRange().insertNode(t),range.createFromNodeAfter(t).select()}),this.insertText=this.wrapCommand(function(t){var e=this.createRange().insertNode(dom.createText(t));range.create(e,dom.nodeLength(e)).select()}),this.getSelectedText=function(){var t=this.createRange();return t.isOnAnchor()&&(t=range.createFromNode(dom.ancestor(t.sc,dom.isAnchor))),t.toString()},this.pasteHTML=this.wrapCommand(function(t){var e=this.createRange().pasteHTML(t);range.createFromNodeAfter(list.last(e)).select()}),this.formatBlock=this.wrapCommand(function(e,i){var n=t.options.callbacks.onApplyCustomStyle;n?n.call(this,i,t,this.onFormatBlock):this.onFormatBlock(e)}),this.onFormatBlock=function(t){t=agent.isMSIE?"<"+t+">":t,document.execCommand("FormatBlock",!1,t)},this.formatPara=function(){this.formatBlock("P")},t.memo("help.formatPara",s.help.formatPara);for(v=1;v<=6;v++)this["formatH"+v]=function(t){return function(){this.formatBlock("H"+t)}}(v),t.memo("help.formatH"+v,s.help["formatH"+v]);this.fontSize=function(t){var e=this.createRange();if(e&&e.isCollapsed()){var i=c.styleNodes(e),n=list.head(i);$(i).css({"font-size":t+"px"}),n&&!dom.nodeLength(n)&&(n.innerHTML=dom.ZERO_WIDTH_NBSP_CHAR,range.createFromNodeAfter(n.firstChild).select(),r.data(KEY_BOGUS,n))}else f(),$(c.styleNodes(e)).css({"font-size":t+"px"}),m()},this.insertHorizontalRule=this.wrapCommand(function(){var t=this.createRange().insertNode(dom.create("HR"));t.nextSibling&&range.create(t.nextSibling,0).normalize().select()}),t.memo("help.insertHorizontalRule",s.help.insertHorizontalRule),this.removeBogus=function(){var t=r.data(KEY_BOGUS);if(t){var e=list.find(list.from(t.childNodes),dom.isText),i=e.nodeValue.indexOf(dom.ZERO_WIDTH_NBSP_CHAR);-1!==i&&e.deleteData(i,1),dom.isEmpty(t)&&dom.remove(t),r.removeData(KEY_BOGUS)}},this.lineHeight=this.wrapCommand(function(t){c.stylePara(this.createRange(),{lineHeight:t})}),this.unlink=function(){var t=this.createRange();if(t.isOnAnchor()){var e=dom.ancestor(t.sc,dom.isAnchor);(t=range.createFromNode(e)).select(),f(),document.execCommand("unlink"),m()}},this.createLink=this.wrapCommand(function(t){var e=t.url,i=t.text,n=t.isNewWindow,r=t.range||this.createRange(),s=r.toString()!==i;"string"==typeof e&&(e=e.trim()),e=o.onCreateLink?o.onCreateLink(e):/^[A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?/.test(e)?e:"http://"+e;var a=[];if(s){var l=(r=r.deleteContents()).insertNode($("<A>"+i+"</A>")[0]);a.push(l)}else a=c.styleNodes(r,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});$.each(a,function(t,i){$(i).attr("href",e),n?$(i).attr("target","_blank"):$(i).removeAttr("target")});var h=range.createFromNodeBefore(list.head(a)).getStartPoint(),d=range.createFromNodeAfter(list.last(a)).getEndPoint();range.create(h.node,h.offset,d.node,d.offset).select()}),this.getLinkInfo=function(){var t=this.createRange().expand(dom.isAnchor),e=$(list.head(t.nodes(dom.isAnchor))),i={range:t,text:t.toString(),url:e.length?e.attr("href"):""};return e.length&&(i.isNewWindow="_blank"===e.attr("target")),i},this.color=this.wrapCommand(function(t){var e=t.foreColor,i=t.backColor;e&&document.execCommand("foreColor",!1,e),i&&document.execCommand("backColor",!1,i)}),this.insertTable=this.wrapCommand(function(t){var e=t.split("x");this.createRange().deleteContents().insertNode(h.createTable(e[0],e[1],o))}),this.addRow=function(t){var e=this.createRange(r);e.isCollapsed()&&e.isOnCell()&&(f(),h.addRow(e,t),m())},this.addCol=function(t){var e=this.createRange(r);e.isCollapsed()&&e.isOnCell()&&(f(),h.addCol(e,t),m())},this.deleteRow=function(){var t=this.createRange(r);t.isCollapsed()&&t.isOnCell()&&(f(),h.deleteRow(t),m())},this.deleteCol=function(){var t=this.createRange(r);t.isCollapsed()&&t.isOnCell()&&(f(),h.deleteCol(t),m())},this.deleteTable=function(){var t=this.createRange(r);t.isCollapsed()&&t.isOnCell()&&(f(),h.deleteTable(t),m())},this.floatMe=this.wrapCommand(function(t){var e=$(this.restoreTarget());e.toggleClass("note-float-left","left"===t),e.toggleClass("note-float-right","right"===t),e.css("float",t)}),this.resize=this.wrapCommand(function(t){$(this.restoreTarget()).css({width:100*t+"%",height:""})}),this.resizeTo=function(t,e,i){var n;if(i){var r=t.y/t.x,o=e.data("ratio");n={width:o>r?t.x:t.y/o,height:o>r?t.x*o:t.y}}else n={width:t.x,height:t.y};e.css(n)},this.removeMedia=this.wrapCommand(function(){var e=$(this.restoreTarget()).detach();t.triggerEvent("media.delete",e,r)}),this.hasFocus=function(){return r.is(":focus")},this.focus=function(){this.hasFocus()||r.focus()},this.isEmpty=function(){return dom.isEmpty(r[0])||dom.emptyPara===r.html()},this.empty=function(){t.invoke("code",dom.emptyPara)}},Clipboard=function(t){var e=this,i=t.layoutInfo.editable;this.events={"summernote.keydown":function(i,n){e.needKeydownHook()&&(n.ctrlKey||n.metaKey)&&n.keyCode===key.code.V&&(t.invoke("editor.saveRange"),e.$paste.focus(),setTimeout(function(){e.pasteByHook()},0))}},this.needKeydownHook=function(){return agent.isMSIE&&agent.browserVersion>10||agent.isFF},this.initialize=function(){this.needKeydownHook()?(this.$paste=$('<div tabindex="-1" />').attr("contenteditable",!0).css({position:"absolute",left:-1e5,opacity:0}),i.before(this.$paste),this.$paste.on("paste",function(e){t.triggerEvent("paste",e)})):i.on("paste",this.pasteByEvent)},this.destroy=function(){this.needKeydownHook()&&(this.$paste.remove(),this.$paste=null)},this.pasteByHook=function(){var e=this.$paste[0].firstChild,i=e&&e.src;if(dom.isImg(e)&&0===i.indexOf("data:")){for(var n=atob(e.src.split(",")[1]),r=new Uint8Array(n.length),o=0;o<n.length;o++)r[o]=n.charCodeAt(o);var s=new Blob([r],{type:"image/png"});s.name="clipboard.png",t.invoke("editor.restoreRange"),t.invoke("editor.focus"),t.invoke("editor.insertImagesOrCallback",[s])}else{var a=$("<div />").html(this.$paste.html()).html();t.invoke("editor.restoreRange"),t.invoke("editor.focus"),a&&t.invoke("editor.pasteHTML",a)}this.$paste.empty()},this.pasteByEvent=function(e){var i=e.originalEvent.clipboardData;if(i&&i.items&&i.items.length){var n=list.head(i.items);"file"===n.kind&&-1!==n.type.indexOf("image/")&&t.invoke("editor.insertImagesOrCallback",[n.getAsFile()]),t.invoke("editor.afterCommand")}}},Dropzone=function(t){var e=$(document),i=t.layoutInfo.editor,n=t.layoutInfo.editable,r=t.options,o=r.langInfo,s={},a=$(['<div class="note-dropzone">','  <div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(i),l=function(){Object.keys(s).forEach(function(t){e.off(t.substr(2).toLowerCase(),s[t])}),s={}};this.initialize=function(){r.disableDragAndDrop?(s.onDrop=function(t){t.preventDefault()},e.on("drop",s.onDrop)):this.attachDragAndDropEvent()},this.attachDragAndDropEvent=function(){var r=$(),l=a.find(".note-dropzone-message");s.onDragenter=function(e){var n=t.invoke("codeview.isActivated"),s=i.width()>0&&i.height()>0;n||r.length||!s||(i.addClass("dragover"),a.width(i.width()),a.height(i.height()),l.text(o.image.dragImageHere)),r=r.add(e.target)},s.onDragleave=function(t){(r=r.not(t.target)).length||i.removeClass("dragover")},s.onDrop=function(){r=$(),i.removeClass("dragover")},e.on("dragenter",s.onDragenter).on("dragleave",s.onDragleave).on("drop",s.onDrop),a.on("dragenter",function(){a.addClass("hover"),l.text(o.image.dropImage)}).on("dragleave",function(){a.removeClass("hover"),l.text(o.image.dragImageHere)}),a.on("drop",function(e){var i=e.originalEvent.dataTransfer;i&&i.files&&i.files.length?(e.preventDefault(),n.focus(),t.invoke("editor.insertImagesOrCallback",i.files)):$.each(i.types,function(e,n){var r=i.getData(n);n.toLowerCase().indexOf("text")>-1?t.invoke("editor.pasteHTML",r):$(r).each(function(){t.invoke("editor.insertNode",this)})})}).on("dragover",!1)},this.destroy=function(){l()}},CodeMirror;agent.hasCodeMirror&&(agent.isSupportAmd?require(["codemirror"],function(t){CodeMirror=t}):CodeMirror=window.CodeMirror);var Codeview=function(t){var e=t.layoutInfo.editor,i=t.layoutInfo.editable,n=t.layoutInfo.codable,r=t.options;this.sync=function(){this.isActivated()&&agent.hasCodeMirror&&n.data("cmEditor").save()},this.isActivated=function(){return e.hasClass("codeview")},this.toggle=function(){this.isActivated()?this.deactivate():this.activate(),t.triggerEvent("codeview.toggled")},this.activate=function(){if(n.val(dom.html(i,r.prettifyHtml)),n.height(i.height()),t.invoke("toolbar.updateCodeview",!0),e.addClass("codeview"),n.focus(),agent.hasCodeMirror){var o=CodeMirror.fromTextArea(n[0],r.codemirror);if(r.codemirror.tern){var s=new CodeMirror.TernServer(r.codemirror.tern);o.ternServer=s,o.on("cursorActivity",function(t){s.updateArgHints(t)})}o.setSize(null,i.outerHeight()),n.data("cmEditor",o)}},this.deactivate=function(){if(agent.hasCodeMirror){var o=n.data("cmEditor");n.val(o.getValue()),o.toTextArea()}var s=dom.value(n,r.prettifyHtml)||dom.emptyPara,a=i.html()!==s;i.html(s),i.height(r.height?n.height():"auto"),e.removeClass("codeview"),a&&t.triggerEvent("change",i.html(),i),i.focus(),t.invoke("toolbar.updateCodeview",!1)},this.destroy=function(){this.isActivated()&&this.deactivate()}},EDITABLE_PADDING=24,Statusbar=function(t){var e=$(document),i=t.layoutInfo.statusbar,n=t.layoutInfo.editable,r=t.options;this.initialize=function(){r.airMode||r.disableResizeEditor?this.destroy():i.on("mousedown",function(t){t.preventDefault(),t.stopPropagation();var i=n.offset().top-e.scrollTop(),o=function(t){var e=t.clientY-(i+EDITABLE_PADDING);e=r.minheight>0?Math.max(e,r.minheight):e,e=r.maxHeight>0?Math.min(e,r.maxHeight):e,n.height(e)};e.on("mousemove",o).one("mouseup",function(){e.off("mousemove",o)})})},this.destroy=function(){i.off(),i.remove()}},Fullscreen=function(t){var e=this,i=t.layoutInfo.editor,n=t.layoutInfo.toolbar,r=t.layoutInfo.editable,o=t.layoutInfo.codable,s=$(window),a=$("html, body");this.resizeTo=function(t){r.css("height",t.h),o.css("height",t.h),o.data("cmeditor")&&o.data("cmeditor").setsize(null,t.h)},this.onResize=function(){e.resizeTo({h:s.height()-n.outerHeight()})},this.toggle=function(){i.toggleClass("fullscreen"),this.isFullscreen()?(r.data("orgHeight",r.css("height")),s.on("resize",this.onResize).trigger("resize"),a.css("overflow","hidden")):(s.off("resize",this.onResize),this.resizeTo({h:r.data("orgHeight")}),a.css("overflow","visible")),t.invoke("toolbar.updateFullscreen",this.isFullscreen())},this.isFullscreen=function(){return i.hasClass("fullscreen")}},Handle=function(t){var e=this,i=$(document),n=t.layoutInfo.editingArea,r=t.options;this.events={"summernote.mousedown":function(t,i){e.update(i.target)&&i.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){e.update()},"summernote.disable":function(){e.hide()},"summernote.codeview.toggled":function(){e.update()}},this.initialize=function(){this.$handle=$(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',r.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',r.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(n),this.$handle.on("mousedown",function(n){if(dom.isControlSizing(n.target)){n.preventDefault(),n.stopPropagation();var r=e.$handle.find(".note-control-selection").data("target"),o=r.offset(),s=i.scrollTop(),a=function(i){t.invoke("editor.resizeTo",{x:i.clientX-o.left,y:i.clientY-(o.top-s)},r,!i.shiftKey),e.update(r[0])};i.on("mousemove",a).one("mouseup",function(e){e.preventDefault(),i.off("mousemove",a),t.invoke("editor.afterCommand")}),r.data("ratio")||r.data("ratio",r.height()/r.width())}}),this.$handle.on("wheel",function(t){t.preventDefault(),e.update()})},this.destroy=function(){this.$handle.remove()},this.update=function(e){if(t.isDisabled())return!1;var i=dom.isImg(e),n=this.$handle.find(".note-control-selection");if(t.invoke("imagePopover.update",e),i){var r=$(e),o=r.position(),s={left:o.left+parseInt(r.css("marginLeft"),10),top:o.top+parseInt(r.css("marginTop"),10)},a={w:r.outerWidth(!1),h:r.outerHeight(!1)};n.css({display:"block",left:s.left,top:s.top,width:a.w,height:a.h}).data("target",r);var l=a.w+"x"+a.h;n.find(".note-control-selection-info").text(l),t.invoke("editor.saveTarget",e)}else this.hide();return i},this.hide=function(){t.invoke("editor.clearTarget"),this.$handle.children().hide()}},AutoLink=function(t){var e=this,i=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i;this.events={"summernote.keyup":function(t,i){i.isDefaultPrevented()||e.handleKeyup(i)},"summernote.keydown":function(t,i){e.handleKeydown(i)}},this.initialize=function(){this.lastWordRange=null},this.destroy=function(){this.lastWordRange=null},this.replace=function(){if(this.lastWordRange){var e=this.lastWordRange.toString(),n=e.match(i);if(n&&(n[1]||n[2])){var r=n[1]?e:"http://"+e,o=$("<a />").html(e).attr("href",r)[0];this.lastWordRange.insertNode(o),this.lastWordRange=null,t.invoke("editor.focus")}}},this.handleKeydown=function(e){if(list.contains([key.code.ENTER,key.code.SPACE],e.keyCode)){var i=t.invoke("editor.createRange").getWordRange();this.lastWordRange=i}},this.handleKeyup=function(t){list.contains([key.code.ENTER,key.code.SPACE],t.keyCode)&&this.replace()}},AutoSync=function(t){var e=t.layoutInfo.note;this.events={"summernote.change":function(){e.val(t.invoke("code"))}},this.shouldInitialize=function(){return dom.isTextarea(e[0])}},Placeholder=function(t){var e=this,i=t.layoutInfo.editingArea,n=t.options;this.events={"summernote.init summernote.change":function(){e.update()},"summernote.codeview.toggled":function(){e.update()}},this.shouldInitialize=function(){return!!n.placeholder},this.initialize=function(){this.$placeholder=$('<div class="note-placeholder">'),this.$placeholder.on("click",function(){t.invoke("focus")}).text(n.placeholder).prependTo(i)},this.destroy=function(){this.$placeholder.remove()},this.update=function(){var e=!t.invoke("codeview.isActivated")&&t.invoke("editor.isEmpty");this.$placeholder.toggle(e)}},Buttons=function(t){var e=this,i=$.summernote.ui,n=t.layoutInfo.toolbar,r=t.options,o=r.langInfo,s=func.invertObject(r.keyMap[agent.isMac?"mac":"pc"]),a=this.representShortcut=function(t){var e=s[t];return r.shortcuts&&e?(agent.isMac&&(e=e.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(e=e.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""};this.initialize=function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}},this.destroy=function(){delete this.fontInstalledMap},this.isFontInstalled=function(t){return e.fontInstalledMap.hasOwnProperty(t)||(e.fontInstalledMap[t]=agent.isFontInstalled(t)||list.contains(r.fontNamesIgnoreCheck,t)),e.fontInstalledMap[t]},this.addToolbarButtons=function(){t.memo("button.style",function(){return i.buttonGroup([i.button({className:"dropdown-toggle",contents:i.icon(r.icons.magic)+" "+i.icon(r.icons.caret,"span"),tooltip:o.style.style,data:{toggle:"dropdown"}}),i.dropdown({className:"dropdown-style",items:t.options.styleTags,template:function(t){"string"==typeof t&&(t={tag:t,title:o.style.hasOwnProperty(t)?o.style[t]:t});var e=t.tag,i=t.title;return"<"+e+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+i+"</"+e+">"},click:t.createInvokeHandler("editor.formatBlock")})]).render()}),t.memo("button.bold",function(){return i.button({className:"note-btn-bold",contents:i.icon(r.icons.bold),tooltip:o.font.bold+a("bold"),click:t.createInvokeHandlerAndUpdateState("editor.bold")}).render()}),t.memo("button.italic",function(){return i.button({className:"note-btn-italic",contents:i.icon(r.icons.italic),tooltip:o.font.italic+a("italic"),click:t.createInvokeHandlerAndUpdateState("editor.italic")}).render()}),t.memo("button.underline",function(){return i.button({className:"note-btn-underline",contents:i.icon(r.icons.underline),tooltip:o.font.underline+a("underline"),click:t.createInvokeHandlerAndUpdateState("editor.underline")}).render()}),t.memo("button.clear",function(){return i.button({contents:i.icon(r.icons.eraser),tooltip:o.font.clear+a("removeFormat"),click:t.createInvokeHandler("editor.removeFormat")}).render()}),t.memo("button.strikethrough",function(){return i.button({className:"note-btn-strikethrough",contents:i.icon(r.icons.strikethrough),tooltip:o.font.strikethrough+a("strikethrough"),click:t.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}),t.memo("button.superscript",function(){return i.button({className:"note-btn-superscript",contents:i.icon(r.icons.superscript),tooltip:o.font.superscript,click:t.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}),t.memo("button.subscript",function(){return i.button({className:"note-btn-subscript",contents:i.icon(r.icons.subscript),tooltip:o.font.subscript,click:t.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}),t.memo("button.fontname",function(){return i.buttonGroup([i.button({className:"dropdown-toggle",contents:'<span class="note-current-fontname"/> '+i.icon(r.icons.caret,"span"),tooltip:o.font.name,data:{toggle:"dropdown"}}),i.dropdownCheck({className:"dropdown-fontname",checkClassName:r.icons.menuCheck,items:r.fontNames.filter(e.isFontInstalled),template:function(t){return'<span style="font-family:'+t+'">'+t+"</span>"},click:t.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}),t.memo("button.fontsize",function(){return i.buttonGroup([i.button({className:"dropdown-toggle",contents:'<span class="note-current-fontsize"/>'+i.icon(r.icons.caret,"span"),tooltip:o.font.size,data:{toggle:"dropdown"}}),i.dropdownCheck({className:"dropdown-fontsize",checkClassName:r.icons.menuCheck,items:r.fontSizes,click:t.createInvokeHandler("editor.fontSize")})]).render()}),t.memo("button.color",function(){return i.buttonGroup({className:"note-color",children:[i.button({className:"note-current-color-button",contents:i.icon(r.icons.font+" note-recent-color"),tooltip:o.color.recent,click:function(e){var i=$(e.currentTarget);t.invoke("editor.color",{backColor:i.attr("data-backColor"),foreColor:i.attr("data-foreColor")})},callback:function(t){t.find(".note-recent-color").css("background-color","#FFFF00"),t.attr("data-backColor","#FFFF00")}}),i.button({className:"dropdown-toggle",contents:i.icon(r.icons.caret,"span"),tooltip:o.color.more,data:{toggle:"dropdown"}}),i.dropdown({items:["<li>",'<div class="btn-group">','  <div class="note-palette-title">'+o.color.background+"</div>","  <div>",'    <button type="button" class="note-color-reset btn btn-default" data-event="backColor" data-value="inherit">',o.color.transparent,"    </button>","  </div>",'  <div class="note-holder" data-event="backColor"/>',"</div>",'<div class="btn-group">','  <div class="note-palette-title">'+o.color.foreground+"</div>","  <div>",'    <button type="button" class="note-color-reset btn btn-default" data-event="removeFormat" data-value="foreColor">',o.color.resetToDefault,"    </button>","  </div>",'  <div class="note-holder" data-event="foreColor"/>',"</div>","</li>"].join(""),callback:function(t){t.find(".note-holder").each(function(){var t=$(this);t.append(i.palette({colors:r.colors,eventName:t.data("event"),tooltip:r.tooltip}).render())})},click:function(e){var i=$(e.target),n=i.data("event"),r=i.data("value");if(n&&r){var o="backColor"===n?"background-color":"color",s=i.closest(".note-color").find(".note-recent-color"),a=i.closest(".note-color").find(".note-current-color-button");s.css(o,r),a.attr("data-"+n,r),t.invoke("editor."+n,r)}}})]}).render()}),t.memo("button.ul",function(){return i.button({contents:i.icon(r.icons.unorderedlist),tooltip:o.lists.unordered+a("insertUnorderedList"),click:t.createInvokeHandler("editor.insertUnorderedList")}).render()}),t.memo("button.ol",function(){return i.button({contents:i.icon(r.icons.orderedlist),tooltip:o.lists.ordered+a("insertOrderedList"),click:t.createInvokeHandler("editor.insertOrderedList")}).render()});var n=i.button({contents:i.icon(r.icons.alignLeft),tooltip:o.paragraph.left+a("justifyLeft"),click:t.createInvokeHandler("editor.justifyLeft")}),s=i.button({contents:i.icon(r.icons.alignCenter),tooltip:o.paragraph.center+a("justifyCenter"),click:t.createInvokeHandler("editor.justifyCenter")}),l=i.button({contents:i.icon(r.icons.alignRight),tooltip:o.paragraph.right+a("justifyRight"),click:t.createInvokeHandler("editor.justifyRight")}),c=i.button({contents:i.icon(r.icons.alignJustify),tooltip:o.paragraph.justify+a("justifyFull"),click:t.createInvokeHandler("editor.justifyFull")}),h=i.button({contents:i.icon(r.icons.outdent),tooltip:o.paragraph.outdent+a("outdent"),click:t.createInvokeHandler("editor.outdent")}),d=i.button({contents:i.icon(r.icons.indent),tooltip:o.paragraph.indent+a("indent"),click:t.createInvokeHandler("editor.indent")});t.memo("button.justifyLeft",func.invoke(n,"render")),t.memo("button.justifyCenter",func.invoke(s,"render")),t.memo("button.justifyRight",func.invoke(l,"render")),t.memo("button.justifyFull",func.invoke(c,"render")),t.memo("button.outdent",func.invoke(h,"render")),t.memo("button.indent",func.invoke(d,"render")),t.memo("button.paragraph",function(){return i.buttonGroup([i.button({className:"dropdown-toggle",contents:i.icon(r.icons.alignLeft)+" "+i.icon(r.icons.caret,"span"),tooltip:o.paragraph.paragraph,data:{toggle:"dropdown"}}),i.dropdown([i.buttonGroup({className:"note-align",children:[n,s,l,c]}),i.buttonGroup({className:"note-list",children:[h,d]})])]).render()}),t.memo("button.height",function(){return i.buttonGroup([i.button({className:"dropdown-toggle",contents:i.icon(r.icons.textHeight)+" "+i.icon(r.icons.caret,"span"),tooltip:o.font.height,data:{toggle:"dropdown"}}),i.dropdownCheck({items:r.lineHeights,checkClassName:r.icons.menuCheck,className:"dropdown-line-height",click:t.createInvokeHandler("editor.lineHeight")})]).render()}),t.memo("button.table",function(){return i.buttonGroup([i.button({className:"dropdown-toggle",contents:i.icon(r.icons.table)+" "+i.icon(r.icons.caret,"span"),tooltip:o.table.table,data:{toggle:"dropdown"}}),i.dropdown({className:"note-table",items:['<div class="note-dimension-picker">','  <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>','  <div class="note-dimension-picker-highlighted"/>','  <div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(i){i.find(".note-dimension-picker-mousecatcher").css({width:r.insertTableMaxSize.col+"em",height:r.insertTableMaxSize.row+"em"}).mousedown(t.createInvokeHandler("editor.insertTable")).on("mousemove",e.tableMoveHandler)}}).render()}),t.memo("button.link",function(){return i.button({contents:i.icon(r.icons.link),tooltip:o.link.link+a("linkDialog.show"),click:t.createInvokeHandler("linkDialog.show")}).render()}),t.memo("button.picture",function(){return i.button({contents:i.icon(r.icons.picture),tooltip:o.image.image,click:t.createInvokeHandler("imageDialog.show")}).render()}),t.memo("button.video",function(){return i.button({contents:i.icon(r.icons.video),tooltip:o.video.video,click:t.createInvokeHandler("videoDialog.show")}).render()}),t.memo("button.hr",function(){return i.button({contents:i.icon(r.icons.minus),tooltip:o.hr.insert+a("insertHorizontalRule"),click:t.createInvokeHandler("editor.insertHorizontalRule")}).render()}),t.memo("button.fullscreen",function(){return i.button({className:"btn-fullscreen",contents:i.icon(r.icons.arrowsAlt),tooltip:o.options.fullscreen,click:t.createInvokeHandler("fullscreen.toggle")}).render()}),t.memo("button.codeview",function(){return i.button({className:"btn-codeview",contents:i.icon(r.icons.code),tooltip:o.options.codeview,click:t.createInvokeHandler("codeview.toggle")}).render()}),t.memo("button.redo",function(){return i.button({contents:i.icon(r.icons.redo),tooltip:o.history.redo+a("redo"),click:t.createInvokeHandler("editor.redo")}).render()}),t.memo("button.undo",function(){return i.button({contents:i.icon(r.icons.undo),tooltip:o.history.undo+a("undo"),click:t.createInvokeHandler("editor.undo")}).render()}),t.memo("button.help",function(){return i.button({contents:i.icon(r.icons.question),tooltip:o.options.help,click:t.createInvokeHandler("helpDialog.show")}).render()})},this.addImagePopoverButtons=function(){t.memo("button.imageSize100",function(){return i.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:o.image.resizeFull,click:t.createInvokeHandler("editor.resize","1")}).render()}),t.memo("button.imageSize50",function(){return i.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:o.image.resizeHalf,click:t.createInvokeHandler("editor.resize","0.5")}).render()}),t.memo("button.imageSize25",function(){return i.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:o.image.resizeQuarter,click:t.createInvokeHandler("editor.resize","0.25")}).render()}),t.memo("button.floatLeft",function(){return i.button({contents:i.icon(r.icons.alignLeft),tooltip:o.image.floatLeft,click:t.createInvokeHandler("editor.floatMe","left")}).render()}),t.memo("button.floatRight",function(){return i.button({contents:i.icon(r.icons.alignRight),tooltip:o.image.floatRight,click:t.createInvokeHandler("editor.floatMe","right")}).render()}),t.memo("button.floatNone",function(){return i.button({contents:i.icon(r.icons.alignJustify),tooltip:o.image.floatNone,click:t.createInvokeHandler("editor.floatMe","none")}).render()}),t.memo("button.removeMedia",function(){return i.button({contents:i.icon(r.icons.trash),tooltip:o.image.remove,click:t.createInvokeHandler("editor.removeMedia")}).render()})},this.addLinkPopoverButtons=function(){t.memo("button.linkDialogShow",function(){return i.button({contents:i.icon(r.icons.link),tooltip:o.link.edit,click:t.createInvokeHandler("linkDialog.show")}).render()}),t.memo("button.unlink",function(){return i.button({contents:i.icon(r.icons.unlink),tooltip:o.link.unlink,click:t.createInvokeHandler("editor.unlink")}).render()})},this.addTablePopoverButtons=function(){t.memo("button.addRowUp",function(){return i.button({className:"btn-md",contents:i.icon(r.icons.rowAbove),tooltip:o.table.addRowAbove,click:t.createInvokeHandler("editor.addRow","top")}).render()}),t.memo("button.addRowDown",function(){return i.button({className:"btn-md",contents:i.icon(r.icons.rowBelow),tooltip:o.table.addRowBelow,click:t.createInvokeHandler("editor.addRow","bottom")}).render()}),t.memo("button.addColLeft",function(){return i.button({className:"btn-md",contents:i.icon(r.icons.colBefore),tooltip:o.table.addColLeft,click:t.createInvokeHandler("editor.addCol","left")}).render()}),t.memo("button.addColRight",function(){return i.button({className:"btn-md",contents:i.icon(r.icons.colAfter),tooltip:o.table.addColRight,click:t.createInvokeHandler("editor.addCol","right")}).render()}),t.memo("button.deleteRow",function(){return i.button({className:"btn-md",contents:i.icon(r.icons.rowRemove),tooltip:o.table.delRow,click:t.createInvokeHandler("editor.deleteRow")}).render()}),t.memo("button.deleteCol",function(){return i.button({className:"btn-md",contents:i.icon(r.icons.colRemove),tooltip:o.table.delCol,click:t.createInvokeHandler("editor.deleteCol")}).render()}),t.memo("button.deleteTable",function(){return i.button({className:"btn-md",contents:i.icon(r.icons.trash),tooltip:o.table.delTable,click:t.createInvokeHandler("editor.deleteTable")}).render()})},this.build=function(e,n){for(var r=0,o=n.length;r<o;r++){for(var s=n[r],a=s[0],l=s[1],c=i.buttonGroup({className:"note-"+a}).render(),h=0,d=l.length;h<d;h++){var u=t.memo("button."+l[h]);u&&c.append("function"==typeof u?u(t):u)}c.appendTo(e)}},this.updateCurrentStyle=function(){var i=t.invoke("editor.currentStyle");if(this.updateBtnStates({".note-btn-bold":function(){return"bold"===i["font-bold"]},".note-btn-italic":function(){return"italic"===i["font-italic"]},".note-btn-underline":function(){return"underline"===i["font-underline"]},".note-btn-subscript":function(){return"subscript"===i["font-subscript"]},".note-btn-superscript":function(){return"superscript"===i["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===i["font-strikethrough"]}}),i["font-family"]){var r=i["font-family"].split(",").map(function(t){return t.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),o=list.find(r,e.isFontInstalled);n.find(".dropdown-fontname li a").each(function(){var t=$(this).data("value")+""==o+"";this.className=t?"checked":""}),n.find(".note-current-fontname").text(o)}if(i["font-size"]){var s=i["font-size"];n.find(".dropdown-fontsize li a").each(function(){var t=$(this).data("value")+""==s+"";this.className=t?"checked":""}),n.find(".note-current-fontsize").text(s)}if(i["line-height"]){var a=i["line-height"];n.find(".dropdown-line-height li a").each(function(){var t=$(this).data("value")+""==a+"";this.className=t?"checked":""})}},this.updateBtnStates=function(t){$.each(t,function(t,e){i.toggleBtnActive(n.find(t),e())})},this.tableMoveHandler=function(t){var e,i=$(t.target.parentNode),n=i.next(),o=i.find(".note-dimension-picker-mousecatcher"),s=i.find(".note-dimension-picker-highlighted"),a=i.find(".note-dimension-picker-unhighlighted");if(void 0===t.offsetX){var l=$(t.target).offset();e={x:t.pageX-l.left,y:t.pageY-l.top}}else e={x:t.offsetX,y:t.offsetY};var c={c:Math.ceil(e.x/18)||1,r:Math.ceil(e.y/18)||1};s.css({width:c.c+"em",height:c.r+"em"}),o.data("value",c.c+"x"+c.r),3<c.c&&c.c<r.insertTableMaxSize.col&&a.css({width:c.c+1+"em"}),3<c.r&&c.r<r.insertTableMaxSize.row&&a.css({height:c.r+1+"em"}),n.html(c.c+" x "+c.r)}},Toolbar=function(t){var e=$.summernote.ui,i=t.layoutInfo.note,n=t.layoutInfo.toolbar,r=t.options;this.shouldInitialize=function(){return!r.airMode},this.initialize=function(){r.toolbar=r.toolbar||[],r.toolbar.length?t.invoke("buttons.build",n,r.toolbar):n.hide(),r.toolbarContainer&&n.appendTo(r.toolbarContainer),i.on("summernote.keyup summernote.mouseup summernote.change",function(){t.invoke("buttons.updateCurrentStyle")}),t.invoke("buttons.updateCurrentStyle")},this.destroy=function(){n.children().remove()},this.updateFullscreen=function(t){e.toggleBtnActive(n.find(".btn-fullscreen"),t)},this.updateCodeview=function(t){e.toggleBtnActive(n.find(".btn-codeview"),t),t?this.deactivate():this.activate()},this.activate=function(t){var i=n.find("button");t||(i=i.not(".btn-codeview")),e.toggleBtn(i,!0)},this.deactivate=function(t){var i=n.find("button");t||(i=i.not(".btn-codeview")),e.toggleBtn(i,!1)}},LinkDialog=function(t){var e=this,i=$.summernote.ui,n=t.layoutInfo.editor,r=t.options,o=r.langInfo;this.initialize=function(){var t=r.dialogsInBody?$(document.body):n,e='<div class="form-group"><label>'+o.link.textToDisplay+'</label><input class="note-link-text form-control" type="text" /></div><div class="form-group"><label>'+o.link.url+'</label><input class="note-link-url form-control" type="text" value="http://" /></div>'+(r.disableLinkTarget?"":'<div class="checkbox"><label for="sn-checkbox-open-in-new-window"><input type="checkbox" id="sn-checkbox-open-in-new-window" checked />'+o.link.openInNewWindow+"</label></div>"),s='<button href="#" class="btn btn-primary note-link-btn disabled" disabled>'+o.link.insert+"</button>";this.$dialog=i.dialog({className:"link-dialog",title:o.link.insert,fade:r.dialogsFade,body:e,footer:s}).render().appendTo(t)},this.destroy=function(){i.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===key.code.ENTER&&e.trigger("click")})},this.toggleLinkBtn=function(t,e,n){i.toggleBtn(t,e.val()&&n.val())},this.showLinkDialog=function(n){return $.Deferred(function(r){var o=e.$dialog.find(".note-link-text"),s=e.$dialog.find(".note-link-url"),a=e.$dialog.find(".note-link-btn"),l=e.$dialog.find("input[type=checkbox]");i.onDialogShown(e.$dialog,function(){t.triggerEvent("dialog.shown"),n.url||(n.url=n.text),o.val(n.text);var i=function(){e.toggleLinkBtn(a,o,s),n.text=o.val()};o.on("input",i).on("paste",function(){setTimeout(i,0)});var c=function(){e.toggleLinkBtn(a,o,s),n.text||o.val(s.val())};s.on("input",c).on("paste",function(){setTimeout(c,0)}).val(n.url).trigger("focus"),e.toggleLinkBtn(a,o,s),e.bindEnterKey(s,a),e.bindEnterKey(o,a);var h=void 0!==n.isNewWindow?n.isNewWindow:t.options.linkTargetBlank;l.prop("checked",h),a.one("click",function(t){t.preventDefault(),r.resolve({range:n.range,url:s.val(),text:o.val(),isNewWindow:l.is(":checked")}),e.$dialog.modal("hide")})}),i.onDialogHidden(e.$dialog,function(){o.off("input paste keypress"),s.off("input paste keypress"),a.off("click"),"pending"===r.state()&&r.reject()}),i.showDialog(e.$dialog)}).promise()},this.show=function(){var e=t.invoke("editor.getLinkInfo");t.invoke("editor.saveRange"),this.showLinkDialog(e).then(function(e){t.invoke("editor.restoreRange"),t.invoke("editor.createLink",e)}).fail(function(){t.invoke("editor.restoreRange")})},t.memo("help.linkDialog.show",r.langInfo.help["linkDialog.show"])},LinkPopover=function(t){var e=this,i=$.summernote.ui,n=t.options;this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){e.update()},"summernote.disable summernote.dialog.shown":function(){e.hide()}},this.shouldInitialize=function(){return!list.isEmpty(n.popover.link)},this.initialize=function(){this.$popover=i.popover({className:"note-link-popover",callback:function(t){t.find(".popover-content").prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo("body");var e=this.$popover.find(".popover-content");t.invoke("buttons.build",e,n.popover.link)},this.destroy=function(){this.$popover.remove()},this.update=function(){if(t.invoke("editor.hasFocus")){var e=t.invoke("editor.createRange");if(e.isCollapsed()&&e.isOnAnchor()){var i=dom.ancestor(e.sc,dom.isAnchor),n=$(i).attr("href");this.$popover.find("a").attr("href",n).html(n);var r=dom.posFromPlaceholder(i);this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide()}else this.hide()},this.hide=function(){this.$popover.hide()}},ImageDialog=function(t){var e=this,i=$.summernote.ui,n=t.layoutInfo.editor,r=t.options,o=r.langInfo;this.initialize=function(){var t=r.dialogsInBody?$(document.body):n,e="";if(r.maximumImageFileSize){var s=Math.floor(Math.log(r.maximumImageFileSize)/Math.log(1024)),a=1*(r.maximumImageFileSize/Math.pow(1024,s)).toFixed(2)+" "+" KMGTP"[s]+"B";e="<small>"+o.image.maximumFileSize+" : "+a+"</small>"}var l='<div class="form-group note-group-select-from-files"><label>'+o.image.selectFromFiles+'</label><input class="note-image-input form-control" type="file" name="files" accept="image/*" multiple="multiple" />'+e+'</div><div class="form-group note-group-image-url" style="overflow:auto;"><label>'+o.image.url+'</label><input class="note-image-url form-control col-md-12" type="text" /></div>',c='<button href="#" class="btn btn-primary note-image-btn disabled" disabled>'+o.image.insert+"</button>";this.$dialog=i.dialog({title:o.image.insert,fade:r.dialogsFade,body:l,footer:c}).render().appendTo(t)},this.destroy=function(){i.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===key.code.ENTER&&e.trigger("click")})},this.show=function(){t.invoke("editor.saveRange"),this.showImageDialog().then(function(n){i.hideDialog(e.$dialog),t.invoke("editor.restoreRange"),"string"==typeof n?t.invoke("editor.insertImage",n):t.invoke("editor.insertImagesOrCallback",n)}).fail(function(){t.invoke("editor.restoreRange")})},this.showImageDialog=function(){return $.Deferred(function(n){var r=e.$dialog.find(".note-image-input"),o=e.$dialog.find(".note-image-url"),s=e.$dialog.find(".note-image-btn");i.onDialogShown(e.$dialog,function(){t.triggerEvent("dialog.shown"),r.replaceWith(r.clone().on("change",function(){n.resolve(this.files||this.value)}).val("")),s.click(function(t){t.preventDefault(),n.resolve(o.val())}),o.on("keyup paste",function(){var t=o.val();i.toggleBtn(s,t)}).val("").trigger("focus"),e.bindEnterKey(o,s)}),i.onDialogHidden(e.$dialog,function(){r.off("change"),o.off("keyup paste keypress"),s.off("click"),"pending"===n.state()&&n.reject()}),i.showDialog(e.$dialog)})}},ImagePopover=function(t){var e=this,i=$.summernote.ui,n=t.layoutInfo.editable[0],r=t.options;this.events={"summernote.disable":function(){e.hide()}},this.shouldInitialize=function(){return!list.isEmpty(r.popover.image)},this.initialize=function(){this.$popover=i.popover({className:"note-image-popover"}).render().appendTo("body");var e=this.$popover.find(".popover-content");t.invoke("buttons.build",e,r.popover.image)},this.destroy=function(){this.$popover.remove()},this.update=function(t){if(dom.isImg(t)){var e=dom.posFromPlaceholder(t),i=dom.posFromPlaceholder(n);this.$popover.css({display:"block",left:e.left,top:Math.min(e.top,i.top)})}else this.hide()},this.hide=function(){this.$popover.hide()}},TablePopover=function(t){var e=this,i=$.summernote.ui,n=t.options;this.events={"summernote.mousedown":function(t,i){e.update(i.target)},"summernote.keyup summernote.scroll summernote.change":function(){e.update()},"summernote.disable":function(){e.hide()}},this.shouldInitialize=function(){return!list.isEmpty(n.popover.table)},this.initialize=function(){this.$popover=i.popover({className:"note-table-popover"}).render().appendTo("body");var e=this.$popover.find(".popover-content");t.invoke("buttons.build",e,n.popover.table),agent.isFF&&document.execCommand("enableInlineTableEditing",!1,!1)},this.destroy=function(){this.$popover.remove()},this.update=function(e){if(t.isDisabled())return!1;var i=dom.isCell(e);if(i){var n=dom.posFromPlaceholder(e);this.$popover.css({display:"block",left:n.left,top:n.top})}else this.hide();return i},this.hide=function(){this.$popover.hide()}},VideoDialog=function(t){var e=this,i=$.summernote.ui,n=t.layoutInfo.editor,r=t.options,o=r.langInfo;this.initialize=function(){var t=r.dialogsInBody?$(document.body):n,e='<div class="form-group row-fluid"><label>'+o.video.url+' <small class="text-muted">'+o.video.providers+'</small></label><input class="note-video-url form-control span12" type="text" /></div>',s='<button href="#" class="btn btn-primary note-video-btn disabled" disabled>'+o.video.insert+"</button>";this.$dialog=i.dialog({title:o.video.insert,fade:r.dialogsFade,body:e,footer:s}).render().appendTo(t)},this.destroy=function(){i.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===key.code.ENTER&&e.trigger("click")})},this.createVideoNode=function(t){var e,i=/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,n=t.match(i),r=/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/,o=t.match(r),s=/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/,a=t.match(s),l=/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/,c=t.match(l),h=/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,d=t.match(h),u=/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/,p=t.match(u),f=/\/\/v\.qq\.com.*?vid=(.+)/,m=t.match(f),g=/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/,v=t.match(g),y=/^.+.(mp4|m4v)$/,b=t.match(y),_=/^.+.(ogg|ogv)$/,x=t.match(_),w=/^.+.(webm)$/,k=t.match(w);if(n&&11===n[1].length){var S=n[1];e=$("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+S).attr("width","640").attr("height","360")}else if(o&&o[0].length)e=$("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+o[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(a&&a[0].length)e=$("<iframe>").attr("frameborder",0).attr("src",a[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(c&&c[3].length)e=$("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+c[3]).attr("width","640").attr("height","360");else if(d&&d[2].length)e=$("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+d[2]).attr("width","640").attr("height","360");else if(p&&p[1].length)e=$("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+p[1]);else if(m&&m[1].length||v&&v[2].length){var C=m&&m[1].length?m[1]:v[2];e=$("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","http://v.qq.com/iframe/player.html?vid="+C+"&amp;auto=0")}else{if(!(b||x||k))return!1;e=$("<video controls>").attr("src",t).attr("width","640").attr("height","360")}return e.addClass("note-video-clip"),e[0]},this.show=function(){var n=t.invoke("editor.getSelectedText");t.invoke("editor.saveRange"),this.showVideoDialog(n).then(function(n){i.hideDialog(e.$dialog),t.invoke("editor.restoreRange");var r=e.createVideoNode(n);r&&t.invoke("editor.insertNode",r)}).fail(function(){t.invoke("editor.restoreRange")})},this.showVideoDialog=function(n){return $.Deferred(function(r){var o=e.$dialog.find(".note-video-url"),s=e.$dialog.find(".note-video-btn");i.onDialogShown(e.$dialog,function(){t.triggerEvent("dialog.shown"),o.val(n).on("input",function(){i.toggleBtn(s,o.val())}).trigger("focus"),s.click(function(t){t.preventDefault(),r.resolve(o.val())}),e.bindEnterKey(o,s)}),i.onDialogHidden(e.$dialog,function(){o.off("input"),s.off("click"),"pending"===r.state()&&r.reject()}),i.showDialog(e.$dialog)})}},HelpDialog=function(t){var e=this,i=$.summernote.ui,n=t.layoutInfo.editor,r=t.options,o=r.langInfo;this.createShortCutList=function(){var e=r.keyMap[agent.isMac?"mac":"pc"];return Object.keys(e).map(function(i){var n=e[i],r=$('<div><div class="help-list-item"/></div>');return r.append($("<label><kbd>"+i+"</kdb></label>").css({width:180,"margin-right":10})).append($("<span/>").html(t.memo("help."+n)||n)),r.html()}).join("")},this.initialize=function(){var t=r.dialogsInBody?$(document.body):n,e=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.7</a> · ','<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=i.dialog({title:o.options.help,fade:r.dialogsFade,body:this.createShortCutList(),footer:e,callback:function(t){t.find(".modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)},this.destroy=function(){i.hideDialog(this.$dialog),this.$dialog.remove()},this.showHelpDialog=function(){return $.Deferred(function(n){i.onDialogShown(e.$dialog,function(){t.triggerEvent("dialog.shown"),n.resolve()}),i.showDialog(e.$dialog)}).promise()},this.show=function(){t.invoke("editor.saveRange"),this.showHelpDialog().then(function(){t.invoke("editor.restoreRange")})}},AirPopover=function(t){var e=this,i=$.summernote.ui,n=t.options;this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){e.update()},"summernote.disable summernote.change summernote.dialog.shown":function(){e.hide()},"summernote.focusout":function(t,i){agent.isFF||i.relatedTarget&&dom.ancestor(i.relatedTarget,func.eq(e.$popover[0]))||e.hide()}},this.shouldInitialize=function(){return n.airMode&&!list.isEmpty(n.popover.air)},this.initialize=function(){this.$popover=i.popover({className:"note-air-popover"}).render().appendTo("body");var e=this.$popover.find(".popover-content");t.invoke("buttons.build",e,n.popover.air)},this.destroy=function(){this.$popover.remove()},this.update=function(){var e=t.invoke("editor.currentStyle");if(e.range&&!e.range.isCollapsed()){var i=list.last(e.range.getClientRects());if(i){var n=func.rect2bnd(i);this.$popover.css({display:"block",left:Math.max(n.left+n.width/2,0)-20,top:n.top+n.height})}}else this.hide()},this.hide=function(){this.$popover.hide()}},HintPopover=function(t){var e=this,i=$.summernote.ui,n=t.options.hint||[],r=t.options.hintDirection||"bottom",o=$.isArray(n)?n:[n];this.events={"summernote.keyup":function(t,i){i.isDefaultPrevented()||e.handleKeyup(i)},"summernote.keydown":function(t,i){e.handleKeydown(i)},"summernote.disable summernote.dialog.shown":function(){e.hide()}},this.shouldInitialize=function(){return o.length>0},this.initialize=function(){this.lastWordRange=null,this.$popover=i.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo("body"),this.$popover.hide(),this.$content=this.$popover.find(".popover-content"),this.$content.on("click",".note-hint-item",function(){e.$content.find(".active").removeClass("active"),$(this).addClass("active"),e.replace()})},this.destroy=function(){this.$popover.remove()},this.selectItem=function(t){this.$content.find(".active").removeClass("active"),t.addClass("active"),this.$content[0].scrollTop=t[0].offsetTop-this.$content.innerHeight()/2},this.moveDown=function(){var t=this.$content.find(".note-hint-item.active"),e=t.next();if(e.length)this.selectItem(e);else{var i=t.parent().next();i.length||(i=this.$content.find(".note-hint-group").first()),this.selectItem(i.find(".note-hint-item").first())}},this.moveUp=function(){var t=this.$content.find(".note-hint-item.active"),e=t.prev();if(e.length)this.selectItem(e);else{var i=t.parent().prev();i.length||(i=this.$content.find(".note-hint-group").last()),this.selectItem(i.find(".note-hint-item").last())}},this.replace=function(){var e=this.$content.find(".note-hint-item.active");if(e.length){var i=this.nodeFromItem(e);this.lastWordRange.insertNode(i),range.createFromNode(i).collapse().select(),this.lastWordRange=null,this.hide(),t.triggerEvent("change",t.layoutInfo.editable.html(),t.layoutInfo.editable),t.invoke("editor.focus")}},this.nodeFromItem=function(t){var e=o[t.data("index")],i=t.data("item"),n=e.content?e.content(i):i;return"string"==typeof n&&(n=dom.createText(n)),n},this.createItemTemplates=function(t,e){var i=o[t];return e.map(function(e,n){var r=$('<div class="note-hint-item"/>');return r.append(i.template?i.template(e):e+""),r.data({index:t,item:e}),0===t&&0===n&&r.addClass("active"),r})},this.handleKeydown=function(t){this.$popover.is(":visible")&&(t.keyCode===key.code.ENTER?(t.preventDefault(),this.replace()):t.keyCode===key.code.UP?(t.preventDefault(),this.moveUp()):t.keyCode===key.code.DOWN&&(t.preventDefault(),this.moveDown()))},this.searchKeyword=function(t,e,i){var n=o[t];if(n&&n.match.test(e)&&n.search){var r=n.match.exec(e);n.search(r[1],i)}else i()},this.createGroup=function(t,i){var n=$('<div class="note-hint-group note-hint-group-'+t+'"/>');return this.searchKeyword(t,i,function(i){(i=i||[]).length&&(n.html(e.createItemTemplates(t,i)),e.show())}),n},this.handleKeyup=function(i){if(list.contains([key.code.ENTER,key.code.UP,key.code.DOWN],i.keyCode)){if(i.keyCode===key.code.ENTER&&this.$popover.is(":visible"))return}else{var n=t.invoke("editor.createRange").getWordRange(),s=n.toString();if(o.length&&s){this.$content.empty();var a=func.rect2bnd(list.last(n.getClientRects()));a&&(this.$popover.hide(),this.lastWordRange=n,o.forEach(function(t,i){t.match.test(s)&&e.createGroup(i,s).appendTo(e.$content)}),"top"===r?this.$popover.css({left:a.left,top:a.top-this.$popover.outerHeight()-5}):this.$popover.css({left:a.left,top:a.top+a.height+5}))}else this.hide()}},this.show=function(){this.$popover.show()},this.hide=function(){this.$popover.hide()}};$.summernote=$.extend($.summernote,{version:"0.8.7",ui:ui,dom:dom,plugins:{},options:{modules:{editor:Editor,clipboard:Clipboard,dropzone:Dropzone,codeview:Codeview,statusbar:Statusbar,fullscreen:Fullscreen,handle:Handle,hintPopover:HintPopover,autoLink:AutoLink,autoSync:AutoSync,placeholder:Placeholder,buttons:Buttons,toolbar:Toolbar,linkDialog:LinkDialog,linkPopover:LinkPopover,imageDialog:ImageDialog,imagePopover:ImagePopover,tablePopover:TablePopover,videoDialog:VideoDialog,helpDialog:HelpDialog,airPopover:AirPopover},buttons:{},lang:"en-US",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popover:{image:[["imagesize",["imageSize100","imageSize50","imageSize25"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,linkTargetBlank:!0,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,direction:null,tooltip:"auto",styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onInit:null,onFocus:null,onBlur:null,onEnter:null,onKeyup:null,onKeydown:null,onImageUpload:null,onImageUploadError:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}})}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){"use strict";var e=function(e,i){var n=["autofocus","savable","hideable","width","height","resize","iconlibrary","language","footer","fullscreen","hiddenButtons","disabledButtons"];t.each(n,function(n,r){void 0!==t(e).data(r)&&((i="object"==typeof i?i:{})[r]=t(e).data(r))}),this.$ns="bootstrap-markdown",this.$element=t(e),this.$editable={el:null,type:null,attrKeys:[],attrValues:[],content:null},this.$options=t.extend(!0,{},t.fn.markdown.defaults,i,this.$element.data("options")),this.$oldContent=null,this.$isPreview=!1,this.$isFullscreen=!1,this.$editor=null,this.$textarea=null,this.$handler=[],this.$callback=[],this.$nextTab=[],this.showEditor()};e.prototype={constructor:e,__alterButtons:function(e,i){var n=this.$handler,r="all"==e,o=this;t.each(n,function(t,n){!1===(!r&&n.indexOf(e)<0)&&i(o.$editor.find('button[data-handler="'+n+'"]'))})},__buildButtons:function(e,i){var n,r=this.$ns,o=this.$handler,s=this.$callback;for(n=0;n<e.length;n++){var a,l=e[n];for(a=0;a<l.length;a++){var c,h=l[a].data,d=t("<div/>",{class:"btn-group"});for(c=0;c<h.length;c++){var u,p,f=h[c],m=r+"-"+f.name,g=this.__getIcon(f.icon),v=f.btnText?f.btnText:"",y=f.btnClass?f.btnClass:"btn",b=f.tabIndex?f.tabIndex:"-1",_=void 0!==f.hotkey?f.hotkey:"",x=void 0!==jQuery.hotkeys&&""!==_?" ("+_+")":"";(u=t("<button></button>")).text(" "+this.__localize(v)).addClass("btn-default btn-sm").addClass(y),y.match(/btn\-(primary|success|info|warning|danger|link)/)&&u.removeClass("btn-default"),u.attr({type:"button",title:this.__localize(f.title)+x,tabindex:b,"data-provider":r,"data-handler":m,"data-hotkey":_}),!0===f.toggle&&u.attr("data-toggle","button"),(p=t("<span/>")).addClass(g),p.prependTo(u),d.append(u),o.push(m),s.push(f.callback)}i.append(d)}}return i},__setListener:function(){var e=void 0!==this.$textarea.attr("rows"),i=this.$textarea.val().split("\n").length>5?this.$textarea.val().split("\n").length:"5",n=e?this.$textarea.attr("rows"):i;this.$textarea.attr("rows",n),this.$options.resize&&this.$textarea.css("resize",this.$options.resize),this.$textarea.on({focus:t.proxy(this.focus,this),keyup:t.proxy(this.keyup,this),change:t.proxy(this.change,this),select:t.proxy(this.select,this)}),this.eventSupported("keydown")&&this.$textarea.on("keydown",t.proxy(this.keydown,this)),this.eventSupported("keypress")&&this.$textarea.on("keypress",t.proxy(this.keypress,this)),this.$textarea.data("markdown",this)},__handle:function(e){var i=t(e.currentTarget),n=this.$handler,r=this.$callback,o=i.attr("data-handler"),s=r[n.indexOf(o)];t(e.currentTarget).focus(),s(this),this.change(this),o.indexOf("cmdSave")<0&&this.$textarea.focus(),e.preventDefault()},__localize:function(e){var i=t.fn.markdown.messages,n=this.$options.language;return void 0!==i&&void 0!==i[n]&&void 0!==i[n][e]?i[n][e]:e},__getIcon:function(t){return"object"==typeof t?t[this.$options.iconlibrary]:t},setFullscreen:function(e){var i=this.$editor,n=this.$textarea;!0===e?(i.addClass("md-fullscreen-mode"),t("body").addClass("md-nooverflow"),this.$options.onFullscreen(this)):(i.removeClass("md-fullscreen-mode"),t("body").removeClass("md-nooverflow"),1==this.$isPreview&&this.hidePreview().showPreview()),this.$isFullscreen=e,n.focus()},showEditor:function(){var e,i=this,n=this.$ns,r=this.$element,o=(r.css("height"),r.css("width"),this.$editable),s=this.$handler,a=this.$callback,l=this.$options,c=t("<div/>",{class:"md-editor",click:function(){i.focus()}});if(null===this.$editor){var h=t("<div/>",{class:"md-header btn-toolbar"}),d=[];if(l.buttons.length>0&&(d=d.concat(l.buttons[0])),l.additionalButtons.length>0&&t.each(l.additionalButtons[0],function(e,i){var n=t.grep(d,function(t,e){return t.name===i.name});n.length>0?n[0].data=n[0].data.concat(i.data):d.push(l.additionalButtons[0][e])}),l.reorderButtonGroups.length>0&&(d=d.filter(function(t){return l.reorderButtonGroups.indexOf(t.name)>-1}).sort(function(t,e){return l.reorderButtonGroups.indexOf(t.name)<l.reorderButtonGroups.indexOf(e.name)?-1:l.reorderButtonGroups.indexOf(t.name)>l.reorderButtonGroups.indexOf(e.name)?1:0})),d.length>0&&(h=this.__buildButtons([d],h)),l.fullscreen.enable&&h.append('<div class="md-controls"><a class="md-control md-control-fullscreen" href="#"><span class="'+this.__getIcon(l.fullscreen.icons.fullscreenOn)+'"></span></a></div>').on("click",".md-control-fullscreen",function(t){t.preventDefault(),i.setFullscreen(!0)}),c.append(h),r.is("textarea"))r.before(c),(e=r).addClass("md-input"),c.append(e);else{var u="function"==typeof toMarkdown?toMarkdown(r.html()):r.html(),p=t.trim(u);e=t("<textarea/>",{class:"md-input",val:p}),c.append(e),o.el=r,o.type=r.prop("tagName").toLowerCase(),o.content=r.html(),t(r[0].attributes).each(function(){o.attrKeys.push(this.nodeName),o.attrValues.push(this.nodeValue)}),r.replaceWith(c)}var f=t("<div/>",{class:"md-footer"}),m=!1,g="";if(l.savable){m=!0;s.push("cmdSave"),a.push(l.onSave),f.append('<button class="btn btn-success" data-provider="'+n+'" data-handler="cmdSave"><i class="icon icon-white icon-ok"></i> '+this.__localize("Save")+"</button>")}if(g="function"==typeof l.footer?l.footer(this):l.footer,""!==t.trim(g)&&(m=!0,f.append(g)),m&&c.append(f),l.width&&"inherit"!==l.width&&(jQuery.isNumeric(l.width)?(c.css("display","table"),e.css("width",l.width+"px")):c.addClass(l.width)),l.height&&"inherit"!==l.height)if(jQuery.isNumeric(l.height)){var v=l.height;h&&(v=Math.max(0,v-h.outerHeight())),f&&(v=Math.max(0,v-f.outerHeight())),e.css("height",v+"px")}else c.addClass(l.height);this.$editor=c,this.$textarea=e,this.$editable=o,this.$oldContent=this.getContent(),this.__setListener(),this.$editor.attr("id",(new Date).getTime()),this.$editor.on("click",'[data-provider="bootstrap-markdown"]',t.proxy(this.__handle,this)),(this.$element.is(":disabled")||this.$element.is("[readonly]"))&&(this.$editor.addClass("md-editor-disabled"),this.disableButtons("all")),this.eventSupported("keydown")&&"object"==typeof jQuery.hotkeys&&h.find('[data-provider="bootstrap-markdown"]').each(function(){var i=t(this),n=i.attr("data-hotkey");""!==n.toLowerCase()&&e.bind("keydown",n,function(){return i.trigger("click"),!1})}),"preview"===l.initialstate?this.showPreview():"fullscreen"===l.initialstate&&l.fullscreen.enable&&this.setFullscreen(!0)}else this.$editor.show();return l.autofocus&&(this.$textarea.focus(),this.$editor.addClass("active")),l.fullscreen.enable&&!1!==l.fullscreen&&(this.$editor.append('<div class="md-fullscreen-controls"><a href="#" class="exit-fullscreen" title="Exit fullscreen"><span class="'+this.__getIcon(l.fullscreen.icons.fullscreenOff)+'"></span></a></div>'),this.$editor.on("click",".exit-fullscreen",function(t){t.preventDefault(),i.setFullscreen(!1)})),this.hideButtons(l.hiddenButtons),this.disableButtons(l.disabledButtons),l.onShow(this),this},parseContent:function(t){var t=t||this.$textarea.val();return this.$options.parser?this.$options.parser(t):"object"==typeof markdown?markdown.toHTML(t):"function"==typeof marked?marked(t):t},showPreview:function(){var e,i,n=this.$options,r=this.$textarea,o=r.next(),s=t("<div/>",{class:"md-preview","data-provider":"markdown-preview"});return 1==this.$isPreview?this:(this.$isPreview=!0,this.disableButtons("all").enableButtons("cmdPreview"),i=n.onPreview(this),e="string"==typeof i?i:this.parseContent(),s.html(e),o&&"md-footer"==o.attr("class")?s.insertBefore(o):r.parent().append(s),s.css({width:r.outerWidth()+"px",height:r.outerHeight()+"px"}),this.$options.resize&&s.css("resize",this.$options.resize),r.hide(),s.data("markdown",this),(this.$element.is(":disabled")||this.$element.is("[readonly]"))&&(this.$editor.addClass("md-editor-disabled"),this.disableButtons("all")),this)},hidePreview:function(){return this.$isPreview=!1,this.$editor.find('div[data-provider="markdown-preview"]').remove(),this.enableButtons("all"),this.disableButtons(this.$options.disabledButtons),this.$textarea.show(),this.__setListener(),this},isDirty:function(){return this.$oldContent!=this.getContent()},getContent:function(){return this.$textarea.val()},setContent:function(t){return this.$textarea.val(t),this},findSelection:function(t){var e;if((e=this.getContent().indexOf(t))>=0&&t.length>0){var i,n=this.getSelection();return this.setSelection(e,e+t.length),i=this.getSelection(),this.setSelection(n.start,n.end),i}return null},getSelection:function(){var t=this.$textarea[0];return("selectionStart"in t&&function(){var e=t.selectionEnd-t.selectionStart;return{start:t.selectionStart,end:t.selectionEnd,length:e,text:t.value.substr(t.selectionStart,e)}}||function(){return null})()},setSelection:function(t,e){var i=this.$textarea[0];return("selectionStart"in i&&function(){i.selectionStart=t,i.selectionEnd=e}||function(){return null})()},replaceSelection:function(t){var e=this.$textarea[0];return("selectionStart"in e&&function(){return e.value=e.value.substr(0,e.selectionStart)+t+e.value.substr(e.selectionEnd,e.value.length),e.selectionStart=e.value.length,this}||function(){return e.value+=t,jQuery(e)})()},getNextTab:function(){if(0===this.$nextTab.length)return null;var t,e=this.$nextTab.shift();return"function"==typeof e?t=e():"object"==typeof e&&e.length>0&&(t=e),t},setNextTab:function(t,e){if("string"==typeof t){var i=this;this.$nextTab.push(function(){return i.findSelection(t)})}else if("number"==typeof t&&"number"==typeof e){var n=this.getSelection();this.setSelection(t,e),this.$nextTab.push(this.getSelection()),this.setSelection(n.start,n.end)}},__parseButtonNameParam:function(t){return"string"==typeof t?t.split(" "):t},enableButtons:function(e){var i=this.__parseButtonNameParam(e),n=this;return t.each(i,function(t,e){n.__alterButtons(i[t],function(t){t.removeAttr("disabled")})}),this},disableButtons:function(e){var i=this.__parseButtonNameParam(e),n=this;return t.each(i,function(t,e){n.__alterButtons(i[t],function(t){t.attr("disabled","disabled")})}),this},hideButtons:function(e){var i=this.__parseButtonNameParam(e),n=this;return t.each(i,function(t,e){n.__alterButtons(i[t],function(t){t.addClass("hidden")})}),this},showButtons:function(e){var i=this.__parseButtonNameParam(e),n=this;return t.each(i,function(t,e){n.__alterButtons(i[t],function(t){t.removeClass("hidden")})}),this},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},keyup:function(t){var e=!1;switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:var i;if(null!==(i=this.getNextTab())){var n=this;setTimeout(function(){n.setSelection(i.start,i.end)},500),e=!0}else{var r=this.getSelection();r.start==r.end&&r.end==this.getContent().length?e=!1:(this.setSelection(this.getContent().length,this.getContent().length),e=!0)}break;case 13:e=!1;break;case 27:this.$isFullscreen&&this.setFullscreen(!1),e=!1;break;default:e=!1}e&&(t.stopPropagation(),t.preventDefault()),this.$options.onChange(this)},change:function(t){return this.$options.onChange(this),this},select:function(t){return this.$options.onSelect(this),this},focus:function(e){var i=this.$options,n=(i.hideable,this.$editor);return n.addClass("active"),t(document).find(".md-editor").each(function(){if(t(this).attr("id")!==n.attr("id")){var e;null===(e=t(this).find("textarea").data("markdown"))&&(e=t(this).find('div[data-provider="markdown-preview"]').data("markdown")),e&&e.blur()}}),i.onFocus(this),this},blur:function(e){var i=this.$options,n=i.hideable,r=this.$editor,o=this.$editable;if(r.hasClass("active")||0===this.$element.parent().length){if(r.removeClass("active"),n)if(null!==o.el){var s=t("<"+o.type+"/>"),a=this.getContent(),l=this.parseContent(a);t(o.attrKeys).each(function(t,e){s.attr(o.attrKeys[t],o.attrValues[t])}),s.html(l),r.replaceWith(s)}else r.hide();i.onBlur(this)}return this}};var i=t.fn.markdown;t.fn.markdown=function(i){return this.each(function(){var n=t(this),r=n.data("markdown"),o="object"==typeof i&&i;r||n.data("markdown",r=new e(this,o))})},t.fn.markdown.messages={},t.fn.markdown.defaults={autofocus:!1,hideable:!1,savable:!1,width:"inherit",height:"inherit",resize:"none",iconlibrary:"glyph",language:"en",initialstate:"editor",parser:null,buttons:[[{name:"groupFont",data:[{name:"cmdBold",hotkey:"Ctrl+B",title:"Bold",icon:{glyph:"glyphicon glyphicon-bold",fa:"fa fa-bold","fa-3":"icon-bold"},callback:function(t){var e,i,n=t.getSelection(),r=t.getContent();e=0===n.length?t.__localize("strong text"):n.text,"**"===r.substr(n.start-2,2)&&"**"===r.substr(n.end,2)?(t.setSelection(n.start-2,n.end+2),t.replaceSelection(e),i=n.start-2):(t.replaceSelection("**"+e+"**"),i=n.start+2),t.setSelection(i,i+e.length)}},{name:"cmdItalic",title:"Italic",hotkey:"Ctrl+I",icon:{glyph:"glyphicon glyphicon-italic",fa:"fa fa-italic","fa-3":"icon-italic"},callback:function(t){var e,i,n=t.getSelection(),r=t.getContent();e=0===n.length?t.__localize("emphasized text"):n.text,"_"===r.substr(n.start-1,1)&&"_"===r.substr(n.end,1)?(t.setSelection(n.start-1,n.end+1),t.replaceSelection(e),i=n.start-1):(t.replaceSelection("_"+e+"_"),i=n.start+1),t.setSelection(i,i+e.length)}},{name:"cmdHeading",title:"Heading",hotkey:"Ctrl+H",icon:{glyph:"glyphicon glyphicon-header",fa:"fa fa-header","fa-3":"icon-font"},callback:function(t){var e,i,n,r,o=t.getSelection(),s=t.getContent();e=0===o.length?t.__localize("heading text"):o.text+"\n",n=4,"### "===s.substr(o.start-n,n)||(n=3,"###"===s.substr(o.start-n,n))?(t.setSelection(o.start-n,o.end),t.replaceSelection(e),i=o.start-n):o.start>0&&(r=s.substr(o.start-1,1))&&"\n"!=r?(t.replaceSelection("\n\n### "+e),i=o.start+6):(t.replaceSelection("### "+e),i=o.start+4),t.setSelection(i,i+e.length)}}]},{name:"groupLink",data:[{name:"cmdUrl",title:"URL/Link",hotkey:"Ctrl+L",icon:{glyph:"glyphicon glyphicon-link",fa:"fa fa-link","fa-3":"icon-link"},callback:function(e){var i,n,r,o=e.getSelection();e.getContent();i=0===o.length?e.__localize("enter link description here"):o.text,r=prompt(e.__localize("Insert Hyperlink"),"http://");var s=new RegExp("^((http|https)://|(mailto:)|(//))[a-z0-9]","i");if(null!==r&&""!==r&&"http://"!==r&&s.test(r)){var a=t("<div>"+r+"</div>").text();e.replaceSelection("["+i+"]("+a+")"),n=o.start+1,e.setSelection(n,n+i.length)}}},{name:"cmdImage",title:"Image",hotkey:"Ctrl+G",icon:{glyph:"glyphicon glyphicon-picture",fa:"fa fa-picture-o","fa-3":"icon-picture"},callback:function(e){var i,n,r,o=e.getSelection();e.getContent();i=0===o.length?e.__localize("enter image description here"):o.text,r=prompt(e.__localize("Insert Image Hyperlink"),"http://");var s=new RegExp("^((http|https)://|(//))[a-z0-9]","i");if(null!==r&&""!==r&&"http://"!==r&&s.test(r)){var a=t("<div>"+r+"</div>").text();e.replaceSelection("!["+i+"]("+a+' "'+e.__localize("enter image title here")+'")'),n=o.start+2,e.setNextTab(e.__localize("enter image title here")),e.setSelection(n,n+i.length)}}}]},{name:"groupMisc",data:[{name:"cmdList",hotkey:"Ctrl+U",title:"Unordered List",icon:{glyph:"glyphicon glyphicon-list",fa:"fa fa-list","fa-3":"icon-list-ul"},callback:function(e){var i,n,r=e.getSelection();e.getContent();if(0===r.length)i=e.__localize("list text here"),e.replaceSelection("- "+i),n=r.start+2;else if(r.text.indexOf("\n")<0)i=r.text,e.replaceSelection("- "+i),n=r.start+2;else{var o=[];i=(o=r.text.split("\n"))[0],t.each(o,function(t,e){o[t]="- "+e}),e.replaceSelection("\n\n"+o.join("\n")),n=r.start+4}e.setSelection(n,n+i.length)}},{name:"cmdListO",hotkey:"Ctrl+O",title:"Ordered List",icon:{glyph:"glyphicon glyphicon-th-list",fa:"fa fa-list-ol","fa-3":"icon-list-ol"},callback:function(e){var i,n,r=e.getSelection();e.getContent();if(0===r.length)i=e.__localize("list text here"),e.replaceSelection("1. "+i),n=r.start+3;else if(r.text.indexOf("\n")<0)i=r.text,e.replaceSelection("1. "+i),n=r.start+3;else{var o=[];i=(o=r.text.split("\n"))[0],t.each(o,function(t,e){o[t]="1. "+e}),e.replaceSelection("\n\n"+o.join("\n")),n=r.start+5}e.setSelection(n,n+i.length)}},{name:"cmdCode",hotkey:"Ctrl+K",title:"Code",icon:{glyph:"glyphicon glyphicon-asterisk",fa:"fa fa-code","fa-3":"icon-code"},callback:function(t){var e,i,n=t.getSelection(),r=t.getContent();e=0===n.length?t.__localize("code text here"):n.text,"```\n"===r.substr(n.start-4,4)&&"\n```"===r.substr(n.end,4)?(t.setSelection(n.start-4,n.end+4),t.replaceSelection(e),i=n.start-4):"`"===r.substr(n.start-1,1)&&"`"===r.substr(n.end,1)?(t.setSelection(n.start-1,n.end+1),t.replaceSelection(e),i=n.start-1):r.indexOf("\n")>-1?(t.replaceSelection("```\n"+e+"\n```"),i=n.start+4):(t.replaceSelection("`"+e+"`"),i=n.start+1),t.setSelection(i,i+e.length)}},{name:"cmdQuote",hotkey:"Ctrl+Q",title:"Quote",icon:{glyph:"glyphicon glyphicon-comment",fa:"fa fa-quote-left","fa-3":"icon-quote-left"},callback:function(e){var i,n,r=e.getSelection();e.getContent();if(0===r.length)i=e.__localize("quote here"),e.replaceSelection("> "+i),n=r.start+2;else if(r.text.indexOf("\n")<0)i=r.text,e.replaceSelection("> "+i),n=r.start+2;else{var o=[];i=(o=r.text.split("\n"))[0],t.each(o,function(t,e){o[t]="> "+e}),e.replaceSelection("\n\n"+o.join("\n")),n=r.start+4}e.setSelection(n,n+i.length)}}]},{name:"groupUtil",data:[{name:"cmdPreview",toggle:!0,hotkey:"Ctrl+P",title:"Preview",btnText:"Preview",btnClass:"btn btn-primary btn-sm",icon:{glyph:"glyphicon glyphicon-search",fa:"fa fa-search","fa-3":"icon-search"},callback:function(t){!1===t.$isPreview?t.showPreview():t.hidePreview()}}]}]],additionalButtons:[],reorderButtonGroups:[],hiddenButtons:[],disabledButtons:[],footer:"",fullscreen:{enable:!0,icons:{fullscreenOn:{fa:"fa fa-expand",glyph:"glyphicon glyphicon-fullscreen","fa-3":"icon-resize-full"},fullscreenOff:{fa:"fa fa-compress",glyph:"glyphicon glyphicon-fullscreen","fa-3":"icon-resize-small"}}},onShow:function(t){},onPreview:function(t){},onSave:function(t){},onBlur:function(t){},onFocus:function(t){},onChange:function(t){},onFullscreen:function(t){},onSelect:function(t){}},t.fn.markdown.Constructor=e,t.fn.markdown.noConflict=function(){return t.fn.markdown=i,this};var n=function(t){var e=t;e.data("markdown")?e.data("markdown").showEditor():e.markdown()},r=function(e){var i=t(document.activeElement);t(document).find(".md-editor").each(function(){var e=t(this),n=i.closest(".md-editor")[0]===this,r=e.find("textarea").data("markdown")||e.find('div[data-provider="markdown-preview"]').data("markdown");r&&!n&&r.blur()})};t(document).on("click.markdown.data-api",'[data-provide="markdown-editable"]',function(e){n(t(this)),e.preventDefault()}).on("click focusin",function(t){r()}).ready(function(){t('textarea[data-provide="markdown"]').each(function(){n(t(this))})})}),$.fn.markdown.defaults.iconlibrary="fa",function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){t.extend(t.fn,{validate:function(e){if(this.length){var i=t.data(this[0],"validator");return i||(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",function(e){i.submitButton=e.currentTarget,t(this).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(e){function n(){var n,r;return i.submitButton&&(i.settings.submitHandler||i.formSubmitted)&&(n=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),!i.settings.submitHandler||(r=i.settings.submitHandler.call(i,i.currentForm,e),n&&n.remove(),void 0!==r&&r)}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,n()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):n():(i.focusInvalid(),!1)})),i)}e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var e,i,n;return t(this[0]).is("form")?e=this.validate().form():(n=[],e=!0,i=t(this[0].form).validate(),this.each(function(){(e=i.element(this)&&e)||(n=n.concat(i.errorList))}),i.errorList=n),e},rules:function(e,i){var n,r,o,s,a,l,c=this[0];if(null!=c&&(!c.form&&c.hasAttribute("contenteditable")&&(c.form=this.closest("form")[0],c.name=this.attr("name")),null!=c.form)){if(e)switch(n=t.data(c.form,"validator").settings,r=n.rules,o=t.validator.staticRules(c),e){case"add":t.extend(o,t.validator.normalizeRule(i)),delete o.messages,r[c.name]=o,i.messages&&(n.messages[c.name]=t.extend(n.messages[c.name],i.messages));break;case"remove":return i?(l={},t.each(i.split(/\s/),function(t,e){l[e]=o[e],delete o[e]}),l):(delete r[c.name],o)}return(s=t.validator.normalizeRules(t.extend({},t.validator.classRules(c),t.validator.attributeRules(c),t.validator.dataRules(c),t.validator.staticRules(c)),c)).required&&(a=s.required,delete s.required,s=t.extend({required:a},s)),s.remote&&(a=s.remote,delete s.remote,s=t.extend(s,{remote:a})),s}}}),t.extend(t.expr.pseudos||t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){var i=t(e).val();return null!==i&&!!t.trim(""+i)},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:void 0===i?e:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(new RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(e,i){var n=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===i.which&&""===this.elementValue(e)||-1!==t.inArray(i.keyCode,n)||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,n){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(n):t(e).addClass(i).removeClass(n)},unhighlight:function(e,i,n){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(n):t(e).removeClass(i).addClass(n)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}."),step:t.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){!this.form&&this.hasAttribute("contenteditable")&&(this.form=t(this).closest("form")[0],this.name=t(this).attr("name"));var i=t.data(this.form,"validator"),n="on"+e.type.replace(/^validate/,""),r=i.settings;r[n]&&!t(this).is(r.ignore)&&r[n].call(i,this,e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i,n=this.groups={};t.each(this.settings.groups,function(e,i){"string"==typeof i&&(i=i.split(/\s/)),t.each(i,function(t,i){n[i]=e})}),i=this.settings.rules,t.each(i,function(e,n){i[e]=t.validator.normalizeRule(n)}),t(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",e).on("click.validate","select, option, [type='radio'], [type='checkbox']",e),this.settings.invalidHandler&&t(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var i,n,r=this.clean(e),o=this.validationTargetFor(r),s=this,a=!0;return void 0===o?delete this.invalid[r.name]:(this.prepareElement(o),this.currentElements=t(o),(n=this.groups[o.name])&&t.each(this.groups,function(t,e){e===n&&t!==o.name&&(r=s.validationTargetFor(s.clean(s.findByName(t))))&&r.name in s.invalid&&(s.currentElements.push(r),a=s.check(r)&&a)}),i=!1!==this.check(o),a=a&&i,this.invalid[o.name]=!i,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),t(e).attr("aria-invalid",!i)),a},showErrors:function(e){if(e){var i=this;t.extend(this.errorMap,e),this.errorList=t.map(this.errorMap,function(t,e){return{message:t,element:i.findByName(e)[0]}}),this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var e=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(e)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.validClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,i=0;for(e in t)void 0!==t[e]&&null!==t[e]&&!1!==t[e]&&i++;return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var n=this.name||t(this).attr("name");return!n&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=t(this).closest("form")[0],this.name=n),!(n in i||!e.objectLength(t(this).rules()))&&(i[n]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([])},reset:function(){this.resetInternals(),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i,n,r=t(e),o=e.type;return"radio"===o||"checkbox"===o?this.findByName(e.name).filter(":checked").val():"number"===o&&void 0!==e.validity?e.validity.badInput?"NaN":r.val():(i=e.hasAttribute("contenteditable")?r.text():r.val(),"file"===o?"C:\\fakepath\\"===i.substr(0,12)?i.substr(12):(n=i.lastIndexOf("/"))>=0?i.substr(n+1):(n=i.lastIndexOf("\\"))>=0?i.substr(n+1):i:"string"==typeof i?i.replace(/\r/g,""):i)},check:function(e){e=this.validationTargetFor(this.clean(e));var i,n,r,o,s=t(e).rules(),a=t.map(s,function(t,e){return e}).length,l=!1,c=this.elementValue(e);if("function"==typeof s.normalizer?o=s.normalizer:"function"==typeof this.settings.normalizer&&(o=this.settings.normalizer),o){if("string"!=typeof(c=o.call(e,c)))throw new TypeError("The normalizer should return a string value.");delete s.normalizer}for(n in s){r={method:n,parameters:s[n]};try{if("dependency-mismatch"===(i=t.validator.methods[n].call(this,c,e,r.parameters))&&1===a){l=!0;continue}if(l=!1,"pending"===i)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!i)return this.formatAndAdd(e,r),!1}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+r.method+"' method.",t),t instanceof TypeError&&(t.message+=".  Exception occurred when checking element "+e.id+", check the '"+r.method+"' method."),t}}if(!l)return this.objectLength(s)&&this.successList.push(e),!0},customDataMessage:function(e,i){return t(e).data("msg"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(e,i){"string"==typeof i&&(i={method:i});var n=this.findDefined(this.customMessage(e.name,i.method),this.customDataMessage(e,i.method),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i.method],"<strong>Warning: No message defined for "+e.name+"</strong>"),r=/\$?\{(\d+)\}/g;return"function"==typeof n?n=n.call(this,i.parameters,e):r.test(n)&&(n=t.validator.format(n.replace(r,"{$1}"),i.parameters)),n},formatAndAdd:function(t,e){var i=this.defaultMessage(t,e);this.errorList.push({message:i,element:t,method:e.method}),this.errorMap[t.name]=i,this.submitted[t.name]=i},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,i;for(t=0;this.errorList[t];t++)i=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var n,r,o,s,a=this.errorsFor(e),l=this.idOrName(e),c=t(e).attr("aria-describedby");a.length?(a.removeClass(this.settings.validClass).addClass(this.settings.errorClass),a.html(i)):(n=a=t("<"+this.settings.errorElement+">").attr("id",l+"-error").addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(n=a.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(n):this.settings.errorPlacement?this.settings.errorPlacement.call(this,n,t(e)):n.insertAfter(e),a.is("label")?a.attr("for",l):0===a.parents("label[for='"+this.escapeCssMeta(l)+"']").length&&(o=a.attr("id"),c?c.match(new RegExp("\\b"+this.escapeCssMeta(o)+"\\b"))||(c+=" "+o):c=o,t(e).attr("aria-describedby",c),(r=this.groups[e.name])&&(s=this,t.each(s.groups,function(e,i){i===r&&t("[name='"+s.escapeCssMeta(e)+"']",s.currentForm).attr("aria-describedby",a.attr("id"))})))),!i&&this.settings.success&&(a.text(""),"string"==typeof this.settings.success?a.addClass(this.settings.success):this.settings.success(a,e)),this.toShow=this.toShow.add(a)},errorsFor:function(e){var i=this.escapeCssMeta(this.idOrName(e)),n=t(e).attr("aria-describedby"),r="label[for='"+i+"'], label[for='"+i+"'] *";return n&&(r=r+", #"+this.escapeCssMeta(n).replace(/\s+/g,", #")),this.errors().filter(r)},escapeCssMeta:function(t){return t.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),t(e).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+this.escapeCssMeta(e)+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(e,i){return!!t(e,i.form).length},function:function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,t(e).addClass(this.settings.pendingClass),this.pending[e.name]=!0)},stopRequest:function(e,i){--this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],t(e).removeClass(this.settings.pendingClass),i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.submitButton&&t("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e,i){return i="string"==typeof i&&i||"remote",t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,{method:i})})},destroy:function(){this.resetForm(),t(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},n=t(e).attr("class");return n&&t.each(n.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},normalizeAttributeRule:function(t,e,i,n){/min|max|step/.test(i)&&(null===e||/number|range|text/.test(e))&&(n=Number(n),isNaN(n)&&(n=void 0)),n||0===n?t[i]=n:e===i&&"range"!==e&&(t[i]=!0)},attributeRules:function(e){var i,n,r={},o=t(e),s=e.getAttribute("type");for(i in t.validator.methods)"required"===i?(""===(n=e.getAttribute(i))&&(n=!0),n=!!n):n=o.attr(i),this.normalizeAttributeRule(r,s,i,n);return r.maxlength&&/-1|2147483647|524288/.test(r.maxlength)&&delete r.maxlength,r},dataRules:function(e){var i,n,r={},o=t(e),s=e.getAttribute("type");for(i in t.validator.methods)n=o.data("rule"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase()),this.normalizeAttributeRule(r,s,i,n);return r},staticRules:function(e){var i={},n=t.data(e.form,"validator");return n.settings.rules&&(i=t.validator.normalizeRule(n.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(n,r){if(!1!==r){if(r.param||r.depends){var o=!0;switch(typeof r.depends){case"string":o=!!t(r.depends,i.form).length;break;case"function":o=r.depends.call(i,i)}o?e[n]=void 0===r.param||r.param:(t.data(i.form,"validator").resetElements(t(i)),delete e[n])}}else delete e[n]}),t.each(e,function(n,r){e[n]=t.isFunction(r)&&"normalizer"!==n?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].replace(/[\[\]]/g,"").split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(null!=e.min&&null!=e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),null!=e.minlength&&null!=e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,n){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==n?n:t.validator.messages[e],i.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,n){if(!this.depend(n,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:e.length>0},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r>=n},maxlength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r<=n},rangelength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r>=n[0]&&r<=n[1]},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||t<=i},range:function(t,e,i){return this.optional(e)||t>=i[0]&&t<=i[1]},step:function(e,i,n){var r,o=t(i).attr("type"),s="Step attribute on input type "+o+" is not supported.",a=["text","number","range"],l=new RegExp("\\b"+o+"\\b"),c=function(t){var e=(""+t).match(/(?:\.(\d+))?$/);return e&&e[1]?e[1].length:0},h=function(t){return Math.round(t*Math.pow(10,r))},d=!0;if(o&&!l.test(a.join()))throw new Error(s);return r=c(n),(c(e)>r||h(e)%h(n)!=0)&&(d=!1),this.optional(i)||d},equalTo:function(e,i,n){var r=t(n);return this.settings.onfocusout&&r.not(".validate-equalTo-blur").length&&r.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,n,r){if(this.optional(i))return"dependency-mismatch";r="string"==typeof r&&r||"remote";var o,s,a,l=this.previousValue(i,r);return this.settings.messages[i.name]||(this.settings.messages[i.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[i.name][r],this.settings.messages[i.name][r]=l.message,n="string"==typeof n&&{url:n}||n,a=t.param(t.extend({data:e},n.data)),l.old===a?l.valid:(l.old=a,o=this,this.startRequest(i),s={},s[i.name]=e,t.ajax(t.extend(!0,{mode:"abort",port:"validate"+i.name,dataType:"json",data:s,context:o.currentForm,success:function(t){var n,s,a,c=!0===t||"true"===t;o.settings.messages[i.name][r]=l.originalMessage,c?(a=o.formSubmitted,o.resetInternals(),o.toHide=o.errorsFor(i),o.formSubmitted=a,o.successList.push(i),o.invalid[i.name]=!1,o.showErrors()):(n={},s=t||o.defaultMessage(i,{method:r,parameters:e}),n[i.name]=l.message=s,o.invalid[i.name]=!0,o.showErrors(n)),l.valid=c,o.stopRequest(i,c)}},n)),"pending")}}});var e,i={};return t.ajaxPrefilter?t.ajaxPrefilter(function(t,e,n){var r=t.port;"abort"===t.mode&&(i[r]&&i[r].abort(),i[r]=n)}):(e=t.ajax,t.ajax=function(n){var r=("mode"in n?n:t.ajaxSettings).mode,o=("port"in n?n:t.ajaxSettings).port;return"abort"===r?(i[o]&&i[o].abort(),i[o]=e.apply(this,arguments),i[o]):e.apply(this,arguments)}),t}),function(t){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){return function(){function e(t){return t.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}t.validator.addMethod("maxWords",function(t,i,n){return this.optional(i)||e(t).match(/\b\w+\b/g).length<=n},t.validator.format("Please enter {0} words or less.")),t.validator.addMethod("minWords",function(t,i,n){return this.optional(i)||e(t).match(/\b\w+\b/g).length>=n},t.validator.format("Please enter at least {0} words.")),t.validator.addMethod("rangeWords",function(t,i,n){var r=e(t),o=/\b\w+\b/g;return this.optional(i)||r.match(o).length>=n[0]&&r.match(o).length<=n[1]},t.validator.format("Please enter between {0} and {1} words."))}(),t.validator.addMethod("accept",function(e,i,n){var r,o,s="string"==typeof n?n.replace(/\s/g,""):"image/*",a=this.optional(i);if(a)return a;if("file"===t(i).attr("type")&&(s=s.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),i.files&&i.files.length))for(o=new RegExp(".?("+s+")$","i"),r=0;r<i.files.length;r++)if(!i.files[r].type.match(o))return!1;return!0},t.validator.format("Please enter a value with a valid mimetype.")),t.validator.addMethod("alphanumeric",function(t,e){return this.optional(e)||/^\w+$/i.test(t)},"Letters, numbers, and underscores only please"),t.validator.addMethod("bankaccountNL",function(t,e){if(this.optional(e))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(t))return!1;var i,n=t.replace(/ /g,""),r=0,o=n.length;for(i=0;i<o;i++)r+=(o-i)*n.substring(i,i+1);return r%11==0},"Please specify a valid bank account number"),t.validator.addMethod("bankorgiroaccountNL",function(e,i){return this.optional(i)||t.validator.methods.bankaccountNL.call(this,e,i)||t.validator.methods.giroaccountNL.call(this,e,i)},"Please specify a valid bank or giro account number"),t.validator.addMethod("bic",function(t,e){return this.optional(e)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(t.toUpperCase())},"Please specify a valid BIC code"),t.validator.addMethod("cifES",function(t,e){"use strict";if(this.optional(e))return!0;var i,n,r,o,s=new RegExp(/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi),a=t.substring(0,1),l=t.substring(1,8),c=t.substring(8,9),h=0,d=0,u=0;if(9!==t.length||!s.test(t))return!1;for(i=0;i<l.length;i++)n=parseInt(l[i],10),!function(t){return t%2==0}(i)?d+=n:u+=(n*=2)<10?n:n-9;return h=d+u,r=(10-h.toString().substr(-1)).toString(),r=parseInt(r,10)>9?"0":r,o="JABCDEFGHI".substr(r,1).toString(),a.match(/[ABEH]/)?c===r:a.match(/[KPQS]/)?c===o:c===r||c===o},"Please specify a valid CIF number."),t.validator.addMethod("cpfBR",function(t){if(11!==(t=t.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,"")).length)return!1;var e,i,n,r,o=0;if(e=parseInt(t.substring(9,10),10),i=parseInt(t.substring(10,11),10),n=function(t,e){var i=10*t%11;return 10!==i&&11!==i||(i=0),i===e},""===t||"00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return!1;for(r=1;r<=9;r++)o+=parseInt(t.substring(r-1,r),10)*(11-r);if(n(o,e)){for(o=0,r=1;r<=10;r++)o+=parseInt(t.substring(r-1,r),10)*(12-r);return n(o,i)}return!1},"Please specify a valid CPF number"),t.validator.addMethod("creditcard",function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i,n,r=0,o=0,s=!1;if((t=t.replace(/\D/g,"")).length<13||t.length>19)return!1;for(i=t.length-1;i>=0;i--)n=t.charAt(i),o=parseInt(n,10),s&&(o*=2)>9&&(o-=9),r+=o,s=!s;return r%10==0},"Please enter a valid credit card number."),t.validator.addMethod("creditcardtypes",function(t,e,i){if(/[^0-9\-]+/.test(t))return!1;t=t.replace(/\D/g,"");var n=0;return i.mastercard&&(n|=1),i.visa&&(n|=2),i.amex&&(n|=4),i.dinersclub&&(n|=8),i.enroute&&(n|=16),i.discover&&(n|=32),i.jcb&&(n|=64),i.unknown&&(n|=128),i.all&&(n=255),1&n&&/^(5[12345])/.test(t)?16===t.length:2&n&&/^(4)/.test(t)?16===t.length:4&n&&/^(3[47])/.test(t)?15===t.length:8&n&&/^(3(0[012345]|[68]))/.test(t)?14===t.length:16&n&&/^(2(014|149))/.test(t)?15===t.length:32&n&&/^(6011)/.test(t)?16===t.length:64&n&&/^(3)/.test(t)?16===t.length:64&n&&/^(2131|1800)/.test(t)?15===t.length:!!(128&n)},"Please enter a valid credit card number."),t.validator.addMethod("currency",function(t,e,i){var n,r="string"==typeof i,o=r?i:i[0],s=!!r||i[1];return o=o.replace(/,/g,""),o=s?o+"]":o+"]?",n="^["+o+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",n=new RegExp(n),this.optional(e)||n.test(t)},"Please specify a valid currency"),t.validator.addMethod("dateFA",function(t,e){return this.optional(e)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(t)},t.validator.messages.date),t.validator.addMethod("dateITA",function(t,e){var i,n,r,o,s,a=!1;return/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(t)?(i=t.split("/"),n=parseInt(i[0],10),r=parseInt(i[1],10),o=parseInt(i[2],10),a=(s=new Date(Date.UTC(o,r-1,n,12,0,0,0))).getUTCFullYear()===o&&s.getUTCMonth()===r-1&&s.getUTCDate()===n):a=!1,this.optional(e)||a},t.validator.messages.date),t.validator.addMethod("dateNL",function(t,e){return this.optional(e)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(t)},t.validator.messages.date),t.validator.addMethod("extension",function(t,e,i){return i="string"==typeof i?i.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(e)||t.match(new RegExp("\\.("+i+")$","i"))},t.validator.format("Please enter a value with a valid extension.")),t.validator.addMethod("giroaccountNL",function(t,e){return this.optional(e)||/^[0-9]{1,7}$/.test(t)},"Please specify a valid giro account number"),t.validator.addMethod("iban",function(t,e){if(this.optional(e))return!0;var i,n,r,o,s,a,l,c=t.replace(/ /g,"").toUpperCase(),h="",d=!0,u="";if(c.length<5)return!1;if(i=c.substring(0,2),s={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},void 0!==(o=s[i])&&!new RegExp("^[A-Z]{2}\\d{2}"+o+"$","").test(c))return!1;for(n=c.substring(4,c.length)+c.substring(0,4),a=0;a<n.length;a++)"0"!==(r=n.charAt(a))&&(d=!1),d||(h+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(r));for(l=0;l<h.length;l++)u=(""+u+h.charAt(l))%97;return 1===u},"Please specify a valid IBAN"),t.validator.addMethod("integer",function(t,e){return this.optional(e)||/^-?\d+$/.test(t)},"A positive or negative non-decimal number please"),t.validator.addMethod("ipv4",function(t,e){return this.optional(e)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(t)},"Please enter a valid IP v4 address."),t.validator.addMethod("ipv6",function(t,e){return this.optional(e)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(t)},"Please enter a valid IP v6 address."),t.validator.addMethod("lettersonly",function(t,e){return this.optional(e)||/^[a-z]+$/i.test(t)},"Letters only please"),t.validator.addMethod("letterswithbasicpunc",function(t,e){return this.optional(e)||/^[a-z\-.,()'"\s]+$/i.test(t)},"Letters or punctuation only please"),t.validator.addMethod("mobileNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid mobile number"),t.validator.addMethod("mobileUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),t.validator.addMethod("netmask",function(t,e){return this.optional(e)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(t)},"Please enter a valid netmask."),t.validator.addMethod("nieES",function(t,e){"use strict";if(this.optional(e))return!0;var i,n=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),r=t.substr(t.length-1).toUpperCase();return!((t=t.toString().toUpperCase()).length>10||t.length<9||!n.test(t))&&(t=t.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),i=9===t.length?t.substr(0,8):t.substr(0,9),"TRWAGMYFPDXBNJZSQVHLCKET".charAt(parseInt(i,10)%23)===r)},"Please specify a valid NIE number."),t.validator.addMethod("nifES",function(t,e){"use strict";return!!this.optional(e)||!!(t=t.toUpperCase()).match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(t)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(t.substring(8,0)%23)===t.charAt(8):!!/^[KLM]{1}/.test(t)&&t[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(t.substring(8,1)%23))},"Please specify a valid NIF number."),t.validator.addMethod("nipPL",function(t){"use strict";if(10!==(t=t.replace(/[^0-9]/g,"")).length)return!1;for(var e=[6,5,7,2,3,4,5,6,7],i=0,n=0;n<9;n++)i+=e[n]*t[n];var r=i%11;return(10===r?0:r)===parseInt(t[9],10)},"Please specify a valid NIP number."),t.validator.addMethod("notEqualTo",function(e,i,n){return this.optional(i)||!t.validator.methods.equalTo.call(this,e,i,n)},"Please enter a different value, values must not be the same."),t.validator.addMethod("nowhitespace",function(t,e){return this.optional(e)||/^\S+$/i.test(t)},"No white space please"),t.validator.addMethod("pattern",function(t,e,i){return!!this.optional(e)||("string"==typeof i&&(i=new RegExp("^(?:"+i+")$")),i.test(t))},"Invalid format."),t.validator.addMethod("phoneNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid phone number."),t.validator.addMethod("phonesUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),t.validator.addMethod("phoneUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),t.validator.addMethod("phoneUS",function(t,e){return t=t.replace(/\s+/g,""),this.optional(e)||t.length>9&&t.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),t.validator.addMethod("postalcodeBR",function(t,e){return this.optional(e)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(t)},"Informe um CEP válido."),t.validator.addMethod("postalCodeCA",function(t,e){return this.optional(e)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postalcodeIT",function(t,e){return this.optional(e)||/^\d{5}$/.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postalcodeNL",function(t,e){return this.optional(e)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postcodeUK",function(t,e){return this.optional(e)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(t)},"Please specify a valid UK postcode"),t.validator.addMethod("require_from_group",function(e,i,n){var r=t(n[1],i.form),o=r.eq(0),s=o.data("valid_req_grp")?o.data("valid_req_grp"):t.extend({},this),a=r.filter(function(){return s.elementValue(this)}).length>=n[0];return o.data("valid_req_grp",s),t(i).data("being_validated")||(r.data("being_validated",!0),r.each(function(){s.element(this)}),r.data("being_validated",!1)),a},t.validator.format("Please fill at least {0} of these fields.")),t.validator.addMethod("skip_or_fill_minimum",function(e,i,n){var r=t(n[1],i.form),o=r.eq(0),s=o.data("valid_skip")?o.data("valid_skip"):t.extend({},this),a=r.filter(function(){return s.elementValue(this)}).length,l=0===a||a>=n[0];return o.data("valid_skip",s),t(i).data("being_validated")||(r.data("being_validated",!0),r.each(function(){s.element(this)}),r.data("being_validated",!1)),l},t.validator.format("Please either skip these fields or fill at least {0} of them.")),t.validator.addMethod("stateUS",function(t,e,i){var n,r=void 0===i,o=!r&&void 0!==i.caseSensitive&&i.caseSensitive,s=!r&&void 0!==i.includeTerritories&&i.includeTerritories,a=!r&&void 0!==i.includeMilitary&&i.includeMilitary;return n=s||a?s&&a?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":s?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",n=o?new RegExp(n):new RegExp(n,"i"),this.optional(e)||n.test(t)},"Please specify a valid state"),t.validator.addMethod("strippedminlength",function(e,i,n){return t(e).text().length>=n},t.validator.format("Please enter at least {0} characters")),t.validator.addMethod("time",function(t,e){return this.optional(e)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(t)},"Please enter a valid time, between 00:00 and 23:59"),t.validator.addMethod("time12h",function(t,e){return this.optional(e)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(t)},"Please enter a valid time in 12-hour am/pm format"),t.validator.addMethod("url2",function(t,e){return this.optional(e)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\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])([a-z]|\d|-|\.|_|~|[\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])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},t.validator.messages.url),t.validator.addMethod("vinUS",function(t){if(17!==t.length)return!1;var e,i,n,r,o,s,a=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],l=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],c=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],h=0;for(e=0;e<17;e++){if(r=c[e],n=t.slice(e,e+1),8===e&&(s=n),isNaN(n)){for(i=0;i<a.length;i++)if(n.toUpperCase()===a[i]){n=l[i],n*=r,isNaN(s)&&8===i&&(s=a[i]);break}}else n*=r;h+=n}return 10===(o=h%11)&&(o="X"),o===s},"The specified vehicle identification number (VIN) is invalid."),t.validator.addMethod("zipcodeUS",function(t,e){return this.optional(e)||/^\d{5}(-\d{4})?$/.test(t)},"The specified US ZIP Code is invalid"),t.validator.addMethod("ziprange",function(t,e){return this.optional(e)||/^90[2-5]\d\{2\}-\d{4}$/.test(t)},"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx"),t}),jQuery.validator.setDefaults({errorElement:"div",errorClass:"form-control-feedback",focusInvalid:!1,ignore:"",errorPlacement:function(t,e){var i=$(e).closest(".form-group").find(".m-form__help");i.length>0?i.before(t):$(e).after(t)},highlight:function(t){$(t).closest(".form-group").addClass("has-danger"),$(t).hasClass("form-control")},unhighlight:function(t){$(t).closest(".form-group").removeClass("has-danger")},success:function(t,e){$(t).closest(".form-group").addClass("has-success").removeClass("has-danger"),$(t).closest(".form-group").find(".form-control-feedback").remove()}}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(e,n,r){var n={content:{message:"object"==typeof n?n.message:n,title:n.title?n.title:"",icon:n.icon?n.icon:"",url:n.url?n.url:"#",target:n.target?n.target:"-"}};r=t.extend(!0,{},n,r),this.settings=t.extend(!0,{},i,r),this._defaults=i,"-"==this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),this.init()}var i={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:'<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'};String.format=function(){for(var t=arguments[0],e=1;e<arguments.length;e++)t=t.replace(RegExp("\\{"+(e-1)+"\\}","gm"),arguments[e]);return t},t.extend(e.prototype,{init:function(){var t=this;this.buildNotify(),this.settings.content.icon&&this.setIcon(),"#"!=this.settings.content.url&&this.styleURL(),this.placement(),this.bind(),this.notify={$ele:this.$ele,update:function(e,i){var n={};"string"==typeof e?n[e]=i:n=e;for(var e in n)switch(e){case"type":this.$ele.removeClass("alert-"+t.settings.type),this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-"+t.settings.type),t.settings.type=n[e],this.$ele.addClass("alert-"+n[e]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+n[e]);break;case"icon":var r=this.$ele.find('[data-notify="icon"]');"class"==t.settings.icon_type.toLowerCase()?r.removeClass(t.settings.content.icon).addClass(n[e]):(r.is("img")||r.find("img"),r.attr("src",n[e]));break;case"progress":var o=t.settings.delay-t.settings.delay*(n[e]/100);this.$ele.data("notify-delay",o),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",n[e]).css("width",n[e]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",n[e]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",n[e]);break;default:this.$ele.find('[data-notify="'+e+'"]').html(n[e])}var s=this.$ele.outerHeight()+parseInt(t.settings.spacing)+parseInt(t.settings.offset.y);t.reposition(s)},close:function(){t.close()}}},buildNotify:function(){var e=this.settings.content;this.$ele=t(String.format(this.settings.template,this.settings.type,e.title,e.message,e.url,e.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"==this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1}),this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},placement:function(){var e=this,i=this.settings.offset.y,n={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},r=!1,o=this.settings;switch(t('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return i=Math.max(i,parseInt(t(this).css(o.placement.from))+parseInt(t(this).outerHeight())+parseInt(o.spacing))}),1==this.settings.newest_on_top&&(i=this.settings.offset.y),n[this.settings.placement.from]=i+"px",this.settings.placement.align){case"left":case"right":n[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":n.left=0,n.right=0}this.$ele.css(n).addClass(this.settings.animate.enter),t.each(Array("webkit","moz","o","ms",""),function(t,i){e.$ele[0].style[i+"AnimationIterationCount"]=1}),t(this.settings.element).append(this.$ele),1==this.settings.newest_on_top&&(i=parseInt(i)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(i)),t.isFunction(e.settings.onShow)&&e.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(t){r=!0}).one(this.animations.end,function(i){t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)}),setTimeout(function(){r||t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)},600)},bind:function(){var e=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){e.close()}),this.$ele.mouseover(function(e){t(this).data("data-hover","true")}).mouseout(function(e){t(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){e.$ele.data("notify-delay",e.settings.delay);var i=setInterval(function(){var t=parseInt(e.$ele.data("notify-delay"))-e.settings.timer;if("false"===e.$ele.data("data-hover")&&"pause"==e.settings.mouse_over||"pause"!=e.settings.mouse_over){var n=(e.settings.delay-t)/e.settings.delay*100;e.$ele.data("notify-delay",t),e.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",n).css("width",n+"%")}t<=-e.settings.timer&&(clearInterval(i),e.close())},e.settings.timer)}},close:function(){var e=this,i=parseInt(this.$ele.css(this.settings.placement.from)),n=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit),e.reposition(i),t.isFunction(e.settings.onClose)&&e.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(t){n=!0}).one(this.animations.end,function(i){t(this).remove(),t.isFunction(e.settings.onClosed)&&e.settings.onClosed.call(this)}),setTimeout(function(){n||(e.$ele.remove(),e.settings.onClosed&&e.settings.onClosed(e.$ele))},600)},reposition:function(e){var i=this,n='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',r=this.$ele.nextAll(n);1==this.settings.newest_on_top&&(r=this.$ele.prevAll(n)),r.each(function(){t(this).css(i.settings.placement.from,e),e=parseInt(e)+parseInt(i.settings.spacing)+t(this).outerHeight()})}}),t.notify=function(t,i){return new e(this,t,i).notify},t.notifyDefaults=function(e){return i=t.extend(!0,{},i,e)},t.notifyClose=function(e){void 0===e||"all"==e?t("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):t('[data-notify-position="'+e+'"]').find('[data-notify="dismiss"]').trigger("click")}}),$.notifyDefaults({template:'<div data-notify="container" class="alert alert-{0} m-alert" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss"></button><span data-notify="icon"></span><span data-notify="title">{1}</span><span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-animated bg-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'}),function(t){t(["jquery"],function(t){return function(){function e(e,i){return e||(e=l()),(h=t("#"+e.containerId)).length?h:(i&&(h=r(e)),h)}function i(e){for(var i=h.children(),r=i.length-1;r>=0;r--)n(t(i[r]),e)}function n(e,i,n){var r=!(!n||!n.force)&&n.force;return!(!e||!r&&0!==t(":focus",e).length)&&(e[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){c(e)}}),!0)}function r(e){return(h=t("<div/>").attr("id",e.containerId).addClass(e.positionClass)).appendTo(t(e.target)),h}function o(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function s(t){d&&d(t)}function a(i){function n(t){return null==t&&(t=""),t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(){var t="";switch(i.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}C.attr("aria-live",t)}function o(){i.iconClass&&C.addClass(w.toastClass).addClass(k)}function a(){w.newestOnTop?h.prepend(C):h.append(C)}function d(){if(i.title){var t=i.title;w.escapeHtml&&(t=n(i.title)),D.append(t).addClass(w.titleClass),C.append(D)}}function f(){if(i.message){var t=i.message;w.escapeHtml&&(t=n(i.message)),T.append(t).addClass(w.messageClass),C.append(T)}}function m(){w.closeButton&&(M.addClass(w.closeClass).attr("role","button"),C.prepend(M))}function g(){w.progressBar&&(A.addClass(w.progressClass),C.prepend(A))}function v(){w.rtl&&C.addClass("rtl")}function y(e){var i=e&&!1!==w.closeMethod?w.closeMethod:w.hideMethod,n=e&&!1!==w.closeDuration?w.closeDuration:w.hideDuration,r=e&&!1!==w.closeEasing?w.closeEasing:w.hideEasing;if(!t(":focus",C).length||e)return clearTimeout(E.intervalId),C[i]({duration:n,easing:r,complete:function(){c(C),clearTimeout(S),w.onHidden&&"hidden"!==P.state&&w.onHidden(),P.state="hidden",P.endTime=new Date,s(P)}})}function b(){(w.timeOut>0||w.extendedTimeOut>0)&&(S=setTimeout(y,w.extendedTimeOut),E.maxHideTime=parseFloat(w.extendedTimeOut),E.hideEta=(new Date).getTime()+E.maxHideTime)}function _(){clearTimeout(S),E.hideEta=0,C.stop(!0,!0)[w.showMethod]({duration:w.showDuration,easing:w.showEasing})}function x(){var t=(E.hideEta-(new Date).getTime())/E.maxHideTime*100;A.width(t+"%")}var w=l(),k=i.iconClass||w.iconClass;if(void 0!==i.optionsOverride&&(w=t.extend(w,i.optionsOverride),k=i.optionsOverride.iconClass||k),!function(t,e){if(t.preventDuplicates){if(e.message===u)return!0;u=e.message}return!1}(w,i)){p++,h=e(w,!0);var S=null,C=t("<div/>"),D=t("<div/>"),T=t("<div/>"),A=t("<div/>"),M=t(w.closeHtml),E={intervalId:null,hideEta:null,maxHideTime:null},P={toastId:p,state:"visible",startTime:new Date,options:w,map:i};return o(),d(),f(),m(),g(),v(),a(),r(),C.hide(),C[w.showMethod]({duration:w.showDuration,easing:w.showEasing,complete:w.onShown}),w.timeOut>0&&(S=setTimeout(y,w.timeOut),E.maxHideTime=parseFloat(w.timeOut),E.hideEta=(new Date).getTime()+E.maxHideTime,w.progressBar&&(E.intervalId=setInterval(x,10))),w.closeOnHover&&C.hover(_,b),!w.onclick&&w.tapToDismiss&&C.click(y),w.closeButton&&M&&M.click(function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),w.onCloseClick&&w.onCloseClick(t),y(!0)}),w.onclick&&C.click(function(t){w.onclick(t),y()}),s(P),w.debug&&console&&console.log(P),C}}function l(){return t.extend({},o(),m.options)}function c(t){h||(h=e()),t.is(":visible")||(t.remove(),t=null,0===h.children().length&&(h.remove(),u=void 0))}var h,d,u,p=0,f={error:"error",info:"info",success:"success",warning:"warning"},m={clear:function(t,r){var o=l();h||e(o),n(t,o,r)||i(o)},remove:function(i){var n=l();h||e(n),i&&0===t(":focus",i).length?c(i):h.children().length&&h.remove()},error:function(t,e,i){return a({type:f.error,iconClass:l().iconClasses.error,message:t,optionsOverride:i,title:e})},getContainer:e,info:function(t,e,i){return a({type:f.info,iconClass:l().iconClasses.info,message:t,optionsOverride:i,title:e})},options:{},subscribe:function(t){d=t},success:function(t,e,i){return a({type:f.success,iconClass:l().iconClasses.success,message:t,optionsOverride:i,title:e})},version:"2.1.3",warning:function(t,e,i){return a({type:f.warning,iconClass:l().iconClasses.warning,message:t,optionsOverride:i,title:e})}};return m}()})}("function"==typeof define&&define.amd?define:function(t,e){"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):window.toastr=e(window.jQuery)}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,e){"use strict";if(!t.jstree){var i=0,n=!1,r=!1,o=!1,s=[],a=t("script:last").attr("src"),l=window.document;t.jstree={version:"3.3.4",defaults:{plugins:[]},plugins:{},path:a&&-1!==a.indexOf("/")?a.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},t.jstree.create=function(e,n){var r=new t.jstree.core(++i),o=n;return n=t.extend(!0,{},t.jstree.defaults,n),o&&o.plugins&&(n.plugins=o.plugins),t.each(n.plugins,function(t,e){"core"!==t&&(r=r.plugin(e,n[e]))}),t(e).data("jstree",r),r.init(e,n),r},t.jstree.destroy=function(){t(".jstree:jstree").jstree("destroy"),t(l).off(".jstree")},t.jstree.core=function(t){this._id=t,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},t.jstree.reference=function(e){var i=null,n=null;if(!e||!e.id||e.tagName&&e.nodeType||(e=e.id),!n||!n.length)try{n=t(e)}catch(t){}if(!n||!n.length)try{n=t("#"+e.replace(t.jstree.idregex,"\\$&"))}catch(t){}return n&&n.length&&(n=n.closest(".jstree")).length&&(n=n.data("jstree"))?i=n:t(".jstree").each(function(){var n=t(this).data("jstree");if(n&&n._model.data[e])return i=n,!1}),i},t.fn.jstree=function(i){var n="string"==typeof i,r=Array.prototype.slice.call(arguments,1),o=null;return!(!0===i&&!this.length)&&(this.each(function(){var s=t.jstree.reference(this),a=n&&s?s[i]:null;if(o=n&&a?a.apply(s,r):null,s||n||i!==e&&!t.isPlainObject(i)||t.jstree.create(this,i),(s&&!n||!0===i)&&(o=s||!1),null!==o&&o!==e)return!1}),null!==o&&o!==e?o:this)},t.expr.pseudos.jstree=t.expr.createPseudo(function(i){return function(i){return t(i).hasClass("jstree")&&t(i).data("jstree")!==e}}),t.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:t.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0},t.jstree.core.prototype={plugin:function(e,i){var n=t.jstree.plugins[e];return n?(this._data[e]={},n.prototype=this,new n(i,this)):this},init:function(e,i){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[t.jstree.root]={id:t.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=t(e).addClass("jstree jstree-"+this._id),this.settings=i,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(t.jstree.root)},destroy:function(t){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(t){}t||this.element.empty(),this.teardown()},_create_prototype_node:function(){var t,e,i=l.createElement("LI");return i.setAttribute("role","treeitem"),t=l.createElement("I"),t.className="jstree-icon jstree-ocl",t.setAttribute("role","presentation"),i.appendChild(t),t=l.createElement("A"),t.className="jstree-anchor",t.setAttribute("href","#"),t.setAttribute("tabindex","-1"),e=l.createElement("I"),e.className="jstree-icon jstree-themeicon",e.setAttribute("role","presentation"),t.appendChild(e),i.appendChild(t),t=e=null,i},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var e="",i=null,n=0;this.element.on("dblclick.jstree",function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;if(l.selection&&l.selection.empty)l.selection.empty();else if(window.getSelection){var e=window.getSelection();try{e.removeAllRanges(),e.collapse()}catch(t){}}}).on("mousedown.jstree",t.proxy(function(t){t.target===this.element[0]&&(t.preventDefault(),n=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(t){t.preventDefault()}).on("click.jstree",".jstree-ocl",t.proxy(function(t){this.toggle_node(t.target)},this)).on("dblclick.jstree",".jstree-anchor",t.proxy(function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(t.target)},this)).on("click.jstree",".jstree-anchor",t.proxy(function(e){e.preventDefault(),e.currentTarget!==l.activeElement&&t(e.currentTarget).focus(),this.activate_node(e.currentTarget,e)},this)).on("keydown.jstree",".jstree-anchor",t.proxy(function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(32!==e.which&&13!==e.which&&(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey))return!0;var i=null;switch(this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37)),e.which){case 32:e.ctrlKey&&(e.type="click",t(e.currentTarget).trigger(e));break;case 13:e.type="click",t(e.currentTarget).trigger(e);break;case 37:e.preventDefault(),this.is_open(e.currentTarget)?this.close_node(e.currentTarget):(i=this.get_parent(e.currentTarget))&&i.id!==t.jstree.root&&this.get_node(i,!0).children(".jstree-anchor").focus();break;case 38:e.preventDefault(),(i=this.get_prev_dom(e.currentTarget))&&i.length&&i.children(".jstree-anchor").focus();break;case 39:e.preventDefault(),this.is_closed(e.currentTarget)?this.open_node(e.currentTarget,function(t){this.get_node(t,!0).children(".jstree-anchor").focus()}):this.is_open(e.currentTarget)&&(i=this.get_node(e.currentTarget,!0).children(".jstree-children")[0])&&t(this._firstChild(i)).children(".jstree-anchor").focus();break;case 40:e.preventDefault(),(i=this.get_next_dom(e.currentTarget))&&i.length&&i.children(".jstree-anchor").focus();break;case 106:this.open_all();break;case 36:e.preventDefault(),(i=this._firstChild(this.get_container_ul()[0]))&&t(i).children(".jstree-anchor").filter(":visible").focus();break;case 35:e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus();break;case 113:e.preventDefault(),this.edit(e.currentTarget)}},this)).on("load_node.jstree",t.proxy(function(e,i){i.status&&(i.node.id!==t.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(t.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var e,i,n=[];for(e=0,i=this._data.core.selected.length;e<i;e++)n=n.concat(this._model.data[this._data.core.selected[e]].parents);for(e=0,i=(n=t.vakata.array_unique(n)).length;e<i;e++)this.open_node(n[e],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",t.proxy(function(n){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!0;i&&clearTimeout(i),i=setTimeout(function(){e=""},500);var r=String.fromCharCode(n.which).toLowerCase(),o=this.element.find(".jstree-anchor").filter(":visible"),s=o.index(l.activeElement)||0,a=!1;if((e+=r).length>1){if(o.slice(s).each(t.proxy(function(i,n){if(0===t(n).text().toLowerCase().indexOf(e))return t(n).focus(),a=!0,!1},this)),a)return;if(o.slice(0,s).each(t.proxy(function(i,n){if(0===t(n).text().toLowerCase().indexOf(e))return t(n).focus(),a=!0,!1},this)),a)return}if(new RegExp("^"+r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(e)){if(o.slice(s+1).each(t.proxy(function(e,i){if(t(i).text().toLowerCase().charAt(0)===r)return t(i).focus(),a=!0,!1},this)),a)return;if(o.slice(0,s+1).each(t.proxy(function(e,i){if(t(i).text().toLowerCase().charAt(0)===r)return t(i).focus(),a=!0,!1},this)),a)return}},this)).on("init.jstree",t.proxy(function(){var t=this.settings.core.themes;this._data.core.themes.dots=t.dots,this._data.core.themes.stripes=t.stripes,this._data.core.themes.icons=t.icons,this._data.core.themes.ellipsis=t.ellipsis,this.set_theme(t.name||"default",t.url),this.set_theme_variant(t.variant)},this)).on("loading.jstree",t.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()},this)).on("blur.jstree",".jstree-anchor",t.proxy(function(e){this._data.core.focused=null,t(e.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",t.proxy(function(e){var i=this.get_node(e.currentTarget);i&&i.id&&(this._data.core.focused=i.id),this.element.find(".jstree-hovered").not(e.currentTarget).mouseleave(),t(e.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",t.proxy(function(){if(+new Date-n>500&&!this._data.core.focused){n=0;var t=this.get_node(this.element.attr("aria-activedescendant"),!0);t&&t.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",t.proxy(function(t){this.hover_node(t.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",t.proxy(function(t){this.dehover_node(t.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),t(l).off(".jstree-"+this._id)},trigger:function(t,e){e||(e={}),e.instance=this,this.element.triggerHandler(t.replace(".jstree","")+".jstree",e)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var i=this.settings.core.strings;return t.isFunction(i)?i.call(this,e):i&&i[e]?i[e]:e},_firstChild:function(t){for(t=t?t.firstChild:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_nextSibling:function(t){for(t=t?t.nextSibling:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_previousSibling:function(t){for(t=t?t.previousSibling:null;null!==t&&1!==t.nodeType;)t=t.previousSibling;return t},get_node:function(e,i){e&&e.id&&(e=e.id);var n;try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(n=t("#"+e.replace(t.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else if((n=t(e,this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else{if(!(n=t(e,this.element)).length||!n.hasClass("jstree"))return!1;e=this._model.data[t.jstree.root]}return i&&(e=e.id===t.jstree.root?this.element:t("#"+e.id.replace(t.jstree.idregex,"\\$&"),this.element)),e}catch(t){return!1}},get_path:function(e,i,n){if(!(e=e.parents?e:this.get_node(e))||e.id===t.jstree.root||!e.parents)return!1;var r,o,s=[];for(s.push(n?e.id:e.text),r=0,o=e.parents.length;r<o;r++)s.push(n?e.parents[r]:this.get_text(e.parents[r]));return s=s.reverse().slice(1),i?s.join(i):s},get_next_dom:function(e,i){var n;if((e=this.get_node(e,!0))[0]===this.element[0]){for(n=this._firstChild(this.get_container_ul()[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);return!!n&&t(n)}if(!e||!e.length)return!1;if(i){n=e[0];do{n=this._nextSibling(n)}while(n&&0===n.offsetHeight);return!!n&&t(n)}if(e.hasClass("jstree-open")){for(n=this._firstChild(e.children(".jstree-children")[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);if(null!==n)return t(n)}n=e[0];do{n=this._nextSibling(n)}while(n&&0===n.offsetHeight);return null!==n?t(n):e.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(e,i){var n;if((e=this.get_node(e,!0))[0]===this.element[0]){for(n=this.get_container_ul()[0].lastChild;n&&0===n.offsetHeight;)n=this._previousSibling(n);return!!n&&t(n)}if(!e||!e.length)return!1;if(i){n=e[0];do{n=this._previousSibling(n)}while(n&&0===n.offsetHeight);return!!n&&t(n)}n=e[0];do{n=this._previousSibling(n)}while(n&&0===n.offsetHeight);if(null!==n){for(e=t(n);e.hasClass("jstree-open");)e=e.children(".jstree-children").first().children(".jstree-node:visible:last");return e}return!(!(n=e[0].parentNode.parentNode)||!n.className||-1===n.className.indexOf("jstree-node"))&&t(n)},get_parent:function(e){return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.parent},get_children_dom:function(t){return(t=this.get_node(t,!0))[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!t||!t.length)&&t.children(".jstree-children").children(".jstree-node")},is_parent:function(t){return(t=this.get_node(t))&&(!1===t.state.loaded||t.children.length>0)},is_loaded:function(t){return(t=this.get_node(t))&&t.state.loaded},is_loading:function(t){return(t=this.get_node(t))&&t.state&&t.state.loading},is_open:function(t){return(t=this.get_node(t))&&t.state.opened},is_closed:function(t){return(t=this.get_node(t))&&this.is_parent(t)&&!t.state.opened},is_leaf:function(t){return!this.is_parent(t)},load_node:function(e,i){var n,r,o,s,a;if(t.isArray(e))return this._load_nodes(e.slice(),i),!0;if(!(e=this.get_node(e)))return i&&i.call(this,e,!1),!1;if(e.state.loaded){for(e.state.loaded=!1,o=0,s=e.parents.length;o<s;o++)this._model.data[e.parents[o]].children_d=t.vakata.array_filter(this._model.data[e.parents[o]].children_d,function(i){return-1===t.inArray(i,e.children_d)});for(n=0,r=e.children_d.length;n<r;n++)this._model.data[e.children_d[n]].state.selected&&(a=!0),delete this._model.data[e.children_d[n]];a&&(this._data.core.selected=t.vakata.array_filter(this._data.core.selected,function(i){return-1===t.inArray(i,e.children_d)})),e.children=[],e.children_d=[],a&&this.trigger("changed",{action:"load_node",node:e,selected:this._data.core.selected})}return e.state.failed=!1,e.state.loading=!0,this.get_node(e,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(e,t.proxy(function(t){(e=this._model.data[e.id]).state.loading=!1,e.state.loaded=t,e.state.failed=!e.state.loaded;var n=this.get_node(e,!0),r=0,o=0,s=this._model.data,a=!1;for(r=0,o=e.children.length;r<o;r++)if(s[e.children[r]]&&!s[e.children[r]].state.hidden){a=!0;break}e.state.loaded&&n&&n.length&&(n.removeClass("jstree-closed jstree-open jstree-leaf"),a?"#"!==e.id&&n.addClass(e.state.opened?"jstree-open":"jstree-closed"):n.addClass("jstree-leaf")),n.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:e,status:t}),i&&i.call(this,e,t)},this)),!0},_load_nodes:function(t,e,i,n){var r,o,s=!0,a=this._model.data,l=[];for(r=0,o=t.length;r<o;r++)a[t[r]]&&(!a[t[r]].state.loaded&&!a[t[r]].state.failed||!i&&n)&&(this.is_loading(t[r])||this.load_node(t[r],function(){this._load_nodes(t,e,!0)}),s=!1);if(s){for(r=0,o=t.length;r<o;r++)a[t[r]]&&a[t[r]].state.loaded&&l.push(t[r]);e&&!e.done&&(e.call(this,l),e.done=!0)}},load_all:function(e,i){if(e||(e=t.jstree.root),!(e=this.get_node(e)))return!1;var n,r,o=[],s=this._model.data,a=s[e.id].children_d;for(e.state&&!e.state.loaded&&o.push(e.id),n=0,r=a.length;n<r;n++)s[a[n]]&&s[a[n]].state&&!s[a[n]].state.loaded&&o.push(a[n]);o.length?this._load_nodes(o,function(){this.load_all(e,i)}):(i&&i.call(this,e),this.trigger("load_all",{node:e}))},_load_node:function(e,i){var n,r=this.settings.core.data,o=function(){return 3!==this.nodeType&&8!==this.nodeType};return r?t.isFunction(r)?r.call(this,e,t.proxy(function(n){!1===n?i.call(this,!1):this["string"==typeof n?"_append_html_data":"_append_json_data"](e,"string"==typeof n?t(t.parseHTML(n)).filter(o):n,function(t){i.call(this,t)})},this)):"object"==typeof r?r.url?(r=t.extend(!0,{},r),t.isFunction(r.url)&&(r.url=r.url.call(this,e)),t.isFunction(r.data)&&(r.data=r.data.call(this,e)),t.ajax(r).done(t.proxy(function(n,r,s){var a=s.getResponseHeader("Content-Type");return a&&-1!==a.indexOf("json")||"object"==typeof n?this._append_json_data(e,n,function(t){i.call(this,t)}):a&&-1!==a.indexOf("html")||"string"==typeof n?this._append_html_data(e,t(t.parseHTML(n)).filter(o),function(t){i.call(this,t)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:e.id,xhr:s})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1))},this)).fail(t.proxy(function(t){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:e.id,xhr:t})},i.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)},this))):(n=t.isArray(r)?t.extend(!0,[],r):t.isPlainObject(r)?t.extend(!0,{},r):r,e.id===t.jstree.root?this._append_json_data(e,n,function(t){i.call(this,t)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:e.id})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1))):"string"==typeof r?e.id===t.jstree.root?this._append_html_data(e,t(t.parseHTML(r)).filter(o),function(t){i.call(this,t)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:e.id})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1)):i.call(this,!1):e.id===t.jstree.root?this._append_html_data(e,this._data.core.original_container_html.clone(!0),function(t){i.call(this,t)}):i.call(this,!1)},_node_changed:function(t){(t=this.get_node(t))&&this._model.changed.push(t.id)},_append_html_data:function(e,i,n){(e=this.get_node(e)).children=[],e.children_d=[];var r,o,s,a=i.is("ul")?i.children():i,l=e.id,c=[],h=[],d=this._model.data,u=d[l],p=this._data.core.selected.length;for(a.each(t.proxy(function(e,i){(r=this._parse_model_from_html(t(i),l,u.parents.concat()))&&(c.push(r),h.push(r),d[r].children_d.length&&(h=h.concat(d[r].children_d)))},this)),u.children=c,u.children_d=h,o=0,s=u.parents.length;o<s;o++)d[u.parents[o]].children_d=d[u.parents[o]].children_d.concat(h);this.trigger("model",{nodes:h,parent:l}),l!==t.jstree.root?(this._node_changed(l),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==p&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),n.call(this,!0)},_append_json_data:function(e,i,n,r){if(null!==this.element){(e=this.get_node(e)).children=[],e.children_d=[],i.d&&"string"==typeof(i=i.d)&&(i=JSON.parse(i)),t.isArray(i)||(i=[i]);var o=null,s={df:this._model.default_state,dat:i,par:e.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},a=function(t,e){t.data&&(t=t.data);var i,n,r,o,s=t.dat,a=t.par,l=[],c=[],h=[],d=t.df,u=t.t_id,p=t.t_cnt,f=t.m,m=f[a],g=t.sel,v=function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,o,s,a,l=t.id.toString(),c={id:l,text:t.text||"",icon:t.icon===e||t.icon,parent:i,parents:n,children:t.children||[],children_d:t.children_d||[],data:t.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in d)d.hasOwnProperty(r)&&(c.state[r]=d[r]);if(t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(c.icon=t.data.jstree.icon),c.icon!==e&&null!==c.icon&&""!==c.icon||(c.icon=!0),t&&t.data&&(c.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(c.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(c.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(c.li_attr[r]=t.li_attr[r]);if(c.li_attr.id||(c.li_attr.id=l),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(c.a_attr[r]=t.a_attr[r]);for(t&&t.children&&!0===t.children&&(c.state.loaded=!1,c.children=[],c.children_d=[]),f[c.id]=c,r=0,o=c.children.length;r<o;r++)s=v(f[c.children[r]],c.id,n),a=f[s],c.children_d.push(s),a.children_d.length&&(c.children_d=c.children_d.concat(a.children_d));return delete t.data,delete t.children,f[c.id].original=t,c.state.selected&&h.push(c.id),c.id},y=function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,o,s,a,l,c=!1;do{c="j"+u+"_"+ ++p}while(f[c]);l={id:!1,text:"string"==typeof t?t:"",icon:"object"!=typeof t||t.icon===e||t.icon,parent:i,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in d)d.hasOwnProperty(r)&&(l.state[r]=d[r]);if(t&&t.id&&(l.id=t.id.toString()),t&&t.text&&(l.text=t.text),t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(l.icon=t.data.jstree.icon),l.icon!==e&&null!==l.icon&&""!==l.icon||(l.icon=!0),t&&t.data&&(l.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(l.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(l.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(l.li_attr[r]=t.li_attr[r]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=c),l.li_attr.id||(l.li_attr.id=l.id),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(l.a_attr[r]=t.a_attr[r]);if(t&&t.children&&t.children.length){for(r=0,o=t.children.length;r<o;r++)s=y(t.children[r],l.id,n),a=f[s],l.children.push(s),a.children_d.length&&(l.children_d=l.children_d.concat(a.children_d));l.children_d=l.children_d.concat(l.children)}return t&&t.children&&!0===t.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete t.data,delete t.children,l.original=t,f[l.id]=l,l.state.selected&&h.push(l.id),l.id};if(s.length&&s[0].id!==e&&s[0].parent!==e){for(n=0,r=s.length;n<r;n++)s[n].children||(s[n].children=[]),f[s[n].id.toString()]=s[n];for(n=0,r=s.length;n<r;n++)f[s[n].parent.toString()].children.push(s[n].id.toString()),m.children_d.push(s[n].id.toString());for(n=0,r=m.children.length;n<r;n++)i=v(f[m.children[n]],a,m.parents.concat()),c.push(i),f[i].children_d.length&&(c=c.concat(f[i].children_d));for(n=0,r=m.parents.length;n<r;n++)f[m.parents[n]].children_d=f[m.parents[n]].children_d.concat(c);o={cnt:p,mod:f,sel:g,par:a,dpc:c,add:h}}else{for(n=0,r=s.length;n<r;n++)(i=y(s[n],a,m.parents.concat()))&&(l.push(i),c.push(i),f[i].children_d.length&&(c=c.concat(f[i].children_d)));for(m.children=l,m.children_d=c,n=0,r=m.parents.length;n<r;n++)f[m.parents[n]].children_d=f[m.parents[n]].children_d.concat(c);o={cnt:p,mod:f,sel:g,par:a,dpc:c,add:h}}if("undefined"!=typeof window&&void 0!==window.document)return o;postMessage(o)},l=function(e,i){if(null!==this.element){this._cnt=e.cnt;var r,o=this._model.data;for(r in o)o.hasOwnProperty(r)&&o[r].state&&o[r].state.loading&&e.mod[r]&&(e.mod[r].state.loading=!0);if(this._model.data=e.mod,i){var s,a=e.add,l=e.sel,c=this._data.core.selected.slice();if(o=this._model.data,l.length!==c.length||t.vakata.array_unique(l.concat(c)).length!==l.length){for(r=0,s=l.length;r<s;r++)-1===t.inArray(l[r],a)&&-1===t.inArray(l[r],c)&&(o[l[r]].state.selected=!1);for(r=0,s=c.length;r<s;r++)-1===t.inArray(c[r],l)&&(o[c[r]].state.selected=!0)}}e.add.length&&(this._data.core.selected=this._data.core.selected.concat(e.add)),this.trigger("model",{nodes:e.dpc,parent:e.par}),e.par!==t.jstree.root?(this._node_changed(e.par),this.redraw()):this.redraw(!0),e.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),n.call(this,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+a.toString()],{type:"text/javascript"}))),!this._data.core.working||r?(this._data.core.working=!0,(o=new window.Worker(this._wrk)).onmessage=t.proxy(function(t){l.call(this,t.data,!0);try{o.terminate(),o=null}catch(t){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),s.par?o.postMessage(s):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([e,i,n,!0])}catch(t){l.call(this,a(s),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else l.call(this,a(s),!1)}},_parse_model_from_html:function(i,n,r){r=r?[].concat(r):[],n&&r.unshift(n);var o,s,a,l,c,h=this._model.data,d={id:!1,text:!1,icon:!0,parent:n,parents:r,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(a in this._model.default_state)this._model.default_state.hasOwnProperty(a)&&(d.state[a]=this._model.default_state[a]);if(l=t.vakata.attributes(i,!0),t.each(l,function(e,i){if(!(i=t.trim(i)).length)return!0;d.li_attr[e]=i,"id"===e&&(d.id=i.toString())}),(l=i.children("a").first()).length&&(l=t.vakata.attributes(l,!0),t.each(l,function(e,i){(i=t.trim(i)).length&&(d.a_attr[e]=i)})),(l=i.children("a").first().length?i.children("a").first().clone():i.clone()).children("ins, i, ul").remove(),l=l.html(),l=t("<div />").html(l),d.text=this.settings.core.force_text?l.text():l.html(),l=i.data(),d.data=l?t.extend(!0,{},l):null,d.state.opened=i.hasClass("jstree-open"),d.state.selected=i.children("a").hasClass("jstree-clicked"),d.state.disabled=i.children("a").hasClass("jstree-disabled"),d.data&&d.data.jstree)for(a in d.data.jstree)d.data.jstree.hasOwnProperty(a)&&(d.state[a]=d.data.jstree[a]);(l=i.children("a").children(".jstree-themeicon")).length&&(d.icon=!l.hasClass("jstree-themeicon-hidden")&&l.attr("rel")),d.state.icon!==e&&(d.icon=d.state.icon),d.icon!==e&&null!==d.icon&&""!==d.icon||(d.icon=!0),l=i.children("ul").children("li");do{c="j"+this._id+"_"+ ++this._cnt}while(h[c]);return d.id=d.li_attr.id?d.li_attr.id.toString():c,l.length?(l.each(t.proxy(function(e,i){o=this._parse_model_from_html(t(i),d.id,r),s=this._model.data[o],d.children.push(o),s.children_d.length&&(d.children_d=d.children_d.concat(s.children_d))},this)),d.children_d=d.children_d.concat(d.children)):i.hasClass("jstree-closed")&&(d.state.loaded=!1),d.li_attr.class&&(d.li_attr.class=d.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),d.a_attr.class&&(d.a_attr.class=d.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),h[d.id]=d,d.state.selected&&this._data.core.selected.push(d.id),d.id},_parse_model_from_flat_json:function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,o,s,a,l=t.id.toString(),c=this._model.data,h=this._model.default_state,d={id:l,text:t.text||"",icon:t.icon===e||t.icon,parent:i,parents:n,children:t.children||[],children_d:t.children_d||[],data:t.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in h)h.hasOwnProperty(r)&&(d.state[r]=h[r]);if(t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(d.icon=t.data.jstree.icon),d.icon!==e&&null!==d.icon&&""!==d.icon||(d.icon=!0),t&&t.data&&(d.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(d.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(d.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(d.li_attr[r]=t.li_attr[r]);if(d.li_attr.id||(d.li_attr.id=l),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(d.a_attr[r]=t.a_attr[r]);for(t&&t.children&&!0===t.children&&(d.state.loaded=!1,d.children=[],d.children_d=[]),c[d.id]=d,r=0,o=d.children.length;r<o;r++)a=c[s=this._parse_model_from_flat_json(c[d.children[r]],d.id,n)],d.children_d.push(s),a.children_d.length&&(d.children_d=d.children_d.concat(a.children_d));return delete t.data,delete t.children,c[d.id].original=t,d.state.selected&&this._data.core.selected.push(d.id),d.id},_parse_model_from_json:function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,o,s,a,l,c=!1,h=this._model.data,d=this._model.default_state;do{c="j"+this._id+"_"+ ++this._cnt}while(h[c]);l={id:!1,text:"string"==typeof t?t:"",icon:"object"!=typeof t||t.icon===e||t.icon,parent:i,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in d)d.hasOwnProperty(r)&&(l.state[r]=d[r]);if(t&&t.id&&(l.id=t.id.toString()),t&&t.text&&(l.text=t.text),t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(l.icon=t.data.jstree.icon),l.icon!==e&&null!==l.icon&&""!==l.icon||(l.icon=!0),t&&t.data&&(l.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(l.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(l.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(l.li_attr[r]=t.li_attr[r]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=c),l.li_attr.id||(l.li_attr.id=l.id),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(l.a_attr[r]=t.a_attr[r]);if(t&&t.children&&t.children.length){for(r=0,o=t.children.length;r<o;r++)a=h[s=this._parse_model_from_json(t.children[r],l.id,n)],l.children.push(s),a.children_d.length&&(l.children_d=l.children_d.concat(a.children_d));l.children_d=l.children_d.concat(l.children)}return t&&t.children&&!0===t.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete t.data,delete t.children,l.original=t,h[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var e,i,n,r=this._model.force_full_redraw?this._model.data[t.jstree.root].children.concat([]):this._model.changed.concat([]),o=l.createElement("UL"),s=this._data.core.focused;for(i=0,n=r.length;i<n;i++)(e=this.redraw_node(r[i],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&o.appendChild(e);this._model.force_full_redraw&&(o.className=this.get_container_ul()[0].className,o.setAttribute("role","group"),this.element.empty().append(o)),null!==s&&((e=this.get_node(s,!0))&&e.length&&e.children(".jstree-anchor")[0]!==l.activeElement?e.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:r})},redraw:function(t){t&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(e){var i=this.get_node(e),n=!1,r=!1,o=!1,s=l;if(!i)return!1;if(i.id===t.jstree.root)return this.redraw(!0);if(!(e=this.get_node(e,!0))||!e.length)return!1;if(e.children(".jstree-children").remove(),e=e[0],i.children.length&&i.state.loaded){for((o=s.createElement("UL")).setAttribute("role","group"),o.className="jstree-children",n=0,r=i.children.length;n<r;n++)o.appendChild(this.redraw_node(i.children[n],!0,!0));e.appendChild(o)}},redraw_node:function(e,i,n,r){var o=this.get_node(e),s=!1,a=!1,c=!1,h=!1,d=!1,u=!1,p="",f=l,m=this._model.data,g=!1,v=null,y=0,b=0,_=!1,x=!1;if(!o)return!1;if(o.id===t.jstree.root)return this.redraw(!0);if(i=i||0===o.children.length,e=l.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(o.id[0])?"\\3"+o.id[0]+" "+o.id.substr(1).replace(t.jstree.idregex,"\\$&"):o.id.replace(t.jstree.idregex,"\\$&"))):l.getElementById(o.id))e=t(e),n||((s=e.parent().parent()[0])===this.element[0]&&(s=null),a=e.index()),i||!o.children.length||e.children(".jstree-children").length||(i=!0),i||(c=e.children(".jstree-children")[0]),g=e.children(".jstree-anchor")[0]===l.activeElement,e.remove();else if(i=!0,!n){if(!(null===(s=o.parent!==t.jstree.root?t("#"+o.parent.replace(t.jstree.idregex,"\\$&"),this.element)[0]:null)||s&&m[o.parent].state.opened))return!1;a=t.inArray(o.id,null===s?m[t.jstree.root].children:m[o.parent].children)}e=this._data.core.node.cloneNode(!0),p="jstree-node ";for(h in o.li_attr)if(o.li_attr.hasOwnProperty(h)){if("id"===h)continue;"class"!==h?e.setAttribute(h,o.li_attr[h]):p+=o.li_attr[h]}for(o.a_attr.id||(o.a_attr.id=o.id+"_anchor"),e.setAttribute("aria-selected",!!o.state.selected),e.setAttribute("aria-level",o.parents.length),e.setAttribute("aria-labelledby",o.a_attr.id),o.state.disabled&&e.setAttribute("aria-disabled",!0),h=0,d=o.children.length;h<d;h++)if(!m[o.children[h]].state.hidden){_=!0;break}if(null!==o.parent&&m[o.parent]&&!o.state.hidden&&(h=t.inArray(o.id,m[o.parent].children),x=o.id,-1!==h))for(h++,d=m[o.parent].children.length;h<d&&(m[m[o.parent].children[h]].state.hidden||(x=m[o.parent].children[h]),x===o.id);h++);o.state.hidden&&(p+=" jstree-hidden"),o.state.loaded&&!_?p+=" jstree-leaf":(p+=o.state.opened&&o.state.loaded?" jstree-open":" jstree-closed",e.setAttribute("aria-expanded",o.state.opened&&o.state.loaded)),x===o.id&&(p+=" jstree-last"),e.id=o.id,e.className=p,p=(o.state.selected?" jstree-clicked":"")+(o.state.disabled?" jstree-disabled":"");for(d in o.a_attr)if(o.a_attr.hasOwnProperty(d)){if("href"===d&&"#"===o.a_attr[d])continue;"class"!==d?e.childNodes[1].setAttribute(d,o.a_attr[d]):p+=" "+o.a_attr[d]}if(p.length&&(e.childNodes[1].className="jstree-anchor "+p),(o.icon&&!0!==o.icon||!1===o.icon)&&(!1===o.icon?e.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===o.icon.indexOf("/")&&-1===o.icon.indexOf(".")?e.childNodes[1].childNodes[0].className+=" "+o.icon+" jstree-themeicon-custom":(e.childNodes[1].childNodes[0].style.backgroundImage='url("'+o.icon+'")',e.childNodes[1].childNodes[0].style.backgroundPosition="center center",e.childNodes[1].childNodes[0].style.backgroundSize="auto",e.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?e.childNodes[1].appendChild(f.createTextNode(o.text)):e.childNodes[1].innerHTML+=o.text,i&&o.children.length&&(o.state.opened||r)&&o.state.loaded){for((u=f.createElement("UL")).setAttribute("role","group"),u.className="jstree-children",h=0,d=o.children.length;h<d;h++)u.appendChild(this.redraw_node(o.children[h],i,!0));e.appendChild(u)}if(c&&e.appendChild(c),!n){for(s||(s=this.element[0]),h=0,d=s.childNodes.length;h<d;h++)if(s.childNodes[h]&&s.childNodes[h].className&&-1!==s.childNodes[h].className.indexOf("jstree-children")){v=s.childNodes[h];break}v||((v=f.createElement("UL")).setAttribute("role","group"),v.className="jstree-children",s.appendChild(v)),a<(s=v).childNodes.length?s.insertBefore(e,s.childNodes[a]):s.appendChild(e),g&&(y=this.element[0].scrollTop,b=this.element[0].scrollLeft,e.childNodes[1].focus(),this.element[0].scrollTop=y,this.element[0].scrollLeft=b)}return o.state.opened&&!o.state.loaded&&(o.state.opened=!1,setTimeout(t.proxy(function(){this.open_node(o.id,!1,0)},this),0)),e},open_node:function(i,n,r){var o,s,a,l;if(t.isArray(i)){for(o=0,s=(i=i.slice()).length;o<s;o++)this.open_node(i[o],n,r);return!0}return!(!(i=this.get_node(i))||i.id===t.jstree.root)&&(r=r===e?this.settings.core.animation:r,this.is_closed(i)?this.is_loaded(i)?(a=this.get_node(i,!0),l=this,a.length&&(r&&a.children(".jstree-children").length&&a.children(".jstree-children").stop(!0,!0),i.children.length&&!this._firstChild(a.children(".jstree-children")[0])&&this.draw_children(i),r?(this.trigger("before_open",{node:i}),a.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(r,function(){this.style.display="",l.element&&l.trigger("after_open",{node:i})})):(this.trigger("before_open",{node:i}),a[0].className=a[0].className.replace("jstree-closed","jstree-open"),a[0].setAttribute("aria-expanded",!0))),i.state.opened=!0,n&&n.call(this,i,!0),a.length||this.trigger("before_open",{node:i}),this.trigger("open_node",{node:i}),r&&a.length||this.trigger("after_open",{node:i}),!0):this.is_loading(i)?setTimeout(t.proxy(function(){this.open_node(i,n,r)},this),500):void this.load_node(i,function(t,e){return e?this.open_node(t,n,r):!!n&&n.call(this,t,!1)}):(n&&n.call(this,i,!1),!1))},_open_to:function(e){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var i,n,r=e.parents;for(i=0,n=r.length;i<n;i+=1)i!==t.jstree.root&&this.open_node(r[i],!1,0);return t("#"+e.id.replace(t.jstree.idregex,"\\$&"),this.element)},close_node:function(i,n){var r,o,s,a;if(t.isArray(i)){for(r=0,o=(i=i.slice()).length;r<o;r++)this.close_node(i[r],n);return!0}return!(!(i=this.get_node(i))||i.id===t.jstree.root)&&(!this.is_closed(i)&&(n=n===e?this.settings.core.animation:n,s=this,a=this.get_node(i,!0),i.state.opened=!1,this.trigger("close_node",{node:i}),void(a.length?n?a.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(n,function(){this.style.display="",a.children(".jstree-children").remove(),s.element&&s.trigger("after_close",{node:i})}):(a[0].className=a[0].className.replace("jstree-open","jstree-closed"),a.attr("aria-expanded",!1).children(".jstree-children").remove(),this.trigger("after_close",{node:i})):this.trigger("after_close",{node:i}))))},toggle_node:function(e){var i,n;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.toggle_node(e[i]);return!0}return this.is_closed(e)?this.open_node(e):this.is_open(e)?this.close_node(e):void 0},open_all:function(e,i,n){if(e||(e=t.jstree.root),!(e=this.get_node(e)))return!1;var r,o,s,a=e.id===t.jstree.root?this.get_container_ul():this.get_node(e,!0);if(!a.length){for(r=0,o=e.children_d.length;r<o;r++)this.is_closed(this._model.data[e.children_d[r]])&&(this._model.data[e.children_d[r]].state.opened=!0);return this.trigger("open_all",{node:e})}n=n||a,s=this,(a=this.is_closed(e)?a.find(".jstree-closed").addBack():a.find(".jstree-closed")).each(function(){s.open_node(this,function(t,e){e&&this.is_parent(t)&&this.open_all(t,i,n)},i||0)}),0===n.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(n)})},close_all:function(e,i){if(e||(e=t.jstree.root),!(e=this.get_node(e)))return!1;var n,r,o=e.id===t.jstree.root?this.get_container_ul():this.get_node(e,!0),s=this;for(o.length&&(o=this.is_open(e)?o.find(".jstree-open").addBack():o.find(".jstree-open"),t(o.get().reverse()).each(function(){s.close_node(this,i||0)})),n=0,r=e.children_d.length;n<r;n++)this._model.data[e.children_d[n]].state.opened=!1;this.trigger("close_all",{node:e})},is_disabled:function(t){return(t=this.get_node(t))&&t.state&&t.state.disabled},enable_node:function(e){var i,n;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.enable_node(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;e.state.disabled=!1,this.get_node(e,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),this.trigger("enable_node",{node:e})},disable_node:function(e){var i,n;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.disable_node(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;e.state.disabled=!0,this.get_node(e,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),this.trigger("disable_node",{node:e})},is_hidden:function(t){return!0===(t=this.get_node(t)).state.hidden},hide_node:function(e,i){var n,r;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.hide_node(e[n],!0);return i||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;e.state.hidden||(e.state.hidden=!0,this._node_changed(e.parent),i||this.redraw(),this.trigger("hide_node",{node:e}))},show_node:function(e,i){var n,r;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.show_node(e[n],!0);return i||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;e.state.hidden&&(e.state.hidden=!1,this._node_changed(e.parent),i||this.redraw(),this.trigger("show_node",{node:e}))},hide_all:function(e){var i,n=this._model.data,r=[];for(i in n)n.hasOwnProperty(i)&&i!==t.jstree.root&&!n[i].state.hidden&&(n[i].state.hidden=!0,r.push(i));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("hide_all",{nodes:r}),r},show_all:function(e){var i,n=this._model.data,r=[];for(i in n)n.hasOwnProperty(i)&&i!==t.jstree.root&&n[i].state.hidden&&(n[i].state.hidden=!1,r.push(i));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("show_all",{nodes:r}),r},activate_node:function(t,i){if(this.is_disabled(t))return!1;if(i&&"object"==typeof i||(i={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==e?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(i.metaKey||i.ctrlKey||i.shiftKey)&&(!i.shiftKey||this._data.core.last_clicked&&this.get_parent(t)&&this.get_parent(t)===this._data.core.last_clicked.parent))if(i.shiftKey){var n,r,o=this.get_node(t).id,s=this._data.core.last_clicked.id,a=this.get_node(this._data.core.last_clicked.parent).children,l=!1;for(n=0,r=a.length;n<r;n+=1)a[n]===o&&(l=!l),a[n]===s&&(l=!l),this.is_disabled(a[n])||!l&&a[n]!==o&&a[n]!==s?this.deselect_node(a[n],!0,i):this.is_hidden(a[n])||this.select_node(a[n],!0,!1,i);this.trigger("changed",{action:"select_node",node:this.get_node(t),selected:this._data.core.selected,event:i})}else this.is_selected(t)?this.deselect_node(t,!1,i):this.select_node(t,!1,!1,i);else!this.settings.core.multiple&&(i.metaKey||i.ctrlKey||i.shiftKey)&&this.is_selected(t)?this.deselect_node(t,!1,i):(this.deselect_all(!0),this.select_node(t,!1,!1,i),this._data.core.last_clicked=this.get_node(t));this.trigger("activate_node",{node:this.get_node(t),event:i})},hover_node:function(t){if(!(t=this.get_node(t,!0))||!t.length||t.children(".jstree-hovered").length)return!1;var e=this.element.find(".jstree-hovered"),i=this.element;e&&e.length&&this.dehover_node(e),t.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(t)}),setTimeout(function(){i.attr("aria-activedescendant",t[0].id)},0)},dehover_node:function(t){if(!(t=this.get_node(t,!0))||!t.length||!t.children(".jstree-hovered").length)return!1;t.children(".jstree-anchor").removeClass("jstree-hovered"),this.trigger("dehover_node",{node:this.get_node(t)})},select_node:function(e,i,n,r){var o,s,a;if(t.isArray(e)){for(s=0,a=(e=e.slice()).length;s<a;s++)this.select_node(e[s],i,n,r);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;o=this.get_node(e,!0),e.state.selected||(e.state.selected=!0,this._data.core.selected.push(e.id),n||(o=this._open_to(e)),o&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:e,selected:this._data.core.selected,event:r}),i||this.trigger("changed",{action:"select_node",node:e,selected:this._data.core.selected,event:r}))},deselect_node:function(e,i,n){var r,o,s;if(t.isArray(e)){for(r=0,o=(e=e.slice()).length;r<o;r++)this.deselect_node(e[r],i,n);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;s=this.get_node(e,!0),e.state.selected&&(e.state.selected=!1,this._data.core.selected=t.vakata.array_remove_item(this._data.core.selected,e.id),s.length&&s.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:e,selected:this._data.core.selected,event:n}),i||this.trigger("changed",{action:"deselect_node",node:e,selected:this._data.core.selected,event:n}))},select_all:function(e){var i,n,r=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[t.jstree.root].children_d.concat(),i=0,n=this._data.core.selected.length;i<n;i++)this._model.data[this._data.core.selected[i]]&&(this._model.data[this._data.core.selected[i]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),e||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:r})},deselect_all:function(t){var e,i,n=this._data.core.selected.concat([]);for(e=0,i=this._data.core.selected.length;e<i;e++)this._model.data[this._data.core.selected[e]]&&(this._model.data[this._data.core.selected[e]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:n}),t||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:n})},is_selected:function(e){return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.state.selected},get_selected:function(e){return e?t.map(this._data.core.selected,t.proxy(function(t){return this.get_node(t)},this)):this._data.core.selected.slice()},get_top_selected:function(e){var i,n,r,o,s=this.get_selected(!0),a={};for(i=0,n=s.length;i<n;i++)a[s[i].id]=s[i];for(i=0,n=s.length;i<n;i++)for(r=0,o=s[i].children_d.length;r<o;r++)a[s[i].children_d[r]]&&delete a[s[i].children_d[r]];s=[];for(i in a)a.hasOwnProperty(i)&&s.push(i);return e?t.map(s,t.proxy(function(t){return this.get_node(t)},this)):s},get_bottom_selected:function(e){var i,n,r=this.get_selected(!0),o=[];for(i=0,n=r.length;i<n;i++)r[i].children.length||o.push(r[i].id);return e?t.map(o,t.proxy(function(t){return this.get_node(t)},this)):o},get_state:function(){var e,i={core:{open:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(e in this._model.data)this._model.data.hasOwnProperty(e)&&e!==t.jstree.root&&(this._model.data[e].state.opened&&i.core.open.push(e),this._model.data[e].state.selected&&i.core.selected.push(e));return i},set_state:function(i,n){if(i){if(i.core&&i.core.selected&&i.core.initial_selection===e&&(i.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),i.core){var r,o;if(i.core.open)return t.isArray(i.core.open)&&i.core.open.length?this._load_nodes(i.core.open,function(t){this.open_node(t,!1,0),delete i.core.open,this.set_state(i,n)}):(delete i.core.open,this.set_state(i,n)),!1;if(i.core.scroll)return i.core.scroll&&i.core.scroll.left!==e&&this.element.scrollLeft(i.core.scroll.left),i.core.scroll&&i.core.scroll.top!==e&&this.element.scrollTop(i.core.scroll.top),delete i.core.scroll,this.set_state(i,n),!1;if(i.core.selected)return r=this,i.core.initial_selection!==e&&i.core.initial_selection!==this._data.core.selected.concat([]).sort().join(",")||(this.deselect_all(),t.each(i.core.selected,function(t,e){r.select_node(e,!1,!0)})),delete i.core.initial_selection,delete i.core.selected,this.set_state(i,n),!1;for(o in i)i.hasOwnProperty(o)&&"core"!==o&&-1===t.inArray(o,this.settings.plugins)&&delete i[o];if(t.isEmptyObject(i.core))return delete i.core,this.set_state(i,n),!1}return!t.isEmptyObject(i)||(i=null,n&&n.call(this),this.trigger("set_state"),!1)}return!1},refresh:function(e,i){this._data.core.state=!0===i?{}:this.get_state(),i&&t.isFunction(i)&&(this._data.core.state=i.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[t.jstree.root]={id:t.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var n=this.get_container_ul()[0].className;e||(this.element.html("<ul class='"+n+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(t.jstree.root,function(e,i){i&&(this.get_container_ul()[0].className=n,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(t.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(e){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var i=[],n=[],r=this._data.core.selected.concat([]);n.push(e.id),!0===e.state.opened&&i.push(e.id),this.get_node(e,!0).find(".jstree-open").each(function(){n.push(this.id),i.push(this.id)}),this._load_nodes(n,t.proxy(function(t){this.open_node(i,!1,0),this.select_node(r),this.trigger("refresh_node",{node:e,nodes:t})},this),!1,!0)},set_id:function(e,i){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var n,r,o=this._model.data,s=e.id;for(i=i.toString(),o[e.parent].children[t.inArray(e.id,o[e.parent].children)]=i,n=0,r=e.parents.length;n<r;n++)o[e.parents[n]].children_d[t.inArray(e.id,o[e.parents[n]].children_d)]=i;for(n=0,r=e.children.length;n<r;n++)o[e.children[n]].parent=i;for(n=0,r=e.children_d.length;n<r;n++)o[e.children_d[n]].parents[t.inArray(e.id,o[e.children_d[n]].parents)]=i;return-1!==(n=t.inArray(e.id,this._data.core.selected))&&(this._data.core.selected[n]=i),(n=this.get_node(e.id,!0))&&(n.attr("id",i),this.element.attr("aria-activedescendant")===e.id&&this.element.attr("aria-activedescendant",i)),delete o[e.id],e.id=i,e.li_attr.id=i,o[i]=e,this.trigger("set_id",{node:e,new:e.id,old:s}),!0},get_text:function(e){return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.text},set_text:function(e,i){var n,r;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.set_text(e[n],i);return!0}return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&(e.text=i,this.get_node(e,!0).length&&this.redraw_node(e.id),this.trigger("set_text",{obj:e,text:i}),!0)},get_json:function(e,i,n){if(!(e=this.get_node(e||t.jstree.root)))return!1;i&&i.flat&&!n&&(n=[]);var r,o,s={id:e.id,text:e.text,icon:this.get_icon(e),li_attr:t.extend(!0,{},e.li_attr),a_attr:t.extend(!0,{},e.a_attr),state:{},data:(!i||!i.no_data)&&t.extend(!0,t.isArray(e.data)?[]:{},e.data)};if(i&&i.flat?s.parent=e.parent:s.children=[],i&&i.no_state)delete s.state;else for(r in e.state)e.state.hasOwnProperty(r)&&(s.state[r]=e.state[r]);if(i&&i.no_li_attr&&delete s.li_attr,i&&i.no_a_attr&&delete s.a_attr,i&&i.no_id&&(delete s.id,s.li_attr&&s.li_attr.id&&delete s.li_attr.id,s.a_attr&&s.a_attr.id&&delete s.a_attr.id),i&&i.flat&&e.id!==t.jstree.root&&n.push(s),!i||!i.no_children)for(r=0,o=e.children.length;r<o;r++)i&&i.flat?this.get_json(e.children[r],i,n):s.children.push(this.get_json(e.children[r],i));return i&&i.flat?n:e.id===t.jstree.root?s.children:s},create_node:function(i,n,r,o,s){if(null===i&&(i=t.jstree.root),!(i=this.get_node(i)))return!1;if(!(r=r===e?"last":r).toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(i))return this.load_node(i,function(){this.create_node(i,n,r,o,!0)});n||(n={text:this.get_string("New node")}),(n="string"==typeof n?{text:n}:t.extend(!0,{},n)).text===e&&(n.text=this.get_string("New node"));var a,l,c,h;switch(i.id===t.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":a=this.get_node(i.parent),r=t.inArray(i.id,a.children),i=a;break;case"after":a=this.get_node(i.parent),r=t.inArray(i.id,a.children)+1,i=a;break;case"inside":case"first":r=0;break;case"last":r=i.children.length;break;default:r||(r=0)}if(r>i.children.length&&(r=i.children.length),n.id||(n.id=!0),!this.check("create_node",n,i,r))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===n.id&&delete n.id,!(n=this._parse_model_from_json(n,i.id,i.parents.concat())))return!1;for(a=this.get_node(n),(l=[]).push(n),l=l.concat(a.children_d),this.trigger("model",{nodes:l,parent:i.id}),i.children_d=i.children_d.concat(l),c=0,h=i.parents.length;c<h;c++)this._model.data[i.parents[c]].children_d=this._model.data[i.parents[c]].children_d.concat(l);for(n=a,a=[],c=0,h=i.children.length;c<h;c++)a[c>=r?c+1:c]=i.children[c];return a[r]=n.id,i.children=a,this.redraw_node(i,!0),this.trigger("create_node",{node:this.get_node(n),parent:i.id,position:r}),o&&o.call(this,this.get_node(n)),n.id},rename_node:function(e,i){var n,r,o;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.rename_node(e[n],i);return!0}return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&(o=e.text,this.check("rename_node",e,this.get_parent(e),i)?(this.set_text(e,i),this.trigger("rename_node",{node:e,text:i,old:o}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1))},delete_node:function(e){var i,n,r,o,s,a,l,c,h,d,u,p;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.delete_node(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;if(r=this.get_node(e.parent),o=t.inArray(e.id,r.children),d=!1,!this.check("delete_node",e,r,o))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==o&&(r.children=t.vakata.array_remove(r.children,o)),(s=e.children_d.concat([])).push(e.id),a=0,l=e.parents.length;a<l;a++)this._model.data[e.parents[a]].children_d=t.vakata.array_filter(this._model.data[e.parents[a]].children_d,function(e){return-1===t.inArray(e,s)});for(c=0,h=s.length;c<h;c++)if(this._model.data[s[c]].state.selected){d=!0;break}for(d&&(this._data.core.selected=t.vakata.array_filter(this._data.core.selected,function(e){return-1===t.inArray(e,s)})),this.trigger("delete_node",{node:e,parent:r.id}),d&&this.trigger("changed",{action:"delete_node",node:e,selected:this._data.core.selected,parent:r.id}),c=0,h=s.length;c<h;c++)delete this._model.data[s[c]];return-1!==t.inArray(this._data.core.focused,s)&&(this._data.core.focused=null,u=this.element[0].scrollTop,p=this.element[0].scrollLeft,r.id===t.jstree.root?this._model.data[t.jstree.root].children[0]&&this.get_node(this._model.data[t.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(r,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=u,this.element[0].scrollLeft=p),this.redraw_node(r,!0),!0},check:function(e,i,n,r,o){i=i&&i.id?i:this.get_node(i),n=n&&n.id?n:this.get_node(n);var s=e.match(/^move_node|copy_node|create_node$/i)?n:i,a=this.settings.core.check_callback;return"move_node"!==e&&"copy_node"!==e||o&&o.is_multi||i.id!==n.id&&("move_node"!==e||t.inArray(i.id,n.children)!==r)&&-1===t.inArray(n.id,i.children_d)?(s&&s.data&&(s=s.data),s&&s.functions&&(!1===s.functions[e]||!0===s.functions[e])?(!1===s.functions[e]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})}),s.functions[e]):!(!1===a||t.isFunction(a)&&!1===a.call(this,e,i,n,r,o)||a&&!1===a[e])||(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})},!1)):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:e,pos:r,obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(i,n,r,o,s,a,l){var c,h,d,u,p,f,m,g,v,y,b,_,x,w;if(n=this.get_node(n),r=r===e?0:r,!n)return!1;if(!r.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(n))return this.load_node(n,function(){this.move_node(i,n,r,o,!0,!1,l)});if(t.isArray(i)){if(1!==i.length){for(c=0,h=i.length;c<h;c++)(v=this.move_node(i[c],n,r,o,s,!1,l))&&(n=v,r="after");return this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===t.jstree.root)return!1;if(d=(i.parent||t.jstree.root).toString(),p=r.toString().match(/^(before|after)$/)&&n.id!==t.jstree.root?this.get_node(n.parent):n,f=l||(this._model.data[i.id]?this:t.jstree.reference(i.id)),m=!f||!f._id||this._id!==f._id,u=f&&f._id&&d&&f._model.data[d]&&f._model.data[d].children?t.inArray(i.id,f._model.data[d].children):-1,f&&f._id&&(i=f._model.data[i.id]),m)return!!(v=this.copy_node(i,n,r,o,s,!1,l))&&(f&&f.delete_node(i),v);switch(n.id===t.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":r=t.inArray(n.id,p.children);break;case"after":r=t.inArray(n.id,p.children)+1;break;case"inside":case"first":r=0;break;case"last":r=p.children.length;break;default:r||(r=0)}if(r>p.children.length&&(r=p.children.length),!this.check("move_node",i,p,r,{core:!0,origin:l,is_multi:f&&f._id&&f._id!==this._id,is_foreign:!f||!f._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(i.parent===p.id){for(g=p.children.concat(),-1!==(v=t.inArray(i.id,g))&&(g=t.vakata.array_remove(g,v),r>v&&r--),v=[],y=0,b=g.length;y<b;y++)v[y>=r?y+1:y]=g[y];v[r]=i.id,p.children=v,this._node_changed(p.id),this.redraw(p.id===t.jstree.root)}else{for((v=i.children_d.concat()).push(i.id),y=0,b=i.parents.length;y<b;y++){for(g=[],_=0,x=(w=f._model.data[i.parents[y]].children_d).length;_<x;_++)-1===t.inArray(w[_],v)&&g.push(w[_]);f._model.data[i.parents[y]].children_d=g}for(f._model.data[d].children=t.vakata.array_remove_item(f._model.data[d].children,i.id),y=0,b=p.parents.length;y<b;y++)this._model.data[p.parents[y]].children_d=this._model.data[p.parents[y]].children_d.concat(v);for(g=[],y=0,b=p.children.length;y<b;y++)g[y>=r?y+1:y]=p.children[y];for(g[r]=i.id,p.children=g,p.children_d.push(i.id),p.children_d=p.children_d.concat(i.children_d),i.parent=p.id,(v=p.parents.concat()).unshift(p.id),w=i.parents.length,i.parents=v,v=v.concat(),y=0,b=i.children_d.length;y<b;y++)this._model.data[i.children_d[y]].parents=this._model.data[i.children_d[y]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[i.children_d[y]].parents,v);d!==t.jstree.root&&p.id!==t.jstree.root||(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(d),this._node_changed(p.id)),a||this.redraw()}return o&&o.call(this,i,p,r),this.trigger("move_node",{node:i,parent:p.id,position:r,old_parent:d,old_position:u,is_multi:f&&f._id&&f._id!==this._id,is_foreign:!f||!f._id,old_instance:f,new_instance:this}),i.id},copy_node:function(i,n,r,o,s,a,l){var c,h,d,u,p,f,m,g,v,y;if(n=this.get_node(n),r=r===e?0:r,!n)return!1;if(!r.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(n))return this.load_node(n,function(){this.copy_node(i,n,r,o,!0,!1,l)});if(t.isArray(i)){if(1!==i.length){for(c=0,h=i.length;c<h;c++)(u=this.copy_node(i[c],n,r,o,s,!0,l))&&(n=u,r="after");return this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===t.jstree.root)return!1;switch(g=(i.parent||t.jstree.root).toString(),v=r.toString().match(/^(before|after)$/)&&n.id!==t.jstree.root?this.get_node(n.parent):n,y=l||(this._model.data[i.id]?this:t.jstree.reference(i.id)),!y||!y._id||this._id!==y._id,y&&y._id&&(i=y._model.data[i.id]),n.id===t.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":r=t.inArray(n.id,v.children);break;case"after":r=t.inArray(n.id,v.children)+1;break;case"inside":case"first":r=0;break;case"last":r=v.children.length;break;default:r||(r=0)}if(r>v.children.length&&(r=v.children.length),!this.check("copy_node",i,v,r,{core:!0,origin:l,is_multi:y&&y._id&&y._id!==this._id,is_foreign:!y||!y._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(m=y?y.get_json(i,{no_id:!0,no_data:!0,no_state:!0}):i))return!1;if(!0===m.id&&delete m.id,!(m=this._parse_model_from_json(m,v.id,v.parents.concat())))return!1;for(u=this.get_node(m),i&&i.state&&!1===i.state.loaded&&(u.state.loaded=!1),(d=[]).push(m),d=d.concat(u.children_d),this.trigger("model",{nodes:d,parent:v.id}),p=0,f=v.parents.length;p<f;p++)this._model.data[v.parents[p]].children_d=this._model.data[v.parents[p]].children_d.concat(d);for(d=[],p=0,f=v.children.length;p<f;p++)d[p>=r?p+1:p]=v.children[p];return d[r]=u.id,v.children=d,v.children_d.push(u.id),v.children_d=v.children_d.concat(u.children_d),v.id===t.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(v.id),a||this.redraw(v.id===t.jstree.root),o&&o.call(this,u,v,r),this.trigger("copy_node",{node:u,original:i,parent:v.id,position:r,old_parent:g,old_position:y&&y._id&&g&&y._model.data[g]&&y._model.data[g].children?t.inArray(i.id,y._model.data[g].children):-1,is_multi:y&&y._id&&y._id!==this._id,is_foreign:!y||!y._id,old_instance:y,new_instance:this}),u.id},cut:function(e){if(e||(e=this._data.core.selected.concat()),t.isArray(e)||(e=[e]),!e.length)return!1;var i,s,a,l=[];for(s=0,a=e.length;s<a;s++)(i=this.get_node(e[s]))&&i.id&&i.id!==t.jstree.root&&l.push(i);if(!l.length)return!1;n=l,o=this,r="move_node",this.trigger("cut",{node:e})},copy:function(e){if(e||(e=this._data.core.selected.concat()),t.isArray(e)||(e=[e]),!e.length)return!1;var i,s,a,l=[];for(s=0,a=e.length;s<a;s++)(i=this.get_node(e[s]))&&i.id&&i.id!==t.jstree.root&&l.push(i);if(!l.length)return!1;n=l,o=this,r="copy_node",this.trigger("copy",{node:e})},get_buffer:function(){return{mode:r,node:n,inst:o}},can_paste:function(){return!1!==r&&!1!==n},paste:function(t,e){if(!((t=this.get_node(t))&&r&&r.match(/^(copy_node|move_node)$/)&&n))return!1;this[r](n,t,e,!1,!1,!1,o)&&this.trigger("paste",{parent:t.id,node:n,mode:r}),n=!1,r=!1,o=!1},clear_buffer:function(){n=!1,r=!1,o=!1,this.trigger("clear_buffer")},edit:function(e,i,n){var r,o,s,a,c,h,d,u,p,f=!1;return!!(e=this.get_node(e))&&(this.check("edit",e,this.get_parent(e))?(p=e,i="string"==typeof i?i:e.text,this.set_text(e,""),e=this._open_to(e),p.text=i,r=this._data.core.rtl,o=this.element.width(),this._data.core.focused=p.id,s=e.children(".jstree-anchor").focus(),a=t("<span>"),c=i,h=t("<div />",{css:{position:"absolute",top:"-200px",left:r?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),d=t("<input />",{value:c,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:t.proxy(function(i){i.stopImmediatePropagation(),i.preventDefault();var r,o=a.children(".jstree-rename-input").val(),l=this.settings.core.force_text;""===o&&(o=c),h.remove(),a.replaceWith(s),a.remove(),c=l?c:t("<div></div>").append(t.parseHTML(c)).html(),this.set_text(e,c),(r=!!this.rename_node(e,l?t("<div></div>").text(o).text():t("<div></div>").append(t.parseHTML(o)).html()))||this.set_text(e,c),this._data.core.focused=p.id,setTimeout(t.proxy(function(){var t=this.get_node(p.id,!0);t.length&&(this._data.core.focused=p.id,t.children(".jstree-anchor").focus())},this),0),n&&n.call(this,p,r,f),d=null},this),keydown:function(t){var e=t.which;27===e&&(f=!0,this.value=c),27!==e&&13!==e&&37!==e&&38!==e&&39!==e&&40!==e&&32!==e||t.stopImmediatePropagation(),27!==e&&13!==e||(t.preventDefault(),this.blur())},click:function(t){t.stopImmediatePropagation()},mousedown:function(t){t.stopImmediatePropagation()},keyup:function(t){d.width(Math.min(h.text("pW"+this.value).width(),o))},keypress:function(t){if(13===t.which)return!1}}),u={fontFamily:s.css("fontFamily")||"",fontSize:s.css("fontSize")||"",fontWeight:s.css("fontWeight")||"",fontStyle:s.css("fontStyle")||"",fontStretch:s.css("fontStretch")||"",fontVariant:s.css("fontVariant")||"",letterSpacing:s.css("letterSpacing")||"",wordSpacing:s.css("wordSpacing")||""},a.attr("class",s.attr("class")).append(s.contents().clone()).append(d),s.replaceWith(a),h.css(u),d.css(u).width(Math.min(h.text("pW"+d[0].value).width(),o))[0].select(),void t(l).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(e){d&&e.target!==d&&t(d).blur()})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,i){if(!e)return!1;if(!0===i){var n=this.settings.core.themes.dir;n||(n=t.jstree.path+"/themes"),i=n+"/"+e+"/style.css"}i&&-1===t.inArray(i,s)&&(t("head").append('<link rel="stylesheet" href="'+i+'" type="text/css" />'),s.push(i)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(t){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=t,t&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(i,n){var r,o,s,a;if(t.isArray(i)){for(r=0,o=(i=i.slice()).length;r<o;r++)this.set_icon(i[r],n);return!0}return!(!(i=this.get_node(i))||i.id===t.jstree.root)&&(a=i.icon,i.icon=!0===n||null===n||n===e||""===n||n,s=this.get_node(i,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===n?this.hide_icon(i):!0===n||null===n||n===e||""===n?(s.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"),!1===a&&this.show_icon(i)):-1===n.indexOf("/")&&-1===n.indexOf(".")?(s.removeClass(a).css("background",""),s.addClass(n+" jstree-themeicon-custom").attr("rel",n),!1===a&&this.show_icon(i)):(s.removeClass(a).css("background",""),s.addClass("jstree-themeicon-custom").css("background","url('"+n+"') center center no-repeat").attr("rel",n),!1===a&&this.show_icon(i)),!0)},get_icon:function(e){return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.icon},hide_icon:function(e){var i,n;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.hide_icon(e[i]);return!0}return!(!(e=this.get_node(e))||e===t.jstree.root)&&(e.icon=!1,this.get_node(e,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0)},show_icon:function(e){var i,n,r;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.show_icon(e[i]);return!0}return!(!(e=this.get_node(e))||e===t.jstree.root)&&(r=this.get_node(e,!0),e.icon=!r.length||r.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),e.icon||(e.icon=!0),r.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0)}},t.vakata={},t.vakata.attributes=function(e,i){e=t(e)[0];var n=i?{}:[];return e&&e.attributes&&t.each(e.attributes,function(e,r){-1===t.inArray(r.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==r.value&&""!==t.trim(r.value)&&(i?n[r.name]=r.value:n.push(r.name))}),n},t.vakata.array_unique=function(t){var i,n,r=[],o={};for(i=0,n=t.length;i<n;i++)o[t[i]]===e&&(r.push(t[i]),o[t[i]]=!0);return r},t.vakata.array_remove=function(t,e){return t.splice(e,1),t},t.vakata.array_remove_item=function(e,i){var n=t.inArray(i,e);return-1!==n?t.vakata.array_remove(e,n):e},t.vakata.array_filter=function(t,e,i,n,r){if(t.filter)return t.filter(e,i);n=[];for(r in t)~~r+""==r+""&&r>=0&&e.call(i,t[r],+r,t)&&n.push(t[r]);return n},t.jstree.plugins.changed=function(t,e){var i=[];this.trigger=function(t,n){var r,o;if(n||(n={}),"changed"===t.replace(".jstree","")){n.changed={selected:[],deselected:[]};var s={};for(r=0,o=i.length;r<o;r++)s[i[r]]=1;for(r=0,o=n.selected.length;r<o;r++)s[n.selected[r]]?s[n.selected[r]]=2:n.changed.selected.push(n.selected[r]);for(r=0,o=i.length;r<o;r++)1===s[i[r]]&&n.changed.deselected.push(i[r]);i=n.selected.slice()}e.trigger.call(this,t,n)},this.refresh=function(t,n){return i=[],e.refresh.apply(this,arguments)}};var c=l.createElement("I");c.className="jstree-icon jstree-checkbox",c.setAttribute("role","presentation"),t.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},t.jstree.plugins.checkbox=function(i,n){this.bind=function(){n.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",t.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",t.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",t.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(t.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",t.proxy(function(t,e){var i,n,r=this._model.data,o=(r[e.parent],e.nodes);for(i=0,n=o.length;i<n;i++)r[o[i]].state.checked=r[o[i]].state.checked||r[o[i]].original&&r[o[i]].original.state&&r[o[i]].original.state.checked,r[o[i]].state.checked&&this._data.checkbox.selected.push(o[i])},this)),-1===this.settings.checkbox.cascade.indexOf("up")&&-1===this.settings.checkbox.cascade.indexOf("down")||this.element.on("model.jstree",t.proxy(function(e,i){var n,r,o,s,a,l,c=this._model.data,h=c[i.parent],d=i.nodes,u=[],p=this.settings.checkbox.cascade,f=this.settings.checkbox.tie_selection;if(-1!==p.indexOf("down"))if(h.state[f?"selected":"checked"]){for(r=0,o=d.length;r<o;r++)c[d[r]].state[f?"selected":"checked"]=!0;this._data[f?"core":"checkbox"].selected=this._data[f?"core":"checkbox"].selected.concat(d)}else for(r=0,o=d.length;r<o;r++)if(c[d[r]].state[f?"selected":"checked"]){for(s=0,a=c[d[r]].children_d.length;s<a;s++)c[c[d[r]].children_d[s]].state[f?"selected":"checked"]=!0;this._data[f?"core":"checkbox"].selected=this._data[f?"core":"checkbox"].selected.concat(c[d[r]].children_d)}if(-1!==p.indexOf("up")){for(r=0,o=h.children_d.length;r<o;r++)c[h.children_d[r]].children.length||u.push(c[h.children_d[r]].parent);for(s=0,a=(u=t.vakata.array_unique(u)).length;s<a;s++)for(h=c[u[s]];h&&h.id!==t.jstree.root;){for(n=0,r=0,o=h.children.length;r<o;r++)n+=c[h.children[r]].state[f?"selected":"checked"];if(n!==o)break;h.state[f?"selected":"checked"]=!0,this._data[f?"core":"checkbox"].selected.push(h.id),(l=this.get_node(h,!0))&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(f?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}}this._data[f?"core":"checkbox"].selected=t.vakata.array_unique(this._data[f?"core":"checkbox"].selected)},this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",t.proxy(function(e,i){var n,r,o,s,a=i.node,l=this._model.data,c=this.get_node(a.parent),h=this.settings.checkbox.cascade,d=this.settings.checkbox.tie_selection,u={},p=this._data[d?"core":"checkbox"].selected;for(n=0,r=p.length;n<r;n++)u[p[n]]=!0;if(-1!==h.indexOf("down")){var f=this._cascade_new_checked_state(a.id,!0);a.children_d.concat(a.id).forEach(function(t){f.indexOf(t)>-1?u[t]=!0:delete u[t]})}if(-1!==h.indexOf("up"))for(;c&&c.id!==t.jstree.root;){for(o=0,n=0,r=c.children.length;n<r;n++)o+=l[c.children[n]].state[d?"selected":"checked"];if(o!==r)break;c.state[d?"selected":"checked"]=!0,u[c.id]=!0,(s=this.get_node(c,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(d?"jstree-clicked":"jstree-checked"),c=this.get_node(c.parent)}p=[];for(n in u)u.hasOwnProperty(n)&&p.push(n);this._data[d?"core":"checkbox"].selected=p},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",t.proxy(function(e,i){var n,r,o,s=this.get_node(t.jstree.root),a=this._model.data;for(n=0,r=s.children_d.length;n<r;n++)(o=a[s.children_d[n]])&&o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",t.proxy(function(t,e){var i,n,r,o=e.node,s=(this.get_node(o,!0),this.settings.checkbox.cascade),a=this.settings.checkbox.tie_selection,l=this._data[a?"core":"checkbox"].selected,c=o.children_d.concat(o.id);if(-1!==s.indexOf("down")){var h=this._cascade_new_checked_state(o.id,!1);l=l.filter(function(t){return-1===c.indexOf(t)||h.indexOf(t)>-1})}if(-1!==s.indexOf("up")&&-1===l.indexOf(o.id)){for(i=0,n=o.parents.length;i<n;i++)(r=this._model.data[o.parents[i]]).state[a?"selected":"checked"]=!1,r&&r.original&&r.original.state&&r.original.state.undetermined&&(r.original.state.undetermined=!1),(r=this.get_node(o.parents[i],!0))&&r.length&&r.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked");l=l.filter(function(t){return-1===o.parents.indexOf(t)})}this._data[a?"core":"checkbox"].selected=l},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",t.proxy(function(e,i){for(var n,r,o,s,a=this.get_node(i.parent),l=this._model.data,c=this.settings.checkbox.tie_selection;a&&a.id!==t.jstree.root&&!a.state[c?"selected":"checked"];){for(o=0,n=0,r=a.children.length;n<r;n++)o+=l[a.children[n]].state[c?"selected":"checked"];if(!(r>0&&o===r))break;a.state[c?"selected":"checked"]=!0,this._data[c?"core":"checkbox"].selected.push(a.id),(s=this.get_node(a,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(c?"jstree-clicked":"jstree-checked"),a=this.get_node(a.parent)}},this)).on("move_node.jstree",t.proxy(function(e,i){var n,r,o,s,a,l=i.is_multi,c=i.old_parent,h=this.get_node(i.parent),d=this._model.data,u=this.settings.checkbox.tie_selection;if(!l)for(n=this.get_node(c);n&&n.id!==t.jstree.root&&!n.state[u?"selected":"checked"];){for(r=0,o=0,s=n.children.length;o<s;o++)r+=d[n.children[o]].state[u?"selected":"checked"];if(!(s>0&&r===s))break;n.state[u?"selected":"checked"]=!0,this._data[u?"core":"checkbox"].selected.push(n.id),(a=this.get_node(n,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"),n=this.get_node(n.parent)}for(n=h;n&&n.id!==t.jstree.root;){for(r=0,o=0,s=n.children.length;o<s;o++)r+=d[n.children[o]].state[u?"selected":"checked"];if(r===s)n.state[u?"selected":"checked"]||(n.state[u?"selected":"checked"]=!0,this._data[u?"core":"checkbox"].selected.push(n.id),(a=this.get_node(n,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"));else{if(!n.state[u?"selected":"checked"])break;n.state[u?"selected":"checked"]=!1,this._data[u?"core":"checkbox"].selected=t.vakata.array_remove_item(this._data[u?"core":"checkbox"].selected,n.id),(a=this.get_node(n,!0))&&a.length&&a.attr("aria-selected",!1).children(".jstree-anchor").removeClass(u?"jstree-clicked":"jstree-checked")}n=this.get_node(n.parent)}},this))},this._undetermined=function(){if(null!==this.element){var i,n,r,o,s={},a=this._model.data,l=this.settings.checkbox.tie_selection,c=this._data[l?"core":"checkbox"].selected,h=[],d=this;for(i=0,n=c.length;i<n;i++)if(a[c[i]]&&a[c[i]].parents)for(r=0,o=a[c[i]].parents.length;r<o&&s[a[c[i]].parents[r]]===e;r++)a[c[i]].parents[r]!==t.jstree.root&&(s[a[c[i]].parents[r]]=!0,h.push(a[c[i]].parents[r]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var l,c=d.get_node(this);if(c)if(c.state.loaded){for(i=0,n=c.children_d.length;i<n;i++)if(!(l=a[c.children_d[i]]).state.loaded&&l.original&&l.original.state&&l.original.state.undetermined&&!0===l.original.state.undetermined)for(s[l.id]===e&&l.id!==t.jstree.root&&(s[l.id]=!0,h.push(l.id)),r=0,o=l.parents.length;r<o;r++)s[l.parents[r]]===e&&l.parents[r]!==t.jstree.root&&(s[l.parents[r]]=!0,h.push(l.parents[r]))}else if(c.original&&c.original.state&&c.original.state.undetermined&&!0===c.original.state.undetermined)for(s[c.id]===e&&c.id!==t.jstree.root&&(s[c.id]=!0,h.push(c.id)),r=0,o=c.parents.length;r<o;r++)s[c.parents[r]]===e&&c.parents[r]!==t.jstree.root&&(s[c.parents[r]]=!0,h.push(c.parents[r]))}),this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),i=0,n=h.length;i<n;i++)a[h[i]].state[l?"selected":"checked"]||(c=this.get_node(h[i],!0))&&c.length&&c.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(e,i,r,o){if(e=n.redraw_node.apply(this,arguments)){var s,a,l=null,h=null;for(s=0,a=e.childNodes.length;s<a;s++)if(e.childNodes[s]&&e.childNodes[s].className&&-1!==e.childNodes[s].className.indexOf("jstree-anchor")){l=e.childNodes[s];break}l&&(!this.settings.checkbox.tie_selection&&this._model.data[e.id].state.checked&&(l.className+=" jstree-checked"),h=c.cloneNode(!1),this._model.data[e.id].state.checkbox_disabled&&(h.className+=" jstree-checkbox-disabled"),l.insertBefore(h,l.childNodes[0]))}return r||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(t.proxy(this._undetermined,this),50)),e},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(e){e=this.get_node(e);var i,n,r=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection,s=this._data[o?"core":"checkbox"].selected,a=this._model.data;if(!e||!0===e.state[o?"selected":"checked"]||-1===r.indexOf("undetermined")||-1===r.indexOf("down")&&-1===r.indexOf("up"))return!1;if(!e.state.loaded&&!0===e.original.state.undetermined)return!0;for(i=0,n=e.children_d.length;i<n;i++)if(-1!==t.inArray(e.children_d[i],s)||!a[e.children_d[i]].state.loaded&&a[e.children_d[i]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(e){var i,n,r;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.disable_checkbox(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled||(e.state.checkbox_disabled=!0,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:e}))},this.enable_checkbox=function(e){var i,n,r;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.enable_checkbox(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled&&(e.state.checkbox_disabled=!1,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:e}))},this.activate_node=function(e,i){return!t(i.target).hasClass("jstree-checkbox-disabled")&&(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||t(i.target).hasClass("jstree-checkbox"))&&(i.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!t(i.target).hasClass("jstree-checkbox")?n.activate_node.call(this,e,i):!this.is_disabled(e)&&(this.is_checked(e)?this.uncheck_node(e,i):this.check_node(e,i),void this.trigger("activate_node",{node:this.get_node(e)})))},this._cascade_new_checked_state=function(t,e){var i=this,n=this.settings.checkbox.tie_selection,r=this._model.data[t],o=[],s=[];if(!this.settings.checkbox.cascade_to_disabled&&r.state.disabled||!this.settings.checkbox.cascade_to_hidden&&r.state.hidden){var a=this.get_checked_descendants(t);r.state[n?"selected":"checked"]&&a.push(r.id),o=o.concat(a)}else{r.children&&r.children.forEach(function(t){var n=i._cascade_new_checked_state(t,e);o=o.concat(n),n.indexOf(t)>-1&&s.push(t)});var l=i.get_node(r,!0),c=s.length>0&&s.length<r.children.length;r.original&&r.original.state&&r.original.state.undetermined&&(r.original.state.undetermined=c),c?(r.state[n?"selected":"checked"]=!1,l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(n?"jstree-clicked":"jstree-checked")):e&&s.length===r.children.length?(r.state[n?"selected":"checked"]=e,o.push(r.id),l.attr("aria-selected",!0).children(".jstree-anchor").addClass(n?"jstree-clicked":"jstree-checked")):(r.state[n?"selected":"checked"]=!1,l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(n?"jstree-clicked":"jstree-checked"))}return o},this.get_checked_descendants=function(t){var e=this,i=e.settings.checkbox.tie_selection;return e._model.data[t].children_d.filter(function(t){return e._model.data[t].state[i?"selected":"checked"]})},this.check_node=function(e,i){if(this.settings.checkbox.tie_selection)return this.select_node(e,!1,!0,i);var n,r,o;if(t.isArray(e)){for(r=0,o=(e=e.slice()).length;r<o;r++)this.check_node(e[r],i);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;n=this.get_node(e,!0),e.state.checked||(e.state.checked=!0,this._data.checkbox.selected.push(e.id),n&&n.length&&n.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:e,selected:this._data.checkbox.selected,event:i}))},this.uncheck_node=function(e,i){if(this.settings.checkbox.tie_selection)return this.deselect_node(e,!1,i);var n,r,o;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.uncheck_node(e[n],i);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;o=this.get_node(e,!0),e.state.checked&&(e.state.checked=!1,this._data.checkbox.selected=t.vakata.array_remove_item(this._data.checkbox.selected,e.id),o.length&&o.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:e,selected:this._data.checkbox.selected,event:i}))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var e,i;this._data.checkbox.selected.concat([]);for(this._data.checkbox.selected=this._model.data[t.jstree.root].children_d.concat(),e=0,i=this._data.checkbox.selected.length;e<i;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var t,e,i=this._data.checkbox.selected.concat([]);for(t=0,e=this._data.checkbox.selected.length;t<e;t++)this._model.data[this._data.checkbox.selected[t]]&&(this._model.data[this._data.checkbox.selected[t]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:i})},this.is_checked=function(e){return this.settings.checkbox.tie_selection?this.is_selected(e):!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.state.checked},this.get_checked=function(e){return this.settings.checkbox.tie_selection?this.get_selected(e):e?t.map(this._data.checkbox.selected,t.proxy(function(t){return this.get_node(t)},this)):this._data.checkbox.selected},this.get_top_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_top_selected(e);var i,n,r,o,s=this.get_checked(!0),a={};for(i=0,n=s.length;i<n;i++)a[s[i].id]=s[i];for(i=0,n=s.length;i<n;i++)for(r=0,o=s[i].children_d.length;r<o;r++)a[s[i].children_d[r]]&&delete a[s[i].children_d[r]];s=[];for(i in a)a.hasOwnProperty(i)&&s.push(i);return e?t.map(s,t.proxy(function(t){return this.get_node(t)},this)):s},this.get_bottom_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(e);var i,n,r=this.get_checked(!0),o=[];for(i=0,n=r.length;i<n;i++)r[i].children.length||o.push(r[i].id);return e?t.map(o,t.proxy(function(t){return this.get_node(t)},this)):o},this.load_node=function(e,i){var r,o,s;if(!t.isArray(e)&&!this.settings.checkbox.tie_selection&&(s=this.get_node(e))&&s.state.loaded)for(r=0,o=s.children_d.length;r<o;r++)this._model.data[s.children_d[r]].state.checked&&(!0,this._data.checkbox.selected=t.vakata.array_remove_item(this._data.checkbox.selected,s.children_d[r]));return n.load_node.apply(this,arguments)},this.get_state=function(){var t=n.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?t:(t.checkbox=this._data.checkbox.selected.slice(),t)},this.set_state=function(e,i){var r=n.set_state.apply(this,arguments);if(r&&e.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var o=this;t.each(e.checkbox,function(t,e){o.check_node(e)})}return delete e.checkbox,this.set_state(e,i),!1}return r},this.refresh=function(t,e){return this.settings.checkbox.tie_selection||(this._data.checkbox.selected=[]),n.refresh.apply(this,arguments)}},t.jstree.defaults.conditionalselect=function(){return!0},t.jstree.plugins.conditionalselect=function(t,e){this.activate_node=function(t,i){this.settings.conditionalselect.call(this,this.get_node(t),i)&&e.activate_node.call(this,t,i)}},t.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(e,i){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.create_node(n,{},"last",function(t){try{i.edit(t)}catch(e){setTimeout(function(){i.edit(t)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.edit(n)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.is_selected(n)?i.delete_node(i.get_selected()):i.delete_node(n)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.is_selected(n)?i.cut(i.get_top_selected()):i.cut(n)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.is_selected(n)?i.copy(i.get_top_selected()):i.copy(n)}},paste:{separator_before:!1,icon:!1,_disabled:function(e){return!t.jstree.reference(e.reference).can_paste()},separator_after:!1,label:"Paste",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.paste(n)}}}}}}},t.jstree.plugins.contextmenu=function(i,n){this.bind=function(){n.bind.call(this);var e,i,r=0,o=null;this.element.on("init.jstree loading.jstree ready.jstree",t.proxy(function(){this.get_container_ul().addClass("jstree-contextmenu")},this)).on("contextmenu.jstree",".jstree-anchor",t.proxy(function(t,e){"input"!==t.target.tagName.toLowerCase()&&(t.preventDefault(),r=t.ctrlKey?+new Date:0,(e||o)&&(r=+new Date+1e4),o&&clearTimeout(o),this.is_loading(t.currentTarget)||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY,t))},this)).on("click.jstree",".jstree-anchor",t.proxy(function(e){this._data.contextmenu.visible&&(!r||+new Date-r>250)&&t.vakata.context.hide(),r=0},this)).on("touchstart.jstree",".jstree-anchor",function(n){n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(e=n.originalEvent.changedTouches[0].clientX,i=n.originalEvent.changedTouches[0].clientY,o=setTimeout(function(){t(n.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(t){o&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(Math.abs(e-t.originalEvent.changedTouches[0].clientX)>50||Math.abs(i-t.originalEvent.changedTouches[0].clientY)>50)&&clearTimeout(o)}).on("touchend.vakata.jstree",function(t){o&&clearTimeout(o)}),t(l).on("context_hide.vakata.jstree",t.proxy(function(e,i){this._data.contextmenu.visible=!1,t(i.reference).removeClass("jstree-context")},this))},this.teardown=function(){this._data.contextmenu.visible&&t.vakata.context.hide(),n.teardown.call(this)},this.show_contextmenu=function(i,n,r,o){if(!(i=this.get_node(i))||i.id===t.jstree.root)return!1;var s=this.settings.contextmenu,a=this.get_node(i,!0).children(".jstree-anchor"),l=!1,c=!1;(s.show_at_node||n===e||r===e)&&(l=a.offset(),n=l.left,r=l.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(i)&&this.activate_node(i,o),c=s.items,t.isFunction(c)&&(c=c.call(this,i,t.proxy(function(t){this._show_contextmenu(i,n,r,t)},this))),t.isPlainObject(c)&&this._show_contextmenu(i,n,r,c)},this._show_contextmenu=function(e,i,n,r){var o=this.get_node(e,!0).children(".jstree-anchor");t(l).one("context_show.vakata.jstree",t.proxy(function(e,i){var n="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";t(i.element).addClass(n),o.addClass("jstree-context")},this)),this._data.contextmenu.visible=!0,t.vakata.context.show(o,{x:i,y:n},r),this.trigger("show_contextmenu",{node:e,x:i,y:n})}},function(t){var e=!1,i={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};t.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(e){t(l).triggerHandler("context_"+e+".vakata",{reference:i.reference,element:i.element,position:{x:i.position_x,y:i.position_y}})},_execute:function(e){return!(!(e=i.items[e])||e._disabled&&(!t.isFunction(e._disabled)||e._disabled({item:e,reference:i.reference,element:i.element}))||!e.action)&&e.action.call(null,{item:e,reference:i.reference,element:i.element,position:{x:i.position_x,y:i.position_y}})},_parse:function(e,n){if(!e)return!1;n||(i.html="",i.items=[]);var r,o="",s=!1;return n&&(o+="<ul>"),t.each(e,function(e,n){if(!n)return!0;i.items.push(n),!s&&n.separator_before&&(o+="<li class='vakata-context-separator'><a href='#' "+(t.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>"),s=!1,o+="<li class='"+(n._class||"")+(!0===n._disabled||t.isFunction(n._disabled)&&n._disabled({item:n,reference:i.reference,element:i.element})?" vakata-contextmenu-disabled ":"")+"' "+(n.shortcut?" data-shortcut='"+n.shortcut+"' ":"")+">",o+="<a href='#' rel='"+(i.items.length-1)+"' "+(n.title?"title='"+n.title+"'":"")+">",t.vakata.context.settings.icons&&(o+="<i ",n.icon&&(-1!==n.icon.indexOf("/")||-1!==n.icon.indexOf(".")?o+=" style='background:url(\""+n.icon+"\") center center no-repeat' ":o+=" class='"+n.icon+"' "),o+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),o+=(t.isFunction(n.label)?n.label({item:e,reference:i.reference,element:i.element}):n.label)+(n.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+n.shortcut+'">'+(n.shortcut_label||"")+"</span>":"")+"</a>",n.submenu&&(r=t.vakata.context._parse(n.submenu,!0))&&(o+=r),o+="</li>",n.separator_after&&(o+="<li class='vakata-context-separator'><a href='#' "+(t.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>",s=!0)}),o=o.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),n&&(o+="</ul>"),n||(i.html=o,t.vakata.context._trigger("parse")),o.length>10&&o},_show_submenu:function(i){if((i=t(i)).length&&i.children("ul").length){var n=i.children("ul"),r=i.offset().left,o=r+i.outerWidth(),s=i.offset().top,a=n.width(),l=n.height(),c=t(window).width()+t(window).scrollLeft(),h=t(window).height()+t(window).scrollTop();e?i[o-(a+10+i.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):i[o+a>c&&r>c-o?"addClass":"removeClass"]("vakata-context-right"),s+l+10>h&&n.css("bottom","-1px"),i.hasClass("vakata-context-right")?r<a&&n.css("margin-right",r-a):c-o<a&&n.css("margin-left",c-o-a),n.show()}},show:function(n,r,o){var s,a,l,c,h,d,u,p;switch(i.element&&i.element.length&&i.element.width(""),!0){case!r&&!n:return!1;case!!r&&!!n:i.reference=n,i.position_x=r.x,i.position_y=r.y;break;case!r&&!!n:i.reference=n,s=n.offset(),i.position_x=s.left+n.outerHeight(),i.position_y=s.top;break;case!!r&&!n:i.position_x=r.x,i.position_y=r.y}n&&!o&&t(n).data("vakata_contextmenu")&&(o=t(n).data("vakata_contextmenu")),t.vakata.context._parse(o)&&i.element.html(i.html),i.items.length&&(i.element.appendTo("body"),a=i.element,l=i.position_x,c=i.position_y,h=a.width(),d=a.height(),u=t(window).width()+t(window).scrollLeft(),p=t(window).height()+t(window).scrollTop(),e&&(l-=a.outerWidth()-t(n).outerWidth())<t(window).scrollLeft()+20&&(l=t(window).scrollLeft()+20),l+h+20>u&&(l=u-(h+20)),c+d+20>p&&(c=p-(d+20)),i.element.css({left:l,top:c}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),i.is_visible=!0,t.vakata.context._trigger("show"))},hide:function(){i.is_visible&&(i.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),i.is_visible=!1,t.vakata.context._trigger("hide"))}},t(function(){e="rtl"===t("body").css("direction");var n=!1;i.element=t("<ul class='vakata-context'></ul>"),i.element.on("mouseenter","li",function(e){e.stopImmediatePropagation(),t.contains(this,e.relatedTarget)||(n&&clearTimeout(n),i.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),t(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),t.vakata.context._show_submenu(this))}).on("mouseleave","li",function(e){t.contains(this,e.relatedTarget)||t(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(e){t(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),t.vakata.context.settings.hide_onmouseleave&&(n=setTimeout(function(){t.vakata.context.hide()},t.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(e){e.preventDefault(),t(this).blur().parent().hasClass("vakata-context-disabled")||!1===t.vakata.context._execute(t(this).attr("rel"))||t.vakata.context.hide()}).on("keydown","a",function(e){var n=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),t(e.currentTarget).trigger(e);break;case 37:i.is_visible&&(i.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 38:i.is_visible&&((n=i.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(n=i.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),n.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 39:i.is_visible&&(i.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 40:i.is_visible&&((n=i.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(n=i.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),n.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 27:t.vakata.context.hide(),e.preventDefault()}}).on("keydown",function(t){t.preventDefault();var e=i.element.find(".vakata-contextmenu-shortcut-"+t.which).parent();e.parent().not(".vakata-context-disabled")&&e.click()}),t(l).on("mousedown.vakata.jstree",function(e){i.is_visible&&i.element[0]!==e.target&&!t.contains(i.element[0],e.target)&&t.vakata.context.hide()}).on("context_show.vakata.jstree",function(t,n){i.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),e&&i.element.addClass("vakata-context-rtl").css("direction","rtl"),i.element.find("ul").hide().end()})})}(t),t.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1};var h,d;t.jstree.plugins.dnd=function(e,i){this.init=function(t,e){i.init.call(this,t,e),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in l.createElement("span")},this.bind=function(){i.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",t.proxy(function(e){if(this.settings.dnd.large_drag_target&&t(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var i=this.get_node(e.target),n=this.is_selected(i)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,r=n>1?n+" "+this.get_string("nodes"):this.get_text(e.currentTarget);if(this.settings.core.force_text&&(r=t.vakata.html.escape(r)),i&&i.id&&i.id!==t.jstree.root&&(1===e.which||"touchstart"===e.type||"dragstart"===e.type)&&(!0===this.settings.dnd.is_draggable||t.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,n>1?this.get_top_selected(!0):[i],e))){if(h={jstree:!0,origin:this,obj:this.get_node(i,!0),nodes:n>1?this.get_top_selected():[i.id]},d=e.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),t.vakata.dnd.start(e,h,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+r+'<ins class="jstree-copy" style="display:none;">+</ins></div>');t.vakata.dnd._trigger("start",e,{helper:t(),element:d,data:h})}},this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(e){return e.preventDefault(),t.vakata.dnd._trigger("move",e,{helper:t(),element:d,data:h}),!1}).on("drop.jstree",t.proxy(function(e){return e.preventDefault(),t.vakata.dnd._trigger("stop",e,{helper:t(),element:d,data:h}),!1},this))},this.redraw_node=function(t,e,n,r){if((t=i.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)t.setAttribute("draggable",!0);else{var o,s,a=null;for(o=0,s=t.childNodes.length;o<s;o++)if(t.childNodes[o]&&t.childNodes[o].className&&-1!==t.childNodes[o].className.indexOf("jstree-anchor")){a=t.childNodes[o];break}a&&a.setAttribute("draggable",!0)}return t}},t(function(){var i=!1,n=!1,r=!1,o=!1,s=t('<div id="jstree-marker">&#160;</div>').hide();t(l).on("dnd_start.vakata.jstree",function(t,e){i=!1,r=!1,e&&e.data&&e.data.jstree&&s.appendTo("body")}).on("dnd_move.vakata.jstree",function(a,l){var c=l.event.target!==r.target;if(o&&(l.event&&"dragover"===l.event.type&&!c||clearTimeout(o)),l&&l.data&&l.data.jstree&&(!l.event.target.id||"jstree-marker"!==l.event.target.id)){r=l.event;var h,d,u,p,f,m,g,v,y,b,_,x,w,k,S,C,D=t.jstree.reference(l.event.target),T=!1,A=!1,M=!1;if(D&&D._data&&D._data.dnd)if(s.attr("class","jstree-"+D.get_theme()+(D.settings.core.themes.responsive?" jstree-dnd-responsive":"")),S=l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey)),l.helper.children().attr("class","jstree-"+D.get_theme()+" jstree-"+D.get_theme()+"-"+D.get_theme_variant()+" "+(D.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[S?"show":"hide"](),l.event.target!==D.element[0]&&l.event.target!==D.get_container_ul()[0]||0!==D.get_container_ul().children().length){if((T=D.settings.dnd.large_drop_target?t(l.event.target).closest(".jstree-node").children(".jstree-anchor"):t(l.event.target).closest(".jstree-anchor"))&&T.length&&T.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(A=T.offset(),M=(l.event.pageY!==e?l.event.pageY:l.event.originalEvent.pageY)-A.top,u=T.outerHeight(),m=M<u/3?["b","i","a"]:M>u-u/3?["a","i","b"]:M>u/2?["i","a","b"]:["i","b","a"],t.each(m,function(e,r){switch(r){case"b":h=A.left-6,d=A.top,p=D.get_parent(T),f=T.parent().index();break;case"i":w=D.settings.dnd.inside_pos,k=D.get_node(T.parent()),h=A.left-2,d=A.top+u/2+1,p=k.id,f="first"===w?0:"last"===w?k.children.length:Math.min(w,k.children.length);break;case"a":h=A.left-6,d=A.top+u,p=D.get_parent(T),f=T.parent().index()+1}for(g=!0,v=0,y=l.data.nodes.length;v<y;v++)if(b=l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey))?"copy_node":"move_node",_=f,"move_node"===b&&"a"===r&&l.data.origin&&l.data.origin===D&&p===D.get_parent(l.data.nodes[v])&&(x=D.get_node(p),_>t.inArray(l.data.nodes[v],x.children)&&(_-=1)),!(g=g&&(D&&D.settings&&D.settings.dnd&&!1===D.settings.dnd.check_while_dragging||D.check(b,l.data.origin&&l.data.origin!==D?l.data.origin.get_node(l.data.nodes[v]):l.data.nodes[v],p,_,{dnd:!0,ref:D.get_node(T.parent()),pos:r,origin:l.data.origin,is_multi:l.data.origin&&l.data.origin!==D,is_foreign:!l.data.origin})))){D&&D.last_error&&(n=D.last_error());break}if("i"===r&&T.parent().is(".jstree-closed")&&D.settings.dnd.open_timeout&&(l.event&&"dragover"===l.event.type&&!c||(o&&clearTimeout(o),o=setTimeout(function(t,e){return function(){t.open_node(e)}}(D,T),D.settings.dnd.open_timeout))),g)return(C=D.get_node(p,!0)).hasClass(".jstree-dnd-parent")||(t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),C.addClass("jstree-dnd-parent")),i={ins:D,par:p,pos:"i"!==r||"last"!==w||0!==f||D.is_loaded(k)?f:"last"},s.css({left:h+"px",top:d+"px"}).show(),l.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect=S?"copy":"move"),n={},m=!0,!1}),!0===m))return}else{for(g=!0,v=0,y=l.data.nodes.length;v<y&&(g=g&&D.check(l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey))?"copy_node":"move_node",l.data.origin&&l.data.origin!==D?l.data.origin.get_node(l.data.nodes[v]):l.data.nodes[v],t.jstree.root,"last",{dnd:!0,ref:D.get_node(t.jstree.root),pos:"i",origin:l.data.origin,is_multi:l.data.origin&&l.data.origin!==D,is_foreign:!l.data.origin}));v++);if(g)return i={ins:D,par:t.jstree.root,pos:"last"},s.hide(),l.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect=S?"copy":"move"))}t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),i=!1,l.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect="none"),s.hide()}}).on("dnd_scroll.vakata.jstree",function(t,e){e&&e.data&&e.data.jstree&&(s.hide(),i=!1,r=!1,e.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(e,a){if(t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),o&&clearTimeout(o),a&&a.data&&a.data.jstree){s.hide().detach();var l,c,h=[];if(i){for(l=0,c=a.data.nodes.length;l<c;l++)h[l]=a.data.origin?a.data.origin.get_node(a.data.nodes[l]):a.data.nodes[l];i.ins[a.data.origin&&(a.data.origin.settings.dnd.always_copy||a.data.origin.settings.dnd.copy&&(a.event.metaKey||a.event.ctrlKey))?"copy_node":"move_node"](h,i.par,i.pos,!1,!1,!1,a.data.origin)}else(l=t(a.event.target).closest(".jstree")).length&&n&&n.error&&"check"===n.error&&(l=l.jstree(!0))&&l.settings.core.error.call(this,n);r=!1,i=!1}}).on("keyup.jstree keydown.jstree",function(e,a){(a=t.vakata.dnd._get())&&a.data&&a.data.jstree&&("keyup"===e.type&&27===e.which?(o&&clearTimeout(o),i=!1,n=!1,r=!1,o=!1,s.hide().detach(),t.vakata.dnd._clean()):(a.helper.find(".jstree-copy").first()[a.data.origin&&(a.data.origin.settings.dnd.always_copy||a.data.origin.settings.dnd.copy&&(e.metaKey||e.ctrlKey))?"show":"hide"](),r&&(r.metaKey=e.metaKey,r.ctrlKey=e.ctrlKey,t.vakata.dnd._trigger("move",r))))})}),function(t){t.vakata.html={div:t("<div />"),escape:function(e){return t.vakata.html.div.text(e).html()},strip:function(e){return t.vakata.html.div.empty().append(t.parseHTML(e)).text()}};var i={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};t.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:50},_trigger:function(i,n,r){r===e&&(r=t.vakata.dnd._get()),r.event=n,t(l).triggerHandler("dnd_"+i+".vakata",r)},_get:function(){return{data:i.data,element:i.element,helper:i.helper}},_clean:function(){i.helper&&i.helper.remove(),i.scroll_i&&(clearInterval(i.scroll_i),i.scroll_i=!1),i={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},t(l).off("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag),t(l).off("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop)},_scroll:function(e){if(!i.scroll_e||!i.scroll_l&&!i.scroll_t)return i.scroll_i&&(clearInterval(i.scroll_i),i.scroll_i=!1),!1;if(!i.scroll_i)return i.scroll_i=setInterval(t.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var n=i.scroll_e.scrollTop(),r=i.scroll_e.scrollLeft();i.scroll_e.scrollTop(n+i.scroll_t*t.vakata.dnd.settings.scroll_speed),i.scroll_e.scrollLeft(r+i.scroll_l*t.vakata.dnd.settings.scroll_speed),n===i.scroll_e.scrollTop()&&r===i.scroll_e.scrollLeft()||t.vakata.dnd._trigger("scroll",i.scroll_e)},start:function(e,n,r){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_drag&&t.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(t){}return i.init_x=e.pageX,i.init_y=e.pageY,i.data=n,i.is_down=!0,i.element=e.currentTarget,i.target=e.target,i.is_touch="touchstart"===e.type,!1!==r&&(i.helper=t("<div id='vakata-dnd'></div>").html(r).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),t(l).on("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag),t(l).on("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop),!1},drag:function(e){if("touchmove"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_down){if(!i.is_drag){if(!(Math.abs(e.pageX-i.init_x)>(i.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)||Math.abs(e.pageY-i.init_y)>(i.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)))return;i.helper&&(i.helper.appendTo("body"),i.helper_w=i.helper.outerWidth()),i.is_drag=!0,t(i.target).one("click.vakata",!1),t.vakata.dnd._trigger("start",e)}var n=!1,r=!1,o=!1,s=!1,a=!1,c=!1,h=!1,d=!1,u=!1,p=!1;return i.scroll_t=0,i.scroll_l=0,i.scroll_e=!1,t(t(e.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(t(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var n=t(this),r=n.offset();if(this.scrollHeight>this.offsetHeight&&(r.top+n.height()-e.pageY<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=1),e.pageY-r.top<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(r.left+n.width()-e.pageX<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=1),e.pageX-r.left<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=-1)),i.scroll_t||i.scroll_l)return i.scroll_e=t(this),!1}),i.scroll_e||(n=t(l),r=t(window),o=n.height(),s=r.height(),a=n.width(),c=r.width(),h=n.scrollTop(),d=n.scrollLeft(),o>s&&e.pageY-h<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=-1),o>s&&s-(e.pageY-h)<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=1),a>c&&e.pageX-d<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=-1),a>c&&c-(e.pageX-d)<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=1),(i.scroll_t||i.scroll_l)&&(i.scroll_e=n)),i.scroll_e&&t.vakata.dnd._scroll(!0),i.helper&&(u=parseInt(e.pageY+t.vakata.dnd.settings.helper_top,10),p=parseInt(e.pageX+t.vakata.dnd.settings.helper_left,10),o&&u+25>o&&(u=o-50),a&&p+i.helper_w>a&&(p=a-(i.helper_w+2)),i.helper.css({left:p+"px",top:u+"px"})),t.vakata.dnd._trigger("move",e),!1}},stop:function(e){if("touchend"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_drag)e.target!==i.target&&t(i.target).off("click.vakata"),t.vakata.dnd._trigger("stop",e);else if("touchend"===e.type&&e.target===i.target){var n=setTimeout(function(){t(e.target).click()},100);t(e.target).one("click",function(){n&&clearTimeout(n)})}return t.vakata.dnd._clean(),!1}}}(t),t.jstree.defaults.massload=null,t.jstree.plugins.massload=function(e,i){this.init=function(t,e){this._data.massload={},i.init.call(this,t,e)},this._load_nodes=function(e,n,r,o){var s,a,l,c=this.settings.massload,h=(JSON.stringify(e),[]),d=this._model.data;if(!r){for(s=0,a=e.length;s<a;s++)d[e[s]]&&(d[e[s]].state.loaded||d[e[s]].state.failed)&&!o||(h.push(e[s]),(l=this.get_node(e[s],!0))&&l.length&&l.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},h.length){if(t.isFunction(c))return c.call(this,h,t.proxy(function(t){var s,a;if(t)for(s in t)t.hasOwnProperty(s)&&(this._data.massload[s]=t[s]);for(s=0,a=e.length;s<a;s++)(l=this.get_node(e[s],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);i._load_nodes.call(this,e,n,r,o)},this));if("object"==typeof c&&c&&c.url)return c=t.extend(!0,{},c),t.isFunction(c.url)&&(c.url=c.url.call(this,h)),t.isFunction(c.data)&&(c.data=c.data.call(this,h)),t.ajax(c).done(t.proxy(function(t,s,a){var c,h;if(t)for(c in t)t.hasOwnProperty(c)&&(this._data.massload[c]=t[c]);for(c=0,h=e.length;c<h;c++)(l=this.get_node(e[c],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);i._load_nodes.call(this,e,n,r,o)},this)).fail(t.proxy(function(t){i._load_nodes.call(this,e,n,r,o)},this))}}return i._load_nodes.call(this,e,n,r,o)},this._load_node=function(e,n){var r,o=this._data.massload[e.id],s=null;return o?(s=this["string"==typeof o?"_append_html_data":"_append_json_data"](e,"string"==typeof o?t(t.parseHTML(o)).filter(function(){return 3!==this.nodeType}):o,function(t){n.call(this,t)}),(r=this.get_node(e.id,!0))&&r.length&&r.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[e.id],s):i._load_node.call(this,e,n)}},t.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},t.jstree.plugins.search=function(i,n){this.bind=function(){n.bind.call(this),this._data.search.str="",this._data.search.dom=t(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",t.proxy(function(e,i){if(this._data.search.som&&i.res.length){var n,r,o,s,a=this._model.data,l=[];for(n=0,r=i.res.length;n<r;n++)if(a[i.res[n]]&&!a[i.res[n]].state.hidden&&(l.push(i.res[n]),l=l.concat(a[i.res[n]].parents),this._data.search.smc))for(o=0,s=a[i.res[n]].children_d.length;o<s;o++)a[a[i.res[n]].children_d[o]]&&!a[a[i.res[n]].children_d[o]].state.hidden&&l.push(a[i.res[n]].children_d[o]);l=t.vakata.array_remove_item(t.vakata.array_unique(l),t.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(l,!0),this.redraw(!0)}},this)).on("clear_search.jstree",t.proxy(function(t,e){this._data.search.som&&e.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))},this))},this.search=function(i,n,r,o,s,a){if(!1===i||""===t.trim(i.toString()))return this.clear_search();o=this.get_node(o),o=o&&o.id?o.id:null,i=i.toString();var l,c,h=this.settings.search,d=!!h.ajax&&h.ajax,u=this._model.data,p=null,f=[],m=[];if(this._data.search.res.length&&!s&&this.clear_search(),r===e&&(r=h.show_only_matches),a===e&&(a=h.show_only_matches_children),!n&&!1!==d)return t.isFunction(d)?d.call(this,i,t.proxy(function(e){e&&e.d&&(e=e.d),this._load_nodes(t.isArray(e)?t.vakata.array_unique(e):[],function(){this.search(i,!0,r,o,s,a)})},this),o):((d=t.extend({},d)).data||(d.data={}),d.data.str=i,o&&(d.data.inside=o),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=t.ajax(d).fail(t.proxy(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(d)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(t.proxy(function(e){e&&e.d&&(e=e.d),this._load_nodes(t.isArray(e)?t.vakata.array_unique(e):[],function(){this.search(i,!0,r,o,s,a)})},this)),this._data.search.lastRequest);if(s||(this._data.search.str=i,this._data.search.dom=t(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=r,this._data.search.smc=a),p=new t.vakata.search(i,!0,{caseSensitive:h.case_sensitive,fuzzy:h.fuzzy}),t.each(u[o||t.jstree.root].children_d,function(t,e){var n=u[e];n.text&&!n.state.hidden&&(!h.search_leaves_only||n.state.loaded&&0===n.children.length)&&(h.search_callback&&h.search_callback.call(this,i,n)||!h.search_callback&&p.search(n.text).isMatch)&&(f.push(e),m=m.concat(n.parents))}),f.length){for(l=0,c=(m=t.vakata.array_unique(m)).length;l<c;l++)m[l]!==t.jstree.root&&u[m[l]]&&!0===this.open_node(m[l],null,0)&&this._data.search.opn.push(m[l]);s?(this._data.search.dom=this._data.search.dom.add(t(this.element[0].querySelectorAll("#"+t.map(f,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(t.jstree.idregex,"\\$&"):e.replace(t.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=t.vakata.array_unique(this._data.search.res.concat(f))):(this._data.search.dom=t(this.element[0].querySelectorAll("#"+t.map(f,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(t.jstree.idregex,"\\$&"):e.replace(t.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=f),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:i,res:this._data.search.res,show_only_matches:r})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=t(this.element[0].querySelectorAll("#"+t.map(this._data.search.res,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(t.jstree.idregex,"\\$&"):e.replace(t.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=t()},this.redraw_node=function(e,i,r,o){if((e=n.redraw_node.apply(this,arguments))&&-1!==t.inArray(e.id,this._data.search.res)){var s,a,l=null;for(s=0,a=e.childNodes.length;s<a;s++)if(e.childNodes[s]&&e.childNodes[s].className&&-1!==e.childNodes[s].className.indexOf("jstree-anchor")){l=e.childNodes[s];break}l&&(l.className+=" jstree-search")}return e}},function(t){t.vakata.search=function(e,i,n){n=n||{},!1!==(n=t.extend({},t.vakata.search.defaults,n)).fuzzy&&(n.fuzzy=!0),e=n.caseSensitive?e:e.toLowerCase();var r,o,s,a,l=n.location,c=n.distance,h=n.threshold,d=e.length;return d>32&&(n.fuzzy=!1),n.fuzzy&&(r=1<<d-1,o=function(){var t={},i=0;for(i=0;i<d;i++)t[e.charAt(i)]=0;for(i=0;i<d;i++)t[e.charAt(i)]|=1<<d-i-1;return t}(),s=function(t,e){var i=t/d,n=Math.abs(l-e);return c?i+n/c:n?1:i}),a=function(t){if(t=n.caseSensitive?t:t.toLowerCase(),e===t||-1!==t.indexOf(e))return{isMatch:!0,score:0};if(!n.fuzzy)return{isMatch:!1,score:1};var i,a,c,u,p,f,m,g,v,y=t.length,b=h,_=t.indexOf(e,l),x=d+y,w=1,k=[];for(-1!==_&&(b=Math.min(s(0,_),b),-1!==(_=t.lastIndexOf(e,l+d))&&(b=Math.min(s(0,_),b))),_=-1,i=0;i<d;i++){for(c=0,u=x;c<u;)s(i,l+u)<=b?c=u:x=u,u=Math.floor((x-c)/2+c);for(x=u,f=Math.max(1,l-u+1),m=Math.min(l+u,y)+d,(g=new Array(m+2))[m+1]=(1<<i)-1,a=m;a>=f;a--)if(v=o[t.charAt(a-1)],g[a]=0===i?(g[a+1]<<1|1)&v:(g[a+1]<<1|1)&v|(p[a+1]|p[a])<<1|1|p[a+1],g[a]&r&&(w=s(i,a-1))<=b){if(b=w,_=a-1,k.push(_),!(_>l))break;f=Math.max(1,2*l-_)}if(s(i+1,l)>b)break;p=g}return{isMatch:_>=0,score:w}},!0===i?{search:a}:a(i)},t.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(t),t.jstree.defaults.sort=function(t,e){return this.get_text(t)>this.get_text(e)?1:-1},t.jstree.plugins.sort=function(e,i){this.bind=function(){i.bind.call(this),this.element.on("model.jstree",t.proxy(function(t,e){this.sort(e.parent,!0)},this)).on("rename_node.jstree create_node.jstree",t.proxy(function(t,e){this.sort(e.parent||e.node.parent,!1),this.redraw_node(e.parent||e.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",t.proxy(function(t,e){this.sort(e.parent,!1),this.redraw_node(e.parent,!0)},this))},this.sort=function(e,i){var n,r;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(t.proxy(this.settings.sort,this)),i))for(n=0,r=e.children_d.length;n<r;n++)this.sort(e.children_d[n],!1)}};var u=!1;t.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1},t.jstree.plugins.state=function(e,i){this.bind=function(){i.bind.call(this);var e=t.proxy(function(){this.element.on(this.settings.state.events,t.proxy(function(){u&&clearTimeout(u),u=setTimeout(t.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this);this.element.on("ready.jstree",t.proxy(function(t,i){this.element.one("restore_state.jstree",e),this.restore_state()||e()},this))},this.save_state=function(){var e={state:this.get_state(),ttl:this.settings.state.ttl,sec:+new Date};t.vakata.storage.set(this.settings.state.key,JSON.stringify(e))},this.restore_state=function(){var e=t.vakata.storage.get(this.settings.state.key);if(e)try{e=JSON.parse(e)}catch(t){return!1}return!(e&&e.ttl&&e.sec&&+new Date-e.sec>e.ttl)&&(e&&e.state&&(e=e.state),e&&t.isFunction(this.settings.state.filter)&&(e=this.settings.state.filter.call(this,e)),!!e&&(this.element.one("set_state.jstree",function(i,n){n.instance.trigger("restore_state",{state:t.extend(!0,{},e)})}),this.set_state(e),!0))},this.clear_state=function(){return t.vakata.storage.del(this.settings.state.key)}},function(t,e){t.vakata.storage={set:function(t,e){return window.localStorage.setItem(t,e)},get:function(t){return window.localStorage.getItem(t)},del:function(t){return window.localStorage.removeItem(t)}}}(t),t.jstree.defaults.types={default:{}},t.jstree.defaults.types[t.jstree.root]={},t.jstree.plugins.types=function(i,n){this.init=function(i,r){var o,s;if(r&&r.types&&r.types.default)for(o in r.types)if("default"!==o&&o!==t.jstree.root&&r.types.hasOwnProperty(o))for(s in r.types.default)r.types.default.hasOwnProperty(s)&&r.types[o][s]===e&&(r.types[o][s]=r.types.default[s]);n.init.call(this,i,r),this._model.data[t.jstree.root].type=t.jstree.root},this.refresh=function(e,i){n.refresh.call(this,e,i),this._model.data[t.jstree.root].type=t.jstree.root},this.bind=function(){this.element.on("model.jstree",t.proxy(function(i,n){var r,o,s,a=this._model.data,l=n.nodes,c=this.settings.types,h="default";for(r=0,o=l.length;r<o;r++){if(h="default",a[l[r]].original&&a[l[r]].original.type&&c[a[l[r]].original.type]&&(h=a[l[r]].original.type),a[l[r]].data&&a[l[r]].data.jstree&&a[l[r]].data.jstree.type&&c[a[l[r]].data.jstree.type]&&(h=a[l[r]].data.jstree.type),a[l[r]].type=h,!0===a[l[r]].icon&&c[h].icon!==e&&(a[l[r]].icon=c[h].icon),c[h].li_attr!==e&&"object"==typeof c[h].li_attr)for(s in c[h].li_attr)if(c[h].li_attr.hasOwnProperty(s)){if("id"===s)continue;a[l[r]].li_attr[s]===e?a[l[r]].li_attr[s]=c[h].li_attr[s]:"class"===s&&(a[l[r]].li_attr.class=c[h].li_attr.class+" "+a[l[r]].li_attr.class)}if(c[h].a_attr!==e&&"object"==typeof c[h].a_attr)for(s in c[h].a_attr)if(c[h].a_attr.hasOwnProperty(s)){if("id"===s)continue;a[l[r]].a_attr[s]===e?a[l[r]].a_attr[s]=c[h].a_attr[s]:"href"===s&&"#"===a[l[r]].a_attr[s]?a[l[r]].a_attr.href=c[h].a_attr.href:"class"===s&&(a[l[r]].a_attr.class=c[h].a_attr.class+" "+a[l[r]].a_attr.class)}}a[t.jstree.root].type=t.jstree.root},this)),n.bind.call(this)},this.get_json=function(e,i,r){var o,s,a=this._model.data,l=i?t.extend(!0,{},i,{no_id:!1}):{},c=n.get_json.call(this,e,l,r);if(!1===c)return!1;if(t.isArray(c))for(o=0,s=c.length;o<s;o++)c[o].type=c[o].id&&a[c[o].id]&&a[c[o].id].type?a[c[o].id].type:"default",i&&i.no_id&&(delete c[o].id,c[o].li_attr&&c[o].li_attr.id&&delete c[o].li_attr.id,c[o].a_attr&&c[o].a_attr.id&&delete c[o].a_attr.id);else c.type=c.id&&a[c.id]&&a[c.id].type?a[c.id].type:"default",i&&i.no_id&&(c=this._delete_ids(c));return c},this._delete_ids=function(e){if(t.isArray(e)){for(var i=0,n=e.length;i<n;i++)e[i]=this._delete_ids(e[i]);return e}return delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id,e.children&&t.isArray(e.children)&&(e.children=this._delete_ids(e.children)),e},this.check=function(i,r,o,s,a){if(!1===n.check.call(this,i,r,o,s,a))return!1;r=r&&r.id?r:this.get_node(r),o=o&&o.id?o:this.get_node(o);var l,c,h,d,u=r&&r.id?a&&a.origin?a.origin:t.jstree.reference(r.id):null;switch(u=u&&u._model&&u._model.data?u._model.data:null,i){case"create_node":case"move_node":case"copy_node":if("move_node"!==i||-1===t.inArray(r.id,o.children)){if((l=this.get_rules(o)).max_children!==e&&-1!==l.max_children&&l.max_children===o.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+i,data:JSON.stringify({chk:i,pos:s,obj:!(!r||!r.id)&&r.id,par:!(!o||!o.id)&&o.id})},!1;if(l.valid_children!==e&&-1!==l.valid_children&&-1===t.inArray(r.type||"default",l.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+i,data:JSON.stringify({chk:i,pos:s,obj:!(!r||!r.id)&&r.id,par:!(!o||!o.id)&&o.id})},!1;if(u&&r.children_d&&r.parents){for(c=0,h=0,d=r.children_d.length;h<d;h++)c=Math.max(c,u[r.children_d[h]].parents.length);c=c-r.parents.length+1}(c<=0||c===e)&&(c=1);do{if(l.max_depth!==e&&-1!==l.max_depth&&l.max_depth<c)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+i,data:JSON.stringify({chk:i,pos:s,obj:!(!r||!r.id)&&r.id,par:!(!o||!o.id)&&o.id})},!1;o=this.get_node(o.parent),l=this.get_rules(o),c++}while(o)}}return!0},this.get_rules=function(t){if(!(t=this.get_node(t)))return!1;var i=this.get_type(t,!0);return i.max_depth===e&&(i.max_depth=-1),i.max_children===e&&(i.max_children=-1),i.valid_children===e&&(i.valid_children=-1),i},this.get_type=function(e,i){return!!(e=this.get_node(e))&&(i?t.extend({type:e.type},this.settings.types[e.type]):e.type)},this.set_type=function(i,n){var r,o,s,a,l,c,h,d,u=this._model.data;if(t.isArray(i)){for(o=0,s=(i=i.slice()).length;o<s;o++)this.set_type(i[o],n);return!0}if(r=this.settings.types,i=this.get_node(i),!r[n]||!i)return!1;if((h=this.get_node(i,!0))&&h.length&&(d=h.children(".jstree-anchor")),a=i.type,l=this.get_icon(i),i.type=n,(!0===l||!r[a]||r[a].icon!==e&&l===r[a].icon)&&this.set_icon(i,r[n].icon===e||r[n].icon),r[a]&&r[a].li_attr!==e&&"object"==typeof r[a].li_attr)for(c in r[a].li_attr)if(r[a].li_attr.hasOwnProperty(c)){if("id"===c)continue;"class"===c?(u[i.id].li_attr.class=(u[i.id].li_attr.class||"").replace(r[a].li_attr[c],""),h&&h.removeClass(r[a].li_attr[c])):u[i.id].li_attr[c]===r[a].li_attr[c]&&(u[i.id].li_attr[c]=null,h&&h.removeAttr(c))}if(r[a]&&r[a].a_attr!==e&&"object"==typeof r[a].a_attr)for(c in r[a].a_attr)if(r[a].a_attr.hasOwnProperty(c)){if("id"===c)continue;"class"===c?(u[i.id].a_attr.class=(u[i.id].a_attr.class||"").replace(r[a].a_attr[c],""),d&&d.removeClass(r[a].a_attr[c])):u[i.id].a_attr[c]===r[a].a_attr[c]&&("href"===c?(u[i.id].a_attr[c]="#",d&&d.attr("href","#")):(delete u[i.id].a_attr[c],d&&d.removeAttr(c)))}if(r[n].li_attr!==e&&"object"==typeof r[n].li_attr)for(c in r[n].li_attr)if(r[n].li_attr.hasOwnProperty(c)){if("id"===c)continue;u[i.id].li_attr[c]===e?(u[i.id].li_attr[c]=r[n].li_attr[c],h&&("class"===c?h.addClass(r[n].li_attr[c]):h.attr(c,r[n].li_attr[c]))):"class"===c&&(u[i.id].li_attr.class=r[n].li_attr[c]+" "+u[i.id].li_attr.class,h&&h.addClass(r[n].li_attr[c]))}if(r[n].a_attr!==e&&"object"==typeof r[n].a_attr)for(c in r[n].a_attr)if(r[n].a_attr.hasOwnProperty(c)){if("id"===c)continue;u[i.id].a_attr[c]===e?(u[i.id].a_attr[c]=r[n].a_attr[c],d&&("class"===c?d.addClass(r[n].a_attr[c]):d.attr(c,r[n].a_attr[c]))):"href"===c&&"#"===u[i.id].a_attr[c]?(u[i.id].a_attr.href=r[n].a_attr.href,d&&d.attr("href",r[n].a_attr.href)):"class"===c&&(u[i.id].a_attr.class=r[n].a_attr.class+" "+u[i.id].a_attr.class,d&&d.addClass(r[n].a_attr[c]))}return!0}},t.jstree.defaults.unique={case_sensitive:!1,duplicate:function(t,e){return t+" ("+e+")"}},t.jstree.plugins.unique=function(i,n){this.check=function(e,i,r,o,s){if(!1===n.check.call(this,e,i,r,o,s))return!1;if(i=i&&i.id?i:this.get_node(i),!(r=r&&r.id?r:this.get_node(r))||!r.children)return!0;var a,l,c="rename_node"===e?o:i.text,h=[],d=this.settings.unique.case_sensitive,u=this._model.data;for(a=0,l=r.children.length;a<l;a++)h.push(d?u[r.children[a]].text:u[r.children[a]].text.toLowerCase());switch(d||(c=c.toLowerCase()),e){case"delete_node":return!0;case"rename_node":return(a=-1===t.inArray(c,h)||i.text&&i.text[d?"toString":"toLowerCase"]()===c)||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:o,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a;case"create_node":return(a=-1===t.inArray(c,h))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:o,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a;case"copy_node":return(a=-1===t.inArray(c,h))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:o,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a;case"move_node":return(a=i.parent===r.id&&(!s||!s.is_multi)||-1===t.inArray(c,h))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:o,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a}return!0},this.create_node=function(i,r,o,s,a){if(!r||r.text===e){if(null===i&&(i=t.jstree.root),!(i=this.get_node(i)))return n.create_node.call(this,i,r,o,s,a);if(!(o=o===e?"last":o).toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(i))return n.create_node.call(this,i,r,o,s,a);r||(r={});var l,c,h,d,u,p=this._model.data,f=this.settings.unique.case_sensitive,m=this.settings.unique.duplicate;for(c=l=this.get_string("New node"),h=[],d=0,u=i.children.length;d<u;d++)h.push(f?p[i.children[d]].text:p[i.children[d]].text.toLowerCase());for(d=1;-1!==t.inArray(f?c:c.toLowerCase(),h);)c=m.call(this,l,++d).toString();r.text=c}return n.create_node.call(this,i,r,o,s,a)}};var p=l.createElement("DIV");if(p.setAttribute("unselectable","on"),p.setAttribute("role","presentation"),p.className="jstree-wholerow",p.innerHTML="&#160;",t.jstree.plugins.wholerow=function(e,i){this.bind=function(){i.bind.call(this),this.element.on("ready.jstree set_state.jstree",t.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",t.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",t.proxy(function(t,e){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",t.proxy(function(t,e){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var i,n,r=!1;for(i=0,n=e.selected.length;i<n;i++)(r=this.get_node(e.selected[i],!0))&&r.length&&r.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",t.proxy(function(t,e){this.get_node(e.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",t.proxy(function(t,e){"hover_node"===t.type&&this.is_disabled(e.node)||this.get_node(e.node,!0).children(".jstree-wholerow")["hover_node"===t.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",t.proxy(function(e){if(this._data.contextmenu){e.preventDefault();var i=t.Event("contextmenu",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,pageX:e.pageX,pageY:e.pageY});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i)}},this)).on("click.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var i=t.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()}).on("dblclick.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var i=t.Event("dblclick",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",t.proxy(function(e){e.stopImmediatePropagation();var i=t.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",t.proxy(function(t){return t.stopImmediatePropagation(),this.is_disabled(t.currentTarget)||this.hover_node(t.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",t.proxy(function(t){this.dehover_node(t.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),i.teardown.call(this)},this.redraw_node=function(e,n,r,o){if(e=i.redraw_node.apply(this,arguments)){var s=p.cloneNode(!0);-1!==t.inArray(e.id,this._data.core.selected)&&(s.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(s.className+=" jstree-wholerow-hovered"),e.insertBefore(s,e.childNodes[0])}return e}},l.registerElement&&Object&&Object.create){var f=Object.create(HTMLElement.prototype);f.createdCallback=function(){var e,i={core:{},plugins:[]};for(e in t.jstree.plugins)t.jstree.plugins.hasOwnProperty(e)&&this.attributes[e]&&(i.plugins.push(e),this.getAttribute(e)&&JSON.parse(this.getAttribute(e))&&(i[e]=JSON.parse(this.getAttribute(e))));for(e in t.jstree.defaults.core)t.jstree.defaults.core.hasOwnProperty(e)&&this.attributes[e]&&(i.core[e]=JSON.parse(this.getAttribute(e))||this.getAttribute(e));t(this).jstree(i)};try{l.registerElement("vakata-jstree",{prototype:f})}catch(t){}}}}),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Raphael=e():t.Raphael=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){var n,r;n=[i(1),i(3),i(4)],void 0!==(r=function(t){return t}.apply(e,n))&&(t.exports=r)},function(t,e,i){var n,r;n=[i(2)],void 0!==(r=function(t){function e(i){if(e.is(i,"function"))return b?i():t.on("raphael.DOMload",i);if(e.is(i,Y))return e._engine.create[A](e,i.splice(0,3+e.is(i[0],W))).add(i);var n=Array.prototype.slice.call(arguments,0);if(e.is(n[n.length-1],"function")){var r=n.pop();return b?r.call(e._engine.create[A](e,n)):t.on("raphael.DOMload",function(){r.call(e._engine.create[A](e,n))})}return e._engine.create[A](e,arguments)}function i(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[S](n)&&(e[n]=i(t[n]));return e}function n(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return t.push(t.splice(i,1)[0])}function r(t,e,i){function r(){var o=Array.prototype.slice.call(arguments,0),s=o.join("␀"),a=r.cache=r.cache||{},l=r.count=r.count||[];return a[S](s)?(n(l,s),i?i(a[s]):a[s]):(l.length>=1e3&&delete a[l.shift()],l.push(s),a[s]=t[A](e,o),i?i(a[s]):a[s])}return r}function o(){return this.hex}function s(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var o=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?o[3]={x:+t[0],y:+t[1]}:r-2==n&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?o[3]=o[2]:n||(o[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return i}function a(t,e,i,n,r){return t*(t*(-3*e+9*i-9*n+3*r)+6*e-12*i+6*n)-3*e+3*i}function l(t,e,i,n,r,o,s,l,c){null==c&&(c=1);for(var h=(c=c>1?1:c<0?0:c)/2,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var m=h*d[f]+h,g=a(m,t,i,r,s),v=a(m,e,n,o,l),y=g*g+v*v;p+=u[f]*R.sqrt(y)}return h*p}function c(t,e,i,n,r,o,s,a,c){if(!(c<0||l(t,e,i,n,r,o,s,a)<c)){var h,d=.5,u=1-d;for(h=l(t,e,i,n,r,o,s,a,u);B(h-c)>.01;)d/=2,h=l(t,e,i,n,r,o,s,a,u+=(h<c?1:-1)*d);return u}}function h(t,e,i,n,r,o,s,a){if(!($(t,i)<H(r,s)||H(t,i)>$(r,s)||$(e,n)<H(o,a)||H(e,n)>$(o,a))){var l=(t*n-e*i)*(r-s)-(t-i)*(r*a-o*s),c=(t*n-e*i)*(o-a)-(e-n)*(r*a-o*s),h=(t-i)*(o-a)-(e-n)*(r-s);if(h){var d=l/h,u=c/h,p=+d.toFixed(2),f=+u.toFixed(2);if(!(p<+H(t,i).toFixed(2)||p>+$(t,i).toFixed(2)||p<+H(r,s).toFixed(2)||p>+$(r,s).toFixed(2)||f<+H(e,n).toFixed(2)||f>+$(e,n).toFixed(2)||f<+H(o,a).toFixed(2)||f>+$(o,a).toFixed(2)))return{x:d,y:u}}}}function d(t,i,n){var r=e.bezierBBox(t),o=e.bezierBBox(i);if(!e.isBBoxIntersect(r,o))return n?0:[];for(var s=l.apply(0,t),a=l.apply(0,i),c=$(~~(s/5),1),d=$(~~(a/5),1),u=[],p=[],f={},m=n?0:[],g=0;g<c+1;g++){var v=e.findDotsAtSegment.apply(e,t.concat(g/c));u.push({x:v.x,y:v.y,t:g/c})}for(g=0;g<d+1;g++)v=e.findDotsAtSegment.apply(e,i.concat(g/d)),p.push({x:v.x,y:v.y,t:g/d});for(g=0;g<c;g++)for(var y=0;y<d;y++){var b=u[g],_=u[g+1],x=p[y],w=p[y+1],k=B(_.x-b.x)<.001?"y":"x",S=B(w.x-x.x)<.001?"y":"x",C=h(b.x,b.y,_.x,_.y,x.x,x.y,w.x,w.y);if(C){if(f[C.x.toFixed(4)]==C.y.toFixed(4))continue;f[C.x.toFixed(4)]=C.y.toFixed(4);var D=b.t+B((C[k]-b[k])/(_[k]-b[k]))*(_.t-b.t),T=x.t+B((C[S]-x[S])/(w[S]-x[S]))*(w.t-x.t);D>=0&&D<=1.001&&T>=0&&T<=1.001&&(n?m++:m.push({x:C.x,y:C.y,t1:H(D,1),t2:H(T,1)}))}}return m}function u(t,i,n){t=e._path2curve(t),i=e._path2curve(i);for(var r,o,s,a,l,c,h,u,p,f,m=n?0:[],g=0,v=t.length;g<v;g++){var y=t[g];if("M"==y[0])r=l=y[1],o=c=y[2];else{"C"==y[0]?(r=(p=[r,o].concat(y.slice(1)))[6],o=p[7]):(p=[r,o,r,o,l,c,l,c],r=l,o=c);for(var b=0,_=i.length;b<_;b++){var x=i[b];if("M"==x[0])s=h=x[1],a=u=x[2];else{"C"==x[0]?(s=(f=[s,a].concat(x.slice(1)))[6],a=f[7]):(f=[s,a,s,a,h,u,h,u],s=h,a=u);var w=d(p,f,n);if(n)m+=w;else{for(var k=0,S=w.length;k<S;k++)w[k].segment1=g,w[k].segment2=b,w[k].bez1=p,w[k].bez2=f;m=m.concat(w)}}}}}return m}function p(t,e,i,n,r,o){null!=t?(this.a=+t,this.b=+e,this.c=+i,this.d=+n,this.e=+r,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function f(){return this.x+I+this.y+I+this.width+" × "+this.height}function m(t,e,i,n,r,o){function s(t){return((h*t+c)*t+l)*t}function a(t,e){var i,n,r,o,a,d;for(r=t,d=0;d<8;d++){if(o=s(r)-t,B(o)<e)return r;if(a=(3*h*r+2*c)*r+l,B(a)<1e-6)break;r-=o/a}if(i=0,n=1,(r=t)<i)return i;if(r>n)return n;for(;i<n;){if(o=s(r),B(o-t)<e)return r;t>o?i=r:n=r,r=(n-i)/2+i}return r}var l=3*e,c=3*(n-e)-l,h=1-l-c,d=3*i,u=3*(r-i)-d,p=1-d-u;return function(t,e){var i=a(t,e);return((p*i+u)*i+d)*i}(t,1/(200*o))}function g(t,e){var i=[],n={};if(this.ms=e,this.times=1,t){for(var r in t)t[S](r)&&(n[Q(r)]=t[r],i.push(Q(r)));i.sort(ct)}this.anim=n,this.top=i[i.length-1],this.percents=i}function v(i,n,r,o,s,a){r=Q(r);var l,c,h,d,u,f,g=i.ms,v={},y={},b={};if(o)for(w=0,k=re.length;w<k;w++){var _=re[w];if(_.el.id==n.id&&_.anim==i){_.percent!=r?(re.splice(w,1),h=1):c=_,n.attr(_.totalOrigin);break}}else o=+y;for(var w=0,k=i.percents.length;w<k;w++){if(i.percents[w]==r||i.percents[w]>o*i.top){r=i.percents[w],u=i.percents[w-1]||0,g=g/i.top*(r-u),d=i.percents[w+1],l=i.anim[r];break}o&&n.attr(i.anim[i.percents[w]])}if(l){if(c)c.initstatus=o,c.start=new Date-c.ms*o;else{for(var C in l)if(l[S](C)&&(et[S](C)||n.paper.customAttributes[S](C)))switch(v[C]=n.attr(C),null==v[C]&&(v[C]=tt[C]),y[C]=l[C],et[C]){case W:b[C]=(y[C]-v[C])/g;break;case"colour":v[C]=e.getRGB(v[C]);var D=e.getRGB(y[C]);b[C]={r:(D.r-v[C].r)/g,g:(D.g-v[C].g)/g,b:(D.b-v[C].b)/g};break;case"path":var T=Ot(v[C],y[C]),A=T[1];for(v[C]=T[0],b[C]=[],w=0,k=v[C].length;w<k;w++){b[C][w]=[0];for(var E=1,P=v[C][w].length;E<P;E++)b[C][w][E]=(A[w][E]-v[C][w][E])/g}break;case"transform":var I=n._,F=Rt(I[C],y[C]);if(F)for(v[C]=F.from,y[C]=F.to,b[C]=[],b[C].real=!0,w=0,k=v[C].length;w<k;w++)for(b[C][w]=[v[C][w][0]],E=1,P=v[C][w].length;E<P;E++)b[C][w][E]=(y[C][w][E]-v[C][w][E])/g;else{var L=n.matrix||new p,j={_:{transform:I.transform},getBBox:function(){return n.getBBox(1)}};v[C]=[L.a,L.b,L.c,L.d,L.e,L.f],Lt(j,y[C]),y[C]=j._.transform,b[C]=[(j.matrix.a-L.a)/g,(j.matrix.b-L.b)/g,(j.matrix.c-L.c)/g,(j.matrix.d-L.d)/g,(j.matrix.e-L.e)/g,(j.matrix.f-L.f)/g]}break;case"csv":var R=O(l[C])[N](x),$=O(v[C])[N](x);if("clip-rect"==C)for(v[C]=$,b[C]=[],w=$.length;w--;)b[C][w]=(R[w]-v[C][w])/g;y[C]=R;break;default:for(R=[][M](l[C]),$=[][M](v[C]),b[C]=[],w=n.paper.customAttributes[C].length;w--;)b[C][w]=((R[w]||0)-($[w]||0))/g}var H=l.easing,B=e.easing_formulas[H];if(!B)if((B=O(H).match(K))&&5==B.length){var z=B;B=function(t){return m(t,+z[1],+z[2],+z[3],+z[4],g)}}else B=ht;if(f=l.start||i.start||+new Date,_={anim:i,percent:r,timestamp:f,start:f+(i.del||0),status:0,initstatus:o||0,stop:!1,ms:g,easing:B,from:v,diff:b,to:y,el:n,callback:l.callback,prev:u,next:d,repeat:a||i.times,origin:n.attr(),totalOrigin:s},re.push(_),o&&!c&&!h&&(_.stop=!0,_.start=new Date-g*o,1==re.length))return se();h&&(_.start=new Date-_.ms*o),1==re.length&&oe(se)}t("raphael.anim.start."+n.id,n,i)}}function y(t){for(var e=0;e<re.length;e++)re[e].el.paper==t&&re.splice(e--,1)}e.version="2.2.0",e.eve=t;var b,_,x=/[, ]+/,w={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},k=/\{(\d+)\}/g,S="hasOwnProperty",C={doc:document,win:window},D={was:Object.prototype[S].call(C.win,"Raphael"),is:C.win.Raphael},T=function(){this.ca=this.customAttributes={}},A="apply",M="concat",E="ontouchstart"in C.win||C.win.DocumentTouch&&C.doc instanceof DocumentTouch,P="",I=" ",O=String,N="split",F="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[N](I),L={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},j=O.prototype.toLowerCase,R=Math,$=R.max,H=R.min,B=R.abs,z=R.pow,U=R.PI,W="number",Y="array",V=Object.prototype.toString,q=(e._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),G={NaN:1,Infinity:1,"-Infinity":1},K=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,X=R.round,Q=parseFloat,Z=parseInt,J=O.prototype.toUpperCase,tt=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},et=e._availableAnimAttrs={blur:W,"clip-rect":"csv",cx:W,cy:W,fill:"colour","fill-opacity":W,"font-size":W,height:W,opacity:W,path:"path",r:W,rx:W,ry:W,stroke:"colour","stroke-opacity":W,"stroke-width":W,transform:"transform",width:W,x:W,y:W},it=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,nt={hs:1,rg:1},rt=/,?([achlmqrstvxz]),?/gi,ot=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,st=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,at=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,lt=(e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),ct=function(t,e){return Q(t)-Q(e)},ht=function(t){return t},dt=e._rectPath=function(t,e,i,n,r){return r?[["M",t+r,e],["l",i-2*r,0],["a",r,r,0,0,1,r,r],["l",0,n-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-i,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-n],["a",r,r,0,0,1,r,-r],["z"]]:[["M",t,e],["l",i,0],["l",0,n],["l",-i,0],["z"]]},ut=function(t,e,i,n){return null==n&&(n=i),[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]]},pt=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return ut(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return ut(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return dt(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return dt(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return dt(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return dt(e.x,e.y,e.width,e.height)}},ft=e.mapPath=function(t,e){if(!e)return t;var i,n,r,o,s,a,l;for(r=0,s=(t=Ot(t)).length;r<s;r++)for(o=1,a=(l=t[r]).length;o<a;o+=2)i=e.x(l[o],l[o+1]),n=e.y(l[o],l[o+1]),l[o]=i,l[o+1]=n;return t};if(e._g=C,e.type=C.win.SVGAngle||C.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==e.type){var mt,gt=C.doc.createElement("div");if(gt.innerHTML='<v:shape adj="1"/>',mt=gt.firstChild,mt.style.behavior="url(#default#VML)",!mt||"object"!=typeof mt.adj)return e.type=P;gt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=T,e.fn=_=T.prototype=e.prototype,e._id=0,e.is=function(t,e){return"finite"==(e=j.call(e))?!G[S](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||V.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,i,n,r,o,s){if(null==o){var a=t-n,l=i-r;return a||l?(180+180*R.atan2(-l,-a)/U+360)%360:0}return e.angle(t,i,o,s)-e.angle(n,r,o,s)},e.rad=function(t){return t%360*U/180},e.deg=function(t){return Math.round(180*t/U%360*1e3)/1e3},e.snapTo=function(t,i,n){if(n=e.is(n,"finite")?n:10,e.is(t,Y)){for(var r=t.length;r--;)if(B(t[r]-i)<=n)return t[r]}else{var o=i%(t=+t);if(o<n)return i-o;if(o>t-n)return i-o+t}return i};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*R.random()|0;return("x"==t?e:3&e|8).toString(16)});e.setWindow=function(i){t("raphael.setWindow",e,C.win,i),C.win=i,C.doc=C.win.document,e._engine.initWin&&e._engine.initWin(C.win)};var vt=function(t){if(e.vml){var i,n=/^\s+|\s+$/g;try{var o=new ActiveXObject("htmlfile");o.write("<body>"),o.close(),i=o.body}catch(t){i=createPopup().document.body}var s=i.createTextRange();vt=r(function(t){try{i.style.color=O(t).replace(n,P);var e=s.queryCommandValue("ForeColor");return"#"+("000000"+(e=(255&e)<<16|65280&e|(16711680&e)>>>16).toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=C.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",C.doc.body.appendChild(a),vt=r(function(t){return a.style.color=t,C.doc.defaultView.getComputedStyle(a,P).getPropertyValue("color")})}return vt(t)},yt=function(){return"hsb("+[this.h,this.s,this.b]+")"},bt=function(){return"hsl("+[this.h,this.s,this.l]+")"},_t=function(){return this.hex},xt=function(t,i,n){if(null==i&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,i=t.g,t=t.r),null==i&&e.is(t,"string")){var r=e.getRGB(t);t=r.r,i=r.g,n=r.b}return(t>1||i>1||n>1)&&(t/=255,i/=255,n/=255),[t,i,n]},wt=function(t,i,n,r){var o={r:t*=255,g:i*=255,b:n*=255,hex:e.rgb(t,i,n),toString:_t};return e.is(r,"finite")&&(o.opacity=r),o};e.color=function(t){var i;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(i=e.hsb2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(i=e.hsl2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(i=e.rgb2hsl(t),t.h=i.h,t.s=i.s,t.l=i.l,i=e.rgb2hsb(t),t.v=i.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=_t,t},e.hsb2rgb=function(t,e,i,n){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(i=t.b,e=t.s,n=t.o,t=t.h);var r,o,s,a,l;return t=(t*=360)%360/60,l=i*e,a=l*(1-B(t%2-1)),r=o=s=i-l,t=~~t,r+=[l,a,0,0,a,l][t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],wt(r,o,s,n)},e.hsl2rgb=function(t,e,i,n){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(i=t.l,e=t.s,t=t.h),(t>1||e>1||i>1)&&(t/=360,e/=100,i/=100);var r,o,s,a,l;return t=(t*=360)%360/60,l=2*e*(i<.5?i:1-i),a=l*(1-B(t%2-1)),r=o=s=i-l/2,t=~~t,r+=[l,a,0,0,a,l][t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],wt(r,o,s,n)},e.rgb2hsb=function(t,e,i){t=(i=xt(t,e,i))[0],e=i[1],i=i[2];var n,r,o,s;return o=$(t,e,i),s=o-H(t,e,i),n=0==s?null:o==t?(e-i)/s:o==e?(i-t)/s+2:(t-e)/s+4,n=(n+360)%6*60/360,r=0==s?0:s/o,{h:n,s:r,b:o,toString:yt}},e.rgb2hsl=function(t,e,i){t=(i=xt(t,e,i))[0],e=i[1],i=i[2];var n,r,o,s,a,l;return s=$(t,e,i),a=H(t,e,i),l=s-a,n=0==l?null:s==t?(e-i)/l:s==e?(i-t)/l+2:(t-e)/l+4,n=(n+360)%6*60/360,o=(s+a)/2,r=0==l?0:o<.5?l/(2*o):l/(2-2*o),{h:n,s:r,l:o,toString:bt}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var i=C.doc.createElement("img");i.style.cssText="position:absolute;left:-9999em;top:-9999em",i.onload=function(){e.call(this),this.onload=null,C.doc.body.removeChild(this)},i.onerror=function(){C.doc.body.removeChild(this)},C.doc.body.appendChild(i),i.src=t};e.getRGB=r(function(t){if(!t||(t=O(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:o};!(nt[S](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=vt(t));var i,n,r,s,a,l,c=t.match(q);return c?(c[2]&&(r=Z(c[2].substring(5),16),n=Z(c[2].substring(3,5),16),i=Z(c[2].substring(1,3),16)),c[3]&&(r=Z((a=c[3].charAt(3))+a,16),n=Z((a=c[3].charAt(2))+a,16),i=Z((a=c[3].charAt(1))+a,16)),c[4]&&(l=c[4][N](it),i=Q(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=Q(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=Q(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(s=Q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100)),c[5]?(l=c[5][N](it),i=Q(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=Q(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=Q(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(i/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(s=Q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),e.hsb2rgb(i,n,r,s)):c[6]?(l=c[6][N](it),i=Q(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=Q(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=Q(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(i/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(s=Q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),e.hsl2rgb(i,n,r,s)):(c={r:i,g:n,b:r,toString:o},c.hex="#"+(16777216|r|n<<8|i<<16).toString(16).slice(1),e.is(s,"finite")&&(c.opacity=s),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o}},e),e.hsb=r(function(t,i,n){return e.hsb2rgb(t,i,n).hex}),e.hsl=r(function(t,i,n){return e.hsl2rgb(t,i,n).hex}),e.rgb=r(function(t,e,i){function n(t){return t+.5|0}return"#"+(16777216|n(i)|n(e)<<8|n(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},i=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),i.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var i=kt(t);if(i.arr)return Ct(i.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},r=[];return e.is(t,Y)&&e.is(t[0],Y)&&(r=Ct(t)),r.length||O(t).replace(ot,function(t,e,i){var o=[],s=e.toLowerCase();if(i.replace(at,function(t,e){e&&o.push(+e)}),"m"==s&&o.length>2&&(r.push([e][M](o.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)r.push([e][M](o));else for(;o.length>=n[s]&&(r.push([e][M](o.splice(0,n[s]))),n[s]););}),r.toString=e._path2string,i.arr=Ct(r),r},e.parseTransformString=r(function(t){if(!t)return null;var i=[];return e.is(t,Y)&&e.is(t[0],Y)&&(i=Ct(t)),i.length||O(t).replace(st,function(t,e,n){var r=[];j.call(e);n.replace(at,function(t,e){e&&r.push(+e)}),i.push([e][M](r))}),i.toString=e._path2string,i});var kt=function(t){var e=kt.ps=kt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var i in e)e[S](i)&&i!=t&&(e[i].sleep--,!e[i].sleep&&delete e[i])}),e[t]};e.findDotsAtSegment=function(t,e,i,n,r,o,s,a,l){var c=1-l,h=z(c,3),d=z(c,2),u=l*l,p=u*l,f=h*t+3*d*l*i+3*c*l*l*r+p*s,m=h*e+3*d*l*n+3*c*l*l*o+p*a,g=t+2*l*(i-t)+u*(r-2*i+t),v=e+2*l*(n-e)+u*(o-2*n+e),y=i+2*l*(r-i)+u*(s-2*r+i),b=n+2*l*(o-n)+u*(a-2*o+n),_=c*t+l*i,x=c*e+l*n,w=c*r+l*s,k=c*o+l*a,S=90-180*R.atan2(g-y,v-b)/U;return(g>y||v<b)&&(S+=180),{x:f,y:m,m:{x:g,y:v},n:{x:y,y:b},start:{x:_,y:x},end:{x:w,y:k},alpha:S}},e.bezierBBox=function(t,i,n,r,o,s,a,l){e.is(t,"array")||(t=[t,i,n,r,o,s,a,l]);var c=It.apply(null,t);return{x:c.min.x,y:c.min.y,x2:c.max.x,y2:c.max.y,width:c.max.x-c.min.x,height:c.max.y-c.min.y}},e.isPointInsideBBox=function(t,e,i){return e>=t.x&&e<=t.x2&&i>=t.y&&i<=t.y2},e.isBBoxIntersect=function(t,i){var n=e.isPointInsideBBox;return n(i,t.x,t.y)||n(i,t.x2,t.y)||n(i,t.x,t.y2)||n(i,t.x2,t.y2)||n(t,i.x,i.y)||n(t,i.x2,i.y)||n(t,i.x,i.y2)||n(t,i.x2,i.y2)||(t.x<i.x2&&t.x>i.x||i.x<t.x2&&i.x>t.x)&&(t.y<i.y2&&t.y>i.y||i.y<t.y2&&i.y>t.y)},e.pathIntersection=function(t,e){return u(t,e)},e.pathIntersectionNumber=function(t,e){return u(t,e,1)},e.isPointInsidePath=function(t,i,n){var r=e.pathBBox(t);return e.isPointInsideBBox(r,i,n)&&u(t,[["M",i,n],["H",r.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var St=e.pathBBox=function(t){var e=kt(t);if(e.bbox)return i(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var n,r=0,o=0,s=[],a=[],l=0,c=(t=Ot(t)).length;l<c;l++)if("M"==(n=t[l])[0])r=n[1],o=n[2],s.push(r),a.push(o);else{var h=It(r,o,n[1],n[2],n[3],n[4],n[5],n[6]);s=s[M](h.min.x,h.max.x),a=a[M](h.min.y,h.max.y),r=n[5],o=n[6]}var d=H[A](0,s),u=H[A](0,a),p=$[A](0,s),f=$[A](0,a),m=p-d,g=f-u,v={x:d,y:u,x2:p,y2:f,width:m,height:g,cx:d+m/2,cy:u+g/2};return e.bbox=i(v),v},Ct=function(t){var n=i(t);return n.toString=e._path2string,n},Dt=e._pathToRelative=function(t){var i=kt(t);if(i.rel)return Ct(i.rel);e.is(t,Y)&&e.is(t&&t[0],Y)||(t=e.parsePathString(t));var n=[],r=0,o=0,s=0,a=0,l=0;"M"==t[0][0]&&(s=r=t[0][1],a=o=t[0][2],l++,n.push(["M",r,o]));for(var c=l,h=t.length;c<h;c++){var d=n[c]=[],u=t[c];if(u[0]!=j.call(u[0]))switch(d[0]=j.call(u[0]),d[0]){case"a":d[1]=u[1],d[2]=u[2],d[3]=u[3],d[4]=u[4],d[5]=u[5],d[6]=+(u[6]-r).toFixed(3),d[7]=+(u[7]-o).toFixed(3);break;case"v":d[1]=+(u[1]-o).toFixed(3);break;case"m":s=u[1],a=u[2];default:for(var p=1,f=u.length;p<f;p++)d[p]=+(u[p]-(p%2?r:o)).toFixed(3)}else{d=n[c]=[],"m"==u[0]&&(s=u[1]+r,a=u[2]+o);for(var m=0,g=u.length;m<g;m++)n[c][m]=u[m]}var v=n[c].length;switch(n[c][0]){case"z":r=s,o=a;break;case"h":r+=+n[c][v-1];break;case"v":o+=+n[c][v-1];break;default:r+=+n[c][v-2],o+=+n[c][v-1]}}return n.toString=e._path2string,i.rel=Ct(n),n},Tt=e._pathToAbsolute=function(t){var i=kt(t);if(i.abs)return Ct(i.abs);if(e.is(t,Y)&&e.is(t&&t[0],Y)||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var n=[],r=0,o=0,a=0,l=0,c=0;"M"==t[0][0]&&(a=r=+t[0][1],l=o=+t[0][2],c++,n[0]=["M",r,o]);for(var h,d,u=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),p=c,f=t.length;p<f;p++){if(n.push(h=[]),(d=t[p])[0]!=J.call(d[0]))switch(h[0]=J.call(d[0]),h[0]){case"A":h[1]=d[1],h[2]=d[2],h[3]=d[3],h[4]=d[4],h[5]=d[5],h[6]=+(d[6]+r),h[7]=+(d[7]+o);break;case"V":h[1]=+d[1]+o;break;case"H":h[1]=+d[1]+r;break;case"R":for(var m=[r,o][M](d.slice(1)),g=2,v=m.length;g<v;g++)m[g]=+m[g]+r,m[++g]=+m[g]+o;n.pop(),n=n[M](s(m,u));break;case"M":a=+d[1]+r,l=+d[2]+o;default:for(g=1,v=d.length;g<v;g++)h[g]=+d[g]+(g%2?r:o)}else if("R"==d[0])m=[r,o][M](d.slice(1)),n.pop(),n=n[M](s(m,u)),h=["R"][M](d.slice(-2));else for(var y=0,b=d.length;y<b;y++)h[y]=d[y];switch(h[0]){case"Z":r=a,o=l;break;case"H":r=h[1];break;case"V":o=h[1];break;case"M":a=h[h.length-2],l=h[h.length-1];default:r=h[h.length-2],o=h[h.length-1]}}return n.toString=e._path2string,i.abs=Ct(n),n},At=function(t,e,i,n){return[t,e,i,n,i,n]},Mt=function(t,e,i,n,r,o){return[1/3*t+2/3*i,1/3*e+2/3*n,1/3*r+2/3*i,1/3*o+2/3*n,r,o]},Et=function(t,e,i,n,o,s,a,l,c,h){var d,u=120*U/180,p=U/180*(+o||0),f=[],m=r(function(t,e,i){return{x:t*R.cos(i)-e*R.sin(i),y:t*R.sin(i)+e*R.cos(i)}});if(h)S=h[0],C=h[1],w=h[2],k=h[3];else{t=(d=m(t,e,-p)).x,e=d.y,l=(d=m(l,c,-p)).x,c=d.y;R.cos(U/180*o),R.sin(U/180*o);var g=(t-l)/2,v=(e-c)/2,y=g*g/(i*i)+v*v/(n*n);y>1&&(i*=y=R.sqrt(y),n*=y);var b=i*i,_=n*n,x=(s==a?-1:1)*R.sqrt(B((b*_-b*v*v-_*g*g)/(b*v*v+_*g*g))),w=x*i*v/n+(t+l)/2,k=x*-n*g/i+(e+c)/2,S=R.asin(((e-k)/n).toFixed(9)),C=R.asin(((c-k)/n).toFixed(9));S=t<w?U-S:S,C=l<w?U-C:C,S<0&&(S=2*U+S),C<0&&(C=2*U+C),a&&S>C&&(S-=2*U),!a&&C>S&&(C-=2*U)}var D=C-S;if(B(D)>u){var T=C,A=l,E=c;C=S+u*(a&&C>S?1:-1),l=w+i*R.cos(C),c=k+n*R.sin(C),f=Et(l,c,i,n,o,0,a,A,E,[C,T,w,k])}D=C-S;var P=R.cos(S),I=R.sin(S),O=R.cos(C),F=R.sin(C),L=R.tan(D/4),j=4/3*i*L,$=4/3*n*L,H=[t,e],z=[t+j*I,e-$*P],W=[l+j*F,c-$*O],Y=[l,c];if(z[0]=2*H[0]-z[0],z[1]=2*H[1]-z[1],h)return[z,W,Y][M](f);for(var V=[],q=0,G=(f=[z,W,Y][M](f).join()[N](",")).length;q<G;q++)V[q]=q%2?m(f[q-1],f[q],p).y:m(f[q],f[q+1],p).x;return V},Pt=function(t,e,i,n,r,o,s,a,l){var c=1-l;return{x:z(c,3)*t+3*z(c,2)*l*i+3*c*l*l*r+z(l,3)*s,y:z(c,3)*e+3*z(c,2)*l*n+3*c*l*l*o+z(l,3)*a}},It=r(function(t,e,i,n,r,o,s,a){var l,c=r-2*i+t-(s-2*r+i),h=2*(i-t)-2*(r-i),d=t-i,u=(-h+R.sqrt(h*h-4*c*d))/2/c,p=(-h-R.sqrt(h*h-4*c*d))/2/c,f=[e,a],m=[t,s];return B(u)>"1e12"&&(u=.5),B(p)>"1e12"&&(p=.5),u>0&&u<1&&(l=Pt(t,e,i,n,r,o,s,a,u),m.push(l.x),f.push(l.y)),p>0&&p<1&&(l=Pt(t,e,i,n,r,o,s,a,p),m.push(l.x),f.push(l.y)),c=o-2*n+e-(a-2*o+n),h=2*(n-e)-2*(o-n),d=e-n,u=(-h+R.sqrt(h*h-4*c*d))/2/c,p=(-h-R.sqrt(h*h-4*c*d))/2/c,B(u)>"1e12"&&(u=.5),B(p)>"1e12"&&(p=.5),u>0&&u<1&&(l=Pt(t,e,i,n,r,o,s,a,u),m.push(l.x),f.push(l.y)),p>0&&p<1&&(l=Pt(t,e,i,n,r,o,s,a,p),m.push(l.x),f.push(l.y)),{min:{x:H[A](0,m),y:H[A](0,f)},max:{x:$[A](0,m),y:$[A](0,f)}}}),Ot=e._path2curve=r(function(t,e){var i=!e&&kt(t);if(!e&&i.curve)return Ct(i.curve);for(var n=Tt(t),r=e&&Tt(e),o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=function(t,e,i){var n,r,o={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in o)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][M](Et[A](0,[e.x,e.y][M](t.slice(1))));break;case"S":"C"==i||"S"==i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r][M](t.slice(1));break;case"T":"Q"==i||"T"==i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][M](Mt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][M](Mt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][M](At(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][M](At(e.x,e.y,t[1],e.y));break;case"V":t=["C"][M](At(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][M](At(e.x,e.y,e.X,e.Y))}return t},l=function(t,e){if(t[e].length>7){t[e].shift();for(var i=t[e];i.length;)h[e]="A",r&&(d[e]="A"),t.splice(e++,0,["C"][M](i.splice(0,6)));t.splice(e,1),m=$(n.length,r&&r.length||0)}},c=function(t,e,i,o,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),i.bx=0,i.by=0,i.x=t[s][1],i.y=t[s][2],m=$(n.length,r&&r.length||0))},h=[],d=[],u="",p="",f=0,m=$(n.length,r&&r.length||0);f<m;f++){n[f]&&(u=n[f][0]),"C"!=u&&(h[f]=u,f&&(p=h[f-1])),n[f]=a(n[f],o,p),"A"!=h[f]&&"C"==u&&(h[f]="C"),l(n,f),r&&(r[f]&&(u=r[f][0]),"C"!=u&&(d[f]=u,f&&(p=d[f-1])),r[f]=a(r[f],s,p),"A"!=d[f]&&"C"==u&&(d[f]="C"),l(r,f)),c(n,r,o,s,f),c(r,n,s,o,f);var g=n[f],v=r&&r[f],y=g.length,b=r&&v.length;o.x=g[y-2],o.y=g[y-1],o.bx=Q(g[y-4])||o.x,o.by=Q(g[y-3])||o.y,s.bx=r&&(Q(v[b-4])||s.x),s.by=r&&(Q(v[b-3])||s.y),s.x=r&&v[b-2],s.y=r&&v[b-1]}return r||(i.curve=Ct(n)),r?[n,r]:n},null,Ct),Nt=(e._parseDots=r(function(t){for(var i=[],n=0,r=t.length;n<r;n++){var o={},s=t[n].match(/^([^:]*):?([\d\.]*)/);if(o.color=e.getRGB(s[1]),o.color.error)return null;o.opacity=o.color.opacity,o.color=o.color.hex,s[2]&&(o.offset=s[2]+"%"),i.push(o)}for(n=1,r=i.length-1;n<r;n++)if(!i[n].offset){for(var a=Q(i[n-1].offset||0),l=0,c=n+1;c<r;c++)if(i[c].offset){l=i[c].offset;break}l||(l=100,c=r);for(var h=((l=Q(l))-a)/(c-n+1);n<c;n++)a+=h,i[n].offset=a+"%"}return i}),e._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Ft=(e._tofront=function(t,e){e.top!==t&&(Nt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},e._toback=function(t,e){e.bottom!==t&&(Nt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},e._insertafter=function(t,e,i){Nt(t,i),e==i.top&&(i.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},e._insertbefore=function(t,e,i){Nt(t,i),e==i.bottom&&(i.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},e.toMatrix=function(t,e){var i=St(t),n={_:{transform:P},getBBox:function(){return i}};return Lt(n,e),n.matrix}),Lt=(e.transformPath=function(t,e){return ft(t,Ft(t,e))},e._extractTransform=function(t,i){if(null==i)return t._.transform;i=O(i).replace(/\.{3}|\u2026/g,t._.transform||P);var n=e.parseTransformString(i),r=0,o=0,s=0,a=1,l=1,c=t._,h=new p;if(c.transform=n||[],n)for(var d=0,u=n.length;d<u;d++){var f,m,g,v,y,b=n[d],_=b.length,x=O(b[0]).toLowerCase(),w=b[0]!=x,k=w?h.invert():0;"t"==x&&3==_?w?(f=k.x(0,0),m=k.y(0,0),g=k.x(b[1],b[2]),v=k.y(b[1],b[2]),h.translate(g-f,v-m)):h.translate(b[1],b[2]):"r"==x?2==_?(y=y||t.getBBox(1),h.rotate(b[1],y.x+y.width/2,y.y+y.height/2),r+=b[1]):4==_&&(w?(g=k.x(b[2],b[3]),v=k.y(b[2],b[3]),h.rotate(b[1],g,v)):h.rotate(b[1],b[2],b[3]),r+=b[1]):"s"==x?2==_||3==_?(y=y||t.getBBox(1),h.scale(b[1],b[_-1],y.x+y.width/2,y.y+y.height/2),a*=b[1],l*=b[_-1]):5==_&&(w?(g=k.x(b[3],b[4]),v=k.y(b[3],b[4]),h.scale(b[1],b[2],g,v)):h.scale(b[1],b[2],b[3],b[4]),a*=b[1],l*=b[2]):"m"==x&&7==_&&h.add(b[1],b[2],b[3],b[4],b[5],b[6]),c.dirtyT=1,t.matrix=h}t.matrix=h,c.sx=a,c.sy=l,c.deg=r,c.dx=o=h.e,c.dy=s=h.f,1==a&&1==l&&!r&&c.bbox?(c.bbox.x+=+o,c.bbox.y+=+s):c.dirtyT=1}),jt=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},Rt=e._equaliseTransform=function(t,i){i=O(i).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],i=e.parseTransformString(i)||[];for(var n,r,o,s,a=$(t.length,i.length),l=[],c=[],h=0;h<a;h++){if(o=t[h]||jt(i[h]),s=i[h]||jt(o),o[0]!=s[0]||"r"==o[0].toLowerCase()&&(o[2]!=s[2]||o[3]!=s[3])||"s"==o[0].toLowerCase()&&(o[3]!=s[3]||o[4]!=s[4]))return;for(l[h]=[],c[h]=[],n=0,r=$(o.length,s.length);n<r;n++)n in o&&(l[h][n]=o[n]),n in s&&(c[h][n]=s[n])}return{from:l,to:c}};e._getContainer=function(t,i,n,r){var o;if(null!=(o=null!=r||e.is(t,"object")?t:C.doc.getElementById(t)))return o.tagName?null==i?{container:o,width:o.style.pixelWidth||o.offsetWidth,height:o.style.pixelHeight||o.offsetHeight}:{container:o,width:i,height:n}:{container:1,x:t,y:i,width:n,height:r}},e.pathToRelative=Dt,e._engine={},e.path2curve=Ot,e.matrix=function(t,e,i,n,r,o){return new p(t,e,i,n,r,o)},function(t){function i(t){return t[0]*t[0]+t[1]*t[1]}function n(t){var e=R.sqrt(i(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}t.add=function(t,e,i,n,r,o){var s,a,l,c,h=[[],[],[]],d=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],u=[[t,i,r],[e,n,o],[0,0,1]];for(t&&t instanceof p&&(u=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;s<3;s++)for(a=0;a<3;a++){for(c=0,l=0;l<3;l++)c+=d[s][l]*u[l][a];h[s][a]=c}this.a=h[0][0],this.b=h[1][0],this.c=h[0][1],this.d=h[1][1],this.e=h[0][2],this.f=h[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new p(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new p(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,i,n){null==e&&(e=t),(i||n)&&this.add(1,0,0,1,i,n),this.add(t,0,0,e,0,0),(i||n)&&this.add(1,0,0,1,-i,-n)},t.rotate=function(t,i,n){t=e.rad(t),i=i||0,n=n||0;var r=+R.cos(t).toFixed(9),o=+R.sin(t).toFixed(9);this.add(r,o,-o,r,i,n),this.add(1,0,0,1,-i,-n)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[O.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return e.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var r=[[this.a,this.c],[this.b,this.d]];t.scalex=R.sqrt(i(r[0])),n(r[0]),t.shear=r[0][0]*r[1][0]+r[0][1]*r[1][1],r[1]=[r[1][0]-r[0][0]*t.shear,r[1][1]-r[0][1]*t.shear],t.scaley=R.sqrt(i(r[1])),n(r[1]),t.shear/=t.scaley;var o=-r[0][1],s=r[1][1];return s<0?(t.rotate=e.deg(R.acos(s)),o<0&&(t.rotate=360-t.rotate)):t.rotate=e.deg(R.asin(o)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[N]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:P)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:P)+(e.rotate?"r"+[e.rotate,0,0]:P)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(p.prototype);for(var $t=function(){this.returnValue=!1},Ht=function(){return this.originalEvent.preventDefault()},Bt=function(){this.cancelBubble=!0},zt=function(){return this.originalEvent.stopPropagation()},Ut=function(t){var e=C.doc.documentElement.scrollTop||C.doc.body.scrollTop,i=C.doc.documentElement.scrollLeft||C.doc.body.scrollLeft;return{x:t.clientX+i,y:t.clientY+e}},Wt=C.doc.addEventListener?function(t,e,i,n){var r=function(t){var e=Ut(t);return i.call(n,t,e.x,e.y)};if(t.addEventListener(e,r,!1),E&&L[e]){var o=function(e){for(var r=Ut(e),o=e,s=0,a=e.targetTouches&&e.targetTouches.length;s<a;s++)if(e.targetTouches[s].target==t){(e=e.targetTouches[s]).originalEvent=o,e.preventDefault=Ht,e.stopPropagation=zt;break}return i.call(n,e,r.x,r.y)};t.addEventListener(L[e],o,!1)}return function(){return t.removeEventListener(e,r,!1),E&&L[e]&&t.removeEventListener(L[e],o,!1),!0}}:C.doc.attachEvent?function(t,e,i,n){var r=function(t){t=t||C.win.event;var e=C.doc.documentElement.scrollTop||C.doc.body.scrollTop,r=C.doc.documentElement.scrollLeft||C.doc.body.scrollLeft,o=t.clientX+r,s=t.clientY+e;return t.preventDefault=t.preventDefault||$t,t.stopPropagation=t.stopPropagation||Bt,i.call(n,t,o,s)};t.attachEvent("on"+e,r);return function(){return t.detachEvent("on"+e,r),!0}}:void 0,Yt=[],Vt=function(e){for(var i,n=e.clientX,r=e.clientY,o=C.doc.documentElement.scrollTop||C.doc.body.scrollTop,s=C.doc.documentElement.scrollLeft||C.doc.body.scrollLeft,a=Yt.length;a--;){if(i=Yt[a],E&&e.touches){for(var l,c=e.touches.length;c--;)if((l=e.touches[c]).identifier==i.el._drag.id){n=l.clientX,r=l.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var h,d=i.el.node,u=d.nextSibling,p=d.parentNode,f=d.style.display;C.win.opera&&p.removeChild(d),d.style.display="none",h=i.el.paper.getElementByPoint(n,r),d.style.display=f,C.win.opera&&(u?p.insertBefore(d,u):p.appendChild(d)),h&&t("raphael.drag.over."+i.el.id,i.el,h),n+=s,r+=o,t("raphael.drag.move."+i.el.id,i.move_scope||i.el,n-i.el._drag.x,r-i.el._drag.y,n,r,e)}},qt=function(i){e.unmousemove(Vt).unmouseup(qt);for(var n,r=Yt.length;r--;)(n=Yt[r]).el._drag={},t("raphael.drag.end."+n.el.id,n.end_scope||n.start_scope||n.move_scope||n.el,i);Yt=[]},Gt=e.el={},Kt=F.length;Kt--;)!function(t){e[t]=Gt[t]=function(i,n){return e.is(i,"function")&&(this.events=this.events||[],this.events.push({name:t,f:i,unbind:Wt(this.shape||this.node||C.doc,t,i,n||this)})),this},e["un"+t]=Gt["un"+t]=function(i){for(var n=this.events||[],r=n.length;r--;)n[r].name!=t||!e.is(i,"undefined")&&n[r].f!=i||(n[r].unbind(),n.splice(r,1),!n.length&&delete this.events);return this}}(F[Kt]);Gt.data=function(i,n){var r=lt[this.id]=lt[this.id]||{};if(0==arguments.length)return r;if(1==arguments.length){if(e.is(i,"object")){for(var o in i)i[S](o)&&this.data(o,i[o]);return this}return t("raphael.data.get."+this.id,this,r[i],i),r[i]}return r[i]=n,t("raphael.data.set."+this.id,this,n,i),this},Gt.removeData=function(t){return null==t?lt[this.id]={}:lt[this.id]&&delete lt[this.id][t],this},Gt.getData=function(){return i(lt[this.id]||{})},Gt.hover=function(t,e,i,n){return this.mouseover(t,i).mouseout(e,n||i)},Gt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Xt=[];Gt.drag=function(i,n,r,o,s,a){function l(l){(l.originalEvent||l).preventDefault();var c=l.clientX,h=l.clientY,d=C.doc.documentElement.scrollTop||C.doc.body.scrollTop,u=C.doc.documentElement.scrollLeft||C.doc.body.scrollLeft;if(this._drag.id=l.identifier,E&&l.touches)for(var p,f=l.touches.length;f--;)if(p=l.touches[f],this._drag.id=p.identifier,p.identifier==this._drag.id){c=p.clientX,h=p.clientY;break}this._drag.x=c+u,this._drag.y=h+d,!Yt.length&&e.mousemove(Vt).mouseup(qt),Yt.push({el:this,move_scope:o,start_scope:s,end_scope:a}),n&&t.on("raphael.drag.start."+this.id,n),i&&t.on("raphael.drag.move."+this.id,i),r&&t.on("raphael.drag.end."+this.id,r),t("raphael.drag.start."+this.id,s||o||this,l.clientX+u,l.clientY+d,l)}return this._drag={},Xt.push({el:this,start:l}),this.mousedown(l),this},Gt.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},Gt.undrag=function(){for(var i=Xt.length;i--;)Xt[i].el==this&&(this.unmousedown(Xt[i].start),Xt.splice(i,1),t.unbind("raphael.drag.*."+this.id));!Xt.length&&e.unmousemove(Vt).unmouseup(qt),Yt=[]},_.circle=function(t,i,n){var r=e._engine.circle(this,t||0,i||0,n||0);return this.__set__&&this.__set__.push(r),r},_.rect=function(t,i,n,r,o){var s=e._engine.rect(this,t||0,i||0,n||0,r||0,o||0);return this.__set__&&this.__set__.push(s),s},_.ellipse=function(t,i,n,r){var o=e._engine.ellipse(this,t||0,i||0,n||0,r||0);return this.__set__&&this.__set__.push(o),o},_.path=function(t){t&&!e.is(t,"string")&&!e.is(t[0],Y)&&(t+=P);var i=e._engine.path(e.format[A](e,arguments),this);return this.__set__&&this.__set__.push(i),i},_.image=function(t,i,n,r,o){var s=e._engine.image(this,t||"about:blank",i||0,n||0,r||0,o||0);return this.__set__&&this.__set__.push(s),s},_.text=function(t,i,n){var r=e._engine.text(this,t||0,i||0,O(n));return this.__set__&&this.__set__.push(r),r},_.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var i=new le(t);return this.__set__&&this.__set__.push(i),i.paper=this,i.type="set",i},_.setStart=function(t){this.__set__=t||this.set()},_.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},_.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},_.setSize=function(t,i){return e._engine.setSize.call(this,t,i)},_.setViewBox=function(t,i,n,r,o){return e._engine.setViewBox.call(this,t,i,n,r,o)},_.top=_.bottom=null,_.raphael=e;var Qt=function(t){var e=t.getBoundingClientRect(),i=t.ownerDocument,n=i.body,r=i.documentElement,o=r.clientTop||n.clientTop||0,s=r.clientLeft||n.clientLeft||0;return{y:e.top+(C.win.pageYOffset||r.scrollTop||n.scrollTop)-o,x:e.left+(C.win.pageXOffset||r.scrollLeft||n.scrollLeft)-s}};_.getElementByPoint=function(t,e){var i=this,n=i.canvas,r=C.doc.elementFromPoint(t,e);if(C.win.opera&&"svg"==r.tagName){var o=Qt(n),s=n.createSVGRect();s.x=t-o.x,s.y=e-o.y,s.width=s.height=1;var a=n.getIntersectionList(s,null);a.length&&(r=a[a.length-1])}if(!r)return null;for(;r.parentNode&&r!=n.parentNode&&!r.raphael;)r=r.parentNode;return r==i.canvas.parentNode&&(r=n),r=r&&r.raphael?i.getById(r.raphaelid):null},_.getElementsByBBox=function(t){var i=this.set();return this.forEach(function(n){e.isBBoxIntersect(n.getBBox(),t)&&i.push(n)}),i},_.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},_.forEach=function(t,e){for(var i=this.bottom;i;){if(!1===t.call(e,i))return this;i=i.next}return this},_.getElementsByPoint=function(t,e){var i=this.set();return this.forEach(function(n){n.isPointInside(t,e)&&i.push(n)}),i},Gt.isPointInside=function(t,i){var n=this.realPath=pt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(n=e.transformPath(n,this.attr("transform"))),e.isPointInsidePath(n,t,i)},Gt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=pt[this.type](this),e.bboxwt=St(this.realPath),e.bboxwt.toString=f,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=pt[this.type](this)),e.bbox=St(ft(this.realPath,this.matrix)),e.bbox.toString=f,e.dirty=e.dirtyT=0),e.bbox)},Gt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Gt.glow=function(t){if("text"==this.type)return null;var e={width:((t=t||{}).width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:null==t.opacity?.5:t.opacity,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},i=e.width/2,n=this.paper,r=n.set(),o=this.realPath||pt[this.type](this);o=this.matrix?ft(o,this.matrix):o;for(var s=1;s<i+1;s++)r.push(n.path(o).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/i*s).toFixed(3),opacity:+(e.opacity/i).toFixed(3)}));return r.insertBefore(this).translate(e.offsetx,e.offsety)};var Zt=function(t,i,n,r,o,s,a,h,d){return null==d?l(t,i,n,r,o,s,a,h):e.findDotsAtSegment(t,i,n,r,o,s,a,h,c(t,i,n,r,o,s,a,h,d))},Jt=function(t,i){return function(n,r,o){for(var s,a,l,c,h,d="",u={},p=0,f=0,m=(n=Ot(n)).length;f<m;f++){if("M"==(l=n[f])[0])s=+l[1],a=+l[2];else{if(c=Zt(s,a,l[1],l[2],l[3],l[4],l[5],l[6]),p+c>r){if(i&&!u.start){if(h=Zt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],r-p),d+=["C"+h.start.x,h.start.y,h.m.x,h.m.y,h.x,h.y],o)return d;u.start=d,d=["M"+h.x,h.y+"C"+h.n.x,h.n.y,h.end.x,h.end.y,l[5],l[6]].join(),p+=c,s=+l[5],a=+l[6];continue}if(!t&&!i)return h=Zt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],r-p),{x:h.x,y:h.y,alpha:h.alpha}}p+=c,s=+l[5],a=+l[6]}d+=l.shift()+l}return u.end=d,(h=t?p:i?u:e.findDotsAtSegment(s,a,l[0],l[1],l[2],l[3],l[4],l[5],1)).alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}},te=Jt(1),ee=Jt(),ie=Jt(0,1);e.getTotalLength=te,e.getPointAtLength=ee,e.getSubpath=function(t,e,i){if(this.getTotalLength(t)-i<1e-6)return ie(t,e).end;var n=ie(t,i,1);return e?ie(n,e).end:n},Gt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():te(t)},Gt.getPointAtLength=function(t){var e=this.getPath();if(e)return ee(e,t)},Gt.getPath=function(){var t,i=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return i&&(t=i(this)),t},Gt.getSubpath=function(t,i){var n=this.getPath();if(n)return e.getSubpath(n,t,i)};var ne=e.easing_formulas={linear:function(t){return t},"<":function(t){return z(t,1.7)},">":function(t){return z(t,.48)},"<>":function(t){var e=.48-t/1.04,i=R.sqrt(.1734+e*e),n=i-e,r=-i-e,o=z(B(n),1/3)*(n<0?-1:1)+z(B(r),1/3)*(r<0?-1:1)+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:z(2,-10*t)*R.sin(2*U*(t-.075)/.3)+1},bounce:function(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375}};ne.easeIn=ne["ease-in"]=ne["<"],ne.easeOut=ne["ease-out"]=ne[">"],ne.easeInOut=ne["ease-in-out"]=ne["<>"],ne["back-in"]=ne.backIn,ne["back-out"]=ne.backOut;var re=[],oe=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},se=function(){for(var i=+new Date,n=0;n<re.length;n++){var r=re[n];if(!r.el.removed&&!r.paused){var o,s,a=i-r.start,l=r.ms,c=r.easing,h=r.from,d=r.diff,u=r.to,p=(r.t,r.el),f={},m={};if(r.initstatus?(a=(r.initstatus*r.anim.top-r.prev)/(r.percent-r.prev)*l,r.status=r.initstatus,delete r.initstatus,r.stop&&re.splice(n--,1)):r.status=(r.prev+(r.percent-r.prev)*(a/l))/r.anim.top,!(a<0))if(a<l){var g=c(a/l);for(var y in h)if(h[S](y)){switch(et[y]){case W:o=+h[y]+g*l*d[y];break;case"colour":o="rgb("+[ae(X(h[y].r+g*l*d[y].r)),ae(X(h[y].g+g*l*d[y].g)),ae(X(h[y].b+g*l*d[y].b))].join(",")+")";break;case"path":o=[];for(var b=0,_=h[y].length;b<_;b++){o[b]=[h[y][b][0]];for(var x=1,w=h[y][b].length;x<w;x++)o[b][x]=+h[y][b][x]+g*l*d[y][b][x];o[b]=o[b].join(I)}o=o.join(I);break;case"transform":if(d[y].real)for(o=[],b=0,_=h[y].length;b<_;b++)for(o[b]=[h[y][b][0]],x=1,w=h[y][b].length;x<w;x++)o[b][x]=h[y][b][x]+g*l*d[y][b][x];else{var k=function(t){return+h[y][t]+g*l*d[y][t]};o=[["m",k(0),k(1),k(2),k(3),k(4),k(5)]]}break;case"csv":if("clip-rect"==y)for(o=[],b=4;b--;)o[b]=+h[y][b]+g*l*d[y][b];break;default:var C=[][M](h[y]);for(o=[],b=p.paper.customAttributes[y].length;b--;)o[b]=+C[b]+g*l*d[y][b]}f[y]=o}p.attr(f),function(e,i,n){setTimeout(function(){t("raphael.anim.frame."+e,i,n)})}(p.id,p,r.anim)}else{if(function(i,n,r){setTimeout(function(){t("raphael.anim.frame."+n.id,n,r),t("raphael.anim.finish."+n.id,n,r),e.is(i,"function")&&i.call(n)})}(r.callback,p,r.anim),p.attr(u),re.splice(n--,1),r.repeat>1&&!r.next){for(s in u)u[S](s)&&(m[s]=r.totalOrigin[s]);r.el.attr(m),v(r.anim,r.el,r.anim.percents[0],null,r.totalOrigin,r.repeat-1)}r.next&&!r.stop&&v(r.anim,r.el,r.next,null,r.totalOrigin,r.repeat)}}}re.length&&oe(se)},ae=function(t){return t>255?255:t<0?0:t};Gt.animateWith=function(t,i,n,r,o,s){var a=this;if(a.removed)return s&&s.call(a),a;var l=n instanceof g?n:e.animation(n,r,o,s);v(l,a,l.percents[0],null,a.attr());for(var c=0,h=re.length;c<h;c++)if(re[c].anim==i&&re[c].el==t){re[h-1].start=re[c].start;break}return a},Gt.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},g.prototype.delay=function(t){var e=new g(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},g.prototype.repeat=function(t){var e=new g(this.anim,this.ms);return e.del=this.del,e.times=R.floor($(t,0))||1,e},e.animation=function(t,i,n,r){if(t instanceof g)return t;!e.is(n,"function")&&n||(r=r||n||null,n=null),t=Object(t),i=+i||0;var o,s,a={};for(s in t)t[S](s)&&Q(s)!=s&&Q(s)+"%"!=s&&(o=!0,a[s]=t[s]);if(o)return n&&(a.easing=n),r&&(a.callback=r),new g({100:a},i);if(r){var l=0;for(var c in t){var h=Z(c);t[S](c)&&h>l&&(l=h)}!t[l+="%"].callback&&(t[l].callback=r)}return new g(t,i)},Gt.animate=function(t,i,n,r){var o=this;if(o.removed)return r&&r.call(o),o;var s=t instanceof g?t:e.animation(t,i,n,r);return v(s,o,s.percents[0],null,o.attr()),o},Gt.setTime=function(t,e){return t&&null!=e&&this.status(t,H(e,t.ms)/t.ms),this},Gt.status=function(t,e){var i,n,r=[],o=0;if(null!=e)return v(t,this,-1,H(e,1)),this;for(i=re.length;o<i;o++)if((n=re[o]).el.id==this.id&&(!t||n.anim==t)){if(t)return n.status;r.push({anim:n.anim,status:n.status})}return t?0:r},Gt.pause=function(e){for(var i=0;i<re.length;i++)re[i].el.id!=this.id||e&&re[i].anim!=e||!1!==t("raphael.anim.pause."+this.id,this,re[i].anim)&&(re[i].paused=!0);return this},Gt.resume=function(e){for(var i=0;i<re.length;i++)if(re[i].el.id==this.id&&(!e||re[i].anim==e)){var n=re[i];!1!==t("raphael.anim.resume."+this.id,this,n.anim)&&(delete n.paused,this.status(n.anim,n.status))}return this},Gt.stop=function(e){for(var i=0;i<re.length;i++)re[i].el.id!=this.id||e&&re[i].anim!=e||!1!==t("raphael.anim.stop."+this.id,this,re[i].anim)&&re.splice(i--,1);return this},t.on("raphael.remove",y),t.on("raphael.clear",y),Gt.toString=function(){return"Raphaël’s object"};var le=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,i=t.length;e<i;e++)!t[e]||t[e].constructor!=Gt.constructor&&t[e].constructor!=le||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},ce=le.prototype;ce.push=function(){for(var t,e,i=0,n=arguments.length;i<n;i++)!(t=arguments[i])||t.constructor!=Gt.constructor&&t.constructor!=le||(this[e=this.items.length]=this.items[e]=t,this.length++);return this},ce.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},ce.forEach=function(t,e){for(var i=0,n=this.items.length;i<n;i++)if(!1===t.call(e,this.items[i],i))return this;return this};for(var he in Gt)Gt[S](he)&&(ce[he]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t][A](i,e)})}}(he));return ce.attr=function(t,i){if(t&&e.is(t,Y)&&e.is(t[0],"object"))for(var n=0,r=t.length;n<r;n++)this.items[n].attr(t[n]);else for(var o=0,s=this.items.length;o<s;o++)this.items[o].attr(t,i);return this},ce.clear=function(){for(;this.length;)this.pop()},ce.splice=function(t,e,i){t=t<0?$(this.length+t,0):t,e=$(0,H(this.length-t,e));var n,r=[],o=[],s=[];for(n=2;n<arguments.length;n++)s.push(arguments[n]);for(n=0;n<e;n++)o.push(this[t+n]);for(;n<this.length-t;n++)r.push(this[t+n]);var a=s.length;for(n=0;n<a+r.length;n++)this.items[t+n]=this[t+n]=n<a?s[n]:r[n-a];for(n=this.items.length=this.length-=e-a;this[n];)delete this[n++];return new le(o)},ce.exclude=function(t){for(var e=0,i=this.length;e<i;e++)if(this[e]==t)return this.splice(e,1),!0},ce.animate=function(t,i,n,r){(e.is(n,"function")||!n)&&(r=n||null);var o,s,a=this.items.length,l=a,c=this;if(!a)return this;r&&(s=function(){!--a&&r.call(c)}),n=e.is(n,"string")?n:s;var h=e.animation(t,i,n,s);for(o=this.items[--l].animate(h);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(o,h,h),this.items[l]&&!this.items[l].removed||a--;return this},ce.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},ce.getBBox=function(){for(var t=[],e=[],i=[],n=[],r=this.items.length;r--;)if(!this.items[r].removed){var o=this.items[r].getBBox();t.push(o.x),e.push(o.y),i.push(o.x+o.width),n.push(o.y+o.height)}return t=H[A](0,t),e=H[A](0,e),i=$[A](0,i),n=$[A](0,n),{x:t,y:e,x2:i,y2:n,width:i-t,height:n-e}},ce.clone=function(t){t=this.paper.set();for(var e=0,i=this.items.length;e<i;e++)t.push(this.items[e].clone());return t},ce.toString=function(){return"Raphaël‘s set"},ce.glow=function(t){var e=this.paper.set();return this.forEach(function(i,n){var r=i.glow(t);null!=r&&r.forEach(function(t,i){e.push(t)})}),e},ce.isPointInside=function(t,e){var i=!1;return this.forEach(function(n){if(n.isPointInside(t,e))return i=!0,!1}),i},e.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},i=t.face["font-family"];for(var n in t.face)t.face[S](n)&&(e.face[n]=t.face[n]);if(this.fonts[i]?this.fonts[i].push(e):this.fonts[i]=[e],!t.svg){e.face["units-per-em"]=Z(t.face["units-per-em"],10);for(var r in t.glyphs)if(t.glyphs[S](r)){var o=t.glyphs[r];if(e.glyphs[r]={w:o.w,k:{},d:o.d&&"M"+o.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},o.k)for(var s in o.k)o[S](s)&&(e.glyphs[r].k[s]=o.k[s])}}return t},_.getFont=function(t,i,n,r){if(r=r||"normal",n=n||"normal",i=+i||{normal:400,bold:700,lighter:300,bolder:800}[i]||400,e.fonts){var o=e.fonts[t];if(!o){var s=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,P)+"(\\s|$)","i");for(var a in e.fonts)if(e.fonts[S](a)&&s.test(a)){o=e.fonts[a];break}}var l;if(o)for(var c=0,h=o.length;c<h&&((l=o[c]).face["font-weight"]!=i||l.face["font-style"]!=n&&l.face["font-style"]||l.face["font-stretch"]!=r);c++);return l}},_.print=function(t,i,n,r,o,s,a,l){s=s||"middle",a=$(H(a||0,1),-1),l=$(H(l||1,3),1);var c,h=O(n)[N](P),d=0,u=0,p=P;if(e.is(r,"string")&&(r=this.getFont(r)),r){c=(o||16)/r.face["units-per-em"];for(var f=r.face.bbox[N](x),m=+f[0],g=f[3]-f[1],v=0,y=+f[1]+("baseline"==s?g+ +r.face.descent:g/2),b=0,_=h.length;b<_;b++){if("\n"==h[b])d=0,k=0,u=0,v+=g*l;else{var w=u&&r.glyphs[h[b-1]]||{},k=r.glyphs[h[b]];d+=u?(w.w||r.w)+(w.k&&w.k[h[b]]||0)+r.w*a:0,u=1}k&&k.d&&(p+=e.transformPath(k.d,["t",d*c,v*c,"s",c,c,m,y,"t",(t-m)/c,(i-y)/c]))}}return this.path(p).attr({fill:"#000",stroke:"none"})},_.add=function(t){if(e.is(t,"array"))for(var i,n=this.set(),r=0,o=t.length;r<o;r++)i=t[r]||{},w[S](i.type)&&n.push(this[i.type]().attr(i));return n},e.format=function(t,i){var n=e.is(i,Y)?[0][M](i):arguments;return t&&e.is(t,"string")&&n.length-1&&(t=t.replace(k,function(t,e){return null==n[++e]?P:n[e]})),t||P},e.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,i=function(t,i,n){var r=n;return i.replace(e,function(t,e,i,n,o){e=e||n,r&&(e in r&&(r=r[e]),"function"==typeof r&&o&&(r=r()))}),r=(null==r||r==n?t:r)+""};return function(e,n){return String(e).replace(t,function(t,e){return i(t,e,n)})}}(),e.ninja=function(){if(D.was)C.win.Raphael=D.is;else{window.Raphael=void 0;try{delete window.Raphael}catch(t){}}return e},e.st=ce,t.on("raphael.DOMload",function(){b=!0}),function(t,i,n){function r(){/in/.test(t.readyState)?setTimeout(r,9):e.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener("DOMContentLoaded",n=function(){t.removeEventListener("DOMContentLoaded",n,!1),t.readyState="complete"},!1),t.readyState="loading"),r()}(document),e}.apply(e,n))&&(t.exports=r)},function(t,e,i){var n,r;!function(i){var o,s,a="hasOwnProperty",l=/[\.\/]/,c=/\s*,\s*/,h=function(t,e){return t-e},d={n:{}},u=function(){for(var t=0,e=this.length;t<e;t++)if(void 0!==this[t])return this[t]},p=function(){for(var t=this.length;--t;)if(void 0!==this[t])return this[t]},f=Object.prototype.toString,m=String,g=Array.isArray||function(t){return t instanceof Array||"[object Array]"==f.call(t)};eve=function(t,e){var i,n=s,r=Array.prototype.slice.call(arguments,2),a=eve.listeners(t),l=0,c=[],d={},f=[],m=o;f.firstDefined=u,f.lastDefined=p,o=t,s=0;for(var g=0,v=a.length;g<v;g++)"zIndex"in a[g]&&(c.push(a[g].zIndex),a[g].zIndex<0&&(d[a[g].zIndex]=a[g]));for(c.sort(h);c[l]<0;)if(i=d[c[l++]],f.push(i.apply(e,r)),s)return s=n,f;for(g=0;g<v;g++)if("zIndex"in(i=a[g]))if(i.zIndex==c[l]){if(f.push(i.apply(e,r)),s)break;do{if(l++,(i=d[c[l]])&&f.push(i.apply(e,r)),s)break}while(i)}else d[i.zIndex]=i;else if(f.push(i.apply(e,r)),s)break;return s=n,o=m,f},eve._events=d,eve.listeners=function(t){var e,i,n,r,o,s,a,c,h=g(t)?t:t.split(l),u=d,p=[u],f=[];for(r=0,o=h.length;r<o;r++){for(c=[],s=0,a=p.length;s<a;s++)for(i=[(u=p[s].n)[h[r]],u["*"]],n=2;n--;)(e=i[n])&&(c.push(e),f=f.concat(e.f||[]));p=c}return f},eve.separator=function(t){t?(t="["+(t=m(t).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",l=new RegExp(t)):l=/[\.\/]/},eve.on=function(t,e){if("function"!=typeof e)return function(){};for(var i=g(t)?g(t[0])?t:[t]:m(t).split(c),n=0,r=i.length;n<r;n++)!function(t){for(var i,n=g(t)?t:m(t).split(l),r=d,o=0,s=n.length;o<s;o++)r=(r=r.n).hasOwnProperty(n[o])&&r[n[o]]||(r[n[o]]={n:{}});for(r.f=r.f||[],o=0,s=r.f.length;o<s;o++)if(r.f[o]==e){i=!0;break}!i&&r.f.push(e)}(i[n]);return function(t){+t==+t&&(e.zIndex=+t)}},eve.f=function(t){var e=[].slice.call(arguments,1);return function(){eve.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},eve.stop=function(){s=1},eve.nt=function(t){var e=g(o)?o.join("."):o;return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},eve.nts=function(){return g(o)?o:o.split(l)},eve.off=eve.unbind=function(t,e){if(t){var i=g(t)?g(t[0])?t:[t]:m(t).split(c);if(i.length>1)for(var n=0,r=i.length;n<r;n++)eve.off(i[n],e);else{i=g(t)?t:m(t).split(l);var o,s,h,u,p,f=[d];for(n=0,r=i.length;n<r;n++)for(u=0;u<f.length;u+=h.length-2){if(h=[u,1],o=f[u].n,"*"!=i[n])o[i[n]]&&h.push(o[i[n]]);else for(s in o)o[a](s)&&h.push(o[s]);f.splice.apply(f,h)}for(n=0,r=f.length;n<r;n++)for(o=f[n];o.n;){if(e){if(o.f){for(u=0,p=o.f.length;u<p;u++)if(o.f[u]==e){o.f.splice(u,1);break}!o.f.length&&delete o.f}for(s in o.n)if(o.n[a](s)&&o.n[s].f){var v=o.n[s].f;for(u=0,p=v.length;u<p;u++)if(v[u]==e){v.splice(u,1);break}!v.length&&delete o.n[s].f}}else{delete o.f;for(s in o.n)o.n[a](s)&&o.n[s].f&&delete o.n[s].f}o=o.n}}}else eve._events=d={n:{}}},eve.once=function(t,e){var i=function(){return eve.off(t,i),e.apply(this,arguments)};return eve.on(t,i)},eve.version="0.5.0",eve.toString=function(){return"You are running Eve 0.5.0"},void 0!==t&&t.exports?t.exports=eve:(n=[],void 0!==(r=function(){return eve}.apply(e,n))&&(t.exports=r))}()},function(t,e,i){var n,r;n=[i(1)],void 0!==(r=function(t){if(!t||t.svg){var e="hasOwnProperty",i=String,n=parseFloat,r=parseInt,o=Math,s=o.max,a=o.abs,l=o.pow,c=/[, ]+/,h=t.eve,d="",u=" ",p="http://www.w3.org/1999/xlink",f={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},m={};t.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var g=function(n,r){if(r){"string"==typeof n&&(n=g(n));for(var o in r)r[e](o)&&("xlink:"==o.substring(0,6)?n.setAttributeNS(p,o.substring(6),i(r[o])):n.setAttribute(o,i(r[o])))}else(n=t._g.doc.createElementNS("http://www.w3.org/2000/svg",n)).style&&(n.style.webkitTapHighlightColor="rgba(0,0,0,0)");return n},v=function(e,r){var c="linear",h=e.id+r,u=.5,p=.5,f=e.node,m=e.paper,v=f.style,y=t._g.doc.getElementById(h);if(!y){if(r=i(r).replace(t._radial_gradient,function(t,e,i){if(c="radial",e&&i){u=n(e);var r=2*((p=n(i))>.5)-1;l(u-.5,2)+l(p-.5,2)>.25&&(p=o.sqrt(.25-l(u-.5,2))*r+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*r)}return d}),r=r.split(/\s*\-\s*/),"linear"==c){var _=r.shift();if(_=-n(_),isNaN(_))return null;var x=[0,0,o.cos(t.rad(_)),o.sin(t.rad(_))],w=1/(s(a(x[2]),a(x[3]))||1);x[2]*=w,x[3]*=w,x[2]<0&&(x[0]=-x[2],x[2]=0),x[3]<0&&(x[1]=-x[3],x[3]=0)}var k=t._parseDots(r);if(!k)return null;if(h=h.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&h!=e.gradient.id&&(m.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){y=g(c+"Gradient",{id:h}),e.gradient=y,g(y,"radial"==c?{fx:u,fy:p}:{x1:x[0],y1:x[1],x2:x[2],y2:x[3],gradientTransform:e.matrix.invert()}),m.defs.appendChild(y);for(var S=0,C=k.length;S<C;S++)y.appendChild(g("stop",{offset:k[S].offset?k[S].offset:S?"100%":"0%","stop-color":k[S].color||"#fff","stop-opacity":isFinite(k[S].opacity)?k[S].opacity:1}))}}return g(f,{fill:b(h),opacity:1,"fill-opacity":1}),v.fill=d,v.opacity=1,v.fillOpacity=1,1},y=function(){var t=document.documentMode;return t&&(9===t||10===t)},b=function(t){if(y())return"url('#"+t+"')";var e=document.location;return"url('"+(e.protocol+"//"+e.host+e.pathname+e.search)+"#"+t+"')"},_=function(t){var e=t.getBBox(1);g(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},x=function(n,r,o){if("path"==n.type){for(var s,a,l,c,h,u=i(r).toLowerCase().split("-"),p=n.paper,v=o?"end":"start",y=n.node,b=n.attrs,_=b["stroke-width"],x=u.length,w="classic",k=3,S=3,C=5;x--;)switch(u[x]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=u[x];break;case"wide":S=5;break;case"narrow":S=2;break;case"long":k=5;break;case"short":k=2}if("open"==w?(k+=2,S+=2,C+=2,l=1,c=o?4:1,h={fill:"none",stroke:b.stroke}):(c=l=k/2,h={fill:b.stroke,stroke:"none"}),n._.arrows?o?(n._.arrows.endPath&&m[n._.arrows.endPath]--,n._.arrows.endMarker&&m[n._.arrows.endMarker]--):(n._.arrows.startPath&&m[n._.arrows.startPath]--,n._.arrows.startMarker&&m[n._.arrows.startMarker]--):n._.arrows={},"none"!=w){var D="raphael-marker-"+w,T="raphael-marker-"+v+w+k+S+"-obj"+n.id;t._g.doc.getElementById(D)?m[D]++:(p.defs.appendChild(g(g("path"),{"stroke-linecap":"round",d:f[w],id:D})),m[D]=1);var A,M=t._g.doc.getElementById(T);M?(m[T]++,A=M.getElementsByTagName("use")[0]):(M=g(g("marker"),{id:T,markerHeight:S,markerWidth:k,orient:"auto",refX:c,refY:S/2}),A=g(g("use"),{"xlink:href":"#"+D,transform:(o?"rotate(180 "+k/2+" "+S/2+") ":d)+"scale("+k/C+","+S/C+")","stroke-width":(1/((k/C+S/C)/2)).toFixed(4)}),M.appendChild(A),p.defs.appendChild(M),m[T]=1),g(A,h);var E=l*("diamond"!=w&&"oval"!=w);o?(s=n._.arrows.startdx*_||0,a=t.getTotalLength(b.path)-E*_):(s=E*_,a=t.getTotalLength(b.path)-(n._.arrows.enddx*_||0)),(h={})["marker-"+v]="url(#"+T+")",(a||s)&&(h.d=t.getSubpath(b.path,s,a)),g(y,h),n._.arrows[v+"Path"]=D,n._.arrows[v+"Marker"]=T,n._.arrows[v+"dx"]=E,n._.arrows[v+"Type"]=w,n._.arrows[v+"String"]=r}else o?(s=n._.arrows.startdx*_||0,a=t.getTotalLength(b.path)-s):(s=0,a=t.getTotalLength(b.path)-(n._.arrows.enddx*_||0)),n._.arrows[v+"Path"]&&g(y,{d:t.getSubpath(b.path,s,a)}),delete n._.arrows[v+"Path"],delete n._.arrows[v+"Marker"],delete n._.arrows[v+"dx"],delete n._.arrows[v+"Type"],delete n._.arrows[v+"String"];for(h in m)if(m[e](h)&&!m[h]){var P=t._g.doc.getElementById(h);P&&P.parentNode.removeChild(P)}}},w={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},k=function(t,e,n){if(e=w[i(e).toLowerCase()]){for(var r=t.attrs["stroke-width"]||"1",o={round:r,square:r,butt:0}[t.attrs["stroke-linecap"]||n["stroke-linecap"]]||0,s=[],a=e.length;a--;)s[a]=e[a]*r+(a%2?1:-1)*o;g(t.node,{"stroke-dasharray":s.join(",")})}else g(t.node,{"stroke-dasharray":"none"})},S=function(n,o){var l=n.node,h=n.attrs,u=l.style.visibility;l.style.visibility="hidden";for(var f in o)if(o[e](f)){if(!t._availableAttrs[e](f))continue;var m=o[f];switch(h[f]=m,f){case"blur":n.blur(m);break;case"title":var y=l.getElementsByTagName("title");if(y.length&&(y=y[0]))y.firstChild.nodeValue=m;else{y=g("title");var b=t._g.doc.createTextNode(m);y.appendChild(b),l.appendChild(y)}break;case"href":case"target":var w=l.parentNode;if("a"!=w.tagName.toLowerCase()){var S=g("a");w.insertBefore(S,l),S.appendChild(l),w=S}"target"==f?w.setAttributeNS(p,"show","blank"==m?"new":m):w.setAttributeNS(p,f,m);break;case"cursor":l.style.cursor=m;break;case"transform":n.transform(m);break;case"arrow-start":x(n,m);break;case"arrow-end":x(n,m,1);break;case"clip-rect":var D=i(m).split(c);if(4==D.length){n.clip&&n.clip.parentNode.parentNode.removeChild(n.clip.parentNode);var T=g("clipPath"),A=g("rect");T.id=t.createUUID(),g(A,{x:D[0],y:D[1],width:D[2],height:D[3]}),T.appendChild(A),n.paper.defs.appendChild(T),g(l,{"clip-path":"url(#"+T.id+")"}),n.clip=A}if(!m){var M=l.getAttribute("clip-path");if(M){var E=t._g.doc.getElementById(M.replace(/(^url\(#|\)$)/g,d));E&&E.parentNode.removeChild(E),g(l,{"clip-path":d}),delete n.clip}}break;case"path":"path"==n.type&&(g(l,{d:m?h.path=t._pathToAbsolute(m):"M0,0"}),n._.dirty=1,n._.arrows&&("startString"in n._.arrows&&x(n,n._.arrows.startString),"endString"in n._.arrows&&x(n,n._.arrows.endString,1)));break;case"width":if(l.setAttribute(f,m),n._.dirty=1,!h.fx)break;f="x",m=h.x;case"x":h.fx&&(m=-h.x-(h.width||0));case"rx":if("rx"==f&&"rect"==n.type)break;case"cx":l.setAttribute(f,m),n.pattern&&_(n),n._.dirty=1;break;case"height":if(l.setAttribute(f,m),n._.dirty=1,!h.fy)break;f="y",m=h.y;case"y":h.fy&&(m=-h.y-(h.height||0));case"ry":if("ry"==f&&"rect"==n.type)break;case"cy":l.setAttribute(f,m),n.pattern&&_(n),n._.dirty=1;break;case"r":"rect"==n.type?g(l,{rx:m,ry:m}):l.setAttribute(f,m),n._.dirty=1;break;case"src":"image"==n.type&&l.setAttributeNS(p,"href",m);break;case"stroke-width":1==n._.sx&&1==n._.sy||(m/=s(a(n._.sx),a(n._.sy))||1),l.setAttribute(f,m),h["stroke-dasharray"]&&k(n,h["stroke-dasharray"],o),n._.arrows&&("startString"in n._.arrows&&x(n,n._.arrows.startString),"endString"in n._.arrows&&x(n,n._.arrows.endString,1));break;case"stroke-dasharray":k(n,m,o);break;case"fill":var P=i(m).match(t._ISURL);if(P){T=g("pattern");var I=g("image");T.id=t.createUUID(),g(T,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),g(I,{x:0,y:0,"xlink:href":P[1]}),T.appendChild(I),function(e){t._preload(P[1],function(){var t=this.offsetWidth,i=this.offsetHeight;g(e,{width:t,height:i}),g(I,{width:t,height:i})})}(T),n.paper.defs.appendChild(T),g(l,{fill:"url(#"+T.id+")"}),n.pattern=T,n.pattern&&_(n);break}var O=t.getRGB(m);if(O.error){if(("circle"==n.type||"ellipse"==n.type||"r"!=i(m).charAt())&&v(n,m)){if("opacity"in h||"fill-opacity"in h){var N=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,d));if(N){var F=N.getElementsByTagName("stop");g(F[F.length-1],{"stop-opacity":("opacity"in h?h.opacity:1)*("fill-opacity"in h?h["fill-opacity"]:1)})}}h.gradient=m,h.fill="none";break}}else delete o.gradient,delete h.gradient,!t.is(h.opacity,"undefined")&&t.is(o.opacity,"undefined")&&g(l,{opacity:h.opacity}),!t.is(h["fill-opacity"],"undefined")&&t.is(o["fill-opacity"],"undefined")&&g(l,{"fill-opacity":h["fill-opacity"]});O[e]("opacity")&&g(l,{"fill-opacity":O.opacity>1?O.opacity/100:O.opacity});case"stroke":O=t.getRGB(m),l.setAttribute(f,O.hex),"stroke"==f&&O[e]("opacity")&&g(l,{"stroke-opacity":O.opacity>1?O.opacity/100:O.opacity}),"stroke"==f&&n._.arrows&&("startString"in n._.arrows&&x(n,n._.arrows.startString),"endString"in n._.arrows&&x(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=i(m).charAt())&&v(n,m);break;case"opacity":h.gradient&&!h[e]("stroke-opacity")&&g(l,{"stroke-opacity":m>1?m/100:m});case"fill-opacity":if(h.gradient){(N=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,d)))&&(F=N.getElementsByTagName("stop"),g(F[F.length-1],{"stop-opacity":m}));break}default:"font-size"==f&&(m=r(m,10)+"px");var L=f.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[L]=m,n._.dirty=1,l.setAttribute(f,m)}}C(n,o),l.style.visibility=u},C=function(n,o){if("text"==n.type&&(o[e]("text")||o[e]("font")||o[e]("font-size")||o[e]("x")||o[e]("y"))){var s=n.attrs,a=n.node,l=a.firstChild?r(t._g.doc.defaultView.getComputedStyle(a.firstChild,d).getPropertyValue("font-size"),10):10;if(o[e]("text")){for(s.text=o.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,h=i(o.text).split("\n"),u=[],p=0,f=h.length;p<f;p++)c=g("tspan"),p&&g(c,{dy:1.2*l,x:s.x}),c.appendChild(t._g.doc.createTextNode(h[p])),a.appendChild(c),u[p]=c}else for(p=0,f=(u=a.getElementsByTagName("tspan")).length;p<f;p++)p?g(u[p],{dy:1.2*l,x:s.x}):g(u[0],{dy:0});g(a,{x:s.x,y:s.y}),n._.dirty=1;var m=n._getBBox(),v=s.y-(m.y+m.height/2);v&&t.is(v,"finite")&&g(u[0],{dy:v})}},D=function(t){return t.parentNode&&"a"===t.parentNode.tagName.toLowerCase()?t.parentNode:t},T=function(e,i){this[0]=this.node=e,e.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),e.raphaelid=this.id,this.matrix=t.matrix(),this.realPath=null,this.paper=i,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!i.bottom&&(i.bottom=this),this.prev=i.top,i.top&&(i.top.next=this),i.top=this,this.next=null},A=t.el;T.prototype=A,A.constructor=T,t._engine.path=function(t,e){var i=g("path");e.canvas&&e.canvas.appendChild(i);var n=new T(i,e);return n.type="path",S(n,{fill:"none",stroke:"#000",path:t}),n},A.rotate=function(t,e,r){if(this.removed)return this;if((t=i(t).split(c)).length-1&&(e=n(t[1]),r=n(t[2])),t=n(t[0]),null==r&&(e=r),null==e||null==r){var o=this.getBBox(1);e=o.x+o.width/2,r=o.y+o.height/2}return this.transform(this._.transform.concat([["r",t,e,r]])),this},A.scale=function(t,e,r,o){if(this.removed)return this;if((t=i(t).split(c)).length-1&&(e=n(t[1]),r=n(t[2]),o=n(t[3])),t=n(t[0]),null==e&&(e=t),null==o&&(r=o),null==r||null==o)var s=this.getBBox(1);return r=null==r?s.x+s.width/2:r,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,e,r,o]])),this},A.translate=function(t,e){return this.removed?this:((t=i(t).split(c)).length-1&&(e=n(t[1])),t=n(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},A.transform=function(i){var n=this._;if(null==i)return n.transform;if(t._extractTransform(this,i),this.clip&&g(this.clip,{transform:this.matrix.invert()}),this.pattern&&_(this),this.node&&g(this.node,{transform:this.matrix}),1!=n.sx||1!=n.sy){var r=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":r})}return this},A.hide=function(){return this.removed||(this.node.style.display="none"),this},A.show=function(){return this.removed||(this.node.style.display=""),this},A.remove=function(){var e=D(this.node);if(!this.removed&&e.parentNode){var i=this.paper;i.__set__&&i.__set__.exclude(this),h.unbind("raphael.*.*."+this.id),this.gradient&&i.defs.removeChild(this.gradient),t._tear(this,i),e.parentNode.removeChild(e),this.removeData();for(var n in this)this[n]="function"==typeof this[n]?t._removedFactory(n):null;this.removed=!0}},A._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e,i=!1;this.paper.canvas.parentElement?e=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(e=this.paper.canvas.parentNode.style),e&&"none"==e.display&&(i=!0,e.display="");var n={};try{n=this.node.getBBox()}catch(t){n={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{n=n||{},i&&(e.display="none")}return t&&this.hide(),n},A.attr=function(i,n){if(this.removed)return this;if(null==i){var r={};for(var o in this.attrs)this.attrs[e](o)&&(r[o]=this.attrs[o]);return r.gradient&&"none"==r.fill&&(r.fill=r.gradient)&&delete r.gradient,r.transform=this._.transform,r}if(null==n&&t.is(i,"string")){if("fill"==i&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==i)return this._.transform;for(var s=i.split(c),a={},l=0,d=s.length;l<d;l++)(i=s[l])in this.attrs?a[i]=this.attrs[i]:t.is(this.paper.customAttributes[i],"function")?a[i]=this.paper.customAttributes[i].def:a[i]=t._availableAttrs[i];return d-1?a:a[s[0]]}if(null==n&&t.is(i,"array")){for(a={},l=0,d=i.length;l<d;l++)a[i[l]]=this.attr(i[l]);return a}if(null!=n){var u={};u[i]=n}else null!=i&&t.is(i,"object")&&(u=i);for(var p in u)h("raphael.attr."+p+"."+this.id,this,u[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&u[e](p)&&t.is(this.paper.customAttributes[p],"function")){var f=this.paper.customAttributes[p].apply(this,[].concat(u[p]));this.attrs[p]=u[p];for(var m in f)f[e](m)&&(u[m]=f[m])}return S(this,u),this},A.toFront=function(){if(this.removed)return this;var e=D(this.node);e.parentNode.appendChild(e);var i=this.paper;return i.top!=this&&t._tofront(this,i),this},A.toBack=function(){if(this.removed)return this;var e=D(this.node),i=e.parentNode;i.insertBefore(e,i.firstChild),t._toback(this,this.paper);this.paper;return this},A.insertAfter=function(e){if(this.removed||!e)return this;var i=D(this.node),n=D(e.node||e[e.length-1].node);return n.nextSibling?n.parentNode.insertBefore(i,n.nextSibling):n.parentNode.appendChild(i),t._insertafter(this,e,this.paper),this},A.insertBefore=function(e){if(this.removed||!e)return this;var i=D(this.node),n=D(e.node||e[0].node);return n.parentNode.insertBefore(i,n),t._insertbefore(this,e,this.paper),this},A.blur=function(e){var i=this;if(0!=+e){var n=g("filter"),r=g("feGaussianBlur");i.attrs.blur=e,n.id=t.createUUID(),g(r,{stdDeviation:+e||1.5}),n.appendChild(r),i.paper.defs.appendChild(n),i._blur=n,g(i.node,{filter:"url(#"+n.id+")"})}else i._blur&&(i._blur.parentNode.removeChild(i._blur),delete i._blur,delete i.attrs.blur),i.node.removeAttribute("filter");return i},t._engine.circle=function(t,e,i,n){var r=g("circle");t.canvas&&t.canvas.appendChild(r);var o=new T(r,t);return o.attrs={cx:e,cy:i,r:n,fill:"none",stroke:"#000"},o.type="circle",g(r,o.attrs),o},t._engine.rect=function(t,e,i,n,r,o){var s=g("rect");t.canvas&&t.canvas.appendChild(s);var a=new T(s,t);return a.attrs={x:e,y:i,width:n,height:r,rx:o||0,ry:o||0,fill:"none",stroke:"#000"},a.type="rect",g(s,a.attrs),a},t._engine.ellipse=function(t,e,i,n,r){var o=g("ellipse");t.canvas&&t.canvas.appendChild(o);var s=new T(o,t);return s.attrs={cx:e,cy:i,rx:n,ry:r,fill:"none",stroke:"#000"},s.type="ellipse",g(o,s.attrs),s},t._engine.image=function(t,e,i,n,r,o){var s=g("image");g(s,{x:i,y:n,width:r,height:o,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var a=new T(s,t);return a.attrs={x:i,y:n,width:r,height:o,src:e},a.type="image",a},t._engine.text=function(e,i,n,r){var o=g("text");e.canvas&&e.canvas.appendChild(o);var s=new T(o,e);return s.attrs={x:i,y:n,"text-anchor":"middle",text:r,"font-family":t._availableAttrs["font-family"],"font-size":t._availableAttrs["font-size"],stroke:"none",fill:"#000"},s.type="text",S(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),i=e&&e.container,n=e.x,r=e.y,o=e.width,s=e.height;if(!i)throw new Error("SVG container not found.");var a,l=g("svg"),c="overflow:hidden;";return n=n||0,r=r||0,o=o||512,s=s||342,g(l,{height:s,version:1.1,width:o,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==i?(l.style.cssText=c+"position:absolute;left:"+n+"px;top:"+r+"px",t._g.doc.body.appendChild(l),a=1):(l.style.cssText=c+"position:relative",i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l)),i=new t._Paper,i.width=o,i.height=s,i.canvas=l,i.clear(),i._left=i._top=0,a&&(i.renderfix=function(){}),i.renderfix(),i},t._engine.setViewBox=function(t,e,i,n,r){h("raphael.setViewBox",this,this._viewBox,[t,e,i,n,r]);var o,a,l=this.getSize(),c=s(i/l.width,n/l.height),d=this.top,p=r?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(c=1),delete this._vbSize,o="0 0 "+this.width+u+this.height):(this._vbSize=c,o=t+u+e+u+i+u+n),g(this.canvas,{viewBox:o,preserveAspectRatio:p});c&&d;)a="stroke-width"in d.attrs?d.attrs["stroke-width"]:1,d.attr({"stroke-width":a}),d._.dirty=1,d._.dirtyT=1,d=d.prev;return this._viewBox=[t,e,i,n,!!r],this},t.prototype.renderfix=function(){var t,e=this.canvas,i=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(i){t=e.createSVGMatrix()}var n=-t.e%1,r=-t.f%1;(n||r)&&(n&&(this._left=(this._left+n)%1,i.left=this._left+"px"),r&&(this._top=(this._top+r)%1,i.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=g("desc")).appendChild(t._g.doc.createTextNode("Created with Raphaël "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=g("defs"))},t.prototype.remove=function(){h("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var M=t.st;for(var E in A)A[e](E)&&!M[e](E)&&(M[E]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t].apply(i,e)})}}(E))}}.apply(e,n))&&(t.exports=r)},function(t,e,i){var n,r;n=[i(1)],void 0!==(r=function(t){if(!t||t.vml){var e="hasOwnProperty",i=String,n=parseFloat,r=Math,o=r.round,s=r.max,a=r.min,l=r.abs,c=/[, ]+/,h=t.eve,d=" ",u="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},f=/([clmz]),?([^clmz]*)/gi,m=/ progid:\S+Blur\([^\)]+\)/g,g=/-?[^,\s-]+/g,v="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",y=21600,b={path:1,rect:1,image:1},_={circle:1,ellipse:1},x=function(e){var n=/[ahqstv]/gi,r=t._pathToAbsolute;if(i(e).match(n)&&(r=t._path2curve),n=/[clmz]/g,r==t._pathToAbsolute&&!i(e).match(n)){var s=i(e).replace(f,function(t,e,i){var n=[],r="m"==e.toLowerCase(),s=p[e];return i.replace(g,function(t){r&&2==n.length&&(s+=n+p["m"==e?"l":"L"],n=[]),n.push(o(t*y))}),s+n});return s}var a,l,c=r(e);s=[];for(var h=0,m=c.length;h<m;h++){a=c[h],"z"==(l=c[h][0].toLowerCase())&&(l="x");for(var v=1,b=a.length;v<b;v++)l+=o(a[v]*y)+(v!=b-1?",":u);s.push(l)}return s.join(d)},w=function(e,i,n){var r=t.matrix();return r.rotate(-e,.5,.5),{dx:r.x(i,n),dy:r.y(i,n)}},k=function(t,e,i,n,r,o){var s=t._,a=t.matrix,c=s.fillpos,h=t.node,u=h.style,p=1,f="",m=y/e,g=y/i;if(u.visibility="hidden",e&&i){if(h.coordsize=l(m)+d+l(g),u.rotation=o*(e*i<0?-1:1),o){var v=w(o,n,r);n=v.dx,r=v.dy}if(e<0&&(f+="x"),i<0&&(f+=" y")&&(p=-1),u.flip=f,h.coordorigin=n*-m+d+r*-g,c||s.fillsize){var b=h.getElementsByTagName("fill");b=b&&b[0],h.removeChild(b),c&&(v=w(o,a.x(c[0],c[1]),a.y(c[0],c[1])),b.position=v.dx*p+d+v.dy*p),s.fillsize&&(b.size=s.fillsize[0]*l(e)+d+s.fillsize[1]*l(i)),h.appendChild(b)}u.visibility="visible"}};t.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var S=function(t,e,n){for(var r=i(e).toLowerCase().split("-"),o=n?"end":"start",s=r.length,a="classic",l="medium",c="medium";s--;)switch(r[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":a=r[s];break;case"wide":case"narrow":c=r[s];break;case"long":case"short":l=r[s]}var h=t.node.getElementsByTagName("stroke")[0];h[o+"arrow"]=a,h[o+"arrowlength"]=l,h[o+"arrowwidth"]=c},C=function(r,l){r.attrs=r.attrs||{};var h=r.node,p=r.attrs,f=h.style,m=b[r.type]&&(l.x!=p.x||l.y!=p.y||l.width!=p.width||l.height!=p.height||l.cx!=p.cx||l.cy!=p.cy||l.rx!=p.rx||l.ry!=p.ry||l.r!=p.r),g=_[r.type]&&(p.cx!=l.cx||p.cy!=l.cy||p.r!=l.r||p.rx!=l.rx||p.ry!=l.ry),v=r;for(var w in l)l[e](w)&&(p[w]=l[w]);if(m&&(p.path=t._getPath[r.type](r),r._.dirty=1),l.href&&(h.href=l.href),l.title&&(h.title=l.title),l.target&&(h.target=l.target),l.cursor&&(f.cursor=l.cursor),"blur"in l&&r.blur(l.blur),(l.path&&"path"==r.type||m)&&(h.path=x(~i(p.path).toLowerCase().indexOf("r")?t._pathToAbsolute(p.path):p.path),r._.dirty=1,"image"==r.type&&(r._.fillpos=[p.x,p.y],r._.fillsize=[p.width,p.height],k(r,1,1,0,0,0))),"transform"in l&&r.transform(l.transform),g){var C=+p.cx,T=+p.cy,A=+p.rx||+p.r||0,E=+p.ry||+p.r||0;h.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",o((C-A)*y),o((T-E)*y),o((C+A)*y),o((T+E)*y),o(C*y)),r._.dirty=1}if("clip-rect"in l){var P=i(l["clip-rect"]).split(c);if(4==P.length){P[2]=+P[2]+ +P[0],P[3]=+P[3]+ +P[1];var I=h.clipRect||t._g.doc.createElement("div"),O=I.style;O.clip=t.format("rect({1}px {2}px {3}px {0}px)",P),h.clipRect||(O.position="absolute",O.top=0,O.left=0,O.width=r.paper.width+"px",O.height=r.paper.height+"px",h.parentNode.insertBefore(I,h),I.appendChild(h),h.clipRect=I)}l["clip-rect"]||h.clipRect&&(h.clipRect.style.clip="auto")}if(r.textpath){var N=r.textpath.style;l.font&&(N.font=l.font),l["font-family"]&&(N.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,u)+'"'),l["font-size"]&&(N.fontSize=l["font-size"]),l["font-weight"]&&(N.fontWeight=l["font-weight"]),l["font-style"]&&(N.fontStyle=l["font-style"])}if("arrow-start"in l&&S(v,l["arrow-start"]),"arrow-end"in l&&S(v,l["arrow-end"],1),null!=l.opacity||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var F=h.getElementsByTagName("fill");if(!(F=F&&F[0])&&(F=M("fill")),"image"==r.type&&l.src&&(F.src=l.src),l.fill&&(F.on=!0),null!=F.on&&"none"!=l.fill&&null!==l.fill||(F.on=!1),F.on&&l.fill){var L=i(l.fill).match(t._ISURL);if(L){F.parentNode==h&&h.removeChild(F),F.rotate=!0,F.src=L[1],F.type="tile";var j=r.getBBox(1);F.position=j.x+d+j.y,r._.fillpos=[j.x,j.y],t._preload(L[1],function(){r._.fillsize=[this.offsetWidth,this.offsetHeight]})}else F.color=t.getRGB(l.fill).hex,F.src=u,F.type="solid",t.getRGB(l.fill).error&&(v.type in{circle:1,ellipse:1}||"r"!=i(l.fill).charAt())&&D(v,l.fill,F)&&(p.fill="none",p.gradient=l.fill,F.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var R=((+p["fill-opacity"]+1||2)-1)*((+p.opacity+1||2)-1)*((+t.getRGB(l.fill).o+1||2)-1);R=a(s(R,0),1),F.opacity=R,F.src&&(F.color="none")}h.appendChild(F);var $=h.getElementsByTagName("stroke")&&h.getElementsByTagName("stroke")[0],H=!1;!$&&(H=$=M("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&($.on=!0),("none"==l.stroke||null===l.stroke||null==$.on||0==l.stroke||0==l["stroke-width"])&&($.on=!1);var B=t.getRGB(l.stroke);$.on&&l.stroke&&($.color=B.hex),R=((+p["stroke-opacity"]+1||2)-1)*((+p.opacity+1||2)-1)*((+B.o+1||2)-1);var z=.75*(n(l["stroke-width"])||1);if(R=a(s(R,0),1),null==l["stroke-width"]&&(z=p["stroke-width"]),l["stroke-width"]&&($.weight=z),z&&z<1&&(R*=z)&&($.weight=1),$.opacity=R,l["stroke-linejoin"]&&($.joinstyle=l["stroke-linejoin"]||"miter"),$.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&($.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var U={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};$.dashstyle=U[e](l["stroke-dasharray"])?U[l["stroke-dasharray"]]:u}H&&h.appendChild($)}if("text"==v.type){v.paper.canvas.style.display=u;var W=v.paper.span,Y=p.font&&p.font.match(/\d+(?:\.\d*)?(?=px)/);f=W.style,p.font&&(f.font=p.font),p["font-family"]&&(f.fontFamily=p["font-family"]),p["font-weight"]&&(f.fontWeight=p["font-weight"]),p["font-style"]&&(f.fontStyle=p["font-style"]),Y=n(p["font-size"]||Y&&Y[0])||10,f.fontSize=100*Y+"px",v.textpath.string&&(W.innerHTML=i(v.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var V=W.getBoundingClientRect();v.W=p.w=(V.right-V.left)/100,v.H=p.h=(V.bottom-V.top)/100,v.X=p.x,v.Y=p.y+v.H/2,("x"in l||"y"in l)&&(v.path.v=t.format("m{0},{1}l{2},{1}",o(p.x*y),o(p.y*y),o(p.x*y)+1));for(var q=["x","y","text","font","font-family","font-weight","font-style","font-size"],G=0,K=q.length;G<K;G++)if(q[G]in l){v._.dirty=1;break}switch(p["text-anchor"]){case"start":v.textpath.style["v-text-align"]="left",v.bbx=v.W/2;break;case"end":v.textpath.style["v-text-align"]="right",v.bbx=-v.W/2;break;default:v.textpath.style["v-text-align"]="center",v.bbx=0}v.textpath.style["v-text-kern"]=!0}},D=function(e,o,s){e.attrs=e.attrs||{};e.attrs;var a=Math.pow,l="linear",c=".5 .5";if(e.attrs.gradient=o,o=i(o).replace(t._radial_gradient,function(t,e,i){return l="radial",e&&i&&(e=n(e),i=n(i),a(e-.5,2)+a(i-.5,2)>.25&&(i=r.sqrt(.25-a(e-.5,2))*(2*(i>.5)-1)+.5),c=e+d+i),u}),o=o.split(/\s*\-\s*/),"linear"==l){var h=o.shift();if(h=-n(h),isNaN(h))return null}var p=t._parseDots(o);if(!p)return null;if(e=e.shape||e.node,p.length){e.removeChild(s),s.on=!0,s.method="none",s.color=p[0].color,s.color2=p[p.length-1].color;for(var f=[],m=0,g=p.length;m<g;m++)p[m].offset&&f.push(p[m].offset+d+p[m].color);s.colors=f.length?f.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=c,s.angle=0):(s.type="gradient",s.angle=(270-h)%360),e.appendChild(s)}return 1},T=function(e,i){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=i,this.matrix=t.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!i.bottom&&(i.bottom=this),this.prev=i.top,i.top&&(i.top.next=this),i.top=this,this.next=null},A=t.el;T.prototype=A,A.constructor=T,A.transform=function(e){if(null==e)return this._.transform;var n,r=this.paper._viewBoxShift,o=r?"s"+[r.scale,r.scale]+"-1-1t"+[r.dx,r.dy]:u;r&&(n=e=i(e).replace(/\.{3}|\u2026/g,this._.transform||u)),t._extractTransform(this,o+e);var s,a=this.matrix.clone(),l=this.skew,c=this.node,h=~i(this.attrs.fill).indexOf("-"),p=!i(this.attrs.fill).indexOf("url(");if(a.translate(1,1),p||h||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=a.split(),h&&s.noRotation||!s.isSimple){c.style.filter=a.toFilter();var f=this.getBBox(),m=this.getBBox(1),g=f.x-m.x,v=f.y-m.y;c.coordorigin=g*-y+d+v*-y,k(this,1,1,g,v,0)}else c.style.filter=u,k(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else c.style.filter=u,l.matrix=i(a),l.offset=a.offset();return null!==n&&(this._.transform=n,t._extractTransform(this,n)),this},A.rotate=function(t,e,r){if(this.removed)return this;if(null!=t){if((t=i(t).split(c)).length-1&&(e=n(t[1]),r=n(t[2])),t=n(t[0]),null==r&&(e=r),null==e||null==r){var o=this.getBBox(1);e=o.x+o.width/2,r=o.y+o.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,r]])),this}},A.translate=function(t,e){return this.removed?this:((t=i(t).split(c)).length-1&&(e=n(t[1])),t=n(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},A.scale=function(t,e,r,o){if(this.removed)return this;if((t=i(t).split(c)).length-1&&(e=n(t[1]),r=n(t[2]),o=n(t[3]),isNaN(r)&&(r=null),isNaN(o)&&(o=null)),t=n(t[0]),null==e&&(e=t),null==o&&(r=o),null==r||null==o)var s=this.getBBox(1);return r=null==r?s.x+s.width/2:r,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,e,r,o]])),this._.dirtyT=1,this},A.hide=function(){return!this.removed&&(this.node.style.display="none"),this},A.show=function(){return!this.removed&&(this.node.style.display=u),this},A.auxGetBBox=t.el.getBBox,A.getBBox=function(){var t=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var e={},i=1/this.paper._viewBoxShift.scale;return e.x=t.x-this.paper._viewBoxShift.dx,e.x*=i,e.y=t.y-this.paper._viewBoxShift.dy,e.y*=i,e.width=t.width*i,e.height=t.height*i,e.x2=e.x+e.width,e.y2=e.y+e.height,e}return t},A._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},A.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},A.attr=function(i,n){if(this.removed)return this;if(null==i){var r={};for(var o in this.attrs)this.attrs[e](o)&&(r[o]=this.attrs[o]);return r.gradient&&"none"==r.fill&&(r.fill=r.gradient)&&delete r.gradient,r.transform=this._.transform,r}if(null==n&&t.is(i,"string")){if("fill"==i&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=i.split(c),a={},l=0,d=s.length;l<d;l++)(i=s[l])in this.attrs?a[i]=this.attrs[i]:t.is(this.paper.customAttributes[i],"function")?a[i]=this.paper.customAttributes[i].def:a[i]=t._availableAttrs[i];return d-1?a:a[s[0]]}if(this.attrs&&null==n&&t.is(i,"array")){for(a={},l=0,d=i.length;l<d;l++)a[i[l]]=this.attr(i[l]);return a}var u;null!=n&&((u={})[i]=n),null==n&&t.is(i,"object")&&(u=i);for(var p in u)h("raphael.attr."+p+"."+this.id,this,u[p]);if(u){for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&u[e](p)&&t.is(this.paper.customAttributes[p],"function")){var f=this.paper.customAttributes[p].apply(this,[].concat(u[p]));this.attrs[p]=u[p];for(var m in f)f[e](m)&&(u[m]=f[m])}u.text&&"text"==this.type&&(this.textpath.string=u.text),C(this,u)}return this},A.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},A.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},A.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},A.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},A.blur=function(e){var i=this.node.runtimeStyle,n=i.filter;return n=n.replace(m,u),0!=+e?(this.attrs.blur=e,i.filter=n+d+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+e||1.5)+")",i.margin=t.format("-{0}px 0 0 -{0}px",o(+e||1.5))):(i.filter=n,i.margin=0,delete this.attrs.blur),this},t._engine.path=function(t,e){var i=M("shape");i.style.cssText=v,i.coordsize=y+d+y,i.coordorigin=e.coordorigin;var n=new T(i,e),r={fill:"none",stroke:"#000"};t&&(r.path=t),n.type="path",n.path=[],n.Path=u,C(n,r),e.canvas&&e.canvas.appendChild(i);var o=M("skew");return o.on=!0,i.appendChild(o),n.skew=o,n.transform(u),n},t._engine.rect=function(e,i,n,r,o,s){var a=t._rectPath(i,n,r,o,s),l=e.path(a),c=l.attrs;return l.X=c.x=i,l.Y=c.y=n,l.W=c.width=r,l.H=c.height=o,c.r=s,c.path=a,l.type="rect",l},t._engine.ellipse=function(t,e,i,n,r){var o=t.path();o.attrs;return o.X=e-n,o.Y=i-r,o.W=2*n,o.H=2*r,o.type="ellipse",C(o,{cx:e,cy:i,rx:n,ry:r}),o},t._engine.circle=function(t,e,i,n){var r=t.path();r.attrs;return r.X=e-n,r.Y=i-n,r.W=r.H=2*n,r.type="circle",C(r,{cx:e,cy:i,r:n}),r},t._engine.image=function(e,i,n,r,o,s){var a=t._rectPath(n,r,o,s),l=e.path(a).attr({stroke:"none"}),c=l.attrs,h=l.node,d=h.getElementsByTagName("fill")[0];return c.src=i,l.X=c.x=n,l.Y=c.y=r,l.W=c.width=o,l.H=c.height=s,c.path=a,l.type="image",d.parentNode==h&&h.removeChild(d),d.rotate=!0,d.src=i,d.type="tile",l._.fillpos=[n,r],l._.fillsize=[o,s],h.appendChild(d),k(l,1,1,0,0,0),l},t._engine.text=function(e,n,r,s){var a=M("shape"),l=M("path"),c=M("textpath");n=n||0,r=r||0,s=s||"",l.v=t.format("m{0},{1}l{2},{1}",o(n*y),o(r*y),o(n*y)+1),l.textpathok=!0,c.string=i(s),c.on=!0,a.style.cssText=v,a.coordsize=y+d+y,a.coordorigin="0 0";var h=new T(a,e),p={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};h.shape=a,h.path=l,h.textpath=c,h.type="text",h.attrs.text=i(s),h.attrs.x=n,h.attrs.y=r,h.attrs.w=1,h.attrs.h=1,C(h,p),a.appendChild(c),a.appendChild(l),e.canvas.appendChild(a);var f=M("skew");return f.on=!0,a.appendChild(f),h.skew=f,h.transform(u),h},t._engine.setSize=function(e,i){var n=this.canvas.style;return this.width=e,this.height=i,e==+e&&(e+="px"),i==+i&&(i+="px"),n.width=e,n.height=i,n.clip="rect(0 "+e+" "+i+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,i,n,r,o){t.eve("raphael.setViewBox",this,this._viewBox,[e,i,n,r,o]);var s,a,l=this.getSize(),c=l.width,h=l.height;return o&&(a=c/n,n*(s=h/r)<c&&(e-=(c-n*s)/2/s),r*a<h&&(i-=(h-r*a)/2/a)),this._viewBox=[e,i,n,r,!!o],this._viewBoxShift={dx:-e,dy:-i,scale:l},this.forEach(function(t){t.transform("...")}),this};var M;t._engine.initWin=function(t){var e=t.document;e.styleSheets.length<31?e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):e.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),M=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(t){M=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),i=e.container,n=e.height,r=e.width,o=e.x,s=e.y;if(!i)throw new Error("VML container not found.");var a=new t._Paper,l=a.canvas=t._g.doc.createElement("div"),c=l.style;return o=o||0,s=s||0,r=r||512,n=n||342,a.width=r,a.height=n,r==+r&&(r+="px"),n==+n&&(n+="px"),a.coordsize=216e5+d+216e5,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(a.span),c.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",r,n),1==i?(t._g.doc.body.appendChild(l),c.left=o+"px",c.top=s+"px",c.position="absolute"):i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=u,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var E=t.st;for(var P in A)A[e](P)&&!E[e](P)&&(E[P]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t].apply(i,e)})}}(P))}}.apply(e,n))&&(t.exports=r)}])}),function(){var t,e,i,n,r=[].slice,o=function(t,e){return function(){return t.apply(e,arguments)}},s={}.hasOwnProperty,a=function(t,e){function i(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},l=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1};e=window.Morris={},t=jQuery,e.EventEmitter=function(){function t(){}return t.prototype.on=function(t,e){return null==this.handlers&&(this.handlers={}),null==this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this},t.prototype.fire=function(){var t,e,i,n,o,s,a;if(i=arguments[0],t=2<=arguments.length?r.call(arguments,1):[],null!=this.handlers&&null!=this.handlers[i]){for(a=[],n=0,o=(s=this.handlers[i]).length;n<o;n++)e=s[n],a.push(e.apply(null,t));return a}},t}(),e.commas=function(t){var e,i,n,r;return null!=t?(n=t<0?"-":"",e=Math.abs(t),i=Math.floor(e).toFixed(0),n+=i.replace(/(?=(?:\d{3})+$)(?!^)/g,","),(r=e.toString()).length>i.length&&(n+=r.slice(i.length)),n):"-"},e.pad2=function(t){return(t<10?"0":"")+t},e.Grid=function(i){function n(e){this.resizeHandler=o(this.resizeHandler,this);var i=this;if("string"==typeof e.element?this.el=t(document.getElementById(e.element)):this.el=t(e.element),null==this.el||0===this.el.length)throw new Error("Graph container element not found");"static"===this.el.css("position")&&this.el.css("position","relative"),this.options=t.extend({},this.gridDefaults,this.defaults||{},e),"string"==typeof this.options.units&&(this.options.postUnits=e.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.selectFrom=null,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(t){var e,n,r,o,s;return n=i.el.offset(),s=t.pageX-n.left,i.selectFrom?(e=i.data[i.hitTest(Math.min(s,i.selectFrom))]._x,r=i.data[i.hitTest(Math.max(s,i.selectFrom))]._x,o=r-e,i.selectionRect.attr({x:e,width:o})):i.fire("hovermove",s,t.pageY-n.top)}),this.el.bind("mouseleave",function(t){return i.selectFrom&&(i.selectionRect.hide(),i.selectFrom=null),i.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(t){var e,n;return n=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],e=i.el.offset(),i.fire("hovermove",n.pageX-e.left,n.pageY-e.top)}),this.el.bind("click",function(t){var e;return e=i.el.offset(),i.fire("gridclick",t.pageX-e.left,t.pageY-e.top)}),this.options.rangeSelect&&(this.selectionRect=this.raphael.rect(0,0,0,this.el.innerHeight()).attr({fill:this.options.rangeSelectColor,stroke:!1}).toBack().hide(),this.el.bind("mousedown",function(t){var e;return e=i.el.offset(),i.startRange(t.pageX-e.left)}),this.el.bind("mouseup",function(t){var e;return e=i.el.offset(),i.endRange(t.pageX-e.left),i.fire("hovermove",t.pageX-e.left,t.pageY-e.top)})),this.options.resize&&t(window).bind("resize",function(t){return null!=i.timeoutId&&window.clearTimeout(i.timeoutId),i.timeoutId=window.setTimeout(i.resizeHandler,100)}),this.el.css("-webkit-tap-highlight-color","rgba(0,0,0,0)"),this.postInit&&this.postInit()}return a(n,i),n.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"],rangeSelect:null,rangeSelectColor:"#eef",resize:!1},n.prototype.setData=function(t,i){var n,r,o,s,a,l,c,h,d,u,p,f,m,g,v;return null==i&&(i=!0),this.options.data=t,null==t||0===t.length?(this.data=[],this.raphael.clear(),void(null!=this.hover&&this.hover.hide())):(f=this.cumulative?0:null,m=this.cumulative?0:null,this.options.goals.length>0&&(a=Math.min.apply(Math,this.options.goals),s=Math.max.apply(Math,this.options.goals),m=null!=m?Math.min(m,a):a,f=null!=f?Math.max(f,s):s),this.data=function(){var i,n,s;for(s=[],o=i=0,n=t.length;i<n;o=++i)c=t[o],(l={src:c}).label=c[this.options.xkey],this.options.parseTime?(l.x=e.parseDate(l.label),this.options.dateFormat?l.label=this.options.dateFormat(l.x):"number"==typeof l.label&&(l.label=new Date(l.label).toString())):(l.x=o,this.options.xLabelFormat&&(l.label=this.options.xLabelFormat(l))),d=0,l.y=function(){var t,e,i,n;for(i=this.options.ykeys,n=[],r=t=0,e=i.length;t<e;r=++t)p=i[r],"string"==typeof(g=c[p])&&(g=parseFloat(g)),null!=g&&"number"!=typeof g&&(g=null),null!=g&&(this.cumulative?d+=g:null!=f?(f=Math.max(g,f),m=Math.min(g,m)):f=m=g),this.cumulative&&null!=d&&(f=Math.max(d,f),m=Math.min(d,m)),n.push(g);return n}.call(this),s.push(l);return s}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(t,e){return(t.x>e.x)-(e.x>t.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.events.length>0&&(this.options.parseTime?this.events=function(){var t,i,r,o;for(o=[],t=0,i=(r=this.options.events).length;t<i;t++)n=r[t],o.push(e.parseDate(n));return o}.call(this):this.events=this.options.events,this.xmax=Math.max(this.xmax,Math.max.apply(Math,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(Math,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",m),this.ymax=this.yboundary("max",f),this.ymin===this.ymax&&(m&&(this.ymin-=1),this.ymax+=1),!0!==(v=this.options.axes)&&"both"!==v&&"y"!==v&&!0!==this.options.grid||(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin?(this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines),this.ymin=Math.min(this.ymin,this.grid[0]),this.ymax=Math.max(this.ymax,this.grid[this.grid.length-1])):(h=(this.ymax-this.ymin)/(this.options.numLines-1),this.grid=function(){var t,e,i;for(i=[],u=t=this.ymin,e=this.ymax;h>0?t<=e:t>=e;u=t+=h)i.push(u);return i}.call(this))),this.dirty=!0,i?this.redraw():void 0)},n.prototype.yboundary=function(t,e){var i,n;return"string"==typeof(i=this.options["y"+t])?"auto"===i.slice(0,4)?i.length>5?(n=parseInt(i.slice(5),10),null==e?n:Math[t](e,n)):null!=e?e:0:parseInt(i,10):i},n.prototype.autoGridLines=function(t,e,i){var n,r,o,s,a,l,c,h,d;return a=e-t,d=Math.floor(Math.log(a)/Math.log(10)),c=Math.pow(10,d),r=Math.floor(t/c)*c,n=Math.ceil(e/c)*c,l=(n-r)/(i-1),1===c&&l>1&&Math.ceil(l)!==l&&(l=Math.ceil(l),n=r+l*(i-1)),r<0&&n>0&&(r=Math.floor(t/l)*l,n=Math.ceil(e/l)*l),l<1?(s=Math.floor(Math.log(l)/Math.log(10)),o=function(){var t,e;for(e=[],h=t=r;l>0?t<=n:t>=n;h=t+=l)e.push(parseFloat(h.toFixed(1-s)));return e}()):o=function(){var t,e;for(e=[],h=t=r;l>0?t<=n:t>=n;h=t+=l)e.push(h);return e}(),o},n.prototype._calc=function(){var t,e,i,n,r,o,s,a;if(r=this.el.width(),i=this.el.height(),(this.elementWidth!==r||this.elementHeight!==i||this.dirty)&&(this.elementWidth=r,this.elementHeight=i,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,!0!==(s=this.options.axes)&&"both"!==s&&"y"!==s||(o=function(){var t,i,n,r;for(r=[],t=0,i=(n=this.grid).length;t<i;t++)e=n[t],r.push(this.measureText(this.yAxisFormat(e)).width);return r}.call(this),this.left+=Math.max.apply(Math,o)),!0!==(a=this.options.axes)&&"both"!==a&&"x"!==a||(t=function(){var t,e,i;for(i=[],n=t=0,e=this.data.length;0<=e?t<e:t>e;n=0<=e?++t:--t)i.push(this.measureText(this.data[n].text,-this.options.xLabelAngle).height);return i}.call(this),this.bottom-=Math.max.apply(Math,t)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc))return this.calc()},n.prototype.transY=function(t){return this.bottom-(t-this.ymin)*this.dy},n.prototype.transX=function(t){return 1===this.data.length?(this.left+this.right)/2:this.left+(t-this.xmin)*this.dx},n.prototype.redraw=function(){if(this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw)return this.draw()},n.prototype.measureText=function(t,e){var i,n;return null==e&&(e=0),n=this.raphael.text(100,100,t).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(e),i=n.getBBox(),n.remove(),i},n.prototype.yAxisFormat=function(t){return this.yLabelFormat(t)},n.prototype.yLabelFormat=function(t){return"function"==typeof this.options.yLabelFormat?this.options.yLabelFormat(t):""+this.options.preUnits+e.commas(t)+this.options.postUnits},n.prototype.drawGrid=function(){var t,e,i,n,r,o,s,a;if(!1!==this.options.grid||!0===(r=this.options.axes)||"both"===r||"y"===r){for(a=[],i=0,n=(o=this.grid).length;i<n;i++)t=o[i],e=this.transY(t),!0!==(s=this.options.axes)&&"both"!==s&&"y"!==s||this.drawYAxisLabel(this.left-this.options.padding/2,e,this.yAxisFormat(t)),this.options.grid?a.push(this.drawGridLine("M"+this.left+","+e+"H"+(this.left+this.width))):a.push(void 0);return a}},n.prototype.drawGoals=function(){var t,e,i,n,r,o,s;for(s=[],i=n=0,r=(o=this.options.goals).length;n<r;i=++n)e=o[i],t=this.options.goalLineColors[i%this.options.goalLineColors.length],s.push(this.drawGoal(e,t));return s},n.prototype.drawEvents=function(){var t,e,i,n,r,o,s;for(s=[],i=n=0,r=(o=this.events).length;n<r;i=++n)e=o[i],t=this.options.eventLineColors[i%this.options.eventLineColors.length],s.push(this.drawEvent(e,t));return s},n.prototype.drawGoal=function(t,e){return this.raphael.path("M"+this.left+","+this.transY(t)+"H"+this.right).attr("stroke",e).attr("stroke-width",this.options.goalStrokeWidth)},n.prototype.drawEvent=function(t,e){return this.raphael.path("M"+this.transX(t)+","+this.bottom+"V"+this.top).attr("stroke",e).attr("stroke-width",this.options.eventStrokeWidth)},n.prototype.drawYAxisLabel=function(t,e,i){return this.raphael.text(t,e,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},n.prototype.drawGridLine=function(t){return this.raphael.path(t).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},n.prototype.startRange=function(t){return this.hover.hide(),this.selectFrom=t,this.selectionRect.attr({x:t,width:0}).show()},n.prototype.endRange=function(t){var e,i;if(this.selectFrom)return i=Math.min(this.selectFrom,t),e=Math.max(this.selectFrom,t),this.options.rangeSelect.call(this.el,{start:this.data[this.hitTest(i)].x,end:this.data[this.hitTest(e)].x}),this.selectFrom=null},n.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},n}(e.EventEmitter),e.parseDate=function(t){var e,i,n,r,o,s,a,l,c,h,d;return"number"==typeof t?t:(i=t.match(/^(\d+) Q(\d)$/),r=t.match(/^(\d+)-(\d+)$/),o=t.match(/^(\d+)-(\d+)-(\d+)$/),a=t.match(/^(\d+) W(\d+)$/),l=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),c=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),i?new Date(parseInt(i[1],10),3*parseInt(i[2],10)-1,1).getTime():r?new Date(parseInt(r[1],10),parseInt(r[2],10)-1,1).getTime():o?new Date(parseInt(o[1],10),parseInt(o[2],10)-1,parseInt(o[3],10)).getTime():a?(4!==(h=new Date(parseInt(a[1],10),0,1)).getDay()&&h.setMonth(0,1+(4-h.getDay()+7)%7),h.getTime()+6048e5*parseInt(a[2],10)):l?l[6]?(s=0,"Z"!==l[6]&&(s=60*parseInt(l[8],10)+parseInt(l[9],10),"+"===l[7]&&(s=0-s)),Date.UTC(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10)+s)):new Date(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10)).getTime():c?(d=parseFloat(c[6]),e=Math.floor(d),n=Math.round(1e3*(d-e)),c[8]?(s=0,"Z"!==c[8]&&(s=60*parseInt(c[10],10)+parseInt(c[11],10),"+"===c[9]&&(s=0-s)),Date.UTC(parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10),parseInt(c[4],10),parseInt(c[5],10)+s,e,n)):new Date(parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10),parseInt(c[4],10),parseInt(c[5],10),e,n).getTime()):new Date(parseInt(t,10),0,1).getTime())},e.Hover=function(){function i(i){null==i&&(i={}),this.options=t.extend({},e.Hover.defaults,i),this.el=t("<div class='"+this.options.class+"'></div>"),this.el.hide(),this.options.parent.append(this.el)}return i.defaults={class:"morris-hover morris-default-style"},i.prototype.update=function(t,e,i){return t?(this.html(t),this.show(),this.moveTo(e,i)):this.hide()},i.prototype.html=function(t){return this.el.html(t)},i.prototype.moveTo=function(t,e){var i,n,r,o,s,a;return s=this.options.parent.innerWidth(),o=this.options.parent.innerHeight(),n=this.el.outerWidth(),i=this.el.outerHeight(),r=Math.min(Math.max(0,t-n/2),s-n),null!=e?(a=e-i-10)<0&&(a=e+10)+i>o&&(a=o/2-i/2):a=o/2-i/2,this.el.css({left:r+"px",top:parseInt(a)+"px"})},i.prototype.show=function(){return this.el.show()},i.prototype.hide=function(){return this.el.hide()},i}(),e.Line=function(t){function i(t){if(this.hilight=o(this.hilight,this),this.onHoverOut=o(this.onHoverOut,this),this.onHoverMove=o(this.onHoverMove,this),this.onGridClick=o(this.onGridClick,this),!(this instanceof e.Line))return new e.Line(t);i.__super__.constructor.call(this,t)}return a(i,t),i.prototype.init=function(){if("always"!==this.options.hideHover)return this.hover=new e.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},i.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointStrokeWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,hideHover:!1},i.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},i.prototype.calcPoints=function(){var t,e,i,n,r,o;for(o=[],i=0,n=(r=this.data).length;i<n;i++)(t=r[i])._x=this.transX(t.x),t._y=function(){var i,n,r,o;for(o=[],i=0,n=(r=t.y).length;i<n;i++)null!=(e=r[i])?o.push(this.transY(e)):o.push(e);return o}.call(this),o.push(t._ymax=Math.min.apply(Math,[this.bottom].concat(function(){var i,n,r,o;for(o=[],i=0,n=(r=t._y).length;i<n;i++)null!=(e=r[i])&&o.push(e);return o}())));return o},i.prototype.hitTest=function(t){var e,i,n,r,o;if(0===this.data.length)return null;for(e=n=0,r=(o=this.data.slice(1)).length;n<r&&(i=o[e],!(t<(i._x+this.data[e]._x)/2));e=++n);return e},i.prototype.onGridClick=function(t,e){var i;return i=this.hitTest(t),this.fire("click",i,this.data[i].src,t,e)},i.prototype.onHoverMove=function(t,e){var i;return i=this.hitTest(t),this.displayHoverForRow(i)},i.prototype.onHoverOut=function(){if(!1!==this.options.hideHover)return this.displayHoverForRow(null)},i.prototype.displayHoverForRow=function(t){var e;return null!=t?((e=this.hover).update.apply(e,this.hoverContentForRow(t)),this.hilight(t)):(this.hover.hide(),this.hilight())},i.prototype.hoverContentForRow=function(t){var e,i,n,r,o,s,a;for(e="<div class='morris-hover-row-label'>"+(n=this.data[t]).label+"</div>",i=o=0,s=(a=n.y).length;o<s;i=++o)r=a[i],e+="<div class='morris-hover-point' style='color: "+this.colorFor(n,i,"label")+"'>\n  "+this.options.labels[i]+":\n  "+this.yLabelFormat(r)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(e=this.options.hoverCallback(t,this.options,e,n.src)),[e,n._x,n._ymax]},i.prototype.generatePaths=function(){var t,i,n,r;return this.paths=function(){var o,s,a,c;for(c=[],i=o=0,s=this.options.ykeys.length;0<=s?o<s:o>s;i=0<=s?++o:--o)r="boolean"==typeof this.options.smooth?this.options.smooth:(a=this.options.ykeys[i],l.call(this.options.smooth,a)>=0),(t=function(){var t,e,r,o;for(o=[],t=0,e=(r=this.data).length;t<e;t++)void 0!==(n=r[t])._y[i]&&o.push({x:n._x,y:n._y[i]});return o}.call(this)).length>1?c.push(e.Line.createPath(t,r,this.bottom)):c.push(null);return c}.call(this)},i.prototype.draw=function(){var t;if(!0!==(t=this.options.axes)&&"both"!==t&&"x"!==t||this.drawXAxis(),this.drawSeries(),!1===this.options.hideHover)return this.displayHoverForRow(this.data.length-1)},i.prototype.drawXAxis=function(){var t,i,n,r,o,s,a,l,c,h,d=this;for(a=this.bottom+this.options.padding/2,o=null,r=null,t=function(t,e){var i,n,s,l,c;return i=d.drawXAxisLabel(d.transX(e),a,t),c=i.getBBox(),i.transform("r"+-d.options.xLabelAngle),n=i.getBBox(),i.transform("t0,"+n.height/2+"..."),0!==d.options.xLabelAngle&&(l=-.5*c.width*Math.cos(d.options.xLabelAngle*Math.PI/180),i.transform("t"+l+",0...")),n=i.getBBox(),(null==o||o>=n.x+n.width||null!=r&&r>=n.x)&&n.x>=0&&n.x+n.width<d.el.width()?(0!==d.options.xLabelAngle&&(s=1.25*d.options.gridTextSize/Math.sin(d.options.xLabelAngle*Math.PI/180),r=n.x-s),o=n.x-d.options.xLabelMargin):i.remove()},(n=this.options.parseTime?1===this.data.length&&"auto"===this.options.xLabels?[[this.data[0].label,this.data[0].x]]:e.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var t,e,i,n;for(n=[],t=0,e=(i=this.data).length;t<e;t++)s=i[t],n.push([s.label,s.x]);return n}.call(this)).reverse(),h=[],l=0,c=n.length;l<c;l++)i=n[l],h.push(t(i[0],i[1]));return h},i.prototype.drawSeries=function(){var t,e,i,n,r,o;for(this.seriesPoints=[],t=e=n=this.options.ykeys.length-1;n<=0?e<=0:e>=0;t=n<=0?++e:--e)this._drawLineFor(t);for(o=[],t=i=r=this.options.ykeys.length-1;r<=0?i<=0:i>=0;t=r<=0?++i:--i)o.push(this._drawPointFor(t));return o},i.prototype._drawPointFor=function(t){var e,i,n,r,o,s;for(this.seriesPoints[t]=[],s=[],n=0,r=(o=this.data).length;n<r;n++)e=null,null!=(i=o[n])._y[t]&&(e=this.drawLinePoint(i._x,i._y[t],this.colorFor(i,t,"point"),t)),s.push(this.seriesPoints[t].push(e));return s},i.prototype._drawLineFor=function(t){var e;if(null!==(e=this.paths[t]))return this.drawLinePath(e,this.colorFor(null,t,"line"),t)},i.createPath=function(t,i,n){var r,o,s,a,l,c,h,d,u,p;for(h="",i&&(s=e.Line.gradients(t)),d={y:null},a=u=0,p=t.length;u<p;a=++u)null!=(r=t[a]).y&&(null!=d.y?i?(o=s[a],c=s[a-1],l=(r.x-d.x)/4,h+="C"+(d.x+l)+","+Math.min(n,d.y+l*c)+","+(r.x-l)+","+Math.min(n,r.y-l*o)+","+r.x+","+r.y):h+="L"+r.x+","+r.y:i&&null==s[a]||(h+="M"+r.x+","+r.y)),d=r;return h},i.gradients=function(t){var e,i,n,r,o,s,a,l;for(i=function(t,e){return(t.y-e.y)/(t.x-e.x)},l=[],n=s=0,a=t.length;s<a;n=++s)null!=(e=t[n]).y?(r=t[n+1]||{y:null},null!=(o=t[n-1]||{y:null}).y&&null!=r.y?l.push(i(o,r)):null!=o.y?l.push(i(o,e)):null!=r.y?l.push(i(e,r)):l.push(null)):l.push(null);return l},i.prototype.hilight=function(t){var e,i,n,r,o;if(null!==this.prevHilight&&this.prevHilight!==t)for(e=i=0,r=this.seriesPoints.length-1;0<=r?i<=r:i>=r;e=0<=r?++i:--i)this.seriesPoints[e][this.prevHilight]&&this.seriesPoints[e][this.prevHilight].animate(this.pointShrinkSeries(e));if(null!==t&&this.prevHilight!==t)for(e=n=0,o=this.seriesPoints.length-1;0<=o?n<=o:n>=o;e=0<=o?++n:--n)this.seriesPoints[e][t]&&this.seriesPoints[e][t].animate(this.pointGrowSeries(e));return this.prevHilight=t},i.prototype.colorFor=function(t,e,i){return"function"==typeof this.options.lineColors?this.options.lineColors.call(this,t,e,i):"point"===i?this.options.pointFillColors[e%this.options.pointFillColors.length]||this.options.lineColors[e%this.options.lineColors.length]:this.options.lineColors[e%this.options.lineColors.length]},i.prototype.drawXAxisLabel=function(t,e,i){return this.raphael.text(t,e,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},i.prototype.drawLinePath=function(t,e,i){return this.raphael.path(t).attr("stroke",e).attr("stroke-width",this.lineWidthForSeries(i))},i.prototype.drawLinePoint=function(t,e,i,n){return this.raphael.circle(t,e,this.pointSizeForSeries(n)).attr("fill",i).attr("stroke-width",this.pointStrokeWidthForSeries(n)).attr("stroke",this.pointStrokeColorForSeries(n))},i.prototype.pointStrokeWidthForSeries=function(t){return this.options.pointStrokeWidths[t%this.options.pointStrokeWidths.length]},i.prototype.pointStrokeColorForSeries=function(t){return this.options.pointStrokeColors[t%this.options.pointStrokeColors.length]},i.prototype.lineWidthForSeries=function(t){return this.options.lineWidth instanceof Array?this.options.lineWidth[t%this.options.lineWidth.length]:this.options.lineWidth},i.prototype.pointSizeForSeries=function(t){return this.options.pointSize instanceof Array?this.options.pointSize[t%this.options.pointSize.length]:this.options.pointSize},i.prototype.pointGrowSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)+3},25,"linear")},i.prototype.pointShrinkSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)},25,"linear")},i}(e.Grid),e.labelSeries=function(i,n,r,o,s){var a,l,c,h,d,u,p,f,m,g,v;if(c=200*(n-i)/r,l=new Date(i),void 0===(p=e.LABEL_SPECS[o]))for(m=0,g=(v=e.AUTO_LABEL_ORDER).length;m<g;m++)if(h=v[m],u=e.LABEL_SPECS[h],c>=u.span){p=u;break}for(void 0===p&&(p=e.LABEL_SPECS.second),s&&(p=t.extend({},p,{fmt:s})),a=p.start(l),d=[];(f=a.getTime())<=n;)f>=i&&d.push([p.fmt(a),f]),p.incr(a);return d},i=function(t){return{span:60*t*1e3,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours())},fmt:function(t){return e.pad2(t.getHours())+":"+e.pad2(t.getMinutes())},incr:function(e){return e.setUTCMinutes(e.getUTCMinutes()+t)}}},n=function(t){return{span:1e3*t,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes())},fmt:function(t){return e.pad2(t.getHours())+":"+e.pad2(t.getMinutes())+":"+e.pad2(t.getSeconds())},incr:function(e){return e.setUTCSeconds(e.getUTCSeconds()+t)}}},e.LABEL_SPECS={decade:{span:1728e8,start:function(t){return new Date(t.getFullYear()-t.getFullYear()%10,0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+10)}},year:{span:1728e7,start:function(t){return new Date(t.getFullYear(),0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+1)}},month:{span:24192e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),1)},fmt:function(t){return t.getFullYear()+"-"+e.pad2(t.getMonth()+1)},incr:function(t){return t.setMonth(t.getMonth()+1)}},week:{span:6048e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return t.getFullYear()+"-"+e.pad2(t.getMonth()+1)+"-"+e.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+7)}},day:{span:864e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return t.getFullYear()+"-"+e.pad2(t.getMonth()+1)+"-"+e.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+1)}},hour:i(60),"30min":i(30),"15min":i(15),"10min":i(10),"5min":i(5),minute:i(1),"30sec":n(30),"15sec":n(15),"10sec":n(10),"5sec":n(5),second:n(1)},e.AUTO_LABEL_ORDER=["decade","year","month","week","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],e.Area=function(i){function n(i){var o;if(!(this instanceof e.Area))return new e.Area(i);o=t.extend({},r,i),this.cumulative=!o.behaveLikeLine,"auto"===o.fillOpacity&&(o.fillOpacity=o.behaveLikeLine?.8:1),n.__super__.constructor.call(this,o)}var r;return a(n,i),r={fillOpacity:"auto",behaveLikeLine:!1},n.prototype.calcPoints=function(){var t,e,i,n,r,o,s;for(s=[],n=0,r=(o=this.data).length;n<r;n++)(t=o[n])._x=this.transX(t.x),e=0,t._y=function(){var n,r,o,s;for(s=[],n=0,r=(o=t.y).length;n<r;n++)i=o[n],this.options.behaveLikeLine?s.push(this.transY(i)):(e+=i||0,s.push(this.transY(e)));return s}.call(this),s.push(t._ymax=Math.max.apply(Math,t._y));return s},n.prototype.drawSeries=function(){var t,e,i,n,r,o,s,a;for(this.seriesPoints=[],a=[],i=0,n=(e=this.options.behaveLikeLine?function(){o=[];for(var t=0,e=this.options.ykeys.length-1;0<=e?t<=e:t>=e;0<=e?t++:t--)o.push(t);return o}.apply(this):function(){s=[];for(var t=r=this.options.ykeys.length-1;r<=0?t<=0:t>=0;r<=0?t++:t--)s.push(t);return s}.apply(this)).length;i<n;i++)t=e[i],this._drawFillFor(t),this._drawLineFor(t),a.push(this._drawPointFor(t));return a},n.prototype._drawFillFor=function(t){var e;if(null!==(e=this.paths[t]))return e=e+"L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(e,this.fillForSeries(t))},n.prototype.fillForSeries=function(t){var e;return e=Raphael.rgb2hsl(this.colorFor(this.data[t],t,"line")),Raphael.hsl(e.h,this.options.behaveLikeLine?.9*e.s:.75*e.s,Math.min(.98,this.options.behaveLikeLine?1.2*e.l:1.25*e.l))},n.prototype.drawFilledPath=function(t,e){return this.raphael.path(t).attr("fill",e).attr("fill-opacity",this.options.fillOpacity).attr("stroke","none")},n}(e.Line),e.Bar=function(i){function n(i){if(this.onHoverOut=o(this.onHoverOut,this),this.onHoverMove=o(this.onHoverMove,this),this.onGridClick=o(this.onGridClick,this),!(this instanceof e.Bar))return new e.Bar(i);n.__super__.constructor.call(this,t.extend({},i,{parseTime:!1}))}return a(n,i),n.prototype.init=function(){if(this.cumulative=this.options.stacked,"always"!==this.options.hideHover)return this.hover=new e.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},n.prototype.defaults={barSizeRatio:.75,barGap:3,barColors:["#0b62a4","#7a92a3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],barOpacity:1,barRadius:[0,0,0,0],xLabelMargin:50},n.prototype.calc=function(){var t;if(this.calcBars(),!1===this.options.hideHover)return(t=this.hover).update.apply(t,this.hoverContentForRow(this.data.length-1))},n.prototype.calcBars=function(){var t,e,i,n,r,o,s;for(s=[],t=n=0,r=(o=this.data).length;n<r;t=++n)(e=o[t])._x=this.left+this.width*(t+.5)/this.data.length,s.push(e._y=function(){var t,n,r,o;for(o=[],t=0,n=(r=e.y).length;t<n;t++)null!=(i=r[t])?o.push(this.transY(i)):o.push(null);return o}.call(this));return s},n.prototype.draw=function(){var t;return!0!==(t=this.options.axes)&&"both"!==t&&"x"!==t||this.drawXAxis(),this.drawSeries()},n.prototype.drawXAxis=function(){var t,e,i,n,r,o,s,a,l,c,h,d,u;for(c=this.bottom+(this.options.xAxisLabelTopPadding||this.options.padding/2),s=null,o=null,u=[],t=h=0,d=this.data.length;0<=d?h<d:h>d;t=0<=d?++h:--h)a=this.data[this.data.length-1-t],l=(e=this.drawXAxisLabel(a._x,c,a.label)).getBBox(),e.transform("r"+-this.options.xLabelAngle),i=e.getBBox(),e.transform("t0,"+i.height/2+"..."),0!==this.options.xLabelAngle&&(r=-.5*l.width*Math.cos(this.options.xLabelAngle*Math.PI/180),e.transform("t"+r+",0...")),(null==s||s>=i.x+i.width||null!=o&&o>=i.x)&&i.x>=0&&i.x+i.width<this.el.width()?(0!==this.options.xLabelAngle&&(n=1.25*this.options.gridTextSize/Math.sin(this.options.xLabelAngle*Math.PI/180),o=i.x-n),u.push(s=i.x-this.options.xLabelMargin)):u.push(e.remove());return u},n.prototype.drawSeries=function(){var t,e,i,n,r,o,s,a,l,c,h,d,u,p,f;return i=this.width/this.options.data.length,a=this.options.stacked?1:this.options.ykeys.length,t=(i*this.options.barSizeRatio-this.options.barGap*(a-1))/a,this.options.barSize&&(t=Math.min(t,this.options.barSize)),d=i-t*a-this.options.barGap*(a-1),s=d/2,f=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var a,d,m,g;for(m=this.data,g=[],n=a=0,d=m.length;a<d;n=++a)l=m[n],r=0,g.push(function(){var a,d,m,g;for(m=l._y,g=[],c=a=0,d=m.length;a<d;c=++a)null!==(p=m[c])?(f?(u=Math.min(p,f),e=Math.max(p,f)):(u=p,e=this.bottom),o=this.left+n*i+s,this.options.stacked||(o+=c*(t+this.options.barGap)),h=e-u,this.options.verticalGridCondition&&this.options.verticalGridCondition(l.x)&&this.drawBar(this.left+n*i,this.top,i,Math.abs(this.top-this.bottom),this.options.verticalGridColor,this.options.verticalGridOpacity,this.options.barRadius),this.options.stacked&&(u-=r),this.drawBar(o,u,t,h,this.colorFor(l,c,"bar"),this.options.barOpacity,this.options.barRadius),g.push(r+=h)):g.push(null);return g}.call(this));return g}.call(this)},n.prototype.colorFor=function(t,e,i){var n,r;return"function"==typeof this.options.barColors?(n={x:t.x,y:t.y[e],label:t.label},r={index:e,key:this.options.ykeys[e],label:this.options.labels[e]},this.options.barColors.call(this,n,r,i)):this.options.barColors[e%this.options.barColors.length]},n.prototype.hitTest=function(t){return 0===this.data.length?null:(t=Math.max(Math.min(t,this.right),this.left),Math.min(this.data.length-1,Math.floor((t-this.left)/(this.width/this.data.length))))},n.prototype.onGridClick=function(t,e){var i;return i=this.hitTest(t),this.fire("click",i,this.data[i].src,t,e)},n.prototype.onHoverMove=function(t,e){var i,n;return i=this.hitTest(t),(n=this.hover).update.apply(n,this.hoverContentForRow(i))},n.prototype.onHoverOut=function(){if(!1!==this.options.hideHover)return this.hover.hide()},n.prototype.hoverContentForRow=function(t){var e,i,n,r,o,s,a,l;for(e="<div class='morris-hover-row-label'>"+(n=this.data[t]).label+"</div>",i=s=0,a=(l=n.y).length;s<a;i=++s)o=l[i],e+="<div class='morris-hover-point' style='color: "+this.colorFor(n,i,"label")+"'>\n  "+this.options.labels[i]+":\n  "+this.yLabelFormat(o)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(e=this.options.hoverCallback(t,this.options,e,n.src)),r=this.left+(t+.5)*this.width/this.data.length,[e,r]},n.prototype.drawXAxisLabel=function(t,e,i){return this.raphael.text(t,e,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},n.prototype.drawBar=function(t,e,i,n,r,o,s){var a;return a=Math.max.apply(Math,s),(0===a||a>n?this.raphael.rect(t,e,i,n):this.raphael.path(this.roundedRect(t,e,i,n,s))).attr("fill",r).attr("fill-opacity",o).attr("stroke","none")},n.prototype.roundedRect=function(t,e,i,n,r){return null==r&&(r=[0,0,0,0]),["M",t,r[0]+e,"Q",t,e,t+r[0],e,"L",t+i-r[1],e,"Q",t+i,e,t+i,e+r[1],"L",t+i,e+n-r[2],"Q",t+i,e+n,t+i-r[2],e+n,"L",t+r[3],e+n,"Q",t,e+n,t,e+n-r[3],"Z"]},n}(e.Grid),e.Donut=function(i){function n(i){this.resizeHandler=o(this.resizeHandler,this),this.select=o(this.select,this),this.click=o(this.click,this);var n=this;if(!(this instanceof e.Donut))return new e.Donut(i);if(this.options=t.extend({},this.defaults,i),"string"==typeof i.element?this.el=t(document.getElementById(i.element)):this.el=t(i.element),null===this.el||0===this.el.length)throw new Error("Graph placeholder not found.");void 0!==i.data&&0!==i.data.length&&(this.raphael=new Raphael(this.el[0]),this.options.resize&&t(window).bind("resize",function(t){return null!=n.timeoutId&&window.clearTimeout(n.timeoutId),n.timeoutId=window.setTimeout(n.resizeHandler,100)}),this.setData(i.data))}return a(n,i),n.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],backgroundColor:"#FFFFFF",labelColor:"#000000",formatter:e.commas,resize:!1},n.prototype.redraw=function(){var t,i,n,r,o,s,a,l,c,h,d,u,p,f,m,g,v,y,b,_,x,w;for(this.raphael.clear(),i=this.el.width()/2,n=this.el.height()/2,u=(Math.min(i,n)-10)/3,d=0,p=0,g=(b=this.values).length;p<g;p++)d+=b[p];for(l=5/(2*u),t=1.9999*Math.PI-l*this.data.length,s=0,o=0,this.segments=[],r=f=0,v=(_=this.values).length;f<v;r=++f)c=s+l+t*(_[r]/d),(h=new e.DonutSegment(i,n,2*u,u,s,c,this.data[r].color||this.options.colors[o%this.options.colors.length],this.options.backgroundColor,o,this.raphael)).render(),this.segments.push(h),h.on("hover",this.select),h.on("click",this.click),s=c,o+=1;for(this.text1=this.drawEmptyDonutLabel(i,n-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(i,n+10,this.options.labelColor,14),a=Math.max.apply(Math,this.values),o=0,w=[],m=0,y=(x=this.values).length;m<y;m++){if(x[m]===a){this.select(o);break}w.push(o+=1)}return w},n.prototype.setData=function(t){var e;return this.data=t,this.values=function(){var t,i,n,r;for(r=[],t=0,i=(n=this.data).length;t<i;t++)e=n[t],r.push(parseFloat(e.value));return r}.call(this),this.redraw()},n.prototype.click=function(t){return this.fire("click",t,this.data[t])},n.prototype.select=function(t){var e,i,n,r;for(i=0,n=(r=this.segments).length;i<n;i++)r[i].deselect();return this.segments[t].select(),e=this.data[t],this.setLabels(e.label,this.options.formatter(e.value,e))},n.prototype.setLabels=function(t,e){var i,n,r,o,s,a,l,c;return i=2*(Math.min(this.el.width()/2,this.el.height()/2)-10)/3,o=1.8*i,r=i/2,n=i/3,this.text1.attr({text:t,transform:""}),s=this.text1.getBBox(),a=Math.min(o/s.width,r/s.height),this.text1.attr({transform:"S"+a+","+a+","+(s.x+s.width/2)+","+(s.y+s.height)}),this.text2.attr({text:e,transform:""}),l=this.text2.getBBox(),c=Math.min(o/l.width,n/l.height),this.text2.attr({transform:"S"+c+","+c+","+(l.x+l.width/2)+","+l.y})},n.prototype.drawEmptyDonutLabel=function(t,e,i,n,r){var o;return o=this.raphael.text(t,e,"").attr("font-size",n).attr("fill",i),null!=r&&o.attr("font-weight",r),o},n.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},n}(e.EventEmitter),e.DonutSegment=function(t){function e(t,e,i,n,r,s,a,l,c,h){this.cx=t,this.cy=e,this.inner=i,this.outer=n,this.color=a,this.backgroundColor=l,this.index=c,this.raphael=h,this.deselect=o(this.deselect,this),this.select=o(this.select,this),this.sin_p0=Math.sin(r),this.cos_p0=Math.cos(r),this.sin_p1=Math.sin(s),this.cos_p1=Math.cos(s),this.is_long=s-r>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return a(e,t),e.prototype.calcArcPoints=function(t){return[this.cx+t*this.sin_p0,this.cy+t*this.cos_p0,this.cx+t*this.sin_p1,this.cy+t*this.cos_p1]},e.prototype.calcSegment=function(t,e){var i,n,r,o,s,a,l,c,h,d;return h=this.calcArcPoints(t),i=h[0],r=h[1],n=h[2],o=h[3],d=this.calcArcPoints(e),s=d[0],l=d[1],a=d[2],c=d[3],"M"+i+","+r+"A"+t+","+t+",0,"+this.is_long+",0,"+n+","+o+"L"+a+","+c+"A"+e+","+e+",0,"+this.is_long+",1,"+s+","+l+"Z"},e.prototype.calcArc=function(t){var e,i,n,r,o;return o=this.calcArcPoints(t),e=o[0],n=o[1],i=o[2],r=o[3],"M"+e+","+n+"A"+t+","+t+",0,"+this.is_long+",0,"+i+","+r},e.prototype.render=function(){var t=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return t.fire("hover",t.index)},function(){return t.fire("click",t.index)})},e.prototype.drawDonutArc=function(t,e){return this.raphael.path(t).attr({stroke:e,"stroke-width":2,opacity:0})},e.prototype.drawDonutSegment=function(t,e,i,n,r){return this.raphael.path(t).attr({fill:e,stroke:i,"stroke-width":3}).hover(n).click(r)},e.prototype.select=function(){if(!this.selected)return this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0},e.prototype.deselect=function(){if(this.selected)return this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1},e}(e.EventEmitter)}.call(this),function(t,e){"function"==typeof define&&define.amd?define("Chartist",[],function(){return t.Chartist=e()}):"object"==typeof module&&module.exports?module.exports=e():t.Chartist=e()}(this,function(){var t={version:"0.11.0"};return function(t,e,i){"use strict";i.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},i.noop=function(t){return t},i.alphaNumerate=function(t){return String.fromCharCode(97+t%26)},i.extend=function(t){var e,n,r;for(t=t||{},e=1;e<arguments.length;e++){n=arguments[e];for(var o in n)"object"!=typeof(r=n[o])||null===r||r instanceof Array?t[o]=r:t[o]=i.extend(t[o],r)}return t},i.replaceAll=function(t,e,i){return t.replace(new RegExp(e,"g"),i)},i.ensureUnit=function(t,e){return"number"==typeof t&&(t+=e),t},i.quantity=function(t){if("string"==typeof t){var e=/^(\d+)\s*(.*)$/g.exec(t);return{value:+e[1],unit:e[2]||void 0}}return{value:t}},i.querySelector=function(t){return t instanceof Node?t:e.querySelector(t)},i.times=function(t){return Array.apply(null,new Array(t))},i.sum=function(t,e){return t+(e||0)},i.mapMultiply=function(t){return function(e){return e*t}},i.mapAdd=function(t){return function(e){return e+t}},i.serialMap=function(t,e){var n=[],r=Math.max.apply(null,t.map(function(t){return t.length}));return i.times(r).forEach(function(i,r){var o=t.map(function(t){return t[r]});n[r]=e.apply(null,o)}),n},i.roundWithPrecision=function(t,e){var n=Math.pow(10,e||i.precision);return Math.round(t*n)/n},i.precision=8,i.escapingMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"},i.serialize=function(t){return null===t||void 0===t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),Object.keys(i.escapingMap).reduce(function(t,e){return i.replaceAll(t,e,i.escapingMap[e])},t))},i.deserialize=function(t){if("string"!=typeof t)return t;t=Object.keys(i.escapingMap).reduce(function(t,e){return i.replaceAll(t,i.escapingMap[e],e)},t);try{t=void 0!==(t=JSON.parse(t)).data?t.data:t}catch(t){}return t},i.createSvg=function(t,e,n,r){var o;return e=e||"100%",n=n||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(i.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),o=new i.Svg("svg").attr({width:e,height:n}).addClass(r),o._node.style.width=e,o._node.style.height=n,t.appendChild(o._node),o},i.normalizeData=function(t,e,n){var r,o={raw:t,normalized:{}};return o.normalized.series=i.getDataArray({series:t.series||[]},e,n),r=o.normalized.series.every(function(t){return t instanceof Array})?Math.max.apply(null,o.normalized.series.map(function(t){return t.length})):o.normalized.series.length,o.normalized.labels=(t.labels||[]).slice(),Array.prototype.push.apply(o.normalized.labels,i.times(Math.max(0,r-o.normalized.labels.length)).map(function(){return""})),e&&i.reverseData(o.normalized),o},i.safeHasProperty=function(t,e){return null!==t&&"object"==typeof t&&t.hasOwnProperty(e)},i.isDataHoleValue=function(t){return null===t||void 0===t||"number"==typeof t&&isNaN(t)},i.reverseData=function(t){t.labels.reverse(),t.series.reverse();for(var e=0;e<t.series.length;e++)"object"==typeof t.series[e]&&void 0!==t.series[e].data?t.series[e].data.reverse():t.series[e]instanceof Array&&t.series[e].reverse()},i.getDataArray=function(t,e,n){function r(t){if(i.safeHasProperty(t,"value"))return r(t.value);if(i.safeHasProperty(t,"data"))return r(t.data);if(t instanceof Array)return t.map(r);if(!i.isDataHoleValue(t)){if(n){var e={};return"string"==typeof n?e[n]=i.getNumberOrUndefined(t):e.y=i.getNumberOrUndefined(t),e.x=t.hasOwnProperty("x")?i.getNumberOrUndefined(t.x):e.x,e.y=t.hasOwnProperty("y")?i.getNumberOrUndefined(t.y):e.y,e}return i.getNumberOrUndefined(t)}}return t.series.map(r)},i.normalizePadding=function(t,e){return e=e||0,"number"==typeof t?{top:t,right:t,bottom:t,left:t}:{top:"number"==typeof t.top?t.top:e,right:"number"==typeof t.right?t.right:e,bottom:"number"==typeof t.bottom?t.bottom:e,left:"number"==typeof t.left?t.left:e}},i.getMetaData=function(t,e){var i=t.data?t.data[e]:t[e];return i?i.meta:void 0},i.orderOfMagnitude=function(t){return Math.floor(Math.log(Math.abs(t))/Math.LN10)},i.projectLength=function(t,e,i){return e/i.range*t},i.getAvailableHeight=function(t,e){return Math.max((i.quantity(e.height).value||t.height())-(e.chartPadding.top+e.chartPadding.bottom)-e.axisX.offset,0)},i.getHighLow=function(t,e,n){function r(t){if(void 0!==t)if(t instanceof Array)for(var e=0;e<t.length;e++)r(t[e]);else{var i=n?+t[n]:+t;s&&i>o.high&&(o.high=i),a&&i<o.low&&(o.low=i)}}var o={high:void 0===(e=i.extend({},e,n?e["axis"+n.toUpperCase()]:{})).high?-Number.MAX_VALUE:+e.high,low:void 0===e.low?Number.MAX_VALUE:+e.low},s=void 0===e.high,a=void 0===e.low;return(s||a)&&r(t),(e.referenceValue||0===e.referenceValue)&&(o.high=Math.max(e.referenceValue,o.high),o.low=Math.min(e.referenceValue,o.low)),o.high<=o.low&&(0===o.low?o.high=1:o.low<0?o.high=0:o.high>0?o.low=0:(o.high=1,o.low=0)),o},i.isNumeric=function(t){return null!==t&&isFinite(t)},i.isFalseyButZero=function(t){return!t&&0!==t},i.getNumberOrUndefined=function(t){return i.isNumeric(t)?+t:void 0},i.isMultiValue=function(t){return"object"==typeof t&&("x"in t||"y"in t)},i.getMultiValue=function(t,e){return i.isMultiValue(t)?i.getNumberOrUndefined(t[e||"y"]):i.getNumberOrUndefined(t)},i.rho=function(t){function e(t,i){return t%i==0?i:e(i,t%i)}function i(t){return t*t+1}if(1===t)return t;var n,r=2,o=2;if(t%2==0)return 2;do{r=i(r)%t,o=i(i(o))%t,n=e(Math.abs(r-o),t)}while(1===n);return n},i.getBounds=function(t,e,n,r){function o(t,e){return t===(t+=e)&&(t*=1+(e>0?p:-p)),t}var s,a,l,c=0,h={high:e.high,low:e.low};h.valueRange=h.high-h.low,h.oom=i.orderOfMagnitude(h.valueRange),h.step=Math.pow(10,h.oom),h.min=Math.floor(h.low/h.step)*h.step,h.max=Math.ceil(h.high/h.step)*h.step,h.range=h.max-h.min,h.numberOfSteps=Math.round(h.range/h.step);var d=i.projectLength(t,h.step,h)<n,u=r?i.rho(h.range):0;if(r&&i.projectLength(t,1,h)>=n)h.step=1;else if(r&&u<h.step&&i.projectLength(t,u,h)>=n)h.step=u;else for(;;){if(d&&i.projectLength(t,h.step,h)<=n)h.step*=2;else{if(d||!(i.projectLength(t,h.step/2,h)>=n))break;if(h.step/=2,r&&h.step%1!=0){h.step*=2;break}}if(c++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var p=2.221e-16;for(h.step=Math.max(h.step,p),a=h.min,l=h.max;a+h.step<=h.low;)a=o(a,h.step);for(;l-h.step>=h.high;)l=o(l,-h.step);h.min=a,h.max=l,h.range=h.max-h.min;var f=[];for(s=h.min;s<=h.max;s=o(s,h.step)){var m=i.roundWithPrecision(s);m!==f[f.length-1]&&f.push(m)}return h.values=f,h},i.polarToCartesian=function(t,e,i,n){var r=(n-90)*Math.PI/180;return{x:t+i*Math.cos(r),y:e+i*Math.sin(r)}},i.createChartRect=function(t,e,n){var r=!(!e.axisX&&!e.axisY),o=r?e.axisY.offset:0,s=r?e.axisX.offset:0,a=t.width()||i.quantity(e.width).value||0,l=t.height()||i.quantity(e.height).value||0,c=i.normalizePadding(e.chartPadding,n);a=Math.max(a,o+c.left+c.right),l=Math.max(l,s+c.top+c.bottom);var h={padding:c,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return r?("start"===e.axisX.position?(h.y2=c.top+s,h.y1=Math.max(l-c.bottom,h.y2+1)):(h.y2=c.top,h.y1=Math.max(l-c.bottom-s,h.y2+1)),"start"===e.axisY.position?(h.x1=c.left+o,h.x2=Math.max(a-c.right,h.x1+1)):(h.x1=c.left,h.x2=Math.max(a-c.right-o,h.x1+1))):(h.x1=c.left,h.x2=Math.max(a-c.right,h.x1+1),h.y2=c.top,h.y1=Math.max(l-c.bottom,h.y2+1)),h},i.createGrid=function(t,e,n,r,o,s,a,l){var c={};c[n.units.pos+"1"]=t,c[n.units.pos+"2"]=t,c[n.counterUnits.pos+"1"]=r,c[n.counterUnits.pos+"2"]=r+o;var h=s.elem("line",c,a.join(" "));l.emit("draw",i.extend({type:"grid",axis:n,index:e,group:s,element:h},c))},i.createGridBackground=function(t,e,i,n){var r=t.elem("rect",{x:e.x1,y:e.y2,width:e.width(),height:e.height()},i,!0);n.emit("draw",{type:"gridBackground",group:t,element:r})},i.createLabel=function(t,n,r,o,s,a,l,c,h,d,u){var p,f={};if(f[s.units.pos]=t+l[s.units.pos],f[s.counterUnits.pos]=l[s.counterUnits.pos],f[s.units.len]=n,f[s.counterUnits.len]=Math.max(0,a-10),d){var m=e.createElement("span");m.className=h.join(" "),m.setAttribute("xmlns",i.namespaces.xhtml),m.innerText=o[r],m.style[s.units.len]=Math.round(f[s.units.len])+"px",m.style[s.counterUnits.len]=Math.round(f[s.counterUnits.len])+"px",p=c.foreignObject(m,i.extend({style:"overflow: visible;"},f))}else p=c.elem("text",f,h.join(" ")).text(o[r]);u.emit("draw",i.extend({type:"label",axis:s,index:r,group:c,element:p,text:o[r]},f))},i.getSeriesOption=function(t,e,i){if(t.name&&e.series&&e.series[t.name]){var n=e.series[t.name];return n.hasOwnProperty(i)?n[i]:e[i]}return e[i]},i.optionsProvider=function(e,n,r){function o(e){var o=s;if(s=i.extend({},l),n)for(a=0;a<n.length;a++)t.matchMedia(n[a][0]).matches&&(s=i.extend(s,n[a][1]));r&&e&&r.emit("optionsChanged",{previousOptions:o,currentOptions:s})}var s,a,l=i.extend({},e),c=[];if(!t.matchMedia)throw"window.matchMedia not found! Make sure you're using a polyfill.";if(n)for(a=0;a<n.length;a++){var h=t.matchMedia(n[a][0]);h.addListener(o),c.push(h)}return o(),{removeMediaQueryListeners:function(){c.forEach(function(t){t.removeListener(o)})},getCurrentOptions:function(){return i.extend({},s)}}},i.splitIntoSegments=function(t,e,n){var r={increasingX:!1,fillHoles:!1};n=i.extend({},r,n);for(var o=[],s=!0,a=0;a<t.length;a+=2)void 0===i.getMultiValue(e[a/2].value)?n.fillHoles||(s=!0):(n.increasingX&&a>=2&&t[a]<=t[a-2]&&(s=!0),s&&(o.push({pathCoordinates:[],valueData:[]}),s=!1),o[o.length-1].pathCoordinates.push(t[a],t[a+1]),o[o.length-1].valueData.push(e[a/2]));return o}}(window,document,t),function(t,e,i){"use strict";i.Interpolation={},i.Interpolation.none=function(t){var e={fillHoles:!1};return t=i.extend({},e,t),function(e,n){for(var r=new i.Svg.Path,o=!0,s=0;s<e.length;s+=2){var a=e[s],l=e[s+1],c=n[s/2];void 0!==i.getMultiValue(c.value)?(o?r.move(a,l,!1,c):r.line(a,l,!1,c),o=!1):t.fillHoles||(o=!0)}return r}},i.Interpolation.simple=function(t){var e={divisor:2,fillHoles:!1};t=i.extend({},e,t);var n=1/Math.max(1,t.divisor);return function(e,r){for(var o,s,a,l=new i.Svg.Path,c=0;c<e.length;c+=2){var h=e[c],d=e[c+1],u=(h-o)*n,p=r[c/2];void 0!==p.value?(void 0===a?l.move(h,d,!1,p):l.curve(o+u,s,h-u,d,h,d,!1,p),o=h,s=d,a=p):t.fillHoles||(o=h=a=void 0)}return l}},i.Interpolation.cardinal=function(t){var e={tension:1,fillHoles:!1};t=i.extend({},e,t);var n=Math.min(1,Math.max(0,t.tension)),r=1-n;return function e(o,s){var a=i.splitIntoSegments(o,s,{fillHoles:t.fillHoles});if(a.length){if(a.length>1){var l=[];return a.forEach(function(t){l.push(e(t.pathCoordinates,t.valueData))}),i.Svg.Path.join(l)}if(o=a[0].pathCoordinates,s=a[0].valueData,o.length<=4)return i.Interpolation.none()(o,s);for(var c=(new i.Svg.Path).move(o[0],o[1],!1,s[0]),h=0,d=o.length;d-2>h;h+=2){var u=[{x:+o[h-2],y:+o[h-1]},{x:+o[h],y:+o[h+1]},{x:+o[h+2],y:+o[h+3]},{x:+o[h+4],y:+o[h+5]}];d-4===h?u[3]=u[2]:h||(u[0]={x:+o[h],y:+o[h+1]}),c.curve(n*(-u[0].x+6*u[1].x+u[2].x)/6+r*u[2].x,n*(-u[0].y+6*u[1].y+u[2].y)/6+r*u[2].y,n*(u[1].x+6*u[2].x-u[3].x)/6+r*u[2].x,n*(u[1].y+6*u[2].y-u[3].y)/6+r*u[2].y,u[2].x,u[2].y,!1,s[(h+2)/2])}return c}return i.Interpolation.none()([])}},i.Interpolation.monotoneCubic=function(t){var e={fillHoles:!1};return t=i.extend({},e,t),function e(n,r){var o=i.splitIntoSegments(n,r,{fillHoles:t.fillHoles,increasingX:!0});if(o.length){if(o.length>1){var s=[];return o.forEach(function(t){s.push(e(t.pathCoordinates,t.valueData))}),i.Svg.Path.join(s)}if(n=o[0].pathCoordinates,r=o[0].valueData,n.length<=4)return i.Interpolation.none()(n,r);var a,l,c=[],h=[],d=n.length/2,u=[],p=[],f=[],m=[];for(a=0;a<d;a++)c[a]=n[2*a],h[a]=n[2*a+1];for(a=0;a<d-1;a++)f[a]=h[a+1]-h[a],m[a]=c[a+1]-c[a],p[a]=f[a]/m[a];for(u[0]=p[0],u[d-1]=p[d-2],a=1;a<d-1;a++)0===p[a]||0===p[a-1]||p[a-1]>0!=p[a]>0?u[a]=0:(u[a]=3*(m[a-1]+m[a])/((2*m[a]+m[a-1])/p[a-1]+(m[a]+2*m[a-1])/p[a]),isFinite(u[a])||(u[a]=0));for(l=(new i.Svg.Path).move(c[0],h[0],!1,r[0]),a=0;a<d-1;a++)l.curve(c[a]+m[a]/3,h[a]+u[a]*m[a]/3,c[a+1]-m[a]/3,h[a+1]-u[a+1]*m[a]/3,c[a+1],h[a+1],!1,r[a+1]);return l}return i.Interpolation.none()([])}},i.Interpolation.step=function(t){var e={postpone:!0,fillHoles:!1};return t=i.extend({},e,t),function(e,n){for(var r,o,s,a=new i.Svg.Path,l=0;l<e.length;l+=2){var c=e[l],h=e[l+1],d=n[l/2];void 0!==d.value?(void 0===s?a.move(c,h,!1,d):(t.postpone?a.line(c,o,!1,s):a.line(r,h,!1,d),a.line(c,h,!1,d)),r=c,o=h,s=d):t.fillHoles||(r=o=s=void 0)}return a}}}(window,document,t),function(t,e,i){"use strict";i.EventEmitter=function(){var t=[];return{addEventHandler:function(e,i){t[e]=t[e]||[],t[e].push(i)},removeEventHandler:function(e,i){t[e]&&(i?(t[e].splice(t[e].indexOf(i),1),0===t[e].length&&delete t[e]):delete t[e])},emit:function(e,i){t[e]&&t[e].forEach(function(t){t(i)}),t["*"]&&t["*"].forEach(function(t){t(e,i)})}}}}(window,document,t),function(t,e,i){"use strict";function n(t){var e=[];if(t.length)for(var i=0;i<t.length;i++)e.push(t[i]);return e}i.Class={extend:function(t,e){var n=e||this.prototype||i.Class,r=Object.create(n);i.Class.cloneDefinitions(r,t);var o=function(){var t,e=r.constructor||function(){};return t=this===i?Object.create(r):this,e.apply(t,Array.prototype.slice.call(arguments,0)),t};return o.prototype=r,o.super=n,o.extend=this.extend,o},cloneDefinitions:function(){var t=n(arguments),e=t[0];return t.splice(1,t.length-1).forEach(function(t){Object.getOwnPropertyNames(t).forEach(function(i){delete e[i],Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}),e}}}(window,document,t),function(t,e,i){"use strict";function n(){t.addEventListener("resize",this.resizeListener),this.optionsProvider=i.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.addEventHandler("optionsChanged",function(){this.update()}.bind(this)),this.options.plugins&&this.options.plugins.forEach(function(t){t instanceof Array?t[0](this,t[1]):t(this)}.bind(this)),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=void 0}i.Base=i.Class.extend({constructor:function(t,e,r,o,s){this.container=i.querySelector(t),this.data=e||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.defaultOptions=r,this.options=o,this.responsiveOptions=s,this.eventEmitter=i.EventEmitter(),this.supportsForeignObject=i.Svg.isSupported("Extensibility"),this.supportsAnimations=i.Svg.isSupported("AnimationEventsAttribute"),this.resizeListener=function(){this.update()}.bind(this),this.container&&(this.container.__chartist__&&this.container.__chartist__.detach(),this.container.__chartist__=this),this.initializeTimeoutId=setTimeout(n.bind(this),0)},optionsProvider:void 0,container:void 0,svg:void 0,eventEmitter:void 0,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:function(t,e,n){return t&&(this.data=t||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),e&&(this.options=i.extend({},n?this.options:this.defaultOptions,e),this.initializeTimeoutId||(this.optionsProvider.removeMediaQueryListeners(),this.optionsProvider=i.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter))),this.initializeTimeoutId||this.createChart(this.optionsProvider.getCurrentOptions()),this},detach:function(){return this.initializeTimeoutId?t.clearTimeout(this.initializeTimeoutId):(t.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this},on:function(t,e){return this.eventEmitter.addEventHandler(t,e),this},off:function(t,e){return this.eventEmitter.removeEventHandler(t,e),this},version:i.version,supportsForeignObject:!1})}(window,document,t),function(t,e,i){"use strict";i.Svg=i.Class.extend({constructor:function(t,n,r,o,s){t instanceof Element?this._node=t:(this._node=e.createElementNS(i.namespaces.svg,t),"svg"===t&&this.attr({"xmlns:ct":i.namespaces.ct})),n&&this.attr(n),r&&this.addClass(r),o&&(s&&o._node.firstChild?o._node.insertBefore(this._node,o._node.firstChild):o._node.appendChild(this._node))},attr:function(t,e){return"string"==typeof t?e?this._node.getAttributeNS(e,t):this._node.getAttribute(t):(Object.keys(t).forEach(function(e){if(void 0!==t[e])if(-1!==e.indexOf(":")){var n=e.split(":");this._node.setAttributeNS(i.namespaces[n[0]],e,t[e])}else this._node.setAttribute(e,t[e])}.bind(this)),this)},elem:function(t,e,n,r){return new i.Svg(t,e,n,this,r)},parent:function(){return this._node.parentNode instanceof SVGElement?new i.Svg(this._node.parentNode):null},root:function(){for(var t=this._node;"svg"!==t.nodeName;)t=t.parentNode;return new i.Svg(t)},querySelector:function(t){var e=this._node.querySelector(t);return e?new i.Svg(e):null},querySelectorAll:function(t){var e=this._node.querySelectorAll(t);return e.length?new i.Svg.List(e):null},getNode:function(){return this._node},foreignObject:function(t,n,r,o){if("string"==typeof t){var s=e.createElement("div");s.innerHTML=t,t=s.firstChild}t.setAttribute("xmlns",i.namespaces.xmlns);var a=this.elem("foreignObject",n,r,o);return a._node.appendChild(t),a},text:function(t){return this._node.appendChild(e.createTextNode(t)),this},empty:function(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this},remove:function(){return this._node.parentNode.removeChild(this._node),this.parent()},replace:function(t){return this._node.parentNode.replaceChild(t._node,this._node),t},append:function(t,e){return e&&this._node.firstChild?this._node.insertBefore(t._node,this._node.firstChild):this._node.appendChild(t._node),this},classes:function(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]},addClass:function(t){return this._node.setAttribute("class",this.classes(this._node).concat(t.trim().split(/\s+/)).filter(function(t,e,i){return i.indexOf(t)===e}).join(" ")),this},removeClass:function(t){var e=t.trim().split(/\s+/);return this._node.setAttribute("class",this.classes(this._node).filter(function(t){return-1===e.indexOf(t)}).join(" ")),this},removeAllClasses:function(){return this._node.setAttribute("class",""),this},height:function(){return this._node.getBoundingClientRect().height},width:function(){return this._node.getBoundingClientRect().width},animate:function(t,e,n){return void 0===e&&(e=!0),Object.keys(t).forEach(function(r){function o(t,e){var o,s,a,l={};t.easing&&(a=t.easing instanceof Array?t.easing:i.Svg.Easing[t.easing],delete t.easing),t.begin=i.ensureUnit(t.begin,"ms"),t.dur=i.ensureUnit(t.dur,"ms"),a&&(t.calcMode="spline",t.keySplines=a.join(" "),t.keyTimes="0;1"),e&&(t.fill="freeze",l[r]=t.from,this.attr(l),s=i.quantity(t.begin||0).value,t.begin="indefinite"),o=this.elem("animate",i.extend({attributeName:r},t)),e&&setTimeout(function(){try{o._node.beginElement()}catch(e){l[r]=t.to,this.attr(l),o.remove()}}.bind(this),s),n&&o._node.addEventListener("beginEvent",function(){n.emit("animationBegin",{element:this,animate:o._node,params:t})}.bind(this)),o._node.addEventListener("endEvent",function(){n&&n.emit("animationEnd",{element:this,animate:o._node,params:t}),e&&(l[r]=t.to,this.attr(l),o.remove())}.bind(this))}t[r]instanceof Array?t[r].forEach(function(t){o.bind(this)(t,!1)}.bind(this)):o.bind(this)(t[r],e)}.bind(this)),this}}),i.Svg.isSupported=function(t){return e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+t,"1.1")};var n={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQuad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]};i.Svg.Easing=n,i.Svg.List=i.Class.extend({constructor:function(t){var e=this;this.svgElements=[];for(var n=0;n<t.length;n++)this.svgElements.push(new i.Svg(t[n]));Object.keys(i.Svg.prototype).filter(function(t){return-1===["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(t)}).forEach(function(t){e[t]=function(){var n=Array.prototype.slice.call(arguments,0);return e.svgElements.forEach(function(e){i.Svg.prototype[t].apply(e,n)}),e}})}})}(window,document,t),function(t,e,i){"use strict";function n(t,e,n,r,o,s){var a=i.extend({command:o?t.toLowerCase():t.toUpperCase()},e,s?{data:s}:{});n.splice(r,0,a)}function r(t,e){t.forEach(function(i,n){o[i.command.toLowerCase()].forEach(function(r,o){e(i,r,n,o,t)})})}var o={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},s={accuracy:3};i.Svg.Path=i.Class.extend({constructor:function(t,e){this.pathElements=[],this.pos=0,this.close=t,this.options=i.extend({},s,e)},position:function(t){return void 0!==t?(this.pos=Math.max(0,Math.min(this.pathElements.length,t)),this):this.pos},remove:function(t){return this.pathElements.splice(this.pos,t),this},move:function(t,e,i,r){return n("M",{x:+t,y:+e},this.pathElements,this.pos++,i,r),this},line:function(t,e,i,r){return n("L",{x:+t,y:+e},this.pathElements,this.pos++,i,r),this},curve:function(t,e,i,r,o,s,a,l){return n("C",{x1:+t,y1:+e,x2:+i,y2:+r,x:+o,y:+s},this.pathElements,this.pos++,a,l),this},arc:function(t,e,i,r,o,s,a,l,c){return n("A",{rx:+t,ry:+e,xAr:+i,lAf:+r,sf:+o,x:+s,y:+a},this.pathElements,this.pos++,l,c),this},scale:function(t,e){return r(this.pathElements,function(i,n){i[n]*="x"===n[0]?t:e}),this},translate:function(t,e){return r(this.pathElements,function(i,n){i[n]+="x"===n[0]?t:e}),this},transform:function(t){return r(this.pathElements,function(e,i,n,r,o){var s=t(e,i,n,r,o);(s||0===s)&&(e[i]=s)}),this},parse:function(t){var e=t.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(function(t,e){return e.match(/[A-Za-z]/)&&t.push([]),t[t.length-1].push(e),t},[]);"Z"===e[e.length-1][0].toUpperCase()&&e.pop();var n=e.map(function(t){var e=t.shift(),n=o[e.toLowerCase()];return i.extend({command:e},n.reduce(function(e,i,n){return e[i]=+t[n],e},{}))}),r=[this.pos,0];return Array.prototype.push.apply(r,n),Array.prototype.splice.apply(this.pathElements,r),this.pos+=n.length,this},stringify:function(){var t=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(function(e,i){var n=o[i.command.toLowerCase()].map(function(e){return this.options.accuracy?Math.round(i[e]*t)/t:i[e]}.bind(this));return e+i.command+n.join(",")}.bind(this),"")+(this.close?"Z":"")},clone:function(t){var e=new i.Svg.Path(t||this.close);return e.pos=this.pos,e.pathElements=this.pathElements.slice().map(function(t){return i.extend({},t)}),e.options=i.extend({},this.options),e},splitByCommand:function(t){var e=[new i.Svg.Path];return this.pathElements.forEach(function(n){n.command===t.toUpperCase()&&0!==e[e.length-1].pathElements.length&&e.push(new i.Svg.Path),e[e.length-1].pathElements.push(n)}),e}}),i.Svg.Path.elementDescriptions=o,i.Svg.Path.join=function(t,e,n){for(var r=new i.Svg.Path(e,n),o=0;o<t.length;o++)for(var s=t[o],a=0;a<s.pathElements.length;a++)r.pathElements.push(s.pathElements[a]);return r}}(window,document,t),function(t,e,i){"use strict";var n={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};i.Axis=i.Class.extend({constructor:function(t,e,i,r){this.units=t,this.counterUnits=t===n.x?n.y:n.x,this.chartRect=e,this.axisLength=e[t.rectEnd]-e[t.rectStart],this.gridOffset=e[t.rectOffset],this.ticks=i,this.options=r},createGridAndLabels:function(t,e,n,r,o){var s=r["axis"+this.units.pos.toUpperCase()],a=this.ticks.map(this.projectValue.bind(this)),l=this.ticks.map(s.labelInterpolationFnc);a.forEach(function(c,h){var d,u={x:0,y:0};d=a[h+1]?a[h+1]-c:Math.max(this.axisLength-c,30),i.isFalseyButZero(l[h])&&""!==l[h]||("x"===this.units.pos?(c=this.chartRect.x1+c,u.x=r.axisX.labelOffset.x,"start"===r.axisX.position?u.y=this.chartRect.padding.top+r.axisX.labelOffset.y+(n?5:20):u.y=this.chartRect.y1+r.axisX.labelOffset.y+(n?5:20)):(c=this.chartRect.y1-c,u.y=r.axisY.labelOffset.y-(n?d:0),"start"===r.axisY.position?u.x=n?this.chartRect.padding.left+r.axisY.labelOffset.x:this.chartRect.x1-10:u.x=this.chartRect.x2+r.axisY.labelOffset.x+10),s.showGrid&&i.createGrid(c,h,this,this.gridOffset,this.chartRect[this.counterUnits.len](),t,[r.classNames.grid,r.classNames[this.units.dir]],o),s.showLabel&&i.createLabel(c,d,h,l,this,s.offset,u,e,[r.classNames.label,r.classNames[this.units.dir],"start"===s.position?r.classNames[s.position]:r.classNames.end],n,o))}.bind(this))},projectValue:function(t,e,i){throw new Error("Base axis can't be instantiated!")}}),i.Axis.units=n}(window,document,t),function(t,e,i){"use strict";i.AutoScaleAxis=i.Axis.extend({constructor:function(t,e,n,r){var o=r.highLow||i.getHighLow(e,r,t.pos);this.bounds=i.getBounds(n[t.rectEnd]-n[t.rectStart],o,r.scaleMinSpace||20,r.onlyInteger),this.range={min:this.bounds.min,max:this.bounds.max},i.AutoScaleAxis.super.constructor.call(this,t,n,this.bounds.values,r)},projectValue:function(t){return this.axisLength*(+i.getMultiValue(t,this.units.pos)-this.bounds.min)/this.bounds.range}})}(window,document,t),function(t,e,i){"use strict";i.FixedScaleAxis=i.Axis.extend({constructor:function(t,e,n,r){var o=r.highLow||i.getHighLow(e,r,t.pos);this.divisor=r.divisor||1,this.ticks=r.ticks||i.times(this.divisor).map(function(t,e){return o.low+(o.high-o.low)/this.divisor*e}.bind(this)),this.ticks.sort(function(t,e){return t-e}),this.range={min:o.low,max:o.high},i.FixedScaleAxis.super.constructor.call(this,t,n,this.ticks,r),this.stepLength=this.axisLength/this.divisor},projectValue:function(t){return this.axisLength*(+i.getMultiValue(t,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}})}(window,document,t),function(t,e,i){"use strict";i.StepAxis=i.Axis.extend({constructor:function(t,e,n,r){i.StepAxis.super.constructor.call(this,t,n,r.ticks,r);var o=Math.max(1,r.ticks.length-(r.stretch?1:0));this.stepLength=this.axisLength/o},projectValue:function(t,e){return this.stepLength*e}})}(window,document,t),function(t,e,i){"use strict";var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,showGridBackground:!1,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};i.Line=i.Base.extend({constructor:function(t,e,r,o){i.Line.super.constructor.call(this,t,e,n,i.extend({},n,r),o)},createChart:function(t){var e=i.normalizeData(this.data,t.reverseData,!0);this.svg=i.createSvg(this.container,t.width,t.height,t.classNames.chart);var r,o,s=this.svg.elem("g").addClass(t.classNames.gridGroup),a=this.svg.elem("g"),l=this.svg.elem("g").addClass(t.classNames.labelGroup),c=i.createChartRect(this.svg,t,n.padding);r=void 0===t.axisX.type?new i.StepAxis(i.Axis.units.x,e.normalized.series,c,i.extend({},t.axisX,{ticks:e.normalized.labels,stretch:t.fullWidth})):t.axisX.type.call(i,i.Axis.units.x,e.normalized.series,c,t.axisX),o=void 0===t.axisY.type?new i.AutoScaleAxis(i.Axis.units.y,e.normalized.series,c,i.extend({},t.axisY,{high:i.isNumeric(t.high)?t.high:t.axisY.high,low:i.isNumeric(t.low)?t.low:t.axisY.low})):t.axisY.type.call(i,i.Axis.units.y,e.normalized.series,c,t.axisY),r.createGridAndLabels(s,l,this.supportsForeignObject,t,this.eventEmitter),o.createGridAndLabels(s,l,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&i.createGridBackground(s,c,t.classNames.gridBackground,this.eventEmitter),e.raw.series.forEach(function(n,s){var l=a.elem("g");l.attr({"ct:series-name":n.name,"ct:meta":i.serialize(n.meta)}),l.addClass([t.classNames.series,n.className||t.classNames.series+"-"+i.alphaNumerate(s)].join(" "));var h=[],d=[];e.normalized.series[s].forEach(function(t,a){var l={x:c.x1+r.projectValue(t,a,e.normalized.series[s]),y:c.y1-o.projectValue(t,a,e.normalized.series[s])};h.push(l.x,l.y),d.push({value:t,valueIndex:a,meta:i.getMetaData(n,a)})}.bind(this));var u={lineSmooth:i.getSeriesOption(n,t,"lineSmooth"),showPoint:i.getSeriesOption(n,t,"showPoint"),showLine:i.getSeriesOption(n,t,"showLine"),showArea:i.getSeriesOption(n,t,"showArea"),areaBase:i.getSeriesOption(n,t,"areaBase")},p=("function"==typeof u.lineSmooth?u.lineSmooth:u.lineSmooth?i.Interpolation.monotoneCubic():i.Interpolation.none())(h,d);if(u.showPoint&&p.pathElements.forEach(function(e){var a=l.elem("line",{x1:e.x,y1:e.y,x2:e.x+.01,y2:e.y},t.classNames.point).attr({"ct:value":[e.data.value.x,e.data.value.y].filter(i.isNumeric).join(","),"ct:meta":i.serialize(e.data.meta)});this.eventEmitter.emit("draw",{type:"point",value:e.data.value,index:e.data.valueIndex,meta:e.data.meta,series:n,seriesIndex:s,axisX:r,axisY:o,group:l,element:a,x:e.x,y:e.y})}.bind(this)),u.showLine){var f=l.elem("path",{d:p.stringify()},t.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:e.normalized.series[s],path:p.clone(),chartRect:c,index:s,series:n,seriesIndex:s,seriesMeta:n.meta,axisX:r,axisY:o,group:l,element:f})}if(u.showArea&&o.range){var m=Math.max(Math.min(u.areaBase,o.range.max),o.range.min),g=c.y1-o.projectValue(m);p.splitByCommand("M").filter(function(t){return t.pathElements.length>1}).map(function(t){var e=t.pathElements[0],i=t.pathElements[t.pathElements.length-1];return t.clone(!0).position(0).remove(1).move(e.x,g).line(e.x,e.y).position(t.pathElements.length+1).line(i.x,g)}).forEach(function(i){var a=l.elem("path",{d:i.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:e.normalized.series[s],path:i.clone(),series:n,seriesIndex:s,axisX:r,axisY:o,chartRect:c,index:s,group:l,element:a})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:o.bounds,chartRect:c,axisX:r,axisY:o,svg:this.svg,options:t})}})}(window,document,t),function(t,e,i){"use strict";var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};i.Bar=i.Base.extend({constructor:function(t,e,r,o){i.Bar.super.constructor.call(this,t,e,n,i.extend({},n,r),o)},createChart:function(t){var e,r;t.distributeSeries?(e=i.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y")).normalized.series=e.normalized.series.map(function(t){return[t]}):e=i.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y"),this.svg=i.createSvg(this.container,t.width,t.height,t.classNames.chart+(t.horizontalBars?" "+t.classNames.horizontalBars:""));var o=this.svg.elem("g").addClass(t.classNames.gridGroup),s=this.svg.elem("g"),a=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==e.normalized.series.length){var l=i.serialMap(e.normalized.series,function(){return Array.prototype.slice.call(arguments).map(function(t){return t}).reduce(function(t,e){return{x:t.x+(e&&e.x)||0,y:t.y+(e&&e.y)||0}},{x:0,y:0})});r=i.getHighLow([l],t,t.horizontalBars?"x":"y")}else r=i.getHighLow(e.normalized.series,t,t.horizontalBars?"x":"y");r.high=+t.high||(0===t.high?0:r.high),r.low=+t.low||(0===t.low?0:r.low);var c,h,d,u,p,f=i.createChartRect(this.svg,t,n.padding);h=t.distributeSeries&&t.stackBars?e.normalized.labels.slice(0,1):e.normalized.labels,t.horizontalBars?(c=u=void 0===t.axisX.type?new i.AutoScaleAxis(i.Axis.units.x,e.normalized.series,f,i.extend({},t.axisX,{highLow:r,referenceValue:0})):t.axisX.type.call(i,i.Axis.units.x,e.normalized.series,f,i.extend({},t.axisX,{highLow:r,referenceValue:0})),d=p=void 0===t.axisY.type?new i.StepAxis(i.Axis.units.y,e.normalized.series,f,{ticks:h}):t.axisY.type.call(i,i.Axis.units.y,e.normalized.series,f,t.axisY)):(d=u=void 0===t.axisX.type?new i.StepAxis(i.Axis.units.x,e.normalized.series,f,{ticks:h}):t.axisX.type.call(i,i.Axis.units.x,e.normalized.series,f,t.axisX),c=p=void 0===t.axisY.type?new i.AutoScaleAxis(i.Axis.units.y,e.normalized.series,f,i.extend({},t.axisY,{highLow:r,referenceValue:0})):t.axisY.type.call(i,i.Axis.units.y,e.normalized.series,f,i.extend({},t.axisY,{highLow:r,referenceValue:0})));var m=t.horizontalBars?f.x1+c.projectValue(0):f.y1-c.projectValue(0),g=[];d.createGridAndLabels(o,a,this.supportsForeignObject,t,this.eventEmitter),c.createGridAndLabels(o,a,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&i.createGridBackground(o,f,t.classNames.gridBackground,this.eventEmitter),e.raw.series.forEach(function(n,r){var o,a,l=r-(e.raw.series.length-1)/2;o=t.distributeSeries&&!t.stackBars?d.axisLength/e.normalized.series.length/2:t.distributeSeries&&t.stackBars?d.axisLength/2:d.axisLength/e.normalized.series[r].length/2,(a=s.elem("g")).attr({"ct:series-name":n.name,"ct:meta":i.serialize(n.meta)}),a.addClass([t.classNames.series,n.className||t.classNames.series+"-"+i.alphaNumerate(r)].join(" ")),e.normalized.series[r].forEach(function(s,h){var v,y,b,_;if(_=t.distributeSeries&&!t.stackBars?r:t.distributeSeries&&t.stackBars?0:h,v=t.horizontalBars?{x:f.x1+c.projectValue(s&&s.x?s.x:0,h,e.normalized.series[r]),y:f.y1-d.projectValue(s&&s.y?s.y:0,_,e.normalized.series[r])}:{x:f.x1+d.projectValue(s&&s.x?s.x:0,_,e.normalized.series[r]),y:f.y1-c.projectValue(s&&s.y?s.y:0,h,e.normalized.series[r])},d instanceof i.StepAxis&&(d.options.stretch||(v[d.units.pos]+=o*(t.horizontalBars?-1:1)),v[d.units.pos]+=t.stackBars||t.distributeSeries?0:l*t.seriesBarDistance*(t.horizontalBars?-1:1)),b=g[h]||m,g[h]=b-(m-v[d.counterUnits.pos]),void 0!==s){var x={};x[d.units.pos+"1"]=v[d.units.pos],x[d.units.pos+"2"]=v[d.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(x[d.counterUnits.pos+"1"]=m,x[d.counterUnits.pos+"2"]=v[d.counterUnits.pos]):(x[d.counterUnits.pos+"1"]=b,x[d.counterUnits.pos+"2"]=g[h]),x.x1=Math.min(Math.max(x.x1,f.x1),f.x2),x.x2=Math.min(Math.max(x.x2,f.x1),f.x2),x.y1=Math.min(Math.max(x.y1,f.y2),f.y1),x.y2=Math.min(Math.max(x.y2,f.y2),f.y1);var w=i.getMetaData(n,h);y=a.elem("line",x,t.classNames.bar).attr({"ct:value":[s.x,s.y].filter(i.isNumeric).join(","),"ct:meta":i.serialize(w)}),this.eventEmitter.emit("draw",i.extend({type:"bar",value:s,index:h,meta:w,series:n,seriesIndex:r,axisX:u,axisY:p,chartRect:f,group:a,element:y},x))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:c.bounds,chartRect:f,axisX:u,axisY:p,svg:this.svg,options:t})}})}(window,document,t),function(t,e,i){"use strict";function n(t,e,i){var n=e.x>t.x;return n&&"explode"===i||!n&&"implode"===i?"start":n&&"implode"===i||!n&&"explode"===i?"end":"middle"}var r={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:i.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};i.Pie=i.Base.extend({constructor:function(t,e,n,o){i.Pie.super.constructor.call(this,t,e,r,i.extend({},r,n),o)},createChart:function(t){var e,o,s,a,l,c=i.normalizeData(this.data),h=[],d=t.startAngle;this.svg=i.createSvg(this.container,t.width,t.height,t.donut?t.classNames.chartDonut:t.classNames.chartPie),o=i.createChartRect(this.svg,t,r.padding),s=Math.min(o.width()/2,o.height()/2),l=t.total||c.normalized.series.reduce(function(t,e){return t+e},0);var u=i.quantity(t.donutWidth);"%"===u.unit&&(u.value*=s/100),s-=t.donut&&!t.donutSolid?u.value/2:0,a="outside"===t.labelPosition||t.donut&&!t.donutSolid?s:"center"===t.labelPosition?0:t.donutSolid?s-u.value/2:s/2,a+=t.labelOffset;var p={x:o.x1+o.width()/2,y:o.y2+o.height()/2},f=1===c.raw.series.filter(function(t){return t.hasOwnProperty("value")?0!==t.value:0!==t}).length;c.raw.series.forEach(function(t,e){h[e]=this.svg.elem("g",null,null)}.bind(this)),t.showLabel&&(e=this.svg.elem("g",null,null)),c.raw.series.forEach(function(r,o){if(0!==c.normalized.series[o]||!t.ignoreEmptyValues){h[o].attr({"ct:series-name":r.name}),h[o].addClass([t.classNames.series,r.className||t.classNames.series+"-"+i.alphaNumerate(o)].join(" "));var m=l>0?d+c.normalized.series[o]/l*360:0,g=Math.max(0,d-(0===o||f?0:.2));m-g>=359.99&&(m=g+359.99);var v,y,b,_=i.polarToCartesian(p.x,p.y,s,g),x=i.polarToCartesian(p.x,p.y,s,m),w=new i.Svg.Path(!t.donut||t.donutSolid).move(x.x,x.y).arc(s,s,0,m-d>180,0,_.x,_.y);t.donut?t.donutSolid&&(b=s-u.value,v=i.polarToCartesian(p.x,p.y,b,d-(0===o||f?0:.2)),y=i.polarToCartesian(p.x,p.y,b,m),w.line(v.x,v.y),w.arc(b,b,0,m-d>180,1,y.x,y.y)):w.line(p.x,p.y);var k=t.classNames.slicePie;t.donut&&(k=t.classNames.sliceDonut,t.donutSolid&&(k=t.classNames.sliceDonutSolid));var S=h[o].elem("path",{d:w.stringify()},k);if(S.attr({"ct:value":c.normalized.series[o],"ct:meta":i.serialize(r.meta)}),t.donut&&!t.donutSolid&&(S._node.style.strokeWidth=u.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:c.normalized.series[o],totalDataSum:l,index:o,meta:r.meta,series:r,group:h[o],element:S,path:w.clone(),center:p,radius:s,startAngle:d,endAngle:m}),t.showLabel){var C;C=1===c.raw.series.length?{x:p.x,y:p.y}:i.polarToCartesian(p.x,p.y,a,d+(m-d)/2);var D;D=c.normalized.labels&&!i.isFalseyButZero(c.normalized.labels[o])?c.normalized.labels[o]:c.normalized.series[o];var T=t.labelInterpolationFnc(D,o);if(T||0===T){var A=e.elem("text",{dx:C.x,dy:C.y,"text-anchor":n(p,C,t.labelDirection)},t.classNames.label).text(""+T);this.eventEmitter.emit("draw",{type:"label",index:o,group:e,element:A,text:""+T,x:C.x,y:C.y})}}d=m}}.bind(this)),this.eventEmitter.emit("created",{chartRect:o,svg:this.svg,options:t})},determineAnchorPosition:n})}(window,document,t),t}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[s]={exports:{}};e[s][0].call(h.exports,function(t){var i=e[s][1][t];return r(i||t)},h,h.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){function n(t){if(t){var e=/^#([a-fA-F0-9]{3})$/,i=/^#([a-fA-F0-9]{6})$/,n=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,r=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,o=/(\w+)/,s=[0,0,0],a=1,l=t.match(e);if(l){l=l[1];for(h=0;h<s.length;h++)s[h]=parseInt(l[h]+l[h],16)}else if(l=t.match(i)){l=l[1];for(h=0;h<s.length;h++)s[h]=parseInt(l.slice(2*h,2*h+2),16)}else if(l=t.match(n)){for(h=0;h<s.length;h++)s[h]=parseInt(l[h+1]);a=parseFloat(l[4])}else if(l=t.match(r)){for(h=0;h<s.length;h++)s[h]=Math.round(2.55*parseFloat(l[h+1]));a=parseFloat(l[4])}else if(l=t.match(o)){if("transparent"==l[1])return[0,0,0,0];if(!(s=d[l[1]]))return}for(var h=0;h<s.length;h++)s[h]=c(s[h],0,255);return a=a||0==a?c(a,0,1):1,s[3]=a,s}}function r(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]);return[c(parseInt(i[1]),0,360),c(parseFloat(i[2]),0,100),c(parseFloat(i[3]),0,100),c(isNaN(n)?1:n,0,1)]}}}function o(t){if(t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]);return[c(parseInt(i[1]),0,360),c(parseFloat(i[2]),0,100),c(parseFloat(i[3]),0,100),c(isNaN(n)?1:n,0,1)]}}}function s(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function a(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 l(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function c(t,e,i){return Math.min(Math.max(e,t),i)}function h(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var d=t(5);e.exports={getRgba:n,getHsla:r,getRgb:function(t){var e=n(t);return e&&e.slice(0,3)},getHsl:function(t){var e=r(t);return e&&e.slice(0,3)},getHwb:o,getAlpha:function(t){var e=n(t);return e?e[3]:(e=r(t))?e[3]:(e=o(t))?e[3]:void 0},hexString:function(t){return"#"+h(t[0])+h(t[1])+h(t[2])},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?s(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:s,percentString:function(t,e){return e<1||t[3]&&t[3]<1?a(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:a,hslString:function(t,e){return e<1||t[3]&&t[3]<1?l(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:l,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return u[t.slice(0,3)]}};var u={};for(var p in d)u[d[p]]=p},{5:5}],2:[function(t,e,i){var n=t(4),r=t(1),o=function(t){if(t instanceof o)return t;if(!(this instanceof o))return new o(t);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};var e;"string"==typeof t?(e=r.getRgba(t))?this.setValues("rgb",e):(e=r.getHsla(t))?this.setValues("hsl",e):(e=r.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))};o.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 r.hexString(this.values.rgb)},rgbString:function(){return r.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return r.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return r.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return r.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return r.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return r.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return r.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=this,n=t,r=void 0===e?.5:e,o=2*r-1,s=i.alpha()-n.alpha(),a=((o*s==-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return this.rgb(a*i.red()+l*n.red(),a*i.green()+l*n.green(),a*i.blue()+l*n.blue()).alpha(i.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new o,n=this.values,r=i.values;for(var s in n)n.hasOwnProperty(s)&&(t=n[s],"[object Array]"===(e={}.toString.call(t))?r[s]=t.slice(0):"[object Number]"===e?r[s]=t:console.error("unexpected color value:",t));return i}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.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},o.prototype.setValues=function(t,e){var i,r=this.values,o=this.spaces,s=this.maxes,a=1;if(this.valid=!0,"alpha"===t)a=e;else if(e.length)r[t]=e.slice(0,t.length),a=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)r[t][i]=e[t.charAt(i)];a=e.a}else if(void 0!==e[o[t][0]]){var l=o[t];for(i=0;i<t.length;i++)r[t][i]=e[l[i]];a=e.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===a?r.alpha:a)),"alpha"===t)return!1;var c;for(i=0;i<t.length;i++)c=Math.max(0,Math.min(s[t][i],r[t][i])),r[t][i]=Math.round(c);for(var h in o)h!==t&&(r[h]=n[t][h](r[t]));return!0},o.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)},o.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=o),e.exports=o},{1:1,4:4}],3:[function(t,e,i){function n(t){var e,i,n,r=t[0]/255,o=t[1]/255,s=t[2]/255,a=Math.min(r,o,s),l=Math.max(r,o,s),c=l-a;return l==a?e=0:r==l?e=(o-s)/c:o==l?e=2+(s-r)/c:s==l&&(e=4+(r-o)/c),(e=Math.min(60*e,360))<0&&(e+=360),n=(a+l)/2,i=l==a?0:n<=.5?c/(l+a):c/(2-l-a),[e,100*i,100*n]}function o(t){var e,i,n,r=t[0],o=t[1],s=t[2],a=Math.min(r,o,s),l=Math.max(r,o,s),c=l-a;return i=0==l?0:c/l*1e3/10,l==a?e=0:r==l?e=(o-s)/c:o==l?e=2+(s-r)/c:s==l&&(e=4+(r-o)/c),(e=Math.min(60*e,360))<0&&(e+=360),n=l/255*1e3/10,[e,i,n]}function s(t){var e=t[0],i=t[1],r=t[2];return[n(t)[0],100*(1/255*Math.min(e,Math.min(i,r))),100*(r=1-1/255*Math.max(e,Math.max(i,r)))]}function a(t){var e,i,n,r,o=t[0]/255,s=t[1]/255,a=t[2]/255;return r=Math.min(1-o,1-s,1-a),e=(1-o-r)/(1-r)||0,i=(1-s-r)/(1-r)||0,n=(1-a-r)/(1-r)||0,[100*e,100*i,100*n,100*r]}function l(t){return C[JSON.stringify(t)]}function c(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)]}function h(t){var e,i,n,r=c(t),o=r[0],s=r[1],a=r[2];return o/=95.047,s/=100,a/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,e=116*s-16,i=500*(o-s),n=200*(s-a),[e,i,n]}function d(t){var e,i,n,r,o,s=t[0]/360,a=t[1]/100,l=t[2]/100;if(0==a)return o=255*l,[o,o,o];e=2*l-(i=l<.5?l*(1+a):l+a-l*a),r=[0,0,0];for(var c=0;c<3;c++)(n=s+1/3*-(c-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,r[c]=255*o;return r}function u(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-i),a=255*n*(1-i*o),l=255*n*(1-i*(1-o)),n=255*n;switch(r){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}}function p(t){var e,i,n,o,s=t[0]/360,a=t[1]/100,l=t[2]/100,c=a+l;switch(c>1&&(a/=c,l/=c),e=Math.floor(6*s),i=1-l,n=6*s-e,0!=(1&e)&&(n=1-n),o=a+n*(i-a),e){default:case 6:case 0:r=i,g=o,b=a;break;case 1:r=o,g=i,b=a;break;case 2:r=a,g=i,b=o;break;case 3:r=a,g=o,b=i;break;case 4:r=o,g=a,b=i;break;case 5:r=i,g=a,b=o}return[255*r,255*g,255*b]}function f(t){var e,i,n,r=t[0]/100,o=t[1]/100,s=t[2]/100,a=t[3]/100;return e=1-Math.min(1,r*(1-a)+a),i=1-Math.min(1,o*(1-a)+a),n=1-Math.min(1,s*(1-a)+a),[255*e,255*i,255*n]}function m(t){var e,i,n,r=t[0]/100,o=t[1]/100,s=t[2]/100;return e=3.2406*r+-1.5372*o+-.4986*s,i=-.9689*r+1.8758*o+.0415*s,n=.0557*r+-.204*o+1.057*s,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),[255*e,255*i,255*n]}function v(t){var e,i,n,r=t[0],o=t[1],s=t[2];return r/=95.047,o/=100,s/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,e=116*o-16,i=500*(r-o),n=200*(o-s),[e,i,n]}function y(t){var e,i,n,r,o=t[0],s=t[1],a=t[2];return o<=8?r=(i=100*o/903.3)/100*7.787+16/116:(i=100*Math.pow((o+16)/116,3),r=Math.pow(i/100,1/3)),e=e/95.047<=.008856?e=95.047*(s/500+r-16/116)/7.787:95.047*Math.pow(s/500+r,3),n=n/108.883<=.008859?n=108.883*(r-a/200-16/116)/7.787:108.883*Math.pow(r-a/200,3),[e,i,n]}function _(t){var e,i,n,r=t[0],o=t[1],s=t[2];return e=Math.atan2(s,o),(i=360*e/2/Math.PI)<0&&(i+=360),n=Math.sqrt(o*o+s*s),[r,n,i]}function x(t){return m(y(t))}function w(t){var e,i,n,r=t[0],o=t[1];return n=t[2]/360*2*Math.PI,e=o*Math.cos(n),i=o*Math.sin(n),[r,e,i]}function k(t){return S[t]}e.exports={rgb2hsl:n,rgb2hsv:o,rgb2hwb:s,rgb2cmyk:a,rgb2keyword:l,rgb2xyz:c,rgb2lab:h,rgb2lch:function(t){return _(h(t))},hsl2rgb:d,hsl2hsv:function(t){var e,i,n=t[0],r=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,r*=o<=1?o:2-o,i=(o+r)/2,e=2*r/(o+r),[n,100*e,100*i])},hsl2hwb:function(t){return s(d(t))},hsl2cmyk:function(t){return a(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:u,hsv2hsl:function(t){var e,i,n=t[0],r=t[1]/100,o=t[2]/100;return i=(2-r)*o,e=r*o,e/=i<=1?i:2-i,e=e||0,i/=2,[n,100*e,100*i]},hsv2hwb:function(t){return s(u(t))},hsv2cmyk:function(t){return a(u(t))},hsv2keyword:function(t){return l(u(t))},hwb2rgb:p,hwb2hsl:function(t){return n(p(t))},hwb2hsv:function(t){return o(p(t))},hwb2cmyk:function(t){return a(p(t))},hwb2keyword:function(t){return l(p(t))},cmyk2rgb:f,cmyk2hsl:function(t){return n(f(t))},cmyk2hsv:function(t){return o(f(t))},cmyk2hwb:function(t){return s(f(t))},cmyk2keyword:function(t){return l(f(t))},keyword2rgb:k,keyword2hsl:function(t){return n(k(t))},keyword2hsv:function(t){return o(k(t))},keyword2hwb:function(t){return s(k(t))},keyword2cmyk:function(t){return a(k(t))},keyword2lab:function(t){return h(k(t))},keyword2xyz:function(t){return c(k(t))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(t){return _(v(t))},lab2xyz:y,lab2rgb:x,lab2lch:_,lch2lab:w,lch2xyz:function(t){return y(w(t))},lch2rgb:function(t){return x(w(t))}};var S={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]},C={};for(var D in S)C[JSON.stringify(S[D])]=D},{}],4:[function(t,e,i){var n=t(3),r=function(){return new c};for(var o in n){r[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),n[t](e)}}(o);var s=/(\w+)2(\w+)/.exec(o),a=s[1],l=s[2];(r[a]=r[a]||{})[l]=r[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=n[t](e);if("string"==typeof i||void 0===i)return i;for(var r=0;r<i.length;r++)i[r]=Math.round(i[r]);return i}}(o)}var c=function(){this.convs={}};c.prototype.routeSpace=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))},c.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},c.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=r[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){c.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=r},{3:3}],5:[function(t,e,i){e.exports={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]}},{}],6:[function(t,e,i){!function(t,n){"object"==typeof i&&void 0!==e?e.exports=n():t.moment=n()}(this,function(){"use strict";function i(){return _e.apply(null,arguments)}function n(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t){var e;for(e in t)return!1;return!0}function s(t){return void 0===t}function a(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function c(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function d(t,e){for(var i in e)h(e,i)&&(t[i]=e[i]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function u(t,e,i,n){return jt(t,e,i,n,!0).utc()}function p(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function f(t){return null==t._pf&&(t._pf=p()),t._pf}function m(t){if(null==t._isValid){var e=f(t),i=we.call(e.parsedDateParts,function(t){return null!=t}),n=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(n=n&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return n;t._isValid=n}return t._isValid}function g(t){var e=u(NaN);return null!=t?d(f(e),t):f(e).userInvalidated=!0,e}function v(t,e){var i,n,r;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=f(e)),s(e._locale)||(t._locale=e._locale),ke.length>0)for(i=0;i<ke.length;i++)s(r=e[n=ke[i]])||(t[n]=r);return t}function y(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===Se&&(Se=!0,i.updateOffset(this),Se=!1)}function b(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function _(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function x(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=_(e)),i}function w(t,e,i){var n,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(n=0;n<r;n++)(i&&t[n]!==e[n]||!i&&x(t[n])!==x(e[n]))&&s++;return s+o}function k(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var n=!0;return d(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,o=[],s=0;s<arguments.length;s++){if(r="","object"==typeof arguments[s]){r+="\n["+s+"] ";for(var a in arguments[0])r+=a+": "+arguments[0][a]+", ";r=r.slice(0,-2)}else r=arguments[s];o.push(r)}k(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)},e)}function C(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),Ce[t]||(k(e),Ce[t]=!0)}function D(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function T(t,e){var i,n=d({},t);for(i in e)h(e,i)&&(r(t[i])&&r(e[i])?(n[i]={},d(n[i],t[i]),d(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)h(t,i)&&!h(e,i)&&r(t[i])&&(n[i]=d({},n[i]));return n}function A(t){null!=t&&this.set(t)}function M(t,e){var i=t.toLowerCase();Oe[i]=Oe[i+"s"]=Oe[e]=t}function E(t){return"string"==typeof t?Oe[t]||Oe[t.toLowerCase()]:void 0}function P(t){var e,i,n={};for(i in t)h(t,i)&&(e=E(i))&&(n[e]=t[i]);return n}function I(t,e){Ne[t]=e}function O(t){var e=[];for(var i in t)e.push({unit:i,priority:Ne[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function N(t,e){return function(n){return null!=n?(L(this,t,n),i.updateOffset(this,e),this):F(this,t)}}function F(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function L(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function j(t,e,i){var n=""+Math.abs(t),r=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function R(t,e,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),t&&(Re[t]=r),e&&(Re[e[0]]=function(){return j(r.apply(this,arguments),e[1],e[2])}),i&&(Re[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function $(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function H(t){var e,i,n=t.match(Fe);for(e=0,i=n.length;e<i;e++)Re[n[e]]?n[e]=Re[n[e]]:n[e]=$(n[e]);return function(e){var r,o="";for(r=0;r<i;r++)o+=D(n[r])?n[r].call(e,t):n[r];return o}}function B(t,e){return t.isValid()?(e=z(e,t.localeData()),je[e]=je[e]||H(e),je[e](t)):t.localeData().invalidDate()}function z(t,e){var i=5;for(Le.lastIndex=0;i>=0&&Le.test(t);)t=t.replace(Le,function(t){return e.longDateFormat(t)||t}),Le.lastIndex=0,i-=1;return t}function U(t,e,i){ii[t]=D(e)?e:function(t,n){return t&&i?i:e}}function W(t,e){return h(ii,t)?ii[t](e._strict,e._locale):new RegExp(Y(t))}function Y(t){return V(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,r){return e||i||n||r}))}function V(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function q(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),a(e)&&(n=function(t,i){i[e]=x(t)}),i=0;i<t.length;i++)ni[t[i]]=n}function G(t,e){q(t,function(t,i,n,r){n._w=n._w||{},e(t,n._w,n,r)})}function K(t,e,i){null!=e&&h(ni,t)&&ni[t](e,i._a,i,t)}function X(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function Q(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=u([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(r=pi.call(this._shortMonthsParse,s))?r:null:-1!==(r=pi.call(this._longMonthsParse,s))?r:null:"MMM"===e?-1!==(r=pi.call(this._shortMonthsParse,s))?r:-1!==(r=pi.call(this._longMonthsParse,s))?r:null:-1!==(r=pi.call(this._longMonthsParse,s))?r:-1!==(r=pi.call(this._shortMonthsParse,s))?r:null}function Z(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=x(e);else if(e=t.localeData().monthsParse(e),!a(e))return t;return i=Math.min(t.date(),X(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function J(t){return null!=t?(Z(this,t),i.updateOffset(this,!0),this):F(this,"Month")}function tt(){function t(t,e){return e.length-t.length}var e,i,n=[],r=[],o=[];for(e=0;e<12;e++)i=u([2e3,e]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(n.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)n[e]=V(n[e]),r[e]=V(r[e]);for(e=0;e<24;e++)o[e]=V(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function et(t){return it(t)?366:365}function it(t){return t%4==0&&t%100!=0||t%400==0}function nt(t,e,i,n,r,o,s){var a=new Date(t,e,i,n,r,o,s);return t<100&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function rt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function ot(t,e,i){var n=7+e-i;return-((7+rt(t,0,n).getUTCDay()-e)%7)+n-1}function st(t,e,i,n,r){var o,s,a=1+7*(e-1)+(7+i-n)%7+ot(t,n,r);return a<=0?s=et(o=t-1)+a:a>et(t)?(o=t+1,s=a-et(t)):(o=t,s=a),{year:o,dayOfYear:s}}function at(t,e,i){var n,r,o=ot(t.year(),e,i),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?n=s+lt(r=t.year()-1,e,i):s>lt(t.year(),e,i)?(n=s-lt(t.year(),e,i),r=t.year()+1):(r=t.year(),n=s),{week:n,year:r}}function lt(t,e,i){var n=ot(t,e,i),r=ot(t+1,e,i);return(et(t)-n+r)/7}function ct(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function ht(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function dt(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=u([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(r=pi.call(this._weekdaysParse,s))?r:null:"ddd"===e?-1!==(r=pi.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=pi.call(this._minWeekdaysParse,s))?r:null:"dddd"===e?-1!==(r=pi.call(this._weekdaysParse,s))?r:-1!==(r=pi.call(this._shortWeekdaysParse,s))?r:-1!==(r=pi.call(this._minWeekdaysParse,s))?r:null:"ddd"===e?-1!==(r=pi.call(this._shortWeekdaysParse,s))?r:-1!==(r=pi.call(this._weekdaysParse,s))?r:-1!==(r=pi.call(this._minWeekdaysParse,s))?r:null:-1!==(r=pi.call(this._minWeekdaysParse,s))?r:-1!==(r=pi.call(this._weekdaysParse,s))?r:-1!==(r=pi.call(this._shortWeekdaysParse,s))?r:null}function ut(){function t(t,e){return e.length-t.length}var e,i,n,r,o,s=[],a=[],l=[],c=[];for(e=0;e<7;e++)i=u([2e3,1]).day(e),n=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),o=this.weekdays(i,""),s.push(n),a.push(r),l.push(o),c.push(n),c.push(r),c.push(o);for(s.sort(t),a.sort(t),l.sort(t),c.sort(t),e=0;e<7;e++)a[e]=V(a[e]),l[e]=V(l[e]),c[e]=V(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function pt(){return this.hours()%12||12}function ft(t,e){R(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function mt(t,e){return e._meridiemParse}function gt(t){return t?t.toLowerCase().replace("_","-"):t}function vt(t){for(var e,i,n,r,o=0;o<t.length;){for(e=(r=gt(t[o]).split("-")).length,i=(i=gt(t[o+1]))?i.split("-"):null;e>0;){if(n=yt(r.slice(0,e).join("-")))return n;if(i&&i.length>=e&&w(r,i,!0)>=e-1)break;e--}o++}return null}function yt(i){var n=null;if(!Pi[i]&&void 0!==e&&e&&e.exports)try{n=Ti._abbr,t("./locale/"+i),bt(n)}catch(t){}return Pi[i]}function bt(t,e){var i;return t&&(i=s(e)?xt(t):_t(t,e))&&(Ti=i),Ti._abbr}function _t(t,e){if(null!==e){var i=Ei;if(e.abbr=t,null!=Pi[t])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Pi[t]._config;else if(null!=e.parentLocale){if(null==Pi[e.parentLocale])return Ii[e.parentLocale]||(Ii[e.parentLocale]=[]),Ii[e.parentLocale].push({name:t,config:e}),null;i=Pi[e.parentLocale]._config}return Pi[t]=new A(T(i,e)),Ii[t]&&Ii[t].forEach(function(t){_t(t.name,t.config)}),bt(t),Pi[t]}return delete Pi[t],null}function xt(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ti;if(!n(t)){if(e=yt(t))return e;t=[t]}return vt(t)}function wt(t){var e,i=t._a;return i&&-2===f(t).overflow&&(e=i[oi]<0||i[oi]>11?oi:i[si]<1||i[si]>X(i[ri],i[oi])?si:i[ai]<0||i[ai]>24||24===i[ai]&&(0!==i[li]||0!==i[ci]||0!==i[hi])?ai:i[li]<0||i[li]>59?li:i[ci]<0||i[ci]>59?ci:i[hi]<0||i[hi]>999?hi:-1,f(t)._overflowDayOfYear&&(e<ri||e>si)&&(e=si),f(t)._overflowWeeks&&-1===e&&(e=di),f(t)._overflowWeekday&&-1===e&&(e=ui),f(t).overflow=e),t}function kt(t){var e,i,n,r,o,s,a=t._i,l=Oi.exec(a)||Ni.exec(a);if(l){for(f(t).iso=!0,e=0,i=Li.length;e<i;e++)if(Li[e][1].exec(l[1])){r=Li[e][0],n=!1!==Li[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=ji.length;e<i;e++)if(ji[e][1].exec(l[3])){o=(l[2]||" ")+ji[e][0];break}if(null==o)return void(t._isValid=!1)}if(!n&&null!=o)return void(t._isValid=!1);if(l[4]){if(!Fi.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=r+(o||"")+(s||""),Et(t)}else t._isValid=!1}function St(t){var e,i,n,r,o,s,a,l,c={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"};if(e=t._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),i=$i.exec(e)){if(n=i[1]?"ddd"+(5===i[1].length?", ":" "):"",r="D MMM "+(i[2].length>10?"YYYY ":"YY "),o="HH:mm"+(i[4]?":ss":""),i[1]){var h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][new Date(i[2]).getDay()];if(i[1].substr(0,3)!==h)return f(t).weekdayMismatch=!0,void(t._isValid=!1)}switch(i[5].length){case 2:a=0===l?" +0000":((l="YXWVUTSRQPONZABCDEFGHIKLM".indexOf(i[5][1].toUpperCase())-12)<0?" -":" +")+(""+l).replace(/^-?/,"0").match(/..$/)[0]+"00";break;case 4:a=c[i[5]];break;default:a=c[" GMT"]}i[5]=a,t._i=i.splice(1).join(""),s=" ZZ",t._f=n+r+o+s,Et(t),f(t).rfc2822=!0}else t._isValid=!1}function Ct(t){var e=Ri.exec(t._i);null===e?(kt(t),!1===t._isValid&&(delete t._isValid,St(t),!1===t._isValid&&(delete t._isValid,i.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Dt(t,e,i){return null!=t?t:null!=e?e:i}function Tt(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function At(t){var e,i,n,r,o=[];if(!t._d){for(n=Tt(t),t._w&&null==t._a[si]&&null==t._a[oi]&&Mt(t),null!=t._dayOfYear&&(r=Dt(t._a[ri],n[ri]),(t._dayOfYear>et(r)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),i=rt(r,0,t._dayOfYear),t._a[oi]=i.getUTCMonth(),t._a[si]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=n[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ai]&&0===t._a[li]&&0===t._a[ci]&&0===t._a[hi]&&(t._nextDay=!0,t._a[ai]=0),t._d=(t._useUTC?rt:nt).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ai]=24)}}function Mt(t){var e,i,n,r,o,s,a,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,s=4,i=Dt(e.GG,t._a[ri],at(Rt(),1,4).year),n=Dt(e.W,1),((r=Dt(e.E,1))<1||r>7)&&(l=!0);else{o=t._locale._week.dow,s=t._locale._week.doy;var c=at(Rt(),o,s);i=Dt(e.gg,t._a[ri],c.year),n=Dt(e.w,c.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}n<1||n>lt(i,o,s)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(a=st(i,n,r,o,s),t._a[ri]=a.year,t._dayOfYear=a.dayOfYear)}function Et(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],f(t).empty=!0;var e,n,r,o,s,a=""+t._i,l=a.length,c=0;for(r=z(t._f,t._locale).match(Fe)||[],e=0;e<r.length;e++)o=r[e],(n=(a.match(W(o,t))||[])[0])&&((s=a.substr(0,a.indexOf(n))).length>0&&f(t).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),c+=n.length),Re[o]?(n?f(t).empty=!1:f(t).unusedTokens.push(o),K(o,n,t)):t._strict&&!n&&f(t).unusedTokens.push(o);f(t).charsLeftOver=l-c,a.length>0&&f(t).unusedInput.push(a),t._a[ai]<=12&&!0===f(t).bigHour&&t._a[ai]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[ai]=Pt(t._locale,t._a[ai],t._meridiem),At(t),wt(t)}else St(t);else kt(t)}function Pt(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function It(t){var e,i,n,r,o;if(0===t._f.length)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<t._f.length;r++)o=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Et(e),m(e)&&(o+=f(e).charsLeftOver,o+=10*f(e).unusedTokens.length,f(e).score=o,(null==n||o<n)&&(n=o,i=e));d(t,i||e)}function Ot(t){if(!t._d){var e=P(t._i);t._a=c([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),At(t)}}function Nt(t){var e=new y(wt(Ft(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Ft(t){var e=t._i,i=t._f;return t._locale=t._locale||xt(t._l),null===e||void 0===i&&""===e?g({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),b(e)?new y(wt(e)):(l(e)?t._d=e:n(i)?It(t):i?Et(t):Lt(t),m(t)||(t._d=null),t))}function Lt(t){var e=t._i;s(e)?t._d=new Date(i.now()):l(e)?t._d=new Date(e.valueOf()):"string"==typeof e?Ct(t):n(e)?(t._a=c(e.slice(0),function(t){return parseInt(t,10)}),At(t)):r(e)?Ot(t):a(e)?t._d=new Date(e):i.createFromInputFallback(t)}function jt(t,e,i,s,a){var l={};return!0!==i&&!1!==i||(s=i,i=void 0),(r(t)&&o(t)||n(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=i,l._i=t,l._f=e,l._strict=s,Nt(l)}function Rt(t,e,i,n){return jt(t,e,i,n,!1)}function $t(t,e){var i,r;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return Rt();for(i=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](i)||(i=e[r]);return i}function Ht(t){for(var e in t)if(-1===zi.indexOf(e)||null!=t[e]&&isNaN(t[e]))return!1;for(var i=!1,n=0;n<zi.length;++n)if(t[zi[n]]){if(i)return!1;parseFloat(t[zi[n]])!==x(t[zi[n]])&&(i=!0)}return!0}function Bt(t){var e=P(t),i=e.year||0,n=e.quarter||0,r=e.month||0,o=e.week||0,s=e.day||0,a=e.hour||0,l=e.minute||0,c=e.second||0,h=e.millisecond||0;this._isValid=Ht(e),this._milliseconds=+h+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*n+12*i,this._data={},this._locale=xt(),this._bubble()}function zt(t){return t instanceof Bt}function Ut(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Wt(t,e){R(t,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+j(~~(t/60),2)+e+j(~~t%60,2)})}function Yt(t,e){var i=(e||"").match(t);if(null===i)return null;var n=((i[i.length-1]||[])+"").match(Ui)||["-",0,0],r=60*n[1]+x(n[2]);return 0===r?0:"+"===n[0]?r:-r}function Vt(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(b(t)||l(t)?t.valueOf():Rt(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Rt(t).local()}function qt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Gt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Kt(t,e){var i,n,r,o=t,s=null;return zt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:a(t)?(o={},e?o[e]=t:o.milliseconds=t):(s=Wi.exec(t))?(i="-"===s[1]?-1:1,o={y:0,d:x(s[si])*i,h:x(s[ai])*i,m:x(s[li])*i,s:x(s[ci])*i,ms:x(Ut(1e3*s[hi]))*i}):(s=Yi.exec(t))?(i="-"===s[1]?-1:1,o={y:Xt(s[2],i),M:Xt(s[3],i),w:Xt(s[4],i),d:Xt(s[5],i),h:Xt(s[6],i),m:Xt(s[7],i),s:Xt(s[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=Zt(Rt(o.from),Rt(o.to)),(o={}).ms=r.milliseconds,o.M=r.months),n=new Bt(o),zt(t)&&h(t,"_locale")&&(n._locale=t._locale),n}function Xt(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Qt(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Zt(t,e){var i;return t.isValid()&&e.isValid()?(e=Vt(e,t),t.isBefore(e)?i=Qt(t,e):((i=Qt(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Jt(t,e){return function(i,n){var r,o;return null===n||isNaN(+n)||(C(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),i="string"==typeof i?+i:i,r=Kt(i,n),te(this,r,t),this}}function te(t,e,n,r){var o=e._milliseconds,s=Ut(e._days),a=Ut(e._months);t.isValid()&&(r=null==r||r,o&&t._d.setTime(t._d.valueOf()+o*n),s&&L(t,"Date",F(t,"Date")+s*n),a&&Z(t,F(t,"Month")+a*n),r&&i.updateOffset(t,s||a))}function ee(t,e){var i,n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return i=e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r),-(n+i)||0}function ie(t){var e;return void 0===t?this._locale._abbr:(null!=(e=xt(t))&&(this._locale=e),this)}function ne(){return this._locale}function re(t,e){R(0,[t,t.length],0,e)}function oe(t,e,i,n,r){var o;return null==t?at(this,n,r).year:(o=lt(t,n,r),e>o&&(e=o),se.call(this,t,e,i,n,r))}function se(t,e,i,n,r){var o=st(t,e,i,n,r),s=rt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function ae(t){return t}function le(t,e,i,n){var r=xt(),o=u().set(n,e);return r[i](o,t)}function ce(t,e,i){if(a(t)&&(e=t,t=void 0),t=t||"",null!=e)return le(t,e,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=le(t,n,i,"month");return r}function he(t,e,i,n){"boolean"==typeof t?(a(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,a(e)&&(i=e,e=void 0),e=e||"");var r=xt(),o=t?r._week.dow:0;if(null!=i)return le(e,(i+o)%7,n,"day");var s,l=[];for(s=0;s<7;s++)l[s]=le(e,(s+o)%7,n,"day");return l}function de(t,e,i,n){var r=Kt(e,i);return t._milliseconds+=n*r._milliseconds,t._days+=n*r._days,t._months+=n*r._months,t._bubble()}function ue(t){return t<0?Math.floor(t):Math.ceil(t)}function pe(t){return 4800*t/146097}function fe(t){return 146097*t/4800}function me(t){return function(){return this.as(t)}}function ge(t){return function(){return this.isValid()?this._data[t]:NaN}}function ve(t,e,i,n,r){return r.relativeTime(e||1,!!i,t,n)}function ye(t,e,i){var n=Kt(t).abs(),r=bn(n.as("s")),o=bn(n.as("m")),s=bn(n.as("h")),a=bn(n.as("d")),l=bn(n.as("M")),c=bn(n.as("y")),h=r<=_n.ss&&["s",r]||r<_n.s&&["ss",r]||o<=1&&["m"]||o<_n.m&&["mm",o]||s<=1&&["h"]||s<_n.h&&["hh",s]||a<=1&&["d"]||a<_n.d&&["dd",a]||l<=1&&["M"]||l<_n.M&&["MM",l]||c<=1&&["y"]||["yy",c];return h[2]=e,h[3]=+t>0,h[4]=i,ve.apply(null,h)}function be(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n=xn(this._milliseconds)/1e3,r=xn(this._days),o=xn(this._months);e=_((t=_(n/60))/60),n%=60,t%=60;var s=i=_(o/12),a=o%=12,l=r,c=e,h=t,d=n,u=this.asSeconds();return u?(u<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(l?l+"D":"")+(c||h||d?"T":"")+(c?c+"H":"")+(h?h+"M":"")+(d?d+"S":""):"P0D"}var _e,xe,we=xe=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1},ke=i.momentProperties=[],Se=!1,Ce={};i.suppressDeprecationWarnings=!1,i.deprecationHandler=null;var De,Te,Ae=De=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)h(t,e)&&i.push(e);return i},Me={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ee={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Pe=/\d{1,2}/,Ie={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Oe={},Ne={},Fe=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Le=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,je={},Re={},$e=/\d/,He=/\d\d/,Be=/\d{3}/,ze=/\d{4}/,Ue=/[+-]?\d{6}/,We=/\d\d?/,Ye=/\d\d\d\d?/,Ve=/\d\d\d\d\d\d?/,qe=/\d{1,3}/,Ge=/\d{1,4}/,Ke=/[+-]?\d{1,6}/,Xe=/\d+/,Qe=/[+-]?\d+/,Ze=/Z|[+-]\d\d:?\d\d/gi,Je=/Z|[+-]\d\d(?::?\d\d)?/gi,ti=/[+-]?\d+(\.\d{1,3})?/,ei=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ii={},ni={},ri=0,oi=1,si=2,ai=3,li=4,ci=5,hi=6,di=7,ui=8,pi=Te=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};R("M",["MM",2],"Mo",function(){return this.month()+1}),R("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),R("MMMM",0,0,function(t){return this.localeData().months(this,t)}),M("month","M"),I("month",8),U("M",We),U("MM",We,He),U("MMM",function(t,e){return e.monthsShortRegex(t)}),U("MMMM",function(t,e){return e.monthsRegex(t)}),q(["M","MM"],function(t,e){e[oi]=x(t)-1}),q(["MMM","MMMM"],function(t,e,i,n){var r=i._locale.monthsParse(t,n,i._strict);null!=r?e[oi]=r:f(i).invalidMonth=t});var fi=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,mi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gi="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),vi=ei,yi=ei;R("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),M("year","y"),I("year",1),U("Y",Qe),U("YY",We,He),U("YYYY",Ge,ze),U("YYYYY",Ke,Ue),U("YYYYYY",Ke,Ue),q(["YYYYY","YYYYYY"],ri),q("YYYY",function(t,e){e[ri]=2===t.length?i.parseTwoDigitYear(t):x(t)}),q("YY",function(t,e){e[ri]=i.parseTwoDigitYear(t)}),q("Y",function(t,e){e[ri]=parseInt(t,10)}),i.parseTwoDigitYear=function(t){return x(t)+(x(t)>68?1900:2e3)};var bi=N("FullYear",!0);R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),I("week",5),I("isoWeek",5),U("w",We),U("ww",We,He),U("W",We),U("WW",We,He),G(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=x(t)});var _i={dow:0,doy:6};R("d",0,"do","day"),R("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),R("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),R("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),U("d",We),U("e",We),U("E",We),U("dd",function(t,e){return e.weekdaysMinRegex(t)}),U("ddd",function(t,e){return e.weekdaysShortRegex(t)}),U("dddd",function(t,e){return e.weekdaysRegex(t)}),G(["dd","ddd","dddd"],function(t,e,i,n){var r=i._locale.weekdaysParse(t,n,i._strict);null!=r?e.d=r:f(i).invalidWeekday=t}),G(["d","e","E"],function(t,e,i,n){e[n]=x(t)});var xi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),wi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ki="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Si=ei,Ci=ei,Di=ei;R("H",["HH",2],0,"hour"),R("h",["hh",2],0,pt),R("k",["kk",2],0,function(){return this.hours()||24}),R("hmm",0,0,function(){return""+pt.apply(this)+j(this.minutes(),2)}),R("hmmss",0,0,function(){return""+pt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+j(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)}),ft("a",!0),ft("A",!1),M("hour","h"),I("hour",13),U("a",mt),U("A",mt),U("H",We),U("h",We),U("k",We),U("HH",We,He),U("hh",We,He),U("kk",We,He),U("hmm",Ye),U("hmmss",Ve),U("Hmm",Ye),U("Hmmss",Ve),q(["H","HH"],ai),q(["k","kk"],function(t,e,i){var n=x(t);e[ai]=24===n?0:n}),q(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),q(["h","hh"],function(t,e,i){e[ai]=x(t),f(i).bigHour=!0}),q("hmm",function(t,e,i){var n=t.length-2;e[ai]=x(t.substr(0,n)),e[li]=x(t.substr(n)),f(i).bigHour=!0}),q("hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[ai]=x(t.substr(0,n)),e[li]=x(t.substr(n,2)),e[ci]=x(t.substr(r)),f(i).bigHour=!0}),q("Hmm",function(t,e,i){var n=t.length-2;e[ai]=x(t.substr(0,n)),e[li]=x(t.substr(n))}),q("Hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[ai]=x(t.substr(0,n)),e[li]=x(t.substr(n,2)),e[ci]=x(t.substr(r))});var Ti,Ai=/[ap]\.?m?\.?/i,Mi=N("Hours",!0),Ei={calendar:Me,longDateFormat:Ee,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:Pe,relativeTime:Ie,months:mi,monthsShort:gi,week:_i,weekdays:xi,weekdaysMin:ki,weekdaysShort:wi,meridiemParse:Ai},Pi={},Ii={},Oi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ni=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fi=/Z|[+-]\d\d(?::?\d\d)?/,Li=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ji=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ri=/^\/?Date\((\-?\d+)/i,$i=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;i.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){};var Hi=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Rt.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()}),Bi=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Rt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:g()}),zi=["year","quarter","month","week","day","hour","minute","second","millisecond"];Wt("Z",":"),Wt("ZZ",""),U("Z",Je),U("ZZ",Je),q(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Yt(Je,t)});var Ui=/([\+\-]|\d\d)/gi;i.updateOffset=function(){};var Wi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Yi=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Kt.fn=Bt.prototype,Kt.invalid=function(){return Kt(NaN)};var Vi=Jt(1,"add"),qi=Jt(-1,"subtract");i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Gi=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100}),re("gggg","weekYear"),re("ggggg","weekYear"),re("GGGG","isoWeekYear"),re("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),U("G",Qe),U("g",Qe),U("GG",We,He),U("gg",We,He),U("GGGG",Ge,ze),U("gggg",Ge,ze),U("GGGGG",Ke,Ue),U("ggggg",Ke,Ue),G(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=x(t)}),G(["gg","GG"],function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)}),R("Q",0,"Qo","quarter"),M("quarter","Q"),I("quarter",7),U("Q",$e),q("Q",function(t,e){e[oi]=3*(x(t)-1)}),R("D",["DD",2],"Do","date"),M("date","D"),I("date",9),U("D",We),U("DD",We,He),U("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),q(["D","DD"],si),q("Do",function(t,e){e[si]=x(t.match(We)[0],10)});var Ki=N("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),I("dayOfYear",4),U("DDD",qe),U("DDDD",Be),q(["DDD","DDDD"],function(t,e,i){i._dayOfYear=x(t)}),R("m",["mm",2],0,"minute"),M("minute","m"),I("minute",14),U("m",We),U("mm",We,He),q(["m","mm"],li);var Xi=N("Minutes",!1);R("s",["ss",2],0,"second"),M("second","s"),I("second",15),U("s",We),U("ss",We,He),q(["s","ss"],ci);var Qi=N("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return 10*this.millisecond()}),R(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),R(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),R(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),R(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),R(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),M("millisecond","ms"),I("millisecond",16),U("S",qe,$e),U("SS",qe,He),U("SSS",qe,Be);var Zi;for(Zi="SSSS";Zi.length<=9;Zi+="S")U(Zi,Xe);for(Zi="S";Zi.length<=9;Zi+="S")q(Zi,function(t,e){e[hi]=x(1e3*("0."+t))});var Ji=N("Milliseconds",!1);R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var tn=y.prototype;tn.add=Vi,tn.calendar=function(t,e){var n=t||Rt(),r=Vt(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",s=e&&(D(e[o])?e[o].call(this,n):e[o]);return this.format(s||this.localeData().calendar(o,this,Rt(n)))},tn.clone=function(){return new y(this)},tn.diff=function(t,e,i){var n,r,o,s;return this.isValid()&&(n=Vt(t,this)).isValid()?(r=6e4*(n.utcOffset()-this.utcOffset()),"year"===(e=E(e))||"month"===e||"quarter"===e?(s=ee(this,n),"quarter"===e?s/=3:"year"===e&&(s/=12)):(o=this-n,s="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-r)/864e5:"week"===e?(o-r)/6048e5:o),i?s:_(s)):NaN},tn.endOf=function(t){return void 0===(t=E(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},tn.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=B(this,t);return this.localeData().postformat(e)},tn.from=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||Rt(t).isValid())?Kt({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},tn.fromNow=function(t){return this.from(Rt(),t)},tn.to=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||Rt(t).isValid())?Kt({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},tn.toNow=function(t){return this.to(Rt(),t)},tn.get=function(t){return t=E(t),D(this[t])?this[t]():this},tn.invalidAt=function(){return f(this).overflow},tn.isAfter=function(t,e){var i=b(t)?t:Rt(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=E(s(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},tn.isBefore=function(t,e){var i=b(t)?t:Rt(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=E(s(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},tn.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},tn.isSame=function(t,e){var i,n=b(t)?t:Rt(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=E(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},tn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},tn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},tn.isValid=function(){return m(this)},tn.lang=Gi,tn.locale=ie,tn.localeData=ne,tn.max=Bi,tn.min=Hi,tn.parsingFlags=function(){return d({},f(this))},tn.set=function(t,e){if("object"==typeof t)for(var i=O(t=P(t)),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit]);else if(t=E(t),D(this[t]))return this[t](e);return this},tn.startOf=function(t){switch(t=E(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},tn.subtract=qi,tn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},tn.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},tn.toDate=function(){return new Date(this.valueOf())},tn.toISOString=function(){if(!this.isValid())return null;var t=this.clone().utc();return t.year()<0||t.year()>9999?B(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):D(Date.prototype.toISOString)?this.toDate().toISOString():B(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},tn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=e+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+r)},tn.toJSON=function(){return this.isValid()?this.toISOString():null},tn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},tn.unix=function(){return Math.floor(this.valueOf()/1e3)},tn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},tn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},tn.year=bi,tn.isLeapYear=function(){return it(this.year())},tn.weekYear=function(t){return oe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},tn.isoWeekYear=function(t){return oe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},tn.quarter=tn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},tn.month=J,tn.daysInMonth=function(){return X(this.year(),this.month())},tn.week=tn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},tn.isoWeek=tn.isoWeeks=function(t){var e=at(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},tn.weeksInYear=function(){var t=this.localeData()._week;return lt(this.year(),t.dow,t.doy)},tn.isoWeeksInYear=function(){return lt(this.year(),1,4)},tn.date=Ki,tn.day=tn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ct(t,this.localeData()),this.add(t-e,"d")):e},tn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},tn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=ht(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},tn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},tn.hour=tn.hours=Mi,tn.minute=tn.minutes=Xi,tn.second=tn.seconds=Qi,tn.millisecond=tn.milliseconds=Ji,tn.utcOffset=function(t,e,n){var r,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Yt(Je,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=qt(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==t&&(!e||this._changeInProgress?te(this,Kt(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:qt(this)},tn.utc=function(t){return this.utcOffset(0,t)},tn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(qt(this),"m")),this},tn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Yt(Ze,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},tn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Rt(t).utcOffset():0,(this.utcOffset()-t)%60==0)},tn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},tn.isLocal=function(){return!!this.isValid()&&!this._isUTC},tn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},tn.isUtc=Gt,tn.isUTC=Gt,tn.zoneAbbr=function(){return this._isUTC?"UTC":""},tn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},tn.dates=S("dates accessor is deprecated. Use date instead.",Ki),tn.months=S("months accessor is deprecated. Use month instead",J),tn.years=S("years accessor is deprecated. Use year instead",bi),tn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),tn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=Ft(t))._a){var e=t._isUTC?u(t._a):Rt(t._a);this._isDSTShifted=this.isValid()&&w(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var en=A.prototype;en.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return D(n)?n.call(e,i):n},en.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},en.invalidDate=function(){return this._invalidDate},en.ordinal=function(t){return this._ordinal.replace("%d",t)},en.preparse=ae,en.postformat=ae,en.relativeTime=function(t,e,i,n){var r=this._relativeTime[i];return D(r)?r(t,e,i,n):r.replace(/%d/i,t)},en.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return D(i)?i(e):i.replace(/%s/i,e)},en.set=function(t){var e,i;for(i in t)D(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},en.months=function(t,e){return t?n(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||fi).test(e)?"format":"standalone"][t.month()]:n(this._months)?this._months:this._months.standalone},en.monthsShort=function(t,e){return t?n(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[fi.test(e)?"format":"standalone"][t.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},en.monthsParse=function(t,e,i){var n,r,o;if(this._monthsParseExact)return Q.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=u([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},en.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||tt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=yi),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},en.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||tt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=vi),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},en.week=function(t){return at(t,this._week.dow,this._week.doy).week},en.firstDayOfYear=function(){return this._week.doy},en.firstDayOfWeek=function(){return this._week.dow},en.weekdays=function(t,e){return t?n(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone},en.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},en.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},en.weekdaysParse=function(t,e,i){var n,r,o;if(this._weekdaysParseExact)return dt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=u([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},en.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||ut.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Si),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},en.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||ut.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ci),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},en.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||ut.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Di),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},en.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},en.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},bt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===x(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",bt),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",xt);var nn=Math.abs,rn=me("ms"),on=me("s"),sn=me("m"),an=me("h"),ln=me("d"),cn=me("w"),hn=me("M"),dn=me("y"),un=ge("milliseconds"),pn=ge("seconds"),fn=ge("minutes"),mn=ge("hours"),gn=ge("days"),vn=ge("months"),yn=ge("years"),bn=Math.round,_n={ss:44,s:45,m:45,h:22,d:26,M:11},xn=Math.abs,wn=Bt.prototype;return wn.isValid=function(){return this._isValid},wn.abs=function(){var t=this._data;return this._milliseconds=nn(this._milliseconds),this._days=nn(this._days),this._months=nn(this._months),t.milliseconds=nn(t.milliseconds),t.seconds=nn(t.seconds),t.minutes=nn(t.minutes),t.hours=nn(t.hours),t.months=nn(t.months),t.years=nn(t.years),this},wn.add=function(t,e){return de(this,t,e,1)},wn.subtract=function(t,e){return de(this,t,e,-1)},wn.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=E(t))||"year"===t)return e=this._days+n/864e5,i=this._months+pe(e),"month"===t?i:i/12;switch(e=this._days+Math.round(fe(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},wn.asMilliseconds=rn,wn.asSeconds=on,wn.asMinutes=sn,wn.asHours=an,wn.asDays=ln,wn.asWeeks=cn,wn.asMonths=hn,wn.asYears=dn,wn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},wn._bubble=function(){var t,e,i,n,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*ue(fe(a)+s),s=0,a=0),l.milliseconds=o%1e3,t=_(o/1e3),l.seconds=t%60,e=_(t/60),l.minutes=e%60,i=_(e/60),l.hours=i%24,s+=_(i/24),r=_(pe(s)),a+=r,s-=ue(fe(r)),n=_(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},wn.get=function(t){return t=E(t),this.isValid()?this[t+"s"]():NaN},wn.milliseconds=un,wn.seconds=pn,wn.minutes=fn,wn.hours=mn,wn.days=gn,wn.weeks=function(){return _(this.days()/7)},wn.months=vn,wn.years=yn,wn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=ye(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)},wn.toISOString=be,wn.toString=be,wn.toJSON=be,wn.locale=ie,wn.localeData=ne,wn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",be),wn.lang=Gi,R("X",0,0,"unix"),R("x",0,0,"valueOf"),U("x",Qe),U("X",ti),q("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),q("x",function(t,e,i){i._d=new Date(x(t))}),i.version="2.18.1",function(t){_e=t}(Rt),i.fn=tn,i.min=function(){return $t("isBefore",[].slice.call(arguments,0))},i.max=function(){return $t("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=u,i.unix=function(t){return Rt(1e3*t)},i.months=function(t,e){return ce(t,e,"months")},i.isDate=l,i.locale=bt,i.invalid=g,i.duration=Kt,i.isMoment=b,i.weekdays=function(t,e,i){return he(t,e,i,"weekdays")},i.parseZone=function(){return Rt.apply(null,arguments).parseZone()},i.localeData=xt,i.isDuration=zt,i.monthsShort=function(t,e){return ce(t,e,"monthsShort")},i.weekdaysMin=function(t,e,i){return he(t,e,i,"weekdaysMin")},i.defineLocale=_t,i.updateLocale=function(t,e){if(null!=e){var i,n=Ei;null!=Pi[t]&&(n=Pi[t]._config),(i=new A(e=T(n,e))).parentLocale=Pi[t],Pi[t]=i,bt(t)}else null!=Pi[t]&&(null!=Pi[t].parentLocale?Pi[t]=Pi[t].parentLocale:null!=Pi[t]&&delete Pi[t]);return Pi[t]},i.locales=function(){return Ae(Pi)},i.weekdaysShort=function(t,e,i){return he(t,e,i,"weekdaysShort")},i.normalizeUnits=E,i.relativeTimeRounding=function(t){return void 0===t?bn:"function"==typeof t&&(bn=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==_n[t]&&(void 0===e?_n[t]:(_n[t]=e,"s"===t&&(_n.ss=e-1),!0))},i.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},i.prototype=tn,i})},{}],7:[function(t,e,i){var n=t(28)();t(26)(n),t(40)(n),t(22)(n),t(25)(n),t(30)(n),t(21)(n),t(23)(n),t(24)(n),t(29)(n),t(32)(n),t(33)(n),t(31)(n),t(27)(n),t(34)(n),t(35)(n),t(36)(n),t(37)(n),t(38)(n),t(46)(n),t(44)(n),t(45)(n),t(47)(n),t(48)(n),t(49)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var r=[];r.push(t(41)(n),t(42)(n),t(43)(n)),n.plugins.register(r),e.exports=n,"undefined"!=typeof window&&(window.Chart=n)},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,37:37,38:38,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.type="radar",new t(e,i)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){var e={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}};t.defaults.scatter=e,t.controllers.scatter=t.controllers.line,t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}},t.controllers.bar=t.DatasetController.extend({dataElementType:t.elements.Rectangle,initialize:function(){var e,i=this;t.DatasetController.prototype.initialize.apply(i,arguments),(e=i.getMeta()).stack=i.getDataset().stack,e.bar=!0},update:function(t){var e,i,n=this,r=n.getMeta().data;for(n._ruler=n.getRuler(),e=0,i=r.length;e<i;++e)n.updateElement(r[e],e,t)},updateElement:function(t,i,n){var r=this,o=r.chart,s=r.getMeta(),a=r.getDataset(),l=t.custom||{},c=o.options.elements.rectangle;t._xScale=r.getScaleForId(s.xAxisID),t._yScale=r.getScaleForId(s.yAxisID),t._datasetIndex=r.index,t._index=i,t._model={datasetLabel:a.label,label:o.data.labels[i],borderSkipped:l.borderSkipped?l.borderSkipped:c.borderSkipped,backgroundColor:l.backgroundColor?l.backgroundColor:e.getValueAtIndexOrDefault(a.backgroundColor,i,c.backgroundColor),borderColor:l.borderColor?l.borderColor:e.getValueAtIndexOrDefault(a.borderColor,i,c.borderColor),borderWidth:l.borderWidth?l.borderWidth:e.getValueAtIndexOrDefault(a.borderWidth,i,c.borderWidth)},r.updateElementGeometry(t,i,n),t.pivot()},updateElementGeometry:function(t,e,i){var n=this,r=t._model,o=n.getValueScale(),s=o.getBasePixel(),a=o.isHorizontal(),l=n._ruler||n.getRuler(),c=n.calculateBarValuePixels(n.index,e),h=n.calculateBarIndexPixels(n.index,e,l);r.horizontal=a,r.base=i?s:c.base,r.x=a?i?s:c.head:h.center,r.y=a?h.center:i?s:c.head,r.height=a?h.size:void 0,r.width=a?void 0:h.size},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())},getStackCount:function(t){var e,i,n=this,r=n.chart,o=n.getIndexScale().options.stacked,s=void 0===t?r.data.datasets.length:t+1,a=[];for(e=0;e<s;++e)(i=r.getDatasetMeta(e)).bar&&r.isDatasetVisible(e)&&(!1===o||!0===o&&-1===a.indexOf(i.stack)||void 0===o&&(void 0===i.stack||-1===a.indexOf(i.stack)))&&a.push(i.stack);return a.length},getStackIndex:function(t){return this.getStackCount(t)-1},getRuler:function(){var t=this,i=t.getIndexScale(),n=i.options,r=t.getStackCount(),o=(i.isHorizontal()?i.width:i.height)/i.ticks.length,s=o*n.categoryPercentage,a=s/r,l=a*n.barPercentage;return l=Math.min(e.getValueOrDefault(n.barThickness,l),e.getValueOrDefault(n.maxBarThickness,1/0)),{stackCount:r,tickSize:o,categorySize:s,categorySpacing:o-s,fullBarSize:a,barSize:l,barSpacing:a-l,scale:i}},calculateBarValuePixels:function(t,e){var i,n,r,o,s,a,l=this,c=l.chart,h=l.getMeta(),d=l.getValueScale(),u=c.data.datasets,p=Number(u[t].data[e]),f=d.options.stacked,m=h.stack,g=0;if(f||void 0===f&&void 0!==m)for(i=0;i<t;++i)(n=c.getDatasetMeta(i)).bar&&n.stack===m&&n.controller.getValueScaleId()===d.id&&c.isDatasetVisible(i)&&(r=Number(u[i].data[e]),(p<0&&r<0||p>=0&&r>0)&&(g+=r));return o=d.getPixelForValue(g),s=d.getPixelForValue(g+p),a=(s-o)/2,{size:a,base:o,head:s,center:s+a/2}},calculateBarIndexPixels:function(t,e,i){var n=this,r=i.scale,o=n.chart.isCombo,s=n.getStackIndex(t),a=r.getPixelForValue(null,e,t,o),l=i.barSize;return a-=o?i.tickSize/2:0,a+=i.fullBarSize*s,a+=i.categorySpacing/2,a+=i.barSpacing/2,{size:l,base:a,head:a+l,center:a+l/2}},draw:function(){var t,i=this,n=i.chart,r=i.getMeta().data,o=i.getDataset(),s=r.length,a=0;for(e.canvas.clipArea(n.ctx,n.chartArea);a<s;++a)null===(t=o.data[a])||void 0===t||isNaN(t)||r[a].draw();e.canvas.unclipArea(n.ctx)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},o=t._model;o.backgroundColor=r.hoverBackgroundColor?r.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,n,e.getHoverColor(o.backgroundColor)),o.borderColor=r.hoverBorderColor?r.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,n,e.getHoverColor(o.borderColor)),o.borderWidth=r.hoverBorderWidth?r.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,n,o.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},o=t._model,s=this.chart.options.elements.rectangle;o.backgroundColor=r.backgroundColor?r.backgroundColor:e.getValueAtIndexOrDefault(i.backgroundColor,n,s.backgroundColor),o.borderColor=r.borderColor?r.borderColor:e.getValueAtIndexOrDefault(i.borderColor,n,s.borderColor),o.borderWidth=r.borderWidth?r.borderWidth:e.getValueAtIndexOrDefault(i.borderWidth,n,s.borderWidth)}}),t.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}}}},t.controllers.horizontalBar=t.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{}],16:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.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+")"}}}},t.controllers.bubble=t.DatasetController.extend({dataElementType:t.elements.Point,update:function(t){var i=this,n=i.getMeta().data;e.each(n,function(e,n){i.updateElement(e,n,t)})},updateElement:function(i,n,r){var o=this,s=o.getMeta(),a=o.getScaleForId(s.xAxisID),l=o.getScaleForId(s.yAxisID),c=i.custom||{},h=o.getDataset(),d=h.data[n],u=o.chart.options.elements.point,p=o.index;e.extend(i,{_xScale:a,_yScale:l,_datasetIndex:p,_index:n,_model:{x:r?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof d?d:NaN,n,p,o.chart.isCombo),y:r?l.getBasePixel():l.getPixelForValue(d,n,p),radius:r?0:c.radius?c.radius:o.getRadius(d),hitRadius:c.hitRadius?c.hitRadius:e.getValueAtIndexOrDefault(h.hitRadius,n,u.hitRadius)}}),t.DatasetController.prototype.removeHoverStyle.call(o,i,u);var f=i._model;f.skip=c.skip?c.skip:isNaN(f.x)||isNaN(f.y),i.pivot()},getRadius:function(t){return t.r||this.chart.options.elements.point.radius},setHoverStyle:function(i){var n=this;t.DatasetController.prototype.setHoverStyle.call(n,i);var r=n.chart.data.datasets[i._datasetIndex],o=i._index,s=i.custom||{};i._model.radius=s.hoverRadius?s.hoverRadius:e.getValueAtIndexOrDefault(r.hoverRadius,o,n.chart.options.elements.point.hoverRadius)+n.getRadius(r.data[o])},removeHoverStyle:function(e){var i=this;t.DatasetController.prototype.removeHoverStyle.call(i,e,i.chart.options.elements.point);var n=i.chart.data.datasets[e._datasetIndex].data[e._index],r=e.custom||{};e._model.radius=r.radius?r.radius:i.getRadius(n)}})}},{}],17:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults;i.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,r=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),r[o]&&e.push(r[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,r){var o=t.getDatasetMeta(0),s=i.datasets[0],a=o.data[r],l=a&&a.custom||{},c=e.getValueAtIndexOrDefault,h=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:c(s.backgroundColor,r,h.backgroundColor),strokeStyle:l.borderColor?l.borderColor:c(s.borderColor,r,h.borderColor),lineWidth:l.borderWidth?l.borderWidth:c(s.borderWidth,r,h.borderWidth),hidden:isNaN(s.data[r])||o.data[r].hidden,index:r}}):[]}},onClick:function(t,e){var i,n,r,o=e.index,s=this.chart;for(i=0,n=(s.data.datasets||[]).length;i<n;++i)(r=s.getDatasetMeta(i)).data[o]&&(r.data[o].hidden=!r.data[o].hidden);s.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,i){var n=i.labels[t.index],r=": "+i.datasets[t.datasetIndex].data[t.index];return e.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}},i.pie=e.clone(i.doughnut),e.extend(i.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var i=this,n=i.chart,r=n.chartArea,o=n.options,s=o.elements.arc,a=r.right-r.left-s.borderWidth,l=r.bottom-r.top-s.borderWidth,c=Math.min(a,l),h={x:0,y:0},d=i.getMeta(),u=o.cutoutPercentage,p=o.circumference;if(p<2*Math.PI){var f=o.rotation%(2*Math.PI),m=(f+=2*Math.PI*(f>=Math.PI?-1:f<-Math.PI?1:0))+p,g={x:Math.cos(f),y:Math.sin(f)},v={x:Math.cos(m),y:Math.sin(m)},y=f<=0&&0<=m||f<=2*Math.PI&&2*Math.PI<=m,b=f<=.5*Math.PI&&.5*Math.PI<=m||f<=2.5*Math.PI&&2.5*Math.PI<=m,_=f<=-Math.PI&&-Math.PI<=m||f<=Math.PI&&Math.PI<=m,x=f<=.5*-Math.PI&&.5*-Math.PI<=m||f<=1.5*Math.PI&&1.5*Math.PI<=m,w=u/100,k={x:_?-1:Math.min(g.x*(g.x<0?1:w),v.x*(v.x<0?1:w)),y:x?-1:Math.min(g.y*(g.y<0?1:w),v.y*(v.y<0?1:w))},S={x:y?1:Math.max(g.x*(g.x>0?1:w),v.x*(v.x>0?1:w)),y:b?1:Math.max(g.y*(g.y>0?1:w),v.y*(v.y>0?1:w))},C={width:.5*(S.x-k.x),height:.5*(S.y-k.y)};c=Math.min(a/C.width,l/C.height),h={x:-.5*(S.x+k.x),y:-.5*(S.y+k.y)}}n.borderWidth=i.getMaxBorderWidth(d.data),n.outerRadius=Math.max((c-n.borderWidth)/2,0),n.innerRadius=Math.max(u?n.outerRadius/100*u:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=h.x*n.outerRadius,n.offsetY=h.y*n.outerRadius,d.total=i.calculateTotal(),i.outerRadius=n.outerRadius-n.radiusLength*i.getRingIndex(i.index),i.innerRadius=Math.max(i.outerRadius-n.radiusLength,0),e.each(d.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){var r=this,o=r.chart,s=o.chartArea,a=o.options,l=a.animation,c=(s.left+s.right)/2,h=(s.top+s.bottom)/2,d=a.rotation,u=a.rotation,p=r.getDataset(),f=n&&l.animateRotate?0:t.hidden?0:r.calculateCircumference(p.data[i])*(a.circumference/(2*Math.PI)),m=n&&l.animateScale?0:r.innerRadius,g=n&&l.animateScale?0:r.outerRadius,v=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:r.index,_index:i,_model:{x:c+o.offsetX,y:h+o.offsetY,startAngle:d,endAngle:u,circumference:f,outerRadius:g,innerRadius:m,label:v(p.label,i,o.data.labels[i])}});var y=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(y.startAngle=0===i?a.rotation:r.getMeta().data[i-1]._model.endAngle,y.endAngle=y.startAngle+y.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,i=this.getDataset(),n=this.getMeta(),r=0;return e.each(n.data,function(e,n){t=i.data[n],isNaN(t)||e.hidden||(r+=Math.abs(t))}),r},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,r=this.index,o=t.length,s=0;s<o;s++)e=t[s]._model?t[s]._model.borderWidth:0,n=(i=t[s]._chart?t[s]._chart.config.data.datasets[r].hoverBorderWidth:0)>(n=e>n?e:n)?i:n;return n}})}},{}],18:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return i.getValueOrDefault(t.showLine,e.showLines)}var i=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,update:function(t){var n,r,o,s=this,a=s.getMeta(),l=a.dataset,c=a.data||[],h=s.chart.options,d=h.elements.line,u=s.getScaleForId(a.yAxisID),p=s.getDataset(),f=e(p,h);for(f&&(o=l.custom||{},void 0!==p.tension&&void 0===p.lineTension&&(p.lineTension=p.tension),l._scale=u,l._datasetIndex=s.index,l._children=c,l._model={spanGaps:p.spanGaps?p.spanGaps:h.spanGaps,tension:o.tension?o.tension:i.getValueOrDefault(p.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:p.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:p.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:p.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:p.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:p.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:p.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:p.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==p.fill?p.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.getValueOrDefault(p.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.getValueOrDefault(p.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,r=c.length;n<r;++n)s.updateElement(c[n],n,t);for(f&&0!==l._model.tension&&s.updateBezierControlPoints(),n=0,r=c.length;n<r;++n)c[n].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,r=this.getDataset(),o=t.custom||{};return o.backgroundColor?n=o.backgroundColor:r.pointBackgroundColor?n=i.getValueAtIndexOrDefault(r.pointBackgroundColor,e,n):r.backgroundColor&&(n=r.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,r=this.getDataset(),o=t.custom||{};return o.borderColor?n=o.borderColor:r.pointBorderColor?n=i.getValueAtIndexOrDefault(r.pointBorderColor,e,n):r.borderColor&&(n=r.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,r=this.getDataset(),o=t.custom||{};return isNaN(o.borderWidth)?isNaN(r.pointBorderWidth)?isNaN(r.borderWidth)||(n=r.borderWidth):n=i.getValueAtIndexOrDefault(r.pointBorderWidth,e,n):n=o.borderWidth,n},updateElement:function(t,e,n){var r,o,s=this,a=s.getMeta(),l=t.custom||{},c=s.getDataset(),h=s.index,d=c.data[e],u=s.getScaleForId(a.yAxisID),p=s.getScaleForId(a.xAxisID),f=s.chart.options.elements.point,m=1===(s.chart.data.labels||[]).length||1===c.data.length||s.chart.isCombo;void 0!==c.radius&&void 0===c.pointRadius&&(c.pointRadius=c.radius),void 0!==c.hitRadius&&void 0===c.pointHitRadius&&(c.pointHitRadius=c.hitRadius),r=p.getPixelForValue("object"==typeof d?d:NaN,e,h,m),o=n?u.getBasePixel():s.calculatePointY(d,e,h),t._xScale=p,t._yScale=u,t._datasetIndex=h,t._index=e,t._model={x:r,y:o,skip:l.skip||isNaN(r)||isNaN(o),radius:l.radius||i.getValueAtIndexOrDefault(c.pointRadius,e,f.radius),pointStyle:l.pointStyle||i.getValueAtIndexOrDefault(c.pointStyle,e,f.pointStyle),backgroundColor:s.getPointBackgroundColor(t,e),borderColor:s.getPointBorderColor(t,e),borderWidth:s.getPointBorderWidth(t,e),tension:a.dataset._model?a.dataset._model.tension:0,steppedLine:!!a.dataset._model&&a.dataset._model.steppedLine,hitRadius:l.hitRadius||i.getValueAtIndexOrDefault(c.pointHitRadius,e,f.hitRadius)}},calculatePointY:function(t,e,i){var n,r,o,s=this,a=s.chart,l=s.getMeta(),c=s.getScaleForId(l.yAxisID),h=0,d=0;if(c.options.stacked){for(n=0;n<i;n++)if(r=a.data.datasets[n],"line"===(o=a.getDatasetMeta(n)).type&&o.yAxisID===c.id&&a.isDatasetVisible(n)){var u=Number(c.getRightValue(r.data[e]));u<0?d+=u||0:h+=u||0}var p=Number(c.getRightValue(t));return p<0?c.getPixelForValue(d+p):c.getPixelForValue(h+p)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e,n,r,o,s=this,a=s.getMeta(),l=s.chart.chartArea,c=a.data||[];if(a.dataset._model.spanGaps&&(c=c.filter(function(t){return!t._model.skip})),"monotone"===a.dataset._model.cubicInterpolationMode)i.splineCurveMonotone(c);else for(e=0,n=c.length;e<n;++e)r=c[e]._model,o=i.splineCurve(i.previousItem(c,e)._model,r,i.nextItem(c,e)._model,a.dataset._model.tension),r.controlPointPreviousX=o.previous.x,r.controlPointPreviousY=o.previous.y,r.controlPointNextX=o.next.x,r.controlPointNextY=o.next.y;if(s.chart.options.elements.line.capBezierPoints)for(e=0,n=c.length;e<n;++e)(r=c[e]._model).controlPointPreviousX=t(r.controlPointPreviousX,l.left,l.right),r.controlPointPreviousY=t(r.controlPointPreviousY,l.top,l.bottom),r.controlPointNextX=t(r.controlPointNextX,l.left,l.right),r.controlPointNextY=t(r.controlPointNextY,l.top,l.bottom)},draw:function(){var i=this,n=i.chart,r=i.getMeta(),o=r.data||[],s=n.chartArea,a=o.length,l=0;for(t.canvasHelpers.clipArea(n.ctx,s),e(i.getDataset(),n.options)&&r.dataset.draw(),t.canvasHelpers.unclipArea(n.ctx);l<a;++l)o[l].draw(s)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},o=t._model;o.radius=r.hoverRadius||i.getValueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),o.backgroundColor=r.hoverBackgroundColor||i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,n,i.getHoverColor(o.backgroundColor)),o.borderColor=r.hoverBorderColor||i.getValueAtIndexOrDefault(e.pointHoverBorderColor,n,i.getHoverColor(o.borderColor)),o.borderWidth=r.hoverBorderWidth||i.getValueAtIndexOrDefault(e.pointHoverBorderWidth,n,o.borderWidth)},removeHoverStyle:function(t){var e=this,n=e.chart.data.datasets[t._datasetIndex],r=t._index,o=t.custom||{},s=t._model;void 0!==n.radius&&void 0===n.pointRadius&&(n.pointRadius=n.radius),s.radius=o.radius||i.getValueAtIndexOrDefault(n.pointRadius,r,e.chart.options.elements.point.radius),s.backgroundColor=e.getPointBackgroundColor(t,r),s.borderColor=e.getPointBorderColor(t,r),s.borderWidth=e.getPointBorderWidth(t,r)}})}},{}],19:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.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,aspectRatio:1,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,r=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),r[o]&&e.push(r[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,r){var o=t.getDatasetMeta(0),s=i.datasets[0],a=o.data[r].custom||{},l=e.getValueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:a.backgroundColor?a.backgroundColor:l(s.backgroundColor,r,c.backgroundColor),strokeStyle:a.borderColor?a.borderColor:l(s.borderColor,r,c.borderColor),lineWidth:a.borderWidth?a.borderWidth:l(s.borderWidth,r,c.borderWidth),hidden:isNaN(s.data[r])||o.data[r].hidden,index:r}}):[]}},onClick:function(t,e){var i,n,r,o=e.index,s=this.chart;for(i=0,n=(s.data.datasets||[]).length;i<n;++i)(r=s.getDatasetMeta(i)).data[o].hidden=!r.data[o].hidden;s.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,update:function(t){var i=this,n=i.chart,r=n.chartArea,o=i.getMeta(),s=n.options,a=s.elements.arc,l=Math.min(r.right-r.left,r.bottom-r.top);n.outerRadius=Math.max((l-a.borderWidth/2)/2,0),n.innerRadius=Math.max(s.cutoutPercentage?n.outerRadius/100*s.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),i.outerRadius=n.outerRadius-n.radiusLength*i.index,i.innerRadius=i.outerRadius-n.radiusLength,o.count=i.countVisibleElements(),e.each(o.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){for(var r=this,o=r.chart,s=r.getDataset(),a=o.options,l=a.animation,c=o.scale,h=e.getValueAtIndexOrDefault,d=o.data.labels,u=r.calculateCircumference(s.data[i]),p=c.xCenter,f=c.yCenter,m=0,g=r.getMeta(),v=0;v<i;++v)isNaN(s.data[v])||g.data[v].hidden||++m;var y=a.startAngle,b=t.hidden?0:c.getDistanceFromCenterForValue(s.data[i]),_=y+u*m,x=_+(t.hidden?0:u),w=l.animateScale?0:c.getDistanceFromCenterForValue(s.data[i]);e.extend(t,{_datasetIndex:r.index,_index:i,_scale:c,_model:{x:p,y:f,innerRadius:0,outerRadius:n?w:b,startAngle:n&&l.animateRotate?y:_,endAngle:n&&l.animateRotate?y:x,label:h(d,i,d[i])}}),r.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),i=this.getMeta(),n=0;return e.each(i.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={aspectRatio:1,scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,update:function(t){var i=this,n=i.getMeta(),r=n.dataset,o=n.data,s=r.custom||{},a=i.getDataset(),l=i.chart.options.elements.line,c=i.chart.scale;void 0!==a.tension&&void 0===a.lineTension&&(a.lineTension=a.tension),e.extend(n.dataset,{_datasetIndex:i.index,_scale:c,_children:o,_loop:!0,_model:{tension:s.tension?s.tension:e.getValueOrDefault(a.lineTension,l.tension),backgroundColor:s.backgroundColor?s.backgroundColor:a.backgroundColor||l.backgroundColor,borderWidth:s.borderWidth?s.borderWidth:a.borderWidth||l.borderWidth,borderColor:s.borderColor?s.borderColor:a.borderColor||l.borderColor,fill:s.fill?s.fill:void 0!==a.fill?a.fill:l.fill,borderCapStyle:s.borderCapStyle?s.borderCapStyle:a.borderCapStyle||l.borderCapStyle,borderDash:s.borderDash?s.borderDash:a.borderDash||l.borderDash,borderDashOffset:s.borderDashOffset?s.borderDashOffset:a.borderDashOffset||l.borderDashOffset,borderJoinStyle:s.borderJoinStyle?s.borderJoinStyle:a.borderJoinStyle||l.borderJoinStyle}}),n.dataset.pivot(),e.each(o,function(e,n){i.updateElement(e,n,t)},i),i.updateBezierControlPoints()},updateElement:function(t,i,n){var r=this,o=t.custom||{},s=r.getDataset(),a=r.chart.scale,l=r.chart.options.elements.point,c=a.getPointPositionForValue(i,s.data[i]);void 0!==s.radius&&void 0===s.pointRadius&&(s.pointRadius=s.radius),void 0!==s.hitRadius&&void 0===s.pointHitRadius&&(s.pointHitRadius=s.hitRadius),e.extend(t,{_datasetIndex:r.index,_index:i,_scale:a,_model:{x:n?a.xCenter:c.x,y:n?a.yCenter:c.y,tension:o.tension?o.tension:e.getValueOrDefault(s.lineTension,r.chart.options.elements.line.tension),radius:o.radius?o.radius:e.getValueAtIndexOrDefault(s.pointRadius,i,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:e.getValueAtIndexOrDefault(s.pointBackgroundColor,i,l.backgroundColor),borderColor:o.borderColor?o.borderColor:e.getValueAtIndexOrDefault(s.pointBorderColor,i,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:e.getValueAtIndexOrDefault(s.pointBorderWidth,i,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:e.getValueAtIndexOrDefault(s.pointStyle,i,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:e.getValueAtIndexOrDefault(s.pointHitRadius,i,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,i=this.getMeta();e.each(i.data,function(n,r){var o=n._model,s=e.splineCurve(e.previousItem(i.data,r,!0)._model,o,e.nextItem(i.data,r,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(s.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(s.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(s.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(s.next.y,t.bottom),t.top),n.pivot()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},r=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,r,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,r,e.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,r,e.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,r,o.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},r=t._index,o=t._model,s=this.chart.options.elements.point;o.radius=n.radius?n.radius:e.getValueAtIndexOrDefault(i.pointRadius,r,s.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:e.getValueAtIndexOrDefault(i.pointBackgroundColor,r,s.backgroundColor),o.borderColor=n.borderColor?n.borderColor:e.getValueAtIndexOrDefault(i.pointBorderColor,r,s.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:e.getValueAtIndexOrDefault(i.pointBorderWidth,r,s.borderWidth)}})}},{}],21:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var r,o,s=this.animations;for(e.chart=t,n||(t.animating=!0),r=0,o=s.length;r<o;++r)if(s[r].chart===t)return void(s[r]=e);s.push(e),1===s.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var i=e.findIndex(this.animations,function(e){return e.chart===t});-1!==i&&(this.animations.splice(i,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=e.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;t.dropFrames>1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+i);var n=Date.now();t.dropFrames+=(n-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var i,n,r=this.animations,o=0;o<r.length;)n=(i=r[o]).chart,i.currentStep=(i.currentStep||0)+t,i.currentStep=Math.min(i.currentStep,i.numSteps),e.callback(i.render,[n,i],n),e.callback(i.onAnimationProgress,[i],n),i.currentStep>=i.numSteps?(e.callback(i.onAnimationComplete,[i],n),n.animating=!1,r.splice(o,1)):++o}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{}],22:[function(t,e,i){"use strict";e.exports=function(t){var e=t.canvasHelpers={};e.drawPoint=function(e,i,n,r,o){var s,a,l,c,h,d;if("object"!=typeof i||"[object HTMLImageElement]"!==(s=i.toString())&&"[object HTMLCanvasElement]"!==s){if(!(isNaN(n)||n<=0)){switch(i){default:e.beginPath(),e.arc(r,o,n,0,2*Math.PI),e.closePath(),e.fill();break;case"triangle":e.beginPath(),h=(a=3*n/Math.sqrt(3))*Math.sqrt(3)/2,e.moveTo(r-a/2,o+h/3),e.lineTo(r+a/2,o+h/3),e.lineTo(r,o-2*h/3),e.closePath(),e.fill();break;case"rect":d=1/Math.SQRT2*n,e.beginPath(),e.fillRect(r-d,o-d,2*d,2*d),e.strokeRect(r-d,o-d,2*d,2*d);break;case"rectRounded":var u=n/Math.SQRT2,p=r-u,f=o-u,m=Math.SQRT2*n;t.helpers.drawRoundedRectangle(e,p,f,m,m,n/2),e.fill();break;case"rectRot":d=1/Math.SQRT2*n,e.beginPath(),e.moveTo(r-d,o),e.lineTo(r,o+d),e.lineTo(r+d,o),e.lineTo(r,o-d),e.closePath(),e.fill();break;case"cross":e.beginPath(),e.moveTo(r,o+n),e.lineTo(r,o-n),e.moveTo(r-n,o),e.lineTo(r+n,o),e.closePath();break;case"crossRot":e.beginPath(),l=Math.cos(Math.PI/4)*n,c=Math.sin(Math.PI/4)*n,e.moveTo(r-l,o-c),e.lineTo(r+l,o+c),e.moveTo(r-l,o+c),e.lineTo(r+l,o-c),e.closePath();break;case"star":e.beginPath(),e.moveTo(r,o+n),e.lineTo(r,o-n),e.moveTo(r-n,o),e.lineTo(r+n,o),l=Math.cos(Math.PI/4)*n,c=Math.sin(Math.PI/4)*n,e.moveTo(r-l,o-c),e.lineTo(r+l,o+c),e.moveTo(r-l,o+c),e.lineTo(r+l,o-c),e.closePath();break;case"line":e.beginPath(),e.moveTo(r-n,o),e.lineTo(r+n,o),e.closePath();break;case"dash":e.beginPath(),e.moveTo(r,o),e.lineTo(r+n,o),e.closePath()}e.stroke()}}else e.drawImage(i,r-i.width/2,o-i.height/2,i.width,i.height)},e.clipArea=function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},e.unclipArea=function(t){t.restore()},e.lineTo=function(t,e,i,n){if(i.steppedLine)return"after"===i.steppedLine?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y);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)},t.helpers.canvas=e}},{}],23:[function(t,e,i){"use strict";e.exports=function(t){function e(e){var i=(e=e||{}).data=e.data||{};return i.datasets=i.datasets||[],i.labels=i.labels||[],e.options=r.configMerge(t.defaults.global,t.defaults[e.type],e.options||{}),e}function i(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach(function(e){t.scales[e.id].options=e}),t.tooltip._options=e.tooltips}function n(t){return"top"===t||"bottom"===t}var r=t.helpers,o=t.plugins,s=t.platform;t.types={},t.instances={},t.controllers={},r.extend(t.prototype,{construct:function(i,n){var o=this;n=e(n);var a=s.acquireContext(i,n),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;o.id=r.uid(),o.ctx=a,o.canvas=l,o.config=n,o.width=h,o.height=c,o.aspectRatio=c?h/c:null,o.options=n.options,o._bufferedRender=!1,o.chart=o,o.controller=o,t.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),a&&l?(o.initialize(),o.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return o.notify(t,"beforeInit"),r.retinaScale(t),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),o.notify(t,"afterInit"),t},clear:function(){return r.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,s=i.maintainAspectRatio&&e.aspectRatio||null,a=Math.floor(r.getMaximumWidth(n)),l=Math.floor(s?a/s:r.getMaximumHeight(n));if((e.width!==a||e.height!==l)&&(n.width=e.width=a,n.height=e.height=l,n.style.width=a+"px",n.style.height=l+"px",r.retinaScale(e),!t)){var c={width:a,height:l};o.notify(e,"resize",[c]),e.options.onResize&&e.options.onResize(e,c),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;r.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),r.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildScales:function(){var e=this,i=e.options,o=e.scales={},s=[];i.scales&&(s=s.concat((i.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(i.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),i.scale&&s.push({options:i.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),r.each(s,function(i){var s=i.options,a=r.getValueOrDefault(s.type,i.dtype),l=t.scaleService.getScaleConstructor(a);if(l){n(s.position)!==n(i.dposition)&&(s.position=i.dposition);var c=new l({id:s.id,options:s,ctx:e.ctx,chart:e});o[c.id]=c,i.isDefault&&(e.scale=c)}}),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];if(r.each(e.data.datasets,function(r,o){var s=e.getDatasetMeta(o);if(s.type||(s.type=r.type||e.config.type),i.push(s.type),s.controller)s.controller.updateIndex(o);else{var a=t.controllers[s.type];if(void 0===a)throw new Error('"'+s.type+'" is not a chart type.');s.controller=new a(e,o),n.push(s.controller)}},e),i.length>1)for(var o=1;o<i.length;o++)if(i[o]!==i[o-1]){e.isCombo=!0;break}return n},resetElements:function(){var t=this;r.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t,e){var n=this;if(i(n),!1!==o.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var s=n.buildOrUpdateControllers();r.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),r.each(s,function(t){t.reset()}),n.updateDatasets(),o.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={lazy:e,duration:t}:n.render(t,e)}},updateLayout:function(){var e=this;!1!==o.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),o.notify(e,"afterScaleUpdate"),o.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==o.notify(t,"beforeDatasetsUpdate")){for(var e=0,i=t.data.datasets.length;e<i;++e)t.updateDataset(e);o.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,i=e.getDatasetMeta(t),n={meta:i,index:t};!1!==o.notify(e,"beforeDatasetUpdate",[n])&&(i.controller.update(),o.notify(e,"afterDatasetUpdate",[n]))},render:function(e,i){var n=this;if(!1!==o.notify(n,"beforeRender")){var s=n.options.animation,a=function(t){o.notify(n,"afterRender"),r.callback(s&&s.onComplete,[t],n)};if(s&&(void 0!==e&&0!==e||void 0===e&&0!==s.duration)){var l=new t.Animation({numSteps:(e||s.duration)/16.66,easing:s.easing,render:function(t,e){var i=r.easingEffects[e.easing],n=e.currentStep,o=n/e.numSteps;t.draw(i(o),o,n)},onAnimationProgress:s.onProgress,onAnimationComplete:a});t.animationService.addAnimation(n,l,e,i)}else n.draw(),a(new t.Animation({numSteps:0,chart:n}));return n}},draw:function(t){var e=this;e.clear(),void 0!==t&&null!==t||(t=1),e.transition(t),!1!==o.notify(e,"beforeDraw",[t])&&(r.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e.tooltip.draw(),o.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=this,i=0,n=(e.data.datasets||[]).length;i<n;++i)e.isDatasetVisible(i)&&e.getDatasetMeta(i).controller.transition(t);e.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==o.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;i>=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);o.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this,n=i.getDatasetMeta(t),r={meta:n,index:t,easingValue:e};!1!==o.notify(i,"beforeDatasetDraw",[r])&&(n.controller.draw(e),o.notify(i,"afterDatasetDraw",[r]))},getElementAtEvent:function(e){return t.Interaction.modes.single(this,e)},getElementsAtEvent:function(e){return t.Interaction.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return t.Interaction.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,i,n){var r=t.Interaction.modes[i];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return t.Interaction.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},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)},destroy:function(){var e,i,n,a=this,l=a.canvas;for(a.stop(),i=0,n=a.data.datasets.length;i<n;++i)(e=a.getDatasetMeta(i)).controller&&(e.controller.destroy(),e.controller=null);l&&(a.unbindEvents(),r.clear(a),s.releaseContext(a.ctx),a.canvas=null,a.ctx=null),o.notify(a,"destroy"),delete t.instances[a.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e),e.tooltip.initialize()},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};r.each(t.options.events,function(n){s.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},s.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,r.each(e,function(e,i){s.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,r,o,s=i?"setHoverStyle":"removeHoverStyle";for(r=0,o=t.length;r<o;++r)(n=t[r])&&this.getDatasetMeta(n._datasetIndex).controller[s](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==o.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);n|=i&&i.handleEvent(t),o.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r.duration,r.lazy):n&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,i=e.options||{},n=i.hover,o=!1;return e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,n.mode,n),n.onHover&&n.onHover.call(e,t.native,e.active),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(e,t.native,e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,n.mode,!1),e.active.length&&n.mode&&e.updateHoverStyle(e.active,n.mode,!0),o=!r.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,o}}),t.Controller=t}},{}],24:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),r.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),o=r.apply(this,e);return n.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),o}})}))}function i(t,e){var i=t._chartjs;if(i){var n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(r.forEach(function(e){delete t[e]}),delete t._chartjs)}}var n=t.helpers,r=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},n.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null===e.xAxisID&&(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=i.yAxisID||t.chart.options.scales.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]},reset:function(){this.update(!0)},destroy:function(){this._data&&i(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),r=i.getDataset().data||[],o=n.data;for(t=0,e=r.length;t<e;++t)o[t]=o[t]||i.createMetaData(t);n.dataset=n.dataset||i.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=this,n=t.getDataset(),r=n.data||(n.data=[]);t._data!==r&&(t._data&&i(t._data,t),e(r,t),t._data=r),t.resyncElements()},update:n.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,r=0;r<n;++r)i[r].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()},removeHoverStyle:function(t,e){var i=this.chart.data.datasets[t._datasetIndex],r=t._index,o=t.custom||{},s=n.getValueAtIndexOrDefault,a=t._model;a.backgroundColor=o.backgroundColor?o.backgroundColor:s(i.backgroundColor,r,e.backgroundColor),a.borderColor=o.borderColor?o.borderColor:s(i.borderColor,r,e.borderColor),a.borderWidth=o.borderWidth?o.borderWidth:s(i.borderWidth,r,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,r=t.custom||{},o=n.getValueAtIndexOrDefault,s=n.getHoverColor,a=t._model;a.backgroundColor=r.hoverBackgroundColor?r.hoverBackgroundColor:o(e.hoverBackgroundColor,i,s(a.backgroundColor)),a.borderColor=r.hoverBorderColor?r.hoverBorderColor:o(e.hoverBorderColor,i,s(a.borderColor)),a.borderWidth=r.hoverBorderWidth?r.hoverBorderWidth:o(e.hoverBorderWidth,i,a.borderWidth)},resyncElements:function(){var t=this,e=t.getMeta(),i=t.getDataset().data,n=e.data.length,r=i.length;r<n?e.data.splice(r,n-r):r>n&&t.insertElements(n,r-n)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},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)}}),t.DatasetController.extend=n.inherits}},{}],25:[function(t,e,i){"use strict";var n=t(2);e.exports=function(t){function e(t,e,i,r){var o,s,a,l,c,h,d,u,p,f=Object.keys(i);for(o=0,s=f.length;o<s;++o)if(a=f[o],h=i[a],e.hasOwnProperty(a)||(e[a]=h),(l=e[a])!==h&&"_"!==a[0]){if(t.hasOwnProperty(a)||(t[a]=l),c=t[a],(d=typeof h)===typeof c)if("string"===d){if((u=n(c)).valid&&(p=n(h)).valid){e[a]=p.mix(u,r).rgbString();continue}}else if("number"===d&&isFinite(c)&&isFinite(h)){e[a]=c+(h-c)*r;continue}e[a]=h}}var i=t.helpers;t.elements={},t.Element=function(t){i.extend(this,t),this.initialize.apply(this,arguments)},i.extend(t.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=i.clone(t._model)),t._start={},t},transition:function(t){var i=this,n=i._model,r=i._start,o=i._view;return n&&1!==t?(o||(o=i._view={}),r||(r=i._start={}),e(r,o,n,t),i):(i._view=n,i._start=null,i)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return i.isNumber(this._model.x)&&i.isNumber(this._model.y)}}),t.Element.extend=i.inherits}},{2:2}],26:[function(t,e,i){"use strict";var n=t(2);e.exports=function(t){function e(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 i(t){return void 0!==t&&null!==t&&"none"!==t}function r(t,n,r){var o=document.defaultView,s=t.parentNode,a=o.getComputedStyle(t)[n],l=o.getComputedStyle(s)[n],c=i(a),h=i(l),d=Number.POSITIVE_INFINITY;return c||h?Math.min(c?e(a,t,r):d,h?e(l,s,r):d):"none"}var o=t.helpers={};o.each=function(t,e,i,n){var r,s;if(o.isArray(t))if(s=t.length,n)for(r=s-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<s;r++)e.call(i,t[r],r);else if("object"==typeof t){var a=Object.keys(t);for(s=a.length,r=0;r<s;r++)e.call(i,t[a[r]],a[r])}},o.clone=function(t){var e={};return o.each(t,function(t,i){o.isArray(t)?e[i]=t.slice(0):e[i]="object"==typeof t&&null!==t?o.clone(t):t}),e},o.extend=function(t){for(var e=1,i=arguments.length;e<i;e++)o.each(arguments[e],function(e,i){t[i]=e});return t},o.configMerge=function(e){var i=o.clone(e);return o.each(Array.prototype.slice.call(arguments,1),function(e){o.each(e,function(e,n){var r=i.hasOwnProperty(n),s=r?i[n]:{};"scales"===n?i[n]=o.scaleMerge(s,e):"scale"===n?i[n]=o.configMerge(s,t.scaleService.getScaleDefaults(e.type),e):!r||"object"!=typeof s||o.isArray(s)||null===s||"object"!=typeof e||o.isArray(e)?i[n]=e:i[n]=o.configMerge(s,e)})}),i},o.scaleMerge=function(e,i){var n=o.clone(e);return o.each(i,function(e,i){"xAxes"===i||"yAxes"===i?n.hasOwnProperty(i)?o.each(e,function(e,r){var s=o.getValueOrDefault(e.type,"xAxes"===i?"category":"linear"),a=t.scaleService.getScaleDefaults(s);r>=n[i].length||!n[i][r].type?n[i].push(o.configMerge(a,e)):e.type&&e.type!==n[i][r].type?n[i][r]=o.configMerge(n[i][r],a,e):n[i][r]=o.configMerge(n[i][r],e)}):(n[i]=[],o.each(e,function(e){var r=o.getValueOrDefault(e.type,"xAxes"===i?"category":"linear");n[i].push(o.configMerge(t.scaleService.getScaleDefaults(r),e))})):n.hasOwnProperty(i)&&"object"==typeof n[i]&&null!==n[i]&&"object"==typeof e?n[i]=o.configMerge(n[i],e):n[i]=e}),n},o.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:o.isArray(t)?e<t.length?t[e]:i:t},o.getValueOrDefault=function(t,e){return void 0===t?e:t},o.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;i<n;++i)if(t[i]===e)return i;return-1},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return o.each(t,function(t){e(t)&&i.push(t)}),i},o.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,r=t.length;n<r;++n)if(e.call(i,t[n],n,t))return n;return-1},o.findNextWhere=function(t,e,i){void 0!==i&&null!==i||(i=-1);for(var n=i+1;n<t.length;n++){var r=t[n];if(e(r))return r}},o.findPreviousWhere=function(t,e,i){void 0!==i&&null!==i||(i=t.length);for(var n=i-1;n>=0;n--){var r=t[n];if(e(r))return r}},o.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=o.inherits,t&&o.extend(i.prototype,t),i.__super__=e.prototype,i},o.noop=function(){},o.uid=function(){var t=0;return function(){return t++}}(),o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,i){return Math.abs(t-e)<i},o.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,i,n){var r=t.skip?e:t,o=e,s=i.skip?e:i,a=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(s.x-o.x,2)+Math.pow(s.y-o.y,2)),c=a/(a+l),h=l/(a+l),d=n*(c=isNaN(c)?0:c),u=n*(h=isNaN(h)?0:h);return{previous:{x:o.x-d*(s.x-r.x),y:o.y-d*(s.y-r.y)},next:{x:o.x+u*(s.x-r.x),y:o.y+u*(s.y-r.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,i,n,r,s=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),a=s.length;for(e=0;e<a;++e)if(!(n=s[e]).model.skip){if(i=e>0?s[e-1]:null,(r=e<a-1?s[e+1]:null)&&!r.model.skip){var l=r.model.x-n.model.x;n.deltaK=0!==l?(r.model.y-n.model.y)/l:0}!i||i.model.skip?n.mK=n.deltaK:!r||r.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}var c,h,d,u;for(e=0;e<a-1;++e)n=s[e],r=s[e+1],n.model.skip||r.model.skip||(o.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=r.mK=0:(c=n.mK/n.deltaK,h=r.mK/n.deltaK,(u=Math.pow(c,2)+Math.pow(h,2))<=9||(d=3/Math.sqrt(u),n.mK=c*d*n.deltaK,r.mK=h*d*n.deltaK)));var p;for(e=0;e<a;++e)(n=s[e]).model.skip||(i=e>0?s[e-1]:null,r=e<a-1?s[e+1]:null,i&&!i.model.skip&&(p=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-p,n.model.controlPointPreviousY=n.model.y-p*n.mK),r&&!r.model.skip&&(p=(r.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+p,n.model.controlPointNextY=n.model.y+p*n.mK))},o.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]},o.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var i=Math.floor(o.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)};var s=o.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*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 1*((t=t/1-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-1*((t=t/1-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 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-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/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(1-Math.pow(2,-10*t/1))},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:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-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)?1:(i||(i=.3),n<Math.abs(1)?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),n<Math.abs(1)?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((1*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=.3*1.5*1),n<Math.abs(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((1*t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-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)<1/2.75?7.5625*t*t*1:t<2/2.75?1*(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(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}};o.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)},o.getRelativePosition=function(t,e){var i,n,r=t.originalEvent||t,s=t.currentTarget||t.srcElement,a=s.getBoundingClientRect(),l=r.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=r.clientX,n=r.clientY);var c=parseFloat(o.getStyle(s,"padding-left")),h=parseFloat(o.getStyle(s,"padding-top")),d=parseFloat(o.getStyle(s,"padding-right")),u=parseFloat(o.getStyle(s,"padding-bottom")),p=a.right-a.left-c-d,f=a.bottom-a.top-h-u;return i=Math.round((i-a.left-c)/p*s.width/e.currentDevicePixelRatio),n=Math.round((n-a.top-h)/f*s.height/e.currentDevicePixelRatio),{x:i,y:n}},o.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},o.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=o.noop},o.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(o.getStyle(e,"padding-left"),10),n=parseInt(o.getStyle(e,"padding-right"),10),r=e.clientWidth-i-n,s=o.getConstraintWidth(t);return isNaN(s)?r:Math.min(r,s)},o.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(o.getStyle(e,"padding-top"),10),n=parseInt(o.getStyle(e,"padding-bottom"),10),r=e.clientHeight-i-n,s=o.getConstraintHeight(t);return isNaN(s)?r:Math.min(r,s)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t){var e=t.currentDevicePixelRatio=window.devicePixelRatio||1;if(1!==e){var i=t.canvas,n=t.height,r=t.width;i.height=n*e,i.width=r*e,t.ctx.scale(e,e),i.style.height=n+"px",i.style.width=r+"px"}},o.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},o.fontString=function(t,e,i){return e+" "+t+"px "+i},o.longestText=function(t,e,i,n){var r=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},s=n.garbageCollect=[],n.font=e),t.font=e;var a=0;o.each(i,function(e){void 0!==e&&null!==e&&!0!==o.isArray(e)?a=o.measureText(t,r,s,a,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(a=o.measureText(t,r,s,a,e))})});var l=s.length/2;if(l>i.length){for(var c=0;c<l;c++)delete r[s[c]];s.splice(0,l)}return a},o.measureText=function(t,e,i,n,r){var o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.drawRoundedRectangle=function(t,e,i,n,r,o){t.beginPath(),t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+r-o),t.quadraticCurveTo(e+n,i+r,e+n-o,i+r),t.lineTo(e+o,i+r),t.quadraticCurveTo(e,i+r,e,i+r-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath()},o.color=n?function(e){return e instanceof CanvasGradient&&(e=t.defaults.global.defaultColor),n(e)}:function(t){return console.error("Color.js not found!"),t},o.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.arrayEquals=function(t,e){var i,n,r,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(r=t[i],s=e[i],r instanceof Array&&s instanceof Array){if(!o.arrayEquals(r,s))return!1}else if(r!==s)return!1;return!0},o.callback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()},o.callCallback=o.callback}},{2:2}],27:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return t.native?{x:t.x,y:t.y}:s.getRelativePosition(t,e)}function i(t,e){var i,n,r,o,s;for(n=0,o=t.data.datasets.length;n<o;++n)if(t.isDatasetVisible(n))for(r=0,s=(i=t.getDatasetMeta(n)).data.length;r<s;++r){var a=i.data[r];a._view.skip||e(a)}}function n(t,e){var n=[];return i(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function r(t,e,n,r){var o=Number.POSITIVE_INFINITY,a=[];return r||(r=s.distanceBetweenPoints),i(t,function(t){if(!n||t.inRange(e.x,e.y)){var i=t.getCenterPoint(),s=r(e,i);s<o?(a=[t],o=s):s===o&&a.push(t)}}),a}function o(t,i,o){var s=e(i,t),a=o.intersect?n(t,s):r(t,s,!1,function(t,e){return Math.abs(t.x-e.x)}),l=[];return a.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i).data[a[0]._index];n&&!n._view.skip&&l.push(n)}}),l):[]}var s=t.helpers;t.Interaction={modes:{single:function(t,n){var r=e(n,t),o=[];return i(t,function(t){if(t.inRange(r.x,r.y))return o.push(t),o}),o.slice(0,1)},label:o,index:o,dataset:function(t,i,o){var s=e(i,t),a=o.intersect?n(t,s):r(t,s,!1);return a.length>0&&(a=t.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(t,e){return o(t,e,!0)},point:function(t,i){return n(t,e(i,t))},nearest:function(t,i,n){var o=r(t,e(i,t),n.intersect);return o.length>1&&o.sort(function(t,e){var i=t.getArea()-e.getArea();return 0===i&&(i=t._datasetIndex-e._datasetIndex),i}),o.slice(0,1)},x:function(t,n,r){var o=e(n,t),s=[],a=!1;return i(t,function(t){t.inXRange(o.x)&&s.push(t),t.inRange(o.x,o.y)&&(a=!0)}),r.intersect&&!a&&(s=[]),s},y:function(t,n,r){var o=e(n,t),s=[],a=!1;return i(t,function(t){t.inYRange(o.y)&&s.push(t),t.inRange(o.x,o.y)&&(a=!0)}),r.intersect&&!a&&(s=[]),s}}}}},{}],28:[function(t,e,i){"use strict";e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}}},t.Chart=t,t}},{}],29:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return n.where(t,function(t){return t.position===e})}function i(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,r=e?t:i;return n.weight===r.weight?n._tmpIndex_-r._tmpIndex_:n.weight-r.weight}),t.forEach(function(t){delete t._tmpIndex_})}var n=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,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,r=["fullWidth","position","weight"],o=r.length,s=0;s<o;++s)n=r[s],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,r,o){function s(t){var e=n.findNextWhere(D,function(e){return e.box===t});if(e)if(t.isHorizontal()){var i={left:Math.max(P,T),right:Math.max(I,A),top:0,bottom:0};t.update(t.fullWidth?b:S,_/2,i)}else t.update(e.minSize.width,C)}function a(t){t.isHorizontal()?(t.left=t.fullWidth?h:P,t.right=t.fullWidth?r-d:P+S,t.top=H,t.bottom=H+t.height,H=t.bottom):(t.left=$,t.right=$+t.width,t.top=O,t.bottom=O+C,$=t.right)}if(t){var l=t.options.layout,c=l?l.padding:null,h=0,d=0,u=0,p=0;isNaN(c)?(h=c.left||0,d=c.right||0,u=c.top||0,p=c.bottom||0):(h=c,d=c,u=c,p=c);var f=e(t.boxes,"left"),m=e(t.boxes,"right"),g=e(t.boxes,"top"),v=e(t.boxes,"bottom"),y=e(t.boxes,"chartArea");i(f,!0),i(m,!1),i(g,!0),i(v,!1);var b=r-h-d,_=o-u-p,x=_/2,w=(r-b/2)/(f.length+m.length),k=(o-x)/(g.length+v.length),S=b,C=_,D=[];n.each(f.concat(m,g,v),function(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?b:S,k),C-=e.height):(e=t.update(w,x),S-=e.width),D.push({horizontal:i,minSize:e,box:t})});var T=0,A=0,M=0,E=0;n.each(g.concat(v),function(t){if(t.getPadding){var e=t.getPadding();T=Math.max(T,e.left),A=Math.max(A,e.right)}}),n.each(f.concat(m),function(t){if(t.getPadding){var e=t.getPadding();M=Math.max(M,e.top),E=Math.max(E,e.bottom)}});var P=h,I=d,O=u,N=p;n.each(f.concat(m),s),n.each(f,function(t){P+=t.width}),n.each(m,function(t){I+=t.width}),n.each(g.concat(v),s),n.each(g,function(t){O+=t.height}),n.each(v,function(t){N+=t.height}),n.each(f.concat(m),function(t){var e=n.findNextWhere(D,function(e){return e.box===t}),i={left:0,right:0,top:O,bottom:N};e&&t.update(e.minSize.width,C,i)}),P=h,I=d,O=u,N=p,n.each(f,function(t){P+=t.width}),n.each(m,function(t){I+=t.width}),n.each(g,function(t){O+=t.height}),n.each(v,function(t){N+=t.height});var F=Math.max(T-P,0);P+=F,I+=Math.max(A-I,0);var L=Math.max(M-O,0);O+=L,N+=Math.max(E-N,0);var j=o-O-N,R=r-P-I;R===S&&j===C||(n.each(f,function(t){t.height=j}),n.each(m,function(t){t.height=j}),n.each(g,function(t){t.fullWidth||(t.width=R)}),n.each(v,function(t){t.fullWidth||(t.width=R)}),C=j,S=R);var $=h+F,H=u+L;n.each(f.concat(g),a),$+=S,H+=C,n.each(m,a),n.each(v,a),t.chartArea={left:P,top:O,right:P+S,bottom:O+C},n.each(y,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(S,C)})}}}}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.plugins={},t.plugins={_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,r,o,s,a,l=this.descriptors(t),c=l.length;for(n=0;n<c;++n)if(r=l[n],o=r.plugin,"function"==typeof(a=o[e])&&((s=[t].concat(i||[])).push(r.options),!1===a.apply(o,s)))return!1;return!0},descriptors:function(i){var n=i._plugins||(i._plugins={});if(n.id===this._cacheId)return n.descriptors;var r=[],o=[],s=i&&i.config||{},a=t.defaults.global.plugins,l=s.options&&s.options.plugins||{};return this._plugins.concat(s.plugins||[]).forEach(function(t){if(-1===r.indexOf(t)){var i=t.id,n=l[i];!1!==n&&(!0===n&&(n=e.clone(a[i])),r.push(t),o.push({plugin:t,options:n||{}}))}}),n.descriptors=o,n.id=this._cacheId,o}},t.pluginService=t.plugins,t.PluginBase=t.Element.extend({})}},{}],31:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e,i){return n.isArray(e)?n.longestText(t,i,e):t.measureText(e).width}function i(e){var i=n.getValueOrDefault,r=t.defaults.global,o=i(e.fontSize,r.defaultFontSize),s=i(e.fontStyle,r.defaultFontStyle),a=i(e.fontFamily,r.defaultFontFamily);return{size:o,style:s,family:a,font:n.fontString(o,s,a)}}var n=t.helpers;t.defaults.scale={display:!0,position:"left",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:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:t.Ticks.formatters.values}},t.Scale=t.Element.extend({getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},beforeUpdate:function(){n.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,r.margins=n.extend({left:0,right:0,top:0,bottom:0},i),r.longestTextCache=r.longestTextCache||{},r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeDataLimits(),r.determineDataLimits(),r.afterDataLimits(),r.beforeBuildTicks(),r.buildTicks(),r.afterBuildTicks(),r.beforeTickToLabelConversion(),r.convertTicksToLabels(),r.afterTickToLabelConversion(),r.beforeCalculateTickRotation(),r.calculateTickRotation(),r.afterCalculateTickRotation(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:function(){n.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){n.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(){n.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){n.callback(this.options.beforeDataLimits,[this])},determineDataLimits:n.noop,afterDataLimits:function(){n.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){n.callback(this.options.beforeBuildTicks,[this])},buildTicks:n.noop,afterBuildTicks:function(){n.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){n.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback)},afterTickToLabelConversion:function(){n.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){n.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,r=t.options.ticks,o=i(r);e.font=o.font;var s=r.minRotation||0;if(t.options.display&&t.isHorizontal())for(var a,l=n.longestText(e,o.font,t.ticks,t.longestTextCache),c=l,h=t.getPixelForTick(1)-t.getPixelForTick(0)-6;c>h&&s<r.maxRotation;){var d=n.toRadians(s);if(a=Math.cos(d),Math.sin(d)*l>t.maxHeight){s--;break}s++,c=a*l}t.labelRotation=s},afterCalculateTickRotation:function(){n.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){n.callback(this.options.beforeFit,[this])},fit:function(){var t=this,r=t.minSize={width:0,height:0},o=t.options,s=o.ticks,a=o.scaleLabel,l=o.gridLines,c=o.display,h=t.isHorizontal(),d=i(s),u=1.5*i(a).size,p=o.gridLines.tickMarkLength;if(r.width=h?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:c&&l.drawTicks?p:0,r.height=h?c&&l.drawTicks?p:0:t.maxHeight,a.display&&c&&(h?r.height+=u:r.width+=u),s.display&&c){var f=n.longestText(t.ctx,d.font,t.ticks,t.longestTextCache),m=n.numberOfLabelLines(t.ticks),g=.5*d.size;if(h){t.longestLabelWidth=f;var v=n.toRadians(t.labelRotation),y=Math.cos(v),b=Math.sin(v)*f+d.size*m+g*m;r.height=Math.min(t.maxHeight,r.height+b),t.ctx.font=d.font;var _=t.ticks[0],x=e(t.ctx,_,d.font),w=t.ticks[t.ticks.length-1],k=e(t.ctx,w,d.font);0!==t.labelRotation?(t.paddingLeft="bottom"===o.position?y*x+3:y*g+3,t.paddingRight="bottom"===o.position?y*g+3:y*k+3):(t.paddingLeft=x/2+3,t.paddingRight=k/2+3)}else s.mirror?f=0:f+=t.options.ticks.padding,r.width=Math.min(t.maxWidth,r.width+f),t.paddingTop=d.size/2,t.paddingBottom=d.size/2}t.handleMargins(),t.width=r.width,t.height=r.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){n.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||void 0===t?NaN:"number"!=typeof t||isFinite(t)?"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t:NaN},getLabelForIndex:n.noop,getPixelForValue:n.noop,getValueForPixel:n.noop,getPixelForTick:function(t,e){var i=this;if(i.isHorizontal()){var n=(i.width-(i.paddingLeft+i.paddingRight))/Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),r=n*t+i.paddingLeft;e&&(r+=n/2);var o=i.left+Math.round(r);return o+=i.isFullWidth()?i.margins.left:0}var s=i.height-(i.paddingTop+i.paddingBottom);return i.top+t*(s/(i.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(i);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,i=t.max;return t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0},draw:function(e){var r=this,o=r.options;if(o.display){var s,a,l=r.ctx,c=t.defaults.global,h=o.ticks,d=o.gridLines,u=o.scaleLabel,p=0!==r.labelRotation,f=h.autoSkip,m=r.isHorizontal();h.maxTicksLimit&&(a=h.maxTicksLimit);var g=n.getValueOrDefault(h.fontColor,c.defaultFontColor),v=i(h),y=d.drawTicks?d.tickMarkLength:0,b=n.getValueOrDefault(u.fontColor,c.defaultFontColor),_=i(u),x=n.toRadians(r.labelRotation),w=Math.cos(x),k=r.longestLabelWidth*w;l.fillStyle=g;var S=[];if(m){if(s=!1,(k+h.autoSkipPadding)*r.ticks.length>r.width-(r.paddingLeft+r.paddingRight)&&(s=1+Math.floor((k+h.autoSkipPadding)*r.ticks.length/(r.width-(r.paddingLeft+r.paddingRight)))),a&&r.ticks.length>a)for(;!s||r.ticks.length/(s||1)>a;)s||(s=1),s+=1;f||(s=!1)}var C="right"===o.position?r.left:r.right-y,D="right"===o.position?r.left+y:r.right,T="bottom"===o.position?r.top:r.bottom-y,A="bottom"===o.position?r.top+y:r.bottom;if(n.each(r.ticks,function(t,i){if(void 0!==t&&null!==t){var a=r.ticks.length===i+1;if((!(s>1&&i%s>0||i%s==0&&i+s>=r.ticks.length)||a)&&void 0!==t&&null!==t){var l,u,f,g;i===(void 0!==r.zeroLineIndex?r.zeroLineIndex:0)?(l=d.zeroLineWidth,u=d.zeroLineColor,f=d.zeroLineBorderDash,g=d.zeroLineBorderDashOffset):(l=n.getValueAtIndexOrDefault(d.lineWidth,i),u=n.getValueAtIndexOrDefault(d.color,i),f=n.getValueOrDefault(d.borderDash,c.borderDash),g=n.getValueOrDefault(d.borderDashOffset,c.borderDashOffset));var v,b,_,w,k,M,E,P,I,O,N="middle",F="middle";if(m){"bottom"===o.position?(F=p?"middle":"top",N=p?"right":"center",O=r.top+y):(F=p?"middle":"bottom",N=p?"left":"center",O=r.bottom-y);var L=r.getPixelForTick(i)+n.aliasPixel(l);I=r.getPixelForTick(i,d.offsetGridLines)+h.labelOffset,v=_=k=E=L,b=T,w=A,M=e.top,P=e.bottom}else{var j,R="left"===o.position,$=h.padding;h.mirror?(N=R?"left":"right",j=$):(N=R?"right":"left",j=y+$),I=R?r.right-j:r.left+j;var H=r.getPixelForTick(i);H+=n.aliasPixel(l),O=r.getPixelForTick(i,d.offsetGridLines),v=C,_=D,k=e.left,E=e.right,b=w=M=P=H}S.push({tx1:v,ty1:b,tx2:_,ty2:w,x1:k,y1:M,x2:E,y2:P,labelX:I,labelY:O,glWidth:l,glColor:u,glBorderDash:f,glBorderDashOffset:g,rotation:-1*x,label:t,textBaseline:F,textAlign:N})}}}),n.each(S,function(t){if(d.display&&(l.save(),l.lineWidth=t.glWidth,l.strokeStyle=t.glColor,l.setLineDash&&(l.setLineDash(t.glBorderDash),l.lineDashOffset=t.glBorderDashOffset),l.beginPath(),d.drawTicks&&(l.moveTo(t.tx1,t.ty1),l.lineTo(t.tx2,t.ty2)),d.drawOnChartArea&&(l.moveTo(t.x1,t.y1),l.lineTo(t.x2,t.y2)),l.stroke(),l.restore()),h.display){l.save(),l.translate(t.labelX,t.labelY),l.rotate(t.rotation),l.font=v.font,l.textBaseline=t.textBaseline,l.textAlign=t.textAlign;var e=t.label;if(n.isArray(e))for(var i=0,r=0;i<e.length;++i)l.fillText(""+e[i],0,r),r+=1.5*v.size;else l.fillText(e,0,0);l.restore()}}),u.display){var M,E,P=0;if(m)M=r.left+(r.right-r.left)/2,E="bottom"===o.position?r.bottom-_.size/2:r.top+_.size/2;else{var I="left"===o.position;M=I?r.left+_.size/2:r.right-_.size/2,E=r.top+(r.bottom-r.top)/2,P=I?-.5*Math.PI:.5*Math.PI}l.save(),l.translate(M,E),l.rotate(P),l.textAlign="center",l.textBaseline="middle",l.fillStyle=b,l.font=_.font,l.fillText(u.labelString,0,0),l.restore()}if(d.drawBorder){l.lineWidth=n.getValueAtIndexOrDefault(d.lineWidth,0),l.strokeStyle=n.getValueAtIndexOrDefault(d.color,0);var O=r.left,N=r.right,F=r.top,L=r.bottom,j=n.aliasPixel(l.lineWidth);m?(F=L="top"===o.position?r.bottom:r.top,F+=j,L+=j):(O=N="left"===o.position?r.right:r.left,O+=j,N+=j),l.beginPath(),l.moveTo(O,F),l.lineTo(N,L),l.stroke()}}}})}},{}],32:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,i,n){this.constructors[t]=i,this.defaults[t]=e.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(i){return this.defaults.hasOwnProperty(i)?e.scaleMerge(t.defaults.scale,this.defaults[i]):{}},updateScaleDefaults:function(t,i){var n=this.defaults;n.hasOwnProperty(t)&&(n[t]=e.extend(n[t],i))},addScalesToLayout:function(i){e.each(i.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,t.layoutService.addBox(i,e)})}}}},{}],33:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.Ticks={generators:{linear:function(t,i){var n,r=[];if(t.stepSize&&t.stepSize>0)n=t.stepSize;else{var o=e.niceNum(i.max-i.min,!1);n=e.niceNum(o/(t.maxTicks-1),!0)}var s=Math.floor(i.min/n)*n,a=Math.ceil(i.max/n)*n;t.min&&t.max&&t.stepSize&&e.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(s=t.min,a=t.max);var l=(a-s)/n;l=e.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),r.push(void 0!==t.min?t.min:s);for(var c=1;c<l;++c)r.push(s+c*n);return r.push(void 0!==t.max?t.max:a),r},logarithmic:function(t,i){var n,r,o=[],s=e.getValueOrDefault,a=s(t.min,Math.pow(10,Math.floor(e.log10(i.min)))),l=Math.floor(e.log10(i.max)),c=Math.ceil(i.max/Math.pow(10,l));0===a?(n=Math.floor(e.log10(i.minNotZero)),r=Math.floor(i.minNotZero/Math.pow(10,n)),o.push(a),a=r*Math.pow(10,n)):(n=Math.floor(e.log10(a)),r=Math.floor(a/Math.pow(10,n)));do{o.push(a),10===++r&&(r=1,++n),a=r*Math.pow(10,n)}while(n<l||n===l&&r<c);var h=s(t.max,a);return o.push(h),o}},formatters:{values:function(t){return e.isArray(t)?t:""+t},linear:function(t,i,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var o=e.log10(Math.abs(r)),s="";if(0!==t){var a=-1*Math.floor(o);a=Math.max(Math.min(a,20),0),s=t.toFixed(a)}else s="0";return s},logarithmic:function(t,i,n){var r=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===i||i===n.length-1?t.toExponential():""}}}}},{}],34:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){var i=l.color(t);return i.alpha(e*i.alpha()).rgbaString()}function i(t,e){return e&&(l.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function n(t){var e=t._xScale,i=t._yScale||t._scale,n=t._index,r=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(n,r):"",yLabel:i?i.getLabelForIndex(n,r):"",index:n,datasetIndex:r,x:t._model.x,y:t._model.y}}function r(e){var i=t.defaults.global,n=l.getValueOrDefault;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,bodyFontColor:e.bodyFontColor,_bodyFontFamily:n(e.bodyFontFamily,i.defaultFontFamily),_bodyFontStyle:n(e.bodyFontStyle,i.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:n(e.bodyFontSize,i.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:n(e.titleFontFamily,i.defaultFontFamily),_titleFontStyle:n(e.titleFontStyle,i.defaultFontStyle),titleFontSize:n(e.titleFontSize,i.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:n(e.footerFontFamily,i.defaultFontFamily),_footerFontStyle:n(e.footerFontStyle,i.defaultFontStyle),footerFontSize:n(e.footerFontSize,i.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function o(t,e){var i=t._chart.ctx,n=2*e.yPadding,r=0,o=e.body,s=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);s+=e.beforeBody.length+e.afterBody.length;var a=e.title.length,c=e.footer.length,h=e.titleFontSize,d=e.bodyFontSize,u=e.footerFontSize;n+=a*h,n+=a?(a-1)*e.titleSpacing:0,n+=a?e.titleMarginBottom:0,n+=s*d,n+=s?(s-1)*e.bodySpacing:0,n+=c?e.footerMarginTop:0,n+=c*u,n+=c?(c-1)*e.footerSpacing:0;var p=0,f=function(t){r=Math.max(r,i.measureText(t).width+p)};return i.font=l.fontString(h,e._titleFontStyle,e._titleFontFamily),l.each(e.title,f),i.font=l.fontString(d,e._bodyFontStyle,e._bodyFontFamily),l.each(e.beforeBody.concat(e.afterBody),f),p=e.displayColors?d+2:0,l.each(o,function(t){l.each(t.before,f),l.each(t.lines,f),l.each(t.after,f)}),p=0,i.font=l.fontString(u,e._footerFontStyle,e._footerFontFamily),l.each(e.footer,f),r+=2*e.xPadding,{width:r,height:n}}function s(t,e){var i=t._model,n=t._chart,r=t._chart.chartArea,o="center",s="center";i.y<e.height?s="top":i.y>n.height-e.height&&(s="bottom");var a,l,c,h,d,u=(r.left+r.right)/2,p=(r.top+r.bottom)/2;"center"===s?(a=function(t){return t<=u},l=function(t){return t>u}):(a=function(t){return t<=e.width/2},l=function(t){return t>=n.width-e.width/2}),c=function(t){return t+e.width>n.width},h=function(t){return t-e.width<0},d=function(t){return t<=p?"top":"bottom"},a(i.x)?(o="left",c(i.x)&&(o="center",s=d(i.y))):l(i.x)&&(o="right",h(i.x)&&(o="center",s=d(i.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:o,yAlign:f.yAlign?f.yAlign:s}}function a(t,e,i){var n=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,a=t.cornerRadius,l=i.xAlign,c=i.yAlign,h=o+s,d=a+s;return"right"===l?n-=e.width:"center"===l&&(n-=e.width/2),"top"===c?r+=h:r-="bottom"===c?e.height+h:e.height/2,"center"===c?"left"===l?n+=h:"right"===l&&(n-=h):"left"===l?n-=d:"right"===l&&(n+=d),{x:n,y:r}}var l=t.helpers;t.defaults.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:l.noop,title:function(t,e){var i="",n=e.labels,r=n?n.length:0;if(t.length>0){var o=t[0];o.xLabel?i=o.xLabel:r>0&&o.index<r&&(i=n[o.index])}return i},afterTitle:l.noop,beforeBody:l.noop,beforeLabel:l.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),i+=t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},afterLabel:l.noop,afterBody:l.noop,beforeFooter:l.noop,footer:l.noop,afterFooter:l.noop}},t.Tooltip=t.Element.extend({initialize:function(){this._model=r(this._options)},getTitle:function(){var t=this,e=t._options.callbacks,n=e.beforeTitle.apply(t,arguments),r=e.title.apply(t,arguments),o=e.afterTitle.apply(t,arguments),s=[];return s=i(s,n),s=i(s,r),s=i(s,o)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return l.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var n=this,r=n._options.callbacks,o=[];return l.each(t,function(t){var s={before:[],lines:[],after:[]};i(s.before,r.beforeLabel.call(n,t,e)),i(s.lines,r.label.call(n,t,e)),i(s.after,r.afterLabel.call(n,t,e)),o.push(s)}),o},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return l.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),r=e.footer.apply(t,arguments),o=e.afterFooter.apply(t,arguments),s=[];return s=i(s,n),s=i(s,r),s=i(s,o)},update:function(e){var i,c,h=this,d=h._options,u=h._model,p=h._model=r(d),f=h._active,m=h._data,g={xAlign:u.xAlign,yAlign:u.yAlign},v={x:u.x,y:u.y},y={width:u.width,height:u.height},b={x:u.caretX,y:u.caretY};if(f.length){p.opacity=1;var _=[];b=t.Tooltip.positioners[d.position](f,h._eventPosition);var x=[];for(i=0,c=f.length;i<c;++i)x.push(n(f[i]));d.filter&&(x=x.filter(function(t){return d.filter(t,m)})),d.itemSort&&(x=x.sort(function(t,e){return d.itemSort(t,e,m)})),l.each(x,function(t){_.push(d.callbacks.labelColor.call(h,t,h._chart))}),p.title=h.getTitle(x,m),p.beforeBody=h.getBeforeBody(x,m),p.body=h.getBody(x,m),p.afterBody=h.getAfterBody(x,m),p.footer=h.getFooter(x,m),p.x=Math.round(b.x),p.y=Math.round(b.y),p.caretPadding=d.caretPadding,p.labelColors=_,p.dataPoints=x,v=a(p,y=o(this,p),g=s(this,y))}else p.opacity=0;return p.xAlign=g.xAlign,p.yAlign=g.yAlign,p.x=v.x,p.y=v.y,p.width=y.width,p.height=y.height,p.caretX=b.x,p.caretY=b.y,h._model=p,e&&d.custom&&d.custom.call(h,p),h},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,r=this.getCaretPosition(t,e,n);i.lineTo(r.x1,r.y1),i.lineTo(r.x2,r.y2),i.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,i){var n,r,o,s,a,l,c=i.caretSize,h=i.cornerRadius,d=i.xAlign,u=i.yAlign,p=t.x,f=t.y,m=e.width,g=e.height;if("center"===u)a=f+g/2,"left"===d?(r=(n=p)-c,o=n,s=a+c,l=a-c):(r=(n=p+m)+c,o=n,s=a-c,l=a+c);else if("left"===d?(n=(r=p+h+c)-c,o=r+c):"right"===d?(n=(r=p+m-h-c)-c,o=r+c):(n=(r=p+m/2)-c,o=r+c),"top"===u)a=(s=f)-c,l=s;else{a=(s=f+g)+c,l=s;var v=o;o=n,n=v}return{x1:n,x2:r,x3:o,y1:s,y2:a,y3:l}},drawTitle:function(t,i,n,r){var o=i.title;if(o.length){n.textAlign=i._titleAlign,n.textBaseline="top";var s=i.titleFontSize,a=i.titleSpacing;n.fillStyle=e(i.titleFontColor,r),n.font=l.fontString(s,i._titleFontStyle,i._titleFontFamily);var c,h;for(c=0,h=o.length;c<h;++c)n.fillText(o[c],t.x,t.y),t.y+=s+a,c+1===o.length&&(t.y+=i.titleMarginBottom-a)}},drawBody:function(t,i,n,r){var o=i.bodyFontSize,s=i.bodySpacing,a=i.body;n.textAlign=i._bodyAlign,n.textBaseline="top";var c=e(i.bodyFontColor,r);n.fillStyle=c,n.font=l.fontString(o,i._bodyFontStyle,i._bodyFontFamily);var h=0,d=function(e){n.fillText(e,t.x+h,t.y),t.y+=o+s};l.each(i.beforeBody,d);var u=i.displayColors;h=u?o+2:0,l.each(a,function(s,a){l.each(s.before,d),l.each(s.lines,function(s){u&&(n.fillStyle=e(i.legendColorBackground,r),n.fillRect(t.x,t.y,o,o),n.strokeStyle=e(i.labelColors[a].borderColor,r),n.strokeRect(t.x,t.y,o,o),n.fillStyle=e(i.labelColors[a].backgroundColor,r),n.fillRect(t.x+1,t.y+1,o-2,o-2),n.fillStyle=c),d(s)}),l.each(s.after,d)}),h=0,l.each(i.afterBody,d),t.y-=s},drawFooter:function(t,i,n,r){var o=i.footer;o.length&&(t.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=e(i.footerFontColor,r),n.font=l.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),l.each(o,function(e){n.fillText(e,t.x,t.y),t.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,i,n,r,o){n.fillStyle=e(i.backgroundColor,o),n.strokeStyle=e(i.borderColor,o),n.lineWidth=i.borderWidth;var s=i.xAlign,a=i.yAlign,l=t.x,c=t.y,h=r.width,d=r.height,u=i.cornerRadius;n.beginPath(),n.moveTo(l+u,c),"top"===a&&this.drawCaret(t,r),n.lineTo(l+h-u,c),n.quadraticCurveTo(l+h,c,l+h,c+u),"center"===a&&"right"===s&&this.drawCaret(t,r),n.lineTo(l+h,c+d-u),n.quadraticCurveTo(l+h,c+d,l+h-u,c+d),"bottom"===a&&this.drawCaret(t,r),n.lineTo(l+u,c+d),n.quadraticCurveTo(l,c+d,l,c+d-u),"center"===a&&"left"===s&&this.drawCaret(t,r),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),i.borderWidth>0&&n.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},r=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&&(this.drawBackground(n,e,t,i,r),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,r),this.drawBody(n,e,t,r),this.drawFooter(n,e,t,r))}},handleEvent:function(t){var e=this,i=e._options,n=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,i.mode,i),!(n=!l.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,i.enabled||i.custom){e._eventPosition={x:t.x,y:t.y};var r=e._model;e.update(!0),e.pivot(),n|=r.x!==e._model.x||r.y!==e._model.y}return n}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,r=0,o=0;for(e=0,i=t.length;e<i;++e){var s=t[e];if(s&&s.hasValue()){var a=s.tooltipPosition();n+=a.x,r+=a.y,++o}}return{x:Math.round(n/o),y:Math.round(r/o)}},nearest:function(t,e){var i,n,r,o=e.x,s=e.y,a=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){var c=t[n];if(c&&c.hasValue()){var h=c.getCenterPoint(),d=l.distanceBetweenPoints(e,h);d<a&&(a=d,i=c)}}if(i){var u=i.tooltipPosition();o=u.x,s=u.y}return{x:o,y:s}}}}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;i.elements.arc={backgroundColor:i.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({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,i){var n=this._view;if(n){for(var r=e.getAngleFromPoint(n,{x:t,y:i}),o=r.angle,s=r.distance,a=n.startAngle,l=n.endAngle;l<a;)l+=2*Math.PI;for(;o>l;)o-=2*Math.PI;for(;o<a;)o+=2*Math.PI;var c=o>=a&&o<=l,h=s>=n.innerRadius&&s<=n.outerRadius;return c&&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=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:i.defaultColor,borderWidth:3,borderColor:i.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){var t,n,r,o,s=this,a=s._view,l=s._chart.ctx,c=a.spanGaps,h=s._children.slice(),d=i.elements.line,u=-1;for(s._loop&&h.length&&h.push(h[0]),l.save(),l.lineCap=a.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(a.borderDash||d.borderDash),l.lineDashOffset=a.borderDashOffset||d.borderDashOffset,l.lineJoin=a.borderJoinStyle||d.borderJoinStyle,l.lineWidth=a.borderWidth||d.borderWidth,l.strokeStyle=a.borderColor||i.defaultColor,l.beginPath(),u=-1,t=0;t<h.length;++t)n=h[t],r=e.previousItem(h,t),o=n._view,0===t?o.skip||(l.moveTo(o.x,o.y),u=t):(r=-1===u?r:h[u],o.skip||(u!==t-1&&!c||-1===u?l.moveTo(o.x,o.y):e.canvas.lineTo(l,r._view,n._view),u=t));l.stroke(),l.restore()}})}},{}],37:[function(t,e,i){"use strict";e.exports=function(t){function e(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2)}var i=t.helpers,n=t.defaults.global,r=n.defaultColor;n.elements.point={radius:3,pointStyle:"circle",backgroundColor:r,borderWidth:1,borderColor:r,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},t.elements.Point=t.Element.extend({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:e,inXRange:e,inYRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.y,2)<Math.pow(e.radius+e.hitRadius,2)},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(e){var o=this._view,s=this._model,a=this._chart.ctx,l=o.pointStyle,c=o.radius,h=o.x,d=o.y,u=t.helpers.color,p=0;o.skip||(a.strokeStyle=o.borderColor||r,a.lineWidth=i.getValueOrDefault(o.borderWidth,n.elements.point.borderWidth),a.fillStyle=o.backgroundColor||r,void 0!==e&&(s.x<e.left||1.01*e.right<s.x||s.y<e.top||1.01*e.bottom<s.y)&&(s.x<e.left?p=(h-s.x)/(e.left-s.x):1.01*e.right<s.x?p=(s.x-h)/(s.x-e.right):s.y<e.top?p=(d-s.y)/(e.top-s.y):1.01*e.bottom<s.y&&(p=(s.y-d)/(s.y-e.bottom)),p=Math.round(100*p)/100,a.strokeStyle=u(a.strokeStyle).alpha(p).rgbString(),a.fillStyle=u(a.fillStyle).alpha(p).rgbString()),t.canvasHelpers.drawPoint(a,l,c,h,d))}})}},{}],38:[function(t,e,i){"use strict";e.exports=function(t){function e(t){return void 0!==t._view.width}function i(t){var i,n,r,o,s=t._view;if(e(t)){var a=s.width/2;i=s.x-a,n=s.x+a,r=Math.min(s.y,s.base),o=Math.max(s.y,s.base)}else{var l=s.height/2;i=Math.min(s.x,s.base),n=Math.max(s.x,s.base),r=s.y-l,o=s.y+l}return{left:i,top:r,right:n,bottom:o}}var n=t.defaults.global;n.elements.rectangle={backgroundColor:n.defaultColor,borderWidth:0,borderColor:n.defaultColor,borderSkipped:"bottom"},t.elements.Rectangle=t.Element.extend({draw:function(){function t(t){return v[(y+t)%4]}var e,i,n,r,o,s,a,l=this._chart.ctx,c=this._view,h=c.borderWidth;if(c.horizontal?(e=c.base,i=c.x,n=c.y-c.height/2,r=c.y+c.height/2,o=i>e?1:-1,s=1,a=c.borderSkipped||"left"):(e=c.x-c.width/2,i=c.x+c.width/2,n=c.y,o=1,s=(r=c.base)>n?1:-1,a=c.borderSkipped||"bottom"),h){var d=Math.min(Math.abs(e-i),Math.abs(n-r)),u=(h=h>d?d:h)/2,p=e+("left"!==a?u*o:0),f=i+("right"!==a?-u*o:0),m=n+("top"!==a?u*s:0),g=r+("bottom"!==a?-u*s:0);p!==f&&(n=m,r=g),m!==g&&(e=p,i=f)}l.beginPath(),l.fillStyle=c.backgroundColor,l.strokeStyle=c.borderColor,l.lineWidth=h;var v=[[e,r],[e,n],[i,n],[i,r]],y=["bottom","left","top","right"].indexOf(a,0);-1===y&&(y=0);var b=t(0);l.moveTo(b[0],b[1]);for(var _=1;_<4;_++)b=t(_),l.lineTo(b[0],b[1]);l.fill(),h&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var r=i(this);n=t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom}return n},inLabelRange:function(t,n){var r=this;if(!r._view)return!1;var o=i(r);return e(r)?t>=o.left&&t<=o.right:n>=o.top&&n<=o.bottom},inXRange:function(t){var e=i(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=i(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,i,n=this._view;return e(this)?(t=n.x,i=(n.y+n.base)/2):(t=(n.x+n.base)/2,i=n.y),{x:t,y:i}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){var i=l.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}function i(t,i){var n=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t._chartjs={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var s=e(t,"width");void 0!==s&&(t.width=s)}if(null===r||""===r)if(""===t.style.height)t.height=t.width/(i.options.aspectRatio||2);else{var a=e(t,"height");void 0!==s&&(t.height=a)}return t}function n(t,e,i,n,r){return{type:t,chart:e,native:r||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function r(t,e){var i=c[t.type]||t.type,r=l.getRelativePosition(t,e);return n(i,e,r.x,r.y,t)}function o(t){var e=document.createElement("iframe");return e.className="chartjs-hidden-iframe",e.style.cssText="display:block;overflow:hidden;border:0;margin:0;top:0;left:0;bottom:0;right:0;height:100%;width:100%;position:absolute;pointer-events:none;z-index:-1;",e.tabIndex=-1,l.addEvent(e,"load",function(){l.addEvent(e.contentWindow||e,"resize",t),t()}),e}function s(t,e,i){var r=t._chartjs={ticking:!1};r.resizer=o(function(){r.ticking||(r.ticking=!0,l.requestAnimFrame.call(window,function(){if(r.resizer)return r.ticking=!1,e(n("resize",i))}))}),t.insertBefore(r.resizer,t.firstChild)}function a(t){if(t&&t._chartjs){var e=t._chartjs.resizer;e&&(e.parentNode.removeChild(e),t._chartjs.resizer=null),delete t._chartjs}}var l=t.helpers,c={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};return{acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(i(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e._chartjs){var i=e._chartjs.initial;["height","width"].forEach(function(t){var n=i[t];void 0===n||null===n?e.removeAttribute(t):e.setAttribute(t,n)}),l.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e._chartjs}},addEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var o=i._chartjs||(i._chartjs={}),a=(o.proxies||(o.proxies={}))[t.id+"_"+e]=function(e){i(r(e,t))};l.addEvent(n,e,a)}else s(n.parentNode,i,t)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var r=((i._chartjs||{}).proxies||{})[t.id+"_"+e];r&&l.removeEvent(n,e,r)}else a(n.parentNode)}}}},{}],40:[function(t,e,i){"use strict";var n=t(39);e.exports=function(t){t.platform={acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},t.helpers.extend(t.platform,n(t))}},{39:39}],41:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e,i){var n,r=t._model||{},o=r.fill;if(void 0===o&&(o=!!r.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 i(t){var e,i=t.el._model||{},n=t.el._scale||{},r=t.fill,o=null;if(isFinite(r))return null;if("start"===r?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===r?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),void 0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return e=n.isHorizontal(),{x:e?o:null,y:e?null:o}}return null}function n(t,e,i){var n,r=t[e].fill,o=[e];if(!i)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!isFinite(r))return r;if(!(n=t[r]))return!1;if(n.visible)return r;o.push(r),r=n.fill}return!1}function r(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),h[i](t))}function o(t){return t&&!t.skip}function s(t,e,i,n,r){var o;if(n&&r){for(t.moveTo(e[0].x,e[0].y),o=1;o<n;++o)c.canvas.lineTo(t,e[o-1],e[o]);for(t.lineTo(i[r-1].x,i[r-1].y),o=r-1;o>0;--o)c.canvas.lineTo(t,i[o],i[o-1],!0)}}function a(t,e,i,n,r,a){var l,c,h,d,u,p,f,m=e.length,g=n.spanGaps,v=[],y=[],b=0,_=0;for(t.beginPath(),l=0,c=m+!!a;l<c;++l)u=i(d=e[h=l%m]._view,h,n),p=o(d),f=o(u),p&&f?(b=v.push(d),_=y.push(u)):b&&_&&(g?(p&&v.push(d),f&&y.push(u)):(s(t,v,y,b,_),b=_=0,v=[],y=[]));s(t,v,y,b,_),t.closePath(),t.fillStyle=r,t.fill()}t.defaults.global.plugins.filler={propagate:!0};var l=t.defaults,c=t.helpers,h={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),r=n&&i.isDatasetVisible(e)&&n.dataset._children||[];return r.length?function(t,e){return r[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};return{id:"filler",afterDatasetsUpdate:function(o,s){var a,l,c,h,d=(o.data.datasets||[]).length,u=s.propagate,p=[];for(l=0;l<d;++l)h=null,(c=(a=o.getDatasetMeta(l)).dataset)&&c._model&&c instanceof t.elements.Line&&(h={visible:o.isDatasetVisible(l),fill:e(c,l,d),chart:o,el:c}),a.$filler=h,p.push(h);for(l=0;l<d;++l)(h=p[l])&&(h.fill=n(p,l,u),h.boundary=i(h),h.mapper=r(h))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var n=i.el,r=n._view,o=n._children||[],s=i.mapper,c=r.backgroundColor||l.global.defaultColor;s&&c&&o.length&&a(t.ctx,o,s,r,c,n._loop)}}}}},{}],42:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function i(e,i){var n=new t.Legend({ctx:e.ctx,options:i,chart:e});r.configure(e,n,i),r.addBox(e,n),e.legend=n}var n=t.helpers,r=t.layoutService,o=n.noop;return t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return n.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:n.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){n.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:o,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:o,beforeSetDimensions:o,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:o,beforeBuildLabels:o,buildLabels:function(){var t=this,e=t.options.labels,i=e.generateLabels.call(t,t.chart);e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:o,beforeFit:o,fit:function(){var i=this,r=i.options,o=r.labels,s=r.display,a=i.ctx,l=t.defaults.global,c=n.getValueOrDefault,h=c(o.fontSize,l.defaultFontSize),d=c(o.fontStyle,l.defaultFontStyle),u=c(o.fontFamily,l.defaultFontFamily),p=n.fontString(h,d,u),f=i.legendHitBoxes=[],m=i.minSize,g=i.isHorizontal();if(g?(m.width=i.maxWidth,m.height=s?10:0):(m.width=s?10:0,m.height=i.maxHeight),s)if(a.font=p,g){var v=i.lineWidths=[0],y=i.legendItems.length?h+o.padding:0;a.textAlign="left",a.textBaseline="top",n.each(i.legendItems,function(t,n){var r=e(o,h)+h/2+a.measureText(t.text).width;v[v.length-1]+r+o.padding>=i.width&&(y+=h+o.padding,v[v.length]=i.left),f[n]={left:0,top:0,width:r,height:h},v[v.length-1]+=r+o.padding}),m.height+=y}else{var b=o.padding,_=i.columnWidths=[],x=o.padding,w=0,k=0,S=h+b;n.each(i.legendItems,function(t,i){var n=e(o,h)+h/2+a.measureText(t.text).width;k+S>m.height&&(x+=w+o.padding,_.push(w),w=0,k=0),w=Math.max(w,n),k+=S,f[i]={left:0,top:0,width:n,height:h}}),x+=w,_.push(w),m.width+=x}i.width=m.width,i.height=m.height},afterFit:o,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var i=this,r=i.options,o=r.labels,s=t.defaults.global,a=s.elements.line,l=i.width,c=i.lineWidths;if(r.display){var h,d=i.ctx,u=n.getValueOrDefault,p=u(o.fontColor,s.defaultFontColor),f=u(o.fontSize,s.defaultFontSize),m=u(o.fontStyle,s.defaultFontStyle),g=u(o.fontFamily,s.defaultFontFamily),v=n.fontString(f,m,g);d.textAlign="left",d.textBaseline="top",d.lineWidth=.5,d.strokeStyle=p,d.fillStyle=p,d.font=v;var y=e(o,f),b=i.legendHitBoxes,_=function(e,i,n){if(!(isNaN(y)||y<=0)){d.save(),d.fillStyle=u(n.fillStyle,s.defaultColor),d.lineCap=u(n.lineCap,a.borderCapStyle),d.lineDashOffset=u(n.lineDashOffset,a.borderDashOffset),d.lineJoin=u(n.lineJoin,a.borderJoinStyle),d.lineWidth=u(n.lineWidth,a.borderWidth),d.strokeStyle=u(n.strokeStyle,s.defaultColor);var o=0===u(n.lineWidth,a.borderWidth);if(d.setLineDash&&d.setLineDash(u(n.lineDash,a.borderDash)),r.labels&&r.labels.usePointStyle){var l=f*Math.SQRT2/2,c=l/Math.SQRT2,h=e+c,p=i+c;t.canvasHelpers.drawPoint(d,n.pointStyle,l,h,p)}else o||d.strokeRect(e,i,y,f),d.fillRect(e,i,y,f);d.restore()}},x=function(t,e,i,n){d.fillText(i.text,y+f/2+t,e),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(y+f/2+t,e+f/2),d.lineTo(y+f/2+t+n,e+f/2),d.stroke())},w=i.isHorizontal();h=w?{x:i.left+(l-c[0])/2,y:i.top+o.padding,line:0}:{x:i.left+o.padding,y:i.top+o.padding,line:0};var k=f+o.padding;n.each(i.legendItems,function(t,e){var n=d.measureText(t.text).width,r=y+f/2+n,s=h.x,a=h.y;w?s+r>=l&&(a=h.y+=k,h.line++,s=h.x=i.left+(l-c[h.line])/2):a+k>i.bottom&&(s=h.x=s+i.columnWidths[h.line]+o.padding,a=h.y=i.top+o.padding,h.line++),_(s,a,t),b[e].left=s,b[e].top=a,x(s,a,t,n),w?h.x+=r+o.padding:h.y+=k})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,r=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var o=t.x,s=t.y;if(o>=e.left&&o<=e.right&&s>=e.top&&s<=e.bottom)for(var a=e.legendHitBoxes,l=0;l<a.length;++l){var c=a[l];if(o>=c.left&&o<=c.left+c.width&&s>=c.top&&s<=c.top+c.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),r=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),r=!0;break}}}return r}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&i(t,e)},beforeUpdate:function(e){var o=e.options.legend,s=e.legend;o?(o=n.configMerge(t.defaults.global.legend,o),s?(r.configure(e,s,o),s.options=o):i(e,o)):s&&(r.removeBox(e,s),delete e.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}}},{}],43:[function(t,e,i){"use strict";e.exports=function(t){function e(e,i){var r=new t.Title({ctx:e.ctx,options:i,chart:e});n.configure(e,r,i),n.addBox(e,r),e.titleBlock=r}var i=t.helpers,n=t.layoutService,r=i.noop;return t.defaults.global.title={display:!1,position:"top",fullWidth:!0,weight:2e3,fontStyle:"bold",padding:10,text:""},t.Title=t.Element.extend({initialize:function(t){var e=this;i.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:r,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:r,beforeSetDimensions:r,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:r,beforeBuildLabels:r,buildLabels:r,afterBuildLabels:r,beforeFit:r,fit:function(){var e=this,n=i.getValueOrDefault,r=e.options,o=t.defaults.global,s=r.display,a=n(r.fontSize,o.defaultFontSize),l=e.minSize;e.isHorizontal()?(l.width=e.maxWidth,l.height=s?a+2*r.padding:0):(l.width=s?a+2*r.padding:0,l.height=e.maxHeight),e.width=l.width,e.height=l.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var e=this,n=e.ctx,r=i.getValueOrDefault,o=e.options,s=t.defaults.global;if(o.display){var a,l,c,h=r(o.fontSize,s.defaultFontSize),d=r(o.fontStyle,s.defaultFontStyle),u=r(o.fontFamily,s.defaultFontFamily),p=i.fontString(h,d,u),f=0,m=e.top,g=e.left,v=e.bottom,y=e.right;n.fillStyle=r(o.fontColor,s.defaultFontColor),n.font=p,e.isHorizontal()?(a=g+(y-g)/2,l=m+(v-m)/2,c=y-g):(a="left"===o.position?g+h/2:y-h/2,l=m+(v-m)/2,c=v-m,f=Math.PI*("left"===o.position?-.5:.5)),n.save(),n.translate(a,l),n.rotate(f),n.textAlign="center",n.textBaseline="middle",n.fillText(o.text,0,0,c),n.restore()}}}),{id:"title",beforeInit:function(t){var i=t.options.title;i&&e(t,i)},beforeUpdate:function(r){var o=r.options.title,s=r.titleBlock;o?(o=i.configMerge(t.defaults.global.title,o),s?(n.configure(r,s,o),s.options=o):e(r,o)):s&&(t.layoutService.removeBox(r,s),delete r.titleBlock)}}}},{}],44:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},n=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,i=t.getLabels();t.minIndex=0,t.maxIndex=i.length-1;var n;void 0!==t.options.ticks.min&&(n=e.indexOf(i,t.options.ticks.min),t.minIndex=-1!==n?n:t.minIndex),void 0!==t.options.ticks.max&&(n=e.indexOf(i,t.options.ticks.max),t.maxIndex=-1!==n?n:t.maxIndex),t.min=i[t.minIndex],t.max=i[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,r=i.isHorizontal();return n.yLabels&&!r?i.getRightValue(n.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e,i,n){var r,o=this,s=Math.max(o.maxIndex+1-o.minIndex-(o.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&null!==t&&(r=o.isHorizontal()?t.x:t.y),void 0!==r||void 0!==t&&isNaN(e)){var a=o.getLabels();t=r||t;var l=a.indexOf(t);e=-1!==l?l:e}if(o.isHorizontal()){var c=o.width/s,h=c*(e-o.minIndex);return(o.options.gridLines.offsetGridLines&&n||o.maxIndex===o.minIndex&&n)&&(h+=c/2),o.left+Math.round(h)}var d=o.height/s,u=d*(e-o.minIndex);return o.options.gridLines.offsetGridLines&&n&&(u+=d/2),o.top+Math.round(u)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e=this,i=Math.max(e.ticks.length-(e.options.gridLines.offsetGridLines?0:1),1),n=e.isHorizontal(),r=(n?e.width:e.height)/i;return t-=n?e.left:e.top,e.options.gridLines.offsetGridLines&&(t-=r/2),t<=0?0:Math.round(t/r)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",n,i)}},{}],45:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:t.Ticks.formatters.linear}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,r=i.chart,o=r.data.datasets,s=i.isHorizontal();i.min=null,i.max=null;var a=n.stacked;if(void 0===a&&e.each(o,function(e,i){if(!a){var n=r.getDatasetMeta(i);r.isDatasetVisible(i)&&t(n)&&void 0!==n.stack&&(a=!0)}}),n.stacked||a){var l={};e.each(o,function(o,s){var a=r.getDatasetMeta(s),c=[a.type,void 0===n.stacked&&void 0===a.stack?s:"",a.stack].join(".");void 0===l[c]&&(l[c]={positiveValues:[],negativeValues:[]});var h=l[c].positiveValues,d=l[c].negativeValues;r.isDatasetVisible(s)&&t(a)&&e.each(o.data,function(t,e){var r=+i.getRightValue(t);isNaN(r)||a.data[e].hidden||(h[e]=h[e]||0,d[e]=d[e]||0,n.relativePoints?h[e]=100:r<0?d[e]+=r:h[e]+=r)})}),e.each(l,function(t){var n=t.positiveValues.concat(t.negativeValues),r=e.min(n),o=e.max(n);i.min=null===i.min?r:Math.min(i.min,r),i.max=null===i.max?o:Math.max(i.max,o)})}else e.each(o,function(n,o){var s=r.getDatasetMeta(o);r.isDatasetVisible(o)&&t(s)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||s.data[e].hidden||(null===i.min?i.min=n:n<i.min&&(i.min=n),null===i.max?i.max=n:n>i.max&&(i.max=n))})});i.min=isFinite(i.min)?i.min:0,i.max=isFinite(i.max)?i.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var i,n=this,r=n.options.ticks;if(n.isHorizontal())i=Math.min(r.maxTicksLimit?r.maxTicksLimit:11,Math.ceil(n.width/50));else{var o=e.getValueOrDefault(r.fontSize,t.defaults.global.defaultFontSize);i=Math.min(r.maxTicksLimit?r.maxTicksLimit:11,Math.ceil(n.height/(2*o)))}return i},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i=this,n=i.start,r=+i.getRightValue(t),o=i.end-n;return i.isHorizontal()?(e=i.left+i.width/o*(r-n),Math.round(e)):(e=i.bottom-i.height/o*(r-n),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,r=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*r},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,i)}},{}],46:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,i=t.options.ticks;if(i.beginAtZero){var n=e.sign(t.min),r=e.sign(t.max);n<0&&r<0?t.max=0:n>0&&r>0&&(t.min=0)}void 0!==i.min?t.min=i.min:void 0!==i.suggestedMin&&(null===t.min?t.min=i.suggestedMin:t.min=Math.min(t.min,i.suggestedMin)),void 0!==i.max?t.max=i.max:void 0!==i.suggestedMax&&(null===t.max?t.max=i.suggestedMax:t.max=Math.max(t.max,i.suggestedMax)),t.min===t.max&&(t.max++,i.beginAtZero||t.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var i=this,n=i.options.ticks,r=i.getTickLimit(),o={maxTicks:r=Math.max(2,r),min:n.min,max:n.max,stepSize:e.getValueOrDefault(n.fixedStepSize,n.stepSize)},s=i.ticks=t.Ticks.generators.linear(o,i);i.handleDirectionalChanges(),i.max=e.max(s),i.min=e.min(s),n.reverse?(s.reverse(),i.start=i.max,i.end=i.min):(i.start=i.min,i.end=i.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],47:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:t.Ticks.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,r=n.ticks,o=i.chart,s=o.data.datasets,a=e.getValueOrDefault,l=i.isHorizontal();i.min=null,i.max=null,i.minNotZero=null;var c=n.stacked;if(void 0===c&&e.each(s,function(e,i){if(!c){var n=o.getDatasetMeta(i);o.isDatasetVisible(i)&&t(n)&&void 0!==n.stack&&(c=!0)}}),n.stacked||c){var h={};e.each(s,function(r,s){var a=o.getDatasetMeta(s),l=[a.type,void 0===n.stacked&&void 0===a.stack?s:"",a.stack].join(".");o.isDatasetVisible(s)&&t(a)&&(void 0===h[l]&&(h[l]=[]),e.each(r.data,function(t,e){var r=h[l],o=+i.getRightValue(t);isNaN(o)||a.data[e].hidden||(r[e]=r[e]||0,n.relativePoints?r[e]=100:r[e]+=o)}))}),e.each(h,function(t){var n=e.min(t),r=e.max(t);i.min=null===i.min?n:Math.min(i.min,n),i.max=null===i.max?r:Math.max(i.max,r)})}else e.each(s,function(n,r){var s=o.getDatasetMeta(r);o.isDatasetVisible(r)&&t(s)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||s.data[e].hidden||(null===i.min?i.min=n:n<i.min&&(i.min=n),null===i.max?i.max=n:n>i.max&&(i.max=n),0!==n&&(null===i.minNotZero||n<i.minNotZero)&&(i.minNotZero=n))})});i.min=a(r.min,i.min),i.max=a(r.max,i.max),i.min===i.max&&(0!==i.min&&null!==i.min?(i.min=Math.pow(10,Math.floor(e.log10(i.min))-1),i.max=Math.pow(10,Math.floor(e.log10(i.max))+1)):(i.min=1,i.max=10))},buildTicks:function(){var i=this,n=i.options.ticks,r={min:n.min,max:n.max},o=i.ticks=t.Ticks.generators.logarithmic(r,i);i.isHorizontal()||o.reverse(),i.max=e.max(o),i.min=e.min(o),n.reverse?(o.reverse(),i.start=i.max,i.end=i.min):(i.start=i.min,i.end=i.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},getPixelForValue:function(t){var i,n,r,o=this,s=o.start,a=+o.getRightValue(t),l=o.options.ticks;return o.isHorizontal()?(r=e.log10(o.end)-e.log10(s),0===a?n=o.left:(i=o.width,n=o.left+i/r*(e.log10(a)-e.log10(s)))):(i=o.height,0!==s||l.reverse?0===o.end&&l.reverse?(r=e.log10(o.start)-e.log10(o.minNotZero),n=a===o.end?o.top:a===o.minNotZero?o.top+.02*i:o.top+.02*i+.98*i/r*(e.log10(a)-e.log10(o.minNotZero))):0===a?n=l.reverse?o.top:o.bottom:(r=e.log10(o.end)-e.log10(s),i=o.height,n=o.bottom-i/r*(e.log10(a)-e.log10(s))):(r=e.log10(o.end)-e.log10(o.minNotZero),n=a===s?o.bottom:a===o.minNotZero?o.bottom-.02*i:o.bottom-.02*i-.98*i/r*(e.log10(a)-e.log10(o.minNotZero)))),n},getValueForPixel:function(t){var i,n,r=this,o=e.log10(r.end)-e.log10(r.start);return r.isHorizontal()?(n=r.width,i=r.start*Math.pow(10,(t-r.left)*o/n)):(n=r.height,i=Math.pow(10,(r.bottom-t)*o/n)/r.start),i}});t.scaleService.registerScaleType("logarithmic",n,i)}},{}],48:[function(t,e,i){"use strict";e.exports=function(t){function e(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function i(t){var e=t.options.pointLabels,i=p.getValueOrDefault(e.fontSize,f.defaultFontSize),n=p.getValueOrDefault(e.fontStyle,f.defaultFontStyle),r=p.getValueOrDefault(e.fontFamily,f.defaultFontFamily);return{size:i,style:n,family:r,font:p.fontString(i,n,r)}}function n(t,e,i){return p.isArray(i)?{w:p.longestText(t,t.font,i),h:i.length*e+1.5*(i.length-1)*e}:{w:t.measureText(i).width,h:e}}function r(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:t<n||t>r?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function o(t){var o,s,a,l=i(t),c=Math.min(t.height/2,t.width/2),h={r:t.width,l:0,t:t.height,b:0},d={};t.ctx.font=l.font,t._pointLabelSizes=[];var u=e(t);for(o=0;o<u;o++){a=t.getPointPosition(o,c),s=n(t.ctx,l.size,t.pointLabels[o]||""),t._pointLabelSizes[o]=s;var f=t.getIndexAngle(o),m=p.toDegrees(f)%360,g=r(m,a.x,s.w,0,180),v=r(m,a.y,s.h,90,270);g.start<h.l&&(h.l=g.start,d.l=f),g.end>h.r&&(h.r=g.end,d.r=f),v.start<h.t&&(h.t=v.start,d.t=f),v.end>h.b&&(h.b=v.end,d.b=f)}t.setReductions(c,h,d)}function s(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function a(t){return 0===t||180===t?"center":t<180?"left":"right"}function l(t,e,i,n){if(p.isArray(e))for(var r=i.y,o=1.5*n,s=0;s<e.length;++s)t.fillText(e[s],i.x,r),r+=o;else t.fillText(e,i.x,i.y)}function c(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function h(t){var n=t.ctx,r=p.getValueOrDefault,o=t.options,s=o.angleLines,h=o.pointLabels;n.lineWidth=s.lineWidth,n.strokeStyle=s.color;var d=t.getDistanceFromCenterForValue(o.reverse?t.min:t.max),u=i(t);n.textBaseline="top";for(var m=e(t)-1;m>=0;m--){if(s.display){var g=t.getPointPosition(m,d);n.beginPath(),n.moveTo(t.xCenter,t.yCenter),n.lineTo(g.x,g.y),n.stroke(),n.closePath()}if(h.display){var v=t.getPointPosition(m,d+5),y=r(h.fontColor,f.defaultFontColor);n.font=u.font,n.fillStyle=y;var b=t.getIndexAngle(m),_=p.toDegrees(b);n.textAlign=a(_),c(_,t._pointLabelSizes[m],v),l(n,t.pointLabels[m]||"",v,u.size)}}}function d(t,i,n,r){var o=t.ctx;if(o.strokeStyle=p.getValueAtIndexOrDefault(i.color,r-1),o.lineWidth=p.getValueAtIndexOrDefault(i.lineWidth,r-1),t.options.gridLines.circular)o.beginPath(),o.arc(t.xCenter,t.yCenter,n,0,2*Math.PI),o.closePath(),o.stroke();else{var s=e(t);if(0===s)return;o.beginPath();var a=t.getPointPosition(0,n);o.moveTo(a.x,a.y);for(var l=1;l<s;l++)a=t.getPointPosition(l,n),o.lineTo(a.x,a.y);o.closePath(),o.stroke()}}function u(t){return p.isNumber(t)?t:0}var p=t.helpers,f=t.defaults.global,m={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:t.Ticks.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}},g=t.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,i=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var n=p.min([t.height,t.width]),r=p.getValueOrDefault(i.fontSize,f.defaultFontSize);t.drawingArea=e.display?n/2-(r/2+i.backdropPaddingY):n/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;p.each(e.data.datasets,function(r,o){if(e.isDatasetVisible(o)){var s=e.getDatasetMeta(o);p.each(r.data,function(e,r){var o=+t.getRightValue(e);isNaN(o)||s.data[r].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()},getTickLimit:function(){var t=this.options.ticks,e=p.getValueOrDefault(t.fontSize,f.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){this.options.pointLabels.display?o(this):s(this)},setReductions:function(t,e,i){var n=this,r=e.l/Math.sin(i.l),o=Math.max(e.r-n.width,0)/Math.sin(i.r),s=-e.t/Math.cos(i.t),a=-Math.max(e.b-n.height,0)/Math.cos(i.b);r=u(r),o=u(o),s=u(s),a=u(a),n.drawingArea=Math.min(Math.round(t-(r+o)/2),Math.round(t-(s+a)/2)),n.setCenterPoint(r,o,s,a)},setCenterPoint:function(t,e,i,n){var r=this,o=r.width-e-r.drawingArea,s=t+r.drawingArea,a=i+r.drawingArea,l=r.height-n-r.drawingArea;r.xCenter=Math.round((s+o)/2+r.left),r.yCenter=Math.round((a+l)/2+r.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this,n=i.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+i.xCenter,y:Math.round(Math.sin(n)*e)+i.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks,r=p.getValueOrDefault;if(e.display){var o=t.ctx,s=r(n.fontSize,f.defaultFontSize),a=r(n.fontStyle,f.defaultFontStyle),l=r(n.fontFamily,f.defaultFontFamily),c=p.fontString(s,a,l);p.each(t.ticks,function(a,l){if(l>0||e.reverse){var h=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),u=t.yCenter-h;if(i.display&&0!==l&&d(t,i,h,l),n.display){var p=r(n.fontColor,f.defaultFontColor);if(o.font=c,n.showLabelBackdrop){var m=o.measureText(a).width;o.fillStyle=n.backdropColor,o.fillRect(t.xCenter-m/2-n.backdropPaddingX,u-s/2-n.backdropPaddingY,m+2*n.backdropPaddingX,s+2*n.backdropPaddingY)}o.textAlign="center",o.textBaseline="middle",o.fillStyle=p,o.fillText(a,t.xCenter,u)}}}),(e.angleLines.display||e.pointLabels.display)&&h(t)}}});t.scaleService.registerScaleType("radialLinear",g,m)}},{}],49:[function(t,e,i){"use strict";var n=t(6);n="function"==typeof n?n:window.moment,e.exports=function(t){function e(t,e){var i=t.options.time;if("string"==typeof i.parser)return n(e,i.parser);if("function"==typeof i.parser)return i.parser(e);if("function"==typeof e.getMonth||"number"==typeof e)return n(e);if(e.isValid&&e.isValid())return e;var r=i.format;return"string"!=typeof r&&r.call?(console.warn("options.time.format is deprecated and replaced by options.time.parser."),r(e)):n(e,r)}function i(t,e,i,n){for(var r,o=Object.keys(a),s=o.length,l=o.indexOf(t);l<s;l++){r=o[l];var c=a[r],h=c.steps&&c.steps[c.steps.length-1]||c.maxStep;if(void 0===h||Math.ceil((i-e)/(h*c.size))<=n)break}return r}function r(t,e,i,n){var r=a[i],o=r.size,s=Math.ceil((e-t)/o),l=1,c=e-t;if(r.steps)for(var h=r.steps.length,d=0;d<h&&s>n;d++)l=r.steps[d],s=Math.ceil(c/(o*l));else for(;s>n&&n>0;)++l,s=Math.ceil(c/(o*l));return l}function o(t,e,i){var r=[];if(t.maxTicks){var o=t.stepSize;r.push(void 0!==t.min?t.min:i.min);for(var s=n(i.min);s.add(o,t.unit).valueOf()<i.max;)r.push(s.valueOf());var a=t.max||i.max;r[r.length-1]!==a&&r.push(a)}return r}var s=t.helpers,a={millisecond:{size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{size:1e3,steps:[1,2,5,10,30]},minute:{size:6e4,steps:[1,2,5,10,30]},hour:{size:36e5,steps:[1,2,3,6,12]},day:{size:864e5,steps:[1,2,5]},week:{size:6048e5,maxStep:4},month:{size:2628e6,maxStep:3},quarter:{size:7884e6,maxStep:4},year:{size:3154e7,maxStep:!1}},l={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}};t.Ticks.generators.time=function(t,e){var i,r,s=t.isoWeekday;return"week"===t.unit&&!1!==s?(i=n(e.min).startOf("isoWeek").isoWeekday(s).valueOf(),r=n(e.max).startOf("isoWeek").isoWeekday(s),e.max-r>0&&r.add(1,"week"),r=r.valueOf()):(i=n(e.min).startOf(t.unit).valueOf(),r=n(e.max).startOf(t.unit),e.max-r>0&&r.add(1,t.unit),r=r.valueOf()),o(t,0,{min:i,max:r})};var c=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},determineDataLimits:function(){var t,i=this,n=i.options.time,r=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,a=i.chart.data,l={labels:[],datasets:[]};s.each(a.labels,function(s,a){var c=e(i,s);c.isValid()&&(n.round&&c.startOf(n.round),t=c.valueOf(),r=Math.min(t,r),o=Math.max(t,o),l.labels[a]=t)}),s.each(a.datasets,function(a,c){var h=[];"object"==typeof a.data[0]&&null!==a.data[0]&&i.chart.isDatasetVisible(c)?s.each(a.data,function(s,a){var l=e(i,i.getRightValue(s));l.isValid()&&(n.round&&l.startOf(n.round),t=l.valueOf(),r=Math.min(t,r),o=Math.max(t,o),h[a]=t)}):h=l.labels.slice(),l.datasets[c]=h}),i.dataMin=r,i.dataMax=o,i._parsedData=l},buildTicks:function(){var n,o,a=this,l=a.options.time,c=a.dataMin,h=a.dataMax;if(l.min){var d=e(a,l.min);l.round&&d.round(l.round),n=d.valueOf()}l.max&&(o=e(a,l.max).valueOf());var u=a.getLabelCapacity(n||c),p=l.unit||i(l.minUnit,n||c,o||h,u);a.displayFormat=l.displayFormats[p];var f=l.stepSize||r(n||c,o||h,p,u);a.ticks=t.Ticks.generators.time({maxTicks:u,min:n,max:o,stepSize:f,unit:p,isoWeekday:l.isoWeekday},{min:c,max:h}),a.max=s.max(a.ticks),a.min=s.min(a.ticks)},getLabelForIndex:function(t,i){var n=this,r=n.chart.data.labels&&t<n.chart.data.labels.length?n.chart.data.labels[t]:"",o=n.chart.data.datasets[i].data[t];return null!==o&&"object"==typeof o&&(r=n.getRightValue(o)),n.options.time.tooltipFormat&&(r=e(n,r).format(n.options.time.tooltipFormat)),r},tickFormatFunction:function(t,e,i){var n=t.format(this.displayFormat),r=this.options.ticks,o=s.getValueOrDefault(r.callback,r.userCallback);return o?o(n,e,i):n},convertTicksToLabels:function(){var t=this;t.ticksAsTimestamps=t.ticks,t.ticks=t.ticks.map(function(t){return n(t)}).map(t.tickFormatFunction,t)},getPixelForOffset:function(t){var e=this,i=e.max-e.min,n=i?(t-e.min)/i:0;if(e.isHorizontal()){var r=e.width*n;return e.left+Math.round(r)}var o=e.height*n;return e.top+Math.round(o)},getPixelForValue:function(t,i,n){var r=this,o=null;if(void 0!==i&&void 0!==n&&(o=r._parsedData.datasets[n][i]),null===o&&(t&&t.isValid||(t=e(r,r.getRightValue(t))),t&&t.isValid&&t.isValid()&&(o=t.valueOf())),null!==o)return r.getPixelForOffset(o)},getPixelForTick:function(t){return this.getPixelForOffset(this.ticksAsTimestamps[t])},getValueForPixel:function(t){var e=this,i=e.isHorizontal()?e.width:e.height,r=(t-(e.isHorizontal()?e.left:e.top))/i;return n(e.min+r*(e.max-e.min))},getLabelWidth:function(e){var i=this,n=i.options.ticks,r=i.ctx.measureText(e).width,o=Math.cos(s.toRadians(n.maxRotation)),a=Math.sin(s.toRadians(n.maxRotation));return r*o+s.getValueOrDefault(n.fontSize,t.defaults.global.defaultFontSize)*a},getLabelCapacity:function(t){var e=this;e.displayFormat=e.options.time.displayFormats.millisecond;var i=e.tickFormatFunction(n(t),0,[]),r=e.getLabelWidth(i);return(e.isHorizontal()?e.width:e.height)/r}});t.scaleService.registerScaleType("time",c,l)}},{6:6}]},{},[7])(7)}),Chart.elements.Rectangle.prototype.draw=function(){function t(t){return _[(w+t)%4]}var e,i,n,r,o,s,a,l,c=this._chart.ctx,h=this._view,d=h.borderWidth,u=this._chart.options.barRadius?this._chart.options.barRadius:0;if(h.horizontal?(e=h.base,i=h.x,n=h.y-h.height/2,r=h.y+h.height/2,o=i>e?1:-1,s=1,a=h.borderSkipped||"left"):(e=h.x-h.width/2,i=h.x+h.width/2,n=h.y>2*u?h.y-u:h.y,o=1,s=(r=h.base)>n?1:-1,a=h.borderSkipped||"bottom"),d){var p=Math.min(Math.abs(e-i),Math.abs(n-r)),f=(d=d>p?p:d)/2,m=e+("left"!==a?f*o:0),g=i+("right"!==a?-f*o:0),v=n+("top"!==a?f*s:0),b=r+("bottom"!==a?-f*s:0);m!==g&&(n=v,r=b),v!==b&&(e=m,i=g)}c.beginPath(),c.fillStyle=h.backgroundColor,c.strokeStyle=h.borderColor,c.lineWidth=d;var _=[[e,r],[e,n],[i,n],[i,r]],w=["bottom","left","top","right"].indexOf(a,0);-1===w&&(w=0);var k=t(0);c.moveTo(k[0],k[1]);for(var S=1;S<4;S++)k=t(S),nextCornerId=S+1,4==nextCornerId&&(nextCornerId=0),nextCorner=t(nextCornerId),width=_[2][0]-_[1][0],height=_[0][1]-_[1][1],x=_[1][0],y=_[1][1],(l=u)>height/2&&(l=height/2),l>width/2&&(l=width/2),c.moveTo(x+l,y),c.lineTo(x+width-l,y),c.quadraticCurveTo(x+width,y,x+width,y+l),c.lineTo(x+width,y+height-l),c.quadraticCurveTo(x+width,y+height,x+width-l,y+height),c.lineTo(x+l,y+height),c.quadraticCurveTo(x,y+height,x,y+height-l),c.lineTo(x,y+l),c.quadraticCurveTo(x,y,x+l,y);c.fill(),d&&c.stroke()},function(t){"use strict";t.sessionTimeout=function(e){function i(){p||(t.ajax({type:l.ajaxType,url:l.keepAliveUrl,data:l.ajaxData}),p=!0,setTimeout(function(){p=!1},l.keepAliveInterval))}function n(){clearTimeout(s),(l.countdownMessage||l.countdownBar)&&o("session",!0),"function"==typeof l.onStart&&l.onStart(l),l.keepAlive&&i(),s=setTimeout(function(){"function"!=typeof l.onWarn?t("#session-timeout-dialog").modal("show"):l.onWarn(l),r()},l.warnAfter)}function r(){clearTimeout(s),t("#session-timeout-dialog").hasClass("in")||!l.countdownMessage&&!l.countdownBar||o("dialog",!0),s=setTimeout(function(){"function"!=typeof l.onRedir?window.location=l.redirUrl:l.onRedir(l)},l.redirAfter-l.warnAfter)}function o(e,i){clearTimeout(c.timer),"dialog"===e&&i?c.timeLeft=Math.floor((l.redirAfter-l.warnAfter)/1e3):"session"===e&&i&&(c.timeLeft=Math.floor(l.redirAfter/1e3)),l.countdownBar&&"dialog"===e?c.percentLeft=Math.floor(c.timeLeft/((l.redirAfter-l.warnAfter)/1e3)*100):l.countdownBar&&"session"===e&&(c.percentLeft=Math.floor(c.timeLeft/(l.redirAfter/1e3)*100));var n=t(".countdown-holder"),r=c.timeLeft>=0?c.timeLeft:0;if(l.countdownSmart){var s=Math.floor(r/60),a=r%60,h=s>0?s+"m":"";h.length>0&&(h+=" "),h+=a+"s",n.text(h)}else n.text(r+"s");l.countdownBar&&t(".countdown-bar").css("width",c.percentLeft+"%"),c.timeLeft=c.timeLeft-1,c.timer=setTimeout(function(){o(e)},1e3)}var s,a={title:"Your Session is About to Expire!",message:"Your session is about to expire.",logoutButton:"Logout",keepAliveButton:"Stay Connected",keepAliveUrl:"/keep-alive",ajaxType:"POST",ajaxData:"",redirUrl:"/timed-out",logoutUrl:"/log-out",warnAfter:9e5,redirAfter:12e5,keepAliveInterval:5e3,keepAlive:!0,ignoreUserActivity:!1,onStart:!1,onWarn:!1,onRedir:!1,countdownMessage:!1,countdownBar:!1,countdownSmart:!1},l=a,c={};if(e&&(l=t.extend(a,e)),l.warnAfter>=l.redirAfter)return console.error('Bootstrap-session-timeout plugin is miss-configured. Option "redirAfter" must be equal or greater than "warnAfter".'),!1;if("function"!=typeof l.onWarn){var h=l.countdownMessage?"<p>"+l.countdownMessage.replace(/{timer}/g,'<span class="countdown-holder"></span>')+"</p>":"",d=l.countdownBar?'<div class="progress">                   <div class="progress-bar progress-bar-striped countdown-bar active" role="progressbar" style="min-width: 15px; width: 100%;">                     <span class="countdown-holder"></span>                   </div>                 </div>':"";t("body").append('<div class="modal fade" id="session-timeout-dialog">               <div class="modal-dialog">                 <div class="modal-content">                   <div class="modal-header">                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>                     <h4 class="modal-title">'+l.title+'</h4>                   </div>                   <div class="modal-body">                     <p>'+l.message+"</p>                     "+h+"                     "+d+'                   </div>                   <div class="modal-footer">                     <button id="session-timeout-dialog-logout" type="button" class="btn btn-default">'+l.logoutButton+'</button>                     <button id="session-timeout-dialog-keepalive" type="button" class="btn btn-primary" data-dismiss="modal">'+l.keepAliveButton+"</button>                   </div>                 </div>               </div>              </div>"),t("#session-timeout-dialog-logout").on("click",function(){window.location=l.logoutUrl}),t("#session-timeout-dialog").on("hide.bs.modal",function(){n()})}if(!l.ignoreUserActivity){var u=[-1,-1];t(document).on("keyup mouseup mousemove touchend touchmove",function(e){if("mousemove"===e.type){if(e.clientX===u[0]&&e.clientY===u[1])return;u[0]=e.clientX,u[1]=e.clientY}n(),t("#session-timeout-dialog").length>0&&t("#session-timeout-dialog").data("bs.modal")&&t("#session-timeout-dialog").data("bs.modal").isShown&&(t("#session-timeout-dialog").modal("hide"),t("body").removeClass("modal-open"),t("div.modal-backdrop").remove())})}var p=!1;n()}}(jQuery),function(t){t.idleTimer=function(e,i){var n;"object"==typeof e?(n=e,e=null):"number"==typeof e&&(n={timeout:e},e=null),i=i||document,n=t.extend({idle:!1,timeout:3e4,events:"mousemove keydown wheel DOMMouseScroll mousewheel mousedown touchstart touchmove MSPointerDown MSPointerMove"},n);var r=t(i),o=r.data("idleTimerObj")||{},s=function(e){var n=t.data(i,"idleTimerObj")||{};n.idle=!n.idle,n.olddate=+new Date;var r=t.Event((n.idle?"idle":"active")+".idleTimer");t(i).trigger(r,[i,t.extend({},n),e])},a=function(e){var n=t.data(i,"idleTimerObj")||{};if(("storage"!==e.type||e.originalEvent.key===n.timerSyncId)&&null==n.remaining){if("mousemove"===e.type){if(e.pageX===n.pageX&&e.pageY===n.pageY)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(+new Date-n.olddate<200)return}clearTimeout(n.tId),n.idle&&s(e),n.lastActive=+new Date,n.pageX=e.pageX,n.pageY=e.pageY,"storage"!==e.type&&n.timerSyncId&&"undefined"!=typeof localStorage&&localStorage.setItem(n.timerSyncId,n.lastActive),n.tId=setTimeout(s,n.timeout)}},l=function(){var e=t.data(i,"idleTimerObj")||{};e.idle=e.idleBackup,e.olddate=+new Date,e.lastActive=e.olddate,e.remaining=null,clearTimeout(e.tId),e.idle||(e.tId=setTimeout(s,e.timeout))};if(null===e&&void 0!==o.idle)return l(),r;if(null===e);else{if(null!==e&&void 0===o.idle)return!1;if("destroy"===e)return function(){var e=t.data(i,"idleTimerObj")||{};clearTimeout(e.tId),r.removeData("idleTimerObj"),r.off("._idleTimer")}(),r;if("pause"===e)return function(){var e=t.data(i,"idleTimerObj")||{};null==e.remaining&&(e.remaining=e.timeout-(+new Date-e.olddate),clearTimeout(e.tId))}(),r;if("resume"===e)return function(){var e=t.data(i,"idleTimerObj")||{};null!=e.remaining&&(e.idle||(e.tId=setTimeout(s,e.remaining)),e.remaining=null)}(),r;if("reset"===e)return l(),r;if("getRemainingTime"===e)return function(){var e=t.data(i,"idleTimerObj")||{};if(e.idle)return 0;if(null!=e.remaining)return e.remaining;var n=e.timeout-(+new Date-e.lastActive);return n<0&&(n=0),n}();if("getElapsedTime"===e)return+new Date-o.olddate;if("getLastActiveTime"===e)return o.lastActive;if("isIdle"===e)return o.idle}return r.on(t.trim((n.events+" ").split(" ").join("._idleTimer ")),function(t){a(t)}),n.timerSyncId&&t(window).bind("storage",a),(o=t.extend({},{olddate:+new Date,lastActive:+new Date,idle:n.idle,idleBackup:n.idle,timeout:n.timeout,remaining:null,timerSyncId:n.timerSyncId,tId:null,pageX:null,pageY:null})).idle||(o.tId=setTimeout(s,o.timeout)),t.data(i,"idleTimerObj",o),r},t.fn.idleTimer=function(e){return this[0]?t.idleTimer(e,this[0]):this}}(jQuery),function(){"use strict";function t(n){if(!n)throw new Error("No options passed to Waypoint constructor");if(!n.element)throw new Error("No element option passed to Waypoint constructor");if(!n.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,n),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=n.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var n in i)e.push(i[n]);for(var r=0,o=e.length;r<o;r++)e[r][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=r.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,n[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,n={},r=window.Waypoint,o=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete n[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,r.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){e.didScroll&&!r.isTouch||(e.didScroll=!0,r.requestAnimationFrame(t))})},e.prototype.handleResize=function(){r.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var n=e[i],r=n.newScroll>n.oldScroll?n.forward:n.backward;for(var o in this.waypoints[i]){var s=this.waypoints[i][o],a=n.oldScroll<s.triggerPoint,l=n.newScroll>=s.triggerPoint,c=a&&l,h=!a&&!l;(c||h)&&(s.queueTrigger(r),t[s.group.id]=s.group)}}for(var d in t)t[d].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?r.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?r.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var n=0,r=t.length;n<r;n++)t[n].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),n={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var o in t){var s=t[o];for(var a in this.waypoints[o]){var l,c,h,d,u,p=this.waypoints[o][a],f=p.options.offset,m=p.triggerPoint,g=0,v=null==m;p.element!==p.element.window&&(g=p.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(p):"string"==typeof f&&(f=parseFloat(f),p.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,p.triggerPoint=g+l-f,c=m<s.oldScroll,h=p.triggerPoint>=s.oldScroll,d=c&&h,u=!c&&!h,!v&&d?(p.queueTrigger(s.backward),n[p.group.id]=p.group):!v&&u?(p.queueTrigger(s.forward),n[p.group.id]=p.group):v&&s.oldScroll>=p.triggerPoint&&(p.queueTrigger(s.forward),n[p.group.id]=p.group)}}return r.requestAnimationFrame(function(){for(var t in n)n[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in n)n[t].refresh()},e.findByElement=function(t){return n[t.waypointContextKey]},window.onload=function(){o&&o(),e.refreshAll()},r.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},r.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),n[this.axis][this.name]=this}var n={vertical:{},horizontal:{}},r=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var n=this.triggerQueues[i],r="up"===i||"left"===i;n.sort(r?e:t);for(var o=0,s=n.length;o<s;o+=1){var a=n[o];(a.options.continuous||o===n.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=r.Adapter.inArray(e,this.waypoints);return i===this.waypoints.length-1?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=r.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=r.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return n[t.axis][t.name]||new i(t)},r.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,n){t[n]=e[n]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],n=arguments[0];return t.isFunction(arguments[0])&&((n=t.extend({},arguments[1])).handler=arguments[0]),this.each(function(){var r=t.extend({},n,{element:this});"string"==typeof r.context&&(r.context=t(this).closest(r.context)[0]),i.push(new e(r))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(),function(t){"use strict";t.fn.counterUp=function(e){var i=t.extend({time:400,delay:10},e);return this.each(function(){var e=t(this),n=i;e.waypoint(function(){var t=[],i=n.time/n.delay,r=e.text(),o=/[0-9]+,[0-9]+/.test(r);r=r.replace(/,/g,"");/^[0-9]+$/.test(r);for(var s=/^[0-9]+\.[0-9]+$/.test(r),a=s?(r.split(".")[1]||[]).length:0,l=i;l>=1;l--){var c=parseInt(r/i*l);if(s&&(c=parseFloat(r/i*l).toFixed(a)),o)for(;/(\d+)(\d{3})/.test(c.toString());)c=c.toString().replace(/(\d+)(\d{3})/,"$1,$2");t.unshift(c)}e.data("counterup-nums",t),e.text("0");e.data("counterup-func",function(){e.text(e.data("counterup-nums").shift()),e.data("counterup-nums").length?setTimeout(e.data("counterup-func"),n.delay):(e.data("counterup-nums"),e.data("counterup-nums",null),e.data("counterup-func",null))}),setTimeout(e.data("counterup-func"),n.delay)},{offset:"100%",triggerOnce:!0})})}}(jQuery);

OHA YOOOO
����JFIF��� ( %!1!%)+...383-7(-.+  ---+--------------------+-----7------+-7-----+---++����"����M!1AQaq�"2���Rr��#3Bb�s����CSc��$4���D���TdE������'1!AQ"2q�a���� ?�Z�L�[�����=D�6]�T mѰx$�6��@ۣ`�Itl �"��(6�Dst�2:��Fk���x���4��K�h}�l �?r��@��!�Q��Y��?��-� =��O�����(6����<A�x%B��<A�x%B��<(6�@��.���*%���$e�m��T�wi��~H�]F�Ѱx"�`�Ul��ꃁ���RPl�6�UIA�x(���#�B��zy%�<�L���mvN �ԭ6�Y$Qk �S��䮰�K6ף�x�+�T��L4���>�C=j�������p�|J�ǥ���b=���Y�6g9��F1��Y�vݩ�`��塏��>� � �ݨ,�����A�o�=W*���"��>����� \ �"݄(꧈�y���9�m���d�aAD�u&�T��D �@$BITU�"��D�D!BH�� � �UTu� �^c�?�[ND�K�`�\F'�jf��<�G�G��B�q]�����!tl�6�]\4mѰx"��<�6��B�֊�o4.�Ah�8QM,�y�����%cLh��y�c����!�8Tb���h�!p�q�t����EIA�x'Pl �KT N h6�J�P7�6Ԩ�6恰&��� �� � ����R���)m�`8�nC�J���E��%H� D�"T �n��W�s+���x���+g�?t��@�����;�>�o��0�����|Ћ0�����|"�J�%EBBBB!X�����|��X��̟s��Ӭ��H獎ŏ m׷�0���—���2q����s�'q]�����7�%����hp8EAYy�Ӗc��9%�A� _g�ٙ���}ӯ�Ul�Ƽl Ѓ�a�ۮ9�i�*��R"�*������:��j�zE+�H ����kB�2�e��~��Zd# ��0Vr�T�ev������Y�����-8]o��x�~)�9��}W:RF֟��P�A�� ���G+hH�P6�����:���Ԁ��I�O{Y�F��$U"H�#2��*J����L��L�B�*��T`���(�-:�R�H Z��"�B�Ihh��B�B�����urP�%� ��9��7v",�!�A�b�X�V6F��� ���^K�+��f��qm^��'�9�K� �����o��! ��P�%B����E��}Xo�U��(BXJ󥯢t��u�&�}Xj +%�7+�c� �\��t�9t p*)��L�Z��T��KTC�NGT�PH pQ�� ɚ^qB ��8!�*��� P��"T iHS���n��W�s+���x���,mtG��@��D~���� } tY������Y���4����!!@!@!@!@�a�^h��R���*��|!���Us;����n:��#���4-h�chW꼝���%�+Z�kA��E%��4“M$�����@y�q˓��ʽ�� $U��������eH�-;�a�ކ�&����*IB� �Z�w��;c��|�3JZ@��-��w�k������Q�Ϊ �g�d���I��G����8�N�G�����(R)�2�_�]3;]z7]�2�w�r����I�Iĭ=15���b~ 2�{cuO�'෎V�nyI)��1s�� ����i�lT*�ݠ�������H��p��^j�C�Q�B*(������(m�Wb ���Z�)P*D$EGimZU�ViZ��┵\�P�L���IW���Eh����[榚V�R8+l��zV<�B�M�j�V�pw�%�*�UKYǒ}�J�% ���(�����HM��NQ�S�toԝ�ܪZd�ল���,UP�J�=�Z m�T��-]��y��*k+���:�%J��V���X�i�o6�D38�h�=� �'G�$�@��X��H�P�~��X��e�Ã�����4���WS��x�3���q�˓V�S��k'�K�w�N�w�eb��,��bcw�1�� �ȃ�%����͖��Bd�J��*V�Y��.;Kh�� �*���1 X���-�� �OJ��$ sCU��H�Zj���N��e�m�zT�"T��%���8�(Q�4 雐��d8���j�$NH�'$@�� �a�< ᴖ��K��W ��5}��{��-�����w�}�,Y����䴣�,��S�|�R��BT D!�R ^��I *I4m%Gk�2&�y�m$�k;�7m��sW���:�q��!汖s��]�i�;(��ƣ�7_�Ve�o\㛜K�y���T/.yܝ�2! �AB(BD��ꦽ� �EX�w2��\�����^{Nɥ�=����lB�V���y ��t||�K$�v��Ȃ>* D��Q��z$�y��F�MqD��(���鍵M2 �G� ;[r*4�T�Rd�oV#�t+���P�A-��v�*�>��PhU ���-QJ��Y�mE;k�"�F�?%���R��&������G�ӳhx;�i��h���5��+�Cr��8���B�:�+BI�Ϯ�LOٳ��=�~��,��b�t�C�6p\����x ��«�!{�ҽhh��7<� ĊW���<�CNw�ai�@��ںf����j#^�Ny���\^rRU9�1u`�RC% T)SCM��VtR��U溢�f���i�|��Y/SpWF�V ��*�A�5)%T9����'B��O "�TTTQZTm�Dv] �����U����������R�����5�/B^�.�/���"rE�8B)�"�P�D!Km�<W��y�� |�[�m���,Y\A�]��7��f����ѻ,H�Zj[���eh� (N+P�U"N�*���ء6L� 뛐�������"T D!BBT�"�#��I~%�͑�W ���Q���w��] ���.���.��<���O��Zl�,��S�|���%F��9"H�Cj�66��4Wy��NTR��i Y��� '����|���c<�fژ��E�����\>.�|hH�Yem��&��"h!!*lehjӼ �s�HQ�b���� pi�Η|h�'�Rh��SP3 ۽�$0��P X?�w�-;5���4h�{� ���/U�v ���ְ\2o��e�����@(��+�u���Ē�����B^��&�M]�B� �"��D��@!@!@!,�lΖF��W=���^����da�cehi�����_��#d��[ 9_=�]�Ù^�$!�-p8�u�(B�/� ��A�!�����\�F4q��3����:�[�>�w�ك�[���]��<��[�3�'��M+�yMH�R D�P��(�P��AJ�b Qq�F�bq�ߪ:J�$j��8�-5 ��z@�#��K� ڕ�N ԺKړ�^y߉�Ԭ.�tv��n9��w���n�|s�Z��;q"{���9�! �BJ��BMe��=�`���֍�&�Ba�{� ���v ���@�> ���lp�6������uRh�"�i�,ɯ�79o�*�� ��V�&�[\v��:�bq k�|���\͒��1��]q��C �xi")��*0w��{��0�c��������߸ɢj�X�MQ����Y�R%B�D�P��!�$@$J��J��K�����r^�V~�� p�KWg���.��m 뛶���L�Z Bã� U; �H7�V�A��+�B��r R7!�%\���!�!�!�� �a��W�����+��Z�cw���]�C�D��}˽��]��g���>KM���?���� G�4HI&����i=,�Ge��*��o���ׯ r�c�RZ����$� ����fӿ.:��q'\j�M\㼕j�g�߃rh�� � S\ ��g���d%UkY� ��?Nn>�Y$ &�,�[/I�ZC��>�a��S�K��p ��� �Ƭ�QY�X��h!M�m�h�8]p���y%� C/gt����ڭX��� c�iW\�;'�i�� �atd���ā�7(6L`��]�=��hP��.�ss��X�9�X��ji�;��t��\��V���0f�87�U�?k��ww3W�|��=L@� ���OG��bv�Z���uj��AD�BEjubӨ&����F�Wgb�G���:�uT1��ni���y|�X�Etu������n�k�D��q57���g�A�n ��X]&����+����sD%�0�p��<��Vtm�����Z���9�^�Y*�(�{�/��j���sn}uz�����_n����������MErjΎ��[#N-5�5�a\��cu]m��M�WN�b�_ p�t�q�~ '��H�- y�@7%Oj�h�y/B��d�k�-{o�,-5��i�4toWx꘳�_�(E�LJ�í�m;�]t��V�^23I�{�h�g�43-zJ�ֽ��g�Z "'!N��:� N������Qku�8�3�n^���s,�6(� �nv��.�),��eƷK�\K����IPO�A��������e�K���ڌ6����yW�)֋��Z}�m{쾙��x���{hyn+/EY�l�W!-�$�U.��I��� ��� �� �/M�;��Pݎx�"~+��Ή1�&ѯ���=����#�ыv�$�[�"�R��To�v~)�U�˨ x0^q��S���^�d����ʠ�W� ��5�B���dy"��&�õ���c��g�+��9��ugh�ޖG���7������ �곗Hz;f�L��`8���{"��؛f�1��&�)J[�I������!n��v��b�Ik{�������ŋ���qo�s\��}ɛ\*KO<=h�L�2�U��Z� ���v���[O��8�@7$t����4S2r�ʬm���)18op�?��]1%�<��&71�k�.�s$.?-��s�ïZ� C�DjFC�w֠r+�@U4U��xY2����N�w�S�\S+�� P�0D��� ����R�>*D�3�֎m�Fu��v^k��,�9�-�V����M�k���Rw֏�Z�[Y�=���q:Aů%�>�����O�0�pmӅC�^뇍6��+E��N�f>29^L����=e�gi�-0�����e�W5��U�E�x�і��(ZKH�F(�Y�mrA;Gf\�H�z�G��iw� �^�r�y������-.��9��2|�%���ÌR�����J��� x��ab��KD�꾏!�k��D�s4o���F/9�2��fv��?y���z;WLC�T�*���l�"�b[�qi��A� ����Vf�җ�W'fA������� ¢�#h?%.�҆�lߊ�_��w� 6�uA�*V�;M�y�*�OY����1MZ6��g1�PsWiv�e���%B����@�B"�@$�TQF�т@p�q֫9��+��F��bF� VljWx�B�%���L����ۗ$��˒r������ � � d�p:KZ����+��Z�c{��r��D�ކ}˿h}��"be�I !���-[��n�{ft�J`�ь7f#�\c�{rڱ����T0уQ~���Q��h�����9���;��Ֆr�Ts�Y�dt��L�ٳx�R�i�<�B�g�=��^caؤs�EI��SAEɤ6�\��b�pn_�Z�U�u�� c\}Z�a��y��B�PZ���'�Ya���Ʈ��N�� ��I�C��,Vp��+A^Y,��,h*��[P�!�|�����I-,nn��& �x��u )�T�o��%��]8-x�m�dh́�sz]�/�#�}�{� �uq*͚��1=��g27�4�l�;���Rn�v�G�zܑ`�Z9���j� �ᲈ�X̜�]�$���OYɊT��2� %BAJ����� �:�uԮU�j_� z'�48d�T'��F�g�rI�Ƹ��+ :��p� '$涨�䳶J5�k�48Tk�[;c��K=��zՕXʛuS��"��Q�8l �m��ˋ��k+���ᴇ��$V _�%$g��k��]��GZ�t�^ʹ�쮣��k��m�2V:9׊8c෎v%�8O�&}�����]�\�G4?��3F ,�6I9�k��^�����m���TЕm � J�P� ��}�� ��Y���2��}�&���{��|(Y�o���J���v�qܶ��EAA����BG�o<�Y1�K+�����۽���^�dŹ���-�v�����P��It���sh�VŦ���ޫ.H�4+�9m�ώ�Q �H���%D�@�!@�%@AFkK��B�&hCm��8'&7.A9y�P�$J�B�P�*BJp< �t���͑�W�����E- ��#�h�8��� {K�s���Zgu���m=IU�v���;!�cϴ� ��J�"r\ 0 p��+�8T��e]ĵy�rߧ\'�4s\�ep����� <�ޑ}ƶ!��9�V�Mk]R;1���4L���'2j���B��F@c���f���e=�k�t�n�?X��2W����j����&��Ꜩ�n�WԮ�5� �����G���|h�m�(ݹ��@Z��VY$?�6�qy$�'���l�z��Õ��I���pK_ny�Tlq��<��.#��)��&���0�)#;s�`k��xn5ʞ�4�-�Y� ���'�kFe���k%������=�{c9���u�L�Ut��,�`g���iS)Z��Z@���l8B��P1�y��Z�ѩ�\�㏲Vk���&K,��I4����iX!��U,���7‰l����`t��E�I��ʺN�P�(����k!�}֒�\q��-m'%؝CBh����aTn[�%Z}�C��0P>bs$�)�4���x��9E�&�^EQf��!�mt�z��8��ձhR�Rw�ͨ��{>g��(��c�C���p�� �޺ S��n� l���$lgn�ۂ����I�{݉$�XnM��-{��Z��E-����n��*Si/`s?%��8��6�<����� \7A��WZR#���Ǔi�˹ V2*��B�� �� T�=3n�&юA�� ���%��_O� ->���G�EgJ�C��a?��tl@����6��m��Q���p�s(^���*�� � �Tfi :�b��Ed���׀�|c���8^a���F�[J�~7*@n�3��2��j��mik^��NyF�J�g�������6���*@��Pg�珢�C�g��*=5���R��g�=U_��;G�~)&��M���\<�F,�]�&��<\o�L�]����g �� r޿��������$kk��i(�!�ݥE�V�E�;ͨ���헮�����5���TiTM�z��+N����Ī��J�e{ݺ6 �n$�q<�Y�!�1�yAs����.�@��U�%+�έ��u\]J�`�Mdփ��C���;3��:&�^��7NK ���øS��]��'�7v�M;�ä\BD�1�P:�J#i��u��e���mZ���<���X?eew'8��� �=��փ��.����Ԯe�c�e�O)�KZ9 rW,�����a#[���U[�03\ޚ�\QU�3���L<⵶Zv�dP2���4d5����\f���f�b���н�~��x��e�I��J��e�M2���d��oݴ���\|2M��6U�.��RYt|���O~�Q��pV���։c��C����E:�9��q@��N�D�;� �y�;M�Z�3���BԷڒ� ���Sm>�t��q�O@��=��s�6����H���EAi����e��;��ղ� p�<1T�&��79�ǽ�1#�5��'xµ��eODB��Z^;@7o5���"����xZ+�!S6�<�&�5��z���xa�.������73k�6��Yc@@ � ���D� ��� �f����438D75�/?��.�%����� � ?�7�L�)�u�����ٙ�S�]��s+���?��r.�G��e���sBBB!Y�4]��) G���g OҴʡi�͐�6QԼ�' �2wT�~��p嬙�z�q��ˆ8a�-��f^ˆҀ���L����E4�GX^�5�(�R�a���>���F�v"! �5�~>�]�,�~*2��n�M���>�i�A �B1U����<�R&��ϊz2�*FV�ѵ����Fm������Z5���~�r�T-�=� �1�7���pP��N �otg���dǟGo޶D�l�U����T��hp8��ε���n#ӊ�[y98��(�N!![p5 P�D! �� $8��r�#r�/;� �ȪD rTԨ�J��f�y��i.w�#�n ��k��V���#�b7]���|�^l61�w�ܼO�\�=�:`��s:=3��H��zJ3ʾJ*�Ղ�f����V�8�c0�pV[�u�!5��*ZRJFw�|�(�Ù���{���5$�8p �d$�A�J��rI���4��Gm������V�2����#2��Y N ��C��zy���+e-���q��H�]<�9�W{��%&��g��2���[���sq �U���f�Ӎ�<.���@�e=�$h�y��r��� ��vޢ���1���{.�%E�I�6�����L,��s���F�e`�Z�w5�� ��?� ���uzR��0U��?́o�i#���t��)�u[#�{M�9�q��劘�?�OdqOџv8���q>�}�c��Y�:E��U��tj/�i��#�7�yQl�����4��vUg�~;�h�� �@'�\�09�9���S�Z�Ӕ�K]��KE�8�l{�?V��ܪ��{ւ�ٱ�ԕ��zd�U�tD��~�*.j��[Du0=��w'�kR�q��z5 x: Dߘ���k��WYh�Y�OUg ���t�w*�>u��du�L'P�����O%���iuմ���=�JpvnZcm�^��OٱC%܌�`�����Ee�L�u���غ�^�owȭ�<2�����W���v�����[�KK_P*�_i�ͮ\A�Fl��h ŭ��K��r�E��;FB�qSUs�'�W�'v�ߴp?tës��`�bm;b��H�bN���q�A���u���ki�Ԕ4A�J���"Ƌ��36C[�sLM�k���⺖��/����z�(J+{���+�|��8Q��\����͎���g��ޫ#-s\�F@�d��CR��4;��Y,⍾[4m�1��m�>��4�9B�� .�%�WTm�w�����Z։n��+�vD! :�ZO��7����t�.�\����u0 x��K>Et61�g$�B�!@!@!T ���%�̭/ ��]Ȁy+)IF>�����Ů����;�+Y�p��xzqY�3��!r|�L����͛��O�ތ�G�{��snV/9���v{Cd˲�~JE�*T�Q����[�G���z?{� �T��pg�H�;��ϊzBHP�m�6��`�>�n>��V�G� qEh��S� ��h�rZ߭�ю+$g�� ����xU:3�4��M{�f���^'�ܰ�}�7�y$�u�V��R�s@z�Z05��4d�i�&�Эe-��6�5���]�v�a# %dU']\|��vv���~����TuN`u ��I�gn'������C\#�|j�>�t��"�3�� ��$��̈́��1��K�yƤ��;�'⦉�A ��4�B1*�J���ft{I}fɓ�� �n��n!>ۦ!���\�n�i��& �s���+>]%yŐ]�����G�8f(�m,v6�{s=� `�8:�`�G�;�à����6��`��?S(V�"6觼}��WW�lQ�p��J�l�ST]��0V��LX?��j�,��ԝc}��O�;C�)�v���,toe/�Ԩ�D��hhFí] K&��H륎l�b�+'�.��Hޛl�> j�c�woI�����`+�Jݶ�D���z'S�÷/�r�_�[A�i��7v��w/��@ ~��T�pɼ� ^�)�z34��$D ��R=�l�[�j�a��FGT&�ŧ6��V��H�S�ttY]%o�3��y O�Y�4ⴹ�����D��F���94�zx���]{ܾ+7��*;P�nX�E I7t�XW���4�KD��i���epS��B72U{)B3cZ`nc;����բ��F�<�72Bמ������\k��F��?��$-�F�� ��Z,�fHۯhsM*�4��FY��@цbP�\�ÎW:s@JE�.�������b��N�D�$d��w�]49oi��Z|Ŏu���+}�WC�6b| Ǵ�P[��ps��Q��`�����=�G6�c� �R]N&�&�Fƣ������u�� i�Yњ[�������n���eu� ~,�=�k�4d��Bז�������;���Q�˴Ѱ1����()�yT}4�5�pd&�i5��n�ZvN������eÔ�br�~^�6�����v�m���:���Q=�8���O���Pw8��汴gL,Ґ�(�]{K��<�G�����+,o��3^�暃]��j �E �i#;�Դ v�iz3ƃ� Ap&X.Iڤч~�vNBAMy�uf [��u@�v��3�5��$�V���5�����9��i?�72:ր7U����S~�"y$��Rv�C�+�5�NЋh������ �mt�+�4��*$Ұ!�1�����z��:*��3�l�sX�1���h�J�g��`{NTj#h#Q���yL�y�ڜ1,}d��h�qh�p�Eq��g,�f�����(���]'�E]�����S?y���O��G˽G� ��?�͓�$�Ew�4{���I�i=��o#�Ը�(��Ru��[�L�ܾ݉���e��������_�g��?�\oY������U�}'����A� ��������DU�e�����M�o��/.S��o�aVsd��H��a�2v8�����V琽셤� .q�"m/P�$����u/i���V�;��:���­�2��W��.�{uÖ����>���ô1���'2w�i L2 �W(�}d�9����� H�A�= �!�) �d�\D�������ԥ�f���j F�AA�p 䴖u�G��XHd����L����xb7�Ly5�X�����׳�G������a�����4���t9=KjIµ+���c�x7�Q���ߊ�!T*��� :ߣ��nb)�h+E�����̓�k�k��+MU�X� ���=�Л�Է&����ݽ����;��]��Xwj:���b��C�Z�i�>9��sRf��h����� ��y�NF��%Mn\���*TԵD*Tڥ@�SP��SR�Ir< ാ��=���|��$��\&����ʟ� ���].=�������ĴsX���U�6�����*�]q�T���s�]¾�%��> Ș������غ�C)[�x$���WL�(,P�6�m�� mķ�5��MJ`QU����3A��k�W�6 ��� �����p8��5�G��ߑ�8�8�㹠rZ�hm nM��\�/��R�D�45�Z(� 70�B��Ktu�/=uƨ�:n;�y[�)�4���Hʂ6�[yƙō?�4��P��;��Ini���l�CJ��_I��j�,m��A�)N ;o�?�o�+�ש���BQ]t�i�h�RQKu!��j.�HIu�D�W�'�EٴT�il�}YV�>�{[��������uV?Gض���.>�Ol�/�+�݌@�;� ��Kr#��yͮ N��R��b�4��f�+�N�������q���๮��'Z�hid/-m�/�����y+)���4��,�X��p0dC^��A��jk�h�|.��6݆�lu2?T��р�55�MJ�3lWL]U���C�g ��o �W���~���˯P�@H��H�۲�(rjD��OE��E�����˻L�9r��J�q�����hΝ?�b�)9�%2��׍k�(��p��D��l��8„�m 3�J�U��b���� 鵝��C+����p��;���Ŧ��L�J�6��VF���_�U�z���ϴ���I�U��"�������.�@f�I��f��8�R.��i��6�X�V���Ү�Yg�u&GK,.oU#X�H܉qp7{�h����@)�$����j���`�I��5�lQ����⊪�y f� �CҤJ��!%�\��o�:#�V�DkpVI=���h9�n�� ˾�gcm20�����u�p�kȯSj���姫�z�N �և�K�lg}�a�ⴴ��8_#�Ɨ8�h�y�EzGz�#d�Z]V{��o1�6�2;nG�4� ��[�Ⴐ����$�W1�� cƾEJ��'��S��[��Z�(i=��j�skq����1�mOF�,� �h�ܕ��0��1�P�v�a��6�N��ӆI���Ln�1�1���滑�x�l�x7�v���y���X���-�)���W�]�uN�P� � ��y�(U� a���m h&k�����(������gk� �1��M(]��7�v� �xi�K,a„,y"������j��<6V���Wm�' �c[]N ����@ܹ'U1���R��@�SR�T$�J�� &G�\5�}��� �Z�w�O�yfy��7�\O�\�n���=��(�.��v�OK��:�����2Q�q�� x�.ӦhC��=IU�ƙ��h��' �)��R��E�g��cuG!�i�}X� [K*����+�m+���F-=a�H難�����5� �p�U\���fd��#��Nh!fݪT׶�*" adL����edr8��߼�d��PKt�{\ ^�{.i��P��$l)�[�Ǎi�j�Y���8 5>��e�p'�D,8G����C������Ň�5ql���+u � ����Tv7�`;FK�� c��Tƫ�zQ�>�3�;���1�V��N>R�Ň�G'/�?�ƚZ�ˍI$�IQT�NB�2>m�6�o�K��rU�!��Ev�BiT�"�BH� � \ڧ!w2�VSKVt�D��k��p$�L��F�<QoG�� �����׍�9�Ts^���̞&L��Esx5��4�E�0�����VX�u~6�t<��sṷ~�t����O ������xR����Ů�\��Qk��� �'<��jpx���Go��R\�S.���Ë�ӯ#�: ���~�0'���t��ׁtsK��hd��4����=���^��{Z����i�EAS<|j㗔Q�E� �� b4���<��-KL�_��J6юÛoj�\�b�2m�9��Y��G�_������m�/�B����lo�H�aR93�o �=����Y#|�IBZ�h�c�5�a����sՈek���F �*N��$`sH ��2 �U7���?w+��:�!�t\�p�CP]x��c(�A)��Sj��qm> ���0:�c\�=��|����V��1�Q� ��j:�1 9c*�tx:�i�hAe p"��i��k�T�no�;�)Ri�w��WF�upJ��@�SR�pB@��6�j�R�Bˑ�W�WHv����o�v�8�uO��G`W3W.7����}:q�i=*�GĀ�,�7%(6��I�ݓ����xM�`8)����$��$�WfY,���64��4h�����^;(u$��^rf�ơ�3䎉�u�V_xg��9����N�р��ʐ59Q���4V[�4��M��X�L� 4纥5J� ����k�r4vdh����O*U�"�!����3C$�"��+G㌟6�G  �����Yt�Վ��2sN���ɉq�@#.�暁#?)��j5)[°�S1I��#��p�C�KKi#��'ǵ�^���/��LK[�7� �s�9�;ҭ�J���x�J)^�U�{'��EI����T4T�}�k�+ �~#��{j=�ﭑ��t�����\�A�/g�;���k��O��V��훧-Ή�k0|��� s����y.|G��W8���<έ�-��BKc�e�;��[_�+%g'���o��i�*V�@�#�TM��Ց�9��6��w ���ed��R l�N��M�)J������G�V�L�k?UQPK�#��(�/F᳓!d��dpȜ(���n��E���t� qX�"��Y#��t�}�`��v����FY�=҂ )`4|���]��xS. ȥr��ZFI�t�>�ƍMh��%{x0���͗� P�B�� � JS$U*B ���@!@!@!@QB!6��� ��-ςVM/F�µ��A�� �4�,�Yt�}k���X��6^�P�{��ӆV�&��u�F�v�Qmtg���g0��-.0�ݺ���jk��{�'j���H�W=�{��8ԯ.vd�$�Ҭkݺ%-ls�����|�Яn�A����dx9�g�x�Y��Ln$���)Z�sV4�cO�Y�F<~G��b��~�?� ���m%��w�џvH�)��bgH��,��f�%��B^�}��O�o�)��ү�����e�}۟Խ���.�c�$p������H�׆��u���5�x K#��.��P��i�vG0y4+��~�?�<1߳�O�~��-k�^�!|lq���q�HJZ�AT/S�Np�UgDXoG��E>;Q�y;_=�Xsy��C!��a�v�u��'9���k8v9�#��n���4 qћ���q x�nz��|���b�,�i�� ����x�we��R�EB!@$)Rn������z�x�F�-�pBF�8%E BD� �J��J��9%�<���.�Uͅ��Y)Y�$��j���b�7=�;qB���y�o �u�sV�^���qǷZF�t@�}nA�D�� ��!�k����6�C!Ƅސ���c��$/b� ֆ�ZA�P�t�yS��!e��!�!�!�!U )a�s($��7�sc�+�+��W�6y��Z�s]�k�k��P��Nٺ�[� ������zZ��X�PZ?) ��;u�\_K#w�~8�N�+A»n��lQ�]��$���]�IIC��#�kN ^�����C�<�i36���~ � ͺ?�Y�չ$o�� �Ů����^�����@ � �ZG�S�a��� m k�w �0�AA)�Ǔ,z�8�&�>��V0�Ƶw�ܵ����(7%U��-%��c�l�u�C{��&Yܻ^L�f���sZ֊�8�� 䬷[m���O�i�?x�\�L�g.{�+��1���\Ʀ�@ i�NB�s ��龝F�Yfi�� )���Cy\���\d��{��s�4��O*�N⤞�u�j.uMv⚄/���|ܮ�P�*���R � �!P$J���PMN@!*D��� �!%�D"��}��:�f�R��E�z�х�}RFS+�w1�� �x/7�O[v��^�������J�).���`����Hm�ROz'1���0�\���S٧��Q��g?W��ub{i��]ą��Ykhu�����c}���]|�*�'��ix�϶h|�*7�����!|��X�<2��H�g��k���=����8��4k1[v C/N���{Z p�ؘ�Mݧk�-��4������9B�v��y9r�^ɡt�v������4�� �V�^S�+��z�:��\�.�w�1�}X�ö���j�3ӿ��t��O!�_��C����&]����o��4 �����+���ľ�&Jw�X> �KO"��`��V �n=�a\{k?�UT�8%_F>aP�"�R ��@���P �P�B (Q�)�Oc��ÁBi ��� � � T!�R �F4�՟ q!����MN �w"|��Jr��j�7Wol�����C���R���1����[�x�B$?_����c�*n���i�W��������/(�ұ���ͻ#���q�H�� �L��V��u��/�^Ž8�Q���s�t���Zߎ�&�������y5ɖ�eA�f�7B� Y'xP�CBq`��C0ƻT�{��G�,�M� �B �#%�=�_Z��l��6<;�W�^$һߣM'G>�Nl~�x��T�5�z*AN ��Q�v~*D( d�ge���:³J��Pv&�\ ��j�F��4ێ��;A�9;楆F����ӟ-�{��-Mk@� ��*]�n��+ pp�MB�L��x�ɻ��Tdؾ���d���Fv�T��*;BBBD T!UҖ��3kG�L<胗^.q�r��^7��Wkh�3SX����U��v���7K�8��}h�̖��=K7G<�%���KJ������}^�T��/����d�c�f�*rBBBBB ��A�zF� �HBT �zi�ʗZ"���ƽkxH�v�? �C��%y�Mz1�8�aoٻ�h~ONƹ;$�^#�u�6!5��^���O�W1�.�]7F�`H��bw��\�GԮ�ݛ�p��]"�x{.�o�� �R5�S�i���څo��+��X;���Z2�M�*����FѬs^�l��9㓼�P����9���*E��cHQ�k�f�ٸs�Ժe���� ���\/N����>n?%��t���3��ަ-������´TV��1ߕ�� �=����؎ �(��} z|�T! �BD��E�4�d�\��T�R%Z@�!�* p�@�P� ���f��HF�/ԦM�&���! P"���T�A�У�g?����5^ �m� ��w#�����ndδ>9�m�����Ƹm����{z�o�;E�G��ݐ�g�>��`^Ch��^9�I�q>k��}%2��;Ee��q �i�� Y��8Uk� {g�=�2Q�pAM��Gխl|26X��y�8�TsUKT���z3�Yl��E�4�FV�]��A�~J�{��Od`9����}�q#kA����su��{.���Nװ�5��#"4\,Ӵ�qb9�=hZ� hv]�k�5���0�x�հ�+)2 R!C,�vNН��Ɂ��G��J�#� ���5�-f�=��{l�o`EA�*�2^��S�e� ��8!W6��4a��#��%Mn\���P�*)P�*D U��Ii`�I94�>M�Z�����6�k$y�KCԳ��5gl��dv�s$���W�~3�B?t���xooL�WC�z�tm���>�;G�i�z��}��M,�}�a���S��5�M q�:r�`!@!@!@!@!@!@!@��E�8q'!�=2��՝���Լ�=K���:�e�aX�A�489�c�j����^����EA0B��t}�I/�������a����<�r�9-6j�:��������+9�,"�� �������D������F{�=������t���P>�s=�?�Wn ����1�;T�Ŵ���j3�8|v��E����OS�Z�� �����-i�p��׆֓Q�Nn?/qǃ��껅���m� ��.�9�p �dAȮ?���B��0��ג=�L�6X�G.���Uev���$v����U/N]�:�T�uB�8_O��g�B�*D�6L�`��Dȃ.k?*�*D-!P� � D�F D�(���P��b�:��KI����#��+l��TB �B繬cK��5�hĹ�4s)��~��.jt��p �P�MGjPb��;ݹL���Α�&�|Խj���Y/:�/7�`] .��j+�y�^��"�[,���i�fY�s�ye��66��$V��;�W��蟭۠�f��d����R÷�;�X�.�:�����7���p�+�ccs�m ���(��fM�m���[,P0E ��|&)#!���� W"3"���aӯ��~� ����������hk�7�.f����*RK�����ߢ�IK~Z��]- G�TDӫi9�����o�Me�ء�9�Dz�$�8z��`@��k#�2� �^�C��Ѥ:�F�ܤ�� u�E��C������_m H� ��v?�m��W���.���8C��w�q澴��������$�T��Q��D�kFƁ�:E�g���u�GP�����;���yu�at.+�(�0s�y�?���{*G:��*k�E@�Ȃ����47N�J��UƐ�/�i#ۈ9�{��W��~.��Y�](׀施�[MU��Xu��7� B�T!"BD T!!!�Al�2F:7�9��X�qS��V� �m��$�2{.��89������,�������#d�#��]�����"tR �ÛN�4�!p�j7� l���G,&7bЇ��G G�'X�e��e���i9��x��#��D&�G`q�qR�|x+C��L��C�ѵ�7�#�1��:��F�fR�Ni��,�� TҔ��v)-�@�dto&�:��x���5�J�^^^?{�g.櫝R�M,���'b�r�c_?%�&��O]�H�D3R��5�����OBT����P�(�R �f�P�D*�,d�>7�NrUB�'jICِ��63����&��J�QD�J�E�e릊��t��xҍ���ܫU�I},�G >�����äu�Hb���#m���c7�$M &����Y;��دH�9饭���m��fN�/�5�`Z{ з���%�=� _[�u�{�{Ndv����kk�M6�p�'8H�ėd�%K��{F��>��9ͺ�lkh��n�N׹� ��.��h#G��� ��o��j�<ׇ &���0���R�3+�N���� ��4��kE�5~��:��5���A8�k!�c�c���i4�4T8ePuQ3E}� ~���GՏZ޺id��n!ΒS�2�٧|n��D�E#�}6^iY�O$���z�<�L��@VcQ�} t�i;`|U������H ���KC������Z��[\�7������^�����87ch��4��V��mC��y� ����81�������SPv?C�^8-��G Lmc 4k]V����` kj��cm|�2="���Z&��ZZ�� Mpk�ZV��Լ������7n ]�6���]���ˡԢ����.��M ���4{��V9��Z] d�ɥ#'�P Ay��ю�M�2e{#�ѭ܅M7*q���MN�v��I�HsIii����FE\q��諒*�-� f4� �5,�G�ZN׹� v��ql�#���G��=�|�t�q�U�$�¤�P��z7n�Ŗ)+RX���]� �5�;A�\ѕ��RBOݼ=����O����g�y�ˤ�f^�u8X-�fk�Zj�H�j��7��[uSr��]е��6,�M�ё�渐�iZjä�'d�\3�[�{��\���Б ��H���}㸡%�����i��R���U����P R!���?O�H u�[�Ok�C�=nŠ{O`�PO�+WN�YX�a�狍��5�+*|^����?Լ��n���I�v�vC�W�N�wh���u�6�^���H�� �`+UP������B?�+�n!"TFu�:;�*�ԴCxo,�q��&�4���ne>����L릏��#}���g�$�W�d����O�ZkC��;�г��;�dZ�aݶ�J`���=�c0���=��if����oٵ��Ӭs�. �sIk�X�=�0~#X:��q�yG�� Sh�[���u� -5i�GQ�E��вZE�Dq�ym��ਨߗ���+0��d����h:�|��F^�Qg�Ϡc\�a�^k�+�tz����f��U����q+ج�6F۱��h�Ɔ��'�Ayv�o���=��U�Y鹅��U�5��4{\ñ�->}�����##N��8x�sX�x�;��)�鯣�,��+g~�U�-9r!y�����~�>�h$e]��4^�9�qˎ�:l��Lb*�஻s�f,��ZL{Z�-�D%BH�R!*PN�j�)� �,X���D�.m,Œz�褕�[��:6WW$m�P�*U� �Ϊա�DJ,�J�!@�ZU�1VV�J� Hn��=Vq�KUa�*��U��aP�*���iCf��O�M��8��XK٘���S�=��lK��P ����,�ס"U�� �p�r#"3 #�J�>� $��,��ٚ�h!TB :����[���P���! 8"�!�M�T ��@�H�i;A��R���}��|�PaO)|�?Q����;#Оj�A2��kO�T�2�Cv o* �5����=��Axr��N3Qab�v��ඊ�N�����f��q��B��hWV��o��[p�B�U�`�F�YB��#��-4�p޳Ee٥c��ֶ�?j{QKќ����I�t��\e!�`����H�$��J��ؽ���q�.�|~_�˗�c�v�tf�k�b����iFKOgaܷ!���y�`��Nd� ���њe�Q��jy���������' ��|����Ci�T�)�"��PF�U�=��;�pۭ��u A�*2T!!!! �+I��v� �=D�`%$TBH� �񦲵t����K^�#�r;]�w��Y�lk&�Ĝ�㋜w�S�T>8�E�� ���FPIJ��M(�J�PR%B)r� p ��7�*D���;;8�_+}��?G�e�G��_�v(Ve~��}<���^�����`� �0�賭?Gv����s�m<׬ ��˔�f��^'i腽�ٞ�?�1�ɦ�*�a�<$�H��9��{�������T.��/�c�G�F4۫ܭ��K߳Ŏ���w�hV�����b�X�J�:5�ɟ,����$]�����߻|3x����y�+wG�p�%�V�����څ�r�~\�Q��%��չYѥ HH�*�1MS���Z�HJ��� P�6(�T))�@%H��!Q,L�h�q�P�U*˕U��<.��>#B�e ����:+�M���F��\��X� xK H¦SmK��֧,��[��,Rk�u��{.��5����@!@ �n?h�)Sm�x�(Zi�ܒ� VZB* Z��?/r?i���X0�"����t��y��F?N'��r\�.��c7UmN��a{ ���<�YF7 aZl'<�v�SO�w����ixރ^�v����޶}۽ҹ�Ci\J�^�:�h�g�5k,�>�X���/�ෂۅBBR�V���ɴV�� KLiN�]e#�@91�۷l�2�4�R�Ay�cuos�4.Y�|�"�\Mf����ku2��N<<�ޓ�?��H�ok#�&���@r ��(8���+N=ƴ4T묝�G%�ڨ}W���ݩ�NsH�Q5m��o|��ä́� ���ݑݚ�,V�L��5�9�c�����tn��\#2{�5�~T\98e�;z8��>�N��r�b� ��as#K6qB J������{��֣$#"�vYu^�YM��B�g��w��[�EB�@BHUEz�I��;@��H1�O�B���+Zi[C�?�w��`�B�{}���A�@7�P�@4���ɒ�r�d�D\Ƽ6[v�c�T V��s�*+te����Xk�r�f����������� hoXt��v{��{�q�Z|���)����-�y��� ����������鈕��)�� q:SQ$��5��8c�x���E�„l$� m/�J�"��Z�֙���1܆�oV�ު��N�J^+��z�:�����gY٭n�Vz���_�ӄ�+�����n��I,�[o����� Y��5��\m�b��1/cĮ��1� sh�I�Գ����.�Թw�n�K���Wڻ���XGS�:�\cv�-��%gYtV�&�v �rc��Gy[���U�5��.�4pc��M� �Fgvc h��G�FG�޹p۴u���۷kZ�V�������Q�u��S��ҧ�i����[��)~�ޏ_��Z�~>2��N���S?[O ��y�jk��8�lƮ|���#���T]lт'{�X��E�@{����c���dk:�M� ��|6Ԧb6QX��! �!*D��Ui�*�, R!eVXj�0�R�t�BsR�Q��FS��#=���}A]��Ϣٱ���w��%罽��QB� u��� -�x�(Zm}��ђ*��ڢ�9"Kȼ���q�q�-.<�W17q�����j�2V�������ǀ}��w�9��Nfh��ƃ̯?5�v�&ݭ����/�` g�<�Ȟ�qh�(�s��� �Q�M&~���q���.{ޱ;Gp�\J�N��z��G��}�:��Ē7���Ի+�i�(ro����6��(�RP`�4�����:�h�f� ��Z䫎� �-�g���8��~ �����q�ʮYLq�9,��Ӏ�FPǍݧ?2v-;4 ����$�gz��g m5�����V�c#Ŗ[�T�u=�YV�mq&�qZeb�08 w��RX�t�����mܝ�( iy��#0ѫ��֛M+��7X/�6��V�5�2�=�8�F Iߏ%cGC� ���м�������i�oX�M�aROy����vn.Y�����ol���f������ra��c�Ifsy����p���pW肼�e�w^�p��PT�N[�XY.���i��&�����8+V;[%e���� � Yi��vEH�é�� �S�0���+�Ll������i���M%�Xv:R+��^Y�@ޖ���!���Ni�/���4d��T$�@�M��ȣ�n�"��0斜������h�̔ޕ�i]u��%�7��� ����|�:���+xr���sϋ ���0�#�ˢ���@��,;�1�cZoґ���Z�WmV[�1�rD潍����o4���M֍�Ecv����_�q��g�(h��#� �X����A1a]s�3�U�,f�M�1��ch{��\��s�vF e��u���Q�7o�W.|򚩏���6� �ݩoi�P��p{Mx�,��@�flvGL�5βFe��ը5ִ����(��Ȭ�˖V���?�"�w�c��d��#�|�����GZ��9�vx��������/�X�+ a%��^>AX�[�ȥ�[�ȫy���x0�����D"7�q8��>��7��A sZ^{�n_-�ڇ�� �¸��'ZݾE'ZݾE\���j��a��= �kv�u���Wd� D�����$0ct1{�ɣd id���..�h$�p��YQ�<��hq���f�N�uQ\f�9]E���B\��<������ �V�e�ȠJݾEzdy�=7�n�"���|�!h�����ȣ�n�"�?Ih+5�Rx"�{�/��x�;L}��٤|S]Yb>=��W�u���Q}�|����n��΋�`�pVF�"��0�������+Mtf�k��]������Ϊ̇��$+�4�с�$��������y���HX�C����*�y�E�v+%H��R�$����Z�FBUWaP����~G���=�*�,BT�ZTX�෋5"�GjNs���R��A�'ih?����Ay��DB���X�ʏ?�!����Bm��Šz/�_ ���%���A�[��;����� N���