(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5819],{94062:function(n,r,e){"use strict";e.d(r,{Z:function(){return a}});var t=e(41051),o=e(2968),i=e(85893);function a(n){var r=n.url,e=n.text;return(0,i.jsxs)(o.Z,{external:!0,href:r,children:[(0,i.jsx)(t.Z,{name:"book"})," ",(0,i.jsx)("span",{children:e})]})}},97494:function(n,r,e){"use strict";e.d(r,{Z:function(){return B}});var t=e(45697),o=e.n(t),i=e(93379),a=e.n(i),l=e(7795),c=e.n(l),u=e(90569),s=e.n(u),d=e(3565),p=e.n(d),A=e(19216),f=e.n(A),b=e(44589),m=e.n(b),y=e(33988),h={};h.styleTagTransform=m(),h.setAttributes=p(),h.insert=s().bind(null,"head"),h.domAPI=c(),h.insertStyleElement=f(),a()(y.Z,h);var g=y.Z&&y.Z.locals?y.Z.locals:void 0,v=e(85893);function x(n){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},x(n)}var C=["validator","required","value"];function E(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function j(n){for(var r=1;r=0||(o[e]=n[e]);return o}(n,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}(n,C),l=r(i)||!i&&t&&"cannot be empty";return(0,v.jsxs)("span",{className:g.wrapper,children:[(0,v.jsx)("input",j({type:"text",value:i},a)),l&&(0,v.jsx)("span",{className:g.error,children:l})]})}B.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},49443:function(n,r,e){"use strict";e.d(r,{Z:function(){return g}});var t=e(67294),o=e(45697),i=e.n(o),a=e(97494),l={useRaw:i().bool,raw:i().string,parsed:i().any},c={name:i().string.isRequired,labels:i().arrayOf(i().string).isRequired,properties:i().objectOf((function(n,r,e,t,o){try{i().checkPropTypes({propValue:i().shape(l).isRequired},{propValue:n},t,e)}catch(n){return new Error("Invalid prop `"+o+"` supplied to `"+e+"`. Validation failed.")}})).isRequired},u=e(62417),s=e(85893);function d(n){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},d(n)}function p(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function A(n){for(var r=1;rn.length)&&(r=n.length);for(var e=0,t=new Array(r);en.length)&&(r=n.length);for(var e=0,t=new Array(r);e=0||(o[e]=n[e]);return o}(n,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}function U(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function M(n){for(var r=1;rn.length)&&(r=n.length);for(var e=0,t=new Array(r);e":on("GT"),"/":on("FSLH"),"?":on("QMARK")};var cn=function(n){var r,e,o=n.onClose,i=(r=(0,t.useState)("Type something..."),e=2,function(n){if(Array.isArray(n))return n}(r)||function(n,r){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(e=e.call(n)).next,0===r){if(Object(e)!==e)return;c=!1}else for(;!(c=(t=i.call(e)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(n){u=!0,o=n}finally{try{if(!c&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,e)||en(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],l=i[1],c=(0,t.useMemo)((function(){return a.split("").reduce((function(n,r){var e=function(n){if(ln[n])return ln[n];var r,e=function(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=en(n))){e&&(n=e);var t=0,o=function(){};return{s:o,n:function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}},e:function(n){throw n},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,a=!0,l=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){l=!0,i=n},f:function(){try{a||null==e.return||e.return()}finally{if(l)throw i}}}}(an);try{for(e.s();!(r=e.n()).done;){var t=r.value,o=t.pattern,i=t.convert;if(n.match(o))return i(n)}}catch(n){e.e(n)}finally{e.f()}}(r);return e&&n.push(e),n}),[])}),[a]),u=(0,rn.NE)(c),s=(0,t.useCallback)((function(n){n&&(n.focus(),n.select())}),[]);return(0,O.jsx)(K.Z,{children:(0,O.jsxs)(z.Z,{dismissText:!1,children:[(0,O.jsx)("h2",{children:"Create Typing Sequence"}),(0,O.jsx)("p",{children:"Type a message to generate a sequence of bindings in the macro."}),(0,O.jsx)("textarea",{value:a,ref:s,style:{width:"100%",height:"6rem"},onChange:function(n){return l(n.target.value)}}),(0,O.jsx)("div",{className:C.macroBindings,children:u.map((function(n,r){return(0,O.jsx)(t.Fragment,{children:(0,O.jsx)(Q.Z,{selectable:!1,themeClass:nn()(X.Z.keyDefaultTheme,X.Z.unified),children:(0,O.jsx)(F.Z,{node:n.params[0],onSelect:function(){}})})},r)}))}),(0,O.jsxs)("div",{className:C.macroActions,children:[(0,O.jsx)(J.Z,{onClick:function(){return o(u)},children:"Add to macro"}),(0,O.jsx)(J.Z,{onClick:function(){return o([])},secondary:!0,children:"Cancel"})]})]})})},un=e(82607),sn=e(41051),dn=e(56803),pn=e(29709),An=e(80671);function fn(n){return fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fn(n)}function bn(n){return function(n){if(Array.isArray(n))return hn(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||yn(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mn(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(e=e.call(n)).next,0===r){if(Object(e)!==e)return;c=!1}else for(;!(c=(t=i.call(e)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(n){u=!0,o=n}finally{try{if(!c&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,r)||yn(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yn(n,r){if(n){if("string"==typeof n)return hn(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?hn(n,r):void 0}}function hn(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);en.length)&&(r=n.length);for(var e=0,t=new Array(r);en.length)&&(r=n.length);for(var e=0,t=new Array(r);en.length)&&(r=n.length);for(var e=0,t=new Array(r);e"},bindings:{parsed:[{value:"&none",params:[]}],raw:"&none"}}}}(l))}),[l,o]),d=(0,Tn.zq)(l);return(0,O.jsx)(K.Z,{onDismiss:i,children:(0,O.jsxs)(z.Z,{dismissText:null,children:[(0,O.jsx)("h3",{children:"Add new macro"}),(0,O.jsx)("div",{children:(0,O.jsxs)("label",{children:["Macro name: ",(0,O.jsx)(Zn.Z,{required:!0,value:l,validator:Tn.zq,onChange:u})]})}),(0,O.jsx)("p",{children:(0,O.jsxs)("em",{children:["This value will be used for binding the macro's actions in your keymap (e.g. ",(0,O.jsxs)("code",{children:["&",l]}),") and should be unique. It will also be used internally for the node name and label property, which you can customize later."]})}),(0,O.jsxs)("div",{style:{textAlign:"center",margin:"10px"},children:[(0,O.jsx)(J.Z,{disabled:!l||d,onClick:s,children:"Create"}),(0,O.jsx)(J.Z,{onClick:i,secondary:!0,children:"Cancel"})]})]})})}function Nn(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);en.length)&&(r=n.length);for(var e=0,t=new Array(r);e * {\n margin: 5px;\n}\n\n.TBgT7nB7JSSjnTpMQeXp {\n position: relative;\n width: 450px;\n /* border: 1px solid lightgray; */\n margin: 0 auto;\n padding: 5px;\n\n display: flex;\n flex-wrap: wrap;\n}\n\n.TBgT7nB7JSSjnTpMQeXp > * {\n margin: 5px;\n width: 65px;\n height: 65px;\n}\n\n.YMJbsLvnEGObUy4Y_i6w {\n width: 100%;\n height: 30px;\n box-sizing: border-box;\n}\n.YMJbsLvnEGObUy4Y_i6w:hover {\n background-color: var(--hover-selection);\n color: var(--key-color-hover);\n}\n.YMJbsLvnEGObUy4Y_i6w > :first-child {\n width: 100% !important;\n height: 100% !important;\n}\n\n.TBgT7nB7JSSjnTpMQeXp [draggable] {\n cursor: grab;\n}\n\n.I5drc4dA5Kpshp3PPle1 {\n visibility: hidden;\n position: absolute;\n top: 0px;\n right: 0px;\n font-size: 80%;\n\n color: var(--key-color-hover);\n}\n.I5drc4dA5Kpshp3PPle1 > * {\n margin: 2px;\n opacity: 0.5;\n cursor: pointer;\n}\n.TBgT7nB7JSSjnTpMQeXp :hover .I5drc4dA5Kpshp3PPle1 {\n visibility: visible;\n z-index: 10;\n}\n\n.I5drc4dA5Kpshp3PPle1 :hover {\n opacity: 1;\n}\n\n\n.iD9DsKMZZ1dQxr04488w {\n margin: 10px 0;\n display: flex;\n}\n\n.iD9DsKMZZ1dQxr04488w label {\n display: inline-block;\n width: 120px;\n text-align: right;\n margin-right: 10px;\n}\n\n.quGO7XFPrHoYiqu22mwg {\n font-size: 80%;\n}","",{version:3,sources:["webpack://./src/Keyboard/Macros/styles.module.css"],names:[],mappings:"AAAA;EACE,oBAAoB;AACtB;;AAEA;EACE,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,kBAAkB;EAClB,gBAAgB;EAChB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,YAAY;EACZ,sBAAsB;AACxB;AACA;EACE,aAAa;EACb,kBAAkB;EAClB,8BAA8B;EAC9B,2CAA2C;EAC3C,aAAa;AACf;AACA;EACE,SAAS;EACT,eAAe;AACjB;AACA;EACE,eAAe;EACf,YAAY;EACZ,YAAY;AACd;AACA;EACE,UAAU;AACZ;AACA;EACE,oBAAoB;AACtB;;AAEA;EACE,kBAAkB;AACpB;AACA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,cAAc;EACd,YAAY;;EAEZ,aAAa;EACb,eAAe;AACjB;;AAEA;EACE,WAAW;EACX,WAAW;EACX,YAAY;AACd;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB;AACxB;AACA;EACE,wCAAwC;EACxC,6BAA6B;AAC/B;AACA;EACE,sBAAsB;EACtB,uBAAuB;AACzB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,cAAc;;EAEd,6BAA6B;AAC/B;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;AACjB;AACA;EACE,mBAAmB;EACnB,WAAW;AACb;;AAEA;EACE,UAAU;AACZ;;;AAGA;EACE,cAAc;EACd,aAAa;AACf;;AAEA;EACE,qBAAqB;EACrB,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,cAAc;AAChB",sourcesContent:[".main {\n padding-bottom: 60px;\n}\n\n.header, .footer {\n width: 550px;\n margin: 1px auto;\n}\n.footer {\n text-align: center;\n margin-top: 10px;\n padding-top: 20px;\n border-top: 2px solid var(--key-bg-base);\n}\n\n.macro {\n width: 550px;\n margin: 10px auto 40px;\n}\n.heading {\n display: flex;\n position: relative;\n justify-content: space-between;\n border-bottom: 2px solid var(--key-bg-base);\n margin: 5px 0;\n}\n.heading h5 {\n margin: 0;\n cursor: pointer;\n}\n.action {\n cursor: pointer;\n padding: 5px;\n opacity: 0.6;\n}\n.action:hover {\n opacity: 1;\n}\n.remove {\n color: var(--delete);\n}\n\n.macroActions {\n text-align: center;\n}\n.macroActions > * {\n margin: 5px;\n}\n\n.macroBindings {\n position: relative;\n width: 450px;\n /* border: 1px solid lightgray; */\n margin: 0 auto;\n padding: 5px;\n\n display: flex;\n flex-wrap: wrap;\n}\n\n.macroBindings > * {\n margin: 5px;\n width: 65px;\n height: 65px;\n}\n\n.controlBinding {\n width: 100%;\n height: 30px;\n box-sizing: border-box;\n}\n.controlBinding:hover {\n background-color: var(--hover-selection);\n color: var(--key-color-hover);\n}\n.controlBinding > :first-child {\n width: 100% !important;\n height: 100% !important;\n}\n\n.macroBindings [draggable] {\n cursor: grab;\n}\n\n.actions {\n visibility: hidden;\n position: absolute;\n top: 0px;\n right: 0px;\n font-size: 80%;\n\n color: var(--key-color-hover);\n}\n.actions > * {\n margin: 2px;\n opacity: 0.5;\n cursor: pointer;\n}\n.macroBindings :hover .actions {\n visibility: visible;\n z-index: 10;\n}\n\n.actions :hover {\n opacity: 1;\n}\n\n\n.field {\n margin: 10px 0;\n display: flex;\n}\n\n.field label {\n display: inline-block;\n width: 120px;\n text-align: right;\n margin-right: 10px;\n}\n\n.betaDisclaimer {\n font-size: 80%;\n}"],sourceRoot:""}]),a.locals={main:"kc8Au327pmIjKO7auLXT",header:"iNHvhyaEJ4ILoK0oc97e",footer:"QSl4rRImPNo_Abu68kKW",macro:"Us3Ihf0AoVbZvDulP74Q",heading:"OVI4IkVsVzyk0eIAn9NX",action:"QNlSO_GSGhRfUFRE_v8E",remove:"DvzBwGDH7HsnnIbqaeHi",macroActions:"mwhR_W7iqHq803xNBV1H",macroBindings:"TBgT7nB7JSSjnTpMQeXp",controlBinding:"YMJbsLvnEGObUy4Y_i6w",actions:"I5drc4dA5Kpshp3PPle1",field:"iD9DsKMZZ1dQxr04488w",betaDisclaimer:"quGO7XFPrHoYiqu22mwg"},r.Z=a},18446:function(n,r,e){var t=e(90939);n.exports=function(n,r){return t(n,r)}}}]); //# sourceMappingURL=MacroEditorTab.11d13c9431471c82e581.js.map