'),k=function(){if(l[0].querySelector)try{h.findRequired=!l[0].querySelector("select:required")}catch(a){h.findRequired=!1}},e=a("input",l).eq(0),p=function(a){f.loader.loadList(["dom-extend"]);f.ready("dom-extend",a)};h.findRequired=!1;h.validationMessage=!1;f.capturingEventPrevented=function(c){if(!c._isPolyfilled){var e=
c.isDefaultPrevented,q=c.preventDefault;c.preventDefault=function(){clearTimeout(a.data(c.target,c.type+"DefaultPrevented"));a.data(c.target,c.type+"DefaultPrevented",setTimeout(function(){a.removeData(c.target,c.type+"DefaultPrevented")},30));return q.apply(this,arguments)};c.isDefaultPrevented=function(){return!(!e.apply(this,arguments)&&!a.data(c.target,c.type+"DefaultPrevented"))};c._isPolyfilled=!0}};if(!c.formvalidation||h.bustedValidity)k();else{f.capturingEvents(["input"]);f.capturingEvents(["invalid"],
!0);if(window.opera||window.testGoodWithFix)l.appendTo("head"),k(),h.validationMessage=!e.prop("validationMessage"),f.reTest(["form-extend","form-message"]),l.remove(),a(function(){p(function(){var c=function(a){a.preventDefault()};["form","input","textarea","select"].forEach(function(e){var q=f.defineNodeNameProperty(e,"checkValidity",{prop:{value:function(){if(!f.fromSubmit)a(this).on("invalid.checkvalidity",c);f.fromCheckValidity=!0;var e=q.prop._supvalue.apply(this,arguments);f.fromSubmit||a(this).unbind("invalid.checkvalidity",
c);f.fromCheckValidity=!1;return e}}})})})});a.browser.webkit&&!f.bugs.bustedValidity&&function(){var c=/^(?:textarea|input)$/i,e=!1;document.addEventListener("contextmenu",function(a){c.test(a.target.nodeName||"")&&(e=a.target.form)&&setTimeout(function(){e=!1},1)},!1);a(window).on("invalid",function(a){if(a.originalEvent&&e&&e==a.target.form)a.wrongWebkitInvalid=!0,a.stopImmediatePropagation()})}()}})(jQuery);
jQuery.webshims.register("form-core",function(a,c,f,h,l,k){var e={radio:1},p={checkbox:1,radio:1},i=a([]),s=c.bugs,q=function(b){var b=a(b),d,c;d=i;if(e[b[0].type])c=b.prop("form"),d=(d=b[0].name)?c?a(c[d]):a(h.getElementsByName(d)).filter(function(){return!a.prop(this,"form")}):b,d=d.filter('[type="radio"]');return d},r=c.getContentValidationMessage=function(b,d,c){var g=a(b).data("errormessage")||b.getAttribute("x-moz-errormessage")||"";c&&g[c]&&(g=g[c]);"object"==typeof g&&(d=d||a.prop(b,"validity")||
{valid:1},d.valid||a.each(d,function(a,b){if(b&&"valid"!=a&&g[a])return g=g[a],!1}));if("object"==typeof g)g=g.defaultMessage;return g||""},o={number:1,range:1,date:1},b=function(b){var d=!1;a(a.prop(b,"elements")).each(function(){if(d=a(this).is(":invalid"))return!1});return d};a.extend(a.expr[":"],{"valid-element":function(d){return a.nodeName(d,"form")?!b(d):!(!a.prop(d,"willValidate")||!g(d))},"invalid-element":function(d){return a.nodeName(d,"form")?b(d):!(!a.prop(d,"willValidate")||g(d))},"required-element":function(b){return!(!a.prop(b,
"willValidate")||!a.prop(b,"required"))},"user-error":function(b){return a.prop(b,"willValidate")&&a(b).hasClass("user-error")},"optional-element":function(b){return!!(a.prop(b,"willValidate")&&!1===a.prop(b,"required"))},"in-range":function(b){if(!o[a.prop(b,"type")]||!a.prop(b,"willValidate"))return!1;b=a.prop(b,"validity");return!(!b||b.rangeOverflow||b.rangeUnderflow)},"out-of-range":function(b){if(!o[a.prop(b,"type")]||!a.prop(b,"willValidate"))return!1;b=a.prop(b,"validity");return!(!b||!b.rangeOverflow&&
!b.rangeUnderflow)}});["valid","invalid","required","optional"].forEach(function(b){a.expr[":"][b]=a.expr.filters[b+"-element"]});a.expr[":"].focus=function(a){try{var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())}catch(d){}return!1};var d=a.event.customEvent||{},g=function(b){return(a.prop(b,"validity")||{valid:1}).valid};(s.bustedValidity||s.findRequired)&&function(){var b=a.find,d=a.find.matchesSelector,c=/(\:valid|\:invalid|\:optional|\:required|\:in-range|\:out-of-range)(?=[\s\[\~\.\+\>\:\#*]|$)/ig,
g=function(a){return a+"-element"};a.find=function(){var a=Array.prototype.slice,d=function(d){var j=arguments,j=a.call(j,1,j.length);j.unshift(d.replace(c,g));return b.apply(this,j)},j;for(j in b)b.hasOwnProperty(j)&&(d[j]=b[j]);return d}();if(!Modernizr.prefixed||Modernizr.prefixed("matchesSelector",h.documentElement))a.find.matchesSelector=function(a,b){b=b.replace(c,g);return d.call(this,a,b)}}();var n=a.prop,j={selectedIndex:1,value:1,checked:1,disabled:1,readonly:1};a.prop=function(b,d,c){var e=
n.apply(this,arguments);b&&"form"in b&&j[d]&&c!==l&&a(b).hasClass(v)&&g(b)&&(a(b).getShadowElement().removeClass(u),"checked"==d&&c&&q(b).not(b).removeClass(u).removeAttr("aria-invalid"));return e};var t=function(b,d){var c;a.each(b,function(b,g){if(g)return c="customError"==b?a.prop(d,"validationMessage"):b,!1});return c},z=function(a){var b;try{b=h.activeElement.name===a}catch(d){}return b},v="user-error",u="user-error form-ui-invalid";a(h).on(k.validityUIEvents||"focusout change refreshvalidityui",
function(b){var d,c;if(b.target&&(d=a(b.target).getNativeElement()[0],"submit"!=d.type&&a.prop(d,"willValidate"))){c=a.data(d,"webshimsswitchvalidityclass");var g=function(){if(!("focusout"==b.type&&"radio"==d.type&&z(d.name))){var c=a.prop(d,"validity"),g=a(d).getShadowElement(),j,n,e,i;a(d).trigger("refreshCustomValidityRules");c.valid?g.hasClass("user-success")||(j="user-success form-ui-valid",n=u,i="changedvaliditystate",e="changedvalid",p[d.type]&&d.checked&&q(d).not(d).removeClass(n).addClass(j).removeAttr("aria-invalid"),
a.removeData(d,"webshimsinvalidcause")):(c=t(c,d),a.data(d,"webshimsinvalidcause")!=c&&(a.data(d,"webshimsinvalidcause",c),i="changedvaliditystate"),g.hasClass(v)||(j=u,n="user-success form-ui-valid",p[d.type]&&!d.checked&&q(d).not(d).removeClass(n).addClass(j),e="changedinvalid"));j&&(g.addClass(j).removeClass(n),setTimeout(function(){a(d).trigger(e)},0));i&&setTimeout(function(){a(d).trigger(i)},0);a.removeData(b.target,"webshimsswitchvalidityclass")}};c&&clearTimeout(c);"refreshvalidityui"==b.type?
g():a.data(d,"webshimsswitchvalidityclass",setTimeout(g,9))}});d.changedvaliditystate=!0;d.refreshCustomValidityRules=!0;d.changedvalid=!0;d.changedinvalid=!0;d.refreshvalidityui=!0;c.triggerInlineForm=function(b,d){a(b).trigger(d)};c.modules["form-core"].getGroupElements=q;s=function(){c.scrollRoot=a.browser.webkit||"BackCompat"==h.compatMode?a(h.body):a(h.documentElement)};s();c.ready("DOM",s);c.getRelOffset=function(b,d){var b=a(b),c=a(d).offset(),g;a.swap(a(b)[0],{visibility:"hidden",display:"inline-block",
left:0,top:0},function(){g=b.offset()});c.top-=g.top;c.left-=g.left;return c};c.validityAlert=function(){var b=!a.browser.msie||7t&&(c.scrollRoot.animate({scrollTop:t-5},{queue:!1,duration:Math.max(Math.min(600,1.5*(i-t)),80)}),f=!0);try{e[0].focus()}catch(k){}f&&(c.scrollRoot.scrollTop(i),setTimeout(function(){c.scrollRoot.scrollTop(i)},0));setTimeout(function(){a(h).on("focusout.validityalert",
n)},10)},getMessage:function(b,c){c||(c=r(b[0])||b.prop("validationMessage"));c?a("span.va-box",d).text(c):this.hide()},position:function(b,c){c=c?a.extend({},c):e.getOffsetFromBody(b);c.top+=b.outerHeight();d.css(c)},show:function(){"none"===d.css("display")&&d.css({opacity:0}).show();d.addClass("va-visible").fadeTo(400,1)},hide:function(){d.removeClass("va-visible").fadeOut()},clear:function(){clearTimeout(!1);clearTimeout(g);a(h).unbind(".validityalert");a(f).unbind(".validityalert");d.stop().removeAttr("for")},
_create:function(){if(!d)d=e.errorBubble=a("<"+b+' class="validity-alert-wrapper" role="alert">'+b+">").css({position:"absolute",display:"none"}),c.ready("DOM",function(){d.appendTo("body");a.fn.bgIframe&&a.browser.msie&&7>parseInt(a.browser.version,10)&&d.bgIframe()})}};n=a.proxy(e,"hide");return e}();(function(){var b,d=[],c;a(h).on("invalid",function(g){if(!g.wrongWebkitInvalid){var j=
a(g.target),e=j.getShadowElement();e.hasClass(v)||(e.addClass(u).removeClass("user-success form-ui-valid"),setTimeout(function(){a(g.target).trigger("changedinvalid").trigger("changedvaliditystate")},0));if(!b)b=a.Event("firstinvalid"),b.isInvalidUIPrevented=g.isDefaultPrevented,e=a.Event("firstinvalidsystem"),a(h).triggerHandler(e,{element:g.target,form:g.target.form,isInvalidUIPrevented:g.isDefaultPrevented}),j.trigger(b);b&&b.isDefaultPrevented()&&g.preventDefault();d.push(g.target);g.extraData=
"fix";clearTimeout(c);c=setTimeout(function(){var c={type:"lastinvalid",cancelable:!1,invalidlist:a(d)};b=!1;d=[];a(g.target).trigger(c,c)},9);e=j=null}})})();a.fn.getErrorMessage=function(){var b="",d=this[0];d&&(b=r(d)||a.prop(d,"customValidationMessage")||a.prop(d,"validationMessage"));return b};k.replaceValidationUI&&c.ready("DOM forms",function(){a(h).on("firstinvalid",function(b){b.isInvalidUIPrevented()||(b.preventDefault(),a.webshims.validityAlert.showFor(b.target,a(b.target).prop("customValidationMessage")))})})});
jQuery.webshims.register("form-message",function(a,c,f,h,l,k){var e=c.validityMessages,f=k.overrideMessages||k.customMessages?["customValidationMessage"]:[];e.en=a.extend(!0,{typeMismatch:{email:"Please enter an email address.",url:"Please enter a URL.",number:"Please enter a number.",date:"Please enter a date.",time:"Please enter a time.",range:"Invalid input.","datetime-local":"Please enter a datetime."},rangeUnderflow:{defaultMessage:"Value must be greater than or equal to {%min}."},rangeOverflow:{defaultMessage:"Value must be less than or equal to {%max}."},
stepMismatch:"Invalid input.",tooLong:"Please enter at most {%maxlength} character(s). You entered {%valueLen}.",patternMismatch:"Invalid input. {%title}",valueMissing:{defaultMessage:"Please fill out this field.",checkbox:"Please check this box if you want to proceed."}},e.en||e["en-US"]||{});["select","radio"].forEach(function(a){e.en.valueMissing[a]="Please select an option."});["date","time","datetime-local"].forEach(function(a){e.en.rangeUnderflow[a]="Value must be at or after {%min}."});["date",
"time","datetime-local"].forEach(function(a){e.en.rangeOverflow[a]="Value must be at or before {%max}."});e["en-US"]=e["en-US"]||e.en;e[""]=e[""]||e["en-US"];e.de=a.extend(!0,{typeMismatch:{email:"{%value} ist keine zul\u00e4ssige E-Mail-Adresse",url:"{%value} ist keine zul\u00e4ssige Webadresse",number:"{%value} ist keine Nummer!",date:"{%value} ist kein Datum",time:"{%value} ist keine Uhrzeit",range:"{%value} ist keine Nummer!","datetime-local":"{%value} ist kein Datum-Uhrzeit Format."},rangeUnderflow:{defaultMessage:"{%value} ist zu niedrig. {%min} ist der unterste Wert, den Sie benutzen k\u00f6nnen."},
rangeOverflow:{defaultMessage:"{%value} ist zu hoch. {%max} ist der oberste Wert, den Sie benutzen k\u00f6nnen."},stepMismatch:"Der Wert {%value} ist in diesem Feld nicht zul\u00e4ssig. Hier sind nur bestimmte Werte zul\u00e4ssig. {%title}",tooLong:"Der eingegebene Text ist zu lang! Sie haben {%valueLen} Zeichen eingegeben, dabei sind {%maxlength} das Maximum.",patternMismatch:"{%value} hat f\u00fcr dieses Eingabefeld ein falsches Format! {%title}",valueMissing:{defaultMessage:"Bitte geben Sie einen Wert ein",
checkbox:"Bitte aktivieren Sie das K\u00e4stchen"}},e.de||{});["select","radio"].forEach(function(a){e.de.valueMissing[a]="Bitte w\u00e4hlen Sie eine Option aus"});["date","time","datetime-local"].forEach(function(a){e.de.rangeUnderflow[a]="{%value} ist zu fr\u00fch. {%min} ist die fr\u00fcheste Zeit, die Sie benutzen k\u00f6nnen."});["date","time","datetime-local"].forEach(function(a){e.de.rangeOverflow[a]="{%value} ist zu sp\u00e4t. {%max} ist die sp\u00e4teste Zeit, die Sie benutzen k\u00f6nnen."});
var p=e[""];c.createValidationMessage=function(e,h){var f=p[h];f&&"string"!==typeof f&&(f=f[a.prop(e,"type")]||f[(e.nodeName||"").toLowerCase()]||f.defaultMessage);f&&"value,min,max,title,maxlength,label".split(",").forEach(function(k){if(-1!==f.indexOf("{%"+k)){var o=("label"==k?a.trim(a('label[for="'+e.id+'"]',e.form).text()).replace(/\*$|:$/,""):a.attr(e,k))||"";"patternMismatch"==h&&"title"==k&&!o&&c.error("no title for patternMismatch provided. Always add a title attribute.");f=f.replace("{%"+
k+"}",o);"value"==k&&(f=f.replace("{%valueLen}",o.length))}});return f||""};(c.bugs.validationMessage||!Modernizr.formvalidation||c.bugs.bustedValidity)&&f.push("validationMessage");c.activeLang({langObj:e,module:"form-core",callback:function(a){p=a}});f.forEach(function(e){c.defineNodeNamesProperty(["fieldset","output","button"],e,{prop:{value:"",writeable:!1}});["input","select","textarea"].forEach(function(f){var h=c.defineNodeNameProperty(f,e,{prop:{get:function(){var e=this,f="";if(!a.prop(e,
"willValidate"))return f;var b=a.prop(e,"validity")||{valid:1};if(b.valid||(f=c.getContentValidationMessage(e,b)))return f;if(b.customError&&e.nodeName&&(f=Modernizr.formvalidation&&!c.bugs.bustedValidity&&h.prop._supget?h.prop._supget.call(e):c.data(e,"customvalidationMessage")))return f;a.each(b,function(a,b){if("valid"!=a&&b&&(f=c.createValidationMessage(e,a)))return!1});return f||""},writeable:!1}})})})});
jQuery.webshims.register("form-datalist",function(a,c,f,h,l){c.propTypes.element=function(f){c.createPropDefault(f,"attr");if(!f.prop)f.prop={get:function(){var c=f.attr.get.call(this);c&&(c=h.getElementById(c))&&f.propNodeName&&!a.nodeName(c,f.propNodeName)&&(c=null);return c||null},writeable:!1}};(function(){var k=a.webshims.cfg.forms,e=Modernizr.input.list;if(!e||k.customDatalist){var p=0,i={submit:1,button:1,reset:1,hidden:1,range:1,date:1},s=a.browser.msie&&7>parseInt(a.browser.version,10),q=
{},r=function(a){if(!a)return[];if(q[a])return q[a];var d;try{d=JSON.parse(localStorage.getItem("storedDatalistOptions"+a))}catch(c){}q[a]=d||[];return d||[]},o={_create:function(b){if(!i[a.prop(b.input,"type")]){var d=b.datalist,c=a.data(b.input,"datalistWidget");if(d&&c&&c.datalist!==d)c.datalist=d,c.id=b.id,c.shadowList.prop("className","datalist-polyfill "+(c.datalist.className||"")+" "+c.datalist.id+"-shadowdom"),k.positionDatalist?c.shadowList.insertAfter(b.input):c.shadowList.appendTo("body"),
a(c.datalist).off("updateDatalist.datalistWidget").on("updateDatalist.datalistWidget",a.proxy(c,"_resetListCached")),c._resetListCached();else if(d){if(!(c&&c.datalist===d)){p++;var e=this;this.hideList=a.proxy(e,"hideList");this.timedHide=function(){clearTimeout(e.hideTimer);e.hideTimer=setTimeout(e.hideList,9)};this.datalist=d;this.id=b.id;this.hasViewableData=!0;this._autocomplete=a.attr(b.input,"autocomplete");a.data(b.input,"datalistWidget",this);this.shadowList=a('');k.positionDatalist||a(b.input).hasClass("position-datalist")?this.shadowList.insertAfter(b.input):this.shadowList.appendTo("body");this.index=-1;this.input=b.input;this.arrayOptions=[];this.shadowList.delegate("li","mouseenter.datalistWidget mousedown.datalistWidget click.datalistWidget",function(d){var c=a("li:not(.hidden-item)",e.shadowList),g="mousedown"==d.type||"click"==d.type;e.markItem(c.index(d.currentTarget),g,c);"click"==
d.type&&(e.hideList(),k.customDatalist&&a(b.input).trigger("datalistselect"));return"mousedown"!=d.type}).on("focusout",this.timedHide);b.input.setAttribute("autocomplete","off");a(b.input).attr({"aria-haspopup":"true"}).on({"input.datalistWidget":function(){if(!e.triggeredByDatalist)e.changedValue=!1,e.showHideOptions()},"keydown.datalistWidget":function(d){var c=d.keyCode,g;if(40==c&&!e.showList())return e.markItem(e.index+1,!0),!1;if(e.isListVisible){if(38==c)return e.markItem(e.index-1,!0),!1;
if(!d.shiftKey&&(33==c||36==c))return e.markItem(0,!0),!1;if(!d.shiftKey&&(34==c||35==c))return d=a("li:not(.hidden-item)",e.shadowList),e.markItem(d.length-1,!0,d),!1;if(13==c||27==c)return 13==c&&(g=a("li.active-item:not(.hidden-item)",e.shadowList),e.changeValue(a("li.active-item:not(.hidden-item)",e.shadowList))),e.hideList(),k.customDatalist&&g&&g[0]&&a(b.input).trigger("datalistselect"),!1}},"focus.datalistWidget":function(){a(this).hasClass("list-focus")&&e.showList()},"mousedown.datalistWidget":function(){a(this).is(":focus")&&
e.showList()},"blur.datalistWidget":this.timedHide});a(this.datalist).off("updateDatalist.datalistWidget").on("updateDatalist.datalistWidget",a.proxy(this,"_resetListCached"));this._resetListCached();if(b.input.form&&(b.input.name||b.input.id))a(b.input.form).on("submit.datalistWidget"+b.input.id,function(){if(!a(b.input).hasClass("no-datalist-cache")&&"off"!=e._autocomplete){var d=a.prop(b.input,"value"),c=(b.input.name||b.input.id)+a.prop(b.input,"type");if(!e.storedOptions)e.storedOptions=r(c);
if(d&&-1==e.storedOptions.indexOf(d)&&(e.storedOptions.push(d),d=e.storedOptions,c)){d=d||[];try{localStorage.setItem("storedDatalistOptions"+c,JSON.stringify(d))}catch(g){}}}});a(f).on("unload.datalist"+this.id+" beforeunload.datalist"+this.id,function(){e.destroy()})}}else c&&c.destroy()}},destroy:function(){var b=a.attr(this.input,"autocomplete");a(this.input).off(".datalistWidget").removeData("datalistWidget");this.shadowList.remove();a(h).off(".datalist"+this.id);a(f).off(".datalist"+this.id);
this.input.form&&this.input.id&&a(this.input.form).off("submit.datalistWidget"+this.input.id);this.input.removeAttribute("aria-haspopup");b===l?this.input.removeAttribute("autocomplete"):a(this.input).attr("autocomplete",b)},_resetListCached:function(a){var d=this,e;this.needsUpdate=!0;this.lastUpdatedValue=!1;this.lastUnfoundValue="";this.updateTimer||(f.QUnit||(e=a&&h.activeElement==d.input)?d.updateListOptions(e):c.ready("WINDOWLOAD",function(){d.updateTimer=setTimeout(function(){d.updateListOptions();
d=null;p=1},200+100*p)}))},maskHTML:function(a){return a.replace(//g,">")},updateListOptions:function(b){this.needsUpdate=!1;clearTimeout(this.updateTimer);this.updateTimer=!1;this.shadowList.css({fontSize:a.css(this.input,"fontSize"),fontFamily:a.css(this.input,"fontFamily")});this.searchStart=k.customDatalist&&a(this.input).hasClass("search-start");var d=[],c=[],e=[],f,h,i,l;for(h=a.prop(this.datalist,"options"),i=0,l=h.length;i'+this.maskHTML(h.text)+''+this.maskHTML(h.value)+"";this.arrayOptions=e;this.shadowList.html('
'+d.join("\n")+"
");a.fn.bgIframe&&s&&this.shadowList.bgIframe();(b||this.isListVisible)&&this.showHideOptions()},
showHideOptions:function(b){var d=a.prop(this.input,"value").toLowerCase();if(!(d===this.lastUpdatedValue||this.lastUnfoundValue&&0===d.indexOf(this.lastUnfoundValue))){this.lastUpdatedValue=d;var c=!1,e=this.searchStart,f=a("li",this.shadowList);d?this.arrayOptions.forEach(function(b,h){var i;if(!("lowerText"in b))b.lowerText=b.text!=b.value?b.value.toLowerCase()+b.text.toLowerCase():b.text.toLowerCase();i=b.lowerText.indexOf(d);(i=e?!i:-1!==i)?(a(f[h]).removeClass("hidden-item"),c=!0):a(f[h]).addClass("hidden-item")}):
f.length&&(f.removeClass("hidden-item"),c=!0);this.hasViewableData=c;!b&&c&&this.showList();if(!c)this.lastUnfoundValue=d,this.hideList()}},setPos:function(){this.shadowList.css({marginTop:0,marginLeft:0,marginRight:0,marginBottom:0});var b=k.positionDatalist?a(this.input).position():c.getRelOffset(this.shadowList,this.input);b.top+=a(this.input).outerHeight();b.width=a(this.input).outerWidth()-(parseInt(this.shadowList.css("borderLeftWidth"),10)||0)-(parseInt(this.shadowList.css("borderRightWidth"),
10)||0);this.shadowList.css({marginTop:"",marginLeft:"",marginRight:"",marginBottom:""}).css(b);return b},showList:function(){if(this.isListVisible)return!1;this.needsUpdate&&this.updateListOptions();this.showHideOptions(!0);if(!this.hasViewableData)return!1;this.isListVisible=!0;var b=this;b.setPos();b.shadowList.addClass("datalist-visible").find("li.active-item").removeClass("active-item");a(f).unbind(".datalist"+b.id);a(h).off(".datalist"+b.id).on("mousedown.datalist"+b.id+" focusin.datalist"+
b.id,function(d){d.target===b.input||b.shadowList[0]===d.target||a.contains(b.shadowList[0],d.target)?(clearTimeout(b.hideTimer),setTimeout(function(){clearTimeout(b.hideTimer)},9)):b.timedHide()}).on("updateshadowdom.datalist"+b.id,function(){b.setPos()});return!0},hideList:function(){if(!this.isListVisible)return!1;var b=this,d=function(){b.changedValue&&a(b.input).trigger("change");b.changedValue=!1};b.shadowList.removeClass("datalist-visible list-item-active");b.index=-1;b.isListVisible=!1;if(b.changedValue){b.triggeredByDatalist=
!0;c.triggerInlineForm&&c.triggerInlineForm(b.input,"input");if(a(b.input).is(":focus"))a(b.input).one("blur",d);else d();b.triggeredByDatalist=!1}a(h).unbind(".datalist"+b.id);a(f).off(".datalist"+b.id).one("resize.datalist"+b.id,function(){b.shadowList.css({top:0,left:0})});return!0},scrollIntoView:function(b){var d=a("ul",this.shadowList),c=a("div.datalist-box",this.shadowList),e=b.position();e.top-=(parseInt(d.css("paddingTop"),10)||0)+(parseInt(d.css("marginTop"),10)||0)+(parseInt(d.css("borderTopWidth"),
10)||0);0>e.top?c.scrollTop(c.scrollTop()+e.top-2):(e.top+=b.outerHeight(),b=c.height(),e.top>b&&c.scrollTop(c.scrollTop()+(e.top-b)+2))},changeValue:function(b){if(b[0]){var b=a("span.option-value",b).text(),d=a.prop(this.input,"value");if(b!=d)a(this.input).prop("value",b).triggerHandler("updateInput"),this.changedValue=!0}},markItem:function(b,d,c){c=c||a("li:not(.hidden-item)",this.shadowList);if(c.length)0>b?b=c.length-1:b>=c.length&&(b=0),c.removeClass("active-item"),this.shadowList.addClass("list-item-active"),
c=c.filter(":eq("+b+")").addClass("active-item"),d&&(this.changeValue(c),this.scrollIntoView(c)),this.index=b}};(function(){e||c.defineNodeNameProperty("datalist","options",{prop:{writeable:!1,get:function(){var b=a("select",this);b[0]?b=b[0].options:(b=a("option",this).get(),b.length&&c.warn("you should wrap your option-elements for a datalist in a select element to support IE and other old browsers."));return b}}});var b={autocomplete:{attr:{get:function(){var b=a.data(this,"datalistWidget");return b?
b._autocomplete:"autocomplete"in this?this.autocomplete:this.getAttribute("autocomplete")},set:function(b){var c=a.data(this,"datalistWidget");c?(c._autocomplete=b,"off"==b&&c.hideList()):"autocomplete"in this?this.autocomplete=b:this.setAttribute("autocomplete",b)}}}};e?((a("").prop("options")||[]).length||c.defineNodeNameProperty("datalist","options",{prop:{writeable:!1,get:function(){var b=this.options||[];if(!b.length){var c=a("select",this);
if(c[0]&&c[0].options&&c[0].options.length)b=c[0].options}return b}}}),b.list={attr:{get:function(){var b=c.contentAttr(this,"list");null!=b?this.removeAttribute("list"):b=a.data(this,"datalistListAttr");return null==b?l:b},set:function(b){a.data(this,"datalistListAttr",b);c.objectCreate(o,l,{input:this,id:b,datalist:a.prop(this,"list")})}},initAttr:!0,reflect:!0,propType:"element",propNodeName:"datalist"}):b.list={attr:{get:function(){var a=c.contentAttr(this,"list");return null==a?l:a},set:function(b){c.contentAttr(this,
"list",b);c.objectCreate(o,l,{input:this,id:b,datalist:a.prop(this,"list")})}},initAttr:!0,reflect:!0,propType:"element",propNodeName:"datalist"};c.defineNodeNameProperties("input",b);if(a.event.customEvent)a.event.customEvent.updateDatalist=!0,a.event.customEvent.updateInput=!0,a.event.customEvent.datalistselect=!0;c.addReady(function(a,b){b.filter("datalist > select, datalist, datalist > option, datalist > select > option").closest("datalist").triggerHandler("updateDatalist")})})()}})()});