(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8371],{98371:function(e,n,t){"use strict";t.d(n,{Z:function(){return $}});var r=t(39693),o=t.n(r),i=t(67294),u=t(45697),c=t.n(u),a=t(4803),l=t(32732),s=t(91118),f=t(74691),b=t.n(f),y=t(93379),p=t.n(y),d=t(7795),v=t.n(d),m=t(90569),A=t.n(m),g=t(3565),h=t.n(g),C=t(19216),E=t.n(C),w=t(44589),S=t.n(w),j=t(56520),O={};O.styleTagTransform=S(),O.setAttributes=h(),O.insert=A().bind(null,"head"),O.domAPI=v(),O.insertStyleElement=E(),p()(j.Z,O);var k=j.Z&&j.Z.locals?j.Z.locals:void 0,x=t(85893);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t3||A[1]>3,intersecting:N(m,n),rect:m,size:A})}))}}),[o,n,u]),f=(0,i.useCallback)((function(e){o.start&&(o.selecting&&t({negate:o.negate,intersecting:o.intersecting}),u({start:null,selecting:!1}))}),[t,o,u]);return(0,i.useEffect)((function(){return window.addEventListener("mouseup",f),window.addEventListener("mousemove",s),window.addEventListener("keydown",a),window.addEventListener("keyup",l),function(){window.removeEventListener("mouseup",f),window.removeEventListener("mousemove",s),window.removeEventListener("keydown",a),window.removeEventListener("keyup",l)}}),[f,s,a,l]),[T(T({},o),{},{onMouseDown:c,onMouseMove:s}),R]}function N(e,n){return n.reduce((function(n,t,r){return t.some((function(n){var t=n.x,r=n.y;return e[0][0]=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==t.return||t.return()}finally{if(c)throw i}}}}function J(e,n){if(e){if("string"==typeof e)return V(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?V(e,n):void 0}}function V(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t3,showDeSelectTip:!t.usedDragDeSelection&&t.manualDeSelectionCount>3,actions:{manualSelection:u,manualDeSelection:c,dragSelection:f,dragDeSelection:b}}),E=C.showSelectTip,w=C.showDeSelectTip,S=C.actions,j=(0,i.useCallback)((function(e){var n=e.negate,t=e.intersecting;n?S.dragDeSelection():S.dragSelection(),d(n?y.filter((function(e){return!t.includes(e)})):[].concat(U(y),U(t)))}),[y,d,S]),O=(0,i.useCallback)((function(e){var n=y.includes(e);n?S.manualDeSelection():S.manualSelection(),d(n?y.filter((function(n){return n!==e})):[].concat(U(y),[e]))}),[y,d,S]),k=G(L({onSelect:j,polygons:g}),2),D=k[0],P=k[1],T=D.selecting?D.intersecting:[],B=y,M=D.negate?[]:T.filter((function(e){return!B.includes(e)})),I=D.negate?T.filter((function(e){return B.includes(e)})):[];return(0,x.jsx)("div",{style:h,children:(0,x.jsxs)(P,W(W({},D),{},{children:[(0,x.jsx)(l.Z,{layout:m,bindings:[],scale:Y,renderKey:function(e){var n=e.index;return(0,x.jsx)(s.Z,{onClick:function(){return O(n)},themeClass:o()([Z.Z.key,B.includes(n)&&Z.Z.highlight,M.includes(n)&&Z.Z.previewAdd,I.includes(n)&&Z.Z.previewRemove]).join(" ")})}}),p&&(0,x.jsx)("prompt",{}),E&&(0,x.jsx)(_.Z,{className:Z.Z.tip,children:"Drag to select a region"}),w&&(0,x.jsx)(_.Z,{className:Z.Z.tip,children:"Shift+Drag to de-select a region"})]}))})}Q.propTypes={onUpdate:c().func.isRequired,value:c().arrayOf(c().number).isRequired,prompt:c().node};var $=Q},32732:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(45697),o=t.n(r),i=t(78718),u=t.n(i),c=t(26523),a=t(95872);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(e,h),o=S(n),i=j(n),u=O(n),l=(0,c.Pi)(o,u,i);return(0,A.jsx)("div",E(E({className:a.Z.placer,style:l,"data-u":u.u,"data-h":u.h},r),{},{children:t}))}k.propTypes={scale:o().number,keyLayout:v.isRequired},k.defaultProps={scale:1};var x=k;function D(e){var n=e.layout,t=e.renderKey,r=e.scale;return(0,A.jsx)("div",{style:{position:"relative",transform:"scale(".concat(r,")"),transformOrigin:0},children:n.map((function(e,n){return(0,A.jsx)(x,{keyLayout:e,children:t({index:n,keyLayout:e})},n)}))})}D.propTypes={layout:m.isRequired,renderKey:o().func.isRequired,scale:o().number},D.defaultProps={scale:1};var P=D},56520:function(e,n,t){"use strict";var r=t(87537),o=t.n(r),i=t(23645),u=t.n(i)()(o());u.push([e.id,".eEWh1kMxq0qwtAjWodL_ {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n}\n\n.eEWh1kMxq0qwtAjWodL_.Me2iewShkkUWEmhCKAJV {\n cursor: crosshair;\n}\n\n.wou_rpm0nvB8wxB153cE {\n position: absolute;\n background-color: rgba(150, 255, 150, 0.1);\n border: 3px dotted rgba(150, 255, 150, 0.7);\n pointer-events: none;\n box-sizing: border-box;\n}\n\n.wou_rpm0nvB8wxB153cE.fM8xQCv4KykkW5ssxgEg {\n background-color: rgba(120, 120, 120, 0.1);\n border-color: rgba(120, 120, 120, 0.25);\n}\n","",{version:3,sources:["webpack://./src/Keyboard/Common/dragSelector.module.css"],names:[],mappings:"AAAA;EACE,WAAW;EACX,YAAY;EACZ,SAAS;EACT,UAAU;AACZ;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,kBAAkB;EAClB,0CAA0C;EAC1C,2CAA2C;EAC3C,oBAAoB;EACpB,sBAAsB;AACxB;;AAEA;EACE,0CAA0C;EAC1C,uCAAuC;AACzC",sourcesContent:[".container {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n}\n\n.container.selecting {\n cursor: crosshair;\n}\n\n.overlay {\n position: absolute;\n background-color: rgba(150, 255, 150, 0.1);\n border: 3px dotted rgba(150, 255, 150, 0.7);\n pointer-events: none;\n box-sizing: border-box;\n}\n\n.overlay.negate {\n background-color: rgba(120, 120, 120, 0.1);\n border-color: rgba(120, 120, 120, 0.25);\n}\n"],sourceRoot:""}]),u.locals={container:"eEWh1kMxq0qwtAjWodL_",selecting:"Me2iewShkkUWEmhCKAJV",overlay:"wou_rpm0nvB8wxB153cE",negate:"fM8xQCv4KykkW5ssxgEg"},n.Z=u},49040:function(e,n,t){"use strict";var r=t(87537),o=t.n(r),i=t(23645),u=t.n(i)()(o());u.push([e.id,".lD5TsvdIbEAHNdmhfnlb {\n background-color: var(--key-bg-base);\n}\n.yk89E4zK9zlO69OXhKn5:hover {\n cursor: pointer;\n border: 4px solid var(--selection);\n box-sizing: border-box;\n}\n\n.pzTvsxKjpy6MqcFhxh9j {\n background-color: var(--selection);\n}\n.pzTvsxKjpy6MqcFhxh9j:hover {\n background-color: var(--hover-selection);\n}\n\n.r_Sdklnj57CE2ZjnBDw6 {\n background-color: var(--hover-selection);\n filter: brightness(135%);\n}\n\n.Ich9T1nSzHs1a84insfp {\n background-color: var(--hover-selection);\n filter: brightness(75%);\n}\n\n._3U1zi1J1sXT41AzpAA1j {\n position: absolute;\n bottom: 0;\n right: 50%;\n transform: translate(50%, 100%);\n}\n","",{version:3,sources:["webpack://./src/Keyboard/Common/keyPositionSelectorStyles.module.css"],names:[],mappings:"AAAA;EACE,oCAAoC;AACtC;AACA;EACE,eAAe;EACf,kCAAkC;EAClC,sBAAsB;AACxB;;AAEA;EACE,kCAAkC;AACpC;AACA;EACE,wCAAwC;AAC1C;;AAEA;EACE,wCAAwC;EACxC,wBAAwB;AAC1B;;AAEA;EACE,wCAAwC;EACxC,uBAAuB;AACzB;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,+BAA+B;AACjC",sourcesContent:[".key {\n background-color: var(--key-bg-base);\n}\n.selectable:hover {\n cursor: pointer;\n border: 4px solid var(--selection);\n box-sizing: border-box;\n}\n\n.highlight {\n background-color: var(--selection);\n}\n.highlight:hover {\n background-color: var(--hover-selection);\n}\n\n.previewAdd {\n background-color: var(--hover-selection);\n filter: brightness(135%);\n}\n\n.previewRemove {\n background-color: var(--hover-selection);\n filter: brightness(75%);\n}\n\n.tip {\n position: absolute;\n bottom: 0;\n right: 50%;\n transform: translate(50%, 100%);\n}\n"],sourceRoot:""}]),u.locals={key:"lD5TsvdIbEAHNdmhfnlb",selectable:"yk89E4zK9zlO69OXhKn5",highlight:"pzTvsxKjpy6MqcFhxh9j",previewAdd:"r_Sdklnj57CE2ZjnBDw6",previewRemove:"Ich9T1nSzHs1a84insfp",tip:"_3U1zi1J1sXT41AzpAA1j"},n.Z=u},29750:function(e){e.exports=function(e,n,t){return e==e&&(void 0!==t&&(e=e<=t?e:t),void 0!==n&&(e=e>=n?e:n)),e}},74691:function(e,n,t){var r=t(29750),o=t(14841);e.exports=function(e,n,t){return void 0===t&&(t=n,n=void 0),void 0!==t&&(t=(t=o(t))==t?t:0),void 0!==n&&(n=(n=o(n))==n?n:0),r(o(e),n,t)}},48118:function(e,n,t){"use strict";var r=t(93379),o=t.n(r),i=t(7795),u=t.n(i),c=t(90569),a=t.n(c),l=t(3565),s=t.n(l),f=t(19216),b=t.n(f),y=t(44589),p=t.n(y),d=t(49040),v={};v.styleTagTransform=p(),v.setAttributes=s(),v.insert=a().bind(null,"head"),v.domAPI=u(),v.insertStyleElement=b(),o()(d.Z,v),n.Z=d.Z&&d.Z.locals?d.Z.locals:void 0}}]); //# sourceMappingURL=8371.f3862461b21b77cd6730.js.map