jQuery.webshims.register("form-extend",function(a,e,i,m,t,j){i=i.Modernizr;t=i.inputtypes;if(i.formvalidation&&!e.bugs.bustedValidity){var f=e.inputTypes,r={};e.addInputType=function(d,c){f[d]=c};e.addValidityRule=function(d,c){r[d]=c};e.addValidityRule("typeMismatch",function(d,c,b,a){if(""===c)return!1;a=a.typeMismatch;if(!("type"in b))b.type=(d[0].getAttribute("type")||"").toLowerCase();f[b.type]&&f[b.type].mismatch&&(a=f[b.type].mismatch(c,d));return a});var l=j.overrideMessages,n=!t.number|| !t.time||!t.range||l,u="customError,typeMismatch,rangeUnderflow,rangeOverflow,stepMismatch,tooLong,patternMismatch,valueMissing,valid".split(","),j=l?["value","checked"]:["value"],h=[],q=function(d,c){if(d){var b=(d.getAttribute&&d.getAttribute("type")||d.type||"").toLowerCase();if(l||f[b])l&&!c&&"radio"==b&&d.name?a(m.getElementsByName(d.name)).each(function(){a.prop(this,"validity")}):a.prop(d,"validity")}},o={};["input","textarea","select"].forEach(function(d){var c=e.defineNodeNameProperty(d, "setCustomValidity",{prop:{value:function(b){var b=b+"",g="input"==d?a(this).getNativeElement()[0]:this;c.prop._supvalue.call(g,b);e.bugs.validationMessage&&e.data(g,"customvalidationMessage",b);n&&(e.data(g,"hasCustomError",!!b),q(g))}}});o[d]=c.prop._supvalue});if(n||l)j.push("min"),j.push("max"),j.push("step"),h.push("input");l&&(j.push("required"),j.push("pattern"),h.push("select"),h.push("textarea"));if(n){var s;h.forEach(function(d){var c=e.defineNodeNameProperty(d,"validity",{prop:{get:function(){if(!s){var b= "input"==d?a(this).getNativeElement()[0]:this,g=c.prop._supget.call(b);if(!g)return g;var k={};u.forEach(function(d){k[d]=g[d]});if(!a.prop(b,"willValidate"))return k;s=!0;var p=a(b),v={type:(b.getAttribute&&b.getAttribute("type")||"").toLowerCase(),nodeName:(b.nodeName||"").toLowerCase()},w=p.val(),j=!!e.data(b,"hasCustomError"),h;s=!1;k.customError=j;if(k.valid&&k.customError)k.valid=!1;else if(!k.valid){var i=!0;a.each(k,function(d,b){if(b)return i=!1});if(i)k.valid=!0}a.each(r,function(c,a){k[c]= a(p,w,v,k);if(k[c]&&(k.valid||!h)&&(l||f[v.type]&&f[v.type].mismatch))o[d].call(b,e.createValidationMessage(b,c)),k.valid=!1,h=!0});k.valid?(o[d].call(b,""),e.data(b,"hasCustomError",!1)):l&&!h&&!j&&a.each(k,function(c,a){if("valid"!==c&&a)return o[d].call(b,e.createValidationMessage(b,c)),!1});return k}},writeable:!1}})});j.forEach(function(d){e.onNodeNamesPropertyModify(h,d,function(){q(this)})});if(m.addEventListener){var g,c=function(d){if("form"in d.target){var b=d.target.form;clearTimeout(g); q(d.target);b&&l&&a("input",b).each(function(){"password"==this.type&&q(this)})}};m.addEventListener("change",c,!0);l&&(m.addEventListener("blur",c,!0),m.addEventListener("keydown",function(d){13==d.keyCode&&c(d)},!0));m.addEventListener("input",function(d){clearTimeout(g);g=setTimeout(function(){q(d.target)},290)},!0)}var b=h.join(",");e.addReady(function(d,c){a(b,d).add(c.filter(b)).each(function(){a.prop(this,"validity")})});l&&e.ready("DOM form-message",function(){e.activeLang({register:"form-core", callback:function(){a("input, select, textarea").getNativeElement().each(function(){if(!e.data(this,"hasCustomError")){var d=this,b=a.prop(d,"validity")||{valid:!0},c;b.valid||(c=(d.nodeName||"").toLowerCase(),a.each(b,function(b,a){if("valid"!==b&&a)return o[c].call(d,e.createValidationMessage(d,b)),!1}))}})}})})}e.defineNodeNameProperty("input","type",{prop:{get:function(){var b=(this.getAttribute("type")||"").toLowerCase();return e.inputTypes[b]?b:this.type}}})}}); jQuery.webshims.register("form-number-date-api",function(a,e){var i,m,t;if(!e.getStep)e.getStep=function(g,c){var b=a.attr(g,"step");if("any"===b)return b;c=c||n(g);if(!f[c]||!f[c].step)return b;b=i.asNumber(b);return(!isNaN(b)&&0').prop("type")===g},n=function(a){return(a.getAttribute("type")||"").toLowerCase()},u=e.addMinMaxNumberToCache,h=function(a,c){for(var a=""+a,c=c-a.length,b=0;b=d||1.0E-7>=Math.abs(d-b.step))}return d});[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(a){e.addValidityRule(a.name, function(c,b,d,e){e=(e||{})[a.name]||!1;if(""===b)return e;if(!("type"in d))d.type=n(c[0]);if(f[d.type]&&f[d.type].asNumber){if(!("valueAsNumber"in d))d.valueAsNumber=f[d.type].asNumber(b);if(isNaN(d.valueAsNumber))return!1;u(a.attr,c,d);if(isNaN(d[a.attr+"AsNumber"]))return e;e=d[a.attr+"AsNumber"]*a.factore.browserVersion&&(b=!1);return function(a,e){var f,j,k;j="width";b&&(j=c[a.css(b)]||j);f=a[j]();j="width"==j;if(f){var p=parseInt(e.css("marginLeft"),10)||0,h=e.outerWidth();(k=parseInt(a.css("marginRight"),10)||0)&& a.css("marginRight",0);p<=-1*h?(e.css("marginRight",Math.floor(Math.abs(h+p-0.1)+k)),a.css("paddingRight",(parseInt(a.css("paddingRight"),10)||0)+Math.abs(p)),j&&a.css("width",Math.floor(f+p))):(e.css("marginRight",k),a.css("width",Math.floor(f-p-h-0.2)))}}}(),l={},n=a([]),u,h=function(c,b){a("input",c).add(b.filter("input")).each(function(){var b=a.prop(this,"type");if(h[b]&&!e.data(this,"shadowData"))h[b](a(this))})},q=function(c,b){if(j.lazyDate){var d=a.data(c[0],"setDateLazyTimer");d&&clearTimeout(d); a.data(c[0],"setDateLazyTimer",setTimeout(function(){c.datepicker("setDate",b);a.removeData(c[0],"setDateLazyTimer");c=null},0))}else c.datepicker("setDate",b)},o={tabindex:1,tabIndex:1,title:1,"aria-required":1,"aria-invalid":1};if(!j.copyAttrs)j.copyAttrs={};e.extendUNDEFProp(j.copyAttrs,o);var s=function(a){return j.calculateWidth?{css:{marginRight:a.css("marginRight"),marginLeft:a.css("marginLeft")},outerWidth:a.outerWidth()}:{}};h.common=function(c,b,d){Modernizr.formvalidation&&c.bind("firstinvalid", function(a){(e.fromSubmit||!u)&&c.unbind("invalid.replacedwidgetbubble").bind("invalid.replacedwidgetbubble",function(b){!a.isInvalidUIPrevented()&&!b.isDefaultPrevented()&&(e.validityAlert.showFor(a.target),a.preventDefault(),b.preventDefault());c.unbind("invalid.replacedwidgetbubble")})});var f,h,g=a("input, span.ui-slider-handle",b),k=c[0].attributes;for(f in j.copyAttrs)if((h=k[f])&&h.specified)o[f]&&g[0]?g.attr(f,h.nodeValue):b[0].setAttribute(f,h.nodeValue);f=(f=c.attr("id"))?a('label[for="'+ f+'"]',c[0].form):n;b.addClass(c[0].className);e.addShadowDom(c,b,{data:d||{},shadowFocusElement:a("input.input-datetime-local-date, span.ui-slider-handle",b)[0],shadowChilds:g});c.after(b);c[0].form&&a(c[0].form).bind("reset",function(a){a.originalEvent&&!a.isDefaultPrevented()&&setTimeout(function(){c.prop("value",c.prop("value"))},0)});f[0]&&(b.getShadowFocusElement().attr("aria-labelledby",e.getID(f)),f.bind("click",function(){c.getShadowFocusElement().focus();return!1}))};Modernizr.formvalidation&& ["input","form"].forEach(function(a){var b=e.defineNodeNameProperty(a,"checkValidity",{prop:{value:function(){u=!0;var a=b.prop._supvalue.apply(this,arguments);u=!1;return a}}})});if(!i.date||j.replaceUI){var g=function(c,b,d,f){var h,g,k=function(){p.dpDiv.unbind("mousedown.webshimsmousedownhandler");g=h=!1},p=b.bind("focusin",function(){k();p.dpDiv.unbind("mousedown.webshimsmousedownhandler").bind("mousedown.webshimsmousedownhandler",function(){h=!0})}).bind("focusout blur",function(a){h&&(g=!0, a.stopImmediatePropagation())}).datepicker(a.extend({onClose:function(){g&&b.not(":focus")?(k(),b.trigger("focusout"),b.triggerHandler("blur")):k()}},l,j.datepicker,c.data("datepicker"))).bind("change",d).data("datepicker");p.dpDiv.addClass("input-date-datepicker-control");f&&e.triggerDomUpdate(f[0]);"disabled,min,max,value,step,data-placeholder".split(",").forEach(function(a){var b=c.attr(a);b&&c.attr(a,b)});return p};h.date=function(c){if(a.fn.datepicker){var b=a(''), d;this.common(c,b,h.date.attrs);d=g(c,b,function(d){h.date.blockAttr=!0;var e;if(j.lazyDate){var g=a.data(b[0],"setDateLazyTimer");g&&(clearTimeout(g),a.removeData(b[0],"setDateLazyTimer"))}try{e=(e=a.datepicker.parseDate(b.datepicker("option","dateFormat"),b.prop("value")))?a.datepicker.formatDate("yy-mm-dd",e):b.prop("value")}catch(k){e=b.prop("value")}c.prop("value",e);h.date.blockAttr=!1;d.stopImmediatePropagation();f(c[0],"input");f(c[0],"change")});a(c).bind("updateshadowdom",function(){if(d.trigger[0]&& (c.css({display:""}),c[0].offsetWidth||c[0].offsetHeight)){var a=s(c);a.css&&(b.css(a.css),a.outerWidth&&b.outerWidth(a.outerWidth),r(b,d.trigger))}c.css({display:"none"})}).triggerHandler("updateshadowdom");d.trigger[0]&&setTimeout(function(){e.ready("WINDOWLOAD",function(){a(c).triggerHandler("updateshadowdom")})},9)}};h.date.attrs={disabled:function(c,b,d){a.prop(b,"disabled",!!d)},min:function(c,b,d){try{d=a.datepicker.parseDate("yy-mm-dd",d)}catch(e){d=!1}d&&a(b).datepicker("option","minDate", d)},max:function(c,b,d){try{d=a.datepicker.parseDate("yy-mm-dd",d)}catch(e){d=!1}d&&a(b).datepicker("option","maxDate",d)},"data-placeholder":function(c,b,d){c=(d||"").split("-");3==c.length&&(d=a(b).datepicker("option","dateFormat").replace("yy",c[0]).replace("mm",c[1]).replace("dd",c[2]));a.prop(b,"placeholder",d)},value:function(c,b,d){if(!h.date.blockAttr){try{var e=a.datepicker.parseDate("yy-mm-dd",d)}catch(f){e=!1}e?q(a(b),e):a.prop(b,"value",d)}}}}if(!i.range||j.replaceUI)h.range=function(c){if(a.fn.slider){var b= a('');this.common(c,b,h.range.attrs);c.bind("updateshadowdom",function(){c.css({display:""});if(c[0].offsetWidth||c[0].offsetHeight){var a=s(c);a.css&&(b.css(a.css),a.outerWidth&&b.outerWidth(a.outerWidth))}c.css({display:"none"})}).triggerHandler("updateshadowdom");b.slider(a.extend(!0,{},j.slider,c.data("slider"))).bind("slide",function(a,b){if(a.originalEvent)h.range.blockAttr=!0,c.prop("value",b.value), h.range.blockAttr=!1,f(c[0],"input"),f(c[0],"change")});["disabled","min","max","step","value"].forEach(function(b){var e=c.prop(b),f;"value"==b&&!e&&(f=c.getShadowElement())&&(e=(a(f).slider("option","max")-a(f).slider("option","min"))/2);null!=e&&c.prop(b,e)})}},h.range.attrs={disabled:function(c,b,d){d=!!d;a(b).slider("option","disabled",d);a("span",b).attr({"aria-disabled":d+"",tabindex:d?"-1":"0"})},min:function(c,b,d){d=d?1*d||0:0;a(b).slider("option","min",d);a("span",b).attr({"aria-valuemin":d})}, max:function(c,b,d){d=d||0===d?1*d||100:100;a(b).slider("option","max",d);a("span",b).attr({"aria-valuemax":d})},value:function(c,b,d){d=a(c).prop("valueAsNumber");isNaN(d)||(h.range.blockAttr||a(b).slider("option","value",d),a("span",b).attr({"aria-valuenow":d,"aria-valuetext":d}))},step:function(c,b,d){d=d&&a.trim(d)?1*d||1:1;a(b).slider("option","step",d)}};if(!e.bugs.valueAsNumberSet&&(j.replaceUI||!Modernizr.inputtypes.date||!Modernizr.inputtypes.range))i=function(){e.data(this,"hasShadow")&& a.prop(this,"value",a.prop(this,"value"))},e.onNodeNamesPropertyModify("input","valueAsNumber",i),e.onNodeNamesPropertyModify("input","valueAsDate",i);a.each("disabled,min,max,value,step,data-placeholder".split(","),function(a,b){e.onNodeNamesPropertyModify("input",b,function(a){var c=e.data(this,"shadowData");if(c&&c.data&&c.data[b]&&c.nativeElement===this)c.data[b](this,c.shadowElement,a)})});if(!j.availabeLangs)j.availabeLangs="af ar ar-DZ az bg bs ca cs da de el en-AU en-GB en-NZ eo es et eu fa fi fo fr fr-CH gl he hr hu hy id is it ja ko kz lt lv ml ms nl no pl pt-BR rm ro ru sk sl sq sr sr-SR sv ta th tr uk vi zh-CN zh-HK zh-TW".split(" "); i=function(){a.datepicker&&(e.activeLang({langObj:a.datepicker.regional,module:"form-number-date-ui",callback:function(c){c=a.extend({},l,c,j.datepicker);c.dateFormat&&j.datepicker.dateFormat!=c.dateFormat&&a("input.hasDatepicker").filter(".input-date, .input-datetime-local-date").datepicker("option","dateFormat",c.dateFormat).getNativeElement().filter("[data-placeholder]").attr("data-placeholder",function(a,c){return c});a.datepicker.setDefaults(c)}}),a(m).unbind("jquery-uiReady.langchange input-widgetsReady.langchange"))}; a(m).bind("jquery-uiReady.langchange input-widgetsReady.langchange",i);i();(function(){var c=function(){var b={};return function(c){return c in b?b[c]:b[c]=a('')[0].type===c}}();if(!c("number")){var b=e.cfg["forms-ext"],d=e.inputTypes,h=function(b,c,f){f=f||{};if(!("type"in f))f.type=a.prop(b,"type");if(!("step"in f))f.step=e.getStep(b,f.type);if(!("valueAsNumber"in f))f.valueAsNumber=d[f.type].asNumber(a.prop(b,"value"));var h="any"==f.step?d[f.type].step*d[f.type].stepScaleFactor: f.step;e.addMinMaxNumberToCache("min",a(b),f);e.addMinMaxNumberToCache("max",a(b),f);if(isNaN(f.valueAsNumber))f.valueAsNumber=d[f.type].stepBase||0;if("any"!==f.step&&(b=Math.round(1E7*((f.valueAsNumber-(f.minAsnumber||0))%f.step))/1E7)&&Math.abs(b)!=f.step)f.valueAsNumber-=b;b=f.valueAsNumber+h*c;return b=!isNaN(f.minAsNumber)&&bf.maxAsNumber?f.valueAsNumber*c> f.maxAsNumber?f.maxAsNumber:isNaN(f.minAsNumber)?f.valueAsNumber:f.minAsNumber:Math.round(1E7*b)/1E7};e.modules["form-number-date-ui"].getNextStep=h;var j=function(b,c,e){if(!b.disabled&&!b.readOnly&&!a(e).hasClass("step-controls")&&(a.prop(b,"value",d[c].numberToString(h(b,a(e).hasClass("step-up")?1:-1,{type:c}))),a(b).unbind("blur.stepeventshim"),f(b,"input"),m.activeElement)){if(m.activeElement!==b)try{b.focus()}catch(j){}setTimeout(function(){if(m.activeElement!==b)try{b.focus()}catch(c){}a(b).one("blur.stepeventshim", function(){f(b,"change")})},0)}};if(b.stepArrows){var g={set:function(){var a=e.data(this,"step-controls");if(a)a[this.disabled||this.readonly?"addClass":"removeClass"]("disabled-step-control")}};e.onNodeNamesPropertyModify("input","disabled",g);e.onNodeNamesPropertyModify("input","readonly",a.extend({},g))}var k={38:1,40:-1};e.addReady(function(g,i){b.stepArrows&&a("input",g).add(i.filter("input")).each(function(){var g=a.prop(this,"type");if(d[g]&&d[g].asNumber&&b.stepArrows&&!(!0!==b.stepArrows&& !b.stepArrows[g]||c(g)||a(i).hasClass("has-step-controls"))){var i=this,l=a('').insertAfter(i).bind("selectstart dragstart",function(){return!1}).bind("mousedown mousepress",function(a){j(i,g,a.target);return!1}).bind("mousepressstart mousepressend",function(b){a(b.target)["mousepressstart"==b.type?"addClass":"removeClass"]("mousepress-ui")}),m=function(b,c){if(!i.disabled&&!i.readOnly&&c)return a.prop(i, "value",d[g].numberToString(h(i,c,{type:g}))),f(i,"input"),!1},n=a(i).addClass("has-step-controls").attr({readonly:i.readOnly,disabled:i.disabled,autocomplete:"off",role:"spinbutton"}).bind(a.browser.msie?"keydown":"keypress",function(b){if(!i.disabled&&!i.readOnly&&k[b.keyCode])return a.prop(i,"value",d[g].numberToString(h(i,k[b.keyCode],{type:g}))),f(i,"input"),!1});"number"==g&&n.bind("keypress",function(){return function(a){var b=String.fromCharCode(null==a.charCode?a.keyCode:a.charCode);return a.ctrlKey|| a.metaKey||" ">b||-1<"0123456789.".indexOf(b)}}());a.fn.mwheelIntent?n.add(l).bind("mwheelIntent",m):a.fn.mousewheel&&n.bind("focus",function(){n.add(l).unbind(".mwhellwebshims").bind("mousewheel.mwhellwebshims",m)}).bind("blur",function(){a(i).add(l).unbind(".mwhellwebshims")});e.data(i,"step-controls",l);if(b.calculateWidth){var o;n.bind("updateshadowdom",function(){if(!o&&(i.offsetWidth||i.offsetHeight))o=!0,r(n,l),l.css("marginTop",(n.outerHeight()-l.outerHeight())/2)}).triggerHandler("updateshadowdom")}}})})}})(); e.addReady(function(c,b){a(m).bind("jquery-uiReady.initinputui input-widgetsReady.initinputui",function(){if(a.datepicker||a.fn.slider){if(a.datepicker&&!l.dateFormat)l.dateFormat=a.datepicker._defaults.dateFormat;h(c,b)}a.datepicker&&a.fn.slider?a(m).unbind(".initinputui"):e.modules["input-widgets"].src||e.warn('jQuery UI Widget factory is already included, but not datepicker or slider. configure src of $.webshims.modules["input-widgets"].src')})})});