diff options
author | Nick Coutsos <[email protected]> | 2023-06-11 20:35:25 -0400 |
---|---|---|
committer | Nick Coutsos <[email protected]> | 2023-06-11 20:35:25 -0400 |
commit | 8718457edc552b90617308a64e30317bc1e1dde6 (patch) | |
tree | c03d860f44cb0676dc82e4c39c95fece0a40dec2 /6849.c22b9b4835cd4f1484cd.js | |
parent | a9ee0fef6c89ccaa9d80e85ef6106302c323ee28 (diff) | |
download | keymap-editor-8718457edc552b90617308a64e30317bc1e1dde6.tar.gz keymap-editor-8718457edc552b90617308a64e30317bc1e1dde6.zip |
Simplify binding updates
Diffstat (limited to '6849.c22b9b4835cd4f1484cd.js')
-rw-r--r-- | 6849.c22b9b4835cd4f1484cd.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/6849.c22b9b4835cd4f1484cd.js b/6849.c22b9b4835cd4f1484cd.js new file mode 100644 index 0000000..0e8088b --- /dev/null +++ b/6849.c22b9b4835cd4f1484cd.js @@ -0,0 +1,2 @@ +(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6849],{97494:function(n,e,r){"use strict";r.d(e,{Z:function(){return w}});var t=r(45697),o=r.n(t),i=r(93379),a=r.n(i),l=r(7795),s=r.n(l),u=r(90569),c=r.n(u),d=r(3565),A=r.n(d),p=r(19216),f=r.n(p),y=r(44589),b=r.n(y),g=r(33988),h={};h.styleTagTransform=b(),h.setAttributes=A(),h.insert=c().bind(null,"head"),h.domAPI=s(),h.insertStyleElement=f(),a()(g.Z,h);var m=g.Z&&g.Z.locals?g.Z.locals:void 0,v=r(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,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function j(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){k(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function k(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==x(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==x(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===x(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function w(n){var e=n.validator,r=n.required,t=void 0!==r&&r,o=n.value,i=void 0===o?"":o,a=function(n,e){if(null==n)return{};var r,t,o=function(n,e){if(null==n)return{};var r,t,o={},i=Object.keys(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,C),l=e(i)||!i&&t&&"cannot be empty";return(0,v.jsxs)("span",{className:m.wrapper,children:[(0,v.jsx)("input",j({type:"text",value:i},a)),l&&(0,v.jsx)("span",{className:m.error,children:l})]})}w.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},32732:function(n,e,r){"use strict";r.d(e,{Z:function(){return I}});var t=r(45697),o=r.n(t),i=r(78718),a=r.n(i),l=r(26523),s=r(95872);function u(n){return u="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},u(n)}function c(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function d(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){A(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function A(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==u(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==u(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===u(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}var p={x:o().number.isRequired,y:o().number.isRequired},f={a:o().number,rx:o().number,ry:o().number},y={u:o().number,h:o().number},b=o().shape(d(d(d({},p),f),y)),g=o().arrayOf(b),h=r(85893);function m(n){return m="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},m(n)}var v=["keyLayout","children"];function x(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function C(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){E(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function E(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==m(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==m(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===m(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}var j=function(n){return a()(n,["x","y"])},k=function(n){return{x:n.rx,y:n.ry,a:n.r}},w=function(n){var e=n.w,r=void 0===e?1:e,t=n.u,o=void 0===t?r:t,i=n.h;return{u:o,h:void 0===i?1:i}};function B(n){var e=n.keyLayout,r=n.children,t=function(n,e){if(null==n)return{};var r,t,o=function(n,e){if(null==n)return{};var r,t,o={},i=Object.keys(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,v),o=j(e),i=k(e),a=w(e),u=(0,l.Pi)(o,a,i);return(0,h.jsx)("div",C(C({className:s.Z.placer,style:u,"data-u":a.u,"data-h":a.h},t),{},{children:r}))}B.propTypes={scale:o().number,keyLayout:b.isRequired},B.defaultProps={scale:1};var S=B;function O(n){var e=n.layout,r=n.renderKey,t=n.scale;return(0,h.jsx)("div",{style:{position:"relative",transform:"scale(".concat(t,")"),transformOrigin:0},children:e.map((function(n,e){return(0,h.jsx)(S,{keyLayout:n,children:r({index:e,keyLayout:n})},e)}))})}O.propTypes={layout:g.isRequired,renderKey:o().func.isRequired,scale:o().number},O.defaultProps={scale:1};var I=O},86849:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return ie}});var t=r(67294),o=r(95998),i=r(45697),a=r.n(i),l=r(80736),s=r(41051),u=r(93379),c=r.n(u),d=r(7795),A=r.n(d),p=r(90569),f=r.n(p),y=r(3565),b=r.n(y),g=r(19216),h=r.n(g),m=r(44589),v=r.n(m),x=r(56634),C={};C.styleTagTransform=v(),C.setAttributes=b(),C.insert=f().bind(null,"head"),C.domAPI=A(),C.insertStyleElement=h(),c()(x.Z,C);var E=x.Z&&x.Z.locals?x.Z.locals:void 0,j=r(85893);function k(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function w(n){var e,r,o=n.actions,i=(e=(0,t.useState)(!1),r=2,function(n){if(Array.isArray(n))return n}(e)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||function(n,e){if(n){if("string"==typeof n)return k(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(n,e):void 0}}(e,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.")}()),a=i[0],l=i[1],u=(0,t.useRef)(),c=(0,t.useCallback)((function(n){u.current&&!u.current.contains(n.target)&&l(!1)}),[u,l]);return(0,t.useEffect)((function(){return document.body.addEventListener("click",c),function(){return document.body.removeEventListener("click",c)}}),[c]),(0,j.jsxs)("div",{ref:u,className:[E.menu,a&&E.open].join(" "),children:[(0,j.jsx)("p",{onClick:function(){return l(!a)},children:(0,j.jsx)(s.Z,{name:"ellipsis"})}),(0,j.jsx)("ul",{children:o.map((function(n,e){return(0,j.jsx)("li",{onClick:function(){return function(n){l(!1),n()}(n.callback)},children:n.content},e)}))})]})}function B(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function S(n){var e,r=n.layerIndex,i=n.additionalActions,a=void 0===i?[]:i,s=(0,o.I0)(),u=(0,t.useMemo)((function(){return{transparentToKeypress:function(){return s((0,l.c7)({layerIndex:r}))},transparentToNone:function(){return s((0,l.sT)({layerIndex:r}))},noneToKeypress:function(){return s((0,l.UH)({layerIndex:r}))},noneToTransparent:function(){return s((0,l.v1)({layerIndex:r}))},emptyKeypressToTransparent:function(){return s((0,l.QR)({layerIndex:r}))},emptyKeypressToNone:function(){return s((0,l.En)({layerIndex:r}))}}}),[s,r]);return(0,j.jsx)(w,{actions:[].concat((e=a,function(n){if(Array.isArray(n))return B(n)}(e)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(e)||function(n,e){if(n){if("string"==typeof n)return B(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(n,e):void 0}}(e)||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.")}()),[{callback:u.transparentToKeypress,content:(0,j.jsxs)(j.Fragment,{children:["Convert ",(0,j.jsx)("code",{children:"&trans"})," to ",(0,j.jsx)("code",{children:"&kp"})]})},{callback:u.transparentToNone,content:(0,j.jsxs)(j.Fragment,{children:["Convert ",(0,j.jsx)("code",{children:"&trans"})," to ",(0,j.jsx)("code",{children:"&none"})]})},{callback:u.noneToKeypress,content:(0,j.jsxs)(j.Fragment,{children:["Convert ",(0,j.jsx)("code",{children:"&none"})," to ",(0,j.jsx)("code",{children:"&kp"})]})},{callback:u.noneToTransparent,content:(0,j.jsxs)(j.Fragment,{children:["Convert ",(0,j.jsx)("code",{children:"&none"})," to ",(0,j.jsx)("code",{children:"&trans"})]})},{callback:u.emptyKeypressToTransparent,content:(0,j.jsxs)(j.Fragment,{children:["Convert ",(0,j.jsx)("code",{children:"&kp ⦸"})," to ",(0,j.jsx)("code",{children:"&trans"})]})},{callback:u.emptyKeypressToNone,content:(0,j.jsxs)(j.Fragment,{children:["Convert ",(0,j.jsx)("code",{children:"&kp ⦸"})," to ",(0,j.jsx)("code",{children:"&none"})]})}])})}w.propTypes={actions:a().arrayOf(a().shape({callback:a().func.isRequired,content:a().oneOfType([a().node,a().string]).isRequired})).isRequired},S.propTypes={layerIndex:a().number.isRequired,additionalActions:a().arrayOf(a().shape({callback:a().func.isRequired,content:a().oneOfType([a().node,a().string]).isRequired}))};var O=r(32732),I=r(82607),T=r(94184),Z=r.n(T),D=r(18029),P=r.n(D),U=r(64261),K=r(96186),Y=r(83197),q=r(91118),N=r(27213),L=r(55326),R=r(61953),W=r(98588),_=r(52156),z=r(4803),V=r(48118),X=r(20817);function Q(n){return Q="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},Q(n)}function M(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function G(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?M(Object(r),!0).forEach((function(e){H(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function H(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==Q(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==Q(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===Q(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function F(n){var e=n.keyPositions,r=n.scale,o=void 0===r?.2:r,i=n.styleOverrides,a=void 0===i?{}:i,l=(0,t.useContext)(X.V),s=l.layout,u=l.wrapperDimensions,c=(0,t.useMemo)((function(){return(0,z.fI)(u,{scale:o,overrides:G({position:"relative",pointerEvents:"none",padding:0,margin:0},a)})}),[o,u,a]);return(0,j.jsx)("div",{style:c,children:(0,j.jsx)(O.Z,{layout:s,bindings:[],scale:o,renderKey:function(n){var r,t=n.index;return(0,j.jsx)(q.Z,{onClick:function(){},selectable:!1,themeClass:Z()((r={},H(r,V.Z.key,!0),H(r,V.Z.highlight,e.includes(t)),r))})}})})}var J=r(2968),$=r(27926);function nn(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return en(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?en(n,e):void 0}}(n,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.")}()}function en(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var rn="https://github.com/nickcoutsos/keymap-editor/discussions/109";function tn(n){var e=n.binding,r=n.bindingIndex,o=n.onUpdate,i=n.onCancel,a=n.context,l=void 0===a?"none":a,u=nn((0,t.useState)(e),2),c=u[0],d=u[1],A=nn((0,L.Z)(c,void 0,d),2),p=A[0],f=p.bindTree,y=p.behavior,b=p.behaviorParams,g=p.editing,h=p.invalid,m=A[1],v=m.clearEditing,x=m.handleUpdateBindValue,C=m.selectNodeForEditing,E=(0,t.useCallback)((function(){o(c)}),[c,o]);return(0,j.jsxs)(U.Z,{onDismiss:i,children:[(0,j.jsx)("div",{style:{position:"absolute",top:0,background:"var(--bg)",borderRadius:"30px",boxShadow:"0px 10px 25px rgba(0, 0, 0, 0.4)",fontSize:"80%",width:"541px",padding:"0 20px",margin:"20px 0"},children:(0,j.jsxs)("p",{style:{margin:"5px 0"},children:[(0,j.jsx)(s.Z,{name:"bullhorn"})," I'm trying out a new way of editing bindings, if you hate it then ",(0,j.jsx)(J.Z,{href:rn,external:!0,children:"please let me know"}),"!"]})}),(0,j.jsxs)(K.Z,{dismissText:null,style:{width:"500px"},children:[(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid var(--key-bg-base)",paddingBottom:"20px",gap:"40px"},children:[(0,j.jsx)(F,{keyPositions:[r],styleOverrides:{display:"inline-block",padding:"3px",borderRadius:"3px"},scale:.15}),(0,j.jsx)(s.Z,{name:"arrow-right"}),(0,j.jsx)(q.Z,{selectable:!1,style:{pointerEvents:"none"},children:(0,j.jsx)(N.Z,{context:l,value:c.value,params:c.params,onUpdate:function(){}})})]}),(0,j.jsx)("h2",{children:"Set Key Binding"}),(0,j.jsxs)("h3",{children:["Behavior ",(0,j.jsx)("div",{style:{display:"inline-block",fontSize:"initial",fontWeight:"normal"},children:(0,j.jsx)("span",{className:R.Z.extracted,children:(0,j.jsx)("span",{className:R.Z.param,children:(0,j.jsx)(_.ZP,{slot:"behaviour",node:f,expanded:!0,onSelect:C})})})})]}),(0,j.jsx)(on,{slots:b,node:f,onSelect:C}),g&&(0,j.jsx)(W.Z,{node:g.node,type:g.type,behaviour:y,context:l,prompt:g.prompt,searchKey:"code",onSelect:x,onCancel:v}),(0,j.jsxs)("div",{style:{textAlign:"center"},children:[(0,j.jsx)($.Z,{onClick:E,disabled:h,children:"Okay"}),(0,j.jsx)($.Z,{onClick:i,secondary:!0,children:"Cancel"})]})]})]})}function on(n){var e=n.slots,r=n.node,t=n.onSelect,o={listStyleType:1===e.length?"none":void 0};return 0===e.length?null:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h3",{children:"Parameters"}),(0,j.jsx)("ol",{style:o,children:e.map((function(n,e){return"placeholder"!==n.type&&(0,j.jsx)(an,{slot:n,param:r.params[e],onSelect:t},e)}))})]})}function an(n){var e=n.slot,r=n.param,o=n.onSelect,i=(0,t.useMemo)((function(){var n=e.raw?"Raw value":e.name||e,r={code:"key-code"}[n]||n;return P()(r)}),[e]);return(0,j.jsxs)("li",{style:{margin:"15px 0"},children:[(0,j.jsx)("label",{children:i}),(0,j.jsx)("span",{className:Z()(R.Z.extracted),children:(0,j.jsx)(Y.N,{slot:e,node:r,onSelect:o,expanded:!0})})]})}function ln(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function sn(n){var e,r,i=n.layout,a=n.activeLayer,s=(0,o.I0)(),u=(0,o.v9)(l.vl)[a].properties.bindings,c=(e=(0,t.useState)(null),r=2,function(n){if(Array.isArray(n))return n}(e)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||function(n,e){if(n){if("string"==typeof n)return ln(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ln(n,e):void 0}}(e,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.")}()),d=c[0],A=c[1],p=(0,t.useCallback)((function(n,e){s((0,l.V6)({layerIndex:a,bindIndex:n,binding:e}))}),[s,a]);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(O.Z,{layout:i,renderKey:function(n){var e,r,t=n.index,o=n.keyLayout;return u.parsed[t]&&(0,j.jsx)(I.Z,{label:o.label,value:null===(e=u.parsed[t])||void 0===e?void 0:e.value,params:null===(r=u.parsed[t])||void 0===r?void 0:r.params,noBindingClick:!0,keyWrapperProps:{className:R.Z.unified,onClick:function(n){n.stopPropagation(),A(t)}},onUpdate:function(n){return p(t,n)}})}}),null!==d&&(0,j.jsx)(tn,{binding:u.parsed[d],bindingIndex:d,onCancel:function(){return A(null)},onUpdate:function(n){p(d,n),A(null)}})]})}tn.propTypes={context:a().string,hideBehaviour:a().bool.isRequired,onUpdate:a().func.isRequired},tn.defaultProps={hideBehaviour:!1};var un=r(67069);function cn(n){var e=n.context,r=n.binding,t=n.onUpdate,o=r.value,i=r.params;return(0,j.jsx)(q.Z,{themeClass:R.Z.encoder2,children:(0,j.jsx)(N.Z,{context:e,value:o,params:i,onUpdate:t})})}cn.propTypes={binding:un.dH,onUpdate:a().func.isRequired};var dn=cn,An=r(59500),pn={};pn.styleTagTransform=v(),pn.setAttributes=b(),pn.insert=f().bind(null,"head"),pn.domAPI=A(),pn.insertStyleElement=h(),c()(An.Z,pn);var fn=An.Z&&An.Z.locals?An.Z.locals:void 0;function yn(n){var e=n.layerIndex,r=n.layer,t=n.sensors,i=(0,o.I0)(),a=(r.properties["sensor-bindings"]||{}).parsed,s=void 0===a?[]:a;function u(n,r){i((0,l.zi)({layerIndex:e,sensorIndex:n,bindings:r}))}return(0,j.jsxs)("div",{style:{margin:"0 0 30px"},children:[(0,j.jsx)("h3",{children:"Sensor bindings"}),(0,j.jsx)("div",{style:{display:"flex",flexDirection:"row",gap:"25px"},children:t.map((function(n,e){return(0,j.jsx)(bn,{index:e,sensor:n,binding:s[e],canAdd:void 0===s[e]&&s.length===e,canDelete:void 0!==s[e]&&s.length===e+1,onUpdate:u},e)}))})]})}function bn(n){var e=n.sensor,r=n.binding,o=n.index,i=n.onUpdate,a=n.canAdd,l=n.canDelete,u=e.label||e.identifier,c=(null==r?void 0:r.value)||"&inc_dec_kp",d=(null==r?void 0:r.params)||[{value:0,_isPlaceholder:!0,params:[]},{value:0,_isPlaceholder:!0,params:[]}],A=(0,t.useCallback)((function(){i(o,void 0)}),[o,i]),p=(0,t.useCallback)((function(){i(o,{value:"&inc_dec_kp",params:[{value:0,_isPlaceholder:!0,params:[]},{value:0,_isPlaceholder:!0,params:[]}]})}),[o,i]);return(0,j.jsxs)("div",{className:fn.sensor,"data-unbound":!r,children:[(0,j.jsxs)("label",{style:{fontVariant:"small-caps",fontSize:"90%"},children:[(0,j.jsx)("code",{children:u}),l&&(0,j.jsx)(s.Z,{name:"trash-can",title:"Remove sensor binding from this layer",className:fn.deleteSensorBinding,onClick:A})]}),r&&(0,j.jsx)(dn,{context:"encoders",binding:r||{value:c,params:d},onUpdate:function(n){return i(o,n)}}),a&&(0,j.jsx)(q.Z,{onClick:p,title:"Add sensor binding to this layer",themeClass:Z()(R.Z.encoder2,fn.addSensorBinding),children:(0,j.jsx)(s.Z,{name:"add"})})]})}var gn=r(97494),hn=r(62417);function mn(n){return mn="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},mn(n)}function vn(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function xn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vn(Object(r),!0).forEach((function(e){Cn(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):vn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function Cn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==mn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==mn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===mn(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function En(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var jn=function(n){var e,r,i,a=n.layerIndex,s=n.onClose,u=(0,o.I0)(),c=(0,o.v9)(l.vl)[a],d=(r=(0,t.useState)({name:c.name,label:(null===(e=c.properties.label)||void 0===e?void 0:e.parsed)||""}),i=2,function(n){if(Array.isArray(n))return n}(r)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,i)||function(n,e){if(n){if("string"==typeof n)return En(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?En(n,e):void 0}}(r,i)||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=d[0],p=d[1];return(0,j.jsx)(U.Z,{onDismiss:s,children:(0,j.jsxs)(K.Z,{dismissText:"",children:[(0,j.jsxs)("h2",{children:["Customize Layer ",(0,j.jsx)("code",{children:c.name})]}),(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{className:fn.field,children:[(0,j.jsx)("label",{htmlFor:"customize-layer-name",children:"Name"}),(0,j.jsx)(gn.Z,{id:"customize-layer-name",placeholder:"Default",value:A.name,validator:hn.Gk,onChange:function(n){return p((function(e){return xn(xn({},e),{},{name:n.target.value})}))}})]}),(0,j.jsxs)("div",{className:fn.field,children:[(0,j.jsx)("label",{htmlFor:"customize-layer-label",children:"Label"}),(0,j.jsx)("input",{id:"customize-layer-label",placeholder:"Default",value:A.label,onChange:function(n){return p((function(e){return xn(xn({},e),{},{label:n.target.value})}))}})]})]}),(0,j.jsxs)("div",{style:{textAlign:"center",gap:"5px"},children:[(0,j.jsx)($.Z,{onClick:function(){u((0,l.vc)(xn({layerIndex:a},A))),s()},children:"OK"}),(0,j.jsx)($.Z,{onClick:s,secondary:!0,children:"Cancel"})]})]})})},kn=r(39693),wn=r.n(kn),Bn=r(2062),Sn=r(62029);function On(n,e){if(n){if("string"==typeof n)return In(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?In(n,e):void 0}}function In(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var Tn={keysHeld:[],keysHeldBeforeLastRelease:[]};function Zn(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return Dn(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dn(n,e):void 0}}(n,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.")}()}function Dn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var Pn={Alt:"ALT",Control:"CTRL",Shift:"SHFT",Meta:"GUI",ArrowUp:"UP",ArrowDown:"DOWN",ArrowLeft:"LEFT",ArrowRight:"RIGHT",Escape:"ESC",Tab:"TAB",Enter:"RET",Home:"HOME",End:"END",PageDown:"PG_DN",PageUp:"PG_UP",Backspace:"BSPC",Delete:"DEL"};function Un(n,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(0,o.I0)(),a=Zn((0,t.useState)(r),2),s=a[0],u=a[1],c=Zn((0,t.useState)(0),2),d=c[0],A=c[1],p=(0,t.useCallback)((function(){d===e.length-1?(A(0),u(!1)):A(d+1)}),[d,A,e.length,u]);!function(n,e){var r,o,i=(r=(0,t.useReducer)((function(n,e){switch(e.type){case"KEY_DOWN":return function(n,e){return{keysHeld:[].concat((r=n.keysHeld,function(n){if(Array.isArray(n))return In(n)}(r)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(r)||On(r)||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.")}()),[e.event.key]),keysHeldBeforeLastRelease:[]};var r}(n,e);case"KEY_UP":return function(n,e){return{keysHeld:[],keysHeldBeforeLastRelease:n.keysHeld.filter((function(n){return n!==e.event.key}))}}(n,e);case"RESET":return Tn;default:return n}}),Tn),o=2,function(n){if(Array.isArray(n))return n}(r)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,o)||On(r,o)||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],s=(0,t.useCallback)((function(n){n.repeat||(n.preventDefault(),l({type:"KEY_DOWN",event:n}))}),[l]),u=(0,t.useCallback)((function(n){a.keysHeldBeforeLastRelease.includes(n.key)||(n.preventDefault(),e(n),l({type:"KEY_UP",event:n}))}),[a.keysHeldBeforeLastRelease,e,l]);(0,t.useEffect)((function(){if(n)return document.body.addEventListener("keydown",s),document.body.addEventListener("keyup",u),function(){document.body.removeEventListener("keydown",s),document.body.removeEventListener("keyup",u)}}),[n,s,u])}(s,(0,t.useCallback)((function(e){var r=function(n){var e=function(n){return wn()([n.altKey&&"LA",n.ctrlKey&&"LC",n.metaKey&&"LG",n.shiftKey&&"LS"])}(n),r=(0,Sn.mapCharacter)(n.key.toLowerCase())||function(n){var e=Pn[n.key],r=function(n){switch(n.location){case 1:return"L";case 2:return"R";default:return""}}(n);return e?{value:"&kp",params:[{value:r+e,params:[]}]}:null}(n);if(r)return{value:r.value,params:e.reduce((function(n,e){return[{value:e,params:n}]}),r.params)}}(e);r&&(i((0,l.V6)({layerIndex:n,bindIndex:d,binding:r})),p())}),[n,d,p,i]));var f=(0,t.useCallback)((function(){u(!0)}),[u]),y=(0,t.useCallback)((function(){u(!1)}),[u]);return[{isActive:s,bindIndex:d},{startQuickAssignment:f,cancelQuickAssignment:y,setBindIndex:A}]}function Kn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function Yn(n){var e,r,o=n.layout,i=n.layer,a=n.layerIndex,l=n.onClose,s=(e=Un(a,o,!0),r=2,function(n){if(Array.isArray(n))return n}(e)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||function(n,e){if(n){if("string"==typeof n)return Kn(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kn(n,e):void 0}}(e,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.")}()),u=s[0],c=s[1],d=(0,t.useMemo)((function(){return(0,z.fI)(o,{overrides:{minWidth:"400px"}})}),[o]);return(0,t.useEffect)((function(){u.isActive||l()}),[u.isActive,l]),(0,j.jsx)(U.Z,{onDismiss:l,children:(0,j.jsxs)(K.Z,{classes:[fn.quickAssignDialog],dismissText:"",children:[(0,j.jsx)("h2",{children:"Quick-assign layer keybindings"}),(0,j.jsxs)("p",{children:["Press a key on your keyboard to set a ",(0,j.jsx)("code",{children:"&kp"})," binding at the highlighted position in your keymap."]}),(0,j.jsx)("div",{style:d,children:(0,j.jsx)(O.Z,{layout:o,bindings:i.properties.bindings.parsed,renderKey:function(n){var e,r,t=n.index,o=n.keyLayout;return i.properties.bindings.parsed[t]&&(0,j.jsx)(I.Z,{label:o.label,keyWrapperProps:{selectable:!1,onClick:function(){return c.setBindIndex(t)},className:wn()([fn.quickBindKey,u.bindIndex===t&&fn.quickBindKeyHighlight]).join(" ")},value:null===(e=i.properties.bindings.parsed[t])||void 0===e?void 0:e.value,params:null===(r=i.properties.bindings.parsed[t])||void 0===r?void 0:r.params,onUpdate:function(n){}})}})}),(0,j.jsxs)("div",{style:{textAlign:"center"},children:[(0,j.jsx)(Bn.Z,{children:"Click on a different key to jump ahead or correct a previous binding."}),(0,j.jsx)("p",{children:(0,j.jsx)($.Z,{onClick:l,children:"Done"})})]})]})})}function qn(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return Nn(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nn(n,e):void 0}}(n,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.")}()}function Nn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var Ln=function(n){return n.keyboard.sensors};function Rn(n){var e=n.layer,r=n.layerIndex,i=(n.isActiveLayer,(0,o.v9)(Ln)),a=qn((0,t.useState)(!1),2),l=a[0],s=a[1],u=qn((0,t.useState)(!1),2),c=u[0],d=u[1],A=(0,t.useContext)(X.V),p=A.layout,f=A.wrapperStyle,y=(0,t.useCallback)((function(){return s(!0)}),[s]),b=(0,t.useCallback)((function(){return d(!0)}),[d]),g=(0,t.useCallback)((function(){return d(!1)}),[d]),h=(0,t.useMemo)((function(){return[{callback:y,content:"Change Configuration"},{callback:b,content:(0,j.jsxs)(j.Fragment,{children:["Quick ",(0,j.jsx)("code",{children:"&kp"})," Assignment"]})}]}),[y,b]),m=f.width,v=f.height,x=f.margin,C=f.padding;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:fn.layerWrapper,style:{margin:x,padding:C},children:[(0,j.jsxs)("div",{style:{width:m},children:[(0,j.jsxs)("h3",{style:{position:"relative"},children:[e.name," ",(0,j.jsx)(S,{layerIndex:r,additionalActions:h})]}),(0,j.jsx)("div",{style:{height:v},children:(0,j.jsx)(sn,{layout:p,activeLayer:r})})]}),(0,j.jsx)("div",{className:fn.sensors,"data-sensor-count":i.length,style:{},children:(0,j.jsx)(yn,{sensors:i,layerIndex:r,layer:e})})]}),l&&(0,j.jsx)(jn,{layerIndex:r,onClose:function(){return s(!1)}}),c&&(0,j.jsx)(Yn,{layout:p,layer:e,layerIndex:r,onClose:g})]})}var Wn=r(30341),_n={};_n.styleTagTransform=v(),_n.setAttributes=b(),_n.insert=f().bind(null,"head"),_n.domAPI=A(),_n.insertStyleElement=h(),c()(Wn.Z,_n);var zn=Wn.Z&&Wn.Z.locals?Wn.Z.locals:void 0,Vn=r(56803),Xn=r(50868),Qn=r(81485),Mn=r(18311);function Gn(n){return Gn="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},Gn(n)}function Hn(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function Fn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Hn(Object(r),!0).forEach((function(e){Jn(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Hn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function Jn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==Gn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==Gn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===Gn(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function $n(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return ne(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ne(n,e):void 0}}(n,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.")}()}function ne(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function ee(n){var e=n.activeLayer,r=n.onSelect,i=(0,t.useRef)(null),a=(0,o.I0)(),u=(0,t.useContext)(X.V).bindingCount,c=(0,t.useContext)(Qn.c),d=(0,t.useContext)(Mn.v),A=(0,o.v9)(l.vl),p=(0,t.useCallback)((function(n){r(n)}),[r]),f=(0,t.useCallback)((function(){return a((0,l.Xv)({bindingCount:u}))}),[a,u]),y=(0,t.useMemo)((function(){return function(n){var e=A[n].name;window.confirm("Really delete layer: ".concat(e,"?"))&&(a((0,l.Q)({index:n})),a((0,Xn.fD)(n,null,A,c,d)))}}),[A,a,c,d]),b=(0,t.useCallback)((function(n,e){n.stopPropagation();var r=e.dragIndex,t=e.dropIndex;r!==t&&(a((0,l.WF)({currentIndex:r,targetIndex:t})),a((0,Xn.fD)(r,t,A,c,d)))}),[A,a,c,d]),g=function(n){var e=$n((0,t.useState)({dragIndex:null,dropIndex:null}),2),r=e[0],o=r.dragIndex,i=r.dropIndex,a=e[1],l=(0,t.useCallback)((function(n){return n.preventDefault()}),[]),s=(0,t.useCallback)((function(n){var e=Number(n.target.dataset.slotIndex);a({dragIndex:e,dropIndex:null})}),[a]),u=(0,t.useCallback)((function(n){a((function(e){return null===e.dropIndex&&n.stopPropagation(),{dragIndex:null,dropIndex:null}}))}),[a]),c=(0,t.useCallback)((function(n){n.preventDefault();var e=Number(n.target.dataset.dropPosition);a((function(n){return Fn(Fn({},n),{},{dropIndex:e})}))}),[a]),d=(0,t.useCallback)((function(n){var e=Number(n.target.dataset.dropPosition);a((function(n){return Fn(Fn({},n),{},{dropIndex:n.dropIndex===e?null:n.dropIndex})}))}),[a]),A=(0,t.useCallback)((function(e){n(e,{dragIndex:o,dropIndex:i}),a({dragIndex:null,dropIndex:null})}),[o,i,a,n]);return[{isDragging:null!==o,dragIndex:o,dropIndex:i},{handleDragStart:s,handleDragEnd:u,handleDragEnter:c,handleDragLeave:d,handleDragOver:l,handleDrop:A}]}(b),h=$n(g,2),m=h[0],v=h[1];return(0,j.jsx)("div",{className:zn.layerSelector,ref:i,children:(0,j.jsxs)("ul",{"data-dragging":m.isDragging,children:[A.map((function(n,r){return(0,j.jsxs)("li",{className:e===r?zn.active:"","data-slot-index":r,draggable:!0,onDragStart:v.handleDragStart,onDragEnd:v.handleDragEnd,onDrop:v.handleDrop,children:[(0,j.jsx)("div",{className:wn()([zn.dropper,m.dropIndex===r&&zn.dropTarget]).join(" "),"data-drop-position":r,onDragEnter:v.handleDragEnter,onDragOver:v.handleDragOver,onDragLeave:v.handleDragLeave,onDrop:v.handleDrop}),(0,j.jsxs)("div",{onClick:function(){return p(r)},className:wn()([zn.layer,m.dragIndex===r&&zn.dragging,m.isDragging&&m.dropIndex!==m.dragIndex&&m.dropIndex!==m.dragIndex+1&&null!==m.dropIndex&&r>=m.dropIndex&&zn.displaced]).join(" "),children:[(0,j.jsx)("span",{className:zn.index,children:r}),(0,j.jsxs)("span",{className:zn.name,children:[n.name,(0,j.jsx)(s.Z,{name:"times-circle",className:zn.delete,onClick:(0,Vn.s)((function(){return y(r)}))})]})]})]},"slot-".concat(r))})),m.isDragging&&m.dragIndex<A.length-1&&(0,j.jsx)("li",{"data-slot-index":A.length,onDragEnd:v.handleDragEnd,onDrop:v.handleDrop,children:(0,j.jsx)("div",{className:wn()([zn.dropper,m.dropIndex===A.length&&zn.dropTarget]).join(" "),"data-drop-position":A.length,onDragEnter:v.handleDragEnter,onDragOver:v.handleDragOver,onDragLeave:v.handleDragLeave,onDrop:v.handleDrop})},"slot-".concat(A.length)),!m.isDragging&&(0,j.jsx)("li",{onClick:f,children:(0,j.jsxs)("div",{className:zn.layer,children:[(0,j.jsx)(s.Z,{className:zn.index,name:"plus"}),(0,j.jsx)("span",{className:zn.name,children:"Add Layer"})]})})]})})}ee.propTypes={activeLayer:a().number.isRequired,onSelect:a().func.isRequired};var re=ee;function te(){var n=(0,o.I0)(),e=(0,t.useContext)(X.V).bindingCount;return(0,j.jsxs)("div",{style:{textAlign:"center"},children:[(0,j.jsx)("h3",{children:"No keymap layers defined"}),(0,j.jsx)($.Z,{onClick:function(){return n((0,l.Xv)({bindingCount:e}))},children:"Add layer"})]})}function oe(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var ie=function(){var n,e,r=(0,o.v9)(l.vl),i=(n=(0,t.useState)(0),e=2,function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);s=!0);}catch(n){u=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return oe(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oe(n,e):void 0}}(n,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],s=i[1],u=Math.max(0,Math.min(a,r.length-1));return 0===r.length?(0,j.jsx)(te,{}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(re,{activeLayer:u,onSelect:s}),(0,j.jsx)(Rn,{layer:r[u],layerIndex:u,isActiveLayer:!0})]})}},56803:function(n,e,r){"use strict";function t(n){return function(e){e.stopPropagation(),n()}}function o(n){return function(e){n[e.key]&&n[e.key]()}}r.d(e,{s:function(){return t},w:function(){return o}})},56634:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,".jThiLc5_BrUyl71v3rKn {\n display: inline-block;\n position: absolute;\n z-index: 1;\n font-size: 70%;\n padding: 5px 10px;\n margin-left: 10px;\n\n border-radius: 4px;\n}\n\n.jThiLc5_BrUyl71v3rKn p {\n display: inline-block;\n cursor: pointer;\n margin: 0;\n}\n\n.jThiLc5_BrUyl71v3rKn ul {\n display: none;\n}\n.jThiLc5_BrUyl71v3rKn.xG2GKlsc07jLEb2aMC6H {\n background: var(--dialog-bg, var(--bg));\n box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.5);\n}\n.jThiLc5_BrUyl71v3rKn.xG2GKlsc07jLEb2aMC6H ul {\n display: block;\n padding: 0;\n margin: 0;\n list-style-type: none;\n}\n\n.jThiLc5_BrUyl71v3rKn li {\n cursor: pointer;\n margin: 2px 0;\n line-height: 20px;\n padding: 0 5px;\n border-radius: 10px;\n}\n\n.jThiLc5_BrUyl71v3rKn li:hover {\n background-color: var(--hover-selection);\n color: white;\n}\n","",{version:3,sources:["webpack://./src/Common/action-menu.module.css"],names:[],mappings:"AAAA;EACE,qBAAqB;EACrB,kBAAkB;EAClB,UAAU;EACV,cAAc;EACd,iBAAiB;EACjB,iBAAiB;;EAEjB,kBAAkB;AACpB;;AAEA;EACE,qBAAqB;EACrB,eAAe;EACf,SAAS;AACX;;AAEA;EACE,aAAa;AACf;AACA;EACE,uCAAuC;EACvC,8CAA8C;AAChD;AACA;EACE,cAAc;EACd,UAAU;EACV,SAAS;EACT,qBAAqB;AACvB;;AAEA;EACE,eAAe;EACf,aAAa;EACb,iBAAiB;EACjB,cAAc;EACd,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,YAAY;AACd",sourcesContent:[".menu {\n display: inline-block;\n position: absolute;\n z-index: 1;\n font-size: 70%;\n padding: 5px 10px;\n margin-left: 10px;\n\n border-radius: 4px;\n}\n\n.menu p {\n display: inline-block;\n cursor: pointer;\n margin: 0;\n}\n\n.menu ul {\n display: none;\n}\n.menu.open {\n background: var(--dialog-bg, var(--bg));\n box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.5);\n}\n.menu.open ul {\n display: block;\n padding: 0;\n margin: 0;\n list-style-type: none;\n}\n\n.menu li {\n cursor: pointer;\n margin: 2px 0;\n line-height: 20px;\n padding: 0 5px;\n border-radius: 10px;\n}\n\n.menu li:hover {\n background-color: var(--hover-selection);\n color: white;\n}\n"],sourceRoot:""}]),a.locals={menu:"jThiLc5_BrUyl71v3rKn",open:"xG2GKlsc07jLEb2aMC6H"},e.Z=a},33988:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,".OaJISbD1WCmb03at77EG {\n position: relative;\n}\n\n.MUN9De8dUvbPGH9cEDoQ {\n position: absolute;\n z-index: 10;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 100%);\n max-width: 250px;\n width: 100%;\n\n border-radius: 4px;\n padding: 3px 5px;\n\n color: white;\n background-color: var(--error-highlight);\n font-size: 85%;\n font-family: sans-serif;\n\n opacity: 0.9;\n}\n.MUN9De8dUvbPGH9cEDoQ::before {\n position: absolute;\n display: block;\n content: ' ';\n z-index: -1;\n\n left: 50%;\n width: 10px;\n height: 10px;\n\n background-color: var(--error-highlight);\n transform: translate(-50%, -7px) rotate(45deg);\n}\n","",{version:3,sources:["webpack://./src/Common/input.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,SAAS;EACT,gCAAgC;EAChC,gBAAgB;EAChB,WAAW;;EAEX,kBAAkB;EAClB,gBAAgB;;EAEhB,YAAY;EACZ,wCAAwC;EACxC,cAAc;EACd,uBAAuB;;EAEvB,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,WAAW;;EAEX,SAAS;EACT,WAAW;EACX,YAAY;;EAEZ,wCAAwC;EACxC,8CAA8C;AAChD",sourcesContent:[".wrapper {\n position: relative;\n}\n\n.error {\n position: absolute;\n z-index: 10;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 100%);\n max-width: 250px;\n width: 100%;\n\n border-radius: 4px;\n padding: 3px 5px;\n\n color: white;\n background-color: var(--error-highlight);\n font-size: 85%;\n font-family: sans-serif;\n\n opacity: 0.9;\n}\n.error::before {\n position: absolute;\n display: block;\n content: ' ';\n z-index: -1;\n\n left: 50%;\n width: 10px;\n height: 10px;\n\n background-color: var(--error-highlight);\n transform: translate(-50%, -7px) rotate(45deg);\n}\n"],sourceRoot:""}]),a.locals={wrapper:"OaJISbD1WCmb03at77EG",error:"MUN9De8dUvbPGH9cEDoQ"},e.Z=a},49040:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.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:""}]),a.locals={key:"lD5TsvdIbEAHNdmhfnlb",selectable:"yk89E4zK9zlO69OXhKn5",highlight:"pzTvsxKjpy6MqcFhxh9j",previewAdd:"r_Sdklnj57CE2ZjnBDw6",previewRemove:"Ich9T1nSzHs1a84insfp",tip:"_3U1zi1J1sXT41AzpAA1j"},e.Z=a},30341:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,'.JeRmYfUKXTg9VqWZshKO {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n}\n.JeRmYfUKXTg9VqWZshKO > * {\n pointer-events: all;\n}\n\n.JeRmYfUKXTg9VqWZshKO ul {\n display: flex;\n position: relative;\n flex-direction: column;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.JeRmYfUKXTg9VqWZshKO li {\n position: relative;\n padding: 0;\n margin: 0;\n width: max-content;\n height: 34px;\n cursor: pointer;\n}\n.JeRmYfUKXTg9VqWZshKO .u2LnyyXbhUKWkR8h1WgY {\n cursor: grab;\n}\n.Svi1LYw7uQ_NUkdl_Qqu, .QHkrJNCowEE3i9FocgKe {\n background-color: rgba(201, 201, 201, 0.5);\n color: darkgray;\n border-radius: 15px;\n height: 30px;\n padding: 0px;\n margin: 2px;\n width: max-content;\n}\n.JeRmYfUKXTg9VqWZshKO:not([data-dragging="true"]) li:hover .Svi1LYw7uQ_NUkdl_Qqu {\n background-color: rgba(60, 179, 113, 0.85);\n color: white;\n padding-right: 35px;\n}\n[data-dragging="true"] .Svi1LYw7uQ_NUkdl_Qqu {\n padding-right: 35px;\n}\n.JeRmYfUKXTg9VqWZshKO .u2LnyyXbhUKWkR8h1WgY .Svi1LYw7uQ_NUkdl_Qqu {\n background-color: rgb(60, 179, 113);\n color: white;\n}\n\n.JeRmYfUKXTg9VqWZshKO li * {\n display: inline-block;\n}\n.JeRmYfUKXTg9VqWZshKO li .yVeX9ivshCU7PiJfbG2v {\n overflow: auto;\n width: 30px;\n height: 30px;\n line-height: 30px;\n text-align: center;\n}\n.JeRmYfUKXTg9VqWZshKO li .tV7QyJybi_Gy9OnFqX6l {\n overflow: hidden;\n width: 0;\n height: 30px;\n line-height: 30px;\n padding: 0;\n font-variant: small-caps;\n}\n\n.Svi1LYw7uQ_NUkdl_Qqu {\n margin: 4px 2px;\n transition: margin-top .15s ease-in;\n}\n.Svi1LYw7uQ_NUkdl_Qqu.pRqaGgm21Psy3msTmiKg {\n cursor: grabbing;\n background-color: royalblue !important;\n color: white;\n opacity: 0.3;\n}\n\n.v7BdtxvE2YVCWNVJlnry {\n position: absolute;\n\n min-width: 200px;\n width: 100%;\n height: 34px;\n /* border: 1px dotted tomato; */\n}\n\n[data-dragging="false"] .v7BdtxvE2YVCWNVJlnry {\n display: none;\n}\n.a4BtINSAm0wAMDfWjTWQ {\n /* position: relative; */\n width: 200px;\n opacity: .3;\n}\n\n.Svi1LYw7uQ_NUkdl_Qqu.RMyVbbtfIDcsWDY7Qb1c {\n margin-top: 34px;\n}\n\n.JeRmYfUKXTg9VqWZshKO ul :hover .Svi1LYw7uQ_NUkdl_Qqu .tV7QyJybi_Gy9OnFqX6l,\n[data-dragging="true"] .Svi1LYw7uQ_NUkdl_Qqu .tV7QyJybi_Gy9OnFqX6l {\n transition: .15s ease-in;\n width: auto;\n padding: 0 0 0 10px;\n}\n\n.JeRmYfUKXTg9VqWZshKO button {\n width: 30px;\n height: 30px;\n line-height: 30px;\n padding: 0;\n text-align: center;\n border-radius: 15px;\n}\n\n.JeRmYfUKXTg9VqWZshKO .htA0l4uMnWt9050_zphf {\n cursor: pointer;\n position: absolute;\n right: 10px;\n visibility: hidden;\n\n height: 30px;\n line-height: 30px;\n}\n.JeRmYfUKXTg9VqWZshKO li:hover .htA0l4uMnWt9050_zphf {\n visibility: visible;\n}\n',"",{version:3,sources:["webpack://./src/Keyboard/Layers/layer-switcher.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,oBAAoB;EACpB,UAAU;AACZ;AACA;EACE,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,kBAAkB;EAClB,sBAAsB;EACtB,qBAAqB;EACrB,SAAS;EACT,UAAU;AACZ;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,SAAS;EACT,kBAAkB;EAClB,YAAY;EACZ,eAAe;AACjB;AACA;EACE,YAAY;AACd;AACA;EACE,0CAA0C;EAC1C,eAAe;EACf,mBAAmB;EACnB,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,kBAAkB;AACpB;AACA;EACE,0CAA0C;EAC1C,YAAY;EACZ,mBAAmB;AACrB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,mCAAmC;EACnC,YAAY;AACd;;AAEA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;AACpB;AACA;EACE,gBAAgB;EAChB,QAAQ;EACR,YAAY;EACZ,iBAAiB;EACjB,UAAU;EACV,wBAAwB;AAC1B;;AAEA;EACE,eAAe;EACf,mCAAmC;AACrC;AACA;EACE,gBAAgB;EAChB,sCAAsC;EACtC,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;;EAElB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,+BAA+B;AACjC;;AAEA;EACE,aAAa;AACf;AACA;EACE,wBAAwB;EACxB,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,gBAAgB;AAClB;;AAEA;;EAEE,wBAAwB;EACxB,WAAW;EACX,mBAAmB;AACrB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,UAAU;EACV,kBAAkB;EAClB,mBAAmB;AACrB;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,kBAAkB;;EAElB,YAAY;EACZ,iBAAiB;AACnB;AACA;EACE,mBAAmB;AACrB",sourcesContent:['.layerSelector {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n}\n.layerSelector > * {\n pointer-events: all;\n}\n\n.layerSelector ul {\n display: flex;\n position: relative;\n flex-direction: column;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.layerSelector li {\n position: relative;\n padding: 0;\n margin: 0;\n width: max-content;\n height: 34px;\n cursor: pointer;\n}\n.layerSelector .active {\n cursor: grab;\n}\n.layer, .addLayer {\n background-color: rgba(201, 201, 201, 0.5);\n color: darkgray;\n border-radius: 15px;\n height: 30px;\n padding: 0px;\n margin: 2px;\n width: max-content;\n}\n.layerSelector:not([data-dragging="true"]) li:hover .layer {\n background-color: rgba(60, 179, 113, 0.85);\n color: white;\n padding-right: 35px;\n}\n[data-dragging="true"] .layer {\n padding-right: 35px;\n}\n.layerSelector .active .layer {\n background-color: rgb(60, 179, 113);\n color: white;\n}\n\n.layerSelector li * {\n display: inline-block;\n}\n.layerSelector li .index {\n overflow: auto;\n width: 30px;\n height: 30px;\n line-height: 30px;\n text-align: center;\n}\n.layerSelector li .name {\n overflow: hidden;\n width: 0;\n height: 30px;\n line-height: 30px;\n padding: 0;\n font-variant: small-caps;\n}\n\n.layer {\n margin: 4px 2px;\n transition: margin-top .15s ease-in;\n}\n.layer.dragging {\n cursor: grabbing;\n background-color: royalblue !important;\n color: white;\n opacity: 0.3;\n}\n\n.dropper {\n position: absolute;\n\n min-width: 200px;\n width: 100%;\n height: 34px;\n /* border: 1px dotted tomato; */\n}\n\n[data-dragging="false"] .dropper {\n display: none;\n}\n.dropTarget {\n /* position: relative; */\n width: 200px;\n opacity: .3;\n}\n\n.layer.displaced {\n margin-top: 34px;\n}\n\n.layerSelector ul :hover .layer .name,\n[data-dragging="true"] .layer .name {\n transition: .15s ease-in;\n width: auto;\n padding: 0 0 0 10px;\n}\n\n.layerSelector button {\n width: 30px;\n height: 30px;\n line-height: 30px;\n padding: 0;\n text-align: center;\n border-radius: 15px;\n}\n\n.layerSelector .delete {\n cursor: pointer;\n position: absolute;\n right: 10px;\n visibility: hidden;\n\n height: 30px;\n line-height: 30px;\n}\n.layerSelector li:hover .delete {\n visibility: visible;\n}\n'],sourceRoot:""}]),a.locals={layerSelector:"JeRmYfUKXTg9VqWZshKO",active:"u2LnyyXbhUKWkR8h1WgY",layer:"Svi1LYw7uQ_NUkdl_Qqu",addLayer:"QHkrJNCowEE3i9FocgKe",index:"yVeX9ivshCU7PiJfbG2v",name:"tV7QyJybi_Gy9OnFqX6l",dragging:"pRqaGgm21Psy3msTmiKg",dropper:"v7BdtxvE2YVCWNVJlnry",dropTarget:"a4BtINSAm0wAMDfWjTWQ",displaced:"RMyVbbtfIDcsWDY7Qb1c",delete:"htA0l4uMnWt9050_zphf"},e.Z=a},59500:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,'.ULm7RKJYCZDRV0HmcA7C {\n position: absolute;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow: auto;\n scroll-snap-stop: normal;\n scroll-snap-type: y proximity;\n}\n\n.XWq43GGa2yCVXqY4Syw3 {\n width: fit-content;\n scroll-snap-align: start;\n}\n\n.EwvVNY6vlf7HwYmXTbzi {\n margin: 10px 0;\n display: flex;\n}\n\n.EwvVNY6vlf7HwYmXTbzi label {\n display: inline-block;\n width: 120px;\n text-align: right;\n margin-right: 10px;\n}\n\n.uhiC_7TzN7eCNbm5C6a8[data-sensor-count="0"] {\n display: none;\n}\n\n.ztwqyyB2FFS4oWgcCyZC label {\n display: inline-block;\n margin-bottom: 10px;\n}\n.ztwqyyB2FFS4oWgcCyZC[data-unbound="true"] label code {\n opacity: 0.5;\n}\n\n.N98b5r9XUT9yotsaxhB7 {\n cursor: pointer;\n margin-left: 5px;\n}\n\n.QZ1jUOy1FEDFG3IrI5JM { cursor: pointer; }\n.QZ1jUOy1FEDFG3IrI5JM:hover {\n color: white;\n}\n\n.raNkhxmGTqtKQI9X2gVA:not(.y7y6ypMwmSafQKgt7oBw) {\n cursor: pointer;\n}\n.raNkhxmGTqtKQI9X2gVA > * {\n pointer-events: none;\n}\n.raNkhxmGTqtKQI9X2gVA:hover, .y7y6ypMwmSafQKgt7oBw {\n color: var(--key-color-hover);\n background-color: var(--selection);\n}\n.raNkhxmGTqtKQI9X2gVA:hover {\n background-color: var(--hover-selection);\n}\n\n.sahMSNIG_94Hn9tEEZ8q {\n max-width: 80vw;\n overflow-x: scroll;\n}',"",{version:3,sources:["webpack://./src/Keyboard/Layers/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,MAAM;EACN,YAAY;EACZ,aAAa;EACb,cAAc;EACd,wBAAwB;EACxB,6BAA6B;AAC/B;;AAEA;EACE,kBAAkB;EAClB,wBAAwB;AAC1B;;AAEA;EACE,cAAc;EACd,aAAa;AACf;;AAEA;EACE,qBAAqB;EACrB,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,qBAAqB;EACrB,mBAAmB;AACrB;AACA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA,wBAAoB,eAAe,EAAE;AACrC;EACE,YAAY;AACd;;AAEA;EACE,eAAe;AACjB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,6BAA6B;EAC7B,kCAAkC;AACpC;AACA;EACE,wCAAwC;AAC1C;;AAEA;EACE,eAAe;EACf,kBAAkB;AACpB",sourcesContent:['.layerScrollContainer {\n position: absolute;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow: auto;\n scroll-snap-stop: normal;\n scroll-snap-type: y proximity;\n}\n\n.layerWrapper {\n width: fit-content;\n scroll-snap-align: start;\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.sensors[data-sensor-count="0"] {\n display: none;\n}\n\n.sensor label {\n display: inline-block;\n margin-bottom: 10px;\n}\n.sensor[data-unbound="true"] label code {\n opacity: 0.5;\n}\n\n.deleteSensorBinding {\n cursor: pointer;\n margin-left: 5px;\n}\n\n.addSensorBinding { cursor: pointer; }\n.addSensorBinding:hover {\n color: white;\n}\n\n.quickBindKey:not(.quickBindKeyHighlight) {\n cursor: pointer;\n}\n.quickBindKey > * {\n pointer-events: none;\n}\n.quickBindKey:hover, .quickBindKeyHighlight {\n color: var(--key-color-hover);\n background-color: var(--selection);\n}\n.quickBindKey:hover {\n background-color: var(--hover-selection);\n}\n\n.quickAssignDialog {\n max-width: 80vw;\n overflow-x: scroll;\n}'],sourceRoot:""}]),a.locals={layerScrollContainer:"ULm7RKJYCZDRV0HmcA7C",layerWrapper:"XWq43GGa2yCVXqY4Syw3",field:"EwvVNY6vlf7HwYmXTbzi",sensors:"uhiC_7TzN7eCNbm5C6a8",sensor:"ztwqyyB2FFS4oWgcCyZC",deleteSensorBinding:"N98b5r9XUT9yotsaxhB7",addSensorBinding:"QZ1jUOy1FEDFG3IrI5JM",quickBindKey:"raNkhxmGTqtKQI9X2gVA",quickBindKeyHighlight:"y7y6ypMwmSafQKgt7oBw",quickAssignDialog:"sahMSNIG_94Hn9tEEZ8q"},e.Z=a},62663:function(n){n.exports=function(n,e,r,t){var o=-1,i=null==n?0:n.length;for(t&&i&&(r=n[++o]);++o<i;)r=e(r,n[o],o,n);return r}},44286:function(n){n.exports=function(n){return n.split("")}},49029:function(n){var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;n.exports=function(n){return n.match(e)||[]}},18674:function(n){n.exports=function(n){return function(e){return null==n?void 0:n[e]}}},40180:function(n,e,r){var t=r(14259);n.exports=function(n,e,r){var o=n.length;return r=void 0===r?o:r,!e&&r>=o?n:t(n,e,r)}},98805:function(n,e,r){var t=r(40180),o=r(62689),i=r(83140),a=r(79833);n.exports=function(n){return function(e){e=a(e);var r=o(e)?i(e):void 0,l=r?r[0]:e.charAt(0),s=r?t(r,1).join(""):e.slice(1);return l[n]()+s}}},35393:function(n,e,r){var t=r(62663),o=r(53816),i=r(58748),a=RegExp("['’]","g");n.exports=function(n){return function(e){return t(i(o(e).replace(a,"")),n,"")}}},69389:function(n,e,r){var t=r(18674)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});n.exports=t},62689:function(n){var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");n.exports=function(n){return e.test(n)}},93157:function(n){var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;n.exports=function(n){return e.test(n)}},83140:function(n,e,r){var t=r(44286),o=r(62689),i=r(676);n.exports=function(n){return o(n)?i(n):t(n)}},676:function(n){var e="\\ud800-\\udfff",r="["+e+"]",t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+t+"|"+o+")?",u="[\\ufe0e\\ufe0f]?",c=u+s+"(?:\\u200d(?:"+[i,a,l].join("|")+")"+u+s+")*",d="(?:"+[i+t+"?",t,a,l,r].join("|")+")",A=RegExp(o+"(?="+o+")|"+d+c,"g");n.exports=function(n){return n.match(A)||[]}},2757:function(n){var e="\\ud800-\\udfff",r="\\u2700-\\u27bf",t="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+i+"]",l="\\d+",s="["+r+"]",u="["+t+"]",c="[^"+e+i+l+r+t+o+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+o+"]",f="(?:"+u+"|"+c+")",y="(?:"+p+"|"+c+")",b="(?:['’](?:d|ll|m|re|s|t|ve))?",g="(?:['’](?:D|LL|M|RE|S|T|VE))?",h="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",m="[\\ufe0e\\ufe0f]?",v=m+h+"(?:\\u200d(?:"+["[^"+e+"]",d,A].join("|")+")"+m+h+")*",x="(?:"+[s,d,A].join("|")+")"+v,C=RegExp([p+"?"+u+"+"+b+"(?="+[a,p,"$"].join("|")+")",y+"+"+g+"(?="+[a,p+f,"$"].join("|")+")",p+"?"+f+"+"+b,p+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",l,x].join("|"),"g");n.exports=function(n){return n.match(C)||[]}},53816:function(n,e,r){var t=r(69389),o=r(79833),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");n.exports=function(n){return(n=o(n))&&n.replace(i,t).replace(a,"")}},18029:function(n,e,r){var t=r(35393),o=r(11700),i=t((function(n,e,r){return n+(r?" ":"")+o(e)}));n.exports=i},11700:function(n,e,r){var t=r(98805)("toUpperCase");n.exports=t},58748:function(n,e,r){var t=r(49029),o=r(93157),i=r(79833),a=r(2757);n.exports=function(n,e,r){return n=i(n),void 0===(e=r?void 0:e)?o(n)?a(n):t(n):n.match(e)||[]}},48118:function(n,e,r){"use strict";var t=r(93379),o=r.n(t),i=r(7795),a=r.n(i),l=r(90569),s=r.n(l),u=r(3565),c=r.n(u),d=r(19216),A=r.n(d),p=r(44589),f=r.n(p),y=r(49040),b={};b.styleTagTransform=f(),b.setAttributes=c(),b.insert=s().bind(null,"head"),b.domAPI=a(),b.insertStyleElement=A(),o()(y.Z,b),e.Z=y.Z&&y.Z.locals?y.Z.locals:void 0}}]); +//# sourceMappingURL=6849.c22b9b4835cd4f1484cd.js.map
\ No newline at end of file |