(function(){amx.registerRenderers("amx",{inputNumberSlider:{createChildrenNodes:function(a){amx.registerInputValue(a,"value");return!1},create:function(a){function b(b,d,e){e||(e=n.offsetWidth);isNaN(d)&&(d=a._min);d=Math.round(d/a._step)*a._step;d<=a._min&&(d=a._min);d>=a._max&&(d=a._max);var g=b.offsetWidth/2,e=(d-a._min)/(a._max-a._min)*e;"rtl"==document.documentElement.dir?b.style.right=e-g+"px":b.style.left=e-g+"px";t.style.width=e+"px";n.setAttribute("data-value",d);a._currentValue!=d&&(a._currentValue=
d)}var d=amx.createField(a),e=d.fieldRoot,g=d.isDisable,h=amx.isValueTrue(a.getAttribute("readOnly")),k=amx.isValueTrue(a.getAttribute("required")),m=document.createElement("div");m.className="container";d.fieldValue.appendChild(m);var n=document.createElement("div"),o=a.getId()+"::slider";n.setAttribute("id",o);n.className="slider";var q=document.createElement("div"),o=a.getId()+"::valveBg";q.setAttribute("id",o);q.className="valve-background";n.appendChild(q);o=document.createElement("div");o.className=
"valve";if(!h){o.setAttribute("role","slider");var s=a.getId()+"::lbl";o.setAttribute("aria-labelledby",s);o.setAttribute("aria-orientation","horizontal");o.setAttribute("aria-valuemin",a.getAttribute("minimum"));o.setAttribute("aria-valuemax",a.getAttribute("maximum"));o.setAttribute("aria-valuenow",a.getAttribute("value"));g&&o.setAttribute("aria-disabled","true");k&&o.setAttribute("aria-required","true")}q.appendChild(o);var t=document.createElement("div");t.className="selected";n.appendChild(t);
h&&adf.mf.internal.amx.addCSSClassName(e,"amx-readOnly");m.appendChild(n);h=a.getAttribute("minimum");null!=h&&!isNaN(h)?(n.setAttribute("data-min",h),a._min=1*h):(n.setAttribute("data-min",0),a._min=0);(h=a.getAttribute("maximum"))&&!isNaN(h)?(n.setAttribute("data-max",h),a._max=1*h):(n.setAttribute("data-max",100),a._max=100);h=a.getAttribute("stepSize");null!=h?(n.setAttribute("step",h),a._step=h):(n.setAttribute("step",1),a._step=1);h=a.getAttribute("value");void 0!==h&&(n.setAttribute("data-value",
h),a._currentValue=1*h);g&&(adf.mf.internal.amx.addCSSClassName(e,"amx-disabled"),g=document.createElement("div"),g.className="disable",d.fieldValue.appendChild(g));adf.mf.api.amx.applyRequiredMarker(a,d);!g&&!d.isReadOnly&&(d=$(n),$(e),d.tap(function(d){if(void 0!=d.pageX)d=d.pageX;else if(d=d.originalEvent,d.touches&&0<d.touches.length)d=d.touches[0].pageX;else if(d.changedTouches&&0<d.changedTouches.length)d=d.changedTouches[0].pageX;else return;var e=adf.mf.internal.amx.getElementLeft(n),d=(d-
e)/n.offsetWidth;"rtl"==document.documentElement.dir&&(d=1-d);d=d*(a._max-a._min)+a._min;a._oldValue=a._currentValue;b(q,d);a.setAttributeResolvedValue("value",a._currentValue);d=new amx.ValueChangeEvent(a._oldValue,a._currentValue);amx.processAmxEvent(a,"valueChange","value",a._currentValue,d)}),d.drag(".valve-background",{start:function(b,d){b.preventDefault();b.stopPropagation();d.preventDefault=!0;d.stopPropagation=!0;a._oldValue=a._currentValue},drag:function(b,d){b.preventDefault();b.stopPropagation();
d.preventDefault=!0;d.stopPropagation=!0;var e="rtl"==document.documentElement.dir,g=parseInt(e?q.style.right:q.style.left,10),h=q.offsetWidth/2,g=g+(e?-d.deltaPageX:d.deltaPageX),k;g<-h?(g=-h,k=a._min):g>n.offsetWidth-h?(g=n.offsetWidth-h,k=a._max):(isNaN(k),k=(g+h)/n.offsetWidth*(a._max-a._min)+a._min,k=Math.round(k/a._step)*a._step);e?q.style.right=g+"px":q.style.left=g+"px";t.style.width=g+h+"px";n.setAttribute("data-value",k);a._currentValue!=k&&(a._currentValue=k)},end:function(d,e){d.preventDefault();
d.stopPropagation();e.preventDefault=!0;e.stopPropagation=!0;b(this,a._currentValue);a.setAttributeResolvedValue("value",a._currentValue);var g=new amx.ValueChangeEvent(a._oldValue,a._currentValue);amx.processAmxEvent(a,"valueChange","value",a._currentValue,g);a._oldValue=a._currentValue}}));a.setValue=b;return e},init:function(a,b){var d=b.getId(),e=document.getElementById(d+"::slider"),d=document.getElementById(d+"::valveBg");null!=e&&b.setValue(d,1*e.getAttribute("data-value"),e.offsetWidth);$(window).resize(b,
this._handleResize);$(a).resize(b,this._handleResize)},_handleResize:function(a){var a=a.data,b=a.getId(),d=document.getElementById(b+"::slider"),b=document.getElementById(b+"::valveBg");adf.mf.internal.amx.isAncestor(document.body,d)&&a.setValue(b,1*d.getAttribute("data-value"),d.offsetWidth)}}})})();