(function(){var a=null,b=null;$(function(){var d=adf.mf.internal.amx.agent;"Android"==d.type&&"Generic"==d.subtype&&$(document).drag(".amx-scrollable",{start:function(){},drag:function(d,g){if(g&&null==window.androidHackForListViewReorder){var h=$(this);if(0!==this.scrollHeight-h.innerHeight()&&(null==b||b==this)){b=this;var k=this.scrollTop;this.scrollTop=k+-1*g.deltaPageY;k==this.scrollTop&&(b=null)}if(0!==this.scrollWidth-h.innerWidth()&&(null==a||a==this))a=this,h=this.scrollLeft,this.scrollLeft=
h+-1*g.deltaPageX,h!=this.scrollLeft&&(a=null)}},end:function(){b=a=null},threshold:15})})})();
(function(){(function(){amx.createField=function(a){var b={},d=document.createElement("div");d.className="field";b.fieldRoot=d;b.isReadOnly=amx.isValueTrue(a.getAttribute("readOnly"));b.isDisable=amx.isValueTrue(a.getAttribute("disabled"));var e=document.createElement("div");e.className="field-label";b.fieldLabel=e;d.appendChild(e);if(amx.isValueTrue(a.getAttribute("simple")))adf.mf.internal.amx.addCSSClassName(d,"amx-simple");else{var g=document.createElement("label"),h=a.getId()+"::lbl";g.setAttribute("id",
h);g.appendChild(document.createTextNode(amx.getTextValue(a.getAttribute("label"))));e.appendChild(g)}a=document.createElement("div");a.className="field-value";b.fieldValue=a;d.appendChild(a);return b}})(jQuery);amx.registerRenderers("amx",{view:function(a){var b=document.createElement("div");$(b).append(a.renderSubNodes());return b},spacer:function(a){var b=amx.getTextValue(a.getAttribute("width")),d=amx.getTextValue(a.getAttribute("height"));if((a=!amx.isNodeRendered(a))||null==b||0>=b.length){if(a||
null==d||0>d.length)return document.createElement("span");return 0!=d.length?(a=document.createElement("div"),a.style.marginTop=d+"px",a):document.createElement("div")}if(null==d||0>=d.length)d=0;var a=document.createElement("div"),e=a.style;e.display="inline-block";e.marginTop=d+"px";e.marginRight=b+"px";return a},verbatim:function(a){var b=document.createElement("div"),a=a.getTag().getTextContent();b.innerHTML=a;return b},goLink:function(a){var b;if(amx.isValueTrue(a.getAttribute("disabled"))){b=
document.createElement("span");b.setAttribute("aria-disabled","true");var d=a.getAttribute("text");if(null!=d){var e=document.createElement("label");e.appendChild(document.createTextNode(d));e.setAttribute("role","presentation");e.setAttribute("aria-hidden","true");b.setAttribute("aria-label",d);b.appendChild(e)}}else b=document.createElement("a"),b.setAttribute("href",amx.getTextValue(a.getAttribute("url"))),b.appendChild(document.createTextNode(amx.getTextValue(a.getAttribute("text"))));b.setAttribute("role",
"link");d=a.getAttribute("shortDesc");null!=d&&b.setAttribute("aria-label",d);$(b).append(a.renderSubNodes());return b},outputText:function(a){var b=document.createElement("span"),d=amx.getTextValue(a.getAttribute("value")),e=a.getAttribute("styleClass");null!=e&&-1!=adf.mf.internal.amx.getCSSClassNameIndex(e,"amx-text-sectiontitle")&&b.setAttribute("role","heading");e=parseInt(a.getAttribute("truncateAt"));!isNaN(e)&&0<e&&"undefined"!=typeof a.getAttribute("value")&&(15>e&&(e=15),b.setAttribute("amx-data-value",
d),e<d.length&&(d=d.substring(0,e-3)+"..."),b.className="amx-outputText-truncateAt");b.appendChild(document.createTextNode(d));return b},inputText:{createChildrenNodes:function(a){amx.registerInputValue(a,"value");return!1},updateChildren:function(a,b){if(amx.isValueTrue(a.getAttribute("readOnly")))return adf.mf.api.amx.AmxNodeChangeResult.RERENDER;var d=b.getSize(),e=b.hasChanged("maximumLength"),g=b.hasChanged("value"),h=b.hasChanged("label"),k=0;e&&++k;g&&++k;h&&++k;if(k!=d)return adf.mf.api.amx.AmxNodeChangeResult.RERENDER;
if(g||e){if((d=document.getElementById(a.getId()+"__inputElement"))&&document.activeElement==d)if(d=adf.mf.internal.amx.agent,"Android"==d.type&&"Generic"==d.subtype&&(d=!0,g&&!1==e&&a.getAttribute("value")==b.getOldValue("value")&&(d=!1),d))return adf.mf.api.amx.AmxNodeChangeResult.RERENDER;if(!0==a._dirty)return adf.mf.api.amx.AmxNodeChangeResult.RERENDER}return adf.mf.api.amx.AmxNodeChangeResult.REFRESH},refresh:function(a,b){b.getSize();var d=b.hasChanged("maximumLength"),e=b.hasChanged("value"),
g=b.hasChanged("label"),h=document.getElementById(a.getId()+"__inputElement");(e||d)&&this._setValue(a,h);g&&this._setLabel(a,h)},create:function(a){var b=amx.createField(a);b.fieldLabel.setAttribute("id",a.getId()+"__fieldLabel");var d;a._oldValue=null;a._dirty=!1;var e=document.createElement("div");e.className="wrap";b.fieldValue.appendChild(e);var g=amx.isValueTrue(a.getAttribute("required"));if(amx.isValueTrue(a.getAttribute("readOnly")))d=document.createElement("div"),d.className="readOnlyLabel",
d.setAttribute("aria-readonly","true"),d.appendChild(document.createTextNode(amx.getTextValue(a.getAttribute("value")))),e.appendChild(d);else{var h=a.getAttribute("rows");if(h&&1<parseInt(h,10))d=document.createElement("textarea"),d.setAttribute("rows",h),d.setAttribute("aria-multiline","true");else if(amx.isValueTrue(a.getAttribute("secret")))d=document.createElement("input"),d.setAttribute("type","password");else{switch(a.getAttribute("inputType")){case "number":case "email":case "url":case "tel":h=
a.getAttribute("inputType");break;default:h="text"}d=document.createElement("input");d.setAttribute("type",h)}d.setAttribute("id",a.getId()+"__inputElement");d.setAttribute("name",a.getAttribute("name"));d.setAttribute("placeholder",amx.getTextValue(a.getAttribute("hintText")));e.appendChild(d);e=function(b){var e=a.getAttribute("maximumLength");if(0>=e)return a._dirty=!0;if("textInput"==b.type)if(b.originalEvent&&b.originalEvent.data)b=b.originalEvent.data;else return a._dirty=!0;else b=String.fromCharCode(b.charCode);
var g=d.value,e=e-g.length;return b.length>e?(0<e&&(a._dirty=!0,d.value=g+b.substring(0,e)),!1):a._dirty=!0};h=$(d);h.keypress(e);h.keyup(e);h.bind("textInput",e);this._setValue(a,d);adf.mf.internal.amx.registerBlur(d,function(){if(!1!=a._dirty){a._dirty=!1;var b=d.value;a.setAttributeResolvedValue("value",b);if(a._oldValue!==b){var e=new amx.ValueChangeEvent(a._oldValue,b);amx.processAmxEvent(a,"valueChange","value",b,e)}else amx.processAmxEvent(a,"valueChange","value",b)}});var k=this;adf.mf.internal.amx.registerFocus(d,
function(){k._setOldValue(a,d)})}d.setAttribute("role","textbox");e=a.getId()+"::lbl";d.setAttribute("aria-labelledby",e);g&&d.setAttribute("aria-required","true");amx.isValueTrue(a.getAttribute("disabled"))&&(d.setAttribute("disabled",!0),d.setAttribute("aria-disabled","true"));adf.mf.api.amx.applyRequiredMarker(a,b);return b.fieldRoot},_setValue:function(a,b){if(b){a._dirty=!1;var d=a.getAttribute("value");null!==d&&""!==d?(d=amx.getTextValue(d),b.value=d):b.value=null;this._setOldValue(a,b)}},
_setOldValue:function(a,b){if(void 0===b||null===b)b=document.getElementById(a.getId()+"__inputElement");b&&(a._oldValue=b.value)},_setLabel:function(a,b){var d=amx.getTextValue(a.getAttribute("label")),e=document.getElementById(a.getId()+"__fieldLabel");e&&(e.removeChild(e.childNodes[0]),e.appendChild(document.createTextNode(d)));b&&b.setAttribute("aria-labelledby",d)}},image:{create:function(a){var b=document.createElement("img"),d=amx.getTextValue(a.getAttribute("source"));b.setAttribute("src",
amx.buildRelativePath(d));$(b).bind("error",this._handleError);a=a.getAttribute("shortDesc");null==a||""==a?(b.setAttribute("role","presentation"),b.setAttribute("aria-hidden","true"),b.setAttribute("alt","")):(b.setAttribute("role","image"),b.setAttribute("alt",a));return b},_handleError:function(a){a=a.target;$(a).unbind("error");a.setAttribute("data-original-src",a.getAttribute("src"));a.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAPAAAP+A/wAAACH5BAUAAAAALAAAAAABAAEAQAICRAEAOw==");adf.mf.internal.amx.addCSSClassName(a,
"amx-image-error")}},commandLink:{create:function(a){var b=document.createElement("a");b.setAttribute("role","link");var d=$(b);d.bind("click",function(a){a.stopPropagation();a.preventDefault()});amx.isValueTrue(a.getAttribute("disabled"))?(b.className="amx-disabled",b.setAttribute("aria-disabled","true")):amx.isValueTrue(a.getAttribute("readOnly"))?(b.className="amx-readOnly",b.setAttribute("aria-readonly","true")):b.setAttribute("href","#");d.tap(function(b){b.preventDefault();b.stopPropagation();
!amx.isValueTrue(a.getAttribute("disabled"))&&!amx.isValueTrue(a.getAttribute("readOnly"))&&amx.validate(d).done(function(){if(amx.acceptEvent()){var b=new amx.ActionEvent;amx.processAmxEvent(a,"action",void 0,void 0,b).always(function(){var b=a.getTag().getAttribute("action");null!=b&&adf.mf.api.amx.doNavigation(b)})}})});var e=a.getAttribute("text");if(null!=e){var g=document.createElement("label");g.appendChild(document.createTextNode(e));g.setAttribute("role","presentation");g.setAttribute("aria-hidden",
"true");b.setAttribute("aria-label",e);b.appendChild(g)}e=a.getAttribute("shortDesc");null!=e&&b.setAttribute("aria-label",e);amx.enableSwipe(d);amx.enableTapHold(d);d.append(a.renderSubNodes());return b}},commandButton:{create:function(a){var b=document.createElement("div");b.setAttribute("tabindex","0");var d=document.createElement("label");d.className="amx-commandButton-label";d.appendChild(document.createTextNode(amx.getTextValue(a.getAttribute("text"))));b.appendChild(d);b.setAttribute("role",
"button");"__back"==a.getTag().getAttribute("action")&&-1==adf.mf.internal.amx.getCSSClassNameIndex(a.getAttribute("styleClass"),"amx-commandButton-normal")&&adf.mf.internal.amx.addCSSClassName(b,"amx-commandButton-back");return b},init:function(a,b){if(b.getAttribute("icon")){if(-1<b.getAttribute("icon").indexOf(".")){var d=document.createElement("img");d.className="amx-commandButton-icon";d.setAttribute("src",amx.buildRelativePath(b.getAttribute("icon")));a.insertBefore(d,a.firstChild)}"trailing"==
b.getAttribute("iconPosition")?adf.mf.internal.amx.addCSSClassName(a,"amx-iconPosition-trailing"):adf.mf.internal.amx.addCSSClassName(a,"amx-iconPosition-leading")}for(var d=a.childNodes,e=d.length,g,h=0;h<e;h++){var k=d[h];if(-1!=adf.mf.internal.amx.getCSSClassNameIndex(k.className,"amx-commandButton-label")){g=k;break}}g=g.textContent;amx.isValueTrue(b.getAttribute("disabled"))&&(a.setAttribute("aria-disabled","true"),adf.mf.internal.amx.addCSSClassName(a,"amx-disabled"));""==g&&adf.mf.internal.amx.addCSSClassName(a,
"amx-label-no-text");var m=$(a);m.tap(function(a){a.preventDefault();a.stopPropagation();amx.isValueTrue(b.getAttribute("disabled"))||amx.validate(m).done(function(){if(amx.acceptEvent()){var a=new amx.ActionEvent;amx.processAmxEvent(b,"action",void 0,void 0,a).always(function(){var a=b.getTag().getAttribute("action");null!=a&&adf.mf.api.amx.doNavigation(a)})}})});amx.isValueTrue(b.getAttribute("disabled"))||(g="mousedown",d="mouseup",amx.hasTouch()&&(g="touchstart",d="touchend"),m.bind(g,function(){adf.mf.internal.amx.addCSSClassName(a,
"amx-selected");a.setAttribute("aria-pressed","true")}),m.bind(d,function(){adf.mf.internal.amx.removeCSSClassName(a,"amx-selected");a.setAttribute("aria-pressed","false")}),m.bind("mouseout",function(){adf.mf.internal.amx.removeCSSClassName(a,"amx-selected");a.setAttribute("aria-pressed","false")}))}}})})();