diff --git a/build/css/index.css b/build/css/index.css index 8ef1d82b3..7bed4db0e 100644 --- a/build/css/index.css +++ b/build/css/index.css @@ -1,6 +1,6 @@ /*! * - * react-simple-keyboard v2.0.36 + * react-simple-keyboard v2.1.1 * https://github.com/hodgef/react-simple-keyboard * * Copyright (c) Francisco Hodge (https://github.com/hodgef) @@ -11,7 +11,7 @@ */ /*! * - * simple-keyboard v2.26.24 + * simple-keyboard v2.27.1 * https://github.com/hodgef/simple-keyboard * * Copyright (c) Francisco Hodge (https://github.com/hodgef) diff --git a/build/css/index.css.map b/build/css/index.css.map index b7351b8f8..ff45e7bf9 100644 --- a/build/css/index.css.map +++ b/build/css/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["index.css","Keyboard.css"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAVF;;;;;;;;;;EAUE,CCVF,UAEE,QAAS,CACT,SACF,CAEA,iBACE,4GAC+C,CAC/C,UAAW,CACX,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,qBAAsB,CACtB,eAAgB,CAChB,yBACF,CAEA,yBACE,YACF,CAEA,0CACE,iBACF,CAMA,mGACE,gBACF,CAEA,wCACE,cACF,CAEA,8CACE,YACF,CAEA,4BACE,oBAAqB,CACrB,WAAY,CACZ,cACF,CAEA,iCACE,mBACF,CAKA,kCACE,+BAAoC,CACpC,WAAY,CACZ,iBACF,CAEA,6CACE,sCAA+C,CAC/C,WAAY,CACZ,iBAAkB,CAClB,qBAAsB,CACtB,WAAY,CACZ,eAAiB,CACjB,+BAAgC,CAChC,cAAe,CACf,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,yCACF,CAEA,6DACE,kBACF,CAGA,kCACE,cAAe,CACf,SAAU,CACV,iBACF,CAEA,+DACE,WAAY,CACZ,WAAY,CACZ,kBAAmB,CACnB,YAAa,CACb,sBACF,CAMA,oIACE,WACF,CAEA,+DACE,WACF,CAEA,2DACE,cACF,CAEA,yEACE,cACF,CAEA,+DACE,4BAAiC,CACjC,UACF,CAEA,+EACE,cACF,CAEA,4EACE,cACF","file":"index.css","sourcesContent":["/*!\n * \n * simple-keyboard v2.26.24\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\nbody,\nhtml {\n margin: 0;\n padding: 0;\n}\n\n.simple-keyboard {\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\n width: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n touch-action: manipulation;\n}\n\n.simple-keyboard .hg-row {\n display: flex;\n}\n\n.simple-keyboard .hg-row:not(:last-child) {\n margin-bottom: 5px;\n}\n\n.simple-keyboard .hg-row .hg-button:not(:last-child) {\n margin-right: 5px;\n}\n\n.simple-keyboard .hg-row .hg-button-container {\n margin-right: 5px;\n}\n\n.simple-keyboard .hg-row > div:last-child {\n margin-right: 0;\n}\n\n.simple-keyboard .hg-row .hg-button-container {\n display: flex;\n}\n\n.simple-keyboard .hg-button {\n display: inline-block;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.simple-keyboard .hg-button span {\n pointer-events: none;\n}\n\n/**\n * hg-theme-default theme\n */\n.simple-keyboard.hg-theme-default {\n background-color: rgba(0, 0, 0, 0.1);\n padding: 5px;\n border-radius: 5px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button {\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\n height: 40px;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 5px;\n background: white;\n border-bottom: 1px solid #b5b5b5;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-activeButton {\n background: #efefef;\n}\n\n/* When using option \"useButtonTag\" */\n.simple-keyboard button.hg-button {\n border-width: 0;\n outline: 0;\n font-size: inherit;\n}\n\n.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {\n width: 33.3%;\n height: 60px;\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {\n height: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {\n height: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {\n width: 105px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-com {\n max-width: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\n max-width: 45px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {\n background: rgba(5, 25, 70, 0.53);\n color: white;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\n max-width: 82px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\n max-width: 60px;\n}\n\n","body,\nhtml {\n margin: 0;\n padding: 0;\n}\n\n.simple-keyboard {\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\n width: 100%;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n touch-action: manipulation;\n}\n\n.simple-keyboard .hg-row {\n display: flex;\n}\n\n.simple-keyboard .hg-row:not(:last-child) {\n margin-bottom: 5px;\n}\n\n.simple-keyboard .hg-row .hg-button:not(:last-child) {\n margin-right: 5px;\n}\n\n.simple-keyboard .hg-row .hg-button-container {\n margin-right: 5px;\n}\n\n.simple-keyboard .hg-row > div:last-child {\n margin-right: 0;\n}\n\n.simple-keyboard .hg-row .hg-button-container {\n display: flex;\n}\n\n.simple-keyboard .hg-button {\n display: inline-block;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.simple-keyboard .hg-button span {\n pointer-events: none;\n}\n\n/**\n * hg-theme-default theme\n */\n.simple-keyboard.hg-theme-default {\n background-color: rgba(0, 0, 0, 0.1);\n padding: 5px;\n border-radius: 5px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button {\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\n height: 40px;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 5px;\n background: white;\n border-bottom: 1px solid #b5b5b5;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-activeButton {\n background: #efefef;\n}\n\n/* When using option \"useButtonTag\" */\n.simple-keyboard button.hg-button {\n border-width: 0;\n outline: 0;\n font-size: inherit;\n}\n\n.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {\n width: 33.3%;\n height: 60px;\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {\n height: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {\n height: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {\n width: 105px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-com {\n max-width: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\n max-width: 45px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {\n background: rgba(5, 25, 70, 0.53);\n color: white;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\n max-width: 82px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\n max-width: 60px;\n}\n"]} \ No newline at end of file +{"version":3,"sources":["index.css","Keyboard.css"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAVF;;;;;;;;;;EAUE,CCVF,UAEE,QAAS,CACT,SACF,CAEA,iBACE,4GAC+C,CAC/C,UAAW,CACX,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,qBAAsB,CACtB,eAAgB,CAChB,yBACF,CAEA,yBACE,YACF,CAEA,0CACE,iBACF,CAMA,mGACE,gBACF,CAEA,wCACE,cACF,CAEA,8CACE,YACF,CAEA,4BACE,oBAAqB,CACrB,WAAY,CACZ,cACF,CAEA,iCACE,mBACF,CAKA,kCACE,+BAAoC,CACpC,WAAY,CACZ,iBACF,CAEA,6CACE,sCAA+C,CAC/C,WAAY,CACZ,iBAAkB,CAClB,qBAAsB,CACtB,WAAY,CACZ,eAAiB,CACjB,+BAAgC,CAChC,cAAe,CACf,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,yCACF,CAEA,6DACE,kBACF,CAGA,kCACE,cAAe,CACf,SAAU,CACV,iBACF,CAEA,+DACE,WAAY,CACZ,WAAY,CACZ,kBAAmB,CACnB,YAAa,CACb,sBACF,CAMA,oIACE,WACF,CAEA,+DACE,WACF,CAEA,2DACE,cACF,CAEA,yEACE,cACF,CAEA,+DACE,4BAAiC,CACjC,UACF,CAEA,+EACE,cACF,CAEA,4EACE,cACF","file":"index.css","sourcesContent":["/*!\n * \n * simple-keyboard v2.27.1\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\nbody,\nhtml {\n margin: 0;\n padding: 0;\n}\n\n.simple-keyboard {\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\n width: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n touch-action: manipulation;\n}\n\n.simple-keyboard .hg-row {\n display: flex;\n}\n\n.simple-keyboard .hg-row:not(:last-child) {\n margin-bottom: 5px;\n}\n\n.simple-keyboard .hg-row .hg-button:not(:last-child) {\n margin-right: 5px;\n}\n\n.simple-keyboard .hg-row .hg-button-container {\n margin-right: 5px;\n}\n\n.simple-keyboard .hg-row > div:last-child {\n margin-right: 0;\n}\n\n.simple-keyboard .hg-row .hg-button-container {\n display: flex;\n}\n\n.simple-keyboard .hg-button {\n display: inline-block;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.simple-keyboard .hg-button span {\n pointer-events: none;\n}\n\n/**\n * hg-theme-default theme\n */\n.simple-keyboard.hg-theme-default {\n background-color: rgba(0, 0, 0, 0.1);\n padding: 5px;\n border-radius: 5px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button {\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\n height: 40px;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 5px;\n background: white;\n border-bottom: 1px solid #b5b5b5;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-activeButton {\n background: #efefef;\n}\n\n/* When using option \"useButtonTag\" */\n.simple-keyboard button.hg-button {\n border-width: 0;\n outline: 0;\n font-size: inherit;\n}\n\n.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {\n width: 33.3%;\n height: 60px;\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {\n height: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {\n height: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {\n width: 105px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-com {\n max-width: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\n max-width: 45px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {\n background: rgba(5, 25, 70, 0.53);\n color: white;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\n max-width: 82px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\n max-width: 60px;\n}\n\n","body,\nhtml {\n margin: 0;\n padding: 0;\n}\n\n.simple-keyboard {\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\n width: 100%;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n touch-action: manipulation;\n}\n\n.simple-keyboard .hg-row {\n display: flex;\n}\n\n.simple-keyboard .hg-row:not(:last-child) {\n margin-bottom: 5px;\n}\n\n.simple-keyboard .hg-row .hg-button:not(:last-child) {\n margin-right: 5px;\n}\n\n.simple-keyboard .hg-row .hg-button-container {\n margin-right: 5px;\n}\n\n.simple-keyboard .hg-row > div:last-child {\n margin-right: 0;\n}\n\n.simple-keyboard .hg-row .hg-button-container {\n display: flex;\n}\n\n.simple-keyboard .hg-button {\n display: inline-block;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.simple-keyboard .hg-button span {\n pointer-events: none;\n}\n\n/**\n * hg-theme-default theme\n */\n.simple-keyboard.hg-theme-default {\n background-color: rgba(0, 0, 0, 0.1);\n padding: 5px;\n border-radius: 5px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button {\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\n height: 40px;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 5px;\n background: white;\n border-bottom: 1px solid #b5b5b5;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-activeButton {\n background: #efefef;\n}\n\n/* When using option \"useButtonTag\" */\n.simple-keyboard button.hg-button {\n border-width: 0;\n outline: 0;\n font-size: inherit;\n}\n\n.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {\n width: 33.3%;\n height: 60px;\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {\n height: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {\n height: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {\n width: 105px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-button-com {\n max-width: 85px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\n max-width: 45px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {\n background: rgba(5, 25, 70, 0.53);\n color: white;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\n max-width: 82px;\n}\n\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\n max-width: 60px;\n}\n"]} \ No newline at end of file diff --git a/build/index.js b/build/index.js index d331a9e73..f822c9cdd 100644 --- a/build/index.js +++ b/build/index.js @@ -1,6 +1,6 @@ /*! * - * react-simple-keyboard v2.0.36 + * react-simple-keyboard v2.1.1 * https://github.com/hodgef/react-simple-keyboard * * Copyright (c) Francisco Hodge (https://github.com/hodgef) @@ -9,5 +9,5 @@ * LICENSE file in the root directory of this source tree. * */ -!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("react")):"function"===typeof define&&define.amd?define("ReactSimpleKeyboard",["react"],e):"object"===typeof exports?exports.ReactSimpleKeyboard=e(require("react")):t.ReactSimpleKeyboard=e(t.React)}(window,(function(t){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__webpack_require__.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)__webpack_require__.d(n,o,function(e){return t[e]}.bind(null,o));return n},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=2)}([function(e,n){e.exports=t},function(t,e,n){(function(t){var o,i,s,r,a=n(4);window,r=function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__webpack_require__.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"===a(t)&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)__webpack_require__.d(n,o,function(e){return t[e]}.bind(null,o));return n},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,e,n){t.exports=n(2)},function(t,e,n){},function(t,e,n){"use strict";function _typeof(t){return(_typeof="function"===typeof Symbol&&"symbol"===a(Symbol.iterator)?function(t){return a(t)}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":a(t)})(t)}function _defineProperties(t,e){for(var n=0;n0?s=this.removeAt(s,n,o):"{space}"===t?s=this.addStringAt(s," ",n,o):"{tab}"!==t||"boolean"===typeof i.tabCharOnTab&&!1===i.tabCharOnTab?"{enter}"!==t&&"{numpadenter}"!==t||!i.newLineOnEnter?t.includes("numpad")&&Number.isInteger(Number(t[t.length-2]))?s=this.addStringAt(s,t[t.length-2],n,o):"{numpaddivide}"===t?s=this.addStringAt(s,"/",n,o):"{numpadmultiply}"===t?s=this.addStringAt(s,"*",n,o):"{numpadsubtract}"===t?s=this.addStringAt(s,"-",n,o):"{numpadadd}"===t?s=this.addStringAt(s,"+",n,o):"{numpaddecimal}"===t?s=this.addStringAt(s,".",n,o):"{"===t||"}"===t?s=this.addStringAt(s,t,n,o):t.includes("{")||t.includes("}")||(s=this.addStringAt(s,t,n,o)):s=this.addStringAt(s,"\n",n,o):s=this.addStringAt(s,"\t",n,o),s}},{key:"updateCaretPos",value:function(t,e){var n=this.updateCaretPosAction(t,e);this.dispatch((function(t){t.caretPosition=n}))}},{key:"updateCaretPosAction",value:function(t,e){var n=this.getOptions(),o=this.getCaretPosition();return e?o>0&&(o-=t):o+=t,n.debug&&console.log("Caret at:",o,"(".concat(this.keyboardDOMClass,")")),o}},{key:"addStringAt",value:function(t,e,n,o){var i;return n||0===n?(i=[t.slice(0,n),e,t.slice(n)].join(""),this.isMaxLengthReached()||o&&this.updateCaretPos(e.length)):i=t+e,i}},{key:"removeAt",value:function(t,e,n){var o;if(0===this.getCaretPosition())return t;var i=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;return e&&e>=0?t.substring(e-2,e).match(i)?(o=t.substr(0,e-2)+t.substr(e),n&&this.updateCaretPos(2,!0)):(o=t.substr(0,e-1)+t.substr(e),n&&this.updateCaretPos(1,!0)):t.slice(-2).match(i)?(o=t.slice(0,-2),n&&this.updateCaretPos(2,!0)):(o=t.slice(0,-1),n&&this.updateCaretPos(1,!0)),o}},{key:"handleMaxLength",value:function(t,e){var n=this.getOptions(),o=n.maxLength,i=t[n.inputName],s=e.length-1>=o;if(e.length<=i.length)return!1;if(Number.isInteger(o))return n.debug&&console.log("maxLength (num) reached:",s),s?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if("object"===_typeof(o)){var r=i.length===o[n.inputName];return n.debug&&console.log("maxLength (obj) reached:",r),r?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return Boolean(this.maxLengthReached)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return window.PointerEvent}},{key:"camelCase",value:function(t){return!!t&&t.toLowerCase().trim().split(/[.\-_\s]/g).reduce((function(t,e){return e.length?t+e[0].toUpperCase()+e.slice(1):t}))}}])&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Utilities}();function PhysicalKeyboard_defineProperties(t,e){for(var n=0;n ? {shift}",".com @ {space}"]}}}])&&KeyboardLayout_defineProperties(t,e),KeyboardLayout}();function _toConsumableArray(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e1?n:n[0]),e}},{key:"inputPatternIsValid",value:function(t){var e,n=this.options.inputPattern;if((e=n instanceof RegExp?n:n[this.options.inputName])&&t){var o=e.test(t);return this.options.debug&&console.log('inputPattern ("'.concat(e,'"): ').concat(o?"passed":"did not pass!")),o}return!0}},{key:"setEventListeners",value:function(){!this.isFirstKeyboardInstance&&this.allKeyboardInstances||(this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")")),document.addEventListener("keyup",this.handleKeyUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd))}},{key:"handleKeyUp",value:function(t){this.caretEventHandler(t),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(t)}},{key:"handleKeyDown",value:function(t){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(t)}},{key:"handleMouseUp",value:function(t){this.caretEventHandler(t)}},{key:"handleTouchEnd",value:function(t){this.caretEventHandler(t)}},{key:"caretEventHandler",value:function(t){var e;t.target.tagName&&(e=t.target.tagName.toLowerCase()),this.dispatch((function(n){n.isMouseHold&&(n.isMouseHold=!1),"textarea"!==e&&"input"!==e||n.options.disableCaretPositioning?n.options.disableCaretPositioning&&(n.caretPosition=null):(n.caretPosition=t.target.selectionStart,n.options.debug&&console.log("Caret at: ",t.target.selectionStart,t.target.tagName.toLowerCase(),"(".concat(n.keyboardDOMClass,")")))}))}},{key:"destroy",value:function(){document.removeEventListener("keyup",this.handleKeyUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),this.clear()}},{key:"getButtonThemeClasses",value:function(t){var e=this.options.buttonTheme,n=[];return Array.isArray(e)&&e.forEach((function(e){if(e.class&&"string"===typeof e.class&&e.buttons&&"string"===typeof e.buttons){var o=e.class.split(" ");e.buttons.split(" ").includes(t)&&(n=[].concat(_toConsumableArray(n),_toConsumableArray(o)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',e)})),n}},{key:"setDOMButtonAttributes",value:function(t,e){var n=this.options.buttonAttributes;Array.isArray(n)&&n.forEach((function(n){n.attribute&&"string"===typeof n.attribute&&n.value&&"string"===typeof n.value&&n.buttons&&"string"===typeof n.buttons?n.buttons.split(" ").includes(t)&&e(n.attribute,n.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',n)}))}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(t){if(t.target.classList.contains("hg-button"))return t.preventDefault(),t.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),"function"===typeof this.options.onInit&&this.options.onInit()}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),"function"===typeof this.options.beforeFirstRender&&this.options.beforeFirstRender(),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){"function"===typeof this.options.beforeRender&&this.options.beforeRender()}},{key:"onRender",value:function(){"function"===typeof this.options.onRender&&this.options.onRender()}},{key:"onModulesLoaded",value:function(){"function"===typeof this.options.onModulesLoaded&&this.options.onModulesLoaded()}},{key:"loadModules",value:function(){var t=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach((function(e){var n=new e;if(n.constructor.name&&"Function"!==n.constructor.name){var o="module-".concat(t.utilities.camelCase(n.constructor.name));t.keyboardPluginClasses=t.keyboardPluginClasses+" ".concat(o)}n.init(t)})),this.keyboardPluginClasses=this.keyboardPluginClasses+" modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(t,e){return!!this.modules[t]&&this.modules[t][e]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(t,e,n,o){var i=this,s=Array.from(t.children),r=0;return s.length&&n.forEach((function(n,a){var u=o[a];if(!u||!(u>n))return!1;var c=n-r,l=u-r,p=document.createElement("div");p.className+="hg-button-container";var d="".concat(i.options.layoutName,"-r").concat(e,"c").concat(a);p.setAttribute("data-skUID",d);var h=s.splice(c,l-c+1);r=l-c,h.forEach((function(t){return p.appendChild(t)})),s.splice(c,0,p),t.innerHTML="",s.forEach((function(e){return t.appendChild(e)})),i.options.debug&&console.log("rowDOMContainer",h,c,l,r+1)})),t}},{key:"render",value:function(){var t=this;this.clear(),this.initialized||this.beforeFirstRender(),this.beforeRender();var e="hg-layout-".concat(this.options.layoutName),n=this.options.layout||s.getDefaultLayout(),o=this.options.useTouchEvents||!1,i=o?"hg-touch-events":"",r=this.options.useMouseEvents||!1,a=this.options.disableRowButtonContainers;this.keyboardDOM.className+=" ".concat(this.options.theme," ").concat(e," ").concat(this.keyboardPluginClasses," ").concat(i),n[this.options.layoutName].forEach((function(e,n){var i=e.split(" "),s=document.createElement("div");s.className+="hg-row";var u=[],c=[];i.forEach((function(e,i){var l,p=!a&&e.includes("[")&&e.length>1,d=!a&&e.includes("]")&&e.length>1;p&&(u.push(i),e=e.replace(/\[/g,"")),d&&(c.push(i),e=e.replace(/\]/g,""));var h=t.utilities.getButtonClass(e),f=t.utilities.getButtonDisplayName(e,t.options.display,t.options.mergeDisplay),y=t.options.useButtonTag?"button":"div",b=document.createElement(y);b.className+="hg-button ".concat(h),(l=b.classList).add.apply(l,_toConsumableArray(t.getButtonThemeClasses(e))),t.setDOMButtonAttributes(e,(function(t,e){b.setAttribute(t,e)})),!t.utilities.pointerEventsSupported()||o||r?o?(b.ontouchstart=function(n){b.classList.add("hg-activeButton"),t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},b.ontouchend=function(){b.classList.remove("hg-activeButton"),t.handleButtonMouseUp(e)},b.ontouchcancel=function(){b.classList.remove("hg-activeButton"),t.handleButtonMouseUp(e)}):(b.onclick=function(){t.isMouseHold=!1,t.handleButtonClicked(e)},b.onmousedown=function(n){b.classList.add("hg-activeButton"),t.handleButtonMouseDown(e,n)},b.onmouseup=function(){b.classList.remove("hg-activeButton"),t.handleButtonMouseUp(e)}):(b.onpointerdown=function(n){b.classList.add("hg-activeButton"),t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},b.onpointerup=function(){b.classList.remove("hg-activeButton"),t.handleButtonMouseUp(e)},b.onpointercancel=function(){b.classList.remove("hg-activeButton"),t.handleButtonMouseUp(e)}),b.setAttribute("data-skBtn",e);var m="".concat(t.options.layoutName,"-r").concat(n,"b").concat(i);b.setAttribute("data-skBtnUID",m);var g=document.createElement("span");g.innerHTML=f,b.appendChild(g),t.buttonElements[e]||(t.buttonElements[e]=[]),t.buttonElements[e].push(b),s.appendChild(b)})),s=t.parseRowDOMContainers(s,n,u,c),t.keyboardDOM.appendChild(s)})),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||o||r?o?(document.ontouchend=function(){return t.handleButtonMouseUp()},document.ontouchcancel=function(){return t.handleButtonMouseUp()},this.keyboardDOM.ontouchstart=function(e){return t.handleKeyboardContainerMouseDown(e)}):o||(document.onmouseup=function(){return t.handleButtonMouseUp()},this.keyboardDOM.onmousedown=function(e){return t.handleKeyboardContainerMouseDown(e)}):(document.onpointerup=function(){return t.handleButtonMouseUp()},this.keyboardDOM.onpointerdown=function(e){return t.handleKeyboardContainerMouseDown(e)}),this.onInit())}}])&&Keyboard_defineProperties(t.prototype,e),SimpleKeyboard}();e.default=r}])},"object"===a(e)&&"object"===a(t)?t.exports=r():(i=[],void 0===(s="function"===typeof(o=r)?o.apply(e,i):o)||(t.exports=s))}).call(this,n(3)(t))},function(t,e,n){t.exports=n(6)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function _typeof2(t){return(_typeof2="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _typeof(e){return"function"===typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?t.exports=_typeof=function(t){return _typeof2(t)}:t.exports=_typeof=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":_typeof2(t)},_typeof(e)}t.exports=_typeof},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var o=n(0),i=n.n(o),s=n(1),r=n.n(s);function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(t){for(var e=1;e0?s=this.removeAt(s,n,o):"{space}"===t?s=this.addStringAt(s," ",n,o):"{tab}"!==t||"boolean"===typeof i.tabCharOnTab&&!1===i.tabCharOnTab?"{enter}"!==t&&"{numpadenter}"!==t||!i.newLineOnEnter?t.includes("numpad")&&Number.isInteger(Number(t[t.length-2]))?s=this.addStringAt(s,t[t.length-2],n,o):"{numpaddivide}"===t?s=this.addStringAt(s,"/",n,o):"{numpadmultiply}"===t?s=this.addStringAt(s,"*",n,o):"{numpadsubtract}"===t?s=this.addStringAt(s,"-",n,o):"{numpadadd}"===t?s=this.addStringAt(s,"+",n,o):"{numpaddecimal}"===t?s=this.addStringAt(s,".",n,o):"{"===t||"}"===t?s=this.addStringAt(s,t,n,o):t.includes("{")||t.includes("}")||(s=this.addStringAt(s,t,n,o)):s=this.addStringAt(s,"\n",n,o):s=this.addStringAt(s,"\t",n,o),s}},{key:"updateCaretPos",value:function(t,e){var n=this.updateCaretPosAction(t,e);this.dispatch((function(t){t.caretPosition=n}))}},{key:"updateCaretPosAction",value:function(t,e){var n=this.getOptions(),o=this.getCaretPosition();return e?o>0&&(o-=t):o+=t,n.debug&&console.log("Caret at:",o,"(".concat(this.keyboardDOMClass,")")),o}},{key:"addStringAt",value:function(t,e,n,o){var i;return n||0===n?(i=[t.slice(0,n),e,t.slice(n)].join(""),this.isMaxLengthReached()||o&&this.updateCaretPos(e.length)):i=t+e,i}},{key:"removeAt",value:function(t,e,n){var o;if(0===this.getCaretPosition())return t;var i=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;return e&&e>=0?t.substring(e-2,e).match(i)?(o=t.substr(0,e-2)+t.substr(e),n&&this.updateCaretPos(2,!0)):(o=t.substr(0,e-1)+t.substr(e),n&&this.updateCaretPos(1,!0)):t.slice(-2).match(i)?(o=t.slice(0,-2),n&&this.updateCaretPos(2,!0)):(o=t.slice(0,-1),n&&this.updateCaretPos(1,!0)),o}},{key:"handleMaxLength",value:function(t,e){var n=this.getOptions(),o=n.maxLength,i=t[n.inputName],s=e.length-1>=o;if(e.length<=i.length)return!1;if(Number.isInteger(o))return n.debug&&console.log("maxLength (num) reached:",s),s?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if("object"===_typeof(o)){var r=i.length===o[n.inputName];return n.debug&&console.log("maxLength (obj) reached:",r),r?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return Boolean(this.maxLengthReached)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return window.PointerEvent}},{key:"camelCase",value:function(t){return!!t&&t.toLowerCase().trim().split(/[.\-_\s]/g).reduce((function(t,e){return e.length?t+e[0].toUpperCase()+e.slice(1):t}))}}])&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Utilities}();function PhysicalKeyboard_defineProperties(t,e){for(var n=0;n ? {shift}",".com @ {space}"]}}}])&&KeyboardLayout_defineProperties(t,e),KeyboardLayout}();function _toConsumableArray(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e1?n:n[0]),e}},{key:"inputPatternIsValid",value:function(t){var e,n=this.options.inputPattern;if((e=n instanceof RegExp?n:n[this.options.inputName])&&t){var o=e.test(t);return this.options.debug&&console.log('inputPattern ("'.concat(e,'"): ').concat(o?"passed":"did not pass!")),o}return!0}},{key:"setEventListeners",value:function(){!this.isFirstKeyboardInstance&&this.allKeyboardInstances||(this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")")),document.addEventListener("keyup",this.handleKeyUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd))}},{key:"handleKeyUp",value:function(t){this.caretEventHandler(t),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(t)}},{key:"handleKeyDown",value:function(t){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(t)}},{key:"handleMouseUp",value:function(t){this.caretEventHandler(t)}},{key:"handleTouchEnd",value:function(t){this.caretEventHandler(t)}},{key:"caretEventHandler",value:function(t){var e;t.target.tagName&&(e=t.target.tagName.toLowerCase()),this.dispatch((function(n){n.isMouseHold&&(n.isMouseHold=!1),"textarea"!==e&&"input"!==e||n.options.disableCaretPositioning?n.options.disableCaretPositioning&&(n.caretPosition=null):(n.caretPosition=t.target.selectionStart,n.options.debug&&console.log("Caret at: ",t.target.selectionStart,t.target.tagName.toLowerCase(),"(".concat(n.keyboardDOMClass,")")))}))}},{key:"recurseButtons",value:function(t){var e=this;if(!t)return!1;Object.keys(this.buttonElements).forEach((function(n){return e.buttonElements[n].forEach(t)}))}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName)),document.removeEventListener("keyup",this.handleKeyUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null;var deleteButton=function(t){t.onpointerdown=null,t.onpointerup=null,t.onpointercancel=null,t.ontouchstart=null,t.ontouchend=null,t.ontouchcancel=null,t.onclick=null,t.onmousedown=null,t.onmouseup=null,t.remove(),t=null};this.recurseButtons(deleteButton),this.buttonElements=null,this.recurseButtons=null,deleteButton=null,this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.keyboardDOM.remove(),this.keyboardDOM=null,window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName]}},{key:"getButtonThemeClasses",value:function(t){var e=this.options.buttonTheme,n=[];return Array.isArray(e)&&e.forEach((function(e){if(e.class&&"string"===typeof e.class&&e.buttons&&"string"===typeof e.buttons){var o=e.class.split(" ");e.buttons.split(" ").includes(t)&&(n=[].concat(_toConsumableArray(n),_toConsumableArray(o)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',e)})),n}},{key:"setDOMButtonAttributes",value:function(t,e){var n=this.options.buttonAttributes;Array.isArray(n)&&n.forEach((function(n){n.attribute&&"string"===typeof n.attribute&&n.value&&"string"===typeof n.value&&n.buttons&&"string"===typeof n.buttons?n.buttons.split(" ").includes(t)&&e(n.attribute,n.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',n)}))}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(t){if(t.target.classList.contains("hg-button"))return t.preventDefault(),t.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),"function"===typeof this.options.onInit&&this.options.onInit()}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),"function"===typeof this.options.beforeFirstRender&&this.options.beforeFirstRender(),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){"function"===typeof this.options.beforeRender&&this.options.beforeRender()}},{key:"onRender",value:function(){"function"===typeof this.options.onRender&&this.options.onRender()}},{key:"onModulesLoaded",value:function(){"function"===typeof this.options.onModulesLoaded&&this.options.onModulesLoaded()}},{key:"loadModules",value:function(){var t=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach((function(e){var n=new e;if(n.constructor.name&&"Function"!==n.constructor.name){var o="module-".concat(t.utilities.camelCase(n.constructor.name));t.keyboardPluginClasses=t.keyboardPluginClasses+" ".concat(o)}n.init(t)})),this.keyboardPluginClasses=this.keyboardPluginClasses+" modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(t,e){return!!this.modules[t]&&this.modules[t][e]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(t,e,n,o){var i=this,s=Array.from(t.children),r=0;return s.length&&n.forEach((function(n,a){var u=o[a];if(!u||!(u>n))return!1;var c=n-r,l=u-r,p=document.createElement("div");p.className+="hg-button-container";var d="".concat(i.options.layoutName,"-r").concat(e,"c").concat(a);p.setAttribute("data-skUID",d);var h=s.splice(c,l-c+1);r=l-c,h.forEach((function(t){return p.appendChild(t)})),s.splice(c,0,p),t.innerHTML="",s.forEach((function(e){return t.appendChild(e)})),i.options.debug&&console.log("rowDOMContainer",h,c,l,r+1)})),t}},{key:"render",value:function(){var t=this;this.clear(),this.initialized||this.beforeFirstRender(),this.beforeRender();var e="hg-layout-".concat(this.options.layoutName),n=this.options.layout||s.getDefaultLayout(),o=this.options.useTouchEvents||!1,i=o?"hg-touch-events":"",r=this.options.useMouseEvents||!1,a=this.options.disableRowButtonContainers;this.keyboardDOM.className+=" ".concat(this.options.theme," ").concat(e," ").concat(this.keyboardPluginClasses," ").concat(i),n[this.options.layoutName].forEach((function(e,n){var i=e.split(" "),s=document.createElement("div");s.className+="hg-row";var u=[],c=[];i.forEach((function(e,i){var l,p=!a&&e.includes("[")&&e.length>1,d=!a&&e.includes("]")&&e.length>1;p&&(u.push(i),e=e.replace(/\[/g,"")),d&&(c.push(i),e=e.replace(/\]/g,""));var h=t.utilities.getButtonClass(e),f=t.utilities.getButtonDisplayName(e,t.options.display,t.options.mergeDisplay),y=t.options.useButtonTag?"button":"div",b=document.createElement(y);b.className+="hg-button ".concat(h),(l=b.classList).add.apply(l,_toConsumableArray(t.getButtonThemeClasses(e))),t.setDOMButtonAttributes(e,(function(t,e){b.setAttribute(t,e)})),t.activeButtonClass="hg-activeButton",!t.utilities.pointerEventsSupported()||o||r?o?(b.ontouchstart=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},b.ontouchend=function(){t.handleButtonMouseUp(e)},b.ontouchcancel=function(){t.handleButtonMouseUp(e)}):(b.onclick=function(){t.isMouseHold=!1,t.handleButtonClicked(e)},b.onmousedown=function(n){t.handleButtonMouseDown(e,n)},b.onmouseup=function(){t.handleButtonMouseUp(e)}):(b.onpointerdown=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},b.onpointerup=function(){t.handleButtonMouseUp(e)},b.onpointercancel=function(){t.handleButtonMouseUp(e)}),b.setAttribute("data-skBtn",e);var m="".concat(t.options.layoutName,"-r").concat(n,"b").concat(i);b.setAttribute("data-skBtnUID",m);var g=document.createElement("span");g.innerHTML=f,b.appendChild(g),t.buttonElements[e]||(t.buttonElements[e]=[]),t.buttonElements[e].push(b),s.appendChild(b)})),s=t.parseRowDOMContainers(s,n,u,c),t.keyboardDOM.appendChild(s)})),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||o||r?o?(document.ontouchend=function(){return t.handleButtonMouseUp()},document.ontouchcancel=function(){return t.handleButtonMouseUp()},this.keyboardDOM.ontouchstart=function(e){return t.handleKeyboardContainerMouseDown(e)}):o||(document.onmouseup=function(){return t.handleButtonMouseUp()},this.keyboardDOM.onmousedown=function(e){return t.handleKeyboardContainerMouseDown(e)}):(document.onpointerup=function(){return t.handleButtonMouseUp()},this.keyboardDOM.onpointerdown=function(e){return t.handleKeyboardContainerMouseDown(e)}),this.onInit())}}])&&Keyboard_defineProperties(t.prototype,e),SimpleKeyboard}();e.default=r}])},"object"===a(e)&&"object"===a(t)?t.exports=r():(i=[],void 0===(s="function"===typeof(o=r)?o.apply(e,i):o)||(t.exports=s))}).call(this,n(3)(t))},function(t,e,n){t.exports=n(6)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function _typeof2(t){return(_typeof2="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _typeof(e){return"function"===typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?t.exports=_typeof=function(t){return _typeof2(t)}:t.exports=_typeof=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":_typeof2(t)},_typeof(e)}t.exports=_typeof},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var o=n(0),i=n.n(o),s=n(1),r=n.n(s);function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(t){for(var e=1;e 0 ? s = this.removeAt(s, n, o) : \"{space}\" === t ? s = this.addStringAt(s, \" \", n, o) : \"{tab}\" !== t || \"boolean\" === typeof i.tabCharOnTab && !1 === i.tabCharOnTab ? \"{enter}\" !== t && \"{numpadenter}\" !== t || !i.newLineOnEnter ? t.includes(\"numpad\") && Number.isInteger(Number(t[t.length - 2])) ? s = this.addStringAt(s, t[t.length - 2], n, o) : \"{numpaddivide}\" === t ? s = this.addStringAt(s, \"/\", n, o) : \"{numpadmultiply}\" === t ? s = this.addStringAt(s, \"*\", n, o) : \"{numpadsubtract}\" === t ? s = this.addStringAt(s, \"-\", n, o) : \"{numpadadd}\" === t ? s = this.addStringAt(s, \"+\", n, o) : \"{numpaddecimal}\" === t ? s = this.addStringAt(s, \".\", n, o) : \"{\" === t || \"}\" === t ? s = this.addStringAt(s, t, n, o) : t.includes(\"{\") || t.includes(\"}\") || (s = this.addStringAt(s, t, n, o)) : s = this.addStringAt(s, \"\\n\", n, o) : s = this.addStringAt(s, \"\\t\", n, o), s;\n }\n }, {\n key: \"updateCaretPos\",\n value: function value(t, e) {\n var n = this.updateCaretPosAction(t, e);\n this.dispatch(function (t) {\n t.caretPosition = n;\n });\n }\n }, {\n key: \"updateCaretPosAction\",\n value: function value(t, e) {\n var n = this.getOptions(),\n o = this.getCaretPosition();\n return e ? o > 0 && (o -= t) : o += t, n.debug && console.log(\"Caret at:\", o, \"(\".concat(this.keyboardDOMClass, \")\")), o;\n }\n }, {\n key: \"addStringAt\",\n value: function value(t, e, n, o) {\n var i;\n return n || 0 === n ? (i = [t.slice(0, n), e, t.slice(n)].join(\"\"), this.isMaxLengthReached() || o && this.updateCaretPos(e.length)) : i = t + e, i;\n }\n }, {\n key: \"removeAt\",\n value: function value(t, e, n) {\n var o;\n if (0 === this.getCaretPosition()) return t;\n var i = /([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g;\n return e && e >= 0 ? t.substring(e - 2, e).match(i) ? (o = t.substr(0, e - 2) + t.substr(e), n && this.updateCaretPos(2, !0)) : (o = t.substr(0, e - 1) + t.substr(e), n && this.updateCaretPos(1, !0)) : t.slice(-2).match(i) ? (o = t.slice(0, -2), n && this.updateCaretPos(2, !0)) : (o = t.slice(0, -1), n && this.updateCaretPos(1, !0)), o;\n }\n }, {\n key: \"handleMaxLength\",\n value: function value(t, e) {\n var n = this.getOptions(),\n o = n.maxLength,\n i = t[n.inputName],\n s = e.length - 1 >= o;\n if (e.length <= i.length) return !1;\n if (Number.isInteger(o)) return n.debug && console.log(\"maxLength (num) reached:\", s), s ? (this.maxLengthReached = !0, !0) : (this.maxLengthReached = !1, !1);\n\n if (\"object\" === _typeof(o)) {\n var a = i.length === o[n.inputName];\n return n.debug && console.log(\"maxLength (obj) reached:\", a), a ? (this.maxLengthReached = !0, !0) : (this.maxLengthReached = !1, !1);\n }\n }\n }, {\n key: \"isMaxLengthReached\",\n value: function value() {\n return Boolean(this.maxLengthReached);\n }\n }, {\n key: \"isTouchDevice\",\n value: function value() {\n return \"ontouchstart\" in window || navigator.maxTouchPoints;\n }\n }, {\n key: \"pointerEventsSupported\",\n value: function value() {\n return window.PointerEvent;\n }\n }, {\n key: \"camelCase\",\n value: function value(t) {\n return !!t && t.toLowerCase().trim().split(/[.\\-_\\s]/g).reduce(function (t, e) {\n return e.length ? t + e[0].toUpperCase() + e.slice(1) : t;\n });\n }\n }]) && _defineProperties(t.prototype, e), n && _defineProperties(t, n), Utilities;\n }();\n\n function PhysicalKeyboard_defineProperties(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var i = function () {\n function PhysicalKeyboard(t) {\n var e = t.dispatch,\n n = t.getOptions;\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, PhysicalKeyboard), this.dispatch = e, this.getOptions = n, o.bindMethods(PhysicalKeyboard, this);\n }\n\n var t, e, n;\n return t = PhysicalKeyboard, (e = [{\n key: \"handleHighlightKeyDown\",\n value: function value(t) {\n var e = this.getOptions(),\n n = this.getSimpleKeyboardLayoutKey(t);\n this.dispatch(function (t) {\n var o = t.getButtonElement(n) || t.getButtonElement(\"{\".concat(n, \"}\"));\n o && (o.style.backgroundColor = e.physicalKeyboardHighlightBgColor || \"#9ab4d0\", o.style.color = e.physicalKeyboardHighlightTextColor || \"white\");\n });\n }\n }, {\n key: \"handleHighlightKeyUp\",\n value: function value(t) {\n var e = this.getSimpleKeyboardLayoutKey(t);\n this.dispatch(function (t) {\n var n = t.getButtonElement(e) || t.getButtonElement(\"{\".concat(e, \"}\"));\n n && n.removeAttribute && n.removeAttribute(\"style\");\n });\n }\n }, {\n key: \"getSimpleKeyboardLayoutKey\",\n value: function value(t) {\n var e;\n return ((e = t.code.includes(\"Numpad\") || t.code.includes(\"Shift\") || t.code.includes(\"Space\") || t.code.includes(\"Backspace\") || t.code.includes(\"Control\") || t.code.includes(\"Alt\") || t.code.includes(\"Meta\") ? t.code : t.key) !== e.toUpperCase() || \"F\" === t.code[0] && Number.isInteger(Number(t.code[1])) && t.code.length <= 3) && (e = e.toLowerCase()), e;\n }\n }]) && PhysicalKeyboard_defineProperties(t.prototype, e), n && PhysicalKeyboard_defineProperties(t, n), PhysicalKeyboard;\n }();\n\n function KeyboardLayout_defineProperties(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var s = function () {\n function KeyboardLayout() {\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, KeyboardLayout);\n }\n\n var t, e, n;\n return t = KeyboardLayout, n = [{\n key: \"getDefaultLayout\",\n value: function value() {\n return {\n default: [\"` 1 2 3 4 5 6 7 8 9 0 - = {bksp}\", \"{tab} q w e r t y u i o p [ ] \\\\\", \"{lock} a s d f g h j k l ; ' {enter}\", \"{shift} z x c v b n m , . / {shift}\", \".com @ {space}\"],\n shift: [\"~ ! @ # $ % ^ & * ( ) _ + {bksp}\", \"{tab} Q W E R T Y U I O P { } |\", '{lock} A S D F G H J K L : \" {enter}', \"{shift} Z X C V B N M < > ? {shift}\", \".com @ {space}\"]\n };\n }\n }], (e = null) && KeyboardLayout_defineProperties(t.prototype, e), n && KeyboardLayout_defineProperties(t, n), KeyboardLayout;\n }();\n\n function _toConsumableArray(t) {\n return function (t) {\n if (Array.isArray(t)) {\n for (var e = 0, n = new Array(t.length); e < t.length; e++) {\n n[e] = t[e];\n }\n\n return n;\n }\n }(t) || function (t) {\n if (Symbol.iterator in Object(t) || \"[object Arguments]\" === Object.prototype.toString.call(t)) return Array.from(t);\n }(t) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }\n\n function Keyboard_typeof(t) {\n return (Keyboard_typeof = \"function\" === typeof Symbol && \"symbol\" === _typeof2(Symbol.iterator) ? function (t) {\n return _typeof2(t);\n } : function (t) {\n return t && \"function\" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : _typeof2(t);\n })(t);\n }\n\n function Keyboard_defineProperties(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n function _defineProperty(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n var a = function () {\n function SimpleKeyboard() {\n var t = this;\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, SimpleKeyboard), _defineProperty(this, \"getOptions\", function () {\n return t.options;\n }), _defineProperty(this, \"getCaretPosition\", function () {\n return t.caretPosition;\n }), _defineProperty(this, \"registerModule\", function (e, n) {\n t.modules[e] || (t.modules[e] = {}), n(t.modules[e]);\n });\n var e = \"string\" === typeof (arguments.length <= 0 ? void 0 : arguments[0]) ? arguments.length <= 0 ? void 0 : arguments[0] : \".simple-keyboard\",\n n = \"object\" === Keyboard_typeof(arguments.length <= 0 ? void 0 : arguments[0]) ? arguments.length <= 0 ? void 0 : arguments[0] : arguments.length <= 1 ? void 0 : arguments[1];\n if (n || (n = {}), this.utilities = new o({\n getOptions: this.getOptions,\n getCaretPosition: this.getCaretPosition,\n dispatch: this.dispatch\n }), this.caretPosition = null, this.keyboardDOM = document.querySelector(e), this.options = n, this.options.layoutName = this.options.layoutName || \"default\", this.options.theme = this.options.theme || \"hg-theme-default\", this.options.inputName = this.options.inputName || \"default\", this.options.preventMouseDownDefault = this.options.preventMouseDownDefault || !1, this.keyboardPluginClasses = \"\", o.bindMethods(SimpleKeyboard, this), this.input = {}, this.input[this.options.inputName] = \"\", this.keyboardDOMClass = e.split(\".\").join(\"\"), this.buttonElements = {}, window.SimpleKeyboardInstances || (window.SimpleKeyboardInstances = {}), window.SimpleKeyboardInstances[this.utilities.camelCase(this.keyboardDOMClass)] = this, this.allKeyboardInstances = window.SimpleKeyboardInstances, this.currentInstanceName = this.utilities.camelCase(this.keyboardDOMClass), this.keyboardInstanceNames = Object.keys(window.SimpleKeyboardInstances), this.isFirstKeyboardInstance = this.keyboardInstanceNames[0] === this.currentInstanceName, this.physicalKeyboard = new i({\n dispatch: this.dispatch,\n getOptions: this.getOptions\n }), !this.keyboardDOM) throw console.warn('\"'.concat(e, '\" was not found in the DOM.')), new Error(\"KEYBOARD_DOM_ERROR\");\n this.render(), this.modules = {}, this.loadModules();\n }\n\n var t, e, n;\n return t = SimpleKeyboard, (e = [{\n key: \"handleButtonClicked\",\n value: function value(t) {\n var e = this.options.debug;\n if (\"{//}\" === t) return !1;\n \"function\" === typeof this.options.onKeyPress && this.options.onKeyPress(t), this.input[this.options.inputName] || (this.input[this.options.inputName] = \"\");\n var n = this.utilities.getUpdatedInput(t, this.input[this.options.inputName], this.caretPosition);\n\n if (this.input[this.options.inputName] !== n && (!this.options.inputPattern || this.options.inputPattern && this.inputPatternIsValid(n))) {\n if (this.options.maxLength && this.utilities.handleMaxLength(this.input, n)) return !1;\n this.input[this.options.inputName] = this.utilities.getUpdatedInput(t, this.input[this.options.inputName], this.caretPosition, !0), e && console.log(\"Input changed:\", this.input), this.options.syncInstanceInputs && this.syncInstanceInputs(), \"function\" === typeof this.options.onChange && this.options.onChange(this.input[this.options.inputName]), \"function\" === typeof this.options.onChangeAll && this.options.onChangeAll(this.input);\n }\n\n e && console.log(\"Key pressed:\", t);\n }\n }, {\n key: \"handleButtonMouseDown\",\n value: function value(t, e) {\n var n = this;\n this.options.preventMouseDownDefault && e.preventDefault(), this.options.stopMouseDownPropagation && e.stopPropagation(), this.isMouseHold = !0, this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), this.holdTimeout && clearTimeout(this.holdTimeout), this.options.disableButtonHold || (this.holdTimeout = setTimeout(function () {\n !n.isMouseHold || (t.includes(\"{\") || t.includes(\"}\")) && \"{delete}\" !== t && \"{backspace}\" !== t && \"{bksp}\" !== t && \"{space}\" !== t && \"{tab}\" !== t || (n.options.debug && console.log(\"Button held:\", t), n.handleButtonHold(t, e)), clearTimeout(n.holdTimeout);\n }, 500));\n }\n }, {\n key: \"handleButtonMouseUp\",\n value: function value(t) {\n this.isMouseHold = !1, this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), t && \"function\" === typeof this.options.onKeyReleased && this.options.onKeyReleased(t);\n }\n }, {\n key: \"handleKeyboardContainerMouseDown\",\n value: function value(t) {\n this.options.preventMouseDownDefault && t.preventDefault();\n }\n }, {\n key: \"handleButtonHold\",\n value: function value(t) {\n var e = this;\n this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), this.holdInteractionTimeout = setTimeout(function () {\n e.isMouseHold ? (e.handleButtonClicked(t), e.handleButtonHold(t)) : clearTimeout(e.holdInteractionTimeout);\n }, 100);\n }\n }, {\n key: \"syncInstanceInputs\",\n value: function value() {\n var t = this;\n this.dispatch(function (e) {\n e.replaceInput(t.input), e.caretPosition = t.caretPosition;\n });\n }\n }, {\n key: \"clearInput\",\n value: function value(t) {\n t = t || this.options.inputName, this.input[t] = \"\", this.caretPosition = 0, this.options.syncInstanceInputs && this.syncInstanceInputs();\n }\n }, {\n key: \"getInput\",\n value: function value(t) {\n return t = t || this.options.inputName, this.options.syncInstanceInputs && this.syncInstanceInputs(), this.input[t];\n }\n }, {\n key: \"setInput\",\n value: function value(t, e) {\n e = e || this.options.inputName, this.input[e] = t, this.options.syncInstanceInputs && this.syncInstanceInputs();\n }\n }, {\n key: \"replaceInput\",\n value: function value(t) {\n this.input = t;\n }\n }, {\n key: \"setOptions\",\n value: function value(t) {\n t = t || {}, this.options = Object.assign(this.options, t), this.onSetOptions(t), this.render();\n }\n }, {\n key: \"onSetOptions\",\n value: function value(t) {\n t.inputName && (this.options.debug && console.log(\"inputName changed. caretPosition reset.\"), this.caretPosition = null);\n }\n }, {\n key: \"clear\",\n value: function value() {\n this.keyboardDOM.innerHTML = \"\", this.keyboardDOM.className = this.keyboardDOMClass, this.buttonElements = {};\n }\n }, {\n key: \"dispatch\",\n value: function value(t) {\n if (!window.SimpleKeyboardInstances) throw console.warn(\"SimpleKeyboardInstances is not defined. Dispatch cannot be called.\"), new Error(\"INSTANCES_VAR_ERROR\");\n return Object.keys(window.SimpleKeyboardInstances).forEach(function (e) {\n t(window.SimpleKeyboardInstances[e], e);\n });\n }\n }, {\n key: \"addButtonTheme\",\n value: function value(t, e) {\n var n = this;\n if (!e || !t) return !1;\n t.split(\" \").forEach(function (o) {\n e.split(\" \").forEach(function (e) {\n n.options.buttonTheme || (n.options.buttonTheme = []);\n var i = !1;\n n.options.buttonTheme.map(function (t) {\n if (t.class.split(\" \").includes(e)) {\n i = !0;\n var n = t.buttons.split(\" \");\n n.includes(o) || (i = !0, n.push(o), t.buttons = n.join(\" \"));\n }\n\n return t;\n }), i || n.options.buttonTheme.push({\n class: e,\n buttons: t\n });\n });\n }), this.render();\n }\n }, {\n key: \"removeButtonTheme\",\n value: function value(t, e) {\n var n = this;\n if (!t && !e) return this.options.buttonTheme = [], this.render(), !1;\n t && Array.isArray(this.options.buttonTheme) && this.options.buttonTheme.length && (t.split(\" \").forEach(function (t, o) {\n n.options.buttonTheme.map(function (o, i) {\n if (e && e.includes(o.class) || !e) {\n var s = o.buttons.split(\" \").filter(function (e) {\n return e !== t;\n });\n s.length ? o.buttons = s.join(\" \") : (n.options.buttonTheme.splice(i, 1), o = null);\n }\n\n return o;\n });\n }), this.render());\n }\n }, {\n key: \"getButtonElement\",\n value: function value(t) {\n var e,\n n = this.buttonElements[t];\n return n && (e = n.length > 1 ? n : n[0]), e;\n }\n }, {\n key: \"inputPatternIsValid\",\n value: function value(t) {\n var e,\n n = this.options.inputPattern;\n\n if ((e = n instanceof RegExp ? n : n[this.options.inputName]) && t) {\n var o = e.test(t);\n return this.options.debug && console.log('inputPattern (\"'.concat(e, '\"): ').concat(o ? \"passed\" : \"did not pass!\")), o;\n }\n\n return !0;\n }\n }, {\n key: \"setEventListeners\",\n value: function value() {\n !this.isFirstKeyboardInstance && this.allKeyboardInstances || (this.options.debug && console.log(\"Caret handling started (\".concat(this.keyboardDOMClass, \")\")), document.addEventListener(\"keyup\", this.handleKeyUp), document.addEventListener(\"keydown\", this.handleKeyDown), document.addEventListener(\"mouseup\", this.handleMouseUp), document.addEventListener(\"touchend\", this.handleTouchEnd));\n }\n }, {\n key: \"handleKeyUp\",\n value: function value(t) {\n this.caretEventHandler(t), this.options.physicalKeyboardHighlight && this.physicalKeyboard.handleHighlightKeyUp(t);\n }\n }, {\n key: \"handleKeyDown\",\n value: function value(t) {\n this.options.physicalKeyboardHighlight && this.physicalKeyboard.handleHighlightKeyDown(t);\n }\n }, {\n key: \"handleMouseUp\",\n value: function value(t) {\n this.caretEventHandler(t);\n }\n }, {\n key: \"handleTouchEnd\",\n value: function value(t) {\n this.caretEventHandler(t);\n }\n }, {\n key: \"caretEventHandler\",\n value: function value(t) {\n var e;\n t.target.tagName && (e = t.target.tagName.toLowerCase()), this.dispatch(function (n) {\n n.isMouseHold && (n.isMouseHold = !1), \"textarea\" !== e && \"input\" !== e || n.options.disableCaretPositioning ? n.options.disableCaretPositioning && (n.caretPosition = null) : (n.caretPosition = t.target.selectionStart, n.options.debug && console.log(\"Caret at: \", t.target.selectionStart, t.target.tagName.toLowerCase(), \"(\".concat(n.keyboardDOMClass, \")\")));\n });\n }\n }, {\n key: \"destroy\",\n value: function value() {\n document.removeEventListener(\"keyup\", this.handleKeyUp), document.removeEventListener(\"keydown\", this.handleKeyDown), document.removeEventListener(\"mouseup\", this.handleMouseUp), document.removeEventListener(\"touchend\", this.handleTouchEnd), this.clear();\n }\n }, {\n key: \"getButtonThemeClasses\",\n value: function value(t) {\n var e = this.options.buttonTheme,\n n = [];\n return Array.isArray(e) && e.forEach(function (e) {\n if (e.class && \"string\" === typeof e.class && e.buttons && \"string\" === typeof e.buttons) {\n var o = e.class.split(\" \");\n e.buttons.split(\" \").includes(t) && (n = [].concat(_toConsumableArray(n), _toConsumableArray(o)));\n } else console.warn('Incorrect \"buttonTheme\". Please check the documentation.', e);\n }), n;\n }\n }, {\n key: \"setDOMButtonAttributes\",\n value: function value(t, e) {\n var n = this.options.buttonAttributes;\n Array.isArray(n) && n.forEach(function (n) {\n n.attribute && \"string\" === typeof n.attribute && n.value && \"string\" === typeof n.value && n.buttons && \"string\" === typeof n.buttons ? n.buttons.split(\" \").includes(t) && e(n.attribute, n.value) : console.warn('Incorrect \"buttonAttributes\". Please check the documentation.', n);\n });\n }\n }, {\n key: \"onTouchDeviceDetected\",\n value: function value() {\n this.processAutoTouchEvents(), this.disableContextualWindow();\n }\n }, {\n key: \"disableContextualWindow\",\n value: function value() {\n window.oncontextmenu = function (t) {\n if (t.target.classList.contains(\"hg-button\")) return t.preventDefault(), t.stopPropagation(), !1;\n };\n }\n }, {\n key: \"processAutoTouchEvents\",\n value: function value() {\n this.options.autoUseTouchEvents && (this.options.useTouchEvents = !0, this.options.debug && console.log(\"autoUseTouchEvents: Touch device detected, useTouchEvents enabled.\"));\n }\n }, {\n key: \"onInit\",\n value: function value() {\n this.options.debug && console.log(\"\".concat(this.keyboardDOMClass, \" Initialized\")), this.setEventListeners(), \"function\" === typeof this.options.onInit && this.options.onInit();\n }\n }, {\n key: \"beforeFirstRender\",\n value: function value() {\n this.utilities.isTouchDevice() && this.onTouchDeviceDetected(), \"function\" === typeof this.options.beforeFirstRender && this.options.beforeFirstRender(), this.isFirstKeyboardInstance && this.utilities.pointerEventsSupported() && !this.options.useTouchEvents && !this.options.useMouseEvents && this.options.debug && console.log(\"Using PointerEvents as it is supported by this browser\"), this.options.useTouchEvents && this.options.debug && console.log(\"useTouchEvents has been enabled. Only touch events will be used.\");\n }\n }, {\n key: \"beforeRender\",\n value: function value() {\n \"function\" === typeof this.options.beforeRender && this.options.beforeRender();\n }\n }, {\n key: \"onRender\",\n value: function value() {\n \"function\" === typeof this.options.onRender && this.options.onRender();\n }\n }, {\n key: \"onModulesLoaded\",\n value: function value() {\n \"function\" === typeof this.options.onModulesLoaded && this.options.onModulesLoaded();\n }\n }, {\n key: \"loadModules\",\n value: function value() {\n var t = this;\n Array.isArray(this.options.modules) && (this.options.modules.forEach(function (e) {\n var n = new e();\n\n if (n.constructor.name && \"Function\" !== n.constructor.name) {\n var o = \"module-\".concat(t.utilities.camelCase(n.constructor.name));\n t.keyboardPluginClasses = t.keyboardPluginClasses + \" \".concat(o);\n }\n\n n.init(t);\n }), this.keyboardPluginClasses = this.keyboardPluginClasses + \" modules-loaded\", this.render(), this.onModulesLoaded());\n }\n }, {\n key: \"getModuleProp\",\n value: function value(t, e) {\n return !!this.modules[t] && this.modules[t][e];\n }\n }, {\n key: \"getModulesList\",\n value: function value() {\n return Object.keys(this.modules);\n }\n }, {\n key: \"parseRowDOMContainers\",\n value: function value(t, e, n, o) {\n var i = this,\n s = Array.from(t.children),\n a = 0;\n return s.length && n.forEach(function (n, r) {\n var u = o[r];\n if (!u || !(u > n)) return !1;\n var c = n - a,\n l = u - a,\n h = document.createElement(\"div\");\n h.className += \"hg-button-container\";\n var d = \"\".concat(i.options.layoutName, \"-r\").concat(e, \"c\").concat(r);\n h.setAttribute(\"data-skUID\", d);\n var p = s.splice(c, l - c + 1);\n a = l - c, p.forEach(function (t) {\n return h.appendChild(t);\n }), s.splice(c, 0, h), t.innerHTML = \"\", s.forEach(function (e) {\n return t.appendChild(e);\n }), i.options.debug && console.log(\"rowDOMContainer\", p, c, l, a + 1);\n }), t;\n }\n }, {\n key: \"render\",\n value: function value() {\n var t = this;\n this.clear(), this.initialized || this.beforeFirstRender(), this.beforeRender();\n var e = \"hg-layout-\".concat(this.options.layoutName),\n n = this.options.layout || s.getDefaultLayout(),\n o = this.options.useTouchEvents || !1,\n i = o ? \"hg-touch-events\" : \"\",\n a = this.options.useMouseEvents || !1,\n r = this.options.disableRowButtonContainers;\n this.keyboardDOM.className += \" \".concat(this.options.theme, \" \").concat(e, \" \").concat(this.keyboardPluginClasses, \" \").concat(i), n[this.options.layoutName].forEach(function (e, n) {\n var i = e.split(\" \"),\n s = document.createElement(\"div\");\n s.className += \"hg-row\";\n var u = [],\n c = [];\n i.forEach(function (e, i) {\n var l,\n h = !r && e.includes(\"[\") && e.length > 1,\n d = !r && e.includes(\"]\") && e.length > 1;\n h && (u.push(i), e = e.replace(/\\[/g, \"\")), d && (c.push(i), e = e.replace(/\\]/g, \"\"));\n var p = t.utilities.getButtonClass(e),\n f = t.utilities.getButtonDisplayName(e, t.options.display, t.options.mergeDisplay),\n y = t.options.useButtonTag ? \"button\" : \"div\",\n b = document.createElement(y);\n b.className += \"hg-button \".concat(p), (l = b.classList).add.apply(l, _toConsumableArray(t.getButtonThemeClasses(e))), t.setDOMButtonAttributes(e, function (t, e) {\n b.setAttribute(t, e);\n }), !t.utilities.pointerEventsSupported() || o || a ? o ? (b.ontouchstart = function (n) {\n b.classList.add(\"hg-activeButton\"), t.handleButtonClicked(e), t.handleButtonMouseDown(e, n);\n }, b.ontouchend = function () {\n b.classList.remove(\"hg-activeButton\"), t.handleButtonMouseUp(e);\n }, b.ontouchcancel = function () {\n b.classList.remove(\"hg-activeButton\"), t.handleButtonMouseUp(e);\n }) : (b.onclick = function () {\n t.isMouseHold = !1, t.handleButtonClicked(e);\n }, b.onmousedown = function (n) {\n b.classList.add(\"hg-activeButton\"), t.handleButtonMouseDown(e, n);\n }, b.onmouseup = function () {\n b.classList.remove(\"hg-activeButton\"), t.handleButtonMouseUp(e);\n }) : (b.onpointerdown = function (n) {\n b.classList.add(\"hg-activeButton\"), t.handleButtonClicked(e), t.handleButtonMouseDown(e, n);\n }, b.onpointerup = function () {\n b.classList.remove(\"hg-activeButton\"), t.handleButtonMouseUp(e);\n }, b.onpointercancel = function () {\n b.classList.remove(\"hg-activeButton\"), t.handleButtonMouseUp(e);\n }), b.setAttribute(\"data-skBtn\", e);\n var m = \"\".concat(t.options.layoutName, \"-r\").concat(n, \"b\").concat(i);\n b.setAttribute(\"data-skBtnUID\", m);\n var g = document.createElement(\"span\");\n g.innerHTML = f, b.appendChild(g), t.buttonElements[e] || (t.buttonElements[e] = []), t.buttonElements[e].push(b), s.appendChild(b);\n }), s = t.parseRowDOMContainers(s, n, u, c), t.keyboardDOM.appendChild(s);\n }), this.onRender(), this.initialized || (this.initialized = !0, !this.utilities.pointerEventsSupported() || o || a ? o ? (document.ontouchend = function () {\n return t.handleButtonMouseUp();\n }, document.ontouchcancel = function () {\n return t.handleButtonMouseUp();\n }, this.keyboardDOM.ontouchstart = function (e) {\n return t.handleKeyboardContainerMouseDown(e);\n }) : o || (document.onmouseup = function () {\n return t.handleButtonMouseUp();\n }, this.keyboardDOM.onmousedown = function (e) {\n return t.handleKeyboardContainerMouseDown(e);\n }) : (document.onpointerup = function () {\n return t.handleButtonMouseUp();\n }, this.keyboardDOM.onpointerdown = function (e) {\n return t.handleKeyboardContainerMouseDown(e);\n }), this.onInit());\n }\n }]) && Keyboard_defineProperties(t.prototype, e), n && Keyboard_defineProperties(t, n), SimpleKeyboard;\n }();\n\n e.default = a;\n }]);\n});","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","export const parseProps = props => ({\n ...props,\n theme: `simple-keyboard ${props.theme || \"hg-theme-default\"}`\n});\n\nexport const propsChanged = (prevProps, props) => {\n const cleanProps = sourceObj =>\n JSON.stringify({\n ...sourceObj,\n stateToIgnore: null\n });\n\n return cleanProps(props) !== cleanProps(prevProps);\n};\n","import React, { useEffect, useRef } from \"react\";\nimport Keyboard from \"simple-keyboard\";\nimport { parseProps, propsChanged } from \"../services/Utilities\";\nimport \"simple-keyboard/build/css/index.css\";\n\nconst KeyboardReact = props => {\n const cssClass = props.baseClass || \"react-simple-keyboard\";\n const initRef = useRef();\n const keyboardRef = useRef();\n const previousProps = useRef(props);\n\n useEffect(() => {\n /**\n * Initialize simple-keyboard\n */\n if (!initRef.current) {\n initRef.current = true;\n props.debug && console.log(\"ReactSimpleKeyboard: Init\");\n keyboardRef.current = new Keyboard(`.${cssClass}`, parseProps(props));\n props.keyboardRef && props.keyboardRef(keyboardRef.current);\n }\n\n /**\n * Only trigger render if props changed\n */\n if (propsChanged(previousProps.current, props)) {\n let keyboard = keyboardRef.current;\n previousProps.current = props;\n keyboard.setOptions(parseProps(props));\n props.debug && console.log(\"ReactSimpleKeyboard: Rendered\");\n }\n }, [initRef, cssClass, previousProps, props]);\n\n return
;\n};\n\nexport default KeyboardReact;\n","import Keyboard from \"./components/Keyboard\";\n\nexport default Keyboard;\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../../webpack/universalModuleDefinition","../../webpack/bootstrap","../../external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","../../node_modules/simple-keyboard/build/index.js","../../node_modules/webpack/buildin/module.js","../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/typeof.js","services/Utilities.js","components/Keyboard.js","index.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","e","_typeof2","default","_typeof","iterator","constructor","_defineProperties","length","configurable","writable","Utilities","getOptions","getCaretPosition","dispatch","TypeError","this","bindMethods","a","getOwnPropertyNames","next","done","u","return","includes","replace","concat","assign","getDefaultDiplay","removeAt","addStringAt","tabCharOnTab","newLineOnEnter","Number","isInteger","updateCaretPosAction","caretPosition","debug","console","log","keyboardDOMClass","slice","join","isMaxLengthReached","updateCaretPos","substring","match","substr","maxLength","inputName","maxLengthReached","Boolean","navigator","maxTouchPoints","PointerEvent","toLowerCase","trim","split","reduce","toUpperCase","PhysicalKeyboard_defineProperties","PhysicalKeyboard","getSimpleKeyboardLayoutKey","getButtonElement","style","backgroundColor","physicalKeyboardHighlightBgColor","color","physicalKeyboardHighlightTextColor","removeAttribute","code","KeyboardLayout_defineProperties","KeyboardLayout","shift","_toConsumableArray","Array","isArray","toString","from","Keyboard_typeof","Keyboard_defineProperties","_defineProperty","SimpleKeyboard","options","arguments","utilities","keyboardDOM","document","querySelector","layoutName","theme","preventMouseDownDefault","keyboardPluginClasses","input","buttonElements","SimpleKeyboardInstances","currentInstanceName","camelCase","allKeyboardInstances","keyboardInstanceNames","keys","isFirstKeyboardInstance","physicalKeyboard","warn","Error","render","loadModules","onKeyPress","getUpdatedInput","inputPattern","inputPatternIsValid","handleMaxLength","syncInstanceInputs","onChange","onChangeAll","preventDefault","stopMouseDownPropagation","stopPropagation","target","classList","add","activeButtonClass","isMouseHold","holdInteractionTimeout","clearTimeout","holdTimeout","disableButtonHold","setTimeout","handleButtonHold","recurseButtons","remove","onKeyReleased","handleButtonClicked","replaceInput","onSetOptions","innerHTML","className","forEach","buttonTheme","map","class","buttons","push","filter","splice","RegExp","test","addEventListener","handleKeyUp","handleKeyDown","handleMouseUp","handleTouchEnd","caretEventHandler","physicalKeyboardHighlight","handleHighlightKeyUp","handleHighlightKeyDown","tagName","disableCaretPositioning","selectionStart","removeEventListener","onpointerup","ontouchend","ontouchcancel","onmouseup","deleteButton","onpointerdown","onpointercancel","ontouchstart","onclick","onmousedown","buttonAttributes","attribute","processAutoTouchEvents","disableContextualWindow","oncontextmenu","contains","autoUseTouchEvents","useTouchEvents","setEventListeners","onInit","isTouchDevice","onTouchDeviceDetected","beforeFirstRender","pointerEventsSupported","useMouseEvents","beforeRender","onRender","onModulesLoaded","init","children","h","createElement","setAttribute","appendChild","clear","initialized","layout","getDefaultLayout","disableRowButtonContainers","getButtonClass","f","getButtonDisplayName","display","mergeDisplay","y","useButtonTag","b","apply","getButtonThemeClasses","setDOMButtonAttributes","handleButtonMouseDown","handleButtonMouseUp","g","parseRowDOMContainers","handleKeyboardContainerMouseDown","webpackPolyfill","deprecate","paths","obj","parseProps","props","KeyboardReact","cssClass","baseClass","initRef","useRef","keyboardRef","previousProps","useEffect","current","Keyboard","prevProps","cleanProps","sourceObj","JSON","stringify","stateToIgnore","propsChanged","keyboard","setOptions"],"mappings":";;;;;;;;;;;CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,UACR,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,sBAAuB,CAAC,SAAUJ,GACf,kBAAZC,QACdA,QAA6B,oBAAID,EAAQG,QAAQ,UAEjDJ,EAA0B,oBAAIC,EAAQD,EAAY,OARpD,CASGO,QAAQ,SAASC,GACpB,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHX,QAAS,IAUV,OANAY,EAAQH,GAAUI,KAAKZ,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,qBAG/DP,EAAOU,GAAI,EAGJV,EAAOD,QA0Df,OArDAQ,oBAAoBM,EAAIF,EAGxBJ,oBAAoBO,EAAIR,EAGxBC,oBAAoBQ,EAAI,SAAShB,EAASiB,EAAMC,GAC3CV,oBAAoBW,EAAEnB,EAASiB,IAClCG,OAAOC,eAAerB,EAASiB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,oBAAoBgB,EAAI,SAASxB,GACX,qBAAXyB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAerB,EAASyB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAerB,EAAS,aAAc,CAAE2B,OAAO,KAQvDnB,oBAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,oBAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAA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K,UACXL,EAAQK,SAAU,EAClBT,EAAMvL,OAASC,QAAQC,IAAI,6BAC3B2L,EAAYG,QAAU,IAAIC,IAAJ,WAAiBR,GAAYH,WAAWC,IAC9DA,EAAMM,aAAeN,EAAMM,YAAYA,EAAYG,UDd7B,SAACE,EAAWX,GACtC,IAAMY,WAAa,SAAAC,GAAS,OAC1BC,KAAKC,UAAL,iBACKF,EADL,CAEEG,cAAe,SAGnB,OAAOJ,WAAWZ,KAAWY,WAAWD,GCalCM,CAAaV,EAAcE,QAAST,GAAQ,CAC9C,IAAIkB,EAAWZ,EAAYG,QAC3BF,EAAcE,QAAUT,EACxBkB,EAASC,WAAWpB,WAAWC,IAC/BA,EAAMvL,OAASC,QAAQC,IAAI,oCAE5B,CAACyL,EAASF,EAAUK,EAAeP,IAE/B,yBAAKpF,UAAWsF,MC/BVQ","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"ReactSimpleKeyboard\", [\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactSimpleKeyboard\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"ReactSimpleKeyboard\"] = factory(root[\"React\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","var _typeof2 = require(\"/home/runner/work/react-simple-keyboard/react-simple-keyboard/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/typeof\");\n\n/*!\n * \n * simple-keyboard v2.27.1\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\n!function (t, e) {\n \"object\" === (typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) && \"object\" === (typeof module === \"undefined\" ? \"undefined\" : _typeof2(module)) ? module.exports = e() : \"function\" === typeof define && define.amd ? define(\"SimpleKeyboard\", [], e) : \"object\" === (typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) ? exports.SimpleKeyboard = e() : t.SimpleKeyboard = e();\n}(window, function () {\n return function (t) {\n var e = {};\n\n function __webpack_require__(n) {\n if (e[n]) return e[n].exports;\n var o = e[n] = {\n i: n,\n l: !1,\n exports: {}\n };\n return t[n].call(o.exports, o, o.exports, __webpack_require__), o.l = !0, o.exports;\n }\n\n return __webpack_require__.m = t, __webpack_require__.c = e, __webpack_require__.d = function (t, e, n) {\n __webpack_require__.o(t, e) || Object.defineProperty(t, e, {\n enumerable: !0,\n get: n\n });\n }, __webpack_require__.r = function (t) {\n \"undefined\" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n }, __webpack_require__.t = function (t, e) {\n if (1 & e && (t = __webpack_require__(t)), 8 & e) return t;\n if (4 & e && \"object\" === _typeof2(t) && t && t.__esModule) return t;\n var n = Object.create(null);\n if (__webpack_require__.r(n), Object.defineProperty(n, \"default\", {\n enumerable: !0,\n value: t\n }), 2 & e && \"string\" != typeof t) for (var o in t) {\n __webpack_require__.d(n, o, function (e) {\n return t[e];\n }.bind(null, o));\n }\n return n;\n }, __webpack_require__.n = function (t) {\n var e = t && t.__esModule ? function () {\n return t.default;\n } : function () {\n return t;\n };\n return __webpack_require__.d(e, \"a\", e), e;\n }, __webpack_require__.o = function (t, e) {\n return Object.prototype.hasOwnProperty.call(t, e);\n }, __webpack_require__.p = \"\", __webpack_require__(__webpack_require__.s = 0);\n }([function (t, e, n) {\n t.exports = n(2);\n }, function (t, e, n) {}, function (t, e, n) {\n \"use strict\";\n\n n.r(e);\n n(1);\n\n function _typeof(t) {\n return (_typeof = \"function\" === typeof Symbol && \"symbol\" === _typeof2(Symbol.iterator) ? function (t) {\n return _typeof2(t);\n } : function (t) {\n return t && \"function\" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : _typeof2(t);\n })(t);\n }\n\n function _defineProperties(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var o = function () {\n function Utilities(t) {\n var e = t.getOptions,\n n = t.getCaretPosition,\n o = t.dispatch;\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, Utilities), this.getOptions = e, this.getCaretPosition = n, this.dispatch = o, Utilities.bindMethods(Utilities, this);\n }\n\n var t, e, n;\n return t = Utilities, n = [{\n key: \"bindMethods\",\n value: function value(t, e) {\n var n = !0,\n o = !1,\n i = void 0;\n\n try {\n for (var s, a = Object.getOwnPropertyNames(t.prototype)[Symbol.iterator](); !(n = (s = a.next()).done); n = !0) {\n var r = s.value;\n \"constructor\" === r || \"bindMethods\" === r || (e[r] = e[r].bind(e));\n }\n } catch (u) {\n o = !0, i = u;\n } finally {\n try {\n n || null == a.return || a.return();\n } finally {\n if (o) throw i;\n }\n }\n }\n }], (e = [{\n key: \"getButtonClass\",\n value: function value(t) {\n var e = t.includes(\"{\") && t.includes(\"}\") && \"{//}\" !== t ? \"functionBtn\" : \"standardBtn\",\n n = t.replace(\"{\", \"\").replace(\"}\", \"\"),\n o = \"\";\n return \"standardBtn\" !== e && (o = \" hg-button-\".concat(n)), \"hg-\".concat(e).concat(o);\n }\n }, {\n key: \"getDefaultDiplay\",\n value: function value() {\n return {\n \"{bksp}\": \"backspace\",\n \"{backspace}\": \"backspace\",\n \"{enter}\": \"< enter\",\n \"{shift}\": \"shift\",\n \"{shiftleft}\": \"shift\",\n \"{shiftright}\": \"shift\",\n \"{alt}\": \"alt\",\n \"{s}\": \"shift\",\n \"{tab}\": \"tab\",\n \"{lock}\": \"caps\",\n \"{capslock}\": \"caps\",\n \"{accept}\": \"Submit\",\n \"{space}\": \" \",\n \"{//}\": \" \",\n \"{esc}\": \"esc\",\n \"{escape}\": \"esc\",\n \"{f1}\": \"f1\",\n \"{f2}\": \"f2\",\n \"{f3}\": \"f3\",\n \"{f4}\": \"f4\",\n \"{f5}\": \"f5\",\n \"{f6}\": \"f6\",\n \"{f7}\": \"f7\",\n \"{f8}\": \"f8\",\n \"{f9}\": \"f9\",\n \"{f10}\": \"f10\",\n \"{f11}\": \"f11\",\n \"{f12}\": \"f12\",\n \"{numpaddivide}\": \"/\",\n \"{numlock}\": \"lock\",\n \"{arrowup}\": \"\\u2191\",\n \"{arrowleft}\": \"\\u2190\",\n \"{arrowdown}\": \"\\u2193\",\n \"{arrowright}\": \"\\u2192\",\n \"{prtscr}\": \"print\",\n \"{scrolllock}\": \"scroll\",\n \"{pause}\": \"pause\",\n \"{insert}\": \"ins\",\n \"{home}\": \"home\",\n \"{pageup}\": \"up\",\n \"{delete}\": \"del\",\n \"{end}\": \"end\",\n \"{pagedown}\": \"down\",\n \"{numpadmultiply}\": \"*\",\n \"{numpadsubtract}\": \"-\",\n \"{numpadadd}\": \"+\",\n \"{numpadenter}\": \"enter\",\n \"{period}\": \".\",\n \"{numpaddecimal}\": \".\",\n \"{numpad0}\": \"0\",\n \"{numpad1}\": \"1\",\n \"{numpad2}\": \"2\",\n \"{numpad3}\": \"3\",\n \"{numpad4}\": \"4\",\n \"{numpad5}\": \"5\",\n \"{numpad6}\": \"6\",\n \"{numpad7}\": \"7\",\n \"{numpad8}\": \"8\",\n \"{numpad9}\": \"9\"\n };\n }\n }, {\n key: \"getButtonDisplayName\",\n value: function value(t, e, n) {\n return (e = n ? Object.assign({}, this.getDefaultDiplay(), e) : e || this.getDefaultDiplay())[t] || t;\n }\n }, {\n key: \"getUpdatedInput\",\n value: function value(t, e, n, o) {\n var i = this.getOptions(),\n s = e;\n return (\"{bksp}\" === t || \"{backspace}\" === t) && s.length > 0 ? s = this.removeAt(s, n, o) : \"{space}\" === t ? s = this.addStringAt(s, \" \", n, o) : \"{tab}\" !== t || \"boolean\" === typeof i.tabCharOnTab && !1 === i.tabCharOnTab ? \"{enter}\" !== t && \"{numpadenter}\" !== t || !i.newLineOnEnter ? t.includes(\"numpad\") && Number.isInteger(Number(t[t.length - 2])) ? s = this.addStringAt(s, t[t.length - 2], n, o) : \"{numpaddivide}\" === t ? s = this.addStringAt(s, \"/\", n, o) : \"{numpadmultiply}\" === t ? s = this.addStringAt(s, \"*\", n, o) : \"{numpadsubtract}\" === t ? s = this.addStringAt(s, \"-\", n, o) : \"{numpadadd}\" === t ? s = this.addStringAt(s, \"+\", n, o) : \"{numpaddecimal}\" === t ? s = this.addStringAt(s, \".\", n, o) : \"{\" === t || \"}\" === t ? s = this.addStringAt(s, t, n, o) : t.includes(\"{\") || t.includes(\"}\") || (s = this.addStringAt(s, t, n, o)) : s = this.addStringAt(s, \"\\n\", n, o) : s = this.addStringAt(s, \"\\t\", n, o), s;\n }\n }, {\n key: \"updateCaretPos\",\n value: function value(t, e) {\n var n = this.updateCaretPosAction(t, e);\n this.dispatch(function (t) {\n t.caretPosition = n;\n });\n }\n }, {\n key: \"updateCaretPosAction\",\n value: function value(t, e) {\n var n = this.getOptions(),\n o = this.getCaretPosition();\n return e ? o > 0 && (o -= t) : o += t, n.debug && console.log(\"Caret at:\", o, \"(\".concat(this.keyboardDOMClass, \")\")), o;\n }\n }, {\n key: \"addStringAt\",\n value: function value(t, e, n, o) {\n var i;\n return n || 0 === n ? (i = [t.slice(0, n), e, t.slice(n)].join(\"\"), this.isMaxLengthReached() || o && this.updateCaretPos(e.length)) : i = t + e, i;\n }\n }, {\n key: \"removeAt\",\n value: function value(t, e, n) {\n var o;\n if (0 === this.getCaretPosition()) return t;\n var i = /([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g;\n return e && e >= 0 ? t.substring(e - 2, e).match(i) ? (o = t.substr(0, e - 2) + t.substr(e), n && this.updateCaretPos(2, !0)) : (o = t.substr(0, e - 1) + t.substr(e), n && this.updateCaretPos(1, !0)) : t.slice(-2).match(i) ? (o = t.slice(0, -2), n && this.updateCaretPos(2, !0)) : (o = t.slice(0, -1), n && this.updateCaretPos(1, !0)), o;\n }\n }, {\n key: \"handleMaxLength\",\n value: function value(t, e) {\n var n = this.getOptions(),\n o = n.maxLength,\n i = t[n.inputName],\n s = e.length - 1 >= o;\n if (e.length <= i.length) return !1;\n if (Number.isInteger(o)) return n.debug && console.log(\"maxLength (num) reached:\", s), s ? (this.maxLengthReached = !0, !0) : (this.maxLengthReached = !1, !1);\n\n if (\"object\" === _typeof(o)) {\n var a = i.length === o[n.inputName];\n return n.debug && console.log(\"maxLength (obj) reached:\", a), a ? (this.maxLengthReached = !0, !0) : (this.maxLengthReached = !1, !1);\n }\n }\n }, {\n key: \"isMaxLengthReached\",\n value: function value() {\n return Boolean(this.maxLengthReached);\n }\n }, {\n key: \"isTouchDevice\",\n value: function value() {\n return \"ontouchstart\" in window || navigator.maxTouchPoints;\n }\n }, {\n key: \"pointerEventsSupported\",\n value: function value() {\n return window.PointerEvent;\n }\n }, {\n key: \"camelCase\",\n value: function value(t) {\n return !!t && t.toLowerCase().trim().split(/[.\\-_\\s]/g).reduce(function (t, e) {\n return e.length ? t + e[0].toUpperCase() + e.slice(1) : t;\n });\n }\n }]) && _defineProperties(t.prototype, e), n && _defineProperties(t, n), Utilities;\n }();\n\n function PhysicalKeyboard_defineProperties(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var i = function () {\n function PhysicalKeyboard(t) {\n var e = t.dispatch,\n n = t.getOptions;\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, PhysicalKeyboard), this.dispatch = e, this.getOptions = n, o.bindMethods(PhysicalKeyboard, this);\n }\n\n var t, e, n;\n return t = PhysicalKeyboard, (e = [{\n key: \"handleHighlightKeyDown\",\n value: function value(t) {\n var e = this.getOptions(),\n n = this.getSimpleKeyboardLayoutKey(t);\n this.dispatch(function (t) {\n var o = t.getButtonElement(n) || t.getButtonElement(\"{\".concat(n, \"}\"));\n o && (o.style.backgroundColor = e.physicalKeyboardHighlightBgColor || \"#9ab4d0\", o.style.color = e.physicalKeyboardHighlightTextColor || \"white\");\n });\n }\n }, {\n key: \"handleHighlightKeyUp\",\n value: function value(t) {\n var e = this.getSimpleKeyboardLayoutKey(t);\n this.dispatch(function (t) {\n var n = t.getButtonElement(e) || t.getButtonElement(\"{\".concat(e, \"}\"));\n n && n.removeAttribute && n.removeAttribute(\"style\");\n });\n }\n }, {\n key: \"getSimpleKeyboardLayoutKey\",\n value: function value(t) {\n var e;\n return ((e = t.code.includes(\"Numpad\") || t.code.includes(\"Shift\") || t.code.includes(\"Space\") || t.code.includes(\"Backspace\") || t.code.includes(\"Control\") || t.code.includes(\"Alt\") || t.code.includes(\"Meta\") ? t.code : t.key) !== e.toUpperCase() || \"F\" === t.code[0] && Number.isInteger(Number(t.code[1])) && t.code.length <= 3) && (e = e.toLowerCase()), e;\n }\n }]) && PhysicalKeyboard_defineProperties(t.prototype, e), n && PhysicalKeyboard_defineProperties(t, n), PhysicalKeyboard;\n }();\n\n function KeyboardLayout_defineProperties(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var s = function () {\n function KeyboardLayout() {\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, KeyboardLayout);\n }\n\n var t, e, n;\n return t = KeyboardLayout, n = [{\n key: \"getDefaultLayout\",\n value: function value() {\n return {\n default: [\"` 1 2 3 4 5 6 7 8 9 0 - = {bksp}\", \"{tab} q w e r t y u i o p [ ] \\\\\", \"{lock} a s d f g h j k l ; ' {enter}\", \"{shift} z x c v b n m , . / {shift}\", \".com @ {space}\"],\n shift: [\"~ ! @ # $ % ^ & * ( ) _ + {bksp}\", \"{tab} Q W E R T Y U I O P { } |\", '{lock} A S D F G H J K L : \" {enter}', \"{shift} Z X C V B N M < > ? {shift}\", \".com @ {space}\"]\n };\n }\n }], (e = null) && KeyboardLayout_defineProperties(t.prototype, e), n && KeyboardLayout_defineProperties(t, n), KeyboardLayout;\n }();\n\n function _toConsumableArray(t) {\n return function (t) {\n if (Array.isArray(t)) {\n for (var e = 0, n = new Array(t.length); e < t.length; e++) {\n n[e] = t[e];\n }\n\n return n;\n }\n }(t) || function (t) {\n if (Symbol.iterator in Object(t) || \"[object Arguments]\" === Object.prototype.toString.call(t)) return Array.from(t);\n }(t) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }\n\n function Keyboard_typeof(t) {\n return (Keyboard_typeof = \"function\" === typeof Symbol && \"symbol\" === _typeof2(Symbol.iterator) ? function (t) {\n return _typeof2(t);\n } : function (t) {\n return t && \"function\" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : _typeof2(t);\n })(t);\n }\n\n function Keyboard_defineProperties(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n function _defineProperty(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n var a = function () {\n function SimpleKeyboard() {\n var t = this;\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, SimpleKeyboard), _defineProperty(this, \"getOptions\", function () {\n return t.options;\n }), _defineProperty(this, \"getCaretPosition\", function () {\n return t.caretPosition;\n }), _defineProperty(this, \"registerModule\", function (e, n) {\n t.modules[e] || (t.modules[e] = {}), n(t.modules[e]);\n });\n var e = \"string\" === typeof (arguments.length <= 0 ? void 0 : arguments[0]) ? arguments.length <= 0 ? void 0 : arguments[0] : \".simple-keyboard\",\n n = \"object\" === Keyboard_typeof(arguments.length <= 0 ? void 0 : arguments[0]) ? arguments.length <= 0 ? void 0 : arguments[0] : arguments.length <= 1 ? void 0 : arguments[1];\n if (n || (n = {}), this.utilities = new o({\n getOptions: this.getOptions,\n getCaretPosition: this.getCaretPosition,\n dispatch: this.dispatch\n }), this.caretPosition = null, this.keyboardDOM = document.querySelector(e), this.options = n, this.options.layoutName = this.options.layoutName || \"default\", this.options.theme = this.options.theme || \"hg-theme-default\", this.options.inputName = this.options.inputName || \"default\", this.options.preventMouseDownDefault = this.options.preventMouseDownDefault || !1, this.keyboardPluginClasses = \"\", o.bindMethods(SimpleKeyboard, this), this.input = {}, this.input[this.options.inputName] = \"\", this.keyboardDOMClass = e.split(\".\").join(\"\"), this.buttonElements = {}, window.SimpleKeyboardInstances || (window.SimpleKeyboardInstances = {}), this.currentInstanceName = this.utilities.camelCase(this.keyboardDOMClass), window.SimpleKeyboardInstances[this.currentInstanceName] = this, this.allKeyboardInstances = window.SimpleKeyboardInstances, this.keyboardInstanceNames = Object.keys(window.SimpleKeyboardInstances), this.isFirstKeyboardInstance = this.keyboardInstanceNames[0] === this.currentInstanceName, this.physicalKeyboard = new i({\n dispatch: this.dispatch,\n getOptions: this.getOptions\n }), !this.keyboardDOM) throw console.warn('\"'.concat(e, '\" was not found in the DOM.')), new Error(\"KEYBOARD_DOM_ERROR\");\n this.render(), this.modules = {}, this.loadModules();\n }\n\n var t, e, n;\n return t = SimpleKeyboard, (e = [{\n key: \"handleButtonClicked\",\n value: function value(t) {\n var e = this.options.debug;\n if (\"{//}\" === t) return !1;\n \"function\" === typeof this.options.onKeyPress && this.options.onKeyPress(t), this.input[this.options.inputName] || (this.input[this.options.inputName] = \"\");\n var n = this.utilities.getUpdatedInput(t, this.input[this.options.inputName], this.caretPosition);\n\n if (this.input[this.options.inputName] !== n && (!this.options.inputPattern || this.options.inputPattern && this.inputPatternIsValid(n))) {\n if (this.options.maxLength && this.utilities.handleMaxLength(this.input, n)) return !1;\n this.input[this.options.inputName] = this.utilities.getUpdatedInput(t, this.input[this.options.inputName], this.caretPosition, !0), e && console.log(\"Input changed:\", this.input), this.options.syncInstanceInputs && this.syncInstanceInputs(), \"function\" === typeof this.options.onChange && this.options.onChange(this.input[this.options.inputName]), \"function\" === typeof this.options.onChangeAll && this.options.onChangeAll(this.input);\n }\n\n e && console.log(\"Key pressed:\", t);\n }\n }, {\n key: \"handleButtonMouseDown\",\n value: function value(t, e) {\n var n = this;\n this.options.preventMouseDownDefault && e.preventDefault(), this.options.stopMouseDownPropagation && e.stopPropagation(), e && e.target.classList.add(this.activeButtonClass), this.isMouseHold = !0, this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), this.holdTimeout && clearTimeout(this.holdTimeout), this.options.disableButtonHold || (this.holdTimeout = setTimeout(function () {\n !n.isMouseHold || (t.includes(\"{\") || t.includes(\"}\")) && \"{delete}\" !== t && \"{backspace}\" !== t && \"{bksp}\" !== t && \"{space}\" !== t && \"{tab}\" !== t || (n.options.debug && console.log(\"Button held:\", t), n.handleButtonHold(t, e)), clearTimeout(n.holdTimeout);\n }, 500));\n }\n }, {\n key: \"handleButtonMouseUp\",\n value: function value(t) {\n var e = this;\n this.recurseButtons(function (t) {\n t.classList.remove(e.activeButtonClass);\n }), this.isMouseHold = !1, this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), t && \"function\" === typeof this.options.onKeyReleased && this.options.onKeyReleased(t);\n }\n }, {\n key: \"handleKeyboardContainerMouseDown\",\n value: function value(t) {\n this.options.preventMouseDownDefault && t.preventDefault();\n }\n }, {\n key: \"handleButtonHold\",\n value: function value(t) {\n var e = this;\n this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), this.holdInteractionTimeout = setTimeout(function () {\n e.isMouseHold ? (e.handleButtonClicked(t), e.handleButtonHold(t)) : clearTimeout(e.holdInteractionTimeout);\n }, 100);\n }\n }, {\n key: \"syncInstanceInputs\",\n value: function value() {\n var t = this;\n this.dispatch(function (e) {\n e.replaceInput(t.input), e.caretPosition = t.caretPosition;\n });\n }\n }, {\n key: \"clearInput\",\n value: function value(t) {\n t = t || this.options.inputName, this.input[t] = \"\", this.caretPosition = 0, this.options.syncInstanceInputs && this.syncInstanceInputs();\n }\n }, {\n key: \"getInput\",\n value: function value(t) {\n return t = t || this.options.inputName, this.options.syncInstanceInputs && this.syncInstanceInputs(), this.input[t];\n }\n }, {\n key: \"setInput\",\n value: function value(t, e) {\n e = e || this.options.inputName, this.input[e] = t, this.options.syncInstanceInputs && this.syncInstanceInputs();\n }\n }, {\n key: \"replaceInput\",\n value: function value(t) {\n this.input = t;\n }\n }, {\n key: \"setOptions\",\n value: function value(t) {\n t = t || {}, this.options = Object.assign(this.options, t), this.onSetOptions(t), this.render();\n }\n }, {\n key: \"onSetOptions\",\n value: function value(t) {\n t.inputName && (this.options.debug && console.log(\"inputName changed. caretPosition reset.\"), this.caretPosition = null);\n }\n }, {\n key: \"clear\",\n value: function value() {\n this.keyboardDOM.innerHTML = \"\", this.keyboardDOM.className = this.keyboardDOMClass, this.buttonElements = {};\n }\n }, {\n key: \"dispatch\",\n value: function value(t) {\n if (!window.SimpleKeyboardInstances) throw console.warn(\"SimpleKeyboardInstances is not defined. Dispatch cannot be called.\"), new Error(\"INSTANCES_VAR_ERROR\");\n return Object.keys(window.SimpleKeyboardInstances).forEach(function (e) {\n t(window.SimpleKeyboardInstances[e], e);\n });\n }\n }, {\n key: \"addButtonTheme\",\n value: function value(t, e) {\n var n = this;\n if (!e || !t) return !1;\n t.split(\" \").forEach(function (o) {\n e.split(\" \").forEach(function (e) {\n n.options.buttonTheme || (n.options.buttonTheme = []);\n var i = !1;\n n.options.buttonTheme.map(function (t) {\n if (t.class.split(\" \").includes(e)) {\n i = !0;\n var n = t.buttons.split(\" \");\n n.includes(o) || (i = !0, n.push(o), t.buttons = n.join(\" \"));\n }\n\n return t;\n }), i || n.options.buttonTheme.push({\n class: e,\n buttons: t\n });\n });\n }), this.render();\n }\n }, {\n key: \"removeButtonTheme\",\n value: function value(t, e) {\n var n = this;\n if (!t && !e) return this.options.buttonTheme = [], this.render(), !1;\n t && Array.isArray(this.options.buttonTheme) && this.options.buttonTheme.length && (t.split(\" \").forEach(function (t, o) {\n n.options.buttonTheme.map(function (o, i) {\n if (e && e.includes(o.class) || !e) {\n var s = o.buttons.split(\" \").filter(function (e) {\n return e !== t;\n });\n s.length ? o.buttons = s.join(\" \") : (n.options.buttonTheme.splice(i, 1), o = null);\n }\n\n return o;\n });\n }), this.render());\n }\n }, {\n key: \"getButtonElement\",\n value: function value(t) {\n var e,\n n = this.buttonElements[t];\n return n && (e = n.length > 1 ? n : n[0]), e;\n }\n }, {\n key: \"inputPatternIsValid\",\n value: function value(t) {\n var e,\n n = this.options.inputPattern;\n\n if ((e = n instanceof RegExp ? n : n[this.options.inputName]) && t) {\n var o = e.test(t);\n return this.options.debug && console.log('inputPattern (\"'.concat(e, '\"): ').concat(o ? \"passed\" : \"did not pass!\")), o;\n }\n\n return !0;\n }\n }, {\n key: \"setEventListeners\",\n value: function value() {\n !this.isFirstKeyboardInstance && this.allKeyboardInstances || (this.options.debug && console.log(\"Caret handling started (\".concat(this.keyboardDOMClass, \")\")), document.addEventListener(\"keyup\", this.handleKeyUp), document.addEventListener(\"keydown\", this.handleKeyDown), document.addEventListener(\"mouseup\", this.handleMouseUp), document.addEventListener(\"touchend\", this.handleTouchEnd));\n }\n }, {\n key: \"handleKeyUp\",\n value: function value(t) {\n this.caretEventHandler(t), this.options.physicalKeyboardHighlight && this.physicalKeyboard.handleHighlightKeyUp(t);\n }\n }, {\n key: \"handleKeyDown\",\n value: function value(t) {\n this.options.physicalKeyboardHighlight && this.physicalKeyboard.handleHighlightKeyDown(t);\n }\n }, {\n key: \"handleMouseUp\",\n value: function value(t) {\n this.caretEventHandler(t);\n }\n }, {\n key: \"handleTouchEnd\",\n value: function value(t) {\n this.caretEventHandler(t);\n }\n }, {\n key: \"caretEventHandler\",\n value: function value(t) {\n var e;\n t.target.tagName && (e = t.target.tagName.toLowerCase()), this.dispatch(function (n) {\n n.isMouseHold && (n.isMouseHold = !1), \"textarea\" !== e && \"input\" !== e || n.options.disableCaretPositioning ? n.options.disableCaretPositioning && (n.caretPosition = null) : (n.caretPosition = t.target.selectionStart, n.options.debug && console.log(\"Caret at: \", t.target.selectionStart, t.target.tagName.toLowerCase(), \"(\".concat(n.keyboardDOMClass, \")\")));\n });\n }\n }, {\n key: \"recurseButtons\",\n value: function value(t) {\n var e = this;\n if (!t) return !1;\n Object.keys(this.buttonElements).forEach(function (n) {\n return e.buttonElements[n].forEach(t);\n });\n }\n }, {\n key: \"destroy\",\n value: function value() {\n this.options.debug && console.log(\"Destroying simple-keyboard instance: \".concat(this.currentInstanceName)), document.removeEventListener(\"keyup\", this.handleKeyUp), document.removeEventListener(\"keydown\", this.handleKeyDown), document.removeEventListener(\"mouseup\", this.handleMouseUp), document.removeEventListener(\"touchend\", this.handleTouchEnd), document.onpointerup = null, document.ontouchend = null, document.ontouchcancel = null, document.onmouseup = null;\n\n var deleteButton = function deleteButton(t) {\n t.onpointerdown = null, t.onpointerup = null, t.onpointercancel = null, t.ontouchstart = null, t.ontouchend = null, t.ontouchcancel = null, t.onclick = null, t.onmousedown = null, t.onmouseup = null, t.remove(), t = null;\n };\n\n this.recurseButtons(deleteButton), this.buttonElements = null, this.recurseButtons = null, deleteButton = null, this.keyboardDOM.onpointerdown = null, this.keyboardDOM.ontouchstart = null, this.keyboardDOM.onmousedown = null, this.keyboardDOM.remove(), this.keyboardDOM = null, window.SimpleKeyboardInstances[this.currentInstanceName] = null, delete window.SimpleKeyboardInstances[this.currentInstanceName];\n }\n }, {\n key: \"getButtonThemeClasses\",\n value: function value(t) {\n var e = this.options.buttonTheme,\n n = [];\n return Array.isArray(e) && e.forEach(function (e) {\n if (e.class && \"string\" === typeof e.class && e.buttons && \"string\" === typeof e.buttons) {\n var o = e.class.split(\" \");\n e.buttons.split(\" \").includes(t) && (n = [].concat(_toConsumableArray(n), _toConsumableArray(o)));\n } else console.warn('Incorrect \"buttonTheme\". Please check the documentation.', e);\n }), n;\n }\n }, {\n key: \"setDOMButtonAttributes\",\n value: function value(t, e) {\n var n = this.options.buttonAttributes;\n Array.isArray(n) && n.forEach(function (n) {\n n.attribute && \"string\" === typeof n.attribute && n.value && \"string\" === typeof n.value && n.buttons && \"string\" === typeof n.buttons ? n.buttons.split(\" \").includes(t) && e(n.attribute, n.value) : console.warn('Incorrect \"buttonAttributes\". Please check the documentation.', n);\n });\n }\n }, {\n key: \"onTouchDeviceDetected\",\n value: function value() {\n this.processAutoTouchEvents(), this.disableContextualWindow();\n }\n }, {\n key: \"disableContextualWindow\",\n value: function value() {\n window.oncontextmenu = function (t) {\n if (t.target.classList.contains(\"hg-button\")) return t.preventDefault(), t.stopPropagation(), !1;\n };\n }\n }, {\n key: \"processAutoTouchEvents\",\n value: function value() {\n this.options.autoUseTouchEvents && (this.options.useTouchEvents = !0, this.options.debug && console.log(\"autoUseTouchEvents: Touch device detected, useTouchEvents enabled.\"));\n }\n }, {\n key: \"onInit\",\n value: function value() {\n this.options.debug && console.log(\"\".concat(this.keyboardDOMClass, \" Initialized\")), this.setEventListeners(), \"function\" === typeof this.options.onInit && this.options.onInit();\n }\n }, {\n key: \"beforeFirstRender\",\n value: function value() {\n this.utilities.isTouchDevice() && this.onTouchDeviceDetected(), \"function\" === typeof this.options.beforeFirstRender && this.options.beforeFirstRender(), this.isFirstKeyboardInstance && this.utilities.pointerEventsSupported() && !this.options.useTouchEvents && !this.options.useMouseEvents && this.options.debug && console.log(\"Using PointerEvents as it is supported by this browser\"), this.options.useTouchEvents && this.options.debug && console.log(\"useTouchEvents has been enabled. Only touch events will be used.\");\n }\n }, {\n key: \"beforeRender\",\n value: function value() {\n \"function\" === typeof this.options.beforeRender && this.options.beforeRender();\n }\n }, {\n key: \"onRender\",\n value: function value() {\n \"function\" === typeof this.options.onRender && this.options.onRender();\n }\n }, {\n key: \"onModulesLoaded\",\n value: function value() {\n \"function\" === typeof this.options.onModulesLoaded && this.options.onModulesLoaded();\n }\n }, {\n key: \"loadModules\",\n value: function value() {\n var t = this;\n Array.isArray(this.options.modules) && (this.options.modules.forEach(function (e) {\n var n = new e();\n\n if (n.constructor.name && \"Function\" !== n.constructor.name) {\n var o = \"module-\".concat(t.utilities.camelCase(n.constructor.name));\n t.keyboardPluginClasses = t.keyboardPluginClasses + \" \".concat(o);\n }\n\n n.init(t);\n }), this.keyboardPluginClasses = this.keyboardPluginClasses + \" modules-loaded\", this.render(), this.onModulesLoaded());\n }\n }, {\n key: \"getModuleProp\",\n value: function value(t, e) {\n return !!this.modules[t] && this.modules[t][e];\n }\n }, {\n key: \"getModulesList\",\n value: function value() {\n return Object.keys(this.modules);\n }\n }, {\n key: \"parseRowDOMContainers\",\n value: function value(t, e, n, o) {\n var i = this,\n s = Array.from(t.children),\n a = 0;\n return s.length && n.forEach(function (n, r) {\n var u = o[r];\n if (!u || !(u > n)) return !1;\n var c = n - a,\n l = u - a,\n h = document.createElement(\"div\");\n h.className += \"hg-button-container\";\n var d = \"\".concat(i.options.layoutName, \"-r\").concat(e, \"c\").concat(r);\n h.setAttribute(\"data-skUID\", d);\n var p = s.splice(c, l - c + 1);\n a = l - c, p.forEach(function (t) {\n return h.appendChild(t);\n }), s.splice(c, 0, h), t.innerHTML = \"\", s.forEach(function (e) {\n return t.appendChild(e);\n }), i.options.debug && console.log(\"rowDOMContainer\", p, c, l, a + 1);\n }), t;\n }\n }, {\n key: \"render\",\n value: function value() {\n var t = this;\n this.clear(), this.initialized || this.beforeFirstRender(), this.beforeRender();\n var e = \"hg-layout-\".concat(this.options.layoutName),\n n = this.options.layout || s.getDefaultLayout(),\n o = this.options.useTouchEvents || !1,\n i = o ? \"hg-touch-events\" : \"\",\n a = this.options.useMouseEvents || !1,\n r = this.options.disableRowButtonContainers;\n this.keyboardDOM.className += \" \".concat(this.options.theme, \" \").concat(e, \" \").concat(this.keyboardPluginClasses, \" \").concat(i), n[this.options.layoutName].forEach(function (e, n) {\n var i = e.split(\" \"),\n s = document.createElement(\"div\");\n s.className += \"hg-row\";\n var u = [],\n c = [];\n i.forEach(function (e, i) {\n var l,\n h = !r && e.includes(\"[\") && e.length > 1,\n d = !r && e.includes(\"]\") && e.length > 1;\n h && (u.push(i), e = e.replace(/\\[/g, \"\")), d && (c.push(i), e = e.replace(/\\]/g, \"\"));\n var p = t.utilities.getButtonClass(e),\n f = t.utilities.getButtonDisplayName(e, t.options.display, t.options.mergeDisplay),\n y = t.options.useButtonTag ? \"button\" : \"div\",\n b = document.createElement(y);\n b.className += \"hg-button \".concat(p), (l = b.classList).add.apply(l, _toConsumableArray(t.getButtonThemeClasses(e))), t.setDOMButtonAttributes(e, function (t, e) {\n b.setAttribute(t, e);\n }), t.activeButtonClass = \"hg-activeButton\", !t.utilities.pointerEventsSupported() || o || a ? o ? (b.ontouchstart = function (n) {\n t.handleButtonClicked(e), t.handleButtonMouseDown(e, n);\n }, b.ontouchend = function () {\n t.handleButtonMouseUp(e);\n }, b.ontouchcancel = function () {\n t.handleButtonMouseUp(e);\n }) : (b.onclick = function () {\n t.isMouseHold = !1, t.handleButtonClicked(e);\n }, b.onmousedown = function (n) {\n t.handleButtonMouseDown(e, n);\n }, b.onmouseup = function () {\n t.handleButtonMouseUp(e);\n }) : (b.onpointerdown = function (n) {\n t.handleButtonClicked(e), t.handleButtonMouseDown(e, n);\n }, b.onpointerup = function () {\n t.handleButtonMouseUp(e);\n }, b.onpointercancel = function () {\n t.handleButtonMouseUp(e);\n }), b.setAttribute(\"data-skBtn\", e);\n var m = \"\".concat(t.options.layoutName, \"-r\").concat(n, \"b\").concat(i);\n b.setAttribute(\"data-skBtnUID\", m);\n var g = document.createElement(\"span\");\n g.innerHTML = f, b.appendChild(g), t.buttonElements[e] || (t.buttonElements[e] = []), t.buttonElements[e].push(b), s.appendChild(b);\n }), s = t.parseRowDOMContainers(s, n, u, c), t.keyboardDOM.appendChild(s);\n }), this.onRender(), this.initialized || (this.initialized = !0, !this.utilities.pointerEventsSupported() || o || a ? o ? (document.ontouchend = function () {\n return t.handleButtonMouseUp();\n }, document.ontouchcancel = function () {\n return t.handleButtonMouseUp();\n }, this.keyboardDOM.ontouchstart = function (e) {\n return t.handleKeyboardContainerMouseDown(e);\n }) : o || (document.onmouseup = function () {\n return t.handleButtonMouseUp();\n }, this.keyboardDOM.onmousedown = function (e) {\n return t.handleKeyboardContainerMouseDown(e);\n }) : (document.onpointerup = function () {\n return t.handleButtonMouseUp();\n }, this.keyboardDOM.onpointerdown = function (e) {\n return t.handleKeyboardContainerMouseDown(e);\n }), this.onInit());\n }\n }]) && Keyboard_defineProperties(t.prototype, e), n && Keyboard_defineProperties(t, n), SimpleKeyboard;\n }();\n\n e.default = a;\n }]);\n});","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","export const parseProps = props => ({\n ...props,\n theme: `simple-keyboard ${props.theme || \"hg-theme-default\"}`\n});\n\nexport const propsChanged = (prevProps, props) => {\n const cleanProps = sourceObj =>\n JSON.stringify({\n ...sourceObj,\n stateToIgnore: null\n });\n\n return cleanProps(props) !== cleanProps(prevProps);\n};\n","import React, { useEffect, useRef } from \"react\";\nimport Keyboard from \"simple-keyboard\";\nimport { parseProps, propsChanged } from \"../services/Utilities\";\nimport \"simple-keyboard/build/css/index.css\";\n\nconst KeyboardReact = props => {\n const cssClass = props.baseClass || \"react-simple-keyboard\";\n const initRef = useRef();\n const keyboardRef = useRef();\n const previousProps = useRef(props);\n\n useEffect(() => {\n /**\n * Initialize simple-keyboard\n */\n if (!initRef.current) {\n initRef.current = true;\n props.debug && console.log(\"ReactSimpleKeyboard: Init\");\n keyboardRef.current = new Keyboard(`.${cssClass}`, parseProps(props));\n props.keyboardRef && props.keyboardRef(keyboardRef.current);\n }\n\n /**\n * Only trigger render if props changed\n */\n if (propsChanged(previousProps.current, props)) {\n let keyboard = keyboardRef.current;\n previousProps.current = props;\n keyboard.setOptions(parseProps(props));\n props.debug && console.log(\"ReactSimpleKeyboard: Rendered\");\n }\n }, [initRef, cssClass, previousProps, props]);\n\n return
;\n};\n\nexport default KeyboardReact;\n","import Keyboard from \"./components/Keyboard\";\n\nexport default Keyboard;\n"],"sourceRoot":""} \ No newline at end of file