jQuery.webshims.register("form-number-date-api",function(a,e){var m,k,v;if(!e.getStep)e.getStep=function(i,b){var c=a.attr(i,"step");if("any"===c)return c;b=b||p(i);if(!f[b]||!f[b].step)return c;c=m.asNumber(c);return(!isNaN(c)&&0').prop("type")===i},p=function(a){return(a.getAttribute("type")||"").toLowerCase()},t=e.addMinMaxNumberToCache,j=function(a,b){for(var a=""+a,b=b-a.length,c=0;c=d||1.0E-7>=Math.abs(d-c.step))}return d});[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(a){e.addValidityRule(a.name, function(b,c,d,l){l=(l||{})[a.name]||!1;if(""===c)return l;if(!("type"in d))d.type=p(b[0]);if(f[d.type]&&f[d.type].asNumber){if(!("valueAsNumber"in d))d.valueAsNumber=f[d.type].asNumber(c);if(isNaN(d.valueAsNumber))return!1;t(a.attr,b,d);if(isNaN(d[a.attr+"AsNumber"]))return l;l=d[a.attr+"AsNumber"]*a.factore.browserVersion&&(c=!1);return function(a,e){var f,i,h;i="width";c&&(i=b[a.css(c)]||i);f=a[i]();i="width"==i;if(f){var n=parseInt(e.css("marginLeft"),10)||0,w=e.outerWidth();(h=parseInt(a.css("marginRight"),10)||0)&& a.css("marginRight",0);n<=-1*w?(e.css("marginRight",Math.floor(Math.abs(w+n-0.1)+h)),a.css("paddingRight",(parseInt(a.css("paddingRight"),10)||0)+Math.abs(n)),i&&a.css("width",Math.floor(f+n))):(e.css("marginRight",h),a.css("width",Math.floor(f-n-w-0.2)))}}}(),o={},p=a([]),t,j=function(b,c){a("input",b).add(c.filter("input")).each(function(){var b=a.prop(this,"type");if(j[b]&&!e.data(this,"shadowData"))j[b](a(this))})},u=function(b,c){if(h.lazyDate){var d=a.data(b[0],"setDateLazyTimer");d&&clearTimeout(d); a.data(b[0],"setDateLazyTimer",setTimeout(function(){b.datepicker("setDate",c);a.removeData(b[0],"setDateLazyTimer");b=null},0))}else b.datepicker("setDate",c)},r={tabindex:1,tabIndex:1,title:1,"aria-required":1,"aria-invalid":1};if(!h.copyAttrs)h.copyAttrs={};e.extendUNDEFProp(h.copyAttrs,r);var s=function(a){return h.calculateWidth?{css:{marginRight:a.css("marginRight"),marginLeft:a.css("marginLeft")},outerWidth:a.outerWidth()}:{}};j.common=function(b,c,d){Modernizr.formvalidation&&b.bind("firstinvalid", function(a){(e.fromSubmit||!t)&&b.unbind("invalid.replacedwidgetbubble").bind("invalid.replacedwidgetbubble",function(c){!a.isInvalidUIPrevented()&&!c.isDefaultPrevented()&&(e.validityAlert.showFor(a.target),a.preventDefault(),c.preventDefault());b.unbind("invalid.replacedwidgetbubble")})});var l,f,i=a("input, span.ui-slider-handle",c),j=b[0].attributes;for(l in h.copyAttrs)if((f=j[l])&&f.specified)r[l]&&i[0]?i.attr(l,f.nodeValue):c[0].setAttribute(l,f.nodeValue);l=(l=b.attr("id"))?a('label[for="'+ l+'"]',b[0].form):p;c.addClass(b[0].className);e.addShadowDom(b,c,{data:d||{},shadowFocusElement:a("input.input-datetime-local-date, span.ui-slider-handle",c)[0],shadowChilds:i});b.after(c);b[0].form&&a(b[0].form).bind("reset",function(a){a.originalEvent&&!a.isDefaultPrevented()&&setTimeout(function(){b.prop("value",b.prop("value"))},0)});l[0]&&(c.getShadowFocusElement().attr("aria-labelledby",e.getID(l)),l.bind("click",function(){b.getShadowFocusElement().focus();return!1}))};Modernizr.formvalidation&& ["input","form"].forEach(function(a){var c=e.defineNodeNameProperty(a,"checkValidity",{prop:{value:function(){t=!0;var a=c.prop._supvalue.apply(this,arguments);t=!1;return a}}})});if(!m.date||h.replaceUI){var i=function(b,c,d,l){var f,i,j=function(){n.dpDiv.unbind("mousedown.webshimsmousedownhandler");i=f=!1},n=c.bind("focusin",function(){j();n.dpDiv.unbind("mousedown.webshimsmousedownhandler").bind("mousedown.webshimsmousedownhandler",function(){f=!0})}).bind("focusout blur",function(a){f&&(i=!0, a.stopImmediatePropagation())}).datepicker(a.extend({onClose:function(){i&&c.not(":focus")?(j(),c.trigger("focusout"),c.triggerHandler("blur")):j()}},o,h.datepicker,b.data("datepicker"))).bind("change",d).data("datepicker");n.dpDiv.addClass("input-date-datepicker-control");l&&e.triggerDomUpdate(l[0]);"disabled,min,max,value,step,data-placeholder".split(",").forEach(function(a){var c=b.attr(a);c&&b.attr(a,c)});return n};j.date=function(b){if(a.fn.datepicker){var c=a(''), d;this.common(b,c,j.date.attrs);d=i(b,c,function(d){j.date.blockAttr=!0;var e;if(h.lazyDate){var i=a.data(c[0],"setDateLazyTimer");i&&(clearTimeout(i),a.removeData(c[0],"setDateLazyTimer"))}try{e=(e=a.datepicker.parseDate(c.datepicker("option","dateFormat"),c.prop("value")))?a.datepicker.formatDate("yy-mm-dd",e):c.prop("value")}catch(m){e=c.prop("value")}b.prop("value",e);j.date.blockAttr=!1;d.stopImmediatePropagation();f(b[0],"input");f(b[0],"change")});a(b).bind("updateshadowdom",function(){if(d.trigger[0]&& (b.css({display:""}),b[0].offsetWidth||b[0].offsetHeight)){var a=s(b);a.css&&(c.css(a.css),a.outerWidth&&c.outerWidth(a.outerWidth),q(c,d.trigger))}b.css({display:"none"})}).triggerHandler("updateshadowdom");d.trigger[0]&&setTimeout(function(){e.ready("WINDOWLOAD",function(){a(b).triggerHandler("updateshadowdom")})},9)}};j.date.attrs={disabled:function(b,c,d){a.prop(c,"disabled",!!d)},min:function(b,c,d){try{d=a.datepicker.parseDate("yy-mm-dd",d)}catch(e){d=!1}d&&a(c).datepicker("option","minDate", d)},max:function(b,c,d){try{d=a.datepicker.parseDate("yy-mm-dd",d)}catch(e){d=!1}d&&a(c).datepicker("option","maxDate",d)},"data-placeholder":function(b,c,d){b=(d||"").split("-");3==b.length&&(d=a(c).datepicker("option","dateFormat").replace("yy",b[0]).replace("mm",b[1]).replace("dd",b[2]));a.prop(c,"placeholder",d)},value:function(b,c,d){if(!j.date.blockAttr){try{var e=a.datepicker.parseDate("yy-mm-dd",d)}catch(f){e=!1}e?u(a(c),e):a.prop(c,"value",d)}}}}if(!m.range||h.replaceUI)j.range=function(b){if(a.fn.slider){var c= a('');this.common(b,c,j.range.attrs);b.bind("updateshadowdom",function(){b.css({display:""});if(b[0].offsetWidth||b[0].offsetHeight){var a=s(b);a.css&&(c.css(a.css),a.outerWidth&&c.outerWidth(a.outerWidth))}b.css({display:"none"})}).triggerHandler("updateshadowdom");c.slider(a.extend(!0,{},h.slider,b.data("slider"))).bind("slide",function(a,c){if(a.originalEvent)j.range.blockAttr=!0,b.prop("value",c.value), j.range.blockAttr=!1,f(b[0],"input"),f(b[0],"change")});["disabled","min","max","step","value"].forEach(function(c){var e=b.prop(c),f;"value"==c&&!e&&(f=b.getShadowElement())&&(e=(a(f).slider("option","max")-a(f).slider("option","min"))/2);null!=e&&b.prop(c,e)})}},j.range.attrs={disabled:function(b,c,d){d=!!d;a(c).slider("option","disabled",d);a("span",c).attr({"aria-disabled":d+"",tabindex:d?"-1":"0"})},min:function(b,c,d){d=d?1*d||0:0;a(c).slider("option","min",d);a("span",c).attr({"aria-valuemin":d})}, max:function(b,c,d){d=d||0===d?1*d||100:100;a(c).slider("option","max",d);a("span",c).attr({"aria-valuemax":d})},value:function(b,c,d){d=a(b).prop("valueAsNumber");isNaN(d)||(j.range.blockAttr||a(c).slider("option","value",d),a("span",c).attr({"aria-valuenow":d,"aria-valuetext":d}))},step:function(b,c,d){d=d&&a.trim(d)?1*d||1:1;a(c).slider("option","step",d)}};if(!e.bugs.valueAsNumberSet&&(h.replaceUI||!Modernizr.inputtypes.date||!Modernizr.inputtypes.range))m=function(){e.data(this,"hasShadow")&& a.prop(this,"value",a.prop(this,"value"))},e.onNodeNamesPropertyModify("input","valueAsNumber",m),e.onNodeNamesPropertyModify("input","valueAsDate",m);a.each("disabled,min,max,value,step,data-placeholder".split(","),function(a,c){e.onNodeNamesPropertyModify("input",c,function(a){var b=e.data(this,"shadowData");if(b&&b.data&&b.data[c]&&b.nativeElement===this)b.data[c](this,b.shadowElement,a)})});if(!h.availabeLangs)h.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(" "); m=function(){a.datepicker&&(e.activeLang({langObj:a.datepicker.regional,module:"form-number-date-ui",callback:function(b){b=a.extend({},o,b,h.datepicker);b.dateFormat&&h.datepicker.dateFormat!=b.dateFormat&&a("input.hasDatepicker").filter(".input-date, .input-datetime-local-date").datepicker("option","dateFormat",b.dateFormat).getNativeElement().filter("[data-placeholder]").attr("data-placeholder",function(a,b){return b});a.datepicker.setDefaults(b)}}),a(k).unbind("jquery-uiReady.langchange input-widgetsReady.langchange"))}; a(k).bind("jquery-uiReady.langchange input-widgetsReady.langchange",m);m();(function(){var b=function(){var b={};return function(c){return c in b?b[c]:b[c]=a('')[0].type===c}}();if(!b("number")){var c=e.cfg["forms-ext"],d=e.inputTypes,i=function(b,c,g){g=g||{};if(!("type"in g))g.type=a.prop(b,"type");if(!("step"in g))g.step=e.getStep(b,g.type);if(!("valueAsNumber"in g))g.valueAsNumber=d[g.type].asNumber(a.prop(b,"value"));var f="any"==g.step?d[g.type].step*d[g.type].stepScaleFactor: g.step;e.addMinMaxNumberToCache("min",a(b),g);e.addMinMaxNumberToCache("max",a(b),g);if(isNaN(g.valueAsNumber))g.valueAsNumber=d[g.type].stepBase||0;if("any"!==g.step&&(b=Math.round(1E7*((g.valueAsNumber-(g.minAsnumber||0))%g.step))/1E7)&&Math.abs(b)!=g.step)g.valueAsNumber-=b;b=g.valueAsNumber+f*c;return b=!isNaN(g.minAsNumber)&&bg.maxAsNumber?g.valueAsNumber*c> g.maxAsNumber?g.maxAsNumber:isNaN(g.minAsNumber)?g.valueAsNumber:g.minAsNumber:Math.round(1E7*b)/1E7};e.modules["form-number-date-ui"].getNextStep=i;var j=function(b,c,e){if(!b.disabled&&!b.readOnly&&!a(e).hasClass("step-controls")&&(a.prop(b,"value",d[c].numberToString(i(b,a(e).hasClass("step-up")?1:-1,{type:c}))),a(b).unbind("blur.stepeventshim"),f(b,"input"),k.activeElement)){if(k.activeElement!==b)try{b.focus()}catch(h){}setTimeout(function(){if(k.activeElement!==b)try{b.focus()}catch(c){}a(b).one("blur.stepeventshim", function(){f(b,"change")})},0)}};if(c.stepArrows){var h={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",h);e.onNodeNamesPropertyModify("input","readonly",a.extend({},h))}var m={38:1,40:-1};e.addReady(function(h,k){c.stepArrows&&a("input",h).add(k.filter("input")).each(function(){var g=a.prop(this,"type");if(d[g]&&d[g].asNumber&&c.stepArrows&&!(!0!==c.stepArrows&& !c.stepArrows[g]||b(g)||a(h).hasClass("has-step-controls"))){var h=this,k=a('').insertAfter(h).bind("selectstart dragstart",function(){return!1}).bind("mousedown mousepress",function(a){j(h,g,a.target);return!1}).bind("mousepressstart mousepressend",function(b){a(b.target)["mousepressstart"==b.type?"addClass":"removeClass"]("mousepress-ui")}),o=function(b,c){if(!h.disabled&&!h.readOnly&&c)return a.prop(h, "value",d[g].numberToString(i(h,c,{type:g}))),f(h,"input"),!1},n=a(h).addClass("has-step-controls").attr({readonly:h.readOnly,disabled:h.disabled,autocomplete:"off",role:"spinbutton"}).bind(a.browser.msie?"keydown":"keypress",function(b){if(!h.disabled&&!h.readOnly&&m[b.keyCode])return a.prop(h,"value",d[g].numberToString(i(h,m[b.keyCode],{type:g}))),f(h,"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(k).bind("mwheelIntent",o):a.fn.mousewheel&&n.bind("focus",function(){n.add(k).unbind(".mwhellwebshims").bind("mousewheel.mwhellwebshims",o)}).bind("blur",function(){a(h).add(k).unbind(".mwhellwebshims")});e.data(h,"step-controls",k);if(c.calculateWidth){var p;n.bind("updateshadowdom",function(){if(!p&&(h.offsetWidth||h.offsetHeight))p=!0,q(n,k),k.css("marginTop",(n.outerHeight()-k.outerHeight())/2)}).triggerHandler("updateshadowdom")}}})})}})(); e.addReady(function(b,c){a(k).bind("jquery-uiReady.initinputui input-widgetsReady.initinputui",function(){if(a.datepicker||a.fn.slider){if(a.datepicker&&!o.dateFormat)o.dateFormat=a.datepicker._defaults.dateFormat;j(b,c)}a.datepicker&&a.fn.slider?a(k).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')})})});