function vopenw(){tbar="location=no,status=yes,resizable=yes,scrollbars=yes,width=560,height=535";sw=window.open("https://www.certisign.com.br/seal/splashcerti.htm","CRSN_Splash",tbar);sw.focus()}function criaCookie(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/"}function lerCookie(n){var t=document.cookie.match("(^|;) ?"+n+"=([^;]*)(;|$)");return t?t[2]:null}function adjustHeader(n){var i=$(".top-menu").width(),t,r;n>1182?offset=230:n>=975&&n<=1182?offset=430:n>750&&n<=974?offset=650:n<=750&&(offset=1325);t=$(".flag-container:visible").length*$(".flag-container").width();$("#header").length&&($("#header .icon-user").css("right",i+90+t),$("#header .container").css("background-position","-"+(i+offset+t)+"px 0"),!$("#header .top-menu").hasClass("changed-margin-right")&&t>0&&(r=$("#header .top-menu").css("margin-right").replace("px","")*1,$("#header .top-menu").css("margin-right",r+t+"px"),$("#header .top-menu").addClass("changed-margin-right")))}function adjustBoxesHeight(n){$(n).each(function(){boxes=$(this).find("div[class*='col-']");maxHeight=Math.max.apply(Math,boxes.map(function(){return $(this).height()}).get());boxes.height(maxHeight)})}function removeBoxesHeight(n){$(n).each(function(){$(this).find("div[class*='col-']").css("height","auto")})}function responsiveAffix(){var n=$(".responsive-affix"),t=n.attr("data-offset-top"),i=n.attr("data-offset-bottom");n.width(n.parent("div[class*='col-']").width());n.affix({offset:{top:t,bottom:i}})}(function(n){n.extend(n.fn,{validate:function(t){if(!this.length)return t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=n.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new n.validator(t,this[0]),n.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){i.settings.submitHandler&&(i.submitButton=t.target);n(t.target).hasClass("cancel")&&(i.cancelSubmit=!0);void 0!==n(t.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return i.settings.submitHandler?(i.submitButton&&(r=n("<input type='hidden'/>").attr("name",i.submitButton.name).val(n(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,t),i.submitButton&&r.remove(),!1):!0}return i.settings.debug&&t.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,r()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):r():(i.focusInvalid(),!1)})),i)},valid:function(){if(n(this[0]).is("form"))return this.validate().form();var t=!0,i=n(this[0].form).validate();return this.each(function(){t=t&&i.element(this)}),t},removeAttrs:function(t){var i={},r=this;return n.each(t.split(/\s/),function(n,t){i[t]=r.attr(t);r.removeAttr(t)}),i},rules:function(t,i){var r=this[0],o,u,h;if(t){var e=n.data(r.form,"validator").settings,s=e.rules,f=n.validator.staticRules(r);switch(t){case"add":n.extend(f,n.validator.normalizeRule(i));delete f.messages;s[r.name]=f;i.messages&&(e.messages[r.name]=n.extend(e.messages[r.name],i.messages));break;case"remove":return i?(o={},n.each(i.split(/\s/),function(n,t){o[t]=f[t];delete f[t]}),o):(delete s[r.name],f)}}return u=n.validator.normalizeRules(n.extend({},n.validator.classRules(r),n.validator.attributeRules(r),n.validator.dataRules(r),n.validator.staticRules(r)),r),u.required&&(h=u.required,delete u.required,u=n.extend({required:h},u)),u}});n.extend(n.expr[":"],{blank:function(t){return!n.trim(""+n(t).val())},filled:function(t){return!!n.trim(""+n(t).val())},unchecked:function(t){return!n(t).prop("checked")}});n.validator=function(t,i){this.settings=n.extend(!0,{},n.validator.defaults,t);this.currentForm=i;this.init()};n.validator.format=function(t,i){return 1===arguments.length?function(){var i=n.makeArray(arguments);return i.unshift(t),n.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)};n.extend(n.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:n([]),errorLabelContainer:n([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(n){this.lastActive=n;this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,n,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(n)).hide())},onfocusout:function(n){!this.checkable(n)&&(n.name in this.submitted||!this.optional(n))&&this.element(n)},onkeyup:function(n,t){(9!==t.which||""!==this.elementValue(n))&&(n.name in this.submitted||n===this.lastElement)&&this.element(n)},onclick:function(n){n.name in this.submitted?this.element(n):n.parentNode.name in this.submitted&&this.element(n.parentNode)},highlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).addClass(i).removeClass(r):n(t).addClass(i).removeClass(r)},unhighlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).removeClass(i).addClass(r):n(t).removeClass(i).addClass(r)}},setDefaults:function(t){n.extend(n.validator.defaults,t)},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:n.validator.format("Please enter no more than {0} characters."),minlength:n.validator.format("Please enter at least {0} characters."),rangelength:n.validator.format("Please enter a value between {0} and {1} characters long."),range:n.validator.format("Please enter a value between {0} and {1}."),max:n.validator.format("Please enter a value less than or equal to {0}."),min:n.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function i(t){var i=n.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");i.settings[r]&&i.settings[r].call(i,this[0],t)}var r,t;this.labelContainer=n(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||n(this.currentForm);this.containers=n(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();r=this.groups={};n.each(this.settings.groups,function(t,i){"string"==typeof i&&(i=i.split(/\s/));n.each(i,function(n,i){r[i]=t})});t=this.settings.rules;n.each(t,function(i,r){t[i]=n.validator.normalizeRule(r)});n(this.currentForm).validateDelegate(":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'] ","focusin focusout keyup",i).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",i);this.settings.invalidHandler&&n(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),n.extend(this.submitted,this.errorMap),this.invalid=n.extend({},this.errorMap),this.valid()||n(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var n=0,t=this.currentElements=this.elements();t[n];n++)this.check(t[n]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t));this.lastElement=t;this.prepareElement(t);this.currentElements=n(t);var i=this.check(t)!==!1;return i?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){n.extend(this.errorMap,t);this.errorList=[];for(var i in t)this.errorList.push({message:t[i],element:this.findByName(i)[0]});this.successList=n.grep(this.successList,function(n){return!(n.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){n.fn.resetForm&&n(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t=0,i;for(i in n)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{n(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&1===n.grep(this.errorList,function(n){return n.element.name===t.name}).length&&t},elements:function(){var t=this,i={};return n(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!t.objectLength(n(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(t){return n(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return n(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=n([]);this.toHide=n([]);this.currentElements=n([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(n){this.reset();this.toHide=this.errorsFor(n)},elementValue:function(t){var r=n(t).attr("type"),i=n(t).val();return"radio"===r||"checkbox"===r?n("input[name='"+n(t).attr("name")+"']:checked").val():"string"==typeof i?i.replace(/\r/g,""):i},check:function(t){var r,u;t=this.validationTargetFor(this.clean(t));var i,f=n(t).rules(),e=!1,s=this.elementValue(t);for(r in f){u={method:r,parameters:f[r]};try{if(i=n.validator.methods[r].call(this,s,t,u.parameters),"dependency-mismatch"===i){e=!0;continue}if(e=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(t)),void 0;if(!i)return this.formatAndAdd(t,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+u.method+"' method.",o),o;}}if(!e)return(this.objectLength(f)&&this.successList.push(t),!0)},customDataMessage:function(t,i){return n(t).data("msg-"+i.toLowerCase())||t.attributes&&n(t).attr("data-msg-"+i.toLowerCase())},customMessage:function(n,t){var i=this.settings.messages[n];return i&&(i.constructor===String?i:i[t])},findDefined:function(){for(var n=0;arguments.length>n;n++)if(void 0!==arguments[n])return arguments[n];return void 0},defaultMessage:function(t,i){return this.findDefined(this.customMessage(t.name,i),this.customDataMessage(t,i),!this.settings.ignoreTitle&&t.title||void 0,n.validator.messages[i],"<strong>Warning: No message defined for "+t.name+"<\/strong>")},formatAndAdd:function(t,i){var r=this.defaultMessage(t,i.method),u=/\$?\{(\d+)\}/g;"function"==typeof r?r=r.call(this,i.parameters,t):u.test(r)&&(r=n.validator.format(r.replace(u,"{$1}"),i.parameters));this.errorList.push({message:r,element:t});this.errorMap[t.name]=r;this.submitted[t.name]=r},addWrapper:function(n){return this.settings.wrapper&&(n=n.add(n.parent(this.settings.wrapper))),n},defaultShowErrors:function(){for(var i,t,n=0;this.errorList[n];n++)t=this.errorList[n],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.validClass),this.showLabel(t.element,t.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(n=0;this.successList[n];n++)this.showLabel(this.successList[n]);if(this.settings.unhighlight)for(n=0,i=this.validElements();i[n];n++)this.settings.unhighlight.call(this,i[n],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 n(this.errorList).map(function(){return this.element})},showLabel:function(t,i){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(i)):(r=n("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,n(t)):r.insertAfter(t)));!i&&this.settings.success&&(r.text(""),"string"==typeof this.settings.success?r.addClass(this.settings.success):this.settings.success(r,t));this.toShow=this.toShow.add(r)},errorsFor:function(t){var i=this.idOrName(t);return this.errors().filter(function(){return n(this).attr("for")===i})},idOrName:function(n){return this.groups[n.name]||(this.checkable(n)?n.name:n.id||n.name)},validationTargetFor:function(n){return this.checkable(n)&&(n=this.findByName(n.name).not(this.settings.ignore)[0]),n},checkable:function(n){return/radio|checkbox/i.test(n.type)},findByName:function(t){return n(this.currentForm).find("[name='"+t+"']")},getLength:function(t,i){switch(i.nodeName.toLowerCase()){case"select":return n("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return t.length},depend:function(n,t){return this.dependTypes[typeof n]?this.dependTypes[typeof n](n,t):!0},dependTypes:{boolean:function(n){return n},string:function(t,i){return!!n(t,i.form).length},"function":function(n,t){return n(t)}},optional:function(t){var i=this.elementValue(t);return!n.validator.methods.required.call(this,i,t)&&"dependency-mismatch"},startRequest:function(n){this.pending[n.name]||(this.pendingRequest++,this.pending[n.name]=!0)},stopRequest:function(t,i){this.pendingRequest--;0>this.pendingRequest&&(this.pendingRequest=0);delete this.pending[t.name];i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(n(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(n(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return n.data(t,"previousValue")||n.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},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(t,i){t.constructor===String?this.classRuleSettings[t]=i:n.extend(this.classRuleSettings,t)},classRules:function(t){var i={},r=n(t).attr("class");return r&&n.each(r.split(" "),function(){this in n.validator.classRuleSettings&&n.extend(i,n.validator.classRuleSettings[this])}),i},attributeRules:function(t){var u={},e=n(t),f=e[0].getAttribute("type"),r,i;for(r in n.validator.methods)"required"===r?(i=e.get(0).getAttribute(r),""===i&&(i=!0),i=!!i):i=e.attr(r),/min|max/.test(r)&&(null===f||/number|range|text/.test(f))&&(i=Number(i)),i?u[r]=i:f===r&&"range"!==f&&(u[r]=!0);return u.maxlength&&/-1|2147483647|524288/.test(u.maxlength)&&delete u.maxlength,u},dataRules:function(t){var i,r,u={},f=n(t);for(i in n.validator.methods)r=f.data("rule-"+i.toLowerCase()),void 0!==r&&(u[i]=r);return u},staticRules:function(t){var i={},r=n.data(t.form,"validator");return r.settings.rules&&(i=n.validator.normalizeRule(r.settings.rules[t.name])||{}),i},normalizeRules:function(t,i){return n.each(t,function(r,u){if(u===!1)return delete t[r],void 0;if(u.param||u.depends){var f=!0;switch(typeof u.depends){case"string":f=!!n(u.depends,i.form).length;break;case"function":f=u.depends.call(i,i)}f?t[r]=void 0!==u.param?u.param:!0:delete t[r]}}),n.each(t,function(r,u){t[r]=n.isFunction(u)?u(i):u}),n.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),n.each(["rangelength","range"],function(){var i;t[this]&&(n.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(i=t[this].split(/[\s,]+/),t[this]=[Number(i[0]),Number(i[1])]))}),n.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var i={};n.each(t.split(/\s/),function(){i[this]=!0});t=i}return t},addMethod:function(t,i,r){n.validator.methods[t]=i;n.validator.messages[t]=void 0!==r?r:n.validator.messages[t];3>i.length&&n.validator.addClassRules(t,n.validator.normalizeRule(t))},methods:{required:function(t,i,r){if(!this.depend(r,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var u=n(i).val();return u&&u.length>0}return this.checkable(i)?this.getLength(t,i)>0:n.trim(t).length>0},email:function(n,t){return this.optional(t)||/^((([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(n)},url:function(n,t){return this.optional(t)||/^(https?|s?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(n)},date:function(n,t){return this.optional(t)||!/Invalid|NaN/.test(""+new Date(n))},dateISO:function(n,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(n)},number:function(n,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(n)},digits:function(n,t){return this.optional(t)||/^\d+$/.test(n)},creditcard:function(n,t){var r,e;if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(n))return!1;var f=0,i=0,u=!1;for(n=n.replace(/\D/g,""),r=n.length-1;r>=0;r--)e=n.charAt(r),i=parseInt(e,10),u&&(i*=2)>9&&(i-=9),f+=i,u=!u;return 0==f%10},minlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r},maxlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||r>=u},rangelength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r[0]&&r[1]>=u},min:function(n,t,i){return this.optional(t)||n>=i},max:function(n,t,i){return this.optional(t)||i>=n},range:function(n,t,i){return this.optional(t)||n>=i[0]&&i[1]>=n},equalTo:function(t,i,r){var u=n(r);return this.settings.onfocusout&&u.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){n(i).valid()}),t===u.val()},remote:function(t,i,r){var f,u,e;return this.optional(i)?"dependency-mismatch":(f=this.previousValue(i),this.settings.messages[i.name]||(this.settings.messages[i.name]={}),f.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=f.message,r="string"==typeof r&&{url:r}||r,f.old===t)?f.valid:(f.old=t,u=this,this.startRequest(i),e={},e[i.name]=t,n.ajax(n.extend(!0,{url:r,mode:"abort",port:"validate"+i.name,dataType:"json",data:e,success:function(r){var e,h,s,o;u.settings.messages[i.name].remote=f.originalMessage;e=r===!0||"true"===r;e?(h=u.formSubmitted,u.prepareElement(i),u.formSubmitted=h,u.successList.push(i),delete u.invalid[i.name],u.showErrors()):(s={},o=r||u.defaultMessage(i,"remote"),s[i.name]=f.message=n.isFunction(o)?o(t):o,u.invalid[i.name]=!0,u.showErrors(s));f.valid=e;u.stopRequest(i,e)}},r)),"pending")}}});n.format=n.validator.format})(jQuery),function(n){var t={},i;n.ajaxPrefilter?n.ajaxPrefilter(function(n,i,r){var u=n.port;"abort"===n.mode&&(t[u]&&t[u].abort(),t[u]=r)}):(i=n.ajax,n.ajax=function(r){var f=("mode"in r?r:n.ajaxSettings).mode,u=("port"in r?r:n.ajaxSettings).port;return"abort"===f?(t[u]&&t[u].abort(),t[u]=i.apply(this,arguments),t[u]):i.apply(this,arguments)})}(jQuery),function(n){n.extend(n.fn,{validateDelegate:function(t,i,r){return this.bind(i,function(i){var u=n(i.target);if(u.is(t))return r.apply(u,arguments)})}})}(jQuery),function(n,t){typeof exports=="object"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):t(n)}(this,function(n){function o(n){this._targetElement=n;this._options={nextLabel:"Next &rarr;",prevLabel:"&larr; Back",skipLabel:"Skip",doneLabel:"Done",tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1}}function p(n){var o=[],t=this,k,h,a,c,w,y,e,v,r,b,p,d,nt;if(this._options.steps)for(c=[],e=0,k=this._options.steps.length;e<k;e++)h=l(this._options.steps[e]),h.step=o.length+1,typeof h.element=="string"&&(h.element=document.querySelector(h.element)),(typeof h.element=="undefined"||h.element==null)&&(a=document.querySelector(".introjsFloatingElement"),a==null&&(a=document.createElement("div"),a.className="introjsFloatingElement",document.body.appendChild(a)),h.element=a,h.position="floating"),h.element!=null&&o.push(h);else{if(c=n.querySelectorAll("*[data-intro]"),c.length<1)return!1;for(e=0,v=c.length;e<v;e++)r=c[e],w=parseInt(r.getAttribute("data-step"),10),w>0&&(o[w-1]={element:r,intro:r.getAttribute("data-intro"),step:parseInt(r.getAttribute("data-step"),10),tooltipClass:r.getAttribute("data-tooltipClass"),highlightClass:r.getAttribute("data-highlightClass"),position:r.getAttribute("data-position")||this._options.tooltipPosition});for(y=0,e=0,v=c.length;e<v;e++)if(r=c[e],r.getAttribute("data-step")==null){for(;;)if(typeof o[y]=="undefined")break;else y++;o[y]={element:r,intro:r.getAttribute("data-intro"),step:y+1,tooltipClass:r.getAttribute("data-tooltipClass"),highlightClass:r.getAttribute("data-highlightClass"),position:r.getAttribute("data-position")||this._options.tooltipPosition}}}for(b=[],p=0;p<o.length;p++)o[p]&&b.push(o[p]);return o=b,o.sort(function(n,t){return n.step-t.step}),t._introItems=o,g.call(t,n)&&(u.call(t),d=n.querySelector(".introjs-skipbutton"),nt=n.querySelector(".introjs-nextbutton"),t._onKeyDown=function(i){if(i.keyCode===27&&t._options.exitOnEsc==!0)f.call(t,n),t._introExitCallback!=undefined&&t._introExitCallback.call(t);else if(i.keyCode===37)s.call(t);else if(i.keyCode===39)u.call(t);else if(i.keyCode===13){var r=i.target||i.srcElement;r&&r.className.indexOf("introjs-prevbutton")>0?s.call(t):r&&r.className.indexOf("introjs-skipbutton")>0?f.call(t,n):u.call(t);i.preventDefault?i.preventDefault():i.returnValue=!1}},t._onResize=function(){i.call(t,document.querySelector(".introjs-helperLayer"));i.call(t,document.querySelector(".introjs-tooltipReferenceLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",t._onKeyDown,!0),window.addEventListener("resize",t._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",t._onKeyDown),document.attachEvent("onresize",t._onResize))),!1}function l(n){var t,i;if(n==null||typeof n!="object"||typeof n.nodeType!="undefined")return n;t={};for(i in n)t[i]=l(n[i]);return t}function w(n){this._currentStep=n-2;typeof this._introItems!="undefined"&&u.call(this)}function u(){if(this._direction="forward",typeof this._currentStep=="undefined"?this._currentStep=0:++this._currentStep,this._introItems.length<=this._currentStep){typeof this._introCompleteCallback=="function"&&this._introCompleteCallback.call(this);f.call(this,this._targetElement);return}var n=this._introItems[this._currentStep];typeof this._introBeforeChangeCallback!="undefined"&&this._introBeforeChangeCallback.call(this,n.element);v.call(this,n)}function s(){if(this._direction="backward",this._currentStep===0)return!1;var n=this._introItems[--this._currentStep];typeof this._introBeforeChangeCallback!="undefined"&&this._introBeforeChangeCallback.call(this,n.element);v.call(this,n)}function f(n){var i=n.querySelector(".introjs-overlay"),u,f,e,o,s,t,r;if(i!=null){if(i.style.opacity=0,setTimeout(function(){i.parentNode&&i.parentNode.removeChild(i)},500),u=n.querySelector(".introjs-helperLayer"),u&&u.parentNode.removeChild(u),f=n.querySelector(".introjs-tooltipReferenceLayer"),f&&f.parentNode.removeChild(f),e=n.querySelector(".introjs-disableInteraction"),e&&e.parentNode.removeChild(e),o=document.querySelector(".introjsFloatingElement"),o&&o.parentNode.removeChild(o),s=document.querySelector(".introjs-showElement"),s&&(s.className=s.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,"")),t=document.querySelectorAll(".introjs-fixParent"),t&&t.length>0)for(r=t.length-1;r>=0;r--)t[r].className=t[r].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown);this._currentStep=undefined}}function a(n,i,r,u){var s="",h,f,l;if(i.style.top=null,i.style.right=null,i.style.bottom=null,i.style.left=null,i.style.marginLeft=null,i.style.marginTop=null,r.style.display="inherit",typeof u!="undefined"&&u!=null&&(u.style.top=null,u.style.left=null),this._introItems[this._currentStep]){h=this._introItems[this._currentStep];s=typeof h.tooltipClass=="string"?h.tooltipClass:this._options.tooltipClass;i.className=("introjs-tooltip "+s).replace(/^\s+|\s+$/g,"");s=this._options.tooltipClass;currentTooltipPosition=this._introItems[this._currentStep].position;(currentTooltipPosition=="auto"||this._options.tooltipPosition=="auto")&&currentTooltipPosition!="floating"&&(currentTooltipPosition=b.call(this,n,i,currentTooltipPosition));var e=t(n),o=t(i).height,a=c();switch(currentTooltipPosition){case"top":i.style.left="15px";i.style.top="-"+(o+10)+"px";r.className="introjs-arrow bottom";break;case"right":i.style.left=t(n).width+20+"px";e.top+o>a.height&&(r.className="introjs-arrow left-bottom",i.style.top="-"+(o-e.height-20)+"px");r.className="introjs-arrow left";break;case"left":this._options.showStepNumbers==!0&&(i.style.top="15px");e.top+o>a.height?(i.style.top="-"+(o-e.height-20)+"px",r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right";i.style.right=e.width+20+"px";break;case"floating":r.style.display="none";f=t(i);i.style.left="50%";i.style.top="50%";i.style.marginLeft="-"+f.width/2+"px";i.style.marginTop="-"+f.height/2+"px";typeof u!="undefined"&&u!=null&&(u.style.left="-"+(f.width/2+18)+"px",u.style.top="-"+(f.height/2+18)+"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right";i.style.right="0px";i.style.bottom="-"+(t(i).height+10)+"px";break;case"bottom-middle-aligned":l=t(n);f=t(i);r.className="introjs-arrow top-middle";i.style.left=l.width/2-f.width/2+"px";i.style.bottom="-"+(f.height+10)+"px";break;case"bottom-left-aligned":case"bottom":default:i.style.bottom="-"+(t(i).height+10)+"px";i.style.left=t(n).width/2-t(i).width/2+"px";r.className="introjs-arrow top"}}}function b(n,i,r){var u=this._options.positionPrecedence.slice(),s=c(),l=t(i).height+10,o=t(i).width+20,f=t(n),h="floating";return f.left+o>s.width||f.left+f.width/2-o<0?(e(u,"bottom"),e(u,"top")):(f.height+f.top+l>s.height&&e(u,"bottom"),f.top-l<0&&e(u,"top")),f.width+f.left+o>s.width&&e(u,"right"),f.left-o<0&&e(u,"left"),u.length>0&&(h=u[0]),r&&r!="auto"&&u.indexOf(r)>-1&&(h=r),h}function e(n,t){n.indexOf(t)>-1&&n.splice(n.indexOf(t),1)}function i(n){if(n){if(!this._introItems[this._currentStep])return;var u=this._introItems[this._currentStep],i=t(u.element),r=10;u.position=="floating"&&(r=0);n.setAttribute("style","width: "+(i.width+r)+"px; height:"+(i.height+r)+"px; top:"+(i.top-5)+"px;left: "+(i.left-5)+"px;")}}function k(){var n=document.querySelector(".introjs-disableInteraction");n===null&&(n=document.createElement("div"),n.className="introjs-disableInteraction",this._targetElement.appendChild(n));i.call(this,n)}function v(n){var at,tt,vt,bt,w,gt,kt,nt,ht,ft,o,p,v,dt,h;typeof this._introChangeCallback!="undefined"&&this._introChangeCallback.call(this,n.element);var e=this,lt=document.querySelector(".introjs-helperLayer"),l=document.querySelector(".introjs-tooltipReferenceLayer"),et="introjs-helperLayer",si=t(n.element);if(typeof n.highlightClass=="string"&&(et+=" "+n.highlightClass),typeof this._options.highlightClass=="string"&&(et+=" "+this._options.highlightClass),lt!=null){var g=l.querySelector(".introjs-helperNumberLayer"),ii=l.querySelector(".introjs-tooltiptext"),ri=l.querySelector(".introjs-arrow"),rt=l.querySelector(".introjs-tooltip"),v=l.querySelector(".introjs-skipbutton"),p=l.querySelector(".introjs-prevbutton"),o=l.querySelector(".introjs-nextbutton");if(lt.className=et,rt.style.opacity=0,rt.style.display="none",g!=null&&(at=this._introItems[n.step-2>=0?n.step-2:0],(at!=null&&this._direction=="forward"&&at.position=="floating"||this._direction=="backward"&&n.position=="floating")&&(g.style.opacity=0)),i.call(e,lt),i.call(e,l),tt=document.querySelectorAll(".introjs-fixParent"),tt&&tt.length>0)for(w=tt.length-1;w>=0;w--)tt[w].className=tt[w].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");vt=document.querySelector(".introjs-showElement");vt.className=vt.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,"");e._lastShowElementTimer&&clearTimeout(e._lastShowElementTimer);e._lastShowElementTimer=setTimeout(function(){g!=null&&(g.innerHTML=n.step);ii.innerHTML=n.intro;rt.style.display="block";a.call(e,n.element,rt,ri,g);l.querySelector(".introjs-bullets li > a.active").className="";l.querySelector('.introjs-bullets li > a[data-stepnumber="'+n.step+'"]').className="active";l.querySelector(".introjs-progress .introjs-progressbar").setAttribute("style","width:"+y.call(e)+"%;");rt.style.opacity=1;g&&(g.style.opacity=1);o.tabIndex===-1?v.focus():o.focus()},350)}else{var yt=document.createElement("div"),ut=document.createElement("div"),pt=document.createElement("div"),b=document.createElement("div"),wt=document.createElement("div"),ot=document.createElement("div"),st=document.createElement("div"),it=document.createElement("div");for(yt.className=et,ut.className="introjs-tooltipReferenceLayer",i.call(e,yt),i.call(e,ut),this._targetElement.appendChild(yt),this._targetElement.appendChild(ut),pt.className="introjs-arrow",wt.className="introjs-tooltiptext",wt.innerHTML=n.intro,ot.className="introjs-bullets",this._options.showBullets===!1&&(ot.style.display="none"),bt=document.createElement("ul"),w=0,gt=this._introItems.length;w<gt;w++)kt=document.createElement("li"),nt=document.createElement("a"),nt.onclick=function(){e.goToStep(this.getAttribute("data-stepnumber"))},w===n.step-1&&(nt.className="active"),nt.href="javascript:void(0);",nt.innerHTML="&nbsp;",nt.setAttribute("data-stepnumber",this._introItems[w].step),kt.appendChild(nt),bt.appendChild(kt);ot.appendChild(bt);st.className="introjs-progress";this._options.showProgress===!1&&(st.style.display="none");ht=document.createElement("div");ht.className="introjs-progressbar";ht.setAttribute("style","width:"+y.call(this)+"%;");st.appendChild(ht);it.className="introjs-tooltipbuttons";this._options.showButtons===!1&&(it.style.display="none");b.className="introjs-tooltip";b.appendChild(wt);b.appendChild(ot);b.appendChild(st);this._options.showStepNumbers==!0&&(ft=document.createElement("span"),ft.className="introjs-helperNumberLayer",ft.innerHTML=n.step,ut.appendChild(ft));b.appendChild(pt);ut.appendChild(b);o=document.createElement("a");o.onclick=function(){e._introItems.length-1!=e._currentStep&&u.call(e)};o.href="javascript:void(0);";o.innerHTML=this._options.nextLabel;p=document.createElement("a");p.onclick=function(){e._currentStep!=0&&s.call(e)};p.href="javascript:void(0);";p.innerHTML=this._options.prevLabel;v=document.createElement("a");v.className="introjs-button introjs-skipbutton";v.href="javascript:void(0);";v.innerHTML=this._options.skipLabel;v.onclick=function(){e._introItems.length-1==e._currentStep&&typeof e._introCompleteCallback=="function"&&e._introCompleteCallback.call(e);e._introItems.length-1!=e._currentStep&&typeof e._introExitCallback=="function"&&e._introExitCallback.call(e);f.call(e,e._targetElement)};it.appendChild(v);this._introItems.length>1&&(it.appendChild(p),it.appendChild(o));b.appendChild(it);a.call(e,n.element,b,pt,ft)}for(this._options.disableInteraction===!0&&k.call(e),p.removeAttribute("tabIndex"),o.removeAttribute("tabIndex"),this._currentStep==0&&this._introItems.length>1?(p.className="introjs-button introjs-prevbutton introjs-disabled",p.tabIndex="-1",o.className="introjs-button introjs-nextbutton",v.innerHTML=this._options.skipLabel):this._introItems.length-1==this._currentStep||this._introItems.length==1?(v.innerHTML=this._options.doneLabel,p.className="introjs-button introjs-prevbutton",o.className="introjs-button introjs-nextbutton introjs-disabled",o.tabIndex="-1"):(p.className="introjs-button introjs-prevbutton",o.className="introjs-button introjs-nextbutton",v.innerHTML=this._options.skipLabel),o.focus(),n.element.className+=" introjs-showElement",dt=r(n.element,"position"),dt!=="absolute"&&dt!=="relative"&&(n.element.className+=" introjs-relativePosition"),h=n.element.parentNode;h!=null;){if(h.tagName.toLowerCase()==="body")break;var ui=r(h,"z-index"),fi=parseFloat(r(h,"opacity")),ei=r(h,"transform")||r(h,"-webkit-transform")||r(h,"-moz-transform")||r(h,"-ms-transform")||r(h,"-o-transform");(/[0-9]+/.test(ui)||fi<1||ei!=="none")&&(h.className+=" introjs-fixParent");h=h.parentNode}if(!d(n.element)&&this._options.scrollToElement===!0){var ct=n.element.getBoundingClientRect(),ni=c().height,ti=ct.bottom-(ct.bottom-ct.top),oi=ct.bottom-ni;ti<0||n.element.clientHeight>ni?window.scrollBy(0,ti-30):window.scrollBy(0,oi+100)}typeof this._introAfterChangeCallback!="undefined"&&this._introAfterChangeCallback.call(this,n.element)}function r(n,t){var i="";return n.currentStyle?i=n.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(i=document.defaultView.getComputedStyle(n,null).getPropertyValue(t)),i&&i.toLowerCase?i.toLowerCase():i}function c(){if(window.innerWidth!=undefined)return{width:window.innerWidth,height:window.innerHeight};var n=document.documentElement;return{width:n.clientWidth,height:n.clientHeight}}function d(n){var t=n.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom+80<=window.innerHeight&&t.right<=window.innerWidth}function g(n){var i=document.createElement("div"),r="",u=this,e;return i.className="introjs-overlay",n.tagName.toLowerCase()==="body"?(r+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",i.setAttribute("style",r)):(e=t(n),e&&(r+="width: "+e.width+"px; height:"+e.height+"px; top:"+e.top+"px;left: "+e.left+"px;",i.setAttribute("style",r))),n.appendChild(i),i.onclick=function(){u._options.exitOnOverlayClick==!0&&(f.call(u,n),u._introExitCallback!=undefined&&u._introExitCallback.call(u))},setTimeout(function(){r+="opacity: "+u._options.overlayOpacity.toString()+";";i.setAttribute("style",r)},10),!0}function t(n){var t={},i,r;for(t.width=n.offsetWidth,t.height=n.offsetHeight,i=0,r=0;n&&!isNaN(n.offsetLeft)&&!isNaN(n.offsetTop);)i+=n.offsetLeft,r+=n.offsetTop,n=n.offsetParent;return t.top=r,t.left=i,t}function y(){var n=parseInt(this._currentStep+1,10);return n/this._introItems.length*100}function nt(n,t){var r={},i;for(i in n)r[i]=n[i];for(i in t)r[i]=t[i];return r}var h=function(n){if(typeof n=="object")return new o(n);if(typeof n=="string"){var t=document.querySelector(n);if(t)return new o(t);throw new Error("There is no element with given selector.");}else return new o(document.body)};return h.version="1.0.0",h.fn=o.prototype={clone:function(){return new o(this)},setOption:function(n,t){return this._options[n]=t,this},setOptions:function(n){return this._options=nt(this._options,n),this},start:function(){return p.call(this,this._targetElement),this},goToStep:function(n){return w.call(this,n),this},nextStep:function(){return u.call(this),this},previousStep:function(){return s.call(this),this},exit:function(){return f.call(this,this._targetElement),this},refresh:function(){return i.call(this,document.querySelector(".introjs-helperLayer")),i.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),this},onbeforechange:function(n){if(typeof n=="function")this._introBeforeChangeCallback=n;else throw new Error("Provided callback for onbeforechange was not a function");return this},onchange:function(n){if(typeof n=="function")this._introChangeCallback=n;else throw new Error("Provided callback for onchange was not a function.");return this},onafterchange:function(n){if(typeof n=="function")this._introAfterChangeCallback=n;else throw new Error("Provided callback for onafterchange was not a function");return this},oncomplete:function(n){if(typeof n=="function")this._introCompleteCallback=n;else throw new Error("Provided callback for oncomplete was not a function.");return this},onexit:function(n){if(typeof n=="function")this._introExitCallback=n;else throw new Error("Provided callback for onexit was not a function.");return this}},n.introJs=h,h}),function(n,t){typeof define=="function"&&define.amd?define(["angular","intro"],t):typeof exports=="object"?module.exports=t(require("angular"),require("intro")):n.angularIntroJs=t(n.angular,n.introJs)}(this,function(n,t){var i=n.module("angular-intro",[]);return i.directive("ngIntroOptions",["$timeout",function(n){return{restrict:"A",scope:{ngIntroMethod:"=",ngIntroExitMethod:"=?",ngIntroOptions:"=",ngIntroOncomplete:"=",ngIntroOnexit:"=",ngIntroOnchange:"=",ngIntroOnbeforechange:"=",ngIntroOnafterchange:"=",ngIntroAutostart:"=",ngIntroAutorefresh:"="},link:function(i){var r,u;i.ngIntroMethod=function(u){var f=i.$on("$locationChangeStart",function(){r.exit()});if(r=typeof u=="string"?t(u):t(),r.setOptions(i.ngIntroOptions),i.ngIntroAutorefresh&&i.$watch(function(){r.refresh()}),i.ngIntroOncomplete)r.oncomplete(function(){i.ngIntroOncomplete.call(this,i);n(function(){i.$digest()});f()});if(i.ngIntroOnexit)r.onexit(function(){i.ngIntroOnexit.call(this,i);n(function(){i.$digest()});f()});if(i.ngIntroOnchange)r.onchange(function(t){i.ngIntroOnchange.call(this,t,i);n(function(){i.$digest()})});if(i.ngIntroOnbeforechange)r.onbeforechange(function(t){i.ngIntroOnbeforechange.call(this,t,i);n(function(){i.$digest()})});if(i.ngIntroOnafterchange)r.onafterchange(function(t){i.ngIntroOnafterchange.call(this,t,i);n(function(){i.$digest()})});typeof u=="number"?r.goToStep(u).start():r.start()};i.ngIntroExitMethod=function(n){r.exit();n()};u=i.$watch("ngIntroAutostart",function(){i.ngIntroAutostart&&n(function(){i.ngIntroMethod()});u()})}}}]),i}),function(n){function r(){return new Date(Date.UTC.apply(Date,arguments))}function c(t,i){var u=n(t).data(),f={},e,o=new RegExp("^"+i.toLowerCase()+"([A-Z])"),i=new RegExp("^"+i.toLowerCase()),r;for(r in u)i.test(r)&&(e=r.replace(o,function(n,t){return t.toLowerCase()}),f[e]=u[r]);return f}function l(t){var u={},r;if(i[t]||(t=t.split("-")[0],i[t]))return r=i[t],n.each(h,function(n,t){t in r&&(u[t]=r[t])}),u}var e=n(window),u=function(i,r){var u=this;this._process_options(r);this.element=n(i);this.isInline=!1;this.isInput=this.element.is("input");this.component=this.element.is(".date")?this.element.find(".add-on, .btn"):!1;this.hasInput=this.component&&this.element.find("input").length;this.component&&this.component.length===0&&(this.component=!1);this.picker=n(t.template);this._buildEvents();this._attachEvents();this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu");this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right"));this.viewMode=this.o.startView;this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(n,t){return parseInt(t)+1});this._allow_update=!1;this.setStartDate(this._o.startDate);this.setEndDate(this._o.endDate);this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);this.fillDow();this.fillMonths();this._allow_update=!0;this.update();this.showMode();this.isInline&&this.show()},o,s,f,h,i,t;u.prototype={constructor:u,_process_options:function(r){var u,o,h,e,s;this._o=n.extend({},this._o,r);u=this.o=n.extend({},this._o);o=u.language;i[o]||(o=o.split("-")[0],i[o]||(o=f.language));u.language=o;switch(u.startView){case 2:case"decade":u.startView=2;break;case 1:case"year":u.startView=1;break;default:u.startView=0}switch(u.minViewMode){case 1:case"months":u.minViewMode=1;break;case 2:case"years":u.minViewMode=2;break;default:u.minViewMode=0}if(u.startView=Math.max(u.startView,u.minViewMode),u.weekStart%=7,u.weekEnd=(u.weekStart+6)%7,h=t.parseFormat(u.format),u.startDate!==-Infinity&&(u.startDate=u.startDate?u.startDate instanceof Date?this._local_to_utc(this._zero_time(u.startDate)):t.parseDate(u.startDate,h,u.language):-Infinity),u.endDate!==Infinity&&(u.endDate=u.endDate?u.endDate instanceof Date?this._local_to_utc(this._zero_time(u.endDate)):t.parseDate(u.endDate,h,u.language):Infinity),u.daysOfWeekDisabled=u.daysOfWeekDisabled||[],n.isArray(u.daysOfWeekDisabled)||(u.daysOfWeekDisabled=u.daysOfWeekDisabled.split(/[,\s]*/)),u.daysOfWeekDisabled=n.map(u.daysOfWeekDisabled,function(n){return parseInt(n,10)}),e=String(u.orientation).toLowerCase().split(/\s+/g),s=u.orientation.toLowerCase(),e=n.grep(e,function(n){return/^auto|left|right|top|bottom$/.test(n)}),u.orientation={x:"auto",y:"auto"},s&&s!=="auto")if(e.length===1)switch(e[0]){case"top":case"bottom":u.orientation.y=e[0];break;case"left":case"right":u.orientation.x=e[0]}else s=n.grep(e,function(n){return/^left|right$/.test(n)}),u.orientation.x=s[0]||"auto",s=n.grep(e,function(n){return/^top|bottom$/.test(n)}),u.orientation.y=s[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(n){for(var t=0,i,r;t<n.length;t++){i=n[t][0];r=n[t][1];i.on(r)}},_unapplyEvents:function(n){for(var t=0,i,r;t<n.length;t++)i=n[t][0],r=n[t][1],i.off(r)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:n.proxy(this.show,this),keyup:n.proxy(this.update,this),keydown:n.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:n.proxy(this.show,this),keyup:n.proxy(this.update,this),keydown:n.proxy(this.keydown,this)}],[this.component,{click:n.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:n.proxy(this.show,this)}]];this._secondaryEvents=[[this.picker,{click:n.proxy(this.click,this)}],[n(window),{resize:n.proxy(this.place,this)}],[n(document),{mousedown:n.proxy(function(n){this.element.is(n.target)||this.element.find(n.target).length||this.picker.is(n.target)||this.picker.find(n.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(i,r){var u=r||this.date,f=this._utc_to_local(u);this.element.trigger({type:i,date:f,format:n.proxy(function(n){var i=n||this.o.format;return t.formatDate(u,i,this.o.language)},this)})},show:function(n){this.isInline||this.picker.appendTo("body");this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();this.place();this._attachSecondaryEvents();n&&n.preventDefault();this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide();this._detachEvents();this._detachSecondaryEvents();this.picker.remove();delete this.element.data().datepicker;this.isInput||delete this.element.data().date},_utc_to_local:function(n){return new Date(n.getTime()+n.getTimezoneOffset()*6e4)},_local_to_utc:function(n){return new Date(n.getTime()-n.getTimezoneOffset()*6e4)},_zero_time:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate())},_zero_utc_time:function(n){return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return this.date},setDate:function(n){this.setUTCDate(this._local_to_utc(n))},setUTCDate:function(n){this.date=n;this.setValue()},setValue:function(){var n=this.getFormattedDate();this.isInput?this.element.val(n).change():this.component&&this.element.find("input").val(n).change()},getFormattedDate:function(n){return n===undefined&&(n=this.o.format),t.formatDate(this.date,n,this.o.language)},setStartDate:function(n){this._process_options({startDate:n});this.update();this.updateNavArrows()},setEndDate:function(n){this._process_options({endDate:n});this.update();this.updateNavArrows()},setDaysOfWeekDisabled:function(n){this._process_options({daysOfWeekDisabled:n});this.update();this.updateNavArrows()},place:function(){var i,v,s;if(!this.isInline){var u=this.picker.outerWidth(),f=this.picker.outerHeight(),h=10,c=e.width(),y=e.height(),l=e.scrollTop(),p=parseInt(this.element.parents().filter(function(){return n(this).css("z-index")!="auto"}).first().css("z-index"))+10,t=this.component?this.component.parent().offset():this.element.offset(),a=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),w=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),r=t.left,o=t.top;this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left");this.o.orientation.x!=="auto"?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(r-=u-w)):(this.picker.addClass("datepicker-orient-left"),t.left<0?r-=t.left-h:t.left+u>c&&(r=c-u-h));i=this.o.orientation.y;i==="auto"&&(v=-l+t.top-f,s=l+y-(t.top+a+f),i=Math.max(v,s)===s?"top":"bottom");this.picker.addClass("datepicker-orient-"+i);i==="top"?o+=a:o-=f+parseInt(this.picker.css("padding-top"));this.picker.css({top:o,left:r,zIndex:p})}},_allow_update:!0,update:function(){if(this._allow_update){var r=new Date(this.date),n,i=!1;arguments&&arguments.length&&(typeof arguments[0]=="string"||arguments[0]instanceof Date)?(n=arguments[0],n instanceof Date&&(n=this._local_to_utc(n)),i=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date);this.date=t.parseDate(n,this.o.format,this.o.language);i?this.setValue():n?r.getTime()!==this.date.getTime()&&this._trigger("changeDate"):this._trigger("clearDate");this.date<this.o.startDate?(this.viewDate=new Date(this.o.startDate),this.date=new Date(this.o.startDate)):this.date>this.o.endDate?(this.viewDate=new Date(this.o.endDate),this.date=new Date(this.o.endDate)):(this.viewDate=new Date(this.date),this.date=new Date(this.date));this.fill()}},fillDow:function(){var r=this.o.weekStart,n="<tr>",t;for(this.o.calendarWeeks&&(t='<th class="cw">&nbsp;<\/th>',n+=t,this.picker.find(".datepicker-days thead tr:first-child").prepend(t));r<this.o.weekStart+7;)n+='<th class="dow">'+i[this.o.language].daysMin[r++%7]+"<\/th>";n+="<\/tr>";this.picker.find(".datepicker-days thead").append(n)},fillMonths:function(){for(var n="",t=0;t<12;)n+='<span class="month">'+i[this.o.language].monthsShort[t++]+"<\/span>";this.picker.find(".datepicker-months td").html(n)},setRange:function(t){t&&t.length?this.range=n.map(t,function(n){return n.valueOf()}):delete this.range;this.fill()},getClassNames:function(t){var i=[],r=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),e=this.date.valueOf(),u=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<f?i.push("old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>f)&&i.push("new"),this.o.todayHighlight&&t.getUTCFullYear()==u.getFullYear()&&t.getUTCMonth()==u.getMonth()&&t.getUTCDate()==u.getDate()&&i.push("today"),e&&t.valueOf()==e&&i.push("active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||n.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&i.push("disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&i.push("range"),n.inArray(t.valueOf(),this.range)!=-1&&i.push("selected")),i},fill:function(){var k=new Date(this.viewDate),u=k.getUTCFullYear(),d=k.getUTCMonth(),v=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,it=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,y=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,rt=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,ft=this.date&&this.date.valueOf(),p,f,w,h,o,s,e,a,c,tt,l;for(this.picker.find(".datepicker-days thead th.datepicker-switch").text(i[this.o.language].months[d]+" "+u),this.picker.find("tfoot th.today").text(i[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.clear").text(i[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths(),f=r(u,d-1,28,0,0,0,0),w=t.getDaysInMonth(f.getUTCFullYear(),f.getUTCMonth()),f.setUTCDate(w),f.setUTCDate(w-(f.getUTCDay()-this.o.weekStart+7)%7),h=new Date(f),h.setUTCDate(h.getUTCDate()+42),h=h.valueOf(),o=[];f.valueOf()<h;){if(f.getUTCDay()==this.o.weekStart&&(o.push("<tr>"),this.o.calendarWeeks)){var g=new Date(+f+(this.o.weekStart-f.getUTCDay()-7)%7*864e5),nt=new Date(+g+(11-g.getUTCDay())%7*864e5),b=new Date(+(b=r(nt.getUTCFullYear(),0,1))+(11-b.getUTCDay())%7*864e5),ut=(nt-b)/6048e5+1;o.push('<td class="cw">'+ut+"<\/td>")}s=this.getClassNames(f);s.push("day");this.o.beforeShowDay!==n.noop&&(e=this.o.beforeShowDay(this._utc_to_local(f)),e===undefined?e={}:typeof e=="boolean"?e={enabled:e}:typeof e=="string"&&(e={classes:e}),e.enabled===!1&&s.push("disabled"),e.classes&&(s=s.concat(e.classes.split(/\s+/))),e.tooltip&&(p=e.tooltip));s=n.unique(s);o.push('<td class="'+s.join(" ")+'"'+(p?' title="'+p+'"':"")+">"+f.getUTCDate()+"<\/td>");f.getUTCDay()==this.o.weekEnd&&o.push("<\/tr>");f.setUTCDate(f.getUTCDate()+1)}for(this.picker.find(".datepicker-days tbody").empty().append(o.join("")),a=this.date&&this.date.getUTCFullYear(),c=this.picker.find(".datepicker-months").find("th:eq(1)").text(u).end().find("span").removeClass("active"),a&&a==u&&c.eq(this.date.getUTCMonth()).addClass("active"),(u<v||u>y)&&c.addClass("disabled"),u==v&&c.slice(0,it).addClass("disabled"),u==y&&c.slice(rt+1).addClass("disabled"),o="",u=parseInt(u/10,10)*10,tt=this.picker.find(".datepicker-years").find("th:eq(1)").text(u+"-"+(u+9)).end().find("td"),u-=1,l=-1;l<11;l++)o+='<span class="year'+(l==-1?" old":l==10?" new":"")+(a==u?" active":"")+(u<v||u>y?" disabled":"")+'">'+u+"<\/span>",u+=1;tt.html(o)},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&n<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});this.o.endDate!==Infinity&&n>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&n<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});this.o.endDate!==Infinity&&n>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(i){var u,c,o,l,h;if(i.preventDefault(),u=n(i.target).closest("span, td, th"),u.length==1)switch(u[0].nodeName.toLowerCase()){case"th":switch(u[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":c=t.modes[this.viewMode].navStep*(u[0].className=="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,c);this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,c);this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":o=new Date;o=r(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0);this.showMode(-2);l=this.o.todayBtn=="linked"?null:"view";this._setDate(o,l);break;case"clear":this.isInput?h=this.element:this.component&&(h=this.element.find("input"));h&&h.val("").change();this._trigger("changeDate");this.update();this.o.autoclose&&this.hide()}break;case"span":if(!u.is(".disabled")){if(this.viewDate.setUTCDate(1),u.is(".month")){var s=1,f=u.parent().find("span").index(u),e=this.viewDate.getUTCFullYear();this.viewDate.setUTCMonth(f);this._trigger("changeMonth",this.viewDate);this.o.minViewMode===1&&this._setDate(r(e,f,s,0,0,0,0))}else{var e=parseInt(u.text(),10)||0,s=1,f=0;this.viewDate.setUTCFullYear(e);this._trigger("changeYear",this.viewDate);this.o.minViewMode===2&&this._setDate(r(e,f,s,0,0,0,0))}this.showMode(-1);this.fill()}break;case"td":if(u.is(".day")&&!u.is(".disabled")){var s=parseInt(u.text(),10)||1,e=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth();u.is(".old")?f===0?(f=11,e-=1):f-=1:u.is(".new")&&(f==11?(f=0,e+=1):f+=1);this._setDate(r(e,f,s,0,0,0,0))}}},_setDate:function(n,t){t&&t!="date"||(this.date=new Date(n));t&&t!="view"||(this.viewDate=new Date(n));this.fill();this.setValue();this._trigger("changeDate");var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input"));i&&i.change();this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(n,t){var f;if(!t)return n;var i=new Date(n.valueOf()),e=i.getUTCDate(),o=i.getUTCMonth(),s=Math.abs(t),r,u;if(t=t>0?1:-1,s==1)u=t==-1?function(){return i.getUTCMonth()==o}:function(){return i.getUTCMonth()!=r},r=o+t,i.setUTCMonth(r),(r<0||r>11)&&(r=(r+12)%12);else{for(f=0;f<s;f++)i=this.moveMonth(i,t);r=i.getUTCMonth();i.setUTCDate(e);u=function(){return r!=i.getUTCMonth()}}while(u())i.setUTCDate(--e),i.setUTCMonth(r);return i},moveYear:function(n,t){return this.moveMonth(n,t*12)},dateWithinRange:function(n){return n>=this.o.startDate&&n<=this.o.endDate},keydown:function(n){var u,t,i,r,f;if(this.picker.is(":not(:visible)")){n.keyCode==27&&this.show();return}u=!1;switch(n.keyCode){case 27:this.hide();n.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;t=n.keyCode==37?-1:1;n.ctrlKey?(i=this.moveYear(this.date,t),r=this.moveYear(this.viewDate,t),this._trigger("changeYear",this.viewDate)):n.shiftKey?(i=this.moveMonth(this.date,t),r=this.moveMonth(this.viewDate,t),this._trigger("changeMonth",this.viewDate)):(i=new Date(this.date),i.setUTCDate(this.date.getUTCDate()+t),r=new Date(this.viewDate),r.setUTCDate(this.viewDate.getUTCDate()+t));this.dateWithinRange(i)&&(this.date=i,this.viewDate=r,this.setValue(),this.update(),n.preventDefault(),u=!0);break;case 38:case 40:if(!this.o.keyboardNavigation)break;t=n.keyCode==38?-1:1;n.ctrlKey?(i=this.moveYear(this.date,t),r=this.moveYear(this.viewDate,t),this._trigger("changeYear",this.viewDate)):n.shiftKey?(i=this.moveMonth(this.date,t),r=this.moveMonth(this.viewDate,t),this._trigger("changeMonth",this.viewDate)):(i=new Date(this.date),i.setUTCDate(this.date.getUTCDate()+t*7),r=new Date(this.viewDate),r.setUTCDate(this.viewDate.getUTCDate()+t*7));this.dateWithinRange(i)&&(this.date=i,this.viewDate=r,this.setValue(),this.update(),n.preventDefault(),u=!0);break;case 13:this.hide();n.preventDefault();break;case 9:this.hide()}u&&(this._trigger("changeDate"),this.isInput?f=this.element:this.component&&(f=this.element.find("input")),f&&f.change())},showMode:function(n){n&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+n)));this.picker.find(">div").hide().filter(".datepicker-"+t.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()}};o=function(t,i){this.element=n(t);this.inputs=n.map(i.inputs,function(n){return n.jquery?n[0]:n});delete i.inputs;n(this.inputs).datepicker(i).bind("changeDate",n.proxy(this.dateUpdated,this));this.pickers=n.map(this.inputs,function(t){return n(t).data("datepicker")});this.updateDates()};o.prototype={updateDates:function(){this.dates=n.map(this.pickers,function(n){return n.date});this.updateRanges()},updateRanges:function(){var t=n.map(this.dates,function(n){return n.valueOf()});n.each(this.pickers,function(n,i){i.setRange(t)})},dateUpdated:function(t){var u=n(t.target).data("datepicker"),r=u.getUTCDate(),i=n.inArray(t.target,this.inputs),f=this.inputs.length;if(i!=-1){if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<f&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates()}},remove:function(){n.map(this.pickers,function(n){n.remove()});delete this.element.data().datepicker}};s=n.fn.datepicker;n.fn.datepicker=function(t){var r=Array.apply(null,arguments),i;return r.shift(),this.each(function(){var s=n(this),e=s.data("datepicker"),a=typeof t=="object"&&t,y;if(!e){var v=c(this,"date"),p=n.extend({},f,v,a),w=l(p.language),h=n.extend({},f,w,v,a);s.is(".input-daterange")||h.inputs?(y={inputs:h.inputs||s.find("input").toArray()},s.data("datepicker",e=new o(this,n.extend(h,y)))):s.data("datepicker",e=new u(this,h))}if(typeof t=="string"&&typeof e[t]=="function"&&(i=e[t].apply(e,r),i!==undefined))return!1}),i!==undefined?i:this};f=n.fn.datepicker.defaults={autoclose:!1,beforeShowDay:n.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0};h=n.fn.datepicker.locale_opts=["format","rtl","weekStart"];n.fn.datepicker.Constructor=u;i=n.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}};t={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(n){return n%4==0&&n%100!=0||n%400==0},getDaysInMonth:function(n,i){return[31,t.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][i]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(n){var t=n.replace(this.validParts,'\0').split('\0'),i=n.match(this.validParts);if(!t||!t.length||!i||i.length===0)throw new Error("Invalid date format.");return{separators:t,parts:i}},parseDate:function(f,e,o){var g,h,a,v,l,nt,s,k,p;if(f instanceof Date)return f;if(typeof e=="string"&&(e=t.parseFormat(e)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(f)){for(g=/([\-+]\d+)([dmwy])/,h=f.match(/([\-+]\d+)([dmwy])/g),f=new Date,s=0;s<h.length;s++){a=g.exec(h[s]);v=parseInt(a[1]);switch(a[2]){case"d":f.setUTCDate(f.getUTCDate()+v);break;case"m":f=u.prototype.moveMonth.call(u.prototype,f,v);break;case"w":f.setUTCDate(f.getUTCDate()+v*7);break;case"y":f=u.prototype.moveYear.call(u.prototype,f,v)}}return r(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate(),0,0,0)}var h=f&&f.match(this.nonpunctuation)||[],f=new Date,w={},d=["yyyy","yy","M","MM","m","mm","d","dd"],c={yyyy:function(n,t){return n.setUTCFullYear(t)},yy:function(n,t){return n.setUTCFullYear(2e3+t)},m:function(n,t){if(isNaN(n))return n;for(t-=1;t<0;)t+=12;for(t%=12,n.setUTCMonth(t);n.getUTCMonth()!=t;)n.setUTCDate(n.getUTCDate()-1);return n},d:function(n,t){return n.setUTCDate(t)}},y,b,a;if(c.M=c.MM=c.mm=c.m,c.dd=c.d,f=r(f.getFullYear(),f.getMonth(),f.getDate(),0,0,0),l=e.parts.slice(),h.length!=l.length&&(l=n(l).filter(function(t,i){return n.inArray(i,d)!==-1}).toArray()),h.length==l.length){for(s=0,nt=l.length;s<nt;s++){if(y=parseInt(h[s],10),a=l[s],isNaN(y))switch(a){case"MM":b=n(i[o].months).filter(function(){var n=this.slice(0,h[s].length),t=h[s].slice(0,n.length);return n==t});y=n.inArray(b[0],i[o].months)+1;break;case"M":b=n(i[o].monthsShort).filter(function(){var n=this.slice(0,h[s].length),t=h[s].slice(0,n.length);return n==t});y=n.inArray(b[0],i[o].monthsShort)+1}w[a]=y}for(s=0;s<d.length;s++)p=d[s],p in w&&!isNaN(w[p])&&(k=new Date(f),c[p](k,w[p]),isNaN(k)||(f=k))}return f},formatDate:function(r,u,f){var e,r,s,o,h;for(typeof u=="string"&&(u=t.parseFormat(u)),e={d:r.getUTCDate(),D:i[f].daysShort[r.getUTCDay()],DD:i[f].days[r.getUTCDay()],m:r.getUTCMonth()+1,M:i[f].monthsShort[r.getUTCMonth()],MM:i[f].months[r.getUTCMonth()],yy:r.getUTCFullYear().toString().substring(2),yyyy:r.getUTCFullYear()},e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,r=[],s=n.extend([],u.separators),o=0,h=u.parts.length;o<=h;o++)s.length&&r.push(s.shift()),r.push(e[u.parts[o]]);return r.join("")},headTemplate:'<thead><tr><th class="prev">&laquo;<\/th><th colspan="5" class="datepicker-switch"><\/th><th class="next">&raquo;<\/th><\/tr><\/thead>',contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"><\/th><\/tr><tr><th colspan="7" class="clear"><\/th><\/tr><\/tfoot>'};t.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+t.headTemplate+"<tbody><\/tbody>"+t.footTemplate+'<\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+t.headTemplate+t.contTemplate+t.footTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+t.headTemplate+t.contTemplate+t.footTemplate+"<\/table><\/div><\/div>";n.fn.datepicker.DPGlobal=t;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=s,this};n(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var i=n(this);i.data("datepicker")||(t.preventDefault(),i.datepicker("show"))});n(function(){n('[data-provide="datepicker-inline"]').datepicker()})}(window.jQuery),function(n){"use strict";function h(t){n(t).on("click"+s,this.toggle)}function w(n,t){n.hasClass("pull-center")&&n.css("margin-right",n.outerWidth()/-2);n.hasClass("pull-middle")&&n.css("margin-top",n.outerHeight()/-2-t.outerHeight()/2)}function c(r,u){if(i){u||(u=[i]);var f;i[0]!==u[0][0]?f=i:(f=u[u.length-1],f.parent().hasClass(o)&&(f=f.parent()));f.find("."+t).removeClass(t);f.hasClass(t)&&f.removeClass(t);f===i&&(i=null,n(e).remove())}}function b(n){for(var i=[n],t;!t||t.hasClass(a);)t=(t||n).parent(),t.hasClass(o)&&(t=t.parent()),t.children(r)&&i.unshift(t);return i}function l(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}var r='[data-toggle="dropdown"]',y=".disabled, :disabled",e=".dropdown-backdrop",o="dropdown-menu",a="dropdown-submenu",u=".bs.dropdown.data-api",s=".bs.dropdown",t="open",p="ontouchstart"in document.documentElement,i,f=h.prototype,v;f.toggle=function(r){var h=n(this),f,v;if(!h.is(y)){var s=l(h),k=s.hasClass(t),d=s.hasClass(a),u=d?b(s):null;if(c(r,u),!k){if(u||(u=[s]),p&&!s.closest(".navbar-nav").length&&!u[0].find(e).length)n('<div class="'+e.substr(1)+'"/>').appendTo(u[0]).on("click",c);for(f=0,v=u.length;f<v;f++)u[f].hasClass(t)||(u[f].addClass(t),w(u[f].children("."+o),u[f]));i=u[0]}return!1}};f.keydown=function(t){var f,e,o,i;if(/(38|40|27)/.test(t.keyCode)&&(f=n(this),t.preventDefault(),t.stopPropagation(),!f.is(".disabled, :disabled"))){if(e=l(f),o=e.hasClass("open"),!o||o&&t.keyCode==27)return t.which==27&&e.find(r).trigger("focus"),f.trigger("click");var s=" li:not(.divider):visible a",u=e.find('li:not(.divider):visible > input:not(disabled) ~ label, [role="menu"]'+s+', [role="listbox"]'+s);u.length&&(i=u.index(u.filter(":focus")),t.keyCode==38&&i>0&&i--,t.keyCode==40&&i<u.length-1&&i++,~i||(i=0),u.eq(i).trigger("focus"))}};f.change=function(){var u,t,i="",f,e;(u=n(this).closest("."+o),t=u.parent().find("[data-label-placement]"),t&&t.length||(t=u.parent().find(r)),t&&t.length&&t.data("placeholder")!==!1)&&(t.data("placeholder")==undefined&&t.data("placeholder",n.trim(t.text())),i=n.data(t[0],"placeholder"),f=u.find("li > input:checked"),f.length&&(i=[],f.each(function(){var t=n(this).parent().find("label").eq(0),u=t.find(".data-label"),r;u.length?(r=n("<p><\/p>"),r.append(u.clone()),t=r.html()):t=t.html();t&&i.push(n.trim(t))}),i=i.length<4?i.join(", "):i.length+" selected"),e=t.find(".caret"),t.html(i||"&nbsp;"),e.length&&t.append(" ")&&e.appendTo(t))};v=n.fn.dropdown;n.fn.dropdown=function(t){return this.each(function(){var i=n(this),r=i.data("bs.dropdown");r||i.data("bs.dropdown",r=new h(this));typeof t=="string"&&r[t].call(i)})};n.fn.dropdown.Constructor=h;n.fn.dropdown.clearMenus=function(i){return n(e).remove(),n("."+t+" "+r).each(function(){var t=l(n(this)),r={relatedTarget:this};t.hasClass("open")&&((t.trigger(i=n.Event("hide"+s,r)),i.isDefaultPrevented())||t.removeClass("open").trigger("hidden"+s,r))}),this};n.fn.dropdown.noConflict=function(){return n.fn.dropdown=v,this};n(document).off(u).on("click"+u,c).on("click"+u,r,f.toggle).on("click"+u,'.dropdown-menu > li > input[type="checkbox"] ~ label, .dropdown-menu > li > input[type="checkbox"], .dropdown-menu.noclose > li',function(n){n.stopPropagation()}).on("change"+u,'.dropdown-menu > li > input[type="checkbox"], .dropdown-menu > li > input[type="radio"]',f.change).on("keydown"+u,r+', [role="menu"], [role="listbox"]',f.keydown)}(jQuery),function(){"use strict";function n(n){function s(s,h){var rt,ut,p=s==window,l=h&&h.message!==undefined?h.message:undefined,g,k,d,tt,nt,w,b,it,ft,et,at;if(h=n.extend({},n.blockUI.defaults,h||{}),!h.ignoreIfBlocked||!n(s).data("blockUI.isBlocked")){if(h.overlayCSS=n.extend({},n.blockUI.defaults.overlayCSS,h.overlayCSS||{}),rt=n.extend({},n.blockUI.defaults.css,h.css||{}),h.onOverlayClick&&(h.overlayCSS.cursor="pointer"),ut=n.extend({},n.blockUI.defaults.themedCSS,h.themedCSS||{}),l=l===undefined?h.message:l,p&&t&&e(window,{fadeOut:0}),l&&typeof l!="string"&&(l.parentNode||l.jquery)&&(g=l.jquery?l[0]:l,k={},n(s).data("blockUI.history",k),k.el=g,k.parent=g.parentNode,k.display=g.style.display,k.position=g.style.position,k.parent&&k.parent.removeChild(g)),n(s).data("blockUI.onUnblock",h.onUnblock),d=h.baseZ,tt=f||h.forceIframe?n('<iframe class="blockUI" style="z-index:'+d+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+h.iframeSrc+'"><\/iframe>'):n('<div class="blockUI" style="display:none"><\/div>'),nt=h.theme?n('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+d+++';display:none"><\/div>'):n('<div class="blockUI blockOverlay '+h.blockOverlayClass+'" style="z-index:'+d+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"><\/div>'),h.theme&&p?(b='<div class="blockUI '+h.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(d+10)+';display:none;position:fixed">',h.title&&(b+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"<\/div>"),b+='<div class="ui-widget-content ui-dialog-content"><\/div>',b+="<\/div>"):h.theme?(b='<div class="blockUI '+h.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(d+10)+';display:none;position:absolute">',h.title&&(b+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"<\/div>"),b+='<div class="ui-widget-content ui-dialog-content"><\/div>',b+="<\/div>"):b=p?'<div class="blockUI '+h.blockMsgClass+' blockPage" style="z-index:'+(d+10)+';display:none;position:fixed"><\/div>':'<div class="blockUI '+h.blockMsgClass+' blockElement" style="z-index:'+(d+10)+';display:none;position:absolute"><\/div>',w=n(b),l&&(h.theme?(w.css(ut),w.addClass("ui-widget-content")):w.css(rt)),h.theme||nt.css(h.overlayCSS),nt.css("position",p?"fixed":"absolute"),(f||h.forceIframe)&&tt.css("opacity",0),it=[tt,nt,w],ft=p?n("body"):n(s),n.each(it,function(){this.appendTo(ft)}),h.theme&&h.draggable&&n.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),et=v&&(!n.support.boxModel||n("object,embed",p?null:s).length>0),o||et){if(p&&h.allowBodyStretch&&n.support.boxModel&&n("html,body").css("height","100%"),(o||!n.support.boxModel)&&!p)var ot=r(s,"borderTopWidth"),st=r(s,"borderLeftWidth"),ht=ot?"(0 - "+ot+")":0,ct=st?"(0 - "+st+")":0;n.each(it,function(n,t){var i=t[0].style,r,u;i.position="absolute";n<2?(p?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+h.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),p?i.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),ct&&i.setExpression("left",ct),ht&&i.setExpression("top",ht)):h.centerY?(p&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0):!h.centerY&&p&&(r=h.css&&h.css.top?parseInt(h.css.top,10):0,u="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"',i.setExpression("top",u))})}if(l&&(h.theme?w.find(".ui-widget-content").append(l):w.append(l),(l.jquery||l.nodeType)&&n(l).show()),(f||h.forceIframe)&&h.showOverlay&&tt.show(),h.fadeIn){var lt=h.onBlock?h.onBlock:u,vt=h.showOverlay&&!l?lt:u,yt=l?lt:u;h.showOverlay&&nt._fadeIn(h.fadeIn,vt);l&&w._fadeIn(h.fadeIn,yt)}else h.showOverlay&&nt.show(),l&&w.show(),h.onBlock&&h.onBlock();c(1,s,h);p?(t=w[0],i=n(h.focusableElements,t),h.focusInput&&setTimeout(a,20)):y(w[0],h.centerX,h.centerY);h.timeout&&(at=setTimeout(function(){p?n.unblockUI(h):n(s).unblock(h)},h.timeout),n(s).data("blockUI.timeout",at))}}function e(r,u){var o,s=r==window,e=n(r),l=e.data("blockUI.history"),a=e.data("blockUI.timeout"),f;a&&(clearTimeout(a),e.removeData("blockUI.timeout"));u=n.extend({},n.blockUI.defaults,u||{});c(0,r,u);u.onUnblock===null&&(u.onUnblock=e.data("blockUI.onUnblock"),e.removeData("blockUI.onUnblock"));f=s?n("body").children().filter(".blockUI").add("body > .blockUI"):e.find(">.blockUI");u.cursorReset&&(f.length>1&&(f[1].style.cursor=u.cursorReset),f.length>2&&(f[2].style.cursor=u.cursorReset));s&&(t=i=null);u.fadeOut?(o=f.length,f.stop().fadeOut(u.fadeOut,function(){--o==0&&h(f,l,u,r)})):h(f,l,u,r)}function h(t,i,r,u){var f=n(u);if(!f.data("blockUI.isBlocked")){if(t.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.parent&&i.parent.appendChild(i.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),typeof r.onUnblock=="function")r.onUnblock(u,r);var e=n(document.body),o=e.width(),s=e[0].style.width;e.width(o-1).width(o);e[0].style.width=s}}function c(i,r,u){var f=r==window,o=n(r),e;(i||(!f||t)&&(f||o.data("blockUI.isBlocked")))&&(o.data("blockUI.isBlocked",i),f&&u.bindEvents&&(!i||u.showOverlay))&&(e="mousedown mouseup keydown keypress keyup touchstart touchend touchmove",i?n(document).bind(e,u,l):n(document).unbind(e,l))}function l(r){var u,f;if(r.type==="keydown"&&r.keyCode&&r.keyCode==9&&t&&r.data.constrainTabKey){var e=i,s=!r.shiftKey&&r.target===e[e.length-1],o=r.shiftKey&&r.target===e[0];if(s||o)return setTimeout(function(){a(o)},10),!1}if(u=r.data,f=n(r.target),f.hasClass("blockOverlay")&&u.onOverlayClick)u.onOverlayClick(r);return f.parents("div."+u.blockMsgClass).length>0?!0:f.parents().children().filter("div.blockUI").length===0}function a(n){if(i){var t=i[n===!0?i.length-1:0];t&&t.focus()}}function y(n,t,i){var u=n.parentNode,f=n.style,e=(u.offsetWidth-n.offsetWidth)/2-r(u,"borderLeftWidth"),o=(u.offsetHeight-n.offsetHeight)/2-r(u,"borderTopWidth");t&&(f.left=e>0?e+"px":"0");i&&(f.top=o>0?o+"px":"0")}function r(t,i){return parseInt(n.css(t,i),10)||0}var t,i;n.fn._fadeIn=n.fn.fadeIn;var u=n.noop||function(){},f=/MSIE/.test(navigator.userAgent),o=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),p=document.documentMode||0,v=n.isFunction(document.createElement("div").style.setExpression);n.blockUI=function(n){s(window,n)};n.unblockUI=function(n){e(window,n)};n.growlUI=function(t,i,r,u){var f=n('<div class="growlUI"><\/div>'),e,o;t&&f.append("<h1>"+t+"<\/h1>");i&&f.append("<h2>"+i+"<\/h2>");r===undefined&&(r=3e3);e=function(t){t=t||{};n.blockUI({message:f,fadeIn:typeof t.fadeIn!="undefined"?t.fadeIn:700,fadeOut:typeof t.fadeOut!="undefined"?t.fadeOut:1e3,timeout:typeof t.timeout!="undefined"?t.timeout:r,centerY:!1,showOverlay:!1,onUnblock:u,css:n.blockUI.defaults.growlCSS})};e();o=f.css("opacity");f.mouseover(function(){e({fadeIn:0,timeout:3e4});var t=n(".blockMsg");t.stop();t.fadeTo(300,1)}).mouseout(function(){n(".blockMsg").fadeOut(1e3)})};n.fn.block=function(t){if(this[0]===window)return n.blockUI(t),this;var i=n.extend({},n.blockUI.defaults,t||{});return this.each(function(){var t=n(this);i.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){n.css(this,"position")=="static"&&(this.style.position="relative",n(this).data("blockUI.static",!0));this.style.zoom=1;s(this,t)})};n.fn.unblock=function(t){return this[0]===window?(n.unblockUI(t),this):this.each(function(){e(this,t)})};n.blockUI.version=2.66;n.blockUI.defaults={message:"<h1>Please wait...<\/h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",blockOverlayClass:null,ignoreIfBlocked:!1};t=null;i=[]}typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],n):n(jQuery)}(),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)}(function(n){function a(t){var i={},r=/^jQuery\d+$/;return n.each(t.attributes,function(n,t){t.specified&&!r.test(t.name)&&(i[t.name]=t.value)}),i}function f(i,r){var f=this,u=n(f);if(f.value==u.attr("placeholder")&&u.hasClass(t.customClass))if(u.data("placeholder-password")){if(u=u.hide().nextAll('input[type="password"]:first').show().attr("id",u.removeAttr("id").data("placeholder-id")),i===!0)return u[0].value=r;u.focus()}else f.value="",u.removeClass(t.customClass),f==l()&&f.select()}function o(){var r,u=this,i=n(u),e=this.id;if(u.value===""){if(u.type==="password"){if(!i.data("placeholder-textinput")){try{r=i.clone().attr({type:"text"})}catch(o){r=n("<input>").attr(n.extend(a(this),{type:"text"}))}r.removeAttr("name").data({"placeholder-password":i,"placeholder-id":e}).bind("focus.placeholder",f);i.data({"placeholder-textinput":r,"placeholder-id":e}).before(r)}i=i.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",e).show()}i.addClass(t.customClass);i[0].value=i.attr("placeholder")}else i.removeClass(t.customClass)}function l(){try{return document.activeElement}catch(n){}}var s=Object.prototype.toString.call(window.operamini)=="[object OperaMini]",u="placeholder"in document.createElement("input")&&!s,e="placeholder"in document.createElement("textarea")&&!s,h=n.valHooks,c=n.propHooks,r,i,t;u&&e?(i=n.fn.placeholder=function(){return this},i.input=i.textarea=!0):(t={},i=n.fn.placeholder=function(i){var r;return t=n.extend({},{customClass:"placeholder"},i),r=this,r.filter((u?"textarea":":input")+"[placeholder]").not("."+t.customClass).bind({"focus.placeholder":f,"blur.placeholder":o}).data("placeholder-enabled",!0).trigger("blur.placeholder"),r},i.input=u,i.textarea=e,r={get:function(i){var r=n(i),u=r.data("placeholder-password");return u?u[0].value:r.data("placeholder-enabled")&&r.hasClass(t.customClass)?"":i.value},set:function(i,r){var u=n(i),e=u.data("placeholder-password");return e?e[0].value=r:u.data("placeholder-enabled")?(r===""?(i.value=r,i!=l()&&o.call(i)):u.hasClass(t.customClass)?f.call(i,!0,r)||(i.value=r):i.value=r,u):i.value=r}},u||(h.input=r,c.value=r),e||(h.textarea=r,c.value=r),n(function(){n(document).delegate("form","submit.placeholder",function(){var i=n("."+t.customClass,this).each(f);setTimeout(function(){i.each(o)},10)})}),n(window).bind("beforeunload.placeholder",function(){n("."+t.customClass).each(function(){this.value=""})}))}),function(n){n.fn.responsiveVideo=function(){n("head").append('<style type="text/css">.responsive-video-wrapper{width:100%;position:relative;padding:0}.responsive-video-wrapper iframe,.responsive-video-wrapper object,.responsive-video-wrapper embed{position:absolute;top:0;left:0;width:100%;height:100%}<\/style>');var t=n(this),i=t.find('iframe[src*="player.vimeo.com"], iframe[src*="youtube.com"], iframe[src*="dailymotion.com"],iframe[src*="kickstarter.com"][src*="video.html"], object, embed');i.each(function(){var t=n(this);aspect_ratio=t.attr("height")/t.attr("width");t.removeAttr("height").removeAttr("width");t.parents("object").length||t.wrap('<div class="responsive-video-wrapper" style="padding-top: '+aspect_ratio*100+'%" />')})}}(jQuery),function(n,t){if(typeof define=="function"&&define.amd)define(["angular"],function(n){return t(n)});else return t(n)}(angular||null,function(n){var t=n.module("ngTable",[]),i;return t.factory("ngTableParams",["$q","$log",function(t,i){var r=function(n){return!isNaN(parseFloat(n))&&isFinite(n)};return function(u,f){var h=this,s=function(){e.debugMode&&i.debug&&i.debug.apply(this,arguments)},o,e;return this.data=[],this.parameters=function(t,i){var u,e,l,f,h,v,a,c;if(i=i||!1,n.isDefined(t)){for(u in t)if(e=t[u],i&&u.indexOf("[")>=0){for(l=u.split(/\[(.*)\]/).reverse(),f="",h=0,v=l.length;h<v;h++)a=l[h],a!==""&&(c=e,e={},e[f=a]=r(c)?parseFloat(c):c);f==="sorting"&&(o[f]={});o[f]=n.extend(o[f]||{},e[f])}else o[u]=r(t[u])?parseFloat(t[u]):t[u];return s("ngTable: set parameters",o),this}return o},this.settings=function(t){return n.isDefined(t)?(n.isArray(t.data)&&(t.total=t.data.length),e=n.extend(e,t),s("ngTable: set settings",e),this):e},this.page=function(t){return n.isDefined(t)?this.parameters({page:t}):o.page},this.total=function(t){return n.isDefined(t)?this.settings({total:t}):e.total},this.count=function(t){return n.isDefined(t)?this.parameters({count:t,page:1}):o.count},this.filter=function(t){return n.isDefined(t)?this.parameters({filter:t}):o.filter},this.sorting=function(t){if(arguments.length==2){var i={};return i[t]=arguments[1],this.parameters({sorting:i}),this}return n.isDefined(t)?this.parameters({sorting:t}):o.sorting},this.isSortBy=function(t,i){return n.isDefined(o.sorting[t])&&o.sorting[t]==i},this.orderBy=function(){var t=[],n;for(n in o.sorting)t.push((o.sorting[n]==="asc"?"+":"-")+n);return t},this.getData=function(t,i){n.isArray(this.data)&&n.isObject(i)?t.resolve(this.data.slice((i.page()-1)*i.count(),i.page()*i.count())):t.resolve([])},this.getGroups=function(i,r){var u=t.defer();u.promise.then(function(t){var u={},f,e;n.forEach(t,function(t){var i=n.isFunction(r)?r(t):t[r];u[i]=u[i]||{data:[]};u[i].value=i;u[i].data.push(t)});f=[];for(e in u)f.push(u[e]);s("ngTable: refresh groups",f);i.resolve(f)});this.getData(u,h)},this.generatePagesArray=function(n,t,i){var h,o,s,e,u,f,r;if(h=11,f=[],u=Math.ceil(t/i),u>1){for(f.push({type:"prev",number:Math.max(1,n-1),active:n>1}),f.push({type:"first",number:1,active:n>1}),s=Math.round((h-5)/2),e=Math.max(2,n-s),o=Math.min(u-1,n+s*2-(n-e)),e=Math.max(2,e-(s*2-(o-e))),r=e;r<=o;)r===e&&r!==2||r===o&&r!==u-1?f.push({type:"more",active:!1}):f.push({type:"page",number:r,active:n!==r}),r++;f.push({type:"last",number:u,active:n!==u});f.push({type:"next",number:Math.min(u,n+1),active:n<u})}return f},this.url=function(t){var r,i,f,u,e;t=t||!1;r=t?[]:{};for(key in o)if(o.hasOwnProperty(key))if(i=o[key],f=encodeURIComponent(key),typeof i=="object")for(u in i)n.isUndefined(i[u])||i[u]===""||(e=f+"["+encodeURIComponent(u)+"]",t?r.push(e+"="+i[u]):r[e]=i[u]);else n.isFunction(i)||n.isUndefined(i)||i===""||(t?r.push(f+"="+encodeURIComponent(i)):r[f]=encodeURIComponent(i));return r},this.reload=function(){var i=t.defer(),n=this;e.$loading=!0;e.groupBy?e.getGroups(i,e.groupBy,this):e.getData(i,this);s("ngTable: reload data");i.promise.then(function(t){e.$loading=!1;s("ngTable: current scope",e.$scope);n.data=e.groupBy?e.$scope.$groups=t:e.$scope.$data=t;e.$scope.pages=n.generatePagesArray(n.page(),n.total(),n.count())})},this.reloadPages=function(){var n=this;e.$scope.pages=n.generatePagesArray(n.page(),n.total(),n.count())},o=this.$params={page:1,count:1,filter:{},sorting:{},group:{},groupBy:null},e={$scope:null,$loading:!1,data:null,total:0,counts:[10,25,50,100],getGroups:this.getGroups,getData:this.getData},this.settings(f),this.parameters(u,!0),this}}]),i=["$scope","ngTableParams","$q",function(n,t){n.$loading=!1;n.params||(n.params=new t);n.params.settings().$scope=n;n.$watch("params.$params",function(){n.params.settings().$scope=n;n.params.reload()},!0);n.sortBy=function(t,i){var r=n.parse(t.sortable),f,u;r&&(f=n.params.sorting()&&n.params.sorting()[r]&&n.params.sorting()[r]==="desc",u=i.ctrlKey?n.params.sorting():{},u[r]=f?"asc":"desc",n.params.parameters({sorting:u}))}}],t.directive("ngTable",["$compile","$q","$parse",function(t,r,u){"use strict";return{restrict:"A",priority:1001,scope:!0,controller:i,compile:function(i){var r=[],o=0,f=null,e=i.find("thead");if(n.forEach(n.element(i.find("tr")),function(t){t=n.element(t);t.hasClass("ng-table-group")||f||(f=t)}),f)return n.forEach(f.find("td"),function(t){var i=n.element(t);if(!i.attr("ignore-cell")||"true"!==i.attr("ignore-cell")){var e=function(n,t){return function(f){return u(i.attr("x-data-"+n)||i.attr("data-"+n)||i.attr(n))(f,{$columns:r})||t}},s=e("title"," "),l=e("header",!1),f=e("filter",!1)(),h=!1,c=!1;f&&f.name&&(c=f.name,delete f.name);f&&f.templateURL&&(h=f.templateURL,delete f.templateURL);i.attr("data-title-text",s());r.push({id:o++,title:s,sortable:e("sortable",!1),"class":i.attr("x-data-header-class")||i.attr("data-header-class")||i.attr("header-class"),filter:f,filterTemplateURL:h,filterName:c,headerTemplateURL:l,filterData:i.attr("filter-data")?i.attr("filter-data"):null,show:i.attr("ng-show")?function(n){return u(i.attr("ng-show"))(n)}:function(){return!0}})}}),function(i,f,o){var s,h,c;return i.$loading=!1,i.$columns=r,i.$watch(o.ngTable,function(t){n.isUndefined(t)||(i.paramsModel=u(o.ngTable),i.params=t)},!0),i.parse=function(t){return n.isDefined(t)?t(i):""},o.showFilter&&i.$parent.$watch(o.showFilter,function(n){i.show_filter=n}),n.forEach(r,function(t){var r;if(t.filterData){if(r=u(t.filterData)(i,{$column:t}),!(n.isObject(r)&&n.isObject(r.promise)))throw new Error("Function "+t.filterData+" must be instance of $q.defer()");return delete t.filterData,r.promise.then(function(i){n.isArray(i)||(i=[]);i.unshift({title:"-",id:""});t.data=i})}}),f.hasClass("ng-table")?void 0:(i.templates={header:o.templateHeader?o.templateHeader:"ng-table/header.html",pagination:o.templatePagination?o.templatePagination:"ng-table/pager.html"},s=e.length>0?e:n.element(document.createElement("thead")).attr("ng-include","templates.header"),h=n.element(document.createElement("div")).attr("ng-include","templates.pagination"),f.find("thead").remove(),c=f.find("tbody"),f.prepend(s),t(s)(i),t(h)(i),f.addClass("ng-table"),f.after(h))}}}}]),n.module("ngTable").run(["$templateCache",function(n){n.put("ng-table/filters/select-multiple.html",'<select ng-options="data.id as data.title for data in column.data" multiple ng-multiple="true" ng-model="params.filter()[name]" ng-show="filter==\'select-multiple\'" class="filter filter-select-multiple form-control" name="{{column.filterName}}"> <\/select>');n.put("ng-table/filters/select.html",'<select ng-options="data.id as data.title for data in column.data" ng-model="params.filter()[name]" ng-show="filter==\'select\'" class="filter filter-select form-control" name="{{column.filterName}}"> <\/select>');n.put("ng-table/filters/text.html",'<input type="text" name="{{column.filterName}}" ng-model="params.filter()[name]" ng-if="filter==\'text\'" class="input-filter form-control"/>');n.put("ng-table/header.html",'<tr> <th ng-repeat="column in $columns" ng-class="{ \'sortable\': parse(column.sortable), \'sort-asc\': params.sorting()[parse(column.sortable)]==\'asc\', \'sort-desc\': params.sorting()[parse(column.sortable)]==\'desc\' }" ng-click="sortBy(column, $event)" ng-show="column.show(this)" ng-init="template=column.headerTemplateURL(this)" class="header {{column.class}}"> <div ng-if="!template" ng-show="!template" ng-bind="parse(column.title)"><\/div> <div ng-if="template" ng-show="template"><div ng-include="template"><\/div><\/div> <\/th> <\/tr> <tr ng-show="show_filter" class="ng-table-filters"> <th ng-repeat="column in $columns" ng-show="column.show(this)" class="filter"> <div ng-repeat="(name, filter) in column.filter"> <div ng-if="column.filterTemplateURL" ng-show="column.filterTemplateURL"> <div ng-include="column.filterTemplateURL"><\/div> <\/div> <div ng-if="!column.filterTemplateURL" ng-show="!column.filterTemplateURL"> <div ng-include="\'ng-table/filters/\' + filter + \'.html\'"><\/div> <\/div> <\/div> <\/th> <\/tr>');n.put("ng-table/pager.html",'<div class="ng-cloak ng-table-pager"> <div ng-if="params.settings().counts.length" class="ng-table-counts btn-group pull-right"> <button ng-repeat="count in params.settings().counts" type="button" ng-class="{\'active\':params.count()==count}" ng-click="params.count(count)" class="btn btn-default"> <span ng-bind="count"><\/span> <\/button> <\/div> <ul class="pagination ng-table-pagination"> <li ng-class="{\'disabled\': !page.active}" ng-repeat="page in pages" ng-switch="page.type"> <a ng-switch-when="prev" ng-click="params.page(page.number)" href="">&laquo;<\/a> <a ng-switch-when="first" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"><\/span><\/a> <a ng-switch-when="page" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"><\/span><\/a> <a ng-switch-when="more" ng-click="params.page(page.number)" href="">&#8230;<\/a> <a ng-switch-when="last" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"><\/span><\/a> <a ng-switch-when="next" ng-click="params.page(page.number)" href="">&raquo;<\/a> <\/li> <\/ul> <\/div> ')}]),t}),function(n){typeof define=="function"&&define.amd?define("pnotify",["jquery"],n):n(jQuery)}(function(n){var f={dir1:"down",dir2:"left",push:"bottom",spacing1:25,spacing2:25,context:n("body")},t,i,r=n(window),u=function(){i=n("body");PNotify.prototype.options.stack.context=i;r=n(window);r.bind("resize",function(){t&&clearTimeout(t);t=setTimeout(function(){PNotify.positionAll(!0)},10)})};return PNotify=function(n){this.parseOptions(n);this.init()},n.extend(PNotify.prototype,{version:"2.0.1",options:{title:!1,title_escape:!1,text:!1,text_escape:!1,styling:"bootstrap3",addclass:"",cornerclass:"",auto_display:!0,width:"300px",min_height:"16px",type:"notice",icon:!0,opacity:1,animation:"fade",animate_speed:"slow",position_animate_speed:500,shadow:!0,hide:!0,delay:8e3,mouse_reset:!0,remove:!0,insert_brs:!0,destroy:!0,stack:f},modules:{},runModules:function(n,t){var r,i;for(i in this.modules)r=typeof t=="object"&&i in t?t[i]:t,typeof this.modules[i][n]=="function"&&this.modules[i][n](this,typeof this.options[i]=="object"?this.options[i]:{},r)},state:"initializing",timer:null,styles:null,elem:null,container:null,title_container:null,text_container:null,animating:!1,timerHide:!1,init:function(){var t=this;return this.modules={},n.extend(!0,this.modules,PNotify.prototype.modules),this.styles=typeof this.options.styling=="object"?this.options.styling:PNotify.styling[this.options.styling],this.elem=n("<div />",{"class":"ui-pnotify "+this.options.addclass,css:{display:"none"},mouseenter:function(){if(t.options.mouse_reset&&t.animating==="out"){if(!t.timerHide)return;t.cancelRemove()}t.options.hide&&t.options.mouse_reset&&t.cancelRemove()},mouseleave:function(){t.options.hide&&t.options.mouse_reset&&t.animating!=="out"&&t.queueRemove();PNotify.positionAll()}}),this.container=n("<div />",{"class":this.styles.container+" ui-pnotify-container "+(this.options.type==="error"?this.styles.error:this.options.type==="info"?this.styles.info:this.options.type==="success"?this.styles.success:this.styles.notice)}).appendTo(this.elem),this.options.cornerclass!==""&&this.container.removeClass("ui-corner-all").addClass(this.options.cornerclass),this.options.shadow&&this.container.addClass("ui-pnotify-shadow"),this.options.icon!==!1&&n("<div />",{"class":"ui-pnotify-icon"}).append(n("<span />",{"class":this.options.icon===!0?this.options.type==="error"?this.styles.error_icon:this.options.type==="info"?this.styles.info_icon:this.options.type==="success"?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container),this.title_container=n("<h4 />",{"class":"ui-pnotify-title"}).appendTo(this.container),this.options.title===!1?this.title_container.hide():this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),this.text_container=n("<div />",{"class":"ui-pnotify-text"}).appendTo(this.container),this.options.text===!1?this.text_container.hide():this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),typeof this.options.width=="string"&&this.elem.css("width",this.options.width),typeof this.options.min_height=="string"&&this.container.css("min-height",this.options.min_height),PNotify.notices=this.options.stack.push==="top"?n.merge([this],PNotify.notices):n.merge(PNotify.notices,[this]),this.options.stack.push==="top"&&this.queuePosition(!1,1),this.options.stack.animation=!1,this.runModules("init"),this.options.auto_display&&this.open(),this},update:function(t){var i=this.options;return this.parseOptions(i,t),this.options.cornerclass!==i.cornerclass&&this.container.removeClass("ui-corner-all "+i.cornerclass).addClass(this.options.cornerclass),this.options.shadow!==i.shadow&&(this.options.shadow?this.container.addClass("ui-pnotify-shadow"):this.container.removeClass("ui-pnotify-shadow")),this.options.addclass===!1?this.elem.removeClass(i.addclass):this.options.addclass!==i.addclass&&this.elem.removeClass(i.addclass).addClass(this.options.addclass),this.options.title===!1?this.title_container.slideUp("fast"):this.options.title!==i.title&&(this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),i.title===!1&&this.title_container.slideDown(200)),this.options.text===!1?this.text_container.slideUp("fast"):this.options.text!==i.text&&(this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),i.text===!1&&this.text_container.slideDown(200)),this.options.type!==i.type&&this.container.removeClass(this.styles.error+" "+this.styles.notice+" "+this.styles.success+" "+this.styles.info).addClass(this.options.type==="error"?this.styles.error:this.options.type==="info"?this.styles.info:this.options.type==="success"?this.styles.success:this.styles.notice),(this.options.icon!==i.icon||this.options.icon===!0&&this.options.type!==i.type)&&(this.container.find("div.ui-pnotify-icon").remove(),this.options.icon!==!1&&n("<div />",{"class":"ui-pnotify-icon"}).append(n("<span />",{"class":this.options.icon===!0?this.options.type==="error"?this.styles.error_icon:this.options.type==="info"?this.styles.info_icon:this.options.type==="success"?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container)),this.options.width!==i.width&&this.elem.animate({width:this.options.width}),this.options.min_height!==i.min_height&&this.container.animate({minHeight:this.options.min_height}),this.options.opacity!==i.opacity&&this.elem.fadeTo(this.options.animate_speed,this.options.opacity),this.options.hide?i.hide||this.queueRemove():this.cancelRemove(),this.queuePosition(!0),this.runModules("update",i),this},open:function(){this.state="opening";this.runModules("beforeOpen");var n=this;return this.elem.parent().length||this.elem.appendTo(this.options.stack.context?this.options.stack.context:i),this.options.stack.push!=="top"&&this.position(!0),this.options.animation==="fade"||this.options.animation.effect_in==="fade"?this.elem.show().fadeTo(0,0).hide():this.options.opacity!==1&&this.elem.show().fadeTo(0,this.options.opacity).hide(),this.animateIn(function(){n.queuePosition(!0);n.options.hide&&n.queueRemove();n.state="open";n.runModules("afterOpen")}),this},remove:function(t){this.state="closing";this.timerHide=!!t;this.runModules("beforeClose");var i=this;return this.timer&&(window.clearTimeout(this.timer),this.timer=null),this.animateOut(function(){if(i.state="closed",i.runModules("afterClose"),i.queuePosition(!0),i.options.remove&&i.elem.detach(),i.runModules("beforeDestroy"),i.options.destroy&&PNotify.notices!==null){var t=n.inArray(i,PNotify.notices);t!==-1&&PNotify.notices.splice(t,1)}i.runModules("afterDestroy")}),this},get:function(){return this.elem},parseOptions:function(t,i){var e,r,f,u;for(this.options=n.extend(!0,{},PNotify.prototype.options),this.options.stack=PNotify.prototype.options.stack,e=[t,i],f=0;f<e.length;f++){if(r=e[f],typeof r=="undefined")break;if(typeof r!="object")this.options.text=r;else for(u in r)this.modules[u]?n.extend(!0,this.options[u],r[u]):this.options[u]=r[u]}},animateIn:function(n){this.animating="in";var t;t=typeof this.options.animation.effect_in!="undefined"?this.options.animation.effect_in:this.options.animation;t==="none"?(this.elem.show(),n()):t==="show"?this.elem.show(this.options.animate_speed,n):t==="fade"?this.elem.show().fadeTo(this.options.animate_speed,this.options.opacity,n):t==="slide"?this.elem.slideDown(this.options.animate_speed,n):typeof t=="function"?t("in",n,this.elem):this.elem.show(t,typeof this.options.animation.options_in=="object"?this.options.animation.options_in:{},this.options.animate_speed,n);this.elem.parent().hasClass("ui-effects-wrapper")&&this.elem.parent().css({position:"fixed",overflow:"visible"});t!=="slide"&&this.elem.css("overflow","visible");this.container.css("overflow","hidden")},animateOut:function(n){this.animating="out";var t;t=typeof this.options.animation.effect_out!="undefined"?this.options.animation.effect_out:this.options.animation;t==="none"?(this.elem.hide(),n()):t==="show"?this.elem.hide(this.options.animate_speed,n):t==="fade"?this.elem.fadeOut(this.options.animate_speed,n):t==="slide"?this.elem.slideUp(this.options.animate_speed,n):typeof t=="function"?t("out",n,this.elem):this.elem.hide(t,typeof this.options.animation.options_out=="object"?this.options.animation.options_out:{},this.options.animate_speed,n);this.elem.parent().hasClass("ui-effects-wrapper")&&this.elem.parent().css({position:"fixed",overflow:"visible"});t!=="slide"&&this.elem.css("overflow","visible");this.container.css("overflow","hidden")},position:function(n){var t=this.options.stack,u=this.elem,c,s,h,f,e,o;if(u.parent().hasClass("ui-effects-wrapper")&&(u=this.elem.css({left:"0",top:"0",right:"0",bottom:"0"}).parent()),typeof t.context=="undefined"&&(t.context=i),t){if(typeof t.nextpos1!="number"&&(t.nextpos1=t.firstpos1),typeof t.nextpos2!="number"&&(t.nextpos2=t.firstpos2),typeof t.addpos2!="number"&&(t.addpos2=0),c=u.css("display")==="none",!c||n){f={};switch(t.dir1){case"down":e="top";break;case"up":e="bottom";break;case"left":e="right";break;case"right":e="left"}s=parseInt(u.css(e).replace(/(?:\..*|[^0-9.])/g,""));isNaN(s)&&(s=0);typeof t.firstpos1!="undefined"||c||(t.firstpos1=s,t.nextpos1=t.firstpos1);switch(t.dir2){case"down":o="top";break;case"up":o="bottom";break;case"left":o="right";break;case"right":o="left"}if(h=parseInt(u.css(o).replace(/(?:\..*|[^0-9.])/g,"")),isNaN(h)&&(h=0),typeof t.firstpos2!="undefined"||c||(t.firstpos2=h,t.nextpos2=t.firstpos2),(t.dir1==="down"&&t.nextpos1+u.height()>(t.context.is(i)?r.height():t.context.prop("scrollHeight"))||t.dir1==="up"&&t.nextpos1+u.height()>(t.context.is(i)?r.height():t.context.prop("scrollHeight"))||t.dir1==="left"&&t.nextpos1+u.width()>(t.context.is(i)?r.width():t.context.prop("scrollWidth"))||t.dir1==="right"&&t.nextpos1+u.width()>(t.context.is(i)?r.width():t.context.prop("scrollWidth")))&&(t.nextpos1=t.firstpos1,t.nextpos2+=t.addpos2+(typeof t.spacing2=="undefined"?25:t.spacing2),t.addpos2=0),t.animation&&t.nextpos2<h)switch(t.dir2){case"down":f.top=t.nextpos2+"px";break;case"up":f.bottom=t.nextpos2+"px";break;case"left":f.right=t.nextpos2+"px";break;case"right":f.left=t.nextpos2+"px"}else typeof t.nextpos2=="number"&&u.css(o,t.nextpos2+"px");switch(t.dir2){case"down":case"up":u.outerHeight(!0)>t.addpos2&&(t.addpos2=u.height());break;case"left":case"right":u.outerWidth(!0)>t.addpos2&&(t.addpos2=u.width())}if(typeof t.nextpos1=="number")if(t.animation&&(s>t.nextpos1||f.top||f.bottom||f.right||f.left))switch(t.dir1){case"down":f.top=t.nextpos1+"px";break;case"up":f.bottom=t.nextpos1+"px";break;case"left":f.right=t.nextpos1+"px";break;case"right":f.left=t.nextpos1+"px"}else u.css(e,t.nextpos1+"px");(f.top||f.bottom||f.right||f.left)&&u.animate(f,{duration:this.options.position_animate_speed,queue:!1});switch(t.dir1){case"down":case"up":t.nextpos1+=u.height()+(typeof t.spacing1=="undefined"?25:t.spacing1);break;case"left":case"right":t.nextpos1+=u.width()+(typeof t.spacing1=="undefined"?25:t.spacing1)}}return this}},queuePosition:function(n,i){return t&&clearTimeout(t),i||(i=10),t=setTimeout(function(){PNotify.positionAll(n)},i),this},cancelRemove:function(){return this.timer&&window.clearTimeout(this.timer),this.state==="closing"&&(this.elem.stop(!0),this.state="open",this.animating="in",this.elem.css("height","auto").animate({width:this.options.width,opacity:this.options.opacity},"fast")),this},queueRemove:function(){var n=this;return this.cancelRemove(),this.timer=window.setTimeout(function(){n.remove(!0)},isNaN(this.options.delay)?0:this.options.delay),this}}),n.extend(PNotify,{notices:[],removeAll:function(){n.each(PNotify.notices,function(){this.remove&&this.remove(!1)})},positionAll:function(i){if(t&&clearTimeout(t),t=null,PNotify.notices&&PNotify.notices.length)n.each(PNotify.notices,function(){var n=this.options.stack;n&&(n.nextpos1=n.firstpos1,n.nextpos2=n.firstpos2,n.addpos2=0,n.animation=i)}),n.each(PNotify.notices,function(){this.position()});else{var r=PNotify.prototype.options.stack;r&&(delete r.nextpos1,delete r.nextpos2)}},styling:{jqueryui:{container:"ui-widget ui-widget-content ui-corner-all",notice:"ui-state-highlight",notice_icon:"ui-icon ui-icon-info",info:"",info_icon:"ui-icon ui-icon-info",success:"ui-state-default",success_icon:"ui-icon ui-icon-circle-check",error:"ui-state-error",error_icon:"ui-icon ui-icon-alert"},bootstrap2:{container:"alert",notice:"",notice_icon:"icon-exclamation-sign",info:"alert-info",info_icon:"icon-info-sign",success:"alert-success",success_icon:"icon-ok-sign",error:"alert-error",error_icon:"icon-warning-sign"},bootstrap3:{container:"alert",notice:"alert-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"alert-info",info_icon:"glyphicon glyphicon-info-sign",success:"alert-success",success_icon:"glyphicon glyphicon-ok-sign",error:"alert-danger",error_icon:"glyphicon glyphicon-warning-sign"}}}),PNotify.styling.fontawesome=n.extend({},PNotify.styling.bootstrap3),n.extend(PNotify.styling.fontawesome,{notice_icon:"fa fa-exclamation-circle",info_icon:"fa fa-info",success_icon:"fa fa-check",error_icon:"fa fa-warning"}),document.body?u():n(u),PNotify}),function(n){typeof define=="function"&&define.amd?define("pnotify.buttons",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){t.prototype.options.buttons={closer:!0,closer_hover:!0,sticker:!0,sticker_hover:!0,labels:{close:"Close",stick:"Stick"}};t.prototype.modules.buttons={myOptions:null,closer:null,sticker:null,init:function(t,i){var r=this;this.myOptions=i;t.elem.on({mouseenter:function(){!r.myOptions.sticker||t.options.nonblock&&t.options.nonblock.nonblock||r.sticker.trigger("pnotify_icon").css("visibility","visible");!r.myOptions.closer||t.options.nonblock&&t.options.nonblock.nonblock||r.closer.css("visibility","visible")},mouseleave:function(){r.myOptions.sticker_hover&&r.sticker.css("visibility","hidden");r.myOptions.closer_hover&&r.closer.css("visibility","hidden")}});this.sticker=n("<div />",{"class":"ui-pnotify-sticker",css:{cursor:"pointer",visibility:i.sticker_hover?"hidden":"visible"},click:function(){t.options.hide=!t.options.hide;t.options.hide?t.queueRemove():t.cancelRemove();n(this).trigger("pnotify_icon")}}).bind("pnotify_icon",function(){n(this).children().removeClass(t.styles.pin_up+" "+t.styles.pin_down).addClass(t.options.hide?t.styles.pin_up:t.styles.pin_down)}).append(n("<span />",{"class":t.styles.pin_up,title:i.labels.stick})).prependTo(t.container);(!i.sticker||t.options.nonblock&&t.options.nonblock.nonblock)&&this.sticker.css("display","none");this.closer=n("<div />",{"class":"ui-pnotify-closer",css:{cursor:"pointer",visibility:i.closer_hover?"hidden":"visible"},click:function(){t.remove(!1);r.sticker.css("visibility","hidden");r.closer.css("visibility","hidden")}}).append(n("<span />",{"class":t.styles.closer,title:i.labels.close})).prependTo(t.container);(!i.closer||t.options.nonblock&&t.options.nonblock.nonblock)&&this.closer.css("display","none")},update:function(n,t){this.myOptions=t;!t.closer||n.options.nonblock&&n.options.nonblock.nonblock?this.closer.css("display","none"):t.closer&&this.closer.css("display","block");!t.sticker||n.options.nonblock&&n.options.nonblock.nonblock?this.sticker.css("display","none"):t.sticker&&this.sticker.css("display","block");this.sticker.trigger("pnotify_icon");t.sticker_hover?this.sticker.css("visibility","hidden"):n.options.nonblock&&n.options.nonblock.nonblock||this.sticker.css("visibility","visible");t.closer_hover?this.closer.css("visibility","hidden"):n.options.nonblock&&n.options.nonblock.nonblock||this.closer.css("visibility","visible")}};n.extend(t.styling.jqueryui,{closer:"ui-icon ui-icon-close",pin_up:"ui-icon ui-icon-pin-w",pin_down:"ui-icon ui-icon-pin-s"});n.extend(t.styling.bootstrap2,{closer:"icon-remove",pin_up:"icon-pause",pin_down:"icon-play"});n.extend(t.styling.bootstrap3,{closer:"glyphicon glyphicon-remove",pin_up:"glyphicon glyphicon-pause",pin_down:"glyphicon glyphicon-play"});n.extend(t.styling.fontawesome,{closer:"fa fa-times",pin_up:"fa fa-pause",pin_down:"fa fa-play"})}),function(n){typeof define=="function"&&define.amd?define("pnotify.callbacks",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){var i=t.prototype.init,r=t.prototype.open,u=t.prototype.remove;t.prototype.init=function(){this.options.before_init&&this.options.before_init(this.options);i.apply(this,arguments);this.options.after_init&&this.options.after_init(this)};t.prototype.open=function(){var n;this.options.before_open&&(n=this.options.before_open(this));n!==!1&&(r.apply(this,arguments),this.options.after_open&&this.options.after_open(this))};t.prototype.remove=function(n){var t;this.options.before_close&&(t=this.options.before_close(this,n));t!==!1&&(u.apply(this,arguments),this.options.after_close&&this.options.after_close(this,n))}}),function(n){typeof define=="function"&&define.amd?define("pnotify.confirm",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){t.prototype.options.confirm={confirm:!1,prompt:!1,prompt_class:"",prompt_default:"",prompt_multi_line:!1,align:"right",buttons:[{text:"Ok",addClass:"",promptTrigger:!0,click:function(n,t){n.remove();n.get().trigger("pnotify.confirm",[n,t])}},{text:"Cancel",addClass:"",click:function(n){n.remove();n.get().trigger("pnotify.cancel",n)}}]};t.prototype.modules.confirm={container:null,prompt:null,init:function(t,i){this.container=n('<div style="margin-top:5px;clear:both;" />').css("text-align",i.align).appendTo(t.container);i.confirm||i.prompt?this.makeDialog(t,i):this.container.hide()},update:function(n,t){t.confirm?(this.makeDialog(n,t),this.container.show()):this.container.hide().empty()},afterOpen:function(n,t){t.prompt&&this.prompt.focus()},makeDialog:function(t,i){var f=!1,o=this,u,r,e;this.container.empty();i.prompt&&(this.prompt=n("<"+(i.prompt_multi_line?'textarea rows="5"':'input type="text"')+' style="margin-bottom:5px;clear:both;" />').addClass(t.styles.input+" "+i.prompt_class).val(i.prompt_default).appendTo(this.container));for(e in i.buttons){if(u=i.buttons[e],f?this.container.append(" "):f=!0,r=n('<button type="button" />').addClass(t.styles.btn+" "+u.addClass).text(u.text).appendTo(this.container).on("click",function(n){return function(){typeof n.click=="function"&&n.click(t,i.prompt?o.prompt.val():null)}}(u)),i.prompt&&!i.prompt_multi_line&&u.promptTrigger&&this.prompt.keypress(function(n){return function(t){t.keyCode==13&&n.click()}}(r)),t.styles.text&&r.wrapInner('<span class="'+t.styles.text+'"><\/span>'),t.styles.btnhover&&r.hover(function(n){return function(){n.addClass(t.styles.btnhover)}}(r),function(n){return function(){n.removeClass(t.styles.btnhover)}}(r)),t.styles.btnactive)r.on("mousedown",function(n){return function(){n.addClass(t.styles.btnactive)}}(r)).on("mouseup",function(n){return function(){n.removeClass(t.styles.btnactive)}}(r));if(t.styles.btnfocus)r.on("focus",function(n){return function(){n.addClass(t.styles.btnfocus)}}(r)).on("blur",function(n){return function(){n.removeClass(t.styles.btnfocus)}}(r))}}};n.extend(t.styling.jqueryui,{btn:"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only",btnhover:"ui-state-hover",btnactive:"ui-state-active",btnfocus:"ui-state-focus",input:"",text:"ui-button-text"});n.extend(t.styling.bootstrap2,{btn:"btn",input:""});n.extend(t.styling.bootstrap3,{btn:"btn btn-default",input:"form-control"});n.extend(t.styling.fontawesome,{btn:"btn btn-default",input:"form-control"})}),function(n){typeof define=="function"&&define.amd?define("pnotify.desktop",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){var i,r=function(n,t){return r="Notification"in window?function(n,t){return new Notification(n,t)}:"mozNotification"in navigator?function(n,t){return navigator.mozNotification.createNotification(n,t.body,t.icon).show()}:"webkitNotifications"in window?function(n,t){return window.webkitNotifications.createNotification(t.icon,n,t.body)}:function(){return null},r(n,t)};t.prototype.options.desktop={desktop:!1,icon:null,tag:null};t.prototype.modules.desktop={tag:null,icon:null,genNotice:function(n,t){this.icon=t.icon===null?"http://sciactive.com/pnotify/includes/desktop/"+n.options.type+".png":t.icon===!1?null:t.icon;(this.tag===null||t.tag!==null)&&(this.tag=t.tag===null?"PNotify-"+Math.round(Math.random()*1e6):t.tag);n.desktop=r(n.options.title,{icon:this.icon,body:n.options.text,tag:this.tag});"close"in n.desktop||(n.desktop.close=function(){n.desktop.cancel()});n.desktop.onclick=function(){n.elem.trigger("click")};n.desktop.onclose=function(){n.state!=="closing"&&n.state!=="closed"&&n.remove()}},init:function(n,r){r.desktop&&(i=t.desktop.checkPermission(),i==0)&&this.genNotice(n,r)},update:function(n,t){i==0&&t.desktop&&this.genNotice(n,t)},beforeOpen:function(n,t){i==0&&t.desktop&&n.elem.css({left:"-10000px",display:"none"})},afterOpen:function(n,t){i==0&&t.desktop&&(n.elem.css({left:"-10000px",display:"none"}),"show"in n.desktop&&n.desktop.show())},beforeClose:function(n,t){i==0&&t.desktop&&n.elem.css({left:"-10000px",display:"none"})},afterClose:function(n,t){i==0&&t.desktop&&(n.elem.css({left:"-10000px",display:"none"}),n.desktop.close())}};t.desktop={permission:function(){typeof Notification!="undefined"&&"requestPermission"in Notification?Notification.requestPermission():"webkitNotifications"in window&&window.webkitNotifications.requestPermission()},checkPermission:function(){return typeof Notification!="undefined"&&"permission"in Notification?Notification.permission=="granted"?0:1:"webkitNotifications"in window?window.webkitNotifications.checkPermission():1}};i=t.desktop.checkPermission()}),function(n){typeof define=="function"&&define.amd?define("pnotify.history",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){var i,r;n(function(){n("body").on("pnotify.history-all",function(){n.each(t.notices,function(){this.modules.history.inHistory&&(this.elem.is(":visible")?this.options.hide&&this.queueRemove():this.open&&this.open())})}).on("pnotify.history-last",function(){var r=t.prototype.options.stack.push==="top",n=r?0:-1,i;do{if(i=n===-1?t.notices.slice(n):t.notices.slice(n,n+1),!i[0])return!1;n=r?n+1:n-1}while(!i[0].modules.history.inHistory||i[0].elem.is(":visible"));i[0].open&&i[0].open()})});t.prototype.options.history={history:!0,menu:!1,fixed:!0,maxonscreen:Infinity,labels:{redisplay:"Redisplay",all:"All",last:"Last"}};t.prototype.modules.history={inHistory:!1,init:function(t,u){if(t.options.destroy=!1,this.inHistory=u.history,u.menu&&typeof i=="undefined"){i=n("<div />",{"class":"ui-pnotify-history-container "+t.styles.hi_menu,mouseleave:function(){i.animate({top:"-"+r+"px"},{duration:100,queue:!1})}}).append(n("<div />",{"class":"ui-pnotify-history-header",text:u.labels.redisplay})).append(n("<button />",{"class":"ui-pnotify-history-all "+t.styles.hi_btn,text:u.labels.all,mouseenter:function(){n(this).addClass(t.styles.hi_btnhov)},mouseleave:function(){n(this).removeClass(t.styles.hi_btnhov)},click:function(){return n(this).trigger("pnotify.history-all"),!1}})).append(n("<button />",{"class":"ui-pnotify-history-last "+t.styles.hi_btn,text:u.labels.last,mouseenter:function(){n(this).addClass(t.styles.hi_btnhov)},mouseleave:function(){n(this).removeClass(t.styles.hi_btnhov)},click:function(){return n(this).trigger("pnotify.history-last"),!1}})).appendTo("body");var f=n("<span />",{"class":"ui-pnotify-history-pulldown "+t.styles.hi_hnd,mouseenter:function(){i.animate({top:"0"},{duration:100,queue:!1})}}).appendTo(i);r=f.offset().top+2;i.css({top:"-"+r+"px"});u.fixed&&i.addClass("ui-pnotify-history-fixed")}},update:function(n,t){this.inHistory=t.history;t.fixed&&i?i.addClass("ui-pnotify-history-fixed"):i&&i.removeClass("ui-pnotify-history-fixed")},beforeOpen:function(i,r){if(t.notices&&t.notices.length>r.maxonscreen){var u;u=i.options.stack.push!=="top"?t.notices.slice(0,t.notices.length-r.maxonscreen):t.notices.slice(r.maxonscreen,t.notices.length);n.each(u,function(){this.remove&&this.remove()})}}};n.extend(t.styling.jqueryui,{hi_menu:"ui-state-default ui-corner-bottom",hi_btn:"ui-state-default ui-corner-all",hi_btnhov:"ui-state-hover",hi_hnd:"ui-icon ui-icon-grip-dotted-horizontal"});n.extend(t.styling.bootstrap2,{hi_menu:"well",hi_btn:"btn",hi_btnhov:"",hi_hnd:"icon-chevron-down"});n.extend(t.styling.bootstrap3,{hi_menu:"well",hi_btn:"btn btn-default",hi_btnhov:"",hi_hnd:"glyphicon glyphicon-chevron-down"});n.extend(t.styling.fontawesome,{hi_menu:"well",hi_btn:"btn btn-default",hi_btnhov:"",hi_hnd:"fa fa-chevron-down"})}),function(n){typeof define=="function"&&define.amd?define("pnotify.mobile",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(){}),function(n){typeof define=="function"&&define.amd?define("pnotify.nonblock",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){var f=/^on/,e=/^(dbl)?click$|^mouse(move|down|up|over|out|enter|leave)$|^contextmenu$/,o=/^(focus|blur|select|change|reset)$|^key(press|down|up)$/,s=/^(scroll|resize|(un)?load|abort|error)$/,r=function(t,i){var r;if(t=t.toLowerCase(),document.createEvent&&this.dispatchEvent){if(t=t.replace(f,""),t.match(e)?(n(this).offset(),r=document.createEvent("MouseEvents"),r.initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget)):t.match(o)?(r=document.createEvent("UIEvents"),r.initUIEvent(t,i.bubbles,i.cancelable,i.view,i.detail)):t.match(s)&&(r=document.createEvent("HTMLEvents"),r.initEvent(t,i.bubbles,i.cancelable)),!r)return;this.dispatchEvent(r)}else t.match(f)||(t="on"+t),r=document.createEventObject(i),this.fireEvent(t,r)},i,u=function(t,u,f){var e,o,s;t.elem.css("display","none");e=document.elementFromPoint(u.clientX,u.clientY);t.elem.css("display","block");o=n(e);s=o.css("cursor");t.elem.css("cursor",s!=="auto"?s:"default");i&&i.get(0)==e||(i&&(r.call(i.get(0),"mouseleave",u.originalEvent),r.call(i.get(0),"mouseout",u.originalEvent)),r.call(e,"mouseenter",u.originalEvent),r.call(e,"mouseover",u.originalEvent));r.call(e,f,u.originalEvent);i=o};t.prototype.options.nonblock={nonblock:!1,nonblock_opacity:.2};t.prototype.modules.nonblock={myOptions:null,init:function(n,t){var r=this;this.myOptions=t;n.elem.on({mouseenter:function(t){r.myOptions.nonblock&&t.stopPropagation();r.myOptions.nonblock&&n.elem.stop().animate({opacity:r.myOptions.nonblock_opacity},"fast")},mouseleave:function(t){r.myOptions.nonblock&&t.stopPropagation();i=null;n.elem.css("cursor","auto");r.myOptions.nonblock&&n.animating!=="out"&&n.elem.stop().animate({opacity:n.options.opacity},"fast")},mouseover:function(n){r.myOptions.nonblock&&n.stopPropagation()},mouseout:function(n){r.myOptions.nonblock&&n.stopPropagation()},mousemove:function(t){r.myOptions.nonblock&&(t.stopPropagation(),u(n,t,"onmousemove"))},mousedown:function(t){r.myOptions.nonblock&&(t.stopPropagation(),t.preventDefault(),u(n,t,"onmousedown"))},mouseup:function(t){r.myOptions.nonblock&&(t.stopPropagation(),t.preventDefault(),u(n,t,"onmouseup"))},click:function(t){r.myOptions.nonblock&&(t.stopPropagation(),u(n,t,"onclick"))},dblclick:function(t){r.myOptions.nonblock&&(t.stopPropagation(),u(n,t,"ondblclick"))}})},update:function(n,t){this.myOptions=t}}}),function(n){typeof define=="function"&&define.amd?define("pnotify.reference",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){t.prototype.options.reference={putThing:!1,labels:{text:"Spin Around"}};t.prototype.modules.reference={thingElem:null,init:function(t,i){var r=this;if(i.putThing){this.thingElem=n('<button style="float:right;" class="btn btn-default" type="button" disabled><i class="'+t.styles.athing+'" />&nbsp;'+i.labels.text+"<\/button>").appendTo(t.container);t.container.append('<div style="clear: right; line-height: 0;" />');t.elem.on({mouseenter:function(){r.thingElem.prop("disabled",!1)},mouseleave:function(){r.thingElem.prop("disabled",!0)}});this.thingElem.on("click",function(){var n=0,i=setInterval(function(){n+=10;n==360&&(n=0,clearInterval(i));t.elem.css({"-moz-transform":"rotate("+n+"deg)","-webkit-transform":"rotate("+n+"deg)","-o-transform":"rotate("+n+"deg)","-ms-transform":"rotate("+n+"deg)",filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation="+n/90+")"})},20)})}},update:function(n,t){t.putThing&&this.thingElem?this.thingElem.show():!t.putThing&&this.thingElem&&this.thingElem.hide();this.thingElem&&this.thingElem.find("i").attr("class",n.styles.athing)},beforeOpen:function(){},afterOpen:function(){},beforeClose:function(){},afterClose:function(){},beforeDestroy:function(){},afterDestroy:function(){}};n.extend(t.styling.jqueryui,{athing:"ui-icon ui-icon-refresh"});n.extend(t.styling.bootstrap2,{athing:"icon-refresh"});n.extend(t.styling.bootstrap3,{athing:"glyphicon glyphicon-refresh"});n.extend(t.styling.fontawesome,{athing:"fa fa-refresh"})});$(function(){$("input, textarea").placeholder()});$(window).resize(function(){responsiveAffix()});$.blockUI.defaults.overlayCSS={backgroundColor:"#fff",opacity:.6,cursor:"wait"};$.blockUI.defaults.ignoreIfBlocked=!1;$.blockUI.defaults.fadeIn=0;$.blockUI.defaults.fadeOut=0;$.blockUI.defaults.css={padding:"20px 0",margin:0,width:"18%",top:"40%",left:"41%",textAlign:"center",border:"none",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px",opacity:.6,color:"#fff",cursor:"wait"};var Portal={Header:function(){$(".main-menu li").each(function(n){$(this).addClass("item"+n)});$(".top-menu li").each(function(n){$(this).addClass("item"+n)});$(window).resize(function(){adjustHeader($(window).width())}).resize()},Widgets:function(){$(".widget > .panel-heading").on("click",function(){$(this).parents(".panel:first").toggleClass("toggle");$(this).parents('.panel:first:not(".assinatura")').find(".collapse:first").slideToggle(200)}).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$(".panel-group .panel-collapse").on("show.bs.collapse",function(){$(this).parent(".panel").addClass("toggle")});$(".panel-group .panel-collapse").on("hide.bs.collapse",function(){$(this).parent(".panel").removeClass("toggle")})},Notifications:function(){stack_bottomright={dir1:"up",dir2:"left",firstpos1:25,firstpos2:25};stack_bar_top={dir1:"down",dir2:"left",push:"down",spacing1:10,spacing2:10};PNotify.prototype.options.styling="bootstrap3";PNotify.prototype.options.history=!1;notify_stack_bottomright=function(n,t,i){var r={title:n,text:i,type:t};new PNotify(r)};notify_stack_top=function(n,t,i){var r={addclass:"stack-bar-top",cornerclass:"",width:"50%",stack:stack_bar_top,mouse_reset:!1,text:i,type:t};new PNotify(r)}},ChangeBootstrapBehavior:function(){$(document).on("click",".dropdown.keep-open .dropdown-menu",function(n){$(n.target).hasClass("close-dropdown")||n.stopPropagation()});$(document).on("click","span.month, th.today, td.day, th.next, th.prev, th.switch, span.year, .bootstrap-tagsinput",function(n){n.stopPropagation()})},ChangeBootstrapBehaviorOnDialog:function(){$(".dropdown.on-dialog.keep-open .dropdown-menu input, .dropdown.on-dialog.keep-open .dropdown-menu label, .dropdown.on-dialog.keep-open .dropdown-menu select").click(function(n){n.stopPropagation()})}};(function(n){n.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}})(jQuery)