!function(t,e){"object"===typeofexports&&"object"===typeofmodule?module.exports=e():"function"===typeofdefine&&define.amd?define([],e):"object"===typeofexports?exports.SimpleKeyboard=e():t.SimpleKeyboard=e()}(this,function(){returnfunction(t){functione(o){if(n[o])returnn[o].exports;vari=n[o]={i:o,l:!1,exports:{}};returnt[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}varn={};returne.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){varn=t&&t.__esModule?function(){returnt.default}:function(){returnt};returne.d(n,"a",n),n},e.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});varo=n(2);e.default=o.a},function(t,e,n){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vari=n(3),a=(n.n(i),n(4)),s=n(5),r=n(6),u="function"===typeofSymbol&&"symbol"===typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"===typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},c=functiont(){vare=this;o(this,t),this.handleButtonClicked=function(t){varn=e.options.debug;if("{//}"===t)return!1;"function"===typeofe.options.onKeyPress&&e.options.onKeyPress(t),e.input[e.options.inputName]||(e.input[e.options.inputName]="");varo=e.utilities.getUpdatedInput(t,e.input[e.options.inputName],e.options,e.caretPosition);if(e.input[e.options.inputName]!==o){if(e.options.maxLength&&e.utilities.handleMaxLength(e.input,e.options,o))return!1;e.input[e.options.inputName]=o,n&&console.log("Input changed:",e.input),e.options.syncInstanceInputs&&e.syncInstanceInputs(e.input),"function"===typeofe.options.onChange&&e.options.onChange(e.input[e.options.inputName])}n&&console.log("Key pressed:",t)},this.syncInstanceInputs=function(){e.dispatch(function(t){t.replaceInput(e.input)})},this.clearInput=function(t){t=t||e.options.inputName,e.input[e.options.inputName]="",e.options.syncInstanceInputs&&e.syncInstanceInputs(e.input)},this.getInput=function(t){returnt=t||e.options.inputName,e.options.syncInstanceInputs&&e.syncInstanceInputs(e.input),e.input[e.options.inputName]},this.setInput=function(t,n){n=n||e.options.inputName,e.input[n]=t,e.options.syncInstanceInputs&&e.syncInstanceInputs(e.input)},this.replaceInput=function(t){e.input=t},this.setOptions=function(t){t=t||{},e.options=Object.assign(e.options,t),e.render()},this.clear=function(){e.keyboardDOM.innerHTML="",e.keyboardDOM.className=e.keyboardDOMClass,e.buttonElements={}},this.dispatch=function(t){if(!window.SimpleKeyboardInstances)throwconsole.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),newError("INSTANCES_VAR_ERROR");returnObject.keys(window.SimpleKeyboardInstances).forEach(function(e){t(window.SimpleKeyboardInstances[e],e)})},this.addButtonTheme=function(t,n){if(!n||!t)return!1;t.split(" ").forEach(function(o){n.split(" ").forEach(function(n){e.options.buttonTheme||(e.options.buttonTheme=[]);vari=!1;e.options.buttonTheme.map(function(t){if(t.class.split(" ").includes(n)){i=!0;vare=t.buttons.split(" ");e.includes(o)||(i=!0,e.push(o),t.buttons=e.join(" "))}returnt}),i||e.options.buttonTheme.push({class:n,buttons:t})})}),e.render()},this.removeButtonTheme=function(t,n){if(!t&&!n)returne.options.buttonTheme=[],e.render(),!1;if(t&&Array.isArray(e.options.buttonTheme)&&e.options.buttonTheme.length){t.split(" ").forEach(function(t,o){e.options.buttonTheme.map(function(o,i){if(n&&n.includes(o.class)||!n){vara=o.buttons.split(" ").filter(function(e){returne!==t});a.length?o.buttons=a.join(" "):(e.options.buttonTheme.splice(i,1),o=null)}returno})}),e.render()}},this.getButtonElement=function(t){varn=void0,o=e.buttonElements[t];returno&&(n=o.length>1?o:o[0]),n},this.handleCaret=function(){e.options.debug&&console.log("Caret handling started"),document.addEventListener("keyup",e.caretEventHandler),document.addEventListener("mouseup",e.c