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