/* Minification failed. Returning unminified contents.
(1322,137-138): run-time error JS1010: Expected identifier: .
(1322,137-138): run-time error JS1195: Expected expression: .
(1322,185-189): run-time error JS1034: Unmatched 'else'; no 'if' defined: else
 */
// Unobtrusive Ajax support library for jQuery
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// @version v3.2.6
// 
// Microsoft grants you the right to use these script files for the sole
// purpose of either: (i) interacting through your browser with the Microsoft
// website or online service, subject to the applicable licensing or use
// terms; or (ii) using the files as included with a Microsoft product subject
// to that product's license terms. Microsoft reserves all other rights to the
// files not expressly granted by Microsoft, whether by implication, estoppel
// or otherwise. Insofar as a script file is dual licensed under GPL,
// Microsoft neither took the code under GPL nor distributes it thereunder but
// under the terms set out in this paragraph. All notices and licenses
// below are for informational purposes only.
!function(t){function a(t,a){for(var e=window,r=(t||"").split(".");e&&r.length;)e=e[r.shift()];return"function"==typeof e?e:(a.push(t),Function.constructor.apply(null,a))}function e(t){return"GET"===t||"POST"===t}function r(t,a){e(a)||t.setRequestHeader("X-HTTP-Method-Override",a)}function n(a,e,r){var n;r.indexOf("application/x-javascript")===-1&&(n=(a.getAttribute("data-ajax-mode")||"").toUpperCase(),t(a.getAttribute("data-ajax-update")).each(function(a,r){switch(n){case"BEFORE":t(r).prepend(e);break;case"AFTER":t(r).append(e);break;case"REPLACE-WITH":t(r).replaceWith(e);break;default:t(r).html(e)}}))}function i(i,u){var o,c,d,s;if(o=i.getAttribute("data-ajax-confirm"),!o||window.confirm(o)){c=t(i.getAttribute("data-ajax-loading")),s=parseInt(i.getAttribute("data-ajax-loading-duration"),10)||0,t.extend(u,{type:i.getAttribute("data-ajax-method")||void 0,url:i.getAttribute("data-ajax-url")||void 0,cache:"true"===(i.getAttribute("data-ajax-cache")||"").toLowerCase(),beforeSend:function(t){var e;return r(t,d),e=a(i.getAttribute("data-ajax-begin"),["xhr"]).apply(i,arguments),e!==!1&&c.show(s),e},complete:function(){c.hide(s),a(i.getAttribute("data-ajax-complete"),["xhr","status"]).apply(i,arguments)},success:function(t,e,r){n(i,t,r.getResponseHeader("Content-Type")||"text/html"),a(i.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(i,arguments)},error:function(){a(i.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(i,arguments)}}),u.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),d=u.type.toUpperCase(),e(d)||(u.type="POST",u.data.push({name:"X-HTTP-Method-Override",value:d}));var p=t(i);if(p.is("form")&&"multipart/form-data"==p.attr("enctype")){var f=new FormData;t.each(u.data,function(t,a){f.append(a.name,a.value)}),t("input[type=file]",p).each(function(){var a=this;t.each(a.files,function(t,e){f.append(a.name,e)})}),t.extend(u,{processData:!1,contentType:!1,data:f})}t.ajax(u)}}function u(a){var e=t(a).data(d);return!e||!e.validate||e.validate()}var o="unobtrusiveAjaxClick",c="unobtrusiveAjaxClickTarget",d="unobtrusiveValidation";t(document).on("click","a[data-ajax=true]",function(t){t.preventDefault(),i(this,{url:this.href,type:"GET",data:[]})}),t(document).on("click","form[data-ajax=true] input[type=image]",function(a){var e=a.target.name,r=t(a.target),n=t(r.parents("form")[0]),i=r.offset();n.data(o,[{name:e+".x",value:Math.round(a.pageX-i.left)},{name:e+".y",value:Math.round(a.pageY-i.top)}]),setTimeout(function(){n.removeData(o)},0)}),t(document).on("click","form[data-ajax=true] :submit",function(a){var e=a.currentTarget.name,r=t(a.target),n=t(r.parents("form")[0]);n.data(o,e?[{name:e,value:a.currentTarget.value}]:[]),n.data(c,r),setTimeout(function(){n.removeData(o),n.removeData(c)},0)}),t(document).on("submit","form[data-ajax=true]",function(a){var e=t(this).data(o)||[],r=t(this).data(c),n=r&&(r.hasClass("cancel")||void 0!==r.attr("formnovalidate"));a.preventDefault(),(n||u(this))&&i(this,{url:this.action,type:this.method||"GET",data:e.concat(t(this).serializeArray())})})}(jQuery);;
/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
 * http://jqueryvalidation.org/
 * Copyright (c) 2015 JÃ¶rn Zaefferer; Licensed MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},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.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(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']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a];return void 0},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],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 a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},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(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[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(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?: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(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});;
/**
 * @license
 * Unobtrusive validation support library for jQuery and jQuery Validate
 * Copyright (c) .NET Foundation. All rights reserved.
 * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 * @version v4.0.0
 */
!function(a){"function"==typeof define&&define.amd?define("jquery.validate.unobtrusive",["jquery-validation"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery-validation")):jQuery.validator.unobtrusive=a(jQuery)}(function(s){var a,o=s.validator,d="unobtrusiveValidation";function l(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function u(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function n(a){return a.substr(0,a.lastIndexOf(".")+1)}function m(a,e){return a=0===a.indexOf("*.")?a.replace("*.",e):a}function f(a){var e=s(this),n="__jquery_unobtrusive_validation_form_reset";if(!e.data(n)){e.data(n,!0);try{e.data("validator").resetForm()}finally{e.removeData(n)}e.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),e.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function p(n){function a(a,e){(a=r[a])&&s.isFunction(a)&&a.apply(n,e)}var e=s(n),t=e.data(d),i=s.proxy(f,n),r=o.unobtrusive.options||{};return t||(t={options:{errorClass:r.errorClass||"input-validation-error",errorElement:r.errorElement||"span",errorPlacement:function(){!function(a,e){var e=s(this).find("[data-valmsg-for='"+u(e[0].name)+"']"),n=(n=e.attr("data-valmsg-replace"))?!1!==s.parseJSON(n):null;e.removeClass("field-validation-valid").addClass("field-validation-error"),a.data("unobtrusiveContainer",e),n?(e.empty(),a.removeClass("input-validation-error").appendTo(e)):a.hide()}.apply(n,arguments),a("errorPlacement",arguments)},invalidHandler:function(){!function(a,e){var n=s(this).find("[data-valmsg-summary=true]"),t=n.find("ul");t&&t.length&&e.errorList.length&&(t.empty(),n.addClass("validation-summary-errors").removeClass("validation-summary-valid"),s.each(e.errorList,function(){s("<li />").html(this.message).appendTo(t)}))}.apply(n,arguments),a("invalidHandler",arguments)},messages:{},rules:{},success:function(){!function(a){var e,n=a.data("unobtrusiveContainer");n&&(e=(e=n.attr("data-valmsg-replace"))?s.parseJSON(e):null,n.addClass("field-validation-valid").removeClass("field-validation-error"),a.removeData("unobtrusiveContainer"),e&&n.empty())}.apply(n,arguments),a("success",arguments)}},attachValidation:function(){e.off("reset."+d,i).on("reset."+d,i).validate(this.options)},validate:function(){return e.validate(),e.valid()}},e.data(d,t)),t}return o.unobtrusive={adapters:[],parseElement:function(t,a){var e,i,r,o=s(t),d=o.parents("form")[0];d&&((e=p(d)).options.rules[t.name]=i={},e.options.messages[t.name]=r={},s.each(this.adapters,function(){var a="data-val-"+this.name,e=o.attr(a),n={};void 0!==e&&(a+="-",s.each(this.params,function(){n[this]=o.attr(a+this)}),this.adapt({element:t,form:d,message:e,params:n,rules:i,messages:r}))}),s.extend(i,{__dummy__:!0}),a||e.attachValidation())},parse:function(a){var a=s(a),e=a.parents().addBack().filter("form").add(a.find("form")).has("[data-val=true]");a.find("[data-val=true]").each(function(){o.unobtrusive.parseElement(this,!0)}),e.each(function(){var a=p(this);a&&a.attachValidation()})}},(a=o.unobtrusive.adapters).add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},a.addBool=function(e,n){return this.add(e,function(a){l(a,n||e,!0)})},a.addMinMax=function(a,t,i,r,e,n){return this.add(a,[e||"min",n||"max"],function(a){var e=a.params.min,n=a.params.max;e&&n?l(a,r,[e,n]):e?l(a,t,e):n&&l(a,i,n)})},a.addSingleVal=function(e,n,t){return this.add(e,[n||"val"],function(a){l(a,t||e,a.params[n])})},o.addMethod("__dummy__",function(a,e,n){return!0}),o.addMethod("regex",function(a,e,n){return!!this.optional(e)||(e=new RegExp(n).exec(a))&&0===e.index&&e[0].length===a.length}),o.addMethod("nonalphamin",function(a,e,n){var t;return t=n?(t=a.match(/\W/g))&&t.length>=n:t}),o.methods.extension?(a.addSingleVal("accept","mimtype"),a.addSingleVal("extension","extension")):a.addSingleVal("extension","extension","accept"),a.addSingleVal("regex","pattern"),a.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),a.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),a.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),a.add("equalto",["other"],function(a){var e=n(a.element.name),e=m(a.params.other,e);l(a,"equalTo",s(a.form).find(":input").filter("[name='"+u(e)+"']")[0])}),a.add("required",function(a){"INPUT"===a.element.tagName.toUpperCase()&&"CHECKBOX"===a.element.type.toUpperCase()||l(a,"required",!0)}),a.add("remote",["url","type","additionalfields"],function(t){var i={url:t.params.url,type:t.params.type||"GET",data:{}},r=n(t.element.name);s.each((t.params.additionalfields||t.element.name).replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g),function(a,e){var n=m(e,r);i.data[n]=function(){var a=s(t.form).find(":input").filter("[name='"+u(n)+"']");return a.is(":checkbox")?a.filter(":checked").val()||a.filter(":hidden").val()||"":a.is(":radio")?a.filter(":checked").val()||"":a.val()}}),l(t,"remote",i)}),a.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&l(a,"minlength",a.params.min),a.params.nonalphamin&&l(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&l(a,"regex",a.params.regex)}),a.add("fileextensions",["extensions"],function(a){l(a,"extension",a.params.extensions)}),s(function(){o.unobtrusive.parse(document)}),o.unobtrusive});
// SIG // Begin signature block
// SIG // MIInuAYJKoZIhvcNAQcCoIInqTCCJ6UCAQExDzANBglg
// SIG // hkgBZQMEAgEFADB3BgorBgEEAYI3AgEEoGkwZzAyBgor
// SIG // BgEEAYI3AgEeMCQCAQEEEBDgyQbOONQRoqMAEEvTUJAC
// SIG // AQACAQACAQACAQACAQAwMTANBglghkgBZQMEAgEFAAQg
// SIG // YeqK02aCVsrSZ55r492l8ca/IFf5F+DLPiYYB6e5igeg
// SIG // gg2BMIIF/zCCA+egAwIBAgITMwAAAlKLM6r4lfM52wAA
// SIG // AAACUjANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJV
// SIG // UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH
// SIG // UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBv
// SIG // cmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQgQ29kZSBT
// SIG // aWduaW5nIFBDQSAyMDExMB4XDTIxMDkwMjE4MzI1OVoX
// SIG // DTIyMDkwMTE4MzI1OVowdDELMAkGA1UEBhMCVVMxEzAR
// SIG // BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1v
// SIG // bmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv
// SIG // bjEeMBwGA1UEAxMVTWljcm9zb2Z0IENvcnBvcmF0aW9u
// SIG // MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
// SIG // 0OTPj7P1+wTbr+Qf9COrqA8I9DSTqNSq1UKju4IEV3HJ
// SIG // Jck61i+MTEoYyKLtiLG2Jxeu8F81QKuTpuKHvi380gzs
// SIG // 43G+prNNIAaNDkGqsENQYo8iezbw3/NCNX1vTi++irdF
// SIG // qXNs6xoc3B3W+7qT678b0jTVL8St7IMO2E7d9eNdL6RK
// SIG // fMnwRJf4XfGcwL+OwwoCeY9c5tvebNUVWRzaejKIkBVT
// SIG // hApuAMCtpdvIvmBEdSTuCKZUx+OLr81/aEZyR2jL1s2R
// SIG // KaMz8uIzTtgw6m3DbOM4ewFjIRNT1hVQPghyPxJ+ZwEr
// SIG // wry5rkf7fKuG3PF0fECGSUEqftlOptpXTQIDAQABo4IB
// SIG // fjCCAXowHwYDVR0lBBgwFgYKKwYBBAGCN0wIAQYIKwYB
// SIG // BQUHAwMwHQYDVR0OBBYEFDWSWhFBi9hrsLe2TgLuHnxG
// SIG // F3nRMFAGA1UdEQRJMEekRTBDMSkwJwYDVQQLEyBNaWNy
// SIG // b3NvZnQgT3BlcmF0aW9ucyBQdWVydG8gUmljbzEWMBQG
// SIG // A1UEBRMNMjMwMDEyKzQ2NzU5NzAfBgNVHSMEGDAWgBRI
// SIG // bmTlUAXTgqoXNzcitW2oynUClTBUBgNVHR8ETTBLMEmg
// SIG // R6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtp
// SIG // b3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDct
// SIG // MDguY3JsMGEGCCsGAQUFBwEBBFUwUzBRBggrBgEFBQcw
// SIG // AoZFaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9w
// SIG // cy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDct
// SIG // MDguY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEL
// SIG // BQADggIBABZJN7ksZExAYdTbQJewYryBLAFnYF9amfhH
// SIG // WTGG0CmrGOiIUi10TMRdQdzinUfSv5HHKZLzXBpfA+2M
// SIG // mEuJoQlDAUflS64N3/D1I9/APVeWomNvyaJO1mRTgJoz
// SIG // 0TTRp8noO5dJU4k4RahPtmjrOvoXnoKgHXpRoDSSkRy1
// SIG // kboRiriyMOZZIMfSsvkL2a5/w3YvLkyIFiqfjBhvMWOj
// SIG // wb744LfY0EoZZz62d1GPAb8Muq8p4VwWldFdE0y9IBMe
// SIG // 3ofytaPDImq7urP+xcqji3lEuL0x4fU4AS+Q7cQmLq12
// SIG // 0gVbS9RY+OPjnf+nJgvZpr67Yshu9PWN0Xd2HSY9n9xi
// SIG // au2OynVqtEGIWrSoQXoOH8Y4YNMrrdoOmjNZsYzT6xOP
// SIG // M+h1gjRrvYDCuWbnZXUcOGuOWdOgKJLaH9AqjskxK76t
// SIG // GI6BOF6WtPvO0/z1VFzan+2PqklO/vS7S0LjGEeMN3Ej
// SIG // 47jbrLy3/YAZ3IeUajO5Gg7WFg4C8geNhH7MXjKsClsA
// SIG // Pk1YtB61kan0sdqJWxOeoSXBJDIzkis97EbrqRQl91K6
// SIG // MmH+di/tolU63WvF1nrDxutjJ590/ALi383iRbgG3zkh
// SIG // EceyBWTvdlD6FxNbhIy+bJJdck2QdzLm4DgOBfCqETYb
// SIG // 4hQBEk/pxvHPLiLG2Xm9PEnmEDKo1RJpMIIHejCCBWKg
// SIG // AwIBAgIKYQ6Q0gAAAAAAAzANBgkqhkiG9w0BAQsFADCB
// SIG // iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0
// SIG // b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p
// SIG // Y3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWlj
// SIG // cm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5
// SIG // IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEw
// SIG // OTA5WjB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz
// SIG // aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE
// SIG // ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQD
// SIG // Ex9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDEx
// SIG // MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
// SIG // q/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4Bjga
// SIG // BEm6f8MMHt03a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSH
// SIG // fpRgJGyvnkmc6Whe0t+bU7IKLMOv2akrrnoJr9eWWcpg
// SIG // GgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpc
// SIG // oRb0RrrgOGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnn
// SIG // Db6gE3e+lD3v++MrWhAfTVYoonpy4BI6t0le2O3tQ5GD
// SIG // 2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLT
// SIG // swM9sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOE
// SIG // y/S6A4aN91/w0FK/jJSHvMAhdCVfGCi2zCcoOCWYOUo2
// SIG // z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k
// SIG // A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL
// SIG // 5zmhD+kjSbwYuER8ReTBw3J64HLnJN+/RpnF78IcV9uD
// SIG // jexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmnEyim
// SIG // p31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8Hh
// SIG // hUSJxAlMxdSlQy90lfdu+HggWCwTXWCVmj5PM4TasIgX
// SIG // 3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0wggHpMBAG
// SIG // CSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXT
// SIG // gqoXNzcitW2oynUClTAZBgkrBgEEAYI3FAIEDB4KAFMA
// SIG // dQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
// SIG // AwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx
// SIG // 0SOJNDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3Js
// SIG // Lm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9N
// SIG // aWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4G
// SIG // CCsGAQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDov
// SIG // L3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNS
// SIG // b29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV
// SIG // HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEF
// SIG // BQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3Br
// SIG // aW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsGAQUF
// SIG // BwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5
// SIG // AF8AcwB0AGEAdABlAG0AZQBuAHQALiAdMA0GCSqGSIb3
// SIG // DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKbC5YR4WOS
// SIG // mUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np
// SIG // 22O/IjWll11lhJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r
// SIG // 4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6I/MTfaaQdION
// SIG // 9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWlu
// SIG // WpiW5IP0wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiX
// SIG // mE0OPQvyCInWH8MyGOLwxS3OW560STkKxgrCxq2u5bLZ
// SIG // 2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNA
// SIG // BQamASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPD
// SIG // XVJihsMdYzaXht/a8/jyFqGaJ+HNpZfQ7l1jQeNbB5yH
// SIG // PgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah
// SIG // XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbS
// SIG // oqKfenoi+kiVH6v7RyOA9Z74v2u3S5fi63V4GuzqN5l5
// SIG // GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33VtY5E9
// SIG // 0Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZO
// SIG // SEXAQsmbdlsKgEhr/Xmfwb1tbWrJUnMTDXpQzTGCGY8w
// SIG // ghmLAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMwEQYDVQQI
// SIG // EwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4w
// SIG // HAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAm
// SIG // BgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25pbmcgUENB
// SIG // IDIwMTECEzMAAAJSizOq+JXzOdsAAAAAAlIwDQYJYIZI
// SIG // AWUDBAIBBQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQB
// SIG // gjcCAQQwHAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcC
// SIG // ARUwLwYJKoZIhvcNAQkEMSIEIA8gk75dBVW0cJeTmpvK
// SIG // QLP5PtnqdlCfg5B25SbzzOt+MEIGCisGAQQBgjcCAQwx
// SIG // NDAyoBSAEgBNAGkAYwByAG8AcwBvAGYAdKEagBhodHRw
// SIG // Oi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB
// SIG // BQAEggEAcY2o2MsKMj10hvirJ7cJGyVIqeplVvOkKZoG
// SIG // /o0ecpgYQkWnuRwAuiIuIZRHlB1fTMLyWfqMt5OJVN7B
// SIG // kAYi8ctxfBVSovB9FaGdMgx/PCCUc1odmCfGXAZXDNKp
// SIG // Z5kg1yrEaXG20MJNbo1evuXrRn/pxxfg6Vv2YFuQVtxP
// SIG // fLukS/5sIUqUIhTZd9KXPr3izofaMj4xNG1hcezwyLeK
// SIG // K08cHpV3YRg5ZssHfJFnvDrxriZHQh17duI66aUmXAlq
// SIG // /kkrgTu+JdEfGV56rajsaTjC9cVC83nOEwcHxGFKcWWk
// SIG // 9BowZSkDHZwMFaI/NCH78dT8vkG67ya4VYhVUyKfu6GC
// SIG // FxkwghcVBgorBgEEAYI3AwMBMYIXBTCCFwEGCSqGSIb3
// SIG // DQEHAqCCFvIwghbuAgEDMQ8wDQYJYIZIAWUDBAIBBQAw
// SIG // ggFZBgsqhkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYK
// SIG // KwYBBAGEWQoDATAxMA0GCWCGSAFlAwQCAQUABCDv2irB
// SIG // TlS2S4b55E3kSotVUvJovD+zkqs5YiAZ6eI2xgIGYrMq
// SIG // qs3QGBMyMDIyMDcxOTIzMTcxMi4zOTJaMASAAgH0oIHY
// SIG // pIHVMIHSMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz
// SIG // aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE
// SIG // ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQL
// SIG // EyRNaWNyb3NvZnQgSXJlbGFuZCBPcGVyYXRpb25zIExp
// SIG // bWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNOOjE3
// SIG // OUUtNEJCMC04MjQ2MSUwIwYDVQQDExxNaWNyb3NvZnQg
// SIG // VGltZS1TdGFtcCBTZXJ2aWNloIIRaDCCBxQwggT8oAMC
// SIG // AQICEzMAAAGKPjiN0g4C+ugAAQAAAYowDQYJKoZIhvcN
// SIG // AQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldh
// SIG // c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNV
// SIG // BAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UE
// SIG // AxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAw
// SIG // HhcNMjExMDI4MTkyNzQyWhcNMjMwMTI2MTkyNzQyWjCB
// SIG // 0jELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0
// SIG // b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p
// SIG // Y3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWlj
// SIG // cm9zb2Z0IElyZWxhbmQgT3BlcmF0aW9ucyBMaW1pdGVk
// SIG // MSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjoxNzlFLTRC
// SIG // QjAtODI0NjElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUt
// SIG // U3RhbXAgU2VydmljZTCCAiIwDQYJKoZIhvcNAQEBBQAD
// SIG // ggIPADCCAgoCggIBALf/rrehgwMgGb3oAYWoFndBqKk/
// SIG // JRRzHqaFjTizzxBKC7smuF95/iteBb5WcBZisKmqegfu
// SIG // hJCE0o5HnE0gekEQOJIr3ScnZS7yq4PLnbQbuuyyso0K
// SIG // sEcw0E0YRAsaVN9LXQRPwHsj/eZO6p3YSLvzqU+EBshi
// SIG // VIjA5ZmQIgz2ORSZIrVIBr8DAR8KICc/BVRARZ1YgFEU
// SIG // yeJAQ4lOqaW7+DyPe/r0IabKQyvvN4GsmokQt4DUxst4
// SIG // jonuj7JdN3L2CIhXACUT+DtEZHhZb/0kKKJs9ybbDHfa
// SIG // KEv1ztL0jfYdg1SjjTI2hToJzeUZOYgqsJp+qrJnvoWq
// SIG // Ef06wgUtM1417Fk4JJY1Abbde1AW1vES/vSzcN3IzyfB
// SIG // GEYJTDVwmCzOhswg1xLxPU//7AL/pNXPOLZqImQ2QagY
// SIG // K/0ry/oFbDs9xKA2UNuqk2tWxJ/56cTJl3LaGUnvEkQ6
// SIG // oCtCVFoYyl4J8mjgAxAfhbXyIvo3XFCW6T7QC+JFr1Uk
// SIG // SoqVb/DBLmES3sVxAxAYvleLXygKWYROIGtKfkAomsBy
// SIG // wWTaI91EDczOUFZhmotzJ0BW2ZIam1A8qaPb2lhHlXjt
// SIG // +SX3S1o8EYLzF91SmS+e3e45kY4lZZbl42RS8fq4SS+y
// SIG // WFabTj7RdTALTGJaejroJzqRvuFuDBh6o+2GHz9FAgMB
// SIG // AAGjggE2MIIBMjAdBgNVHQ4EFgQUI9pD2P1sGdSXrqdJ
// SIG // R4Q+MZBpJAMwHwYDVR0jBBgwFoAUn6cVXQBeYl2D9OXS
// SIG // ZacbUzUZ6XIwXwYDVR0fBFgwVjBUoFKgUIZOaHR0cDov
// SIG // L3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jcmwvTWlj
// SIG // cm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAo
// SIG // MSkuY3JsMGwGCCsGAQUFBwEBBGAwXjBcBggrBgEFBQcw
// SIG // AoZQaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9w
// SIG // cy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIw
// SIG // UENBJTIwMjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADAT
// SIG // BgNVHSUEDDAKBggrBgEFBQcDCDANBgkqhkiG9w0BAQsF
// SIG // AAOCAgEAxfTBErD1w3kbXxaNX+e+Yj3xfQEVm3rrjXzO
// SIG // fNyH08X82X9nb/5ntwzYvynDTRJ0dUym2bRuy7INHMv6
// SIG // SiBEDiRtn2GlsCCCmMLsgySNkOJFYuZs21f9Aufr0ELE
// SIG // HAr37DPCuV9n34nyYu7anhtK+fAo4MHu8QWL4Lj5o1Dc
// SIG // cE1rxI2SD36Y1VKGjwpeqqrNHhVG+23C4c0xBGAZwI/D
// SIG // BDYYj+SCXeD6eZRah07aXnOu2BZhrjv7iAP04zwX3LTO
// SIG // ZFCPrs38of8iHbQzbZCM/nv8Zl0hYYkBEdLgY0aG0GVe
// SIG // nPtEzbb0TS2slOLuxHpHezmg180EdEblhmkosLTel3Pz
// SIG // 6DT9K3sxujr3MqMNajKFJFBEO6qg9EKvEBcCtAygnWUi
// SIG // bcgSjAaY1GApzVGW2L001puA1yuUWIH9t21QSVuF6OcO
// SIG // PdBx6OE41jas9ez6j8jAk5zPB3AKk5z3jBNHT2L23cMw
// SIG // zIG7psnWyWqv9OhSJpCeyl7PY8ag4hNj03mJ2o/Np+kP
// SIG // /z6mx7scSZsEDuH83ToFagBJBtVw5qaVSlv6ycQTdyMc
// SIG // la+kD/XIWNjGFWtG2wAiNnb1PkdkCZROQI6DCsuvFiNa
// SIG // ZhU9ySga62nKcuh1Ixq7Vfv9VOdm66xJQpVcuRW/PlGV
// SIG // mS6fNnLgs7STDEqlvpD+c8lQUryzPuAwggdxMIIFWaAD
// SIG // AgECAhMzAAAAFcXna54Cm0mZAAAAAAAVMA0GCSqGSIb3
// SIG // DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK
// SIG // V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG
// SIG // A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTIwMAYD
// SIG // VQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0ZSBB
// SIG // dXRob3JpdHkgMjAxMDAeFw0yMTA5MzAxODIyMjVaFw0z
// SIG // MDA5MzAxODMyMjVaMHwxCzAJBgNVBAYTAlVTMRMwEQYD
// SIG // VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25k
// SIG // MR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x
// SIG // JjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBD
// SIG // QSAyMDEwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
// SIG // CgKCAgEA5OGmTOe0ciELeaLL1yR5vQ7VgtP97pwHB9Kp
// SIG // bE51yMo1V/YBf2xK4OK9uT4XYDP/XE/HZveVU3Fa4n5K
// SIG // Wv64NmeFRiMMtY0Tz3cywBAY6GB9alKDRLemjkZrBxTz
// SIG // xXb1hlDcwUTIcVxRMTegCjhuje3XD9gmU3w5YQJ6xKr9
// SIG // cmmvHaus9ja+NSZk2pg7uhp7M62AW36MEBydUv626GIl
// SIG // 3GoPz130/o5Tz9bshVZN7928jaTjkY+yOSxRnOlwaQ3K
// SIG // Ni1wjjHINSi947SHJMPgyY9+tVSP3PoFVZhtaDuaRr3t
// SIG // pK56KTesy+uDRedGbsoy1cCGMFxPLOJiss254o2I5Jas
// SIG // AUq7vnGpF1tnYN74kpEeHT39IM9zfUGaRnXNxF803RKJ
// SIG // 1v2lIH1+/NmeRd+2ci/bfV+AutuqfjbsNkz2K26oElHo
// SIG // vwUDo9Fzpk03dJQcNIIP8BDyt0cY7afomXw/TNuvXsLz
// SIG // 1dhzPUNOwTM5TI4CvEJoLhDqhFFG4tG9ahhaYQFzymei
// SIG // XtcodgLiMxhy16cg8ML6EgrXY28MyTZki1ugpoMhXV8w
// SIG // dJGUlNi5UPkLiWHzNgY1GIRH29wb0f2y1BzFa/ZcUlFd
// SIG // Etsluq9QBXpsxREdcu+N+VLEhReTwDwV2xo3xwgVGD94
// SIG // q0W29R6HXtqPnhZyacaue7e3PmriLq0CAwEAAaOCAd0w
// SIG // ggHZMBIGCSsGAQQBgjcVAQQFAgMBAAEwIwYJKwYBBAGC
// SIG // NxUCBBYEFCqnUv5kxJq+gpE8RjUpzxD/LwTuMB0GA1Ud
// SIG // DgQWBBSfpxVdAF5iXYP05dJlpxtTNRnpcjBcBgNVHSAE
// SIG // VTBTMFEGDCsGAQQBgjdMg30BATBBMD8GCCsGAQUFBwIB
// SIG // FjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3Bz
// SIG // L0RvY3MvUmVwb3NpdG9yeS5odG0wEwYDVR0lBAwwCgYI
// SIG // KwYBBQUHAwgwGQYJKwYBBAGCNxQCBAweCgBTAHUAYgBD
// SIG // AEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8w
// SIG // HwYDVR0jBBgwFoAU1fZWy4/oolxiaNE9lJBb186aGMQw
// SIG // VgYDVR0fBE8wTTBLoEmgR4ZFaHR0cDovL2NybC5taWNy
// SIG // b3NvZnQuY29tL3BraS9jcmwvcHJvZHVjdHMvTWljUm9v
// SIG // Q2VyQXV0XzIwMTAtMDYtMjMuY3JsMFoGCCsGAQUFBwEB
// SIG // BE4wTDBKBggrBgEFBQcwAoY+aHR0cDovL3d3dy5taWNy
// SIG // b3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXRf
// SIG // MjAxMC0wNi0yMy5jcnQwDQYJKoZIhvcNAQELBQADggIB
// SIG // AJ1VffwqreEsH2cBMSRb4Z5yS/ypb+pcFLY+TkdkeLEG
// SIG // k5c9MTO1OdfCcTY/2mRsfNB1OW27DzHkwo/7bNGhlBgi
// SIG // 7ulmZzpTTd2YurYeeNg2LpypglYAA7AFvonoaeC6Ce57
// SIG // 32pvvinLbtg/SHUB2RjebYIM9W0jVOR4U3UkV7ndn/OO
// SIG // PcbzaN9l9qRWqveVtihVJ9AkvUCgvxm2EhIRXT0n4ECW
// SIG // OKz3+SmJw7wXsFSFQrP8DJ6LGYnn8AtqgcKBGUIZUnWK
// SIG // NsIdw2FzLixre24/LAl4FOmRsqlb30mjdAy87JGA0j3m
// SIG // Sj5mO0+7hvoyGtmW9I/2kQH2zsZ0/fZMcm8Qq3UwxTSw
// SIG // ethQ/gpY3UA8x1RtnWN0SCyxTkctwRQEcb9k+SS+c23K
// SIG // jgm9swFXSVRk2XPXfx5bRAGOWhmRaw2fpCjcZxkoJLo4
// SIG // S5pu+yFUa2pFEUep8beuyOiJXk+d0tBMdrVXVAmxaQFE
// SIG // fnyhYWxz/gq77EFmPWn9y8FBSX5+k77L+DvktxW/tM4+
// SIG // pTFRhLy/AsGConsXHRWJjXD+57XQKBqJC4822rpM+Zv/
// SIG // Cuk0+CQ1ZyvgDbjmjJnW4SLq8CdCPSWU5nR0W2rRnj7t
// SIG // fqAxM328y+l7vzhwRNGQ8cirOoo6CGJ/2XBjU02N7oJt
// SIG // pQUQwXEGahC0HVUzWLOhcGbyoYIC1zCCAkACAQEwggEA
// SIG // oYHYpIHVMIHSMQswCQYDVQQGEwJVUzETMBEGA1UECBMK
// SIG // V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG
// SIG // A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYD
// SIG // VQQLEyRNaWNyb3NvZnQgSXJlbGFuZCBPcGVyYXRpb25z
// SIG // IExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNO
// SIG // OjE3OUUtNEJCMC04MjQ2MSUwIwYDVQQDExxNaWNyb3Nv
// SIG // ZnQgVGltZS1TdGFtcCBTZXJ2aWNloiMKAQEwBwYFKw4D
// SIG // AhoDFQCA8PNjrxtTBQQdp/+MHlaqc1fEoaCBgzCBgKR+
// SIG // MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5n
// SIG // dG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN
// SIG // aWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1p
// SIG // Y3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwMA0GCSqG
// SIG // SIb3DQEBBQUAAgUA5oFAzDAiGA8yMDIyMDcxOTIyNDAx
// SIG // MloYDzIwMjIwNzIwMjI0MDEyWjB3MD0GCisGAQQBhFkK
// SIG // BAExLzAtMAoCBQDmgUDMAgEAMAoCAQACAhQGAgH/MAcC
// SIG // AQACAhFaMAoCBQDmgpJMAgEAMDYGCisGAQQBhFkKBAIx
// SIG // KDAmMAwGCisGAQQBhFkKAwKgCjAIAgEAAgMHoSChCjAI
// SIG // AgEAAgMBhqAwDQYJKoZIhvcNAQEFBQADgYEADlfdoFr3
// SIG // CfalVXHA6h2bmOudfLi11U8UcUNGw2lOz0itWj43Um7L
// SIG // VxAb3lITaJC7GmZcf7xJF02Mum9DGC/odGxJpN1pCEF0
// SIG // i4K5NsaUAHeI/pKLeciftrk5bnE63Iu7pP3NWZO7IPyC
// SIG // 6gsmM/wnd6dFyjPZe487N3EwgBCnnyYxggQNMIIECQIB
// SIG // ATCBkzB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz
// SIG // aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE
// SIG // ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD
// SIG // Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMAIT
// SIG // MwAAAYo+OI3SDgL66AABAAABijANBglghkgBZQMEAgEF
// SIG // AKCCAUowGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEE
// SIG // MC8GCSqGSIb3DQEJBDEiBCCq1CIykXwRJDzmMpT5Dl8w
// SIG // YkQlKXkJSz4ivqMwUc2hxTCB+gYLKoZIhvcNAQkQAi8x
// SIG // geowgecwgeQwgb0EIPS94Kt130q+fvO/fzD4MbWQhQaE
// SIG // 7RHkOH6AkjlNVCm9MIGYMIGApH4wfDELMAkGA1UEBhMC
// SIG // VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcT
// SIG // B1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw
// SIG // b3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUt
// SIG // U3RhbXAgUENBIDIwMTACEzMAAAGKPjiN0g4C+ugAAQAA
// SIG // AYowIgQgbQiL8sezvVK0Xaup4cFg25L8CF+3je0VcxNK
// SIG // r9k365cwDQYJKoZIhvcNAQELBQAEggIAnms8SNy9QK0z
// SIG // SPk1pz1MP+cM53zYVJhXBTfzHlgpy3ww6lhSSGUh+k14
// SIG // 9RX/8AbIgNsEO4BCCbwP7E+/g14DLX/xA1khE3MDN/r/
// SIG // iIw2jp18UafBtPJGaVtx5zIaG6Co+OnzUPGC9dcNzFEt
// SIG // jyyYPnq3CP411rqN/V+nJMD1PHuUFYh0rl6zhJq/tCKA
// SIG // Bwzgmjfw0G+E6Hs889A56eRlTZLXdT6wzcn2a2xmYUY6
// SIG // khmWY0tongqzqx1q7JxbkdSy+V2VfQMExefYdCNRMfYu
// SIG // XEhe+FHmcsgJlVf9gIaayXobwF/AO//+ip/kzx/f7J9d
// SIG // /rdolnw2ylgVYr0DE37eKCCLUD35ft8YJOvA4ncybmrK
// SIG // ncr9njvafWs5d0dmb4KN7XAfBzDJ5tyozxU39QA6l9Z4
// SIG // bBl/JKGUiMGCzPrmR7zFyWLuxlu6T1ZtO7NqI/PbQzSY
// SIG // cUolcFgeDqRlOT3bGcJzu/UIxW6vB3rGuVdgyd7TbgX5
// SIG // SZ0xqDGFhmCiziFzzIxVyUhP3PPSefqdUlSktNRGVzTc
// SIG // SIYE7n/8bXlFOtMsklNfYSgEnyGqseu0uPWeaby3wpeJ
// SIG // ydnRDEL0iNY79/GlFVhP+6fG61D23PLguyNUPipgV0Lc
// SIG // G2+l5SEdvO48r2IlXgFigA2xjB5tDUbOvNKQoJ/+4T9q
// SIG // bezjeETcZv0=
// SIG // End signature block
;
/*! DateRangeValidator */

(function ($)
{
	// The validator function
	$.validator.addMethod('rangeDate', function (value, element, param)
	{
		if (!value)
		{
			return true; // not testing 'is required' here!
		}
		try
		{
			var dateValue = $.datepicker.parseDate(param.format, value);
		}
		catch (e)
		{
			return false;
		}
		return param.min <= dateValue && dateValue <= param.max;
	});

	// The adapter to support ASP.NET MVC unobtrusive validation
	$.validator.unobtrusive.adapters.add('rangedate', ['min', 'max', 'format'], function (options)
	{
		var params = {
			min: $.datepicker.parseDate(options.params.format, options.params.min),
			max: $.datepicker.parseDate(options.params.format, options.params.max),
			format: options.params.format
		};

		options.rules['rangeDate'] = params;
		if (options.message)
		{
			options.messages['rangeDate'] = options.message;
		}
	});
} (jQuery));;
$(function ()
{
	$('.accordion').accordion();

	$('.datepicker').each(function ()
	{
		var dateFormat = $(this).data("val-rangedate-format");
		var minDate = $.datepicker.parseDate(dateFormat, $(this).data("val-rangedate-min"));
		var maxDate = $.datepicker.parseDate(dateFormat, $(this).data("val-rangedate-max"));

		$(this).datepicker({
			dateFormat: dateFormat,
			minDate: minDate,
			maxDate: maxDate
		});
	});

	$('[data-val-number]').blur(function ()
	{
		if ($(this).val().substring(0, 1) == ".")
		{
			$(this).val("0" + $(this).val());
		}
	});

//	$(document).on('invalid-form.validate', 'form', function ()
//	{
//		var button = $(this).find('input[type="submit"]');
//		setTimeout(function ()
//		{
//			button.removeAttr('disabled');
//		}, 1);
//	});

//	$(document).on('submit', 'form', function ()
//	{
//		var button = $(this).find('input[type="submit"]');
//		setTimeout(function ()
//		{
//			button.attr('disabled', 'disabled');
//		}, 0);
//	});
});;
(function($){$.formatCurrency={};$.formatCurrency.regions=[];$.formatCurrency.regions[""]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};
$.fn.formatCurrency=function(destination,settings){if(arguments.length==1&&typeof destination!=="string"){settings=destination;destination=false
}var defaults={name:"formatCurrency",colorize:false,region:"",global:true,roundToDecimalPlace:2,eventOnDecimalsEntered:false};defaults=$.extend(defaults,$.formatCurrency.regions[""]);
settings=$.extend(defaults,settings);if(settings.region.length>0){settings=$.extend(settings,getRegionOrCulture(settings.region))}settings.regex=generateRegex(settings);
return this.each(function(){$this=$(this);var num="0";num=$this[$this.is("input, select, textarea")?"val":"html"]();if(num.search("\\(")>=0){num="-"+num
}if(num===""||(num==="-"&&settings.roundToDecimalPlace===-1)){return}if(isNaN(num)){num=num.replace(settings.regex,"");if(num===""||(num==="-"&&settings.roundToDecimalPlace===-1)){return
}if(settings.decimalSymbol!="."){num=num.replace(settings.decimalSymbol,".")}if(isNaN(num)){num="0"}}var numParts=String(num).split(".");var isPositive=(num==Math.abs(num));
var hasDecimals=(numParts.length>1);var decimals=(hasDecimals?numParts[1].toString():"0");var originalDecimals=decimals;num=Math.abs(numParts[0]);
num=isNaN(num)?0:num;if(settings.roundToDecimalPlace>=0){decimals=parseFloat("1."+decimals);decimals=decimals.toFixed(settings.roundToDecimalPlace);
if(decimals.substring(0,1)=="2"){num=Number(num)+1}decimals=decimals.substring(2)}num=String(num);if(settings.groupDigits){for(var i=0;i<Math.floor((num.length-(1+i))/3);
i++){num=num.substring(0,num.length-(4*i+3))+settings.digitGroupSymbol+num.substring(num.length-(4*i+3))}}if((hasDecimals&&settings.roundToDecimalPlace==-1)||settings.roundToDecimalPlace>0){num+=settings.decimalSymbol+decimals
}var format=isPositive?settings.positiveFormat:settings.negativeFormat;var money=format.replace(/%s/g,settings.symbol);money=money.replace(/%n/g,num);
var $destination=$([]);if(!destination){$destination=$this}else{$destination=$(destination)}$destination[$destination.is("input, select, textarea")?"val":"html"](money);
if(hasDecimals&&settings.eventOnDecimalsEntered&&originalDecimals.length>settings.roundToDecimalPlace){$destination.trigger("decimalsEntered",originalDecimals)
}if(settings.colorize){$destination.css("color",isPositive?"black":"red")}})};$.fn.toNumber=function(settings){var defaults=$.extend({name:"toNumber",region:"",global:true},$.formatCurrency.regions[""]);
settings=jQuery.extend(defaults,settings);if(settings.region.length>0){settings=$.extend(settings,getRegionOrCulture(settings.region))}settings.regex=generateRegex(settings);
return this.each(function(){var method=$(this).is("input, select, textarea")?"val":"html";$(this)[method]($(this)[method]().replace("(","(-").replace(settings.regex,""))
})};$.fn.asNumber=function(settings){var defaults=$.extend({name:"asNumber",region:"",parse:true,parseType:"Float",global:true},$.formatCurrency.regions[""]);
settings=jQuery.extend(defaults,settings);if(settings.region.length>0){settings=$.extend(settings,getRegionOrCulture(settings.region))}settings.regex=generateRegex(settings);
settings.parseType=validateParseType(settings.parseType);var method=$(this).is("input, select, textarea")?"val":"html";var num=$(this)[method]();
num=num?num:"";num=num.replace("(","(-");num=num.replace(settings.regex,"");if(!settings.parse){return num}if(num.length==0){num="0"}if(settings.decimalSymbol!="."){num=num.replace(settings.decimalSymbol,".")
}return window["parse"+settings.parseType](num)};function getRegionOrCulture(region){var regionInfo=$.formatCurrency.regions[region];if(regionInfo){return regionInfo
}else{if(/(\w+)-(\w+)/g.test(region)){var culture=region.replace(/(\w+)-(\w+)/g,"$1");return $.formatCurrency.regions[culture]}}return null}function validateParseType(parseType){switch(parseType.toLowerCase()){case"int":return"Int";
case"float":return"Float";default:throw"invalid parseType"}}function generateRegex(settings){if(settings.symbol===""){return new RegExp("[^\\d"+settings.decimalSymbol+"-]","g")
}else{var symbol=settings.symbol.replace("$","\\$").replace(".","\\.");return new RegExp(symbol+"|[^\\d"+settings.decimalSymbol+"-]","g")}}})(jQuery);;
/*
Highcharts JS v3.0.10 (2014-03-10)

(c) 2009-2014 Torstein Honsi

License: www.highcharts.com/license
*/
(function () { function s(a, b) { var c; a || (a = {}); for (c in b) a[c] = b[c]; return a } function w() { var a, b = arguments, c, d = {}, e = function (a, b) { var c, d; typeof a !== "object" && (a = {}); for (d in b) b.hasOwnProperty(d) && (c = b[d], a[d] = c && typeof c === "object" && Object.prototype.toString.call(c) !== "[object Array]" && d !== "renderTo" && typeof c.nodeType !== "number" ? e(a[d] || {}, c) : b[d]); return a }; b[0] === !0 && (d = b[1], b = Array.prototype.slice.call(b, 2)); c = b.length; for (a = 0; a < c; a++) d = e(d, b[a]); return d } function x(a, b) { return parseInt(a, b || 10) } function ga(a) { return typeof a === "string" } function $(a) { return typeof a === "object" } function La(a) { return Object.prototype.toString.call(a) === "[object Array]" } function ya(a) { return typeof a === "number" } function za(a) { return T.log(a) / T.LN10 } function ha(a) { return T.pow(10, a) } function ia(a, b) { for (var c = a.length; c--; ) if (a[c] === b) { a.splice(c, 1); break } } function r(a) { return a !== u && a !== null } function z(a, b, c) { var d, e; if (ga(b)) r(c) ? a.setAttribute(b, c) : a && a.getAttribute && (e = a.getAttribute(b)); else if (r(b) && $(b)) for (d in b) a.setAttribute(d, b[d]); return e } function na(a) { return La(a) ? a : [a] } function o() { var a = arguments, b, c, d = a.length; for (b = 0; b < d; b++) if (c = a[b], typeof c !== "undefined" && c !== null) return c } function D(a, b) { if (Aa && !X && b && b.opacity !== u) b.filter = "alpha(opacity=" + b.opacity * 100 + ")"; s(a.style, b) } function V(a, b, c, d, e) { a = y.createElement(a); b && s(a, b); e && D(a, { padding: 0, border: O, margin: 0 }); c && D(a, c); d && d.appendChild(a); return a } function ja(a, b) { var c = function () { }; c.prototype = new a; s(c.prototype, b); return c } function Ga(a, b, c, d) { var e = L.lang, a = +a || 0, f = b === -1 ? (a.toString().split(".")[1] || "").length : isNaN(b = N(b)) ? 2 : b, b = c === void 0 ? e.decimalPoint : c, d = d === void 0 ? e.thousandsSep : d, e = a < 0 ? "-" : "", c = String(x(a = N(a).toFixed(f))), g = c.length > 3 ? c.length % 3 : 0; return e + (g ? c.substr(0, g) + d : "") + c.substr(g).replace(/(\d{3})(?=\d)/g, "$1" + d) + (f ? b + N(a - c).toFixed(f).slice(2) : "") } function Ha(a, b) { return Array((b || 2) + 1 - String(a).length).join(0) + a } function Ma(a, b, c) { var d = a[b]; a[b] = function () { var a = Array.prototype.slice.call(arguments); a.unshift(d); return c.apply(this, a) } } function Ia(a, b) { for (var c = "{", d = !1, e, f, g, h, i, j = []; (c = a.indexOf(c)) !== -1; ) { e = a.slice(0, c); if (d) { f = e.split(":"); g = f.shift().split("."); i = g.length; e = b; for (h = 0; h < i; h++) e = e[g[h]]; if (f.length) f = f.join(":"), g = /\.([0-9])/, h = L.lang, i = void 0, /f$/.test(f) ? (i = (i = f.match(g)) ? i[1] : -1, e = Ga(e, i, h.decimalPoint, f.indexOf(",") > -1 ? h.thousandsSep : "")) : e = bb(f, e) } j.push(e); a = a.slice(c + 1); c = (d = !d) ? "}" : "{" } j.push(a); return j.join("") } function mb(a) { return T.pow(10, S(T.log(a) / T.LN10)) } function nb(a, b, c, d) { var e, c = o(c, 1); e = a / c; b || (b = [1, 2, 2.5, 5, 10], d && d.allowDecimals === !1 && (c === 1 ? b = [1, 2, 5, 10] : c <= 0.1 && (b = [1 / c]))); for (d = 0; d < b.length; d++) if (a = b[d], e <= (b[d] + (b[d + 1] || b[d])) / 2) break; a *= c; return a } function Bb() { this.symbol = this.color = 0 } function ob(a, b) { var c = a.length, d, e; for (e = 0; e < c; e++) a[e].ss_i = e; a.sort(function (a, c) { d = b(a, c); return d === 0 ? a.ss_i - c.ss_i : d }); for (e = 0; e < c; e++) delete a[e].ss_i } function Na(a) { for (var b = a.length, c = a[0]; b--; ) a[b] < c && (c = a[b]); return c } function Ba(a) { for (var b = a.length, c = a[0]; b--; ) a[b] > c && (c = a[b]); return c } function Oa(a, b) { for (var c in a) a[c] && a[c] !== b && a[c].destroy && a[c].destroy(), delete a[c] } function Pa(a) { cb || (cb = V(Ja)); a && cb.appendChild(a); cb.innerHTML = "" } function oa(a, b) { var c = "Highcharts error #" + a + ": www.highcharts.com/errors/" + a; if (b) throw c; else G.console && console.log(c) } function aa(a) { return parseFloat(a.toPrecision(14)) } function Qa(a, b) { sa = o(a, b.animation) } function Cb() { var a = L.global.useUTC, b = a ? "getUTC" : "get", c = a ? "setUTC" : "set"; Ra = (a && L.global.timezoneOffset || 0) * 6E4; db = a ? Date.UTC : function (a, b, c, g, h, i) { return (new Date(a, b, o(c, 1), o(g, 0), o(h, 0), o(i, 0))).getTime() }; pb = b + "Minutes"; qb = b + "Hours"; rb = b + "Day"; Xa = b + "Date"; eb = b + "Month"; fb = b + "FullYear"; Db = c + "Minutes"; Eb = c + "Hours"; sb = c + "Date"; Fb = c + "Month"; Gb = c + "FullYear" } function ta() { } function Sa(a, b, c, d) { this.axis = a; this.pos = b; this.type = c || ""; this.isNew = !0; !c && !d && this.addLabel() } function ka() { this.init.apply(this, arguments) } function Ya() { this.init.apply(this, arguments) } function Hb(a, b, c, d, e, f) { var g = a.chart.inverted; this.axis = a; this.isNegative = c; this.options = b; this.x = d; this.total = null; this.points = {}; this.stack = e; this.percent = f === "percent"; this.alignOptions = { align: b.align || (g ? c ? "left" : "right" : "center"), verticalAlign: b.verticalAlign || (g ? "middle" : c ? "bottom" : "top"), y: o(b.y, g ? 4 : c ? 14 : -6), x: o(b.x, g ? c ? -6 : 6 : 0) }; this.textAlign = b.textAlign || (g ? c ? "right" : "left" : "center") } var u, y = document, G = window, T = Math, v = T.round, S = T.floor, Ka = T.ceil, t = T.max, E = T.min, N = T.abs, W = T.cos, ba = T.sin, la = T.PI, Ca = la * 2 / 360, ua = navigator.userAgent, Ib = G.opera, Aa = /msie/i.test(ua) && !Ib, gb = y.documentMode === 8, hb = /AppleWebKit/.test(ua), Ta = /Firefox/.test(ua), Jb = /(Mobile|Android|Windows Phone)/.test(ua), Da = "http://www.w3.org/2000/svg", X = !!y.createElementNS && !!y.createElementNS(Da, "svg").createSVGRect, Ob = Ta && parseInt(ua.split("Firefox/")[1], 10) < 4, ca = !X && !Aa && !!y.createElement("canvas").getContext, Za, $a, Kb = {}, tb = 0, cb, L, bb, sa, ub, B, Ea = function () { }, Y = [], Ja = "div", O = "none", Pb = /^[0-9]+$/, Lb = "stroke-width", db, Ra, pb, qb, rb, Xa, eb, fb, Db, Eb, sb, Fb, Gb, J = {}, Q = G.Highcharts = G.Highcharts ? oa(16, !0) : {}; bb = function (a, b, c) { if (!r(b) || isNaN(b)) return "Invalid date"; var a = o(a, "%Y-%m-%d %H:%M:%S"), d = new Date(b - Ra), e, f = d[qb](), g = d[rb](), h = d[Xa](), i = d[eb](), j = d[fb](), k = L.lang, l = k.weekdays, d = s({ a: l[g].substr(0, 3), A: l[g], d: Ha(h), e: h, b: k.shortMonths[i], B: k.months[i], m: Ha(i + 1), y: j.toString().substr(2, 2), Y: j, H: Ha(f), I: Ha(f % 12 || 12), l: f % 12 || 12, M: Ha(d[pb]()), p: f < 12 ? "AM" : "PM", P: f < 12 ? "am" : "pm", S: Ha(d.getSeconds()), L: Ha(v(b % 1E3), 3) }, Q.dateFormats); for (e in d) for (; a.indexOf("%" + e) !== -1; ) a = a.replace("%" + e, typeof d[e] === "function" ? d[e](b) : d[e]); return c ? a.substr(0, 1).toUpperCase() + a.substr(1) : a }; Bb.prototype = { wrapColor: function (a) { if (this.color >= a) this.color = 0 }, wrapSymbol: function (a) { if (this.symbol >= a) this.symbol = 0 } }; B = function () { for (var a = 0, b = arguments, c = b.length, d = {}; a < c; a++) d[b[a++]] = b[a]; return d } ("millisecond", 1, "second", 1E3, "minute", 6E4, "hour", 36E5, "day", 864E5, "week", 6048E5, "month", 26784E5, "year", 31556952E3); ub = { init: function (a, b, c) { var b = b || "", d = a.shift, e = b.indexOf("C") > -1, f = e ? 7 : 3, g, b = b.split(" "), c = [].concat(c), h, i, j = function (a) { for (g = a.length; g--; ) a[g] === "M" && a.splice(g + 1, 0, a[g + 1], a[g + 2], a[g + 1], a[g + 2]) }; e && (j(b), j(c)); a.isArea && (h = b.splice(b.length - 6, 6), i = c.splice(c.length - 6, 6)); if (d <= c.length / f && b.length === c.length) for (; d--; ) c = [].concat(c).splice(0, f).concat(c); a.shift = 0; if (b.length) for (a = c.length; b.length < a; ) d = [].concat(b).splice(b.length - f, f), e && (d[f - 6] = d[f - 2], d[f - 5] = d[f - 1]), b = b.concat(d); h && (b = b.concat(h), c = c.concat(i)); return [b, c] }, step: function (a, b, c, d) { var e = [], f = a.length; if (c === 1) e = d; else if (f === b.length && c < 1) for (; f--; ) d = parseFloat(a[f]), e[f] = isNaN(d) ? a[f] : c * parseFloat(b[f] - d) + d; else e = b; return e } }; (function (a) { G.HighchartsAdapter = G.HighchartsAdapter || a && { init: function (b) { var c = a.fx, d = c.step, e, f = a.Tween, g = f && f.propHooks; e = a.cssHooks.opacity; a.extend(a.easing, { easeOutQuad: function (a, b, c, d, e) { return -d * (b /= e) * (b - 2) + c } }); a.each(["cur", "_default", "width", "height", "opacity"], function (a, b) { var e = d, k; b === "cur" ? e = c.prototype : b === "_default" && f && (e = g[b], b = "set"); (k = e[b]) && (e[b] = function (c) { var d, c = a ? c : this; if (c.prop !== "align") return d = c.elem, d.attr ? d.attr(c.prop, b === "cur" ? u : c.now) : k.apply(this, arguments) }) }); Ma(e, "get", function (a, b, c) { return b.attr ? b.opacity || 0 : a.call(this, b, c) }); e = function (a) { var c = a.elem, d; if (!a.started) d = b.init(c, c.d, c.toD), a.start = d[0], a.end = d[1], a.started = !0; c.attr("d", b.step(a.start, a.end, a.pos, c.toD)) }; f ? g.d = { set: e} : d.d = e; this.each = Array.prototype.forEach ? function (a, b) { return Array.prototype.forEach.call(a, b) } : function (a, b) { for (var c = 0, d = a.length; c < d; c++) if (b.call(a[c], a[c], c, a) === !1) return c }; a.fn.highcharts = function () { var a = "Chart", b = arguments, c, d; ga(b[0]) && (a = b[0], b = Array.prototype.slice.call(b, 1)); c = b[0]; if (c !== u) c.chart = c.chart || {}, c.chart.renderTo = this[0], new Q[a](c, b[1]), d = this; c === u && (d = Y[z(this[0], "data-highcharts-chart")]); return d } }, getScript: a.getScript, inArray: a.inArray, adapterRun: function (b, c) { return a(b)[c]() }, grep: a.grep, map: function (a, c) { for (var d = [], e = 0, f = a.length; e < f; e++) d[e] = c.call(a[e], a[e], e, a); return d }, offset: function (b) { return a(b).offset() }, addEvent: function (b, c, d) { a(b).bind(c, d) }, removeEvent: function (b, c, d) { var e = y.removeEventListener ? "removeEventListener" : "detachEvent"; y[e] && b && !b[e] && (b[e] = function () { }); a(b).unbind(c, d) }, fireEvent: function (b, c, d, e) { var f = a.Event(c), g = "detached" + c, h; !Aa && d && (delete d.layerX, delete d.layerY); s(f, d); b[c] && (b[g] = b[c], b[c] = null); a.each(["preventDefault", "stopPropagation"], function (a, b) { var c = f[b]; f[b] = function () { try { c.call(f) } catch (a) { b === "preventDefault" && (h = !0) } } }); a(b).trigger(f); b[g] && (b[c] = b[g], b[g] = null); e && !f.isDefaultPrevented() && !h && e(f) }, washMouseEvent: function (a) { var c = a.originalEvent || a; if (c.pageX === u) c.pageX = a.pageX, c.pageY = a.pageY; return c }, animate: function (b, c, d) { var e = a(b); if (!b.style) b.style = {}; if (c.d) b.toD = c.d, c.d = 1; e.stop(); c.opacity !== u && b.attr && (c.opacity += "px"); e.animate(c, d) }, stop: function (b) { a(b).stop() } } })(G.jQuery); var R = G.HighchartsAdapter, F = R || {}; R && R.init.call(R, ub); var ib = F.adapterRun, Qb = F.getScript, va = F.inArray, p = F.each, vb = F.grep, Rb = F.offset, Ua = F.map, C = F.addEvent, U = F.removeEvent, I = F.fireEvent, Sb = F.washMouseEvent, jb = F.animate, ab = F.stop, F = { enabled: !0, x: 0, y: 15, style: { color: "#666", cursor: "default", fontSize: "11px"} }; L = { colors: "#2f7ed8,#0d233a,#8bbc21,#910000,#1aadce,#492970,#f28f43,#77a1e5,#c42525,#a6c96a".split(","), symbols: ["circle", "diamond", "square", "triangle", "triangle-down"], lang: { loading: "Loading...", months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","), shortMonths: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","), weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","), decimalPoint: ".", numericSymbols: "k,M,G,T,P,E".split(","), resetZoom: "Reset zoom", resetZoomTitle: "Reset zoom level 1:1", thousandsSep: "," }, global: { useUTC: !0, canvasToolsURL: "http://code.highcharts.com/3.0.10/modules/canvas-tools.js", VMLRadialGradientURL: "http://code.highcharts.com/3.0.10/gfx/vml-radial-gradient.png" }, chart: { borderColor: "#4572A7", borderRadius: 5, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [10, 10, 15, 10], backgroundColor: "#FFFFFF", plotBorderColor: "#C0C0C0", resetZoomButton: { theme: { zIndex: 20 }, position: { align: "right", x: -10, y: 10}} }, title: { text: "Chart title", align: "center", margin: 15, style: { color: "#274b6d", fontSize: "16px"} }, subtitle: { text: "", align: "center", style: { color: "#4d759e"} }, plotOptions: { line: { allowPointSelect: !1, showCheckbox: !1, animation: { duration: 1E3 }, events: {}, lineWidth: 2, marker: { enabled: !0, lineWidth: 0, radius: 4, lineColor: "#FFFFFF", states: { hover: { enabled: !0 }, select: { fillColor: "#FFFFFF", lineColor: "#000000", lineWidth: 2}} }, point: { events: {} }, dataLabels: w(F, { align: "center", enabled: !1, formatter: function () { return this.y === null ? "" : Ga(this.y, -1) }, verticalAlign: "bottom", y: 0 }), cropThreshold: 300, pointRange: 0, states: { hover: { marker: {} }, select: { marker: {}} }, stickyTracking: !0, turboThreshold: 1E3} }, labels: { style: { position: "absolute", color: "#3E576F"} }, legend: { enabled: !0, align: "center", layout: "horizontal", labelFormatter: function () { return this.name }, borderWidth: 1, borderColor: "#909090", borderRadius: 5, navigation: { activeColor: "#274b6d", inactiveColor: "#CCC" }, shadow: !1, itemStyle: { color: "#274b6d", fontSize: "12px" }, itemHoverStyle: { color: "#000" }, itemHiddenStyle: { color: "#CCC" }, itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" }, symbolPadding: 5, verticalAlign: "bottom", x: 0, y: 0, title: { style: { fontWeight: "bold"}} }, loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "1em" }, style: { position: "absolute", backgroundColor: "white", opacity: 0.5, textAlign: "center"} }, tooltip: { enabled: !0, animation: X, backgroundColor: "rgba(255, 255, 255, .85)", borderWidth: 1, borderRadius: 3, dateTimeLabelFormats: { millisecond: "%A, %b %e, %H:%M:%S.%L", second: "%A, %b %e, %H:%M:%S", minute: "%A, %b %e, %H:%M", hour: "%A, %b %e, %H:%M", day: "%A, %b %e, %Y", week: "Week from %A, %b %e, %Y", month: "%B %Y", year: "%Y" }, headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>', pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>', shadow: !0, snap: Jb ? 25 : 10, style: { color: "#333333", cursor: "default", fontSize: "12px", padding: "8px", whiteSpace: "nowrap"} }, credits: { enabled: !0, text: "Highcharts.com", href: "http://www.highcharts.com", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#909090", fontSize: "9px"}} }; var Z = L.plotOptions, R = Z.line; Cb(); var Tb = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/, Ub = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/, Vb = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, wa = function (a) { var b = [], c, d; (function (a) { a && a.stops ? d = Ua(a.stops, function (a) { return wa(a[1]) }) : (c = Tb.exec(a)) ? b = [x(c[1]), x(c[2]), x(c[3]), parseFloat(c[4], 10)] : (c = Ub.exec(a)) ? b = [x(c[1], 16), x(c[2], 16), x(c[3], 16), 1] : (c = Vb.exec(a)) && (b = [x(c[1]), x(c[2]), x(c[3]), 1]) })(a); return { get: function (c) { var f; d ? (f = w(a), f.stops = [].concat(f.stops), p(d, function (a, b) { f.stops[b] = [f.stops[b][0], a.get(c)] })) : f = b && !isNaN(b[0]) ? c === "rgb" ? "rgb(" + b[0] + "," + b[1] + "," + b[2] + ")" : c === "a" ? b[3] : "rgba(" + b.join(",") + ")" : a; return f }, brighten: function (a) { if (d) p(d, function (b) { b.brighten(a) }); else if (ya(a) && a !== 0) { var c; for (c = 0; c < 3; c++) b[c] += x(a * 255), b[c] < 0 && (b[c] = 0), b[c] > 255 && (b[c] = 255) } return this }, rgba: b, setOpacity: function (a) { b[3] = a; return this } } }; ta.prototype = { init: function (a, b) { this.element = b === "span" ? V(b) : y.createElementNS(Da, b); this.renderer = a; this.attrSetters = {} }, opacity: 1, animate: function (a, b, c) { b = o(b, sa, !0); ab(this); if (b) { b = w(b, {}); if (c) b.complete = c; jb(this, a, b) } else this.attr(a), c && c() }, attr: function (a, b) { var c, d, e, f, g = this.element, h = g.nodeName.toLowerCase(), i = this.renderer, j, k = this.attrSetters, l = this.shadows, m, n, q = this; ga(a) && r(b) && (c = a, a = {}, a[c] = b); if (ga(a)) c = a, h === "circle" ? c = { x: "cx", y: "cy"}[c] || c : c === "strokeWidth" && (c = "stroke-width"), q = z(g, c) || this[c] || 0, c !== "d" && c !== "visibility" && c !== "fill" && (q = parseFloat(q)); else { for (c in a) if (j = !1, d = a[c], e = k[c] && k[c].call(this, d, c), e !== !1) { e !== u && (d = e); if (c === "d") d && d.join && (d = d.join(" ")), /(NaN| {2}|^$)/.test(d) && (d = "M 0 0"); else if (c === "x" && h === "text") for (e = 0; e < g.childNodes.length; e++) f = g.childNodes[e], z(f, "x") === z(g, "x") && z(f, "x", d); else if (this.rotation && (c === "x" || c === "y")) n = !0; else if (c === "fill") d = i.color(d, g, c); else if (h === "circle" && (c === "x" || c === "y")) c = { x: "cx", y: "cy"}[c] || c; else if (h === "rect" && c === "r") z(g, { rx: d, ry: d }), j = !0; else if (c === "translateX" || c === "translateY" || c === "rotation" || c === "verticalAlign" || c === "scaleX" || c === "scaleY") j = n = !0; else if (c === "stroke") d = i.color(d, g, c); else if (c === "dashstyle") if (c = "stroke-dasharray", d = d && d.toLowerCase(), d === "solid") d = O; else { if (d) { d = d.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(","); for (e = d.length; e--; ) d[e] = x(d[e]) * o(a["stroke-width"], this["stroke-width"]); d = d.join(",") } } else if (c === "width") d = x(d); else if (c === "align") c = "text-anchor", d = { left: "start", center: "middle", right: "end"}[d]; else if (c === "title") e = g.getElementsByTagName("title")[0], e || (e = y.createElementNS(Da, "title"), g.appendChild(e)), e.textContent = d; c === "strokeWidth" && (c = "stroke-width"); if (c === "stroke-width" || c === "stroke") { this[c] = d; if (this.stroke && this["stroke-width"]) z(g, "stroke", this.stroke), z(g, "stroke-width", this["stroke-width"]), this.hasStroke = !0; else if (c === "stroke-width" && d === 0 && this.hasStroke) g.removeAttribute("stroke"), this.hasStroke = !1; j = !0 } this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c) && (m || (this.symbolAttr(a), m = !0), j = !0); if (l && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(c)) for (e = l.length; e--; ) z(l[e], c, c === "height" ? t(d - (l[e].cutHeight || 0), 0) : d); if ((c === "width" || c === "height") && h === "rect" && d < 0) d = 0; this[c] = d; if (c === "text") { if (d !== this.textStr) delete this.bBox, this.textStr = d, this.added && i.buildText(this) } else j || d !== void 0 && g.setAttribute(c, d) } n && this.updateTransform() } return q }, addClass: function (a) { var b = this.element, c = z(b, "class") || ""; c.indexOf(a) === -1 && z(b, "class", c + " " + a); return this }, symbolAttr: function (a) { var b = this; p("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","), function (c) { b[c] = o(a[c], b[c]) }); b.attr({ d: b.renderer.symbols[b.symbolName](b.x, b.y, b.width, b.height, b) }) }, clip: function (a) { return this.attr("clip-path", a ? "url(" + this.renderer.url + "#" + a.id + ")" : O) }, crisp: function (a) { var b, c = {}, d, e = a.strokeWidth || this.strokeWidth || this.attr && this.attr("stroke-width") || 0; d = v(e) % 2 / 2; a.x = S(a.x || this.x || 0) + d; a.y = S(a.y || this.y || 0) + d; a.width = S((a.width || this.width || 0) - 2 * d); a.height = S((a.height || this.height || 0) - 2 * d); a.strokeWidth = e; for (b in a) this[b] !== a[b] && (this[b] = c[b] = a[b]); return c }, css: function (a) { var b = this.styles, c = {}, d = this.element, e, f, g = ""; e = !b; if (a && a.color) a.fill = a.color; if (b) for (f in a) a[f] !== b[f] && (c[f] = a[f], e = !0); if (e) { e = this.textWidth = a && a.width && d.nodeName.toLowerCase() === "text" && x(a.width); b && (a = s(b, c)); this.styles = a; e && (ca || !X && this.renderer.forExport) && delete a.width; if (Aa && !X) D(this.element, a); else { b = function (a, b) { return "-" + b.toLowerCase() }; for (f in a) g += f.replace(/([A-Z])/g, b) + ":" + a[f] + ";"; z(d, "style", g) } e && this.added && this.renderer.buildText(this) } return this }, on: function (a, b) { var c = this, d = c.element; $a && a === "click" ? (d.ontouchstart = function (a) { c.touchEventFired = Date.now(); a.preventDefault(); b.call(d, a) }, d.onclick = function (a) { (ua.indexOf("Android") === -1 || Date.now() - (c.touchEventFired || 0) > 1100) && b.call(d, a) }) : d["on" + a] = b; return this }, setRadialReference: function (a) { this.element.radialReference = a; return this }, translate: function (a, b) { return this.attr({ translateX: a, translateY: b }) }, invert: function () { this.inverted = !0; this.updateTransform(); return this }, updateTransform: function () { var a = this.translateX || 0, b = this.translateY || 0, c = this.scaleX, d = this.scaleY, e = this.inverted, f = this.rotation; e && (a += this.attr("width"), b += this.attr("height")); a = ["translate(" + a + "," + b + ")"]; e ? a.push("rotate(90) scale(-1,1)") : f && a.push("rotate(" + f + " " + (this.x || 0) + " " + (this.y || 0) + ")"); (r(c) || r(d)) && a.push("scale(" + o(c, 1) + " " + o(d, 1) + ")"); a.length && z(this.element, "transform", a.join(" ")) }, toFront: function () { var a = this.element; a.parentNode.appendChild(a); return this }, align: function (a, b, c) { var d, e, f, g, h = {}; e = this.renderer; f = e.alignedObjects; if (a) { if (this.alignOptions = a, this.alignByTranslate = b, !c || ga(c)) this.alignTo = d = c || "renderer", ia(f, this), f.push(this), c = null } else a = this.alignOptions, b = this.alignByTranslate, d = this.alignTo; c = o(c, e[d], e); d = a.align; e = a.verticalAlign; f = (c.x || 0) + (a.x || 0); g = (c.y || 0) + (a.y || 0); if (d === "right" || d === "center") f += (c.width - (a.width || 0)) / { right: 1, center: 2}[d]; h[b ? "translateX" : "x"] = v(f); if (e === "bottom" || e === "middle") g += (c.height - (a.height || 0)) / ({ bottom: 1, middle: 2}[e] || 1); h[b ? "translateY" : "y"] = v(g); this[this.placed ? "animate" : "attr"](h); this.placed = !0; this.alignAttr = h; return this }, getBBox: function () { var a = this.bBox, b = this.renderer, c, d, e = this.rotation; c = this.element; var f = this.styles, g = e * Ca; d = this.textStr; var h; if (d === "" || Pb.test(d)) h = d.toString().length + (f ? "|" + f.fontSize + "|" + f.fontFamily : ""), a = b.cache[h]; if (!a) { if (c.namespaceURI === Da || b.forExport) { try { a = c.getBBox ? s({}, c.getBBox()) : { width: c.offsetWidth, height: c.offsetHeight} } catch (i) { } if (!a || a.width < 0) a = { width: 0, height: 0} } else a = this.htmlGetBBox(); if (b.isSVG) { c = a.width; d = a.height; if (Aa && f && f.fontSize === "11px" && d.toPrecision(3) === "16.9") a.height = d = 14; if (e) a.width = N(d * ba(g)) + N(c * W(g)), a.height = N(d * W(g)) + N(c * ba(g)) } this.bBox = a; h && (b.cache[h] = a) } return a }, show: function (a) { return this.attr({ visibility: a ? "inherit" : "visible" }) }, hide: function () { return this.attr({ visibility: "hidden" }) }, fadeOut: function (a) { var b = this; b.animate({ opacity: 0 }, { duration: a || 150, complete: function () { b.hide() } }) }, add: function (a) { var b = this.renderer, c = a || b, d = c.element || b.box, e = this.element, f = this.zIndex, g, h; if (a) this.parentGroup = a; this.parentInverted = a && a.inverted; this.textStr !== void 0 && b.buildText(this); if (f) c.handleZ = !0, f = x(f); if (c.handleZ) { a = d.childNodes; for (g = 0; g < a.length; g++) if (b = a[g], c = z(b, "zIndex"), b !== e && (x(c) > f || !r(f) && r(c))) { d.insertBefore(e, b); h = !0; break } } h || d.appendChild(e); this.added = !0; if (this.onAdd) this.onAdd(); return this }, safeRemoveChild: function (a) { var b = a.parentNode; b && b.removeChild(a) }, destroy: function () { var a = this, b = a.element || {}, c = a.shadows, d = a.renderer.isSVG && b.nodeName === "SPAN" && a.parentGroup, e, f; b.onclick = b.onmouseout = b.onmouseover = b.onmousemove = b.point = null; ab(a); if (a.clipPath) a.clipPath = a.clipPath.destroy(); if (a.stops) { for (f = 0; f < a.stops.length; f++) a.stops[f] = a.stops[f].destroy(); a.stops = null } a.safeRemoveChild(b); for (c && p(c, function (b) { a.safeRemoveChild(b) }); d && d.div.childNodes.length === 0; ) b = d.parentGroup, a.safeRemoveChild(d.div), delete d.div, d = b; a.alignTo && ia(a.renderer.alignedObjects, a); for (e in a) delete a[e]; return null }, shadow: function (a, b, c) { var d = [], e, f, g = this.element, h, i, j, k; if (a) { i = o(a.width, 3); j = (a.opacity || 0.15) / i; k = this.parentInverted ? "(-1,-1)" : "(" + o(a.offsetX, 1) + ", " + o(a.offsetY, 1) + ")"; for (e = 1; e <= i; e++) { f = g.cloneNode(0); h = i * 2 + 1 - 2 * e; z(f, { isShadow: "true", stroke: a.color || "black", "stroke-opacity": j * e, "stroke-width": h, transform: "translate" + k, fill: O }); if (c) z(f, "height", t(z(f, "height") - h, 0)), f.cutHeight = h; b ? b.element.appendChild(f) : g.parentNode.insertBefore(f, g); d.push(f) } this.shadows = d } return this } }; var pa = function () { this.init.apply(this, arguments) }; pa.prototype = { Element: ta, init: function (a, b, c, d, e) { var f = location, g, d = this.createElement("svg").attr({ version: "1.1" }).css(this.getStyle(d)); g = d.element; a.appendChild(g); a.innerHTML.indexOf("xmlns") === -1 && z(g, "xmlns", Da); this.isSVG = !0; this.box = g; this.boxWrapper = d; this.alignedObjects = []; this.url = (Ta || hb) && y.getElementsByTagName("base").length ? f.href.replace(/#.*?$/, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20") : ""; this.createElement("desc").add().element.appendChild(y.createTextNode("Created with Highcharts 3.0.10")); this.defs = this.createElement("defs").add(); this.forExport = e; this.gradients = {}; this.cache = {}; this.setSize(b, c, !1); var h; if (Ta && a.getBoundingClientRect) this.subPixelFix = b = function () { D(a, { left: 0, top: 0 }); h = a.getBoundingClientRect(); D(a, { left: Ka(h.left) - h.left + "px", top: Ka(h.top) - h.top + "px" }) }, b(), C(G, "resize", b) }, getStyle: function (a) { return this.style = s({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif', fontSize: "12px" }, a) }, isHidden: function () { return !this.boxWrapper.getBBox().width }, destroy: function () { var a = this.defs; this.box = null; this.boxWrapper = this.boxWrapper.destroy(); Oa(this.gradients || {}); this.gradients = null; if (a) this.defs = a.destroy(); this.subPixelFix && U(G, "resize", this.subPixelFix); return this.alignedObjects = null }, createElement: function (a) { var b = new this.Element; b.init(this, a); return b }, draw: function () { }, buildText: function (a) { for (var b = a.element, c = this, d = c.forExport, e = o(a.textStr, "").toString().replace(/<(b|strong)>/g, '<span style="font-weight:bold">').replace(/<(i|em)>/g, '<span style="font-style:italic">').replace(/<a/g, "<span").replace(/<\/(b|strong|i|em|a)>/g, "</span>").split(/<br.*?>/g), f = b.childNodes, g = /<.*style="([^"]+)".*>/, h = /<.*href="(http[^"]+)".*>/, i = z(b, "x"), j = a.styles, k = a.textWidth, l = j && j.lineHeight, m = f.length, n = function (a) { return l ? x(l) : c.fontMetrics(/(px|em)$/.test(a && a.style.fontSize) ? a.style.fontSize : j.fontSize || 11).h }; m--; ) b.removeChild(f[m]); k && !a.added && this.box.appendChild(b); e[e.length - 1] === "" && e.pop(); p(e, function (e, f) { var l, m = 0, e = e.replace(/<span/g, "|||<span").replace(/<\/span>/g, "</span>|||"); l = e.split("|||"); p(l, function (e) { if (e !== "" || l.length === 1) { var q = {}, o = y.createElementNS(Da, "tspan"), p; g.test(e) && (p = e.match(g)[1].replace(/(;| |^)color([ :])/, "$1fill$2"), z(o, "style", p)); h.test(e) && !d && (z(o, "onclick", 'location.href="' + e.match(h)[1] + '"'), D(o, { cursor: "pointer" })); e = (e.replace(/<(.|\n)*?>/g, "") || " ").replace(/&lt;/g, "<").replace(/&gt;/g, ">"); if (e !== " " && (o.appendChild(y.createTextNode(e)), m ? q.dx = 0 : q.x = i, z(o, q), !m && f && (!X && d && D(o, { display: "block" }), z(o, "dy", n(o), hb && o.offsetHeight)), b.appendChild(o), m++, k)) for (var e = e.replace(/([^\^])-/g, "$1- ").split(" "), q = e.length > 1 && j.whiteSpace !== "nowrap", r, t, s = a._clipHeight, A = [], v = n(), u = 1; q && (e.length || A.length); ) delete a.bBox, r = a.getBBox(), t = r.width, !X && c.forExport && (t = c.measureSpanWidth(o.firstChild.data, a.styles)), r = t > k, !r || e.length === 1 ? (e = A, A = [], e.length && (u++, s && u * v > s ? (e = ["..."], a.attr("title", a.textStr)) : (o = y.createElementNS(Da, "tspan"), z(o, { dy: v, x: i }), p && z(o, "style", p), b.appendChild(o), t > k && (k = t)))) : (o.removeChild(o.firstChild), A.unshift(e.pop())), e.length && o.appendChild(y.createTextNode(e.join(" ").replace(/- /g, "-"))) } }) }) }, button: function (a, b, c, d, e, f, g, h, i) { var j = this.label(a, b, c, i, null, null, null, null, "button"), k = 0, l, m, n, q, o, p, a = { x1: 0, y1: 0, x2: 0, y2: 1 }, e = w({ "stroke-width": 1, stroke: "#CCCCCC", fill: { linearGradient: a, stops: [[0, "#FEFEFE"], [1, "#F6F6F6"]] }, r: 2, padding: 5, style: { color: "black"} }, e); n = e.style; delete e.style; f = w(e, { stroke: "#68A", fill: { linearGradient: a, stops: [[0, "#FFF"], [1, "#ACF"]]} }, f); q = f.style; delete f.style; g = w(e, { stroke: "#68A", fill: { linearGradient: a, stops: [[0, "#9BD"], [1, "#CDF"]]} }, g); o = g.style; delete g.style; h = w(e, { style: { color: "#CCC"} }, h); p = h.style; delete h.style; C(j.element, Aa ? "mouseover" : "mouseenter", function () { k !== 3 && j.attr(f).css(q) }); C(j.element, Aa ? "mouseout" : "mouseleave", function () { k !== 3 && (l = [e, f, g][k], m = [n, q, o][k], j.attr(l).css(m)) }); j.setState = function (a) { (j.state = k = a) ? a === 2 ? j.attr(g).css(o) : a === 3 && j.attr(h).css(p) : j.attr(e).css(n) }; return j.on("click", function () { k !== 3 && d.call(j) }).attr(e).css(s({ cursor: "default" }, n)) }, crispLine: function (a, b) { a[1] === a[4] && (a[1] = a[4] = v(a[1]) - b % 2 / 2); a[2] === a[5] && (a[2] = a[5] = v(a[2]) + b % 2 / 2); return a }, path: function (a) { var b = { fill: O }; La(a) ? b.d = a : $(a) && s(b, a); return this.createElement("path").attr(b) }, circle: function (a, b, c) { a = $(a) ? a : { x: a, y: b, r: c }; return this.createElement("circle").attr(a) }, arc: function (a, b, c, d, e, f) { if ($(a)) b = a.y, c = a.r, d = a.innerR, e = a.start, f = a.end, a = a.x; a = this.symbol("arc", a || 0, b || 0, c || 0, c || 0, { innerR: d || 0, start: e || 0, end: f || 0 }); a.r = c; return a }, rect: function (a, b, c, d, e, f) { var e = $(a) ? a.r : e, g = this.createElement("rect"), a = $(a) ? a : a === u ? {} : { x: a, y: b, width: t(c, 0), height: t(d, 0) }; if (f !== u) a.strokeWidth = f, a = g.crisp(a); if (e) a.r = e; return g.attr(a) }, setSize: function (a, b, c) { var d = this.alignedObjects, e = d.length; this.width = a; this.height = b; for (this.boxWrapper[o(c, !0) ? "animate" : "attr"]({ width: a, height: b }); e--; ) d[e].align() }, g: function (a) { var b = this.createElement("g"); return r(a) ? b.attr({ "class": "highcharts-" + a }) : b }, image: function (a, b, c, d, e) { var f = { preserveAspectRatio: O }; arguments.length > 1 && s(f, { x: b, y: c, width: d, height: e }); f = this.createElement("image").attr(f); f.element.setAttributeNS ? f.element.setAttributeNS("http://www.w3.org/1999/xlink", "href", a) : f.element.setAttribute("hc-svg-href", a); return f }, symbol: function (a, b, c, d, e, f) { var g, h = this.symbols[a], h = h && h(v(b), v(c), d, e, f), i = /^url\((.*?)\)$/, j, k; if (h) g = this.path(h), s(g, { symbolName: a, x: b, y: c, width: d, height: e }), f && s(g, f); else if (i.test(a)) k = function (a, b) { a.element && (a.attr({ width: b[0], height: b[1] }), a.alignByTranslate || a.translate(v((d - b[0]) / 2), v((e - b[1]) / 2))) }, j = a.match(i)[1], a = Kb[j], g = this.image(j).attr({ x: b, y: c }), g.isImg = !0, a ? k(g, a) : (g.attr({ width: 0, height: 0 }), V("img", { onload: function () { k(g, Kb[j] = [this.width, this.height]) }, src: j })); return g }, symbols: { circle: function (a, b, c, d) { var e = 0.166 * c; return ["M", a + c / 2, b, "C", a + c + e, b, a + c + e, b + d, a + c / 2, b + d, "C", a - e, b + d, a - e, b, a + c / 2, b, "Z"] }, square: function (a, b, c, d) { return ["M", a, b, "L", a + c, b, a + c, b + d, a, b + d, "Z"] }, triangle: function (a, b, c, d) { return ["M", a + c / 2, b, "L", a + c, b + d, a, b + d, "Z"] }, "triangle-down": function (a, b, c, d) { return ["M", a, b, "L", a + c, b, a + c / 2, b + d, "Z"] }, diamond: function (a, b, c, d) { return ["M", a + c / 2, b, "L", a + c, b + d / 2, a + c / 2, b + d, a, b + d / 2, "Z"] }, arc: function (a, b, c, d, e) { var f = e.start, c = e.r || c || d, g = e.end - 0.001, d = e.innerR, h = e.open, i = W(f), j = ba(f), k = W(g), g = ba(g), e = e.end - f < la ? 0 : 1; return ["M", a + c * i, b + c * j, "A", c, c, 0, e, 1, a + c * k, b + c * g, h ? "M" : "L", a + d * k, b + d * g, "A", d, d, 0, e, 0, a + d * i, b + d * j, h ? "" : "Z"] } }, clipRect: function (a, b, c, d) { var e = "highcharts-" + tb++, f = this.createElement("clipPath").attr({ id: e }).add(this.defs), a = this.rect(a, b, c, d, 0).add(f); a.id = e; a.clipPath = f; return a }, color: function (a, b, c) { var d = this, e, f = /^rgba/, g, h, i, j, k, l, m, n = []; a && a.linearGradient ? g = "linearGradient" : a && a.radialGradient && (g = "radialGradient"); if (g) { c = a[g]; h = d.gradients; j = a.stops; b = b.radialReference; La(c) && (a[g] = c = { x1: c[0], y1: c[1], x2: c[2], y2: c[3], gradientUnits: "userSpaceOnUse" }); g === "radialGradient" && b && !r(c.gradientUnits) && (c = w(c, { cx: b[0] - b[2] / 2 + c.cx * b[2], cy: b[1] - b[2] / 2 + c.cy * b[2], r: c.r * b[2], gradientUnits: "userSpaceOnUse" })); for (m in c) m !== "id" && n.push(m, c[m]); for (m in j) n.push(j[m]); n = n.join(","); h[n] ? a = h[n].id : (c.id = a = "highcharts-" + tb++, h[n] = i = d.createElement(g).attr(c).add(d.defs), i.stops = [], p(j, function (a) { f.test(a[1]) ? (e = wa(a[1]), k = e.get("rgb"), l = e.get("a")) : (k = a[1], l = 1); a = d.createElement("stop").attr({ offset: a[0], "stop-color": k, "stop-opacity": l }).add(i); i.stops.push(a) })); return "url(" + d.url + "#" + a + ")" } else return f.test(a) ? (e = wa(a), z(b, c + "-opacity", e.get("a")), e.get("rgb")) : (b.removeAttribute(c + "-opacity"), a) }, text: function (a, b, c, d) { var e = ca || !X && this.forExport; if (d && !this.forExport) return this.html(a, b, c); b = v(o(b, 0)); c = v(o(c, 0)); a = this.createElement("text").attr({ x: b, y: c, text: a }); e && a.css({ position: "absolute" }); a.x = b; a.y = c; return a }, fontMetrics: function (a) { var a = a || this.style.fontSize, a = /px/.test(a) ? x(a) : /em/.test(a) ? parseFloat(a) * 12 : 12, a = a < 24 ? a + 4 : v(a * 1.2), b = v(a * 0.8); return { h: a, b: b} }, label: function (a, b, c, d, e, f, g, h, i) { function j() { var a, b; a = q.element.style; K = (Va === void 0 || wb === void 0 || n.styles.textAlign) && q.textStr && q.getBBox(); n.width = (Va || K.width || 0) + 2 * P + kb; n.height = (wb || K.height || 0) + 2 * P; xa = P + m.fontMetrics(a && a.fontSize).b; if (y) { if (!o) a = v(-t * P), b = h ? -xa : 0, n.box = o = d ? m.symbol(d, a, b, n.width, n.height, A) : m.rect(a, b, n.width, n.height, 0, A[Lb]), o.attr("fill", O).add(n); o.isImg || o.attr(w({ width: n.width, height: n.height }, A)); A = null } } function k() { var a = n.styles, a = a && a.textAlign, b = kb + P * (1 - t), c; c = h ? 0 : xa; if (r(Va) && K && (a === "center" || a === "right")) b += { center: 0.5, right: 1}[a] * (Va - K.width); (b !== q.x || c !== q.y) && q.attr({ x: b, y: c }); q.x = b; q.y = c } function l(a, b) { o ? o.attr(a, b) : A[a] = b } var m = this, n = m.g(i), q = m.text("", 0, 0, g).attr({ zIndex: 1 }), o, K, t = 0, P = 3, kb = 0, Va, wb, xb, yb, H = 0, A = {}, xa, g = n.attrSetters, y; n.onAdd = function () { q.add(n); n.attr({ text: a, x: b, y: c }); o && r(e) && n.attr({ anchorX: e, anchorY: f }) }; g.width = function (a) { Va = a; return !1 }; g.height = function (a) { wb = a; return !1 }; g.padding = function (a) { r(a) && a !== P && (P = a, k()); return !1 }; g.paddingLeft = function (a) { r(a) && a !== kb && (kb = a, k()); return !1 }; g.align = function (a) { t = { left: 0, center: 0.5, right: 1}[a]; return !1 }; g.text = function (a, b) { q.attr(b, a); j(); k(); return !1 }; g[Lb] = function (a, b) { a && (y = !0); H = a % 2 / 2; l(b, a); return !1 }; g.stroke = g.fill = g.r = function (a, b) { b === "fill" && a && (y = !0); l(b, a); return !1 }; g.anchorX = function (a, b) { e = a; l(b, a + H - xb); return !1 }; g.anchorY = function (a, b) { f = a; l(b, a - yb); return !1 }; g.x = function (a) { n.x = a; a -= t * ((Va || K.width) + P); xb = v(a); n.attr("translateX", xb); return !1 }; g.y = function (a) { yb = n.y = v(a); n.attr("translateY", yb); return !1 }; var x = n.css; return s(n, { css: function (a) { if (a) { var b = {}, a = w(a); p("fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow".split(","), function (c) { a[c] !== u && (b[c] = a[c], delete a[c]) }); q.css(b) } return x.call(n, a) }, getBBox: function () { return { width: K.width + 2 * P, height: K.height + 2 * P, x: K.x - P, y: K.y - P} }, shadow: function (a) { o && o.shadow(a); return n }, destroy: function () { U(n.element, "mouseenter"); U(n.element, "mouseleave"); q && (q = q.destroy()); o && (o = o.destroy()); ta.prototype.destroy.call(n); n = m = j = k = l = null } }) } }; Za = pa; s(ta.prototype, { htmlCss: function (a) { var b = this.element; if (b = a && b.tagName === "SPAN" && a.width) delete a.width, this.textWidth = b, this.updateTransform(); this.styles = s(this.styles, a); D(this.element, a); return this }, htmlGetBBox: function () { var a = this.element, b = this.bBox; if (!b) { if (a.nodeName === "text") a.style.position = "absolute"; b = this.bBox = { x: a.offsetLeft, y: a.offsetTop, width: a.offsetWidth, height: a.offsetHeight} } return b }, htmlUpdateTransform: function () { if (this.added) { var a = this.renderer, b = this.element, c = this.translateX || 0, d = this.translateY || 0, e = this.x || 0, f = this.y || 0, g = this.textAlign || "left", h = { left: 0, center: 0.5, right: 1}[g], i = this.shadows; D(b, { marginLeft: c, marginTop: d }); i && p(i, function (a) { D(a, { marginLeft: c + 1, marginTop: d + 1 }) }); this.inverted && p(b.childNodes, function (c) { a.invertChild(c, b) }); if (b.tagName === "SPAN") { var j = this.rotation, k, l = x(this.textWidth), m = [j, g, b.innerHTML, this.textWidth].join(","); if (m !== this.cTT) { k = a.fontMetrics(b.style.fontSize).b; r(j) && this.setSpanRotation(j, h, k); i = o(this.elemWidth, b.offsetWidth); if (i > l && /[ \-]/.test(b.textContent || b.innerText)) D(b, { width: l + "px", display: "block", whiteSpace: "normal" }), i = l; this.getSpanCorrection(i, k, h, j, g) } D(b, { left: e + (this.xCorr || 0) + "px", top: f + (this.yCorr || 0) + "px" }); if (hb) k = b.offsetHeight; this.cTT = m } } else this.alignOnAdd = !0 }, setSpanRotation: function (a, b, c) { var d = {}, e = Aa ? "-ms-transform" : hb ? "-webkit-transform" : Ta ? "MozTransform" : Ib ? "-o-transform" : ""; d[e] = d.transform = "rotate(" + a + "deg)"; d[e + (Ta ? "Origin" : "-origin")] = d.transformOrigin = b * 100 + "% " + c + "px"; D(this.element, d) }, getSpanCorrection: function (a, b, c) { this.xCorr = -a * c; this.yCorr = -b } }); s(pa.prototype, { html: function (a, b, c) { var d = this.createElement("span"), e = d.attrSetters, f = d.element, g = d.renderer; e.text = function (a) { a !== f.innerHTML && delete this.bBox; f.innerHTML = this.textStr = a; return !1 }; e.x = e.y = e.align = e.rotation = function (a, b) { b === "align" && (b = "textAlign"); d[b] = a; d.htmlUpdateTransform(); return !1 }; d.attr({ text: a, x: v(b), y: v(c) }).css({ position: "absolute", whiteSpace: "nowrap", fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }); d.css = d.htmlCss; if (g.isSVG) d.add = function (a) { var b, c = g.box.parentNode, e = []; if (this.parentGroup = a) { if (b = a.div, !b) { for (; a; ) e.push(a), a = a.parentGroup; p(e.reverse(), function (a) { var d; b = a.div = a.div || V(Ja, { className: z(a.element, "class") }, { position: "absolute", left: (a.translateX || 0) + "px", top: (a.translateY || 0) + "px" }, b || c); d = b.style; s(a.attrSetters, { translateX: function (a) { d.left = a + "px" }, translateY: function (a) { d.top = a + "px" }, visibility: function (a, b) { d[b] = a } }) }) } } else b = c; b.appendChild(f); d.added = !0; d.alignOnAdd && d.htmlUpdateTransform(); return d }; return d } }); var da; if (!X && !ca) { Q.VMLElement = da = { init: function (a, b) { var c = ["<", b, ' filled="f" stroked="f"'], d = ["position: ", "absolute", ";"], e = b === Ja; (b === "shape" || e) && d.push("left:0;top:0;width:1px;height:1px;"); d.push("visibility: ", e ? "hidden" : "visible"); c.push(' style="', d.join(""), '"/>'); if (b) c = e || b === "span" || b === "img" ? c.join("") : a.prepVML(c), this.element = V(c); this.renderer = a; this.attrSetters = {} }, add: function (a) { var b = this.renderer, c = this.element, d = b.box, d = a ? a.element || a : d; a && a.inverted && b.invertChild(c, d); d.appendChild(c); this.added = !0; this.alignOnAdd && !this.deferUpdateTransform && this.updateTransform(); if (this.onAdd) this.onAdd(); return this }, updateTransform: ta.prototype.htmlUpdateTransform, setSpanRotation: function () { var a = this.rotation, b = W(a * Ca), c = ba(a * Ca); D(this.element, { filter: a ? ["progid:DXImageTransform.Microsoft.Matrix(M11=", b, ", M12=", -c, ", M21=", c, ", M22=", b, ", sizingMethod='auto expand')"].join("") : O }) }, getSpanCorrection: function (a, b, c, d, e) { var f = d ? W(d * Ca) : 1, g = d ? ba(d * Ca) : 0, h = o(this.elemHeight, this.element.offsetHeight), i; this.xCorr = f < 0 && -a; this.yCorr = g < 0 && -h; i = f * g < 0; this.xCorr += g * b * (i ? 1 - c : c); this.yCorr -= f * b * (d ? i ? c : 1 - c : 1); e && e !== "left" && (this.xCorr -= a * c * (f < 0 ? -1 : 1), d && (this.yCorr -= h * c * (g < 0 ? -1 : 1)), D(this.element, { textAlign: e })) }, pathToVML: function (a) { for (var b = a.length, c = []; b--; ) if (ya(a[b])) c[b] = v(a[b] * 10) - 5; else if (a[b] === "Z") c[b] = "x"; else if (c[b] = a[b], a.isArc && (a[b] === "wa" || a[b] === "at")) c[b + 5] === c[b + 7] && (c[b + 7] += a[b + 7] > a[b + 5] ? 1 : -1), c[b + 6] === c[b + 8] && (c[b + 8] += a[b + 8] > a[b + 6] ? 1 : -1); return c.join(" ") || "x" }, attr: function (a, b) { var c, d, e, f = this.element || {}, g = f.style, h = f.nodeName, i = this.renderer, j = this.symbolName, k, l = this.shadows, m, n = this.attrSetters, q = this; ga(a) && r(b) && (c = a, a = {}, a[c] = b); if (ga(a)) c = a, q = c === "strokeWidth" || c === "stroke-width" ? this.strokeweight : this[c]; else for (c in a) if (d = a[c], m = !1, e = n[c] && n[c].call(this, d, c), e !== !1 && d !== null) { e !== u && (d = e); if (j && /^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c)) k || (this.symbolAttr(a), k = !0), m = !0; else if (c === "d") { d = d || []; this.d = d.join(" "); f.path = d = this.pathToVML(d); if (l) for (e = l.length; e--; ) l[e].path = l[e].cutOff ? this.cutOffPath(d, l[e].cutOff) : d; m = !0 } else if (c === "visibility") { d === "inherit" && (d = "visible"); if (l) for (e = l.length; e--; ) l[e].style[c] = d; h === "DIV" && (d = d === "hidden" ? "-999em" : 0, gb || (g[c] = d ? "visible" : "hidden"), c = "top"); g[c] = d; m = !0 } else if (c === "zIndex") d && (g[c] = d), m = !0; else if (va(c, ["x", "y", "width", "height"]) !== -1) this[c] = d, c === "x" || c === "y" ? c = { x: "left", y: "top"}[c] : d = t(0, d), this.updateClipping ? (this[c] = d, this.updateClipping()) : g[c] = d, m = !0; else if (c === "class" && h === "DIV") f.className = d; else if (c === "stroke") d = i.color(d, f, c), c = "strokecolor"; else if (c === "stroke-width" || c === "strokeWidth") f.stroked = d ? !0 : !1, c = "strokeweight", this[c] = d, ya(d) && (d += "px"); else if (c === "dashstyle") (f.getElementsByTagName("stroke")[0] || V(i.prepVML(["<stroke/>"]), null, null, f))[c] = d || "solid", this.dashstyle = d, m = !0; else if (c === "fill") if (h === "SPAN") g.color = d; else { if (h !== "IMG") f.filled = d !== O ? !0 : !1, d = i.color(d, f, c, this), c = "fillcolor" } else if (c === "opacity") m = !0; else if (h === "shape" && c === "rotation") this[c] = f.style[c] = d, f.style.left = -v(ba(d * Ca) + 1) + "px", f.style.top = v(W(d * Ca)) + "px"; else if (c === "translateX" || c === "translateY" || c === "rotation") this[c] = d, this.updateTransform(), m = !0; m || (gb ? f[c] = d : z(f, c, d)) } return q }, clip: function (a) { var b = this, c; a ? (c = a.members, ia(c, b), c.push(b), b.destroyClip = function () { ia(c, b) }, a = a.getCSS(b)) : (b.destroyClip && b.destroyClip(), a = { clip: gb ? "inherit" : "rect(auto)" }); return b.css(a) }, css: ta.prototype.htmlCss, safeRemoveChild: function (a) { a.parentNode && Pa(a) }, destroy: function () { this.destroyClip && this.destroyClip(); return ta.prototype.destroy.apply(this) }, on: function (a, b) { this.element["on" + a] = function () { var a = G.event; a.target = a.srcElement; b(a) }; return this }, cutOffPath: function (a, b) { var c, a = a.split(/[ ,]/); c = a.length; if (c === 9 || c === 11) a[c - 4] = a[c - 2] = x(a[c - 2]) - 10 * b; return a.join(" ") }, shadow: function (a, b, c) { var d = [], e, f = this.element, g = this.renderer, h, i = f.style, j, k = f.path, l, m, n, q; k && typeof k.value !== "string" && (k = "x"); m = k; if (a) { n = o(a.width, 3); q = (a.opacity || 0.15) / n; for (e = 1; e <= 3; e++) { l = n * 2 + 1 - 2 * e; c && (m = this.cutOffPath(k.value, l + 0.5)); j = ['<shape isShadow="true" strokeweight="', l, '" filled="false" path="', m, '" coordsize="10 10" style="', f.style.cssText, '" />']; h = V(g.prepVML(j), null, { left: x(i.left) + o(a.offsetX, 1), top: x(i.top) + o(a.offsetY, 1) }); if (c) h.cutOff = l + 1; j = ['<stroke color="', a.color || "black", '" opacity="', q * e, '"/>']; V(g.prepVML(j), null, null, h); b ? b.element.appendChild(h) : f.parentNode.insertBefore(h, f); d.push(h) } this.shadows = d } return this } }; da = ja(ta, da); var ea = { Element: da, isIE8: ua.indexOf("MSIE 8.0") > -1, init: function (a, b, c, d) { var e; this.alignedObjects = []; d = this.createElement(Ja).css(s(this.getStyle(d), { position: "relative" })); e = d.element; a.appendChild(d.element); this.isVML = !0; this.box = e; this.boxWrapper = d; this.cache = {}; this.setSize(b, c, !1); if (!y.namespaces.hcv) { y.namespaces.add("hcv", "urn:schemas-microsoft-com:vml"); try { y.createStyleSheet().cssText = "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } " } catch (f) { y.styleSheets[0].cssText += "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } " } } }, isHidden: function () { return !this.box.offsetWidth }, clipRect: function (a, b, c, d) { var e = this.createElement(), f = $(a); return s(e, { members: [], left: (f ? a.x : a) + 1, top: (f ? a.y : b) + 1, width: (f ? a.width : c) - 1, height: (f ? a.height : d) - 1, getCSS: function (a) { var b = a.element, c = b.nodeName, a = a.inverted, d = this.top - (c === "shape" ? b.offsetTop : 0), e = this.left, b = e + this.width, f = d + this.height, d = { clip: "rect(" + v(a ? e : d) + "px," + v(a ? f : b) + "px," + v(a ? b : f) + "px," + v(a ? d : e) + "px)" }; !a && gb && c === "DIV" && s(d, { width: b + "px", height: f + "px" }); return d }, updateClipping: function () { p(e.members, function (a) { a.css(e.getCSS(a)) }) } }) }, color: function (a, b, c, d) { var e = this, f, g = /^rgba/, h, i, j = O; a && a.linearGradient ? i = "gradient" : a && a.radialGradient && (i = "pattern"); if (i) { var k, l, m = a.linearGradient || a.radialGradient, n, q, o, K, r, P = "", a = a.stops, t, s = [], v = function () { h = ['<fill colors="' + s.join(",") + '" opacity="', o, '" o:opacity2="', q, '" type="', i, '" ', P, 'focus="100%" method="any" />']; V(e.prepVML(h), null, null, b) }; n = a[0]; t = a[a.length - 1]; n[0] > 0 && a.unshift([0, n[1]]); t[0] < 1 && a.push([1, t[1]]); p(a, function (a, b) { g.test(a[1]) ? (f = wa(a[1]), k = f.get("rgb"), l = f.get("a")) : (k = a[1], l = 1); s.push(a[0] * 100 + "% " + k); b ? (o = l, K = k) : (q = l, r = k) }); if (c === "fill") if (i === "gradient") c = m.x1 || m[0] || 0, a = m.y1 || m[1] || 0, n = m.x2 || m[2] || 0, m = m.y2 || m[3] || 0, P = 'angle="' + (90 - T.atan((m - a) / (n - c)) * 180 / la) + '"', v(); else { var j = m.r, u = j * 2, y = j * 2, w = m.cx, A = m.cy, xa = b.radialReference, x, j = function () { xa && (x = d.getBBox(), w += (xa[0] - x.x) / x.width - 0.5, A += (xa[1] - x.y) / x.height - 0.5, u *= xa[2] / x.width, y *= xa[2] / x.height); P = 'src="' + L.global.VMLRadialGradientURL + '" size="' + u + "," + y + '" origin="0.5,0.5" position="' + w + "," + A + '" color2="' + r + '" '; v() }; d.added ? j() : d.onAdd = j; j = K } else j = k } else if (g.test(a) && b.tagName !== "IMG") f = wa(a), h = ["<", c, ' opacity="', f.get("a"), '"/>'], V(this.prepVML(h), null, null, b), j = f.get("rgb"); else { j = b.getElementsByTagName(c); if (j.length) j[0].opacity = 1, j[0].type = "solid"; j = a } return j }, prepVML: function (a) { var b = this.isIE8, a = a.join(""); b ? (a = a.replace("/>", ' xmlns="urn:schemas-microsoft-com:vml" />'), a = a.indexOf('style="') === -1 ? a.replace("/>", ' style="display:inline-block;behavior:url(#default#VML);" />') : a.replace('style="', 'style="display:inline-block;behavior:url(#default#VML);')) : a = a.replace("<", "<hcv:"); return a }, text: pa.prototype.html, path: function (a) { var b = { coordsize: "10 10" }; La(a) ? b.d = a : $(a) && s(b, a); return this.createElement("shape").attr(b) }, circle: function (a, b, c) { var d = this.symbol("circle"); if ($(a)) c = a.r, b = a.y, a = a.x; d.isCircle = !0; d.r = c; return d.attr({ x: a, y: b }) }, g: function (a) { var b; a && (b = { className: "highcharts-" + a, "class": "highcharts-" + a }); return this.createElement(Ja).attr(b) }, image: function (a, b, c, d, e) { var f = this.createElement("img").attr({ src: a }); arguments.length > 1 && f.attr({ x: b, y: c, width: d, height: e }); return f }, createElement: function (a) { return a === "rect" ? this.symbol(a) : pa.prototype.createElement.call(this, a) }, invertChild: function (a, b) { var c = this, d = b.style, e = a.tagName === "IMG" && a.style; D(a, { flip: "x", left: x(d.width) - (e ? x(e.top) : 1), top: x(d.height) - (e ? x(e.left) : 1), rotation: -90 }); p(a.childNodes, function (b) { c.invertChild(b, a) }) }, symbols: { arc: function (a, b, c, d, e) { var f = e.start, g = e.end, h = e.r || c || d, c = e.innerR, d = W(f), i = ba(f), j = W(g), k = ba(g); if (g - f === 0) return ["x"]; f = ["wa", a - h, b - h, a + h, b + h, a + h * d, b + h * i, a + h * j, b + h * k]; e.open && !c && f.push("e", "M", a, b); f.push("at", a - c, b - c, a + c, b + c, a + c * j, b + c * k, a + c * d, b + c * i, "x", "e"); f.isArc = !0; return f }, circle: function (a, b, c, d, e) { e && (c = d = 2 * e.r); e && e.isCircle && (a -= c / 2, b -= d / 2); return ["wa", a, b, a + c, b + d, a + c, b + d / 2, a + c, b + d / 2, "e"] }, rect: function (a, b, c, d, e) { var f = a + c, g = b + d, h; !r(e) || !e.r ? f = pa.prototype.symbols.square.apply(0, arguments) : (h = E(e.r, c, d), f = ["M", a + h, b, "L", f - h, b, "wa", f - 2 * h, b, f, b + 2 * h, f - h, b, f, b + h, "L", f, g - h, "wa", f - 2 * h, g - 2 * h, f, g, f, g - h, f - h, g, "L", a + h, g, "wa", a, g - 2 * h, a + 2 * h, g, a + h, g, a, g - h, "L", a, b + h, "wa", a, b, a + 2 * h, b + 2 * h, a, b + h, a + h, b, "x", "e"]); return f } } }; Q.VMLRenderer = da = function () { this.init.apply(this, arguments) }; da.prototype = w(pa.prototype, ea); Za = da } pa.prototype.measureSpanWidth = function (a, b) { var c = y.createElement("span"), d; d = y.createTextNode(a); c.appendChild(d); D(c, b); this.box.appendChild(c); d = c.offsetWidth; Pa(c); return d }; var Mb; if (ca) Q.CanVGRenderer = da = function () { Da = "http://www.w3.org/1999/xhtml" }, da.prototype.symbols = {}, Mb = function () { function a() { var a = b.length, d; for (d = 0; d < a; d++) b[d](); b = [] } var b = []; return { push: function (c, d) { b.length === 0 && Qb(d, a); b.push(c) } } } (), Za = da; Sa.prototype = { addLabel: function () { var a = this.axis, b = a.options, c = a.chart, d = a.horiz, e = a.categories, f = a.names, g = this.pos, h = b.labels, i = a.tickPositions, d = d && e && !h.step && !h.staggerLines && !h.rotation && c.plotWidth / i.length || !d && (c.margin[3] || c.chartWidth * 0.33), j = g === i[0], k = g === i[i.length - 1], l, f = e ? o(e[g], f[g], g) : g, e = this.label, m = i.info; a.isDatetimeAxis && m && (l = b.dateTimeLabelFormats[m.higherRanks[g] || m.unitName]); this.isFirst = j; this.isLast = k; b = a.labelFormatter.call({ axis: a, chart: c, isFirst: j, isLast: k, dateTimeLabelFormat: l, value: a.isLog ? aa(ha(f)) : f }); g = d && { width: t(1, v(d - 2 * (h.padding || 10))) + "px" }; g = s(g, h.style); if (r(e)) e && e.attr({ text: b }).css(g); else { l = { align: a.labelAlign }; if (ya(h.rotation)) l.rotation = h.rotation; if (d && h.ellipsis) l._clipHeight = a.len / i.length; this.label = r(b) && h.enabled ? c.renderer.text(b, 0, 0, h.useHTML).attr(l).css(g).add(a.labelGroup) : null } }, getLabelSize: function () { var a = this.label, b = this.axis; return a ? a.getBBox()[b.horiz ? "height" : "width"] : 0 }, getLabelSides: function () { var a = this.label.getBBox(), b = this.axis, c = b.horiz, d = b.options.labels, a = c ? a.width : a.height, b = c ? d.x - a * { left: 0, center: 0.5, right: 1}[b.labelAlign] : 0; return [b, c ? a + b : a] }, handleOverflow: function (a, b) { var c = !0, d = this.axis, e = this.isFirst, f = this.isLast, g = d.horiz ? b.x : b.y, h = d.reversed, i = d.tickPositions, j = this.getLabelSides(), k = j[0], j = j[1], l, m, n, q = this.label.line || 0; l = d.labelEdge; m = d.justifyLabels && (e || f); l[q] === u || g + k > l[q] ? l[q] = g + j : m || (c = !1); if (m) { l = (m = d.justifyToPlot) ? d.pos : 0; m = m ? l + d.len : d.chart.chartWidth; do a += e ? 1 : -1, n = d.ticks[i[a]]; while (i[a] && (!n || n.label.line !== q)); d = n && n.label.xy && n.label.xy.x + n.getLabelSides()[e ? 0 : 1]; e && !h || f && h ? g + k < l && (g = l - k, n && g + j > d && (c = !1)) : g + j > m && (g = m - j, n && g + k < d && (c = !1)); b.x = g } return c }, getPosition: function (a, b, c, d) { var e = this.axis, f = e.chart, g = d && f.oldChartHeight || f.chartHeight; return { x: a ? e.translate(b + c, null, null, d) + e.transB : e.left + e.offset + (e.opposite ? (d && f.oldChartWidth || f.chartWidth) - e.right - e.left : 0), y: a ? g - e.bottom + e.offset - (e.opposite ? e.height : 0) : g - e.translate(b + c, null, null, d) - e.transB} }, getLabelPosition: function (a, b, c, d, e, f, g, h) { var i = this.axis, j = i.transA, k = i.reversed, l = i.staggerLines, m = i.chart.renderer.fontMetrics(e.style.fontSize).b, n = e.rotation, a = a + e.x - (f && d ? f * j * (k ? -1 : 1) : 0), b = b + e.y - (f && !d ? f * j * (k ? 1 : -1) : 0); n && i.side === 2 && (b -= m - m * W(n * Ca)); !r(e.y) && !n && (b += m - c.getBBox().height / 2); if (l) c.line = g / (h || 1) % l, b += c.line * (i.labelOffset / l); return { x: a, y: b} }, getMarkPath: function (a, b, c, d, e, f) { return f.crispLine(["M", a, b, "L", a + (e ? 0 : -c), b + (e ? c : 0)], d) }, render: function (a, b, c) { var d = this.axis, e = d.options, f = d.chart.renderer, g = d.horiz, h = this.type, i = this.label, j = this.pos, k = e.labels, l = this.gridLine, m = h ? h + "Grid" : "grid", n = h ? h + "Tick" : "tick", q = e[m + "LineWidth"], p = e[m + "LineColor"], K = e[m + "LineDashStyle"], t = e[n + "Length"], m = e[n + "Width"] || 0, r = e[n + "Color"], s = e[n + "Position"], n = this.mark, v = k.step, x = !0, y = d.tickmarkOffset, w = this.getPosition(g, j, y, b), H = w.x, w = w.y, A = g && H === d.pos + d.len || !g && w === d.pos ? -1 : 1; this.isActive = !0; if (q) { j = d.getPlotLinePath(j + y, q * A, b, !0); if (l === u) { l = { stroke: p, "stroke-width": q }; if (K) l.dashstyle = K; if (!h) l.zIndex = 1; if (b) l.opacity = 0; this.gridLine = l = q ? f.path(j).attr(l).add(d.gridGroup) : null } if (!b && l && j) l[this.isNew ? "attr" : "animate"]({ d: j, opacity: c }) } if (m && t) s === "inside" && (t = -t), d.opposite && (t = -t), h = this.getMarkPath(H, w, t, m * A, g, f), n ? n.animate({ d: h, opacity: c }) : this.mark = f.path(h).attr({ stroke: r, "stroke-width": m, opacity: c }).add(d.axisGroup); if (i && !isNaN(H)) i.xy = w = this.getLabelPosition(H, w, i, g, k, y, a, v), this.isFirst && !this.isLast && !o(e.showFirstLabel, 1) || this.isLast && !this.isFirst && !o(e.showLastLabel, 1) ? x = !1 : !d.isRadial && !k.step && !k.rotation && !b && c !== 0 && (x = this.handleOverflow(a, w)), v && a % v && (x = !1), x && !isNaN(w.y) ? (w.opacity = c, i[this.isNew ? "attr" : "animate"](w), this.isNew = !1) : i.attr("y", -9999) }, destroy: function () { Oa(this, this.axis) } }; Q.PlotLineOrBand = function (a, b) { this.axis = a; if (b) this.options = b, this.id = b.id }; Q.PlotLineOrBand.prototype = { render: function () { var a = this, b = a.axis, c = b.horiz, d = (b.pointRange || 0) / 2, e = a.options, f = e.label, g = a.label, h = e.width, i = e.to, j = e.from, k = r(j) && r(i), l = e.value, m = e.dashStyle, n = a.svgElem, q = [], p, K = e.color, s = e.zIndex, P = e.events, v = b.chart.renderer; b.isLog && (j = za(j), i = za(i), l = za(l)); if (h) { if (q = b.getPlotLinePath(l, h), d = { stroke: K, "stroke-width": h }, m) d.dashstyle = m } else if (k) { if (j = t(j, b.min - d), i = E(i, b.max + d), q = b.getPlotBandPath(j, i, e), d = { fill: K }, e.borderWidth) d.stroke = e.borderColor, d["stroke-width"] = e.borderWidth } else return; if (r(s)) d.zIndex = s; if (n) if (q) n.animate({ d: q }, null, n.onGetPath); else { if (n.hide(), n.onGetPath = function () { n.show() }, g) a.label = g = g.destroy() } else if (q && q.length && (a.svgElem = n = v.path(q).attr(d).add(), P)) for (p in e = function (b) { n.on(b, function (c) { P[b].apply(a, [c]) }) }, P) e(p); if (f && r(f.text) && q && q.length && b.width > 0 && b.height > 0) { f = w({ align: c && k && "center", x: c ? !k && 4 : 10, verticalAlign: !c && k && "middle", y: c ? k ? 16 : 10 : k ? 6 : -4, rotation: c && !k && 90 }, f); if (!g) a.label = g = v.text(f.text, 0, 0, f.useHTML).attr({ align: f.textAlign || f.align, rotation: f.rotation, zIndex: s }).css(f.style).add(); b = [q[1], q[4], o(q[6], q[1])]; q = [q[2], q[5], o(q[7], q[2])]; c = Na(b); k = Na(q); g.align(f, !1, { x: c, y: k, width: Ba(b) - c, height: Ba(q) - k }); g.show() } else g && g.hide(); return a }, destroy: function () { ia(this.axis.plotLinesAndBands, this); delete this.axis; Oa(this) } }; ka.prototype = { defaultOptions: { dateTimeLabelFormats: { millisecond: "%H:%M:%S.%L", second: "%H:%M:%S", minute: "%H:%M", hour: "%H:%M", day: "%e. %b", week: "%e. %b", month: "%b '%y", year: "%Y" }, endOnTick: !1, gridLineColor: "#C0C0C0", labels: F, lineColor: "#C0D0E0", lineWidth: 1, minPadding: 0.01, maxPadding: 0.01, minorGridLineColor: "#E0E0E0", minorGridLineWidth: 1, minorTickColor: "#A0A0A0", minorTickLength: 2, minorTickPosition: "outside", startOfWeek: 1, startOnTick: !1, tickColor: "#C0D0E0", tickLength: 5, tickmarkPlacement: "between", tickPixelInterval: 100, tickPosition: "outside", tickWidth: 1, title: { align: "middle", style: { color: "#4d759e", fontWeight: "bold"} }, type: "linear" }, defaultYAxisOptions: { endOnTick: !0, gridLineWidth: 1, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8, y: 3 }, lineWidth: 0, maxPadding: 0.05, minPadding: 0.05, startOnTick: !0, tickWidth: 0, title: { rotation: 270, text: "Values" }, stackLabels: { enabled: !1, formatter: function () { return Ga(this.total, -1) }, style: F.style} }, defaultLeftAxisOptions: { labels: { x: -8, y: null }, title: { rotation: 270} }, defaultRightAxisOptions: { labels: { x: 8, y: null }, title: { rotation: 90} }, defaultBottomAxisOptions: { labels: { x: 0, y: 14 }, title: { rotation: 0} }, defaultTopAxisOptions: { labels: { x: 0, y: -5 }, title: { rotation: 0} }, init: function (a, b) { var c = b.isX; this.horiz = a.inverted ? !c : c; this.coll = (this.isXAxis = c) ? "xAxis" : "yAxis"; this.opposite = b.opposite; this.side = b.side || (this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3); this.setOptions(b); var d = this.options, e = d.type; this.labelFormatter = d.labels.formatter || this.defaultLabelFormatter; this.userOptions = b; this.minPixelPadding = 0; this.chart = a; this.reversed = d.reversed; this.zoomEnabled = d.zoomEnabled !== !1; this.categories = d.categories || e === "category"; this.names = []; this.isLog = e === "logarithmic"; this.isDatetimeAxis = e === "datetime"; this.isLinked = r(d.linkedTo); this.tickmarkOffset = this.categories && d.tickmarkPlacement === "between" ? 0.5 : 0; this.ticks = {}; this.labelEdge = []; this.minorTicks = {}; this.plotLinesAndBands = []; this.alternateBands = {}; this.len = 0; this.minRange = this.userMinRange = d.minRange || d.maxZoom; this.range = d.range; this.offset = d.offset || 0; this.stacks = {}; this.oldStacks = {}; this.min = this.max = null; this.crosshair = o(d.crosshair, na(a.options.tooltip.crosshairs)[c ? 0 : 1], !1); var f, d = this.options.events; va(this, a.axes) === -1 && (c && !this.isColorAxis ? a.axes.splice(a.xAxis.length, 0, this) : a.axes.push(this), a[this.coll].push(this)); this.series = this.series || []; if (a.inverted && c && this.reversed === u) this.reversed = !0; this.removePlotLine = this.removePlotBand = this.removePlotBandOrLine; for (f in d) C(this, f, d[f]); if (this.isLog) this.val2lin = za, this.lin2val = ha }, setOptions: function (a) { this.options = w(this.defaultOptions, this.isXAxis ? {} : this.defaultYAxisOptions, [this.defaultTopAxisOptions, this.defaultRightAxisOptions, this.defaultBottomAxisOptions, this.defaultLeftAxisOptions][this.side], w(L[this.coll], a)) }, defaultLabelFormatter: function () { var a = this.axis, b = this.value, c = a.categories, d = this.dateTimeLabelFormat, e = L.lang.numericSymbols, f = e && e.length, g, h = a.options.labels.format, a = a.isLog ? b : a.tickInterval; if (h) g = Ia(h, this); else if (c) g = b; else if (d) g = bb(d, b); else if (f && a >= 1E3) for (; f-- && g === u; ) c = Math.pow(1E3, f + 1), a >= c && e[f] !== null && (g = Ga(b / c, -1) + e[f]); g === u && (g = b >= 1E4 ? Ga(b, 0) : Ga(b, -1, u, "")); return g }, getSeriesExtremes: function () { var a = this, b = a.chart; a.hasVisibleSeries = !1; a.dataMin = a.dataMax = null; a.buildStacks && a.buildStacks(); p(a.series, function (c) { if (c.visible || !b.options.chart.ignoreHiddenSeries) { var d; d = c.options.threshold; var e; a.hasVisibleSeries = !0; a.isLog && d <= 0 && (d = null); if (a.isXAxis) { if (d = c.xData, d.length) a.dataMin = E(o(a.dataMin, d[0]), Na(d)), a.dataMax = t(o(a.dataMax, d[0]), Ba(d)) } else { c.getExtremes(); e = c.dataMax; c = c.dataMin; if (r(c) && r(e)) a.dataMin = E(o(a.dataMin, c), c), a.dataMax = t(o(a.dataMax, e), e); if (r(d)) if (a.dataMin >= d) a.dataMin = d, a.ignoreMinPadding = !0; else if (a.dataMax < d) a.dataMax = d, a.ignoreMaxPadding = !0 } } }) }, translate: function (a, b, c, d, e, f) { var g = 1, h = 0, i = d ? this.oldTransA : this.transA, d = d ? this.oldMin : this.min, j = this.minPixelPadding, e = (this.options.ordinal || this.isLog && e) && this.lin2val; if (!i) i = this.transA; if (c) g *= -1, h = this.len; this.reversed && (g *= -1, h -= g * (this.sector || this.len)); b ? (a = a * g + h, a -= j, a = a / i + d, e && (a = this.lin2val(a))) : (e && (a = this.val2lin(a)), f === "between" && (f = 0.5), a = g * (a - d) * i + h + g * j + (ya(f) ? i * f * this.pointRange : 0)); return a }, toPixels: function (a, b) { return this.translate(a, !1, !this.horiz, null, !0) + (b ? 0 : this.pos) }, toValue: function (a, b) { return this.translate(a - (b ? 0 : this.pos), !0, !this.horiz, null, !0) }, getPlotLinePath: function (a, b, c, d, e) { var f = this.chart, g = this.left, h = this.top, i, j, k = c && f.oldChartHeight || f.chartHeight, l = c && f.oldChartWidth || f.chartWidth, m; i = this.transB; e = o(e, this.translate(a, null, null, c)); a = c = v(e + i); i = j = v(k - e - i); if (isNaN(e)) m = !0; else if (this.horiz) { if (i = h, j = k - this.bottom, a < g || a > g + this.width) m = !0 } else if (a = g, c = l - this.right, i < h || i > h + this.height) m = !0; return m && !d ? null : f.renderer.crispLine(["M", a, i, "L", c, j], b || 1) }, getLinearTickPositions: function (a, b, c) { for (var d, b = aa(S(b / a) * a), c = aa(Ka(c / a) * a), e = []; b <= c; ) { e.push(b); b = aa(b + a); if (b === d) break; d = b } return e }, getMinorTickPositions: function () { var a = this.options, b = this.tickPositions, c = this.minorTickInterval, d = [], e; if (this.isLog) { e = b.length; for (a = 1; a < e; a++) d = d.concat(this.getLogTickPositions(c, b[a - 1], b[a], !0)) } else if (this.isDatetimeAxis && a.minorTickInterval === "auto") d = d.concat(this.getTimeTicks(this.normalizeTimeTickInterval(c), this.min, this.max, a.startOfWeek)), d[0] < this.min && d.shift(); else for (b = this.min + (b[0] - this.min) % c; b <= this.max; b += c) d.push(b); return d }, adjustForMinRange: function () { var a = this.options, b = this.min, c = this.max, d, e = this.dataMax - this.dataMin >= this.minRange, f, g, h, i, j; if (this.isXAxis && this.minRange === u && !this.isLog) r(a.min) || r(a.max) ? this.minRange = null : (p(this.series, function (a) { i = a.xData; for (g = j = a.xIncrement ? 1 : i.length - 1; g > 0; g--) if (h = i[g] - i[g - 1], f === u || h < f) f = h }), this.minRange = E(f * 5, this.dataMax - this.dataMin)); if (c - b < this.minRange) { var k = this.minRange; d = (k - c + b) / 2; d = [b - d, o(a.min, b - d)]; if (e) d[2] = this.dataMin; b = Ba(d); c = [b + k, o(a.max, b + k)]; if (e) c[2] = this.dataMax; c = Na(c); c - b < k && (d[0] = c - k, d[1] = o(a.min, c - k), b = Ba(d)) } this.min = b; this.max = c }, setAxisTranslation: function (a) { var b = this, c = b.max - b.min, d = b.axisPointRange || 0, e, f = 0, g = 0, h = b.linkedParent, i = !!b.categories, j = b.transA; if (b.isXAxis || i || d) h ? (f = h.minPointOffset, g = h.pointRangePadding) : p(b.series, function (a) { var h = t(b.isXAxis ? a.pointRange : b.axisPointRange || 0, +i), j = a.options.pointPlacement, n = a.closestPointRange; h > c && (h = 0); d = t(d, h); f = t(f, ga(j) ? 0 : h / 2); g = t(g, j === "on" ? 0 : h); !a.noSharedTooltip && r(n) && (e = r(e) ? E(e, n) : n) }), h = b.ordinalSlope && e ? b.ordinalSlope / e : 1, b.minPointOffset = f *= h, b.pointRangePadding = g *= h, b.pointRange = E(d, c), b.closestPointRange = e; if (a) b.oldTransA = j; b.translationSlope = b.transA = j = b.len / (c + g || 1); b.transB = b.horiz ? b.left : b.bottom; b.minPixelPadding = j * f }, setTickPositions: function (a) { var b = this, c = b.chart, d = b.options, e = b.isLog, f = b.isDatetimeAxis, g = b.isXAxis, h = b.isLinked, i = b.options.tickPositioner, j = d.maxPadding, k = d.minPadding, l = d.tickInterval, m = d.minTickInterval, n = d.tickPixelInterval, q, qa = b.categories; h ? (b.linkedParent = c[b.coll][d.linkedTo], c = b.linkedParent.getExtremes(), b.min = o(c.min, c.dataMin), b.max = o(c.max, c.dataMax), d.type !== b.linkedParent.options.type && oa(11, 1)) : (b.min = o(b.userMin, d.min, b.dataMin), b.max = o(b.userMax, d.max, b.dataMax)); if (e) !a && E(b.min, o(b.dataMin, b.min)) <= 0 && oa(10, 1), b.min = aa(za(b.min)), b.max = aa(za(b.max)); if (b.range && r(b.max)) b.userMin = b.min = t(b.min, b.max - b.range), b.userMax = b.max, b.range = null; b.beforePadding && b.beforePadding(); b.adjustForMinRange(); if (!qa && !b.axisPointRange && !b.usePercentage && !h && r(b.min) && r(b.max) && (c = b.max - b.min)) { if (!r(d.min) && !r(b.userMin) && k && (b.dataMin < 0 || !b.ignoreMinPadding)) b.min -= c * k; if (!r(d.max) && !r(b.userMax) && j && (b.dataMax > 0 || !b.ignoreMaxPadding)) b.max += c * j } b.min === b.max || b.min === void 0 || b.max === void 0 ? b.tickInterval = 1 : h && !l && n === b.linkedParent.options.tickPixelInterval ? b.tickInterval = b.linkedParent.tickInterval : (b.tickInterval = o(l, qa ? 1 : (b.max - b.min) * n / t(b.len, n)), !r(l) && b.len < n && !this.isRadial && !this.isLog && !qa && d.startOnTick && d.endOnTick && (q = !0, b.tickInterval /= 4)); g && !a && p(b.series, function (a) { a.processData(b.min !== b.oldMin || b.max !== b.oldMax) }); b.setAxisTranslation(!0); b.beforeSetTickPositions && b.beforeSetTickPositions(); if (b.postProcessTickInterval) b.tickInterval = b.postProcessTickInterval(b.tickInterval); if (b.pointRange) b.tickInterval = t(b.pointRange, b.tickInterval); if (!l && b.tickInterval < m) b.tickInterval = m; if (!f && !e && !l) b.tickInterval = nb(b.tickInterval, null, mb(b.tickInterval), d); b.minorTickInterval = d.minorTickInterval === "auto" && b.tickInterval ? b.tickInterval / 5 : d.minorTickInterval; b.tickPositions = a = d.tickPositions ? [].concat(d.tickPositions) : i && i.apply(b, [b.min, b.max]); if (!a) !b.ordinalPositions && (b.max - b.min) / b.tickInterval > t(2 * b.len, 200) && oa(19, !0), a = f ? b.getTimeTicks(b.normalizeTimeTickInterval(b.tickInterval, d.units), b.min, b.max, d.startOfWeek, b.ordinalPositions, b.closestPointRange, !0) : e ? b.getLogTickPositions(b.tickInterval, b.min, b.max) : b.getLinearTickPositions(b.tickInterval, b.min, b.max), q && a.splice(1, a.length - 2), b.tickPositions = a; if (!h) e = a[0], f = a[a.length - 1], h = b.minPointOffset || 0, d.startOnTick ? b.min = e : b.min - h > e && a.shift(), d.endOnTick ? b.max = f : b.max + h < f && a.pop(), a.length === 1 && (d = N(b.max || 1) * 0.001, b.min -= d, b.max += d) }, setMaxTicks: function () { var a = this.chart, b = a.maxTicks || {}, c = this.tickPositions, d = this._maxTicksKey = [this.coll, this.pos, this.len].join("-"); if (!this.isLinked && !this.isDatetimeAxis && c && c.length > (b[d] || 0) && this.options.alignTicks !== !1) b[d] = c.length; a.maxTicks = b }, adjustTickAmount: function () { var a = this._maxTicksKey, b = this.tickPositions, c = this.chart.maxTicks; if (c && c[a] && !this.isDatetimeAxis && !this.categories && !this.isLinked && this.options.alignTicks !== !1 && this.min !== u) { var d = this.tickAmount, e = b.length; this.tickAmount = a = c[a]; if (e < a) { for (; b.length < a; ) b.push(aa(b[b.length - 1] + this.tickInterval)); this.transA *= (e - 1) / (a - 1); this.max = b[b.length - 1] } if (r(d) && a !== d) this.isDirty = !0 } }, setScale: function () { var a = this.stacks, b, c, d, e; this.oldMin = this.min; this.oldMax = this.max; this.oldAxisLength = this.len; this.setAxisSize(); e = this.len !== this.oldAxisLength; p(this.series, function (a) { if (a.isDirtyData || a.isDirty || a.xAxis.isDirty) d = !0 }); if (e || d || this.isLinked || this.forceRedraw || this.userMin !== this.oldUserMin || this.userMax !== this.oldUserMax) { if (!this.isXAxis) for (b in a) for (c in a[b]) a[b][c].total = null, a[b][c].cum = 0; this.forceRedraw = !1; this.getSeriesExtremes(); this.setTickPositions(); this.oldUserMin = this.userMin; this.oldUserMax = this.userMax; if (!this.isDirty) this.isDirty = e || this.min !== this.oldMin || this.max !== this.oldMax } else if (!this.isXAxis) { if (this.oldStacks) a = this.stacks = this.oldStacks; for (b in a) for (c in a[b]) a[b][c].cum = a[b][c].total } this.setMaxTicks() }, setExtremes: function (a, b, c, d, e) { var f = this, g = f.chart, c = o(c, !0), e = s(e, { min: a, max: b }); I(f, "setExtremes", e, function () { f.userMin = a; f.userMax = b; f.eventArgs = e; f.isDirtyExtremes = !0; c && g.redraw(d) }) }, zoom: function (a, b) { var c = this.dataMin, d = this.dataMax, e = this.options; this.allowZoomOutside || (r(c) && a <= E(c, o(e.min, c)) && (a = u), r(d) && b >= t(d, o(e.max, d)) && (b = u)); this.displayBtn = a !== u || b !== u; this.setExtremes(a, b, !1, u, { trigger: "zoom" }); return !0 }, setAxisSize: function () { var a = this.chart, b = this.options, c = b.offsetLeft || 0, d = b.offsetRight || 0, e = this.horiz, f, g; this.left = g = o(b.left, a.plotLeft + c); this.top = f = o(b.top, a.plotTop); this.width = c = o(b.width, a.plotWidth - c + d); this.height = b = o(b.height, a.plotHeight); this.bottom = a.chartHeight - b - f; this.right = a.chartWidth - c - g; this.len = t(e ? c : b, 0); this.pos = e ? g : f }, getExtremes: function () { var a = this.isLog; return { min: a ? aa(ha(this.min)) : this.min, max: a ? aa(ha(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax} }, getThreshold: function (a) { var b = this.isLog, c = b ? ha(this.min) : this.min, b = b ? ha(this.max) : this.max; c > a || a === null ? a = c : b < a && (a = b); return this.translate(a, 0, 1, 0, 1) }, autoLabelAlign: function (a) { a = (o(a, 0) - this.side * 90 + 720) % 360; return a > 15 && a < 165 ? "right" : a > 195 && a < 345 ? "left" : "center" }, getOffset: function () { var a = this, b = a.chart, c = b.renderer, d = a.options, e = a.tickPositions, f = a.ticks, g = a.horiz, h = a.side, i = b.inverted ? [1, 0, 3, 2][h] : h, j, k = 0, l, m = 0, n = d.title, q = d.labels, qa = 0, K = b.axisOffset, s = b.clipOffset, P = [-1, 1, 1, -1][h], v, w = 1, x = o(q.maxStaggerLines, 5), y, z, H, A; a.hasData = j = a.hasVisibleSeries || r(a.min) && r(a.max) && !!e; a.showAxis = b = j || o(d.showEmpty, !0); a.staggerLines = a.horiz && q.staggerLines; if (!a.axisGroup) a.gridGroup = c.g("grid").attr({ zIndex: d.gridZIndex || 1 }).add(), a.axisGroup = c.g("axis").attr({ zIndex: d.zIndex || 2 }).add(), a.labelGroup = c.g("axis-labels").attr({ zIndex: q.zIndex || 7 }).addClass("highcharts-" + a.coll.toLowerCase() + "-labels").add(); if (j || a.isLinked) { a.labelAlign = o(q.align || a.autoLabelAlign(q.rotation)); p(e, function (b) { f[b] ? f[b].addLabel() : f[b] = new Sa(a, b) }); if (a.horiz && !a.staggerLines && x && !q.rotation) { for (v = a.reversed ? [].concat(e).reverse() : e; w < x; ) { j = []; y = !1; for (q = 0; q < v.length; q++) z = v[q], H = (H = f[z].label && f[z].label.getBBox()) ? H.width : 0, A = q % w, H && (z = a.translate(z), j[A] !== u && z < j[A] && (y = !0), j[A] = z + H); if (y) w++; else break } if (w > 1) a.staggerLines = w } p(e, function (b) { if (h === 0 || h === 2 || { 1: "left", 3: "right"}[h] === a.labelAlign) qa = t(f[b].getLabelSize(), qa) }); if (a.staggerLines) qa *= a.staggerLines, a.labelOffset = qa } else for (v in f) f[v].destroy(), delete f[v]; if (n && n.text && n.enabled !== !1) { if (!a.axisTitle) a.axisTitle = c.text(n.text, 0, 0, n.useHTML).attr({ zIndex: 7, rotation: n.rotation || 0, align: n.textAlign || { low: "left", middle: "center", high: "right"}[n.align] }).addClass("highcharts-" + this.coll.toLowerCase() + "-title").css(n.style).add(a.axisGroup), a.axisTitle.isNew = !0; if (b) k = a.axisTitle.getBBox()[g ? "height" : "width"], m = o(n.margin, g ? 5 : 10), l = n.offset; a.axisTitle[b ? "show" : "hide"]() } a.offset = P * o(d.offset, K[h]); a.axisTitleMargin = o(l, qa + m + (h !== 2 && qa && P * d.labels[g ? "y" : "x"])); K[h] = t(K[h], a.axisTitleMargin + k + P * a.offset); s[i] = t(s[i], S(d.lineWidth / 2) * 2) }, getLinePath: function (a) { var b = this.chart, c = this.opposite, d = this.offset, e = this.horiz, f = this.left + (c ? this.width : 0) + d, d = b.chartHeight - this.bottom - (c ? this.height : 0) + d; c && (a *= -1); return b.renderer.crispLine(["M", e ? this.left : f, e ? d : this.top, "L", e ? b.chartWidth - this.right : f, e ? d : b.chartHeight - this.bottom], a) }, getTitlePosition: function () { var a = this.horiz, b = this.left, c = this.top, d = this.len, e = this.options.title, f = a ? b : c, g = this.opposite, h = this.offset, i = x(e.style.fontSize || 12), d = { low: f + (a ? 0 : d), middle: f + d / 2, high: f + (a ? d : 0)}[e.align], b = (a ? c + this.height : b) + (a ? 1 : -1) * (g ? -1 : 1) * this.axisTitleMargin + (this.side === 2 ? i : 0); return { x: a ? d : b + (g ? this.width : 0) + h + (e.x || 0), y: a ? b - (g ? this.height : 0) + h : d + (e.y || 0)} }, render: function () { var a = this, b = a.horiz, c = a.reversed, d = a.chart, e = d.renderer, f = a.options, g = a.isLog, h = a.isLinked, i = a.tickPositions, j, k = a.axisTitle, l = a.ticks, m = a.minorTicks, n = a.alternateBands, q = f.stackLabels, o = f.alternateGridColor, K = a.tickmarkOffset, t = f.lineWidth, v = d.hasRendered && r(a.oldMin) && !isNaN(a.oldMin), s = a.hasData, w = a.showAxis, x, y = f.labels.overflow, z = a.justifyLabels = b && y !== !1, H; a.labelEdge.length = 0; a.justifyToPlot = y === "justify"; p([l, m, n], function (a) { for (var b in a) a[b].isActive = !1 }); if (s || h) if (a.minorTickInterval && !a.categories && p(a.getMinorTickPositions(), function (b) { m[b] || (m[b] = new Sa(a, b, "minor")); v && m[b].isNew && m[b].render(null, !0); m[b].render(null, !1, 1) }), i.length && (j = i.slice(), (b && c || !b && !c) && j.reverse(), z && (j = j.slice(1).concat([j[0]])), p(j, function (b, c) { z && (c = c === j.length - 1 ? 0 : c + 1); if (!h || b >= a.min && b <= a.max) l[b] || (l[b] = new Sa(a, b)), v && l[b].isNew && l[b].render(c, !0, 0.1), l[b].render(c, !1, 1) }), K && a.min === 0 && (l[-1] || (l[-1] = new Sa(a, -1, null, !0)), l[-1].render(-1))), o && p(i, function (b, c) { if (c % 2 === 0 && b < a.max) n[b] || (n[b] = new Q.PlotLineOrBand(a)), x = b + K, H = i[c + 1] !== u ? i[c + 1] + K : a.max, n[b].options = { from: g ? ha(x) : x, to: g ? ha(H) : H, color: o }, n[b].render(), n[b].isActive = !0 }), !a._addedPlotLB) p((f.plotLines || []).concat(f.plotBands || []), function (b) { a.addPlotBandOrLine(b) }), a._addedPlotLB = !0; p([l, m, n], function (a) { var b, c, e = [], f = sa ? sa.duration || 500 : 0, g = function () { for (c = e.length; c--; ) a[e[c]] && !a[e[c]].isActive && (a[e[c]].destroy(), delete a[e[c]]) }; for (b in a) if (!a[b].isActive) a[b].render(b, !1, 0), a[b].isActive = !1, e.push(b); a === n || !d.hasRendered || !f ? g() : f && setTimeout(g, f) }); if (t) b = a.getLinePath(t), a.axisLine ? a.axisLine.animate({ d: b }) : a.axisLine = e.path(b).attr({ stroke: f.lineColor, "stroke-width": t, zIndex: 7 }).add(a.axisGroup), a.axisLine[w ? "show" : "hide"](); if (k && w) k[k.isNew ? "attr" : "animate"](a.getTitlePosition()), k.isNew = !1; q && q.enabled && a.renderStackTotals(); a.isDirty = !1 }, redraw: function () { var a = this.chart.pointer; a && a.reset(!0); this.render(); p(this.plotLinesAndBands, function (a) { a.render() }); p(this.series, function (a) { a.isDirty = !0 }) }, destroy: function (a) { var b = this, c = b.stacks, d, e = b.plotLinesAndBands; a || U(b); for (d in c) Oa(c[d]), c[d] = null; p([b.ticks, b.minorTicks, b.alternateBands], function (a) { Oa(a) }); for (a = e.length; a--; ) e[a].destroy(); p("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","), function (a) { b[a] && (b[a] = b[a].destroy()) }); this.cross && this.cross.destroy() }, drawCrosshair: function (a, b) { if (this.crosshair) if ((r(b) || !o(this.crosshair.snap, !0)) === !1) this.hideCrosshair(); else { var c, d = this.crosshair, e = d.animation; o(d.snap, !0) ? r(b) && (c = this.chart.inverted != this.horiz ? b.plotX : this.len - b.plotY) : c = this.horiz ? a.chartX - this.pos : this.len - a.chartY + this.pos; c = this.isRadial ? this.getPlotLinePath(this.isXAxis ? b.x : o(b.stackY, b.y)) : this.getPlotLinePath(null, null, null, null, c); if (c === null) this.hideCrosshair(); else if (this.cross) this.cross.attr({ visibility: "visible" })[e ? "animate" : "attr"]({ d: c }, e); else { e = { "stroke-width": d.width || 1, stroke: d.color || "#C0C0C0", zIndex: d.zIndex || 2 }; if (d.dashStyle) e.dashstyle = d.dashStyle; this.cross = this.chart.renderer.path(c).attr(e).add() } } }, hideCrosshair: function () { this.cross && this.cross.hide() } }; s(ka.prototype, { getPlotBandPath: function (a, b) { var c = this.getPlotLinePath(b), d = this.getPlotLinePath(a); d && c ? d.push(c[4], c[5], c[1], c[2]) : d = null; return d }, addPlotBand: function (a) { this.addPlotBandOrLine(a, "plotBands") }, addPlotLine: function (a) { this.addPlotBandOrLine(a, "plotLines") }, addPlotBandOrLine: function (a, b) { var c = (new Q.PlotLineOrBand(this, a)).render(), d = this.userOptions; c && (b && (d[b] = d[b] || [], d[b].push(a)), this.plotLinesAndBands.push(c)); return c }, removePlotBandOrLine: function (a) { for (var b = this.plotLinesAndBands, c = this.options, d = this.userOptions, e = b.length; e--; ) b[e].id === a && b[e].destroy(); p([c.plotLines || [], d.plotLines || [], c.plotBands || [], d.plotBands || []], function (b) { for (e = b.length; e--; ) b[e].id === a && ia(b, b[e]) }) } }); ka.prototype.getTimeTicks = function (a, b, c, d) { var e = [], f = {}, g = L.global.useUTC, h, i = new Date(b - Ra), j = a.unitRange, k = a.count; if (r(b)) { j >= B.second && (i.setMilliseconds(0), i.setSeconds(j >= B.minute ? 0 : k * S(i.getSeconds() / k))); if (j >= B.minute) i[Db](j >= B.hour ? 0 : k * S(i[pb]() / k)); if (j >= B.hour) i[Eb](j >= B.day ? 0 : k * S(i[qb]() / k)); if (j >= B.day) i[sb](j >= B.month ? 1 : k * S(i[Xa]() / k)); j >= B.month && (i[Fb](j >= B.year ? 0 : k * S(i[eb]() / k)), h = i[fb]()); j >= B.year && (h -= h % k, i[Gb](h)); if (j === B.week) i[sb](i[Xa]() - i[rb]() + o(d, 1)); b = 1; Ra && (i = new Date(i.getTime() + Ra)); h = i[fb](); for (var d = i.getTime(), l = i[eb](), m = i[Xa](), n = g ? Ra : (864E5 + i.getTimezoneOffset() * 6E4) % 864E5; d < c; ) e.push(d), j === B.year ? d = db(h + b * k, 0) : j === B.month ? d = db(h, l + b * k) : !g && (j === B.day || j === B.week) ? d = db(h, l, m + b * k * (j === B.day ? 1 : 7)) : d += j * k, b++; e.push(d); p(vb(e, function (a) { return j <= B.hour && a % B.day === n }), function (a) { f[a] = "day" }) } e.info = s(a, { higherRanks: f, totalRange: j * k }); return e }; ka.prototype.normalizeTimeTickInterval = function (a, b) { var c = b || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]], d = c[c.length - 1], e = B[d[0]], f = d[1], g; for (g = 0; g < c.length; g++) if (d = c[g], e = B[d[0]], f = d[1], c[g + 1] && a <= (e * f[f.length - 1] + B[c[g + 1][0]]) / 2) break; e === B.year && a < 5 * e && (f = [1, 2, 5]); c = nb(a / e, f, d[0] === "year" ? t(mb(a / e), 1) : 1); return { unitRange: e, count: c, unitName: d[0]} }; ka.prototype.getLogTickPositions = function (a, b, c, d) { var e = this.options, f = this.len, g = []; if (!d) this._minorAutoInterval = null; if (a >= 0.5) a = v(a), g = this.getLinearTickPositions(a, b, c); else if (a >= 0.08) for (var f = S(b), h, i, j, k, l, e = a > 0.3 ? [1, 2, 4] : a > 0.15 ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; f < c + 1 && !l; f++) { i = e.length; for (h = 0; h < i && !l; h++) j = za(ha(f) * e[h]), j > b && (!d || k <= c) && g.push(k), k > c && (l = !0), k = j } else if (b = ha(b), c = ha(c), a = e[d ? "minorTickInterval" : "tickInterval"], a = o(a === "auto" ? null : a, this._minorAutoInterval, (c - b) * (e.tickPixelInterval / (d ? 5 : 1)) / ((d ? f / this.tickPositions.length : f) || 1)), a = nb(a, null, mb(a)), g = Ua(this.getLinearTickPositions(a, b, c), za), !d) this._minorAutoInterval = a / 5; if (!d) this.tickInterval = a; return g }; var Nb = Q.Tooltip = function () { this.init.apply(this, arguments) }; Nb.prototype = { init: function (a, b) { var c = b.borderWidth, d = b.style, e = x(d.padding); this.chart = a; this.options = b; this.crosshairs = []; this.now = { x: 0, y: 0 }; this.isHidden = !0; this.label = a.renderer.label("", 0, 0, b.shape, null, null, b.useHTML, null, "tooltip").attr({ padding: e, fill: b.backgroundColor, "stroke-width": c, r: b.borderRadius, zIndex: 8 }).css(d).css({ padding: 0 }).add().attr({ y: -9999 }); ca || this.label.shadow(b.shadow); this.shared = b.shared }, destroy: function () { if (this.label) this.label = this.label.destroy(); clearTimeout(this.hideTimer); clearTimeout(this.tooltipTimeout) }, move: function (a, b, c, d) { var e = this, f = e.now, g = e.options.animation !== !1 && !e.isHidden; s(f, { x: g ? (2 * f.x + a) / 3 : a, y: g ? (f.y + b) / 2 : b, anchorX: g ? (2 * f.anchorX + c) / 3 : c, anchorY: g ? (f.anchorY + d) / 2 : d }); e.label.attr(f); if (g && (N(a - f.x) > 1 || N(b - f.y) > 1)) clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function () { e && e.move(a, b, c, d) }, 32) }, hide: function () { var a = this, b; clearTimeout(this.hideTimer); if (!this.isHidden) b = this.chart.hoverPoints, this.hideTimer = setTimeout(function () { a.label.fadeOut(); a.isHidden = !0 }, o(this.options.hideDelay, 500)), b && p(b, function (a) { a.setState() }), this.chart.hoverPoints = null }, getAnchor: function (a, b) { var c, d = this.chart, e = d.inverted, f = d.plotTop, g = 0, h = 0, i, a = na(a); c = a[0].tooltipPos; this.followPointer && b && (b.chartX === u && (b = d.pointer.normalize(b)), c = [b.chartX - d.plotLeft, b.chartY - f]); c || (p(a, function (a) { i = a.series.yAxis; g += a.plotX; h += (a.plotLow ? (a.plotLow + a.plotHigh) / 2 : a.plotY) + (!e && i ? i.top - f : 0) }), g /= a.length, h /= a.length, c = [e ? d.plotWidth - h : g, this.shared && !e && a.length > 1 && b ? b.chartY - f : e ? d.plotHeight - g : h]); return Ua(c, v) }, getPosition: function (a, b, c) { var d = this.chart, e = d.plotLeft, f = d.plotTop, g = d.plotWidth, h = d.plotHeight, i = o(this.options.distance, 12), j = isNaN(c.plotX) ? 0 : c.plotX, c = c.plotY, d = j + e + (d.inverted ? i : -a - i), k = c - b + f + 15, l; d < 7 && (d = e + t(j, 0) + i); d + a > e + g && (d -= d + a - (e + g), k = c - b + f - i, l = !0); k < f + 5 && (k = f + 5, l && c >= k && c <= k + b && (k = c + f + i)); k + b > f + h && (k = t(f, f + h - b - i)); return { x: d, y: k} }, defaultFormatter: function (a) { var b = this.points || na(this), c = b[0].series, d; d = [a.tooltipHeaderFormatter(b[0])]; p(b, function (a) { c = a.series; d.push(c.tooltipFormatter && c.tooltipFormatter(a) || a.point.tooltipFormatter(c.tooltipOptions.pointFormat)) }); d.push(a.options.footerFormat || ""); return d.join("") }, refresh: function (a, b) { var c = this.chart, d = this.label, e = this.options, f, g, h = {}, i, j = []; i = e.formatter || this.defaultFormatter; var h = c.hoverPoints, k, l = this.shared; clearTimeout(this.hideTimer); this.followPointer = na(a)[0].series.tooltipOptions.followPointer; g = this.getAnchor(a, b); f = g[0]; g = g[1]; l && (!a.series || !a.series.noSharedTooltip) ? (c.hoverPoints = a, h && p(h, function (a) { a.setState() }), p(a, function (a) { a.setState("hover"); j.push(a.getLabelConfig()) }), h = { x: a[0].category, y: a[0].y }, h.points = j, a = a[0]) : h = a.getLabelConfig(); i = i.call(h, this); h = a.series; i === !1 ? this.hide() : (this.isHidden && (ab(d), d.attr("opacity", 1).show()), d.attr({ text: i }), k = e.borderColor || a.color || h.color || "#606060", d.attr({ stroke: k }), this.updatePosition({ plotX: f, plotY: g }), this.isHidden = !1); I(c, "tooltipRefresh", { text: i, x: f + c.plotLeft, y: g + c.plotTop, borderColor: k }) }, updatePosition: function (a) { var b = this.chart, c = this.label, c = (this.options.positioner || this.getPosition).call(this, c.width, c.height, a); this.move(v(c.x), v(c.y), a.plotX + b.plotLeft, a.plotY + b.plotTop) }, tooltipHeaderFormatter: function (a) { var b = a.series, c = b.tooltipOptions, d = c.dateTimeLabelFormats, e = c.xDateFormat, f = b.xAxis, g = f && f.options.type === "datetime" && ya(a.key), c = c.headerFormat, f = f && f.closestPointRange, h; if (g && !e) { if (f) for (h in B) { if (B[h] >= f || B[h] <= B.day && a.key % B[h] > 0) { e = d[h]; break } } else e = d.day; e = e || d.year } g && e && (c = c.replace("{point.key}", "{point.key:" + e + "}")); return Ia(c, { point: a, series: b }) } }; var fa; $a = y.documentElement.ontouchstart !== u; var Wa = Q.Pointer = function (a, b) { this.init(a, b) }; Wa.prototype = { init: function (a, b) { var c = b.chart, d = c.events, e = ca ? "" : c.zoomType, c = a.inverted, f; this.options = b; this.chart = a; this.zoomX = f = /x/.test(e); this.zoomY = e = /y/.test(e); this.zoomHor = f && !c || e && c; this.zoomVert = e && !c || f && c; this.runChartClick = d && !!d.click; this.pinchDown = []; this.lastValidTouch = {}; if (Q.Tooltip && b.tooltip.enabled) a.tooltip = new Nb(a, b.tooltip); this.setDOMEvents() }, normalize: function (a, b) { var c, d, a = a || G.event, a = Sb(a); if (!a.target) a.target = a.srcElement; d = a.touches ? a.touches.item(0) : a; if (!b) this.chartPosition = b = Rb(this.chart.container); d.pageX === u ? (c = t(a.x, a.clientX - b.left), d = a.y) : (c = d.pageX - b.left, d = d.pageY - b.top); return s(a, { chartX: v(c), chartY: v(d) }) }, getCoordinates: function (a) { var b = { xAxis: [], yAxis: [] }; p(this.chart.axes, function (c) { b[c.isXAxis ? "xAxis" : "yAxis"].push({ axis: c, value: c.toValue(a[c.horiz ? "chartX" : "chartY"]) }) }); return b }, getIndex: function (a) { var b = this.chart; return b.inverted ? b.plotHeight + b.plotTop - a.chartY : a.chartX - b.plotLeft }, runPointActions: function (a) { var b = this.chart, c = b.series, d = b.tooltip, e, f, g = b.hoverPoint, h = b.hoverSeries, i, j, k = b.chartWidth, l = this.getIndex(a); if (d && this.options.tooltip.shared && (!h || !h.noSharedTooltip)) { f = []; i = c.length; for (j = 0; j < i; j++) if (c[j].visible && c[j].options.enableMouseTracking !== !1 && !c[j].noSharedTooltip && c[j].singularTooltips !== !0 && c[j].tooltipPoints.length && (e = c[j].tooltipPoints[l]) && e.series) e._dist = N(l - e.clientX), k = E(k, e._dist), f.push(e); for (i = f.length; i--; ) f[i]._dist > k && f.splice(i, 1); if (f.length && f[0].clientX !== this.hoverX) d.refresh(f, a), this.hoverX = f[0].clientX } if (h && h.tracker && (!d || !d.followPointer)) { if ((e = h.tooltipPoints[l]) && e !== g) e.onMouseOver(a) } else d && d.followPointer && !d.isHidden && (c = d.getAnchor([{}], a), d.updatePosition({ plotX: c[0], plotY: c[1] })); if (d && !this._onDocumentMouseMove) this._onDocumentMouseMove = function (a) { if (r(fa)) Y[fa].pointer.onDocumentMouseMove(a) }, C(y, "mousemove", this._onDocumentMouseMove); p(b.axes, function (b) { b.drawCrosshair(a, o(e, g)) }) }, reset: function (a) { var b = this.chart, c = b.hoverSeries, d = b.hoverPoint, e = b.tooltip, f = e && e.shared ? b.hoverPoints : d; (a = a && e && f) && na(f)[0].plotX === u && (a = !1); if (a) e.refresh(f), d && d.setState(d.state, !0); else { if (d) d.onMouseOut(); if (c) c.onMouseOut(); e && e.hide(); if (this._onDocumentMouseMove) U(y, "mousemove", this._onDocumentMouseMove), this._onDocumentMouseMove = null; p(b.axes, function (a) { a.hideCrosshair() }); this.hoverX = null } }, scaleGroups: function (a, b) { var c = this.chart, d; p(c.series, function (e) { d = a || e.getPlotBox(); e.xAxis && e.xAxis.zoomEnabled && (e.group.attr(d), e.markerGroup && (e.markerGroup.attr(d), e.markerGroup.clip(b ? c.clipRect : null)), e.dataLabelsGroup && e.dataLabelsGroup.attr(d)) }); c.clipRect.attr(b || c.clipBox) }, dragStart: function (a) { var b = this.chart; b.mouseIsDown = a.type; b.cancelClick = !1; b.mouseDownX = this.mouseDownX = a.chartX; b.mouseDownY = this.mouseDownY = a.chartY }, drag: function (a) { var b = this.chart, c = b.options.chart, d = a.chartX, e = a.chartY, f = this.zoomHor, g = this.zoomVert, h = b.plotLeft, i = b.plotTop, j = b.plotWidth, k = b.plotHeight, l, m = this.mouseDownX, n = this.mouseDownY; d < h ? d = h : d > h + j && (d = h + j); e < i ? e = i : e > i + k && (e = i + k); this.hasDragged = Math.sqrt(Math.pow(m - d, 2) + Math.pow(n - e, 2)); if (this.hasDragged > 10) { l = b.isInsidePlot(m - h, n - i); if (b.hasCartesianSeries && (this.zoomX || this.zoomY) && l && !this.selectionMarker) this.selectionMarker = b.renderer.rect(h, i, f ? 1 : j, g ? 1 : k, 0).attr({ fill: c.selectionMarkerFill || "rgba(69,114,167,0.25)", zIndex: 7 }).add(); this.selectionMarker && f && (d -= m, this.selectionMarker.attr({ width: N(d), x: (d > 0 ? 0 : d) + m })); this.selectionMarker && g && (d = e - n, this.selectionMarker.attr({ height: N(d), y: (d > 0 ? 0 : d) + n })); l && !this.selectionMarker && c.panning && b.pan(a, c.panning) } }, drop: function (a) { var b = this.chart, c = this.hasPinched; if (this.selectionMarker) { var d = { xAxis: [], yAxis: [], originalEvent: a.originalEvent || a }, e = this.selectionMarker, f = e.x, g = e.y, h; if (this.hasDragged || c) p(b.axes, function (a) { if (a.zoomEnabled) { var b = a.horiz, c = a.toValue(b ? f : g), b = a.toValue(b ? f + e.width : g + e.height); !isNaN(c) && !isNaN(b) && (d[a.coll].push({ axis: a, min: E(c, b), max: t(c, b) }), h = !0) } }), h && I(b, "selection", d, function (a) { b.zoom(s(a, c ? { animation: !1} : null)) }); this.selectionMarker = this.selectionMarker.destroy(); c && this.scaleGroups() } if (b) D(b.container, { cursor: b._cursor }), b.cancelClick = this.hasDragged > 10, b.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = [] }, onContainerMouseDown: function (a) { a = this.normalize(a); a.preventDefault && a.preventDefault(); this.dragStart(a) }, onDocumentMouseUp: function (a) { r(fa) && Y[fa].pointer.drop(a) }, onDocumentMouseMove: function (a) { var b = this.chart, c = this.chartPosition, d = b.hoverSeries, a = this.normalize(a, c); c && d && !this.inClass(a.target, "highcharts-tracker") && !b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop) && this.reset() }, onContainerMouseLeave: function () { var a = Y[fa]; if (a) a.pointer.reset(), a.pointer.chartPosition = null; fa = null }, onContainerMouseMove: function (a) { var b = this.chart; fa = b.index; a = this.normalize(a); b.mouseIsDown === "mousedown" && this.drag(a); (this.inClass(a.target, "highcharts-tracker") || b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop)) && !b.openMenu && this.runPointActions(a) }, inClass: function (a, b) { for (var c; a; ) { if (c = z(a, "class")) if (c.indexOf(b) !== -1) return !0; else if (c.indexOf("highcharts-container") !== -1) return !1; a = a.parentNode } }, onTrackerMouseOut: function (a) { var b = this.chart.hoverSeries, c = (a = a.relatedTarget || a.toElement) && a.point && a.point.series; if (b && !b.options.stickyTracking && !this.inClass(a, "highcharts-tooltip") && c !== b) b.onMouseOut() }, onContainerClick: function (a) { var b = this.chart, c = b.hoverPoint, d = b.plotLeft, e = b.plotTop, f = b.inverted, g, h, i, a = this.normalize(a); a.cancelBubble = !0; if (!b.cancelClick) c && this.inClass(a.target, "highcharts-tracker") ? (g = this.chartPosition, h = c.plotX, i = c.plotY, s(c, { pageX: g.left + d + (f ? b.plotWidth - i : h), pageY: g.top + e + (f ? b.plotHeight - h : i) }), I(c.series, "click", s(a, { point: c })), b.hoverPoint && c.firePointEvent("click", a)) : (s(a, this.getCoordinates(a)), b.isInsidePlot(a.chartX - d, a.chartY - e) && I(b, "click", a)) }, setDOMEvents: function () { var a = this, b = a.chart.container; b.onmousedown = function (b) { a.onContainerMouseDown(b) }; b.onmousemove = function (b) { a.onContainerMouseMove(b) }; b.onclick = function (b) { a.onContainerClick(b) }; C(b, "mouseleave", a.onContainerMouseLeave); C(y, "mouseup", a.onDocumentMouseUp); if ($a) b.ontouchstart = function (b) { a.onContainerTouchStart(b) }, b.ontouchmove = function (b) { a.onContainerTouchMove(b) }, C(y, "touchend", a.onDocumentTouchEnd) }, destroy: function () { var a; U(this.chart.container, "mouseleave", this.onContainerMouseLeave); U(y, "mouseup", this.onDocumentMouseUp); U(y, "touchend", this.onDocumentTouchEnd); clearInterval(this.tooltipTimeout); for (a in this) this[a] = null } }; s(Q.Pointer.prototype, { pinchTranslate: function (a, b, c, d, e, f, g, h) { a && this.pinchTranslateDirection(!0, c, d, e, f, g, h); b && this.pinchTranslateDirection(!1, c, d, e, f, g, h) }, pinchTranslateDirection: function (a, b, c, d, e, f, g, h) { var i = this.chart, j = a ? "x" : "y", k = a ? "X" : "Y", l = "chart" + k, m = a ? "width" : "height", n = i["plot" + (a ? "Left" : "Top")], q, o, p = h || 1, t = i.inverted, r = i.bounds[a ? "h" : "v"], v = b.length === 1, s = b[0][l], u = c[0][l], w = !v && b[1][l], x = !v && c[1][l], y, c = function () { !v && N(s - w) > 20 && (p = h || N(u - x) / N(s - w)); o = (n - u) / p + s; q = i["plot" + (a ? "Width" : "Height")] / p }; c(); b = o; b < r.min ? (b = r.min, y = !0) : b + q > r.max && (b = r.max - q, y = !0); y ? (u -= 0.8 * (u - g[j][0]), v || (x -= 0.8 * (x - g[j][1])), c()) : g[j] = [u, x]; t || (f[j] = o - n, f[m] = q); f = t ? 1 / p : p; e[m] = q; e[j] = b; d[t ? a ? "scaleY" : "scaleX" : "scale" + k] = p; d["translate" + k] = f * n + (u - f * s) }, pinch: function (a) { var b = this, c = b.chart, d = b.pinchDown, e = c.tooltip && c.tooltip.options.followTouchMove, f = a.touches, g = f.length, h = b.lastValidTouch, i = b.zoomHor || b.pinchHor, j = b.zoomVert || b.pinchVert, k = i || j, l = b.selectionMarker, m = {}, n = g === 1 && (b.inClass(a.target, "highcharts-tracker") && c.runTrackerClick || c.runChartClick), q = {}; (k || e) && !n && a.preventDefault(); Ua(f, function (a) { return b.normalize(a) }); if (a.type === "touchstart") p(f, function (a, b) { d[b] = { chartX: a.chartX, chartY: a.chartY} }), h.x = [d[0].chartX, d[1] && d[1].chartX], h.y = [d[0].chartY, d[1] && d[1].chartY], p(c.axes, function (a) { if (a.zoomEnabled) { var b = c.bounds[a.horiz ? "h" : "v"], d = a.minPixelPadding, e = a.toPixels(a.dataMin), f = a.toPixels(a.dataMax), g = E(e, f), e = t(e, f); b.min = E(a.pos, g - d); b.max = t(a.pos + a.len, e + d) } }); else if (d.length) { if (!l) b.selectionMarker = l = s({ destroy: Ea }, c.plotBox); b.pinchTranslate(i, j, d, f, m, l, q, h); b.hasPinched = k; b.scaleGroups(m, q); !k && e && g === 1 && this.runPointActions(b.normalize(a)) } }, onContainerTouchStart: function (a) { var b = this.chart; fa = b.index; a.touches.length === 1 ? (a = this.normalize(a), b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop) ? (this.runPointActions(a), this.pinch(a)) : this.reset()) : a.touches.length === 2 && this.pinch(a) }, onContainerTouchMove: function (a) { (a.touches.length === 1 || a.touches.length === 2) && this.pinch(a) }, onDocumentTouchEnd: function (a) { r(fa) && Y[fa].pointer.drop(a) } }); if (G.PointerEvent || G.MSPointerEvent) { var ra = {}, zb = !!G.PointerEvent, Wb = function () { var a, b = []; b.item = function (a) { return this[a] }; for (a in ra) ra.hasOwnProperty(a) && b.push({ pageX: ra[a].pageX, pageY: ra[a].pageY, target: ra[a].target }); return b }, Ab = function (a, b, c, d) { a = a.originalEvent || a; if ((a.pointerType === "touch" || a.pointerType === a.MSPOINTER_TYPE_TOUCH) && Y[fa]) d(a), d = Y[fa].pointer, d[b]({ type: c, target: a.currentTarget, preventDefault: Ea, touches: Wb() }) }; s(Wa.prototype, { onContainerPointerDown: function (a) { Ab(a, "onContainerTouchStart", "touchstart", function (a) { ra[a.pointerId] = { pageX: a.pageX, pageY: a.pageY, target: a.currentTarget} }) }, onContainerPointerMove: function (a) { Ab(a, "onContainerTouchMove", "touchmove", function (a) { ra[a.pointerId] = { pageX: a.pageX, pageY: a.pageY }; if (!ra[a.pointerId].target) ra[a.pointerId].target = a.currentTarget }) }, onDocumentPointerUp: function (a) { Ab(a, "onContainerTouchEnd", "touchend", function (a) { delete ra[a.pointerId] }) }, batchMSEvents: function (a) { a(this.chart.container, zb ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown); a(this.chart.container, zb ? "pointermove" : "MSPointerMove", this.onContainerPointerMove); a(y, zb ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp) } }); Ma(Wa.prototype, "init", function (a, b, c) { D(b.container, { "-ms-touch-action": O, "touch-action": O }); a.call(this, b, c) }); Ma(Wa.prototype, "setDOMEvents", function (a) { a.apply(this); this.batchMSEvents(C) }); Ma(Wa.prototype, "destroy", function (a) { this.batchMSEvents(U); a.call(this) }) } var lb = Q.Legend = function (a, b) { this.init(a, b) }; lb.prototype = { init: function (a, b) { var c = this, d = b.itemStyle, e = o(b.padding, 8), f = b.itemMarginTop || 0; this.options = b; if (b.enabled) c.baseline = x(d.fontSize) + 3 + f, c.itemStyle = d, c.itemHiddenStyle = w(d, b.itemHiddenStyle), c.itemMarginTop = f, c.padding = e, c.initialItemX = e, c.initialItemY = e - 5, c.maxItemWidth = 0, c.chart = a, c.itemHeight = 0, c.lastLineHeight = 0, c.symbolWidth = o(b.symbolWidth, 16), c.pages = [], c.render(), C(c.chart, "endResize", function () { c.positionCheckboxes() }) }, colorizeItem: function (a, b) { var c = this.options, d = a.legendItem, e = a.legendLine, f = a.legendSymbol, g = this.itemHiddenStyle.color, c = b ? c.itemStyle.color : g, h = b ? a.legendColor || a.color || "#CCC" : g, g = a.options && a.options.marker, i = { stroke: h, fill: h }, j; d && d.css({ fill: c, color: c }); e && e.attr({ stroke: h }); if (f) { if (g && f.isMarker) for (j in g = a.convertAttribs(g), g) d = g[j], d !== u && (i[j] = d); f.attr(i) } }, positionItem: function (a) { var b = this.options, c = b.symbolPadding, b = !b.rtl, d = a._legendItemPos, e = d[0], d = d[1], f = a.checkbox; a.legendGroup && a.legendGroup.translate(b ? e : this.legendWidth - e - 2 * c - 4, d); if (f) f.x = e, f.y = d }, destroyItem: function (a) { var b = a.checkbox; p(["legendItem", "legendLine", "legendSymbol", "legendGroup"], function (b) { a[b] && (a[b] = a[b].destroy()) }); b && Pa(a.checkbox) }, destroy: function () { var a = this.group, b = this.box; if (b) this.box = b.destroy(); if (a) this.group = a.destroy() }, positionCheckboxes: function (a) { var b = this.group.alignAttr, c, d = this.clipHeight || this.legendHeight; if (b) c = b.translateY, p(this.allItems, function (e) { var f = e.checkbox, g; f && (g = c + f.y + (a || 0) + 3, D(f, { left: b.translateX + e.legendItemWidth + f.x - 20 + "px", top: g + "px", display: g > c - 6 && g < c + d - 6 ? "" : O })) }) }, renderTitle: function () { var a = this.padding, b = this.options.title, c = 0; if (b.text) { if (!this.title) this.title = this.chart.renderer.label(b.text, a - 3, a - 4, null, null, null, null, null, "legend-title").attr({ zIndex: 1 }).css(b.style).add(this.group); a = this.title.getBBox(); c = a.height; this.offsetWidth = a.width; this.contentGroup.attr({ translateY: c }) } this.titleHeight = c }, renderItem: function (a) { var b = this.chart, c = b.renderer, d = this.options, e = d.layout === "horizontal", f = this.symbolWidth, g = d.symbolPadding, h = this.itemStyle, i = this.itemHiddenStyle, j = this.padding, k = e ? o(d.itemDistance, 8) : 0, l = !d.rtl, m = d.width, n = d.itemMarginBottom || 0, q = this.itemMarginTop, p = this.initialItemX, r = a.legendItem, s = a.series && a.series.drawLegendSymbol ? a.series : a, u = s.options, u = this.createCheckboxForItem && u && u.showCheckbox, x = d.useHTML; if (!r) a.legendGroup = c.g("legend-item").attr({ zIndex: 1 }).add(this.scrollGroup), s.drawLegendSymbol(this, a), a.legendItem = r = c.text(d.labelFormat ? Ia(d.labelFormat, a) : d.labelFormatter.call(a), l ? f + g : -g, this.baseline, x).css(w(a.visible ? h : i)).attr({ align: l ? "left" : "right", zIndex: 2 }).add(a.legendGroup), this.setItemEvents && this.setItemEvents(a, r, x, h, i), this.colorizeItem(a, a.visible), u && this.createCheckboxForItem(a); c = r.getBBox(); f = a.legendItemWidth = d.itemWidth || a.legendItemWidth || f + g + c.width + k + (u ? 20 : 0); this.itemHeight = g = v(a.legendItemHeight || c.height); if (e && this.itemX - p + f > (m || b.chartWidth - 2 * j - p - d.x)) this.itemX = p, this.itemY += q + this.lastLineHeight + n, this.lastLineHeight = 0; this.maxItemWidth = t(this.maxItemWidth, f); this.lastItemY = q + this.itemY + n; this.lastLineHeight = t(g, this.lastLineHeight); a._legendItemPos = [this.itemX, this.itemY]; e ? this.itemX += f : (this.itemY += q + g + n, this.lastLineHeight = g); this.offsetWidth = m || t((e ? this.itemX - p - k : f) + j, this.offsetWidth) }, getAllItems: function () { var a = []; p(this.chart.series, function (b) { var c = b.options; if (o(c.showInLegend, !r(c.linkedTo) ? u : !1, !0)) a = a.concat(b.legendItems || (c.legendType === "point" ? b.data : b)) }); return a }, render: function () { var a = this, b = a.chart, c = b.renderer, d = a.group, e, f, g, h, i = a.box, j = a.options, k = a.padding, l = j.borderWidth, m = j.backgroundColor; a.itemX = a.initialItemX; a.itemY = a.initialItemY; a.offsetWidth = 0; a.lastItemY = 0; if (!d) a.group = d = c.g("legend").attr({ zIndex: 7 }).add(), a.contentGroup = c.g().attr({ zIndex: 1 }).add(d), a.scrollGroup = c.g().add(a.contentGroup); a.renderTitle(); e = a.getAllItems(); ob(e, function (a, b) { return (a.options && a.options.legendIndex || 0) - (b.options && b.options.legendIndex || 0) }); j.reversed && e.reverse(); a.allItems = e; a.display = f = !!e.length; p(e, function (b) { a.renderItem(b) }); g = j.width || a.offsetWidth; h = a.lastItemY + a.lastLineHeight + a.titleHeight; h = a.handleOverflow(h); if (l || m) { g += k; h += k; if (i) { if (g > 0 && h > 0) i[i.isNew ? "attr" : "animate"](i.crisp({ width: g, height: h })), i.isNew = !1 } else a.box = i = c.rect(0, 0, g, h, j.borderRadius, l || 0).attr({ stroke: j.borderColor, "stroke-width": l || 0, fill: m || O }).add(d).shadow(j.shadow), i.isNew = !0; i[f ? "show" : "hide"]() } a.legendWidth = g; a.legendHeight = h; p(e, function (b) { a.positionItem(b) }); f && d.align(s({ width: g, height: h }, j), !0, "spacingBox"); b.isResizing || this.positionCheckboxes() }, handleOverflow: function (a) { var b = this, c = this.chart, d = c.renderer, e = this.options, f = e.y, f = c.spacingBox.height + (e.verticalAlign === "top" ? -f : f) - this.padding, g = e.maxHeight, h, i = this.clipRect, j = e.navigation, k = o(j.animation, !0), l = j.arrowSize || 12, m = this.nav, n = this.pages, q, t = this.allItems; e.layout === "horizontal" && (f /= 2); g && (f = E(f, g)); n.length = 0; if (a > f && !e.useHTML) { this.clipHeight = h = f - 20 - this.titleHeight - this.padding; this.currentPage = o(this.currentPage, 1); this.fullHeight = a; p(t, function (a, b) { var c = a._legendItemPos[1], d = v(a.legendItem.getBBox().height), e = n.length; if (!e || c - n[e - 1] > h && (q || c) !== n[e - 1]) n.push(q || c), e++; b === t.length - 1 && c + d - n[e - 1] > h && n.push(c); c !== q && (q = c) }); if (!i) i = b.clipRect = d.clipRect(0, this.padding, 9999, 0), b.contentGroup.clip(i); i.attr({ height: h }); if (!m) this.nav = m = d.g().attr({ zIndex: 1 }).add(this.group), this.up = d.symbol("triangle", 0, 0, l, l).on("click", function () { b.scroll(-1, k) }).add(m), this.pager = d.text("", 15, 10).css(j.style).add(m), this.down = d.symbol("triangle-down", 0, 0, l, l).on("click", function () { b.scroll(1, k) }).add(m); b.scroll(0); a = f } else if (m) i.attr({ height: c.chartHeight }), m.hide(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0; return a }, scroll: function (a, b) { var c = this.pages, d = c.length, e = this.currentPage + a, f = this.clipHeight, g = this.options.navigation, h = g.activeColor, g = g.inactiveColor, i = this.pager, j = this.padding; e > d && (e = d); if (e > 0) b !== u && Qa(b, this.chart), this.nav.attr({ translateX: j, translateY: f + this.padding + 7 + this.titleHeight, visibility: "visible" }), this.up.attr({ fill: e === 1 ? g : h }).css({ cursor: e === 1 ? "default" : "pointer" }), i.attr({ text: e + "/" + d }), this.down.attr({ x: 18 + this.pager.getBBox().width, fill: e === d ? g : h }).css({ cursor: e === d ? "default" : "pointer" }), c = -c[e - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: c }), this.currentPage = e, this.positionCheckboxes(c) } }; F = Q.LegendSymbolMixin = { drawRectangle: function (a, b) { var c = a.options.symbolHeight || 12; b.legendSymbol = this.chart.renderer.rect(0, a.baseline - 5 - c / 2, a.symbolWidth, c, o(a.options.symbolRadius, 2)).attr({ zIndex: 3 }).add(b.legendGroup) }, drawLineMarker: function (a) { var b = this.options, c = b.marker, d; d = a.symbolWidth; var e = this.chart.renderer, f = this.legendGroup, a = a.baseline - v(e.fontMetrics(a.options.itemStyle.fontSize).b * 0.3), g; if (b.lineWidth) { g = { "stroke-width": b.lineWidth }; if (b.dashStyle) g.dashstyle = b.dashStyle; this.legendLine = e.path(["M", 0, a, "L", d, a]).attr(g).add(f) } if (c && c.enabled) b = c.radius, this.legendSymbol = d = e.symbol(this.symbol, d / 2 - b, a - b, 2 * b, 2 * b).add(f), d.isMarker = !0 } }; (/Trident\/7\.0/.test(ua) || Ta) && Ma(lb.prototype, "positionItem", function (a, b) { var c = this, d = function () { b._legendItemPos && a.call(c, b) }; c.chart.renderer.forExport ? d() : setTimeout(d) }); Ya.prototype = { init: function (a, b) { var c, d = a.series; a.series = null; c = w(L, a); c.series = a.series = d; this.userOptions = a; d = c.chart; this.margin = this.splashArray("margin", d); this.spacing = this.splashArray("spacing", d); var e = d.events; this.bounds = { h: {}, v: {} }; this.callback = b; this.isResizing = 0; this.options = c; this.axes = []; this.series = []; this.hasCartesianSeries = d.showAxes; var f = this, g; f.index = Y.length; Y.push(f); d.reflow !== !1 && C(f, "load", function () { f.initReflow() }); if (e) for (g in e) C(f, g, e[g]); f.xAxis = []; f.yAxis = []; f.animation = ca ? !1 : o(d.animation, !0); f.pointCount = 0; f.counters = new Bb; f.firstRender() }, initSeries: function (a) { var b = this.options.chart; (b = J[a.type || b.type || b.defaultSeriesType]) || oa(17, !0); b = new b; b.init(this, a); return b }, isInsidePlot: function (a, b, c) { var d = c ? b : a, a = c ? a : b; return d >= 0 && d <= this.plotWidth && a >= 0 && a <= this.plotHeight }, adjustTickAmounts: function () { this.options.chart.alignTicks !== !1 && p(this.axes, function (a) { a.adjustTickAmount() }); this.maxTicks = null }, redraw: function (a) { var b = this.axes, c = this.series, d = this.pointer, e = this.legend, f = this.isDirtyLegend, g, h, i = this.isDirtyBox, j = c.length, k = j, l = this.renderer, m = l.isHidden(), n = []; Qa(a, this); m && this.cloneRenderTo(); for (this.layOutTitles(); k--; ) if (a = c[k], a.options.stacking && (g = !0, a.isDirty)) { h = !0; break } if (h) for (k = j; k--; ) if (a = c[k], a.options.stacking) a.isDirty = !0; p(c, function (a) { a.isDirty && a.options.legendType === "point" && (f = !0) }); if (f && e.options.enabled) e.render(), this.isDirtyLegend = !1; g && this.getStacks(); if (this.hasCartesianSeries) { if (!this.isResizing) this.maxTicks = null, p(b, function (a) { a.setScale() }); this.adjustTickAmounts(); this.getMargins(); p(b, function (a) { a.isDirty && (i = !0) }); p(b, function (a) { if (a.isDirtyExtremes) a.isDirtyExtremes = !1, n.push(function () { I(a, "afterSetExtremes", s(a.eventArgs, a.getExtremes())); delete a.eventArgs }); (i || g) && a.redraw() }) } i && this.drawChartBox(); p(c, function (a) { a.isDirty && a.visible && (!a.isCartesian || a.xAxis) && a.redraw() }); d && d.reset(!0); l.draw(); I(this, "redraw"); m && this.cloneRenderTo(!0); p(n, function (a) { a.call() }) }, get: function (a) { var b = this.axes, c = this.series, d, e; for (d = 0; d < b.length; d++) if (b[d].options.id === a) return b[d]; for (d = 0; d < c.length; d++) if (c[d].options.id === a) return c[d]; for (d = 0; d < c.length; d++) { e = c[d].points || []; for (b = 0; b < e.length; b++) if (e[b].id === a) return e[b] } return null }, getAxes: function () { var a = this, b = this.options, c = b.xAxis = na(b.xAxis || {}), b = b.yAxis = na(b.yAxis || {}); p(c, function (a, b) { a.index = b; a.isX = !0 }); p(b, function (a, b) { a.index = b }); c = c.concat(b); p(c, function (b) { new ka(a, b) }); a.adjustTickAmounts() }, getSelectedPoints: function () { var a = []; p(this.series, function (b) { a = a.concat(vb(b.points || [], function (a) { return a.selected })) }); return a }, getSelectedSeries: function () { return vb(this.series, function (a) { return a.selected }) }, getStacks: function () { var a = this; p(a.yAxis, function (a) { if (a.stacks && a.hasVisibleSeries) a.oldStacks = a.stacks }); p(a.series, function (b) { if (b.options.stacking && (b.visible === !0 || a.options.chart.ignoreHiddenSeries === !1)) b.stackKey = b.type + o(b.options.stack, "") }) }, setTitle: function (a, b, c) { var g; var d = this, e = d.options, f; f = e.title = w(e.title, a); g = e.subtitle = w(e.subtitle, b), e = g; p([["title", a, f], ["subtitle", b, e]], function (a) { var b = a[0], c = d[b], e = a[1], a = a[2]; c && e && (d[b] = c = c.destroy()); a && a.text && !c && (d[b] = d.renderer.text(a.text, 0, 0, a.useHTML).attr({ align: a.align, "class": "highcharts-" + b, zIndex: a.zIndex || 4 }).css(a.style).add()) }); d.layOutTitles(c) }, layOutTitles: function (a) { var b = 0, c = this.title, d = this.subtitle, e = this.options, f = e.title, e = e.subtitle, g = this.spacingBox.width - 44; if (c && (c.css({ width: (f.width || g) + "px" }).align(s({ y: 15 }, f), !1, "spacingBox"), !f.floating && !f.verticalAlign)) b = c.getBBox().height, b >= 18 && b <= 25 && (b = 15); d && (d.css({ width: (e.width || g) + "px" }).align(s({ y: b + f.margin }, e), !1, "spacingBox"), !e.floating && !e.verticalAlign && (b = Ka(b + d.getBBox().height))); c = this.titleOffset !== b; this.titleOffset = b; if (!this.isDirtyBox && c) this.isDirtyBox = c, this.hasRendered && o(a, !0) && this.isDirtyBox && this.redraw() }, getChartSize: function () { var a = this.options.chart, b = a.width, a = a.height, c = this.renderToClone || this.renderTo; if (!r(b)) this.containerWidth = ib(c, "width"); if (!r(a)) this.containerHeight = ib(c, "height"); this.chartWidth = t(0, b || this.containerWidth || 600); this.chartHeight = t(0, o(a, this.containerHeight > 19 ? this.containerHeight : 400)) }, cloneRenderTo: function (a) { var b = this.renderToClone, c = this.container; a ? b && (this.renderTo.appendChild(c), Pa(b), delete this.renderToClone) : (c && c.parentNode === this.renderTo && this.renderTo.removeChild(c), this.renderToClone = b = this.renderTo.cloneNode(0), D(b, { position: "absolute", top: "-9999px", display: "block" }), b.style.setProperty && b.style.setProperty("display", "block", "important"), y.body.appendChild(b), c && b.appendChild(c)) }, getContainer: function () { var a, b = this.options.chart, c, d, e; this.renderTo = a = b.renderTo; e = "highcharts-" + tb++; if (ga(a)) this.renderTo = a = y.getElementById(a); a || oa(13, !0); c = x(z(a, "data-highcharts-chart")); !isNaN(c) && Y[c] && Y[c].hasRendered && Y[c].destroy(); z(a, "data-highcharts-chart", this.index); a.innerHTML = ""; !b.skipClone && !a.offsetWidth && this.cloneRenderTo(); this.getChartSize(); c = this.chartWidth; d = this.chartHeight; this.container = a = V(Ja, { className: "highcharts-container" + (b.className ? " " + b.className : ""), id: e }, s({ position: "relative", overflow: "hidden", width: c + "px", height: d + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)" }, b.style), this.renderToClone || a); this._cursor = a.style.cursor; this.renderer = b.forExport ? new pa(a, c, d, b.style, !0) : new Za(a, c, d, b.style); ca && this.renderer.create(this, a, c, d) }, getMargins: function () { var a = this.spacing, b, c = this.legend, d = this.margin, e = this.options.legend, f = o(e.margin, 10), g = e.x, h = e.y, i = e.align, j = e.verticalAlign, k = this.titleOffset; this.resetMargins(); b = this.axisOffset; if (k && !r(d[0])) this.plotTop = t(this.plotTop, k + this.options.title.margin + a[0]); if (c.display && !e.floating) if (i === "right") { if (!r(d[1])) this.marginRight = t(this.marginRight, c.legendWidth - g + f + a[1]) } else if (i === "left") { if (!r(d[3])) this.plotLeft = t(this.plotLeft, c.legendWidth + g + f + a[3]) } else if (j === "top") { if (!r(d[0])) this.plotTop = t(this.plotTop, c.legendHeight + h + f + a[0]) } else if (j === "bottom" && !r(d[2])) this.marginBottom = t(this.marginBottom, c.legendHeight - h + f + a[2]); this.extraBottomMargin && (this.marginBottom += this.extraBottomMargin); this.extraTopMargin && (this.plotTop += this.extraTopMargin); this.hasCartesianSeries && p(this.axes, function (a) { a.getOffset() }); r(d[3]) || (this.plotLeft += b[3]); r(d[0]) || (this.plotTop += b[0]); r(d[2]) || (this.marginBottom += b[2]); r(d[1]) || (this.marginRight += b[1]); this.setChartSize() }, reflow: function (a) { var b = this, c = b.options.chart, d = b.renderTo, e = c.width || ib(d, "width"), f = c.height || ib(d, "height"), c = a ? a.target : G, d = function () { if (b.container) b.setSize(e, f, !1), b.hasUserSize = null }; if (!b.hasUserSize && e && f && (c === G || c === y)) { if (e !== b.containerWidth || f !== b.containerHeight) clearTimeout(b.reflowTimeout), a ? b.reflowTimeout = setTimeout(d, 100) : d(); b.containerWidth = e; b.containerHeight = f } }, initReflow: function () { var a = this, b = function (b) { a.reflow(b) }; C(G, "resize", b); C(a, "destroy", function () { U(G, "resize", b) }) }, setSize: function (a, b, c) { var d = this, e, f, g; d.isResizing += 1; g = function () { d && I(d, "endResize", null, function () { d.isResizing -= 1 }) }; Qa(c, d); d.oldChartHeight = d.chartHeight; d.oldChartWidth = d.chartWidth; if (r(a)) d.chartWidth = e = t(0, v(a)), d.hasUserSize = !!e; if (r(b)) d.chartHeight = f = t(0, v(b)); (sa ? jb : D)(d.container, { width: e + "px", height: f + "px" }, sa); d.setChartSize(!0); d.renderer.setSize(e, f, c); d.maxTicks = null; p(d.axes, function (a) { a.isDirty = !0; a.setScale() }); p(d.series, function (a) { a.isDirty = !0 }); d.isDirtyLegend = !0; d.isDirtyBox = !0; d.getMargins(); d.redraw(c); d.oldChartHeight = null; I(d, "resize"); sa === !1 ? g() : setTimeout(g, sa && sa.duration || 500) }, setChartSize: function (a) { var b = this.inverted, c = this.renderer, d = this.chartWidth, e = this.chartHeight, f = this.options.chart, g = this.spacing, h = this.clipOffset, i, j, k, l; this.plotLeft = i = v(this.plotLeft); this.plotTop = j = v(this.plotTop); this.plotWidth = k = t(0, v(d - i - this.marginRight)); this.plotHeight = l = t(0, v(e - j - this.marginBottom)); this.plotSizeX = b ? l : k; this.plotSizeY = b ? k : l; this.plotBorderWidth = f.plotBorderWidth || 0; this.spacingBox = c.spacingBox = { x: g[3], y: g[0], width: d - g[3] - g[1], height: e - g[0] - g[2] }; this.plotBox = c.plotBox = { x: i, y: j, width: k, height: l }; d = 2 * S(this.plotBorderWidth / 2); b = Ka(t(d, h[3]) / 2); c = Ka(t(d, h[0]) / 2); this.clipBox = { x: b, y: c, width: S(this.plotSizeX - t(d, h[1]) / 2 - b), height: S(this.plotSizeY - t(d, h[2]) / 2 - c) }; a || p(this.axes, function (a) { a.setAxisSize(); a.setAxisTranslation() }) }, resetMargins: function () { var a = this.spacing, b = this.margin; this.plotTop = o(b[0], a[0]); this.marginRight = o(b[1], a[1]); this.marginBottom = o(b[2], a[2]); this.plotLeft = o(b[3], a[3]); this.axisOffset = [0, 0, 0, 0]; this.clipOffset = [0, 0, 0, 0] }, drawChartBox: function () { var a = this.options.chart, b = this.renderer, c = this.chartWidth, d = this.chartHeight, e = this.chartBackground, f = this.plotBackground, g = this.plotBorder, h = this.plotBGImage, i = a.borderWidth || 0, j = a.backgroundColor, k = a.plotBackgroundColor, l = a.plotBackgroundImage, m = a.plotBorderWidth || 0, n, q = this.plotLeft, o = this.plotTop, p = this.plotWidth, t = this.plotHeight, r = this.plotBox, s = this.clipRect, v = this.clipBox; n = i + (a.shadow ? 8 : 0); if (i || j) if (e) e.animate(e.crisp({ width: c - n, height: d - n })); else { e = { fill: j || O }; if (i) e.stroke = a.borderColor, e["stroke-width"] = i; this.chartBackground = b.rect(n / 2, n / 2, c - n, d - n, a.borderRadius, i).attr(e).addClass("highcharts-background").add().shadow(a.shadow) } if (k) f ? f.animate(r) : this.plotBackground = b.rect(q, o, p, t, 0).attr({ fill: k }).add().shadow(a.plotShadow); if (l) h ? h.animate(r) : this.plotBGImage = b.image(l, q, o, p, t).add(); s ? s.animate({ width: v.width, height: v.height }) : this.clipRect = b.clipRect(v); if (m) g ? g.animate(g.crisp({ x: q, y: o, width: p, height: t })) : this.plotBorder = b.rect(q, o, p, t, 0, -m).attr({ stroke: a.plotBorderColor, "stroke-width": m, fill: O, zIndex: 1 }).add(); this.isDirtyBox = !1 }, propFromSeries: function () { var a = this, b = a.options.chart, c, d = a.options.series, e, f; p(["inverted", "angular", "polar"], function (g) { c = J[b.type || b.defaultSeriesType]; f = a[g] || b[g] || c && c.prototype[g]; for (e = d && d.length; !f && e--; ) (c = J[d[e].type]) && c.prototype[g] && (f = !0); a[g] = f }) }, linkSeries: function () { var a = this, b = a.series; p(b, function (a) { a.linkedSeries.length = 0 }); p(b, function (b) { var d = b.options.linkedTo; if (ga(d) && (d = d === ":previous" ? a.series[b.index - 1] : a.get(d))) d.linkedSeries.push(b), b.linkedParent = d }) }, renderSeries: function () { p(this.series, function (a) { a.translate(); a.setTooltipPoints && a.setTooltipPoints(); a.render() }) }, render: function () { var a = this, b = a.axes, c = a.renderer, d = a.options, e = d.labels, f = d.credits, g; a.setTitle(); a.legend = new lb(a, d.legend); a.getStacks(); p(b, function (a) { a.setScale() }); a.getMargins(); a.maxTicks = null; p(b, function (a) { a.setTickPositions(!0); a.setMaxTicks() }); a.adjustTickAmounts(); a.getMargins(); a.drawChartBox(); a.hasCartesianSeries && p(b, function (a) { a.render() }); if (!a.seriesGroup) a.seriesGroup = c.g("series-group").attr({ zIndex: 3 }).add(); a.renderSeries(); e.items && p(e.items, function (b) { var d = s(e.style, b.style), f = x(d.left) + a.plotLeft, g = x(d.top) + a.plotTop + 12; delete d.left; delete d.top; c.text(b.html, f, g).attr({ zIndex: 2 }).css(d).add() }); if (f.enabled && !a.credits) g = f.href, a.credits = c.text(f.text, 0, 0).on("click", function () { if (g) location.href = g }).attr({ align: f.position.align, zIndex: 8 }).css(f.style).add().align(f.position); a.hasRendered = !0 }, destroy: function () { var a = this, b = a.axes, c = a.series, d = a.container, e, f = d && d.parentNode; I(a, "destroy"); Y[a.index] = u; a.renderTo.removeAttribute("data-highcharts-chart"); U(a); for (e = b.length; e--; ) b[e] = b[e].destroy(); for (e = c.length; e--; ) c[e] = c[e].destroy(); p("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","), function (b) { var c = a[b]; c && c.destroy && (a[b] = c.destroy()) }); if (d) d.innerHTML = "", U(d), f && Pa(d); for (e in a) delete a[e] }, isReadyToRender: function () { var a = this; return !X && G == G.top && y.readyState !== "complete" || ca && !G.canvg ? (ca ? Mb.push(function () { a.firstRender() }, a.options.global.canvasToolsURL) : y.attachEvent("onreadystatechange", function () { y.detachEvent("onreadystatechange", a.firstRender); y.readyState === "complete" && a.firstRender() }), !1) : !0 }, firstRender: function () { var a = this, b = a.options, c = a.callback; if (a.isReadyToRender()) { a.getContainer(); I(a, "init"); a.resetMargins(); a.setChartSize(); a.propFromSeries(); a.getAxes(); p(b.series || [], function (b) { a.initSeries(b) }); a.linkSeries(); I(a, "beforeRender"); if (Q.Pointer) a.pointer = new Wa(a, b); a.render(); a.renderer.draw(); c && c.apply(a, [a]); p(a.callbacks, function (b) { b.apply(a, [a]) }); a.cloneRenderTo(!0); I(a, "load") } }, splashArray: function (a, b) { var c = b[a], c = $(c) ? c : [c, c, c, c]; return [o(b[a + "Top"], c[0]), o(b[a + "Right"], c[1]), o(b[a + "Bottom"], c[2]), o(b[a + "Left"], c[3])] } }; Ya.prototype.callbacks = []; da = Q.CenteredSeriesMixin = { getCenter: function () { var a = this.options, b = this.chart, c = 2 * (a.slicedOffset || 0), d, e = b.plotWidth - 2 * c, f = b.plotHeight - 2 * c, b = a.center, a = [o(b[0], "50%"), o(b[1], "50%"), a.size || "100%", a.innerSize || 0], g = E(e, f), h; return Ua(a, function (a, b) { h = /%$/.test(a); d = b < 2 || b === 2 && h; return (h ? [e, f, g, g][b] * x(a) / 100 : a) + (d ? c : 0) }) } }; var Fa = function () { }; Fa.prototype = { init: function (a, b, c) { this.series = a; this.applyOptions(b, c); this.pointAttr = {}; if (a.options.colorByPoint && (b = a.options.colors || a.chart.options.colors, this.color = this.color || b[a.colorCounter++], a.colorCounter === b.length)) a.colorCounter = 0; a.chart.pointCount++; return this }, applyOptions: function (a, b) { var c = this.series, d = c.pointValKey, a = Fa.prototype.optionsToObject.call(this, a); s(this, a); this.options = this.options ? s(this.options, a) : a; if (d) this.y = this[d]; if (this.x === u && c) this.x = b === u ? c.autoIncrement() : b; return this }, optionsToObject: function (a) { var b = {}, c = this.series, d = c.pointArrayMap || ["y"], e = d.length, f = 0, g = 0; if (typeof a === "number" || a === null) b[d[0]] = a; else if (La(a)) { if (a.length > e) { c = typeof a[0]; if (c === "string") b.name = a[0]; else if (c === "number") b.x = a[0]; f++ } for (; g < e; ) b[d[g++]] = a[f++] } else if (typeof a === "object") { b = a; if (a.dataLabels) c._hasPointLabels = !0; if (a.marker) c._hasPointMarkers = !0 } return b }, destroy: function () { var a = this.series.chart, b = a.hoverPoints, c; a.pointCount--; if (b && (this.setState(), ia(b, this), !b.length)) a.hoverPoints = null; if (this === a.hoverPoint) this.onMouseOut(); if (this.graphic || this.dataLabel) U(this), this.destroyElements(); this.legendItem && a.legend.destroyItem(this); for (c in this) this[c] = null }, destroyElements: function () { for (var a = "graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","), b, c = 6; c--; ) b = a[c], this[b] && (this[b] = this[b].destroy()) }, getLabelConfig: function () { return { x: this.category, y: this.y, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal} }, tooltipFormatter: function (a) { var b = this.series, c = b.tooltipOptions, d = o(c.valueDecimals, ""), e = c.valuePrefix || "", f = c.valueSuffix || ""; p(b.pointArrayMap || ["y"], function (b) { b = "{point." + b; if (e || f) a = a.replace(b + "}", e + b + "}" + f); a = a.replace(b + "}", b + ":,." + d + "f}") }); return Ia(a, { point: this, series: this.series }) } }; var M = function () { }; M.prototype = { isCartesian: !0, type: "line", pointClass: Fa, sorted: !0, requireSorting: !0, pointAttrToOptions: { stroke: "lineColor", "stroke-width": "lineWidth", fill: "fillColor", r: "radius" }, axisTypes: ["xAxis", "yAxis"], colorCounter: 0, parallelArrays: ["x", "y"], init: function (a, b) { var c = this, d, e, f = a.series, g = function (a, b) { return o(a.options.index, a._i) - o(b.options.index, b._i) }; c.chart = a; c.options = b = c.setOptions(b); c.linkedSeries = []; c.bindAxes(); s(c, { name: b.name, state: "", pointAttr: {}, visible: b.visible !== !1, selected: b.selected === !0 }); if (ca) b.animation = !1; e = b.events; for (d in e) C(c, d, e[d]); if (e && e.click || b.point && b.point.events && b.point.events.click || b.allowPointSelect) a.runTrackerClick = !0; c.getColor(); c.getSymbol(); p(c.parallelArrays, function (a) { c[a + "Data"] = [] }); c.setData(b.data, !1); if (c.isCartesian) a.hasCartesianSeries = !0; f.push(c); c._i = f.length - 1; ob(f, g); this.yAxis && ob(this.yAxis.series, g); p(f, function (a, b) { a.index = b; a.name = a.name || "Series " + (b + 1) }) }, bindAxes: function () { var a = this, b = a.options, c = a.chart, d; p(a.axisTypes || [], function (e) { p(c[e], function (c) { d = c.options; if (b[e] === d.index || b[e] !== u && b[e] === d.id || b[e] === u && d.index === 0) c.series.push(a), a[e] = c, c.isDirty = !0 }); !a[e] && a.optionalAxis !== e && oa(18, !0) }) }, updateParallelArrays: function (a, b) { var c = a.series, d = arguments; p(c.parallelArrays, typeof b === "number" ? function (d) { var f = d === "y" && c.toYData ? c.toYData(a) : a[d]; c[d + "Data"][b] = f } : function (a) { Array.prototype[b].apply(c[a + "Data"], Array.prototype.slice.call(d, 2)) }) }, autoIncrement: function () { var a = this.options, b = this.xIncrement, b = o(b, a.pointStart, 0); this.pointInterval = o(this.pointInterval, a.pointInterval, 1); this.xIncrement = b + this.pointInterval; return b }, getSegments: function () { var a = -1, b = [], c, d = this.points, e = d.length; if (e) if (this.options.connectNulls) { for (c = e; c--; ) d[c].y === null && d.splice(c, 1); d.length && (b = [d]) } else p(d, function (c, g) { c.y === null ? (g > a + 1 && b.push(d.slice(a + 1, g)), a = g) : g === e - 1 && b.push(d.slice(a + 1, g + 1)) }); this.segments = b }, setOptions: function (a) { var b = this.chart, c = b.options.plotOptions, b = b.userOptions || {}, d = b.plotOptions || {}, e = c[this.type]; this.userOptions = a; c = w(e, c.series, a); this.tooltipOptions = w(L.tooltip, L.plotOptions[this.type].tooltip, b.tooltip, d.series && d.series.tooltip, d[this.type] && d[this.type].tooltip, a.tooltip); e.marker === null && delete c.marker; return c }, getColor: function () { var a = this.options, b = this.userOptions, c = this.chart.options.colors, d = this.chart.counters, e; e = a.color || Z[this.type].color; if (!e && !a.colorByPoint) r(b._colorIndex) ? a = b._colorIndex : (b._colorIndex = d.color, a = d.color++), e = c[a]; this.color = e; d.wrapColor(c.length) }, getSymbol: function () { var a = this.userOptions, b = this.options.marker, c = this.chart, d = c.options.symbols, c = c.counters; this.symbol = b.symbol; if (!this.symbol) r(a._symbolIndex) ? a = a._symbolIndex : (a._symbolIndex = c.symbol, a = c.symbol++), this.symbol = d[a]; if (/^url/.test(this.symbol)) b.radius = 0; c.wrapSymbol(d.length) }, drawLegendSymbol: F.drawLineMarker, setData: function (a, b, c, d) { var e = this, f = e.points, g = f && f.length || 0, h, i = e.options, j = e.chart, k = null, l = e.xAxis, m = l && !!l.categories, n = e.tooltipPoints, q = i.turboThreshold, t = this.xData, r = this.yData, s = (h = e.pointArrayMap) && h.length, a = a || []; h = a.length; b = o(b, !0); if (d !== !1 && h && g === h && !e.cropped && !e.hasGroupedData) p(a, function (a, b) { f[b].update(a, !1) }); else { e.xIncrement = null; e.pointRange = m ? 1 : i.pointRange; e.colorCounter = 0; p(this.parallelArrays, function (a) { e[a + "Data"].length = 0 }); if (q && h > q) { for (c = 0; k === null && c < h; ) k = a[c], c++; if (ya(k)) { m = o(i.pointStart, 0); i = o(i.pointInterval, 1); for (c = 0; c < h; c++) t[c] = m, r[c] = a[c], m += i; e.xIncrement = m } else if (La(k)) if (s) for (c = 0; c < h; c++) i = a[c], t[c] = i[0], r[c] = i.slice(1, s + 1); else for (c = 0; c < h; c++) i = a[c], t[c] = i[0], r[c] = i[1]; else oa(12) } else for (c = 0; c < h; c++) if (a[c] !== u && (i = { series: e }, e.pointClass.prototype.applyOptions.apply(i, [a[c]]), e.updateParallelArrays(i, c), m && i.name)) l.names[i.x] = i.name; ga(r[0]) && oa(14, !0); e.data = []; e.options.data = a; for (c = g; c--; ) f[c] && f[c].destroy && f[c].destroy(); if (n) n.length = 0; if (l) l.minRange = l.userMinRange; e.isDirty = e.isDirtyData = j.isDirtyBox = !0; c = !1 } b && j.redraw(c) }, processData: function (a) { var b = this.xData, c = this.yData, d = b.length, e; e = 0; var f, g, h = this.xAxis, i = this.options, j = i.cropThreshold, k = this.isCartesian; if (k && !this.isDirty && !h.isDirty && !this.yAxis.isDirty && !a) return !1; if (k && this.sorted && (!j || d > j || this.forceCrop)) if (a = h.min, h = h.max, b[d - 1] < a || b[0] > h) b = [], c = []; else if (b[0] < a || b[d - 1] > h) e = this.cropData(this.xData, this.yData, a, h), b = e.xData, c = e.yData, e = e.start, f = !0; for (h = b.length - 1; h >= 0; h--) d = b[h] - b[h - 1], d > 0 && (g === u || d < g) ? g = d : d < 0 && this.requireSorting && oa(15); this.cropped = f; this.cropStart = e; this.processedXData = b; this.processedYData = c; if (i.pointRange === null) this.pointRange = g || 1; this.closestPointRange = g }, cropData: function (a, b, c, d) { var e = a.length, f = 0, g = e, h = o(this.cropShoulder, 1), i; for (i = 0; i < e; i++) if (a[i] >= c) { f = t(0, i - h); break } for (; i < e; i++) if (a[i] > d) { g = i + h; break } return { xData: a.slice(f, g), yData: b.slice(f, g), start: f, end: g} }, generatePoints: function () { var a = this.options.data, b = this.data, c, d = this.processedXData, e = this.processedYData, f = this.pointClass, g = d.length, h = this.cropStart || 0, i, j = this.hasGroupedData, k, l = [], m; if (!b && !j) b = [], b.length = a.length, b = this.data = b; for (m = 0; m < g; m++) i = h + m, j ? l[m] = (new f).init(this, [d[m]].concat(na(e[m]))) : (b[i] ? k = b[i] : a[i] !== u && (b[i] = k = (new f).init(this, a[i], d[m])), l[m] = k); if (b && (g !== (c = b.length) || j)) for (m = 0; m < c; m++) if (m === h && !j && (m += g), b[m]) b[m].destroyElements(), b[m].plotX = u; this.data = b; this.points = l }, getExtremes: function (a) { var b = this.yAxis, c = this.processedXData, d, e = [], f = 0; d = this.xAxis.getExtremes(); var g = d.min, h = d.max, i, j, k, l, a = a || this.stackedYData || this.processedYData; d = a.length; for (l = 0; l < d; l++) if (j = c[l], k = a[l], i = k !== null && k !== u && (!b.isLog || k.length || k > 0), j = this.getExtremesFromAll || this.cropped || (c[l + 1] || j) >= g && (c[l - 1] || j) <= h, i && j) if (i = k.length) for (; i--; ) k[i] !== null && (e[f++] = k[i]); else e[f++] = k; this.dataMin = o(void 0, Na(e)); this.dataMax = o(void 0, Ba(e)) }, translate: function () { this.processedXData || this.processData(); this.generatePoints(); for (var a = this.options, b = a.stacking, c = this.xAxis, d = c.categories, e = this.yAxis, f = this.points, g = f.length, h = !!this.modifyValue, i = a.pointPlacement, j = i === "between" || ya(i), k = a.threshold, a = 0; a < g; a++) { var l = f[a], m = l.x, n = l.y, q = l.low, p = b && e.stacks[(this.negStacks && n < k ? "-" : "") + this.stackKey]; if (e.isLog && n <= 0) l.y = n = null; l.plotX = c.translate(m, 0, 0, 0, 1, i, this.type === "flags"); if (b && this.visible && p && p[m]) p = p[m], n = p.points[this.index], q = n[0], n = n[1], q === 0 && (q = o(k, e.min)), e.isLog && q <= 0 && (q = null), l.total = l.stackTotal = p.total, l.percentage = p.total && l.y / p.total * 100, l.stackY = n, p.setOffset(this.pointXOffset || 0, this.barW || 0); l.yBottom = r(q) ? e.translate(q, 0, 1, 0, 1) : null; h && (n = this.modifyValue(n, l)); l.plotY = typeof n === "number" && n !== Infinity ? e.translate(n, 0, 1, 0, 1) : u; l.clientX = j ? c.translate(m, 0, 0, 0, 1) : l.plotX; l.negative = l.y < (k || 0); l.category = d && d[l.x] !== u ? d[l.x] : l.x } this.getSegments() }, animate: function (a) { var b = this, c = b.chart, d = c.renderer, e; e = b.options.animation; var f = c.clipBox, g = c.inverted, h; if (e && !$(e)) e = Z[b.type].animation; h = "_sharedClip" + e.duration + e.easing; if (a) a = c[h], e = c[h + "m"], a || (c[h] = a = d.clipRect(s(f, { width: 0 })), c[h + "m"] = e = d.clipRect(-99, g ? -c.plotLeft : -c.plotTop, 99, g ? c.chartWidth : c.chartHeight)), b.group.clip(a), b.markerGroup.clip(e), b.sharedClipKey = h; else { if (a = c[h]) a.animate({ width: c.plotSizeX }, e), c[h + "m"].animate({ width: c.plotSizeX + 99 }, e); b.animate = null; b.animationTimeout = setTimeout(function () { b.afterAnimate() }, e.duration) } }, afterAnimate: function () { var a = this.chart, b = this.sharedClipKey, c = this.group; c && this.options.clip !== !1 && (c.clip(a.clipRect), this.markerGroup.clip()); setTimeout(function () { b && a[b] && (a[b] = a[b].destroy(), a[b + "m"] = a[b + "m"].destroy()) }, 100) }, drawPoints: function () { var a, b = this.points, c = this.chart, d, e, f, g, h, i, j, k, l = this.options.marker, m = this.pointAttr[""], n, q = this.markerGroup; if (l.enabled || this._hasPointMarkers) for (f = b.length; f--; ) if (g = b[f], d = S(g.plotX), e = g.plotY, k = g.graphic, i = g.marker || {}, a = l.enabled && i.enabled === u || i.enabled, n = c.isInsidePlot(v(d), e, c.inverted), a && e !== u && !isNaN(e) && g.y !== null) if (a = g.pointAttr[g.selected ? "select" : ""] || m, h = a.r, i = o(i.symbol, this.symbol), j = i.indexOf("url") === 0, k) k.attr({ visibility: n ? "inherit" : "hidden" }).animate(s({ x: d - h, y: e - h }, k.symbolName ? { width: 2 * h, height: 2 * h} : {})); else { if (n && (h > 0 || j)) g.graphic = c.renderer.symbol(i, d - h, e - h, 2 * h, 2 * h).attr(a).add(q) } else if (k) g.graphic = k.destroy() }, convertAttribs: function (a, b, c, d) { var e = this.pointAttrToOptions, f, g, h = {}, a = a || {}, b = b || {}, c = c || {}, d = d || {}; for (f in e) g = e[f], h[f] = o(a[g], b[f], c[f], d[f]); return h }, getAttribs: function () { var a = this, b = a.options, c = Z[a.type].marker ? b.marker : b, d = c.states, e = d.hover, f, g = a.color; f = { stroke: g, fill: g }; var h = a.points || [], i, j = [], k, l = a.pointAttrToOptions; k = a.hasPointSpecificOptions; var m = b.negativeColor, n = c.lineColor, q = c.fillColor; i = b.turboThreshold; var o; b.marker ? (e.radius = e.radius || c.radius + 2, e.lineWidth = e.lineWidth || c.lineWidth + 1) : e.color = e.color || wa(e.color || g).brighten(e.brightness).get(); j[""] = a.convertAttribs(c, f); p(["hover", "select"], function (b) { j[b] = a.convertAttribs(d[b], j[""]) }); a.pointAttr = j; g = h.length; if (!i || g < i || k) for (; g--; ) { i = h[g]; if ((c = i.options && i.options.marker || i.options) && c.enabled === !1) c.radius = 0; if (i.negative && m) i.color = i.fillColor = m; k = b.colorByPoint || i.color; if (i.options) for (o in l) r(c[l[o]]) && (k = !0); if (k) { c = c || {}; k = []; d = c.states || {}; f = d.hover = d.hover || {}; if (!b.marker) f.color = f.color || !i.options.color && e.color || wa(i.color).brighten(f.brightness || e.brightness).get(); f = { color: i.color }; if (!q) f.fillColor = i.color; if (!n) f.lineColor = i.color; k[""] = a.convertAttribs(s(f, c), j[""]); k.hover = a.convertAttribs(d.hover, j.hover, k[""]); k.select = a.convertAttribs(d.select, j.select, k[""]) } else k = j; i.pointAttr = k } }, destroy: function () { var a = this, b = a.chart, c = /AppleWebKit\/533/.test(ua), d, e, f = a.data || [], g, h, i; I(a, "destroy"); U(a); p(a.axisTypes || [], function (b) { if (i = a[b]) ia(i.series, a), i.isDirty = i.forceRedraw = !0 }); a.legendItem && a.chart.legend.destroyItem(a); for (e = f.length; e--; ) (g = f[e]) && g.destroy && g.destroy(); a.points = null; clearTimeout(a.animationTimeout); p("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","), function (b) { a[b] && (d = c && b === "group" ? "hide" : "destroy", a[b][d]()) }); if (b.hoverSeries === a) b.hoverSeries = null; ia(b.series, a); for (h in a) delete a[h] }, getSegmentPath: function (a) { var b = this, c = [], d = b.options.step; p(a, function (e, f) { var g = e.plotX, h = e.plotY, i; b.getPointSpline ? c.push.apply(c, b.getPointSpline(a, e, f)) : (c.push(f ? "L" : "M"), d && f && (i = a[f - 1], d === "right" ? c.push(i.plotX, h) : d === "center" ? c.push((i.plotX + g) / 2, i.plotY, (i.plotX + g) / 2, h) : c.push(g, i.plotY)), c.push(e.plotX, e.plotY)) }); return c }, getGraphPath: function () { var a = this, b = [], c, d = []; p(a.segments, function (e) { c = a.getSegmentPath(e); e.length > 1 ? b = b.concat(c) : d.push(e[0]) }); a.singlePoints = d; return a.graphPath = b }, drawGraph: function () { var a = this, b = this.options, c = [["graph", b.lineColor || this.color]], d = b.lineWidth, e = b.dashStyle, f = b.linecap !== "square", g = this.getGraphPath(), h = b.negativeColor; h && c.push(["graphNeg", h]); p(c, function (c, h) { var k = c[0], l = a[k]; if (l) ab(l), l.animate({ d: g }); else if (d && g.length) l = { stroke: c[1], "stroke-width": d, fill: O, zIndex: 1 }, e ? l.dashstyle = e : f && (l["stroke-linecap"] = l["stroke-linejoin"] = "round"), a[k] = a.chart.renderer.path(g).attr(l).add(a.group).shadow(!h && b.shadow) }) }, clipNeg: function () { var a = this.options, b = this.chart, c = b.renderer, d = a.negativeColor || a.negativeFillColor, e, f = this.graph, g = this.area, h = this.posClip, i = this.negClip; e = b.chartWidth; var j = b.chartHeight, k = t(e, j), l = this.yAxis; if (d && (f || g)) { d = v(l.toPixels(a.threshold || 0, !0)); d < 0 && (k -= d); a = { x: 0, y: 0, width: k, height: d }; k = { x: 0, y: d, width: k, height: k }; if (b.inverted) a.height = k.y = b.plotWidth - d, c.isVML && (a = { x: b.plotWidth - d - b.plotLeft, y: 0, width: e, height: j }, k = { x: d + b.plotLeft - e, y: 0, width: b.plotLeft + d, height: e }); l.reversed ? (b = k, e = a) : (b = a, e = k); h ? (h.animate(b), i.animate(e)) : (this.posClip = h = c.clipRect(b), this.negClip = i = c.clipRect(e), f && this.graphNeg && (f.clip(h), this.graphNeg.clip(i)), g && (g.clip(h), this.areaNeg.clip(i))) } }, invertGroups: function () { function a() { var a = { width: b.yAxis.len, height: b.xAxis.len }; p(["group", "markerGroup"], function (c) { b[c] && b[c].attr(a).invert() }) } var b = this, c = b.chart; if (b.xAxis) C(c, "resize", a), C(b, "destroy", function () { U(c, "resize", a) }), a(), b.invertGroups = a }, plotGroup: function (a, b, c, d, e) { var f = this[a], g = !f; g && (this[a] = f = this.chart.renderer.g(b).attr({ visibility: c, zIndex: d || 0.1 }).add(e)); f[g ? "attr" : "animate"](this.getPlotBox()); return f }, getPlotBox: function () { return { translateX: this.xAxis ? this.xAxis.left : this.chart.plotLeft, translateY: this.yAxis ? this.yAxis.top : this.chart.plotTop, scaleX: 1, scaleY: 1} }, render: function () { var a = this.chart, b, c = this.options, d = c.animation && !!this.animate && a.renderer.isSVG, e = this.visible ? "visible" : "hidden", f = c.zIndex, g = this.hasRendered, h = a.seriesGroup; b = this.plotGroup("group", "series", e, f, h); this.markerGroup = this.plotGroup("markerGroup", "markers", e, f, h); d && this.animate(!0); this.getAttribs(); b.inverted = this.isCartesian ? a.inverted : !1; this.drawGraph && (this.drawGraph(), this.clipNeg()); this.drawDataLabels && this.drawDataLabels(); this.visible && this.drawPoints(); this.drawTracker && this.options.enableMouseTracking !== !1 && this.drawTracker(); a.inverted && this.invertGroups(); c.clip !== !1 && !this.sharedClipKey && !g && b.clip(a.clipRect); d ? this.animate() : g || this.afterAnimate(); this.isDirty = this.isDirtyData = !1; this.hasRendered = !0 }, redraw: function () { var a = this.chart, b = this.isDirtyData, c = this.group, d = this.xAxis, e = this.yAxis; c && (a.inverted && c.attr({ width: a.plotWidth, height: a.plotHeight }), c.animate({ translateX: o(d && d.left, a.plotLeft), translateY: o(e && e.top, a.plotTop) })); this.translate(); this.setTooltipPoints(!0); this.render(); b && I(this, "updatedData") } }; Hb.prototype = { destroy: function () { Oa(this, this.axis) }, render: function (a) { var b = this.options, c = b.format, c = c ? Ia(c, this) : b.formatter.call(this); this.label ? this.label.attr({ text: c, visibility: "hidden" }) : this.label = this.axis.chart.renderer.text(c, 0, 0, b.useHTML).css(b.style).attr({ align: this.textAlign, rotation: b.rotation, visibility: "hidden" }).add(a) }, setOffset: function (a, b) { var c = this.axis, d = c.chart, e = d.inverted, f = this.isNegative, g = c.translate(this.percent ? 100 : this.total, 0, 0, 0, 1), c = c.translate(0), c = N(g - c), h = d.xAxis[0].translate(this.x) + a, i = d.plotHeight, f = { x: e ? f ? g : g - c : h, y: e ? i - h - b : f ? i - g - c : i - g, width: e ? c : b, height: e ? b : c }; if (e = this.label) e.align(this.alignOptions, null, f), f = e.alignAttr, e[this.options.crop === !1 || d.isInsidePlot(f.x, f.y) ? "show" : "hide"](!0) } }; ka.prototype.buildStacks = function () { var a = this.series, b = o(this.options.reversedStacks, !0), c = a.length; if (!this.isXAxis) { for (this.usePercentage = !1; c--; ) a[b ? c : a.length - c - 1].setStackedPoints(); if (this.usePercentage) for (c = 0; c < a.length; c++) a[c].setPercentStacks() } }; ka.prototype.renderStackTotals = function () { var a = this.chart, b = a.renderer, c = this.stacks, d, e, f = this.stackTotalGroup; if (!f) this.stackTotalGroup = f = b.g("stack-labels").attr({ visibility: "visible", zIndex: 6 }).add(); f.translate(a.plotLeft, a.plotTop); for (d in c) for (e in a = c[d], a) a[e].render(f) }; M.prototype.setStackedPoints = function () { if (this.options.stacking && !(this.visible !== !0 && this.chart.options.chart.ignoreHiddenSeries !== !1)) { var a = this.processedXData, b = this.processedYData, c = [], d = b.length, e = this.options, f = e.threshold, g = e.stack, e = e.stacking, h = this.stackKey, i = "-" + h, j = this.negStacks, k = this.yAxis, l = k.stacks, m = k.oldStacks, n, q, o, p, r; for (o = 0; o < d; o++) { p = a[o]; r = b[o]; q = (n = j && r < f) ? i : h; l[q] || (l[q] = {}); if (!l[q][p]) m[q] && m[q][p] ? (l[q][p] = m[q][p], l[q][p].total = null) : l[q][p] = new Hb(k, k.options.stackLabels, n, p, g, e); q = l[q][p]; q.points[this.index] = [q.cum || 0]; e === "percent" ? (n = n ? h : i, j && l[n] && l[n][p] ? (n = l[n][p], q.total = n.total = t(n.total, q.total) + N(r) || 0) : q.total = aa(q.total + (N(r) || 0))) : q.total = aa(q.total + (r || 0)); q.cum = (q.cum || 0) + (r || 0); q.points[this.index].push(q.cum); c[o] = q.cum } if (e === "percent") k.usePercentage = !0; this.stackedYData = c; k.oldStacks = {} } }; M.prototype.setPercentStacks = function () { var a = this, b = a.stackKey, c = a.yAxis.stacks, d = a.processedXData; p([b, "-" + b], function (b) { var e; for (var f = d.length, g, h; f--; ) if (g = d[f], e = (h = c[b] && c[b][g]) && h.points[a.index], g = e) h = h.total ? 100 / h.total : 0, g[0] = aa(g[0] * h), g[1] = aa(g[1] * h), a.stackedYData[f] = g[1] }) }; s(Ya.prototype, { addSeries: function (a, b, c) { var d, e = this; a && (b = o(b, !0), I(e, "addSeries", { options: a }, function () { d = e.initSeries(a); e.isDirtyLegend = !0; e.linkSeries(); b && e.redraw(c) })); return d }, addAxis: function (a, b, c, d) { var e = b ? "xAxis" : "yAxis", f = this.options; new ka(this, w(a, { index: this[e].length, isX: b })); f[e] = na(f[e] || {}); f[e].push(a); o(c, !0) && this.redraw(d) }, showLoading: function (a) { var b = this.options, c = this.loadingDiv, d = b.loading; if (!c) this.loadingDiv = c = V(Ja, { className: "highcharts-loading" }, s(d.style, { zIndex: 10, display: O }), this.container), this.loadingSpan = V("span", null, d.labelStyle, c); this.loadingSpan.innerHTML = a || b.lang.loading; if (!this.loadingShown) D(c, { opacity: 0, display: "", left: this.plotLeft + "px", top: this.plotTop + "px", width: this.plotWidth + "px", height: this.plotHeight + "px" }), jb(c, { opacity: d.style.opacity }, { duration: d.showDuration || 0 }), this.loadingShown = !0 }, hideLoading: function () { var a = this.options, b = this.loadingDiv; b && jb(b, { opacity: 0 }, { duration: a.loading.hideDuration || 100, complete: function () { D(b, { display: O }) } }); this.loadingShown = !1 } }); s(Fa.prototype, { update: function (a, b, c) { var d = this, e = d.series, f = d.graphic, g, h = e.data, i = e.chart, j = e.options, b = o(b, !0); d.firePointEvent("update", { options: a }, function () { d.applyOptions(a); if ($(a)) { e.getAttribs(); if (f) a && a.marker && a.marker.symbol ? d.graphic = f.destroy() : f.attr(d.pointAttr[d.state || ""]); if (a && a.dataLabels && d.dataLabel) d.dataLabel = d.dataLabel.destroy() } g = va(d, h); e.updateParallelArrays(d, g); j.data[g] = d.options; e.isDirty = e.isDirtyData = !0; if (!e.fixedBox && e.hasCartesianSeries) i.isDirtyBox = !0; j.legendType === "point" && i.legend.destroyItem(d); b && i.redraw(c) }) }, remove: function (a, b) { var c = this, d = c.series, e = d.points, f = d.chart, g, h = d.data; Qa(b, f); a = o(a, !0); c.firePointEvent("remove", null, function () { g = va(c, h); h.length === e.length && e.splice(g, 1); h.splice(g, 1); d.options.data.splice(g, 1); d.updateParallelArrays(c, "splice", g, 1); c.destroy(); d.isDirty = !0; d.isDirtyData = !0; a && f.redraw() }) } }); s(M.prototype, { addPoint: function (a, b, c, d) { var e = this.options, f = this.data, g = this.graph, h = this.area, i = this.chart, j = this.xAxis && this.xAxis.names, k = g && g.shift || 0, l = e.data, m, n = this.xData; Qa(d, i); c && p([g, h, this.graphNeg, this.areaNeg], function (a) { if (a) a.shift = k + 1 }); if (h) h.isArea = !0; b = o(b, !0); d = { series: this }; this.pointClass.prototype.applyOptions.apply(d, [a]); g = d.x; h = n.length; if (this.requireSorting && g < n[h - 1]) for (m = !0; h && n[h - 1] > g; ) h--; this.updateParallelArrays(d, "splice", h, 0, 0); this.updateParallelArrays(d, h); if (j) j[g] = d.name; l.splice(h, 0, a); m && (this.data.splice(h, 0, null), this.processData()); e.legendType === "point" && this.generatePoints(); c && (f[0] && f[0].remove ? f[0].remove(!1) : (f.shift(), this.updateParallelArrays(d, "shift"), l.shift())); this.isDirtyData = this.isDirty = !0; b && (this.getAttribs(), i.redraw()) }, remove: function (a, b) { var c = this, d = c.chart, a = o(a, !0); if (!c.isRemoving) c.isRemoving = !0, I(c, "remove", null, function () { c.destroy(); d.isDirtyLegend = d.isDirtyBox = !0; d.linkSeries(); a && d.redraw(b) }); c.isRemoving = !1 }, update: function (a, b) { var c = this.chart, d = this.type, e = J[d].prototype, f, a = w(this.userOptions, { animation: !1, index: this.index, pointStart: this.xData[0] }, { data: this.options.data }, a); this.remove(!1); for (f in e) e.hasOwnProperty(f) && (this[f] = u); s(this, J[a.type || d].prototype); this.init(c, a); o(b, !0) && c.redraw(!1) } }); s(ka.prototype, { update: function (a, b) { var c = this.chart, a = c.options[this.coll][this.options.index] = w(this.userOptions, a); this.destroy(!0); this._addedPlotLB = this.userMin = this.userMax = u; this.init(c, s(a, { events: u })); c.isDirtyBox = !0; o(b, !0) && c.redraw() }, remove: function (a) { for (var b = this.chart, c = this.coll, d = this.series, e = d.length; e--; ) d[e] && d[e].remove(!1); ia(b.axes, this); ia(b[c], this); b.options[c].splice(this.options.index, 1); p(b[c], function (a, b) { a.options.index = b }); this.destroy(); b.isDirtyBox = !0; o(a, !0) && b.redraw() }, setTitle: function (a, b) { this.update({ title: a }, b) }, setCategories: function (a, b) { this.update({ categories: a }, b) } }); ea = ja(M); J.line = ea; Z.area = w(R, { threshold: 0 }); var ma = ja(M, { type: "area", getSegments: function () { var a = [], b = [], c = [], d = this.xAxis, e = this.yAxis, f = e.stacks[this.stackKey], g = {}, h, i, j = this.points, k = this.options.connectNulls, l, m, n; if (this.options.stacking && !this.cropped) { for (m = 0; m < j.length; m++) g[j[m].x] = j[m]; for (n in f) f[n].total !== null && c.push(+n); c.sort(function (a, b) { return a - b }); p(c, function (a) { if (!k || g[a] && g[a].y !== null) g[a] ? b.push(g[a]) : (h = d.translate(a), l = f[a].percent ? f[a].total ? f[a].cum * 100 / f[a].total : 0 : f[a].cum, i = e.toPixels(l, !0), b.push({ y: null, plotX: h, clientX: h, plotY: i, yBottom: i, onMouseOver: Ea })) }); b.length && a.push(b) } else M.prototype.getSegments.call(this), a = this.segments; this.segments = a }, getSegmentPath: function (a) { var b = M.prototype.getSegmentPath.call(this, a), c = [].concat(b), d, e = this.options; d = b.length; var f = this.yAxis.getThreshold(e.threshold), g; d === 3 && c.push("L", b[1], b[2]); if (e.stacking && !this.closedStacks) for (d = a.length - 1; d >= 0; d--) g = o(a[d].yBottom, f), d < a.length - 1 && e.step && c.push(a[d + 1].plotX, g), c.push(a[d].plotX, g); else this.closeSegment(c, a, f); this.areaPath = this.areaPath.concat(c); return b }, closeSegment: function (a, b, c) { a.push("L", b[b.length - 1].plotX, c, "L", b[0].plotX, c) }, drawGraph: function () { this.areaPath = []; M.prototype.drawGraph.apply(this); var a = this, b = this.areaPath, c = this.options, d = c.negativeColor, e = c.negativeFillColor, f = [["area", this.color, c.fillColor]]; (d || e) && f.push(["areaNeg", d, e]); p(f, function (d) { var e = d[0], f = a[e]; f ? f.animate({ d: b }) : a[e] = a.chart.renderer.path(b).attr({ fill: o(d[2], wa(d[1]).setOpacity(o(c.fillOpacity, 0.75)).get()), zIndex: 0 }).add(a.group) }) }, drawLegendSymbol: F.drawRectangle }); J.area = ma; Z.spline = w(R); ea = ja(M, { type: "spline", getPointSpline: function (a, b, c) { var d = b.plotX, e = b.plotY, f = a[c - 1], g = a[c + 1], h, i, j, k; if (f && g) { a = f.plotY; j = g.plotX; var g = g.plotY, l; h = (1.5 * d + f.plotX) / 2.5; i = (1.5 * e + a) / 2.5; j = (1.5 * d + j) / 2.5; k = (1.5 * e + g) / 2.5; l = (k - i) * (j - d) / (j - h) + e - k; i += l; k += l; i > a && i > e ? (i = t(a, e), k = 2 * e - i) : i < a && i < e && (i = E(a, e), k = 2 * e - i); k > g && k > e ? (k = t(g, e), i = 2 * e - k) : k < g && k < e && (k = E(g, e), i = 2 * e - k); b.rightContX = j; b.rightContY = k } c ? (b = ["C", f.rightContX || f.plotX, f.rightContY || f.plotY, h || d, i || e, d, e], f.rightContX = f.rightContY = null) : b = ["M", d, e]; return b } }); J.spline = ea; Z.areaspline = w(Z.area); ma = ma.prototype; ea = ja(ea, { type: "areaspline", closedStacks: !0, getSegmentPath: ma.getSegmentPath, closeSegment: ma.closeSegment, drawGraph: ma.drawGraph, drawLegendSymbol: F.drawRectangle }); J.areaspline = ea; Z.column = w(R, { borderColor: "#FFFFFF", borderWidth: 1, borderRadius: 0, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: { hover: { brightness: 0.1, shadow: !1 }, select: { color: "#C0C0C0", borderColor: "#000000", shadow: !1} }, dataLabels: { align: null, verticalAlign: null, y: null }, stickyTracking: !1, threshold: 0 }); ea = ja(M, { type: "column", pointAttrToOptions: { stroke: "borderColor", "stroke-width": "borderWidth", fill: "color", r: "borderRadius" }, cropShoulder: 0, trackerGroups: ["group", "dataLabelsGroup"], negStacks: !0, init: function () { M.prototype.init.apply(this, arguments); var a = this, b = a.chart; b.hasRendered && p(b.series, function (b) { if (b.type === a.type) b.isDirty = !0 }) }, getColumnMetrics: function () { var a = this, b = a.options, c = a.xAxis, d = a.yAxis, e = c.reversed, f, g = {}, h, i = 0; b.grouping === !1 ? i = 1 : p(a.chart.series, function (b) { var c = b.options, e = b.yAxis; if (b.type === a.type && b.visible && d.len === e.len && d.pos === e.pos) c.stacking ? (f = b.stackKey, g[f] === u && (g[f] = i++), h = g[f]) : c.grouping !== !1 && (h = i++), b.columnIndex = h }); var c = E(N(c.transA) * (c.ordinalSlope || b.pointRange || c.closestPointRange || c.tickInterval || 1), c.len), j = c * b.groupPadding, k = (c - 2 * j) / i, l = b.pointWidth, b = r(l) ? (k - l) / 2 : k * b.pointPadding, l = o(l, k - 2 * b); return a.columnMetrics = { width: l, offset: b + (j + ((e ? i - (a.columnIndex || 0) : a.columnIndex) || 0) * k - c / 2) * (e ? -1 : 1)} }, translate: function () { var a = this.chart, b = this.options, c = b.borderWidth, d = this.yAxis, e = this.translatedThreshold = d.getThreshold(b.threshold), f = o(b.minPointLength, 5), b = this.getColumnMetrics(), g = b.width, h = this.barW = Ka(t(g, 1 + 2 * c)), i = this.pointXOffset = b.offset, j = -(c % 2 ? 0.5 : 0), k = c % 2 ? 0.5 : 1; a.renderer.isVML && a.inverted && (k += 1); M.prototype.translate.apply(this); p(this.points, function (a) { var b = o(a.yBottom, e), c = E(t(-999 - b, a.plotY), d.len + 999 + b), q = a.plotX + i, p = h, r = E(c, b), s, c = t(c, b) - r; N(c) < f && f && (c = f, r = v(N(r - e) > f ? b - f : e - (d.translate(a.y, 0, 1, 0, 1) <= e ? f : 0))); a.barX = q; a.pointWidth = g; b = N(q) < 0.5; p = v(q + p) + j; q = v(q) + j; p -= q; s = N(r) < 0.5; c = v(r + c) + k; r = v(r) + k; c -= r; b && (q += 1, p -= 1); s && (r -= 1, c += 1); a.shapeType = "rect"; a.shapeArgs = { x: q, y: r, width: p, height: c} }) }, getSymbol: Ea, drawLegendSymbol: F.drawRectangle, drawGraph: Ea, drawPoints: function () { var a = this, b = a.options, c = this.chart.renderer, d = b.animationLimit || 250, e; p(a.points, function (f) { var g = f.plotY, h = f.graphic; if (g !== u && !isNaN(g) && f.y !== null) e = f.shapeArgs, h ? (ab(h), h[a.points.length < d ? "animate" : "attr"](w(e))) : f.graphic = c[f.shapeType](e).attr(f.pointAttr[f.selected ? "select" : ""]).add(a.group).shadow(b.shadow, null, b.stacking && !b.borderRadius); else if (h) f.graphic = h.destroy() }) }, animate: function (a) { var b = this.yAxis, c = this.options, d = this.chart.inverted, e = {}; if (X) a ? (e.scaleY = 0.001, a = E(b.pos + b.len, t(b.pos, b.toPixels(c.threshold))), d ? e.translateX = a - b.len : e.translateY = a, this.group.attr(e)) : (e.scaleY = 1, e[d ? "translateX" : "translateY"] = b.pos, this.group.animate(e, this.options.animation), this.animate = null) }, remove: function () { var a = this, b = a.chart; b.hasRendered && p(b.series, function (b) { if (b.type === a.type) b.isDirty = !0 }); M.prototype.remove.apply(a, arguments) } }); J.column = ea; Z.bar = w(Z.column); ma = ja(ea, { type: "bar", inverted: !0 }); J.bar = ma; Z.scatter = w(R, { lineWidth: 0, tooltip: { headerFormat: '<span style="font-size: 10px; color:{series.color}">{series.name}</span><br/>', pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>", followPointer: !0 }, stickyTracking: !1 }); ma = ja(M, { type: "scatter", sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["markerGroup"], takeOrdinalPosition: !1, singularTooltips: !0, drawGraph: function () { this.options.lineWidth && M.prototype.drawGraph.call(this) } }); J.scatter = ma; Z.pie = w(R, { borderColor: "#FFFFFF", borderWidth: 1, center: [null, null], clip: !1, colorByPoint: !0, dataLabels: { distance: 30, enabled: !0, formatter: function () { return this.point.name } }, ignoreHiddenPoint: !0, legendType: "point", marker: null, size: null, showInLegend: !1, slicedOffset: 10, states: { hover: { brightness: 0.1, shadow: !1} }, stickyTracking: !1, tooltip: { followPointer: !0} }); R = { type: "pie", isCartesian: !1, pointClass: ja(Fa, { init: function () { Fa.prototype.init.apply(this, arguments); var a = this, b; if (a.y < 0) a.y = null; s(a, { visible: a.visible !== !1, name: o(a.name, "Slice") }); b = function (b) { a.slice(b.type === "select") }; C(a, "select", b); C(a, "unselect", b); return a }, setVisible: function (a) { var b = this, c = b.series, d = c.chart; b.visible = b.options.visible = a = a === u ? !b.visible : a; c.options.data[va(b, c.data)] = b.options; p(["graphic", "dataLabel", "connector", "shadowGroup"], function (c) { if (b[c]) b[c][a ? "show" : "hide"](!0) }); b.legendItem && d.legend.colorizeItem(b, a); if (!c.isDirty && c.options.ignoreHiddenPoint) c.isDirty = !0, d.redraw() }, slice: function (a, b, c) { var d = this.series; Qa(c, d.chart); o(b, !0); this.sliced = this.options.sliced = a = r(a) ? a : !this.sliced; d.options.data[va(this, d.data)] = this.options; a = a ? this.slicedTranslation : { translateX: 0, translateY: 0 }; this.graphic.animate(a); this.shadowGroup && this.shadowGroup.animate(a) } }), requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "dataLabelsGroup"], axisTypes: [], pointAttrToOptions: { stroke: "borderColor", "stroke-width": "borderWidth", fill: "color" }, singularTooltips: !0, getColor: Ea, animate: function (a) { var b = this, c = b.points, d = b.startAngleRad; if (!a) p(c, function (a) { var c = a.graphic, a = a.shapeArgs; c && (c.attr({ r: b.center[3] / 2, start: d, end: d }), c.animate({ r: a.r, start: a.start, end: a.end }, b.options.animation)) }), b.animate = null }, setData: function (a, b, c, d) { M.prototype.setData.call(this, a, !1, c, d); this.processData(); this.generatePoints(); o(b, !0) && this.chart.redraw(c) }, generatePoints: function () { var a, b = 0, c, d, e, f = this.options.ignoreHiddenPoint; M.prototype.generatePoints.call(this); c = this.points; d = c.length; for (a = 0; a < d; a++) e = c[a], b += f && !e.visible ? 0 : e.y; this.total = b; for (a = 0; a < d; a++) e = c[a], e.percentage = b > 0 ? e.y / b * 100 : 0, e.total = b }, translate: function (a) { this.generatePoints(); var b = 0, c = this.options, d = c.slicedOffset, e = d + c.borderWidth, f, g, h, i = c.startAngle || 0, j = this.startAngleRad = la / 180 * (i - 90), i = (this.endAngleRad = la / 180 * (o(c.endAngle, i + 360) - 90)) - j, k = this.points, l = c.dataLabels.distance, c = c.ignoreHiddenPoint, m, n = k.length, p; if (!a) this.center = a = this.getCenter(); this.getX = function (b, c) { h = T.asin(E((b - a[1]) / (a[2] / 2 + l), 1)); return a[0] + (c ? -1 : 1) * W(h) * (a[2] / 2 + l) }; for (m = 0; m < n; m++) { p = k[m]; f = j + b * i; if (!c || p.visible) b += p.percentage / 100; g = j + b * i; p.shapeType = "arc"; p.shapeArgs = { x: a[0], y: a[1], r: a[2] / 2, innerR: a[3] / 2, start: v(f * 1E3) / 1E3, end: v(g * 1E3) / 1E3 }; h = (g + f) / 2; h > 1.5 * la ? h -= 2 * la : h < -la / 2 && (h += 2 * la); p.slicedTranslation = { translateX: v(W(h) * d), translateY: v(ba(h) * d) }; f = W(h) * a[2] / 2; g = ba(h) * a[2] / 2; p.tooltipPos = [a[0] + f * 0.7, a[1] + g * 0.7]; p.half = h < -la / 2 || h > la / 2 ? 1 : 0; p.angle = h; e = E(e, l / 2); p.labelPos = [a[0] + f + W(h) * l, a[1] + g + ba(h) * l, a[0] + f + W(h) * e, a[1] + g + ba(h) * e, a[0] + f, a[1] + g, l < 0 ? "center" : p.half ? "right" : "left", h] } }, drawGraph: null, drawPoints: function () { var a = this, b = a.chart.renderer, c, d, e = a.options.shadow, f, g; if (e && !a.shadowGroup) a.shadowGroup = b.g("shadow").add(a.group); p(a.points, function (h) { d = h.graphic; g = h.shapeArgs; f = h.shadowGroup; if (e && !f) f = h.shadowGroup = b.g("shadow").add(a.shadowGroup); c = h.sliced ? h.slicedTranslation : { translateX: 0, translateY: 0 }; f && f.attr(c); d ? d.animate(s(g, c)) : h.graphic = d = b[h.shapeType](g).setRadialReference(a.center).attr(h.pointAttr[h.selected ? "select" : ""]).attr({ "stroke-linejoin": "round" }).attr(c).add(a.group).shadow(e, f); h.visible !== void 0 && h.setVisible(h.visible) }) }, sortByAngle: function (a, b) { a.sort(function (a, d) { return a.angle !== void 0 && (d.angle - a.angle) * b }) }, drawLegendSymbol: F.drawRectangle, getCenter: da.getCenter, getSymbol: Ea }; R = ja(M, R); J.pie = R; M.prototype.drawDataLabels = function () { var a = this, b = a.options, c = b.cursor, d = b.dataLabels, b = a.points, e, f, g, h; if (d.enabled || a._hasPointLabels) a.dlProcessOptions && a.dlProcessOptions(d), h = a.plotGroup("dataLabelsGroup", "data-labels", a.visible ? "visible" : "hidden", d.zIndex || 6), f = d, p(b, function (b) { var j, k = b.dataLabel, l, m, n = b.connector, p = !0; e = b.options && b.options.dataLabels; j = o(e && e.enabled, f.enabled); if (k && !j) b.dataLabel = k.destroy(); else if (j) { d = w(f, e); j = d.rotation; l = b.getLabelConfig(); g = d.format ? Ia(d.format, l) : d.formatter.call(l, d); d.style.color = o(d.color, d.style.color, a.color, "black"); if (k) if (r(g)) k.attr({ text: g }), p = !1; else { if (b.dataLabel = k = k.destroy(), n) b.connector = n.destroy() } else if (r(g)) { k = { fill: d.backgroundColor, stroke: d.borderColor, "stroke-width": d.borderWidth, r: d.borderRadius || 0, rotation: j, padding: d.padding, zIndex: 1 }; for (m in k) k[m] === u && delete k[m]; k = b.dataLabel = a.chart.renderer[j ? "text" : "label"](g, 0, -999, null, null, null, d.useHTML).attr(k).css(s(d.style, c && { cursor: c })).add(h).shadow(d.shadow) } k && a.alignDataLabel(b, k, d, null, p) } }) }; M.prototype.alignDataLabel = function (a, b, c, d, e) { var f = this.chart, g = f.inverted, h = o(a.plotX, -999), i = o(a.plotY, -999), j = b.getBBox(); if (a = this.visible && (a.series.forceDL || f.isInsidePlot(h, v(i), g) || d && f.isInsidePlot(h, g ? d.x + 1 : d.y + d.height - 1, g))) d = s({ x: g ? f.plotWidth - i : h, y: v(g ? f.plotHeight - h : i), width: 0, height: 0 }, d), s(c, { width: j.width, height: j.height }), c.rotation ? (g = { align: c.align, x: d.x + c.x + d.width / 2, y: d.y + c.y + d.height / 2 }, b[e ? "attr" : "animate"](g)) : (b.align(c, null, d), g = b.alignAttr, o(c.overflow, "justify") === "justify" ? this.justifyDataLabel(b, c, g, j, d, e) : o(c.crop, !0) && (a = f.isInsidePlot(g.x, g.y) && f.isInsidePlot(g.x + j.width, g.y + j.height))); if (!a) b.attr({ y: -999 }), b.placed = !1 }; M.prototype.justifyDataLabel = function (a, b, c, d, e, f) { var g = this.chart, h = b.align, i = b.verticalAlign, j, k; j = c.x; if (j < 0) h === "right" ? b.align = "left" : b.x = -j, k = !0; j = c.x + d.width; if (j > g.plotWidth) h === "left" ? b.align = "right" : b.x = g.plotWidth - j, k = !0; j = c.y; if (j < 0) i === "bottom" ? b.verticalAlign = "top" : b.y = -j, k = !0; j = c.y + d.height; if (j > g.plotHeight) i === "top" ? b.verticalAlign = "bottom" : b.y = g.plotHeight - j, k = !0; if (k) a.placed = !f, a.align(b, null, e) }; if (J.pie) J.pie.prototype.drawDataLabels = function () { var a = this, b = a.data, c, d = a.chart, e = a.options.dataLabels, f = o(e.connectorPadding, 10), g = o(e.connectorWidth, 1), h = d.plotWidth, d = d.plotHeight, i, j, k = o(e.softConnector, !0), l = e.distance, m = a.center, n = m[2] / 2, q = m[1], r = l > 0, s, u, w, x, y = [[], []], z, B, E, H, A, D = [0, 0, 0, 0], J = function (a, b) { return b.y - a.y }; if (a.visible && (e.enabled || a._hasPointLabels)) { M.prototype.drawDataLabels.apply(a); p(b, function (a) { a.dataLabel && a.visible && y[a.half].push(a) }); for (H = 0; !x && b[H]; ) x = b[H] && b[H].dataLabel && (b[H].dataLabel.getBBox().height || 21), H++; for (H = 2; H--; ) { var b = [], I = [], F = y[H], G = F.length, C; a.sortByAngle(F, H - 0.5); if (l > 0) { for (A = q - n - l; A <= q + n + l; A += x) b.push(A); u = b.length; if (G > u) { c = [].concat(F); c.sort(J); for (A = G; A--; ) c[A].rank = A; for (A = G; A--; ) F[A].rank >= u && F.splice(A, 1); G = F.length } for (A = 0; A < G; A++) { c = F[A]; w = c.labelPos; c = 9999; var O, L; for (L = 0; L < u; L++) O = N(b[L] - w[1]), O < c && (c = O, C = L); if (C < A && b[A] !== null) C = A; else for (u < G - A + C && b[A] !== null && (C = u - G + A); b[C] === null; ) C++; I.push({ i: C, y: b[C] }); b[C] = null } I.sort(J) } for (A = 0; A < G; A++) { c = F[A]; w = c.labelPos; s = c.dataLabel; E = c.visible === !1 ? "hidden" : "visible"; c = w[1]; if (l > 0) { if (u = I.pop(), C = u.i, B = u.y, c > B && b[C + 1] !== null || c < B && b[C - 1] !== null) B = c } else B = c; z = e.justify ? m[0] + (H ? -1 : 1) * (n + l) : a.getX(C === 0 || C === b.length - 1 ? c : B, H); s._attr = { visibility: E, align: w[6] }; s._pos = { x: z + e.x + ({ left: f, right: -f}[w[6]] || 0), y: B + e.y - 10 }; s.connX = z; s.connY = B; if (this.options.size === null) u = s.width, z - u < f ? D[3] = t(v(u - z + f), D[3]) : z + u > h - f && (D[1] = t(v(z + u - h + f), D[1])), B - x / 2 < 0 ? D[0] = t(v(-B + x / 2), D[0]) : B + x / 2 > d && (D[2] = t(v(B + x / 2 - d), D[2])) } } if (Ba(D) === 0 || this.verifyDataLabelOverflow(D)) this.placeDataLabels(), r && g && p(this.points, function (b) { i = b.connector; w = b.labelPos; if ((s = b.dataLabel) && s._pos) E = s._attr.visibility, z = s.connX, B = s.connY, j = k ? ["M", z + (w[6] === "left" ? 5 : -5), B, "C", z, B, 2 * w[2] - w[4], 2 * w[3] - w[5], w[2], w[3], "L", w[4], w[5]] : ["M", z + (w[6] === "left" ? 5 : -5), B, "L", w[2], w[3], "L", w[4], w[5]], i ? (i.animate({ d: j }), i.attr("visibility", E)) : b.connector = i = a.chart.renderer.path(j).attr({ "stroke-width": g, stroke: e.connectorColor || b.color || "#606060", visibility: E }).add(a.group); else if (i) b.connector = i.destroy() }) } }, J.pie.prototype.placeDataLabels = function () { p(this.points, function (a) { var a = a.dataLabel, b; if (a) (b = a._pos) ? (a.attr(a._attr), a[a.moved ? "animate" : "attr"](b), a.moved = !0) : a && a.attr({ y: -999 }) }) }, J.pie.prototype.alignDataLabel = Ea, J.pie.prototype.verifyDataLabelOverflow = function (a) { var b = this.center, c = this.options, d = c.center, e = c = c.minSize || 80, f; d[0] !== null ? e = t(b[2] - t(a[1], a[3]), c) : (e = t(b[2] - a[1] - a[3], c), b[0] += (a[3] - a[1]) / 2); d[1] !== null ? e = t(E(e, b[2] - t(a[0], a[2])), c) : (e = t(E(e, b[2] - a[0] - a[2]), c), b[1] += (a[0] - a[2]) / 2); e < b[2] ? (b[2] = e, this.translate(b), p(this.points, function (a) { if (a.dataLabel) a.dataLabel._pos = null }), this.drawDataLabels && this.drawDataLabels()) : f = !0; return f }; if (J.column) J.column.prototype.alignDataLabel = function (a, b, c, d, e) { var f = this.chart, g = f.inverted, h = a.dlBox || a.shapeArgs, i = a.below || a.plotY > o(this.translatedThreshold, f.plotSizeY), j = o(c.inside, !!this.options.stacking); if (h && (d = w(h), g && (d = { x: f.plotWidth - d.y - d.height, y: f.plotHeight - d.x - d.width, width: d.height, height: d.width }), !j)) g ? (d.x += i ? 0 : d.width, d.width = 0) : (d.y += i ? d.height : 0, d.height = 0); c.align = o(c.align, !g || j ? "center" : i ? "right" : "left"); c.verticalAlign = o(c.verticalAlign, g || j ? "middle" : i ? "top" : "bottom"); M.prototype.alignDataLabel.call(this, a, b, c, d, e) }; R = Q.TrackerMixin = { drawTrackerPoint: function () { var a = this, b = a.chart, c = b.pointer, d = a.options.cursor, e = d && { cursor: d }, f = function (c) { var d = c.target, e; if (b.hoverSeries !== a) a.onMouseOver(); for (; d && !e; ) e = d.point, d = d.parentNode; if (e !== u && e !== b.hoverPoint) e.onMouseOver(c) }; p(a.points, function (a) { if (a.graphic) a.graphic.element.point = a; if (a.dataLabel) a.dataLabel.element.point = a }); if (!a._hasTracking) p(a.trackerGroups, function (b) { if (a[b] && (a[b].addClass("highcharts-tracker").on("mouseover", f).on("mouseout", function (a) { c.onTrackerMouseOut(a) }).css(e), $a)) a[b].on("touchstart", f) }), a._hasTracking = !0 }, drawTrackerGraph: function () { var a = this, b = a.options, c = b.trackByArea, d = [].concat(c ? a.areaPath : a.graphPath), e = d.length, f = a.chart, g = f.pointer, h = f.renderer, i = f.options.tooltip.snap, j = a.tracker, k = b.cursor, l = k && { cursor: k }, k = a.singlePoints, m, n = function () { if (f.hoverSeries !== a) a.onMouseOver() }, o = "rgba(192,192,192," + (X ? 1.0E-4 : 0.002) + ")"; if (e && !c) for (m = e + 1; m--; ) d[m] === "M" && d.splice(m + 1, 0, d[m + 1] - i, d[m + 2], "L"), (m && d[m] === "M" || m === e) && d.splice(m, 0, "L", d[m - 2] + i, d[m - 1]); for (m = 0; m < k.length; m++) e = k[m], d.push("M", e.plotX - i, e.plotY, "L", e.plotX + i, e.plotY); j ? j.attr({ d: d }) : (a.tracker = h.path(d).attr({ "stroke-linejoin": "round", visibility: a.visible ? "visible" : "hidden", stroke: o, fill: c ? o : O, "stroke-width": b.lineWidth + (c ? 0 : 2 * i), zIndex: 2 }).add(a.group), p([a.tracker, a.markerGroup], function (a) { a.addClass("highcharts-tracker").on("mouseover", n).on("mouseout", function (a) { g.onTrackerMouseOut(a) }).css(l); if ($a) a.on("touchstart", n) })) } }; if (J.column) ea.prototype.drawTracker = R.drawTrackerPoint; if (J.pie) J.pie.prototype.drawTracker = R.drawTrackerPoint; if (J.scatter) ma.prototype.drawTracker = R.drawTrackerPoint; s(lb.prototype, { setItemEvents: function (a, b, c, d, e) { var f = this; (c ? b : a.legendGroup).on("mouseover", function () { a.setState("hover"); b.css(f.options.itemHoverStyle) }).on("mouseout", function () { b.css(a.visible ? d : e); a.setState() }).on("click", function (b) { var c = function () { a.setVisible() }, b = { browserEvent: b }; a.firePointEvent ? a.firePointEvent("legendItemClick", b, c) : I(a, "legendItemClick", b, c) }) }, createCheckboxForItem: function (a) { a.checkbox = V("input", { type: "checkbox", checked: a.selected, defaultChecked: a.selected }, this.options.itemCheckboxStyle, this.chart.container); C(a.checkbox, "click", function (b) { I(a, "checkboxClick", { checked: b.target.checked }, function () { a.select() }) }) } }); L.legend.itemStyle.cursor = "pointer"; s(Ya.prototype, { showResetZoom: function () { var a = this, b = L.lang, c = a.options.chart.resetZoomButton, d = c.theme, e = d.states, f = c.relativeTo === "chart" ? null : "plotBox"; this.resetZoomButton = a.renderer.button(b.resetZoom, null, null, function () { a.zoomOut() }, d, e && e.hover).attr({ align: c.position.align, title: b.resetZoomTitle }).add().align(c.position, !1, f) }, zoomOut: function () { var a = this; I(a, "selection", { resetSelection: !0 }, function () { a.zoom() }) }, zoom: function (a) { var b, c = this.pointer, d = !1, e; !a || a.resetSelection ? p(this.axes, function (a) { b = a.zoom() }) : p(a.xAxis.concat(a.yAxis), function (a) { var e = a.axis, h = e.isXAxis; if (c[h ? "zoomX" : "zoomY"] || c[h ? "pinchX" : "pinchY"]) b = e.zoom(a.min, a.max), e.displayBtn && (d = !0) }); e = this.resetZoomButton; if (d && !e) this.showResetZoom(); else if (!d && $(e)) this.resetZoomButton = e.destroy(); b && this.redraw(o(this.options.chart.animation, a && a.animation, this.pointCount < 100)) }, pan: function (a, b) { var c = this, d = c.hoverPoints, e; d && p(d, function (a) { a.setState() }); p(b === "xy" ? [1, 0] : [1], function (b) { var d = a[b ? "chartX" : "chartY"], h = c[b ? "xAxis" : "yAxis"][0], i = c[b ? "mouseDownX" : "mouseDownY"], j = (h.pointRange || 0) / 2, k = h.getExtremes(), l = h.toValue(i - d, !0) + j, i = h.toValue(i + c[b ? "plotWidth" : "plotHeight"] - d, !0) - j; h.series.length && l > E(k.dataMin, k.min) && i < t(k.dataMax, k.max) && (h.setExtremes(l, i, !1, !1, { trigger: "pan" }), e = !0); c[b ? "mouseDownX" : "mouseDownY"] = d }); e && c.redraw(!1); D(c.container, { cursor: "move" }) } }); s(Fa.prototype, { select: function (a, b) { var c = this, d = c.series, e = d.chart, a = o(a, !c.selected); c.firePointEvent(a ? "select" : "unselect", { accumulate: b }, function () { c.selected = c.options.selected = a; d.options.data[va(c, d.data)] = c.options; c.setState(a && "select"); b || p(e.getSelectedPoints(), function (a) { if (a.selected && a !== c) a.selected = a.options.selected = !1, d.options.data[va(a, d.data)] = a.options, a.setState(""), a.firePointEvent("unselect") }) }) }, onMouseOver: function (a) { var b = this.series, c = b.chart, d = c.tooltip, e = c.hoverPoint; if (e && e !== this) e.onMouseOut(); this.firePointEvent("mouseOver"); d && (!d.shared || b.noSharedTooltip) && d.refresh(this, a); this.setState("hover"); c.hoverPoint = this }, onMouseOut: function () { var a = this.series.chart, b = a.hoverPoints; if (!b || va(this, b) === -1) this.firePointEvent("mouseOut"), this.setState(), a.hoverPoint = null }, firePointEvent: function (a, b, c) { var d = this, e = this.series.options; (e.point.events[a] || d.options && d.options.events && d.options.events[a]) && this.importEvents(); a === "click" && e.allowPointSelect && (c = function (a) { d.select(null, a.ctrlKey || a.metaKey || a.shiftKey) }); I(this, a, b, c) }, importEvents: function () { if (!this.hasImportedEvents) { var a = w(this.series.options.point, this.options).events, b; this.events = a; for (b in a) C(this, b, a[b]); this.hasImportedEvents = !0 } }, setState: function (a, b) { var c = this.plotX, d = this.plotY, e = this.series, f = e.options.states, g = Z[e.type].marker && e.options.marker, h = g && !g.enabled, i = g && g.states[a], j = i && i.enabled === !1, k = e.stateMarkerGraphic, l = this.marker || {}, m = e.chart, n = this.pointAttr, a = a || "", b = b && k; if (!(a === this.state && !b || this.selected && a !== "select" || f[a] && f[a].enabled === !1 || a && (j || h && !i.enabled) || a && l.states && l.states[a] && l.states[a].enabled === !1)) { if (this.graphic) f = g && this.graphic.symbolName && n[a].r, this.graphic.attr(w(n[a], f ? { x: c - f, y: d - f, width: 2 * f, height: 2 * f} : {})); else { if (a && i) if (f = i.radius, l = l.symbol || e.symbol, k && k.currentSymbol !== l && (k = k.destroy()), k) k[b ? "animate" : "attr"]({ x: c - f, y: d - f }); else e.stateMarkerGraphic = k = m.renderer.symbol(l, c - f, d - f, 2 * f, 2 * f).attr(n[a]).add(e.markerGroup), k.currentSymbol = l; if (k) k[a && m.isInsidePlot(c, d, m.inverted) ? "show" : "hide"]() } this.state = a } } }); s(M.prototype, { onMouseOver: function () { var a = this.chart, b = a.hoverSeries; if (b && b !== this) b.onMouseOut(); this.options.events.mouseOver && I(this, "mouseOver"); this.setState("hover"); a.hoverSeries = this }, onMouseOut: function () { var a = this.options, b = this.chart, c = b.tooltip, d = b.hoverPoint; if (d) d.onMouseOut(); this && a.events.mouseOut && I(this, "mouseOut"); c && !a.stickyTracking && (!c.shared || this.noSharedTooltip) && c.hide(); this.setState(); b.hoverSeries = null }, setState: function (a) { var b = this.options, c = this.graph, d = this.graphNeg, e = b.states, b = b.lineWidth, a = a || ""; if (this.state !== a) this.state = a, e[a] && e[a].enabled === !1 || (a && (b = e[a].lineWidth || b + 1), c && !c.dashstyle && (a = { "stroke-width": b }, c.attr(a), d && d.attr(a))) }, setVisible: function (a, b) { var c = this, d = c.chart, e = c.legendItem, f, g = d.options.chart.ignoreHiddenSeries, h = c.visible; f = (c.visible = a = c.userOptions.visible = a === u ? !h : a) ? "show" : "hide"; p(["group", "dataLabelsGroup", "markerGroup", "tracker"], function (a) { if (c[a]) c[a][f]() }); if (d.hoverSeries === c) c.onMouseOut(); e && d.legend.colorizeItem(c, a); c.isDirty = !0; c.options.stacking && p(d.series, function (a) { if (a.options.stacking && a.visible) a.isDirty = !0 }); p(c.linkedSeries, function (b) { b.setVisible(a, !1) }); if (g) d.isDirtyBox = !0; b !== !1 && d.redraw(); I(c, f) }, setTooltipPoints: function (a) { var b = [], c, d, e = this.xAxis, f = e && e.getExtremes(), g = e ? e.tooltipLen || e.len : this.chart.plotSizeX, h, i, j = []; if (!(this.options.enableMouseTracking === !1 || this.singularTooltips)) { if (a) this.tooltipPoints = null; p(this.segments || this.points, function (a) { b = b.concat(a) }); e && e.reversed && (b = b.reverse()); this.orderTooltipPoints && this.orderTooltipPoints(b); a = b.length; for (i = 0; i < a; i++) if (e = b[i], c = e.x, c >= f.min && c <= f.max) { h = b[i + 1]; c = d === u ? 0 : d + 1; for (d = b[i + 1] ? E(t(0, S((e.clientX + (h ? h.wrappedClientX || h.clientX : g)) / 2)), g) : g; c >= 0 && c <= d; ) j[c++] = e } this.tooltipPoints = j } }, show: function () { this.setVisible(!0) }, hide: function () { this.setVisible(!1) }, select: function (a) { this.selected = a = a === u ? !this.selected : a; if (this.checkbox) this.checkbox.checked = a; I(this, a ? "select" : "unselect") }, drawTracker: R.drawTrackerGraph }); s(Q, { Axis: ka, Chart: Ya, Color: wa, Point: Fa, Tick: Sa, Renderer: Za, Series: M, SVGElement: ta, SVGRenderer: pa, arrayMin: Na, arrayMax: Ba, charts: Y, dateFormat: bb, format: Ia, pathAnim: ub, getOptions: function () { return L }, hasBidiBug: Ob, isTouchDevice: Jb, numberFormat: Ga, seriesTypes: J, setOptions: function (a) { L = w(!0, L, a); Cb(); return L }, addEvent: C, removeEvent: U, createElement: V, discardElement: Pa, css: D, each: p, extend: s, map: Ua, merge: w, pick: o, splat: na, extendClass: ja, pInt: x, wrap: Ma, svg: X, canvas: ca, vml: !X && !ca, product: "Highcharts", version: "3.0.10" }) })();;
/*! FlipClock 2014-01-20 */
var Base=function(){};Base.extend=function(a,b){"use strict";var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!==arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a<arguments.length;a++)"function"==typeof arguments[a]?arguments[a](this.prototype):this.prototype.extend(arguments[a]);return this},toString:function(){return String(this.valueOf())}});var FlipClock;!function(a){"use strict";FlipClock=function(a,b,c){return new FlipClock.Factory(a,b,c)},FlipClock.Lang={},FlipClock.Base=Base.extend({buildDate:"2013-11-07",version:"0.3.1",constructor:function(b,c){"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={}),this.setOptions(a.extend(!0,{},b,c))},callback:function(a){if("function"==typeof a){for(var b=[],c=1;c<=arguments.length;c++)arguments[c]&&b.push(arguments[c]);a.apply(this,b)}},log:function(a){window.console&&console.log&&console.log(a)},getOption:function(a){return this[a]?this[a]:!1},getOptions:function(){return this},setOption:function(a,b){this[a]=b},setOptions:function(a){for(var b in a)"undefined"!=typeof a[b]&&this.setOption(b,a[b])}}),FlipClock.Factory=FlipClock.Base.extend({autoStart:!0,callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},classes:{active:"flip-clock-active",before:"flip-clock-before",divider:"flip-clock-divider",dot:"flip-clock-dot",label:"flip-clock-label",flip:"flip",play:"play",wrapper:"flip-clock-wrapper"},clockFace:"HourlyCounter",defaultClockFace:"HourlyCounter",defaultLanguage:"english",language:"english",lang:!1,face:!0,running:!1,time:!1,timer:!1,lists:[],$wrapper:!1,constructor:function(b,c,d){this.lists=[],this.running=!1,this.base(d),this.$wrapper=a(b).addClass(this.classes.wrapper),this.time=new FlipClock.Time(this,c?Math.round(c):0),this.timer=new FlipClock.Timer(this,d),this.lang=this.loadLanguage(this.language),this.face=this.loadClockFace(this.clockFace,d),this.autoStart&&this.start()},loadClockFace:function(a,b){var c,d="Face";return a=a.ucfirst()+d,c=FlipClock[a]?new FlipClock[a](this,b):new FlipClock[this.defaultClockFace+d](this,b),c.build(),c},loadLanguage:function(a){var b;return b=FlipClock.Lang[a.ucfirst()]?FlipClock.Lang[a.ucfirst()]:FlipClock.Lang[a]?FlipClock.Lang[a]:FlipClock.Lang[this.defaultLanguage]},localize:function(a,b){var c=this.lang;if(!a)return null;var d=a.toLowerCase();return"object"==typeof b&&(c=b),c&&c[d]?c[d]:a},start:function(a){var b=this;b.running||b.countdown&&!(b.countdown&&b.time.time>0)?b.log("Trying to start timer when countdown already at 0"):(b.face.start(b.time),b.timer.start(function(){b.flip(),"function"==typeof a&&a()}))},stop:function(a){this.face.stop(),this.timer.stop(a);for(var b in this.lists)this.lists[b].stop()},reset:function(a){this.timer.reset(a),this.face.reset()},setTime:function(a){this.time.time=a,this.face.setTime(a)},getTime:function(){return this.time},setCountdown:function(a){var b=this.running;this.countdown=a?!0:!1,b&&(this.stop(),this.start())},flip:function(){this.face.flip()}}),FlipClock.Face=FlipClock.Base.extend({dividers:[],factory:!1,lists:[],constructor:function(a,b){this.base(b),this.factory=a,this.dividers=[]},build:function(){},createDivider:function(b,c,d){"boolean"!=typeof c&&c||(d=c,c=b);var e=['<span class="'+this.factory.classes.dot+' top"></span>','<span class="'+this.factory.classes.dot+' bottom"></span>'].join("");d&&(e=""),b=this.factory.localize(b);var f=['<span class="'+this.factory.classes.divider+" "+(c?c:"").toLowerCase()+'">','<span class="'+this.factory.classes.label+'">'+(b?b:"")+"</span>",e,"</span>"];return a(f.join(""))},createList:function(a,b){"object"==typeof a&&(b=a,a=0);var c=new FlipClock.List(this.factory,a,b);return c},reset:function(){},setTime:function(a){this.flip(a)},addDigit:function(a){var b=this.createList(a,{classes:{active:this.factory.classes.active,before:this.factory.classes.before,flip:this.factory.classes.flip}});b.$obj.insertBefore(this.factory.lists[0].$obj),this.factory.lists.unshift(b)},start:function(){},stop:function(){},flip:function(b,c){var d=this;c||(d.factory.countdown?(d.factory.time.time<=0&&d.factory.stop(),d.factory.time.time--):d.factory.time.time++);var e=d.factory.lists.length-b.length;0>e&&(e=0);var f=!1;a.each(b,function(a,b){a+=e;var g=d.factory.lists[a];if(g){var h=g.digit;g.select(b),b==h||c||g.play()}else d.addDigit(b),f=!0});for(var g=0;g<b.length;g++)g>=e&&d.factory.lists[g].digit!=b[g]&&d.factory.lists[g].select(b[g])}}),FlipClock.List=FlipClock.Base.extend({digit:0,classes:{active:"flip-clock-active",before:"flip-clock-before",flip:"flip"},factory:!1,$obj:!1,items:[],constructor:function(a,b){this.factory=a,this.digit=b,this.$obj=this.createList(),b>0&&this.select(b),this.factory.$wrapper.append(this.$obj)},select:function(a){"undefined"==typeof a?a=this.digit:this.digit=a;{var b=this.$obj.find('[data-digit="'+a+'"]');this.$obj.find("."+this.classes.active).removeClass(this.classes.active),this.$obj.find("."+this.classes.before).removeClass(this.classes.before)}this.factory.countdown?b.is(":last-child")?this.$obj.find(":first-child").addClass(this.classes.before):b.next().addClass(this.classes.before):b.is(":first-child")?this.$obj.find(":last-child").addClass(this.classes.before):b.prev().addClass(this.classes.before),b.addClass(this.classes.active)},play:function(){this.$obj.addClass(this.factory.classes.play)},stop:function(){var a=this;setTimeout(function(){a.$obj.removeClass(a.factory.classes.play)},this.factory.timer.interval)},createList:function(){for(var b=a('<ul class="'+this.classes.flip+" "+(this.factory.running?this.factory.classes.play:"")+'" />'),c=0;10>c;c++){var d=a(['<li data-digit="'+c+'">','<a href="#">','<div class="up">','<div class="shadow"></div>','<div class="inn">'+c+"</div>","</div>",'<div class="down">','<div class="shadow"></div>','<div class="inn">'+c+"</div>","</div>","</a>","</li>"].join(""));this.items.push(d),b.append(d)}return b}}),FlipClock.Time=FlipClock.Base.extend({minimumDigits:0,time:0,factory:!1,constructor:function(a,b,c){this.base(c),this.factory=a,b&&(this.time=b)},convertDigitsToArray:function(a){var b=[];a=a.toString();for(var c=0;c<a.length;c++)a[c].match(/^\d*$/g)&&b.push(a[c]);return b},digit:function(a){var b=this.toString(),c=b.length;return b[c-a]?b[c-a]:!1},digitize:function(b){var c=[];return a.each(b,function(a,b){b=b.toString(),1==b.length&&(b="0"+b);for(var d=0;d<b.length;d++)c.push(b[d])}),c.length>this.minimumDigits&&(this.minimumDigits=c.length),this.minimumDigits>c.length&&c.unshift("0"),c},getDayCounter:function(a){var b=[this.getDays(),this.getHours(!0),this.getMinutes(!0)];return a&&b.push(this.getSeconds(!0)),this.digitize(b)},getDays:function(a){var b=this.time/60/60/24;return a&&(b%=7),Math.floor(b)},getHourCounter:function(){var a=this.digitize([this.getHours(),this.getMinutes(!0),this.getSeconds(!0)]);return a},getHourly:function(){return this.getHourCounter()},getHours:function(a){var b=this.time/60/60;return a&&(b%=24),Math.floor(b)},getMilitaryTime:function(){var a=new Date,b=this.digitize([a.getHours(),a.getMinutes(),a.getSeconds()]);return b},getMinutes:function(a){var b=this.time/60;return a&&(b%=60),Math.floor(b)},getMinuteCounter:function(){var a=this.digitize([this.getMinutes(),this.getSeconds(!0)]);return a},getSeconds:function(a){var b=this.time;return a&&(60==b?b=0:b%=60),Math.ceil(b)},getTime:function(){var a=new Date,b=a.getHours(),c=this.digitize([b>12?b-12:0===b?12:b,a.getMinutes(),a.getSeconds()]);return c},getWeeks:function(){var a=this.time/60/60/24/7;return mod&&(a%=52),Math.floor(a)},removeLeadingZeros:function(b,c){var d=0,e=[];return a.each(c,function(a){b>a?d+=parseInt(c[a],10):e.push(c[a])}),0===d?e:c},toString:function(){return this.time.toString()}}),FlipClock.Timer=FlipClock.Base.extend({callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},count:0,factory:!1,interval:1e3,constructor:function(a,b){this.base(b),this.factory=a,this.callback(this.callbacks.init),this.callback(this.callbacks.create)},getElapsed:function(){return this.count*this.interval},getElapsedTime:function(){return new Date(this.time+this.getElapsed())},reset:function(a){clearInterval(this.timer),this.count=0,this._setInterval(a),this.callback(this.callbacks.reset)},start:function(a){this.factory.running=!0,this._createTimer(a),this.callback(this.callbacks.start)},stop:function(a){this.factory.running=!1,this._clearInterval(a),this.callback(this.callbacks.stop),this.callback(a)},_clearInterval:function(){clearInterval(this.timer)},_createTimer:function(a){this._setInterval(a)},_destroyTimer:function(a){this._clearInterval(),this.timer=!1,this.callback(a),this.callback(this.callbacks.destroy)},_interval:function(a){this.callback(this.callbacks.interval),this.callback(a),this.count++},_setInterval:function(a){var b=this;b.timer=setInterval(function(){b._interval(a)},this.interval)}}),String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},a.fn.FlipClock=function(b,c){return"object"==typeof b&&(c=b,b=0),new FlipClock(a(this),b,c)},a.fn.flipClock=function(b,c){return a.fn.FlipClock(b,c)}}(jQuery),function(a){FlipClock.TwentyFourHourClockFace=FlipClock.Face.extend({constructor:function(a,b){a.countdown=!1,this.base(a,b)},build:function(b){var c=this,d=this.factory.$wrapper.find("ul");b=b?b:this.factory.time.time||this.factory.time.getMilitaryTime(),b.length>d.length&&a.each(b,function(a,b){c.factory.lists.push(c.createList(b))}),this.dividers.push(this.createDivider()),this.dividers.push(this.createDivider()),a(this.dividers[0]).insertBefore(this.factory.lists[this.factory.lists.length-2].$obj),a(this.dividers[1]).insertBefore(this.factory.lists[this.factory.lists.length-4].$obj),this._clearExcessDigits(),this.autoStart&&this.start()},flip:function(a){a=a?a:this.factory.time.getMilitaryTime(),this.base(a)},_clearExcessDigits:function(){for(var a=this.factory.lists[this.factory.lists.length-2],b=this.factory.lists[this.factory.lists.length-4],c=6;10>c;c++)a.$obj.find("li:last-child").remove(),b.$obj.find("li:last-child").remove()}})}(jQuery),function(a){FlipClock.CounterFace=FlipClock.Face.extend({autoStart:!1,constructor:function(a,b){a.timer.interval=0,a.autoStart=!1,a.running=!0,a.increment=function(){a.countdown=!1,a.setTime(a.getTime().time+1)},a.decrement=function(){a.countdown=!0,a.setTime(a.getTime().time-1)},a.setValue=function(b){a.setTime(b)},a.setCounter=function(b){a.setTime(b)},this.base(a,b)},build:function(){var b=this,c=this.factory.$wrapper.find("ul"),d=[],e=this.factory.getTime().digitize([this.factory.getTime().time]);e.length>c.length&&a.each(e,function(a,c){var e=b.createList(c);e.select(c),d.push(e)}),a.each(d,function(a,b){b.play()}),this.factory.lists=d},flip:function(a){var b=this.factory.getTime().digitize([this.factory.getTime().time]);this.base(b,a)}})}(jQuery),function(a){FlipClock.DailyCounterFace=FlipClock.Face.extend({showSeconds:!0,constructor:function(a,b){this.base(a,b)},build:function(b,c){var d=this,e=this.factory.$wrapper.find("ul"),f=[],g=0;c=c?c:this.factory.time.getDayCounter(this.showSeconds),c.length>e.length&&a.each(c,function(a,b){f.push(d.createList(b))}),this.factory.lists=f,this.showSeconds?a(this.createDivider("Seconds")).insertBefore(this.factory.lists[this.factory.lists.length-2].$obj):g=2,a(this.createDivider("Minutes")).insertBefore(this.factory.lists[this.factory.lists.length-4+g].$obj),a(this.createDivider("Hours")).insertBefore(this.factory.lists[this.factory.lists.length-6+g].$obj),a(this.createDivider("Days",!0)).insertBefore(this.factory.lists[0].$obj),this._clearExcessDigits(),this.autoStart&&this.start()},flip:function(a,b){b||(b=this.factory.time.getDayCounter(this.showSeconds)),this.base(b,a)},_clearExcessDigits:function(){for(var a=this.factory.lists[this.factory.lists.length-2],b=this.factory.lists[this.factory.lists.length-4],c=6;10>c;c++)a.$obj.find("li:last-child").remove(),b.$obj.find("li:last-child").remove()}})}(jQuery),function(a){FlipClock.HourlyCounterFace=FlipClock.Face.extend({clearExcessDigits:!0,constructor:function(a,b){this.base(a,b)},build:function(b,c){var d=this,e=this.factory.$wrapper.find("ul"),f=[];c=c?c:this.factory.time.getHourCounter(),c.length>e.length&&a.each(c,function(a,b){f.push(d.createList(b))}),this.factory.lists=f,a(this.createDivider("Seconds")).insertBefore(this.factory.lists[this.factory.lists.length-2].$obj),a(this.createDivider("Minutes")).insertBefore(this.factory.lists[this.factory.lists.length-4].$obj),b||a(this.createDivider("Hours",!0)).insertBefore(this.factory.lists[0].$obj),this.clearExcessDigits&&this._clearExcessDigits(),this.autoStart&&this.start()},flip:function(a,b){b||(b=this.factory.time.getHourCounter()),this.base(b,a)},_clearExcessDigits:function(){for(var a=this.factory.lists[this.factory.lists.length-2],b=this.factory.lists[this.factory.lists.length-4],c=6;10>c;c++)a.$obj.find("li:last-child").remove(),b.$obj.find("li:last-child").remove()}})}(jQuery),function(){FlipClock.MinuteCounterFace=FlipClock.HourlyCounterFace.extend({clearExcessDigits:!1,constructor:function(a,b){this.base(a,b)},build:function(){this.base(!0,this.factory.time.getMinuteCounter())},flip:function(a){this.base(a,this.factory.time.getMinuteCounter())}})}(jQuery),function(a){FlipClock.TwelveHourClockFace=FlipClock.TwentyFourHourClockFace.extend({meridium:!1,meridiumText:"AM",build:function(b){b=b?b:this.factory.time.time?this.factory.time.time:this.factory.time.getTime(),this.base(b),this.meridiumText=this._isPM()?"PM":"AM",this.meridium=a(['<ul class="flip-clock-meridium">',"<li>",'<a href="#">'+this.meridiumText+"</a>","</li>","</ul>"].join("")),this.meridium.insertAfter(this.factory.lists[this.factory.lists.length-1].$obj)},flip:function(){this.meridiumText!=this._getMeridium()&&(this.meridiumText=this._getMeridium(),this.meridium.find("a").html(this.meridiumText)),this.base(this.factory.time.getTime())},_getMeridium:function(){return(new Date).getHours()>=12?"PM":"AM"},_isPM:function(){return"PM"==this._getMeridium()?!0:!1},_clearExcessDigits:function(){for(var a=this.factory.lists[this.factory.lists.length-2],b=this.factory.lists[this.factory.lists.length-4],c=6;10>c;c++)a.$obj.find("li:last-child").remove(),b.$obj.find("li:last-child").remove()}})}(jQuery),function(){FlipClock.Lang.German={years:"Jahre",months:"Monate",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden"},FlipClock.Lang.de=FlipClock.Lang.German,FlipClock.Lang["de-de"]=FlipClock.Lang.German,FlipClock.Lang.german=FlipClock.Lang.German}(jQuery),function(){FlipClock.Lang.English={years:"Years",months:"Months",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},FlipClock.Lang.en=FlipClock.Lang.English,FlipClock.Lang["en-us"]=FlipClock.Lang.English,FlipClock.Lang.english=FlipClock.Lang.English}(jQuery),function(){FlipClock.Lang.Spanish={years:"A&#241;os",months:"Meses",days:"D&#205;as",hours:"Horas",minutes:"Minutos",seconds:"Segundo"},FlipClock.Lang.es=FlipClock.Lang.Spanish,FlipClock.Lang["es-es"]=FlipClock.Lang.Spanish,FlipClock.Lang.spanish=FlipClock.Lang.Spanish}(jQuery),function(){FlipClock.Lang.French={years:"ans",months:"mois",days:"jours",hours:"heures",minutes:"minutes",seconds:"secondes"},FlipClock.Lang.fr=FlipClock.Lang.French,FlipClock.Lang["fr-ca"]=FlipClock.Lang.French,FlipClock.Lang.french=FlipClock.Lang.French}(jQuery);;
/*! jQuery Validation - Additional Methods */

/**
 * jQuery Validation Plugin 1.9.0
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2011 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function() {

	function stripHtml(value) {
		// remove html tags and space chars
		return value.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' ')
		// remove numbers and punctuation
		.replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,'');
	}
	jQuery.validator.addMethod("maxWords", function(value, element, params) {
	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params;
	}, jQuery.validator.format("Please enter {0} words or less."));

	jQuery.validator.addMethod("minWords", function(value, element, params) {
	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
	}, jQuery.validator.format("Please enter at least {0} words."));

	jQuery.validator.addMethod("rangeWords", function(value, element, params) {
	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1];
	}, jQuery.validator.format("Please enter between {0} and {1} words."));

})();

jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
	return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value);
}, "Letters or punctuation only please");

jQuery.validator.addMethod("alphanumeric", function(value, element) {
	return this.optional(element) || /^\w+$/i.test(value);
}, "Letters, numbers, spaces or underscores only please");

jQuery.validator.addMethod("lettersonly", function(value, element) {
	return this.optional(element) || /^[a-z]+$/i.test(value);
}, "Letters only please");

jQuery.validator.addMethod("nowhitespace", function(value, element) {
	return this.optional(element) || /^\S+$/i.test(value);
}, "No white space please");

jQuery.validator.addMethod("ziprange", function(value, element) {
	return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value);
}, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");

jQuery.validator.addMethod("integer", function(value, element) {
	return this.optional(element) || /^-?\d+$/.test(value);
}, "A positive or negative non-decimal number please");

/**
* Return true, if the value is a valid vehicle identification number (VIN).
*
* Works with all kind of text inputs.
*
* @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
* @desc Declares a required input element whose value must be a valid vehicle identification number.
*
* @name jQuery.validator.methods.vinUS
* @type Boolean
* @cat Plugins/Validate/Methods
*/
jQuery.validator.addMethod(
	"vinUS",
	function(v){
		if (v.length != 17)
			return false;
		var i, n, d, f, cd, cdv;
		var LL    = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
		var VL    = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
		var FL    = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
		var rs    = 0;
		for(i = 0; i < 17; i++){
		    f = FL[i];
		    d = v.slice(i,i+1);
		    if(i == 8){
		        cdv = d;
		    }
		    if(!isNaN(d)){
		        d *= f;
		    }
		    else{
		        for(n = 0; n < LL.length; n++){
		            if(d.toUpperCase() === LL[n]){
		                d = VL[n];
		                d *= f;
		                if(isNaN(cdv) && n == 8){
		                    cdv = LL[n];
		                }
		                break;
		            }
		        }
		    }
		    rs += d;
		}
		cd = rs % 11;
		if(cd == 10){cd = "X";}
		if(cd == cdv){return true;}
		return false;
	},
	"The specified vehicle identification number (VIN) is invalid."
);

/**
  * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
  *
  * @example jQuery.validator.methods.date("01/01/1900")
  * @result true
  *
  * @example jQuery.validator.methods.date("01/13/1990")
  * @result false
  *
  * @example jQuery.validator.methods.date("01.01.1900")
  * @result false
  *
  * @example <input name="pippo" class="{dateITA:true}" />
  * @desc Declares an optional input element whose value must be a valid date.
  *
  * @name jQuery.validator.methods.dateITA
  * @type Boolean
  * @cat Plugins/Validate/Methods
  */
jQuery.validator.addMethod(
	"dateITA",
	function(value, element) {
		var check = false;
		var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
		if( re.test(value)){
			var adata = value.split('/');
			var gg = parseInt(adata[0],10);
			var mm = parseInt(adata[1],10);
			var aaaa = parseInt(adata[2],10);
			var xdata = new Date(aaaa,mm-1,gg);
			if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) )
				check = true;
			else
				check = false;
		} else
			check = false;
		return this.optional(element) || check;
	},
	"Please enter a correct date"
);

jQuery.validator.addMethod("dateNL", function(value, element) {
		return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
	}, "Vul hier een geldige datum in."
);

jQuery.validator.addMethod("time", function(value, element) {
	return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(value);
}, "Please enter a valid time, between 00:00 and 23:59");
jQuery.validator.addMethod("time12h", function(value, element) {
	return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(value);
}, "Please enter a valid time, between 00:00 am and 12:00 pm");

/**
 * matches US phone number format
 *
 * where the area code may not start with 1 and the prefix may not start with 1
 * allows '-' or ' ' as a separator and allows parens around area code
 * some people may want to put a '1' in front of their number
 *
 * 1(212)-999-2345
 * or
 * 212 999 2344
 * or
 * 212-999-0983
 *
 * but not
 * 111-123-5434
 * and not
 * 212 123 4567
 */
jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
    phone_number = phone_number.replace(/\s+/g, "");
	return this.optional(element) || phone_number.length > 9 &&
		phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, "Please specify a valid phone number");

jQuery.validator.addMethod('phoneUK', function(phone_number, element) {
return this.optional(element) || phone_number.length > 9 &&
phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
}, 'Please specify a valid phone number');

jQuery.validator.addMethod('mobileUK', function(phone_number, element) {
return this.optional(element) || phone_number.length > 9 &&
phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/);
}, 'Please specify a valid mobile number');

// TODO check if value starts with <, otherwise don't try stripping anything
jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
	return jQuery(value).text().length >= param;
}, jQuery.validator.format("Please enter at least {0} characters"));

// same as email, but TLD is optional
jQuery.validator.addMethod("email2", function(value, element, param) {
	return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))\.?$/i.test(value);
}, jQuery.validator.messages.email);

// same as url, but TLD is optional
jQuery.validator.addMethod("url2", function(value, element, param) {
	return this.optional(element) || /^(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(value);
}, jQuery.validator.messages.url);

// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {

	if (/[^0-9-]+/.test(value))
		return false;

	value = value.replace(/\D/g, "");

	var validTypes = 0x0000;

	if (param.mastercard)
		validTypes |= 0x0001;
	if (param.visa)
		validTypes |= 0x0002;
	if (param.amex)
		validTypes |= 0x0004;
	if (param.dinersclub)
		validTypes |= 0x0008;
	if (param.enroute)
		validTypes |= 0x0010;
	if (param.discover)
		validTypes |= 0x0020;
	if (param.jcb)
		validTypes |= 0x0040;
	if (param.unknown)
		validTypes |= 0x0080;
	if (param.all)
		validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;

	if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard
		return value.length == 16;
	}
	if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
		return value.length == 16;
	}
	if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex
		return value.length == 15;
	}
	if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub
		return value.length == 14;
	}
	if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute
		return value.length == 15;
	}
	if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
		return value.length == 16;
	}
	if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
		return value.length == 16;
	}
	if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
		return value.length == 15;
	}
	if (validTypes & 0x0080) { //unknown
		return true;
	}
	return false;
}, "Please enter a valid credit card number.");

jQuery.validator.addMethod("ipv4", function(value, element, param) {
    return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value);
}, "Please enter a valid IP v4 address.");

jQuery.validator.addMethod("ipv6", function(value, element, param) {
    return this.optional(element) || /^((([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(value);
}, "Please enter a valid IP v6 address.");

/**
  * Return true if the field value matches the given format RegExp
  *
  * @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
  * @result true
  *
  * @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
  * @result false
  *
  * @name jQuery.validator.methods.pattern
  * @type Boolean
  * @cat Plugins/Validate/Methods
  */
jQuery.validator.addMethod("pattern", function(value, element, param) {
    return this.optional(element) || param.test(value);
}, "Invalid format.");

;
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);;
/*
* File:        jquery.dataTables.min.js
* Version:     1.9.4
* Author:      Allan Jardine (www.sprymedia.co.uk)
* Info:        www.datatables.net
* 
* Copyright 2008-2012 Allan Jardine, all rights reserved.
*
* This source file is free software, under either the GPL v2 license or a
* BSD style license, available at:
*   http://datatables.net/license_gpl2
*   http://datatables.net/license_bsd
* 
* This source file is distributed in the hope that it will be useful, but 
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
*/
(function (X, l, n) {
    var L = function (h) {
        var j = function (e) {
            function o(a, b) {
                var c = j.defaults.columns, d = a.aoColumns.length, c = h.extend({}, j.models.oColumn, c, { sSortingClass: a.oClasses.sSortable, sSortingClassJUI: a.oClasses.sSortJUI, nTh: b ? b : l.createElement("th"), sTitle: c.sTitle ? c.sTitle : b ? b.innerHTML : "", aDataSort: c.aDataSort ? c.aDataSort : [d], mData: c.mData ? c.oDefaults : d }); a.aoColumns.push(c); if (a.aoPreSearchCols[d] === n || null === a.aoPreSearchCols[d]) a.aoPreSearchCols[d] = h.extend({}, j.models.oSearch); else if (c = a.aoPreSearchCols[d],
c.bRegex === n && (c.bRegex = !0), c.bSmart === n && (c.bSmart = !0), c.bCaseInsensitive === n) c.bCaseInsensitive = !0; m(a, d, null)
            } function m(a, b, c) {
                var d = a.aoColumns[b]; c !== n && null !== c && (c.mDataProp && !c.mData && (c.mData = c.mDataProp), c.sType !== n && (d.sType = c.sType, d._bAutoType = !1), h.extend(d, c), p(d, c, "sWidth", "sWidthOrig"), c.iDataSort !== n && (d.aDataSort = [c.iDataSort]), p(d, c, "aDataSort")); var i = d.mRender ? Q(d.mRender) : null, f = Q(d.mData); d.fnGetData = function (a, b) { var c = f(a, b); return d.mRender && b && "" !== b ? i(c, b, a) : c }; d.fnSetData =
L(d.mData); a.oFeatures.bSort || (d.bSortable = !1); !d.bSortable || -1 == h.inArray("asc", d.asSorting) && -1 == h.inArray("desc", d.asSorting) ? (d.sSortingClass = a.oClasses.sSortableNone, d.sSortingClassJUI = "") : -1 == h.inArray("asc", d.asSorting) && -1 == h.inArray("desc", d.asSorting) ? (d.sSortingClass = a.oClasses.sSortable, d.sSortingClassJUI = a.oClasses.sSortJUI) : -1 != h.inArray("asc", d.asSorting) && -1 == h.inArray("desc", d.asSorting) ? (d.sSortingClass = a.oClasses.sSortableAsc, d.sSortingClassJUI = a.oClasses.sSortJUIAscAllowed) : -1 ==
h.inArray("asc", d.asSorting) && -1 != h.inArray("desc", d.asSorting) && (d.sSortingClass = a.oClasses.sSortableDesc, d.sSortingClassJUI = a.oClasses.sSortJUIDescAllowed)
            } function k(a) { if (!1 === a.oFeatures.bAutoWidth) return !1; da(a); for (var b = 0, c = a.aoColumns.length; b < c; b++) a.aoColumns[b].nTh.style.width = a.aoColumns[b].sWidth } function G(a, b) { var c = r(a, "bVisible"); return "number" === typeof c[b] ? c[b] : null } function R(a, b) { var c = r(a, "bVisible"), c = h.inArray(b, c); return -1 !== c ? c : null } function t(a) { return r(a, "bVisible").length }
            function r(a, b) { var c = []; h.map(a.aoColumns, function (a, i) { a[b] && c.push(i) }); return c } function B(a) { for (var b = j.ext.aTypes, c = b.length, d = 0; d < c; d++) { var i = b[d](a); if (null !== i) return i } return "string" } function u(a, b) { for (var c = b.split(","), d = [], i = 0, f = a.aoColumns.length; i < f; i++) for (var g = 0; g < f; g++) if (a.aoColumns[i].sName == c[g]) { d.push(g); break } return d } function M(a) { for (var b = "", c = 0, d = a.aoColumns.length; c < d; c++) b += a.aoColumns[c].sName + ","; return b.length == d ? "" : b.slice(0, -1) } function ta(a, b, c, d) {
                var i, f,
g, e, w; if (b) for (i = b.length - 1; 0 <= i; i--) { var j = b[i].aTargets; h.isArray(j) || D(a, 1, "aTargets must be an array of targets, not a " + typeof j); f = 0; for (g = j.length; f < g; f++) if ("number" === typeof j[f] && 0 <= j[f]) { for (; a.aoColumns.length <= j[f]; ) o(a); d(j[f], b[i]) } else if ("number" === typeof j[f] && 0 > j[f]) d(a.aoColumns.length + j[f], b[i]); else if ("string" === typeof j[f]) { e = 0; for (w = a.aoColumns.length; e < w; e++) ("_all" == j[f] || h(a.aoColumns[e].nTh).hasClass(j[f])) && d(e, b[i]) } } if (c) { i = 0; for (a = c.length; i < a; i++) d(i, c[i]) } 
            } function H(a,
b) {
                var c; c = h.isArray(b) ? b.slice() : h.extend(!0, {}, b); var d = a.aoData.length, i = h.extend(!0, {}, j.models.oRow); i._aData = c; a.aoData.push(i); for (var f, i = 0, g = a.aoColumns.length; i < g; i++) c = a.aoColumns[i], "function" === typeof c.fnRender && c.bUseRendered && null !== c.mData ? F(a, d, i, S(a, d, i)) : F(a, d, i, v(a, d, i)), c._bAutoType && "string" != c.sType && (f = v(a, d, i, "type"), null !== f && "" !== f && (f = B(f), null === c.sType ? c.sType = f : c.sType != f && "html" != c.sType && (c.sType = "string"))); a.aiDisplayMaster.push(d); a.oFeatures.bDeferRender || ea(a,
d); return d
            } function ua(a) {
                var b, c, d, i, f, g, e; if (a.bDeferLoading || null === a.sAjaxSource) for (b = a.nTBody.firstChild; b; ) { if ("TR" == b.nodeName.toUpperCase()) { c = a.aoData.length; b._DT_RowIndex = c; a.aoData.push(h.extend(!0, {}, j.models.oRow, { nTr: b })); a.aiDisplayMaster.push(c); f = b.firstChild; for (d = 0; f; ) { g = f.nodeName.toUpperCase(); if ("TD" == g || "TH" == g) F(a, c, d, h.trim(f.innerHTML)), d++; f = f.nextSibling } } b = b.nextSibling } i = T(a); d = []; b = 0; for (c = i.length; b < c; b++) for (f = i[b].firstChild; f; ) g = f.nodeName.toUpperCase(), ("TD" ==
g || "TH" == g) && d.push(f), f = f.nextSibling; c = 0; for (i = a.aoColumns.length; c < i; c++) {
                    e = a.aoColumns[c]; null === e.sTitle && (e.sTitle = e.nTh.innerHTML); var w = e._bAutoType, o = "function" === typeof e.fnRender, k = null !== e.sClass, n = e.bVisible, m, p; if (w || o || k || !n) {
                        g = 0; for (b = a.aoData.length; g < b; g++) f = a.aoData[g], m = d[g * i + c], w && "string" != e.sType && (p = v(a, g, c, "type"), "" !== p && (p = B(p), null === e.sType ? e.sType = p : e.sType != p && "html" != e.sType && (e.sType = "string"))), e.mRender ? m.innerHTML = v(a, g, c, "display") : e.mData !== c && (m.innerHTML = v(a,
g, c, "display")), o && (p = S(a, g, c), m.innerHTML = p, e.bUseRendered && F(a, g, c, p)), k && (m.className += " " + e.sClass), n ? f._anHidden[c] = null : (f._anHidden[c] = m, m.parentNode.removeChild(m)), e.fnCreatedCell && e.fnCreatedCell.call(a.oInstance, m, v(a, g, c, "display"), f._aData, g, c)
                    } 
                } if (0 !== a.aoRowCreatedCallback.length) { b = 0; for (c = a.aoData.length; b < c; b++) f = a.aoData[b], A(a, "aoRowCreatedCallback", null, [f.nTr, f._aData, b]) } 
            } function I(a, b) { return b._DT_RowIndex !== n ? b._DT_RowIndex : null } function fa(a, b, c) {
                for (var b = J(a, b), d = 0, a =
a.aoColumns.length; d < a; d++) if (b[d] === c) return d; return -1
            } function Y(a, b, c, d) { for (var i = [], f = 0, g = d.length; f < g; f++) i.push(v(a, b, d[f], c)); return i } function v(a, b, c, d) {
                var i = a.aoColumns[c]; if ((c = i.fnGetData(a.aoData[b]._aData, d)) === n) return a.iDrawError != a.iDraw && null === i.sDefaultContent && (D(a, 0, "Requested unknown parameter " + ("function" == typeof i.mData ? "{mData function}" : "'" + i.mData + "'") + " from the data source for row " + b), a.iDrawError = a.iDraw), i.sDefaultContent; if (null === c && null !== i.sDefaultContent) c =
i.sDefaultContent; else if ("function" === typeof c) return c(); return "display" == d && null === c ? "" : c
            } function F(a, b, c, d) { a.aoColumns[c].fnSetData(a.aoData[b]._aData, d) } function Q(a) {
                if (null === a) return function () { return null }; if ("function" === typeof a) return function (b, d, i) { return a(b, d, i) }; if ("string" === typeof a && (-1 !== a.indexOf(".") || -1 !== a.indexOf("["))) {
                    var b = function (a, d, i) {
                        var f = i.split("."), g; if ("" !== i) {
                            var e = 0; for (g = f.length; e < g; e++) {
                                if (i = f[e].match(U)) {
                                    f[e] = f[e].replace(U, ""); "" !== f[e] && (a = a[f[e]]);
                                    g = []; f.splice(0, e + 1); for (var f = f.join("."), e = 0, h = a.length; e < h; e++) g.push(b(a[e], d, f)); a = i[0].substring(1, i[0].length - 1); a = "" === a ? g : g.join(a); break
                                } if (null === a || a[f[e]] === n) return n; a = a[f[e]]
                            } 
                        } return a
                    }; return function (c, d) { return b(c, d, a) } 
                } return function (b) { return b[a] } 
            } function L(a) {
                if (null === a) return function () { }; if ("function" === typeof a) return function (b, d) { a(b, "set", d) }; if ("string" === typeof a && (-1 !== a.indexOf(".") || -1 !== a.indexOf("["))) {
                    var b = function (a, d, i) {
                        var i = i.split("."), f, g, e = 0; for (g =
i.length - 1; e < g; e++) { if (f = i[e].match(U)) { i[e] = i[e].replace(U, ""); a[i[e]] = []; f = i.slice(); f.splice(0, e + 1); g = f.join("."); for (var h = 0, j = d.length; h < j; h++) f = {}, b(f, d[h], g), a[i[e]].push(f); return } if (null === a[i[e]] || a[i[e]] === n) a[i[e]] = {}; a = a[i[e]] } a[i[i.length - 1].replace(U, "")] = d
                    }; return function (c, d) { return b(c, d, a) } 
                } return function (b, d) { b[a] = d } 
            } function Z(a) { for (var b = [], c = a.aoData.length, d = 0; d < c; d++) b.push(a.aoData[d]._aData); return b } function ga(a) {
                a.aoData.splice(0, a.aoData.length); a.aiDisplayMaster.splice(0,
a.aiDisplayMaster.length); a.aiDisplay.splice(0, a.aiDisplay.length); y(a)
            } function ha(a, b) { for (var c = -1, d = 0, i = a.length; d < i; d++) a[d] == b ? c = d : a[d] > b && a[d]--; -1 != c && a.splice(c, 1) } function S(a, b, c) { var d = a.aoColumns[c]; return d.fnRender({ iDataRow: b, iDataColumn: c, oSettings: a, aData: a.aoData[b]._aData, mDataProp: d.mData }, v(a, b, c, "display")) } function ea(a, b) {
                var c = a.aoData[b], d; if (null === c.nTr) {
                    c.nTr = l.createElement("tr"); c.nTr._DT_RowIndex = b; c._aData.DT_RowId && (c.nTr.id = c._aData.DT_RowId); c._aData.DT_RowClass &&
(c.nTr.className = c._aData.DT_RowClass); for (var i = 0, f = a.aoColumns.length; i < f; i++) { var g = a.aoColumns[i]; d = l.createElement(g.sCellType); d.innerHTML = "function" === typeof g.fnRender && (!g.bUseRendered || null === g.mData) ? S(a, b, i) : v(a, b, i, "display"); null !== g.sClass && (d.className = g.sClass); g.bVisible ? (c.nTr.appendChild(d), c._anHidden[i] = null) : c._anHidden[i] = d; g.fnCreatedCell && g.fnCreatedCell.call(a.oInstance, d, v(a, b, i, "display"), c._aData, b, i) } A(a, "aoRowCreatedCallback", null, [c.nTr, c._aData, b])
                } 
            } function va(a) {
                var b,
c, d; if (0 !== h("th, td", a.nTHead).length) { b = 0; for (d = a.aoColumns.length; b < d; b++) if (c = a.aoColumns[b].nTh, c.setAttribute("role", "columnheader"), a.aoColumns[b].bSortable && (c.setAttribute("tabindex", a.iTabIndex), c.setAttribute("aria-controls", a.sTableId)), null !== a.aoColumns[b].sClass && h(c).addClass(a.aoColumns[b].sClass), a.aoColumns[b].sTitle != c.innerHTML) c.innerHTML = a.aoColumns[b].sTitle } else {
                    var i = l.createElement("tr"); b = 0; for (d = a.aoColumns.length; b < d; b++) c = a.aoColumns[b].nTh, c.innerHTML = a.aoColumns[b].sTitle,
c.setAttribute("tabindex", "0"), null !== a.aoColumns[b].sClass && h(c).addClass(a.aoColumns[b].sClass), i.appendChild(c); h(a.nTHead).html("")[0].appendChild(i); V(a.aoHeader, a.nTHead)
                } h(a.nTHead).children("tr").attr("role", "row"); if (a.bJUI) { b = 0; for (d = a.aoColumns.length; b < d; b++) { c = a.aoColumns[b].nTh; i = l.createElement("div"); i.className = a.oClasses.sSortJUIWrapper; h(c).contents().appendTo(i); var f = l.createElement("span"); f.className = a.oClasses.sSortIcon; i.appendChild(f); c.appendChild(i) } } if (a.oFeatures.bSort) for (b =
0; b < a.aoColumns.length; b++) !1 !== a.aoColumns[b].bSortable ? ia(a, a.aoColumns[b].nTh, b) : h(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone); "" !== a.oClasses.sFooterTH && h(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH); if (null !== a.nTFoot) { c = N(a, null, a.aoFooter); b = 0; for (d = a.aoColumns.length; b < d; b++) c[b] && (a.aoColumns[b].nTf = c[b], a.aoColumns[b].sClass && h(c[b]).addClass(a.aoColumns[b].sClass)) } 
            } function W(a, b, c) {
                var d, i, f, g = [], e = [], h = a.aoColumns.length, j; c === n && (c = !1); d = 0; for (i =
b.length; d < i; d++) { g[d] = b[d].slice(); g[d].nTr = b[d].nTr; for (f = h - 1; 0 <= f; f--) !a.aoColumns[f].bVisible && !c && g[d].splice(f, 1); e.push([]) } d = 0; for (i = g.length; d < i; d++) { if (a = g[d].nTr) for (; f = a.firstChild; ) a.removeChild(f); f = 0; for (b = g[d].length; f < b; f++) if (j = h = 1, e[d][f] === n) { a.appendChild(g[d][f].cell); for (e[d][f] = 1; g[d + h] !== n && g[d][f].cell == g[d + h][f].cell; ) e[d + h][f] = 1, h++; for (; g[d][f + j] !== n && g[d][f].cell == g[d][f + j].cell; ) { for (c = 0; c < h; c++) e[d + c][f + j] = 1; j++ } g[d][f].cell.rowSpan = h; g[d][f].cell.colSpan = j } } 
            } function x(a) {
                var b =
A(a, "aoPreDrawCallback", "preDraw", [a]); if (-1 !== h.inArray(!1, b)) E(a, !1); else {
                    var c, d, b = [], i = 0, f = a.asStripeClasses.length; c = a.aoOpenRows.length; a.bDrawing = !0; a.iInitDisplayStart !== n && -1 != a.iInitDisplayStart && (a._iDisplayStart = a.oFeatures.bServerSide ? a.iInitDisplayStart : a.iInitDisplayStart >= a.fnRecordsDisplay() ? 0 : a.iInitDisplayStart, a.iInitDisplayStart = -1, y(a)); if (a.bDeferLoading) a.bDeferLoading = !1, a.iDraw++; else if (a.oFeatures.bServerSide) { if (!a.bDestroying && !wa(a)) return } else a.iDraw++; if (0 !== a.aiDisplay.length) {
                        var g =
a._iDisplayStart; d = a._iDisplayEnd; a.oFeatures.bServerSide && (g = 0, d = a.aoData.length); for (; g < d; g++) { var e = a.aoData[a.aiDisplay[g]]; null === e.nTr && ea(a, a.aiDisplay[g]); var j = e.nTr; if (0 !== f) { var o = a.asStripeClasses[i % f]; e._sRowStripe != o && (h(j).removeClass(e._sRowStripe).addClass(o), e._sRowStripe = o) } A(a, "aoRowCallback", null, [j, a.aoData[a.aiDisplay[g]]._aData, i, g]); b.push(j); i++; if (0 !== c) for (e = 0; e < c; e++) if (j == a.aoOpenRows[e].nParent) { b.push(a.aoOpenRows[e].nTr); break } } 
                    } else b[0] = l.createElement("tr"), a.asStripeClasses[0] &&
(b[0].className = a.asStripeClasses[0]), c = a.oLanguage, f = c.sZeroRecords, 1 == a.iDraw && null !== a.sAjaxSource && !a.oFeatures.bServerSide ? f = c.sLoadingRecords : c.sEmptyTable && 0 === a.fnRecordsTotal() && (f = c.sEmptyTable), c = l.createElement("td"), c.setAttribute("valign", "top"), c.colSpan = t(a), c.className = a.oClasses.sRowEmpty, c.innerHTML = ja(a, f), b[i].appendChild(c); A(a, "aoHeaderCallback", "header", [h(a.nTHead).children("tr")[0], Z(a), a._iDisplayStart, a.fnDisplayEnd(), a.aiDisplay]); A(a, "aoFooterCallback", "footer", [h(a.nTFoot).children("tr")[0],
Z(a), a._iDisplayStart, a.fnDisplayEnd(), a.aiDisplay]); i = l.createDocumentFragment(); c = l.createDocumentFragment(); if (a.nTBody) { f = a.nTBody.parentNode; c.appendChild(a.nTBody); if (!a.oScroll.bInfinite || !a._bInitComplete || a.bSorted || a.bFiltered) for (; c = a.nTBody.firstChild; ) a.nTBody.removeChild(c); c = 0; for (d = b.length; c < d; c++) i.appendChild(b[c]); a.nTBody.appendChild(i); null !== f && f.appendChild(a.nTBody) } A(a, "aoDrawCallback", "draw", [a]); a.bSorted = !1; a.bFiltered = !1; a.bDrawing = !1; a.oFeatures.bServerSide && (E(a, !1),
a._bInitComplete || $(a))
                } 
            } function aa(a) { a.oFeatures.bSort ? O(a, a.oPreviousSearch) : a.oFeatures.bFilter ? K(a, a.oPreviousSearch) : (y(a), x(a)) } function xa(a) {
                var b = h("<div></div>")[0]; a.nTable.parentNode.insertBefore(b, a.nTable); a.nTableWrapper = h('<div id="' + a.sTableId + '_wrapper" class="' + a.oClasses.sWrapper + '" role="grid"></div>')[0]; a.nTableReinsertBefore = a.nTable.nextSibling; for (var c = a.nTableWrapper, d = a.sDom.split(""), i, f, g, e, w, o, k, m = 0; m < d.length; m++) {
                    f = 0; g = d[m]; if ("<" == g) {
                        e = h("<div></div>")[0]; w = d[m +
1]; if ("'" == w || '"' == w) { o = ""; for (k = 2; d[m + k] != w; ) o += d[m + k], k++; "H" == o ? o = a.oClasses.sJUIHeader : "F" == o && (o = a.oClasses.sJUIFooter); -1 != o.indexOf(".") ? (w = o.split("."), e.id = w[0].substr(1, w[0].length - 1), e.className = w[1]) : "#" == o.charAt(0) ? e.id = o.substr(1, o.length - 1) : e.className = o; m += k } c.appendChild(e); c = e
                    } else if (">" == g) c = c.parentNode; else if ("l" == g && a.oFeatures.bPaginate && a.oFeatures.bLengthChange) i = ya(a), f = 1; else if ("f" == g && a.oFeatures.bFilter) i = za(a), f = 1; else if ("r" == g && a.oFeatures.bProcessing) i = Aa(a), f =
1; else if ("t" == g) i = Ba(a), f = 1; else if ("i" == g && a.oFeatures.bInfo) i = Ca(a), f = 1; else if ("p" == g && a.oFeatures.bPaginate) i = Da(a), f = 1; else if (0 !== j.ext.aoFeatures.length) { e = j.ext.aoFeatures; k = 0; for (w = e.length; k < w; k++) if (g == e[k].cFeature) { (i = e[k].fnInit(a)) && (f = 1); break } } 1 == f && null !== i && ("object" !== typeof a.aanFeatures[g] && (a.aanFeatures[g] = []), a.aanFeatures[g].push(i), c.appendChild(i))
                } b.parentNode.replaceChild(a.nTableWrapper, b)
            } function V(a, b) {
                var c = h(b).children("tr"), d, i, f, g, e, j, o, k, m, p; a.splice(0, a.length);
                f = 0; for (j = c.length; f < j; f++) a.push([]); f = 0; for (j = c.length; f < j; f++) { d = c[f]; for (i = d.firstChild; i; ) { if ("TD" == i.nodeName.toUpperCase() || "TH" == i.nodeName.toUpperCase()) { k = 1 * i.getAttribute("colspan"); m = 1 * i.getAttribute("rowspan"); k = !k || 0 === k || 1 === k ? 1 : k; m = !m || 0 === m || 1 === m ? 1 : m; g = 0; for (e = a[f]; e[g]; ) g++; o = g; p = 1 === k ? !0 : !1; for (e = 0; e < k; e++) for (g = 0; g < m; g++) a[f + g][o + e] = { cell: i, unique: p }, a[f + g].nTr = d } i = i.nextSibling } } 
            } function N(a, b, c) {
                var d = []; c || (c = a.aoHeader, b && (c = [], V(c, b))); for (var b = 0, i = c.length; b < i; b++) for (var f =
0, g = c[b].length; f < g; f++) if (c[b][f].unique && (!d[f] || !a.bSortCellsTop)) d[f] = c[b][f].cell; return d
            } function wa(a) { if (a.bAjaxDataGet) { a.iDraw++; E(a, !0); var b = Ea(a); ka(a, b); a.fnServerData.call(a.oInstance, a.sAjaxSource, b, function (b) { Fa(a, b) }, a); return !1 } return !0 } function Ea(a) {
                var b = a.aoColumns.length, c = [], d, i, f, g; c.push({ name: "sEcho", value: a.iDraw }); c.push({ name: "iColumns", value: b }); c.push({ name: "sColumns", value: M(a) }); c.push({ name: "iDisplayStart", value: a._iDisplayStart }); c.push({ name: "iDisplayLength",
                    value: !1 !== a.oFeatures.bPaginate ? a._iDisplayLength : -1
                }); for (f = 0; f < b; f++) d = a.aoColumns[f].mData, c.push({ name: "mDataProp_" + f, value: "function" === typeof d ? "function" : d }); if (!1 !== a.oFeatures.bFilter) { c.push({ name: "sSearch", value: a.oPreviousSearch.sSearch }); c.push({ name: "bRegex", value: a.oPreviousSearch.bRegex }); for (f = 0; f < b; f++) c.push({ name: "sSearch_" + f, value: a.aoPreSearchCols[f].sSearch }), c.push({ name: "bRegex_" + f, value: a.aoPreSearchCols[f].bRegex }), c.push({ name: "bSearchable_" + f, value: a.aoColumns[f].bSearchable }) } if (!1 !==
a.oFeatures.bSort) { var e = 0; d = null !== a.aaSortingFixed ? a.aaSortingFixed.concat(a.aaSorting) : a.aaSorting.slice(); for (f = 0; f < d.length; f++) { i = a.aoColumns[d[f][0]].aDataSort; for (g = 0; g < i.length; g++) c.push({ name: "iSortCol_" + e, value: i[g] }), c.push({ name: "sSortDir_" + e, value: d[f][1] }), e++ } c.push({ name: "iSortingCols", value: e }); for (f = 0; f < b; f++) c.push({ name: "bSortable_" + f, value: a.aoColumns[f].bSortable }) } return c
            } function ka(a, b) { A(a, "aoServerParams", "serverParams", [b]) } function Fa(a, b) {
                if (b.sEcho !== n) {
                    if (1 * b.sEcho <
a.iDraw) return; a.iDraw = 1 * b.sEcho
                } (!a.oScroll.bInfinite || a.oScroll.bInfinite && (a.bSorted || a.bFiltered)) && ga(a); a._iRecordsTotal = parseInt(b.iTotalRecords, 10); a._iRecordsDisplay = parseInt(b.iTotalDisplayRecords, 10); var c = M(a), c = b.sColumns !== n && "" !== c && b.sColumns != c, d; c && (d = u(a, b.sColumns)); for (var i = Q(a.sAjaxDataProp)(b), f = 0, g = i.length; f < g; f++) if (c) { for (var e = [], h = 0, j = a.aoColumns.length; h < j; h++) e.push(i[f][d[h]]); H(a, e) } else H(a, i[f]); a.aiDisplay = a.aiDisplayMaster.slice(); a.bAjaxDataGet = !1; x(a); a.bAjaxDataGet =
!0; E(a, !1)
            } function za(a) {
                var b = a.oPreviousSearch, c = a.oLanguage.sSearch, c = -1 !== c.indexOf("_INPUT_") ? c.replace("_INPUT_", '<input type="text" />') : "" === c ? '<input type="text" />' : c + ' <input type="text" />', d = l.createElement("div"); d.className = a.oClasses.sFilter; d.innerHTML = "<label>" + c + "</label>"; a.aanFeatures.f || (d.id = a.sTableId + "_filter"); c = h('input[type="text"]', d); d._DT_Input = c[0]; c.val(b.sSearch.replace('"', "&quot;")); c.bind("keyup.DT", function () {
                    for (var c = a.aanFeatures.f, d = this.value === "" ? "" : this.value,
g = 0, e = c.length; g < e; g++) c[g] != h(this).parents("div.dataTables_filter")[0] && h(c[g]._DT_Input).val(d); d != b.sSearch && K(a, { sSearch: d, bRegex: b.bRegex, bSmart: b.bSmart, bCaseInsensitive: b.bCaseInsensitive })
                }); c.attr("aria-controls", a.sTableId).bind("keypress.DT", function (a) { if (a.keyCode == 13) return false }); return d
            } function K(a, b, c) {
                var d = a.oPreviousSearch, i = a.aoPreSearchCols, f = function (a) { d.sSearch = a.sSearch; d.bRegex = a.bRegex; d.bSmart = a.bSmart; d.bCaseInsensitive = a.bCaseInsensitive }; if (a.oFeatures.bServerSide) f(b);
                else { Ga(a, b.sSearch, c, b.bRegex, b.bSmart, b.bCaseInsensitive); f(b); for (b = 0; b < a.aoPreSearchCols.length; b++) Ha(a, i[b].sSearch, b, i[b].bRegex, i[b].bSmart, i[b].bCaseInsensitive); Ia(a) } a.bFiltered = !0; h(a.oInstance).trigger("filter", a); a._iDisplayStart = 0; y(a); x(a); la(a, 0)
            } function Ia(a) { for (var b = j.ext.afnFiltering, c = r(a, "bSearchable"), d = 0, i = b.length; d < i; d++) for (var f = 0, g = 0, e = a.aiDisplay.length; g < e; g++) { var h = a.aiDisplay[g - f]; b[d](a, Y(a, h, "filter", c), h) || (a.aiDisplay.splice(g - f, 1), f++) } } function Ha(a, b, c,
d, i, f) { if ("" !== b) for (var g = 0, b = ma(b, d, i, f), d = a.aiDisplay.length - 1; 0 <= d; d--) i = Ja(v(a, a.aiDisplay[d], c, "filter"), a.aoColumns[c].sType), b.test(i) || (a.aiDisplay.splice(d, 1), g++) } function Ga(a, b, c, d, i, f) {
    d = ma(b, d, i, f); i = a.oPreviousSearch; c || (c = 0); 0 !== j.ext.afnFiltering.length && (c = 1); if (0 >= b.length) a.aiDisplay.splice(0, a.aiDisplay.length), a.aiDisplay = a.aiDisplayMaster.slice(); else if (a.aiDisplay.length == a.aiDisplayMaster.length || i.sSearch.length > b.length || 1 == c || 0 !== b.indexOf(i.sSearch)) {
        a.aiDisplay.splice(0,
a.aiDisplay.length); la(a, 1); for (b = 0; b < a.aiDisplayMaster.length; b++) d.test(a.asDataSearch[b]) && a.aiDisplay.push(a.aiDisplayMaster[b])
    } else for (b = c = 0; b < a.asDataSearch.length; b++) d.test(a.asDataSearch[b]) || (a.aiDisplay.splice(b - c, 1), c++)
} function la(a, b) { if (!a.oFeatures.bServerSide) { a.asDataSearch = []; for (var c = r(a, "bSearchable"), d = 1 === b ? a.aiDisplayMaster : a.aiDisplay, i = 0, f = d.length; i < f; i++) a.asDataSearch[i] = na(a, Y(a, d[i], "filter", c)) } } function na(a, b) {
    var c = b.join("  "); -1 !== c.indexOf("&") && (c = h("<div>").html(c).text());
    return c.replace(/[\n\r]/g, " ")
} function ma(a, b, c, d) { if (c) return a = b ? a.split(" ") : oa(a).split(" "), a = "^(?=.*?" + a.join(")(?=.*?") + ").*$", RegExp(a, d ? "i" : ""); a = b ? a : oa(a); return RegExp(a, d ? "i" : "") } function Ja(a, b) { return "function" === typeof j.ext.ofnSearch[b] ? j.ext.ofnSearch[b](a) : null === a ? "" : "html" == b ? a.replace(/[\r\n]/g, " ").replace(/<.*?>/g, "") : "string" === typeof a ? a.replace(/[\r\n]/g, " ") : a } function oa(a) {
    return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)", "g"),
"\\$1")
} function Ca(a) { var b = l.createElement("div"); b.className = a.oClasses.sInfo; a.aanFeatures.i || (a.aoDrawCallback.push({ fn: Ka, sName: "information" }), b.id = a.sTableId + "_info"); a.nTable.setAttribute("aria-describedby", a.sTableId + "_info"); return b } function Ka(a) {
    if (a.oFeatures.bInfo && 0 !== a.aanFeatures.i.length) {
        var b = a.oLanguage, c = a._iDisplayStart + 1, d = a.fnDisplayEnd(), i = a.fnRecordsTotal(), f = a.fnRecordsDisplay(), g; g = 0 === f ? b.sInfoEmpty : b.sInfo; f != i && (g += " " + b.sInfoFiltered); g += b.sInfoPostFix; g = ja(a, g);
        null !== b.fnInfoCallback && (g = b.fnInfoCallback.call(a.oInstance, a, c, d, i, f, g)); a = a.aanFeatures.i; b = 0; for (c = a.length; b < c; b++) h(a[b]).html(g)
    } 
} function ja(a, b) { var c = a.fnFormatNumber(a._iDisplayStart + 1), d = a.fnDisplayEnd(), d = a.fnFormatNumber(d), i = a.fnRecordsDisplay(), i = a.fnFormatNumber(i), f = a.fnRecordsTotal(), f = a.fnFormatNumber(f); a.oScroll.bInfinite && (c = a.fnFormatNumber(1)); return b.replace(/_START_/g, c).replace(/_END_/g, d).replace(/_TOTAL_/g, i).replace(/_MAX_/g, f) } function ba(a) {
    var b, c, d = a.iInitDisplayStart;
    if (!1 === a.bInitialised) setTimeout(function () { ba(a) }, 200); else {
        xa(a); va(a); W(a, a.aoHeader); a.nTFoot && W(a, a.aoFooter); E(a, !0); a.oFeatures.bAutoWidth && da(a); b = 0; for (c = a.aoColumns.length; b < c; b++) null !== a.aoColumns[b].sWidth && (a.aoColumns[b].nTh.style.width = q(a.aoColumns[b].sWidth)); a.oFeatures.bSort ? O(a) : a.oFeatures.bFilter ? K(a, a.oPreviousSearch) : (a.aiDisplay = a.aiDisplayMaster.slice(), y(a), x(a)); null !== a.sAjaxSource && !a.oFeatures.bServerSide ? (c = [], ka(a, c), a.fnServerData.call(a.oInstance, a.sAjaxSource,
c, function (c) { var f = a.sAjaxDataProp !== "" ? Q(a.sAjaxDataProp)(c) : c; for (b = 0; b < f.length; b++) H(a, f[b]); a.iInitDisplayStart = d; if (a.oFeatures.bSort) O(a); else { a.aiDisplay = a.aiDisplayMaster.slice(); y(a); x(a) } E(a, false); $(a, c) }, a)) : a.oFeatures.bServerSide || (E(a, !1), $(a))
    } 
} function $(a, b) { a._bInitComplete = !0; A(a, "aoInitComplete", "init", [a, b]) } function pa(a) {
    var b = j.defaults.oLanguage; !a.sEmptyTable && (a.sZeroRecords && "No data available in table" === b.sEmptyTable) && p(a, a, "sZeroRecords", "sEmptyTable"); !a.sLoadingRecords &&
(a.sZeroRecords && "Loading..." === b.sLoadingRecords) && p(a, a, "sZeroRecords", "sLoadingRecords")
} function ya(a) {
    if (a.oScroll.bInfinite) return null; var b = '<select size="1" ' + ('name="' + a.sTableId + '_length"') + ">", c, d, i = a.aLengthMenu; if (2 == i.length && "object" === typeof i[0] && "object" === typeof i[1]) { c = 0; for (d = i[0].length; c < d; c++) b += '<option value="' + i[0][c] + '">' + i[1][c] + "</option>" } else { c = 0; for (d = i.length; c < d; c++) b += '<option value="' + i[c] + '">' + i[c] + "</option>" } b += "</select>"; i = l.createElement("div"); a.aanFeatures.l ||
(i.id = a.sTableId + "_length"); i.className = a.oClasses.sLength; i.innerHTML = "<label>" + a.oLanguage.sLengthMenu.replace("_MENU_", b) + "</label>"; h('select option[value="' + a._iDisplayLength + '"]', i).attr("selected", !0); h("select", i).bind("change.DT", function () {
    var b = h(this).val(), i = a.aanFeatures.l; c = 0; for (d = i.length; c < d; c++) i[c] != this.parentNode && h("select", i[c]).val(b); a._iDisplayLength = parseInt(b, 10); y(a); if (a.fnDisplayEnd() == a.fnRecordsDisplay()) {
        a._iDisplayStart = a.fnDisplayEnd() - a._iDisplayLength; if (a._iDisplayStart <
0) a._iDisplayStart = 0
    } if (a._iDisplayLength == -1) a._iDisplayStart = 0; x(a)
}); h("select", i).attr("aria-controls", a.sTableId); return i
} function y(a) { a._iDisplayEnd = !1 === a.oFeatures.bPaginate ? a.aiDisplay.length : a._iDisplayStart + a._iDisplayLength > a.aiDisplay.length || -1 == a._iDisplayLength ? a.aiDisplay.length : a._iDisplayStart + a._iDisplayLength } function Da(a) {
    if (a.oScroll.bInfinite) return null; var b = l.createElement("div"); b.className = a.oClasses.sPaging + a.sPaginationType; j.ext.oPagination[a.sPaginationType].fnInit(a,
b, function (a) { y(a); x(a) }); a.aanFeatures.p || a.aoDrawCallback.push({ fn: function (a) { j.ext.oPagination[a.sPaginationType].fnUpdate(a, function (a) { y(a); x(a) }) }, sName: "pagination" }); return b
} function qa(a, b) {
    var c = a._iDisplayStart; if ("number" === typeof b) a._iDisplayStart = b * a._iDisplayLength, a._iDisplayStart > a.fnRecordsDisplay() && (a._iDisplayStart = 0); else if ("first" == b) a._iDisplayStart = 0; else if ("previous" == b) a._iDisplayStart = 0 <= a._iDisplayLength ? a._iDisplayStart - a._iDisplayLength : 0, 0 > a._iDisplayStart && (a._iDisplayStart =
0); else if ("next" == b) 0 <= a._iDisplayLength ? a._iDisplayStart + a._iDisplayLength < a.fnRecordsDisplay() && (a._iDisplayStart += a._iDisplayLength) : a._iDisplayStart = 0; else if ("last" == b) if (0 <= a._iDisplayLength) { var d = parseInt((a.fnRecordsDisplay() - 1) / a._iDisplayLength, 10) + 1; a._iDisplayStart = (d - 1) * a._iDisplayLength } else a._iDisplayStart = 0; else D(a, 0, "Unknown paging action: " + b); h(a.oInstance).trigger("page", a); return c != a._iDisplayStart
} function Aa(a) {
    var b = l.createElement("div"); a.aanFeatures.r || (b.id = a.sTableId +
"_processing"); b.innerHTML = a.oLanguage.sProcessing; b.className = a.oClasses.sProcessing; a.nTable.parentNode.insertBefore(b, a.nTable); return b
} function E(a, b) { if (a.oFeatures.bProcessing) for (var c = a.aanFeatures.r, d = 0, i = c.length; d < i; d++) c[d].style.visibility = b ? "visible" : "hidden"; h(a.oInstance).trigger("processing", [a, b]) } function Ba(a) {
    if ("" === a.oScroll.sX && "" === a.oScroll.sY) return a.nTable; var b = l.createElement("div"), c = l.createElement("div"), d = l.createElement("div"), i = l.createElement("div"), f = l.createElement("div"),
g = l.createElement("div"), e = a.nTable.cloneNode(!1), j = a.nTable.cloneNode(!1), o = a.nTable.getElementsByTagName("thead")[0], k = 0 === a.nTable.getElementsByTagName("tfoot").length ? null : a.nTable.getElementsByTagName("tfoot")[0], m = a.oClasses; c.appendChild(d); f.appendChild(g); i.appendChild(a.nTable); b.appendChild(c); b.appendChild(i); d.appendChild(e); e.appendChild(o); null !== k && (b.appendChild(f), g.appendChild(j), j.appendChild(k)); b.className = m.sScrollWrapper; c.className = m.sScrollHead; d.className = m.sScrollHeadInner;
    i.className = m.sScrollBody; f.className = m.sScrollFoot; g.className = m.sScrollFootInner; a.oScroll.bAutoCss && (c.style.overflow = "hidden", c.style.position = "relative", f.style.overflow = "hidden", i.style.overflow = "auto"); c.style.border = "0"; c.style.width = "100%"; f.style.border = "0"; d.style.width = "" !== a.oScroll.sXInner ? a.oScroll.sXInner : "100%"; e.removeAttribute("id"); e.style.marginLeft = "0"; a.nTable.style.marginLeft = "0"; null !== k && (j.removeAttribute("id"), j.style.marginLeft = "0"); d = h(a.nTable).children("caption"); 0 <
d.length && (d = d[0], "top" === d._captionSide ? e.appendChild(d) : "bottom" === d._captionSide && k && j.appendChild(d)); "" !== a.oScroll.sX && (c.style.width = q(a.oScroll.sX), i.style.width = q(a.oScroll.sX), null !== k && (f.style.width = q(a.oScroll.sX)), h(i).scroll(function () { c.scrollLeft = this.scrollLeft; if (k !== null) f.scrollLeft = this.scrollLeft })); "" !== a.oScroll.sY && (i.style.height = q(a.oScroll.sY)); a.aoDrawCallback.push({ fn: La, sName: "scrolling" }); a.oScroll.bInfinite && h(i).scroll(function () {
    if (!a.bDrawing && h(this).scrollTop() !==
0 && h(this).scrollTop() + h(this).height() > h(a.nTable).height() - a.oScroll.iLoadGap && a.fnDisplayEnd() < a.fnRecordsDisplay()) { qa(a, "next"); y(a); x(a) } 
}); a.nScrollHead = c; a.nScrollFoot = f; return b
} function La(a) {
    var b = a.nScrollHead.getElementsByTagName("div")[0], c = b.getElementsByTagName("table")[0], d = a.nTable.parentNode, i, f, g, e, j, o, k, m, p = [], n = [], l = null !== a.nTFoot ? a.nScrollFoot.getElementsByTagName("div")[0] : null, R = null !== a.nTFoot ? l.getElementsByTagName("table")[0] : null, r = a.oBrowser.bScrollOversize, s = function (a) {
        k =
a.style; k.paddingTop = "0"; k.paddingBottom = "0"; k.borderTopWidth = "0"; k.borderBottomWidth = "0"; k.height = 0
    }; h(a.nTable).children("thead, tfoot").remove(); i = h(a.nTHead).clone()[0]; a.nTable.insertBefore(i, a.nTable.childNodes[0]); g = a.nTHead.getElementsByTagName("tr"); e = i.getElementsByTagName("tr"); null !== a.nTFoot && (j = h(a.nTFoot).clone()[0], a.nTable.insertBefore(j, a.nTable.childNodes[1]), o = a.nTFoot.getElementsByTagName("tr"), j = j.getElementsByTagName("tr")); "" === a.oScroll.sX && (d.style.width = "100%", b.parentNode.style.width =
"100%"); var t = N(a, i); i = 0; for (f = t.length; i < f; i++) m = G(a, i), t[i].style.width = a.aoColumns[m].sWidth; null !== a.nTFoot && C(function (a) { a.style.width = "" }, j); a.oScroll.bCollapse && "" !== a.oScroll.sY && (d.style.height = d.offsetHeight + a.nTHead.offsetHeight + "px"); i = h(a.nTable).outerWidth(); if ("" === a.oScroll.sX) { if (a.nTable.style.width = "100%", r && (h("tbody", d).height() > d.offsetHeight || "scroll" == h(d).css("overflow-y"))) a.nTable.style.width = q(h(a.nTable).outerWidth() - a.oScroll.iBarWidth) } else "" !== a.oScroll.sXInner ? a.nTable.style.width =
q(a.oScroll.sXInner) : i == h(d).width() && h(d).height() < h(a.nTable).height() ? (a.nTable.style.width = q(i - a.oScroll.iBarWidth), h(a.nTable).outerWidth() > i - a.oScroll.iBarWidth && (a.nTable.style.width = q(i))) : a.nTable.style.width = q(i); i = h(a.nTable).outerWidth(); C(s, e); C(function (a) { p.push(q(h(a).width())) }, e); C(function (a, b) { a.style.width = p[b] }, g); h(e).height(0); null !== a.nTFoot && (C(s, j), C(function (a) { n.push(q(h(a).width())) }, j), C(function (a, b) { a.style.width = n[b] }, o), h(j).height(0)); C(function (a, b) {
    a.innerHTML =
""; a.style.width = p[b]
}, e); null !== a.nTFoot && C(function (a, b) { a.innerHTML = ""; a.style.width = n[b] }, j); if (h(a.nTable).outerWidth() < i) {
        g = d.scrollHeight > d.offsetHeight || "scroll" == h(d).css("overflow-y") ? i + a.oScroll.iBarWidth : i; if (r && (d.scrollHeight > d.offsetHeight || "scroll" == h(d).css("overflow-y"))) a.nTable.style.width = q(g - a.oScroll.iBarWidth); d.style.width = q(g); a.nScrollHead.style.width = q(g); null !== a.nTFoot && (a.nScrollFoot.style.width = q(g)); "" === a.oScroll.sX ? D(a, 1, "The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width.") :
"" !== a.oScroll.sXInner && D(a, 1, "The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")
    } else d.style.width = q("100%"), a.nScrollHead.style.width = q("100%"), null !== a.nTFoot && (a.nScrollFoot.style.width = q("100%")); "" === a.oScroll.sY && r && (d.style.height = q(a.nTable.offsetHeight + a.oScroll.iBarWidth)); "" !== a.oScroll.sY && a.oScroll.bCollapse && (d.style.height = q(a.oScroll.sY), r = "" !== a.oScroll.sX && a.nTable.offsetWidth >
d.offsetWidth ? a.oScroll.iBarWidth : 0, a.nTable.offsetHeight < d.offsetHeight && (d.style.height = q(a.nTable.offsetHeight + r))); r = h(a.nTable).outerWidth(); c.style.width = q(r); b.style.width = q(r); c = h(a.nTable).height() > d.clientHeight || "scroll" == h(d).css("overflow-y"); b.style.paddingRight = c ? a.oScroll.iBarWidth + "px" : "0px"; null !== a.nTFoot && (R.style.width = q(r), l.style.width = q(r), l.style.paddingRight = c ? a.oScroll.iBarWidth + "px" : "0px"); h(d).scroll(); if (a.bSorted || a.bFiltered) d.scrollTop = 0
} function C(a, b, c) {
    for (var d =
0, i = 0, f = b.length, g, e; i < f; ) { g = b[i].firstChild; for (e = c ? c[i].firstChild : null; g; ) 1 === g.nodeType && (c ? a(g, e, d) : a(g, d), d++), g = g.nextSibling, e = c ? e.nextSibling : null; i++ } 
} function Ma(a, b) { if (!a || null === a || "" === a) return 0; b || (b = l.body); var c, d = l.createElement("div"); d.style.width = q(a); b.appendChild(d); c = d.offsetWidth; b.removeChild(d); return c } function da(a) {
    var b = 0, c, d = 0, i = a.aoColumns.length, f, e, j = h("th", a.nTHead), o = a.nTable.getAttribute("width"); e = a.nTable.parentNode; for (f = 0; f < i; f++) a.aoColumns[f].bVisible &&
(d++, null !== a.aoColumns[f].sWidth && (c = Ma(a.aoColumns[f].sWidthOrig, e), null !== c && (a.aoColumns[f].sWidth = q(c)), b++)); if (i == j.length && 0 === b && d == i && "" === a.oScroll.sX && "" === a.oScroll.sY) for (f = 0; f < a.aoColumns.length; f++) c = h(j[f]).width(), null !== c && (a.aoColumns[f].sWidth = q(c)); else {
        b = a.nTable.cloneNode(!1); f = a.nTHead.cloneNode(!0); d = l.createElement("tbody"); c = l.createElement("tr"); b.removeAttribute("id"); b.appendChild(f); null !== a.nTFoot && (b.appendChild(a.nTFoot.cloneNode(!0)), C(function (a) {
            a.style.width =
""
        }, b.getElementsByTagName("tr"))); b.appendChild(d); d.appendChild(c); d = h("thead th", b); 0 === d.length && (d = h("tbody tr:eq(0)>td", b)); j = N(a, f); for (f = d = 0; f < i; f++) { var k = a.aoColumns[f]; k.bVisible && null !== k.sWidthOrig && "" !== k.sWidthOrig ? j[f - d].style.width = q(k.sWidthOrig) : k.bVisible ? j[f - d].style.width = "" : d++ } for (f = 0; f < i; f++) a.aoColumns[f].bVisible && (d = Na(a, f), null !== d && (d = d.cloneNode(!0), "" !== a.aoColumns[f].sContentPadding && (d.innerHTML += a.aoColumns[f].sContentPadding), c.appendChild(d))); e.appendChild(b);
        "" !== a.oScroll.sX && "" !== a.oScroll.sXInner ? b.style.width = q(a.oScroll.sXInner) : "" !== a.oScroll.sX ? (b.style.width = "", h(b).width() < e.offsetWidth && (b.style.width = q(e.offsetWidth))) : "" !== a.oScroll.sY ? b.style.width = q(e.offsetWidth) : o && (b.style.width = q(o)); b.style.visibility = "hidden"; Oa(a, b); i = h("tbody tr:eq(0)", b).children(); 0 === i.length && (i = N(a, h("thead", b)[0])); if ("" !== a.oScroll.sX) {
            for (f = d = e = 0; f < a.aoColumns.length; f++) a.aoColumns[f].bVisible && (e = null === a.aoColumns[f].sWidthOrig ? e + h(i[d]).outerWidth() :
e + (parseInt(a.aoColumns[f].sWidth.replace("px", ""), 10) + (h(i[d]).outerWidth() - h(i[d]).width())), d++); b.style.width = q(e); a.nTable.style.width = q(e)
        } for (f = d = 0; f < a.aoColumns.length; f++) a.aoColumns[f].bVisible && (e = h(i[d]).width(), null !== e && 0 < e && (a.aoColumns[f].sWidth = q(e)), d++); i = h(b).css("width"); a.nTable.style.width = -1 !== i.indexOf("%") ? i : q(h(b).outerWidth()); b.parentNode.removeChild(b)
    } o && (a.nTable.style.width = q(o))
} function Oa(a, b) {
    "" === a.oScroll.sX && "" !== a.oScroll.sY ? (h(b).width(), b.style.width = q(h(b).outerWidth() -
a.oScroll.iBarWidth)) : "" !== a.oScroll.sX && (b.style.width = q(h(b).outerWidth()))
} function Na(a, b) { var c = Pa(a, b); if (0 > c) return null; if (null === a.aoData[c].nTr) { var d = l.createElement("td"); d.innerHTML = v(a, c, b, ""); return d } return J(a, c)[b] } function Pa(a, b) { for (var c = -1, d = -1, i = 0; i < a.aoData.length; i++) { var e = v(a, i, b, "display") + "", e = e.replace(/<.*?>/g, ""); e.length > c && (c = e.length, d = i) } return d } function q(a) {
    if (null === a) return "0px"; if ("number" == typeof a) return 0 > a ? "0px" : a + "px"; var b = a.charCodeAt(a.length - 1);
    return 48 > b || 57 < b ? a : a + "px"
} function Qa() { var a = l.createElement("p"), b = a.style; b.width = "100%"; b.height = "200px"; b.padding = "0px"; var c = l.createElement("div"), b = c.style; b.position = "absolute"; b.top = "0px"; b.left = "0px"; b.visibility = "hidden"; b.width = "200px"; b.height = "150px"; b.padding = "0px"; b.overflow = "hidden"; c.appendChild(a); l.body.appendChild(c); b = a.offsetWidth; c.style.overflow = "scroll"; a = a.offsetWidth; b == a && (a = c.clientWidth); l.body.removeChild(c); return b - a } function O(a, b) {
    var c, d, i, e, g, k, o = [], m = [], p =
j.ext.oSort, l = a.aoData, q = a.aoColumns, G = a.oLanguage.oAria; if (!a.oFeatures.bServerSide && (0 !== a.aaSorting.length || null !== a.aaSortingFixed)) {
        o = null !== a.aaSortingFixed ? a.aaSortingFixed.concat(a.aaSorting) : a.aaSorting.slice(); for (c = 0; c < o.length; c++) if (d = o[c][0], i = R(a, d), e = a.aoColumns[d].sSortDataType, j.ext.afnSortData[e]) if (g = j.ext.afnSortData[e].call(a.oInstance, a, d, i), g.length === l.length) { i = 0; for (e = l.length; i < e; i++) F(a, i, d, g[i]) } else D(a, 0, "Returned data sort array (col " + d + ") is the wrong length"); c =
0; for (d = a.aiDisplayMaster.length; c < d; c++) m[a.aiDisplayMaster[c]] = c; var r = o.length, s; c = 0; for (d = l.length; c < d; c++) for (i = 0; i < r; i++) { s = q[o[i][0]].aDataSort; g = 0; for (k = s.length; g < k; g++) e = q[s[g]].sType, e = p[(e ? e : "string") + "-pre"], l[c]._aSortData[s[g]] = e ? e(v(a, c, s[g], "sort")) : v(a, c, s[g], "sort") } a.aiDisplayMaster.sort(function (a, b) {
    var c, d, e, i, f; for (c = 0; c < r; c++) {
        f = q[o[c][0]].aDataSort; d = 0; for (e = f.length; d < e; d++) if (i = q[f[d]].sType, i = p[(i ? i : "string") + "-" + o[c][1]](l[a]._aSortData[f[d]], l[b]._aSortData[f[d]]), 0 !==
i) return i
    } return p["numeric-asc"](m[a], m[b])
})
    } (b === n || b) && !a.oFeatures.bDeferRender && P(a); c = 0; for (d = a.aoColumns.length; c < d; c++) e = q[c].sTitle.replace(/<.*?>/g, ""), i = q[c].nTh, i.removeAttribute("aria-sort"), i.removeAttribute("aria-label"), q[c].bSortable ? 0 < o.length && o[0][0] == c ? (i.setAttribute("aria-sort", "asc" == o[0][1] ? "ascending" : "descending"), i.setAttribute("aria-label", e + ("asc" == (q[c].asSorting[o[0][2] + 1] ? q[c].asSorting[o[0][2] + 1] : q[c].asSorting[0]) ? G.sSortAscending : G.sSortDescending))) : i.setAttribute("aria-label",
e + ("asc" == q[c].asSorting[0] ? G.sSortAscending : G.sSortDescending)) : i.setAttribute("aria-label", e); a.bSorted = !0; h(a.oInstance).trigger("sort", a); a.oFeatures.bFilter ? K(a, a.oPreviousSearch, 1) : (a.aiDisplay = a.aiDisplayMaster.slice(), a._iDisplayStart = 0, y(a), x(a))
} function ia(a, b, c, d) {
    Ra(b, {}, function (b) {
        if (!1 !== a.aoColumns[c].bSortable) {
            var e = function () {
                var d, e; if (b.shiftKey) {
                    for (var f = !1, h = 0; h < a.aaSorting.length; h++) if (a.aaSorting[h][0] == c) {
                        f = !0; d = a.aaSorting[h][0]; e = a.aaSorting[h][2] + 1; a.aoColumns[d].asSorting[e] ?
(a.aaSorting[h][1] = a.aoColumns[d].asSorting[e], a.aaSorting[h][2] = e) : a.aaSorting.splice(h, 1); break
                    } !1 === f && a.aaSorting.push([c, a.aoColumns[c].asSorting[0], 0])
                } else 1 == a.aaSorting.length && a.aaSorting[0][0] == c ? (d = a.aaSorting[0][0], e = a.aaSorting[0][2] + 1, a.aoColumns[d].asSorting[e] || (e = 0), a.aaSorting[0][1] = a.aoColumns[d].asSorting[e], a.aaSorting[0][2] = e) : (a.aaSorting.splice(0, a.aaSorting.length), a.aaSorting.push([c, a.aoColumns[c].asSorting[0], 0])); O(a)
            }; a.oFeatures.bProcessing ? (E(a, !0), setTimeout(function () {
                e();
                a.oFeatures.bServerSide || E(a, !1)
            }, 0)) : e(); "function" == typeof d && d(a)
        } 
    })
} function P(a) {
    var b, c, d, e, f, g = a.aoColumns.length, j = a.oClasses; for (b = 0; b < g; b++) a.aoColumns[b].bSortable && h(a.aoColumns[b].nTh).removeClass(j.sSortAsc + " " + j.sSortDesc + " " + a.aoColumns[b].sSortingClass); c = null !== a.aaSortingFixed ? a.aaSortingFixed.concat(a.aaSorting) : a.aaSorting.slice(); for (b = 0; b < a.aoColumns.length; b++) if (a.aoColumns[b].bSortable) {
        f = a.aoColumns[b].sSortingClass; e = -1; for (d = 0; d < c.length; d++) if (c[d][0] == b) {
            f = "asc" == c[d][1] ?
j.sSortAsc : j.sSortDesc; e = d; break
        } h(a.aoColumns[b].nTh).addClass(f); a.bJUI && (f = h("span." + j.sSortIcon, a.aoColumns[b].nTh), f.removeClass(j.sSortJUIAsc + " " + j.sSortJUIDesc + " " + j.sSortJUI + " " + j.sSortJUIAscAllowed + " " + j.sSortJUIDescAllowed), f.addClass(-1 == e ? a.aoColumns[b].sSortingClassJUI : "asc" == c[e][1] ? j.sSortJUIAsc : j.sSortJUIDesc))
    } else h(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass); f = j.sSortColumn; if (a.oFeatures.bSort && a.oFeatures.bSortClasses) {
        a = J(a); e = []; for (b = 0; b < g; b++) e.push(""); b = 0;
        for (d = 1; b < c.length; b++) j = parseInt(c[b][0], 10), e[j] = f + d, 3 > d && d++; f = RegExp(f + "[123]"); var o; b = 0; for (c = a.length; b < c; b++) j = b % g, d = a[b].className, o = e[j], j = d.replace(f, o), j != d ? a[b].className = h.trim(j) : 0 < o.length && -1 == d.indexOf(o) && (a[b].className = d + " " + o)
    } 
} function ra(a) {
    if (a.oFeatures.bStateSave && !a.bDestroying) {
        var b, c; b = a.oScroll.bInfinite; var d = { iCreate: (new Date).getTime(), iStart: b ? 0 : a._iDisplayStart, iEnd: b ? a._iDisplayLength : a._iDisplayEnd, iLength: a._iDisplayLength, aaSorting: h.extend(!0, [], a.aaSorting),
            oSearch: h.extend(!0, {}, a.oPreviousSearch), aoSearchCols: h.extend(!0, [], a.aoPreSearchCols), abVisCols: []
        }; b = 0; for (c = a.aoColumns.length; b < c; b++) d.abVisCols.push(a.aoColumns[b].bVisible); A(a, "aoStateSaveParams", "stateSaveParams", [a, d]); a.fnStateSave.call(a.oInstance, a, d)
    } 
} function Sa(a, b) {
    if (a.oFeatures.bStateSave) {
        var c = a.fnStateLoad.call(a.oInstance, a); if (c) {
            var d = A(a, "aoStateLoadParams", "stateLoadParams", [a, c]); if (-1 === h.inArray(!1, d)) {
                a.oLoadedState = h.extend(!0, {}, c); a._iDisplayStart = c.iStart; a.iInitDisplayStart =
c.iStart; a._iDisplayEnd = c.iEnd; a._iDisplayLength = c.iLength; a.aaSorting = c.aaSorting.slice(); a.saved_aaSorting = c.aaSorting.slice(); h.extend(a.oPreviousSearch, c.oSearch); h.extend(!0, a.aoPreSearchCols, c.aoSearchCols); b.saved_aoColumns = []; for (d = 0; d < c.abVisCols.length; d++) b.saved_aoColumns[d] = {}, b.saved_aoColumns[d].bVisible = c.abVisCols[d]; A(a, "aoStateLoaded", "stateLoaded", [a, c])
            } 
        } 
    } 
} function s(a) { for (var b = 0; b < j.settings.length; b++) if (j.settings[b].nTable === a) return j.settings[b]; return null } function T(a) {
    for (var b =
[], a = a.aoData, c = 0, d = a.length; c < d; c++) null !== a[c].nTr && b.push(a[c].nTr); return b
} function J(a, b) { var c = [], d, e, f, g, h, j; e = 0; var o = a.aoData.length; b !== n && (e = b, o = b + 1); for (f = e; f < o; f++) if (j = a.aoData[f], null !== j.nTr) { e = []; for (d = j.nTr.firstChild; d; ) g = d.nodeName.toLowerCase(), ("td" == g || "th" == g) && e.push(d), d = d.nextSibling; g = d = 0; for (h = a.aoColumns.length; g < h; g++) a.aoColumns[g].bVisible ? c.push(e[g - d]) : (c.push(j._anHidden[g]), d++) } return c } function D(a, b, c) {
    a = null === a ? "DataTables warning: " + c : "DataTables warning (table id = '" +
a.sTableId + "'): " + c; if (0 === b) if ("alert" == j.ext.sErrMode) alert(a); else throw Error(a); else X.console && console.log && console.log(a)
} function p(a, b, c, d) { d === n && (d = c); b[c] !== n && (a[d] = b[c]) } function Ta(a, b) { var c, d; for (d in b) b.hasOwnProperty(d) && (c = b[d], "object" === typeof e[d] && null !== c && !1 === h.isArray(c) ? h.extend(!0, a[d], c) : a[d] = c); return a } function Ra(a, b, c) { h(a).bind("click.DT", b, function (b) { a.blur(); c(b) }).bind("keypress.DT", b, function (a) { 13 === a.which && c(a) }).bind("selectstart.DT", function () { return !1 }) }
            function z(a, b, c, d) { c && a[b].push({ fn: c, sName: d }) } function A(a, b, c, d) { for (var b = a[b], e = [], f = b.length - 1; 0 <= f; f--) e.push(b[f].fn.apply(a.oInstance, d)); null !== c && h(a.oInstance).trigger(c, d); return e } function Ua(a) {
                var b = h('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden"><div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;"><div id="DT_BrowserTest" style="width:100%; height:10px;"></div></div></div>')[0]; l.body.appendChild(b); a.oBrowser.bScrollOversize =
100 === h("#DT_BrowserTest", b)[0].offsetWidth ? !0 : !1; l.body.removeChild(b)
            } function Va(a) { return function () { var b = [s(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments)); return j.ext.oApi[a].apply(this, b) } } var U = /\[.*?\]$/, Wa = X.JSON ? JSON.stringify : function (a) {
                var b = typeof a; if ("object" !== b || null === a) return "string" === b && (a = '"' + a + '"'), a + ""; var c, d, e = [], f = h.isArray(a); for (c in a) d = a[c], b = typeof d, "string" === b ? d = '"' + d + '"' : "object" === b && null !== d && (d = Wa(d)), e.push((f ? "" : '"' + c + '":') + d); return (f ?
"[" : "{") + e + (f ? "]" : "}")
            }; this.$ = function (a, b) {
                var c, d, e = [], f; d = s(this[j.ext.iApiIndex]); var g = d.aoData, o = d.aiDisplay, k = d.aiDisplayMaster; b || (b = {}); b = h.extend({}, { filter: "none", order: "current", page: "all" }, b); if ("current" == b.page) { c = d._iDisplayStart; for (d = d.fnDisplayEnd(); c < d; c++) (f = g[o[c]].nTr) && e.push(f) } else if ("current" == b.order && "none" == b.filter) { c = 0; for (d = k.length; c < d; c++) (f = g[k[c]].nTr) && e.push(f) } else if ("current" == b.order && "applied" == b.filter) { c = 0; for (d = o.length; c < d; c++) (f = g[o[c]].nTr) && e.push(f) } else if ("original" ==
b.order && "none" == b.filter) { c = 0; for (d = g.length; c < d; c++) (f = g[c].nTr) && e.push(f) } else if ("original" == b.order && "applied" == b.filter) { c = 0; for (d = g.length; c < d; c++) f = g[c].nTr, -1 !== h.inArray(c, o) && f && e.push(f) } else D(d, 1, "Unknown selection options"); e = h(e); c = e.filter(a); e = e.find(a); return h([].concat(h.makeArray(c), h.makeArray(e)))
            }; this._ = function (a, b) { var c = [], d, e, f = this.$(a, b); d = 0; for (e = f.length; d < e; d++) c.push(this.fnGetData(f[d])); return c }; this.fnAddData = function (a, b) {
                if (0 === a.length) return []; var c = [],
d, e = s(this[j.ext.iApiIndex]); if ("object" === typeof a[0] && null !== a[0]) for (var f = 0; f < a.length; f++) { d = H(e, a[f]); if (-1 == d) return c; c.push(d) } else { d = H(e, a); if (-1 == d) return c; c.push(d) } e.aiDisplay = e.aiDisplayMaster.slice(); (b === n || b) && aa(e); return c
            }; this.fnAdjustColumnSizing = function (a) { var b = s(this[j.ext.iApiIndex]); k(b); a === n || a ? this.fnDraw(!1) : ("" !== b.oScroll.sX || "" !== b.oScroll.sY) && this.oApi._fnScrollDraw(b) }; this.fnClearTable = function (a) { var b = s(this[j.ext.iApiIndex]); ga(b); (a === n || a) && x(b) }; this.fnClose =
function (a) { for (var b = s(this[j.ext.iApiIndex]), c = 0; c < b.aoOpenRows.length; c++) if (b.aoOpenRows[c].nParent == a) return (a = b.aoOpenRows[c].nTr.parentNode) && a.removeChild(b.aoOpenRows[c].nTr), b.aoOpenRows.splice(c, 1), 0; return 1 }; this.fnDeleteRow = function (a, b, c) {
    var d = s(this[j.ext.iApiIndex]), e, f, a = "object" === typeof a ? I(d, a) : a, g = d.aoData.splice(a, 1); e = 0; for (f = d.aoData.length; e < f; e++) null !== d.aoData[e].nTr && (d.aoData[e].nTr._DT_RowIndex = e); e = h.inArray(a, d.aiDisplay); d.asDataSearch.splice(e, 1); ha(d.aiDisplayMaster,
a); ha(d.aiDisplay, a); "function" === typeof b && b.call(this, d, g); d._iDisplayStart >= d.fnRecordsDisplay() && (d._iDisplayStart -= d._iDisplayLength, 0 > d._iDisplayStart && (d._iDisplayStart = 0)); if (c === n || c) y(d), x(d); return g
}; this.fnDestroy = function (a) {
    var b = s(this[j.ext.iApiIndex]), c = b.nTableWrapper.parentNode, d = b.nTBody, i, f, a = a === n ? !1 : a; b.bDestroying = !0; A(b, "aoDestroyCallback", "destroy", [b]); if (!a) { i = 0; for (f = b.aoColumns.length; i < f; i++) !1 === b.aoColumns[i].bVisible && this.fnSetColumnVis(i, !0) } h(b.nTableWrapper).find("*").andSelf().unbind(".DT");
    h("tbody>tr>td." + b.oClasses.sRowEmpty, b.nTable).parent().remove(); b.nTable != b.nTHead.parentNode && (h(b.nTable).children("thead").remove(), b.nTable.appendChild(b.nTHead)); b.nTFoot && b.nTable != b.nTFoot.parentNode && (h(b.nTable).children("tfoot").remove(), b.nTable.appendChild(b.nTFoot)); b.nTable.parentNode.removeChild(b.nTable); h(b.nTableWrapper).remove(); b.aaSorting = []; b.aaSortingFixed = []; P(b); h(T(b)).removeClass(b.asStripeClasses.join(" ")); h("th, td", b.nTHead).removeClass([b.oClasses.sSortable, b.oClasses.sSortableAsc,
b.oClasses.sSortableDesc, b.oClasses.sSortableNone].join(" ")); b.bJUI && (h("th span." + b.oClasses.sSortIcon + ", td span." + b.oClasses.sSortIcon, b.nTHead).remove(), h("th, td", b.nTHead).each(function () { var a = h("div." + b.oClasses.sSortJUIWrapper, this), c = a.contents(); h(this).append(c); a.remove() })); !a && b.nTableReinsertBefore ? c.insertBefore(b.nTable, b.nTableReinsertBefore) : a || c.appendChild(b.nTable); i = 0; for (f = b.aoData.length; i < f; i++) null !== b.aoData[i].nTr && d.appendChild(b.aoData[i].nTr); !0 === b.oFeatures.bAutoWidth &&
(b.nTable.style.width = q(b.sDestroyWidth)); if (f = b.asDestroyStripes.length) { a = h(d).children("tr"); for (i = 0; i < f; i++) a.filter(":nth-child(" + f + "n + " + i + ")").addClass(b.asDestroyStripes[i]) } i = 0; for (f = j.settings.length; i < f; i++) j.settings[i] == b && j.settings.splice(i, 1); e = b = null
}; this.fnDraw = function (a) { var b = s(this[j.ext.iApiIndex]); !1 === a ? (y(b), x(b)) : aa(b) }; this.fnFilter = function (a, b, c, d, e, f) {
    var g = s(this[j.ext.iApiIndex]); if (g.oFeatures.bFilter) {
        if (c === n || null === c) c = !1; if (d === n || null === d) d = !0; if (e === n || null ===
e) e = !0; if (f === n || null === f) f = !0; if (b === n || null === b) { if (K(g, { sSearch: a + "", bRegex: c, bSmart: d, bCaseInsensitive: f }, 1), e && g.aanFeatures.f) { b = g.aanFeatures.f; c = 0; for (d = b.length; c < d; c++) try { b[c]._DT_Input != l.activeElement && h(b[c]._DT_Input).val(a) } catch (o) { h(b[c]._DT_Input).val(a) } } } else h.extend(g.aoPreSearchCols[b], { sSearch: a + "", bRegex: c, bSmart: d, bCaseInsensitive: f }), K(g, g.oPreviousSearch, 1)
    } 
}; this.fnGetData = function (a, b) {
    var c = s(this[j.ext.iApiIndex]); if (a !== n) {
        var d = a; if ("object" === typeof a) {
            var e = a.nodeName.toLowerCase();
            "tr" === e ? d = I(c, a) : "td" === e && (d = I(c, a.parentNode), b = fa(c, d, a))
        } return b !== n ? v(c, d, b, "") : c.aoData[d] !== n ? c.aoData[d]._aData : null
    } return Z(c)
}; this.fnGetNodes = function (a) { var b = s(this[j.ext.iApiIndex]); return a !== n ? b.aoData[a] !== n ? b.aoData[a].nTr : null : T(b) }; this.fnGetPosition = function (a) { var b = s(this[j.ext.iApiIndex]), c = a.nodeName.toUpperCase(); return "TR" == c ? I(b, a) : "TD" == c || "TH" == c ? (c = I(b, a.parentNode), a = fa(b, c, a), [c, R(b, a), a]) : null }; this.fnIsOpen = function (a) {
    for (var b = s(this[j.ext.iApiIndex]), c = 0; c <
b.aoOpenRows.length; c++) if (b.aoOpenRows[c].nParent == a) return !0; return !1
}; this.fnOpen = function (a, b, c) { var d = s(this[j.ext.iApiIndex]), e = T(d); if (-1 !== h.inArray(a, e)) { this.fnClose(a); var e = l.createElement("tr"), f = l.createElement("td"); e.appendChild(f); f.className = c; f.colSpan = t(d); "string" === typeof b ? f.innerHTML = b : h(f).html(b); b = h("tr", d.nTBody); -1 != h.inArray(a, b) && h(e).insertAfter(a); d.aoOpenRows.push({ nTr: e, nParent: a }); return e } }; this.fnPageChange = function (a, b) {
    var c = s(this[j.ext.iApiIndex]); qa(c, a);
    y(c); (b === n || b) && x(c)
}; this.fnSetColumnVis = function (a, b, c) {
    var d = s(this[j.ext.iApiIndex]), e, f, g = d.aoColumns, h = d.aoData, o, m; if (g[a].bVisible != b) {
        if (b) { for (e = f = 0; e < a; e++) g[e].bVisible && f++; m = f >= t(d); if (!m) for (e = a; e < g.length; e++) if (g[e].bVisible) { o = e; break } e = 0; for (f = h.length; e < f; e++) null !== h[e].nTr && (m ? h[e].nTr.appendChild(h[e]._anHidden[a]) : h[e].nTr.insertBefore(h[e]._anHidden[a], J(d, e)[o])) } else { e = 0; for (f = h.length; e < f; e++) null !== h[e].nTr && (o = J(d, e)[a], h[e]._anHidden[a] = o, o.parentNode.removeChild(o)) } g[a].bVisible =
b; W(d, d.aoHeader); d.nTFoot && W(d, d.aoFooter); e = 0; for (f = d.aoOpenRows.length; e < f; e++) d.aoOpenRows[e].nTr.colSpan = t(d); if (c === n || c) k(d), x(d); ra(d)
    } 
}; this.fnSettings = function () { return s(this[j.ext.iApiIndex]) }; this.fnSort = function (a) { var b = s(this[j.ext.iApiIndex]); b.aaSorting = a; O(b) }; this.fnSortListener = function (a, b, c) { ia(s(this[j.ext.iApiIndex]), a, b, c) }; this.fnUpdate = function (a, b, c, d, e) {
    var f = s(this[j.ext.iApiIndex]), b = "object" === typeof b ? I(f, b) : b; if (h.isArray(a) && c === n) {
        f.aoData[b]._aData = a.slice();
        for (c = 0; c < f.aoColumns.length; c++) this.fnUpdate(v(f, b, c), b, c, !1, !1)
    } else if (h.isPlainObject(a) && c === n) { f.aoData[b]._aData = h.extend(!0, {}, a); for (c = 0; c < f.aoColumns.length; c++) this.fnUpdate(v(f, b, c), b, c, !1, !1) } else { F(f, b, c, a); var a = v(f, b, c, "display"), g = f.aoColumns[c]; null !== g.fnRender && (a = S(f, b, c), g.bUseRendered && F(f, b, c, a)); null !== f.aoData[b].nTr && (J(f, b)[c].innerHTML = a) } c = h.inArray(b, f.aiDisplay); f.asDataSearch[c] = na(f, Y(f, b, "filter", r(f, "bSearchable"))); (e === n || e) && k(f); (d === n || d) && aa(f); return 0
};
            this.fnVersionCheck = j.ext.fnVersionCheck; this.oApi = { _fnExternApiFunc: Va, _fnInitialise: ba, _fnInitComplete: $, _fnLanguageCompat: pa, _fnAddColumn: o, _fnColumnOptions: m, _fnAddData: H, _fnCreateTr: ea, _fnGatherData: ua, _fnBuildHead: va, _fnDrawHead: W, _fnDraw: x, _fnReDraw: aa, _fnAjaxUpdate: wa, _fnAjaxParameters: Ea, _fnAjaxUpdateDraw: Fa, _fnServerParams: ka, _fnAddOptionsHtml: xa, _fnFeatureHtmlTable: Ba, _fnScrollDraw: La, _fnAdjustColumnSizing: k, _fnFeatureHtmlFilter: za, _fnFilterComplete: K, _fnFilterCustom: Ia, _fnFilterColumn: Ha,
                _fnFilter: Ga, _fnBuildSearchArray: la, _fnBuildSearchRow: na, _fnFilterCreateSearch: ma, _fnDataToSearch: Ja, _fnSort: O, _fnSortAttachListener: ia, _fnSortingClasses: P, _fnFeatureHtmlPaginate: Da, _fnPageChange: qa, _fnFeatureHtmlInfo: Ca, _fnUpdateInfo: Ka, _fnFeatureHtmlLength: ya, _fnFeatureHtmlProcessing: Aa, _fnProcessingDisplay: E, _fnVisibleToColumnIndex: G, _fnColumnIndexToVisible: R, _fnNodeToDataIndex: I, _fnVisbleColumns: t, _fnCalculateEnd: y, _fnConvertToWidth: Ma, _fnCalculateColumnWidths: da, _fnScrollingWidthAdjust: Oa, _fnGetWidestNode: Na,
                _fnGetMaxLenString: Pa, _fnStringToCss: q, _fnDetectType: B, _fnSettingsFromNode: s, _fnGetDataMaster: Z, _fnGetTrNodes: T, _fnGetTdNodes: J, _fnEscapeRegex: oa, _fnDeleteIndex: ha, _fnReOrderIndex: u, _fnColumnOrdering: M, _fnLog: D, _fnClearTable: ga, _fnSaveState: ra, _fnLoadState: Sa, _fnCreateCookie: function (a, b, c, d, e) {
                    var f = new Date; f.setTime(f.getTime() + 1E3 * c); var c = X.location.pathname.split("/"), a = a + "_" + c.pop().replace(/[\/:]/g, "").toLowerCase(), g; null !== e ? (g = "function" === typeof h.parseJSON ? h.parseJSON(b) : eval("(" + b + ")"),
b = e(a, g, f.toGMTString(), c.join("/") + "/")) : b = a + "=" + encodeURIComponent(b) + "; expires=" + f.toGMTString() + "; path=" + c.join("/") + "/"; a = l.cookie.split(";"); e = b.split(";")[0].length; f = []; if (4096 < e + l.cookie.length + 10) {
                        for (var j = 0, o = a.length; j < o; j++) if (-1 != a[j].indexOf(d)) { var k = a[j].split("="); try { (g = eval("(" + decodeURIComponent(k[1]) + ")")) && g.iCreate && f.push({ name: k[0], time: g.iCreate }) } catch (m) { } } for (f.sort(function (a, b) { return b.time - a.time }); 4096 < e + l.cookie.length + 10; ) {
                            if (0 === f.length) return; d = f.pop(); l.cookie =
d.name + "=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=" + c.join("/") + "/"
                        } 
                    } l.cookie = b
                }, _fnReadCookie: function (a) { for (var b = X.location.pathname.split("/"), a = a + "_" + b[b.length - 1].replace(/[\/:]/g, "").toLowerCase() + "=", b = l.cookie.split(";"), c = 0; c < b.length; c++) { for (var d = b[c]; " " == d.charAt(0); ) d = d.substring(1, d.length); if (0 === d.indexOf(a)) return decodeURIComponent(d.substring(a.length, d.length)) } return null }, _fnDetectHeader: V, _fnGetUniqueThs: N, _fnScrollBarWidth: Qa, _fnApplyToChildren: C, _fnMap: p, _fnGetRowData: Y,
                _fnGetCellData: v, _fnSetCellData: F, _fnGetObjectDataFn: Q, _fnSetObjectDataFn: L, _fnApplyColumnDefs: ta, _fnBindAction: Ra, _fnExtend: Ta, _fnCallbackReg: z, _fnCallbackFire: A, _fnJsonString: Wa, _fnRender: S, _fnNodeToColumnIndex: fa, _fnInfoMacros: ja, _fnBrowserDetect: Ua, _fnGetColumns: r
            }; h.extend(j.ext.oApi, this.oApi); for (var sa in j.ext.oApi) sa && (this[sa] = Va(sa)); var ca = this; this.each(function () {
                var a = 0, b, c, d; c = this.getAttribute("id"); var i = !1, f = !1; if ("table" != this.nodeName.toLowerCase()) D(null, 0, "Attempted to initialise DataTables on a node which is not a table: " +
this.nodeName); else {
                    a = 0; for (b = j.settings.length; a < b; a++) { if (j.settings[a].nTable == this) { if (e === n || e.bRetrieve) return j.settings[a].oInstance; if (e.bDestroy) { j.settings[a].oInstance.fnDestroy(); break } else { D(j.settings[a], 0, "Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy"); return } } if (j.settings[a].sTableId == this.id) { j.settings.splice(a, 1); break } } if (null === c || "" === c) this.id = c = "DataTables_Table_" + j.ext._oExternConfig.iNextUnique++;
                    var g = h.extend(!0, {}, j.models.oSettings, { nTable: this, oApi: ca.oApi, oInit: e, sDestroyWidth: h(this).width(), sInstance: c, sTableId: c }); j.settings.push(g); g.oInstance = 1 === ca.length ? ca : h(this).dataTable(); e || (e = {}); e.oLanguage && pa(e.oLanguage); e = Ta(h.extend(!0, {}, j.defaults), e); p(g.oFeatures, e, "bPaginate"); p(g.oFeatures, e, "bLengthChange"); p(g.oFeatures, e, "bFilter"); p(g.oFeatures, e, "bSort"); p(g.oFeatures, e, "bInfo"); p(g.oFeatures, e, "bProcessing"); p(g.oFeatures, e, "bAutoWidth"); p(g.oFeatures, e, "bSortClasses");
                    p(g.oFeatures, e, "bServerSide"); p(g.oFeatures, e, "bDeferRender"); p(g.oScroll, e, "sScrollX", "sX"); p(g.oScroll, e, "sScrollXInner", "sXInner"); p(g.oScroll, e, "sScrollY", "sY"); p(g.oScroll, e, "bScrollCollapse", "bCollapse"); p(g.oScroll, e, "bScrollInfinite", "bInfinite"); p(g.oScroll, e, "iScrollLoadGap", "iLoadGap"); p(g.oScroll, e, "bScrollAutoCss", "bAutoCss"); p(g, e, "asStripeClasses"); p(g, e, "asStripClasses", "asStripeClasses"); p(g, e, "fnServerData"); p(g, e, "fnFormatNumber"); p(g, e, "sServerMethod"); p(g, e, "aaSorting"); p(g,
e, "aaSortingFixed"); p(g, e, "aLengthMenu"); p(g, e, "sPaginationType"); p(g, e, "sAjaxSource"); p(g, e, "sAjaxDataProp"); p(g, e, "iCookieDuration"); p(g, e, "sCookiePrefix"); p(g, e, "sDom"); p(g, e, "bSortCellsTop"); p(g, e, "iTabIndex"); p(g, e, "oSearch", "oPreviousSearch"); p(g, e, "aoSearchCols", "aoPreSearchCols"); p(g, e, "iDisplayLength", "_iDisplayLength"); p(g, e, "bJQueryUI", "bJUI"); p(g, e, "fnCookieCallback"); p(g, e, "fnStateLoad"); p(g, e, "fnStateSave"); p(g.oLanguage, e, "fnInfoCallback"); z(g, "aoDrawCallback", e.fnDrawCallback, "user");
                    z(g, "aoServerParams", e.fnServerParams, "user"); z(g, "aoStateSaveParams", e.fnStateSaveParams, "user"); z(g, "aoStateLoadParams", e.fnStateLoadParams, "user"); z(g, "aoStateLoaded", e.fnStateLoaded, "user"); z(g, "aoRowCallback", e.fnRowCallback, "user"); z(g, "aoRowCreatedCallback", e.fnCreatedRow, "user"); z(g, "aoHeaderCallback", e.fnHeaderCallback, "user"); z(g, "aoFooterCallback", e.fnFooterCallback, "user"); z(g, "aoInitComplete", e.fnInitComplete, "user"); z(g, "aoPreDrawCallback", e.fnPreDrawCallback, "user"); g.oFeatures.bServerSide &&
g.oFeatures.bSort && g.oFeatures.bSortClasses ? z(g, "aoDrawCallback", P, "server_side_sort_classes") : g.oFeatures.bDeferRender && z(g, "aoDrawCallback", P, "defer_sort_classes"); e.bJQueryUI ? (h.extend(g.oClasses, j.ext.oJUIClasses), e.sDom === j.defaults.sDom && "lfrtip" === j.defaults.sDom && (g.sDom = '<"H"lfr>t<"F"ip>')) : h.extend(g.oClasses, j.ext.oStdClasses); h(this).addClass(g.oClasses.sTable); if ("" !== g.oScroll.sX || "" !== g.oScroll.sY) g.oScroll.iBarWidth = Qa(); g.iInitDisplayStart === n && (g.iInitDisplayStart = e.iDisplayStart,
g._iDisplayStart = e.iDisplayStart); e.bStateSave && (g.oFeatures.bStateSave = !0, Sa(g, e), z(g, "aoDrawCallback", ra, "state_save")); null !== e.iDeferLoading && (g.bDeferLoading = !0, a = h.isArray(e.iDeferLoading), g._iRecordsDisplay = a ? e.iDeferLoading[0] : e.iDeferLoading, g._iRecordsTotal = a ? e.iDeferLoading[1] : e.iDeferLoading); null !== e.aaData && (f = !0); "" !== e.oLanguage.sUrl ? (g.oLanguage.sUrl = e.oLanguage.sUrl, h.getJSON(g.oLanguage.sUrl, null, function (a) { pa(a); h.extend(true, g.oLanguage, e.oLanguage, a); ba(g) }), i = !0) : h.extend(!0,
g.oLanguage, e.oLanguage); null === e.asStripeClasses && (g.asStripeClasses = [g.oClasses.sStripeOdd, g.oClasses.sStripeEven]); b = g.asStripeClasses.length; g.asDestroyStripes = []; if (b) { c = !1; d = h(this).children("tbody").children("tr:lt(" + b + ")"); for (a = 0; a < b; a++) d.hasClass(g.asStripeClasses[a]) && (c = !0, g.asDestroyStripes.push(g.asStripeClasses[a])); c && d.removeClass(g.asStripeClasses.join(" ")) } c = []; a = this.getElementsByTagName("thead"); 0 !== a.length && (V(g.aoHeader, a[0]), c = N(g)); if (null === e.aoColumns) {
                        d = []; a = 0; for (b =
c.length; a < b; a++) d.push(null)
                    } else d = e.aoColumns; a = 0; for (b = d.length; a < b; a++) e.saved_aoColumns !== n && e.saved_aoColumns.length == b && (null === d[a] && (d[a] = {}), d[a].bVisible = e.saved_aoColumns[a].bVisible), o(g, c ? c[a] : null); ta(g, e.aoColumnDefs, d, function (a, b) { m(g, a, b) }); a = 0; for (b = g.aaSorting.length; a < b; a++) {
                        g.aaSorting[a][0] >= g.aoColumns.length && (g.aaSorting[a][0] = 0); var k = g.aoColumns[g.aaSorting[a][0]]; g.aaSorting[a][2] === n && (g.aaSorting[a][2] = 0); e.aaSorting === n && g.saved_aaSorting === n && (g.aaSorting[a][1] =
k.asSorting[0]); c = 0; for (d = k.asSorting.length; c < d; c++) if (g.aaSorting[a][1] == k.asSorting[c]) { g.aaSorting[a][2] = c; break } 
                    } P(g); Ua(g); a = h(this).children("caption").each(function () { this._captionSide = h(this).css("caption-side") }); b = h(this).children("thead"); 0 === b.length && (b = [l.createElement("thead")], this.appendChild(b[0])); g.nTHead = b[0]; b = h(this).children("tbody"); 0 === b.length && (b = [l.createElement("tbody")], this.appendChild(b[0])); g.nTBody = b[0]; g.nTBody.setAttribute("role", "alert"); g.nTBody.setAttribute("aria-live",
"polite"); g.nTBody.setAttribute("aria-relevant", "all"); b = h(this).children("tfoot"); if (0 === b.length && 0 < a.length && ("" !== g.oScroll.sX || "" !== g.oScroll.sY)) b = [l.createElement("tfoot")], this.appendChild(b[0]); 0 < b.length && (g.nTFoot = b[0], V(g.aoFooter, g.nTFoot)); if (f) for (a = 0; a < e.aaData.length; a++) H(g, e.aaData[a]); else ua(g); g.aiDisplay = g.aiDisplayMaster.slice(); g.bInitialised = !0; !1 === i && ba(g)
                } 
            }); ca = null; return this
        }; j.fnVersionCheck = function (e) {
            for (var h = function (e, h) { for (; e.length < h; ) e += "0"; return e }, m = j.ext.sVersion.split("."),
e = e.split("."), k = "", n = "", l = 0, t = e.length; l < t; l++) k += h(m[l], 3), n += h(e[l], 3); return parseInt(k, 10) >= parseInt(n, 10)
        }; j.fnIsDataTable = function (e) { for (var h = j.settings, m = 0; m < h.length; m++) if (h[m].nTable === e || h[m].nScrollHead === e || h[m].nScrollFoot === e) return !0; return !1 }; j.fnTables = function (e) { var o = []; jQuery.each(j.settings, function (j, k) { (!e || !0 === e && h(k.nTable).is(":visible")) && o.push(k.nTable) }); return o }; j.version = "1.9.4"; j.settings = []; j.models = {}; j.models.ext = { afnFiltering: [], afnSortData: [], aoFeatures: [],
            aTypes: [], fnVersionCheck: j.fnVersionCheck, iApiIndex: 0, ofnSearch: {}, oApi: {}, oStdClasses: {}, oJUIClasses: {}, oPagination: {}, oSort: {}, sVersion: j.version, sErrMode: "alert", _oExternConfig: { iNextUnique: 0}
        }; j.models.oSearch = { bCaseInsensitive: !0, sSearch: "", bRegex: !1, bSmart: !0 }; j.models.oRow = { nTr: null, _aData: [], _aSortData: [], _anHidden: [], _sRowStripe: "" }; j.models.oColumn = { aDataSort: null, asSorting: null, bSearchable: null, bSortable: null, bUseRendered: null, bVisible: null, _bAutoType: !0, fnCreatedCell: null, fnGetData: null,
            fnRender: null, fnSetData: null, mData: null, mRender: null, nTh: null, nTf: null, sClass: null, sContentPadding: null, sDefaultContent: null, sName: null, sSortDataType: "std", sSortingClass: null, sSortingClassJUI: null, sTitle: null, sType: null, sWidth: null, sWidthOrig: null
        }; j.defaults = { aaData: null, aaSorting: [[0, "asc"]], aaSortingFixed: null, aLengthMenu: [10, 25, 50, 100], aoColumns: null, aoColumnDefs: null, aoSearchCols: [], asStripeClasses: null, bAutoWidth: !0, bDeferRender: !1, bDestroy: !1, bFilter: !0, bInfo: !0, bJQueryUI: !1, bLengthChange: !0,
            bPaginate: !0, bProcessing: !1, bRetrieve: !1, bScrollAutoCss: !0, bScrollCollapse: !1, bScrollInfinite: !1, bServerSide: !1, bSort: !0, bSortCellsTop: !1, bSortClasses: !0, bStateSave: !1, fnCookieCallback: null, fnCreatedRow: null, fnDrawCallback: null, fnFooterCallback: null, fnFormatNumber: function (e) { if (1E3 > e) return e; for (var h = e + "", e = h.split(""), j = "", h = h.length, k = 0; k < h; k++) 0 === k % 3 && 0 !== k && (j = this.oLanguage.sInfoThousands + j), j = e[h - k - 1] + j; return j }, fnHeaderCallback: null, fnInfoCallback: null, fnInitComplete: null, fnPreDrawCallback: null,
            fnRowCallback: null, fnServerData: function (e, j, m, k) { k.jqXHR = h.ajax({ url: e, data: j, success: function (e) { e.sError && k.oApi._fnLog(k, 0, e.sError); h(k.oInstance).trigger("xhr", [k, e]); m(e) }, dataType: "json", cache: !1, type: k.sServerMethod, error: function (e, h) { "parsererror" == h && k.oApi._fnLog(k, 0, "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.") } }) }, fnServerParams: null, fnStateLoad: function (e) {
                var e = this.oApi._fnReadCookie(e.sCookiePrefix + e.sInstance), j; try {
                    j =
"function" === typeof h.parseJSON ? h.parseJSON(e) : eval("(" + e + ")")
                } catch (m) { j = null } return j
            }, fnStateLoadParams: null, fnStateLoaded: null, fnStateSave: function (e, h) { this.oApi._fnCreateCookie(e.sCookiePrefix + e.sInstance, this.oApi._fnJsonString(h), e.iCookieDuration, e.sCookiePrefix, e.fnCookieCallback) }, fnStateSaveParams: null, iCookieDuration: 7200, iDeferLoading: null, iDisplayLength: 10, iDisplayStart: 0, iScrollLoadGap: 100, iTabIndex: 0, oLanguage: { oAria: { sSortAscending: ": activate to sort column ascending", sSortDescending: ": activate to sort column descending" },
                oPaginate: { sFirst: "First", sLast: "Last", sNext: "Next", sPrevious: "Previous" }, sEmptyTable: "No data available in table", sInfo: "Showing _START_ to _END_ of _TOTAL_ entries", sInfoEmpty: "Showing 0 to 0 of 0 entries", sInfoFiltered: "(filtered from _MAX_ total entries)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "Show _MENU_ entries", sLoadingRecords: "Loading...", sProcessing: "Processing...", sSearch: "Search:", sUrl: "", sZeroRecords: "No matching records found"
            }, oSearch: h.extend({}, j.models.oSearch), sAjaxDataProp: "aaData",
            sAjaxSource: null, sCookiePrefix: "SpryMedia_DataTables_", sDom: "lfrtip", sPaginationType: "two_button", sScrollX: "", sScrollXInner: "", sScrollY: "", sServerMethod: "GET"
        }; j.defaults.columns = { aDataSort: null, asSorting: ["asc", "desc"], bSearchable: !0, bSortable: !0, bUseRendered: !0, bVisible: !0, fnCreatedCell: null, fnRender: null, iDataSort: -1, mData: null, mRender: null, sCellType: "td", sClass: "", sContentPadding: "", sDefaultContent: null, sName: "", sSortDataType: "std", sTitle: null, sType: null, sWidth: null }; j.models.oSettings = { oFeatures: { bAutoWidth: null,
            bDeferRender: null, bFilter: null, bInfo: null, bLengthChange: null, bPaginate: null, bProcessing: null, bServerSide: null, bSort: null, bSortClasses: null, bStateSave: null
        }, oScroll: { bAutoCss: null, bCollapse: null, bInfinite: null, iBarWidth: 0, iLoadGap: null, sX: null, sXInner: null, sY: null }, oLanguage: { fnInfoCallback: null }, oBrowser: { bScrollOversize: !1 }, aanFeatures: [], aoData: [], aiDisplay: [], aiDisplayMaster: [], aoColumns: [], aoHeader: [], aoFooter: [], asDataSearch: [], oPreviousSearch: {}, aoPreSearchCols: [], aaSorting: null, aaSortingFixed: null,
            asStripeClasses: null, asDestroyStripes: [], sDestroyWidth: 0, aoRowCallback: [], aoHeaderCallback: [], aoFooterCallback: [], aoDrawCallback: [], aoRowCreatedCallback: [], aoPreDrawCallback: [], aoInitComplete: [], aoStateSaveParams: [], aoStateLoadParams: [], aoStateLoaded: [], sTableId: "", nTable: null, nTHead: null, nTFoot: null, nTBody: null, nTableWrapper: null, bDeferLoading: !1, bInitialised: !1, aoOpenRows: [], sDom: null, sPaginationType: "two_button", iCookieDuration: 0, sCookiePrefix: "", fnCookieCallback: null, aoStateSave: [], aoStateLoad: [],
            oLoadedState: null, sAjaxSource: null, sAjaxDataProp: null, bAjaxDataGet: !0, jqXHR: null, fnServerData: null, aoServerParams: [], sServerMethod: null, fnFormatNumber: null, aLengthMenu: null, iDraw: 0, bDrawing: !1, iDrawError: -1, _iDisplayLength: 10, _iDisplayStart: 0, _iDisplayEnd: 10, _iRecordsTotal: 0, _iRecordsDisplay: 0, bJUI: null, oClasses: {}, bFiltered: !1, bSorted: !1, bSortCellsTop: null, oInit: null, aoDestroyCallback: [], fnRecordsTotal: function () { return this.oFeatures.bServerSide ? parseInt(this._iRecordsTotal, 10) : this.aiDisplayMaster.length },
            fnRecordsDisplay: function () { return this.oFeatures.bServerSide ? parseInt(this._iRecordsDisplay, 10) : this.aiDisplay.length }, fnDisplayEnd: function () { return this.oFeatures.bServerSide ? !1 === this.oFeatures.bPaginate || -1 == this._iDisplayLength ? this._iDisplayStart + this.aiDisplay.length : Math.min(this._iDisplayStart + this._iDisplayLength, this._iRecordsDisplay) : this._iDisplayEnd }, oInstance: null, sInstance: null, iTabIndex: 0, nScrollHead: null, nScrollFoot: null
        }; j.ext = h.extend(!0, {}, j.models.ext); h.extend(j.ext.oStdClasses,
{ sTable: "dataTable", sPagePrevEnabled: "paginate_enabled_previous", sPagePrevDisabled: "paginate_disabled_previous", sPageNextEnabled: "paginate_enabled_next", sPageNextDisabled: "paginate_disabled_next", sPageJUINext: "", sPageJUIPrev: "", sPageButton: "paginate_button", sPageButtonActive: "paginate_active", sPageButtonStaticDisabled: "paginate_button paginate_button_disabled", sPageFirst: "first", sPagePrevious: "previous", sPageNext: "next", sPageLast: "last", sStripeOdd: "odd", sStripeEven: "even", sRowEmpty: "dataTables_empty",
    sWrapper: "dataTables_wrapper", sFilter: "dataTables_filter", sInfo: "dataTables_info", sPaging: "dataTables_paginate paging_", sLength: "dataTables_length", sProcessing: "dataTables_processing", sSortAsc: "sorting_asc", sSortDesc: "sorting_desc", sSortable: "sorting", sSortableAsc: "sorting_asc_disabled", sSortableDesc: "sorting_desc_disabled", sSortableNone: "sorting_disabled", sSortColumn: "sorting_", sSortJUIAsc: "", sSortJUIDesc: "", sSortJUI: "", sSortJUIAscAllowed: "", sSortJUIDescAllowed: "", sSortJUIWrapper: "", sSortIcon: "",
    sScrollWrapper: "dataTables_scroll", sScrollHead: "dataTables_scrollHead", sScrollHeadInner: "dataTables_scrollHeadInner", sScrollBody: "dataTables_scrollBody", sScrollFoot: "dataTables_scrollFoot", sScrollFootInner: "dataTables_scrollFootInner", sFooterTH: "", sJUIHeader: "", sJUIFooter: ""
}); h.extend(j.ext.oJUIClasses, j.ext.oStdClasses, { sPagePrevEnabled: "fg-button ui-button ui-state-default ui-corner-left", sPagePrevDisabled: "fg-button ui-button ui-state-default ui-corner-left ui-state-disabled", sPageNextEnabled: "fg-button ui-button ui-state-default ui-corner-right",
    sPageNextDisabled: "fg-button ui-button ui-state-default ui-corner-right ui-state-disabled", sPageJUINext: "ui-icon ui-icon-circle-arrow-e", sPageJUIPrev: "ui-icon ui-icon-circle-arrow-w", sPageButton: "fg-button ui-button ui-state-default", sPageButtonActive: "fg-button ui-button ui-state-default ui-state-disabled", sPageButtonStaticDisabled: "fg-button ui-button ui-state-default ui-state-disabled", sPageFirst: "first ui-corner-tl ui-corner-bl", sPageLast: "last ui-corner-tr ui-corner-br", sPaging: "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",
    sSortAsc: "ui-state-default", sSortDesc: "ui-state-default", sSortable: "ui-state-default", sSortableAsc: "ui-state-default", sSortableDesc: "ui-state-default", sSortableNone: "ui-state-default", sSortJUIAsc: "css_right ui-icon ui-icon-triangle-1-n", sSortJUIDesc: "css_right ui-icon ui-icon-triangle-1-s", sSortJUI: "css_right ui-icon ui-icon-carat-2-n-s", sSortJUIAscAllowed: "css_right ui-icon ui-icon-carat-1-n", sSortJUIDescAllowed: "css_right ui-icon ui-icon-carat-1-s", sSortJUIWrapper: "DataTables_sort_wrapper", sSortIcon: "DataTables_sort_icon",
    sScrollHead: "dataTables_scrollHead ui-state-default", sScrollFoot: "dataTables_scrollFoot ui-state-default", sFooterTH: "ui-state-default", sJUIHeader: "fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix", sJUIFooter: "fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"
}); h.extend(j.ext.oPagination, { two_button: { fnInit: function (e, j, m) {
    var k = e.oLanguage.oPaginate, n = function (h) { e.oApi._fnPageChange(e, h.data.action) && m(e) }, k = !e.bJUI ? '<a class="' +
e.oClasses.sPagePrevDisabled + '" tabindex="' + e.iTabIndex + '" role="button">' + k.sPrevious + '</a><a class="' + e.oClasses.sPageNextDisabled + '" tabindex="' + e.iTabIndex + '" role="button">' + k.sNext + "</a>" : '<a class="' + e.oClasses.sPagePrevDisabled + '" tabindex="' + e.iTabIndex + '" role="button"><span class="' + e.oClasses.sPageJUIPrev + '"></span></a><a class="' + e.oClasses.sPageNextDisabled + '" tabindex="' + e.iTabIndex + '" role="button"><span class="' + e.oClasses.sPageJUINext + '"></span></a>'; h(j).append(k); var l = h("a", j),
k = l[0], l = l[1]; e.oApi._fnBindAction(k, { action: "previous" }, n); e.oApi._fnBindAction(l, { action: "next" }, n); e.aanFeatures.p || (j.id = e.sTableId + "_paginate", k.id = e.sTableId + "_previous", l.id = e.sTableId + "_next", k.setAttribute("aria-controls", e.sTableId), l.setAttribute("aria-controls", e.sTableId))
}, fnUpdate: function (e) {
    if (e.aanFeatures.p) for (var h = e.oClasses, j = e.aanFeatures.p, k, l = 0, n = j.length; l < n; l++) if (k = j[l].firstChild) k.className = 0 === e._iDisplayStart ? h.sPagePrevDisabled : h.sPagePrevEnabled, k = k.nextSibling,
k.className = e.fnDisplayEnd() == e.fnRecordsDisplay() ? h.sPageNextDisabled : h.sPageNextEnabled
} 
}, iFullNumbersShowPages: 5, full_numbers: { fnInit: function (e, j, m) {
    var k = e.oLanguage.oPaginate, l = e.oClasses, n = function (h) { e.oApi._fnPageChange(e, h.data.action) && m(e) }; h(j).append('<a  tabindex="' + e.iTabIndex + '" class="' + l.sPageButton + " " + l.sPageFirst + '">' + k.sFirst + '</a><a  tabindex="' + e.iTabIndex + '" class="' + l.sPageButton + " " + l.sPagePrevious + '">' + k.sPrevious + '</a><span></span><a tabindex="' + e.iTabIndex + '" class="' +
l.sPageButton + " " + l.sPageNext + '">' + k.sNext + '</a><a tabindex="' + e.iTabIndex + '" class="' + l.sPageButton + " " + l.sPageLast + '">' + k.sLast + "</a>"); var t = h("a", j), k = t[0], l = t[1], r = t[2], t = t[3]; e.oApi._fnBindAction(k, { action: "first" }, n); e.oApi._fnBindAction(l, { action: "previous" }, n); e.oApi._fnBindAction(r, { action: "next" }, n); e.oApi._fnBindAction(t, { action: "last" }, n); e.aanFeatures.p || (j.id = e.sTableId + "_paginate", k.id = e.sTableId + "_first", l.id = e.sTableId + "_previous", r.id = e.sTableId + "_next", t.id = e.sTableId + "_last")
},
    fnUpdate: function (e, o) {
        if (e.aanFeatures.p) {
            var m = j.ext.oPagination.iFullNumbersShowPages, k = Math.floor(m / 2), l = Math.ceil(e.fnRecordsDisplay() / e._iDisplayLength), n = Math.ceil(e._iDisplayStart / e._iDisplayLength) + 1, t = "", r, B = e.oClasses, u, M = e.aanFeatures.p, L = function (h) { e.oApi._fnBindAction(this, { page: h + r - 1 }, function (h) { e.oApi._fnPageChange(e, h.data.page); o(e); h.preventDefault() }) }; -1 === e._iDisplayLength ? n = k = r = 1 : l < m ? (r = 1, k = l) : n <= k ? (r = 1, k = m) : n >= l - k ? (r = l - m + 1, k = l) : (r = n - Math.ceil(m / 2) + 1, k = r + m - 1); for (m = r; m <= k; m++) t +=
n !== m ? '<a tabindex="' + e.iTabIndex + '" class="' + B.sPageButton + '">' + e.fnFormatNumber(m) + "</a>" : '<a tabindex="' + e.iTabIndex + '" class="' + B.sPageButtonActive + '">' + e.fnFormatNumber(m) + "</a>"; m = 0; for (k = M.length; m < k; m++) u = M[m], u.hasChildNodes() && (h("span:eq(0)", u).html(t).children("a").each(L), u = u.getElementsByTagName("a"), u = [u[0], u[1], u[u.length - 2], u[u.length - 1]], h(u).removeClass(B.sPageButton + " " + B.sPageButtonActive + " " + B.sPageButtonStaticDisabled), h([u[0], u[1]]).addClass(1 == n ? B.sPageButtonStaticDisabled :
B.sPageButton), h([u[2], u[3]]).addClass(0 === l || n === l || -1 === e._iDisplayLength ? B.sPageButtonStaticDisabled : B.sPageButton))
        } 
    } 
}
}); h.extend(j.ext.oSort, { "string-pre": function (e) { "string" != typeof e && (e = null !== e && e.toString ? e.toString() : ""); return e.toLowerCase() }, "string-asc": function (e, h) { return e < h ? -1 : e > h ? 1 : 0 }, "string-desc": function (e, h) { return e < h ? 1 : e > h ? -1 : 0 }, "html-pre": function (e) { return e.replace(/<.*?>/g, "").toLowerCase() }, "html-asc": function (e, h) { return e < h ? -1 : e > h ? 1 : 0 }, "html-desc": function (e, h) {
    return e <
h ? 1 : e > h ? -1 : 0
}, "date-pre": function (e) { e = Date.parse(e); if (isNaN(e) || "" === e) e = Date.parse("01/01/1970 00:00:00"); return e }, "date-asc": function (e, h) { return e - h }, "date-desc": function (e, h) { return h - e }, "numeric-pre": function (e) { return "-" == e || "" === e ? 0 : 1 * e }, "numeric-asc": function (e, h) { return e - h }, "numeric-desc": function (e, h) { return h - e } 
}); h.extend(j.ext.aTypes, [function (e) {
    if ("number" === typeof e) return "numeric"; if ("string" !== typeof e) return null; var h, j = !1; h = e.charAt(0); if (-1 == "0123456789-".indexOf(h)) return null;
    for (var k = 1; k < e.length; k++) { h = e.charAt(k); if (-1 == "0123456789.".indexOf(h)) return null; if ("." == h) { if (j) return null; j = !0 } } return "numeric"
}, function (e) { var h = Date.parse(e); return null !== h && !isNaN(h) || "string" === typeof e && 0 === e.length ? "date" : null }, function (e) { return "string" === typeof e && -1 != e.indexOf("<") && -1 != e.indexOf(">") ? "html" : null } ]); h.fn.DataTable = j; h.fn.dataTable = j; h.fn.dataTableSettings = j.settings; h.fn.dataTableExt = j.ext
    }; "function" === typeof define && define.amd ? define(["jquery"], L) : jQuery && !jQuery.fn.dataTable &&
L(jQuery)
})(window, document);
;
/// <reference path="http://code.jquery.com/jquery-1.4.1-vsdoc.js" />
/*
* Print Element Plugin 1.2
*
* Copyright (c) 2010 Erik Zaadi
*
* Inspired by PrintArea (http://plugins.jquery.com/project/PrintArea) and
* http://stackoverflow.com/questions/472951/how-do-i-print-an-iframe-from-javascript-in-safari-chrome
*
*  Home Page : http://projects.erikzaadi/jQueryPlugins/jQuery.printElement 
*  Issues (bug reporting) : http://github.com/erikzaadi/jQueryPlugins/issues/labels/printElement
*  jQuery plugin page : http://plugins.jquery.com/project/printElement 
*  
*  Thanks to David B (http://github.com/ungenio) and icgJohn (http://www.blogger.com/profile/11881116857076484100)
*  For their great contributions!
* 
* Dual licensed under the MIT and GPL licenses:
*   http://www.opensource.org/licenses/mit-license.php
*   http://www.gnu.org/licenses/gpl.html
*   
*   Note, Iframe Printing is not supported in Opera and Chrome 3.0, a popup window will be shown instead
*/
; (function (g) {
    function k(c) { c && c.printPage ? c.printPage() : setTimeout(function () { k(c) }, 50) } function l(c) {
        c = a(c); a(":checked", c).each(function () { this.setAttribute("checked", "checked") }); a("input[type='text']", c).each(function () { this.setAttribute("value", a(this).val()) }); a("select", c).each(function () { var b = a(this); a("option", b).each(function () { b.val() == a(this).val() && this.setAttribute("selected", "selected") }) }); a("textarea", c).each(function () {
            var b = a(this).attr("value"); if (a.browser.b && this.firstChild) this.firstChild.textContent =
            b; else this.innerHTML = b
        }); return a("<div></div>").append(c.clone()).html()
    } function m(c, b) {
        var i = a(c); c = l(c); var d = []; d.push("<html><head><title>" + b.pageTitle + "</title>"); if (b.overrideElementCSS) { if (b.overrideElementCSS.length > 0) for (var f = 0; f < b.overrideElementCSS.length; f++) { var e = b.overrideElementCSS[f]; typeof e == "string" ? d.push('<link type="text/css" rel="stylesheet" href="' + e + '" >') : d.push('<link type="text/css" rel="stylesheet" href="' + e.href + '" media="' + e.media + '" >') } } else a("link", j).filter(function () {
            return a(this).attr("rel").toLowerCase() ==
            "stylesheet"
        }).each(function () { d.push('<link type="text/css" rel="stylesheet" href="' + a(this).attr("href") + '" media="' + a(this).attr("media") + '" >') }); d.push('<base href="' + (g.location.protocol + "//" + g.location.hostname + (g.location.port ? ":" + g.location.port : "") + g.location.pathname) + '" />'); d.push('</head><body style="' + b.printBodyOptions.styleToAdd + '" class="' + b.printBodyOptions.classNameToAdd + '">'); d.push('<div class="' + i.attr("class") + '">' + c + "</div>"); d.push('<script type="text/javascript">function printPage(){focus();print();' +
        ((a.browser && !a.browser.opera) && !b.leaveOpen && b.printMode.toLowerCase() == "popup" ? "close();" : "") + "}<\/script>"); d.push("</body></html>"); return d.join("")
    } var j = g.document, a = g.jQuery; a.fn.printElement = function (c) {
        var b = a.extend({}, a.fn.printElement.defaults, c); if (b.printMode == "iframe") if ((a.browser && a.browser.opera) || /chrome/.test(navigator.userAgent.toLowerCase())) b.printMode = "popup"; a("[id^='printElement_']").remove(); return this.each(function () {
            var i = a.a ? a.extend({}, b, a(this).data()) : b, d = a(this); d = m(d, i); var f = null, e = null;
            if (i.printMode.toLowerCase() == "popup") { f = g.open("about:blank", "printElementWindow", "width=650,height=440,scrollbars=yes"); e = f.document } else {
                f = "printElement_" + Math.round(Math.random() * 99999).toString(); var h = j.createElement("IFRAME"); a(h).attr({ style: i.iframeElementOptions.styleToAdd, id: f, className: i.iframeElementOptions.classNameToAdd, frameBorder: 0, scrolling: "no", src: "about:blank" }); j.body.appendChild(h); e = h.contentWindow || h.contentDocument; if (e.document) e = e.document; h = j.frames ? j.frames[f] : j.getElementById(f);
                f = h.contentWindow || h
            } focus(); e.open(); e.write(d); e.close(); k(f)
        })
    }; a.fn.printElement.defaults = { printMode: "iframe", pageTitle: "", overrideElementCSS: null, printBodyOptions: { styleToAdd: "padding:10px;margin:10px;", classNameToAdd: "" }, leaveOpen: false, iframeElementOptions: { styleToAdd: "border:none;position:absolute;width:0px;height:0px;bottom:0px;left:0px;", classNameToAdd: "" } }; a.fn.printElement.cssElement = { href: "", media: "" }
})(window);
;
function browserLessThanIE7() {
    return (/MSIE ((5\\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
}

$(document).ready(function () {
    $("#paypalbutton").on('click', function (e) {
        e.preventDefault();
        $("#aspnetForm").attr("action", "https://www.paypal.com/cgi-bin/webscr");
        $("#aspnetForm").submit();
    });

   
});

function copyStrToClipboard(str, clickId) {
  const el = document.createElement('textarea');  // Create a <textarea> element
    el.value = str;                                 // Set its value to the string that you want copied
    el.setAttribute('readonly', '');                // Make it readonly to be tamper-proof
    el.style.position = 'absolute';                 
    el.style.left = '-9999px';                      // Move outside the screen to make it invisible
    document.body.appendChild(el);                  // Append the <textarea> element to the HTML document
    const selected =            
      document.getSelection().rangeCount > 0        // Check if there is any content selected previously
        ? document.getSelection().getRangeAt(0)     // Store selection if found
        : false;                                    // Mark as false to know no selection existed before
    el.select();                                    // Select the <textarea> content
    document.execCommand('copy');                   // Copy - only works as a result of a user action (e.g. click events)
    document.body.removeChild(el);                  // Remove the <textarea> element
    if (selected) {                                 // If a selection existed before copying
        document.getSelection().removeAllRanges();    // Unselect everything on the HTML document
        document.getSelection().addRange(selected);   // Restore the original selection
    }
    var origText = document.getElementById(clickId).innerText;
    document.getElementById(clickId).innerText = 'copied!';
    setTimeout(function () {
        document.getElementById(clickId).innerText = origText;
    }, 2000);
};

function takeFlash() {
    var MM_contentVersion = 6;
    var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
    if (plugin) {
        var words = navigator.plugins["Shockwave Flash"].description.split(" ");
        for (var i = 0; i < words.length; ++i) {
            if (isNaN(parseInt(words[i])))
                continue;
            var MM_PluginVersion = words[i];
        }
        return MM_PluginVersion >= MM_contentVersion;
    }
    else {
        return false;
    }
}

function createCookie(name, value, days) {
    var expires;
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        expires = "; expires=" + date.toGMTString();
    }
    else expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }
    return null;
}

function eraseCookie(name) {
    createCookie(name, "", -1);
}

function areCookiesEnabled() {
    var r = false;
    createCookie("testing", "Hello", 1);
    if (readCookie("testing") != null) {
        r = true;
        eraseCookie("testing");
    }
    return r;
};
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function f(){return H.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function o(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Pt(e,t,n,s,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){if(null==e._isValid){var t=m(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function I(e){var t=l(NaN);return null!=e?E(m(t),e):m(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=f.momentProperties=[],z=!1;function $(e,t){var n,s,i,r=Z.length;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=m(t)),o(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)o(i=t[s=Z[n]])||(e[s]=i);return e}function q(e){$(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,f.updateOffset(this),z=!1)}function h(e){return e instanceof q||null!=e&&null!=e._isAMomentObject}function B(e){!1===f.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=f.deprecationHandler&&f.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=f.deprecationHandler&&f.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function d(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}f.suppressDeprecationWarnings=!1,f.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|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,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=d(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={};function t(e,t){var n=e.toLowerCase();oe[n]=oe[n+"s"]=oe[t]=e}function _(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=_(n))&&(s[t]=e[n]);return s}var le={};function n(e,t){le[e]=t}function he(e){return e%4==0&&e%100!=0||e%400==0}function y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function g(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?y(e):t}function de(t,n){return function(e){return null!=e?(fe(this,t,e),f.updateOffset(this,n),this):ce(this,t)}}function ce(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&he(e.year())&&1===e.month()&&29===e.date()?(n=g(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),We(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var i=/\d/,w=/\d\d/,me=/\d{3}/,_e=/\d{4}/,ye=/[+-]?\d{6}/,p=/\d\d?/,ge=/\d\d\d\d?/,we=/\d\d\d\d\d\d?/,pe=/\d{1,3}/,ke=/\d{1,4}/,ve=/[+-]?\d{1,6}/,Me=/\d+/,De=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ye=/Z|[+-]\d\d(?::?\d\d)?/gi,k=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function v(e,n,s){be[e]=d(n)?n:function(e,t){return e&&s?s:n}}function Oe(e,t){return c(be,e)?be[e](t._strict,t._locale):new RegExp(M(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function M(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var be={},xe={};function D(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),u(n)&&(i=function(e,t){t[n]=g(e)}),s=e.length,t=0;t<s;t++)xe[e[t]]=i}function Te(e,i){D(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var S,Y=0,O=1,b=2,x=3,T=4,N=5,Ne=6,Pe=7,Re=8;function We(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%(n=12)+n)%n;return e+=(t-n)/12,1==n?he(e)?29:28:31-n%7%2}S=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),t("month","M"),n("month",8),v("M",p),v("MM",p,w),v("MMM",function(e,t){return t.monthsShortRegex(e)}),v("MMMM",function(e,t){return t.monthsRegex(e)}),D(["M","MM"],function(e,t){t[O]=g(e)-1}),D(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[O]=s:m(n).invalidMonth=e});var Ce="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ue="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),He=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Fe=k,Le=k;function Ve(e,t){var n;if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=g(t);else if(!u(t=e.localeData().monthsParse(t)))return;n=Math.min(e.date(),We(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n)}}function Ge(e){return null!=e?(Ve(this,e),f.updateOffset(this,!0),this):ce(this,"Month")}function Ee(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=l([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=M(n[r]),s[r]=M(s[r]);for(r=0;r<24;r++)i[r]=M(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Ae(e){return he(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),t("year","y"),n("year",1),v("Y",De),v("YY",p,w),v("YYYY",ke,_e),v("YYYYY",ve,ye),v("YYYYYY",ve,ye),D(["YYYYY","YYYYYY"],Y),D("YYYY",function(e,t){t[Y]=2===e.length?f.parseTwoDigitYear(e):g(e)}),D("YY",function(e,t){t[Y]=f.parseTwoDigitYear(e)}),D("Y",function(e,t){t[Y]=parseInt(e,10)}),f.parseTwoDigitYear=function(e){return g(e)+(68<g(e)?1900:2e3)};var Ie=de("FullYear",!0);function je(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function Ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ze(e,t,n){n=7+t-n;return n-(7+Ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+ze(e,s,i),n=t<=0?Ae(r=e-1)+t:t>Ae(e)?(r=e+1,t-Ae(e)):(r=e,t);return{year:r,dayOfYear:n}}function qe(e,t,n){var s,i,r=ze(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+P(i=e.year()-1,t,n):r>P(e.year(),t,n)?(s=r-P(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function P(e,t,n){var s=ze(e,t,n),t=ze(e+1,t,n);return(Ae(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),t("week","w"),t("isoWeek","W"),n("week",5),n("isoWeek",5),v("w",p),v("ww",p,w),v("W",p),v("WW",p,w),Te(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=g(e)});function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),t("day","d"),t("weekday","e"),t("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),v("d",p),v("e",p),v("E",p),v("dd",function(e,t){return t.weekdaysMinRegex(e)}),v("ddd",function(e,t){return t.weekdaysShortRegex(e)}),v("dddd",function(e,t){return t.weekdaysRegex(e)}),Te(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:m(n).invalidWeekday=e}),Te(["d","e","E"],function(e,t,n,s){t[s]=g(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=k,et=k,tt=k;function nt(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=M(this.weekdaysMin(s,"")),n=M(this.weekdaysShort(s,"")),s=M(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function st(){return this.hours()%12||12}function it(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,st),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),it("a",!0),it("A",!1),t("hour","h"),n("hour",13),v("a",rt),v("A",rt),v("H",p),v("h",p),v("k",p),v("HH",p,w),v("hh",p,w),v("kk",p,w),v("hmm",ge),v("hmmss",we),v("Hmm",ge),v("Hmmss",we),D(["H","HH"],x),D(["k","kk"],function(e,t,n){e=g(e);t[x]=24===e?0:e}),D(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),D(["h","hh"],function(e,t,n){t[x]=g(e),m(n).bigHour=!0}),D("hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s)),m(n).bigHour=!0}),D("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i)),m(n).bigHour=!0}),D("Hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s))}),D("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i))});k=de("Hours",!0);var at,ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:Ue,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Xe,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},R={},ut={};function lt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=lt(e[r]).split("-")).length,n=(n=lt(e[r+1]))?n.split("-"):null;0<t;){if(s=dt(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return at}function dt(t){var e;if(void 0===R[t]&&"undefined"!=typeof module&&module&&module.exports&&null!=t.match("^[^/\\\\]*$"))try{e=at._abbr,require("./locale/"+t),ct(e)}catch(e){R[t]=null}return R[t]}function ct(e,t){return e&&((t=o(t)?mt(e):ft(e,t))?at=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function ft(e,t){if(null===t)return delete R[e],null;var n,s=ot;if(t.abbr=e,null!=R[e])Q("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."),s=R[e]._config;else if(null!=t.parentLocale)if(null!=R[t.parentLocale])s=R[t.parentLocale]._config;else{if(null==(n=dt(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;s=n._config}return R[e]=new K(X(s,t)),ut[e]&&ut[e].forEach(function(e){ft(e.name,e.config)}),ct(e),R[e]}function mt(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return at;if(!a(e)){if(t=dt(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===m(e).overflow&&(t=t[O]<0||11<t[O]?O:t[b]<1||t[b]>We(t[Y],t[O])?b:t[x]<0||24<t[x]||24===t[x]&&(0!==t[T]||0!==t[N]||0!==t[Ne])?x:t[T]<0||59<t[T]?T:t[N]<0||59<t[N]?N:t[Ne]<0||999<t[Ne]?Ne:-1,m(e)._overflowDayOfYear&&(t<Y||b<t)&&(t=b),m(e)._overflowWeeks&&-1===t&&(t=Pe),m(e)._overflowWeekday&&-1===t&&(t=Re),m(e).overflow=t),e}var yt=/^\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)?)?$/,gt=/^\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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["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}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["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/]],vt=/^\/?Date\((-?\d+)/i,Mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(m(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||" ")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),Tt(e)}else e._isValid=!1}}else e._isValid=!1}function Yt(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Ue.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s,i,r=Mt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));r?(t=Yt(r[4],r[3],r[2],r[5],r[6],r[7]),n=r[1],s=t,i=e,n&&Qe.indexOf(n)!==new Date(s[0],s[1],s[2]).getDay()?(m(i).weekdayMismatch=!0,i._isValid=!1):(e._a=t,e._tzm=(n=r[8],s=r[9],i=r[10],n?Dt[n]:s?0:60*(((n=parseInt(i,10))-(s=n%100))/100)+s),e._d=Ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function xt(e){var t,n,s,i,r,a,o,u,l,h,d,c=[];if(!e._d){for(s=e,i=new Date(f.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[b]&&null==e._a[O]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[Y],qe(W(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(h=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,d=qe(W(),u,l),r=bt(i.gg,s._a[Y],d.year),a=bt(i.w,d.week),null!=i.d?((o=i.d)<0||6<o)&&(h=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(h=!0)):o=u),a<1||a>P(r,u,l)?m(s)._overflowWeeks=!0:null!=h?m(s)._overflowWeekday=!0:(d=$e(r,a,o,u,l),s._a[Y]=d.year,s._dayOfYear=d.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[Y],n[Y]),(e._dayOfYear>Ae(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),h=Ze(i,0,e._dayOfYear),e._a[O]=h.getUTCMonth(),e._a[b]=h.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[x]&&0===e._a[T]&&0===e._a[N]&&0===e._a[Ne]&&(e._nextDay=!0,e._a[x]=0),e._d=(e._useUTC?Ze:je).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[x]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function Tt(e){if(e._f===f.ISO_8601)St(e);else if(e._f===f.RFC_2822)Ot(e);else{e._a=[],m(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],h=l.length,d=0;d<h;d++)n=l[d],(t=(a.match(Oe(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&m(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?m(e).empty=!1:m(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(xe,s)&&xe[s](i,r._a,r,s)):e._strict&&!t&&m(e).unusedTokens.push(n);m(e).charsLeftOver=o-u,0<a.length&&m(e).unusedInput.push(a),e._a[x]<=12&&!0===m(e).bigHour&&0<e._a[x]&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[x]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[x],e._meridiem),null!==(o=m(e).era)&&(e._a[Y]=e._locale.erasConvertYear(o,e._a[Y])),xt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||mt(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),h(i))return new q(_t(i));if(V(i))e._d=i;else if(a(r))!function(e){var t,n,s,i,r,a,o=!1,u=e._f.length;if(0===u)return m(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<u;i++)r=0,a=!1,t=$({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Tt(t),A(t)&&(a=!0),r=(r+=m(t).charsLeftOver)+10*m(t).unusedTokens.length,m(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));E(e,n||t)}(e);else if(r)Tt(e);else if(o(r=(i=e)._i))i._d=new Date(f.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=vt.exec(n._i))?n._d=new Date(+t[1]):(St(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid&&(delete n._isValid,n._strict?n._isValid=!1:f.createFromInputFallback(n))))):a(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),xt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),xt(t)):u(r)?i._d=new Date(r):f.createFromInputFallback(i);return A(e)||(e._d=null),e}function Pt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||a(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new q(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function W(e,t,n,s){return Pt(e,t,n,s,!1)}f.createFromInputFallback=e("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. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),f.ISO_8601=function(){},f.RFC_2822=function(){};ge=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=W.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),we=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=W.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Rt(e,t){var n,s;if(!(t=1===t.length&&a(t[0])?t[0]:t).length)return W();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Wt.length;for(t in e)if(c(e,t)&&(-1===S.call(Wt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Wt[n]]){if(s)return!1;parseFloat(e[Wt[n]])!==g(e[Wt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=mt(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),v("Z",Ye),v("ZZ",Ye),D(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(Ye,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+g(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(h(e)||V(e)?e:W(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),f.updateOffset(t,!1),t):W(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}f.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e,i=null;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(i=It.exec(e))?(n="-"===i[1]?-1:1,s={y:0,d:g(i[b])*n,h:g(i[x])*n,m:g(i[T])*n,s:g(i[N])*n,ms:g(Ht(1e3*i[Ne]))*n}):(i=jt.exec(e))?(n="-"===i[1]?-1:1,s={y:Zt(i[2],n),M:Zt(i[3],n),w:Zt(i[4],n),d:Zt(i[5],n),h:Zt(i[6],n),m:Zt(i[7],n),s:Zt(i[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(W(s.from),W(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),i=new Ct(s),Ut(e)&&c(e,"_locale")&&(i._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(i._isValid=e._isValid),i}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function $t(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),qt(this,C(e,t),s),this}}function qt(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ve(e,ce(e,"Month")+t*n),r&&fe(e,"Date",ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&f.updateOffset(e,r||t))}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Ce=$t(1,"add"),Je=$t(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return h(e)||V(e)||Bt(e)||u(e)||function(t){var e=a(t),n=!1;e&&(n=0===t.filter(function(e){return!u(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){if(e.date()<t.date())return-Qt(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months"),t=t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s);return-(n+t)||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=mt(e))&&(this._locale=e),this)}f.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",f.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Xe=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e=[],t=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)t.push(M(i[r].name)),e.push(M(i[r].abbr)),n.push(M(i[r].narrow)),s.push(M(i[r].name)),s.push(M(i[r].abbr)),s.push(M(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?qe(this,s,i).year:(r=P(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=Ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),v("N",rn),v("NN",rn),v("NNN",rn),v("NNNN",function(e,t){return t.erasNameRegex(e)}),v("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),D(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?m(n).era=s:m(n).invalidEra=e}),v("y",Me),v("yy",Me),v("yyy",Me),v("yyyy",Me),v("yo",function(e,t){return t._eraYearOrdinalRegex||Me}),D(["y","yy","yyy","yyyy"],Y),D(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Y]=n._locale.eraYearOrdinalParse(e,i):t[Y]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),t("weekYear","gg"),t("isoWeekYear","GG"),n("weekYear",1),n("isoWeekYear",1),v("G",De),v("g",De),v("GG",p,w),v("gg",p,w),v("GGGG",ke,_e),v("gggg",ke,_e),v("GGGGG",ve,ye),v("ggggg",ve,ye),Te(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=g(e)}),Te(["gg","GG"],function(e,t,n,s){t[s]=f.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),t("quarter","Q"),n("quarter",7),v("Q",i),D("Q",function(e,t){t[O]=3*(g(e)-1)}),s("D",["DD",2],"Do","date"),t("date","D"),n("date",9),v("D",p),v("DD",p,w),v("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),D(["D","DD"],b),D("Do",function(e,t){t[b]=g(e.match(p)[0])});ke=de("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),t("dayOfYear","DDD"),n("dayOfYear",4),v("DDD",pe),v("DDDD",me),D(["DDD","DDDD"],function(e,t,n){n._dayOfYear=g(e)}),s("m",["mm",2],0,"minute"),t("minute","m"),n("minute",14),v("m",p),v("mm",p,w),D(["m","mm"],T);var ln,_e=de("Minutes",!1),ve=(s("s",["ss",2],0,"second"),t("second","s"),n("second",15),v("s",p),v("ss",p,w),D(["s","ss"],N),de("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),t("millisecond","ms"),n("millisecond",16),v("S",pe,i),v("SS",pe,w),v("SSS",pe,me),ln="SSSS";ln.length<=9;ln+="S")v(ln,Me);function hn(e,t){t[Ne]=g(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")D(ln,hn);ye=de("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");i=q.prototype;function dn(e){return e}i.add=Ce,i.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||W(),n=Gt(e,this).startOf("day"),n=f.calendarFormat(this,n)||"sameElse",t=t&&(d(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,W(e)))},i.clone=function(){return new q(this)},i.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=_(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:y(r)},i.endOf=function(e){var t,n;if(void 0===(e=_(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1;break}return this._d.setTime(t),f.updateOffset(this,!0),this},i.format=function(e){return e=e||(this.isUtc()?f.defaultFormatUtc:f.defaultFormat),e=re(this,e),this.localeData().postformat(e)},i.from=function(e,t){return this.isValid()&&(h(e)&&e.isValid()||W(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},i.fromNow=function(e){return this.from(W(),e)},i.to=function(e,t){return this.isValid()&&(h(e)&&e.isValid()||W(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},i.toNow=function(e){return this.to(W(),e)},i.get=function(e){return d(this[e=_(e)])?this[e]():this},i.invalidAt=function(){return m(this).overflow},i.isAfter=function(e,t){return e=h(e)?e:W(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},i.isBefore=function(e,t){return e=h(e)?e:W(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},i.isBetween=function(e,t,n,s){return e=h(e)?e:W(e),t=h(t)?t:W(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&(("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n)))},i.isSame=function(e,t){var e=h(e)?e:W(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},i.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},i.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},i.isValid=function(){return A(this)},i.lang=Xe,i.locale=Xt,i.localeData=Kt,i.max=we,i.min=ge,i.parsingFlags=function(){return E({},m(this))},i.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(d(this[e=_(e)]))return this[e](t);return this},i.startOf=function(e){var t,n;if(void 0===(e=_(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3);break}return this._d.setTime(t),f.updateOffset(this,!0),this},i.subtract=Je,i.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},i.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},i.toDate=function(){return new Date(this.valueOf())},i.toISOString=function(e){if(!this.isValid())return null;var t=(e=!0!==e)?this.clone().utc():this;return t.year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):d(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},i.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t="moment",n="";return this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z"),t="["+t+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+(n+'[")]'))},"undefined"!=typeof Symbol&&null!=Symbol.for&&(i[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},i.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},i.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},i.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},i.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},i.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-f(n[s].since).year())*e+n[s].offset;return this.year()},i.year=Ie,i.isLeapYear=function(){return he(this.year())},i.weekYear=function(e){return un.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},i.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},i.quarter=i.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},i.month=Ge,i.daysInMonth=function(){return We(this.year(),this.month())},i.week=i.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},i.isoWeek=i.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},i.weeksInYear=function(){var e=this.localeData()._week;return P(this.year(),e.dow,e.doy)},i.weeksInWeekYear=function(){var e=this.localeData()._week;return P(this.weekYear(),e.dow,e.doy)},i.isoWeeksInYear=function(){return P(this.year(),1,4)},i.isoWeeksInISOWeekYear=function(){return P(this.isoWeekYear(),1,4)},i.date=ke,i.day=i.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},i.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},i.isoWeekday=function(e){return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN;var t,n},i.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},i.hour=i.hours=k,i.minute=i.minutes=_e,i.second=i.seconds=ve,i.millisecond=i.milliseconds=ye,i.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(Ye,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?qt(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,f.updateOffset(this,!0),this._changeInProgress=null)),this},i.utc=function(e){return this.utcOffset(0,e)},i.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Et(this),"m")),this},i.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Se,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},i.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?W(e).utcOffset():0,(this.utcOffset()-e)%60==0)},i.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},i.isLocal=function(){return!!this.isValid()&&!this._isUTC},i.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},i.isUtc=At,i.isUTC=At,i.zoneAbbr=function(){return this._isUTC?"UTC":""},i.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},i.dates=e("dates accessor is deprecated. Use date instead.",ke),i.months=e("months accessor is deprecated. Use month instead",Ge),i.years=e("years accessor is deprecated. Use year instead",Ie),i.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),i.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e,t={};return $(t,this),(t=Nt(t))._a?(e=(t._isUTC?l:W)(t._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&g(e[a])!==g(t[a]))&&r++;return r+i}(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});w=K.prototype;function cn(e,t,n,s){var i=mt(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?u(t)&&(n=t,t=void 0):(t=e,e=!1,u(n=t)&&(n=t,t=void 0)),t||"");var i,r=mt(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}w.calendar=function(e,t,n){return d(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},w.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},w.invalidDate=function(){return this._invalidDate},w.ordinal=function(e){return this._ordinal.replace("%d",e)},w.preparse=dn,w.postformat=dn,w.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return d(i)?i(e,t,n,s):i.replace(/%d/i,e)},w.pastFuture=function(e,t){return d(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},w.set=function(e){var t,n;for(n in e)c(e,n)&&(d(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},w.eras=function(e,t){for(var n,s=this._eras||mt("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=f(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=f(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},w.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},w.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?f(e.since).year():f(e.since).year()+(t-e.offset)*n},w.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},w.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},w.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},w.months=function(e,t){return e?(a(this._months)?this._months:this._months[(this._months.isFormat||He).test(t)?"format":"standalone"])[e.month()]:a(this._months)?this._months:this._months.standalone},w.monthsShort=function(e,t){return e?(a(this._monthsShort)?this._monthsShort:this._monthsShort[He.test(t)?"format":"standalone"])[e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},w.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=S.call(this._shortMonthsParse,e))?i:null:-1!==(i=S.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=S.call(this._shortMonthsParse,e))||-1!==(i=S.call(this._longMonthsParse,e))?i:null:-1!==(i=S.call(this._longMonthsParse,e))||-1!==(i=S.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},w.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},w.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},w.week=function(e){return qe(e,this._week.dow,this._week.doy).week},w.firstDayOfYear=function(){return this._week.doy},w.firstDayOfWeek=function(){return this._week.dow},w.weekdays=function(e,t){return t=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Be(t,this._week.dow):e?t[e.day()]:t},w.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},w.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},w.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=S.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=S.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._shortWeekdaysParse,e))||-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=S.call(this._shortWeekdaysParse,e))||-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:-1!==(i=S.call(this._minWeekdaysParse,e))||-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},w.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},w.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},w.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},w.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},w.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ct("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===g(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),f.lang=e("moment.lang is deprecated. Use moment.locale instead.",ct),f.langData=e("moment.langData is deprecated. Use moment.localeData instead.",mt);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}pe=kn("ms"),me=kn("s"),Ce=kn("m"),we=kn("h"),ge=kn("d"),Je=kn("w"),k=kn("M"),_e=kn("Q"),ve=kn("y");function vn(e){return function(){return this.isValid()?this._data[e]:NaN}}var ye=vn("milliseconds"),ke=vn("seconds"),Ie=vn("minutes"),w=vn("hours"),Mn=vn("days"),Dn=vn("months"),Sn=vn("years");var Yn=Math.round,On={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function bn(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),h=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return(r=(r=null!=n.w?r||h<=1&&["w"]||h<n.w&&["ww",h]:r)||l<=1&&["M"]||l<n.M&&["MM",l]||i<=1&&["y"]||["yy",i])[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var xn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function Nn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o=xn(this._milliseconds)/1e3,u=xn(this._days),l=xn(this._months),h=this.asSeconds();return h?(e=y(o/60),t=y(e/60),o%=60,e%=60,n=y(l/12),l%=12,s=o?o.toFixed(3).replace(/\.?0+$/,""):"",i=Tn(this._months)!==Tn(h)?"-":"",r=Tn(this._days)!==Tn(h)?"-":"",a=Tn(this._milliseconds)!==Tn(h)?"-":"",(h<0?"-":"")+"P"+(n?i+n+"Y":"")+(l?i+l+"M":"")+(u?r+u+"D":"")+(t||e||o?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(o?a+s+"S":"")):"P0D"}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=_(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=pe,U.asSeconds=me,U.asMinutes=Ce,U.asHours=we,U.asDays=ge,U.asWeeks=Je,U.asMonths=k,U.asQuarters=_e,U.asYears=ve,U.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12):NaN},U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=y(e/1e3),s.seconds=e%60,e=y(e/60),s.minutes=e%60,e=y(e/60),s.hours=e%24,t+=y(e/24),n+=e=y(wn(t)),t-=gn(pn(e)),e=y(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=_(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=ye,U.seconds=ke,U.minutes=Ie,U.hours=w,U.days=Mn,U.weeks=function(){return y(this.days()/7)},U.months=Dn,U.years=Sn,U.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,s=On;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},On,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),e=this.localeData(),t=bn(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)},U.toISOString=Nn,U.toString=Nn,U.toJSON=Nn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Nn),U.lang=Xe,s("X",0,0,"unix"),s("x",0,0,"valueOf"),v("x",De),v("X",/[+-]?\d+(\.\d{1,3})?/),D("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),D("x",function(e,t,n){n._d=new Date(g(e))}),f.version="2.29.4",H=W,f.fn=i,f.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},f.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},f.now=function(){return Date.now?Date.now():+new Date},f.utc=l,f.unix=function(e){return W(1e3*e)},f.months=function(e,t){return fn(e,t,"months")},f.isDate=V,f.locale=ct,f.invalid=I,f.duration=C,f.isMoment=h,f.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},f.parseZone=function(){return W.apply(null,arguments).parseZone()},f.localeData=mt,f.isDuration=Ut,f.monthsShort=function(e,t){return fn(e,t,"monthsShort")},f.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},f.defineLocale=ft,f.updateLocale=function(e,t){var n,s;return null!=t?(s=ot,null!=R[e]&&null!=R[e].parentLocale?R[e].set(X(R[e]._config,t)):(t=X(s=null!=(n=dt(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=R[e],R[e]=s),ct(e)):null!=R[e]&&(null!=R[e].parentLocale?(R[e]=R[e].parentLocale,e===ct()&&ct(e)):null!=R[e]&&delete R[e]),R[e]},f.locales=function(){return ee(R)},f.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},f.normalizeUnits=_,f.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},f.relativeTimeThreshold=function(e,t){return void 0!==On[e]&&(void 0===t?On[e]:(On[e]=t,"s"===e&&(On.ss=t-1),!0))},f.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},f.prototype=i,f.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},f});
//# sourceMappingURL=moment.min.js.map;
!function(e){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],e);else if("object"==typeof exports)module.exports=e(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";e(jQuery,moment)}}(function($,_){"use strict";if(!_)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");function i(i,p){function a(){return void 0!==_.tz&&void 0!==p.timeZone&&null!==p.timeZone&&""!==p.timeZone}function c(e){var t;return t=null==e?_():_.isDate(e)||_.isMoment(e)?_(e):a()?_.tz(e,B,p.useStrict,p.timeZone):_(e,B,p.useStrict),a()&&t.tz(p.timeZone),t}function d(e){if("string"!=typeof e||1<e.length)throw new TypeError("isEnabled expects a single character string parameter");switch(e){case"y":return-1!==q.indexOf("Y");case"M":return-1!==q.indexOf("M");case"d":return-1!==q.toLowerCase().indexOf("d");case"h":case"H":return-1!==q.toLowerCase().indexOf("h");case"m":return-1!==q.indexOf("m");case"s":return-1!==q.indexOf("s");default:return!1}}function l(){return d("h")||d("m")||d("s")}function u(){return d("y")||d("M")||d("d")}function f(){var e,t,a,n=$("<div>").addClass("timepicker-hours").append($("<table>").addClass("table-condensed")),r=$("<div>").addClass("timepicker-minutes").append($("<table>").addClass("table-condensed")),i=$("<div>").addClass("timepicker-seconds").append($("<table>").addClass("table-condensed")),o=[(e=$("<tr>"),t=$("<tr>"),a=$("<tr>"),d("h")&&(e.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append($("<span>").addClass(p.icons.up)))),t.append($("<td>").append($("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:p.tooltips.pickHour}).attr("data-action","showHours"))),a.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append($("<span>").addClass(p.icons.down))))),d("m")&&(d("h")&&(e.append($("<td>").addClass("separator")),t.append($("<td>").addClass("separator").html(":")),a.append($("<td>").addClass("separator"))),e.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append($("<span>").addClass(p.icons.up)))),t.append($("<td>").append($("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:p.tooltips.pickMinute}).attr("data-action","showMinutes"))),a.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append($("<span>").addClass(p.icons.down))))),d("s")&&(d("m")&&(e.append($("<td>").addClass("separator")),t.append($("<td>").addClass("separator").html(":")),a.append($("<td>").addClass("separator"))),e.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append($("<span>").addClass(p.icons.up)))),t.append($("<td>").append($("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:p.tooltips.pickSecond}).attr("data-action","showSeconds"))),a.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append($("<span>").addClass(p.icons.down))))),Y||(e.append($("<td>").addClass("separator")),t.append($("<td>").append($("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:p.tooltips.togglePeriod}))),a.append($("<td>").addClass("separator"))),$("<div>").addClass("timepicker-picker").append($("<table>").addClass("table-condensed").append([e,t,a])))];return d("h")&&o.push(n),d("m")&&o.push(r),d("s")&&o.push(i),o}function t(){var e,t,a,n=$("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),r=$("<div>").addClass("datepicker").append((t=$("<thead>").append($("<tr>").append($("<th>").addClass("prev").attr("data-action","previous").append($("<span>").addClass(p.icons.previous))).append($("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",p.calendarWeeks?"6":"5")).append($("<th>").addClass("next").attr("data-action","next").append($("<span>").addClass(p.icons.next)))),a=$("<tbody>").append($("<tr>").append($("<td>").attr("colspan",p.calendarWeeks?"8":"7"))),[$("<div>").addClass("datepicker-days").append($("<table>").addClass("table-condensed").append(t).append($("<tbody>"))),$("<div>").addClass("datepicker-months").append($("<table>").addClass("table-condensed").append(t.clone()).append(a.clone())),$("<div>").addClass("datepicker-years").append($("<table>").addClass("table-condensed").append(t.clone()).append(a.clone())),$("<div>").addClass("datepicker-decades").append($("<table>").addClass("table-condensed").append(t.clone()).append(a.clone()))])),i=$("<div>").addClass("timepicker").append(f()),o=$("<ul>").addClass("list-unstyled"),s=$("<li>").addClass("picker-switch"+(p.collapse?" accordion-toggle":"")).append((e=[],p.showTodayButton&&e.push($("<td>").append($("<a>").attr({"data-action":"today",title:p.tooltips.today}).append($("<span>").addClass(p.icons.today)))),!p.sideBySide&&u()&&l()&&e.push($("<td>").append($("<a>").attr({"data-action":"togglePicker",title:p.tooltips.selectTime}).append($("<span>").addClass(p.icons.time)))),p.showClear&&e.push($("<td>").append($("<a>").attr({"data-action":"clear",title:p.tooltips.clear}).append($("<span>").addClass(p.icons.clear)))),p.showClose&&e.push($("<td>").append($("<a>").attr({"data-action":"close",title:p.tooltips.close}).append($("<span>").addClass(p.icons.close)))),$("<table>").addClass("table-condensed").append($("<tbody>").append($("<tr>").append(e)))));return p.inline&&n.removeClass("dropdown-menu"),Y&&n.addClass("usetwentyfour"),d("s")&&!Y&&n.addClass("wider"),p.sideBySide&&u()&&l()?(n.addClass("timepicker-sbs"),"top"===p.toolbarPlacement&&n.append(s),n.append($("<div>").addClass("row").append(r.addClass("col-md-6")).append(i.addClass("col-md-6"))),"bottom"===p.toolbarPlacement&&n.append(s),n):("top"===p.toolbarPlacement&&o.append(s),u()&&o.append($("<li>").addClass(p.collapse&&l()?"collapse in":"").append(r)),"default"===p.toolbarPlacement&&o.append(s),l()&&o.append($("<li>").addClass(p.collapse&&u()?"collapse":"").append(i)),"bottom"===p.toolbarPlacement&&o.append(s),n.append(o))}function n(){var e,t=(z||i).position(),a=(z||i).offset(),n=p.widgetPositioning.vertical,r=p.widgetPositioning.horizontal;if(p.widgetParent)e=p.widgetParent.append(N);else if(i.is("input"))e=i.after(N).parent();else{if(p.inline)return void(e=i.append(N));(e=i).children().first().after(N)}if("auto"===n&&(n=a.top+1.5*N.height()>=$(window).height()+$(window).scrollTop()&&N.height()+i.outerHeight()<a.top?"top":"bottom"),"auto"===r&&(r=e.width()<a.left+N.outerWidth()/2&&a.left+N.outerWidth()>$(window).width()?"right":"left"),"top"===n?N.addClass("top").removeClass("bottom"):N.addClass("bottom").removeClass("top"),"right"===r?N.addClass("pull-right"):N.removeClass("pull-right"),"static"===e.css("position")&&(e=e.parents().filter(function(){return"static"!==$(this).css("position")}).first()),0===e.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");N.css({top:"top"===n?"auto":t.top+i.outerHeight(),bottom:"top"===n?e.outerHeight()-(e===i?0:t.top):"auto",left:"left"===r?e===i?0:t.left:"auto",right:"left"===r?"auto":e.outerWidth()-i.outerWidth()-(e===i?0:t.left)})}function h(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||i.trigger(e)}function r(e){"y"===e&&(e="YYYY"),h({type:"dp.update",change:e,viewDate:H.clone()})}function o(e){N&&(e&&(j=Math.max(V,Math.min(3,j+e))),N.find(".datepicker > div").hide().filter(".datepicker-"+Z[j].clsName).show())}function m(e,t){var a,n,r,i;if(e.isValid()&&!(p.disabledDates&&"d"===t&&(a=e,!0===p.disabledDates[a.format("YYYY-MM-DD")])||p.enabledDates&&"d"===t&&(n=e,!0!==p.enabledDates[n.format("YYYY-MM-DD")])||p.minDate&&e.isBefore(p.minDate,t)||p.maxDate&&e.isAfter(p.maxDate,t)||p.daysOfWeekDisabled&&"d"===t&&-1!==p.daysOfWeekDisabled.indexOf(e.day())||p.disabledHours&&("h"===t||"m"===t||"s"===t)&&(r=e,!0===p.disabledHours[r.format("H")])||p.enabledHours&&("h"===t||"m"===t||"s"===t)&&(i=e,!0!==p.enabledHours[i.format("H")]))){if(p.disabledTimeIntervals&&("h"===t||"m"===t||"s"===t)){var o=!1;if($.each(p.disabledTimeIntervals,function(){if(e.isBetween(this[0],this[1]))return!(o=!0)}),o)return}return 1}}function s(){var e,t,a,n=N.find(".datepicker-days"),r=n.find("th"),i=[],o=[];if(u()){for(r.eq(0).find("span").attr("title",p.tooltips.prevMonth),r.eq(1).attr("title",p.tooltips.selectMonth),r.eq(2).find("span").attr("title",p.tooltips.nextMonth),n.find(".disabled").removeClass("disabled"),r.eq(1).text(H.format(p.dayViewHeaderFormat)),m(H.clone().subtract(1,"M"),"M")||r.eq(0).addClass("disabled"),m(H.clone().add(1,"M"),"M")||r.eq(2).addClass("disabled"),e=H.clone().startOf("M").startOf("w").startOf("d"),a=0;a<42;a++)0===e.weekday()&&(t=$("<tr>"),p.calendarWeeks&&t.append('<td class="cw">'+e.week()+"</td>"),i.push(t)),o=["day"],e.isBefore(H,"M")&&o.push("old"),e.isAfter(H,"M")&&o.push("new"),e.isSame(E,"d")&&!W&&o.push("active"),m(e,"d")||o.push("disabled"),e.isSame(c(),"d")&&o.push("today"),0!==e.day()&&6!==e.day()||o.push("weekend"),h({type:"dp.classify",date:e,classNames:o}),t.append('<td data-action="selectDay" data-day="'+e.format("L")+'" class="'+o.join(" ")+'">'+e.date()+"</td>"),e.add(1,"d");var s,d,l;n.find("tbody").empty().append(i),s=N.find(".datepicker-months"),d=s.find("th"),l=s.find("tbody").find("span"),d.eq(0).find("span").attr("title",p.tooltips.prevYear),d.eq(1).attr("title",p.tooltips.selectYear),d.eq(2).find("span").attr("title",p.tooltips.nextYear),s.find(".disabled").removeClass("disabled"),m(H.clone().subtract(1,"y"),"y")||d.eq(0).addClass("disabled"),d.eq(1).text(H.year()),m(H.clone().add(1,"y"),"y")||d.eq(2).addClass("disabled"),l.removeClass("active"),E.isSame(H,"y")&&!W&&l.eq(E.month()).addClass("active"),l.each(function(e){m(H.clone().month(e),"M")||$(this).addClass("disabled")}),function(){var e=N.find(".datepicker-years"),t=e.find("th"),a=H.clone().subtract(5,"y"),n=H.clone().add(6,"y"),r="";for(t.eq(0).find("span").attr("title",p.tooltips.prevDecade),t.eq(1).attr("title",p.tooltips.selectDecade),t.eq(2).find("span").attr("title",p.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),p.minDate&&p.minDate.isAfter(a,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(a.year()+"-"+n.year()),p.maxDate&&p.maxDate.isBefore(n,"y")&&t.eq(2).addClass("disabled");!a.isAfter(n,"y");)r+='<span data-action="selectYear" class="year'+(a.isSame(E,"y")&&!W?" active":"")+(m(a,"y")?"":" disabled")+'">'+a.year()+"</span>",a.add(1,"y");e.find("td").html(r)}(),function(){var e,t=N.find(".datepicker-decades"),a=t.find("th"),n=_({y:H.year()-H.year()%100-1}),r=n.clone().add(100,"y"),i=n.clone(),o=!1,s=!1,d="";for(a.eq(0).find("span").attr("title",p.tooltips.prevCentury),a.eq(2).find("span").attr("title",p.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(n.isSame(_({y:1900}))||p.minDate&&p.minDate.isAfter(n,"y"))&&a.eq(0).addClass("disabled"),a.eq(1).text(n.year()+"-"+r.year()),(n.isSame(_({y:2e3}))||p.maxDate&&p.maxDate.isBefore(r,"y"))&&a.eq(2).addClass("disabled");!n.isAfter(r,"y");)e=n.year()+12,o=p.minDate&&p.minDate.isAfter(n,"y")&&p.minDate.year()<=e,s=p.maxDate&&p.maxDate.isAfter(n,"y")&&p.maxDate.year()<=e,d+='<span data-action="selectDecade" class="decade'+(E.isAfter(n)&&E.year()<=e?" active":"")+(m(n,"y")||o||s?"":" disabled")+'" data-selection="'+(n.year()+6)+'">'+(n.year()+1)+" - "+(n.year()+12)+"</span>",n.add(12,"y");d+="<span></span><span></span><span></span>",t.find("td").html(d),a.eq(1).text(i.year()+1+"-"+n.year())}()}}function e(){var e,t,a=N.find(".timepicker span[data-time-component]");Y||(e=N.find(".timepicker [data-action=togglePeriod]"),t=E.clone().add(12<=E.hours()?-12:12,"h"),e.text(E.format("A")),m(t,"h")?e.removeClass("disabled"):e.addClass("disabled")),a.filter("[data-time-component=hours]").text(E.format(Y?"HH":"hh")),a.filter("[data-time-component=minutes]").text(E.format("mm")),a.filter("[data-time-component=seconds]").text(E.format("ss")),function(){var e=N.find(".timepicker-hours table"),t=H.clone().startOf("d"),a=[],n=$("<tr>");for(11<H.hour()&&!Y&&t.hour(12);t.isSame(H,"d")&&(Y||H.hour()<12&&t.hour()<12||11<H.hour());)t.hour()%4==0&&(n=$("<tr>"),a.push(n)),n.append('<td data-action="selectHour" class="hour'+(m(t,"h")?"":" disabled")+'">'+t.format(Y?"HH":"hh")+"</td>"),t.add(1,"h");e.empty().append(a)}(),function(){for(var e=N.find(".timepicker-minutes table"),t=H.clone().startOf("h"),a=[],n=$("<tr>"),r=1===p.stepping?5:p.stepping;H.isSame(t,"h");)t.minute()%(4*r)==0&&(n=$("<tr>"),a.push(n)),n.append('<td data-action="selectMinute" class="minute'+(m(t,"m")?"":" disabled")+'">'+t.format("mm")+"</td>"),t.add(r,"m");e.empty().append(a)}(),function(){for(var e=N.find(".timepicker-seconds table"),t=H.clone().startOf("m"),a=[],n=$("<tr>");H.isSame(t,"m");)t.second()%20==0&&(n=$("<tr>"),a.push(n)),n.append('<td data-action="selectSecond" class="second'+(m(t,"s")?"":" disabled")+'">'+t.format("ss")+"</td>"),t.add(5,"s");e.empty().append(a)}()}function y(){N&&(s(),e())}function g(e){var t=W?null:E;if(!e)return W=!0,I.val(""),i.data("date",""),h({type:"dp.change",date:!1,oldDate:t}),void y();if(e=e.clone().locale(p.locale),a()&&e.tz(p.timeZone),1!==p.stepping)for(e.minutes(Math.round(e.minutes()/p.stepping)*p.stepping).seconds(0);p.minDate&&e.isBefore(p.minDate);)e.add(p.stepping,"minutes");m(e)?(H=(E=e).clone(),I.val(E.format(q)),i.data("date",E.format(q)),W=!1,y(),h({type:"dp.change",date:E.clone(),oldDate:t})):(p.keepInvalid?h({type:"dp.change",date:e,oldDate:t}):I.val(W?"":E.format(q)),h({type:"dp.error",date:e,oldDate:t}))}function b(){var t=!1;return N?(N.find(".collapse").each(function(){var e=$(this).data("collapse");return!e||!e.transitioning||!(t=!0)}),t||(z&&z.hasClass("btn")&&z.toggleClass("active"),N.hide(),$(window).off("resize",n),N.off("click","[data-action]"),N.off("mousedown",!1),N.remove(),N=!1,h({type:"dp.hide",date:E.clone()}),I.blur(),H=E.clone()),L):L}function w(){g(null)}function v(e){return void 0===p.parseInputDate?(!_.isMoment(e)||e instanceof Date)&&(e=c(e)):e=p.parseInputDate(e),e}function k(e){return $(e.currentTarget).is(".disabled")||X[$(e.currentTarget).data("action")].apply(L,arguments),!1}function D(){var e;return I.prop("disabled")||!p.ignoreReadonly&&I.prop("readonly")||N||(void 0!==I.val()&&0!==I.val().trim().length?g(v(I.val().trim())):W&&p.useCurrent&&(p.inline||I.is("input")&&0===I.val().trim().length)&&(e=c(),"string"==typeof p.useCurrent&&(e={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}}[p.useCurrent](e)),g(e)),N=t(),function(){var e=$("<tr>"),t=H.clone().startOf("w").startOf("d");for(!0===p.calendarWeeks&&e.append($("<th>").addClass("cw").text("#"));t.isBefore(H.clone().endOf("w"));)e.append($("<th>").addClass("dow").text(t.format("dd"))),t.add(1,"d");N.find(".datepicker-days thead").append(e)}(),function(){for(var e=[],t=H.clone().startOf("y").startOf("d");t.isSame(H,"y");)e.push($("<span>").attr("data-action","selectMonth").addClass("month").text(t.format("MMM"))),t.add(1,"M");N.find(".datepicker-months td").empty().append(e)}(),N.find(".timepicker-hours").hide(),N.find(".timepicker-minutes").hide(),N.find(".timepicker-seconds").hide(),y(),o(),$(window).on("resize",n),N.on("click","[data-action]",k),N.on("mousedown",!1),z&&z.hasClass("btn")&&z.toggleClass("active"),n(),N.show(),p.focusOnShow&&!I.is(":focus")&&I.focus(),h({type:"dp.show"})),L}function C(){return(N?b:D)()}function x(e){var t,a,n,r,i=null,o=[],s={},d=e.which;for(t in K[d]="p",K)K.hasOwnProperty(t)&&"p"===K[t]&&(o.push(t),parseInt(t,10)!==d&&(s[t]=!0));for(t in p.keyBinds)if(p.keyBinds.hasOwnProperty(t)&&"function"==typeof p.keyBinds[t]&&(n=t.split(" ")).length===o.length&&J[d]===n[n.length-1]){for(r=!0,a=n.length-2;0<=a;a--)if(!(J[n[a]]in s)){r=!1;break}if(r){i=p.keyBinds[t];break}}i&&(i.call(L,N),e.stopPropagation(),e.preventDefault())}function T(e){K[e.which]="r",e.stopPropagation(),e.preventDefault()}function M(e){var t=$(e.target).val().trim(),a=t?v(t):null;return g(a),e.stopImmediatePropagation(),!1}function S(e){var t={};return $.each(e,function(){var e=v(this);e.isValid()&&(t[e.format("YYYY-MM-DD")]=!0)}),!!Object.keys(t).length&&t}function O(e){var t={};return $.each(e,function(){t[this]=!0}),!!Object.keys(t).length&&t}function P(){var e=p.format||"L LT";q=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return(E.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return E.localeData().longDateFormat(e)||e})}),(B=p.extraFormats?p.extraFormats.slice():[]).indexOf(e)<0&&B.indexOf(q)<0&&B.push(q),Y=q.toLowerCase().indexOf("a")<1&&q.replace(/\[.*?\]/g,"").indexOf("h")<1,d("y")&&(V=2),d("M")&&(V=1),d("d")&&(V=0),j=Math.max(V,j),W||g(E)}var E,H,I,Y,q,B,j,A,F,L={},W=!0,z=!1,N=!1,V=0,Z=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],R=["days","months","years","decades"],Q=["top","bottom","auto"],U=["left","right","auto"],G=["default","top","bottom"],J={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},K={},X={next:function(){var e=Z[j].navFnc;H.add(Z[j].navStep,e),s(),r(e)},previous:function(){var e=Z[j].navFnc;H.subtract(Z[j].navStep,e),s(),r(e)},pickerSwitch:function(){o(1)},selectMonth:function(e){var t=$(e.target).closest("tbody").find("span").index($(e.target));H.month(t),j===V?(g(E.clone().year(H.year()).month(H.month())),p.inline||b()):(o(-1),s()),r("M")},selectYear:function(e){var t=parseInt($(e.target).text(),10)||0;H.year(t),j===V?(g(E.clone().year(H.year())),p.inline||b()):(o(-1),s()),r("YYYY")},selectDecade:function(e){var t=parseInt($(e.target).data("selection"),10)||0;H.year(t),j===V?(g(E.clone().year(H.year())),p.inline||b()):(o(-1),s()),r("YYYY")},selectDay:function(e){var t=H.clone();$(e.target).is(".old")&&t.subtract(1,"M"),$(e.target).is(".new")&&t.add(1,"M"),g(t.date(parseInt($(e.target).text(),10))),l()||p.keepOpen||p.inline||b()},incrementHours:function(){var e=E.clone().add(1,"h");m(e,"h")&&g(e)},incrementMinutes:function(){var e=E.clone().add(p.stepping,"m");m(e,"m")&&g(e)},incrementSeconds:function(){var e=E.clone().add(1,"s");m(e,"s")&&g(e)},decrementHours:function(){var e=E.clone().subtract(1,"h");m(e,"h")&&g(e)},decrementMinutes:function(){var e=E.clone().subtract(p.stepping,"m");m(e,"m")&&g(e)},decrementSeconds:function(){var e=E.clone().subtract(1,"s");m(e,"s")&&g(e)},togglePeriod:function(){g(E.clone().add(12<=E.hours()?-12:12,"h"))},togglePicker:function(e){var t,a=$(e.target),n=a.closest("ul"),r=n.find(".in"),i=n.find(".collapse:not(.in)");if(r&&r.length){if((t=r.data("collapse"))&&t.transitioning)return;r.collapse?(r.collapse("hide"),i.collapse("show")):(r.removeClass("in"),i.addClass("in")),a.is("span")?a.toggleClass(p.icons.time+" "+p.icons.date):a.find("span").toggleClass(p.icons.time+" "+p.icons.date)}},showPicker:function(){N.find(".timepicker > div:not(.timepicker-picker)").hide(),N.find(".timepicker .timepicker-picker").show()},showHours:function(){N.find(".timepicker .timepicker-picker").hide(),N.find(".timepicker .timepicker-hours").show()},showMinutes:function(){N.find(".timepicker .timepicker-picker").hide(),N.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){N.find(".timepicker .timepicker-picker").hide(),N.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var t=parseInt($(e.target).text(),10);Y||(12<=E.hours()?12!==t&&(t+=12):12===t&&(t=0)),g(E.clone().hours(t)),X.showPicker.call(L)},selectMinute:function(e){g(E.clone().minutes(parseInt($(e.target).text(),10))),X.showPicker.call(L)},selectSecond:function(e){g(E.clone().seconds(parseInt($(e.target).text(),10))),X.showPicker.call(L)},clear:w,today:function(){var e=c();m(e,"d")&&g(e)},close:b};if(L.destroy=function(){b(),I.off({change:M,blur:blur,keydown:x,keyup:T,focus:p.allowInputToggle?b:""}),i.is("input")?I.off({focus:D}):z&&(z.off("click",C),z.off("mousedown",!1)),i.removeData("DateTimePicker"),i.removeData("date")},L.toggle=C,L.show=D,L.hide=b,L.disable=function(){return b(),z&&z.hasClass("btn")&&z.addClass("disabled"),I.prop("disabled",!0),L},L.enable=function(){return z&&z.hasClass("btn")&&z.removeClass("disabled"),I.prop("disabled",!1),L},L.ignoreReadonly=function(e){if(0===arguments.length)return p.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return p.ignoreReadonly=e,L},L.options=function(e){if(0===arguments.length)return $.extend(!0,{},p);if(!(e instanceof Object))throw new TypeError("options() options parameter should be an object");return $.extend(!0,p,e),$.each(p,function(e,t){if(void 0===L[e])throw new TypeError("option "+e+" is not recognized!");L[e](t)}),L},L.date=function(e){if(0===arguments.length)return W?null:E.clone();if(!(null===e||"string"==typeof e||_.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return g(null===e?null:v(e)),L},L.format=function(e){if(0===arguments.length)return p.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return p.format=e,q&&P(),L},L.timeZone=function(e){if(0===arguments.length)return p.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return p.timeZone=e,L},L.dayViewHeaderFormat=function(e){if(0===arguments.length)return p.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return p.dayViewHeaderFormat=e,L},L.extraFormats=function(e){if(0===arguments.length)return p.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return p.extraFormats=e,B&&P(),L},L.disabledDates=function(e){if(0===arguments.length)return p.disabledDates?$.extend({},p.disabledDates):p.disabledDates;if(!e)return p.disabledDates=!1,y(),L;if(!(e instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return p.disabledDates=S(e),p.enabledDates=!1,y(),L},L.enabledDates=function(e){if(0===arguments.length)return p.enabledDates?$.extend({},p.enabledDates):p.enabledDates;if(!e)return p.enabledDates=!1,y(),L;if(!(e instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return p.enabledDates=S(e),p.disabledDates=!1,y(),L},L.daysOfWeekDisabled=function(e){if(0===arguments.length)return p.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return p.daysOfWeekDisabled=!1,y(),L;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(p.daysOfWeekDisabled=e.reduce(function(e,t){return 6<(t=parseInt(t,10))||t<0||isNaN(t)||-1===e.indexOf(t)&&e.push(t),e},[]).sort(),p.useCurrent&&!p.keepInvalid){for(var t=0;!m(E,"d");){if(E.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}g(E)}return y(),L},L.maxDate=function(e){if(0===arguments.length)return p.maxDate?p.maxDate.clone():p.maxDate;if("boolean"==typeof e&&!1===e)return p.maxDate=!1,y(),L;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=c()));var t=v(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(p.minDate&&t.isBefore(p.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(q));return p.maxDate=t,p.useCurrent&&!p.keepInvalid&&E.isAfter(e)&&g(p.maxDate),H.isAfter(t)&&(H=t.clone().subtract(p.stepping,"m")),y(),L},L.minDate=function(e){if(0===arguments.length)return p.minDate?p.minDate.clone():p.minDate;if("boolean"==typeof e&&!1===e)return p.minDate=!1,y(),L;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=c()));var t=v(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(p.maxDate&&t.isAfter(p.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(q));return p.minDate=t,p.useCurrent&&!p.keepInvalid&&E.isBefore(e)&&g(p.minDate),H.isBefore(t)&&(H=t.clone().add(p.stepping,"m")),y(),L},L.defaultDate=function(e){if(0===arguments.length)return p.defaultDate?p.defaultDate.clone():p.defaultDate;if(!e)return p.defaultDate=!1,L;"string"==typeof e&&(e="now"===e||"moment"===e?c():c(e));var t=v(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!m(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return p.defaultDate=t,(p.defaultDate&&p.inline||""===I.val().trim())&&g(p.defaultDate),L},L.locale=function(e){if(0===arguments.length)return p.locale;if(!_.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return p.locale=e,E.locale(p.locale),H.locale(p.locale),q&&P(),N&&(b(),D()),L},L.stepping=function(e){return 0===arguments.length?p.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),p.stepping=e,L)},L.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return p.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return p.useCurrent=e,L},L.collapse=function(e){if(0===arguments.length)return p.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return p.collapse===e||(p.collapse=e,N&&(b(),D())),L},L.icons=function(e){if(0===arguments.length)return $.extend({},p.icons);if(!(e instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return $.extend(p.icons,e),N&&(b(),D()),L},L.tooltips=function(e){if(0===arguments.length)return $.extend({},p.tooltips);if(!(e instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return $.extend(p.tooltips,e),N&&(b(),D()),L},L.useStrict=function(e){if(0===arguments.length)return p.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return p.useStrict=e,L},L.sideBySide=function(e){if(0===arguments.length)return p.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return p.sideBySide=e,N&&(b(),D()),L},L.viewMode=function(e){if(0===arguments.length)return p.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===R.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+R.join(", ")+") value");return p.viewMode=e,j=Math.max(R.indexOf(e),V),o(),L},L.toolbarPlacement=function(e){if(0===arguments.length)return p.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===G.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+G.join(", ")+") value");return p.toolbarPlacement=e,N&&(b(),D()),L},L.widgetPositioning=function(e){if(0===arguments.length)return $.extend({},p.widgetPositioning);if("[object Object]"!=={}.toString.call(e))throw new TypeError("widgetPositioning() expects an object variable");if(e.horizontal){if("string"!=typeof e.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(e.horizontal=e.horizontal.toLowerCase(),-1===U.indexOf(e.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+U.join(", ")+")");p.widgetPositioning.horizontal=e.horizontal}if(e.vertical){if("string"!=typeof e.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(e.vertical=e.vertical.toLowerCase(),-1===Q.indexOf(e.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+Q.join(", ")+")");p.widgetPositioning.vertical=e.vertical}return y(),L},L.calendarWeeks=function(e){if(0===arguments.length)return p.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return p.calendarWeeks=e,y(),L},L.showTodayButton=function(e){if(0===arguments.length)return p.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return p.showTodayButton=e,N&&(b(),D()),L},L.showClear=function(e){if(0===arguments.length)return p.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return p.showClear=e,N&&(b(),D()),L},L.widgetParent=function(e){if(0===arguments.length)return p.widgetParent;if("string"==typeof e&&(e=$(e)),null!==e&&"string"!=typeof e&&!(e instanceof $))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return p.widgetParent=e,N&&(b(),D()),L},L.keepOpen=function(e){if(0===arguments.length)return p.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return p.keepOpen=e,L},L.focusOnShow=function(e){if(0===arguments.length)return p.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return p.focusOnShow=e,L},L.inline=function(e){if(0===arguments.length)return p.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return p.inline=e,L},L.clear=function(){return w(),L},L.keyBinds=function(e){return 0===arguments.length?p.keyBinds:(p.keyBinds=e,L)},L.getMoment=function(e){return c(e)},L.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return p.debug=e,L},L.allowInputToggle=function(e){if(0===arguments.length)return p.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return p.allowInputToggle=e,L},L.showClose=function(e){if(0===arguments.length)return p.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return p.showClose=e,L},L.keepInvalid=function(e){if(0===arguments.length)return p.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return p.keepInvalid=e,L},L.datepickerInput=function(e){if(0===arguments.length)return p.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return p.datepickerInput=e,L},L.parseInputDate=function(e){if(0===arguments.length)return p.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return p.parseInputDate=e,L},L.disabledTimeIntervals=function(e){if(0===arguments.length)return p.disabledTimeIntervals?$.extend({},p.disabledTimeIntervals):p.disabledTimeIntervals;if(!e)return p.disabledTimeIntervals=!1,y(),L;if(!(e instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return p.disabledTimeIntervals=e,y(),L},L.disabledHours=function(e){if(0===arguments.length)return p.disabledHours?$.extend({},p.disabledHours):p.disabledHours;if(!e)return p.disabledHours=!1,y(),L;if(!(e instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(p.disabledHours=O(e),p.enabledHours=!1,p.useCurrent&&!p.keepInvalid){for(var t=0;!m(E,"h");){if(E.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}g(E)}return y(),L},L.enabledHours=function(e){if(0===arguments.length)return p.enabledHours?$.extend({},p.enabledHours):p.enabledHours;if(!e)return p.enabledHours=!1,y(),L;if(!(e instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(p.enabledHours=O(e),p.disabledHours=!1,p.useCurrent&&!p.keepInvalid){for(var t=0;!m(E,"h");){if(E.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}g(E)}return y(),L},L.viewDate=function(e){if(0===arguments.length)return H.clone();if(!e)return H=E.clone(),L;if(!("string"==typeof e||_.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return H=v(e),r(),L},i.is("input"))I=i;else if(0===(I=i.find(p.datepickerInput)).length)I=i.find("input");else if(!I.is("input"))throw new Error('CSS class "'+p.datepickerInput+'" cannot be applied to non input element');if(i.hasClass("input-group")&&(z=0===i.find(".datepickerbutton").length?i.find(".input-group-addon"):i.find(".datepickerbutton")),!p.inline&&!I.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return E=c(),H=E.clone(),$.extend(!0,p,(F={},(A=i.is("input")||p.inline?i.data():i.find("input").data()).dateOptions&&A.dateOptions instanceof Object&&(F=$.extend(!0,F,A.dateOptions)),$.each(p,function(e){var t="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==A[t]&&(F[e]=A[t])}),F)),L.options(p),P(),I.on({change:M,blur:p.debug?"":b,keydown:x,keyup:T,focus:p.allowInputToggle?D:""}),i.is("input")?I.on({focus:D}):z&&(z.on("click",C),z.on("mousedown",!1)),I.prop("disabled")&&L.disable(),I.is("input")&&0!==I.val().trim().length?g(v(I.val().trim())):p.defaultDate&&void 0===I.attr("placeholder")&&g(p.defaultDate),p.inline&&D(),L}return $.fn.datetimepicker=function(a){a=a||{};var t,n=Array.prototype.slice.call(arguments,1),r=!0;if("object"==typeof a)return this.each(function(){var e,t=$(this);t.data("DateTimePicker")||(e=$.extend(!0,{},$.fn.datetimepicker.defaults,a),t.data("DateTimePicker",i(t,e)))});if("string"==typeof a)return this.each(function(){var e=$(this).data("DateTimePicker");if(!e)throw new Error('bootstrap-datetimepicker("'+a+'") method was called on an element that is not using DateTimePicker');t=e[a].apply(e,n),r=t===e}),r||-1<$.inArray(a,["destroy","hide","show","toggle"])?this:t;throw new TypeError("Invalid arguments for DateTimePicker: "+a)},$.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:_.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(7,"d")):this.date(t.clone().add(this.stepping(),"m"))}},down:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(7,"d")):this.date(t.clone().subtract(this.stepping(),"m"))}else this.show()},"control up":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(1,"y")):this.date(t.clone().add(1,"h"))}},"control down":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(1,"y")):this.date(t.clone().subtract(1,"h"))}},left:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"d"))}},right:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"d"))}},pageUp:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"M"))}},pageDown:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(e){e&&e.find(".timepicker").is(":visible")&&e.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},$.fn.datetimepicker});;

jQuery('document').ready(function(){


if ($(window).width() < 980) {

	$("#lnav h3").click(function(){
		//slide up all the link lists
		$("#lnav .cols3, #lnav .cols2").slideUp();
		//slide down the link list below the h3 clicked - only if its closed
		if(!$(this).next().is(":visible"))
		{
			$(this).next().slideDown();
		}
	})
	}
});
/*!
 * fancyBox - jQuery Plugin
 * version: 2.1.5 (Fri, 14 Jun 2013)
 * @requires jQuery v1.6 or later
 *
 * Examples at http://fancyapps.com/fancybox/
 * License: www.fancyapps.com/fancybox/#license
 *
 * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
 *
 */

(function (window, document, $, undefined) {
	"use strict";

	var H = $("html"),
		W = $(window),
		D = $(document),
		F = $.fancybox = function () {
			F.open.apply( this, arguments );
		},
		IE =  navigator.userAgent.match(/msie/i),
		didUpdate	= null,
		isTouch		= document.createTouch !== undefined,

		isQuery	= function(obj) {
			return obj && obj.hasOwnProperty && obj instanceof $;
		},
		isString = function(str) {
			return str && $.type(str) === "string";
		},
		isPercentage = function(str) {
			return isString(str) && str.indexOf('%') > 0;
		},
		isScrollable = function(el) {
			return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)));
		},
		getScalar = function(orig, dim) {
			var value = parseInt(orig, 10) || 0;

			if (dim && isPercentage(orig)) {
				value = F.getViewport()[ dim ] / 100 * value;
			}

			return Math.ceil(value);
		},
		getValue = function(value, dim) {
			return getScalar(value, dim) + 'px';
		};

	$.extend(F, {
		// The current version of fancyBox
		version: '2.1.5',

		defaults: {
			padding : 15,
			margin  : 20,

			width     : 800,
			height    : 600,
			minWidth  : 100,
			minHeight : 100,
			maxWidth  : 9999,
			maxHeight : 9999,
			pixelRatio: 1, // Set to 2 for retina display support

			autoSize   : true,
			autoHeight : false,
			autoWidth  : false,

			autoResize  : true,
			autoCenter  : !isTouch,
			fitToView   : true,
			aspectRatio : false,
			topRatio    : 0.5,
			leftRatio   : 0.5,

			scrolling : 'auto', // 'auto', 'yes' or 'no'
			wrapCSS   : '',

			arrows     : true,
			closeBtn   : true,
			closeClick : false,
			nextClick  : false,
			mouseWheel : true,
			autoPlay   : false,
			playSpeed  : 3000,
			preload    : 3,
			modal      : false,
			loop       : true,

			ajax  : {
				dataType : 'html',
				headers  : { 'X-fancyBox': true }
			},
			iframe : {
				scrolling : 'auto',
				preload   : true
			},
			swf : {
				wmode: 'transparent',
				allowfullscreen   : 'true',
				allowscriptaccess : 'always'
			},

			keys  : {
				next : {
					13 : 'left', // enter
					34 : 'up',   // page down
					39 : 'left', // right arrow
					40 : 'up'    // down arrow
				},
				prev : {
					8  : 'right',  // backspace
					33 : 'down',   // page up
					37 : 'right',  // left arrow
					38 : 'down'    // up arrow
				},
				close  : [27], // escape key
				play   : [32], // space - start/stop slideshow
				toggle : [70]  // letter "f" - toggle fullscreen
			},

			direction : {
				next : 'left',
				prev : 'right'
			},

			scrollOutside  : true,

			// Override some properties
			index   : 0,
			type    : null,
			href    : null,
			content : null,
			title   : null,

			// HTML templates
			tpl: {
				wrap     : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
				image    : '<img class="fancybox-image" src="{href}" alt="" />',
				iframe   : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>',
				error    : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
				closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
				next     : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
				prev     : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
			},

			// Properties for each animation type
			// Opening fancyBox
			openEffect  : 'fade', // 'elastic', 'fade' or 'none'
			openSpeed   : 250,
			openEasing  : 'swing',
			openOpacity : true,
			openMethod  : 'zoomIn',

			// Closing fancyBox
			closeEffect  : 'fade', // 'elastic', 'fade' or 'none'
			closeSpeed   : 250,
			closeEasing  : 'swing',
			closeOpacity : true,
			closeMethod  : 'zoomOut',

			// Changing next gallery item
			nextEffect : 'elastic', // 'elastic', 'fade' or 'none'
			nextSpeed  : 250,
			nextEasing : 'swing',
			nextMethod : 'changeIn',

			// Changing previous gallery item
			prevEffect : 'elastic', // 'elastic', 'fade' or 'none'
			prevSpeed  : 250,
			prevEasing : 'swing',
			prevMethod : 'changeOut',

			// Enable default helpers
			helpers : {
				overlay : true,
				title   : true
			},

			// Callbacks
			onCancel     : $.noop, // If canceling
			beforeLoad   : $.noop, // Before loading
			afterLoad    : $.noop, // After loading
			beforeShow   : $.noop, // Before changing in current item
			afterShow    : $.noop, // After opening
			beforeChange : $.noop, // Before changing gallery item
			beforeClose  : $.noop, // Before closing
			afterClose   : $.noop  // After closing
		},

		//Current state
		group    : {}, // Selected group
		opts     : {}, // Group options
		previous : null,  // Previous element
		coming   : null,  // Element being loaded
		current  : null,  // Currently loaded element
		isActive : false, // Is activated
		isOpen   : false, // Is currently open
		isOpened : false, // Have been fully opened at least once

		wrap  : null,
		skin  : null,
		outer : null,
		inner : null,

		player : {
			timer    : null,
			isActive : false
		},

		// Loaders
		ajaxLoad   : null,
		imgPreload : null,

		// Some collections
		transitions : {},
		helpers     : {},

		/*
		 *	Static methods
		 */

		open: function (group, opts) {
			if (!group) {
				return;
			}

			if (!$.isPlainObject(opts)) {
				opts = {};
			}

			// Close if already active
			if (false === F.close(true)) {
				return;
			}

			// Normalize group
			if (!$.isArray(group)) {
				group = isQuery(group) ? $(group).get() : [group];
			}

			// Recheck if the type of each element is `object` and set content type (image, ajax, etc)
			$.each(group, function(i, element) {
				var obj = {},
					href,
					title,
					content,
					type,
					rez,
					hrefParts,
					selector;

				if ($.type(element) === "object") {
					// Check if is DOM element
					if (element.nodeType) {
						element = $(element);
					}

					if (isQuery(element)) {
						obj = {
							href    : element.data('fancybox-href') || element.attr('href'),
							title   : element.data('fancybox-title') || element.attr('title'),
							isDom   : true,
							element : element
						};

						if ($.metadata) {
							$.extend(true, obj, element.metadata());
						}

					} else {
						obj = element;
					}
				}

				href  = opts.href  || obj.href || (isString(element) ? element : null);
				title = opts.title !== undefined ? opts.title : obj.title || '';

				content = opts.content || obj.content;
				type    = content ? 'html' : (opts.type  || obj.type);

				if (!type && obj.isDom) {
					type = element.data('fancybox-type');

					if (!type) {
						rez  = element.prop('class').match(/fancybox\.(\w+)/);
						type = rez ? rez[1] : null;
					}
				}

				if (isString(href)) {
					// Try to guess the content type
					if (!type) {
						if (F.isImage(href)) {
							type = 'image';

						} else if (F.isSWF(href)) {
							type = 'swf';

						} else if (href.charAt(0) === '#') {
							type = 'inline';

						} else if (isString(element)) {
							type    = 'html';
							content = element;
						}
					}

					// Split url into two pieces with source url and content selector, e.g,
					// "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id"
					if (type === 'ajax') {
						hrefParts = href.split(/\s+/, 2);
						href      = hrefParts.shift();
						selector  = hrefParts.shift();
					}
				}

				if (!content) {
					if (type === 'inline') {
						if (href) {
							content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7

						} else if (obj.isDom) {
							content = element;
						}

					} else if (type === 'html') {
						content = href;

					} else if (!type && !href && obj.isDom) {
						type    = 'inline';
						content = element;
					}
				}

				$.extend(obj, {
					href     : href,
					type     : type,
					content  : content,
					title    : title,
					selector : selector
				});

				group[ i ] = obj;
			});

			// Extend the defaults
			F.opts = $.extend(true, {}, F.defaults, opts);

			// All options are merged recursive except keys
			if (opts.keys !== undefined) {
				F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false;
			}

			F.group = group;

			return F._start(F.opts.index);
		},

		// Cancel image loading or abort ajax request
		cancel: function () {
			var coming = F.coming;

			if (!coming || false === F.trigger('onCancel')) {
				return;
			}

			F.hideLoading();

			if (F.ajaxLoad) {
				F.ajaxLoad.abort();
			}

			F.ajaxLoad = null;

			if (F.imgPreload) {
				F.imgPreload.onload = F.imgPreload.onerror = null;
			}

			if (coming.wrap) {
				coming.wrap.stop(true, true).trigger('onReset').remove();
			}

			F.coming = null;

			// If the first item has been canceled, then clear everything
			if (!F.current) {
				F._afterZoomOut( coming );
			}
		},

		// Start closing animation if is open; remove immediately if opening/closing
		close: function (event) {
			F.cancel();

			if (false === F.trigger('beforeClose')) {
				return;
			}

			F.unbindEvents();

			if (!F.isActive) {
				return;
			}

			if (!F.isOpen || event === true) {
				$('.fancybox-wrap').stop(true).trigger('onReset').remove();

				F._afterZoomOut();

			} else {
				F.isOpen = F.isOpened = false;
				F.isClosing = true;

				$('.fancybox-item, .fancybox-nav').remove();

				F.wrap.stop(true, true).removeClass('fancybox-opened');

				F.transitions[ F.current.closeMethod ]();
			}
		},

		// Manage slideshow:
		//   $.fancybox.play(); - toggle slideshow
		//   $.fancybox.play( true ); - start
		//   $.fancybox.play( false ); - stop
		play: function ( action ) {
			var clear = function () {
					clearTimeout(F.player.timer);
				},
				set = function () {
					clear();

					if (F.current && F.player.isActive) {
						F.player.timer = setTimeout(F.next, F.current.playSpeed);
					}
				},
				stop = function () {
					clear();

					D.unbind('.player');

					F.player.isActive = false;

					F.trigger('onPlayEnd');
				},
				start = function () {
					if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
						F.player.isActive = true;

						D.bind({
							'onCancel.player beforeClose.player' : stop,
							'onUpdate.player'   : set,
							'beforeLoad.player' : clear
						});

						set();

						F.trigger('onPlayStart');
					}
				};

			if (action === true || (!F.player.isActive && action !== false)) {
				start();
			} else {
				stop();
			}
		},

		// Navigate to next gallery item
		next: function ( direction ) {
			var current = F.current;

			if (current) {
				if (!isString(direction)) {
					direction = current.direction.next;
				}

				F.jumpto(current.index + 1, direction, 'next');
			}
		},

		// Navigate to previous gallery item
		prev: function ( direction ) {
			var current = F.current;

			if (current) {
				if (!isString(direction)) {
					direction = current.direction.prev;
				}

				F.jumpto(current.index - 1, direction, 'prev');
			}
		},

		// Navigate to gallery item by index
		jumpto: function ( index, direction, router ) {
			var current = F.current;

			if (!current) {
				return;
			}

			index = getScalar(index);

			F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ];
			F.router    = router || 'jumpto';

			if (current.loop) {
				if (index < 0) {
					index = current.group.length + (index % current.group.length);
				}

				index = index % current.group.length;
			}

			if (current.group[ index ] !== undefined) {
				F.cancel();

				F._start(index);
			}
		},

		// Center inside viewport and toggle position type to fixed or absolute if needed
		reposition: function (e, onlyAbsolute) {
			var current = F.current,
				wrap    = current ? current.wrap : null,
				pos;

			if (wrap) {
				pos = F._getPosition(onlyAbsolute);

				if (e && e.type === 'scroll') {
					delete pos.position;

					wrap.stop(true, true).animate(pos, 200);

				} else {
					wrap.css(pos);

					current.pos = $.extend({}, current.dim, pos);
				}
			}
		},

		update: function (e) {
			var type = (e && e.type),
				anyway = !type || type === 'orientationchange';

			if (anyway) {
				clearTimeout(didUpdate);

				didUpdate = null;
			}

			if (!F.isOpen || didUpdate) {
				return;
			}

			didUpdate = setTimeout(function() {
				var current = F.current;

				if (!current || F.isClosing) {
					return;
				}

				F.wrap.removeClass('fancybox-tmp');

				if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) {
					F._setDimension();
				}

				if (!(type === 'scroll' && current.canShrink)) {
					F.reposition(e);
				}

				F.trigger('onUpdate');

				didUpdate = null;

			}, (anyway && !isTouch ? 0 : 300));
		},

		// Shrink content to fit inside viewport or restore if resized
		toggle: function ( action ) {
			if (F.isOpen) {
				F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView;

				// Help browser to restore document dimensions
				if (isTouch) {
					F.wrap.removeAttr('style').addClass('fancybox-tmp');

					F.trigger('onUpdate');
				}

				F.update();
			}
		},

		hideLoading: function () {
			D.unbind('.loading');

			$('#fancybox-loading').remove();
		},

		showLoading: function () {
			var el, viewport;

			F.hideLoading();

			el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');

			// If user will press the escape-button, the request will be canceled
			D.bind('keydown.loading', function(e) {
				if ((e.which || e.keyCode) === 27) {
					e.preventDefault();

					F.cancel();
				}
			});

			if (!F.defaults.fixed) {
				viewport = F.getViewport();

				el.css({
					position : 'absolute',
					top  : (viewport.h * 0.5) + viewport.y,
					left : (viewport.w * 0.5) + viewport.x
				});
			}
		},

		getViewport: function () {
			var locked = (F.current && F.current.locked) || false,
				rez    = {
					x: W.scrollLeft(),
					y: W.scrollTop()
				};

			if (locked) {
				rez.w = locked[0].clientWidth;
				rez.h = locked[0].clientHeight;

			} else {
				// See http://bugs.jquery.com/ticket/6724
				rez.w = isTouch && window.innerWidth  ? window.innerWidth  : W.width();
				rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height();
			}

			return rez;
		},

		// Unbind the keyboard / clicking actions
		unbindEvents: function () {
			if (F.wrap && isQuery(F.wrap)) {
				F.wrap.unbind('.fb');
			}

			D.unbind('.fb');
			W.unbind('.fb');
		},

		bindEvents: function () {
			var current = F.current,
				keys;

			if (!current) {
				return;
			}

			// Changing document height on iOS devices triggers a 'resize' event,
			// that can change document height... repeating infinitely
			W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update);

			keys = current.keys;

			if (keys) {
				D.bind('keydown.fb', function (e) {
					var code   = e.which || e.keyCode,
						target = e.target || e.srcElement;

					// Skip esc key if loading, because showLoading will cancel preloading
					if (code === 27 && F.coming) {
						return false;
					}

					// Ignore key combinations and key events within form elements
					if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) {
						$.each(keys, function(i, val) {
							if (current.group.length > 1 && val[ code ] !== undefined) {
								F[ i ]( val[ code ] );

								e.preventDefault();
								return false;
							}

							if ($.inArray(code, val) > -1) {
								F[ i ] ();

								e.preventDefault();
								return false;
							}
						});
					}
				});
			}

			if ($.fn.mousewheel && current.mouseWheel) {
				F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) {
					var target = e.target || null,
						parent = $(target),
						canScroll = false;

					while (parent.length) {
						if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) {
							break;
						}

						canScroll = isScrollable( parent[0] );
						parent    = $(parent).parent();
					}

					if (delta !== 0 && !canScroll) {
						if (F.group.length > 1 && !current.canShrink) {
							if (deltaY > 0 || deltaX > 0) {
								F.prev( deltaY > 0 ? 'down' : 'left' );

							} else if (deltaY < 0 || deltaX < 0) {
								F.next( deltaY < 0 ? 'up' : 'right' );
							}

							e.preventDefault();
						}
					}
				});
			}
		},

		trigger: function (event, o) {
			var ret, obj = o || F.coming || F.current;

			if (!obj) {
				return;
			}

			if ($.isFunction( obj[event] )) {
				ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
			}

			if (ret === false) {
				return false;
			}

			if (obj.helpers) {
				$.each(obj.helpers, function (helper, opts) {
					if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
						F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
					}
				});
			}

			D.trigger(event);
		},

		isImage: function (str) {
			return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
		},

		isSWF: function (str) {
			return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i);
		},

		_start: function (index) {
			var coming = {},
				obj,
				href,
				type,
				margin,
				padding;

			index = getScalar( index );
			obj   = F.group[ index ] || null;

			if (!obj) {
				return false;
			}

			coming = $.extend(true, {}, F.opts, obj);

			// Convert margin and padding properties to array - top, right, bottom, left
			margin  = coming.margin;
			padding = coming.padding;

			if ($.type(margin) === 'number') {
				coming.margin = [margin, margin, margin, margin];
			}

			if ($.type(padding) === 'number') {
				coming.padding = [padding, padding, padding, padding];
			}

			// 'modal' propery is just a shortcut
			if (coming.modal) {
				$.extend(true, coming, {
					closeBtn   : false,
					closeClick : false,
					nextClick  : false,
					arrows     : false,
					mouseWheel : false,
					keys       : null,
					helpers: {
						overlay : {
							closeClick : false
						}
					}
				});
			}

			// 'autoSize' property is a shortcut, too
			if (coming.autoSize) {
				coming.autoWidth = coming.autoHeight = true;
			}

			if (coming.width === 'auto') {
				coming.autoWidth = true;
			}

			if (coming.height === 'auto') {
				coming.autoHeight = true;
			}

			/*
			 * Add reference to the group, so it`s possible to access from callbacks, example:
			 * afterLoad : function() {
			 *     this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
			 * }
			 */

			coming.group  = F.group;
			coming.index  = index;

			// Give a chance for callback or helpers to update coming item (type, title, etc)
			F.coming = coming;

			if (false === F.trigger('beforeLoad')) {
				F.coming = null;

				return;
			}

			type = coming.type;
			href = coming.href;

			if (!type) {
				F.coming = null;

				//If we can not determine content type then drop silently or display next/prev item if looping through gallery
				if (F.current && F.router && F.router !== 'jumpto') {
					F.current.index = index;

					return F[ F.router ]( F.direction );
				}

				return false;
			}

			F.isActive = true;

			if (type === 'image' || type === 'swf') {
				coming.autoHeight = coming.autoWidth = false;
				coming.scrolling  = 'visible';
			}

			if (type === 'image') {
				coming.aspectRatio = true;
			}

			if (type === 'iframe' && isTouch) {
				coming.scrolling = 'scroll';
			}

			// Build the neccessary markup
			coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' );

			$.extend(coming, {
				skin  : $('.fancybox-skin',  coming.wrap),
				outer : $('.fancybox-outer', coming.wrap),
				inner : $('.fancybox-inner', coming.wrap)
			});

			$.each(["Top", "Right", "Bottom", "Left"], function(i, v) {
				coming.skin.css('padding' + v, getValue(coming.padding[ i ]));
			});

			F.trigger('onReady');

			// Check before try to load; 'inline' and 'html' types need content, others - href
			if (type === 'inline' || type === 'html') {
				if (!coming.content || !coming.content.length) {
					return F._error( 'content' );
				}

			} else if (!href) {
				return F._error( 'href' );
			}

			if (type === 'image') {
				F._loadImage();

			} else if (type === 'ajax') {
				F._loadAjax();

			} else if (type === 'iframe') {
				F._loadIframe();

			} else {
				F._afterLoad();
			}
		},

		_error: function ( type ) {
			$.extend(F.coming, {
				type       : 'html',
				autoWidth  : true,
				autoHeight : true,
				minWidth   : 0,
				minHeight  : 0,
				scrolling  : 'no',
				hasError   : type,
				content    : F.coming.tpl.error
			});

			F._afterLoad();
		},

		_loadImage: function () {
			// Reset preload image so it is later possible to check "complete" property
			var img = F.imgPreload = new Image();

			img.onload = function () {
				this.onload = this.onerror = null;

				F.coming.width  = this.width / F.opts.pixelRatio;
				F.coming.height = this.height / F.opts.pixelRatio;

				F._afterLoad();
			};

			img.onerror = function () {
				this.onload = this.onerror = null;

				F._error( 'image' );
			};

			img.src = F.coming.href;

			if (img.complete !== true) {
				F.showLoading();
			}
		},

		_loadAjax: function () {
			var coming = F.coming;

			F.showLoading();

			F.ajaxLoad = $.ajax($.extend({}, coming.ajax, {
				url: coming.href,
				error: function (jqXHR, textStatus) {
					if (F.coming && textStatus !== 'abort') {
						F._error( 'ajax', jqXHR );

					} else {
						F.hideLoading();
					}
				},
				success: function (data, textStatus) {
					if (textStatus === 'success') {
						coming.content = data;

						F._afterLoad();
					}
				}
			}));
		},

		_loadIframe: function() {
			var coming = F.coming,
				iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
					.attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling)
					.attr('src', coming.href);

			// This helps IE
			$(coming.wrap).bind('onReset', function () {
				try {
					$(this).find('iframe').hide().attr('src', '//about:blank').end().empty();
				} catch (e) {}
			});

			if (coming.iframe.preload) {
				F.showLoading();

				iframe.one('load', function() {
					$(this).data('ready', 1);

					// iOS will lose scrolling if we resize
					if (!isTouch) {
						$(this).bind('load.fb', F.update);
					}

					// Without this trick:
					//   - iframe won't scroll on iOS devices
					//   - IE7 sometimes displays empty iframe
					$(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();

					F._afterLoad();
				});
			}

			coming.content = iframe.appendTo( coming.inner );

			if (!coming.iframe.preload) {
				F._afterLoad();
			}
		},

		_preloadImages: function() {
			var group   = F.group,
				current = F.current,
				len     = group.length,
				cnt     = current.preload ? Math.min(current.preload, len - 1) : 0,
				item,
				i;

			for (i = 1; i <= cnt; i += 1) {
				item = group[ (current.index + i ) % len ];

				if (item.type === 'image' && item.href) {
					new Image().src = item.href;
				}
			}
		},

		_afterLoad: function () {
			var coming   = F.coming,
				previous = F.current,
				placeholder = 'fancybox-placeholder',
				current,
				content,
				type,
				scrolling,
				href,
				embed;

			F.hideLoading();

			if (!coming || F.isActive === false) {
				return;
			}

			if (false === F.trigger('afterLoad', coming, previous)) {
				coming.wrap.stop(true).trigger('onReset').remove();

				F.coming = null;

				return;
			}

			if (previous) {
				F.trigger('beforeChange', previous);

				previous.wrap.stop(true).removeClass('fancybox-opened')
					.find('.fancybox-item, .fancybox-nav')
					.remove();
			}

			F.unbindEvents();

			current   = coming;
			content   = coming.content;
			type      = coming.type;
			scrolling = coming.scrolling;

			$.extend(F, {
				wrap  : current.wrap,
				skin  : current.skin,
				outer : current.outer,
				inner : current.inner,
				current  : current,
				previous : previous
			});

			href = current.href;

			switch (type) {
				case 'inline':
				case 'ajax':
				case 'html':
					if (current.selector) {
						content = $('<div>').html(content).find(current.selector);

					} else if (isQuery(content)) {
						if (!content.data(placeholder)) {
							content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() );
						}

						content = content.show().detach();

						current.wrap.bind('onReset', function () {
							if ($(this).find(content).length) {
								content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false);
							}
						});
					}
				break;

				case 'image':
					content = current.tpl.image.replace('{href}', href);
				break;

				case 'swf':
					content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>';
					embed   = '';

					$.each(current.swf, function(name, val) {
						content += '<param name="' + name + '" value="' + val + '"></param>';
						embed   += ' ' + name + '="' + val + '"';
					});

					content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>';
				break;
			}

			if (!(isQuery(content) && content.parent().is(current.inner))) {
				current.inner.append( content );
			}

			// Give a chance for helpers or callbacks to update elements
			F.trigger('beforeShow');

			// Set scrolling before calculating dimensions
			current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));

			// Set initial dimensions and start position
			F._setDimension();

			F.reposition();

			F.isOpen = false;
			F.coming = null;

			F.bindEvents();

			if (!F.isOpened) {
				$('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove();

			} else if (previous.prevMethod) {
				F.transitions[ previous.prevMethod ]();
			}

			F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ]();

			F._preloadImages();
		},

		_setDimension: function () {
			var viewport   = F.getViewport(),
				steps      = 0,
				canShrink  = false,
				canExpand  = false,
				wrap       = F.wrap,
				skin       = F.skin,
				inner      = F.inner,
				current    = F.current,
				width      = current.width,
				height     = current.height,
				minWidth   = current.minWidth,
				minHeight  = current.minHeight,
				maxWidth   = current.maxWidth,
				maxHeight  = current.maxHeight,
				scrolling  = current.scrolling,
				scrollOut  = current.scrollOutside ? current.scrollbarWidth : 0,
				margin     = current.margin,
				wMargin    = getScalar(margin[1] + margin[3]),
				hMargin    = getScalar(margin[0] + margin[2]),
				wPadding,
				hPadding,
				wSpace,
				hSpace,
				origWidth,
				origHeight,
				origMaxWidth,
				origMaxHeight,
				ratio,
				width_,
				height_,
				maxWidth_,
				maxHeight_,
				iframe,
				body;

			// Reset dimensions so we could re-check actual size
			wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');

			wPadding = getScalar(skin.outerWidth(true)  - skin.width());
			hPadding = getScalar(skin.outerHeight(true) - skin.height());

			// Any space between content and viewport (margin, padding, border, title)
			wSpace = wMargin + wPadding;
			hSpace = hMargin + hPadding;

			origWidth  = isPercentage(width)  ? (viewport.w - wSpace) * getScalar(width)  / 100 : width;
			origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height;

			if (current.type === 'iframe') {
				iframe = current.content;

				if (current.autoHeight && iframe.data('ready') === 1) {
					try {
						if (iframe[0].contentWindow.document.location) {
							inner.width( origWidth ).height(9999);

							body = iframe.contents().find('body');

							if (scrollOut) {
								body.css('overflow-x', 'hidden');
							}

							origHeight = body.outerHeight(true);
						}

					} catch (e) {}
				}

			} else if (current.autoWidth || current.autoHeight) {
				inner.addClass( 'fancybox-tmp' );

				// Set width or height in case we need to calculate only one dimension
				if (!current.autoWidth) {
					inner.width( origWidth );
				}

				if (!current.autoHeight) {
					inner.height( origHeight );
				}

				if (current.autoWidth) {
					origWidth = inner.width();
				}

				if (current.autoHeight) {
					origHeight = inner.height();
				}

				inner.removeClass( 'fancybox-tmp' );
			}

			width  = getScalar( origWidth );
			height = getScalar( origHeight );

			ratio  = origWidth / origHeight;

			// Calculations for the content
			minWidth  = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth);
			maxWidth  = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth);

			minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight);
			maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight);

			// These will be used to determine if wrap can fit in the viewport
			origMaxWidth  = maxWidth;
			origMaxHeight = maxHeight;

			if (current.fitToView) {
				maxWidth  = Math.min(viewport.w - wSpace, maxWidth);
				maxHeight = Math.min(viewport.h - hSpace, maxHeight);
			}

			maxWidth_  = viewport.w - wMargin;
			maxHeight_ = viewport.h - hMargin;

			if (current.aspectRatio) {
				if (width > maxWidth) {
					width  = maxWidth;
					height = getScalar(width / ratio);
				}

				if (height > maxHeight) {
					height = maxHeight;
					width  = getScalar(height * ratio);
				}

				if (width < minWidth) {
					width  = minWidth;
					height = getScalar(width / ratio);
				}

				if (height < minHeight) {
					height = minHeight;
					width  = getScalar(height * ratio);
				}

			} else {
				width = Math.max(minWidth, Math.min(width, maxWidth));

				if (current.autoHeight && current.type !== 'iframe') {
					inner.width( width );

					height = inner.height();
				}

				height = Math.max(minHeight, Math.min(height, maxHeight));
			}

			// Try to fit inside viewport (including the title)
			if (current.fitToView) {
				inner.width( width ).height( height );

				wrap.width( width + wPadding );

				// Real wrap dimensions
				width_  = wrap.width();
				height_ = wrap.height();

				if (current.aspectRatio) {
					while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) {
						if (steps++ > 19) {
							break;
						}

						height = Math.max(minHeight, Math.min(maxHeight, height - 10));
						width  = getScalar(height * ratio);

						if (width < minWidth) {
							width  = minWidth;
							height = getScalar(width / ratio);
						}

						if (width > maxWidth) {
							width  = maxWidth;
							height = getScalar(width / ratio);
						}

						inner.width( width ).height( height );

						wrap.width( width + wPadding );

						width_  = wrap.width();
						height_ = wrap.height();
					}

				} else {
					width  = Math.max(minWidth,  Math.min(width,  width  - (width_  - maxWidth_)));
					height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_)));
				}
			}

			if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) {
				width += scrollOut;
			}

			inner.width( width ).height( height );

			wrap.width( width + wPadding );

			width_  = wrap.width();
			height_ = wrap.height();

			canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight;
			canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight));

			$.extend(current, {
				dim : {
					width	: getValue( width_ ),
					height	: getValue( height_ )
				},
				origWidth  : origWidth,
				origHeight : origHeight,
				canShrink  : canShrink,
				canExpand  : canExpand,
				wPadding   : wPadding,
				hPadding   : hPadding,
				wrapSpace  : height_ - skin.outerHeight(true),
				skinSpace  : skin.height() - height
			});

			if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) {
				inner.height('auto');
			}
		},

		_getPosition: function (onlyAbsolute) {
			var current  = F.current,
				viewport = F.getViewport(),
				margin   = current.margin,
				width    = F.wrap.width()  + margin[1] + margin[3],
				height   = F.wrap.height() + margin[0] + margin[2],
				rez      = {
					position: 'absolute',
					top  : margin[0],
					left : margin[3]
				};

			if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
				rez.position = 'fixed';

			} else if (!current.locked) {
				rez.top  += viewport.y;
				rez.left += viewport.x;
			}

			rez.top  = getValue(Math.max(rez.top,  rez.top  + ((viewport.h - height) * current.topRatio)));
			rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width)  * current.leftRatio)));

			return rez;
		},

		_afterZoomIn: function () {
			var current = F.current;

			if (!current) {
				return;
			}

			F.isOpen = F.isOpened = true;

			F.wrap.css('overflow', 'visible').addClass('fancybox-opened');

			F.update();

			// Assign a click event
			if ( current.closeClick || (current.nextClick && F.group.length > 1) ) {
				F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
					if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
						e.preventDefault();

						F[ current.closeClick ? 'close' : 'next' ]();
					}
				});
			}

			// Create a close button
			if (current.closeBtn) {
				$(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) {
					e.preventDefault();

					F.close();
				});
			}

			// Create navigation arrows
			if (current.arrows && F.group.length > 1) {
				if (current.loop || current.index > 0) {
					$(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
				}

				if (current.loop || current.index < F.group.length - 1) {
					$(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
				}
			}

			F.trigger('afterShow');

			// Stop the slideshow if this is the last item
			if (!current.loop && current.index === current.group.length - 1) {
				F.play( false );

			} else if (F.opts.autoPlay && !F.player.isActive) {
				F.opts.autoPlay = false;

				F.play();
			}
		},

		_afterZoomOut: function ( obj ) {
			obj = obj || F.current;

			$('.fancybox-wrap').trigger('onReset').remove();

			$.extend(F, {
				group  : {},
				opts   : {},
				router : false,
				current   : null,
				isActive  : false,
				isOpened  : false,
				isOpen    : false,
				isClosing : false,
				wrap   : null,
				skin   : null,
				outer  : null,
				inner  : null
			});

			F.trigger('afterClose', obj);
		}
	});

	/*
	 *	Default transitions
	 */

	F.transitions = {
		getOrigPosition: function () {
			var current  = F.current,
				element  = current.element,
				orig     = current.orig,
				pos      = {},
				width    = 50,
				height   = 50,
				hPadding = current.hPadding,
				wPadding = current.wPadding,
				viewport = F.getViewport();

			if (!orig && current.isDom && element.is(':visible')) {
				orig = element.find('img:first');

				if (!orig.length) {
					orig = element;
				}
			}

			if (isQuery(orig)) {
				pos = orig.offset();

				if (orig.is('img')) {
					width  = orig.outerWidth();
					height = orig.outerHeight();
				}

			} else {
				pos.top  = viewport.y + (viewport.h - height) * current.topRatio;
				pos.left = viewport.x + (viewport.w - width)  * current.leftRatio;
			}

			if (F.wrap.css('position') === 'fixed' || current.locked) {
				pos.top  -= viewport.y;
				pos.left -= viewport.x;
			}

			pos = {
				top     : getValue(pos.top  - hPadding * current.topRatio),
				left    : getValue(pos.left - wPadding * current.leftRatio),
				width   : getValue(width  + wPadding),
				height  : getValue(height + hPadding)
			};

			return pos;
		},

		step: function (now, fx) {
			var ratio,
				padding,
				value,
				prop       = fx.prop,
				current    = F.current,
				wrapSpace  = current.wrapSpace,
				skinSpace  = current.skinSpace;

			if (prop === 'width' || prop === 'height') {
				ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);

				if (F.isClosing) {
					ratio = 1 - ratio;
				}

				padding = prop === 'width' ? current.wPadding : current.hPadding;
				value   = now - padding;

				F.skin[ prop ](  getScalar( prop === 'width' ?  value : value - (wrapSpace * ratio) ) );
				F.inner[ prop ]( getScalar( prop === 'width' ?  value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) );
			}
		},

		zoomIn: function () {
			var current  = F.current,
				startPos = current.pos,
				effect   = current.openEffect,
				elastic  = effect === 'elastic',
				endPos   = $.extend({opacity : 1}, startPos);

			// Remove "position" property that breaks older IE
			delete endPos.position;

			if (elastic) {
				startPos = this.getOrigPosition();

				if (current.openOpacity) {
					startPos.opacity = 0.1;
				}

			} else if (effect === 'fade') {
				startPos.opacity = 0.1;
			}

			F.wrap.css(startPos).animate(endPos, {
				duration : effect === 'none' ? 0 : current.openSpeed,
				easing   : current.openEasing,
				step     : elastic ? this.step : null,
				complete : F._afterZoomIn
			});
		},

		zoomOut: function () {
			var current  = F.current,
				effect   = current.closeEffect,
				elastic  = effect === 'elastic',
				endPos   = {opacity : 0.1};

			if (elastic) {
				endPos = this.getOrigPosition();

				if (current.closeOpacity) {
					endPos.opacity = 0.1;
				}
			}

			F.wrap.animate(endPos, {
				duration : effect === 'none' ? 0 : current.closeSpeed,
				easing   : current.closeEasing,
				step     : elastic ? this.step : null,
				complete : F._afterZoomOut
			});
		},

		changeIn: function () {
			var current   = F.current,
				effect    = current.nextEffect,
				startPos  = current.pos,
				endPos    = { opacity : 1 },
				direction = F.direction,
				distance  = 200,
				field;

			startPos.opacity = 0.1;

			if (effect === 'elastic') {
				field = direction === 'down' || direction === 'up' ? 'top' : 'left';

				if (direction === 'down' || direction === 'right') {
					startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance);
					endPos[ field ]   = '+=' + distance + 'px';

				} else {
					startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance);
					endPos[ field ]   = '-=' + distance + 'px';
				}
			}

			// Workaround for http://bugs.jquery.com/ticket/12273
			if (effect === 'none') {
				F._afterZoomIn();

			} else {
				F.wrap.css(startPos).animate(endPos, {
					duration : current.nextSpeed,
					easing   : current.nextEasing,
					complete : F._afterZoomIn
				});
			}
		},

		changeOut: function () {
			var previous  = F.previous,
				effect    = previous.prevEffect,
				endPos    = { opacity : 0.1 },
				direction = F.direction,
				distance  = 200;

			if (effect === 'elastic') {
				endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px';
			}

			previous.wrap.animate(endPos, {
				duration : effect === 'none' ? 0 : previous.prevSpeed,
				easing   : previous.prevEasing,
				complete : function () {
					$(this).trigger('onReset').remove();
				}
			});
		}
	};

	/*
	 *	Overlay helper
	 */

	F.helpers.overlay = {
		defaults : {
			closeClick : true,      // if true, fancyBox will be closed when user clicks on the overlay
			speedOut   : 200,       // duration of fadeOut animation
			showEarly  : true,      // indicates if should be opened immediately or wait until the content is ready
			css        : {},        // custom CSS properties
			locked     : !isTouch,  // if true, the content will be locked into overlay
			fixed      : true       // if false, the overlay CSS position property will not be set to "fixed"
		},

		overlay : null,      // current handle
		fixed   : false,     // indicates if the overlay has position "fixed"
		el      : $('html'), // element that contains "the lock"

		// Public methods
		create : function(opts) {
			opts = $.extend({}, this.defaults, opts);

			if (this.overlay) {
				this.close();
			}

			this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent );
			this.fixed   = false;

			if (opts.fixed && F.defaults.fixed) {
				this.overlay.addClass('fancybox-overlay-fixed');

				this.fixed = true;
			}
		},

		open : function(opts) {
			var that = this;

			opts = $.extend({}, this.defaults, opts);

			if (this.overlay) {
				this.overlay.unbind('.overlay').width('auto').height('auto');

			} else {
				this.create(opts);
			}

			if (!this.fixed) {
				W.bind('resize.overlay', $.proxy( this.update, this) );

				this.update();
			}

			if (opts.closeClick) {
				this.overlay.bind('click.overlay', function(e) {
					if ($(e.target).hasClass('fancybox-overlay')) {
						if (F.isActive) {
							F.close();
						} else {
							that.close();
						}

						return false;
					}
				});
			}

			this.overlay.css( opts.css ).show();
		},

		close : function() {
			var scrollV, scrollH;

			W.unbind('resize.overlay');

			if (this.el.hasClass('fancybox-lock')) {
				$('.fancybox-margin').removeClass('fancybox-margin');

				scrollV = W.scrollTop();
				scrollH = W.scrollLeft();

				this.el.removeClass('fancybox-lock');

				W.scrollTop( scrollV ).scrollLeft( scrollH );
			}

			$('.fancybox-overlay').remove().hide();

			$.extend(this, {
				overlay : null,
				fixed   : false
			});
		},

		// Private, callbacks

		update : function () {
			var width = '100%', offsetWidth;

			// Reset width/height so it will not mess
			this.overlay.width(width).height('100%');

			// jQuery does not return reliable result for IE
			if (IE) {
				offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);

				if (D.width() > offsetWidth) {
					width = D.width();
				}

			} else if (D.width() > W.width()) {
				width = D.width();
			}

			this.overlay.width(width).height(D.height());
		},

		// This is where we can manipulate DOM, because later it would cause iframes to reload
		onReady : function (opts, obj) {
			var overlay = this.overlay;

			$('.fancybox-overlay').stop(true, true);

			if (!overlay) {
				this.create(opts);
			}

			if (opts.locked && this.fixed && obj.fixed) {
				if (!overlay) {
					this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
				}

				obj.locked = this.overlay.append( obj.wrap );
				obj.fixed  = false;
			}

			if (opts.showEarly === true) {
				this.beforeShow.apply(this, arguments);
			}
		},

		beforeShow : function(opts, obj) {
			var scrollV, scrollH;

			if (obj.locked) {
				if (this.margin !== false) {
					$('*').filter(function(){
						return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") );
					}).addClass('fancybox-margin');

					this.el.addClass('fancybox-margin');
				}

				scrollV = W.scrollTop();
				scrollH = W.scrollLeft();

				this.el.addClass('fancybox-lock');

				W.scrollTop( scrollV ).scrollLeft( scrollH );
			}

			this.open(opts);
		},

		onUpdate : function() {
			if (!this.fixed) {
				this.update();
			}
		},

		afterClose: function (opts) {
			// Remove overlay if exists and fancyBox is not opening
			// (e.g., it is not being open using afterClose callback)
			//if (this.overlay && !F.isActive) {
			if (this.overlay && !F.coming) {
				this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));
			}
		}
	};

	/*
	 *	Title helper
	 */

	F.helpers.title = {
		defaults : {
			type     : 'float', // 'float', 'inside', 'outside' or 'over',
			position : 'bottom' // 'top' or 'bottom'
		},

		beforeShow: function (opts) {
			var current = F.current,
				text    = current.title,
				type    = opts.type,
				title,
				target;

			if ($.isFunction(text)) {
				text = text.call(current.element, current);
			}

			if (!isString(text) || $.trim(text) === '') {
				return;
			}

			title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">' + text + '</div>');

			switch (type) {
				case 'inside':
					target = F.skin;
				break;

				case 'outside':
					target = F.wrap;
				break;

				case 'over':
					target = F.inner;
				break;

				default: // 'float'
					target = F.skin;

					title.appendTo('body');

					if (IE) {
						title.width( title.width() );
					}

					title.wrapInner('<span class="child"></span>');

					//Increase bottom margin so this title will also fit into viewport
					F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) );
				break;
			}

			title[ (opts.position === 'top' ? 'prependTo'  : 'appendTo') ](target);
		}
	};

	// jQuery plugin initialization
	$.fn.fancybox = function (options) {
		var index,
			that     = $(this),
			selector = this.selector || '',
			run      = function(e) {
				var what = $(this).blur(), idx = index, relType, relVal;

				if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) {
					relType = options.groupAttr || 'data-fancybox-group';
					relVal  = what.attr(relType);

					if (!relVal) {
						relType = 'rel';
						relVal  = what.get(0)[ relType ];
					}

					if (relVal && relVal !== '' && relVal !== 'nofollow') {
						what = selector.length ? $(selector) : that;
						what = what.filter('[' + relType + '="' + relVal + '"]');
						idx  = what.index(this);
					}

					options.index = idx;

					// Stop an event from bubbling if everything is fine
					if (F.open(what, options) !== false) {
						e.preventDefault();
					}
				}
			};

		options = options || {};
		index   = options.index || 0;

		if (!selector || options.live === false) {
			that.unbind('click.fb-start').bind('click.fb-start', run);

		} else {
			D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run);
		}

		this.filter('[data-fancybox-start=1]').trigger('click');

		return this;
	};

	// Tests that need a body at doc ready
	D.ready(function() {
		var w1, w2;

		if ( $.scrollbarWidth === undefined ) {
			// http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
			$.scrollbarWidth = function() {
				var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),
					child  = parent.children(),
					width  = child.innerWidth() - child.height( 99 ).innerWidth();

				parent.remove();

				return width;
			};
		}

		if ( $.support.fixedPosition === undefined ) {
			$.support.fixedPosition = (function() {
				var elem  = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'),
					fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 );

				elem.remove();

				return fixed;
			}());
		}

		$.extend(F.defaults, {
			scrollbarWidth : $.scrollbarWidth(),
			fixed  : $.support.fixedPosition,
			parent : $('body')
		});

		//Get real width of page scroll-bar
		w1 = $(window).width();

		H.addClass('fancybox-lock-test');

		w2 = $(window).width();

		H.removeClass('fancybox-lock-test');

		$("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head");
	});

}(window, document, jQuery));;
function searchSite() {
    var s = document.getElementById('q').value;
    s = s == "" ? document.getElementById('qm').value : s;

    if (window.location.href.indexOf('/giving/') > 0 || window.location.href.indexOf('/give/') > 0) {
        fbq('track', 'Search');
    } 

    window.location = "/search.aspx?q=" + s;
}


var qsParse = (function (a) {
    if (a == "") return {};
    var b = {};
    for (var i = 0; i < a.length; ++i) {
        var p = a[i].split('=', 2);
        if (p.length == 1)
            b[p[0]] = "";
        else
            b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " "));
    }
    return b;
})(window.location.search.substr(1).split('&'));

$(document).ready(function () {
    //$('.lpLeft').css("margin-left", "0px");
    //    $('.lpLeft').removeClass('lpLeft').addClass('span8');
    //    $('.lpRight').removeClass('lpRight').addClass('span4');
    $('.lpLeft, .lpRight').wrapAll('<div class="row">');
    $('.lpLeft').removeClass('lpLeft').addClass('col-xs-12 col-sm-8');
    $('.lpRight').removeClass('lpRight').addClass('col-xs-12 col-sm-4');

    $('.profCol2').removeClass('profCol2').addClass('col-xs-12 col-sm-8');
    $('.profCol3').removeClass('profCol3').addClass('col-xs-12 col-sm-4');

//    $('.span12').removeClass('span12').addClass('col-lg-12');
//    $('.span8').removeClass('span8').addClass('col-lg-8');
//    $('.span6').removeClass('span6').addClass('col-lg-6');
//    $('.span4').removeClass('span4').addClass('col-lg-4');


    $('a[rel^=lightbox]').attr('rel', 's').addClass("fancybox");
    $(".fancybox").fancybox();

    $(".modalopen").click(function () {
        $("#permaModalTitle").html($(this).data("modaltitle"));
        $("#permaModalBody").html($(this).data("modalbody"));
        $("#permaModal").modal('show');
    });
});;
/*
Plugin: jQuery Parallax
Version 1.1.3
Author: Ian Lunn
Twitter: @IanLunn
Author URL: http://www.ianlunn.co.uk/
Plugin URL: http://www.ianlunn.co.uk/plugins/jquery-parallax/

Dual licensed under the MIT and GPL licenses:
http://www.opensource.org/licenses/mit-license.php
http://www.gnu.org/licenses/gpl.html
*/

(function( $ ){
	var $window = $(window);
	var windowHeight = $window.height();

	$window.resize(function () {
		windowHeight = $window.height();
	});

	$.fn.parallax = function(xpos, speedFactor, outerHeight) {
		var $this = $(this);
		var getHeight;
		var firstTop;
		var paddingTop = 0;
		
		//get the starting position of each element to have parallax applied to it		
		$this.each(function(){
		    firstTop = $this.offset().top;
		});

		if (outerHeight) {
			getHeight = function(jqo) {
				return jqo.outerHeight(true);
			};
		} else {
			getHeight = function(jqo) {
				return jqo.height();
			};
		}
			
		// setup defaults if arguments aren't specified
		if (arguments.length < 1 || xpos === null) xpos = "50%";
		if (arguments.length < 2 || speedFactor === null) speedFactor = 0.1;
		if (arguments.length < 3 || outerHeight === null) outerHeight = true;
		
		// function to be called whenever the window is scrolled or resized
		function update(){
			var pos = $window.scrollTop();				

			$this.each(function(){
				var $element = $(this);
				var top = $element.offset().top;
				var height = getHeight($element);

				// Check if totally above or totally below viewport
				if (top + height < pos || top > pos + windowHeight) {
					return;
				}

				$this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px");
			});
		}		

		$window.bind('scroll', update).resize(update);
		update();
	};
})(jQuery);

;
jQuery('document').ready(function () {

	/* SLIDER */
	var slider = (function () {

		var init = function () {
			clickThumb($(thumbs + ' a'));
			autoCycleOn = true;
			pauseAutoCycle('.slides'); // Pause when hovering over a slide
			pauseAutoCycle(thumbs + ' a'); // Pause when hovering over a link
			killAutoCycle('.video-box a'); // Stop when you play a video
			$(document).ready(function () { autoCycle; });

		},

			thumbs = '.slidertray li',
			thumbsList = '.slidertray ul',
			noThumbs = $(thumbs).length,
			killedAutoCycle = false,
			cycleSpeed = 6000,
			fadeSpeed = 1750,
			autoCycleOn,

			// Show slide
			showSlide = function (currentThumb) {
				var id = currentThumb.attr('id').slice(0, -6); // remove "-thumb" from the id to get the name
				var content = '.slide.' + id;
				if ($(content).length !== 0) {
					$('.slide').fadeOut(.5 * fadeSpeed);
					$(thumbs).removeClass('current');
					$(content).fadeIn(.5 * fadeSpeed);
					currentThumb.addClass('current');

				}
			},

			clickThumb = function (thumbLink) {
				thumbLink.click(function () {
					thumb = $(this).parents('li');
					showSlide(thumb);
					//clearInterval(autoCycle);
					//autoCycle = setInterval(cycleAll, cycleSpeed);
					return false;
				});
			},


			// Cycle selected slide
			cycleAll = function () {
				if (autoCycleOn) {
					if (noThumbs > 3) {
						if ($(thumbs + '.current').index() < 3) {
							nextThumb = $(thumbs + '.current').next();
						}
						else {
							nextThumb = $(thumbs).eq(0);
						}
						showSlide(nextThumb);
					}
				}
			},

			//Auto-cycle Thumbs
			autoCycle = setInterval(cycleAll, cycleSpeed);

		// Pause the auto-cycle
		pauseAutoCycle = function (element) {
			if (autoCycleOn) {
				$(element).hover(function () {
					clearInterval(autoCycle);
				}, function () {
					if (!killedAutoCycle) {
						autoCycle = setInterval(cycleAll, cycleSpeed)
					}
				});
			}
		},

			// End the cycling if they click a slide, assuming that 
			// it's a video or they're leaving the page
			killAutoCycle = function (element) {
				$(element).click(function () {
					killedAutoCycle = true;
					clearInterval(autoCycle);
				});
			};

		$(init);
	}());

}());;
//	====================================================
//	Slide out Navigation
//  "TELEPO"
//
//  2014 Taichi Kume
//  Ver 1.00
//	====================================================

//	Detect Android versions
//	Function to be used when necessary.
function lowerAndroid(n) {
    var androidver = false;
    var ua = navigator.userAgent.toLowerCase();
    var version = ua.substr(ua.indexOf('android') + 8, 3);
    if (ua.indexOf("android")) if (parseFloat(version) < n) androidver = true;
    return androidver;
}

//	Slide Core
$(function () {
   // if (document.documentElement.clientWidth < 980) {
        // This is to prevent the focus bug
     // var hh = $('#headerwrapper').outerHeight();
       // $('#contentcontainer').css({
         //   'padding-top': hh + 'px'
      // });
   // }
    // Click function
    $('#lnav-btn').click(function () {
        var slideTarget = $('#lnav,#slidebody');
        if ($('#rnav').is('.rnclose')) { // Im going to make a Toggle on the right side
            slideTarget.removeClass('rnclose');
        }
        navShow(slideTarget, 'ln');
    });

    // Class attr controll function
    function navShow(slideTarget, moveDirection) {
        if (slideTarget.is('.' + moveDirection + 'open')) {
            slideTarget.removeClass(moveDirection + 'open');
            slideTarget.addClass(moveDirection + 'close');
        } else if (slideTarget.is('.' + moveDirection + 'close')) {
            slideTarget.removeClass(moveDirection + 'close');
            slideTarget.addClass(moveDirection + 'open');
        } else {
            slideTarget.addClass(moveDirection + 'open');
        }
    }
});

$(function () {
   // if (document.documentElement.clientWidth < 980) {
        // This is to prevent the focus bug
      //  var hh = $('#headerwrapper').outerHeight();
      //  $('#contentcontainer').css({
      //      'padding-top': hh + 'px'
      //  });
   // }
    // Click function
    $('#rnav-btn-acct').click(function () {
        var slideTarget = $('#rnav,#slidebody');
        if ($('#rnav').is('.rnclose')) { // Im going to make a Toggle on the right side
            slideTarget.removeClass('rnclose');
        }
        navShow(slideTarget, 'rn');
    });

    // Class attr controll function
    function navShow(slideTarget, moveDirection) {
        if (slideTarget.is('.' + moveDirection + 'open')) {
            slideTarget.removeClass(moveDirection + 'open');
            slideTarget.addClass(moveDirection + 'close');
        } else if (slideTarget.is('.' + moveDirection + 'close')) {
            slideTarget.removeClass(moveDirection + 'close');
            slideTarget.addClass(moveDirection + 'open');
        } else {
            slideTarget.addClass(moveDirection + 'open');
        }
    }
});;
// Chosen, a Select Box Enhancer for jQuery and Protoype
// by Patrick Filler for Harvest, http://getharvest.com
// 
// Version 0.9.11
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com

// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `cake build`, do not edit it by hand.
(function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return e.nodeName.toUpperCase()==="OPTGROUP"?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,r,i,s,o;t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),s=e.childNodes,o=[];for(r=0,i=s.length;r<i;r++)n=s[r],o.push(this.add_option(n,t,e.disabled));return o},e.prototype.add_option=function(e,t,n){if(e.nodeName.toUpperCase()==="OPTION")return e.text!==""?(t!=null&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}(),e.select_to_array=function(t){var n,r,i,s,o;r=new e,o=t.childNodes;for(i=0,s=o.length;i<s;i++)n=o[i],r.add_node(n);return r.parsed},this.SelectParser=e}).call(this),function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=t!=null?t:{},this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0]!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=this.options.enable_split_word_search!=null?this.options.enable_split_word_search:!0,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||"Select Some Options":this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return t.blur_test()},100)},e.prototype.result_add_option=function(e){var t,n;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),e.group_array_index!=null&&t.push("group-option"),e.classes!==""&&t.push(e.classes),n=e.style.cssText!==""?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+n+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale();switch(t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:e.preventDefault();if(this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,n;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=Math.floor(Math.random()*e.length),t=e.substring(n,n+1)},e}(),t.AbstractChosen=e}.call(this),function(){var e,t,n,r,i={}.hasOwnProperty,s=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};r=this,e=jQuery,e.fn.extend({chosen:function(n){var r,i,s;return s=navigator.userAgent.toLowerCase(),i=/(msie) ([\w.]+)/.exec(s)||[],r={name:i[1]||"",version:i[2]||"0"},r.name==="msie"&&(r.version==="6.0"||r.version==="7.0"&&document.documentMode===7)?this:this.each(function(r){var i;i=e(this);if(!i.hasClass("chzn-done"))return i.data("chosen",new t(this,n))})}}),t=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return s(i,t),i.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},i.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},i.prototype.set_up_html=function(){var t,r,i,s,o,u;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/[^\w]/g,"_"):this.generate_field_id(),this.container_id+="_chzn",t=["chzn-container"],t.push("chzn-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chzn-rtl"),this.f_width=this.form_field_jq.outerWidth(),i={id:this.container_id,"class":t.join(" "),style:"width: "+this.f_width+"px;",title:this.form_field.title},r=e("<div />",i),this.is_multiple?r.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):r.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(r),this.container=e("#"+this.container_id),this.dropdown=this.container.find("div.chzn-drop").first(),s=this.container.height(),o=this.f_width-n(this.dropdown),this.dropdown.css({width:o+"px",top:s+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),u=o-n(this.search_container)-n(this.search_field),this.search_field.css({width:u+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},i.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){return e.container_mousedown(t)}),this.container.mouseup(function(t){return e.container_mouseup(t)}),this.container.mouseenter(function(t){return e.mouse_enter(t)}),this.container.mouseleave(function(t){return e.mouse_leave(t)}),this.search_results.mouseup(function(t){return e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){return e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){return e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){return e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){return e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){return e.container_mousedown(t)}),this.search_field.blur(function(t){return e.input_blur(t)}),this.search_field.keyup(function(t){return e.keyup_checker(t)}),this.search_field.keydown(function(t){return e.keydown_checker(t)}),this.search_field.focus(function(t){return e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){return e.choices_click(t)}):this.container.click(function(e){return e.preventDefault()})},i.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},i.prototype.container_mousedown=function(t){var n;if(!this.is_disabled)return n=t!=null?e(t.target).hasClass("search-choice-close"):!1,t&&t.type==="mousedown"&&!this.results_showing&&t.preventDefault(),!this.pending_destroy_click&&!n?(this.active_field?!this.is_multiple&&t&&(e(t.target)[0]===this.selected_item[0]||e(t.target).parents("a.chzn-single").length)&&(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},i.prototype.container_mouseup=function(e){if(e.target.nodeName==="ABBR"&&!this.is_disabled)return this.results_reset(e)},i.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},i.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){var e,t,n,i,s;this.parsing=!0,this.results_data=r.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",s=this.results_data;for(n=0,i=s.length;n<i;n++)t=s[n],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},i.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},i.prototype.result_do_highlight=function(e){var t,n,r,i,s;if(e.length){this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),r=parseInt(this.search_results.css("maxHeight"),10),s=this.search_results.scrollTop(),i=r+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight();if(t>=i)return this.search_results.scrollTop(t-r>0?t-r:0);if(n<s)return this.search_results.scrollTop(n)}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){var e;if(!this.is_multiple)this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected);else if(this.max_selected_options<=this.choices)return this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1;return e=this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},i.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},i.prototype.set_tab_index=function(e){var t;if(this.form_field_jq.attr("tabindex"))return t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n.length)return this.result_highlight=n,this.result_select(t),this.search_field.focus()},i.prototype.search_results_mouseover=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n)return this.result_do_highlight(n)},i.prototype.search_results_mouseout=function(t){if(e(t.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choices_click=function(t){t.preventDefault();if(this.active_field&&!e(t.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},i.prototype.choice_build=function(t){var n,r,i,s=this;return this.is_multiple&&this.max_selected_options<=this.choices?(this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1):(n=this.container_id+"_c_"+t.array_index,this.choices+=1,t.disabled?r='<li class="search-choice search-choice-disabled" id="'+n+'"><span>'+t.html+"</span></li>":r='<li class="search-choice" id="'+n+'"><span>'+t.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+t.array_index+'"></a></li>',this.search_container.before(r),i=e("#"+n).find("a").first(),i.click(function(e){return s.choice_destroy_link_click(e)}))},i.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},i.prototype.choice_destroy=function(e){if(this.result_deselect(e.attr("rel")))return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},i.prototype.result_select=function(e){var t,n,r,i;if(this.result_highlight)return t=this.result_highlight,n=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),i=n.substr(n.lastIndexOf("_")+1),r=this.results_data[i],r.selected=!0,this.form_field.options[r.options_index].selected=!0,this.is_multiple?this.choice_build(r):(this.selected_item.find("span").first().text(r.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!e.metaKey&&!e.ctrlKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[r.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()},i.prototype.result_activate=function(e){return e.addClass("active-result")},i.prototype.result_deactivate=function(e){return e.removeClass("active-result")},i.prototype.result_deselect=function(t){var n,r;return r=this.results_data[t],this.form_field.options[r.options_index].disabled?!1:(r.selected=!1,this.form_field.options[r.options_index].selected=!1,n=e("#"+this.container_id+"_o_"+t),n.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[r.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')},i.prototype.winnow_results=function(){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y;this.no_results_clear(),f=0,l=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),o=this.search_contains?"":"^",s=new RegExp(o+l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),y=this.results_data;for(d=0,m=y.length;d<m;d++){n=y[d];if(!n.disabled&&!n.empty)if(n.group)e("#"+n.dom_id).css("display","none");else if(!this.is_multiple||!n.selected){t=!1,a=n.dom_id,u=e("#"+a);if(s.test(n.html))t=!0,f+=1;else if(this.enable_split_word_search&&(n.html.indexOf(" ")>=0||n.html.indexOf("[")===0)){i=n.html.replace(/\[|\]/g,"").split(" ");if(i.length)for(v=0,g=i.length;v<g;v++)r=i[v],s.test(r)&&(t=!0,f+=1)}t?(l.length?(c=n.html.search(p),h=n.html.substr(0,c+l.length)+"</em>"+n.html.substr(c+l.length),h=h.substr(0,c)+"<em>"+h.substr(c)):h=n.html,u.html(h),this.result_activate(u),n.group_array_index!=null&&e("#"+this.results_data[n.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&a===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(u))}}return f<1&&l.length?this.no_results(l):this.winnow_results_set_highlight()},i.prototype.winnow_results_clear=function(){var t,n,r,i,s;this.search_field.val(""),n=this.search_results.find("li"),s=[];for(r=0,i=n.length;r<i;r++)t=n[r],t=e(t),t.hasClass("group-result")?s.push(t.css("display","auto")):!this.is_multiple||!t.hasClass("result-selected")?s.push(this.result_activate(t)):s.push(void 0);return s},i.prototype.winnow_results_set_highlight=function(){var e,t;if(!this.result_highlight){t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first();if(e!=null)return this.result_do_highlight(e)}},i.prototype.no_results=function(t){var n;return n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(t),this.search_results.append(n)},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t,n;this.result_highlight?this.results_showing&&(n=this.result_highlight.nextAll("li.active-result").first(),n&&this.result_do_highlight(n)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t)));if(!this.results_showing)return this.results_show()},i.prototype.keyup_arrow=function(){var e;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},i.prototype.keydown_backstroke=function(){var e;if(this.pending_backstroke)return this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke();e=this.search_container.siblings("li.search-choice").last();if(e.length&&!e.hasClass("search-choice-disabled"))return this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale(),t!==8&&this.pending_backstroke&&this.clear_backstroke();switch(t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},i.prototype.search_field_scale=function(){var t,n,r,i,s,o,u,a,f;if(this.is_multiple){r=0,u=0,s="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(a=0,f=o.length;a<f;a++)i=o[a],s+=i+":"+this.search_field.css(i)+";";return n=e("<div />",{style:s}),n.text(this.search_field.val()),e("body").append(n),u=n.width()+25,n.remove(),u>this.f_width-10&&(u=this.f_width-10),this.search_field.css({width:u+"px"}),t=this.container.height(),this.dropdown.css({top:t+"px"})}},i.prototype.generate_random_id=function(){var t;t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(e("#"+t).length>0)t+=this.generate_random_char();return t},i}(AbstractChosen),r.Chosen=t,n=function(e){var t;return t=e.outerWidth()-e.width()},r.get_side_border_padding=n}.call(this);;
