vendor/assets/javascripts/webshims/minified/shims/combos/6.js in webshims-rails-0.2 vs vendor/assets/javascripts/webshims/minified/shims/combos/6.js in webshims-rails-0.3
- old
+ new
@@ -1,29 +1,29 @@
-jQuery.webshims.register("form-number-date-api",function(a,f){var k,n,v;if(!f.getStep)f.getStep=function(d,f){var b=a.attr(d,"step");if("any"===b)return b;f=f||o(d);if(!g[f]||!g[f].step)return b;b=k.asNumber(b);return(!isNaN(b)&&0<b?b:g[f].step)*g[f].stepScaleFactor};if(!f.addMinMaxNumberToCache)f.addMinMaxNumberToCache=function(d,a,b){d+"AsNumber"in b||(b[d+"AsNumber"]=g[b.type].asNumber(a.attr(d)),isNaN(b[d+"AsNumber"])&&d+"Default"in g[b.type]&&(b[d+"AsNumber"]=g[b.type][d+"Default"]))};var j=
-parseInt("NaN",10),g=f.inputTypes,q=function(d){return"number"==typeof d||d&&d==1*d},r=function(d){return a('<input type="'+d+'" />').prop("type")===d},o=function(d){return(d.getAttribute("type")||"").toLowerCase()},w=f.addMinMaxNumberToCache,s=function(d,a){for(var d=""+d,a=a-d.length,b=0;b<a;b++)d="0"+d;return d},i=f.bugs.valueAsNumberSet||f.bugs.bustedValidity;f.addValidityRule("stepMismatch",function(a,h,b,c){if(""===h)return!1;if(!("type"in b))b.type=o(a[0]);if("date"==b.type)return!1;c=(c||
-{}).stepMismatch;if(g[b.type]&&g[b.type].step){if(!("step"in b))b.step=f.getStep(a[0],b.type);if("any"==b.step)return!1;if(!("valueAsNumber"in b))b.valueAsNumber=g[b.type].asNumber(h);if(isNaN(b.valueAsNumber))return!1;w("min",a,b);a=b.minAsNumber;isNaN(a)&&(a=g[b.type].stepBase||0);c=Math.abs((b.valueAsNumber-a)%b.step);c=!(1.0E-7>=c||1.0E-7>=Math.abs(c-b.step))}return c});[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(a){f.addValidityRule(a.name,
-function(f,b,c,e){e=(e||{})[a.name]||!1;if(""===b)return e;if(!("type"in c))c.type=o(f[0]);if(g[c.type]&&g[c.type].asNumber){if(!("valueAsNumber"in c))c.valueAsNumber=g[c.type].asNumber(b);if(isNaN(c.valueAsNumber))return!1;w(a.attr,f,c);if(isNaN(c[a.attr+"AsNumber"]))return e;e=c[a.attr+"AsNumber"]*a.factor<c.valueAsNumber*a.factor-1.0E-7}return e})});f.reflectProperties(["input"],["max","min","step"]);var t=f.defineNodeNameProperty("input","valueAsNumber",{prop:{get:function(){var d=o(this),d=g[d]&&
-g[d].asNumber?g[d].asNumber(a.prop(this,"value")):t.prop._supget&&t.prop._supget.apply(this,arguments);null==d&&(d=j);return d},set:function(d){var h=o(this);g[h]&&g[h].numberToString?isNaN(d)?a.prop(this,"value",""):(h=g[h].numberToString(d),!1!==h?a.prop(this,"value",h):f.warn("INVALID_STATE_ERR: DOM Exception 11")):t.prop._supset&&t.prop._supset.apply(this,arguments)}}}),u=f.defineNodeNameProperty("input","valueAsDate",{prop:{get:function(){var d=o(this);return g[d]&&g[d].asDate&&!g[d].noAsDate?
-g[d].asDate(a.prop(this,"value")):u.prop._supget&&u.prop._supget.call(this)||null},set:function(d){var h=o(this);if(g[h]&&g[h].dateToString&&!g[h].noAsDate){if(null===d)return a.prop(this,"value",""),"";h=g[h].dateToString(d);if(!1!==h)return a.prop(this,"value",h),h;f.warn("INVALID_STATE_ERR: DOM Exception 11")}else return u.prop._supset&&u.prop._supset.apply(this,arguments)||null}}});k={mismatch:function(a){return!q(a)},step:1,stepScaleFactor:1,asNumber:function(a){return q(a)?1*a:j},numberToString:function(a){return q(a)?
-a:!1}};n={minDefault:0,maxDefault:100};v={mismatch:function(d){if(!d||!d.split||!/\d$/.test(d))return!0;var f=d.split(/\u002D/);if(3!==f.length)return!0;var b=!1;a.each(f,function(a,e){if(!(q(e)||e&&e=="0"+1*e))return b=!0,!1});if(b)return b;if(4!==f[0].length||2!=f[1].length||12<f[1]||2!=f[2].length||33<f[2])b=!0;return d!==this.dateToString(this.asDate(d,!0))},step:1,stepScaleFactor:864E5,asDate:function(a,f){return!f&&this.mismatch(a)?null:new Date(this.asNumber(a,!0))},asNumber:function(a,f){var b=
-j;if(f||!this.mismatch(a))a=a.split(/\u002D/),b=Date.UTC(a[0],a[1]-1,a[2]);return b},numberToString:function(a){return q(a)?this.dateToString(new Date(1*a)):!1},dateToString:function(a){return a&&a.getFullYear?a.getUTCFullYear()+"-"+s(a.getUTCMonth()+1,2)+"-"+s(a.getUTCDate(),2):!1}};if(i||!r("range")||!r("time"))n=a.extend({},k,n);(i||!r("number"))&&f.addInputType("number",k);(i||!r("range"))&&f.addInputType("range",n);(i||!r("date"))&&f.addInputType("date",v)});
-jQuery.webshims.register("form-number-date-ui",function(a,f,k,n,v,j){var g=f.triggerInlineForm,q=Modernizr.inputtypes,r=function(){var a={"padding-box":"innerWidth","border-box":"outerWidth","content-box":"width"},c=Modernizr.prefixed&&Modernizr.prefixed("boxSizing");return function(e,f){var d,g,j;g="width";c&&(g=a[e.css(c)]||g);d=e[g]();g="width"==g;if(d){var m=parseInt(f.css("marginLeft"),10)||0,x=f.outerWidth();(j=parseInt(e.css("marginRight"),10)||0)&&e.css("marginRight",0);m<=-1*x?(f.css("marginRight",
-Math.floor(Math.abs(x+m)+j)),e.css("paddingRight",(parseInt(e.css("paddingRight"),10)||0)+Math.abs(m)),g&&e.css("width",Math.floor(d+m))):(f.css("marginRight",j),e.css("width",Math.floor(d-m-x)))}}}(),o={dateFormat:"yy-mm-dd"},w=a([]),s,i=function(b,c){a("input",b).add(c.filter("input")).each(function(){var b=a.prop(this,"type");if(i[b]&&!f.data(this,"shadowData"))i[b](a(this))})},t=function(b,c){if(j.lazyDate){var e=a.data(b[0],"setDateLazyTimer");e&&clearTimeout(e);a.data(b[0],"setDateLazyTimer",
-setTimeout(function(){b.datepicker("setDate",c);a.removeData(b[0],"setDateLazyTimer");b=null},0))}else b.datepicker("setDate",c)};if(j.lazyDate===v)try{j.lazyDate=a.browser.msie&&9>f.browserVersion||500>a(k).width()&&500>a(k).height()}catch(u){}var d={tabindex:1,tabIndex:1,title:1,"aria-required":1,"aria-invalid":1};if(!j.copyAttrs)j.copyAttrs={};f.extendUNDEFProp(j.copyAttrs,d);i.common=function(b,c,e){Modernizr.formvalidation&&b.bind("firstinvalid",function(a){(f.fromSubmit||!s)&&b.unbind("invalid.replacedwidgetbubble").bind("invalid.replacedwidgetbubble",
-function(c){!a.isInvalidUIPrevented()&&!c.isDefaultPrevented()&&(f.validityAlert.showFor(a.target),a.preventDefault(),c.preventDefault());b.unbind("invalid.replacedwidgetbubble")})});var g,p,i=a("input, span.ui-slider-handle",c),h=b[0].attributes;for(g in j.copyAttrs)if((p=h[g])&&p.specified)d[g]&&i[0]?i.attr(g,p.nodeValue):c[0].setAttribute(g,p.nodeValue);p=b.attr("id");g=j.calculateWidth?{css:{marginRight:b.css("marginRight"),marginLeft:b.css("marginLeft")},outerWidth:b.outerWidth()}:{};g.label=
-p?a('label[for="'+p+'"]',b[0].form):w;p=f.getID(g.label);c.addClass(b[0].className);f.addShadowDom(b,c,{data:e||{},shadowFocusElement:a("input.input-datetime-local-date, span.ui-slider-handle",c)[0],shadowChilds:i});b.after(c).hide();b[0].form&&a(b[0].form).bind("reset",function(a){a.originalEvent&&!a.isDefaultPrevented()&&setTimeout(function(){b.prop("value",b.prop("value"))},0)});1==c.length&&!a("*",c)[0]&&(c.attr("aria-labelledby",p),g.label.bind("click",function(){c.focus();return!1}));return g};
-Modernizr.formvalidation&&["input","form"].forEach(function(a){var c=f.defineNodeNameProperty(a,"checkValidity",{prop:{value:function(){s=!0;var a=c.prop._supvalue.apply(this,arguments);s=!1;return a}}})});if(!q.date||j.replaceUI){var h=function(b,c,e,d){var g,i,h=function(){m.dpDiv.unbind("mousedown.webshimsmousedownhandler");i=g=!1},m=c.bind("focusin",function(){h();m.dpDiv.unbind("mousedown.webshimsmousedownhandler").bind("mousedown.webshimsmousedownhandler",function(){g=!0})}).bind("focusout blur",
-function(a){g&&(i=!0,a.stopImmediatePropagation())}).datepicker(a.extend({onClose:function(){i&&n.activeElement!==c[0]?(h(),c.trigger("focusout"),c.triggerHandler("blur")):h()}},o,j.datepicker,b.data("datepicker"))).bind("change",e).data("datepicker");m.dpDiv.addClass("input-date-datepicker-control");d&&f.triggerDomUpdate(d[0]);["disabled","min","max","value","step"].forEach(function(a){var c=b.prop(a);""!==c&&("disabled"!=a||!c)&&b.prop(a,c)});return m};i.date=function(b){if(a.fn.datepicker){var c=
-a('<input class="input-date" type="text" />'),e=this.common(b,c,i.date.attrs),f=h(b,c,function(e){i.date.blockAttr=!0;var f;if(j.lazyDate){var d=a.data(c[0],"setDateLazyTimer");d&&(clearTimeout(d),a.removeData(c[0],"setDateLazyTimer"))}try{f=(f=a.datepicker.parseDate(c.datepicker("option","dateFormat"),c.prop("value")))?a.datepicker.formatDate("yy-mm-dd",f):c.prop("value")}catch(m){f=c.prop("value")}b.prop("value",f);i.date.blockAttr=!1;e.stopImmediatePropagation();g(b[0],"input");g(b[0],"change")});
-e.css&&(c.css(e.css),e.outerWidth&&c.outerWidth(e.outerWidth),f.trigger[0]&&r(c,f.trigger))}};i.date.attrs={disabled:function(b,c,e){a.prop(c,"disabled",!!e)},min:function(b,c,e){try{e=a.datepicker.parseDate("yy-mm-dd",e)}catch(f){e=!1}e&&a(c).datepicker("option","minDate",e)},max:function(b,c,e){try{e=a.datepicker.parseDate("yy-mm-dd",e)}catch(f){e=!1}e&&a(c).datepicker("option","maxDate",e)},value:function(b,c,e){if(!i.date.blockAttr){try{var f=a.datepicker.parseDate("yy-mm-dd",e)}catch(d){f=!1}f?
-t(a(c),f):a.prop(c,"value",e)}}}}if(!q.range||j.replaceUI)i.range=function(b){if(a.fn.slider){var c=a('<span class="input-range"><span class="ui-slider-handle" role="slider" tabindex="0" /></span>'),e=this.common(b,c,i.range.attrs);a("span",c).attr("aria-labelledby",e.label.attr("id"));e.label.bind("click",function(){a("span",c).focus();return!1});e.css&&(c.css(e.css),e.outerWidth&&c.outerWidth(e.outerWidth));c.slider(a.extend({},j.slider,b.data("slider"),{slide:function(a,c){if(a.originalEvent)i.range.blockAttr=
-!0,b.prop("value",c.value),i.range.blockAttr=!1,g(b[0],"input"),g(b[0],"change")}}));["disabled","min","max","step","value"].forEach(function(c){var e=b.attr(c),f;"value"==c&&!e&&(f=b.getShadowElement())&&(e=(a(f).slider("option","max")-a(f).slider("option","min"))/2);null!=e&&b.attr(c,e)})}},i.range.attrs={disabled:function(b,c,e){e=!!e;a(c).slider("option","disabled",e);a("span",c).attr({"aria-disabled":e+"",tabindex:e?"-1":"0"})},min:function(b,c,e){e=e?1*e||0:0;a(c).slider("option","min",e);a("span",
-c).attr({"aria-valuemin":e})},max:function(b,c,e){e=e||0===e?1*e||100:100;a(c).slider("option","max",e);a("span",c).attr({"aria-valuemax":e})},value:function(b,c,e){e=a(b).prop("valueAsNumber");isNaN(e)||(i.range.blockAttr||a(c).slider("option","value",e),a("span",c).attr({"aria-valuenow":e,"aria-valuetext":e}))},step:function(b,c,e){e=e&&a.trim(e)?1*e||1:1;a(c).slider("option","step",e)}};if(!f.bugs.valueAsNumberSet&&(j.replaceUI||!Modernizr.inputtypes.date||!Modernizr.inputtypes.range))k=function(){f.data(this,
-"hasShadow")&&a.prop(this,"value",a.prop(this,"value"))},f.onNodeNamesPropertyModify("input","valueAsNumber",k),f.onNodeNamesPropertyModify("input","valueAsDate",k);a.each(["disabled","min","max","value","step"],function(a,c){f.onNodeNamesPropertyModify("input",c,function(a){var b=f.data(this,"shadowData");if(b&&b.data&&b.data[c]&&b.nativeElement===this)b.data[c](this,b.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(" ");
-k=function(){a.datepicker&&(f.activeLang({langObj:a.datepicker.regional,module:"form-number-date-ui",callback:function(b){a("input.hasDatepicker").filter(".input-date, .input-datetime-local-date").datepicker("option",a.extend(o,b,j.datepicker))}}),a(n).unbind("jquery-uiReady.langchange input-widgetsReady.langchange"))};a(n).bind("jquery-uiReady.langchange input-widgetsReady.langchange",k);k();(function(){var b=function(){var b={};return function(c){return c in b?b[c]:b[c]=a('<input type="'+c+'" />')[0].type===
-c}}();if(!b("number")){var c=f.cfg["forms-ext"],e=f.inputTypes,d=function(b,c,d){d=d||{};if(!("type"in d))d.type=a.prop(b,"type");if(!("step"in d))d.step=f.getStep(b,d.type);if(!("valueAsNumber"in d))d.valueAsNumber=e[d.type].asNumber(a.prop(b,"value"));var g="any"==d.step?e[d.type].step*e[d.type].stepScaleFactor:d.step;f.addMinMaxNumberToCache("min",a(b),d);f.addMinMaxNumberToCache("max",a(b),d);if(isNaN(d.valueAsNumber))d.valueAsNumber=e[d.type].stepBase||0;if("any"!==d.step&&(b=Math.round(1E7*
-((d.valueAsNumber-(d.minAsnumber||0))%d.step))/1E7)&&Math.abs(b)!=d.step)d.valueAsNumber-=b;b=d.valueAsNumber+g*c;return b=!isNaN(d.minAsNumber)&&b<d.minAsNumber?d.valueAsNumber*c<d.minAsNumber?d.minAsNumber:isNaN(d.maxAsNumber)?d.valueAsNumber:d.maxAsNumber:!isNaN(d.maxAsNumber)&&b>d.maxAsNumber?d.valueAsNumber*c>d.maxAsNumber?d.maxAsNumber:isNaN(d.minAsNumber)?d.valueAsNumber:d.minAsNumber:Math.round(1E7*b)/1E7};f.modules["form-number-date-ui"].getNextStep=d;var i=function(b,c,f){if(!b.disabled&&
-!b.readOnly&&!a(f).hasClass("step-controls")&&(a.prop(b,"value",e[c].numberToString(d(b,a(f).hasClass("step-up")?1:-1,{type:c}))),a(b).unbind("blur.stepeventshim"),g(b,"input"),n.activeElement)){if(n.activeElement!==b)try{b.focus()}catch(i){}setTimeout(function(){if(n.activeElement!==b)try{b.focus()}catch(c){}a(b).one("blur.stepeventshim",function(){g(b,"change")})},0)}};if(c.stepArrows){var h={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",h);f.onNodeNamesPropertyModify("input","readonly",a.extend({},h))}var j={38:1,40:-1};f.addReady(function(h,k){c.stepArrows&&a("input",h).add(k.filter("input")).each(function(){var h=a.prop(this,"type");if(e[h]&&e[h].asNumber&&c.stepArrows&&!(!0!==c.stepArrows&&!c.stepArrows[h]||b(h)||a(l).hasClass("has-step-controls"))){var l=this,k=a('<span class="step-controls" unselectable="on"><span class="step-up" /><span class="step-down" /></span>').insertAfter(l).bind("selectstart dragstart",
-function(){return!1}).bind("mousedown mousepress",function(a){i(l,h,a.target);return!1}).bind("mousepressstart mousepressend",function(b){a(b.target)["mousepressstart"==b.type?"addClass":"removeClass"]("mousepress-ui")}),n=function(b,c){if(!l.disabled&&!l.readOnly)return a.prop(l,"value",e[h].numberToString(d(l,c,{type:h}))),g(l,"input"),!1},m=a(l).addClass("has-step-controls").attr({readonly:l.readOnly,disabled:l.disabled,autocomplete:"off",role:"spinbutton"}).bind(a.browser.msie?"keydown":"keypress",
-function(b){if(!l.disabled&&!l.readOnly&&j[b.keyCode])return a.prop(l,"value",e[h].numberToString(d(l,j[b.keyCode],{type:h}))),g(l,"input"),!1});a.fn.mwheelIntent?m.add(k).bind("mwheelIntent",n):m.bind("focus",function(){m.add(k).unbind(".mwhellwebshims").bind("mousewheel.mwhellwebshims",n)}).bind("blur",function(){a(l).add(k).unbind(".mwhellwebshims")});f.data(l,"step-controls",k);c.calculateWidth&&(r(m,k),k.css("marginTop",(m.outerHeight()-k.outerHeight())/2))}})})}})();f.addReady(function(b,c){a(n).bind("jquery-uiReady.initinputui input-widgetsReady.initinputui",
-function(){(a.datepicker||a.fn.slider)&&i(b,c);a.datepicker&&a.fn.slider?a(n).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')})})});
+jQuery.webshims.register("form-number-date-api",function(a,b){var n,k,w;if(!b.getStep)b.getStep=function(m,b){var c=a.attr(m,"step");if("any"===c)return c;b=b||p(m);if(!e[b]||!e[b].step)return c;c=n.asNumber(c);return(!isNaN(c)&&0<c?c:e[b].step)*e[b].stepScaleFactor};if(!b.addMinMaxNumberToCache)b.addMinMaxNumberToCache=function(a,b,c){a+"AsNumber"in c||(c[a+"AsNumber"]=e[c.type].asNumber(b.attr(a)),isNaN(c[a+"AsNumber"])&&a+"Default"in e[c.type]&&(c[a+"AsNumber"]=e[c.type][a+"Default"]))};var i=
+parseInt("NaN",10),e=b.inputTypes,r=function(a){return"number"==typeof a||a&&a==1*a},s=function(m){return a('<input type="'+m+'" />').prop("type")===m},p=function(a){return(a.getAttribute("type")||"").toLowerCase()},x=b.addMinMaxNumberToCache,t=function(a,b){for(var a=""+a,b=b-a.length,c=0;c<b;c++)a="0"+a;return a},h=b.bugs.valueAsNumberSet||b.bugs.bustedValidity;b.addValidityRule("stepMismatch",function(a,g,c,d){if(""===g)return!1;if(!("type"in c))c.type=p(a[0]);if("date"==c.type)return!1;d=(d||
+{}).stepMismatch;if(e[c.type]&&e[c.type].step){if(!("step"in c))c.step=b.getStep(a[0],c.type);if("any"==c.step)return!1;if(!("valueAsNumber"in c))c.valueAsNumber=e[c.type].asNumber(g);if(isNaN(c.valueAsNumber))return!1;x("min",a,c);a=c.minAsNumber;isNaN(a)&&(a=e[c.type].stepBase||0);d=Math.abs((c.valueAsNumber-a)%c.step);d=!(1.0E-7>=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){b.addValidityRule(a.name,
+function(b,c,d,f){f=(f||{})[a.name]||!1;if(""===c)return f;if(!("type"in d))d.type=p(b[0]);if(e[d.type]&&e[d.type].asNumber){if(!("valueAsNumber"in d))d.valueAsNumber=e[d.type].asNumber(c);if(isNaN(d.valueAsNumber))return!1;x(a.attr,b,d);if(isNaN(d[a.attr+"AsNumber"]))return f;f=d[a.attr+"AsNumber"]*a.factor<d.valueAsNumber*a.factor-1.0E-7}return f})});b.reflectProperties(["input"],["max","min","step"]);var u=b.defineNodeNameProperty("input","valueAsNumber",{prop:{get:function(){var b=p(this),b=e[b]&&
+e[b].asNumber?e[b].asNumber(a.prop(this,"value")):u.prop._supget&&u.prop._supget.apply(this,arguments);null==b&&(b=i);return b},set:function(m){var g=p(this);e[g]&&e[g].numberToString?isNaN(m)?a.prop(this,"value",""):(g=e[g].numberToString(m),!1!==g?a.prop(this,"value",g):b.warn("INVALID_STATE_ERR: DOM Exception 11")):u.prop._supset&&u.prop._supset.apply(this,arguments)}}}),v=b.defineNodeNameProperty("input","valueAsDate",{prop:{get:function(){var b=p(this);return e[b]&&e[b].asDate&&!e[b].noAsDate?
+e[b].asDate(a.prop(this,"value")):v.prop._supget&&v.prop._supget.call(this)||null},set:function(m){var g=p(this);if(e[g]&&e[g].dateToString&&!e[g].noAsDate){if(null===m)return a.prop(this,"value",""),"";g=e[g].dateToString(m);if(!1!==g)return a.prop(this,"value",g),g;b.warn("INVALID_STATE_ERR: DOM Exception 11")}else return v.prop._supset&&v.prop._supset.apply(this,arguments)||null}}});n={mismatch:function(a){return!r(a)},step:1,stepScaleFactor:1,asNumber:function(a){return r(a)?1*a:i},numberToString:function(a){return r(a)?
+a:!1}};k={minDefault:0,maxDefault:100};w={mismatch:function(b){if(!b||!b.split||!/\d$/.test(b))return!0;var e=b.split(/\u002D/);if(3!==e.length)return!0;var c=!1;a.each(e,function(a,f){if(!(r(f)||f&&f=="0"+1*f))return c=!0,!1});if(c)return c;if(4!==e[0].length||2!=e[1].length||12<e[1]||2!=e[2].length||33<e[2])c=!0;return b!==this.dateToString(this.asDate(b,!0))},step:1,stepScaleFactor:864E5,asDate:function(a,b){return!b&&this.mismatch(a)?null:new Date(this.asNumber(a,!0))},asNumber:function(a,b){var c=
+i;if(b||!this.mismatch(a))a=a.split(/\u002D/),c=Date.UTC(a[0],a[1]-1,a[2]);return c},numberToString:function(a){return r(a)?this.dateToString(new Date(1*a)):!1},dateToString:function(a){return a&&a.getFullYear?a.getUTCFullYear()+"-"+t(a.getUTCMonth()+1,2)+"-"+t(a.getUTCDate(),2):!1}};if(h||!s("range")||!s("time"))k=a.extend({},n,k);(h||!s("number"))&&b.addInputType("number",n);(h||!s("range"))&&b.addInputType("range",k);(h||!s("date"))&&b.addInputType("date",w)});
+jQuery.webshims.register("form-number-date-ui",function(a,b,n,k,w,i){var e=b.triggerInlineForm,r=Modernizr.inputtypes,s=function(){var a={"padding-box":"innerWidth","border-box":"outerWidth","content-box":"width"},d=Modernizr.prefixed&&Modernizr.prefixed("boxSizing");return function(f,b){var e,j,i;j="width";d&&(j=a[f.css(d)]||j);e=f[j]();j="width"==j;if(e){var q=parseInt(b.css("marginLeft"),10)||0,y=b.outerWidth();(i=parseInt(f.css("marginRight"),10)||0)&&f.css("marginRight",0);q<=-1*y?(b.css("marginRight",
+Math.floor(Math.abs(y+q)+i)),f.css("paddingRight",(parseInt(f.css("paddingRight"),10)||0)+Math.abs(q)),j&&f.css("width",Math.floor(e+q))):(b.css("marginRight",i),f.css("width",Math.floor(e-q-y)))}}}(),p={},x=a([]),t,h=function(c,d){a("input",c).add(d.filter("input")).each(function(){var c=a.prop(this,"type");if(h[c]&&!b.data(this,"shadowData"))h[c](a(this))})},u=function(c,d){if(i.lazyDate){var f=a.data(c[0],"setDateLazyTimer");f&&clearTimeout(f);a.data(c[0],"setDateLazyTimer",setTimeout(function(){c.datepicker("setDate",
+d);a.removeData(c[0],"setDateLazyTimer");c=null},0))}else c.datepicker("setDate",d)};if(i.lazyDate===w)try{i.lazyDate=a.browser.msie&&9>b.browserVersion||500>a(n).width()&&500>a(n).height()}catch(v){}var m={tabindex:1,tabIndex:1,title:1,"aria-required":1,"aria-invalid":1};if(!i.copyAttrs)i.copyAttrs={};b.extendUNDEFProp(i.copyAttrs,m);h.common=function(c,d,f){Modernizr.formvalidation&&c.bind("firstinvalid",function(a){(b.fromSubmit||!t)&&c.unbind("invalid.replacedwidgetbubble").bind("invalid.replacedwidgetbubble",
+function(d){!a.isInvalidUIPrevented()&&!d.isDefaultPrevented()&&(b.validityAlert.showFor(a.target),a.preventDefault(),d.preventDefault());c.unbind("invalid.replacedwidgetbubble")})});var e,o,j=a("input, span.ui-slider-handle",d),h=c[0].attributes;for(e in i.copyAttrs)if((o=h[e])&&o.specified)m[e]&&j[0]?j.attr(e,o.nodeValue):d[0].setAttribute(e,o.nodeValue);o=c.attr("id");e=i.calculateWidth?{css:{marginRight:c.css("marginRight"),marginLeft:c.css("marginLeft")},outerWidth:c.outerWidth()}:{};e.label=
+o?a('label[for="'+o+'"]',c[0].form):x;o=b.getID(e.label);d.addClass(c[0].className);b.addShadowDom(c,d,{data:f||{},shadowFocusElement:a("input.input-datetime-local-date, span.ui-slider-handle",d)[0],shadowChilds:j});c.after(d).hide();c[0].form&&a(c[0].form).bind("reset",function(a){a.originalEvent&&!a.isDefaultPrevented()&&setTimeout(function(){c.prop("value",c.prop("value"))},0)});1==d.length&&!a("*",d)[0]&&(d.attr("aria-labelledby",o),e.label.bind("click",function(){d.focus();return!1}));return e};
+Modernizr.formvalidation&&["input","form"].forEach(function(a){var d=b.defineNodeNameProperty(a,"checkValidity",{prop:{value:function(){t=!0;var a=d.prop._supvalue.apply(this,arguments);t=!1;return a}}})});if(!r.date||i.replaceUI){var g=function(c,d,f,e){var o,j,h=function(){q.dpDiv.unbind("mousedown.webshimsmousedownhandler");j=o=!1},q=d.bind("focusin",function(){h();q.dpDiv.unbind("mousedown.webshimsmousedownhandler").bind("mousedown.webshimsmousedownhandler",function(){o=!0})}).bind("focusout blur",
+function(a){o&&(j=!0,a.stopImmediatePropagation())}).datepicker(a.extend({onClose:function(){j&&d.not(":focus")?(h(),d.trigger("focusout"),d.triggerHandler("blur")):h()}},p,i.datepicker,c.data("datepicker"))).bind("change",f).data("datepicker");q.dpDiv.addClass("input-date-datepicker-control");e&&b.triggerDomUpdate(e[0]);["disabled","min","max","value","step"].forEach(function(a){var d=c.prop(a);""!==d&&("disabled"!=a||!d)&&c.prop(a,d)});return q};h.date=function(c){if(a.fn.datepicker){var d=a('<input class="input-date" type="text" />'),
+f=this.common(c,d,h.date.attrs),b=g(c,d,function(b){h.date.blockAttr=!0;var f;if(i.lazyDate){var z=a.data(d[0],"setDateLazyTimer");z&&(clearTimeout(z),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(q){f=d.prop("value")}c.prop("value",f);h.date.blockAttr=!1;b.stopImmediatePropagation();e(c[0],"input");e(c[0],"change")});f.css&&(d.css(f.css),f.outerWidth&&d.outerWidth(f.outerWidth),
+b.trigger[0]&&s(d,b.trigger))}};h.date.attrs={disabled:function(c,d,f){a.prop(d,"disabled",!!f)},min:function(c,d,f){try{f=a.datepicker.parseDate("yy-mm-dd",f)}catch(b){f=!1}f&&a(d).datepicker("option","minDate",f)},max:function(c,d,f){try{f=a.datepicker.parseDate("yy-mm-dd",f)}catch(b){f=!1}f&&a(d).datepicker("option","maxDate",f)},value:function(c,d,f){if(!h.date.blockAttr){try{var b=a.datepicker.parseDate("yy-mm-dd",f)}catch(e){b=!1}b?u(a(d),b):a.prop(d,"value",f)}}}}if(!r.range||i.replaceUI)h.range=
+function(c){if(a.fn.slider){var d=a('<span class="input-range"><span class="ui-slider-handle" role="slider" tabindex="0" /></span>'),b=this.common(c,d,h.range.attrs);a("span",d).attr("aria-labelledby",b.label.attr("id"));b.label.bind("click",function(){a("span",d).focus();return!1});b.css&&(d.css(b.css),b.outerWidth&&d.outerWidth(b.outerWidth));d.slider(a.extend(!0,{},i.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,e(c[0],"input"),e(c[0],"change")});["disabled","min","max","step","value"].forEach(function(b){var d=c.attr(b),f;"value"==b&&!d&&(f=c.getShadowElement())&&(d=(a(f).slider("option","max")-a(f).slider("option","min"))/2);null!=d&&c.attr(b,d)})}},h.range.attrs={disabled:function(c,b,f){f=!!f;a(b).slider("option","disabled",f);a("span",b).attr({"aria-disabled":f+"",tabindex:f?"-1":"0"})},min:function(b,d,f){f=f?1*f||0:0;a(d).slider("option","min",f);a("span",d).attr({"aria-valuemin":f})},max:function(b,
+d,f){f=f||0===f?1*f||100:100;a(d).slider("option","max",f);a("span",d).attr({"aria-valuemax":f})},value:function(b,d,f){f=a(b).prop("valueAsNumber");isNaN(f)||(h.range.blockAttr||a(d).slider("option","value",f),a("span",d).attr({"aria-valuenow":f,"aria-valuetext":f}))},step:function(b,d,f){f=f&&a.trim(f)?1*f||1:1;a(d).slider("option","step",f)}};if(!b.bugs.valueAsNumberSet&&(i.replaceUI||!Modernizr.inputtypes.date||!Modernizr.inputtypes.range))n=function(){b.data(this,"hasShadow")&&a.prop(this,"value",
+a.prop(this,"value"))},b.onNodeNamesPropertyModify("input","valueAsNumber",n),b.onNodeNamesPropertyModify("input","valueAsDate",n);a.each(["disabled","min","max","value","step"],function(a,d){b.onNodeNamesPropertyModify("input",d,function(a){var c=b.data(this,"shadowData");if(c&&c.data&&c.data[d]&&c.nativeElement===this)c.data[d](this,c.shadowElement,a)})});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(" ");
+n=function(){a.datepicker&&(b.activeLang({langObj:a.datepicker.regional,module:"form-number-date-ui",callback:function(b){b=a.extend({},p,b,i.datepicker);a.datepicker.setDefaults(b);b.dateFormat&&i.datepicker.dateFormat!=b.dateFormat&&a("input.hasDatepicker").filter(".input-date, .input-datetime-local-date").datepicker("option","dateFormat",b.dateFormat)}}),a(k).unbind("jquery-uiReady.langchange input-widgetsReady.langchange"))};a(k).bind("jquery-uiReady.langchange input-widgetsReady.langchange",
+n);n();(function(){var c=function(){var b={};return function(c){return c in b?b[c]:b[c]=a('<input type="'+c+'" />')[0].type===c}}();if(!c("number")){var d=b.cfg["forms-ext"],f=b.inputTypes,h=function(c,d,e){e=e||{};if(!("type"in e))e.type=a.prop(c,"type");if(!("step"in e))e.step=b.getStep(c,e.type);if(!("valueAsNumber"in e))e.valueAsNumber=f[e.type].asNumber(a.prop(c,"value"));var h="any"==e.step?f[e.type].step*f[e.type].stepScaleFactor:e.step;b.addMinMaxNumberToCache("min",a(c),e);b.addMinMaxNumberToCache("max",
+a(c),e);if(isNaN(e.valueAsNumber))e.valueAsNumber=f[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)&&c<e.minAsNumber?e.valueAsNumber*d<e.minAsNumber?e.minAsNumber:isNaN(e.maxAsNumber)?e.valueAsNumber:e.maxAsNumber:!isNaN(e.maxAsNumber)&&c>e.maxAsNumber?e.valueAsNumber*d>e.maxAsNumber?e.maxAsNumber:isNaN(e.minAsNumber)?e.valueAsNumber:e.minAsNumber:
+Math.round(1E7*c)/1E7};b.modules["form-number-date-ui"].getNextStep=h;var i=function(b,c,d){if(!b.disabled&&!b.readOnly&&!a(d).hasClass("step-controls")&&(a.prop(b,"value",f[c].numberToString(h(b,a(d).hasClass("step-up")?1:-1,{type:c}))),a(b).unbind("blur.stepeventshim"),e(b,"input"),k.activeElement)){if(k.activeElement!==b)try{b.focus()}catch(i){}setTimeout(function(){if(k.activeElement!==b)try{b.focus()}catch(c){}a(b).one("blur.stepeventshim",function(){e(b,"change")})},0)}};if(d.stepArrows){var g=
+{set:function(){var a=b.data(this,"step-controls");if(a)a[this.disabled||this.readonly?"addClass":"removeClass"]("disabled-step-control")}};b.onNodeNamesPropertyModify("input","disabled",g);b.onNodeNamesPropertyModify("input","readonly",a.extend({},g))}var m={38:1,40:-1};b.addReady(function(g,j){d.stepArrows&&a("input",g).add(j.filter("input")).each(function(){var g=a.prop(this,"type");if(f[g]&&f[g].asNumber&&d.stepArrows&&!(!0!==d.stepArrows&&!d.stepArrows[g]||c(g)||a(l).hasClass("has-step-controls"))){var l=
+this,j=a('<span class="step-controls" unselectable="on"><span class="step-up" /><span class="step-down" /></span>').insertAfter(l).bind("selectstart dragstart",function(){return!1}).bind("mousedown mousepress",function(a){i(l,g,a.target);return!1}).bind("mousepressstart mousepressend",function(b){a(b.target)["mousepressstart"==b.type?"addClass":"removeClass"]("mousepress-ui")}),n=function(b,c){if(!l.disabled&&!l.readOnly)return a.prop(l,"value",f[g].numberToString(h(l,c,{type:g}))),e(l,"input"),!1},
+k=a(l).addClass("has-step-controls").attr({readonly:l.readOnly,disabled:l.disabled,autocomplete:"off",role:"spinbutton"}).bind(a.browser.msie?"keydown":"keypress",function(b){if(!l.disabled&&!l.readOnly&&m[b.keyCode])return a.prop(l,"value",f[g].numberToString(h(l,m[b.keyCode],{type:g}))),e(l,"input"),!1});a.fn.mwheelIntent?k.add(j).bind("mwheelIntent",n):k.bind("focus",function(){k.add(j).unbind(".mwhellwebshims").bind("mousewheel.mwhellwebshims",n)}).bind("blur",function(){a(l).add(j).unbind(".mwhellwebshims")});
+b.data(l,"step-controls",j);d.calculateWidth&&(s(k,j),j.css("marginTop",(k.outerHeight()-j.outerHeight())/2))}})})}})();b.addReady(function(c,d){a(k).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(k).unbind(".initinputui"):b.modules["input-widgets"].src||b.warn('jQuery UI Widget factory is already included, but not datepicker or slider. configure src of $.webshims.modules["input-widgets"].src')})})});