(function(){function a(a){$.Deferred();var d=[];a.visitChildren(new adf.mf.api.amx.VisitContext,function(a,b){if(!b.isRendered())return adf.mf.api.amx.VisitResult.REJECT;if("amx:selectItem"==b.getTag().getPrefixedName())d.push({label:b.getAttribute("label"),value:b.getAttribute("value")});else if("amx:selectItems"==b.getTag().getPrefixedName()){var h;if(adf.mf.environment.profile.dtMode){h=[];for(var k=1;4>k;k++){var m=adf.mf.resource.getInfoString("AMXInfoBundle","amx_selectManyCheckbox_ITEM_LABEL",
k);m||(m="Item "+k);h.push({value:k,label:m})}}else h=b.getAttribute("value");k=adf.mf.internal.util.is_array(h);if(null!=h)for(var n in h){var o=h[n];k?(m=o.label,o=o.value):m=n;null!=m&&""!=m&&"."!=m.charAt(0)&&d.push({label:m,value:o})}}return adf.mf.api.amx.VisitResult.ACCEPT});return d}amx.registerRenderers("amx",{selectBooleanCheckbox:{createChildrenNodes:function(a){amx.registerInputValue(a,"value");return!1},create:function(a){var d=amx.createField(a),e=d.fieldRoot,g=amx.isValueTrue(a.getAttribute("value")),
h=d.isDisable;g?adf.mf.internal.amx.addCSSClassName(e,"on"):adf.mf.internal.amx.addCSSClassName(e,"off");var k=document.createElement("div");k.className="checkbox";k.setAttribute("role","checkbox");g?k.setAttribute("aria-checked","true"):k.setAttribute("aria-checked","false");!0==a.getAttribute("required")&&k.setAttribute("aria-required","true");var m=a.getId(),n=amx.isValueTrue(a.getAttribute("simple")),o=a.getAttribute("label"),q=m+"::txt";k.setAttribute("aria-labelledby",null!=o&&0<o.length&&!n?
m+"::lbl":q);m=document.createElement("div");m.className="img-check";k.appendChild(m);d.fieldValue.appendChild(k);a.getAttribute("text")&&(m=document.createElement("div"),m.setAttribute("id",q),m.className="checkbox-text",m.textContent=a.getAttribute("text"),d.fieldValue.appendChild(m));h&&(adf.mf.internal.amx.addCSSClassName(e,"amx-disabled"),k.setAttribute("aria-disabled","true"));d.isReadOnly&&k.setAttribute("aria-readonly","true");!d.isReadOnly&&!h&&$(k).tap(function(){if(amx.acceptEvent()){var d=
!g;a.setAttributeResolvedValue("value",d);var h=new amx.ValueChangeEvent(!d,d);amx.processAmxEvent(a,"valueChange","value",d,h);(g=!g)?(adf.mf.internal.amx.addCSSClassName(e,"on"),adf.mf.internal.amx.removeCSSClassName(e,"off")):(adf.mf.internal.amx.addCSSClassName(e,"off"),adf.mf.internal.amx.removeCSSClassName(e,"on"))}});adf.mf.api.amx.applyRequiredMarker(a,d);return e}},selectBooleanSwitch:{createChildrenNodes:function(a){amx.registerInputValue(a,"value");return!1},create:function(a){var d=amx.createField(a),
e=d.fieldRoot,g=amx.isValueTrue(a.getAttribute("value"));g?adf.mf.internal.amx.addCSSClassName(e,"on"):adf.mf.internal.amx.addCSSClassName(e,"off");d.isDisable&&adf.mf.internal.amx.addCSSClassName(e,"amx-disabled");var h=a.getAttribute("onLabel")||"ON",k=a.getAttribute("offLabel")||"OFF",m=document.createElement("div");if(d.isReadOnly)m.className="readOnlyLabel",m.textContent=g?amx.getTextValue(h):amx.getTextValue(k),d.fieldValue.appendChild(m);else{m.className="switch";d.fieldValue.appendChild(m);
var n=document.createElement("label");n.setAttribute("aria-hidden","true");n.className="label-on";n.textContent=amx.getTextValue(h);m.appendChild(n);h=document.createElement("label");h.setAttribute("aria-hidden","true");h.className="label-off";h.textContent=amx.getTextValue(k);m.appendChild(h);k=document.createElement("div");k.className="switch-button";k.setAttribute("role","checkbox");h=a.getId()+"::lbl";k.setAttribute("aria-labelledby",h);g?k.setAttribute("aria-checked","true"):k.setAttribute("aria-checked",
"false");d.isDisable&&k.setAttribute("aria-disabled","true");!0==a.getAttribute("required")&&k.setAttribute("aria-required","true");m.appendChild(k);d.isDisable||$(m).tap(function(){if(amx.acceptEvent()){var d=!g;a.setAttributeResolvedValue("value",d);var h=new amx.ValueChangeEvent(!d,d);amx.processAmxEvent(a,"valueChange","value",d,h);(g=!g)?(adf.mf.internal.amx.addCSSClassName(e,"on"),adf.mf.internal.amx.removeCSSClassName(e,"off")):(adf.mf.internal.amx.addCSSClassName(e,"off"),adf.mf.internal.amx.removeCSSClassName(e,
"on"))}})}adf.mf.api.amx.applyRequiredMarker(a,d);return e}},selectOneButton:{createChildrenNodes:function(a){amx.registerInputValue(a,"value");return!1},create:function(b){var d=amx.createField(b),e=d.fieldRoot,g,h=amx.isValueTrue(b.getAttribute("required"));d.isReadOnly?(g=document.createElement("div"),g.className="readOnlyLabel"):(g=document.createElement("div"),g.className="selectItemsContainer");d.fieldValue.appendChild(g);"vertical"===b.getAttribute("layout")&&adf.mf.internal.amx.addCSSClassName(e,
"vertical");g.setAttribute("role","listbox");g.setAttribute("aria-multiselectable","false");var k=b.getId()+"::lbl";g.setAttribute("aria-labelledby",k);d.isReadOnly&&g.setAttribute("aria-readOnly","true");h&&g.setAttribute("aria-required","true");d.isDisable&&(g.setAttribute("aria-disabled","true"),adf.mf.internal.amx.addCSSClassName(e,"amx-disabled"));d.isDisable||$(g).tap(".amx-selectItem",function(){if(amx.acceptEvent()&&!d.isReadOnly){var a,e=g.getElementsByClassName("amx-selected");0<e.length&&
(e=e[0],a=adf.mf.internal.amx._getNonPrimitiveElementData(e,"labelValue").value,adf.mf.internal.amx.removeCSSClassName(e,"amx-selected"));adf.mf.internal.amx.addCSSClassName(this,"amx-selected");e=adf.mf.internal.amx._getNonPrimitiveElementData(this,"labelValue").value;b.setAttributeResolvedValue("value",e);a=new amx.ValueChangeEvent(a,e);amx.processAmxEvent(b,"valueChange","value",e,a)}});var h=a(b),m;for(m in h)if(k=h[m],d.isReadOnly)b.getAttribute("value")==k.value&&(g.textContent=k.label);else{var n=
document.createElement("div");n.className="amx-selectItem";n.textContent=k.label;adf.mf.internal.amx._setNonPrimitiveElementData(n,"labelValue",k);"vertical"!==b.getAttribute("layout")&&(n.style.width=99/h.length+"%");n.setAttribute("role","option");g.appendChild(n);b.getAttribute("value")==k.value?(adf.mf.internal.amx.addCSSClassName(n,"amx-selected"),n.setAttribute("aria-selected","true")):n.setAttribute("aria-selected","false")}adf.mf.api.amx.applyRequiredMarker(b,d);return e}},selectOneRadio:{createChildrenNodes:function(a){amx.registerInputValue(a,
"value");return!1},create:function(b){var d=amx.createField(b),e=d.fieldRoot,g=document.createElement("div");g.className="selectItemsContainer";d.isReadOnly&&(g=document.createElement("div"),g.className="readOnlyLabel",g.setAttribute("aria-readonly","true"));d.fieldValue.appendChild(g);g.setAttribute("role","radiogroup");var h=b.getId()+"::lbl";g.setAttribute("aria-labelledby",h);d.isReadOnly&&g.setAttribute("aria-readOnly","true");amx.isValueTrue(b.getAttribute("required"))&&g.setAttribute("aria-required",
"true");d.isDisable&&(g.setAttribute("aria-disabled","true"),adf.mf.internal.amx.addCSSClassName(e,"amx-disabled"));!d.isDisable&&!d.isReadOnly&&$(g).tap(".amx-selectItem",function(){if(amx.acceptEvent()&&!d.isReadOnly){var a,e=g.getElementsByClassName("amx-selected");0<e.length&&(e=e[0],a=adf.mf.internal.amx._getNonPrimitiveElementData(e,"labelValue").value,adf.mf.internal.amx.removeCSSClassName(e,"amx-selected"),this.setAttribute("aria-checked","false"));adf.mf.internal.amx.addCSSClassName(this,
"amx-selected");this.setAttribute("aria-checked","true");e=adf.mf.internal.amx._getNonPrimitiveElementData(this,"labelValue").value;b.setAttributeResolvedValue("value",e);a=new amx.ValueChangeEvent(a,e);amx.processAmxEvent(b,"valueChange","value",e,a)}});var h=a(b),k;for(k in h){var m=h[k];if(d.isReadOnly)b.getAttribute("value")==m.value&&(g.textContent=m.label);else{var n=document.createElement("div");n.className="amx-selectItem";var o=document.createElement("div");o.className="radio";n.appendChild(o);
o.appendChild(document.createTextNode(m.label));var q=document.createElement("div");q.className="checkmark";o.appendChild(q);adf.mf.internal.amx._setNonPrimitiveElementData(n,"labelValue",m);g.appendChild(n);n.setAttribute("role","radio");b.getAttribute("value")==m.value?(adf.mf.internal.amx.addCSSClassName(n,"amx-selected"),n.setAttribute("aria-checked","true")):n.setAttribute("aria-checked",!1)}}adf.mf.api.amx.applyRequiredMarker(b,d);return e}},selectManyCheckbox:{createChildrenNodes:function(a){amx.registerInputValue(a,
"value");return!1},create:function(b){var d=amx.createField(b),e=d.fieldRoot,g=document.createElement("div");g.className="selectItemsContainer";d.isReadOnly&&(g=document.createElement("div"),g.className="readOnlyLabel");d.fieldValue.appendChild(g);d.isDisable&&adf.mf.internal.amx.addCSSClassName(e,"amx-disabled");d.isDisable||$(g).tap(".amx-selectItem",function(){if(amx.acceptEvent()&&!d.isReadOnly){for(var a=[],e=g.getElementsByClassName("amx-selected"),h=e.length,k=0;k<h;k++){var m=e[k],m=adf.mf.internal.amx._getNonPrimitiveElementData(m,
"labelValue").value;a.push(m)}var n=-1==adf.mf.internal.amx.getCSSClassNameIndex(this.className,"amx-selected");adf.mf.internal.amx.addOrRemoveCSSClassName(n,this,"amx-selected");n=[];e=g.getElementsByClassName("amx-selected");h=e.length;for(k=0;k<h;k++)m=e[k],m=adf.mf.internal.amx._getNonPrimitiveElementData(m,"labelValue").value,n.push(m);b.setAttributeResolvedValue("value",n);a=new amx.ValueChangeEvent(a,n);amx.processAmxEvent(b,"valueChange","value",n,a)}});var h=a(b),k;for(k in h){var m=h[k],
n=b.getAttribute("value");adf.mf.internal.util.is_array(n)||(n=Array(n));if(d.isReadOnly)0<n.indexOf(m.value)&&g.appendChild(document.createTextNode(", "+m.label)),0==n.indexOf(m.value)&&g.appendChild(document.createTextNode(m.label));else{var o=document.createElement("div");o.className="amx-selectItem";var q=document.createElement("div");q.className="checkbox";q.setAttribute("role","checkbox");(n=-1<n.indexOf(m.value))?q.setAttribute("aria-checked","true"):q.setAttribute("aria-checked","false");
!0==b.getAttribute("required")&&q.setAttribute("aria-required","true");d.isDisable&&q.setAttribute("aria-disabled","true");var s=b.getId()+":"+h.indexOf(m)+"::txt";q.setAttribute("aria-labelledby",s);o.appendChild(q);var t=document.createElement("div");t.className="img-check";q.appendChild(t);q=document.createElement("div");q.setAttribute("id",s);q.className="checkbox-text";o.appendChild(q);q.textContent=m.label;adf.mf.internal.amx._setNonPrimitiveElementData(o,"labelValue",m);g.appendChild(o);n&&
adf.mf.internal.amx.addCSSClassName(o,"amx-selected")}}adf.mf.api.amx.applyRequiredMarker(b,d);return e}},selectOneChoice:{createChildrenNodes:function(a){amx.registerInputValue(a,"value");return!1},create:function(b){var d=amx.createField(b),e=d.fieldRoot,g,h=amx.isValueTrue(b.getAttribute("required")),k=amx.isValueTrue(b.getAttribute("disabled")),m=amx.isValueTrue(b.getAttribute("readOnly")),n=a(b),k=k||0==n.length;g=m?document.createElement("div"):document.createElement("select");g.className="selectItemsContainer";
g.setAttribute("role","listbox");g.setAttribute("aria-multiselectable","false");var o=b.getId()+"::lbl";g.setAttribute("aria-labelledby",o);m&&g.setAttribute("aria-readOnly","true");h&&g.setAttribute("aria-required","true");k&&(g.setAttribute("aria-disabled","true"),g.setAttribute("disabled","true"));d.fieldValue.appendChild(g);adf.mf.internal.amx.registerFocus(g);adf.mf.internal.amx.registerBlur(g);$(g).bind("change",function(){if(amx.acceptEvent()&&!d.isReadOnly&&!k){var a=adf.mf.internal.amx._getNonPrimitiveElementData(this.options[this.selectedIndex],
"labelValue"),g=a.value,h=adf.mf.internal.amx._getNonPrimitiveElementData(e,"_oldValue");null==h&&(h=void 0);b.setAttributeResolvedValue("value",g);h=new amx.ValueChangeEvent(h,g);amx.processAmxEvent(b,"valueChange","value",g,h);adf.mf.internal.amx._setNonPrimitiveElementData(e,"_oldValue",a.value)}});for(var q in n)h=n[q],d.isReadOnly?b.getAttribute("value")==h.value&&(g.textContent=h.label):(m=document.createElement("option"),m.value=h.value,m.className="amx-selectItem",m.textContent=h.label,adf.mf.internal.amx._setNonPrimitiveElementData(m,
"labelValue",h),g.appendChild(m),m.setAttribute("role","option"),b.getAttribute("value")==h.value?(m.setAttribute("selected",!0),m.setAttribute("aria-selected",!0),adf.mf.internal.amx._setNonPrimitiveElementData(e,"_oldValue",h.value)):m.setAttribute("aria-selected",!1));amx.isValueFalse(b.getAttribute("isReadOnly"))&&(n=g.selectedIndex,0<n&&(g=adf.mf.internal.amx._getNonPrimitiveElementData(g.options[n],"labelValue"),adf.mf.internal.amx._setNonPrimitiveElementData(e,"_oldValue",g.value)));adf.mf.api.amx.applyRequiredMarker(b,
d);return e}},selectManyChoice:{createChildrenNodes:function(a){amx.registerInputValue(a,"value");return!1},create:function(b){if("Android"==adf.mf.internal.amx.agent.type){var d=amx.createField(b),e=d.fieldRoot,g=document.createElement("div"),h=document.createElement("span");this._updateText(h,b.getAttribute("value"),b);g.appendChild(h);adf.mf.internal.amx._setNonPrimitiveElementData(g,"value",b.getAttribute("value"));var k=amx.isValueTrue(b.getAttribute("disabled")),m=a(b);!1==k&&0==m.length&&(k=
!0,e.setAttribute("class",e.getAttribute("class")+" amx-disabled"));k&&e.setAttribute("aria-disabled","true");var n=b.getAttribute("readOnly");if(amx.isValueTrue(n))g.setAttribute("class","amx-selectManyChoice-root-readOnly"),h.setAttribute("class","amx-selectManyChoice-text-readOnly");else{g.setAttribute("class","amx-selectManyChoice-root");h.setAttribute("class","amx-selectManyChoice-text");h=document.createElement("div");h.setAttribute("class","amx-selectManyChoice-iconWrapper");n=document.createElement("div");
n.setAttribute("class","amx-selectManyChoice-iconStyle");n.textContent="...";g.appendChild(h);h.appendChild(n);var o=function(a,d,e){for(var g in d){var h=d[g],k=document.createElement("div");k.setAttribute("class","amx-selectManyChoice-picker-item");var m=document.createElement("div");m.textContent=h.label;m.setAttribute("class","amx-selectManyChoice-picker-item-centered-label");var n=document.createElement("div");n.setAttribute("class","amx-selectManyChoice-picker-item-checkmark");if(null==e||-1==
e.indexOf(h.value))n.style.display="none";k.appendChild(m);k.appendChild(n);adf.mf.internal.amx._setNonPrimitiveElementData(k,"itemValue",h.value);$(k).tap(function(){adf.mf.internal.amx._getNonPrimitiveElementData(this,"itemValue");b.getAttribute("value");var a=this.children[1];a.style.display="none"!==a.style.display?"none":""},!1);a.appendChild(k)}},q=function(){var a=document.createElement("div");a.setAttribute("class","amx-selectManyChoice-picker-modalOverlay");a.id="amx-selectManyChoice-picker-modalOverlay";
var d=document.createElement("div");d.setAttribute("class","amx-selectManyChoice-picker-wrapper");d.id="amx-selectManyChoice-picker-wrapper";var e=document.createElement("div");e.setAttribute("class","amx-selectManyChoice-picker-label");e.textContent=b.getAttribute("label");d.appendChild(e);var h=document.createElement("div");h.setAttribute("class","amx-selectManyChoice-picker-inner-container");e=adf.mf.internal.amx._getNonPrimitiveElementData(g,"value");o(h,m,e);d.appendChild(h);e=document.createElement("div");
e.setAttribute("class","amx-selectManyChoice-picker-button-set");e.textContent=adf.mf.resource.getInfoString("AMXInfoBundle","amx_selectManyChoice_LABEL_BUTTON_SET");$(e).tap(function(){for(var e=h.children,k=[],m=0;m<e.length;++m){var n=e[m];"none"!==n.children[1].style.display&&(n=adf.mf.internal.amx._getNonPrimitiveElementData(n,"itemValue"),k.push(n))}e=adf.mf.internal.amx._getNonPrimitiveElementData(g,"value");b.setAttributeResolvedValue("value",k);e=new amx.ValueChangeEvent(e,k);document.body.removeChild(a);
document.body.removeChild(d);amx.processAmxEvent(b,"valueChange","value",k,e);adf.mf.internal.amx._setNonPrimitiveElementData(g,"value",k)},!1);d.appendChild(e);e=document.createElement("div");e.setAttribute("class","amx-selectManyChoice-picker-button-cancel");e.textContent=adf.mf.resource.getInfoString("AMXInfoBundle","amx_selectManyChoice_LABEL_BUTTON_CANCEL");$(e).tap(function(){document.body.removeChild(a);document.body.removeChild(d)},!1);d.appendChild(e);e={};e.overlay=a;e.picker=d;return e};
$(g).tap(function(){if(!1==k){var a=q();document.body.appendChild(a.overlay);document.body.appendChild(a.picker)}},!1)}d.fieldValue.appendChild(g);return e}var d=amx.createField(b),e=d.fieldRoot,h=amx.isValueTrue(b.getAttribute("readOnly")),k=amx.isValueTrue(b.getAttribute("disabled")),s=amx.isValueTrue(b.getAttribute("required")),m=a(b),k=k||0==m.length,n=this._createSelectItemsContainer(h);n.setAttribute("role","listbox");n.setAttribute("aria-multiselectable","true");var t=b.getId()+"::lbl";n.setAttribute("aria-labelledby",
t);h&&n.setAttribute("aria-readonly","true");s&&n.setAttribute("aria-required","true");k&&(n.setAttribute("aria-disabled","true"),n.setAttribute("disabled","true"));d.fieldValue.appendChild(n);adf.mf.internal.amx.registerFocus(n);adf.mf.internal.amx.registerBlur(n);!0!=h&&!1==k&&$(n).bind("blur",{amxNode:b},this._handleBlur);s=b.getAttribute("value");adf.mf.internal.util.is_array(s)||(s=null==s?[]:Array(s));h?this._createReadOnlyDom(s,n,m):this._createEditableDom(s,n,m);adf.mf.api.amx.applyRequiredMarker(b,
d);return e},_updateText:function(b,d,e){if("undefined"===typeof d||null==d||!1==0<d.length)b.textContent="";else if(1==d.length){var e=a(e),g;for(g in e){var h=e[g];if(d[0]===h.value){b.textContent=h.label;break}}}else b.textContent=adf.mf.resource.getInfoString("AMXInfoBundle","amx_selectManyChoice_LABEL_SELECTED_ITEM_COUNT",d.length)},_createReadOnlyDom:function(a,d,e){var g=!0,h;for(h in e){var k=e[h];-1!=a.indexOf(k.value)&&(g?(g=!1,k=k.label):k=", "+k.label,d.appendChild(document.createTextNode(k)))}},
_createEditableDom:function(a,d,e){for(var g in e){var h=e[g],k=0<=a.indexOf(h.value),m=document.createElement("option");m.value=h.value;m.className="amx-selectItem";m.textContent=h.label;d.appendChild(m);m.setAttribute("role","option");k?(m.setAttribute("selected",!0),m.setAttribute("aria-selected",!0)):m.setAttribute("aria-selected",!1)}},_handleBlur:function(a){a=a.data.amxNode;if(amx.acceptEvent()){for(var d=[],e=0,g=this.options.length;e<g;++e){var h=this.options[e];h.selected&&d.push(h.getAttribute("value"))}e=
a.getAttribute("value");a.setAttributeResolvedValue("value",d);e=new amx.ValueChangeEvent(e,d);amx.processAmxEvent(a,"valueChange","value",d,e)}},_createSelectItemsContainer:function(a){a?(a=document.createElement("div"),a.className="selectItemsContainer"):(a=document.createElement("select"),a.className="selectItemsContainer",a.setAttribute("multiple","multiple"));return a}},selectItem:function(a){var d=document.createElement("label");d.setAttribute("for",a.getAttribute("value"));d.textContent=a.getAttribute("label");
return d}})})();