Permalink
Browse files

added tests for input widgets/implemented label for datalist/updated …

…to jquery 1.9.1
  • Loading branch information...
1 parent 7b1c581 commit 6165a688398f387d58cc9b4bb1b4d5cee105c4c4 @aFarkas committed Mar 19, 2013
Showing with 580 additions and 561 deletions.
  1. +1 −1 demos/demos/canvas.html
  2. +1 −1 demos/demos/details.html
  3. +1 −1 demos/demos/es5.html
  4. +1 −1 demos/demos/geolocation.html
  5. +1 −1 demos/demos/json-storage.html
  6. +1 −1 demos/demos/mediaelement.html
  7. +1 −1 demos/demos/shiv.html
  8. +1 −1 demos/demos/webforms.html
  9. +1 −1 demos/demos/webforms/1-webforms-lang-custom-bubble.html
  10. +1 −0 demos/demos/webforms/3-webforms-widgets.html
  11. +1 −1 demos/demos/webforms/4-webforms-custom-validity.html
  12. +1 −1 demos/index.html
  13. +10 −10 demos/js-webshim/dev/shims/combos/3.js
  14. +10 −10 demos/js-webshim/dev/shims/combos/4.js
  15. +68 −41 demos/js-webshim/dev/shims/combos/5.js
  16. +68 −41 demos/js-webshim/dev/shims/combos/6.js
  17. +10 −10 demos/js-webshim/dev/shims/form-message.js
  18. +54 −29 demos/js-webshim/dev/shims/form-number-date-ui.js
  19. +4 −2 demos/js-webshim/dev/shims/form-shim-extend.js
  20. +4 −0 demos/js-webshim/dev/shims/i18n/formcfg-de.txt
  21. +14 −12 demos/js-webshim/dev/shims/range-ui.js
  22. +1 −1 demos/js-webshim/minified/shims/combos/3.js
  23. +1 −1 demos/js-webshim/minified/shims/combos/4.js
  24. +1 −1 demos/js-webshim/minified/shims/combos/5.js
  25. +1 −1 demos/js-webshim/minified/shims/combos/6.js
  26. +1 −201 demos/js-webshim/minified/shims/form-message.js
  27. +1 −1 demos/js-webshim/minified/shims/form-number-date-ui.js
  28. +1 −1 demos/js-webshim/minified/shims/form-shim-extend.js
  29. +4 −0 demos/js-webshim/minified/shims/i18n/formcfg-de.txt
  30. +1 −1 demos/js-webshim/minified/shims/range-ui.js
  31. +10 −10 src/shims/combos/3.js
  32. +10 −10 src/shims/combos/4.js
  33. +68 −41 src/shims/combos/5.js
  34. +68 −41 src/shims/combos/6.js
  35. +10 −10 src/shims/form-message.js
  36. +54 −29 src/shims/form-number-date-ui.js
  37. +4 −2 src/shims/form-shim-extend.js
  38. +4 −0 src/shims/i18n/formcfg-de.txt
  39. +14 −12 src/shims/range-ui.js
  40. +3 −4 tests/index.html
  41. +27 −25 tests/unit/input-ui.js
  42. +42 −3 tests/unit/progress.js
View
2 demos/demos/canvas.html
@@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link href="../css/styles.css" rel="stylesheet" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
// set options for html5shiv
View
2 demos/demos/details.html
@@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link href="../css/styles.css" rel="stylesheet" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
View
2 demos/demos/es5.html
@@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link href="../css/styles.css" rel="stylesheet" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
// set options for html5shiv
View
2 demos/demos/geolocation.html
@@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link href="../css/styles.css" rel="stylesheet" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
// set options for html5shiv
View
2 demos/demos/json-storage.html
@@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link href="../css/styles.css" rel="stylesheet" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js-webshim/minified/extras/modernizr-custom.js"></script>
<script src="../js-webshim/minified/polyfiller.js"></script>
View
2 demos/demos/mediaelement.html
@@ -16,7 +16,7 @@
font: bold;
}
</style>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
// set options for html5shiv
View
2 demos/demos/shiv.html
@@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link href="../css/styles.css" rel="stylesheet" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
// set options for html5shiv
View
2 demos/demos/webforms.html
@@ -38,7 +38,7 @@
</style>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
// set options for html5shiv
View
2 demos/demos/webforms/1-webforms-lang-custom-bubble.html
@@ -31,7 +31,7 @@
}
</style>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../../js-webshim/minified/extras/mousepress.js"></script>
<script src="../../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
View
1 demos/demos/webforms/3-webforms-widgets.html
@@ -153,6 +153,7 @@
;
};
$('> fieldset', form).on('change', createWidget);
+ form.on('submit', false);
createWidget();
});
});
View
2 demos/demos/webforms/4-webforms-custom-validity.html
@@ -21,7 +21,7 @@
}
</style>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../../js-webshim/minified/extras/mousepress.js"></script>
<script src="../../js-webshim/minified/extras/modernizr-custom.js"></script>
<script>
View
2 demos/index.html
@@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link href="css/styles.css" rel="stylesheet" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
// set options for html5shiv
if(!window.html5){
View
20 demos/js-webshim/dev/shims/combos/3.js
@@ -1760,13 +1760,13 @@ jQuery.webshims.register('form-message', function($, webshims, window, document,
validityMessages.de = $.extend(true, {
typeMismatch: {
defaultMessage: '{%value} ist in diesem Feld nicht zulässig.',
- email: '{%value} ist keine zulässige E-Mail-Adresse',
- url: '{%value} ist keine zulässige Webadresse',
- number: '{%value} ist keine Nummer!',
- date: '{%value} ist kein Datum',
- time: '{%value} ist keine Uhrzeit',
+ email: '{%value} ist keine gültige E-Mail-Adresse.',
+ url: '{%value} ist kein(e) gültige(r) Webadresse/Pfad.',
+ number: '{%value} ist keine Nummer.',
+ date: '{%value} ist kein Datum.',
+ time: '{%value} ist keine Uhrzeit.',
month: '{%value} ist in diesem Feld nicht zulässig.',
- range: '{%value} ist keine Nummer!',
+ range: '{%value} ist keine Nummer.',
"datetime-local": '{%value} ist kein Datum-Uhrzeit Format.'
},
rangeUnderflow: {
@@ -1777,16 +1777,16 @@ jQuery.webshims.register('form-message', function($, webshims, window, document,
},
stepMismatch: 'Der Wert {%value} ist in diesem Feld nicht zulässig. Hier sind nur bestimmte Werte zulässig. {%title}',
tooLong: 'Der eingegebene Text ist zu lang! Sie haben {%valueLen} Zeichen eingegeben, dabei sind {%maxlength} das Maximum.',
- patternMismatch: '{%value} hat für dieses Eingabefeld ein falsches Format! {%title}',
+ patternMismatch: '{%value} hat für dieses Eingabefeld ein falsches Format. {%title}',
valueMissing: {
- defaultMessage: 'Bitte geben Sie einen Wert ein',
- checkbox: 'Bitte aktivieren Sie das Kästchen'
+ defaultMessage: 'Bitte geben Sie einen Wert ein.',
+ checkbox: 'Bitte aktivieren Sie das Kästchen.'
}
}, (validityMessages.de || {}));
if(typeof validityMessages.de.valueMissing == 'object'){
['select', 'radio'].forEach(function(type){
- validityMessages.de.valueMissing[type] = 'Bitte wählen Sie eine Option aus';
+ validityMessages.de.valueMissing[type] = 'Bitte wählen Sie eine Option aus.';
});
}
if(typeof validityMessages.de.rangeUnderflow == 'object'){
View
20 demos/js-webshim/dev/shims/combos/4.js
@@ -1044,13 +1044,13 @@ jQuery.webshims.register('form-message', function($, webshims, window, document,
validityMessages.de = $.extend(true, {
typeMismatch: {
defaultMessage: '{%value} ist in diesem Feld nicht zulässig.',
- email: '{%value} ist keine zulässige E-Mail-Adresse',
- url: '{%value} ist keine zulässige Webadresse',
- number: '{%value} ist keine Nummer!',
- date: '{%value} ist kein Datum',
- time: '{%value} ist keine Uhrzeit',
+ email: '{%value} ist keine gültige E-Mail-Adresse.',
+ url: '{%value} ist kein(e) gültige(r) Webadresse/Pfad.',
+ number: '{%value} ist keine Nummer.',
+ date: '{%value} ist kein Datum.',
+ time: '{%value} ist keine Uhrzeit.',
month: '{%value} ist in diesem Feld nicht zulässig.',
- range: '{%value} ist keine Nummer!',
+ range: '{%value} ist keine Nummer.',
"datetime-local": '{%value} ist kein Datum-Uhrzeit Format.'
},
rangeUnderflow: {
@@ -1061,16 +1061,16 @@ jQuery.webshims.register('form-message', function($, webshims, window, document,
},
stepMismatch: 'Der Wert {%value} ist in diesem Feld nicht zulässig. Hier sind nur bestimmte Werte zulässig. {%title}',
tooLong: 'Der eingegebene Text ist zu lang! Sie haben {%valueLen} Zeichen eingegeben, dabei sind {%maxlength} das Maximum.',
- patternMismatch: '{%value} hat für dieses Eingabefeld ein falsches Format! {%title}',
+ patternMismatch: '{%value} hat für dieses Eingabefeld ein falsches Format. {%title}',
valueMissing: {
- defaultMessage: 'Bitte geben Sie einen Wert ein',
- checkbox: 'Bitte aktivieren Sie das Kästchen'
+ defaultMessage: 'Bitte geben Sie einen Wert ein.',
+ checkbox: 'Bitte aktivieren Sie das Kästchen.'
}
}, (validityMessages.de || {}));
if(typeof validityMessages.de.valueMissing == 'object'){
['select', 'radio'].forEach(function(type){
- validityMessages.de.valueMissing[type] = 'Bitte wählen Sie eine Option aus';
+ validityMessages.de.valueMissing[type] = 'Bitte wählen Sie eine Option aus.';
});
}
if(typeof validityMessages.de.rangeUnderflow == 'object'){
View
109 demos/js-webshim/dev/shims/combos/5.js
@@ -803,7 +803,7 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
},
value: $.noop,
_value: function(val, _noNormalize, animate){
- var left;
+ var left, posDif;
var o = this.options;
var oVal = val;
var thumbStyle = {};
@@ -832,11 +832,13 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
this.thumb.css(thumbStyle);
this.range.css(rangeStyle);
} else {
- if(typeof o.animate != 'object'){
- o.animate = {};
+ if(typeof animate != 'object'){
+ animate = {};
+ posDif = Math.abs(left - parseInt(this.thumb[0].style[this.dirs.left] || 50, 10));
+ animate.duration = Math.max(Math.min(999, posDif * 5), 99);
}
- this.thumb.animate(thumbStyle, o.animate);
- this.range.animate(rangeStyle, o.animate);
+ this.thumb.animate(thumbStyle, animate);
+ this.range.animate(rangeStyle, animate);
}
if(this.orig && (oVal != val || (!this._init && this.orig.value != val)) ){
this.options._change(val);
@@ -950,12 +952,12 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
}
return val;
},
- doStep: function(factor){
+ doStep: function(factor, animate){
var step = retDefault(this.options.step, 1);
if(this.options.step == 'any'){
step = Math.min(step, (this.options.max - this.options.min) / 10);
}
- this.value( this.options.value + (step * factor) );
+ this.value( this.options.value + (step * factor), false, animate );
},
@@ -1044,7 +1046,7 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
if(!widgetUnits || !leftOffset){return;}
leftOffset = leftOffset[that.dirs.pos];
widgetUnits = 100 / (widgetUnits - ((that.thumb[that.dirs.outerWidth]() || 2) / 2));
- setValueFromPos(e, that.options.animate);
+ setValueFromPos(e, o.animate);
$(document)
.on({
mouseup: remove,
@@ -1085,13 +1087,13 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
} else if (code == 37 || code == 40) {
that.doStep(-1);
} else if (code == 33) {
- that.doStep(10);
+ that.doStep(10, o.animate);
} else if (code == 34) {
- that.doStep(-10);
+ that.doStep(-10, o.animate);
} else if (code == 36) {
- that.value(that.options.max);
+ that.value(that.options.max, false, o.animate);
} else if (code == 35) {
- that.value(that.options.min);
+ that.value(that.options.min, false, o.animate);
} else {
step = false;
}
@@ -1503,10 +1505,11 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
},
getOptions: function(){
var options = {};
- $(this.orig).jProp('list').find('option').each(function(){
+ var datalist = $(this.orig).jProp('list');
+ datalist.find('option').each(function(){
options[$.prop(this, 'value')] = $.prop(this, 'label');
});
- return options;
+ return [options, datalist.data('label')];
},
list: function(val){
if(this.type == 'number' || this.type == 'time'){
@@ -1729,7 +1732,14 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
spinBtnProto[name] = function(val){
if(this.options[name] != val || !this._init){
this.options[name] = !!val;
- this.element.prop(name, this.options[name]);
+ if(name == 'readonly' && this.options.noInput){
+ this.element
+ .prop(name, true)
+ .attr({'aria-readonly': this.options[name]})
+ ;
+ } else {
+ this.element.prop(name, this.options[name]);
+ }
this.buttonWrapper[this.options[name] ? 'addClass' : 'removeClass']('ws-'+name);
}
};
@@ -1772,15 +1782,16 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
this.activeButton = element.attr({tabindex: '0', 'aria-selected': 'true'});
this.index = this.buttons.index(this.activeButton[0]);
- if(!_noFocus){
- clearTimeout(this.timer);
+
+ clearTimeout(this.timer);
+
+ if(!this.popover.openedByFocus && !_noFocus){
this.popover.activateElement(element);
- if(!this.popover.openedByFocus){
- this.timer = setTimeout(function(){
- element[0].focus();
- }, this.popover.isVisible ? 20 : 99);
- }
+ this.timer = setTimeout(function(){
+ element[0].focus();
+ }, this.popover.isVisible ? 20 : 99);
}
+
};
var _initialFocus = function(){
@@ -2490,20 +2501,27 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
});
return false;
};
+ var id = new Date().getTime();
var generateList = function(o, max, min){
var options = [];
-
+ var label = '';
+ var labelId = '';
o.options = data.getOptions() || {};
$('div.ws-options', popover.contentElement).remove();
- $.each(o.options, function(val, label){
+ $.each(o.options[0], function(val, label){
var disabled = picker.isInRange(val.split('-'), o.maxS, o.minS) ?
'' :
' disabled="" '
options.push('<li role="presentation"><button value="'+ val +'" '+disabled+' data-action="changeInput" tabindex="-1" role="option">'+ (label || data.formatValue(val)) +'</button></li>');
});
if(options.length){
-
- new webshims.ListBox($('<div class="ws-options"><ul role="listbox">'+ options.join('') +'</div>').insertAfter(popover.bodyElement)[0], popover, {noFocus: true});
+ id++;
+ if(o.options[1]){
+ labelId = 'datalist-'+id;
+ label = '<h5 id="'+labelId+'">'+ o.options[1] +'</h5>';
+ labelId = ' aria-labelledbyid="'+ labelId +'" ';
+ }
+ new webshims.ListBox($('<div class="ws-options">'+label+'<ul role="listbox" '+ labelId +'>'+ options.join('') +'</div>').insertAfter(popover.bodyElement)[0], popover, {noFocus: true});
}
};
var updateContent = function(){
@@ -2721,20 +2739,28 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
})
;
- data.element.on({
- focus: function(){
- if(data.options.openOnFocus){
- popover.openedByFocus = true;
- show();
- }
- },
- mousedown: function(){
- if(data.element.is(':focus')){
- popover.openedByFocus = true;
- show();
+ (function(){
+ var mouseFocus = false;
+ var resetMouseFocus = function(){
+ mouseFocus = false;
+ };
+ data.element.on({
+ focus: function(){
+ if(data.options.openOnFocus || (mouseFocus && options.openOnMouseFocus)){
+ popover.openedByFocus = !options.noInput;
+ show();
+ }
+ },
+ mousedown: function(){
+ mouseFocus = true;
+ setTimeout(resetMouseFocus, 9);
+ if(data.element.is(':focus')){
+ popover.openedByFocus = !options.noInput;
+ show();
+ }
}
- }
- });
+ });
+ })();
data.popover = popover;
};
@@ -2760,11 +2786,12 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
'max',
'step',
'title',
- 'placeholder'
+ 'placeholder',
+ 'tabindex'
];
//
- var copyAttrs = ['tabindex', 'data-placeholder'];
+ var copyAttrs = ['data-placeholder'];
$.each(copyProps.concat(copyAttrs), function(i, name){
var fnName = name.replace(/^data\-/, '');
View
109 demos/js-webshim/dev/shims/combos/6.js
@@ -803,7 +803,7 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
},
value: $.noop,
_value: function(val, _noNormalize, animate){
- var left;
+ var left, posDif;
var o = this.options;
var oVal = val;
var thumbStyle = {};
@@ -832,11 +832,13 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
this.thumb.css(thumbStyle);
this.range.css(rangeStyle);
} else {
- if(typeof o.animate != 'object'){
- o.animate = {};
+ if(typeof animate != 'object'){
+ animate = {};
+ posDif = Math.abs(left - parseInt(this.thumb[0].style[this.dirs.left] || 50, 10));
+ animate.duration = Math.max(Math.min(999, posDif * 5), 99);
}
- this.thumb.animate(thumbStyle, o.animate);
- this.range.animate(rangeStyle, o.animate);
+ this.thumb.animate(thumbStyle, animate);
+ this.range.animate(rangeStyle, animate);
}
if(this.orig && (oVal != val || (!this._init && this.orig.value != val)) ){
this.options._change(val);
@@ -950,12 +952,12 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
}
return val;
},
- doStep: function(factor){
+ doStep: function(factor, animate){
var step = retDefault(this.options.step, 1);
if(this.options.step == 'any'){
step = Math.min(step, (this.options.max - this.options.min) / 10);
}
- this.value( this.options.value + (step * factor) );
+ this.value( this.options.value + (step * factor), false, animate );
},
@@ -1044,7 +1046,7 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
if(!widgetUnits || !leftOffset){return;}
leftOffset = leftOffset[that.dirs.pos];
widgetUnits = 100 / (widgetUnits - ((that.thumb[that.dirs.outerWidth]() || 2) / 2));
- setValueFromPos(e, that.options.animate);
+ setValueFromPos(e, o.animate);
$(document)
.on({
mouseup: remove,
@@ -1085,13 +1087,13 @@ jQuery.webshims.register('form-number-date-api', function($, webshims, window, d
} else if (code == 37 || code == 40) {
that.doStep(-1);
} else if (code == 33) {
- that.doStep(10);
+ that.doStep(10, o.animate);
} else if (code == 34) {
- that.doStep(-10);
+ that.doStep(-10, o.animate);
} else if (code == 36) {
- that.value(that.options.max);
+ that.value(that.options.max, false, o.animate);
} else if (code == 35) {
- that.value(that.options.min);
+ that.value(that.options.min, false, o.animate);
} else {
step = false;
}
@@ -1503,10 +1505,11 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
},
getOptions: function(){
var options = {};
- $(this.orig).jProp('list').find('option').each(function(){
+ var datalist = $(this.orig).jProp('list');
+ datalist.find('option').each(function(){
options[$.prop(this, 'value')] = $.prop(this, 'label');
});
- return options;
+ return [options, datalist.data('label')];
},
list: function(val){
if(this.type == 'number' || this.type == 'time'){
@@ -1729,7 +1732,14 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
spinBtnProto[name] = function(val){
if(this.options[name] != val || !this._init){
this.options[name] = !!val;
- this.element.prop(name, this.options[name]);
+ if(name == 'readonly' && this.options.noInput){
+ this.element
+ .prop(name, true)
+ .attr({'aria-readonly': this.options[name]})
+ ;
+ } else {
+ this.element.prop(name, this.options[name]);
+ }
this.buttonWrapper[this.options[name] ? 'addClass' : 'removeClass']('ws-'+name);
}
};
@@ -1772,15 +1782,16 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
this.activeButton = element.attr({tabindex: '0', 'aria-selected': 'true'});
this.index = this.buttons.index(this.activeButton[0]);
- if(!_noFocus){
- clearTimeout(this.timer);
+
+ clearTimeout(this.timer);
+
+ if(!this.popover.openedByFocus && !_noFocus){
this.popover.activateElement(element);
- if(!this.popover.openedByFocus){
- this.timer = setTimeout(function(){
- element[0].focus();
- }, this.popover.isVisible ? 20 : 99);
- }
+ this.timer = setTimeout(function(){
+ element[0].focus();
+ }, this.popover.isVisible ? 20 : 99);
}
+
};
var _initialFocus = function(){
@@ -2490,20 +2501,27 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
});
return false;
};
+ var id = new Date().getTime();
var generateList = function(o, max, min){
var options = [];
-
+ var label = '';
+ var labelId = '';
o.options = data.getOptions() || {};
$('div.ws-options', popover.contentElement).remove();
- $.each(o.options, function(val, label){
+ $.each(o.options[0], function(val, label){
var disabled = picker.isInRange(val.split('-'), o.maxS, o.minS) ?
'' :
' disabled="" '
options.push('<li role="presentation"><button value="'+ val +'" '+disabled+' data-action="changeInput" tabindex="-1" role="option">'+ (label || data.formatValue(val)) +'</button></li>');
});
if(options.length){
-
- new webshims.ListBox($('<div class="ws-options"><ul role="listbox">'+ options.join('') +'</div>').insertAfter(popover.bodyElement)[0], popover, {noFocus: true});
+ id++;
+ if(o.options[1]){
+ labelId = 'datalist-'+id;
+ label = '<h5 id="'+labelId+'">'+ o.options[1] +'</h5>';
+ labelId = ' aria-labelledbyid="'+ labelId +'" ';
+ }
+ new webshims.ListBox($('<div class="ws-options">'+label+'<ul role="listbox" '+ labelId +'>'+ options.join('') +'</div>').insertAfter(popover.bodyElement)[0], popover, {noFocus: true});
}
};
var updateContent = function(){
@@ -2721,20 +2739,28 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
})
;
- data.element.on({
- focus: function(){
- if(data.options.openOnFocus){
- popover.openedByFocus = true;
- show();
- }
- },
- mousedown: function(){
- if(data.element.is(':focus')){
- popover.openedByFocus = true;
- show();
+ (function(){
+ var mouseFocus = false;
+ var resetMouseFocus = function(){
+ mouseFocus = false;
+ };
+ data.element.on({
+ focus: function(){
+ if(data.options.openOnFocus || (mouseFocus && options.openOnMouseFocus)){
+ popover.openedByFocus = !options.noInput;
+ show();
+ }
+ },
+ mousedown: function(){
+ mouseFocus = true;
+ setTimeout(resetMouseFocus, 9);
+ if(data.element.is(':focus')){
+ popover.openedByFocus = !options.noInput;
+ show();
+ }
}
- }
- });
+ });
+ })();
data.popover = popover;
};
@@ -2760,11 +2786,12 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
'max',
'step',
'title',
- 'placeholder'
+ 'placeholder',
+ 'tabindex'
];
//
- var copyAttrs = ['tabindex', 'data-placeholder'];
+ var copyAttrs = ['data-placeholder'];
$.each(copyProps.concat(copyAttrs), function(i, name){
var fnName = name.replace(/^data\-/, '');
View
20 demos/js-webshim/dev/shims/form-message.js
@@ -53,13 +53,13 @@ jQuery.webshims.register('form-message', function($, webshims, window, document,
validityMessages.de = $.extend(true, {
typeMismatch: {
defaultMessage: '{%value} ist in diesem Feld nicht zulässig.',
- email: '{%value} ist keine zulässige E-Mail-Adresse',
- url: '{%value} ist keine zulässige Webadresse',
- number: '{%value} ist keine Nummer!',
- date: '{%value} ist kein Datum',
- time: '{%value} ist keine Uhrzeit',
+ email: '{%value} ist keine gültige E-Mail-Adresse.',
+ url: '{%value} ist kein(e) gültige(r) Webadresse/Pfad.',
+ number: '{%value} ist keine Nummer.',
+ date: '{%value} ist kein Datum.',
+ time: '{%value} ist keine Uhrzeit.',
month: '{%value} ist in diesem Feld nicht zulässig.',
- range: '{%value} ist keine Nummer!',
+ range: '{%value} ist keine Nummer.',
"datetime-local": '{%value} ist kein Datum-Uhrzeit Format.'
},
rangeUnderflow: {
@@ -70,16 +70,16 @@ jQuery.webshims.register('form-message', function($, webshims, window, document,
},
stepMismatch: 'Der Wert {%value} ist in diesem Feld nicht zulässig. Hier sind nur bestimmte Werte zulässig. {%title}',
tooLong: 'Der eingegebene Text ist zu lang! Sie haben {%valueLen} Zeichen eingegeben, dabei sind {%maxlength} das Maximum.',
- patternMismatch: '{%value} hat für dieses Eingabefeld ein falsches Format! {%title}',
+ patternMismatch: '{%value} hat für dieses Eingabefeld ein falsches Format. {%title}',
valueMissing: {
- defaultMessage: 'Bitte geben Sie einen Wert ein',
- checkbox: 'Bitte aktivieren Sie das Kästchen'
+ defaultMessage: 'Bitte geben Sie einen Wert ein.',
+ checkbox: 'Bitte aktivieren Sie das Kästchen.'
}
}, (validityMessages.de || {}));
if(typeof validityMessages.de.valueMissing == 'object'){
['select', 'radio'].forEach(function(type){
- validityMessages.de.valueMissing[type] = 'Bitte wählen Sie eine Option aus';
+ validityMessages.de.valueMissing[type] = 'Bitte wählen Sie eine Option aus.';
});
}
if(typeof validityMessages.de.rangeUnderflow == 'object'){
View
83 demos/js-webshim/dev/shims/form-number-date-ui.js
@@ -355,10 +355,11 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
},
getOptions: function(){
var options = {};
- $(this.orig).jProp('list').find('option').each(function(){
+ var datalist = $(this.orig).jProp('list');
+ datalist.find('option').each(function(){
options[$.prop(this, 'value')] = $.prop(this, 'label');
});
- return options;
+ return [options, datalist.data('label')];
},
list: function(val){
if(this.type == 'number' || this.type == 'time'){
@@ -581,7 +582,14 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
spinBtnProto[name] = function(val){
if(this.options[name] != val || !this._init){
this.options[name] = !!val;
- this.element.prop(name, this.options[name]);
+ if(name == 'readonly' && this.options.noInput){
+ this.element
+ .prop(name, true)
+ .attr({'aria-readonly': this.options[name]})
+ ;
+ } else {
+ this.element.prop(name, this.options[name]);
+ }
this.buttonWrapper[this.options[name] ? 'addClass' : 'removeClass']('ws-'+name);
}
};
@@ -624,15 +632,16 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
this.activeButton = element.attr({tabindex: '0', 'aria-selected': 'true'});
this.index = this.buttons.index(this.activeButton[0]);
- if(!_noFocus){
- clearTimeout(this.timer);
+
+ clearTimeout(this.timer);
+
+ if(!this.popover.openedByFocus && !_noFocus){
this.popover.activateElement(element);
- if(!this.popover.openedByFocus){
- this.timer = setTimeout(function(){
- element[0].focus();
- }, this.popover.isVisible ? 20 : 99);
- }
+ this.timer = setTimeout(function(){
+ element[0].focus();
+ }, this.popover.isVisible ? 20 : 99);
}
+
};
var _initialFocus = function(){
@@ -1342,20 +1351,27 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
});
return false;
};
+ var id = new Date().getTime();
var generateList = function(o, max, min){
var options = [];
-
+ var label = '';
+ var labelId = '';
o.options = data.getOptions() || {};
$('div.ws-options', popover.contentElement).remove();
- $.each(o.options, function(val, label){
+ $.each(o.options[0], function(val, label){
var disabled = picker.isInRange(val.split('-'), o.maxS, o.minS) ?
'' :
' disabled="" '
options.push('<li role="presentation"><button value="'+ val +'" '+disabled+' data-action="changeInput" tabindex="-1" role="option">'+ (label || data.formatValue(val)) +'</button></li>');
});
if(options.length){
-
- new webshims.ListBox($('<div class="ws-options"><ul role="listbox">'+ options.join('') +'</div>').insertAfter(popover.bodyElement)[0], popover, {noFocus: true});
+ id++;
+ if(o.options[1]){
+ labelId = 'datalist-'+id;
+ label = '<h5 id="'+labelId+'">'+ o.options[1] +'</h5>';
+ labelId = ' aria-labelledbyid="'+ labelId +'" ';
+ }
+ new webshims.ListBox($('<div class="ws-options">'+label+'<ul role="listbox" '+ labelId +'>'+ options.join('') +'</div>').insertAfter(popover.bodyElement)[0], popover, {noFocus: true});
}
};
var updateContent = function(){
@@ -1573,20 +1589,28 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
})
;
- data.element.on({
- focus: function(){
- if(data.options.openOnFocus){
- popover.openedByFocus = true;
- show();
- }
- },
- mousedown: function(){
- if(data.element.is(':focus')){
- popover.openedByFocus = true;
- show();
+ (function(){
+ var mouseFocus = false;
+ var resetMouseFocus = function(){
+ mouseFocus = false;
+ };
+ data.element.on({
+ focus: function(){
+ if(data.options.openOnFocus || (mouseFocus && options.openOnMouseFocus)){
+ popover.openedByFocus = !options.noInput;
+ show();
+ }
+ },
+ mousedown: function(){
+ mouseFocus = true;
+ setTimeout(resetMouseFocus, 9);
+ if(data.element.is(':focus')){
+ popover.openedByFocus = !options.noInput;
+ show();
+ }
}
- }
- });
+ });
+ })();
data.popover = popover;
};
@@ -1612,11 +1636,12 @@ jQuery.webshims.register('form-number-date-ui', function($, webshims, window, do
'max',
'step',
'title',
- 'placeholder'
+ 'placeholder',
+ 'tabindex'
];
//
- var copyAttrs = ['tabindex', 'data-placeholder'];
+ var copyAttrs = ['data-placeholder'];
$.each(copyProps.concat(copyAttrs), function(i, name){
var fnName = name.replace(/^data\-/, '');
View
6 demos/js-webshim/dev/shims/form-shim-extend.js
@@ -1088,6 +1088,7 @@ if(!Modernizr.formattribute || !Modernizr.fieldsetdisabled){
};
$.each({value: 0, max: 1}, function(name, defValue){
+ var removeProp = (name == 'value' && !$.fn.finish);
desc[name] = {
attr: {
set: function(value){
@@ -1101,10 +1102,12 @@ if(!Modernizr.formattribute || !Modernizr.fieldsetdisabled){
removeAttr: {
value: function(){
this.removeAttribute(name);
+ if(removeProp){
+ delete this.value;
+ }
updateProgress.isInChange = name;
updateProgress(this);
updateProgress.isInChange = false;
- console.log('removeAttr', this, arguments)
}
},
prop: {
@@ -1121,7 +1124,6 @@ if(!Modernizr.formattribute || !Modernizr.fieldsetdisabled){
return ret;
},
set: function(value){
- console.log('prop', value, arguments)
return desc[name].attr.set.call(this, value * 1);
}
}
View
4 demos/js-webshim/dev/shims/i18n/formcfg-de.txt
@@ -47,8 +47,12 @@ jQuery.webshims.formcfg.de = {
patterns: {
d: "dd.mm.yy"
},
+ month: {
+ currentText: 'Aktueller Monat'
+ },
date: {
close: 'schließen',
+ clear: 'Löschen',
prevText: 'zurück',
nextText: 'Vor',
currentText: 'heute',
View
26 demos/js-webshim/dev/shims/range-ui.js
@@ -37,7 +37,7 @@
},
value: $.noop,
_value: function(val, _noNormalize, animate){
- var left;
+ var left, posDif;
var o = this.options;
var oVal = val;
var thumbStyle = {};
@@ -66,11 +66,13 @@
this.thumb.css(thumbStyle);
this.range.css(rangeStyle);
} else {
- if(typeof o.animate != 'object'){
- o.animate = {};
+ if(typeof animate != 'object'){
+ animate = {};
+ posDif = Math.abs(left - parseInt(this.thumb[0].style[this.dirs.left] || 50, 10));
+ animate.duration = Math.max(Math.min(999, posDif * 5), 99);
}
- this.thumb.animate(thumbStyle, o.animate);
- this.range.animate(rangeStyle, o.animate);
+ this.thumb.animate(thumbStyle, animate);
+ this.range.animate(rangeStyle, animate);
}
if(this.orig && (oVal != val || (!this._init && this.orig.value != val)) ){
this.options._change(val);
@@ -184,12 +186,12 @@
}
return val;
},
- doStep: function(factor){
+ doStep: function(factor, animate){
var step = retDefault(this.options.step, 1);
if(this.options.step == 'any'){
step = Math.min(step, (this.options.max - this.options.min) / 10);
}
- this.value( this.options.value + (step * factor) );
+ this.value( this.options.value + (step * factor), false, animate );
},
@@ -278,7 +280,7 @@
if(!widgetUnits || !leftOffset){return;}
leftOffset = leftOffset[that.dirs.pos];
widgetUnits = 100 / (widgetUnits - ((that.thumb[that.dirs.outerWidth]() || 2) / 2));
- setValueFromPos(e, that.options.animate);
+ setValueFromPos(e, o.animate);
$(document)
.on({
mouseup: remove,
@@ -319,13 +321,13 @@
} else if (code == 37 || code == 40) {
that.doStep(-1);
} else if (code == 33) {
- that.doStep(10);
+ that.doStep(10, o.animate);
} else if (code == 34) {
- that.doStep(-10);
+ that.doStep(-10, o.animate);
} else if (code == 36) {
- that.value(that.options.max);
+ that.value(that.options.max, false, o.animate);
} else if (code == 35) {
- that.value(that.options.min);
+ that.value(that.options.min, false, o.animate);
} else {
step = false;
}
View
2 demos/js-webshim/minified/shims/combos/3.js
@@ -1 +1 @@
-jQuery.webshims.register("dom-extend",function(e,t,n,r,i){"use strict";e("<form />").attr("novalidate")===""&&t.warn("IE browser modes are busted in IE10. Please test your HTML/CSS/JS with a real IE version or at least IETester or similiar tools");var s=t.modules,o=/\s*,\s*/,u={},a={},f={},l={},c={},h=e.fn.val,p=function(t,n,r,i,s){return s?h.call(e(t)):h.call(e(t),r)};e.fn.val=function(t){var n=this[0];arguments.length&&t==null&&(t="");if(!arguments.length)return!n||n.nodeType!==1?h.call(this):e.prop(n,"value",t,"val",!0);if(e.isArray(t))return h.apply(this,arguments);var r=e.isFunction(t);return this.each(function(s){n=this;if(n.nodeType===1)if(r){var o=t.call(n,s,e.prop(n,"value",i,"val",!0));o==null&&(o=""),e.prop(n,"value",o,"val")}else e.prop(n,"value",t,"val")})},e.fn.onTrigger=function(e,t){return this.on(e,t).each(t)};var d="_webshimsLib"+Math.round(Math.random()*1e3),v=function(t,n,r){t=t.jquery?t[0]:t;if(!t)return r||{};var s=e.data(t,d);return r!==i&&(s||(s=e.data(t,d,{})),n&&(s[n]=r)),n?s&&s[n]:s};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(t){e.fn[t.name]=function(){return this.map(function(){var e=v(this,"shadowData");return e&&e[t.prop]||this})}}),e.Tween.propHooks._default&&e.extend(e.Tween.propHooks._default,{get:function(t){var n;return t.elem[t.prop]==null&&!a[t.prop]||!!t.elem.style&&t.elem.style[t.prop]!=null?(n=jQuery.css(t.elem,t.prop,""),!n||n==="auto"?0:n):a[t.prop]?e.prop(t.elem,t.prop):t.elem[t.prop]},set:function(t){jQuery.fx.step[t.prop]?jQuery.fx.step[t.prop](t):t.elem.style&&(t.elem.style[jQuery.cssProps[t.prop]]!=null||jQuery.cssHooks[t.prop])?jQuery.style(t.elem,t.prop,t.now+t.unit):a[t.prop]?e.prop(t.elem,t.prop,t.now):t.elem[t.prop]=t.now}}),["removeAttr","prop","attr"].forEach(function(n){u[n]=e[n],e[n]=function(t,r,s,o,l){var h=o=="val",d=h?p:u[n];if(!t||!a[r]||t.nodeType!==1||!h&&o&&n=="attr"&&e.attrFn[r])return d(t,r,s,o,l);var v=(t.nodeName||"").toLowerCase(),m=f[v],g=n!="attr"||s!==!1&&s!==null?n:"removeAttr",y,b,w;m||(m=f["*"]),m&&(m=m[r]),m&&(y=m[g]);if(y){r=="value"&&(b=y.isVal,y.isVal=h);if(g==="removeAttr")return y.value.call(t);if(s===i)return y.get?y.get.call(t):y.value;y.set&&(n=="attr"&&s===!0&&(s=r),w=y.set.call(t,s)),r=="value"&&(y.isVal=b)}else w=d(t,r,s,o,l);if((s!==i||g==="removeAttr")&&c[v]&&c[v][r]){var E;g=="removeAttr"?E=!1:g=="prop"?E=!!s:E=!0,c[v][r].forEach(function(e){(!e.only||(e.only=n=="prop")||e.only=="attr"&&n!="prop")&&e.call(t,s,E,h?"val":g,n)})}return w},l[n]=function(e,r,s){f[e]||(f[e]={}),f[e][r]||(f[e][r]={});var o=f[e][r][n],a=function(e,t,i){return t&&t[e]?t[e]:i&&i[e]?i[e]:n=="prop"&&r=="value"?function(e){var t=this;return s.isVal?p(t,r,e,!1,arguments.length===0):u[n](t,r,e)}:n=="prop"&&e=="value"&&s.value.apply?function(e){var t=u[n](this,r);return t&&t.apply&&(t=t.apply(this,arguments)),t}:function(e){return u[n](this,r,e)}};f[e][r][n]=s,s.value===i&&(s.set||(s.set=s.writeable?a("set",s,o):t.cfg.useStrict&&r=="prop"?function(){throw r+" is readonly on "+e}:function(){t.info(r+" is readonly on "+e)}),s.get||(s.get=a("get",s,o))),["value","get","set"].forEach(function(e){s[e]&&(s["_sup"+e]=a(e,o))})}});var m=function(){var e=t.getPrototypeOf(r.createElement("foobar")),n=Object.prototype.hasOwnProperty,i=Modernizr.advancedObjectProperties&&Modernizr.objectAccessor;return function(s,o,u){var a,f;if(i&&(a=r.createElement(s))&&(f=t.getPrototypeOf(a))&&e!==f&&(!a[o]||!n.call(a,o))){var l=a[o];u._supvalue=function(){return l&&l.apply?l.apply(this,arguments):l},f[o]=u.value}else u._supvalue=function(){var e=v(this,"propValue");return e&&e[o]&&e[o].apply?e[o].apply(this,arguments):e&&e[o]},g.extendValue(s,o,u.value);u.value._supvalue=u._supvalue}}(),g=function(){var n={};t.addReady(function(r,i){var s={},o=function(t){s[t]||(s[t]=e(r.getElementsByTagName(t)),i[0]&&e.nodeName(i[0],t)&&(s[t]=s[t].add(i)))};e.each(n,function(e,n){o(e);if(!n||!n.forEach){t.warn("Error: with "+e+"-property. methods: "+n);return}n.forEach(function(t){s[e].each(t)})}),s=null});var i,s=e([]),o=function(t,s){n[t]?n[t].push(s):n[t]=[s],e.isDOMReady&&(i||e(r.getElementsByTagName(t))).each(s)},u={};return{createTmpCache:function(t){return e.isDOMReady&&(i=i||e(r.getElementsByTagName(t))),i||s},flushTmpCache:function(){i=null},content:function(t,n){o(t,function(){var t=e.attr(this,n);t!=null&&e.attr(this,n,t)})},createElement:function(e,t){o(e,t)},extendValue:function(t,n,r){o(t,function(){e(this).each(function(){var e=v(this,"propValue",{});e[n]=this[n],this[n]=r})})}}}(),y=function(e,t){e.defaultValue===i&&(e.defaultValue=""),e.removeAttr||(e.removeAttr={value:function(){e[t||"prop"].set.call(this,e.defaultValue),e.removeAttr._supvalue.call(this)}}),e.attr||(e.attr={})};e.extend(t,{getID:function(){var t=(new Date).getTime();return function(n){n=e(n);var r=n.prop("id");return r||(t++,r="ID-"+t,n.eq(0).prop("id",r)),r}}(),extendUNDEFProp:function(t,n){e.each(n,function(e,n){e in t||(t[e]=n)})},createPropDefault:y,data:v,moveToFirstEvent:function(t,n,r){var i=(e._data(t,"events")||{})[n],s;i&&i.length>1&&(s=i.pop(),r||(r="bind"),r=="bind"&&i.delegateCount?i.splice(i.delegateCount,0,s):i.unshift(s)),t=null},addShadowDom:function(){var i,s,o,u={init:!1,runs:0,test:function(){var e=u.getHeight(),t=u.getWidth();e!=u.height||t!=u.width?(u.height=e,u.width=t,u.handler({type:"docresize"}),u.runs++,u.runs<9&&setTimeout(u.test,90)):u.runs=0},handler:function(t){clearTimeout(i),i=setTimeout(function(){if(t.type=="resize"){var i=e(n).width(),a=e(n).width();if(a==s&&i==o)return;s=a,o=i,u.height=u.getHeight(),u.width=u.getWidth()}e(r).triggerHandler("updateshadowdom")},t.type=="resize"?50:9)},_create:function(){e.each({Height:"getHeight",Width:"getWidth"},function(e,t){var n=r.body,i=r.documentElement;u[t]=function(){return Math.max(n["scroll"+e],i["scroll"+e],n["offset"+e],i["offset"+e],i["client"+e])}})},start:function(){!this.init&&r.body&&(this.init=!0,this._create(),this.height=u.getHeight(),this.width=u.getWidth(),setInterval(this.test,600),e(this.test),t.ready("WINDOWLOAD",this.test),e(n).bind("resize",this.handler),function(){var t=e.fn.animate,n;e.fn.animate=function(){return clearTimeout(n),n=setTimeout(function(){u.test()},99),t.apply(this,arguments)}}())}};return t.docObserve=function(){t.ready("DOM",function(){u.start()})},function(n,r,i){i=i||{},n.jquery&&(n=n[0]),r.jquery&&(r=r[0]);var s=e.data(n,d)||e.data(n,d,{}),o=e.data(r,d)||e.data(r,d,{}),u={};i.shadowFocusElement?i.shadowFocusElement&&(i.shadowFocusElement.jquery&&(i.shadowFocusElement=i.shadowFocusElement[0]),u=e.data(i.shadowFocusElement,d)||e.data(i.shadowFocusElement,d,u)):i.shadowFocusElement=r,s.hasShadow=r,u.nativeElement=o.nativeElement=n,u.shadowData=o.shadowData=s.shadowData={nativeElement:n,shadowElement:r,shadowFocusElement:i.shadowFocusElement},i.shadowChilds&&i.shadowChilds.each(function(){v(this,"shadowData",o.shadowData)}),i.data&&(u.shadowData.data=o.shadowData.data=s.shadowData.data=i.data),i=null,t.docObserve()}}(),propTypes:{standard:function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,""+t)},get:function(){return e.attr.get.call(this)||e.defaultValue}}},"boolean":function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){t?e.attr.set.call(this,""):e.removeAttr.value.call(this)},get:function(){return e.attr.get.call(this)!=null}}},src:function(){var t=r.createElement("a");return t.style.display="none",function(n,r){y(n);if(n.prop)return;n.prop={set:function(e){n.attr.set.call(this,e)},get:function(){var n=this.getAttribute(r),i;if(n==null)return"";t.setAttribute("href",n+"");if(!e.support.hrefNormalized){try{e(t).insertAfter(this),i=t.getAttribute("href",4)}catch(s){i=t.getAttribute("href",4)}e(t).detach()}return i||t.href}}}}(),enumarated:function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,t)},get:function(){var t=(e.attr.get.call(this)||"").toLowerCase();if(!t||e.limitedTo.indexOf(t)==-1)t=e.defaultValue;return t}}}},reflectProperties:function(n,r){typeof r=="string"&&(r=r.split(o)),r.forEach(function(r){t.defineNodeNamesProperty(n,r,{prop:{set:function(t){e.attr(this,r,t)},get:function(){return e.attr(this,r)||""}}})})},defineNodeNameProperty:function(n,r,i){return a[r]=!0,i.reflect&&t.propTypes[i.propType||"standard"](i,r),["prop","attr","removeAttr"].forEach(function(s){var o=i[s];o&&(s==="prop"?o=e.extend({writeable:!0},o):o=e.extend({},o,{writeable:!0}),l[s](n,r,o),n!="*"&&t.cfg.extendNative&&s=="prop"&&o.value&&e.isFunction(o.value)&&m(n,r,o),i[s]=o)}),i.initAttr&&g.content(n,r),i},defineNodeNameProperties:function(e,n,r,i){var s;for(var o in n)!i&&n[o].initAttr&&g.createTmpCache(e),r&&(n[o][r]||(n[o][r]={},["value","set","get"].forEach(function(e){e in n[o]&&(n[o][r][e]=n[o][e],delete n[o][e])}))),n[o]=t.defineNodeNameProperty(e,o,n[o]);return i||g.flushTmpCache(),n},createElement:function(n,r,i){var s;return e.isFunction(r)&&(r={after:r}),g.createTmpCache(n),r.before&&g.createElement(n,r.before),i&&(s=t.defineNodeNameProperties(n,i,!1,!0)),r.after&&g.createElement(n,r.after),g.flushTmpCache(),s},onNodeNamesPropertyModify:function(t,n,r,i){typeof t=="string"&&(t=t.split(o)),e.isFunction(r)&&(r={set:r}),t.forEach(function(e){c[e]||(c[e]={}),typeof n=="string"&&(n=n.split(o)),r.initAttr&&g.createTmpCache(e),n.forEach(function(t){c[e][t]||(c[e][t]=[],a[t]=!0),r.set&&(i&&(r.set.only=i),c[e][t].push(r.set)),r.initAttr&&g.content(e,t)}),g.flushTmpCache()})},defineNodeNamesBooleanProperty:function(n,r,s){s||(s={}),e.isFunction(s)&&(s.set=s),t.defineNodeNamesProperty(n,r,{attr:{set:function(e){this.setAttribute(r,e),s.set&&s.set.call(this,!0)},get:function(){var e=this.getAttribute(r);return e==null?i:r}},removeAttr:{value:function(){this.removeAttribute(r),s.set&&s.set.call(this,!1)}},reflect:!0,propType:"boolean",initAttr:s.initAttr||!1})},contentAttr:function(e,t,n){if(!e.nodeName)return;var r;if(n===i)return r=e.attributes[t]||{},n=r.specified?r.value:null,n==null?i:n;typeof n=="boolean"?n?e.setAttribute(t,t):e.removeAttribute(t):e.setAttribute(t,n)},activeLang:function(){var n=[],r={},i,o,u=/:\/\/|^\.*\//,a=function(n,r,i){var s;return r&&i&&e.inArray(r,i.availabeLangs||[])!==-1?(n.loading=!0,s=i.langSrc,u.test(s)||(s=t.cfg.basePath+s),t.loader.loadScript(s+r+".js",function(){n.langObj[r]?(n.loading=!1,l(n,!0)):e(function(){n.langObj[r]&&l(n,!0),n.loading=!1})}),!0):!1},f=function(e){r[e]&&r[e].forEach(function(e){e.callback(i,o,"")})},l=function(e,t){if(e.activeLang!=i&&e.activeLang!==o){var n=s[e.module].options;e.langObj[i]||o&&e.langObj[o]?(e.activeLang=i,e.callback(e.langObj[i]||e.langObj[o],i),f(e.module)):!t&&!a(e,i,n)&&!a(e,o,n)&&e.langObj[""]&&e.activeLang!==""&&(e.activeLang="",e.callback(e.langObj[""],i),f(e.module))}},c=function(t){return typeof t=="string"&&t!==i?(i=t,o=i.split("-")[0],i==o&&(o=!1),e.each(n,function(e,t){l(t)})):typeof t=="object"&&(t.register?(r[t.register]||(r[t.register]=[]),r[t.register].push(t),t.callback(i,o,"")):(t.activeLang||(t.activeLang=""),n.push(t),l(t))),i};return c}()}),e.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(e,n){t[e]=function(e,r,i,s){typeof e=="string"&&(e=e.split(o));var u={};return e.forEach(function(e){u[e]=t[n](e,r,i,s)}),u}}),t.isReady("webshimLocalization",!0)}),function(e,t){if(!Modernizr.localstorage||"hidden"in t.createElement("a"))return;var n={article:"article",aside:"complementary",section:"region",nav:"navigation",address:"contentinfo"},r=function(e,t){var n=e.getAttribute("role");n||e.setAttribute("role",t)};e.webshims.addReady(function(i,s){e.each(n,function(t,n){var o=e(t,i).add(s.filter(t));for(var u=0,a=o.length;u<a;u++)r(o[u],n)});if(i===t){var o=t.getElementsByTagName("header")[0],u=t.getElementsByTagName("footer"),a=u.length;o&&!e(o).closest("section, article")[0]&&r(o,"banner");if(!a)return;var f=u[a-1];e(f).closest("section, article")[0]||r(f,"contentinfo")}})}(jQuery,document),function(e){"use strict";var t="webkitURL"in window,n=window.Modernizr,r=e.webshims,i=r.bugs,s=e('<form action="#" style="width: 1px; height: 1px; overflow: hidden;"><select name="b" required="" /><input required="" name="a" /></form>'),o=function(){if(s[0].querySelector)try{i.findRequired=!s[0].querySelector("select:required")}catch(e){i.findRequired=!1}},u=e("input",s).eq(0),a=function(e){r.loader.loadList(["dom-extend"]),r.ready("dom-extend",e)};i.findRequired=!1,i.validationMessage=!1,r.capturingEventPrevented=function(t){if(!t._isPolyfilled){var n=t.isDefaultPrevented,r=t.preventDefault;t.preventDefault=function(){return clearTimeout(e.data(t.target,t.type+"DefaultPrevented")),e.data(t.target,t.type+"DefaultPrevented",setTimeout(function(){e.removeData(t.target,t.type+"DefaultPrevented")},30)),r.apply(this,arguments)},t.isDefaultPrevented=function(){return!!(n.apply(this,arguments)||e.data(t.target,t.type+"DefaultPrevented")||!1)},t._isPolyfilled=!0}};if(!n.formvalidation||i.bustedValidity)o();else{r.capturingEvents(["input"]),r.capturingEvents(["invalid"],!0);if(window.opera||window.testGoodWithFix)s.appendTo("head"),o(),i.validationMessage=!u.prop("validationMessage"),r.reTest(["form-native-extend","form-message"]),s.remove(),e(function(){a(function(){var t=function(e){e.preventDefault()};["form","input","textarea","select"].forEach(function(n){var i=r.defineNodeNameProperty(n,"checkValidity",{prop:{value:function(){r.fromSubmit||e(this).on("invalid.checkvalidity",t),r.fromCheckValidity=!0;var n=i.prop._supvalue.apply(this,arguments);return r.fromSubmit||e(this).unbind("invalid.checkvalidity",t),r.fromCheckValidity=!1,n}}})})})});t&&!r.bugs.bustedValidity&&function(){var t=/^(?:textarea|input)$/i,n=!1;document.addEventListener("contextmenu",function(e){t.test(e.target.nodeName||"")&&(n=e.target.form)&&setTimeout(function(){n=!1},1)},!1),e(window).on("invalid",function(e){e.originalEvent&&n&&n==e.target.form&&(e.wrongWebkitInvalid=!0,e.stopImmediatePropagation())})}()}e.webshims.register("form-core",function(e,r,i,s,o,u){var a={checkbox:1,radio:1},f=e([]),l=r.bugs,c=function(t){t=e(t);var n,r,i=f;return t[0].type=="radio"&&(r=t.prop("form"),n=t[0].name,n?r?i=e(r[n]):i=e(s.getElementsByName(n)).filter(function(){return!e.prop(this,"form")}):i=t,i=i.filter('[type="radio"]')),i},h=r.getContentValidationMessage=function(t,n,r){var i=e(t).data("errormessage")||t.getAttribute("x-moz-errormessage")||"";return r&&i[r]&&(i=i[r]),typeof i=="object"&&(n=n||e.prop(t,"validity")||{valid:1},n.valid||e.each(n,function(e,t){if(t&&e!="valid"&&i[e])return i=i[e],!1})),typeof i=="object"&&(i=i.defaultMessage),i||""},p={number:1,range:1,date:1},d=function(t){var n=!1;return e(e.prop(t,"elements")).each(function(){n=e(this).is(":invalid");if(n)return!1}),n};e.extend(e.expr[":"],{"valid-element":function(t){return e.nodeName(t,"form")?!d(t):!!e.prop(t,"willValidate")&&!!m(t)},"invalid-element":function(t){return e.nodeName(t,"form")?d(t):!!e.prop(t,"willValidate")&&!m(t)},"required-element":function(t){return!!e.prop(t,"willValidate")&&!!e.prop(t,"required")},"user-error":function(t){return e.prop(t,"willValidate")&&e(t).hasClass("user-error")},"optional-element":function(t){return!!e.prop(t,"willValidate")&&e.prop(t,"required")===!1},"in-range":function(t){if(!p[e.prop(t,"type")]||!e.prop(t,"willValidate"))return!1;var n=e.prop(t,"validity");return!!(n&&!n.rangeOverflow&&!n.rangeUnderflow)},"out-of-range":function(t){if(!p[e.prop(t,"type")]||!e.prop(t,"willValidate"))return!1;var n=e.prop(t,"validity");return!(!n||!n.rangeOverflow&&!n.rangeUnderflow)}}),["valid","invalid","required","optional"].forEach(function(t){e.expr[":"][t]=e.expr.filters[t+"-element"]}),e.expr[":"].focus=function(e){try{var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())}catch(n){}return!1};var v=e.event.customEvent||{},m=function(t){return(e.prop(t,"validity")||{valid:1}).valid};(l.bustedValidity||l.findRequired)&&function(){var t=e.find,r=e.find.matchesSelector,i=/(\:valid|\:invalid|\:optional|\:required|\:in-range|\:out-of-range)(?=[\s\[\~\.\+\>\:\#*]|$)/ig,o=function(e){return e+"-element"};e.find=function(){var e=Array.prototype.slice,n=function(n){var r=arguments;return r=e.call(r,1,r.length),r.unshift(n.replace(i,o)),t.apply(this,r)};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}();if(!n.prefixed||n.prefixed("matchesSelector",s.documentElement))e.find.matchesSelector=function(e,t){return t=t.replace(i,o),r.call(this,e,t)}}();var g=e.prop,y={selectedIndex:1,value:1,checked:1,disabled:1,readonly:1};e.prop=function(t,n,r){var i=g.apply(this,arguments);return t&&"form"in t&&y[n]&&r!==o&&e(t).hasClass(E)&&m(t)&&(e(t).getShadowElement().removeClass(E),n=="checked"&&r&&c(t).not(t).removeClass(E).removeAttr("aria-invalid")),i};var b=function(t,n){var r;return e.each(t,function(t,i){if(i)return r=t=="customError"?e.prop(n,"validationMessage"):t,!1}),r},w=function(e){var t;try{t=s.activeElement.name===e}catch(n){}return t},E="user-error",S="user-success",x={time:1,date:1,month:1,datetime:1,week:1,"datetime-local":1},T=function(n){var r,i;if(!n.target)return;r=e(n.target).getNativeElement()[0];if(r.type=="submit"||!e.prop(r,"willValidate"))return;i=e.data(r,"webshimsswitchvalidityclass");var s=function(){if(n.type=="focusout"&&r.type=="radio"&&w(r.name))return;var i=e.prop(r,"validity"),s=e(r).getShadowElement(),o,u,f,h,p;if(t&&n.type=="change"&&!l.bustedValidity&&x[s.prop("type")]&&s.is(":focus"))return;e(r).trigger("refreshCustomValidityRules"),i.valid?s.hasClass(S)||(o=S,u=E,h="changedvaliditystate",f="changedvalid",a[r.type]&&r.checked&&c(r).not(r).removeClass(u).addClass(o).removeAttr("aria-invalid"),e.removeData(r,"webshimsinvalidcause")):(p=b(i,r),e.data(r,"webshimsinvalidcause")!=p&&(e.data(r,"webshimsinvalidcause",p),h="changedvaliditystate"),s.hasClass(E)||(o=E,u=S,a[r.type]&&!r.checked&&c(r).not(r).removeClass(u).addClass(o),f="changedinvalid")),o&&(s.addClass(o).removeClass(u),setTimeout(function(){e(r).trigger(f)},0)),h&&setTimeout(function(){e(r).trigger(h)},0),e.removeData(r,"webshimsswitchvalidityclass")};i&&clearTimeout(i),n.type=="refreshvalidityui"?s():e.data(r,"webshimsswitchvalidityclass",setTimeout(s,9))};e(s).on(u.validityUIEvents||"focusout change refreshvalidityui",T),v.changedvaliditystate=!0,v.refreshCustomValidityRules=!0,v.changedvalid=!0,v.changedinvalid=!0,v.refreshvalidityui=!0,r.triggerInlineForm=function(t,n){e(t).trigger(n)},r.modules["form-core"].getGroupElements=c;var N=function(){r.scrollRoot=t||s.compatMode=="BackCompat"?e(s.body):e(s.documentElement)};N(),r.ready("DOM",N),r.getRelOffset=function(t,n){t=e(t);var r=e(n).offset(),i;return e.swap(e(t)[0],{visibility:"hidden",display:"inline-block",left:0,top:0},function(){i=t.offset()}),r.top-=i.top,r.left-=i.left,r},r.wsPopover={_create:function(){this.options=e.extend({},r.cfg.wspopover,this.options),this.id=r.wsPopover.id++,this.eventns=".wsoverlay"+this.id,this.timers={},this.element=e('<div class="ws-popover" tabindex="-1"><div class="ws-po-outerbox"><div class="ws-po-arrow"><div class="ws-po-arrowbox" /></div><div class="ws-po-box" /></div></div>'),this.contentElement=e(".ws-po-box",this.element),this.lastElement=e([]),this.bindElement(),this.element.data("wspopover",this)},options:{},content:function(e){this.contentElement.html(e)},bindElement:function(){var e=this,t=function(){e.stopBlur=!1};this.preventBlur=function(n){e.stopBlur=!0,clearTimeout(e.timers.stopBlur),e.timers.stopBlur=setTimeout(t,9)},this.element.on({mousedown:this.preventBlur})},isInElement:function(t,n){return t==n||e.contains(t,n)},show:function(t){var n=e.Event("wspopoverbeforeshow");this.element.trigger(n);if(n.isDefaultPrevented()||this.isVisible)return;this.isVisible=!0,t=e(t||this.options.prepareFor).getNativeElement();var r=this,o=e(t).getShadowElement();this.clear(),this.element.removeClass("ws-po-visible").css("display","none"),this.prepareFor(t,o),this.position(o),r.timers.show=setTimeout(function(){r.element.css("display",""),r.timers.show=setTimeout(function(){r.element.addClass("ws-po-visible").trigger("wspopovershow")},9)},9),e(s).on("focusin"+this.eventns+" mousedown"+this.eventns,function(e){r.options.hideOnBlur&&!r.stopBlur&&!r.isInElement(r.lastElement[0]||s.body,e.target)&&!r.isInElement(t[0]||s.body,e.target)&&!r.isInElement(r.element[0],e.target)&&r.hide()}),e(i).on("resize"+this.eventns+" pospopover"+this.eventns,function(){clearTimeout(r.timers.repos),r.timers.repos=setTimeout(function(){r.position(o)},900)})},prepareFor:function(t,n){var r,i=e.extend({},this.options,e(t.prop("form")||[]).data("wspopover")||{},t.data("wspopover")),s=this;this.lastElement=e(t).getShadowFocusElement(),i.appendTo=="element"?this.element.insertAfter(t):this.element.appendTo(i.appendTo),this.element.attr({"data-class":t.prop("className"),"data-id":t.prop("id")}),this.element.css({width:i.constrainWidth?n.outerWidth():""}),i.hideOnBlur&&(r=function(e){s.stopBlur?e.stopImmediatePropagation():s.hide()},s.timers.bindBlur=setTimeout(function(){s.lastElement.off(s.eventns).on("focusout"+s.eventns+" blur"+s.eventns,r),s.lastElement.getNativeElement().off(s.eventns)},10)),this.prepared||e.fn.bgIframe&&this.element.bgIframe(),this.prepared=!0},clear:function(){e(i).off(this.eventns),e(s).off(this.eventns),this.stopBlur=!1,e.each(this.timers,function(e,t){clearTimeout(t)})},hide:function(){var t=e.Event("wspopoverbeforehide");this.element.trigger(t);if(t.isDefaultPrevented()||!this.isVisible)return;this.isVisible=!1;var n=this,r=function(){n.element.css("display","none").attr({"data-id":"","data-class":"",hidden:"hidden"}),clearTimeout(n.timers.forcehide)};this.clear(),this.element.removeClass("ws-po-visible").trigger("wspopoverhide"),e(i).on("resize"+this.eventns,r),n.timers.forcehide=setTimeout(r,999)},position:function(e){var t=r.getRelOffset(this.element.css({marginTop:0,marginLeft:0,marginRight:0,marginBottom:0}).removeAttr("hidden"),e);t.top+=e.outerHeight(),this.element.css({marginTop:"",marginLeft:"",marginRight:"",marginBottom:""}).css(t)}},r.wsPopover.id=0,r.validityAlert=function(){var t=!1,n=r.objectCreate(r.wsPopover,{},u.messagePopover),s=n.hide.bind(n);return n.element.addClass("validity-alert").attr({role:"alert"}),e.extend(n,{hideDelay:5e3,showFor:function(t,n,r,i){t=e(t).getNativeElement(),this.clear(),this.hide(),i||(this.getMessage(t,n),this.show(t),this.hideDelay&&(this.timers.delayedHide=setTimeout(s,this.hideDelay))),r||this.setFocus(t)},setFocus:function(t){var n=e(t).getShadowFocusElement(),s=r.scrollRoot.scrollTop(),o=n.offset().top-30,u;s>o&&(r.scrollRoot.animate({scrollTop:o-5},{queue:!1,duration:Math.max(Math.min(600,(s-o)*1.5),80)}),u=!0);try{n[0].focus()}catch(a){}u&&(r.scrollRoot.scrollTop(s),setTimeout(function(){r.scrollRoot.scrollTop(s)},0)),e(i).triggerHandler("pospopover"+this.eventns)},getMessage:function(e,t){t||(t=h(e[0])||e.prop("customValidationMessage")||e.prop("validationMessage")),t?n.contentElement.text(t):this.hide()}}),n}(),function(){var t,n=[],r,i;e(s).on("invalid",function(i){if(i.wrongWebkitInvalid)return;var o=e(i.target),u=o.getShadowElement();u.hasClass(E)||(u.addClass(E).removeClass(S),setTimeout(function(){e(i.target).trigger("changedinvalid").trigger("changedvaliditystate")},0));if(!t){t=e.Event("firstinvalid"),t.isInvalidUIPrevented=i.isDefaultPrevented;var a=e.Event("firstinvalidsystem");e(s).triggerHandler(a,{element:i.target,form:i.target.form,isInvalidUIPrevented:i.isDefaultPrevented}),o.trigger(t)}t&&t.isDefaultPrevented()&&i.preventDefault(),n.push(i.target),i.extraData="fix",clearTimeout(r),r=setTimeout(function(){var r={type:"lastinvalid",cancelable:!1,invalidlist:e(n)};t=!1,n=[],e(i.target).trigger(r,r)},9),o=null,u=null})}(),e.fn.getErrorMessage=function(){var t="",n=this[0];return n&&(t=h(n)||e.prop(n,"customValidationMessage")||e.prop(n,"validationMessage")),t},u.replaceValidationUI&&(u.overrideMessages&&(u.customMessages||u.customMessages==null)&&(u.customMessages=!0,u.overrideMessages=!1,r.info("set overrideMessages to false. Use customMessages instead")),r.ready("DOM forms",function(){e(s).on("firstinvalid",function(t){t.isInvalidUIPrevented()||(t.preventDefault(),e.webshims.validityAlert.showFor(t.target))})}))})}(jQuery),jQuery.webshims.register("form-message",function(e,t,n,r,i,s){"use strict";var o=t.validityMessages,u=s.overrideMessages||s.customMessages?["customValidationMessage"]:[];o.en=e.extend(!0,{typeMismatch:{defaultMessage:"Please enter a valid value.",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.",month:"Please enter a valid value.","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."}},o.en||o["en-US"]||{}),typeof o["en"].valueMissing=="object"&&["select","radio"].forEach(function(e){o.en.valueMissing[e]="Please select an option."}),typeof o.en.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeUnderflow[e]="Value must be at or after {%min}."}),typeof o.en.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeOverflow[e]="Value must be at or before {%max}."}),o["en-US"]=o["en-US"]||o.en,o[""]=o[""]||o["en-US"],o.de=e.extend(!0,{typeMismatch:{defaultMessage:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",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",month:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",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"}},o.de||{}),typeof o.de.valueMissing=="object"&&["select","radio"].forEach(function(e){o.de.valueMissing[e]="Bitte w\u00e4hlen Sie eine Option aus"}),typeof o.de.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeUnderflow[e]="{%value} ist zu fr\u00fch. {%min} ist die fr\u00fcheste Zeit, die Sie benutzen k\u00f6nnen."}),typeof o.de.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeOverflow[e]="{%value} ist zu sp\u00e4t. {%max} ist die sp\u00e4teste Zeit, die Sie benutzen k\u00f6nnen."});var a=o[""],f=function(t,n){return t&&typeof t!="string"&&(t=t[e.prop(n,"type")]||t[(n.nodeName||"").toLowerCase()]||t.defaultMessage),t||""},l={value:1,min:1,max:1};t.createValidationMessage=function(n,r){var i,s=f(a[r],n);return s||(s=f(o[""][r],n)||"invalid value",t.info("could not find errormessage for: "+r+" / "+e.prop(n,"type")+". in language: "+e.webshims.activeLang())),s&&["value","min","max","title","maxlength","label"].forEach(function(o){if(s.indexOf("{%"+o)===-1)return;var u=(o=="label"?e.trim(e('label[for="'+n.id+'"]',n.form).text()).replace(/\*$|:$/,""):e.prop(n,o))||"";r=="patternMismatch"&&o=="title"&&!u&&t.error("no title for patternMismatch provided. Always add a title attribute."),l[o]&&(i||(i=e(n).getShadowElement().data("wsspinner")),i&&i.formatValue&&(u=i.formatValue(u))),s=s.replace("{%"+o+"}",u),"value"==o&&(s=s.replace("{%valueLen}",u.length))}),s||""},(t.bugs.validationMessage||!Modernizr.formvalidation||t.bugs.bustedValidity)&&u.push("validationMessage"),t.activeLang({langObj:o,module:"form-core",callback:function(e){a=e}}),u.forEach(function(n){t.defineNodeNamesProperty(["fieldset","output","button"],n,{prop:{value:"",writeable:!1}}),["input","select","textarea"].forEach(function(r){var i=t.defineNodeNameProperty(r,n,{prop:{get:function(){var n=this,r="";if(!e.prop(n,"willValidate"))return r;var s=e.prop(n,"validity")||{valid:1};if(s.valid)return r;r=t.getContentValidationMessage(n,s);if(r)return r;if(s.customError&&n.nodeName){r=Modernizr.formvalidation&&!t.bugs.bustedValidity&&i.prop._supget?i.prop._supget.call(n):t.data(n,"customvalidationMessage");if(r)return r}return e.each(s,function(e,i){if(e=="valid"||!i)return;r=t.createValidationMessage(n,e);if(r)return!1}),r||""},writeable:!1}})})})});
+jQuery.webshims.register("dom-extend",function(e,t,n,r,i){"use strict";e("<form />").attr("novalidate")===""&&t.warn("IE browser modes are busted in IE10. Please test your HTML/CSS/JS with a real IE version or at least IETester or similiar tools");var s=t.modules,o=/\s*,\s*/,u={},a={},f={},l={},c={},h=e.fn.val,p=function(t,n,r,i,s){return s?h.call(e(t)):h.call(e(t),r)};e.fn.val=function(t){var n=this[0];arguments.length&&t==null&&(t="");if(!arguments.length)return!n||n.nodeType!==1?h.call(this):e.prop(n,"value",t,"val",!0);if(e.isArray(t))return h.apply(this,arguments);var r=e.isFunction(t);return this.each(function(s){n=this;if(n.nodeType===1)if(r){var o=t.call(n,s,e.prop(n,"value",i,"val",!0));o==null&&(o=""),e.prop(n,"value",o,"val")}else e.prop(n,"value",t,"val")})},e.fn.onTrigger=function(e,t){return this.on(e,t).each(t)};var d="_webshimsLib"+Math.round(Math.random()*1e3),v=function(t,n,r){t=t.jquery?t[0]:t;if(!t)return r||{};var s=e.data(t,d);return r!==i&&(s||(s=e.data(t,d,{})),n&&(s[n]=r)),n?s&&s[n]:s};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(t){e.fn[t.name]=function(){return this.map(function(){var e=v(this,"shadowData");return e&&e[t.prop]||this})}}),e.Tween.propHooks._default&&e.extend(e.Tween.propHooks._default,{get:function(t){var n;return t.elem[t.prop]==null&&!a[t.prop]||!!t.elem.style&&t.elem.style[t.prop]!=null?(n=jQuery.css(t.elem,t.prop,""),!n||n==="auto"?0:n):a[t.prop]?e.prop(t.elem,t.prop):t.elem[t.prop]},set:function(t){jQuery.fx.step[t.prop]?jQuery.fx.step[t.prop](t):t.elem.style&&(t.elem.style[jQuery.cssProps[t.prop]]!=null||jQuery.cssHooks[t.prop])?jQuery.style(t.elem,t.prop,t.now+t.unit):a[t.prop]?e.prop(t.elem,t.prop,t.now):t.elem[t.prop]=t.now}}),["removeAttr","prop","attr"].forEach(function(n){u[n]=e[n],e[n]=function(t,r,s,o,l){var h=o=="val",d=h?p:u[n];if(!t||!a[r]||t.nodeType!==1||!h&&o&&n=="attr"&&e.attrFn[r])return d(t,r,s,o,l);var v=(t.nodeName||"").toLowerCase(),m=f[v],g=n!="attr"||s!==!1&&s!==null?n:"removeAttr",y,b,w;m||(m=f["*"]),m&&(m=m[r]),m&&(y=m[g]);if(y){r=="value"&&(b=y.isVal,y.isVal=h);if(g==="removeAttr")return y.value.call(t);if(s===i)return y.get?y.get.call(t):y.value;y.set&&(n=="attr"&&s===!0&&(s=r),w=y.set.call(t,s)),r=="value"&&(y.isVal=b)}else w=d(t,r,s,o,l);if((s!==i||g==="removeAttr")&&c[v]&&c[v][r]){var E;g=="removeAttr"?E=!1:g=="prop"?E=!!s:E=!0,c[v][r].forEach(function(e){(!e.only||(e.only=n=="prop")||e.only=="attr"&&n!="prop")&&e.call(t,s,E,h?"val":g,n)})}return w},l[n]=function(e,r,s){f[e]||(f[e]={}),f[e][r]||(f[e][r]={});var o=f[e][r][n],a=function(e,t,i){return t&&t[e]?t[e]:i&&i[e]?i[e]:n=="prop"&&r=="value"?function(e){var t=this;return s.isVal?p(t,r,e,!1,arguments.length===0):u[n](t,r,e)}:n=="prop"&&e=="value"&&s.value.apply?function(e){var t=u[n](this,r);return t&&t.apply&&(t=t.apply(this,arguments)),t}:function(e){return u[n](this,r,e)}};f[e][r][n]=s,s.value===i&&(s.set||(s.set=s.writeable?a("set",s,o):t.cfg.useStrict&&r=="prop"?function(){throw r+" is readonly on "+e}:function(){t.info(r+" is readonly on "+e)}),s.get||(s.get=a("get",s,o))),["value","get","set"].forEach(function(e){s[e]&&(s["_sup"+e]=a(e,o))})}});var m=function(){var e=t.getPrototypeOf(r.createElement("foobar")),n=Object.prototype.hasOwnProperty,i=Modernizr.advancedObjectProperties&&Modernizr.objectAccessor;return function(s,o,u){var a,f;if(i&&(a=r.createElement(s))&&(f=t.getPrototypeOf(a))&&e!==f&&(!a[o]||!n.call(a,o))){var l=a[o];u._supvalue=function(){return l&&l.apply?l.apply(this,arguments):l},f[o]=u.value}else u._supvalue=function(){var e=v(this,"propValue");return e&&e[o]&&e[o].apply?e[o].apply(this,arguments):e&&e[o]},g.extendValue(s,o,u.value);u.value._supvalue=u._supvalue}}(),g=function(){var n={};t.addReady(function(r,i){var s={},o=function(t){s[t]||(s[t]=e(r.getElementsByTagName(t)),i[0]&&e.nodeName(i[0],t)&&(s[t]=s[t].add(i)))};e.each(n,function(e,n){o(e);if(!n||!n.forEach){t.warn("Error: with "+e+"-property. methods: "+n);return}n.forEach(function(t){s[e].each(t)})}),s=null});var i,s=e([]),o=function(t,s){n[t]?n[t].push(s):n[t]=[s],e.isDOMReady&&(i||e(r.getElementsByTagName(t))).each(s)},u={};return{createTmpCache:function(t){return e.isDOMReady&&(i=i||e(r.getElementsByTagName(t))),i||s},flushTmpCache:function(){i=null},content:function(t,n){o(t,function(){var t=e.attr(this,n);t!=null&&e.attr(this,n,t)})},createElement:function(e,t){o(e,t)},extendValue:function(t,n,r){o(t,function(){e(this).each(function(){var e=v(this,"propValue",{});e[n]=this[n],this[n]=r})})}}}(),y=function(e,t){e.defaultValue===i&&(e.defaultValue=""),e.removeAttr||(e.removeAttr={value:function(){e[t||"prop"].set.call(this,e.defaultValue),e.removeAttr._supvalue.call(this)}}),e.attr||(e.attr={})};e.extend(t,{getID:function(){var t=(new Date).getTime();return function(n){n=e(n);var r=n.prop("id");return r||(t++,r="ID-"+t,n.eq(0).prop("id",r)),r}}(),extendUNDEFProp:function(t,n){e.each(n,function(e,n){e in t||(t[e]=n)})},createPropDefault:y,data:v,moveToFirstEvent:function(t,n,r){var i=(e._data(t,"events")||{})[n],s;i&&i.length>1&&(s=i.pop(),r||(r="bind"),r=="bind"&&i.delegateCount?i.splice(i.delegateCount,0,s):i.unshift(s)),t=null},addShadowDom:function(){var i,s,o,u={init:!1,runs:0,test:function(){var e=u.getHeight(),t=u.getWidth();e!=u.height||t!=u.width?(u.height=e,u.width=t,u.handler({type:"docresize"}),u.runs++,u.runs<9&&setTimeout(u.test,90)):u.runs=0},handler:function(t){clearTimeout(i),i=setTimeout(function(){if(t.type=="resize"){var i=e(n).width(),a=e(n).width();if(a==s&&i==o)return;s=a,o=i,u.height=u.getHeight(),u.width=u.getWidth()}e(r).triggerHandler("updateshadowdom")},t.type=="resize"?50:9)},_create:function(){e.each({Height:"getHeight",Width:"getWidth"},function(e,t){var n=r.body,i=r.documentElement;u[t]=function(){return Math.max(n["scroll"+e],i["scroll"+e],n["offset"+e],i["offset"+e],i["client"+e])}})},start:function(){!this.init&&r.body&&(this.init=!0,this._create(),this.height=u.getHeight(),this.width=u.getWidth(),setInterval(this.test,600),e(this.test),t.ready("WINDOWLOAD",this.test),e(n).bind("resize",this.handler),function(){var t=e.fn.animate,n;e.fn.animate=function(){return clearTimeout(n),n=setTimeout(function(){u.test()},99),t.apply(this,arguments)}}())}};return t.docObserve=function(){t.ready("DOM",function(){u.start()})},function(n,r,i){i=i||{},n.jquery&&(n=n[0]),r.jquery&&(r=r[0]);var s=e.data(n,d)||e.data(n,d,{}),o=e.data(r,d)||e.data(r,d,{}),u={};i.shadowFocusElement?i.shadowFocusElement&&(i.shadowFocusElement.jquery&&(i.shadowFocusElement=i.shadowFocusElement[0]),u=e.data(i.shadowFocusElement,d)||e.data(i.shadowFocusElement,d,u)):i.shadowFocusElement=r,s.hasShadow=r,u.nativeElement=o.nativeElement=n,u.shadowData=o.shadowData=s.shadowData={nativeElement:n,shadowElement:r,shadowFocusElement:i.shadowFocusElement},i.shadowChilds&&i.shadowChilds.each(function(){v(this,"shadowData",o.shadowData)}),i.data&&(u.shadowData.data=o.shadowData.data=s.shadowData.data=i.data),i=null,t.docObserve()}}(),propTypes:{standard:function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,""+t)},get:function(){return e.attr.get.call(this)||e.defaultValue}}},"boolean":function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){t?e.attr.set.call(this,""):e.removeAttr.value.call(this)},get:function(){return e.attr.get.call(this)!=null}}},src:function(){var t=r.createElement("a");return t.style.display="none",function(n,r){y(n);if(n.prop)return;n.prop={set:function(e){n.attr.set.call(this,e)},get:function(){var n=this.getAttribute(r),i;if(n==null)return"";t.setAttribute("href",n+"");if(!e.support.hrefNormalized){try{e(t).insertAfter(this),i=t.getAttribute("href",4)}catch(s){i=t.getAttribute("href",4)}e(t).detach()}return i||t.href}}}}(),enumarated:function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,t)},get:function(){var t=(e.attr.get.call(this)||"").toLowerCase();if(!t||e.limitedTo.indexOf(t)==-1)t=e.defaultValue;return t}}}},reflectProperties:function(n,r){typeof r=="string"&&(r=r.split(o)),r.forEach(function(r){t.defineNodeNamesProperty(n,r,{prop:{set:function(t){e.attr(this,r,t)},get:function(){return e.attr(this,r)||""}}})})},defineNodeNameProperty:function(n,r,i){return a[r]=!0,i.reflect&&t.propTypes[i.propType||"standard"](i,r),["prop","attr","removeAttr"].forEach(function(s){var o=i[s];o&&(s==="prop"?o=e.extend({writeable:!0},o):o=e.extend({},o,{writeable:!0}),l[s](n,r,o),n!="*"&&t.cfg.extendNative&&s=="prop"&&o.value&&e.isFunction(o.value)&&m(n,r,o),i[s]=o)}),i.initAttr&&g.content(n,r),i},defineNodeNameProperties:function(e,n,r,i){var s;for(var o in n)!i&&n[o].initAttr&&g.createTmpCache(e),r&&(n[o][r]||(n[o][r]={},["value","set","get"].forEach(function(e){e in n[o]&&(n[o][r][e]=n[o][e],delete n[o][e])}))),n[o]=t.defineNodeNameProperty(e,o,n[o]);return i||g.flushTmpCache(),n},createElement:function(n,r,i){var s;return e.isFunction(r)&&(r={after:r}),g.createTmpCache(n),r.before&&g.createElement(n,r.before),i&&(s=t.defineNodeNameProperties(n,i,!1,!0)),r.after&&g.createElement(n,r.after),g.flushTmpCache(),s},onNodeNamesPropertyModify:function(t,n,r,i){typeof t=="string"&&(t=t.split(o)),e.isFunction(r)&&(r={set:r}),t.forEach(function(e){c[e]||(c[e]={}),typeof n=="string"&&(n=n.split(o)),r.initAttr&&g.createTmpCache(e),n.forEach(function(t){c[e][t]||(c[e][t]=[],a[t]=!0),r.set&&(i&&(r.set.only=i),c[e][t].push(r.set)),r.initAttr&&g.content(e,t)}),g.flushTmpCache()})},defineNodeNamesBooleanProperty:function(n,r,s){s||(s={}),e.isFunction(s)&&(s.set=s),t.defineNodeNamesProperty(n,r,{attr:{set:function(e){this.setAttribute(r,e),s.set&&s.set.call(this,!0)},get:function(){var e=this.getAttribute(r);return e==null?i:r}},removeAttr:{value:function(){this.removeAttribute(r),s.set&&s.set.call(this,!1)}},reflect:!0,propType:"boolean",initAttr:s.initAttr||!1})},contentAttr:function(e,t,n){if(!e.nodeName)return;var r;if(n===i)return r=e.attributes[t]||{},n=r.specified?r.value:null,n==null?i:n;typeof n=="boolean"?n?e.setAttribute(t,t):e.removeAttribute(t):e.setAttribute(t,n)},activeLang:function(){var n=[],r={},i,o,u=/:\/\/|^\.*\//,a=function(n,r,i){var s;return r&&i&&e.inArray(r,i.availabeLangs||[])!==-1?(n.loading=!0,s=i.langSrc,u.test(s)||(s=t.cfg.basePath+s),t.loader.loadScript(s+r+".js",function(){n.langObj[r]?(n.loading=!1,l(n,!0)):e(function(){n.langObj[r]&&l(n,!0),n.loading=!1})}),!0):!1},f=function(e){r[e]&&r[e].forEach(function(e){e.callback(i,o,"")})},l=function(e,t){if(e.activeLang!=i&&e.activeLang!==o){var n=s[e.module].options;e.langObj[i]||o&&e.langObj[o]?(e.activeLang=i,e.callback(e.langObj[i]||e.langObj[o],i),f(e.module)):!t&&!a(e,i,n)&&!a(e,o,n)&&e.langObj[""]&&e.activeLang!==""&&(e.activeLang="",e.callback(e.langObj[""],i),f(e.module))}},c=function(t){return typeof t=="string"&&t!==i?(i=t,o=i.split("-")[0],i==o&&(o=!1),e.each(n,function(e,t){l(t)})):typeof t=="object"&&(t.register?(r[t.register]||(r[t.register]=[]),r[t.register].push(t),t.callback(i,o,"")):(t.activeLang||(t.activeLang=""),n.push(t),l(t))),i};return c}()}),e.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(e,n){t[e]=function(e,r,i,s){typeof e=="string"&&(e=e.split(o));var u={};return e.forEach(function(e){u[e]=t[n](e,r,i,s)}),u}}),t.isReady("webshimLocalization",!0)}),function(e,t){if(!Modernizr.localstorage||"hidden"in t.createElement("a"))return;var n={article:"article",aside:"complementary",section:"region",nav:"navigation",address:"contentinfo"},r=function(e,t){var n=e.getAttribute("role");n||e.setAttribute("role",t)};e.webshims.addReady(function(i,s){e.each(n,function(t,n){var o=e(t,i).add(s.filter(t));for(var u=0,a=o.length;u<a;u++)r(o[u],n)});if(i===t){var o=t.getElementsByTagName("header")[0],u=t.getElementsByTagName("footer"),a=u.length;o&&!e(o).closest("section, article")[0]&&r(o,"banner");if(!a)return;var f=u[a-1];e(f).closest("section, article")[0]||r(f,"contentinfo")}})}(jQuery,document),function(e){"use strict";var t="webkitURL"in window,n=window.Modernizr,r=e.webshims,i=r.bugs,s=e('<form action="#" style="width: 1px; height: 1px; overflow: hidden;"><select name="b" required="" /><input required="" name="a" /></form>'),o=function(){if(s[0].querySelector)try{i.findRequired=!s[0].querySelector("select:required")}catch(e){i.findRequired=!1}},u=e("input",s).eq(0),a=function(e){r.loader.loadList(["dom-extend"]),r.ready("dom-extend",e)};i.findRequired=!1,i.validationMessage=!1,r.capturingEventPrevented=function(t){if(!t._isPolyfilled){var n=t.isDefaultPrevented,r=t.preventDefault;t.preventDefault=function(){return clearTimeout(e.data(t.target,t.type+"DefaultPrevented")),e.data(t.target,t.type+"DefaultPrevented",setTimeout(function(){e.removeData(t.target,t.type+"DefaultPrevented")},30)),r.apply(this,arguments)},t.isDefaultPrevented=function(){return!!(n.apply(this,arguments)||e.data(t.target,t.type+"DefaultPrevented")||!1)},t._isPolyfilled=!0}};if(!n.formvalidation||i.bustedValidity)o();else{r.capturingEvents(["input"]),r.capturingEvents(["invalid"],!0);if(window.opera||window.testGoodWithFix)s.appendTo("head"),o(),i.validationMessage=!u.prop("validationMessage"),r.reTest(["form-native-extend","form-message"]),s.remove(),e(function(){a(function(){var t=function(e){e.preventDefault()};["form","input","textarea","select"].forEach(function(n){var i=r.defineNodeNameProperty(n,"checkValidity",{prop:{value:function(){r.fromSubmit||e(this).on("invalid.checkvalidity",t),r.fromCheckValidity=!0;var n=i.prop._supvalue.apply(this,arguments);return r.fromSubmit||e(this).unbind("invalid.checkvalidity",t),r.fromCheckValidity=!1,n}}})})})});t&&!r.bugs.bustedValidity&&function(){var t=/^(?:textarea|input)$/i,n=!1;document.addEventListener("contextmenu",function(e){t.test(e.target.nodeName||"")&&(n=e.target.form)&&setTimeout(function(){n=!1},1)},!1),e(window).on("invalid",function(e){e.originalEvent&&n&&n==e.target.form&&(e.wrongWebkitInvalid=!0,e.stopImmediatePropagation())})}()}e.webshims.register("form-core",function(e,r,i,s,o,u){var a={checkbox:1,radio:1},f=e([]),l=r.bugs,c=function(t){t=e(t);var n,r,i=f;return t[0].type=="radio"&&(r=t.prop("form"),n=t[0].name,n?r?i=e(r[n]):i=e(s.getElementsByName(n)).filter(function(){return!e.prop(this,"form")}):i=t,i=i.filter('[type="radio"]')),i},h=r.getContentValidationMessage=function(t,n,r){var i=e(t).data("errormessage")||t.getAttribute("x-moz-errormessage")||"";return r&&i[r]&&(i=i[r]),typeof i=="object"&&(n=n||e.prop(t,"validity")||{valid:1},n.valid||e.each(n,function(e,t){if(t&&e!="valid"&&i[e])return i=i[e],!1})),typeof i=="object"&&(i=i.defaultMessage),i||""},p={number:1,range:1,date:1},d=function(t){var n=!1;return e(e.prop(t,"elements")).each(function(){n=e(this).is(":invalid");if(n)return!1}),n};e.extend(e.expr[":"],{"valid-element":function(t){return e.nodeName(t,"form")?!d(t):!!e.prop(t,"willValidate")&&!!m(t)},"invalid-element":function(t){return e.nodeName(t,"form")?d(t):!!e.prop(t,"willValidate")&&!m(t)},"required-element":function(t){return!!e.prop(t,"willValidate")&&!!e.prop(t,"required")},"user-error":function(t){return e.prop(t,"willValidate")&&e(t).hasClass("user-error")},"optional-element":function(t){return!!e.prop(t,"willValidate")&&e.prop(t,"required")===!1},"in-range":function(t){if(!p[e.prop(t,"type")]||!e.prop(t,"willValidate"))return!1;var n=e.prop(t,"validity");return!!(n&&!n.rangeOverflow&&!n.rangeUnderflow)},"out-of-range":function(t){if(!p[e.prop(t,"type")]||!e.prop(t,"willValidate"))return!1;var n=e.prop(t,"validity");return!(!n||!n.rangeOverflow&&!n.rangeUnderflow)}}),["valid","invalid","required","optional"].forEach(function(t){e.expr[":"][t]=e.expr.filters[t+"-element"]}),e.expr[":"].focus=function(e){try{var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())}catch(n){}return!1};var v=e.event.customEvent||{},m=function(t){return(e.prop(t,"validity")||{valid:1}).valid};(l.bustedValidity||l.findRequired)&&function(){var t=e.find,r=e.find.matchesSelector,i=/(\:valid|\:invalid|\:optional|\:required|\:in-range|\:out-of-range)(?=[\s\[\~\.\+\>\:\#*]|$)/ig,o=function(e){return e+"-element"};e.find=function(){var e=Array.prototype.slice,n=function(n){var r=arguments;return r=e.call(r,1,r.length),r.unshift(n.replace(i,o)),t.apply(this,r)};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}();if(!n.prefixed||n.prefixed("matchesSelector",s.documentElement))e.find.matchesSelector=function(e,t){return t=t.replace(i,o),r.call(this,e,t)}}();var g=e.prop,y={selectedIndex:1,value:1,checked:1,disabled:1,readonly:1};e.prop=function(t,n,r){var i=g.apply(this,arguments);return t&&"form"in t&&y[n]&&r!==o&&e(t).hasClass(E)&&m(t)&&(e(t).getShadowElement().removeClass(E),n=="checked"&&r&&c(t).not(t).removeClass(E).removeAttr("aria-invalid")),i};var b=function(t,n){var r;return e.each(t,function(t,i){if(i)return r=t=="customError"?e.prop(n,"validationMessage"):t,!1}),r},w=function(e){var t;try{t=s.activeElement.name===e}catch(n){}return t},E="user-error",S="user-success",x={time:1,date:1,month:1,datetime:1,week:1,"datetime-local":1},T=function(n){var r,i;if(!n.target)return;r=e(n.target).getNativeElement()[0];if(r.type=="submit"||!e.prop(r,"willValidate"))return;i=e.data(r,"webshimsswitchvalidityclass");var s=function(){if(n.type=="focusout"&&r.type=="radio"&&w(r.name))return;var i=e.prop(r,"validity"),s=e(r).getShadowElement(),o,u,f,h,p;if(t&&n.type=="change"&&!l.bustedValidity&&x[s.prop("type")]&&s.is(":focus"))return;e(r).trigger("refreshCustomValidityRules"),i.valid?s.hasClass(S)||(o=S,u=E,h="changedvaliditystate",f="changedvalid",a[r.type]&&r.checked&&c(r).not(r).removeClass(u).addClass(o).removeAttr("aria-invalid"),e.removeData(r,"webshimsinvalidcause")):(p=b(i,r),e.data(r,"webshimsinvalidcause")!=p&&(e.data(r,"webshimsinvalidcause",p),h="changedvaliditystate"),s.hasClass(E)||(o=E,u=S,a[r.type]&&!r.checked&&c(r).not(r).removeClass(u).addClass(o),f="changedinvalid")),o&&(s.addClass(o).removeClass(u),setTimeout(function(){e(r).trigger(f)},0)),h&&setTimeout(function(){e(r).trigger(h)},0),e.removeData(r,"webshimsswitchvalidityclass")};i&&clearTimeout(i),n.type=="refreshvalidityui"?s():e.data(r,"webshimsswitchvalidityclass",setTimeout(s,9))};e(s).on(u.validityUIEvents||"focusout change refreshvalidityui",T),v.changedvaliditystate=!0,v.refreshCustomValidityRules=!0,v.changedvalid=!0,v.changedinvalid=!0,v.refreshvalidityui=!0,r.triggerInlineForm=function(t,n){e(t).trigger(n)},r.modules["form-core"].getGroupElements=c;var N=function(){r.scrollRoot=t||s.compatMode=="BackCompat"?e(s.body):e(s.documentElement)};N(),r.ready("DOM",N),r.getRelOffset=function(t,n){t=e(t);var r=e(n).offset(),i;return e.swap(e(t)[0],{visibility:"hidden",display:"inline-block",left:0,top:0},function(){i=t.offset()}),r.top-=i.top,r.left-=i.left,r},r.wsPopover={_create:function(){this.options=e.extend({},r.cfg.wspopover,this.options),this.id=r.wsPopover.id++,this.eventns=".wsoverlay"+this.id,this.timers={},this.element=e('<div class="ws-popover" tabindex="-1"><div class="ws-po-outerbox"><div class="ws-po-arrow"><div class="ws-po-arrowbox" /></div><div class="ws-po-box" /></div></div>'),this.contentElement=e(".ws-po-box",this.element),this.lastElement=e([]),this.bindElement(),this.element.data("wspopover",this)},options:{},content:function(e){this.contentElement.html(e)},bindElement:function(){var e=this,t=function(){e.stopBlur=!1};this.preventBlur=function(n){e.stopBlur=!0,clearTimeout(e.timers.stopBlur),e.timers.stopBlur=setTimeout(t,9)},this.element.on({mousedown:this.preventBlur})},isInElement:function(t,n){return t==n||e.contains(t,n)},show:function(t){var n=e.Event("wspopoverbeforeshow");this.element.trigger(n);if(n.isDefaultPrevented()||this.isVisible)return;this.isVisible=!0,t=e(t||this.options.prepareFor).getNativeElement();var r=this,o=e(t).getShadowElement();this.clear(),this.element.removeClass("ws-po-visible").css("display","none"),this.prepareFor(t,o),this.position(o),r.timers.show=setTimeout(function(){r.element.css("display",""),r.timers.show=setTimeout(function(){r.element.addClass("ws-po-visible").trigger("wspopovershow")},9)},9),e(s).on("focusin"+this.eventns+" mousedown"+this.eventns,function(e){r.options.hideOnBlur&&!r.stopBlur&&!r.isInElement(r.lastElement[0]||s.body,e.target)&&!r.isInElement(t[0]||s.body,e.target)&&!r.isInElement(r.element[0],e.target)&&r.hide()}),e(i).on("resize"+this.eventns+" pospopover"+this.eventns,function(){clearTimeout(r.timers.repos),r.timers.repos=setTimeout(function(){r.position(o)},900)})},prepareFor:function(t,n){var r,i=e.extend({},this.options,e(t.prop("form")||[]).data("wspopover")||{},t.data("wspopover")),s=this;this.lastElement=e(t).getShadowFocusElement(),i.appendTo=="element"?this.element.insertAfter(t):this.element.appendTo(i.appendTo),this.element.attr({"data-class":t.prop("className"),"data-id":t.prop("id")}),this.element.css({width:i.constrainWidth?n.outerWidth():""}),i.hideOnBlur&&(r=function(e){s.stopBlur?e.stopImmediatePropagation():s.hide()},s.timers.bindBlur=setTimeout(function(){s.lastElement.off(s.eventns).on("focusout"+s.eventns+" blur"+s.eventns,r),s.lastElement.getNativeElement().off(s.eventns)},10)),this.prepared||e.fn.bgIframe&&this.element.bgIframe(),this.prepared=!0},clear:function(){e(i).off(this.eventns),e(s).off(this.eventns),this.stopBlur=!1,e.each(this.timers,function(e,t){clearTimeout(t)})},hide:function(){var t=e.Event("wspopoverbeforehide");this.element.trigger(t);if(t.isDefaultPrevented()||!this.isVisible)return;this.isVisible=!1;var n=this,r=function(){n.element.css("display","none").attr({"data-id":"","data-class":"",hidden:"hidden"}),clearTimeout(n.timers.forcehide)};this.clear(),this.element.removeClass("ws-po-visible").trigger("wspopoverhide"),e(i).on("resize"+this.eventns,r),n.timers.forcehide=setTimeout(r,999)},position:function(e){var t=r.getRelOffset(this.element.css({marginTop:0,marginLeft:0,marginRight:0,marginBottom:0}).removeAttr("hidden"),e);t.top+=e.outerHeight(),this.element.css({marginTop:"",marginLeft:"",marginRight:"",marginBottom:""}).css(t)}},r.wsPopover.id=0,r.validityAlert=function(){var t=!1,n=r.objectCreate(r.wsPopover,{},u.messagePopover),s=n.hide.bind(n);return n.element.addClass("validity-alert").attr({role:"alert"}),e.extend(n,{hideDelay:5e3,showFor:function(t,n,r,i){t=e(t).getNativeElement(),this.clear(),this.hide(),i||(this.getMessage(t,n),this.show(t),this.hideDelay&&(this.timers.delayedHide=setTimeout(s,this.hideDelay))),r||this.setFocus(t)},setFocus:function(t){var n=e(t).getShadowFocusElement(),s=r.scrollRoot.scrollTop(),o=n.offset().top-30,u;s>o&&(r.scrollRoot.animate({scrollTop:o-5},{queue:!1,duration:Math.max(Math.min(600,(s-o)*1.5),80)}),u=!0);try{n[0].focus()}catch(a){}u&&(r.scrollRoot.scrollTop(s),setTimeout(function(){r.scrollRoot.scrollTop(s)},0)),e(i).triggerHandler("pospopover"+this.eventns)},getMessage:function(e,t){t||(t=h(e[0])||e.prop("customValidationMessage")||e.prop("validationMessage")),t?n.contentElement.text(t):this.hide()}}),n}(),function(){var t,n=[],r,i;e(s).on("invalid",function(i){if(i.wrongWebkitInvalid)return;var o=e(i.target),u=o.getShadowElement();u.hasClass(E)||(u.addClass(E).removeClass(S),setTimeout(function(){e(i.target).trigger("changedinvalid").trigger("changedvaliditystate")},0));if(!t){t=e.Event("firstinvalid"),t.isInvalidUIPrevented=i.isDefaultPrevented;var a=e.Event("firstinvalidsystem");e(s).triggerHandler(a,{element:i.target,form:i.target.form,isInvalidUIPrevented:i.isDefaultPrevented}),o.trigger(t)}t&&t.isDefaultPrevented()&&i.preventDefault(),n.push(i.target),i.extraData="fix",clearTimeout(r),r=setTimeout(function(){var r={type:"lastinvalid",cancelable:!1,invalidlist:e(n)};t=!1,n=[],e(i.target).trigger(r,r)},9),o=null,u=null})}(),e.fn.getErrorMessage=function(){var t="",n=this[0];return n&&(t=h(n)||e.prop(n,"customValidationMessage")||e.prop(n,"validationMessage")),t},u.replaceValidationUI&&(u.overrideMessages&&(u.customMessages||u.customMessages==null)&&(u.customMessages=!0,u.overrideMessages=!1,r.info("set overrideMessages to false. Use customMessages instead")),r.ready("DOM forms",function(){e(s).on("firstinvalid",function(t){t.isInvalidUIPrevented()||(t.preventDefault(),e.webshims.validityAlert.showFor(t.target))})}))})}(jQuery),jQuery.webshims.register("form-message",function(e,t,n,r,i,s){"use strict";var o=t.validityMessages,u=s.overrideMessages||s.customMessages?["customValidationMessage"]:[];o.en=e.extend(!0,{typeMismatch:{defaultMessage:"Please enter a valid value.",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.",month:"Please enter a valid value.","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."}},o.en||o["en-US"]||{}),typeof o["en"].valueMissing=="object"&&["select","radio"].forEach(function(e){o.en.valueMissing[e]="Please select an option."}),typeof o.en.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeUnderflow[e]="Value must be at or after {%min}."}),typeof o.en.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeOverflow[e]="Value must be at or before {%max}."}),o["en-US"]=o["en-US"]||o.en,o[""]=o[""]||o["en-US"],o.de=e.extend(!0,{typeMismatch:{defaultMessage:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",email:"{%value} ist keine g\u00fcltige E-Mail-Adresse.",url:"{%value} ist kein(e) g\u00fcltige(r) Webadresse/Pfad.",number:"{%value} ist keine Nummer.",date:"{%value} ist kein Datum.",time:"{%value} ist keine Uhrzeit.",month:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",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."}},o.de||{}),typeof o.de.valueMissing=="object"&&["select","radio"].forEach(function(e){o.de.valueMissing[e]="Bitte w\u00e4hlen Sie eine Option aus."}),typeof o.de.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeUnderflow[e]="{%value} ist zu fr\u00fch. {%min} ist die fr\u00fcheste Zeit, die Sie benutzen k\u00f6nnen."}),typeof o.de.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeOverflow[e]="{%value} ist zu sp\u00e4t. {%max} ist die sp\u00e4teste Zeit, die Sie benutzen k\u00f6nnen."});var a=o[""],f=function(t,n){return t&&typeof t!="string"&&(t=t[e.prop(n,"type")]||t[(n.nodeName||"").toLowerCase()]||t.defaultMessage),t||""},l={value:1,min:1,max:1};t.createValidationMessage=function(n,r){var i,s=f(a[r],n);return s||(s=f(o[""][r],n)||"invalid value",t.info("could not find errormessage for: "+r+" / "+e.prop(n,"type")+". in language: "+e.webshims.activeLang())),s&&["value","min","max","title","maxlength","label"].forEach(function(o){if(s.indexOf("{%"+o)===-1)return;var u=(o=="label"?e.trim(e('label[for="'+n.id+'"]',n.form).text()).replace(/\*$|:$/,""):e.prop(n,o))||"";r=="patternMismatch"&&o=="title"&&!u&&t.error("no title for patternMismatch provided. Always add a title attribute."),l[o]&&(i||(i=e(n).getShadowElement().data("wsspinner")),i&&i.formatValue&&(u=i.formatValue(u))),s=s.replace("{%"+o+"}",u),"value"==o&&(s=s.replace("{%valueLen}",u.length))}),s||""},(t.bugs.validationMessage||!Modernizr.formvalidation||t.bugs.bustedValidity)&&u.push("validationMessage"),t.activeLang({langObj:o,module:"form-core",callback:function(e){a=e}}),u.forEach(function(n){t.defineNodeNamesProperty(["fieldset","output","button"],n,{prop:{value:"",writeable:!1}}),["input","select","textarea"].forEach(function(r){var i=t.defineNodeNameProperty(r,n,{prop:{get:function(){var n=this,r="";if(!e.prop(n,"willValidate"))return r;var s=e.prop(n,"validity")||{valid:1};if(s.valid)return r;r=t.getContentValidationMessage(n,s);if(r)return r;if(s.customError&&n.nodeName){r=Modernizr.formvalidation&&!t.bugs.bustedValidity&&i.prop._supget?i.prop._supget.call(n):t.data(n,"customvalidationMessage");if(r)return r}return e.each(s,function(e,i){if(e=="valid"||!i)return;r=t.createValidationMessage(n,e);if(r)return!1}),r||""},writeable:!1}})})})});
View
2 demos/js-webshim/minified/shims/combos/4.js
@@ -1 +1 @@
-jQuery.webshims.register("dom-extend",function(e,t,n,r,i){"use strict";e("<form />").attr("novalidate")===""&&t.warn("IE browser modes are busted in IE10. Please test your HTML/CSS/JS with a real IE version or at least IETester or similiar tools");var s=t.modules,o=/\s*,\s*/,u={},a={},f={},l={},c={},h=e.fn.val,p=function(t,n,r,i,s){return s?h.call(e(t)):h.call(e(t),r)};e.fn.val=function(t){var n=this[0];arguments.length&&t==null&&(t="");if(!arguments.length)return!n||n.nodeType!==1?h.call(this):e.prop(n,"value",t,"val",!0);if(e.isArray(t))return h.apply(this,arguments);var r=e.isFunction(t);return this.each(function(s){n=this;if(n.nodeType===1)if(r){var o=t.call(n,s,e.prop(n,"value",i,"val",!0));o==null&&(o=""),e.prop(n,"value",o,"val")}else e.prop(n,"value",t,"val")})},e.fn.onTrigger=function(e,t){return this.on(e,t).each(t)};var d="_webshimsLib"+Math.round(Math.random()*1e3),v=function(t,n,r){t=t.jquery?t[0]:t;if(!t)return r||{};var s=e.data(t,d);return r!==i&&(s||(s=e.data(t,d,{})),n&&(s[n]=r)),n?s&&s[n]:s};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(t){e.fn[t.name]=function(){return this.map(function(){var e=v(this,"shadowData");return e&&e[t.prop]||this})}}),e.Tween.propHooks._default&&e.extend(e.Tween.propHooks._default,{get:function(t){var n;return t.elem[t.prop]==null&&!a[t.prop]||!!t.elem.style&&t.elem.style[t.prop]!=null?(n=jQuery.css(t.elem,t.prop,""),!n||n==="auto"?0:n):a[t.prop]?e.prop(t.elem,t.prop):t.elem[t.prop]},set:function(t){jQuery.fx.step[t.prop]?jQuery.fx.step[t.prop](t):t.elem.style&&(t.elem.style[jQuery.cssProps[t.prop]]!=null||jQuery.cssHooks[t.prop])?jQuery.style(t.elem,t.prop,t.now+t.unit):a[t.prop]?e.prop(t.elem,t.prop,t.now):t.elem[t.prop]=t.now}}),["removeAttr","prop","attr"].forEach(function(n){u[n]=e[n],e[n]=function(t,r,s,o,l){var h=o=="val",d=h?p:u[n];if(!t||!a[r]||t.nodeType!==1||!h&&o&&n=="attr"&&e.attrFn[r])return d(t,r,s,o,l);var v=(t.nodeName||"").toLowerCase(),m=f[v],g=n!="attr"||s!==!1&&s!==null?n:"removeAttr",y,b,w;m||(m=f["*"]),m&&(m=m[r]),m&&(y=m[g]);if(y){r=="value"&&(b=y.isVal,y.isVal=h);if(g==="removeAttr")return y.value.call(t);if(s===i)return y.get?y.get.call(t):y.value;y.set&&(n=="attr"&&s===!0&&(s=r),w=y.set.call(t,s)),r=="value"&&(y.isVal=b)}else w=d(t,r,s,o,l);if((s!==i||g==="removeAttr")&&c[v]&&c[v][r]){var E;g=="removeAttr"?E=!1:g=="prop"?E=!!s:E=!0,c[v][r].forEach(function(e){(!e.only||(e.only=n=="prop")||e.only=="attr"&&n!="prop")&&e.call(t,s,E,h?"val":g,n)})}return w},l[n]=function(e,r,s){f[e]||(f[e]={}),f[e][r]||(f[e][r]={});var o=f[e][r][n],a=function(e,t,i){return t&&t[e]?t[e]:i&&i[e]?i[e]:n=="prop"&&r=="value"?function(e){var t=this;return s.isVal?p(t,r,e,!1,arguments.length===0):u[n](t,r,e)}:n=="prop"&&e=="value"&&s.value.apply?function(e){var t=u[n](this,r);return t&&t.apply&&(t=t.apply(this,arguments)),t}:function(e){return u[n](this,r,e)}};f[e][r][n]=s,s.value===i&&(s.set||(s.set=s.writeable?a("set",s,o):t.cfg.useStrict&&r=="prop"?function(){throw r+" is readonly on "+e}:function(){t.info(r+" is readonly on "+e)}),s.get||(s.get=a("get",s,o))),["value","get","set"].forEach(function(e){s[e]&&(s["_sup"+e]=a(e,o))})}});var m=function(){var e=t.getPrototypeOf(r.createElement("foobar")),n=Object.prototype.hasOwnProperty,i=Modernizr.advancedObjectProperties&&Modernizr.objectAccessor;return function(s,o,u){var a,f;if(i&&(a=r.createElement(s))&&(f=t.getPrototypeOf(a))&&e!==f&&(!a[o]||!n.call(a,o))){var l=a[o];u._supvalue=function(){return l&&l.apply?l.apply(this,arguments):l},f[o]=u.value}else u._supvalue=function(){var e=v(this,"propValue");return e&&e[o]&&e[o].apply?e[o].apply(this,arguments):e&&e[o]},g.extendValue(s,o,u.value);u.value._supvalue=u._supvalue}}(),g=function(){var n={};t.addReady(function(r,i){var s={},o=function(t){s[t]||(s[t]=e(r.getElementsByTagName(t)),i[0]&&e.nodeName(i[0],t)&&(s[t]=s[t].add(i)))};e.each(n,function(e,n){o(e);if(!n||!n.forEach){t.warn("Error: with "+e+"-property. methods: "+n);return}n.forEach(function(t){s[e].each(t)})}),s=null});var i,s=e([]),o=function(t,s){n[t]?n[t].push(s):n[t]=[s],e.isDOMReady&&(i||e(r.getElementsByTagName(t))).each(s)},u={};return{createTmpCache:function(t){return e.isDOMReady&&(i=i||e(r.getElementsByTagName(t))),i||s},flushTmpCache:function(){i=null},content:function(t,n){o(t,function(){var t=e.attr(this,n);t!=null&&e.attr(this,n,t)})},createElement:function(e,t){o(e,t)},extendValue:function(t,n,r){o(t,function(){e(this).each(function(){var e=v(this,"propValue",{});e[n]=this[n],this[n]=r})})}}}(),y=function(e,t){e.defaultValue===i&&(e.defaultValue=""),e.removeAttr||(e.removeAttr={value:function(){e[t||"prop"].set.call(this,e.defaultValue),e.removeAttr._supvalue.call(this)}}),e.attr||(e.attr={})};e.extend(t,{getID:function(){var t=(new Date).getTime();return function(n){n=e(n);var r=n.prop("id");return r||(t++,r="ID-"+t,n.eq(0).prop("id",r)),r}}(),extendUNDEFProp:function(t,n){e.each(n,function(e,n){e in t||(t[e]=n)})},createPropDefault:y,data:v,moveToFirstEvent:function(t,n,r){var i=(e._data(t,"events")||{})[n],s;i&&i.length>1&&(s=i.pop(),r||(r="bind"),r=="bind"&&i.delegateCount?i.splice(i.delegateCount,0,s):i.unshift(s)),t=null},addShadowDom:function(){var i,s,o,u={init:!1,runs:0,test:function(){var e=u.getHeight(),t=u.getWidth();e!=u.height||t!=u.width?(u.height=e,u.width=t,u.handler({type:"docresize"}),u.runs++,u.runs<9&&setTimeout(u.test,90)):u.runs=0},handler:function(t){clearTimeout(i),i=setTimeout(function(){if(t.type=="resize"){var i=e(n).width(),a=e(n).width();if(a==s&&i==o)return;s=a,o=i,u.height=u.getHeight(),u.width=u.getWidth()}e(r).triggerHandler("updateshadowdom")},t.type=="resize"?50:9)},_create:function(){e.each({Height:"getHeight",Width:"getWidth"},function(e,t){var n=r.body,i=r.documentElement;u[t]=function(){return Math.max(n["scroll"+e],i["scroll"+e],n["offset"+e],i["offset"+e],i["client"+e])}})},start:function(){!this.init&&r.body&&(this.init=!0,this._create(),this.height=u.getHeight(),this.width=u.getWidth(),setInterval(this.test,600),e(this.test),t.ready("WINDOWLOAD",this.test),e(n).bind("resize",this.handler),function(){var t=e.fn.animate,n;e.fn.animate=function(){return clearTimeout(n),n=setTimeout(function(){u.test()},99),t.apply(this,arguments)}}())}};return t.docObserve=function(){t.ready("DOM",function(){u.start()})},function(n,r,i){i=i||{},n.jquery&&(n=n[0]),r.jquery&&(r=r[0]);var s=e.data(n,d)||e.data(n,d,{}),o=e.data(r,d)||e.data(r,d,{}),u={};i.shadowFocusElement?i.shadowFocusElement&&(i.shadowFocusElement.jquery&&(i.shadowFocusElement=i.shadowFocusElement[0]),u=e.data(i.shadowFocusElement,d)||e.data(i.shadowFocusElement,d,u)):i.shadowFocusElement=r,s.hasShadow=r,u.nativeElement=o.nativeElement=n,u.shadowData=o.shadowData=s.shadowData={nativeElement:n,shadowElement:r,shadowFocusElement:i.shadowFocusElement},i.shadowChilds&&i.shadowChilds.each(function(){v(this,"shadowData",o.shadowData)}),i.data&&(u.shadowData.data=o.shadowData.data=s.shadowData.data=i.data),i=null,t.docObserve()}}(),propTypes:{standard:function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,""+t)},get:function(){return e.attr.get.call(this)||e.defaultValue}}},"boolean":function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){t?e.attr.set.call(this,""):e.removeAttr.value.call(this)},get:function(){return e.attr.get.call(this)!=null}}},src:function(){var t=r.createElement("a");return t.style.display="none",function(n,r){y(n);if(n.prop)return;n.prop={set:function(e){n.attr.set.call(this,e)},get:function(){var n=this.getAttribute(r),i;if(n==null)return"";t.setAttribute("href",n+"");if(!e.support.hrefNormalized){try{e(t).insertAfter(this),i=t.getAttribute("href",4)}catch(s){i=t.getAttribute("href",4)}e(t).detach()}return i||t.href}}}}(),enumarated:function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,t)},get:function(){var t=(e.attr.get.call(this)||"").toLowerCase();if(!t||e.limitedTo.indexOf(t)==-1)t=e.defaultValue;return t}}}},reflectProperties:function(n,r){typeof r=="string"&&(r=r.split(o)),r.forEach(function(r){t.defineNodeNamesProperty(n,r,{prop:{set:function(t){e.attr(this,r,t)},get:function(){return e.attr(this,r)||""}}})})},defineNodeNameProperty:function(n,r,i){return a[r]=!0,i.reflect&&t.propTypes[i.propType||"standard"](i,r),["prop","attr","removeAttr"].forEach(function(s){var o=i[s];o&&(s==="prop"?o=e.extend({writeable:!0},o):o=e.extend({},o,{writeable:!0}),l[s](n,r,o),n!="*"&&t.cfg.extendNative&&s=="prop"&&o.value&&e.isFunction(o.value)&&m(n,r,o),i[s]=o)}),i.initAttr&&g.content(n,r),i},defineNodeNameProperties:function(e,n,r,i){var s;for(var o in n)!i&&n[o].initAttr&&g.createTmpCache(e),r&&(n[o][r]||(n[o][r]={},["value","set","get"].forEach(function(e){e in n[o]&&(n[o][r][e]=n[o][e],delete n[o][e])}))),n[o]=t.defineNodeNameProperty(e,o,n[o]);return i||g.flushTmpCache(),n},createElement:function(n,r,i){var s;return e.isFunction(r)&&(r={after:r}),g.createTmpCache(n),r.before&&g.createElement(n,r.before),i&&(s=t.defineNodeNameProperties(n,i,!1,!0)),r.after&&g.createElement(n,r.after),g.flushTmpCache(),s},onNodeNamesPropertyModify:function(t,n,r,i){typeof t=="string"&&(t=t.split(o)),e.isFunction(r)&&(r={set:r}),t.forEach(function(e){c[e]||(c[e]={}),typeof n=="string"&&(n=n.split(o)),r.initAttr&&g.createTmpCache(e),n.forEach(function(t){c[e][t]||(c[e][t]=[],a[t]=!0),r.set&&(i&&(r.set.only=i),c[e][t].push(r.set)),r.initAttr&&g.content(e,t)}),g.flushTmpCache()})},defineNodeNamesBooleanProperty:function(n,r,s){s||(s={}),e.isFunction(s)&&(s.set=s),t.defineNodeNamesProperty(n,r,{attr:{set:function(e){this.setAttribute(r,e),s.set&&s.set.call(this,!0)},get:function(){var e=this.getAttribute(r);return e==null?i:r}},removeAttr:{value:function(){this.removeAttribute(r),s.set&&s.set.call(this,!1)}},reflect:!0,propType:"boolean",initAttr:s.initAttr||!1})},contentAttr:function(e,t,n){if(!e.nodeName)return;var r;if(n===i)return r=e.attributes[t]||{},n=r.specified?r.value:null,n==null?i:n;typeof n=="boolean"?n?e.setAttribute(t,t):e.removeAttribute(t):e.setAttribute(t,n)},activeLang:function(){var n=[],r={},i,o,u=/:\/\/|^\.*\//,a=function(n,r,i){var s;return r&&i&&e.inArray(r,i.availabeLangs||[])!==-1?(n.loading=!0,s=i.langSrc,u.test(s)||(s=t.cfg.basePath+s),t.loader.loadScript(s+r+".js",function(){n.langObj[r]?(n.loading=!1,l(n,!0)):e(function(){n.langObj[r]&&l(n,!0),n.loading=!1})}),!0):!1},f=function(e){r[e]&&r[e].forEach(function(e){e.callback(i,o,"")})},l=function(e,t){if(e.activeLang!=i&&e.activeLang!==o){var n=s[e.module].options;e.langObj[i]||o&&e.langObj[o]?(e.activeLang=i,e.callback(e.langObj[i]||e.langObj[o],i),f(e.module)):!t&&!a(e,i,n)&&!a(e,o,n)&&e.langObj[""]&&e.activeLang!==""&&(e.activeLang="",e.callback(e.langObj[""],i),f(e.module))}},c=function(t){return typeof t=="string"&&t!==i?(i=t,o=i.split("-")[0],i==o&&(o=!1),e.each(n,function(e,t){l(t)})):typeof t=="object"&&(t.register?(r[t.register]||(r[t.register]=[]),r[t.register].push(t),t.callback(i,o,"")):(t.activeLang||(t.activeLang=""),n.push(t),l(t))),i};return c}()}),e.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(e,n){t[e]=function(e,r,i,s){typeof e=="string"&&(e=e.split(o));var u={};return e.forEach(function(e){u[e]=t[n](e,r,i,s)}),u}}),t.isReady("webshimLocalization",!0)}),function(e,t){if(!Modernizr.localstorage||"hidden"in t.createElement("a"))return;var n={article:"article",aside:"complementary",section:"region",nav:"navigation",address:"contentinfo"},r=function(e,t){var n=e.getAttribute("role");n||e.setAttribute("role",t)};e.webshims.addReady(function(i,s){e.each(n,function(t,n){var o=e(t,i).add(s.filter(t));for(var u=0,a=o.length;u<a;u++)r(o[u],n)});if(i===t){var o=t.getElementsByTagName("header")[0],u=t.getElementsByTagName("footer"),a=u.length;o&&!e(o).closest("section, article")[0]&&r(o,"banner");if(!a)return;var f=u[a-1];e(f).closest("section, article")[0]||r(f,"contentinfo")}})}(jQuery,document),jQuery.webshims.register("form-message",function(e,t,n,r,i,s){"use strict";var o=t.validityMessages,u=s.overrideMessages||s.customMessages?["customValidationMessage"]:[];o.en=e.extend(!0,{typeMismatch:{defaultMessage:"Please enter a valid value.",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.",month:"Please enter a valid value.","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."}},o.en||o["en-US"]||{}),typeof o["en"].valueMissing=="object"&&["select","radio"].forEach(function(e){o.en.valueMissing[e]="Please select an option."}),typeof o.en.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeUnderflow[e]="Value must be at or after {%min}."}),typeof o.en.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeOverflow[e]="Value must be at or before {%max}."}),o["en-US"]=o["en-US"]||o.en,o[""]=o[""]||o["en-US"],o.de=e.extend(!0,{typeMismatch:{defaultMessage:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",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",month:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",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"}},o.de||{}),typeof o.de.valueMissing=="object"&&["select","radio"].forEach(function(e){o.de.valueMissing[e]="Bitte w\u00e4hlen Sie eine Option aus"}),typeof o.de.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeUnderflow[e]="{%value} ist zu fr\u00fch. {%min} ist die fr\u00fcheste Zeit, die Sie benutzen k\u00f6nnen."}),typeof o.de.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeOverflow[e]="{%value} ist zu sp\u00e4t. {%max} ist die sp\u00e4teste Zeit, die Sie benutzen k\u00f6nnen."});var a=o[""],f=function(t,n){return t&&typeof t!="string"&&(t=t[e.prop(n,"type")]||t[(n.nodeName||"").toLowerCase()]||t.defaultMessage),t||""},l={value:1,min:1,max:1};t.createValidationMessage=function(n,r){var i,s=f(a[r],n);return s||(s=f(o[""][r],n)||"invalid value",t.info("could not find errormessage for: "+r+" / "+e.prop(n,"type")+". in language: "+e.webshims.activeLang())),s&&["value","min","max","title","maxlength","label"].forEach(function(o){if(s.indexOf("{%"+o)===-1)return;var u=(o=="label"?e.trim(e('label[for="'+n.id+'"]',n.form).text()).replace(/\*$|:$/,""):e.prop(n,o))||"";r=="patternMismatch"&&o=="title"&&!u&&t.error("no title for patternMismatch provided. Always add a title attribute."),l[o]&&(i||(i=e(n).getShadowElement().data("wsspinner")),i&&i.formatValue&&(u=i.formatValue(u))),s=s.replace("{%"+o+"}",u),"value"==o&&(s=s.replace("{%valueLen}",u.length))}),s||""},(t.bugs.validationMessage||!Modernizr.formvalidation||t.bugs.bustedValidity)&&u.push("validationMessage"),t.activeLang({langObj:o,module:"form-core",callback:function(e){a=e}}),u.forEach(function(n){t.defineNodeNamesProperty(["fieldset","output","button"],n,{prop:{value:"",writeable:!1}}),["input","select","textarea"].forEach(function(r){var i=t.defineNodeNameProperty(r,n,{prop:{get:function(){var n=this,r="";if(!e.prop(n,"willValidate"))return r;var s=e.prop(n,"validity")||{valid:1};if(s.valid)return r;r=t.getContentValidationMessage(n,s);if(r)return r;if(s.customError&&n.nodeName){r=Modernizr.formvalidation&&!t.bugs.bustedValidity&&i.prop._supget?i.prop._supget.call(n):t.data(n,"customvalidationMessage");if(r)return r}return e.each(s,function(e,i){if(e=="valid"||!i)return;r=t.createValidationMessage(n,e);if(r)return!1}),r||""},writeable:!1}})})})});
+jQuery.webshims.register("dom-extend",function(e,t,n,r,i){"use strict";e("<form />").attr("novalidate")===""&&t.warn("IE browser modes are busted in IE10. Please test your HTML/CSS/JS with a real IE version or at least IETester or similiar tools");var s=t.modules,o=/\s*,\s*/,u={},a={},f={},l={},c={},h=e.fn.val,p=function(t,n,r,i,s){return s?h.call(e(t)):h.call(e(t),r)};e.fn.val=function(t){var n=this[0];arguments.length&&t==null&&(t="");if(!arguments.length)return!n||n.nodeType!==1?h.call(this):e.prop(n,"value",t,"val",!0);if(e.isArray(t))return h.apply(this,arguments);var r=e.isFunction(t);return this.each(function(s){n=this;if(n.nodeType===1)if(r){var o=t.call(n,s,e.prop(n,"value",i,"val",!0));o==null&&(o=""),e.prop(n,"value",o,"val")}else e.prop(n,"value",t,"val")})},e.fn.onTrigger=function(e,t){return this.on(e,t).each(t)};var d="_webshimsLib"+Math.round(Math.random()*1e3),v=function(t,n,r){t=t.jquery?t[0]:t;if(!t)return r||{};var s=e.data(t,d);return r!==i&&(s||(s=e.data(t,d,{})),n&&(s[n]=r)),n?s&&s[n]:s};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(t){e.fn[t.name]=function(){return this.map(function(){var e=v(this,"shadowData");return e&&e[t.prop]||this})}}),e.Tween.propHooks._default&&e.extend(e.Tween.propHooks._default,{get:function(t){var n;return t.elem[t.prop]==null&&!a[t.prop]||!!t.elem.style&&t.elem.style[t.prop]!=null?(n=jQuery.css(t.elem,t.prop,""),!n||n==="auto"?0:n):a[t.prop]?e.prop(t.elem,t.prop):t.elem[t.prop]},set:function(t){jQuery.fx.step[t.prop]?jQuery.fx.step[t.prop](t):t.elem.style&&(t.elem.style[jQuery.cssProps[t.prop]]!=null||jQuery.cssHooks[t.prop])?jQuery.style(t.elem,t.prop,t.now+t.unit):a[t.prop]?e.prop(t.elem,t.prop,t.now):t.elem[t.prop]=t.now}}),["removeAttr","prop","attr"].forEach(function(n){u[n]=e[n],e[n]=function(t,r,s,o,l){var h=o=="val",d=h?p:u[n];if(!t||!a[r]||t.nodeType!==1||!h&&o&&n=="attr"&&e.attrFn[r])return d(t,r,s,o,l);var v=(t.nodeName||"").toLowerCase(),m=f[v],g=n!="attr"||s!==!1&&s!==null?n:"removeAttr",y,b,w;m||(m=f["*"]),m&&(m=m[r]),m&&(y=m[g]);if(y){r=="value"&&(b=y.isVal,y.isVal=h);if(g==="removeAttr")return y.value.call(t);if(s===i)return y.get?y.get.call(t):y.value;y.set&&(n=="attr"&&s===!0&&(s=r),w=y.set.call(t,s)),r=="value"&&(y.isVal=b)}else w=d(t,r,s,o,l);if((s!==i||g==="removeAttr")&&c[v]&&c[v][r]){var E;g=="removeAttr"?E=!1:g=="prop"?E=!!s:E=!0,c[v][r].forEach(function(e){(!e.only||(e.only=n=="prop")||e.only=="attr"&&n!="prop")&&e.call(t,s,E,h?"val":g,n)})}return w},l[n]=function(e,r,s){f[e]||(f[e]={}),f[e][r]||(f[e][r]={});var o=f[e][r][n],a=function(e,t,i){return t&&t[e]?t[e]:i&&i[e]?i[e]:n=="prop"&&r=="value"?function(e){var t=this;return s.isVal?p(t,r,e,!1,arguments.length===0):u[n](t,r,e)}:n=="prop"&&e=="value"&&s.value.apply?function(e){var t=u[n](this,r);return t&&t.apply&&(t=t.apply(this,arguments)),t}:function(e){return u[n](this,r,e)}};f[e][r][n]=s,s.value===i&&(s.set||(s.set=s.writeable?a("set",s,o):t.cfg.useStrict&&r=="prop"?function(){throw r+" is readonly on "+e}:function(){t.info(r+" is readonly on "+e)}),s.get||(s.get=a("get",s,o))),["value","get","set"].forEach(function(e){s[e]&&(s["_sup"+e]=a(e,o))})}});var m=function(){var e=t.getPrototypeOf(r.createElement("foobar")),n=Object.prototype.hasOwnProperty,i=Modernizr.advancedObjectProperties&&Modernizr.objectAccessor;return function(s,o,u){var a,f;if(i&&(a=r.createElement(s))&&(f=t.getPrototypeOf(a))&&e!==f&&(!a[o]||!n.call(a,o))){var l=a[o];u._supvalue=function(){return l&&l.apply?l.apply(this,arguments):l},f[o]=u.value}else u._supvalue=function(){var e=v(this,"propValue");return e&&e[o]&&e[o].apply?e[o].apply(this,arguments):e&&e[o]},g.extendValue(s,o,u.value);u.value._supvalue=u._supvalue}}(),g=function(){var n={};t.addReady(function(r,i){var s={},o=function(t){s[t]||(s[t]=e(r.getElementsByTagName(t)),i[0]&&e.nodeName(i[0],t)&&(s[t]=s[t].add(i)))};e.each(n,function(e,n){o(e);if(!n||!n.forEach){t.warn("Error: with "+e+"-property. methods: "+n);return}n.forEach(function(t){s[e].each(t)})}),s=null});var i,s=e([]),o=function(t,s){n[t]?n[t].push(s):n[t]=[s],e.isDOMReady&&(i||e(r.getElementsByTagName(t))).each(s)},u={};return{createTmpCache:function(t){return e.isDOMReady&&(i=i||e(r.getElementsByTagName(t))),i||s},flushTmpCache:function(){i=null},content:function(t,n){o(t,function(){var t=e.attr(this,n);t!=null&&e.attr(this,n,t)})},createElement:function(e,t){o(e,t)},extendValue:function(t,n,r){o(t,function(){e(this).each(function(){var e=v(this,"propValue",{});e[n]=this[n],this[n]=r})})}}}(),y=function(e,t){e.defaultValue===i&&(e.defaultValue=""),e.removeAttr||(e.removeAttr={value:function(){e[t||"prop"].set.call(this,e.defaultValue),e.removeAttr._supvalue.call(this)}}),e.attr||(e.attr={})};e.extend(t,{getID:function(){var t=(new Date).getTime();return function(n){n=e(n);var r=n.prop("id");return r||(t++,r="ID-"+t,n.eq(0).prop("id",r)),r}}(),extendUNDEFProp:function(t,n){e.each(n,function(e,n){e in t||(t[e]=n)})},createPropDefault:y,data:v,moveToFirstEvent:function(t,n,r){var i=(e._data(t,"events")||{})[n],s;i&&i.length>1&&(s=i.pop(),r||(r="bind"),r=="bind"&&i.delegateCount?i.splice(i.delegateCount,0,s):i.unshift(s)),t=null},addShadowDom:function(){var i,s,o,u={init:!1,runs:0,test:function(){var e=u.getHeight(),t=u.getWidth();e!=u.height||t!=u.width?(u.height=e,u.width=t,u.handler({type:"docresize"}),u.runs++,u.runs<9&&setTimeout(u.test,90)):u.runs=0},handler:function(t){clearTimeout(i),i=setTimeout(function(){if(t.type=="resize"){var i=e(n).width(),a=e(n).width();if(a==s&&i==o)return;s=a,o=i,u.height=u.getHeight(),u.width=u.getWidth()}e(r).triggerHandler("updateshadowdom")},t.type=="resize"?50:9)},_create:function(){e.each({Height:"getHeight",Width:"getWidth"},function(e,t){var n=r.body,i=r.documentElement;u[t]=function(){return Math.max(n["scroll"+e],i["scroll"+e],n["offset"+e],i["offset"+e],i["client"+e])}})},start:function(){!this.init&&r.body&&(this.init=!0,this._create(),this.height=u.getHeight(),this.width=u.getWidth(),setInterval(this.test,600),e(this.test),t.ready("WINDOWLOAD",this.test),e(n).bind("resize",this.handler),function(){var t=e.fn.animate,n;e.fn.animate=function(){return clearTimeout(n),n=setTimeout(function(){u.test()},99),t.apply(this,arguments)}}())}};return t.docObserve=function(){t.ready("DOM",function(){u.start()})},function(n,r,i){i=i||{},n.jquery&&(n=n[0]),r.jquery&&(r=r[0]);var s=e.data(n,d)||e.data(n,d,{}),o=e.data(r,d)||e.data(r,d,{}),u={};i.shadowFocusElement?i.shadowFocusElement&&(i.shadowFocusElement.jquery&&(i.shadowFocusElement=i.shadowFocusElement[0]),u=e.data(i.shadowFocusElement,d)||e.data(i.shadowFocusElement,d,u)):i.shadowFocusElement=r,s.hasShadow=r,u.nativeElement=o.nativeElement=n,u.shadowData=o.shadowData=s.shadowData={nativeElement:n,shadowElement:r,shadowFocusElement:i.shadowFocusElement},i.shadowChilds&&i.shadowChilds.each(function(){v(this,"shadowData",o.shadowData)}),i.data&&(u.shadowData.data=o.shadowData.data=s.shadowData.data=i.data),i=null,t.docObserve()}}(),propTypes:{standard:function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,""+t)},get:function(){return e.attr.get.call(this)||e.defaultValue}}},"boolean":function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){t?e.attr.set.call(this,""):e.removeAttr.value.call(this)},get:function(){return e.attr.get.call(this)!=null}}},src:function(){var t=r.createElement("a");return t.style.display="none",function(n,r){y(n);if(n.prop)return;n.prop={set:function(e){n.attr.set.call(this,e)},get:function(){var n=this.getAttribute(r),i;if(n==null)return"";t.setAttribute("href",n+"");if(!e.support.hrefNormalized){try{e(t).insertAfter(this),i=t.getAttribute("href",4)}catch(s){i=t.getAttribute("href",4)}e(t).detach()}return i||t.href}}}}(),enumarated:function(e,t){y(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,t)},get:function(){var t=(e.attr.get.call(this)||"").toLowerCase();if(!t||e.limitedTo.indexOf(t)==-1)t=e.defaultValue;return t}}}},reflectProperties:function(n,r){typeof r=="string"&&(r=r.split(o)),r.forEach(function(r){t.defineNodeNamesProperty(n,r,{prop:{set:function(t){e.attr(this,r,t)},get:function(){return e.attr(this,r)||""}}})})},defineNodeNameProperty:function(n,r,i){return a[r]=!0,i.reflect&&t.propTypes[i.propType||"standard"](i,r),["prop","attr","removeAttr"].forEach(function(s){var o=i[s];o&&(s==="prop"?o=e.extend({writeable:!0},o):o=e.extend({},o,{writeable:!0}),l[s](n,r,o),n!="*"&&t.cfg.extendNative&&s=="prop"&&o.value&&e.isFunction(o.value)&&m(n,r,o),i[s]=o)}),i.initAttr&&g.content(n,r),i},defineNodeNameProperties:function(e,n,r,i){var s;for(var o in n)!i&&n[o].initAttr&&g.createTmpCache(e),r&&(n[o][r]||(n[o][r]={},["value","set","get"].forEach(function(e){e in n[o]&&(n[o][r][e]=n[o][e],delete n[o][e])}))),n[o]=t.defineNodeNameProperty(e,o,n[o]);return i||g.flushTmpCache(),n},createElement:function(n,r,i){var s;return e.isFunction(r)&&(r={after:r}),g.createTmpCache(n),r.before&&g.createElement(n,r.before),i&&(s=t.defineNodeNameProperties(n,i,!1,!0)),r.after&&g.createElement(n,r.after),g.flushTmpCache(),s},onNodeNamesPropertyModify:function(t,n,r,i){typeof t=="string"&&(t=t.split(o)),e.isFunction(r)&&(r={set:r}),t.forEach(function(e){c[e]||(c[e]={}),typeof n=="string"&&(n=n.split(o)),r.initAttr&&g.createTmpCache(e),n.forEach(function(t){c[e][t]||(c[e][t]=[],a[t]=!0),r.set&&(i&&(r.set.only=i),c[e][t].push(r.set)),r.initAttr&&g.content(e,t)}),g.flushTmpCache()})},defineNodeNamesBooleanProperty:function(n,r,s){s||(s={}),e.isFunction(s)&&(s.set=s),t.defineNodeNamesProperty(n,r,{attr:{set:function(e){this.setAttribute(r,e),s.set&&s.set.call(this,!0)},get:function(){var e=this.getAttribute(r);return e==null?i:r}},removeAttr:{value:function(){this.removeAttribute(r),s.set&&s.set.call(this,!1)}},reflect:!0,propType:"boolean",initAttr:s.initAttr||!1})},contentAttr:function(e,t,n){if(!e.nodeName)return;var r;if(n===i)return r=e.attributes[t]||{},n=r.specified?r.value:null,n==null?i:n;typeof n=="boolean"?n?e.setAttribute(t,t):e.removeAttribute(t):e.setAttribute(t,n)},activeLang:function(){var n=[],r={},i,o,u=/:\/\/|^\.*\//,a=function(n,r,i){var s;return r&&i&&e.inArray(r,i.availabeLangs||[])!==-1?(n.loading=!0,s=i.langSrc,u.test(s)||(s=t.cfg.basePath+s),t.loader.loadScript(s+r+".js",function(){n.langObj[r]?(n.loading=!1,l(n,!0)):e(function(){n.langObj[r]&&l(n,!0),n.loading=!1})}),!0):!1},f=function(e){r[e]&&r[e].forEach(function(e){e.callback(i,o,"")})},l=function(e,t){if(e.activeLang!=i&&e.activeLang!==o){var n=s[e.module].options;e.langObj[i]||o&&e.langObj[o]?(e.activeLang=i,e.callback(e.langObj[i]||e.langObj[o],i),f(e.module)):!t&&!a(e,i,n)&&!a(e,o,n)&&e.langObj[""]&&e.activeLang!==""&&(e.activeLang="",e.callback(e.langObj[""],i),f(e.module))}},c=function(t){return typeof t=="string"&&t!==i?(i=t,o=i.split("-")[0],i==o&&(o=!1),e.each(n,function(e,t){l(t)})):typeof t=="object"&&(t.register?(r[t.register]||(r[t.register]=[]),r[t.register].push(t),t.callback(i,o,"")):(t.activeLang||(t.activeLang=""),n.push(t),l(t))),i};return c}()}),e.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(e,n){t[e]=function(e,r,i,s){typeof e=="string"&&(e=e.split(o));var u={};return e.forEach(function(e){u[e]=t[n](e,r,i,s)}),u}}),t.isReady("webshimLocalization",!0)}),function(e,t){if(!Modernizr.localstorage||"hidden"in t.createElement("a"))return;var n={article:"article",aside:"complementary",section:"region",nav:"navigation",address:"contentinfo"},r=function(e,t){var n=e.getAttribute("role");n||e.setAttribute("role",t)};e.webshims.addReady(function(i,s){e.each(n,function(t,n){var o=e(t,i).add(s.filter(t));for(var u=0,a=o.length;u<a;u++)r(o[u],n)});if(i===t){var o=t.getElementsByTagName("header")[0],u=t.getElementsByTagName("footer"),a=u.length;o&&!e(o).closest("section, article")[0]&&r(o,"banner");if(!a)return;var f=u[a-1];e(f).closest("section, article")[0]||r(f,"contentinfo")}})}(jQuery,document),jQuery.webshims.register("form-message",function(e,t,n,r,i,s){"use strict";var o=t.validityMessages,u=s.overrideMessages||s.customMessages?["customValidationMessage"]:[];o.en=e.extend(!0,{typeMismatch:{defaultMessage:"Please enter a valid value.",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.",month:"Please enter a valid value.","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."}},o.en||o["en-US"]||{}),typeof o["en"].valueMissing=="object"&&["select","radio"].forEach(function(e){o.en.valueMissing[e]="Please select an option."}),typeof o.en.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeUnderflow[e]="Value must be at or after {%min}."}),typeof o.en.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeOverflow[e]="Value must be at or before {%max}."}),o["en-US"]=o["en-US"]||o.en,o[""]=o[""]||o["en-US"],o.de=e.extend(!0,{typeMismatch:{defaultMessage:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",email:"{%value} ist keine g\u00fcltige E-Mail-Adresse.",url:"{%value} ist kein(e) g\u00fcltige(r) Webadresse/Pfad.",number:"{%value} ist keine Nummer.",date:"{%value} ist kein Datum.",time:"{%value} ist keine Uhrzeit.",month:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",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."}},o.de||{}),typeof o.de.valueMissing=="object"&&["select","radio"].forEach(function(e){o.de.valueMissing[e]="Bitte w\u00e4hlen Sie eine Option aus."}),typeof o.de.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeUnderflow[e]="{%value} ist zu fr\u00fch. {%min} ist die fr\u00fcheste Zeit, die Sie benutzen k\u00f6nnen."}),typeof o.de.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeOverflow[e]="{%value} ist zu sp\u00e4t. {%max} ist die sp\u00e4teste Zeit, die Sie benutzen k\u00f6nnen."});var a=o[""],f=function(t,n){return t&&typeof t!="string"&&(t=t[e.prop(n,"type")]||t[(n.nodeName||"").toLowerCase()]||t.defaultMessage),t||""},l={value:1,min:1,max:1};t.createValidationMessage=function(n,r){var i,s=f(a[r],n);return s||(s=f(o[""][r],n)||"invalid value",t.info("could not find errormessage for: "+r+" / "+e.prop(n,"type")+". in language: "+e.webshims.activeLang())),s&&["value","min","max","title","maxlength","label"].forEach(function(o){if(s.indexOf("{%"+o)===-1)return;var u=(o=="label"?e.trim(e('label[for="'+n.id+'"]',n.form).text()).replace(/\*$|:$/,""):e.prop(n,o))||"";r=="patternMismatch"&&o=="title"&&!u&&t.error("no title for patternMismatch provided. Always add a title attribute."),l[o]&&(i||(i=e(n).getShadowElement().data("wsspinner")),i&&i.formatValue&&(u=i.formatValue(u))),s=s.replace("{%"+o+"}",u),"value"==o&&(s=s.replace("{%valueLen}",u.length))}),s||""},(t.bugs.validationMessage||!Modernizr.formvalidation||t.bugs.bustedValidity)&&u.push("validationMessage"),t.activeLang({langObj:o,module:"form-core",callback:function(e){a=e}}),u.forEach(function(n){t.defineNodeNamesProperty(["fieldset","output","button"],n,{prop:{value:"",writeable:!1}}),["input","select","textarea"].forEach(function(r){var i=t.defineNodeNameProperty(r,n,{prop:{get:function(){var n=this,r="";if(!e.prop(n,"willValidate"))return r;var s=e.prop(n,"validity")||{valid:1};if(s.valid)return r;r=t.getContentValidationMessage(n,s);if(r)return r;if(s.customError&&n.nodeName){r=Modernizr.formvalidation&&!t.bugs.bustedValidity&&i.prop._supget?i.prop._supget.call(n):t.data(n,"customvalidationMessage");if(r)return r}return e.each(s,function(e,i){if(e=="valid"||!i)return;r=t.createValidationMessage(n,e);if(r)return!1}),r||""},writeable:!1}})})})});
View
2 demos/js-webshim/minified/shims/combos/5.js
@@ -1 +1 @@
-jQuery.webshims.register("form-native-extend",function(e,t,n,r,i,s){"use strict";var o=n.Modernizr,u=o.inputtypes;if(!o.formvalidation||t.bugs.bustedValidity)return;var a=t.inputTypes,f={};t.addInputType=function(e,t){a[e]=t},t.addValidityRule=function(e,t){f[e]=t},t.addValidityRule("typeMismatch",function(e,t,n,r){if(t==="")return!1;var i=r.typeMismatch;return"type"in n||(n.type=(e[0].getAttribute("type")||"").toLowerCase()),a[n.type]&&a[n.type].mismatch&&(i=a[n.type].mismatch(t,e)),i});var l=s.overrideMessages,c=!u.number||!u.time||!u.range||l,h=["customError","typeMismatch","rangeUnderflow","rangeOverflow","stepMismatch","tooLong","patternMismatch","valueMissing","valid"],p=l?["value","checked"]:["value"],d=[],v=function(t,n){if(!t)return;var i=(t.getAttribute&&t.getAttribute("type")||t.type||"").toLowerCase();if(!l&&!a[i])return;l&&!n&&i=="radio"&&t.name?e(r.getElementsByName(t.name)).each(function(){e.prop(this,"validity")}):e.prop(t,"validity")},m={};["input","textarea","select"].forEach(function(n){var r=t.defineNodeNameProperty(n,"setCustomValidity",{prop:{value:function(i){i+="";var s=n=="input"?e(this).getNativeElement()[0]:this;r.prop._supvalue.call(s,i),t.bugs.validationMessage&&t.data(s,"customvalidationMessage",i),c&&(t.data(s,"hasCustomError",!!i),v(s))}}});m[n]=r.prop._supvalue});if(c||l)p.push("min"),p.push("max"),p.push("step"),d.push("input");l&&(p.push("required"),p.push("pattern"),d.push("select"),d.push("textarea"));if(c){var g;d.forEach(function(n){var r=t.defineNodeNameProperty(n,"validity",{prop:{get:function(){if(g)return;var i=n=="input"?e(this).getNativeElement()[0]:this,s=r.prop._supget.call(i);if(!s)return s;var o={};h.forEach(function(e){o[e]=s[e]});if(!e.prop(i,"willValidate"))return o;g=!0;var u=e(i),c={type:(i.getAttribute&&i.getAttribute("type")||"").toLowerCase(),nodeName:(i.nodeName||"").toLowerCase()},p=u.val(),d=!!t.data(i,"hasCustomError"),v;g=!1,o.customError=d;if(o.valid&&o.customError)o.valid=!1;else if(!o.valid){var y=!0;e.each(o,function(e,t){if(t)return y=!1,!1}),y&&(o.valid=!0)}return e.each(f,function(e,r){o[e]=r(u,p,c,o),o[e]&&(o.valid||!v)&&(l||a[c.type]&&a[c.type].mismatch)&&(m[n].call(i,t.createValidationMessage(i,e)),o.valid=!1,v=!0)}),o.valid?(m[n].call(i,""),t.data(i,"hasCustomError",!1)):l&&!v&&!d&&e.each(o,function(e,r){if(e!=="valid"&&r)return m[n].call(i,t.createValidationMessage(i,e)),!1}),o},writeable:!1}})}),p.forEach(function(e){t.onNodeNamesPropertyModify(d,e,function(e){v(this)})});if(r.addEventListener){var y,b=function(t){if(!("form"in t.target))return;var n=t.target.form;clearTimeout(y),v(t.target),n&&l&&e("input",n).each(function(){this.type=="password"&&v(this)})};r.addEventListener("change",b,!0),l&&(r.addEventListener("blur",b,!0),r.addEventListener("keydown",function(e){if(e.keyCode!=13)return;b(e)},!0)),r.addEventListener("input",function(e){clearTimeout(y),y=setTimeout(function(){v(e.target)},290)},!0)}var w=d.join(",");t.addReady(function(t,n){e(w,t).add(n.filter(w)).each(function(){e.prop(this,"validity")})}),l&&t.ready("DOM form-message",function(){t.activeLang({register:"form-core",callback:function(){e("input, select, textarea").getNativeElement().each(function(){if(t.data(this,"hasCustomError"))return;var n=this,r=e.prop(n,"validity")||{valid:!0},i;if(r.valid)return;i=(n.nodeName||"").toLowerCase(),e.each(r,function(e,r){if(e!=="valid"&&r)return m[i].call(n,t.createValidationMessage(n,e)),!1})})}})})}t.defineNodeNameProperty("input","type",{prop:{get:function(){var e=this,n=(e.getAttribute("type")||"").toLowerCase();return t.inputTypes[n]?n:e.type}}})}),jQuery.webshims.register("form-number-date-api",function(e,t,n,r,i){"use strict";t.getStep||(t.getStep=function(t,n){var r=e.attr(t,"step");return r==="any"?r:(n=n||l(t),!u[n]||!u[n].step?r:(r=y.number.asNumber(r),(!isNaN(r)&&r>0?r:u[n].step)*(u[n].stepScaleFactor||1)))}),t.addMinMaxNumberToCache||(t.addMinMaxNumberToCache=function(e,t,n){e+"AsNumber"in n||(n[e+"AsNumber"]=u[n.type].asNumber(t.attr(e)),isNaN(n[e+"AsNumber"])&&e+"Default"in u[n.type]&&(n[e+"AsNumber"]=u[n.type][e+"Default"]))});var s=parseInt("NaN",10),o=r,u=t.inputTypes,a=function(e){return typeof e=="number"||e&&e==e*1},f=function(t){return e('<input type="'+t+'" />').prop("type")===t},l=function(e){return(e.getAttribute("type")||"").toLowerCase()},c=function(e){var t=e*1;return e&&(t==e||e=="0"+t)},h=t.addMinMaxNumberToCache,p=function(e,t){e=""+e,t-=e.length;for(var n=0;n<t;n++)e="0"+e;return e},d=1e-7,v=t.bugs.bustedValidity;t.addValidityRule("stepMismatch",function(e,n,r,i){if(n==="")return!1;"type"in r||(r.type=l(e[0]));var s=(i||{}).stepMismatch||!1,o;if(u[r.type]&&u[r.type].step){"step"in r||(r.step=t.getStep(e[0],r.type));if(r.step=="any")return!1;"valueAsNumber"in r||(r.valueAsNumber=u[r.type].asNumber(n));if(isNaN(r.valueAsNumber))return!1;h("min",e,r),o=r.minAsNumber,isNaN(o)&&(o=u[r.type].stepBase||0),s=Math.abs((r.valueAsNumber-o)%r.step),s=!(s<=d||Math.abs(s-r.step)<=d)}return s}),[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(e,n){t.addValidityRule(e.name,function(t,n,r,i){var s=(i||{})[e.name]||!1;if(n==="")return s;"type"in r||(r.type=l(t[0]));if(u[r.type]&&u[r.type].asNumber){"valueAsNumber"in r||(r.valueAsNumber=u[r.type].asNumber(n));if(isNaN(r.valueAsNumber))return!1;h(e.attr,t,r);if(isNaN(r[e.attr+"AsNumber"]))return s;s=r[e.attr+"AsNumber"]*e.factor<r.valueAsNumber*e.factor-d}return s})}),t.reflectProperties(["input"],["max","min","step"]);var m=t.defineNodeNameProperty("input","valueAsNumber",{prop:{get:function(){var t=this,n=l(t),r=u[n]&&u[n].asNumber?u[n].asNumber(e.prop(t,"value")):m.prop._supget&&m.prop._supget.apply(t,arguments);return r==null&&(r=s),r},set:function(n){var r=this,i=l(r);if(u[i]&&u[i].numberToString){if(isNaN(n)){e.prop(r,"value","");return}var s=u[i].numberToString(n);s!==!1?e.prop(r,"value",s):t.error("INVALID_STATE_ERR: DOM Exception 11")}else m.prop._supset&&m.prop._supset.apply(r,arguments)}}}),g=t.defineNodeNameProperty("input","valueAsDate",{prop:{get:function(){var t=this,n=l(t);return u[n]&&u[n].asDate&&!u[n].noAsDate?u[n].asDate(e.prop(t,"value")):g.prop._supget&&g.prop._supget.call(t)||null},set:function(n){var r=this,i=l(r);if(!(u[i]&&u[i].dateToString&&!u[i].noAsDate))return g.prop._supset&&g.prop._supset.apply(r,arguments)||null;if(n===null)return e.prop(r,"value",""),"";var s=u[i].dateToString(n);if(s!==!1)return e.prop(r,"value",s),s;t.error("INVALID_STATE_ERR: DOM Exception 11")}}});e.each({stepUp:1,stepDown:-1},function(n,r){var i=t.defineNodeNameProperty("input",n,{prop:{value:function(n){var s,o,a,f,c,h,p=l(this);if(!u[p]||!u[p].asNumber){if(i.prop&&i.prop.value)return i.prop.value.apply(this,arguments);throw t.info("no step method for type: "+p),"invalid state error"}h={type:p},n||(n=1,t.info("you should always use a factor for stepUp/stepDown")),n*=r,o=e.prop(this,"valueAsNumber");if(isNaN(o))throw t.info("valueAsNumber is NaN can't apply stepUp/stepDown "),"invalid state error";s=t.getStep(this,p);if(s=="any")throw t.info("step is 'any' can't apply stepUp/stepDown"),"invalid state error";t.addMinMaxNumberToCache("min",e(this),h),t.addMinMaxNumberToCache("max",e(this),h),s*=n,o+=s,f=(o-(h.minAsNumber||0))%s,f&&Math.abs(f)>d&&(c=o-f,c+=f>0?s:-s,o=c.toFixed(5)*1);if(!isNaN(h.maxAsNumber)&&o>h.maxAsNumber||!isNaN(h.minAsNumber)&&o<h.minAsNumber)throw t.info("max/min overflow can't apply stepUp/stepDown"),"invalid state error";a?e.prop(this,"valueAsDate",a):e.prop(this,"valueAsNumber",o)}}})});var y={number:{mismatch:function(e){return!a(e)},step:1,stepScaleFactor:1,asNumber:function(e){return a(e)?e*1:s},numberToString:function(e){return a(e)?e:!1}},range:{minDefault:0,maxDefault:100},date:{mismatch:function(e){if(!e||!e.split||!/\d$/.test(e))return!0;var t,n=e.split(/\u002D/);if(n.length!==3)return!0;var r=!1;if(n[0].length!==4||n[1].length!=2||n[1]>12||n[2].length!=2||n[2]>33)r=!0;else for(t=0;t<3;t++)if(!c(n[0])){r=!0;break}return r||e!==this.dateToString(this.asDate(e,!0))},step:1,stepScaleFactor:864e5,asDate:function(e,t){return!t&&this.mismatch(e)?null:new Date(this.asNumber(e,!0))},asNumber:function(e,t){var n=s;if(t||!this.mismatch(e))e=e.split(/\u002D/),n=Date.UTC(e[0],e[1]-1,e[2]);return n},numberToString:function(e){return a(e)?this.dateToString(new Date(e*1)):!1},dateToString:function(e){return e&&e.getFullYear?e.getUTCFullYear()+"-"+p(e.getUTCMonth()+1,2)+"-"+p(e.getUTCDate(),2):!1}},time:{mismatch:function(t,n){if(!t||!t.split||!/\d$/.test(t))return!0;t=t.split(/\u003A/);if(t.length<2||t.length>3)return!0;var r=!1,i;return t[2]&&(t[2]=t[2].split(/\u002E/),i=parseInt(t[2][1],10),t[2]=t[2][0]),e.each(t,function(e,t){if(!c(t)||t.length!==2)return r=!0,!1}),r?!0:t[0]>23||t[0]<0||t[1]>59||t[1]<0?!0:t[2]&&(t[2]>59||t[2]<0)?!0:i&&isNaN(i)?!0:(i&&(i<100?i*=100:i<10&&(i*=10)),n===!0?[t,i]:!1)},step:60,stepBase:0,stepScaleFactor:1e3,asDate:function(e){return e=new Date(this.asNumber(e)),isNaN(e)?null:e},asNumber:function(e){var t=s;return e=this.mismatch(e,!0),e!==!0&&(t=Date.UTC("1970",0,1,e[0][0],e[0][1],e[0][2]||0),e[1]&&(t+=e[1])),t},dateToString:function(e){if(e&&e.getUTCHours){var t=p(e.getUTCHours(),2)+":"+p(e.getUTCMinutes(),2),n=e.getSeconds();return n!="0"&&(t+=":"+p(n,2)),n=e.getUTCMilliseconds(),n!="0"&&(t+="."+p(n,3)),t}return!1}},month:{mismatch:function(e){return y.date.mismatch(e+"-01")},step:1,stepScaleFactor:!1,asDate:function(e){return new Date(y.date.asNumber(e+"-01"))},asNumber:function(e){var t=s;return e&&!this.mismatch(e)&&(e=e.split(/\u002D/),e[0]=e[0]*1-1970,e[1]=e[1]*1-1,t=e[0]*12+e[1]),t},numberToString:function(e){var t,n=!1;return a(e)&&(t=e%12,e=(e-t)/12+1970,t+=1,t<1&&(e-=1,t+=12),n=p(e,4)+"-"+p(t,2)),n},dateToString:function(e){if(e&&e.getUTCHours){var t=y.date.dateToString(e);return t.split&&(t=t.split(/\u002D/))?t[0]+"-"+t[1]:!1}return!1}}};if(v||!f("range")||!f("time"))y.range=e.extend({},y.number,y.range),y.time=e.extend({},y.date,y.time),y.month=e.extend({},y.date,y.month);["number","month","range","date","time"].forEach(function(e){(v||!f(e))&&t.addInputType(e,y[e])}),e("<input />").prop("labels")==null&&t.defineNodeNamesProperty("button, input, keygen, meter, output, progress, select, textarea","labels",{prop:{get:function(){if(this.type=="hidden")return null;var t=this.id,n=e(this).closest("label").filter(function(){var e=this.attributes["for"]||{};return!e.specified||e.value==t});return t&&(n=n.add('label[for="'+t+'"]')),n.get()},writeable:!1}})}),function(e){var t=0,n=function(e){return typeof e=="number"||e&&e==e*1},r=function(e,t){return typeof e=="number"||e&&e==e*1?e*1:t},i=["step","min","max","readonly","title","disabled","tabindex"],s={_create:function(){var t;this.element.addClass("ws-range").attr({role:"slider"}).html('<span class="ws-range-min" /><span class="ws-range-rail"><span class="ws-range-thumb" /></span>'),this.trail=e(".ws-range-rail",this.element),this.range=e(".ws-range-min",this.element),this.thumb=e(".ws-range-thumb",this.trail),this.updateMetrics(),this.orig=this.options.orig;for(t=0;t<i.length;t++)this[i[t]](this.options[i[t]]);this.value=this._value,this.value(this.options.value),this.initDataList(),this.element.data("rangeUi",this),this.addBindings(),this._init=!0},value:e.noop,_value:function(e,t,n){var r,i=this.options,s=e,o={},u={};!t&&parseFloat(e,10)!=e&&(e=i.min+(i.max-i.min)/2),t||(e=this.normalizeVal(e)),r=100*((e-i.min)/(i.max-i.min)),this.options.value=e,this.thumb.stop(),this.range.stop(),u[this.dirs.width]=r+"%",this.vertical&&(r=Math.abs(r-100)),o[this.dirs.left]=r+"%",n?(typeof i.animate!="object"&&(i.animate={}),this.thumb.animate(o,i.animate),this.range.animate(u,i.animate)):(this.thumb.css(o),this.range.css(u)),this.orig&&(s!=e||!this._init&&this.orig.value!=e)&&this.options._change(e),this.element.attr({"aria-valuenow":this.options.value,"aria-valuetext":this.options.textValue?this.options.textValue(this.options.value):this.options.options[this.options.value]||this.options.value})},initDataList:function(){if(this.orig){var t,n=this,r=function(){e(n.orig).jProp("list").off("updateDatalist",r).on("updateDatalist",r),clearTimeout(t),t=setTimeout(function(){n.list&&n.list()},9)};e(this.orig).on("listdatalistchange",r),this.list()}},list:function(t){var r=this.options,i=r.min,s=r.max,o=this.trail,u=this;this.element.attr({"aria-valuetext":r.options[r.value]||r.value}),e(".ws-range-ticks",o).remove(),e(this.orig).jProp("list").find("option").each(function(){r.options[e.prop(this,"value")]=e.prop(this,"label")}),e.each(r.options,function(e,t){if(!n(e)||e<i||e>s)return;var a=100*((e-i)/(s-i)),f=r.showLabels?' title="'+t+'"':"";u.vertical&&(a=Math.abs(a-100)),o.append('<span class="ws-range-ticks"'+f+' style="'+u.dirs.left+": "+a+'%;" />')})},readonly:function(e){e=!!e,this.options.readonly=e,this.element.attr("aria-readonly",""+e)},disabled:function(e){e=!!e,this.options.disabled=e,e?this.element.attr({tabindex:-1,"aria-disabled":"true"}):this.element.attr({tabindex:this.options.tabindex,"aria-disabled":"false"})},tabindex:function(e){this.options.tabindex=e,this.options.disabled||this.element.attr({tabindex:e})},title:function(e){this.element.prop("title",e)},min:function(e){this.options.min=r(e,0),this.value(this.options.value,!0)},max:function(e){this.options.max=r(e,100),this.value(this.options.value,!0)},step:function(e){this.options.step=e=="any"?"any":r(e,1),this.value(this.options.value)},normalizeVal:function(e){var t,n,r,i=this.options;return e<=i.min?e=i.min:e>=i.max?e=i.max:i.step!="any"&&(r=i.step,t=(e-i.min)%r,n=e-t,Math.abs(t)*2>=r&&(n+=t>0?r:-r),e=n.toFixed(5)*1),e},doStep:function(e){var t=r(this.options.step,1);this.options.step=="any"&&(t=Math.min(t,(this.options.max-this.options.min)/10)),this.value(this.options.value+t*e)},getStepedValueFromPos:function(e){var t,n,r,i;return e<=0?t=this.options[this.dirs.min]:e>100?t=this.options[this.dirs.max]:(this.vertical&&(e=Math.abs(e-100)),t=(this.options.max-this.options.min)*(e/100)+this.options.min,i=this.options.step,i!="any"&&(n=(t-this.options.min)%i,r=t-n,Math.abs(n)*2>=i&&(r+=n>0?i:-i),t=r.toFixed(5)*1)),t},addBindings:function(){var t,n,r,i=this,s=this.options,o=function(){var t={};return{init:function(n,r,s){t[n]||(t[n]={fn:s},i.orig&&e(i.orig).on(n,function(){t[n].val=e.prop(i.orig,"value")})),t[n].val=r},call:function(e,n){t[e].val!=n&&(clearTimeout(t[e].timer),t[e].val=n,t[e].timer=setTimeout(function(){t[e].fn(n,i)},0))}}}(),u=function(e,r){var u=i.getStepedValueFromPos((e[i.dirs.mouse]-t)*n);u!=s.value&&(i.value(u,!1,r),o.call("input",u))},a=function(t){t&&t.type=="mouseup"&&(o.call("input",s.value),o.call("change",s.value)),i.element.removeClass("ws-active"),e(document).off("mousemove",u).off("mouseup",a)},f=function(r){r.preventDefault(),e(document).off("mousemove",u).off("mouseup",a);if(!s.readonly&&!s.disabled){t=i.element.focus().addClass("ws-active").offset(),n=i.element[i.dirs.width]();if(!n||!t)return;t=t[i.dirs.pos],n=100/(n-(i.thumb[i.dirs.outerWidth]()||2)/2),u(r,i.options.animate),e(document).on({mouseup:a,mousemove:u}),r.stopPropagation()}},l={mousedown:f,focus:function(e){s.disabled||(o.init("input",s.value),o.init("change",s.value),i.element.addClass("ws-focus")),r=!0},blur:function(e){i.element.removeClass("ws-focus ws-active"),r=!1,o.init("input",s.value),o.call("change",s.value)},keyup:function(){i.element.removeClass("ws-active"),o.call("input",s.value),o.call("change",s.value)},keydown:function(e){var t=!0,n=e.keyCode;!s.readonly&&!s.disabled&&(n==39||n==38?i.doStep(1):n==37||n==40?i.doStep(-1):n==33?i.doStep(10):n==34?i.doStep(-10):n==36?i.value(i.options.max):n==35?i.value(i.options.min):t=!1,t&&(i.element.addClass("ws-active"),o.call("input",s.value),e.preventDefault()))}};o.init("input",s.value,this.options.input),o.init("change",s.value,this.options.change),l[e.fn.mwheelIntent?"mwheelIntent":"mousewheel"]=function(e,t){t&&r&&!s.readonly&&!s.disabled&&(i.doStep(t),e.preventDefault(),o.call("input",s.value))},this.element.on(l),this.thumb.on({mousedown:f})},updateMetrics:function(){var e=this.element.innerWidth();this.vertical=e&&this.element.innerHeight()-e>10,this.dirs=this.vertical?{mouse:"pageY",pos:"top",min:"max",max:"min",left:"top",width:"height",outerWidth:"outerHeight"}:{mouse:"pageX",pos:"left",min:"min",max:"max",left:"left",width:"width",outerWidth:"outerWidth"},this.element[this.vertical?"addClass":"removeClass"]("vertical-range")[this.vertical?"addClass":"removeClass"]("horizontal-range")}};e.fn.rangeUI=function(t){return t=e.extend({readonly:!1,disabled:!1,tabindex:0,min:0,step:1,max:100,value:50,input:e.noop,change:e.noop,_change:e.noop,showLabels:!0},t),this.each(function(){e.webshims.objectCreate(s,{element:{value:e(this)}},t)})},jQuery.webshims.isReady("range-ui",!0)}(jQuery),jQuery.webshims.register("form-number-date-ui",function(e,t,n,r,i,s){"use strict";var o,u=e.webshims.formcfg,a=function(e){e.stopImmediatePropagation(e)},f=function(){var n=function(){return t.getID(this)};return function(t,r,i){e(t).attr({"aria-labelledby":r.map(n).get().join(" ")}),i||r.on("click",function(e){return t.focus(),e.preventDefault(),!1})}}(),l=function(e){return e?(e+="",e.length==1?"0"+e:e):""};(function(){u.de={numberFormat:{",":".",".":","},timeSigns:":. ",numberSigns:",",dateSigns:".",dFormat:".",patterns:{d:"dd.mm.yy"},month:{currentText:"Aktueller Monat"},date:{close:"schlie\u00dfen",clear:"L\u00f6schen",prevText:"Zur\u00fcck",nextText:"Vor",currentText:"Heute",monthNames:["Januar","Februar","M\u00e4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","M\u00e4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}},u.en={numberFormat:{".":".",",":","},numberSigns:".",dateSigns:"/",timeSigns:":. ",dFormat:"/",patterns:{d:"mm/dd/yy"},month:{currentText:"This month"},date:{closeText:"Done",clear:"Clear",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}},u["en-US"]=u["en-US"]||u.en,u[""]=u[""]||u["en-US"],o=u[""];var t=function(t){if(!t.date.monthkeys){var n=function(e,n){var r,i=e+1;r=i<10?"0"+i:""+i,t.date.monthkeys[i]=r,t.date.monthkeys[n]=r};t.date.monthkeys={},e.each(t.date.monthNames,n),e.each(t.date.monthNamesShort,n)}};t(o),e.webshims.ready("dom-extend",function(){e.webshims.activeLang({register:"form-core",callback:function(){e.each(arguments,function(n,i){if(u[i])return o=u[i],t(o),e(r).triggerHandler("wslocalechange"),!1})}})})})(),function(){var t=function(t){e(this)[t.type=="mousepressstart"?"addClass":"removeClass"]("mousepress-ui")},n=function(e,t){return typeof e=="number"||e&&e==e*1?e*1:t},i=["step","min","max","readonly","title","disabled","tabindex","placeholder","value"],s=function(t){if(!o.patterns[t+"Obj"]){var n={};e.each(o.patterns[t].split(o[t+"Format"]),function(e,t){n[t]=e}),o.patterns[t+"Obj"]=n}},u={number:function(e){return(e+"").replace(/\,/g,"").replace(/\./,o.numberFormat["."])},time:function(e){return e},month:function(e,t){var n,r=e.split("-");return r[0]&&r[1]&&(n=o.date[t.monthNames]||o.date.monthNames,r[1]=n[r[1]*1-1],r[1]&&(e=o.date.showMonthAfterYear?r.join(" "):r[1]+" "+r[0])),e},date:function(e){var t=(e+"").split("-");return t[2]&&t[1]&&t[0]&&(e=o.patterns.d.replace("yy",t[0]||""),e=e.replace("mm",t[1]||""),e=e.replace("dd",t[2]||"")),e}},a={number:function(e){return(e+"").replace(o.numberFormat[","],"").replace(o.numberFormat["."],".")},time:function(e){return e},month:function(e){var t=e.trim().split(/[\s-\/\\]+/);return t.length==2&&(t[0]=o.date.monthkeys[t[0]]||t[0],t[1]=o.date.monthkeys[t[1]]||t[1],t[1].length==2?e=t[0]+"-"+t[1]:t[0].length==2&&(e=t[1]+"-"+t[0])),e},date:function(e){s("d");var t,n=o.patterns.dObj;return e=e.split(o.dFormat),e.length==3?[l(e[n.yy]),l(e[n.mm]),l(e[n.dd])].join("-"):""}},f={number:{step:1},time:{step:60},month:{step:1,start:new Date},date:{step:1,start:new Date}},c=function(){var t={};return function(n){var r;return t[n]||(r=e('<input type="'+n+'" />'),t[n]=function(e){var t=typeof e=="object"?"valueAsDate":"value";return r.prop(t,e).prop("valueAsNumber")}),t[n]}}();f.range=f.number;var h={_create:function(){var t;this.type=this.options.type,this.orig=this.options.orig,this.elemHelper=e('<input type="'+this.type+'" />'),this.asNumber=c(this.type),this.buttonWrapper=e('<span class="input-buttons '+this.type+'-input-buttons"><span unselectable="on" class="step-controls"><span class="step-up"></span><span class="step-down"></span></span></span>').insertAfter(this.element),this.options.containerElements.push(this.buttonWrapper[0]),typeof f[this.type].start=="object"&&(f[this.type].start=this.asNumber(f[this.type].start));for(t=0;t<i.length;t++)this[i[t]](this.options[i[t]]);var n=this.element.attr("autocomplete","off").data("wsspinner",this);this.addBindings(),this._init=!0},parseValue:function(e){return a[this.type](e)},formatValue:function(e){return u[this.type](e,this.options)},placeholder:function(e){var t;this.options.placeholder=e,this.type=="date"&&(t=(e||"").split("-"),t.length==3&&(this.options.placeholder=o.patterns.d.replace("yy",t[0]).replace("mm",t[1]).replace("dd",t[2]))),this.element.prop("placeholder",this.options.placeholder)},addZero:l,_setStartInRange:function(){var e=f[this.type].start||0;this.options.relDefaultValue&&(e+=this.options.relDefaultValue),!isNaN(this.minAsNumber)&&e<this.minAsNumber?e=this.minAsNumber:!isNaN(this.maxAsNumber)&&e>this.maxAsNumber&&(e=this.maxAsNumber),this.elemHelper.prop("valueAsNumber",e).prop("value"),this.options.defValue=this.elemHelper.prop("value")},value:function(e){this.valueAsNumber=this.asNumber(e),this.options.value=e,isNaN(this.valueAsNumber)?this._setStartInRange():(this.elemHelper.prop("value",e),this.options.defValue=""),this.element.prop("value",u[this.type](e,this.options)),this._propertyChange("value")},initDataList:function(){var t,n=this,r=function(){e(n.orig).jProp("list").off("updateDatalist",r).on("updateDatalist",r),clearTimeout(t),t=setTimeout(function(){n.list&&n.list()},9)};e(this.orig).onTrigger("listdatalistchange",r)},getOptions:function(){var t={};return e(this.orig).jProp("list").find("option").each(function(){t[e.prop(this,"value")]=e.prop(this,"label")}),t},list:function(t){(this.type=="number"||this.type=="time")&&this.element.attr("list",e.attr(this.orig,"list")),this.options.list=t,this._propertyChange("list")},_propertyChange:e.noop,tabindex:function(e){this.options.tabindex=e,this.element.prop("tabindex",this.options.tabindex)},title:function(e){this.options.title=e,this.element.prop("tabindex",this.options.title)},min:function(e){this.elemHelper.prop("min",e),this.minAsNumber=this.asNumber(e),this.valueAsNumber!=null&&isNaN(this.valueAsNumber)&&this._setStartInRange(),this.options.min=e,this._propertyChange("min")},max:function(e){this.elemHelper.prop("max",e),this.maxAsNumber=this.asNumber(e),this.valueAsNumber!=null&&isNaN(this.valueAsNumber)&&this._setStartInRange(),this.options.max=e,this._propertyChange("max")},step:function(e){var t=f[this.type];this.options.step=e,this.elemHelper.prop("step",n(e,t.step))},addBindings:function(){var n,i=this,s=this.options,u=function(){var t={};return{init:function(n,r,s){t[n]||(t[n]={fn:s},e(i.orig).on(n,function(){t[n].val=e.prop(i.orig,"value")})),t[n].val=r},call:function(e,n){t[e]&&t[e].val!=n&&(clearTimeout(t[e].timer),t[e].val=n,t[e].timer=setTimeout(function(){t[e].fn(n,i)},0))}}}(),f={},l=function(e){if(l.prevent)return e.preventDefault(),i.element.focus(),e.stopImmediatePropagation(),!0},c={blur:function(t){!l(t)&&!s.disabled&&!s.readonly&&(u.call("input",e.prop(i.orig,"value")),u.call("change",e.prop(i.orig,"value")),l.prevent||(n=!1))},focus:function(){u.init("input",e.prop(i.orig,"value"),i.options.input),u.init("change",e.prop(i.orig,"value"),i.options.change),n=!0},change:function(){var t=a[i.type](e.prop(this,"value"));e.prop(i.orig,"value",t),u.call("input",t),u.call("change",t)},keydown:function(e){if(e.isDefaultPrevented())return;var t=!0,n=e.keyCode;n==38?f.stepUp():n==40?f.stepDown():t=!1,t&&e.preventDefault()},keypress:function(e){if(e.isDefaultPrevented())return;var t,n=!0,r=e.keyCode;!e.ctrlKey&&!e.metaKey&&o[i.type+"Signs"]?(t=String.fromCharCode(e.charCode==null?r:e.charCode),n=!(t<" "||(o[i.type+"Signs"]+"0123456789").indexOf(t)>-1)):n=!1,n&&e.preventDefault()}},h=function(){return!s.disabled&&!n&&i.element[0].focus(),l.set(),!1};l.set=function(){var e,t=function(){l.prevent=!1};return function(){clearTimeout(e),l.prevent=!0,setTimeout(t,9)}}(),["stepUp","stepDown"].forEach(function(e){f[e]=function(t){if(!s.disabled&&!s.readonly){n||h();var r=!1;t||(t=1);try{i.elemHelper[e](t),r=i.elemHelper.prop("value"),i.value(r),u.call("input",r)}catch(o){}return r}}}),this.buttonWrapper.on("mousedown",h),this.setInput=function(e){i.value(e),u.call("input",e)},this.setChange=function(e){i.setInput(e),u.call("change",e)},c[e.fn.mwheelIntent?"mwheelIntent":"mousewheel"]=function(e,t){t&&n&&!s.disabled&&(f[t>0?"stepUp":"stepDown"](),e.preventDefault())},this.element.on(c),e(r).on("wslocalechange",function(){i.value(i.options.value)}),e(".step-up",this.buttonWrapper).on({"mousepressstart mousepressend":t,"mousedown mousepress":function(e){f.stepUp()}}),e(".step-down",this.buttonWrapper).on({"mousepressstart mousepressend":t,"mousedown mousepress":function(e){f.stepDown()}})}};["readonly","disabled"].forEach(function(e){h[e]=function(t){if(this.options[e]!=t||!this._init)this.options[e]=!!t,this.element.prop(e,this.options[e]),this.buttonWrapper[this.options[e]?"addClass":"removeClass"]("ws-"+e)}}),e.fn.spinbtnUI=function(t){return t=e.extend({monthNames:"monthNames",size:1,startView:0},t),this.each(function(){e.webshims.objectCreate(h,{element:{value:e(this)}},t)})}}(),function(){var n={},i={},s=function(e){var t=[e.getFullYear(),l(e.getMonth()+1),l(e.getDate())];return t.month=t[0]+"-"+t[1],t.date=t[0]+"-"+t[1]+"-"+t[2],t},c=s(new Date),h=function(t,n){t=e(t||this.activeButton),this.activeButton.attr({tabindex:"-1","aria-selected":"false"}),this.activeButton=t.attr({tabindex:"0","aria-selected":"true"}),this.index=this.buttons.index(this.activeButton[0]),n||(clearTimeout(this.timer),this.popover.activateElement(t),this.popover.openedByFocus||(this.timer=setTimeout(function(){t[0].focus()},this.popover.isVisible?20:99)))},p=function(){var t;this.popover.navedInitFocus&&(t=this.popover.navedInitFocus.sel||this.popover.navedInitFocus,(!this.activeButton||!this.activeButton[0])&&this.buttons[t]?this.activeButton=this.buttons[t]():t&&(this.activeButton=e(t,this.element)),!this.activeButton[0]&&this.popover.navedInitFocus.alt&&(this.activeButton=this.buttons[this.popover.navedInitFocus.alt]()));if(!this.activeButton||!this.activeButton[0])this.activeButton=this.buttons.filter(".checked-value");this.activeButton[0]||(this.activeButton=this.buttons.filter(".this-value")),this.activeButton[0]||(this.activeButton=this.buttons.eq(0)),this.setFocus(this.activeButton,this.opts.noFocus)};t.ListBox=function(t,n,r){this.element=e("ul",t),this.popover=n,this.opts=r||{},this.buttons=e("button:not(:disabled)",this.element),this.ons(this),this._initialFocus()},t.ListBox.prototype={setFocus:h,_initialFocus:p,prev:function(){var e=this.index-1;e<0?this.opts.prev&&(this.popover.navedInitFocus="last",this.popover.actionFn(this.opts.prev),this.popover.navedInitFocus=!1):this.setFocus(this.buttons.eq(e))},next:function(){var e=this.index+1;e>=this.buttons.length?this.opts.next&&(this.popover.navedInitFocus="first",this.popover.actionFn(this.opts.next),this.popover.navedInitFocus=!1):this.setFocus(this.buttons.eq(e))},ons:function(e){this.element.on({keydown:function(t){var n,r=t.keyCode;if(t.ctrlKey)return;if(r==36||r==33)e.setFocus(e.buttons.eq(0)),n=!0;else if(r==34||r==35)e.setFocus(e.buttons.eq(e.buttons.length-1)),n=!0;else if(r==38||r==37)e.prev(),n=!0;else if(r==40||r==39)e.next(),n=!0;if(n)return!1}})}},t.Grid=function(t,n,r){this.element=e("tbody",t),this.popover=n,this.opts=r||{},this.buttons=e("button:not(:disabled,.othermonth)",this.element),this.ons(this),this._initialFocus()},t.Grid.prototype={setFocus:h,_initialFocus:p,first:function(){this.setFocus(this.buttons.eq(0))},last:function(){this.setFocus(this.buttons.eq(this.buttons.length-1))},upPage:function(){e(".ws-picker-header > button:not(:disabled)",this.popover.element).trigger("click")},downPage:function(){this.activeButton.filter(':not([data-action="changeInput"])').trigger("click")},ons:function(e){this.element.on({keydown:function(t){var n,r=t.keyCode;if(t.shiftKey)return;t.ctrlKey&&r==40?n="downPage":t.ctrlKey&&r==38?n="upPage":r==33||t.ctrlKey&&r==37?n="prevPage":r==34||t.ctrlKey&&r==39?n="nextPage":t.keyCode==36||t.keyCode==33?n="first":t.keyCode==35?n="last":t.keyCode==38?n="up":t.keyCode==37?n="prev":t.keyCode==40?n="down":t.keyCode==39&&(n="next");if(n)return e[n](),!1}})}},e.each({prevPage:{get:"last",action:"prev"},nextPage:{get:"first",action:"next"}},function(e,n){t.Grid.prototype[e]=function(){this.opts[n.action]&&(this.popover.navedInitFocus={sel:'button[data-id="'+this.activeButton.attr("data-id")+'"]:not(:disabled,.othermonth)',alt:n.get},this.popover.actionFn(this.opts[n.action]),this.popover.navedInitFocus=!1)}}),e.each({up:{traverse:"prevAll",get:"last",action:"prev",reverse:!0},down:{traverse:"nextAll",get:"first",action:"next"}},function(n,r){t.Grid.prototype[n]=function(){var n=this.activeButton.closest("td").prop("cellIndex"),i="td:nth-child("+(n+1)+") button:not(:disabled,.othermonth)",s=this.activeButton.closest("tr")[r.traverse]();r.reverse&&(s=e(s.get().reverse())),s=s.find(i)[r.get]();if(n==null){t.warn("cellIndex not implemented. abort keynav");return}s[0]?this.setFocus(s.eq(0)):this.opts[r.action]&&(this.popover.navedInitFocus=i+":"+r.get,this.popover.actionFn(this.opts[r.action]),this.popover.navedInitFocus=!1)}}),e.each({prev:{traverse:"prevAll",get:"last",reverse:!0},next:{traverse:"nextAll",get:"first"}},function(n,r){t.Grid.prototype[n]=function(){var t="button:not(:disabled,.othermonth)",i=this.activeButton.closest("td")[r.traverse]("td");r.reverse&&(i=e(i.get().reverse())),i=i.find(t)[r.get](),i[0]||(i=this.activeButton.closest("tr")[r.traverse]("tr"),r.reverse&&(i=e(i.get().reverse())),i=i.find(t)[r.get]()),i[0]?this.setFocus(i.eq(0)):this.opts[n]&&(this.popover.navedInitFocus=r.get,this.popover.actionFn(this.opts[n]),this.popover.navedInitFocus=!1)}}),n.getWeek=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)},n.getYearList=function(e,t){var r,i,s,o,u,a,f,l,h;e=e[0]*1;var p=t.options.size,d=e%(12*p),v=e-d,m=t.options.max.split("-"),g=t.options.min.split("-"),y=t.options.value.split("-"),b=0,w="",E=0;for(r=0;r<p;r++){r?v+=12:a=n.isInRange([v-1],m,g)?{"data-action":"setYearList",value:v-1}:!1,w+='<div class="year-list picker-list ws-index-'+r+'"><div class="ws-picker-header"><h3>'+v+" - "+(v+11)+"</h3></div>",u=[];for(i=0;i<12;i++)s=v+i,h=[],n.isInRange([s],m,g)?(o="",b++):o=' disabled=""',s==c[0]&&h.push("this-value"),y[0]==s&&h.push("checked-value"),l=h.length?' class="'+h.join(" ")+'"':"",i&&!(i%3)&&(E++,u.push('</tr><tr class="ws-row-'+E+'">')),u.push('<td class="ws-item-'+i+'" role="presentation"><button data-id="year-'+i+'" type="button"'+o+l+' data-action="setMonthList" value="'+s+'" tabindex="-1" role="gridcell">'+s+"</button></td>");r==p-1&&(f=n.isInRange([s+1],m,g)?{"data-action":"setYearList",value:s+1}:!1),w+='<table role="grid" aria-label="'+v+" - "+(v+11)+'"><tbody><tr class="ws-row-0">'+u.join("")+"</tr></tbody></table></div>"}return{enabled:b,main:w,next:f,prev:a,type:"Grid"}},n.getMonthList=function(e,t){var r,i,s,u,a,f,l,h,p,d,v,m=t.options,g=m.size,y=m.max.split("-"),b=m.min.split("-"),w=m.value.split("-"),E=0,S=0,x="";e=e[0]-Math.floor((g-1)/2);for(r=0;r<g;r++){r?e++:h=n.isInRange([e-1],y,b)?{"data-action":"setMonthList",value:e-1}:!1,r==g-1&&(p=n.isInRange([e+1],y,b)?{"data-action":"setMonthList",value:e+1}:!1),f=[],!n.isInRange([e,"01"],y,b)&&!n.isInRange([e,"12"],y,b)?(a=' disabled=""',l=!0):(l=!1,a=""),m.minView>=1&&(a=' disabled=""'),x+='<div class="month-list picker-list ws-index-'+r+'"><div class="ws-picker-header">',x+=m.selectNav?'<select data-action="setMonthList">'+n.createYearSelect(e,y,b).join("")+"</select>":'<button data-action="setYearList"'+a+' value="'+e+'" tabindex="-1">'+e+"</button>",x+="</div>";for(i=0;i<12;i++)u=o.date.monthkeys[i+1],s=(o.date[m.monthNames]||o.date.monthNames)[i],v=[],l||!n.isInRange([e,u],y,b)?a=' disabled=""':(a="",E++),e==c[0]&&c[1]==u&&v.push("this-value"),w[0]==e&&w[1]==u&&v.push("checked-value"),d=v.length?' class="'+v.join(" ")+'"':"",i&&!(i%3)&&(S++,f.push('</tr><tr class="ws-row-'+S+'">')),f.push('<td class="ws-item-'+i+'" role="presentation"><button data-id="month-'+i+'" type="button"'+a+d+' data-action="'+(t.type=="month"?"changeInput":"setDayList")+'" value="'+e+"-"+u+'" tabindex="-1" role="gridcell">'+s+"</button></td>");x+='<table role="grid" aria-label="'+e+'"><tbody><tr class="ws-row-0">'+f.join("")+"</tr></tbody></table></div>"}return{enabled:E,main:x,prev:h,next:p,type:"Grid"}},n.getDayList=function(t,r){var i,u,a,f,l,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A=r.options,O=A.size,M=A.max.split("-"),_=A.min.split("-"),D=A.value.split("-"),P=o.date[A.monthNames]||o.date.monthNames,H=0,B=[],j=new Date(t[0],t[1]-1,1);j.setMonth(j.getMonth()-Math.floor((O-1)/2));for(i=0;i<O;i++){E=j.getMonth(),w=0,i||(k=new Date(j.getTime()),k.setDate(-1),T=s(k),m=n.isInRange(T,M,_)?{"data-action":"setDayList",value:T[0]+"-"+T[1]}:!1),T=s(j),B.push('<div class="day-list picker-list ws-index-'+i+'"><div class="ws-picker-header">'),A.selectNav&&(N=['<select data-action="setDayList" tabindex="0">'+n.createMonthSelect(T,M,_,P).join("")+"</select>",'<select data-action="setDayList" tabindex="0">'+n.createYearSelect(T[0],M,_,"-"+T[1]).join("")+"</select>"],o.date.showMonthAfterYear&&N.reverse(),B.push(N.join(" "))),N=[P[T[1]*1-1],T[0]],o.date.showMonthAfterYear&&N.reverse(),r.options.selectNav||B.push('<button data-action="setMonthList"'+(A.minView>=2?' disabled="" ':"")+' value="'+T.date+'" tabindex="-1">'+N.join(" ")+"</button>"),B.push('</div><table role="grid" aria-label="'+N.join(" ")+'"><thead><tr>'),r.options.showWeek&&B.push('<th class="week-header">'+o.date.weekHeader+"</th>");for(a=o.date.firstDay;a<o.date.dayNamesShort.length;a++)B.push('<th class="day-'+a+'"><abbr title="'+o.date.dayNames[a]+'">'+o.date.dayNamesShort[a]+"</abbr></th>");a=o.date.firstDay;while(a--)B.push('<th class="day-'+a+'"><abbr title="'+o.date.dayNames[a]+'">'+o.date.dayNamesShort[a]+"</abbr></th>");B.push('</tr></thead><tbody><tr class="ws-row-0">'),r.options.showWeek&&(b=n.getWeek(j),B.push('<td class="week-cell">'+b+"</td>"));for(u=0;u<99;u++){y=u&&!(u%7),S=j.getMonth(),x=E!=S,f=j.getDay(),L=[];if(y&&x){B.push("</tr>");break}y&&(w++,B.push('</tr><tr class="ws-row-'+w+'">'),r.options.showWeek&&(b++,B.push('<td class="week-cell">'+b+"</td>"))),u||f!=o.date.firstDay&&(l=f-o.date.firstDay,l<0&&(l+=7),j.setDate(j.getDate()-l),f=j.getDay(),S=j.getMonth(),x=E!=S),T=s(j),C='<td role="presentation" class="day-'+f+'"><button data-id="day-'+j.getDate()+'" role="gridcell" data-action="changeInput" value="'+T.join("-")+'"',x?L.push("othermonth"):L.push("day-"+j.getDate()),T[0]==c[0]&&c[1]==T[1]&&c[2]==T[2]&&L.push("this-value"),D[0]==T[0]&&T[1]==D[1]&&T[2]==D[2]&&L.push("checked-value"),L.length&&(C+=' class="'+L.join(" ")+'"');if(!n.isInRange(T,M,_)||r.options.disableDays&&e.inArray(f,r.options.disableDays)!=-1)C+=' disabled=""';B.push(C+' tabindex="-1">'+j.getDate()+"</button></td>"),j.setDate(j.getDate()+1)}B.push("</tbody></table></div>"),i==O-1&&(T=s(j),T[2]=1,g=n.isInRange(T,M,_)?{"data-action":"setDayList",value:T.date}:!1)}return{enabled:9,main:B.join(""),prev:m,next:g,type:"Grid"}},n.isInRange=function(e,t,n){var r,i=!0;for(r=0;r<e.length;r++){if(n[r]&&n[r]>e[r]){i=!1;break}if(!n[r]||n[r]!=e[r])break}if(i)for(r=0;r<e.length;r++){if(t[r]&&t[r]<e[r]){i=!1;break}if(!t[r]||t[r]!=e[r])break}return i},n.createMonthSelect=function(e,t,r,i){i||(i=o.date.monthNames);var s,u=0,a=[],f=e[1]-1;for(;u<i.length;u++)s=f==u?' selected=""':"",(s||n.isInRange([e[0],u+1],t,r))&&a.push('<option value="'+e[0]+"-"+l(u+1)+'"'+s+">"+i[u]+"</option>");return a},n.createYearSelect=function(e,t,r,i){var s,o=!0,u=!0,a=['<option selected="">'+e+"</option>"],f=0;i||(i="");while(f<8&&(o||u))f++,s=e-f,o&&n.isInRange([s],t,r)?a.unshift('<option value="'+(s+i)+'">'+s+"</option>"):o=!1,s=e+f,u&&n.isInRange([s],t,r)?a.push('<option value="'+(s+i)+'">'+s+"</option>"):u=!1;return a};var d={changeInput:function(e,t,n){n.element.focus(),t.hide(),n.setChange(e)}};(function(){var r=function(e){return"get"+e+"List"},i=function(e){return"set"+e+"List"},s={date:"Day",week:"Day",month:"Month"};e.each({setYearList:["Year","Month","Day"],setMonthList:["Month","Day"],setDayList:["Day"]},function(o,u){var a=u.map(r),f=u.map(i);d[o]=function(r,i,o,l){r=""+r;var c=o.options,h=r.split("-");l||(l=0),e.each(a,function(e,r){if(e>=l){var a=n[r](h,o);if(h.length<2||a.enabled>1||s[o.type]===u[e])return i.element.attr({"data-currentview":f[e]}).addClass("ws-size-"+c.size).data("pickercontent",{data:o,content:a,values:h}),i.bodyElement.html(a.main),a.prev?i.prevElement.attr(a.prev).prop({disabled:!1}):i.prevElement.removeAttr("data-action").prop({disabled:!0}),a.next?i.nextElement.attr(a.next).prop({disabled:!1}):i.nextElement.removeAttr("data-action").prop({disabled:!0}),t[a.type]&&new t[a.type](i.bodyElement.children(),i,a),i.element.trigger("pickerchange"),!1}})}})})(),n.commonInit=function(i,s){var a=function(t){return s.actionFn({"data-action":e.attr(this,"data-action"),value:e(this).val()||e.attr(this,"value")}),!1},f=function(r,o,u){var a=[];r.options=i.getOptions()||{},e("div.ws-options",s.contentElement).remove(),e.each(r.options,function(e,t){var s=n.isInRange(e.split("-"),r.maxS,r.minS)?"":' disabled="" ';a.push('<li role="presentation"><button value="'+e+'" '+s+' data-action="changeInput" tabindex="-1" role="option">'+(t||i.formatValue(e))+"</button></li>")}),a.length&&new t.ListBox(e('<div class="ws-options"><ul role="listbox">'+a.join("")+"</div>").insertAfter(s.bodyElement)[0],s,{noFocus:!0})},l=function(){if(s.isDirty){var r=i.options;r.maxS=r.max.split("-"),r.minS=r.min.split("-"),e("button",s.buttonRow).each(function(){var s;e(this).is(".ws-empty")?(s=o.date.clear,s||(s=u[""].date.clear||"clear",t.warn("could not get clear text from form cfg"))):e(this).is(".ws-current")&&(s=(o[i.type]||{}).currentText,s||(s=(u[""][[i.type]]||{}).currentText||"current",t.warn("could not get currentText from form cfg")),e.prop(this,"disabled",!n.isInRange(c[i.type].split("-"),r.maxS,r.minS))),s&&e(this).text(s).attr({"aria-label":s})}),s.nextElement.attr({"aria-label":o.date.nextText}),e("> span",s.nextElement).html(o.date.nextText),s.prevElement.attr({"aria-label":o.date.prevText}),e("> span",s.prevElement).html(o.date.prevText),f(r,r.maxS,r.minS)}e("button.ws-empty",s.buttonRow).prop("disabled",e.prop(i.orig,"required")),s.isDirty=!1};s.actionFn=function(e){d[e["data-action"]]?d[e["data-action"]](e.value,s,i,0):t.warn("no action for "+e["data-action"])},s.contentElement.html('<button class="ws-prev" tabindex="0"><span></span></button> <button class="ws-next" tabindex="0"><span></span></button><div class="ws-picker-body"></div><div class="ws-button-row"><button type="button" class="ws-current" data-action="changeInput" value="'+c[i.type]+'" tabindex="0"></button> <button type="button" data-action="changeInput" value="" class="ws-empty" tabindex="0"></button></div>'),s.nextElement=e("button.ws-next",s.contentElement),s.prevElement=e("button.ws-prev",s.contentElement),s.bodyElement=e("div.ws-picker-body",s.contentElement),s.buttonRow=e("div.ws-button-row",s.contentElement),s.isDirty=!0,s.contentElement.on("click","button[data-action]",a).on("change","select[data-action]",a),s.contentElement.on({keydown:function(t){if(t.keyCode==9){var n=e('[tabindex="0"]:not(:disabled)',this).filter(":visible"),r=n.index(t.target);if(t.shiftKey&&r<=0)return n.last().focus(),!1;if(!t.shiftKey&&r>=n.length-1)return n.first().focus(),!1}else if(t.keyCode==27)return i.element.focus(),s.hide(),!1}}),e(i.options.orig).on("input",function(){var e;i.options.updateOnInput&&s.isVisible&&i.options.value&&(e=s.element.attr("data-currentview"))&&d[e](i.options.value,s,i,0)}),i._propertyChange=function(){var e,t=function(){s.isVisible&&l()};return function(n){if(n=="value")return;s.isDirty=!0,s.isVisible&&(clearTimeout(e),e=setTimeout(t,9))}}(),s.activeElement=e([]),s.activateElement=function(t){t=e(t),t[0]!=s.activeElement[0]&&(s.activeElement.removeClass("ws-focus"),s.openedByFocus||t.addClass("ws-focus")),s.activeElement=t},s.element.on({wspopoverbeforeshow:l,wspopoverhide:function(){s.openedByFocus=!1},focusin:function(e){s.openedByFocus=!1,s.activateElement(e.target)}}),e(r).onTrigger("wslocalechange",i._propertyChange)},n._common=function(r){var i=t.objectCreate(t.wsPopover,{},{prepareFor:r.element}),s=e('<button type="button" class="popover-opener" />').appendTo(r.buttonWrapper),o=r.options,u=!1,l=function(){!o.disabled&&!o.readonly&&!i.isVisible&&(u||n.commonInit(r,i),!u||r.options.restartView?d.setYearList(o.defValue||o.value,i,r,r.options.startView):d[i.element.attr("data-currentview")||"setYearList"](o.defValue||o.value,i,r,0),u=!0,i.show(r.element))};o.containerElements.push(i.element[0]),i.element.on({focusin:function(e){i.activateElement&&(i.openedByFocus=!1,i.activateElement(e.target))}}),o.startView||(o.startView=0),o.minView||(o.minView=0),o.startView<o.minView&&(o.minView=o.startView,t.warn("wrong config for minView/startView.")),o.size||(o.size=1),i.element.addClass(r.type+"-popover input-picker").attr({role:"application"}),f(i.element.children("div.ws-po-outerbox").attr({role:"group"}),o.labels,!0),f(s,o.labels,!0),s.attr({tabindex:o.labels.length?0:"-1"}).on({mousedown:function(){a.apply(this,arguments),i.preventBlur()},click:function(){i.isVisible&&i.activeElement&&(i.openedByFocus=!1,i.activeElement.focus()),l()},focus:function(){i.preventBlur()}}),r.element.on({focus:function(){r.options.openOnFocus&&(i.openedByFocus=!0,l())},mousedown:function(){r.element.is(":focus")&&(i.openedByFocus=!0,l())}}),r.popover=i},n.month=n._common,n.date=n.month,t.picker=n}(),function(){var n,i,o=Modernizr.inputtypes,u={},a=["disabled","readonly","value","min","max","step","title","placeholder"],l=["tabindex","data-placeholder"];e.each(a.concat(l),function(e,r){var i=r.replace(/^data\-/,"");t.onNodeNamesPropertyModify("input",r,function(e){if(!n){var r=t.data(this,"shadowData");r&&r.data&&r.nativeElement===this&&r.data[i]&&r.data[i](e)}})});if(s.replaceUI){var c=function(n){t.data(this,"hasShadow")&&e.prop(this,"value",e.prop(this,"value"))};t.onNodeNamesPropertyModify("input","valueAsNumber",c),t.onNodeNamesPropertyModify("input","valueAsDate",c)}var h=function(){return function(t,n){u[t]=n,n.attrs=e.merge([],l,n.attrs),n.props=e.merge([],a,n.props)}}(),p=function(e){e.stopImmediatePropagation(e)},d=function(){return e.css(this,"display")!="none"},v=function(t){var n,i=function(){e.style(t.orig,"display","");var r=.6;if(!n||t.orig.offsetWidth)t.element.css({marginLeft:e.css(t.orig,"marginLeft"),marginRight:e.css(t.orig,"marginRight")}),t.buttonWrapper&&t.buttonWrapper.filter(d).length&&(t.element.css({paddingRight:""}),(parseInt(t.buttonWrapper.css("marginLeft"),10)||0)<0?t.element.css({paddingRight:""}).css({paddingRight:(parseInt(t.element.css("paddingRight"),10)||0)+t.buttonWrapper.outerWidth()}):r=t.buttonWrapper.outerWidth(!0)+.6),t.element.outerWidth(e(t.orig).outerWidth()-r);n=!0,e.style(t.orig,"display","none")};e(r).onTrigger("updateshadowdom",i)},m=function(){var r=e.prop(this,"type"),o,c,h,m,g,y;if(u[r]){h={},m=r,y=e(this).jProp("labels"),c=e.extend({},s[r],e(e.prop(this,"form")).data(r)||{},e(this).data(r)||{},{orig:this,type:r,labels:y,options:{},input:function(e){c._change(e,"input")},change:function(e){c._change(e,"change")},_change:function(t,r){n=!0,e.prop(c.orig,"value",t),n=!1,r&&e(c.orig).trigger(r)},containerElements:[]});for(o=0;o<a.length;o++)c[a[o]]=e.prop(this,a[o]);for(o=0;o<l.length;o++)m=l[o].replace(/^data\-/,""),c[m]||(c[m]=e.attr(this,l[o]));h.shim=u[r]._create(c),t.addShadowDom(this,h.shim.element,{data:h.shim||{}}),h.shim.options.containerElements.push(h.shim.element[0]),f(e(this).getShadowFocusElement(),y),e(this).on("change",function(t){!n&&t.originalEvent&&h.shim.value(e.prop(this,"value"))}),function(){var t={focusin:!0,focus:!0},n,r=!1,i=!1;e(h.shim.options.containerElements).on({"focusin focus focusout blur":function(s){s.stopImmediatePropagation(),i=t[s.type],clearTimeout(n),n=setTimeout(function(){i!=r&&(r=i,e(c.orig).triggerHandler(i?"focus":"blur"),e(c.orig).trigger(i?"focusin":"focusout")),r=i},0)}})}(),h.shim.element.on("change input",p),Modernizr.formvalidation&&e(c.orig).on("firstinvalid",function(n){if(!t.fromSubmit&&i)return;e(c.orig).off("invalid.replacedwidgetbubble").on("invalid.replacedwidgetbubble",function(r){!n.isInvalidUIPrevented()&&!r.isDefaultPrevented()&&(t.validityAlert.showFor(n.target),n.preventDefault(),r.preventDefault()),e(c.orig).off("invalid.replacedwidgetbubble")})}),h.shim.buttonWrapper&&h.shim.buttonWrapper.filter(d).length&&h.shim.element.addClass("has-input-buttons"),g=c.calculateWidth!=null?c.calculateWidth:s.calculateWidth,g&&v(h.shim),e(this).css({display:"none"})}};(!o.range||s.replaceUI)&&h("range",{_create:function(t,n){return e("<span />").insertAfter(t.orig).rangeUI(t).data("rangeUi")}}),Modernizr.formvalidation&&["input","form"].forEach(function(e){var n=t.defineNodeNameProperty(e,"checkValidity",{prop:{value:function(){i=!0;var e=n.prop._supvalue.apply(this,arguments);return i=!1,e}}})}),["number","time","month","date"].forEach(function(n){(!o[n]||s.replaceUI)&&h(n,{_create:function(r,i){var s=e('<input class="ws-'+n+'" type="text" />').insertAfter(r.orig).spinbtnUI(r).data("wsspinner");return t.picker&&t.picker[n]&&t.picker[n](s),s.buttonWrapper.addClass("input-button-size-"+s.buttonWrapper.children().filter(d).length),s}})}),t.addReady(function(t,n){e("input",t).add(n.filter("input")).each(m)})}()});
+jQuery.webshims.register("form-native-extend",function(e,t,n,r,i,s){"use strict";var o=n.Modernizr,u=o.inputtypes;if(!o.formvalidation||t.bugs.bustedValidity)return;var a=t.inputTypes,f={};t.addInputType=function(e,t){a[e]=t},t.addValidityRule=function(e,t){f[e]=t},t.addValidityRule("typeMismatch",function(e,t,n,r){if(t==="")return!1;var i=r.typeMismatch;return"type"in n||(n.type=(e[0].getAttribute("type")||"").toLowerCase()),a[n.type]&&a[n.type].mismatch&&(i=a[n.type].mismatch(t,e)),i});var l=s.overrideMessages,c=!u.number||!u.time||!u.range||l,h=["customError","typeMismatch","rangeUnderflow","rangeOverflow","stepMismatch","tooLong","patternMismatch","valueMissing","valid"],p=l?["value","checked"]:["value"],d=[],v=function(t,n){if(!t)return;var i=(t.getAttribute&&t.getAttribute("type")||t.type||"").toLowerCase();if(!l&&!a[i])return;l&&!n&&i=="radio"&&t.name?e(r.getElementsByName(t.name)).each(function(){e.prop(this,"validity")}):e.prop(t,"validity")},m={};["input","textarea","select"].forEach(function(n){var r=t.defineNodeNameProperty(n,"setCustomValidity",{prop:{value:function(i){i+="";var s=n=="input"?e(this).getNativeElement()[0]:this;r.prop._supvalue.call(s,i),t.bugs.validationMessage&&t.data(s,"customvalidationMessage",i),c&&(t.data(s,"hasCustomError",!!i),v(s))}}});m[n]=r.prop._supvalue});if(c||l)p.push("min"),p.push("max"),p.push("step"),d.push("input");l&&(p.push("required"),p.push("pattern"),d.push("select"),d.push("textarea"));if(c){var g;d.forEach(function(n){var r=t.defineNodeNameProperty(n,"validity",{prop:{get:function(){if(g)return;var i=n=="input"?e(this).getNativeElement()[0]:this,s=r.prop._supget.call(i);if(!s)return s;var o={};h.forEach(function(e){o[e]=s[e]});if(!e.prop(i,"willValidate"))return o;g=!0;var u=e(i),c={type:(i.getAttribute&&i.getAttribute("type")||"").toLowerCase(),nodeName:(i.nodeName||"").toLowerCase()},p=u.val(),d=!!t.data(i,"hasCustomError"),v;g=!1,o.customError=d;if(o.valid&&o.customError)o.valid=!1;else if(!o.valid){var y=!0;e.each(o,function(e,t){if(t)return y=!1,!1}),y&&(o.valid=!0)}return e.each(f,function(e,r){o[e]=r(u,p,c,o),o[e]&&(o.valid||!v)&&(l||a[c.type]&&a[c.type].mismatch)&&(m[n].call(i,t.createValidationMessage(i,e)),o.valid=!1,v=!0)}),o.valid?(m[n].call(i,""),t.data(i,"hasCustomError",!1)):l&&!v&&!d&&e.each(o,function(e,r){if(e!=="valid"&&r)return m[n].call(i,t.createValidationMessage(i,e)),!1}),o},writeable:!1}})}),p.forEach(function(e){t.onNodeNamesPropertyModify(d,e,function(e){v(this)})});if(r.addEventListener){var y,b=function(t){if(!("form"in t.target))return;var n=t.target.form;clearTimeout(y),v(t.target),n&&l&&e("input",n).each(function(){this.type=="password"&&v(this)})};r.addEventListener("change",b,!0),l&&(r.addEventListener("blur",b,!0),r.addEventListener("keydown",function(e){if(e.keyCode!=13)return;b(e)},!0)),r.addEventListener("input",function(e){clearTimeout(y),y=setTimeout(function(){v(e.target)},290)},!0)}var w=d.join(",");t.addReady(function(t,n){e(w,t).add(n.filter(w)).each(function(){e.prop(this,"validity")})}),l&&t.ready("DOM form-message",function(){t.activeLang({register:"form-core",callback:function(){e("input, select, textarea").getNativeElement().each(function(){if(t.data(this,"hasCustomError"))return;var n=this,r=e.prop(n,"validity")||{valid:!0},i;if(r.valid)return;i=(n.nodeName||"").toLowerCase(),e.each(r,function(e,r){if(e!=="valid"&&r)return m[i].call(n,t.createValidationMessage(n,e)),!1})})}})})}t.defineNodeNameProperty("input","type",{prop:{get:function(){var e=this,n=(e.getAttribute("type")||"").toLowerCase();return t.inputTypes[n]?n:e.type}}})}),jQuery.webshims.register("form-number-date-api",function(e,t,n,r,i){"use strict";t.getStep||(t.getStep=function(t,n){var r=e.attr(t,"step");return r==="any"?r:(n=n||l(t),!u[n]||!u[n].step?r:(r=y.number.asNumber(r),(!isNaN(r)&&r>0?r:u[n].step)*(u[n].stepScaleFactor||1)))}),t.addMinMaxNumberToCache||(t.addMinMaxNumberToCache=function(e,t,n){e+"AsNumber"in n||(n[e+"AsNumber"]=u[n.type].asNumber(t.attr(e)),isNaN(n[e+"AsNumber"])&&e+"Default"in u[n.type]&&(n[e+"AsNumber"]=u[n.type][e+"Default"]))});var s=parseInt("NaN",10),o=r,u=t.inputTypes,a=function(e){return typeof e=="number"||e&&e==e*1},f=function(t){return e('<input type="'+t+'" />').prop("type")===t},l=function(e){return(e.getAttribute("type")||"").toLowerCase()},c=function(e){var t=e*1;return e&&(t==e||e=="0"+t)},h=t.addMinMaxNumberToCache,p=function(e,t){e=""+e,t-=e.length;for(var n=0;n<t;n++)e="0"+e;return e},d=1e-7,v=t.bugs.bustedValidity;t.addValidityRule("stepMismatch",function(e,n,r,i){if(n==="")return!1;"type"in r||(r.type=l(e[0]));var s=(i||{}).stepMismatch||!1,o;if(u[r.type]&&u[r.type].step){"step"in r||(r.step=t.getStep(e[0],r.type));if(r.step=="any")return!1;"valueAsNumber"in r||(r.valueAsNumber=u[r.type].asNumber(n));if(isNaN(r.valueAsNumber))return!1;h("min",e,r),o=r.minAsNumber,isNaN(o)&&(o=u[r.type].stepBase||0),s=Math.abs((r.valueAsNumber-o)%r.step),s=!(s<=d||Math.abs(s-r.step)<=d)}return s}),[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(e,n){t.addValidityRule(e.name,function(t,n,r,i){var s=(i||{})[e.name]||!1;if(n==="")return s;"type"in r||(r.type=l(t[0]));if(u[r.type]&&u[r.type].asNumber){"valueAsNumber"in r||(r.valueAsNumber=u[r.type].asNumber(n));if(isNaN(r.valueAsNumber))return!1;h(e.attr,t,r);if(isNaN(r[e.attr+"AsNumber"]))return s;s=r[e.attr+"AsNumber"]*e.factor<r.valueAsNumber*e.factor-d}return s})}),t.reflectProperties(["input"],["max","min","step"]);var m=t.defineNodeNameProperty("input","valueAsNumber",{prop:{get:function(){var t=this,n=l(t),r=u[n]&&u[n].asNumber?u[n].asNumber(e.prop(t,"value")):m.prop._supget&&m.prop._supget.apply(t,arguments);return r==null&&(r=s),r},set:function(n){var r=this,i=l(r);if(u[i]&&u[i].numberToString){if(isNaN(n)){e.prop(r,"value","");return}var s=u[i].numberToString(n);s!==!1?e.prop(r,"value",s):t.error("INVALID_STATE_ERR: DOM Exception 11")}else m.prop._supset&&m.prop._supset.apply(r,arguments)}}}),g=t.defineNodeNameProperty("input","valueAsDate",{prop:{get:function(){var t=this,n=l(t);return u[n]&&u[n].asDate&&!u[n].noAsDate?u[n].asDate(e.prop(t,"value")):g.prop._supget&&g.prop._supget.call(t)||null},set:function(n){var r=this,i=l(r);if(!(u[i]&&u[i].dateToString&&!u[i].noAsDate))return g.prop._supset&&g.prop._supset.apply(r,arguments)||null;if(n===null)return e.prop(r,"value",""),"";var s=u[i].dateToString(n);if(s!==!1)return e.prop(r,"value",s),s;t.error("INVALID_STATE_ERR: DOM Exception 11")}}});e.each({stepUp:1,stepDown:-1},function(n,r){var i=t.defineNodeNameProperty("input",n,{prop:{value:function(n){var s,o,a,f,c,h,p=l(this);if(!u[p]||!u[p].asNumber){if(i.prop&&i.prop.value)return i.prop.value.apply(this,arguments);throw t.info("no step method for type: "+p),"invalid state error"}h={type:p},n||(n=1,t.info("you should always use a factor for stepUp/stepDown")),n*=r,o=e.prop(this,"valueAsNumber");if(isNaN(o))throw t.info("valueAsNumber is NaN can't apply stepUp/stepDown "),"invalid state error";s=t.getStep(this,p);if(s=="any")throw t.info("step is 'any' can't apply stepUp/stepDown"),"invalid state error";t.addMinMaxNumberToCache("min",e(this),h),t.addMinMaxNumberToCache("max",e(this),h),s*=n,o+=s,f=(o-(h.minAsNumber||0))%s,f&&Math.abs(f)>d&&(c=o-f,c+=f>0?s:-s,o=c.toFixed(5)*1);if(!isNaN(h.maxAsNumber)&&o>h.maxAsNumber||!isNaN(h.minAsNumber)&&o<h.minAsNumber)throw t.info("max/min overflow can't apply stepUp/stepDown"),"invalid state error";a?e.prop(this,"valueAsDate",a):e.prop(this,"valueAsNumber",o)}}})});var y={number:{mismatch:function(e){return!a(e)},step:1,stepScaleFactor:1,asNumber:function(e){return a(e)?e*1:s},numberToString:function(e){return a(e)?e:!1}},range:{minDefault:0,maxDefault:100},date:{mismatch:function(e){if(!e||!e.split||!/\d$/.test(e))return!0;var t,n=e.split(/\u002D/);if(n.length!==3)return!0;var r=!1;if(n[0].length!==4||n[1].length!=2||n[1]>12||n[2].length!=2||n[2]>33)r=!0;else for(t=0;t<3;t++)if(!c(n[0])){r=!0;break}return r||e!==this.dateToString(this.asDate(e,!0))},step:1,stepScaleFactor:864e5,asDate:function(e,t){return!t&&this.mismatch(e)?null:new Date(this.asNumber(e,!0))},asNumber:function(e,t){var n=s;if(t||!this.mismatch(e))e=e.split(/\u002D/),n=Date.UTC(e[0],e[1]-1,e[2]);return n},numberToString:function(e){return a(e)?this.dateToString(new Date(e*1)):!1},dateToString:function(e){return e&&e.getFullYear?e.getUTCFullYear()+"-"+p(e.getUTCMonth()+1,2)+"-"+p(e.getUTCDate(),2):!1}},time:{mismatch:function(t,n){if(!t||!t.split||!/\d$/.test(t))return!0;t=t.split(/\u003A/);if(t.length<2||t.length>3)return!0;var r=!1,i;return t[2]&&(t[2]=t[2].split(/\u002E/),i=parseInt(t[2][1],10),t[2]=t[2][0]),e.each(t,function(e,t){if(!c(t)||t.length!==2)return r=!0,!1}),r?!0:t[0]>23||t[0]<0||t[1]>59||t[1]<0?!0:t[2]&&(t[2]>59||t[2]<0)?!0:i&&isNaN(i)?!0:(i&&(i<100?i*=100:i<10&&(i*=10)),n===!0?[t,i]:!1)},step:60,stepBase:0,stepScaleFactor:1e3,asDate:function(e){return e=new Date(this.asNumber(e)),isNaN(e)?null:e},asNumber:function(e){var t=s;return e=this.mismatch(e,!0),e!==!0&&(t=Date.UTC("1970",0,1,e[0][0],e[0][1],e[0][2]||0),e[1]&&(t+=e[1])),t},dateToString:function(e){if(e&&e.getUTCHours){var t=p(e.getUTCHours(),2)+":"+p(e.getUTCMinutes(),2),n=e.getSeconds();return n!="0"&&(t+=":"+p(n,2)),n=e.getUTCMilliseconds(),n!="0"&&(t+="."+p(n,3)),t}return!1}},month:{mismatch:function(e){return y.date.mismatch(e+"-01")},step:1,stepScaleFactor:!1,asDate:function(e){return new Date(y.date.asNumber(e+"-01"))},asNumber:function(e){var t=s;return e&&!this.mismatch(e)&&(e=e.split(/\u002D/),e[0]=e[0]*1-1970,e[1]=e[1]*1-1,t=e[0]*12+e[1]),t},numberToString:function(e){var t,n=!1;return a(e)&&(t=e%12,e=(e-t)/12+1970,t+=1,t<1&&(e-=1,t+=12),n=p(e,4)+"-"+p(t,2)),n},dateToString:function(e){if(e&&e.getUTCHours){var t=y.date.dateToString(e);return t.split&&(t=t.split(/\u002D/))?t[0]+"-"+t[1]:!1}return!1}}};if(v||!f("range")||!f("time"))y.range=e.extend({},y.number,y.range),y.time=e.extend({},y.date,y.time),y.month=e.extend({},y.date,y.month);["number","month","range","date","time"].forEach(function(e){(v||!f(e))&&t.addInputType(e,y[e])}),e("<input />").prop("labels")==null&&t.defineNodeNamesProperty("button, input, keygen, meter, output, progress, select, textarea","labels",{prop:{get:function(){if(this.type=="hidden")return null;var t=this.id,n=e(this).closest("label").filter(function(){var e=this.attributes["for"]||{};return!e.specified||e.value==t});return t&&(n=n.add('label[for="'+t+'"]')),n.get()},writeable:!1}})}),function(e){var t=0,n=function(e){return typeof e=="number"||e&&e==e*1},r=function(e,t){return typeof e=="number"||e&&e==e*1?e*1:t},i=["step","min","max","readonly","title","disabled","tabindex"],s={_create:function(){var t;this.element.addClass("ws-range").attr({role:"slider"}).html('<span class="ws-range-min" /><span class="ws-range-rail"><span class="ws-range-thumb" /></span>'),this.trail=e(".ws-range-rail",this.element),this.range=e(".ws-range-min",this.element),this.thumb=e(".ws-range-thumb",this.trail),this.updateMetrics(),this.orig=this.options.orig;for(t=0;t<i.length;t++)this[i[t]](this.options[i[t]]);this.value=this._value,this.value(this.options.value),this.initDataList(),this.element.data("rangeUi",this),this.addBindings(),this._init=!0},value:e.noop,_value:function(e,t,n){var r,i,s=this.options,o=e,u={},a={};!t&&parseFloat(e,10)!=e&&(e=s.min+(s.max-s.min)/2),t||(e=this.normalizeVal(e)),r=100*((e-s.min)/(s.max-s.min)),this.options.value=e,this.thumb.stop(),this.range.stop(),a[this.dirs.width]=r+"%",this.vertical&&(r=Math.abs(r-100)),u[this.dirs.left]=r+"%",n?(typeof n!="object"&&(n={},i=Math.abs(r-parseInt(this.thumb[0].style[this.dirs.left]||50,10)),n.duration=Math.max(Math.min(999,i*5),99)),this.thumb.animate(u,n),this.range.animate(a,n)):(this.thumb.css(u),this.range.css(a)),this.orig&&(o!=e||!this._init&&this.orig.value!=e)&&this.options._change(e),this.element.attr({"aria-valuenow":this.options.value,"aria-valuetext":this.options.textValue?this.options.textValue(this.options.value):this.options.options[this.options.value]||this.options.value})},initDataList:function(){if(this.orig){var t,n=this,r=function(){e(n.orig).jProp("list").off("updateDatalist",r).on("updateDatalist",r),clearTimeout(t),t=setTimeout(function(){n.list&&n.list()},9)};e(this.orig).on("listdatalistchange",r),this.list()}},list:function(t){var r=this.options,i=r.min,s=r.max,o=this.trail,u=this;this.element.attr({"aria-valuetext":r.options[r.value]||r.value}),e(".ws-range-ticks",o).remove(),e(this.orig).jProp("list").find("option").each(function(){r.options[e.prop(this,"value")]=e.prop(this,"label")}),e.each(r.options,function(e,t){if(!n(e)||e<i||e>s)return;var a=100*((e-i)/(s-i)),f=r.showLabels?' title="'+t+'"':"";u.vertical&&(a=Math.abs(a-100)),o.append('<span class="ws-range-ticks"'+f+' style="'+u.dirs.left+": "+a+'%;" />')})},readonly:function(e){e=!!e,this.options.readonly=e,this.element.attr("aria-readonly",""+e)},disabled:function(e){e=!!e,this.options.disabled=e,e?this.element.attr({tabindex:-1,"aria-disabled":"true"}):this.element.attr({tabindex:this.options.tabindex,"aria-disabled":"false"})},tabindex:function(e){this.options.tabindex=e,this.options.disabled||this.element.attr({tabindex:e})},title:function(e){this.element.prop("title",e)},min:function(e){this.options.min=r(e,0),this.value(this.options.value,!0)},max:function(e){this.options.max=r(e,100),this.value(this.options.value,!0)},step:function(e){this.options.step=e=="any"?"any":r(e,1),this.value(this.options.value)},normalizeVal:function(e){var t,n,r,i=this.options;return e<=i.min?e=i.min:e>=i.max?e=i.max:i.step!="any"&&(r=i.step,t=(e-i.min)%r,n=e-t,Math.abs(t)*2>=r&&(n+=t>0?r:-r),e=n.toFixed(5)*1),e},doStep:function(e,t){var n=r(this.options.step,1);this.options.step=="any"&&(n=Math.min(n,(this.options.max-this.options.min)/10)),this.value(this.options.value+n*e,!1,t)},getStepedValueFromPos:function(e){var t,n,r,i;return e<=0?t=this.options[this.dirs.min]:e>100?t=this.options[this.dirs.max]:(this.vertical&&(e=Math.abs(e-100)),t=(this.options.max-this.options.min)*(e/100)+this.options.min,i=this.options.step,i!="any"&&(n=(t-this.options.min)%i,r=t-n,Math.abs(n)*2>=i&&(r+=n>0?i:-i),t=r.toFixed(5)*1)),t},addBindings:function(){var t,n,r,i=this,s=this.options,o=function(){var t={};return{init:function(n,r,s){t[n]||(t[n]={fn:s},i.orig&&e(i.orig).on(n,function(){t[n].val=e.prop(i.orig,"value")})),t[n].val=r},call:function(e,n){t[e].val!=n&&(clearTimeout(t[e].timer),t[e].val=n,t[e].timer=setTimeout(function(){t[e].fn(n,i)},0))}}}(),u=function(e,r){var u=i.getStepedValueFromPos((e[i.dirs.mouse]-t)*n);u!=s.value&&(i.value(u,!1,r),o.call("input",u))},a=function(t){t&&t.type=="mouseup"&&(o.call("input",s.value),o.call("change",s.value)),i.element.removeClass("ws-active"),e(document).off("mousemove",u).off("mouseup",a)},f=function(r){r.preventDefault(),e(document).off("mousemove",u).off("mouseup",a);if(!s.readonly&&!s.disabled){t=i.element.focus().addClass("ws-active").offset(),n=i.element[i.dirs.width]();if(!n||!t)return;t=t[i.dirs.pos],n=100/(n-(i.thumb[i.dirs.outerWidth]()||2)/2),u(r,s.animate),e(document).on({mouseup:a,mousemove:u}),r.stopPropagation()}},l={mousedown:f,focus:function(e){s.disabled||(o.init("input",s.value),o.init("change",s.value),i.element.addClass("ws-focus")),r=!0},blur:function(e){i.element.removeClass("ws-focus ws-active"),r=!1,o.init("input",s.value),o.call("change",s.value)},keyup:function(){i.element.removeClass("ws-active"),o.call("input",s.value),o.call("change",s.value)},keydown:function(e){var t=!0,n=e.keyCode;!s.readonly&&!s.disabled&&(n==39||n==38?i.doStep(1):n==37||n==40?i.doStep(-1):n==33?i.doStep(10,s.animate):n==34?i.doStep(-10,s.animate):n==36?i.value(i.options.max,!1,s.animate):n==35?i.value(i.options.min,!1,s.animate):t=!1,t&&(i.element.addClass("ws-active"),o.call("input",s.value),e.preventDefault()))}};o.init("input",s.value,this.options.input),o.init("change",s.value,this.options.change),l[e.fn.mwheelIntent?"mwheelIntent":"mousewheel"]=function(e,t){t&&r&&!s.readonly&&!s.disabled&&(i.doStep(t),e.preventDefault(),o.call("input",s.value))},this.element.on(l),this.thumb.on({mousedown:f})},updateMetrics:function(){var e=this.element.innerWidth();this.vertical=e&&this.element.innerHeight()-e>10,this.dirs=this.vertical?{mouse:"pageY",pos:"top",min:"max",max:"min",left:"top",width:"height",outerWidth:"outerHeight"}:{mouse:"pageX",pos:"left",min:"min",max:"max",left:"left",width:"width",outerWidth:"outerWidth"},this.element[this.vertical?"addClass":"removeClass"]("vertical-range")[this.vertical?"addClass":"removeClass"]("horizontal-range")}};e.fn.rangeUI=function(t){return t=e.extend({readonly:!1,disabled:!1,tabindex:0,min:0,step:1,max:100,value:50,input:e.noop,change:e.noop,_change:e.noop,showLabels:!0},t),this.each(function(){e.webshims.objectCreate(s,{element:{value:e(this)}},t)})},jQuery.webshims.isReady("range-ui",!0)}(jQuery),jQuery.webshims.register("form-number-date-ui",function(e,t,n,r,i,s){"use strict";var o,u=e.webshims.formcfg,a=function(e){e.stopImmediatePropagation(e)},f=function(){var n=function(){return t.getID(this)};return function(t,r,i){e(t).attr({"aria-labelledby":r.map(n).get().join(" ")}),i||r.on("click",function(e){return t.focus(),e.preventDefault(),!1})}}(),l=function(e){return e?(e+="",e.length==1?"0"+e:e):""};(function(){u.de={numberFormat:{",":".",".":","},timeSigns:":. ",numberSigns:",",dateSigns:".",dFormat:".",patterns:{d:"dd.mm.yy"},month:{currentText:"Aktueller Monat"},date:{close:"schlie\u00dfen",clear:"L\u00f6schen",prevText:"Zur\u00fcck",nextText:"Vor",currentText:"Heute",monthNames:["Januar","Februar","M\u00e4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","M\u00e4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}},u.en={numberFormat:{".":".",",":","},numberSigns:".",dateSigns:"/",timeSigns:":. ",dFormat:"/",patterns:{d:"mm/dd/yy"},month:{currentText:"This month"},date:{closeText:"Done",clear:"Clear",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}},u["en-US"]=u["en-US"]||u.en,u[""]=u[""]||u["en-US"],o=u[""];var t=function(t){if(!t.date.monthkeys){var n=function(e,n){var r,i=e+1;r=i<10?"0"+i:""+i,t.date.monthkeys[i]=r,t.date.monthkeys[n]=r};t.date.monthkeys={},e.each(t.date.monthNames,n),e.each(t.date.monthNamesShort,n)}};t(o),e.webshims.ready("dom-extend",function(){e.webshims.activeLang({register:"form-core",callback:function(){e.each(arguments,function(n,i){if(u[i])return o=u[i],t(o),e(r).triggerHandler("wslocalechange"),!1})}})})})(),function(){var t=function(t){e(this)[t.type=="mousepressstart"?"addClass":"removeClass"]("mousepress-ui")},n=function(e,t){return typeof e=="number"||e&&e==e*1?e*1:t},i=["step","min","max","readonly","title","disabled","tabindex","placeholder","value"],s=function(t){if(!o.patterns[t+"Obj"]){var n={};e.each(o.patterns[t].split(o[t+"Format"]),function(e,t){n[t]=e}),o.patterns[t+"Obj"]=n}},u={number:function(e){return(e+"").replace(/\,/g,"").replace(/\./,o.numberFormat["."])},time:function(e){return e},month:function(e,t){var n,r=e.split("-");return r[0]&&r[1]&&(n=o.date[t.monthNames]||o.date.monthNames,r[1]=n[r[1]*1-1],r[1]&&(e=o.date.showMonthAfterYear?r.join(" "):r[1]+" "+r[0])),e},date:function(e){var t=(e+"").split("-");return t[2]&&t[1]&&t[0]&&(e=o.patterns.d.replace("yy",t[0]||""),e=e.replace("mm",t[1]||""),e=e.replace("dd",t[2]||"")),e}},a={number:function(e){return(e+"").replace(o.numberFormat[","],"").replace(o.numberFormat["."],".")},time:function(e){return e},month:function(e){var t=e.trim().split(/[\s-\/\\]+/);return t.length==2&&(t[0]=o.date.monthkeys[t[0]]||t[0],t[1]=o.date.monthkeys[t[1]]||t[1],t[1].length==2?e=t[0]+"-"+t[1]:t[0].length==2&&(e=t[1]+"-"+t[0])),e},date:function(e){s("d");var t,n=o.patterns.dObj;return e=e.split(o.dFormat),e.length==3?[l(e[n.yy]),l(e[n.mm]),l(e[n.dd])].join("-"):""}},f={number:{step:1},time:{step:60},month:{step:1,start:new Date},date:{step:1,start:new Date}},c=function(){var t={};return function(n){var r;return t[n]||(r=e('<input type="'+n+'" />'),t[n]=function(e){var t=typeof e=="object"?"valueAsDate":"value";return r.prop(t,e).prop("valueAsNumber")}),t[n]}}();f.range=f.number;var h={_create:function(){var t;this.type=this.options.type,this.orig=this.options.orig,this.elemHelper=e('<input type="'+this.type+'" />'),this.asNumber=c(this.type),this.buttonWrapper=e('<span class="input-buttons '+this.type+'-input-buttons"><span unselectable="on" class="step-controls"><span class="step-up"></span><span class="step-down"></span></span></span>').insertAfter(this.element),this.options.containerElements.push(this.buttonWrapper[0]),typeof f[this.type].start=="object"&&(f[this.type].start=this.asNumber(f[this.type].start));for(t=0;t<i.length;t++)this[i[t]](this.options[i[t]]);var n=this.element.attr("autocomplete","off").data("wsspinner",this);this.addBindings(),this._init=!0},parseValue:function(e){return a[this.type](e)},formatValue:function(e){return u[this.type](e,this.options)},placeholder:function(e){var t;this.options.placeholder=e,this.type=="date"&&(t=(e||"").split("-"),t.length==3&&(this.options.placeholder=o.patterns.d.replace("yy",t[0]).replace("mm",t[1]).replace("dd",t[2]))),this.element.prop("placeholder",this.options.placeholder)},addZero:l,_setStartInRange:function(){var e=f[this.type].start||0;this.options.relDefaultValue&&(e+=this.options.relDefaultValue),!isNaN(this.minAsNumber)&&e<this.minAsNumber?e=this.minAsNumber:!isNaN(this.maxAsNumber)&&e>this.maxAsNumber&&(e=this.maxAsNumber),this.elemHelper.prop("valueAsNumber",e).prop("value"),this.options.defValue=this.elemHelper.prop("value")},value:function(e){this.valueAsNumber=this.asNumber(e),this.options.value=e,isNaN(this.valueAsNumber)?this._setStartInRange():(this.elemHelper.prop("value",e),this.options.defValue=""),this.element.prop("value",u[this.type](e,this.options)),this._propertyChange("value")},initDataList:function(){var t,n=this,r=function(){e(n.orig).jProp("list").off("updateDatalist",r).on("updateDatalist",r),clearTimeout(t),t=setTimeout(function(){n.list&&n.list()},9)};e(this.orig).onTrigger("listdatalistchange",r)},getOptions:function(){var t={},n=e(this.orig).jProp("list");return n.find("option").each(function(){t[e.prop(this,"value")]=e.prop(this,"label")}),[t,n.data("label")]},list:function(t){(this.type=="number"||this.type=="time")&&this.element.attr("list",e.attr(this.orig,"list")),this.options.list=t,this._propertyChange("list")},_propertyChange:e.noop,tabindex:function(e){this.options.tabindex=e,this.element.prop("tabindex",this.options.tabindex)},title:function(e){this.options.title=e,this.element.prop("tabindex",this.options.title)},min:function(e){this.elemHelper.prop("min",e),this.minAsNumber=this.asNumber(e),this.valueAsNumber!=null&&isNaN(this.valueAsNumber)&&this._setStartInRange(),this.options.min=e,this._propertyChange("min")},max:function(e){this.elemHelper.prop("max",e),this.maxAsNumber=this.asNumber(e),this.valueAsNumber!=null&&isNaN(this.valueAsNumber)&&this._setStartInRange(),this.options.max=e,this._propertyChange("max")},step:function(e){var t=f[this.type];this.options.step=e,this.elemHelper.prop("step",n(e,t.step))},addBindings:function(){var n,i=this,s=this.options,u=function(){var t={};return{init:function(n,r,s){t[n]||(t[n]={fn:s},e(i.orig).on(n,function(){t[n].val=e.prop(i.orig,"value")})),t[n].val=r},call:function(e,n){t[e]&&t[e].val!=n&&(clearTimeout(t[e].timer),t[e].val=n,t[e].timer=setTimeout(function(){t[e].fn(n,i)},0))}}}(),f={},l=function(e){if(l.prevent)return e.preventDefault(),i.element.focus(),e.stopImmediatePropagation(),!0},c={blur:function(t){!l(t)&&!s.disabled&&!s.readonly&&(u.call("input",e.prop(i.orig,"value")),u.call("change",e.prop(i.orig,"value")),l.prevent||(n=!1))},focus:function(){u.init("input",e.prop(i.orig,"value"),i.options.input),u.init("change",e.prop(i.orig,"value"),i.options.change),n=!0},change:function(){var t=a[i.type](e.prop(this,"value"));e.prop(i.orig,"value",t),u.call("input",t),u.call("change",t)},keydown:function(e){if(e.isDefaultPrevented())return;var t=!0,n=e.keyCode;n==38?f.stepUp():n==40?f.stepDown():t=!1,t&&e.preventDefault()},keypress:function(e){if(e.isDefaultPrevented())return;var t,n=!0,r=e.keyCode;!e.ctrlKey&&!e.metaKey&&o[i.type+"Signs"]?(t=String.fromCharCode(e.charCode==null?r:e.charCode),n=!(t<" "||(o[i.type+"Signs"]+"0123456789").indexOf(t)>-1)):n=!1,n&&e.preventDefault()}},h=function(){return!s.disabled&&!n&&i.element[0].focus(),l.set(),!1};l.set=function(){var e,t=function(){l.prevent=!1};return function(){clearTimeout(e),l.prevent=!0,setTimeout(t,9)}}(),["stepUp","stepDown"].forEach(function(e){f[e]=function(t){if(!s.disabled&&!s.readonly){n||h();var r=!1;t||(t=1);try{i.elemHelper[e](t),r=i.elemHelper.prop("value"),i.value(r),u.call("input",r)}catch(o){}return r}}}),this.buttonWrapper.on("mousedown",h),this.setInput=function(e){i.value(e),u.call("input",e)},this.setChange=function(e){i.setInput(e),u.call("change",e)},c[e.fn.mwheelIntent?"mwheelIntent":"mousewheel"]=function(e,t){t&&n&&!s.disabled&&(f[t>0?"stepUp":"stepDown"](),e.preventDefault())},this.element.on(c),e(r).on("wslocalechange",function(){i.value(i.options.value)}),e(".step-up",this.buttonWrapper).on({"mousepressstart mousepressend":t,"mousedown mousepress":function(e){f.stepUp()}}),e(".step-down",this.buttonWrapper).on({"mousepressstart mousepressend":t,"mousedown mousepress":function(e){f.stepDown()}})}};["readonly","disabled"].forEach(function(e){h[e]=function(t){if(this.options[e]!=t||!this._init)this.options[e]=!!t,e=="readonly"&&this.options.noInput?this.element.prop(e,!0).attr({"aria-readonly":this.options[e]}):this.element.prop(e,this.options[e]),this.buttonWrapper[this.options[e]?"addClass":"removeClass"]("ws-"+e)}}),e.fn.spinbtnUI=function(t){return t=e.extend({monthNames:"monthNames",size:1,startView:0},t),this.each(function(){e.webshims.objectCreate(h,{element:{value:e(this)}},t)})}}(),function(){var n={},i={},s=function(e){var t=[e.getFullYear(),l(e.getMonth()+1),l(e.getDate())];return t.month=t[0]+"-"+t[1],t.date=t[0]+"-"+t[1]+"-"+t[2],t},c=s(new Date),h=function(t,n){t=e(t||this.activeButton),this.activeButton.attr({tabindex:"-1","aria-selected":"false"}),this.activeButton=t.attr({tabindex:"0","aria-selected":"true"}),this.index=this.buttons.index(this.activeButton[0]),clearTimeout(this.timer),!this.popover.openedByFocus&&!n&&(this.popover.activateElement(t),this.timer=setTimeout(function(){t[0].focus()},this.popover.isVisible?20:99))},p=function(){var t;this.popover.navedInitFocus&&(t=this.popover.navedInitFocus.sel||this.popover.navedInitFocus,(!this.activeButton||!this.activeButton[0])&&this.buttons[t]?this.activeButton=this.buttons[t]():t&&(this.activeButton=e(t,this.element)),!this.activeButton[0]&&this.popover.navedInitFocus.alt&&(this.activeButton=this.buttons[this.popover.navedInitFocus.alt]()));if(!this.activeButton||!this.activeButton[0])this.activeButton=this.buttons.filter(".checked-value");this.activeButton[0]||(this.activeButton=this.buttons.filter(".this-value")),this.activeButton[0]||(this.activeButton=this.buttons.eq(0)),this.setFocus(this.activeButton,this.opts.noFocus)};t.ListBox=function(t,n,r){this.element=e("ul",t),this.popover=n,this.opts=r||{},this.buttons=e("button:not(:disabled)",this.element),this.ons(this),this._initialFocus()},t.ListBox.prototype={setFocus:h,_initialFocus:p,prev:function(){var e=this.index-1;e<0?this.opts.prev&&(this.popover.navedInitFocus="last",this.popover.actionFn(this.opts.prev),this.popover.navedInitFocus=!1):this.setFocus(this.buttons.eq(e))},next:function(){var e=this.index+1;e>=this.buttons.length?this.opts.next&&(this.popover.navedInitFocus="first",this.popover.actionFn(this.opts.next),this.popover.navedInitFocus=!1):this.setFocus(this.buttons.eq(e))},ons:function(e){this.element.on({keydown:function(t){var n,r=t.keyCode;if(t.ctrlKey)return;if(r==36||r==33)e.setFocus(e.buttons.eq(0)),n=!0;else if(r==34||r==35)e.setFocus(e.buttons.eq(e.buttons.length-1)),n=!0;else if(r==38||r==37)e.prev(),n=!0;else if(r==40||r==39)e.next(),n=!0;if(n)return!1}})}},t.Grid=function(t,n,r){this.element=e("tbody",t),this.popover=n,this.opts=r||{},this.buttons=e("button:not(:disabled,.othermonth)",this.element),this.ons(this),this._initialFocus()},t.Grid.prototype={setFocus:h,_initialFocus:p,first:function(){this.setFocus(this.buttons.eq(0))},last:function(){this.setFocus(this.buttons.eq(this.buttons.length-1))},upPage:function(){e(".ws-picker-header > button:not(:disabled)",this.popover.element).trigger("click")},downPage:function(){this.activeButton.filter(':not([data-action="changeInput"])').trigger("click")},ons:function(e){this.element.on({keydown:function(t){var n,r=t.keyCode;if(t.shiftKey)return;t.ctrlKey&&r==40?n="downPage":t.ctrlKey&&r==38?n="upPage":r==33||t.ctrlKey&&r==37?n="prevPage":r==34||t.ctrlKey&&r==39?n="nextPage":t.keyCode==36||t.keyCode==33?n="first":t.keyCode==35?n="last":t.keyCode==38?n="up":t.keyCode==37?n="prev":t.keyCode==40?n="down":t.keyCode==39&&(n="next");if(n)return e[n](),!1}})}},e.each({prevPage:{get:"last",action:"prev"},nextPage:{get:"first",action:"next"}},function(e,n){t.Grid.prototype[e]=function(){this.opts[n.action]&&(this.popover.navedInitFocus={sel:'button[data-id="'+this.activeButton.attr("data-id")+'"]:not(:disabled,.othermonth)',alt:n.get},this.popover.actionFn(this.opts[n.action]),this.popover.navedInitFocus=!1)}}),e.each({up:{traverse:"prevAll",get:"last",action:"prev",reverse:!0},down:{traverse:"nextAll",get:"first",action:"next"}},function(n,r){t.Grid.prototype[n]=function(){var n=this.activeButton.closest("td").prop("cellIndex"),i="td:nth-child("+(n+1)+") button:not(:disabled,.othermonth)",s=this.activeButton.closest("tr")[r.traverse]();r.reverse&&(s=e(s.get().reverse())),s=s.find(i)[r.get]();if(n==null){t.warn("cellIndex not implemented. abort keynav");return}s[0]?this.setFocus(s.eq(0)):this.opts[r.action]&&(this.popover.navedInitFocus=i+":"+r.get,this.popover.actionFn(this.opts[r.action]),this.popover.navedInitFocus=!1)}}),e.each({prev:{traverse:"prevAll",get:"last",reverse:!0},next:{traverse:"nextAll",get:"first"}},function(n,r){t.Grid.prototype[n]=function(){var t="button:not(:disabled,.othermonth)",i=this.activeButton.closest("td")[r.traverse]("td");r.reverse&&(i=e(i.get().reverse())),i=i.find(t)[r.get](),i[0]||(i=this.activeButton.closest("tr")[r.traverse]("tr"),r.reverse&&(i=e(i.get().reverse())),i=i.find(t)[r.get]()),i[0]?this.setFocus(i.eq(0)):this.opts[n]&&(this.popover.navedInitFocus=r.get,this.popover.actionFn(this.opts[n]),this.popover.navedInitFocus=!1)}}),n.getWeek=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)},n.getYearList=function(e,t){var r,i,s,o,u,a,f,l,h;e=e[0]*1;var p=t.options.size,d=e%(12*p),v=e-d,m=t.options.max.split("-"),g=t.options.min.split("-"),y=t.options.value.split("-"),b=0,w="",E=0;for(r=0;r<p;r++){r?v+=12:a=n.isInRange([v-1],m,g)?{"data-action":"setYearList",value:v-1}:!1,w+='<div class="year-list picker-list ws-index-'+r+'"><div class="ws-picker-header"><h3>'+v+" - "+(v+11)+"</h3></div>",u=[];for(i=0;i<12;i++)s=v+i,h=[],n.isInRange([s],m,g)?(o="",b++):o=' disabled=""',s==c[0]&&h.push("this-value"),y[0]==s&&h.push("checked-value"),l=h.length?' class="'+h.join(" ")+'"':"",i&&!(i%3)&&(E++,u.push('</tr><tr class="ws-row-'+E+'">')),u.push('<td class="ws-item-'+i+'" role="presentation"><button data-id="year-'+i+'" type="button"'+o+l+' data-action="setMonthList" value="'+s+'" tabindex="-1" role="gridcell">'+s+"</button></td>");r==p-1&&(f=n.isInRange([s+1],m,g)?{"data-action":"setYearList",value:s+1}:!1),w+='<table role="grid" aria-label="'+v+" - "+(v+11)+'"><tbody><tr class="ws-row-0">'+u.join("")+"</tr></tbody></table></div>"}return{enabled:b,main:w,next:f,prev:a,type:"Grid"}},n.getMonthList=function(e,t){var r,i,s,u,a,f,l,h,p,d,v,m=t.options,g=m.size,y=m.max.split("-"),b=m.min.split("-"),w=m.value.split("-"),E=0,S=0,x="";e=e[0]-Math.floor((g-1)/2);for(r=0;r<g;r++){r?e++:h=n.isInRange([e-1],y,b)?{"data-action":"setMonthList",value:e-1}:!1,r==g-1&&(p=n.isInRange([e+1],y,b)?{"data-action":"setMonthList",value:e+1}:!1),f=[],!n.isInRange([e,"01"],y,b)&&!n.isInRange([e,"12"],y,b)?(a=' disabled=""',l=!0):(l=!1,a=""),m.minView>=1&&(a=' disabled=""'),x+='<div class="month-list picker-list ws-index-'+r+'"><div class="ws-picker-header">',x+=m.selectNav?'<select data-action="setMonthList">'+n.createYearSelect(e,y,b).join("")+"</select>":'<button data-action="setYearList"'+a+' value="'+e+'" tabindex="-1">'+e+"</button>",x+="</div>";for(i=0;i<12;i++)u=o.date.monthkeys[i+1],s=(o.date[m.monthNames]||o.date.monthNames)[i],v=[],l||!n.isInRange([e,u],y,b)?a=' disabled=""':(a="",E++),e==c[0]&&c[1]==u&&v.push("this-value"),w[0]==e&&w[1]==u&&v.push("checked-value"),d=v.length?' class="'+v.join(" ")+'"':"",i&&!(i%3)&&(S++,f.push('</tr><tr class="ws-row-'+S+'">')),f.push('<td class="ws-item-'+i+'" role="presentation"><button data-id="month-'+i+'" type="button"'+a+d+' data-action="'+(t.type=="month"?"changeInput":"setDayList")+'" value="'+e+"-"+u+'" tabindex="-1" role="gridcell">'+s+"</button></td>");x+='<table role="grid" aria-label="'+e+'"><tbody><tr class="ws-row-0">'+f.join("")+"</tr></tbody></table></div>"}return{enabled:E,main:x,prev:h,next:p,type:"Grid"}},n.getDayList=function(t,r){var i,u,a,f,l,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A=r.options,O=A.size,M=A.max.split("-"),_=A.min.split("-"),D=A.value.split("-"),P=o.date[A.monthNames]||o.date.monthNames,H=0,B=[],j=new Date(t[0],t[1]-1,1);j.setMonth(j.getMonth()-Math.floor((O-1)/2));for(i=0;i<O;i++){E=j.getMonth(),w=0,i||(k=new Date(j.getTime()),k.setDate(-1),T=s(k),m=n.isInRange(T,M,_)?{"data-action":"setDayList",value:T[0]+"-"+T[1]}:!1),T=s(j),B.push('<div class="day-list picker-list ws-index-'+i+'"><div class="ws-picker-header">'),A.selectNav&&(N=['<select data-action="setDayList" tabindex="0">'+n.createMonthSelect(T,M,_,P).join("")+"</select>",'<select data-action="setDayList" tabindex="0">'+n.createYearSelect(T[0],M,_,"-"+T[1]).join("")+"</select>"],o.date.showMonthAfterYear&&N.reverse(),B.push(N.join(" "))),N=[P[T[1]*1-1],T[0]],o.date.showMonthAfterYear&&N.reverse(),r.options.selectNav||B.push('<button data-action="setMonthList"'+(A.minView>=2?' disabled="" ':"")+' value="'+T.date+'" tabindex="-1">'+N.join(" ")+"</button>"),B.push('</div><table role="grid" aria-label="'+N.join(" ")+'"><thead><tr>'),r.options.showWeek&&B.push('<th class="week-header">'+o.date.weekHeader+"</th>");for(a=o.date.firstDay;a<o.date.dayNamesShort.length;a++)B.push('<th class="day-'+a+'"><abbr title="'+o.date.dayNames[a]+'">'+o.date.dayNamesShort[a]+"</abbr></th>");a=o.date.firstDay;while(a--)B.push('<th class="day-'+a+'"><abbr title="'+o.date.dayNames[a]+'">'+o.date.dayNamesShort[a]+"</abbr></th>");B.push('</tr></thead><tbody><tr class="ws-row-0">'),r.options.showWeek&&(b=n.getWeek(j),B.push('<td class="week-cell">'+b+"</td>"));for(u=0;u<99;u++){y=u&&!(u%7),S=j.getMonth(),x=E!=S,f=j.getDay(),L=[];if(y&&x){B.push("</tr>");break}y&&(w++,B.push('</tr><tr class="ws-row-'+w+'">'),r.options.showWeek&&(b++,B.push('<td class="week-cell">'+b+"</td>"))),u||f!=o.date.firstDay&&(l=f-o.date.firstDay,l<0&&(l+=7),j.setDate(j.getDate()-l),f=j.getDay(),S=j.getMonth(),x=E!=S),T=s(j),C='<td role="presentation" class="day-'+f+'"><button data-id="day-'+j.getDate()+'" role="gridcell" data-action="changeInput" value="'+T.join("-")+'"',x?L.push("othermonth"):L.push("day-"+j.getDate()),T[0]==c[0]&&c[1]==T[1]&&c[2]==T[2]&&L.push("this-value"),D[0]==T[0]&&T[1]==D[1]&&T[2]==D[2]&&L.push("checked-value"),L.length&&(C+=' class="'+L.join(" ")+'"');if(!n.isInRange(T,M,_)||r.options.disableDays&&e.inArray(f,r.options.disableDays)!=-1)C+=' disabled=""';B.push(C+' tabindex="-1">'+j.getDate()+"</button></td>"),j.setDate(j.getDate()+1)}B.push("</tbody></table></div>"),i==O-1&&(T=s(j),T[2]=1,g=n.isInRange(T,M,_)?{"data-action":"setDayList",value:T.date}:!1)}return{enabled:9,main:B.join(""),prev:m,next:g,type:"Grid"}},n.isInRange=function(e,t,n){var r,i=!0;for(r=0;r<e.length;r++){if(n[r]&&n[r]>e[r]){i=!1;break}if(!n[r]||n[r]!=e[r])break}if(i)for(r=0;r<e.length;r++){if(t[r]&&t[r]<e[r]){i=!1;break}if(!t[r]||t[r]!=e[r])break}return i},n.createMonthSelect=function(e,t,r,i){i||(i=o.date.monthNames);var s,u=0,a=[],f=e[1]-1;for(;u<i.length;u++)s=f==u?' selected=""':"",(s||n.isInRange([e[0],u+1],t,r))&&a.push('<option value="'+e[0]+"-"+l(u+1)+'"'+s+">"+i[u]+"</option>");return a},n.createYearSelect=function(e,t,r,i){var s,o=!0,u=!0,a=['<option selected="">'+e+"</option>"],f=0;i||(i="");while(f<8&&(o||u))f++,s=e-f,o&&n.isInRange([s],t,r)?a.unshift('<option value="'+(s+i)+'">'+s+"</option>"):o=!1,s=e+f,u&&n.isInRange([s],t,r)?a.push('<option value="'+(s+i)+'">'+s+"</option>"):u=!1;return a};var d={changeInput:function(e,t,n){n.element.focus(),t.hide(),n.setChange(e)}};(function(){var r=function(e){return"get"+e+"List"},i=function(e){return"set"+e+"List"},s={date:"Day",week:"Day",month:"Month"};e.each({setYearList:["Year","Month","Day"],setMonthList:["Month","Day"],setDayList:["Day"]},function(o,u){var a=u.map(r),f=u.map(i);d[o]=function(r,i,o,l){r=""+r;var c=o.options,h=r.split("-");l||(l=0),e.each(a,function(e,r){if(e>=l){var a=n[r](h,o);if(h.length<2||a.enabled>1||s[o.type]===u[e])return i.element.attr({"data-currentview":f[e]}).addClass("ws-size-"+c.size).data("pickercontent",{data:o,content:a,values:h}),i.bodyElement.html(a.main),a.prev?i.prevElement.attr(a.prev).prop({disabled:!1}):i.prevElement.removeAttr("data-action").prop({disabled:!0}),a.next?i.nextElement.attr(a.next).prop({disabled:!1}):i.nextElement.removeAttr("data-action").prop({disabled:!0}),t[a.type]&&new t[a.type](i.bodyElement.children(),i,a),i.element.trigger("pickerchange"),!1}})}})})(),n.commonInit=function(i,s){var a=function(t){return s.actionFn({"data-action":e.attr(this,"data-action"),value:e(this).val()||e.attr(this,"value")}),!1},f=(new Date).getTime(),l=function(r,o,u){var a=[],l="",c="";r.options=i.getOptions()||{},e("div.ws-options",s.contentElement).remove(),e.each(r.options[0],function(e,t){var s=n.isInRange(e.split("-"),r.maxS,r.minS)?"":' disabled="" ';a.push('<li role="presentation"><button value="'+e+'" '+s+' data-action="changeInput" tabindex="-1" role="option">'+(t||i.formatValue(e))+"</button></li>")}),a.length&&(f++,r.options[1]&&(c="datalist-"+f,l='<h5 id="'+c+'">'+r.options[1]+"</h5>",c=' aria-labelledbyid="'+c+'" '),new t.ListBox(e('<div class="ws-options">'+l+'<ul role="listbox" '+c+">"+a.join("")+"</div>").insertAfter(s.bodyElement)[0],s,{noFocus:!0}))},h=function(){if(s.isDirty){var r=i.options;r.maxS=r.max.split("-"),r.minS=r.min.split("-"),e("button",s.buttonRow).each(function(){var s;e(this).is(".ws-empty")?(s=o.date.clear,s||(s=u[""].date.clear||"clear",t.warn("could not get clear text from form cfg"))):e(this).is(".ws-current")&&(s=(o[i.type]||{}).currentText,s||(s=(u[""][[i.type]]||{}).currentText||"current",t.warn("could not get currentText from form cfg")),e.prop(this,"disabled",!n.isInRange(c[i.type].split("-"),r.maxS,r.minS))),s&&e(this).text(s).attr({"aria-label":s})}),s.nextElement.attr({"aria-label":o.date.nextText}),e("> span",s.nextElement).html(o.date.nextText),s.prevElement.attr({"aria-label":o.date.prevText}),e("> span",s.prevElement).html(o.date.prevText),l(r,r.maxS,r.minS)}e("button.ws-empty",s.buttonRow).prop("disabled",e.prop(i.orig,"required")),s.isDirty=!1};s.actionFn=function(e){d[e["data-action"]]?d[e["data-action"]](e.value,s,i,0):t.warn("no action for "+e["data-action"])},s.contentElement.html('<button class="ws-prev" tabindex="0"><span></span></button> <button class="ws-next" tabindex="0"><span></span></button><div class="ws-picker-body"></div><div class="ws-button-row"><button type="button" class="ws-current" data-action="changeInput" value="'+c[i.type]+'" tabindex="0"></button> <button type="button" data-action="changeInput" value="" class="ws-empty" tabindex="0"></button></div>'),s.nextElement=e("button.ws-next",s.contentElement),s.prevElement=e("button.ws-prev",s.contentElement),s.bodyElement=e("div.ws-picker-body",s.contentElement),s.buttonRow=e("div.ws-button-row",s.contentElement),s.isDirty=!0,s.contentElement.on("click","button[data-action]",a).on("change","select[data-action]",a),s.contentElement.on({keydown:function(t){if(t.keyCode==9){var n=e('[tabindex="0"]:not(:disabled)',this).filter(":visible"),r=n.index(t.target);if(t.shiftKey&&r<=0)return n.last().focus(),!1;if(!t.shiftKey&&r>=n.length-1)return n.first().focus(),!1}else if(t.keyCode==27)return i.element.focus(),s.hide(),!1}}),e(i.options.orig).on("input",function(){var e;i.options.updateOnInput&&s.isVisible&&i.options.value&&(e=s.element.attr("data-currentview"))&&d[e](i.options.value,s,i,0)}),i._propertyChange=function(){var e,t=function(){s.isVisible&&h()};return function(n){if(n=="value")return;s.isDirty=!0,s.isVisible&&(clearTimeout(e),e=setTimeout(t,9))}}(),s.activeElement=e([]),s.activateElement=function(t){t=e(t),t[0]!=s.activeElement[0]&&(s.activeElement.removeClass("ws-focus"),s.openedByFocus||t.addClass("ws-focus")),s.activeElement=t},s.element.on({wspopoverbeforeshow:h,wspopoverhide:function(){s.openedByFocus=!1},focusin:function(e){s.openedByFocus=!1,s.activateElement(e.target)}}),e(r).onTrigger("wslocalechange",i._propertyChange)},n._common=function(r){var i=t.objectCreate(t.wsPopover,{},{prepareFor:r.element}),s=e('<button type="button" class="popover-opener" />').appendTo(r.buttonWrapper),o=r.options,u=!1,l=function(){!o.disabled&&!o.readonly&&!i.isVisible&&(u||n.commonInit(r,i),!u||r.options.restartView?d.setYearList(o.defValue||o.value,i,r,r.options.startView):d[i.element.attr("data-currentview")||"setYearList"](o.defValue||o.value,i,r,0),u=!0,i.show(r.element))};o.containerElements.push(i.element[0]),i.element.on({focusin:function(e){i.activateElement&&(i.openedByFocus=!1,i.activateElement(e.target))}}),o.startView||(o.startView=0),o.minView||(o.minView=0),o.startView<o.minView&&(o.minView=o.startView,t.warn("wrong config for minView/startView.")),o.size||(o.size=1),i.element.addClass(r.type+"-popover input-picker").attr({role:"application"}),f(i.element.children("div.ws-po-outerbox").attr({role:"group"}),o.labels,!0),f(s,o.labels,!0),s.attr({tabindex:o.labels.length?0:"-1"}).on({mousedown:function(){a.apply(this,arguments),i.preventBlur()},click:function(){i.isVisible&&i.activeElement&&(i.openedByFocus=!1,i.activeElement.focus()),l()},focus:function(){i.preventBlur()}}),function(){var e=!1,t=function(){e=!1};r.element.on({focus:function(){if(r.options.openOnFocus||e&&o.openOnMouseFocus)i.openedByFocus=!o.noInput,l()},mousedown:function(){e=!0,setTimeout(t,9),r.element.is(":focus")&&(i.openedByFocus=!o.noInput,l())}})}(),r.popover=i},n.month=n._common,n.date=n.month,t.picker=n}(),function(){var n,i,o=Modernizr.inputtypes,u={},a=["disabled","readonly","value","min","max","step","title","placeholder","tabindex"],l=["data-placeholder"];e.each(a.concat(l),function(e,r){var i=r.replace(/^data\-/,"");t.onNodeNamesPropertyModify("input",r,function(e){if(!n){var r=t.data(this,"shadowData");r&&r.data&&r.nativeElement===this&&r.data[i]&&r.data[i](e)}})});if(s.replaceUI){var c=function(n){t.data(this,"hasShadow")&&e.prop(this,"value",e.prop(this,"value"))};t.onNodeNamesPropertyModify("input","valueAsNumber",c),t.onNodeNamesPropertyModify("input","valueAsDate",c)}var h=function(){return function(t,n){u[t]=n,n.attrs=e.merge([],l,n.attrs),n.props=e.merge([],a,n.props)}}(),p=function(e){e.stopImmediatePropagation(e)},d=function(){return e.css(this,"display")!="none"},v=function(t){var n,i=function(){e.style(t.orig,"display","");var r=.6;if(!n||t.orig.offsetWidth)t.element.css({marginLeft:e.css(t.orig,"marginLeft"),marginRight:e.css(t.orig,"marginRight")}),t.buttonWrapper&&t.buttonWrapper.filter(d).length&&(t.element.css({paddingRight:""}),(parseInt(t.buttonWrapper.css("marginLeft"),10)||0)<0?t.element.css({paddingRight:""}).css({paddingRight:(parseInt(t.element.css("paddingRight"),10)||0)+t.buttonWrapper.outerWidth()}):r=t.buttonWrapper.outerWidth(!0)+.6),t.element.outerWidth(e(t.orig).outerWidth()-r);n=!0,e.style(t.orig,"display","none")};e(r).onTrigger("updateshadowdom",i)},m=function(){var r=e.prop(this,"type"),o,c,h,m,g,y;if(u[r]){h={},m=r,y=e(this).jProp("labels"),c=e.extend({},s[r],e(e.prop(this,"form")).data(r)||{},e(this).data(r)||{},{orig:this,type:r,labels:y,options:{},input:function(e){c._change(e,"input")},change:function(e){c._change(e,"change")},_change:function(t,r){n=!0,e.prop(c.orig,"value",t),n=!1,r&&e(c.orig).trigger(r)},containerElements:[]});for(o=0;o<a.length;o++)c[a[o]]=e.prop(this,a[o]);for(o=0;o<l.length;o++)m=l[o].replace(/^data\-/,""),c[m]||(c[m]=e.attr(this,l[o]));h.shim=u[r]._create(c),t.addShadowDom(this,h.shim.element,{data:h.shim||{}}),h.shim.options.containerElements.push(h.shim.element[0]),f(e(this).getShadowFocusElement(),y),e(this).on("change",function(t){!n&&t.originalEvent&&h.shim.value(e.prop(this,"value"))}),function(){var t={focusin:!0,focus:!0},n,r=!1,i=!1;e(h.shim.options.containerElements).on({"focusin focus focusout blur":function(s){s.stopImmediatePropagation(),i=t[s.type],clearTimeout(n),n=setTimeout(function(){i!=r&&(r=i,e(c.orig).triggerHandler(i?"focus":"blur"),e(c.orig).trigger(i?"focusin":"focusout")),r=i},0)}})}(),h.shim.element.on("change input",p),Modernizr.formvalidation&&e(c.orig).on("firstinvalid",function(n){if(!t.fromSubmit&&i)return;e(c.orig).off("invalid.replacedwidgetbubble").on("invalid.replacedwidgetbubble",function(r){!n.isInvalidUIPrevented()&&!r.isDefaultPrevented()&&(t.validityAlert.showFor(n.target),n.preventDefault(),r.preventDefault()),e(c.orig).off("invalid.replacedwidgetbubble")})}),h.shim.buttonWrapper&&h.shim.buttonWrapper.filter(d).length&&h.shim.element.addClass("has-input-buttons"),g=c.calculateWidth!=null?c.calculateWidth:s.calculateWidth,g&&v(h.shim),e(this).css({display:"none"})}};(!o.range||s.replaceUI)&&h("range",{_create:function(t,n){return e("<span />").insertAfter(t.orig).rangeUI(t).data("rangeUi")}}),Modernizr.formvalidation&&["input","form"].forEach(function(e){var n=t.defineNodeNameProperty(e,"checkValidity",{prop:{value:function(){i=!0;var e=n.prop._supvalue.apply(this,arguments);return i=!1,e}}})}),["number","time","month","date"].forEach(function(n){(!o[n]||s.replaceUI)&&h(n,{_create:function(r,i){var s=e('<input class="ws-'+n+'" type="text" />').insertAfter(r.orig).spinbtnUI(r).data("wsspinner");return t.picker&&t.picker[n]&&t.picker[n](s),s.buttonWrapper.addClass("input-button-size-"+s.buttonWrapper.children().filter(d).length),s}})}),t.addReady(function(t,n){e("input",t).add(n.filter("input")).each(m)})}()});
View
2 demos/js-webshim/minified/shims/combos/6.js
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.
View
202 demos/js-webshim/minified/shims/form-message.js
@@ -1,201 +1 @@
-jQuery.webshims.register('form-message', function($, webshims, window, document, undefined, options){
- "use strict";
- var validityMessages = webshims.validityMessages;
-
- var implementProperties = (options.overrideMessages || options.customMessages) ? ['customValidationMessage'] : [];
-
- validityMessages.en = $.extend(true, {
- typeMismatch: {
- defaultMessage: 'Please enter a valid value.',
- 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.',
- month: 'Please enter a valid value.',
- "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.'
- }
- }, (validityMessages.en || validityMessages['en-US'] || {}));
-
- if(typeof validityMessages['en'].valueMissing == 'object'){
- ['select', 'radio'].forEach(function(type){
- validityMessages.en.valueMissing[type] = 'Please select an option.';
- });
- }
- if(typeof validityMessages.en.rangeUnderflow == 'object'){
- ['date', 'time', 'datetime-local', 'month'].forEach(function(type){
- validityMessages.en.rangeUnderflow[type] = 'Value must be at or after {%min}.';
- });
- }
- if(typeof validityMessages.en.rangeOverflow == 'object'){
- ['date', 'time', 'datetime-local', 'month'].forEach(function(type){
- validityMessages.en.rangeOverflow[type] = 'Value must be at or before {%max}.';
- });
- }
-
- validityMessages['en-US'] = validityMessages['en-US'] || validityMessages.en;
- validityMessages[''] = validityMessages[''] || validityMessages['en-US'];
-
- validityMessages.de = $.extend(true, {
- typeMismatch: {
- defaultMessage: '{%value} ist in diesem Feld nicht zulässig.',
- email: '{%value} ist keine zulässige E-Mail-Adresse',
- url: '{%value} ist keine zulässige Webadresse',
- number: '{%value} ist keine Nummer!',
- date: '{%value} ist kein Datum',
- time: '{%value} ist keine Uhrzeit',
- month: '{%value} ist in diesem Feld nicht zulässig.',
- 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önnen.'
- },
- rangeOverflow: {
- defaultMessage: '{%value} ist zu hoch. {%max} ist der oberste Wert, den Sie benutzen können.'
- },
- stepMismatch: 'Der Wert {%value} ist in diesem Feld nicht zulässig. Hier sind nur bestimmte Werte zulässig. {%title}',
- tooLong: 'Der eingegebene Text ist zu lang! Sie haben {%valueLen} Zeichen eingegeben, dabei sind {%maxlength} das Maximum.',
- patternMismatch: '{%value} hat für dieses Eingabefeld ein falsches Format! {%title}',
- valueMissing: {
- defaultMessage: 'Bitte geben Sie einen Wert ein',
- checkbox: 'Bitte aktivieren Sie das Kästchen'
- }
- }, (validityMessages.de || {}));
-
- if(typeof validityMessages.de.valueMissing == 'object'){
- ['select', 'radio'].forEach(function(type){
- validityMessages.de.valueMissing[type] = 'Bitte wählen Sie eine Option aus';
- });
- }
- if(typeof validityMessages.de.rangeUnderflow == 'object'){
- ['date', 'time', 'datetime-local', 'month'].forEach(function(type){
- validityMessages.de.rangeUnderflow[type] = '{%value} ist zu früh. {%min} ist die früheste Zeit, die Sie benutzen können.';
- });
- }
- if(typeof validityMessages.de.rangeOverflow == 'object'){
- ['date', 'time', 'datetime-local', 'month'].forEach(function(type){
- validityMessages.de.rangeOverflow[type] = '{%value} ist zu spät. {%max} ist die späteste Zeit, die Sie benutzen können.';
- });
- }
-
- var currentValidationMessage = validityMessages[''];
- var getMessageFromObj = function(message, elem){
- if(message && typeof message !== 'string'){
- message = message[ $.prop(elem, 'type') ] || message[ (elem.nodeName || '').toLowerCase() ] || message[ 'defaultMessage' ];
- }
- return message || '';
- };
- var valueVals = {
- value: 1,
- min: 1,
- max: 1
- };
-
- webshims.createValidationMessage = function(elem, name){
- var spinner;
- var message = getMessageFromObj(currentValidationMessage[name], elem);
-
- if(!message){
- message = getMessageFromObj(validityMessages[''][name], elem) || 'invalid value';
- webshims.info('could not find errormessage for: '+ name +' / '+ $.prop(elem, 'type') +'. in language: '+$.webshims.activeLang());
- }
- if(message){
- ['value', 'min', 'max', 'title', 'maxlength', 'label'].forEach(function(attr){
- if(message.indexOf('{%'+attr) === -1){return;}
- var val = ((attr == 'label') ? $.trim($('label[for="'+ elem.id +'"]', elem.form).text()).replace(/\*$|:$/, '') : $.prop(elem, attr)) || '';
- if(name == 'patternMismatch' && attr == 'title' && !val){
- webshims.error('no title for patternMismatch provided. Always add a title attribute.');
- }
- if(valueVals[attr]){
- if(!spinner){
- spinner = $(elem).getShadowElement().data('wsspinner');
- }
- if(spinner && spinner.formatValue){
- val = spinner.formatValue(val);
- }
- }
- message = message.replace('{%'+ attr +'}', val);
- if('value' == attr){
- message = message.replace('{%valueLen}', val.length);
- }
-
- });
- }
-
- return message || '';
- };
-
-
- if(webshims.bugs.validationMessage || !Modernizr.formvalidation || webshims.bugs.bustedValidity){
- implementProperties.push('validationMessage');
- }
-
- webshims.activeLang({
- langObj: validityMessages,
- module: 'form-core',
- callback: function(langObj){
-
- currentValidationMessage = langObj;
- }
- });
-
- implementProperties.forEach(function(messageProp){
- webshims.defineNodeNamesProperty(['fieldset', 'output', 'button'], messageProp, {
- prop: {
- value: '',
- writeable: false
- }
- });
- ['input', 'select', 'textarea'].forEach(function(nodeName){
- var desc = webshims.defineNodeNameProperty(nodeName, messageProp, {
- prop: {
- get: function(){
- var elem = this;
- var message = '';
- if(!$.prop(elem, 'willValidate')){
- return message;
- }
-
- var validity = $.prop(elem, 'validity') || {valid: 1};
-
- if(validity.valid){return message;}
- message = webshims.getContentValidationMessage(elem, validity);
-
- if(message){return message;}
-
- if(validity.customError && elem.nodeName){
- message = (Modernizr.formvalidation && !webshims.bugs.bustedValidity && desc.prop._supget) ? desc.prop._supget.call(elem) : webshims.data(elem, 'customvalidationMessage');
- if(message){return message;}
- }
- $.each(validity, function(name, prop){
- if(name == 'valid' || !prop){return;}
-
- message = webshims.createValidationMessage(elem, name);
- if(message){
- return false;
- }
- });
- return message || '';
- },
- writeable: false
- }
- });
- });
-
- });
-});
+jQuery.webshims.register("form-message",function(e,t,n,r,i,s){"use strict";var o=t.validityMessages,u=s.overrideMessages||s.customMessages?["customValidationMessage"]:[];o.en=e.extend(!0,{typeMismatch:{defaultMessage:"Please enter a valid value.",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.",month:"Please enter a valid value.","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."}},o.en||o["en-US"]||{}),typeof o["en"].valueMissing=="object"&&["select","radio"].forEach(function(e){o.en.valueMissing[e]="Please select an option."}),typeof o.en.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeUnderflow[e]="Value must be at or after {%min}."}),typeof o.en.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.en.rangeOverflow[e]="Value must be at or before {%max}."}),o["en-US"]=o["en-US"]||o.en,o[""]=o[""]||o["en-US"],o.de=e.extend(!0,{typeMismatch:{defaultMessage:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",email:"{%value} ist keine g\u00fcltige E-Mail-Adresse.",url:"{%value} ist kein(e) g\u00fcltige(r) Webadresse/Pfad.",number:"{%value} ist keine Nummer.",date:"{%value} ist kein Datum.",time:"{%value} ist keine Uhrzeit.",month:"{%value} ist in diesem Feld nicht zul\u00e4ssig.",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."}},o.de||{}),typeof o.de.valueMissing=="object"&&["select","radio"].forEach(function(e){o.de.valueMissing[e]="Bitte w\u00e4hlen Sie eine Option aus."}),typeof o.de.rangeUnderflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeUnderflow[e]="{%value} ist zu fr\u00fch. {%min} ist die fr\u00fcheste Zeit, die Sie benutzen k\u00f6nnen."}),typeof o.de.rangeOverflow=="object"&&["date","time","datetime-local","month"].forEach(function(e){o.de.rangeOverflow[e]="{%value} ist zu sp\u00e4t. {%max} ist die sp\u00e4teste Zeit, die Sie benutzen k\u00f6nnen."});var a=o[""],f=function(t,n){return t&&typeof t!="string"&&(t=t[e.prop(n,"type")]||t[(n.nodeName||"").toLowerCase()]||t.defaultMessage),t||""},l={value:1,min:1,max:1};t.createValidationMessage=function(n,r){var i,s=f(a[r],n);return s||(s=f(o[""][r],n)||"invalid value",t.info("could not find errormessage for: "+r+" / "+e.prop(n,"type")+". in language: "+e.webshims.activeLang())),s&&["value","min","max","title","maxlength","label"].forEach(function(o){if(s.indexOf("{%"+o)===-1)return;var u=(o=="label"?e.trim(e('label[for="'+n.id+'"]',n.form).text()).replace(/\*$|:$/,""):e.prop(n,o))||"";r=="patternMismatch"&&o=="title"&&!u&&t.error("no title for patternMismatch provided. Always add a title attribute."),l[o]&&(i||(i=e(n).getShadowElement().data("wsspinner")),i&&i.formatValue&&(u=i.formatValue(u))),s=s.replace("{%"+o+"}",u),"value"==o&&(s=s.replace("{%valueLen}",u.length))}),s||""},(t.bugs.validationMessage||!Modernizr.formvalidation||t.bugs.bustedValidity)&&u.push("validationMessage"),t.activeLang({langObj:o,module:"form-core",callback:function(e){a=e}}),u.forEach(function(n){t.defineNodeNamesProperty(["fieldset","output","button"],n,{prop:{value:"",writeable:!1}}),["input","select","textarea"].forEach(function(r){var i=t.defineNodeNameProperty(r,n,{prop:{get:function(){var n=this,r="";if(!e.prop(n,"willValidate"))return r;var s=e.prop(n,"validity")||{valid:1};if(s.valid)return r;r=t.getContentValidationMessage(n,s);if(r)return r;if(s.customError&&n.nodeName){r=Modernizr.formvalidation&&!t.bugs.bustedValidity&&i.prop._supget?i.prop._supget.call(n):t.data(n,"customvalidationMessage");if(r)return r}return e.each(s,function(e,i){if(e=="valid"||!i)return;r=t.createValidationMessage(n,e);if(r)return!1}),r||""},writeable:!1}})})})});
View
2 demos/js-webshim/minified/shims/form-number-date-ui.js
@@ -1 +1 @@
-jQuery.webshims.register("form-number-date-ui",function(e,t,n,r,i,s){"use strict";var o,u=e.webshims.formcfg,a=function(e){e.stopImmediatePropagation(e)},f=function(){var n=function(){return t.getID(this)};return function(t,r,i){e(t).attr({"aria-labelledby":r.map(n).get().join(" ")}),i||r.on("click",function(e){return t.focus(),e.preventDefault(),!1})}}(),l=function(e){return e?(e+="",e.length==1?"0"+e:e):""};(function(){u.de={numberFormat:{",":".",".":","},timeSigns:":. ",numberSigns:",",dateSigns:".",dFormat:".",patterns:{d:"dd.mm.yy"},month:{currentText:"Aktueller Monat"},date:{close:"schlie\u00dfen",clear:"L\u00f6schen",prevText:"Zur\u00fcck",nextText:"Vor",currentText:"Heute",monthNames:["Januar","Februar","M\u00e4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","M\u00e4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}},u.en={numberFormat:{".":".",",":","},numberSigns:".",dateSigns:"/",timeSigns:":. ",dFormat:"/",patterns:{d:"mm/dd/yy"},month:{currentText:"This month"},date:{closeText:"Done",clear:"Clear",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}},u["en-US"]=u["en-US"]||u.en,u[""]=u[""]||u["en-US"],o=u[""];var t=function(t){if(!t.date.monthkeys){var n=function(e,n){var r,i=e+1;r=i<10?"0"+i:""+i,t.date.monthkeys[i]=r,t.date.monthkeys[n]=r};t.date.monthkeys={},e.each(t.date.monthNames,n),e.each(t.date.monthNamesShort,n)}};t(o),e.webshims.ready("dom-extend",function(){e.webshims.activeLang({register:"form-core",callback:function(){e.each(arguments,function(n,i){if(u[i])return o=u[i],t(o),e(r).triggerHandler("wslocalechange"),!1})}})})})(),function(){var t=function(t){e(this)[t.type=="mousepressstart"?"addClass":"removeClass"]("mousepress-ui")},n=function(e,t){return typeof e=="number"||e&&e==e*1?e*1:t},i=["step","min","max","readonly","title","disabled","tabindex","placeholder","value"],s=function(t){if(!o.patterns[t+"Obj"]){var n={};e.each(o.patterns[t].split(o[t+"Format"]),function(e,t){n[t]=e}),o.patterns[t+"Obj"]=n}},u={number:function(e){return(e+"").replace(/\,/g,"").replace(/\./,o.numberFormat["."])},time:function(e){return e},month:function(e,t){var n,r=e.split("-");return r[0]&&r[1]&&(n=o.date[t.monthNames]||o.date.monthNames,r[1]=n[r[1]*1-1],r[1]&&(e=o.date.showMonthAfterYear?r.join(" "):r[1]+" "+r[0])),e},date:function(e){var t=(e+"").split("-");return t[2]&&t[1]&&t[0]&&(e=o.patterns.d.replace("yy",t[0]||""),e=e.replace("mm",t[1]||""),e=e.replace("dd",t[2]||"")),e}},a={number:function(e){return(e+"").replace(o.numberFormat[","],"").replace(o.numberFormat["."],".")},time:function(e){return e},month:function(e){var t=e.trim().split(/[\s-\/\\]+/);return t.length==2&&(t[0]=o.date.monthkeys[t[0]]||t[0],t[1]=o.date.monthkeys[t[1]]||t[1],t[1].length==2?e=t[0]+"-"+t[1]:t[0].length==2&&(e=t[1]+"-"+t[0])),e},date:function(e){s("d");var t,n=o.patterns.dObj;return e=e.split(o.dFormat),e.length==3?[l(e[n.yy]),l(e[n.mm]),l(e[n.dd])].join("-"):""}},f={number:{step:1},time:{step:60},month:{step:1,start:new Date},date:{step:1,start:new Date}},c=function(){var t={};return function(n){var r;return t[n]||(r=e('<input type="'+n+'" />'),t[n]=function(e){var t=typeof e=="object"?"valueAsDate":"value";return r.prop(t,e).prop("valueAsNumber")}),t[n]}}();f.range=f.number;var h={_create:function(){var t;this.type=this.options.type,this.orig=this.options.orig,this.elemHelper=e('<input type="'+this.type+'" />'),this.asNumber=c(this.type),this.buttonWrapper=e('<span class="input-buttons '+this.type+'-input-buttons"><span unselectable="on" class="step-controls"><span class="step-up"></span><span class="step-down"></span></span></span>').insertAfter(this.element),this.options.containerElements.push(this.buttonWrapper[0]),typeof f[this.type].start=="object"&&(f[this.type].start=this.asNumber(f[this.type].start));for(t=0;t<i.length;t++)this[i[t]](this.options[i[t]]);var n=this.element.attr("autocomplete","off").data("wsspinner",this);this.addBindings(),this._init=!0},parseValue:function(e){return a[this.type](e)},formatValue:function(e){return u[this.type](e,this.options)},placeholder:function(e){var t;this.options.placeholder=e,this.type=="date"&&(t=(e||"").split("-"),t.length==3&&(this.options.placeholder=o.patterns.d.replace("yy",t[0]).replace("mm",t[1]).replace("dd",t[2]))),this.element.prop("placeholder",this.options.placeholder)},addZero:l,_setStartInRange:function(){var e=f[this.type].start||0;this.options.relDefaultValue&&(e+=this.options.relDefaultValue),!isNaN(this.minAsNumber)&&e<this.minAsNumber?e=this.minAsNumber:!isNaN(this.maxAsNumber)&&e>this.maxAsNumber&&(e=this.maxAsNumber),this.elemHelper.prop("valueAsNumber",e).prop("value"),this.options.defValue=this.elemHelper.prop("value")},value:function(e){this.valueAsNumber=this.asNumber(e),this.options.value=e,isNaN(this.valueAsNumber)?this._setStartInRange():(this.elemHelper.prop("value",e),this.options.defValue=""),this.element.prop("value",u[this.type](e,this.options)),this._propertyChange("value")},initDataList:function(){var t,n=this,r=function(){e(n.orig).jProp("list").off("updateDatalist",r).on("updateDatalist",r),clearTimeout(t),t=setTimeout(function(){n.list&&n.list()},9)};e(this.orig).onTrigger("listdatalistchange",r)},getOptions:function(){var t={};return e(this.orig).jProp("list").find("option").each(function(){t[e.prop(this,"value")]=e.prop(this,"label")}),t},list:function(t){(this.type=="number"||this.type=="time")&&this.element.attr("list",e.attr(this.orig,"list")),this.options.list=t,this._propertyChange("list")},_propertyChange:e.noop,tabindex:function(e){this.options.tabindex=e,this.element.prop("tabindex",this.options.tabindex)},title:function(e){this.options.title=e,this.element.prop("tabindex",this.options.title)},min:function(e){this.elemHelper.prop("min",e),this.minAsNumber=this.asNumber(e),this.valueAsNumber!=null&&isNaN(this.valueAsNumber)&&this._setStartInRange(),this.options.min=e,this._propertyChange("min")},max:function(e){this.elemHelper.prop("max",e),this.maxAsNumber=this.asNumber(e),this.valueAsNumber!=null&&isNaN(this.valueAsNumber)&&this._setStartInRange(),this.options.max=e,this._propertyChange("max")},step:function(e){var t=f[this.type];this.options.step=e,this.elemHelper.prop("step",n(e,t.step))},addBindings:function(){var n,i=this,s=this.options,u=function(){var t={};return{init:function(n,r,s){t[n]||(t[n]={fn:s},e(i.orig).on(n,function(){t[n].val=e.prop(i.orig,"value")})),t[n].val=r},call:function(e,n){t[e]&&t[e].val!=n&&(clearTimeout(t[e].timer),t[e].val=n,t[e].timer=setTimeout(function(){t[e].fn(n,i)},0))}}}(),f={},l=function(e){if(l.prevent)return e.preventDefault(),i.element.focus(),e.stopImmediatePropagation(),!0},c={blur:function(t){!l(t)&&!s.disabled&&!s.readonly&&(u.call("input",e.prop(i.orig,"value")),u.call("change",e.prop(i.orig,"value")),l.prevent||(n=!1))},focus:function(){u.init("input",e.prop(i.orig,"value"),i.options.input),u.init("change",e.prop(i.orig,"value"),i.options.change),n=!0},change:function(){var t=a[i.type](e.prop(this,"value"));e.prop(i.orig,"value",t),u.call("input",t),u.call("change",t)},keydown:function(e){if(e.isDefaultPrevented())return;var t=!0,n=e.keyCode;n==38?f.stepUp():n==40?f.stepDown():t=!1,t&&e.preventDefault()},keypress:function(e){if(e.isDefaultPrevented())return;var t,n=!0,r=e.keyCode;!e.ctrlKey&&!e.metaKey&&o[i.type+"Signs"]?(t=String.fromCharCode(e.charCode==null?r:e.charCode),n=!(t<" "||(o[i.type+"Signs"]+"0123456789").indexOf(t)>-1)):n=!1,n&&e.preventDefault()}},h=function(){return!s.disabled&&!n&&i.element[0].focus(),l.set(),!1};l.set=function(){var e,t=function(){l.prevent=!1};return function(){clearTimeout(e),l.prevent=!0,setTimeout(t,9)}}(),["stepUp","stepDown"].forEach(function(e){f[e]=function(t){if(!s.disabled&&!s.readonly){n||h();var r=!1;t||(t=1);try{i.elemHelper[e](t),r=i.elemHelper.prop("value"),i.value(r),u.call("input",r)}catch(o){}return r}}}),this.buttonWrapper.on("mousedown",h),this.setInput=function(e){i.value(e),u.call("input",e)},this.setChange=function(e){i.setInput(e),u.call("change",e)},c[e.fn.mwheelIntent?"mwheelIntent":"mousewheel"]=function(e,t){t&&n&&!s.disabled&&(f[t>0?"stepUp":"stepDown"](),e.preventDefault())},this.element.on(c),e(r).on("wslocalechange",function(){i.value(i.options.value)}),e(".step-up",this.buttonWrapper).on({"mousepressstart mousepressend":t,"mousedown mousepress":function(e){f.stepUp()}}),e(".step-down",this.buttonWrapper).on({"mousepressstart mousepressend":t,"mousedown mousepress":function(e){f.stepDown()}})}};["readonly","disabled"].forEach(function(e){h[e]=function(t){if(this.options[e]!=t||!this._init)this.options[e]=!!t,this.element.prop(e,this.options[e]),this.buttonWrapper[this.options[e]?"addClass":"removeClass"]("ws-"+e)}}),e.fn.spinbtnUI=function(t){return t=e.extend({monthNames:"monthNames",size:1,startView:0},t),this.each(function(){e.webshims.objectCreate(h,{element:{value:e(this)}},t)})}}(),function(){var n={},i={},s=function(e){var t=[e.getFullYear(),l(e.getMonth()+1),l(e.getDate())];return t.month=t[0]+"-"+t[1],t.date=t[0]+"-"+t[1]+"-"+t[2],t},c=s(new Date),h=function(t,n){t=e(t||this.activeButton),this.activeButton.attr({tabindex:"-1","aria-selected":"false"}),this.activeButton=t.attr({tabindex:"0","aria-selected":"true"}),this.index=this.buttons.index(this.activeButton[0]),n||(clearTimeout(this.timer),this.popover.activateElement(t),this.popover.openedByFocus||(this.timer=setTimeout(function(){t[0].focus()},this.popover.isVisible?20:99)))},p=function(){var t;this.popover.navedInitFocus&&(t=this.popover.navedInitFocus.sel||this.popover.navedInitFocus,(!this.activeButton||!this.activeButton[0])&&this.buttons[t]?this.activeButton=this.buttons[t]():t&&(this.activeButton=e(t,this.element)),!this.activeButton[0]&&this.popover.navedInitFocus.alt&&(this.activeButton=this.buttons[this.popover.navedInitFocus.alt]()));if(!this.activeButton||!this.activeButton[0])this.activeButton=this.buttons.filter(".checked-value");this.activeButton[0]||(this.activeButton=this.buttons.filter(".this-value")),this.activeButton[0]||(this.activeButton=this.buttons.eq(0)),this.setFocus(this.activeButton,this.opts.noFocus)};t.ListBox=function(t,n,r){this.element=e("ul",t),this.popover=n,this.opts=r||{},this.buttons=e("button:not(:disabled)",this.element),this.ons(this),this._initialFocus()},t.ListBox.prototype={setFocus:h,_initialFocus:p,prev:function(){var e=this.index-1;e<0?this.opts.prev&&(this.popover.navedInitFocus="last",this.popover.actionFn(this.opts.prev),this.popover.navedInitFocus=!1):this.setFocus(this.buttons.eq(e))},next:function(){var e=this.index+1;e>=this.buttons.length?this.opts.next&&(this.popover.navedInitFocus="first",this.popover.actionFn(this.opts.next),this.popover.navedInitFocus=!1):this.setFocus(this.buttons.eq(e))},ons:function(e){this.element.on({keydown:function(t){var n,r=t.keyCode;if(t.ctrlKey)return;if(r==36||r==33)e.setFocus(e.buttons.eq(0)),n=!0;else if(r==34||r==35)e.setFocus(e.buttons.eq(e.buttons.length-1)),n=!0;else if(r==38||r==37)e.prev(),n=!0;else if(r==40||r==39)e.next(),n=!0;if(n)return!1}})}},t.Grid=function(t,n,r){this.element=e("tbody",t),this.popover=n,this.opts=r||{},this.buttons=e("button:not(:disabled,.othermonth)",this.element),this.ons(this),this._initialFocus()},t.Grid.prototype={setFocus:h,_initialFocus:p,first:function(){this.setFocus(this.buttons.eq(0))},last:function(){this.setFocus(this.buttons.eq(this.buttons.length-1))},upPage:function(){e(".ws-picker-header > button:not(:disabled)",this.popover.element).trigger("click")},downPage:function(){this.activeButton.filter(':not([data-action="changeInput"])').trigger("click")},ons:function(e){this.element.on({keydown:function(t){var n,r=t.keyCode;if(t.shiftKey)return;t.ctrlKey&&r==40?n="downPage":t.ctrlKey&&r==38?n="upPage":r==33||t.ctrlKey&&r==37?n="prevPage":r==34||t.ctrlKey&&r==39?n="nextPage":t.keyCode==36||t.keyCode==33?n="first":t.keyCode==35?n="last":t.keyCode==38?n="up":t.keyCode==37?n="prev":t.keyCode==40?n="down":t.keyCode==39&&(n="next");if(n)return e[n](),!1}})}},e.each({prevPage:{get:"last",action:"prev"},nextPage:{get:"first",action:"next"}},function(e,n){t.Grid.prototype[e]=function(){this.opts[n.action]&&(this.popover.navedInitFocus={sel:'button[data-id="'+this.activeButton.attr("data-id")+'"]:not(:disabled,.othermonth)',alt:n.get},this.popover.actionFn(this.opts[n.action]),this.popover.navedInitFocus=!1)}}),e.each({up:{traverse:"prevAll",get:"last",action:"prev",reverse:!0},down:{traverse:"nextAll",get:"first",action:"next"}},function(n,r){t.Grid.prototype[n]=function(){var n=this.activeButton.closest("td").prop("cellIndex"),i="td:nth-child("+(n+1)+") button:not(:disabled,.othermonth)",s=this.activeButton.closest("tr")[r.traverse]();r.reverse&&(s=e(s.get().reverse())),s=s.find(i)[r.get]();if(n==null){t.warn("cellIndex not implemented. abort keynav");return}s[0]?this.setFocus(s.eq(0)):this.opts[r.action]&&(this.popover.navedInitFocus=i+":"+r.get,this.popover.actionFn(this.opts[r.action]),this.popover.navedInitFocus=!1)}}),e.each({prev:{traverse:"prevAll",get:"last",reverse:!0},next:{traverse:"nextAll",get:"first"}},function(n,r){t.Grid.prototype[n]=function(){var t="button:not(:disabled,.othermonth)",i=this.activeButton.closest("td")[r.traverse]("td");r.reverse&&(i=e(i.get().reverse())),i=i.find(t)[r.get](),i[0]||(i=this.activeButton.closest("tr")[r.traverse]("tr"),r.reverse&&(i=e(i.get().reverse())),i=i.find(t)[r.get]()),i[0]?this.setFocus(i.eq(0)):this.opts[n]&&(this.popover.navedInitFocus=r.get,this.popover.actionFn(this.opts[n]),this.popover.navedInitFocus=!1)}}),n.getWeek=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)},n.getYearList=function(e,t){var r,i,s,o,u,a,f,l,h;e=e[0]*1;var p=t.options.size,d=e%(12*p),v=e-d,m=t.options.max.split("-"),g=t.options.min.split("-"),y=t.options.value.split("-"),b=0,w="",E=0;for(r=0;r<p;r++){r?v+=12:a=n.isInRange([v-1],m,g)?{"data-action":"setYearList",value:v-1}:!1,w+='<div class="year-list picker-list ws-index-'+r+'"><div class="ws-picker-header"><h3>'+v+" - "+(v+11)+"</h3></div>",u=[];for(i=0;i<12;i++)s=v+i,h=[],n.isInRange([s],m,g)?(o="",b++):o=' disabled=""',s==c[0]&&h.push("this-value"),y[0]==s&&h.push("checked-value"),l=h.length?' class="'+h.join(" ")+'"':"",i&&!(i%3)&&(E++,u.push('</tr><tr class="ws-row-'+E+'">')),u.push('<td class="ws-item-'+i+'" role="presentation"><button data-id="year-'+i+'" type="button"'+o+l+' data-action="setMonthList" value="'+s+'" tabindex="-1" role="gridcell">'+s+"</button></td>");r==p-1&&(f=n.isInRange([s+1],m,g)?{"data-action":"setYearList",value:s+1}:!1),w+='<table role="grid" aria-label="'+v+" - "+(v+11)+'"><tbody><tr class="ws-row-0">'+u.join("")+"</tr></tbody></table></div>"}return{enabled:b,main:w,next:f,prev:a,type:"Grid"}},n.getMonthList=function(e,t){var r,i,s,u,a,f,l,h,p,d,v,m=t.options,g=m.size,y=m.max.split("-"),b=m.min.split("-"),w=m.value.split("-"),E=0,S=0,x="";e=e[0]-Math.floor((g-1)/2);for(r=0;r<g;r++){r?e++:h=n.isInRange([e-1],y,b)?{"data-action":"setMonthList",value:e-1}:!1,r==g-1&&(p=n.isInRange([e+1],y,b)?{"data-action":"setMonthList",value:e+1}:!1),f=[],!n.isInRange([e,"01"],y,b)&&!n.isInRange([e,"12"],y,b)?(a=' disabled=""',l=!0):(l=!1,a=""),m.minView>=1&&(a=' disabled=""'),x+='<div class="month-list picker-list ws-index-'+r+'"><div class="ws-picker-header">',x+=m.selectNav?'<select data-action="setMonthList">'+n.createYearSelect(e,y,b).join("")+"</select>":'<button data-action="setYearList"'+a+' value="'+e+'" tabindex="-1">'+e+"</button>",x+="</div>";for(i=0;i<12;i++)u=o.date.monthkeys[i+1],s=(o.date[m.monthNames]||o.date.monthNames)[i],v=[],l||!n.isInRange([e,u],y,b)?a=' disabled=""':(a="",E++),e==c[0]&&c[1]==u&&v.push("this-value"),w[0]==e&&w[1]==u&&v.push("checked-value"),d=v.length?' class="'+v.join(" ")+'"':"",i&&!(i%3)&&(S++,f.push('</tr><tr class="ws-row-'+S+'">')),f.push('<td class="ws-item-'+i+'" role="presentation"><button data-id="month-'+i+'" type="button"'+a+d+' data-action="'+(t.type=="month"?"changeInput":"setDayList")+'" value="'+e+"-"+u+'" tabindex="-1" role="gridcell">'+s+"</button></td>");x+='<table role="grid" aria-label="'+e+'"><tbody><tr class="ws-row-0">'+f.join("")+"</tr></tbody></table></div>"}return{enabled:E,main:x,prev:h,next:p,type:"Grid"}},n.getDayList=function(t,r){var i,u,a,f,l,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A=r.options,O=A.size,M=A.max.split("-"),_=A.min.split("-"),D=A.value.split("-"),P=o.date[A.monthNames]||o.date.monthNames,H=0,B=[],j=new Date(t[0],t[1]-1,1);j.setMonth(j.getMonth()-Math.floor((O-1)/2));for(i=0;i<O;i++){E=j.getMonth(),w=0,i||(k=new Date(j.getTime()),k.setDate(-1),T=s(k),m=n.isInRange(T,M,_)?{"data-action":"setDayList",value:T[0]+"-"+T[1]}:!1),T=s(j),B.push('<div class="day-list picker-list ws-index-'+i+'"><div class="ws-picker-header">'),A.selectNav&&(N=['<select data-action="setDayList" tabindex="0">'+n.createMonthSelect(T,M,_,P).join("")+"</select>",'<select data-action="setDayList" tabindex="0">'+n.createYearSelect(T[0],M,_,"-"+T[1]).join("")+"</select>"],o.date.showMonthAfterYear&&N.reverse(),B.push(N.join(" "))),N=[P[T[1]*1-1],T[0]],o.date.showMonthAfterYear&&N.reverse(),r.options.selectNav||B.push('<button data-action="setMonthList"'+(A.minView>=2?' disabled="" ':"")+' value="'+T.date+'" tabindex="-1">'+N.join(" ")+"</button>"),B.push('</div><table role="grid" aria-label="'+N.join(" ")+'"><thead><tr>'),r.options.showWeek&&B.push('<th class="week-header">'+o.date.weekHeader+"</th>");for(a=o.date.firstDay;a<o.date.dayNamesShort.length;a++)B.push('<th class="day-'+a+'"><abbr title="'+o.date.dayNames[a]+'">'+o.date.dayNamesShort[a]+"</abbr></th>");a=o.date.firstDay;while(a--)B.push('<th class="day-'+a+'"><abbr title="'+o.date.dayNames[a]+'">'+o.date.dayNamesShort[a]+"</abbr></th>");B.push('</tr></thead><tbody><tr class="ws-row-0">'),r.options.showWeek&&(b=n.getWeek(j),B.push('<td class="week-cell">'+b+"</td>"));for(u=0;u<99;u++){y=u&&!(u%7),S=j.getMonth(),x=E!=S,f=j.getDay(),L=[];if(y&&x){B.push("</tr>");break}y&&(w++,B.push('</tr><tr class="ws-row-'+w+'">'),r.options.showWeek&&(b++,B.push('<td class="week-cell">'+b+"</td>"))),u||f!=o.date.firstDay&&(l=f-o.date.firstDay,l<0&&(l+=7),j.setDate(j.getDate()-l),f=j.getDay(),S=j.getMonth(),x=E!=S),T=s(j),C='<td role="presentation" class="day-'+f+'"><button data-id="day-'+j.getDate()+'" role="gridcell" data-action="changeInput" value="'+T.join("-")+'"',x?L.push("othermonth"):L.push("day-"+j.getDate()),T[0]==c[0]&&c[1]==T[1]&&c[2]==T[2]&&L.push("this-value"),D[0]==T[0]&&T[1]==D[1]&&T[2]==D[2]&&L.push("checked-value"),L.length&&(C+=' class="'+L.join(" ")+'"');if(!n.isInRange(T,M,_)||r.options.disableDays&&e.inArray(f,r.options.disableDays)!=-1)C+=' disabled=""';B.push(C+' tabindex="-1">'+j.getDate()+"</button></td>"),j.setDate(j.getDate()+1)}B.push("</tbody></table></div>"),i==O-1&&(T=s(j),T[2]=1,g=n.isInRange(T,M,_)?{"data-action":"setDayList",value:T.date}:!1)}return{enabled:9,main:B.join(""),prev:m,next:g,type:"Grid"}},n.isInRange=function(e,t,n){var r,i=!0;for(r=0;r<e.length;r++){if(n[r]&&n[r]>e[r]){i=!1;break}if(!n[r]||n[r]!=e[r])break}if(i)for(r=0;r<e.length;r++){if(t[r]&&t[r]<e[r]){i=!1;break}if(!t[r]||t[r]!=e[r])break}return i},n.createMonthSelect=function(e,t,r,i){i||(i=o.date.monthNames);var s,u=0,a=[],f=e[1]-1;for(;u<i.length;u++)s=f==u?' selected=""':"",(s||n.isInRange([e[0],u+1],t,r))&&a.push('<option value="'+e[0]+"-"+l(u+1)+'"'+s+">"+i[u]+"</option>");return a},n.createYearSelect=function(e,t,r,i){var s,o=!0,u=!0,a=['<option selected="">'+e+"</option>"],f=0;i||(i="");while(f<8&&(o||u))f++,s=e-f,o&&n.isInRange([s],t,r)?a.unshift('<option value="'+(s+i)+'">'+s+"</option>"):o=!1,s=e+f,u&&n.isInRange([s],t,r)?a.push('<option value="'+(s+i)+'">'+s+"</option>"):u=!1;return a};var d={changeInput:function(e,t,n){n.element.focus(),t.hide(),n.setChange(e)}};(function(){var r=function(e){return"get"+e+"List"},i=function(e){return"set"+e+"List"},s={date:"Day",week:"Day",month:"Month"};e.each({setYearList:["Year","Month","Day"],setMonthList:["Month","Day"],setDayList:["Day"]},function(o,u){var a=u.map(r),f=u.map(i);d[o]=function(r,i,o,l){r=""+r;var c=o.options,h=r.split("-");l||(l=0),e.each(a,function(e,r){if(e>=l){var a=n[r](h,o);if(h.length<2||a.enabled>1||s[o.type]===u[e])return i.element.attr({"data-currentview":f[e]}).addClass("ws-size-"+c.size).data("pickercontent",{data:o,content:a,values:h}),i.bodyElement.html(a.main),a.prev?i.prevElement.attr(a.prev).prop({disabled:!1}):i.prevElement.removeAttr("data-action").prop({disabled:!0}),a.next?i.nextElement.attr(a.next).prop({disabled:!1}):i.nextElement.removeAttr("data-action").prop({disabled:!0}),t[a.type]&&new t[a.type](i.bodyElement.children(),i,a),i.element.trigger("pickerchange"),!1}})}})})(),n.commonInit=function(i,s){var a=function(t){return s.actionFn({"data-action":e.attr(this,"data-action"),value:e(this).val()||e.attr(this,"value")}),!1},f=function(r,o,u){var a=[];r.options=i.getOptions()||{},e("div.ws-options",s.contentElement).remove(),e.each(r.options,function(e,t){var s=n.isInRange(e.split("-"),r.maxS,r.minS)?"":' disabled="" ';a.push('<li role="presentation"><button value="'+e+'" '+s+' data-action="changeInput" tabindex="-1" role="option">'+(t||i.formatValue(e))+"</button></li>")}),a.length&&new t.ListBox(e('<div class="ws-options"><ul role="listbox">'+a.join("")+"</div>").insertAfter(s.bodyElement)[0],s,{noFocus:!0})},l=function(){if(s.isDirty){var r=i.options;r.maxS=r.max.split("-"),r.minS=r.min.split("-"),e("button",s.buttonRow).each(function(){var s;e(this).is(".ws-empty")?(s=o.date.clear,s||(s=u[""].date.clear||"clear",t.warn("could not get clear text from form cfg"))):e(this).is(".ws-current")&&(s=(o[i.type]||{}).currentText,s||(s=(u[""][[i.type]]||{}).currentText||"current",t.warn("could not get currentText from form cfg")),e.prop(this,"disabled",!n.isInRange(c[i.type].split("-"),r.maxS,r.minS))),s&&e(this).text(s).attr({"aria-label":s})}),s.nextElement.attr({"aria-label":o.date.nextText}),e("> span",s.nextElement).html(o.date.nextText),s.prevElement.attr({"aria-label":o.date.prevText}),e("> span",s.prevElement).html(o.date.prevText),f(r,r.maxS,r.minS)}e("button.ws-empty",s.buttonRow).prop("disabled",e.prop(i.orig,"required")),s.isDirty=!1};s.actionFn=function(e){d[e["data-action"]]?d[e["data-action"]](e.value,s,i,0):t.warn("no action for "+e["data-action"])},s.contentElement.html('<button class="ws-prev" tabindex="0"><span></span></button> <button class="ws-next" tabindex="0"><span></span></button><div class="ws-picker-body"></div><div class="ws-button-row"><button type="button" class="ws-current" data-action="changeInput" value="'+c[i.type]+'" tabindex="0"></button> <button type="button" data-action="changeInput" value="" class="ws-empty" tabindex="0"></button></div>'),s.nextElement=e("button.ws-next",s.contentElement),s.prevElement=e("button.ws-prev",s.contentElement),s.bodyElement=e("div.ws-picker-body",s.contentElement),s.buttonRow=e("div.ws-button-row",s.contentElement),s.isDirty=!0,s.contentElement.on("click","button[data-action]",a).on("change","select[data-action]",a),s.contentElement.on({keydown:function(t){if(t.keyCode==9){var n=e('[tabindex="0"]:not(:disabled)',this).filter(":visible"),r=n.index(t.target);if(t.shiftKey&&r<=0)return n.last().focus(),!1;if(!t.shiftKey&&r>=n.length-1)return n.first().focus(),!1}else if(t.keyCode==27)return i.element.focus(),s.hide(),!1}}),e(i.options.orig).on("input",function(){var e;i.options.updateOnInput&&s.isVisible&&i.options.value&&(e=s.element.attr("data-currentview"))&&d[e](i.options.value,s,i,0)}),i._propertyChange=function(){var e,t=function(){s.isVisible&&l()};return function(n){if(n=="value")return;s.isDirty=!0,s.isVisible&&(clearTimeout(e),e=setTimeout(t,9))}}(),s.activeElement=e([]),s.activateElement=function(t){t=e(t),t[0]!=s.activeElement[0]&&(s.activeElement.removeClass("ws-focus"),s.openedByFocus||t.addClass("ws-focus")),s.activeElement=t},s.element.on({wspopoverbeforeshow:l,wspopoverhide:function(){s.openedByFocus=!1},focusin:function(e){s.openedByFocus=!1,s.activateElement(e.target)}}),e(r).onTrigger("wslocalechange",i._propertyChange)},n._common=function(r){var i=t.objectCreate(t.wsPopover,{},{prepareFor:r.element}),s=e('<button type="button" class="popover-opener" />').appendTo(r.buttonWrapper),o=r.options,u=!1,l=function(){!o.disabled&&!o.readonly&&!i.isVisible&&(u||n.commonInit(r,i),!u||r.options.restartView?d.setYearList(o.defValue||o.value,i,r,r.options.startView):d[i.element.attr("data-currentview")||"setYearList"](o.defValue||o.value,i,r,0),u=!0,i.show(r.element))};o.containerElements.push(i.element[0]),i.element.on({focusin:function(e){i.activateElement&&(i.openedByFocus=!1,i.activateElement(e.target))}}),o.startView||(o.startView=0),o.minView||(o.minView=0),o.startView<o.minView&&(o.minView=o.startView,t.warn("wrong config for minView/startView.")),o.size||(o.size=1),i.element.addClass(r.type+"-popover input-picker").attr({role:"application"}),f(i.element.children("div.ws-po-outerbox").attr({role:"group"}),o.labels,!0),f(s,o.labels,!0),s.attr({tabindex:o.labels.length?0:"-1"}).on({mousedown:function(){a.apply(this,arguments),i.preventBlur()},click:function(){i.isVisible&&i.activeElement&&(i.openedByFocus=!1,i.activeElement.focus()),l()},focus:function(){i.preventBlur()}}),r.element.on({focus:function(){r.options.openOnFocus&&(i.openedByFocus=!0,l())},mousedown:function(){r.element.is(":focus")&&(i.openedByFocus=!0,l())}}),r.popover=i},n.month=n._common,n.date=n.month,t.picker=n}(),function(){var n,i,o=Modernizr.inputtypes,u={},a=["disabled","readonly","value","min","max","step","title","placeholder"],l=["tabindex","data-placeholder"];e.each(a.concat(l),function(e,r){var i=r.replace(/^data\-/,"");t.onNodeNamesPropertyModify("input",r,function(e){if(!n){var r=t.data(this,"shadowData");r&&r.data&&r.nativeElement===this&&r.data[i]&&r.data[i](e)}})});if(s.replaceUI){var c=function(n){t.data(this,"hasShadow")&&e.prop(this,"value",e.prop(this,"value"))};t.onNodeNamesPropertyModify("input","valueAsNumber",c),t.onNodeNamesPropertyModify("input","valueAsDate",c)}var h=function(){return function(t,n){u[t]=n,n.attrs=e.merge([],l,n.attrs),n.props=e.merge([],a,n.props)}}(),p=function(e){e.stopImmediatePropagation(e)},d=function(){return e.css(this,"display")!="none"},v=function(t){var n,i=function(){e.style(t.orig,"display","");var r=.6;if(!n||t.orig.offsetWidth)t.element.css({marginLeft:e.css(t.orig,"marginLeft"),marginRight:e.css(t.orig,"marginRight")}),t.buttonWrapper&&t.buttonWrapper.filter(d).length&&(t.element.css({paddingRight:""}),(parseInt(t.buttonWrapper.css("marginLeft"),10)||0)<0?t.element.css({paddingRight:""}).css({paddingRight:(parseInt(t.element.css("paddingRight"),10)||0)+t.buttonWrapper.outerWidth()}):r=t.buttonWrapper.outerWidth(!0)+.6),t.element.outerWidth(e(t.orig).outerWidth()-r);n=!0,e.style(t.orig,"display","none")};e(r).onTrigger("updateshadowdom",i)},m=function(){var r=e.prop(this,"type"),o,c,h,m,g,y;if(u[r]){h={},m=r,y=e(this).jProp("labels"),c=e.extend({},s[r],e(e.prop(this,"form")).data(r)||{},e(this).data(r)||{},{orig:this,type:r,labels:y,options:{},input:function(e){c._change(e,"input")},change:function(e){c._change(e,"change")},_change:function(t,r){n=!0,e.prop(c.orig,"value",t),n=!1,r&&e(c.orig).trigger(r)},containerElements:[]});for(o=0;o<a.length;o++)c[a[o]]=e.prop(this,a[o]);for(o=0;o<l.length;o++)m=l[o].replace(/^data\-/,""),c[m]||(c[m]=e.attr(this,l[o]));h.shim=u[r]._create(c),t.addShadowDom(this,h.shim.element,{data:h.shim||{}}),h.shim.options.containerElements.push(h.shim.element[0]),f(e(this).getShadowFocusElement(),y),e(this).on("change",function(t){!n&&t.originalEvent&&h.shim.value(e.prop(this,"value"))}),function(){var t={focusin:!0,focus:!0},n,r=!1,i=!1;e(h.shim.options.containerElements).on({"focusin focus focusout blur":function(s){s.stopImmediatePropagation(),i=t[s.type],clearTimeout(n),n=setTimeout(function(){i!=r&&(r=i,e(c.orig).triggerHandler(i?"focus":"blur"),e(c.orig).trigger(i?"focusin":"focusout")),r=i},0)}})}(),h.shim.element.on("change input",p),Modernizr.formvalidation&&e(c.orig).on("firstinvalid",function(n){if(!t.fromSubmit&&i)return;e(c.orig).off("invalid.replacedwidgetbubble").on("invalid.replacedwidgetbubble",function(r){!n.isInvalidUIPrevented()&&!r.isDefaultPrevented()&&(t.validityAlert.showFor(n.target),n.preventDefault(),r.preventDefault()),e(c.orig).off("invalid.replacedwidgetbubble")})}),h.shim.buttonWrapper&&h.shim.buttonWrapper.filter(d).length&&h.shim.element.addClass("has-input-buttons"),g=c.calculateWidth!=null?c.calculateWidth:s.calculateWidth,g&&v(h.shim),e(this).css({display:"none"})}};(!o.range||s.replaceUI)&&h("range",{_create:function(t,n){return e("<span />").insertAfter(t.orig).rangeUI(t).data("rangeUi")}}),Modernizr.formvalidation&&["input","form"].forEach(function(e){var n=t.defineNodeNameProperty(e,"checkValidity",{prop:{value:function(){i=!0;var e=n.prop._supvalue.apply(this,arguments);return i=!1,e}}})}),["number","time","month","date"].forEach(function(n){(!o[n]||s.replaceUI)&&h(n,{_create:function(r,i){var s=e('<input class="ws-'+n+'" type="text" />').insertAfter(r.orig).spinbtnUI(r).data("wsspinner");return t.picker&&t.picker[n]&&t.picker[n](s),s.buttonWrapper.addClass("input-button-size-"+s.buttonWrapper.children().filter(d).length),s}})}),t.addReady(function(t,n){e("input",t).add(n.filter("input")).each(m)})}()});
+jQuery.webshims.register("form-number-date-ui",function(e,t,n,r,i,s){"use strict";var o,u=e.webshims.formcfg,a=function(e){e.stopImmediatePropagation(e)},f=function(){var n=function(){return t.getID(this)};return function(t,r,i){e(t).attr({"aria-labelledby":r.map(n).get().join(" ")}),i||r.on("click",function(e){return t.focus(),e.preventDefault(),!1})}}(),l=function(e){return e?(e+="",e.length==1?"0"+e:e):""};(function(){u.de={numberFormat:{",":".",".":","},timeSigns:":. ",numberSigns:",",dateSigns:".",dFormat:".",patterns:{d:"dd.mm.yy"},month:{currentText:"Aktueller Monat"},date:{close:"schlie\u00dfen",clear:"L\u00f6schen",prevText:"Zur\u00fcck",nextText:"Vor",currentText:"Heute",monthNames:["Januar","Februar","M\u00e4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","M\u00e4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}},u.en={numberFormat:{".":".",",":","},numberSigns:".",dateSigns:"/",timeSigns:":. ",dFormat:"/",patterns:{d:"mm/dd/yy"},month:{currentText:"This month"},date:{closeText:"Done",clear:"Clear",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}},u["en-US"]=u["en-US"]||u.en,u[""]=u[""]||u["en-US"],o=u[""];var t=function(t){if(!t.date.monthkeys){var n=function(e,n){var r,i=e+1;r=i<10?"0"+i:""+i,t.date.monthkeys[i]=r,t.date.monthkeys[n]=r};t.date.monthkeys={},e.each(t.date.monthNames,n),e.each(t.date.monthNamesShort,n)}};t(o),e.webshims.ready("dom-extend",function(){e.webshims.activeLang({register:"form-core",callback:function(){e.each(arguments,function(n,i){if(u[i])return o=u[i],t(o),e(r).triggerHandler("wslocalechange"),!1})}})})})(),function(){var t=function(t){e(this)[t.type=="mousepressstart"?"addClass":"removeClass"]("mousepress-ui")},n=function(e,t){return typeof e=="number"||e&&e==e*1?e*1:t},i=["step","min","max","readonly","title","disabled","tabindex","placeholder","value"],s=function(t){if(!o.patterns[t+"Obj"]){var n={};e.each(o.patterns[t].split(o[t+"Format"]),function(e,t){n[t]=e}),o.patterns[t+"Obj"]=n}},u={number:function(e){return(e+"").replace(/\,/g,"").replace(/\./,o.numberFormat["."])},time:function(e){return e},month:function(e,t){var n,r=e.split("-");return r[0]&&r[1]&&(n=o.date[t.monthNames]||o.date.monthNames,r[1]=n[r[1]*1-1],r[1]&&(e=o.date.showMonthAfterYear?r.join(" "):r[1]+" "+r[0])),e},date:function(e){var t=(e+"").split("-");return t[2]&&t[1]&&t[0]&&(e=o.patterns.d.replace("yy",t[0]||""),e=e.replace("mm",t[1]||""),e=e.replace("dd",t[2]||"")),e}},a={number:function(e){return(e+"").replace(o.numberFormat[","],"").replace(o.numberFormat["."],".")},time:function(e){return e},month:function(e){var t=e.trim().split(/[\s-\/\\]+/);return t.length==2&&(t[0]=o.date.monthkeys[t[0]]||t[0],t[1]=o.date.monthkeys[t[1]]||t[1],t[1].length==2?e=t[0]+"-"+t[1]:t[0].length==2&&(e=t[1]+"-"+t[0])),e},date:function(e){s("d");var t,n=o.patterns.dObj;return e=e.split(o.dFormat),e.length==3?[l(e[n.yy]),l(e[n.mm]),l(e[n.dd])].join("-"):""}},f={number:{step:1},time:{step:60},month:{step:1,start:new Date},date:{step:1,start:new Date}},c=function(){var t={};return function(n){var r;return t[n]||(r=e('<input type="'+n+'" />'),t[n]=function(e){var t=typeof e=="object"?"valueAsDate":"value";return r.prop(t,e).prop("valueAsNumber")}),t[n]}}();f.range=f.number;var h={_create:function(){var t;this.type=this.options.type,this.orig=this.options.orig,this.elemHelper=e('<input type="'+this.type+'" />'),this.asNumber=c(this.type),this.buttonWrapper=e('<span class="input-buttons '+this.type+'-input-buttons"><span unselectable="on" class="step-controls"><span class="step-up"></span><span class="step-down"></span></span></span>').insertAfter(this.element),this.options.containerElements.push(this.buttonWrapper[0]),typeof f[this.type].start=="object"&&(f[this.type].start=this.asNumber(f[this.type].start));for(t=0;t<i.length;t++)this[i[t]](this.options[i[t]]);var n=this.element.attr("autocomplete","off").data("wsspinner",this);this.addBindings(),this._init=!0},parseValue:function(e){return a[this.type](e)},formatValue:function(e){return u[this.type](e,this.options)},placeholder:function(e){var t;this.options.placeholder=e,this.type=="date"&&(t=(e||"").split("-"),t.length==3&&(this.options.placeholder=o.patterns.d.replace("yy",t[0]).replace("mm",t[1]).replace("dd",t[2]))),this.element.prop("placeholder",this.options.placeholder)},addZero:l,_setStartInRange:function(){var e=f[this.type].start||0;this.options.relDefaultValue&&(e+=this.options.relDefaultValue),!isNaN(this.minAsNumber)&&e<this.minAsNumber?e=this.minAsNumber:!isNaN(this.maxAsNumber)&&e>this.maxAsNumber&&(e=this.maxAsNumber),this.elemHelper.prop("valueAsNumber",e).prop("value"),this.options.defValue=this.elemHelper.prop("value")},value:function(e){this.valueAsNumber=this.asNumber(e),this.options.value=e,isNaN(this.valueAsNumber)?this._setStartInRange():(this.elemHelper.prop("value",e),this.options.defValue=""),this.element.prop("value",u[this.type](e,this.options)),this._propertyChange("value")},initDataList:function(){var t,n=this,r=function(){e(n.orig).jProp("list").off("updateDatalist",r).on("updateDatalist",r),clearTimeout(t),t=setTimeout(function(){n.list&&n.list()},9)};e(this.orig).onTrigger("listdatalistchange",r)},getOptions:function(){var t={},n=e(this.orig).jProp("list");return n.find("option").each(function(){t[e.prop(this,"value")]=e.prop(this,"label")}),[t,n.data("label")]},list:function(t){(this.type=="number"||this.type=="time")&&this.element.attr("list",e.attr(this.orig,"list")),this.options.list=t,this._propertyChange("list")},_propertyChange:e.noop,tabindex:function(e){this.options.tabindex=e,this.element.prop("tabindex",this.options.tabindex)},title:function(e){this.options.title=e,this.element.prop("tabindex",this.options.title)},min:function(e){this.elemHelper.prop("min",e),this.minAsNumber=this.asNumber(e),this.valueAsNumber!=null&&isNaN(this.valueAsNumber)&&this._setStartInRange(),this.options.min=e,this._propertyChange("min")},max:function(e){this.elemHelper.prop("max",e),this.maxAsNumber=this.asNumber(e),this.valueAsNumber!=null&&isNaN(this.valueAsNumber)&&this._setStartInRange(),this.options.max=e,this._propertyChange("max")},step:function(e){var t=f[this.type];this.options.step=e,this.elemHelper.prop("step",n(e,t.step))},addBindings:function(){var n,i=this,s=this.options,u=function(){var t={};return{init:function(n,r,s){t[n]||(t[n]={fn:s},e(i.orig).on(n,function(){t[n].val=e.prop(i.orig,"value")})),t[n].val=r},call:function(e,n){t[e]&&t[e].val!=n&&(clearTimeout(t[e].timer),t[e].val=n,t[e].timer=setTimeout(function(){t[e].fn(n,i)},0))}}}(),f={},l=function(e){if(l.prevent)return e.preventDefault(),i.element.focus(),e.stopImmediatePropagation(),!0},c={blur:function(t){!l(t)&&!s.disabled&&!s.readonly&&(u.call("input",e.prop(i.orig,"value")),u.call("change",e.prop(i.orig,"value")),l.prevent||(n=!1))},focus:function(){u.init("input",e.prop(i.orig,"value"),i.options.input),u.init("change",e.prop(i.orig,"value"),i.options.change),n=!0},change:function(){var t=a[i.type](e.prop(this,"value"));e.prop(i.orig,"value",t),u.call("input",t),u.call("change",t)},keydown:function(e){if(e.isDefaultPrevented())return;var t=!0,n=e.keyCode;n==38?f.stepUp():n==40?f.stepDown():t=!1,t&&e.preventDefault()},keypress:function(e){if(e.isDefaultPrevented())return;var t,n=!0,r=e.keyCode;!e.ctrlKey&&!e.metaKey&&o[i.type+"Signs"]?(t=String.fromCharCode(e.charCode==null?r:e.charCode),n=!(t<" "||(o[i.type+"Signs"]+"0123456789").indexOf(t)>-1)):n=!1,n&&e.preventDefault()}},h=function(){return!s.disabled&&!n&&i.element[0].focus(),l.set(),!1};l.set=function(){var e,t=function(){l.prevent=!1};return function(){clearTimeout(e),l.prevent=!0,setTimeout(t,9)}}(),["stepUp","stepDown"].forEach(function(e){f[e]=function(t){if(!s.disabled&&!s.readonly){n||h();var r=!1;t||(t=1);try{i.elemHelper[e](t),r=i.elemHelper.prop("value"),i.value(r),u.call("input",r)}catch(o){}return r}}}),this.buttonWrapper.on("mousedown",h),this.setInput=function(e){i.value(e),u.call("input",e)},this.setChange=function(e){i.setInput(e),u.call("change",e)},c[e.fn.mwheelIntent?"mwheelIntent":"mousewheel"]=function(e,t){t&&n&&!s.disabled&&(f[t>0?"stepUp":"stepDown"](),e.preventDefault())},this.element.on(c),e(r).on("wslocalechange",function(){i.value(i.options.value)}),e(".step-up",this.buttonWrapper).on({"mousepressstart mousepressend":t,"mousedown mousepress":function(e){f.stepUp()}}),e(".step-down",this.buttonWrapper).on({"mousepressstart mousepressend":t,"mousedown mousepress":function(e){f.stepDown()}})}};["readonly","disabled"].forEach(function(e){h[e]=function(t){if(this.options[e]!=t||!this._init)this.options[e]=!!t,e=="readonly"&&this.options.noInput?this.element.prop(e,!0).attr({"aria-readonly":this.options[e]}):this.element.prop(e,this.options[e]),this.buttonWrapper[this.options[e]?"addClass":"removeClass"]("ws-"+e)}}),e.fn.spinbtnUI=function(t){return t=e.extend({monthNames:"monthNames",size:1,startView:0},t),this.each(function(){e.webshims.objectCreate(h,{element:{value:e(this)}},t)})}}(),function(){var n={},i={},s=function(e){var t=[e.getFullYear(),l(e.getMonth()+1),l(e.getDate())];return t.month=t[0]+"-"+t[1],t.date=t[0]+"-"+t[1]+"-"+t[2],t},c=s(new Date),h=function(t,n){t=e(t||this.activeButton),this.activeButton.attr({tabindex:"-1","aria-selected":"false"}),this.activeButton=t.attr({tabindex:"0","aria-selected":"true"}),this.index=this.buttons.index(this.activeButton[0]),clearTimeout(this.timer),!this.popover.openedByFocus&&!n&&(this.popover.activateElement(t),this.timer=setTimeout(function(){t[0].focus()},this.popover.isVisible?20:99))},p=function(){var t;this.popover.navedInitFocus&&(t=this.popover.navedInitFocus.sel||this.popover.navedInitFocus,(!this.activeButton||!this.activeButton[0])&&this.buttons[t]?this.activeButton=this.buttons[t]():t&&(this.activeButton=e(t,this.element)),!this.activeButton[0]&&this.popover.navedInitFocus.alt&&(this.activeButton=this.buttons[this.popover.navedInitFocus.alt]()));if(!this.activeButton||!this.activeButton[0])this.activeButton=this.buttons.filter(".checked-value");this.activeButton[0]||(this.activeButton=this.buttons.filter(".this-value")),this.activeButton[0]||(this.activeButton=this.buttons.eq(0)),this.setFocus(this.activeButton,this.opts.noFocus)};t.ListBox=function(t,n,r){this.element=e("ul",t),this.popover=n,this.opts=r||{},this.buttons=e("button:not(:disabled)",this.element),this.ons(this),this._initialFocus()},t.ListBox.prototype={setFocus:h,_initialFocus:p,prev:function(){var e=this.index-1;e<0?this.opts.prev&&(this.popover.navedInitFocus="last",this.popover.actionFn(this.opts.prev),this.popover.navedInitFocus=!1):this.setFocus(this.buttons.eq(e))},next:function(){var e=this.index+1;e>=this.buttons.length?this.opts.next&&(this.popover.navedInitFocus="first",this.popover.actionFn(this.opts.next),this.popover.navedInitFocus=!1):this.setFocus(this.buttons.eq(e))},ons:function(e){this.element.on({keydown:function(t){var n,r=t.keyCode;if(t.ctrlKey)return;if(r==36||r==33)e.setFocus(e.buttons.eq(0)),n=!0;else if(r==34||r==35)e.setFocus(e.buttons.eq(e.buttons.length-1)),n=!0;else if(r==38||r==37)e.prev(),n=!0;else if(r==40||r==39)e.next(),n=!0;if(n)return!1}})}},t.Grid=function(t,n,r){this.element=e("tbody",t),this.popover=n,this.opts=r||{},this.buttons=e("button:not(:disabled,.othermonth)",this.element),this.ons(this),this._initialFocus()},t.Grid.prototype={setFocus:h,_initialFocus:p,first:function(){this.setFocus(this.buttons.eq(0))},last:function(){this.setFocus(this.buttons.eq(this.buttons.length-1))},upPage:function(){e(".ws-picker-header > button:not(:disabled)",this.popover.element).trigger("click")},downPage:function(){this.activeButton.filter(':not([data-action="changeInput"])').trigger("click")},ons:function(e){this.element.on({keydown:function(t){var n,r=t.keyCode;if(t.shiftKey)return;t.ctrlKey&&r==40?n="downPage":t.ctrlKey&&r==38?n="upPage":r==33||t.ctrlKey&&r==37?n="prevPage":r==34||t.ctrlKey&&r==39?n="nextPage":t.keyCode==36||t.keyCode==33?n="first":t.keyCode==35?n="last":t.keyCode==38?n="up":t.keyCode==37?n="prev":t.keyCode==40?n="down":t.keyCode==39&&(n="next");if(n)return e[n](),!1}})}},e.each({prevPage:{get:"last",action:"prev"},nextPage:{get:"first",action:"next"}},function(e,n){t.Grid.prototype[e]=function(){this.opts[n.action]&&(this.popover.navedInitFocus={sel:'button[data-id="'+this.activeButton.attr("data-id")+'"]:not(:disabled,.othermonth)',alt:n.get},this.popover.actionFn(this.opts[n.action]),this.popover.navedInitFocus=!1)}}),e.each({up:{traverse:"prevAll",get:"last",action:"prev",reverse:!0},down:{traverse:"nextAll",get:"first",action:"next"}},function(n,r){t.Grid.prototype[n]=function(){var n=this.activeButton.closest("td").prop("cellIndex"),i="td:nth-child("+(n+1)+") button:not(:disabled,.othermonth)",s=this.activeButton.closest("tr")[r.traverse]();r.reverse&&(s=e(s.get().reverse())),s=s.find(i)[r.get]();if(n==null){t.warn("cellIndex not implemented. abort keynav");return}s[0]?this.setFocus(s.eq(0)):this.opts[r.action]&&(this.popover.navedInitFocus=i+":"+r.get,this.popover.actionFn(this.opts[r.action]),this.popover.navedInitFocus=!1)}}),e.each({prev:{traverse:"prevAll",get:"last",reverse:!0},next:{traverse:"nextAll",get:"first"}},function(n,r){t.Grid.prototype[n]=function(){var t="button:not(:disabled,.othermonth)",i=this.activeButton.closest("td")[r.traverse]("td");r.reverse&&(i=e(i.get().reverse())),i=i.find(t)[r.get](),i[0]||(i=this.activeButton.closest("tr")[r.traverse]("tr"),r.reverse&&(i=e(i.get().reverse())),i=i.find(t)[r.get]()),i[0]?this.setFocus(i.eq(0)):this.opts[n]&&(this.popover.navedInitFocus=r.get,this.popover.actionFn(this.opts[n]),this.popover.navedInitFocus=!1)}}),n.getWeek=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)},n.getYearList=function(e,t){var r,i,s,o,u,a,f,l,h;e=e[0]*1;var p=t.options.size,d=e%(12*p),v=e-d,m=t.options.max.split("-"),g=t.options.min.split("-"),y=t.options.value.split("-"),b=0,w="",E=0;for(r=0;r<p;r++){r?v+=12:a=n.isInRange([v-1],m,g)?{"data-action":"setYearList",value:v-1}:!1,w+='<div class="year-list picker-list ws-index-'+r+'"><div class="ws-picker-header"><h3>'+v+" - "+(v+11)+"</h3></div>",u=[];for(i=0;i<12;i++)s=v+i,h=[],n.isInRange([s],m,g)?(o="",b++):o=' disabled=""',s==c[0]&&h.push("this-value"),y[0]==s&&h.push("checked-value"),l=h.length?' class="'+h.join(" ")+'"':"",i&&!(i%3)&&(E++,u.push('</tr><tr class="ws-row-'+E+'">')),u.push('<td class="ws-item-'+i+'" role="presentation"><button data-id="year-'+i+'" type="button"'+o+l+' data-action="setMonthList" value="'+s+'" tabindex="-1" role="gridcell">'+s+"</button></td>");r==p-1&&(f=n.isInRange([s+1],m,g)?{"data-action":"setYearList",value:s+1}:!1),w+='<table role="grid" aria-label="'+v+" - "+(v+11)+'"><tbody><tr class="ws-row-0">'+u.join("")+"</tr></tbody></table></div>"}return{enabled:b,main:w,next:f,prev:a,type:"Grid"}},n.getMonthList=function(e,t){var r,i,s,u,a,f,l,h,p,d,v,m=t.options,g=m.size,y=m.max.split("-"),b=m.min.split("-"),w=m.value.split("-"),E=0,S=0,x="";e=e[0]-Math.floor((g-1)/2);for(r=0;r<g;r++){r?e++:h=n.isInRange([e-1],y,b)?{"data-action":"setMonthList",value:e-1}:!1,r==g-1&&(p=n.isInRange([e+1],y,b)?{"data-action":"setMonthList",value:e+1}:!1),f=[],!n.isInRange([e,"01"],y,b)&&!n.isInRange([e,"12"],y,b)?(a=' disabled=""',l=!0):(l=!1,a=""),m.minView>=1&&(a=' disabled=""'),x+='<div class="month-list picker-list ws-index-'+r+'"><div class="ws-picker-header">',x+=m.selectNav?'<select data-action="setMonthList">'+n.createYearSelect(e,y,b).join("")+"</select>":'<button data-action="setYearList"'+a+' value="'+e+'" tabindex="-1">'+e+"</button>",x+="</div>";for(i=0;i<12;i++)u=o.date.monthkeys[i+1],s=(o.date[m.monthNames]||o.date.monthNames)[i],v=[],l||!n.isInRange([e,u],y,b)?a=' disabled=""':(a="",E++),e==c[0]&&c[1]==u&&v.push("this-value"),w[0]==e&&w[1]==u&&v.push("checked-value"),d=v.length?' class="'+v.join(" ")+'"':"",i&&!(i%3)&&(S++,f.push('</tr><tr class="ws-row-'+S+'">')),f.push('<td class="ws-item-'+i+'" role="presentation"><button data-id="month-'+i+'" type="button"'+a+d+' data-action="'+(t.type=="month"?"changeInput":"setDayList")+'" value="'+e+"-"+u+'" tabindex="-1" role="gridcell">'+s+"</button></td>");x+='<table role="grid" aria-label="'+e+'"><tbody><tr class="ws-row-0">'+f.join("")+"</tr></tbody></table></div>"}return{enabled:E,main:x,prev:h,next:p,type:"Grid"}},n.getDayList=function(t,r){var i,u,a,f,l,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A=r.options,O=A.size,M=A.max.split("-"),_=A.min.split("-"),D=A.value.split("-"),P=o.date[A.monthNames]||o.date.monthNames,H=0,B=[],j=new Date(t[0],t[1]-1,1);j.setMonth(j.getMonth()-Math.floor((O-1)/2));for(i=0;i<O;i++){E=j.getMonth(),w=0,i||(k=new Date(j.getTime()),k.setDate(-1),T=s(k),m=n.isInRange(T,M,_)?{"data-action":"setDayList",value:T[0]+"-"+T[1]}:!1),T=s(j),B.push('<div class="day-list picker-list ws-index-'+i+'"><div class="ws-picker-header">'),A.selectNav&&(N=['<select data-action="setDayList" tabindex="0">'+n.createMonthSelect(T,M,_,P).join("")+"</select>",'<select data-action="setDayList" tabindex="0">'+n.createYearSelect(T[0],M,_,"-"+T[1]).join("")+"</select>"],o.date.showMonthAfterYear&&N.reverse(),B.push(N.join(" "))),N=[P[T[1]*1-1],T[0]],o.date.showMonthAfterYear&&N.reverse(),r.options.selectNav||B.push('<button data-action="setMonthList"'+(A.minView>=2?' disabled="" ':"")+' value="'+T.date+'" tabindex="-1">'+N.join(" ")+"</button>"),B.push('</div><table role="grid" aria-label="'+N.join(" ")+'"><thead><tr>'),r.options.showWeek&&B.push('<th class="week-header">'+o.date.weekHeader+"</th>");for(a=o.date.firstDay;a<o.date.dayNamesShort.length;a++)B.push('<th class="day-'+a+'"><abbr title="'+o.date.dayNames[a]+'">'+o.date.dayNamesShort[a]+"</abbr></th>");a=o.date.firstDay;while(a--)B.push('<th class="day-'+a+'"><abbr title="'+o.date.dayNames[a]+'">'+o.date.dayNamesShort[a]+"</abbr></th>");B.push('</tr></thead><tbody><tr class="ws-row-0">'),r.options.showWeek&&(b=n.getWeek(j),B.push('<td class="week-cell">'+b+"</td>"));for(u=0;u<99;u++){y=u&&!(u%7),S=j.getMonth(),x=E!=S,f=j.getDay(),L=[];if(y&&x){B.push("</tr>");break}y&&(w++,B.push('</tr><tr class="ws-row-'+w+'">'),r.options.showWeek&&(b++,B.push('<td class="week-cell">'+b+"</td>"))),u||f!=o.date.firstDay&&(l=f-o.date.firstDay,l<0&&(l+=7),j.setDate(j.getDate()-l),f=j.getDay(),S=j.getMonth(),x=E!=S),T=s(j),C='<td role="presentation" class="day-'+f+'"><button data-id="day-'+j.getDate()+'" role="gridcell" data-action="changeInput" value="'+T.join("-")+'"',x?L.push("othermonth"):L.push("day-"+j.getDate()),T[0]==c[0]&&c[1]==T[1]&&c[2]==T[2]&&L.push("this-value"),D[0]==T[0]&&T[1]==D[1]&&T[2]==D[2]&&L.push("checked-value"),L.length&&(C+=' class="'+L.join(" ")+'"');if(!n.isInRange(T,M,_)||r.options.disableDays&&e.inArray(f,r.options.disableDays)!=-1)C+=' disabled=""';B.push(C+' tabindex="-1">'+j.getDate()+"</button></td>"),j.setDate(j.getDate()+1)}B.push("</tbody></table></div>"),i==O-1&&(T=s(j),T[2]=1,g=n.isInRange(T,M,_)?{"data-action":"setDayList",value:T.date}:!1)}return{enabled:9,main:B.join(""),prev:m,next:g,type:"Grid"}},n.isInRange=function(e,t,n){var r,i=!0;for(r=0;r<e.length;r++){if(n[r]&&n[r]>e[r]){i=!1;break}if(!n[r]||n[r]!=e[r])break}if(i)for(r=0;r<e.length;r++){if(t[r]&&t[r]<e[r]){i=!1;break}if(!t[r]||t[r]!=e[r])break}return i},n.createMonthSelect=function(e,t,r,i){i||(i=o.date.monthNames);var s,u=0,a=[],f=e[1]-1;for(;u<i.length;u++)s=f==u?' selected=""':"",(s||n.isInRange([e[0],u+1],t,r))&&a.push('<option value="'+e[0]+"-"+l(u+1)+'"'+s+">"+i[u]+"</option>");return a},n.createYearSelect=func