!function(l){l.jqx.jqxWidget("jqxMaskedInput","",{}),l.extend(l.jqx._jqxMaskedInput.prototype,{defineInstance:function(){var t={value:null,mask:"99999",width:200,height:25,textAlign:"left",readOnly:!1,cookies:!1,promptChar:"_",placeHolder:"",template:"",rtl:!1,disabled:!1,hint:!0,events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","change"],aria:{"aria-valuenow":{name:"value",type:"string"},"aria-disabled":{name:"disabled",type:"boolean"}}};return this===l.jqx._jqxMaskedInput.prototype||l.extend(!0,this,t),t},createInstance:function(){this.render()},render:function(){var a=this;a.element.setAttribute("role","textbox"),a.element.setAttribute("data-role","input"),a.host.addClass(a.toThemeProperty("jqx-maskedinput"));var t=a.element.getAttribute("value");void 0!==t&&""!==t&&null!==t&&(a.value=t),l.jqx.aria(this),l.jqx.aria(this,"aria-multiline",!1),l.jqx.aria(this,"aria-readonly",a.readOnly),a._helpers=[],a._helpers.element=new jqxHelper(a.element),a._helpers.element.addClass(a.toThemeProperty("jqx-input jqx-input-widget jqx-rc-all jqx-widget jqx-widget-content"));var e=a.element.getAttribute("name");"div"===a.element.nodeName.toLowerCase()?(a.element.innerHTML="",(t=document.createElement("input")).setAttribute("type","textarea"),t.setAttribute("autocomplete","off"),t.setAttribute("autocorrect","off"),t.setAttribute("autocapitalize","off"),t.setAttribute("spellcheck",!1),t.setAttribute("name",e),a.element.appendChild(t),a.maskbox=l(t),a.disabled&&(a._helpers.element.addClass(a.toThemeProperty("jqx-input-disabled jqx-fill-state-disabled")),t.setAttribute("disabled",!0))):(a.maskbox=a.host,a.element.setAttribute("autocomplete","off"),a.element.setAttribute("autocorrect","off"),a.element.setAttribute("autocapitalize","off"),a.element.setAttribute("spellcheck",!1),a.element.setAttribute("name",e),a.disabled&&(a._helpers.element.addClass(a.toThemeProperty("jqx-input-disabled jqx-fill-state-disabled")),a.element.setAttribute("disabled",!0))),a._helpers.maskbox=new jqxHelper(a.maskbox[0]),a._helpers.maskbox.addClass(a.toThemeProperty("jqx-reset jqx-input-content jqx-widget-content")),a.rtl&&a._helpers.maskbox.addClass(a.toThemeProperty("jqx-rtl")),a.propertyChangeMap.disabled=function(t,e,i,s){s?t._helpers.maskbox.addClass(a.toThemeProperty("jqx-input-disabled")):t._helpers.maskbox.removeClass(a.toThemeProperty("jqx-input-disabled"))},a.selectedText="",a.self=this,a.oldValue=a._value(),a.items=[],a._initializeLiterals(),a._render(),null!=a.value&&a.inputValue(a.value.toString()),0")).val(i),l("body").append(t),t.select(),setTimeout(function(){document.designMode="off",t.select(),t.remove()},100)),i},_pasteSelectedText:function(){function e(t){if(!(t!==h.selectedText&&0"),l("body").append(s),s.select(),setTimeout(function(){var t=s.val();e(t),s.remove()},100))},_handleKeyDown:function(t,e){var i,s=this._selection();96<=e&&e<=105&&(e-=48);var a=t.ctrlKey||t.metaKey;if(a&&97===e||a&&65===e)return!0;if(a&&120===e||a&&88===e)return this.selectedText=this._saveSelectedText(t),this._deleteSelectedText(t),!l.jqx.browser.msie;if(a&&99===e||a&&67===e)return this.selectedText=this._saveSelectedText(t),!l.jqx.browser.msie;if(a&&122===e||a&&90===e)return!1;if(a&&118===e||a&&86===e||t.shiftKey&&45===e)return this._pasteSelectedText(),!l.jqx.browser.msie;if(8===e){if(0===s.length)for(i=this.items.length-1;0<=i;i--)if(this.items[i].canEdit&&i=s.start&&this.items[i].character!==this.promptChar){this._setSelection(i,i+1);break}t=s;return(0<=(s=this._selection()).start||0<=s.length)&&s.start")).addClass(r.toThemeProperty("jqx-input-group jqx-maskedinput")),this.host.after(e),a=this.element,i=this.host.data(),e.append(a),s=l(""),e.append(a),a.addClass(r.toThemeProperty("jqx-input-bar")),e[0].id=this.element.id,this.element.removeAttribute("id"),this.element.setAttribute("hint",!0),e[0].style=this.element.style,r.input=r.element,this.input instanceof HTMLInputElement||(this.input=this.host.find("input"),0"),t.after(a),a.addClass(r.toThemeProperty("jqx-input-bar")),r.bar=a,r=this),r.template&&(r.bar.addClass(r.toThemeProperty("jqx-"+r.template)),r.label.addClass(r.toThemeProperty("jqx-"+r.template))))},_updateHint:function(){var t=this;t.hint&&t.isMaterialized()&&setTimeout(function(){0===t.maskbox[0].value.length?(t.element.removeAttribute("hint"),t.label[0].innerHTML=t.placeHolder):t.element.setAttribute("hint",!0)})},destroy:function(){l.jqx.utilities.resize(this.host,null,!0),this.host.remove(),this._helpers=[]},maskedValue:function(t){return void 0===t?this._value():(this.value=t,this._refreshValue(),this.oldValue!==t&&(this._raiseEvent(1,t),this.oldValue=t,this._raiseEvent(0,t)),this)},propertyChangedHandler:function(t,e,i,s){if(void 0!==this.isInitialized&&!1!==this.isInitialized){if("rtl"===e&&(t.rtl?t._helpers.maskbox.addClass(t.toThemeProperty("jqx-rtl")):t._helpers.maskbox.removeClass(t.toThemeProperty("jqx-rtl"))),"value"===e&&(null==s&&(s=""),""===s?this.clear():(s=s.toString(),this.inputValue(s)),t._raiseEvent(7,s)),"theme"===e&&l.jqx.utilities.setTheme(i,s,this.host),"disabled"===e&&(s?(t._helpers.maskbox.addClass(t.toThemeProperty("jqx-input-disabled")),t._helpers.element.addClass(t.toThemeProperty("jqx-fill-state-disabled")),t._helpers.maskbox.attr("disabled",!0)):(t._helpers.maskbox.removeClass(this.toThemeProperty("jqx-input-disabled")),t._helpers.element.removeClass(this.toThemeProperty("jqx-fill-state-disabled")),t._helpers.maskbox.attr("disabled",!1)),l.jqx.aria(t,"aria-disabled",s)),"readOnly"===e&&(this.readOnly=s),"promptChar"===e){for(var a=0;ae&&(this.items[i].canEdit&&this.items[i].character!==t[e]&&(!this._match(t[e],this.items[i].regex)&&t[e]!==this.promptChar||1!==t[e].length||(this.items[i].character=t[e])),e++);this.value=this._getString(),t=this.value,this.maskbox[0].value=t,l.jqx.aria(this,"aria-valuenow",t)}})}(jqxBaseFramework);