summaryrefslogtreecommitdiffhomepage
path: root/5008.d09868d054f145d059a8.js
blob: f04028a99c8a95fcda633e653db9f9a31599589b (plain)
1
2
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5008],{72054:function(n,e,r){"use strict";r.d(e,{Z:function(){return j}});var t=r(67294),o=r(45697),i=r.n(o),a=r(41051),l=r(93379),s=r.n(l),u=r(7795),c=r.n(u),d=r(90569),A=r.n(d),p=r(3565),f=r.n(p),y=r(19216),b=r.n(y),h=r(44589),g=r.n(h),v=r(56634),m={};m.styleTagTransform=g(),m.setAttributes=f(),m.insert=A().bind(null,"head"),m.domAPI=c(),m.insertStyleElement=b(),s()(v.Z,m);var x=v.Z&&v.Z.locals?v.Z.locals:void 0,C=r(85893);function E(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 j(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 E(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)?E(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.")}()),l=i[0],s=i[1],u=(0,t.useRef)(),c=(0,t.useCallback)((function(n){u.current&&!u.current.contains(n.target)&&s(!1)}),[u,s]);return(0,t.useEffect)((function(){return document.body.addEventListener("click",c),function(){return document.body.removeEventListener("click",c)}}),[c]),(0,C.jsxs)("div",{ref:u,className:[x.menu,l&&x.open].join(" "),children:[(0,C.jsx)("p",{onClick:function(){return s(!l)},children:(0,C.jsx)(a.Z,{name:"ellipsis"})}),(0,C.jsx)("ul",{children:o.map((function(n,e){return(0,C.jsx)("li",{onClick:function(){return function(n){s(!1),n()}(n.callback)},children:n.content},e)}))})]})}j.propTypes={actions:i().arrayOf(i().shape({callback:i().func.isRequired,content:i().oneOfType([i().node,i().string]).isRequired})).isRequired}},97494:function(n,e,r){"use strict";r.d(e,{Z:function(){return B}});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),h=r(33988),g={};g.styleTagTransform=b(),g.setAttributes=A(),g.insert=c().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=f(),a()(h.Z,g);var v=h.Z&&h.Z.locals?h.Z.locals:void 0,m=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 B(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,m.jsxs)("span",{className:v.wrapper,children:[(0,m.jsx)("input",j({type:"text",value:i},a)),l&&(0,m.jsx)("span",{className:v.error,children:l})]})}B.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)),h=o().arrayOf(b),g=r(85893);function v(n){return v="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},v(n)}var m=["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"!==v(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==v(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===v(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}},B=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 w(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,m),o=j(e),i=k(e),a=B(e),u=(0,l.Pi)(o,a,i);return(0,g.jsx)("div",C(C({className:s.Z.placer,style:u,"data-u":a.u,"data-h":a.h},t),{},{children:r}))}w.propTypes={scale:o().number,keyLayout:b.isRequired},w.defaultProps={scale:1};var S=w;function O(n){var e=n.layout,r=n.renderKey,t=n.scale;return(0,g.jsx)("div",{style:{position:"relative",transform:"scale(".concat(t,")"),transformOrigin:0},children:e.map((function(n,e){return(0,g.jsx)(S,{keyLayout:n,children:r({index:e,keyLayout:n})},e)}))})}O.propTypes={layout:h.isRequired,renderKey:o().func.isRequired,scale:o().number},O.defaultProps={scale:1};var I=O},55008:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return re}});var t=r(67294),o=r(95998),i=r(45697),a=r.n(i),l=r(80736),s=r(72054),u=r(85893);function c(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 d(n){var e,r=n.layerIndex,i=n.additionalActions,a=void 0===i?[]:i,d=(0,o.I0)(),A=(0,t.useMemo)((function(){return{transparentToKeypress:function(){return d((0,l.c7)({layerIndex:r}))},transparentToNone:function(){return d((0,l.sT)({layerIndex:r}))},noneToKeypress:function(){return d((0,l.UH)({layerIndex:r}))},noneToTransparent:function(){return d((0,l.v1)({layerIndex:r}))},emptyKeypressToTransparent:function(){return d((0,l.QR)({layerIndex:r}))},emptyKeypressToNone:function(){return d((0,l.En)({layerIndex:r}))}}}),[d,r]);return(0,u.jsx)(s.Z,{actions:[].concat((e=a,function(n){if(Array.isArray(n))return c(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 c(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)?c(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:A.transparentToKeypress,content:(0,u.jsxs)(u.Fragment,{children:["Convert ",(0,u.jsx)("code",{children:"&trans"})," to ",(0,u.jsx)("code",{children:"&kp"})]})},{callback:A.transparentToNone,content:(0,u.jsxs)(u.Fragment,{children:["Convert ",(0,u.jsx)("code",{children:"&trans"})," to ",(0,u.jsx)("code",{children:"&none"})]})},{callback:A.noneToKeypress,content:(0,u.jsxs)(u.Fragment,{children:["Convert ",(0,u.jsx)("code",{children:"&none"})," to ",(0,u.jsx)("code",{children:"&kp"})]})},{callback:A.noneToTransparent,content:(0,u.jsxs)(u.Fragment,{children:["Convert ",(0,u.jsx)("code",{children:"&none"})," to ",(0,u.jsx)("code",{children:"&trans"})]})},{callback:A.emptyKeypressToTransparent,content:(0,u.jsxs)(u.Fragment,{children:["Convert ",(0,u.jsx)("code",{children:"&kp ⦸"})," to ",(0,u.jsx)("code",{children:"&trans"})]})},{callback:A.emptyKeypressToNone,content:(0,u.jsxs)(u.Fragment,{children:["Convert ",(0,u.jsx)("code",{children:"&kp ⦸"})," to ",(0,u.jsx)("code",{children:"&none"})]})}])})}d.propTypes={layerIndex:a().number.isRequired,additionalActions:a().arrayOf(a().shape({callback:a().func.isRequired,content:a().oneOfType([a().node,a().string]).isRequired}))};var A=r(32732),p=r(82607),f=r(94184),y=r.n(f),b=r(18029),h=r.n(b),g=r(64261),v=r(96186),m=r(83197),x=r(91118),C=r(27213),E=r(55326),j=r(61953),k=r(98588),B=r(52156),w=r(41051),S=r(4803),O=r(48118),I=r(20817);function T(n){return T="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},T(n)}function Z(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?Z(Object(r),!0).forEach((function(e){U(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function U(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==T(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==T(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===T(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function P(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)(I.V),s=l.layout,c=l.wrapperDimensions,d=(0,t.useMemo)((function(){return(0,S.fI)(c,{scale:o,overrides:D({position:"relative",pointerEvents:"none",padding:0,margin:0},a)})}),[o,c,a]);return(0,u.jsx)("div",{style:d,children:(0,u.jsx)(A.Z,{layout:s,bindings:[],scale:o,renderKey:function(n){var r,t=n.index;return(0,u.jsx)(x.Z,{onClick:function(){},selectable:!1,themeClass:y()((r={},U(r,O.Z.key,!0),U(r,O.Z.highlight,e.includes(t)),r))})}})})}var K=r(2968),q=r(27926),Y=r(39017);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 R(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)?R(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 R(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 L="https://github.com/nickcoutsos/keymap-editor/discussions/109";function W(n){var e=n.binding,r=n.bindingIndex,o=n.onUpdate,i=n.onCancel,a=n.context,l=void 0===a?"none":a,s=N((0,t.useState)(e),2),c=s[0],d=s[1],A=N((0,E.Z)(c,void 0,d),2),p=A[0],f=p.bindTree,y=p.behavior,b=p.behaviorParams,h=p.editing,m=p.invalid,S=A[1],O=S.clearEditing,I=S.handleChange,T=S.handleConfirm,Z=S.handleUpdateBindValue,D=S.selectNodeForEditing,U=(0,t.useCallback)((function(){o((0,Y.FY)(f))}),[f,o]);return(0,u.jsxs)(g.Z,{onDismiss:i,children:[(0,u.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,u.jsxs)("p",{style:{margin:"5px 0"},children:[(0,u.jsx)(w.Z,{name:"bullhorn"})," I'm trying out a new way of editing bindings, if you hate it then ",(0,u.jsx)(K.Z,{href:L,external:!0,children:"please let me know"}),"!"]})}),(0,u.jsxs)(v.Z,{dismissText:null,style:{width:"500px"},children:[(0,u.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid var(--key-bg-base)",paddingBottom:"20px",gap:"40px"},children:[(0,u.jsx)(P,{keyPositions:[r],styleOverrides:{display:"inline-block",padding:"3px",borderRadius:"3px"},scale:.15}),(0,u.jsx)(w.Z,{name:"arrow-right"}),(0,u.jsx)(x.Z,{selectable:!1,style:{pointerEvents:"none"},children:(0,u.jsx)(C.Z,{context:l,value:f.value,params:f.params,onUpdate:function(){}})})]}),(0,u.jsx)("h2",{children:"Set Key Binding"}),(0,u.jsxs)("h3",{children:["Behavior ",(0,u.jsx)("div",{style:{display:"inline-block",fontSize:"initial",fontWeight:"normal"},children:(0,u.jsx)("span",{className:j.Z.extracted,children:(0,u.jsx)("span",{className:j.Z.param,children:(0,u.jsx)(B.ZP,{slot:"behaviour",node:f,expanded:!0,onSelect:D})})})})]}),(0,u.jsx)(_,{slots:b,node:f,onSelect:D}),h&&(0,u.jsx)(k.Z,{node:h.node,type:h.type,behaviour:y,context:l,prompt:h.prompt,searchKey:"code",onSelect:Z,onConfirm:T,onChange:I,onCancel:O}),(0,u.jsxs)("div",{style:{textAlign:"center"},children:[(0,u.jsx)(q.Z,{onClick:U,disabled:m,children:"Okay"}),(0,u.jsx)(q.Z,{onClick:i,secondary:!0,children:"Cancel"})]})]})]})}function _(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,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("h3",{children:"Parameters"}),(0,u.jsx)("ol",{style:o,children:e.map((function(n,e){return"placeholder"!==n.type&&(0,u.jsx)(V,{slot:n,param:r.params[e],onSelect:t},e)}))})]})}function V(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 h()(r)}),[e]);return(0,u.jsxs)("li",{style:{margin:"15px 0"},children:[(0,u.jsx)("label",{children:i}),(0,u.jsx)("span",{className:y()(j.Z.extracted),children:(0,u.jsx)(m.N,{slot:e,node:r,onSelect:o,expanded:!0})})]})}function X(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 z(n){var e,r,i=n.layout,a=n.activeLayer,s=(0,o.I0)(),c=(0,o.v9)(l.vl)[a].properties.bindings,d=(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 X(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)?X(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.")}()),f=d[0],y=d[1],b=(0,t.useCallback)((function(n,e){s((0,l.V6)({layerIndex:a,bindIndex:n,binding:e}))}),[s,a]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(A.Z,{layout:i,renderKey:function(n){var e,r,t=n.index,o=n.keyLayout;return c.parsed[t]&&(0,u.jsx)(p.Z,{label:o.label,value:null===(e=c.parsed[t])||void 0===e?void 0:e.value,params:null===(r=c.parsed[t])||void 0===r?void 0:r.params,noBindingClick:!0,keyWrapperProps:{className:j.Z.unified,onClick:function(n){n.stopPropagation(),y(t)}},onUpdate:function(n){return b(t,n)}})}}),null!==f&&(0,u.jsx)(W,{binding:c.parsed[f],bindingIndex:f,onCancel:function(){return y(null)},onUpdate:function(n){b(f,n),y(null)}})]})}W.propTypes={context:a().string,hideBehaviour:a().bool.isRequired,onUpdate:a().func.isRequired},W.defaultProps={hideBehaviour:!1};var Q=r(67069);function M(n){var e=n.context,r=n.binding,t=n.onUpdate,o=r.value,i=r.params;return(0,u.jsx)(x.Z,{themeClass:j.Z.encoder2,children:(0,u.jsx)(C.Z,{context:e,value:o,params:i,onUpdate:t})})}M.propTypes={binding:Q.dH,onUpdate:a().func.isRequired};var G=M,H=r(93379),J=r.n(H),F=r(7795),$=r.n(F),nn=r(90569),en=r.n(nn),rn=r(3565),tn=r.n(rn),on=r(19216),an=r.n(on),ln=r(44589),sn=r.n(ln),un=r(59500),cn={};cn.styleTagTransform=sn(),cn.setAttributes=tn(),cn.insert=en().bind(null,"head"),cn.domAPI=$(),cn.insertStyleElement=an(),J()(un.Z,cn);var dn=un.Z&&un.Z.locals?un.Z.locals:void 0;function An(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 c(n,r){i((0,l.zi)({layerIndex:e,sensorIndex:n,bindings:r}))}return(0,u.jsxs)("div",{style:{margin:"0 0 30px"},children:[(0,u.jsx)("h3",{children:"Sensor bindings"}),(0,u.jsx)("div",{style:{display:"flex",flexDirection:"row",gap:"25px"},children:t.map((function(n,e){return(0,u.jsx)(pn,{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:c},e)}))})]})}function pn(n){var e=n.sensor,r=n.binding,o=n.index,i=n.onUpdate,a=n.canAdd,l=n.canDelete,s=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,u.jsxs)("div",{className:dn.sensor,"data-unbound":!r,children:[(0,u.jsxs)("label",{style:{fontVariant:"small-caps",fontSize:"90%"},children:[(0,u.jsx)("code",{children:s}),l&&(0,u.jsx)(w.Z,{name:"trash-can",title:"Remove sensor binding from this layer",className:dn.deleteSensorBinding,onClick:A})]}),r&&(0,u.jsx)(G,{context:"encoders",binding:r||{value:c,params:d},onUpdate:function(n){return i(o,n)}}),a&&(0,u.jsx)(x.Z,{onClick:p,title:"Add sensor binding to this layer",themeClass:y()(j.Z.encoder2,dn.addSensorBinding),children:(0,u.jsx)(w.Z,{name:"add"})})]})}var fn=r(97494),yn=r(62417);function bn(n){return bn="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},bn(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 gn(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){vn(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 vn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==bn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==bn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===bn(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function mn(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 xn=function(n){var e,r,i,a=n.layerIndex,s=n.onClose,c=(0,o.I0)(),d=(0,o.v9)(l.vl)[a],A=(r=(0,t.useState)({name:d.name,label:(null===(e=d.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 mn(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)?mn(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.")}()),p=A[0],f=A[1];return(0,u.jsx)(g.Z,{onDismiss:s,children:(0,u.jsxs)(v.Z,{dismissText:"",children:[(0,u.jsxs)("h2",{children:["Customize Layer ",(0,u.jsx)("code",{children:d.name})]}),(0,u.jsxs)("div",{children:[(0,u.jsxs)("div",{className:dn.field,children:[(0,u.jsx)("label",{htmlFor:"customize-layer-name",children:"Name"}),(0,u.jsx)(fn.Z,{id:"customize-layer-name",placeholder:"Default",value:p.name,validator:yn.Gk,onChange:function(n){return f((function(e){return gn(gn({},e),{},{name:n.target.value})}))}})]}),(0,u.jsxs)("div",{className:dn.field,children:[(0,u.jsx)("label",{htmlFor:"customize-layer-label",children:"Label"}),(0,u.jsx)("input",{id:"customize-layer-label",placeholder:"Default",value:p.label,onChange:function(n){return f((function(e){return gn(gn({},e),{},{label:n.target.value})}))}})]})]}),(0,u.jsxs)("div",{style:{textAlign:"center",gap:"5px"},children:[(0,u.jsx)(q.Z,{onClick:function(){c((0,l.vc)(gn({layerIndex:a},p))),s()},children:"OK"}),(0,u.jsx)(q.Z,{onClick:s,secondary:!0,children:"Cancel"})]})]})})},Cn=r(39693),En=r.n(Cn),jn=r(2062),kn=r(62029);function Bn(n,e){if(n){if("string"==typeof n)return wn(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)?wn(n,e):void 0}}function wn(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 Sn={keysHeld:[],keysHeldBeforeLastRelease:[]};function On(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 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}}(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 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={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 Zn(n,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(0,o.I0)(),a=On((0,t.useState)(r),2),s=a[0],u=a[1],c=On((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 wn(n)}(r)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(r)||Bn(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 Sn;default:return n}}),Sn),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)||Bn(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 En()([n.altKey&&"LA",n.ctrlKey&&"LC",n.metaKey&&"LG",n.shiftKey&&"LS"])}(n),r=(0,kn.mapCharacter)(n.key.toLowerCase())||function(n){var e=Tn[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 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}function Un(n){var e,r,o=n.layout,i=n.layer,a=n.layerIndex,l=n.onClose,s=(e=Zn(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 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}}(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.")}()),c=s[0],d=s[1],f=(0,t.useMemo)((function(){return(0,S.fI)(o,{overrides:{minWidth:"400px"}})}),[o]);return(0,t.useEffect)((function(){c.isActive||l()}),[c.isActive,l]),(0,u.jsx)(g.Z,{onDismiss:l,children:(0,u.jsxs)(v.Z,{classes:[dn.quickAssignDialog],dismissText:"",children:[(0,u.jsx)("h2",{children:"Quick-assign layer keybindings"}),(0,u.jsxs)("p",{children:["Press a key on your keyboard to set a ",(0,u.jsx)("code",{children:"&kp"})," binding at the highlighted position in your keymap."]}),(0,u.jsx)("div",{style:f,children:(0,u.jsx)(A.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,u.jsx)(p.Z,{label:o.label,keyWrapperProps:{selectable:!1,onClick:function(){return d.setBindIndex(t)},className:En()([dn.quickBindKey,c.bindIndex===t&&dn.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,u.jsxs)("div",{style:{textAlign:"center"},children:[(0,u.jsx)(jn.Z,{children:"Click on a different key to jump ahead or correct a previous binding."}),(0,u.jsx)("p",{children:(0,u.jsx)(q.Z,{onClick:l,children:"Done"})})]})]})})}function Pn(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 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}}(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 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}var qn=function(n){return n.keyboard.sensors};function Yn(n){var e=n.layer,r=n.layerIndex,i=(n.isActiveLayer,(0,o.v9)(qn)),a=Pn((0,t.useState)(!1),2),l=a[0],s=a[1],c=Pn((0,t.useState)(!1),2),A=c[0],p=c[1],f=(0,t.useContext)(I.V),y=f.layout,b=f.wrapperStyle,h=(0,t.useCallback)((function(){return s(!0)}),[s]),g=(0,t.useCallback)((function(){return p(!0)}),[p]),v=(0,t.useCallback)((function(){return p(!1)}),[p]),m=(0,t.useMemo)((function(){return[{callback:h,content:"Change Configuration"},{callback:g,content:(0,u.jsxs)(u.Fragment,{children:["Quick ",(0,u.jsx)("code",{children:"&kp"})," Assignment"]})}]}),[h,g]),x=b.width,C=b.height,E=b.margin,j=b.padding;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:dn.layerWrapper,style:{margin:E,padding:j},children:[(0,u.jsxs)("div",{style:{width:x},children:[(0,u.jsxs)("h3",{style:{position:"relative"},children:[e.name," ",(0,u.jsx)(d,{layerIndex:r,additionalActions:m})]}),(0,u.jsx)("div",{style:{height:C},children:(0,u.jsx)(z,{layout:y,activeLayer:r})})]}),(0,u.jsx)("div",{className:dn.sensors,"data-sensor-count":i.length,style:{},children:(0,u.jsx)(An,{sensors:i,layerIndex:r,layer:e})})]}),l&&(0,u.jsx)(xn,{layerIndex:r,onClose:function(){return s(!1)}}),A&&(0,u.jsx)(Un,{layout:y,layer:e,layerIndex:r,onClose:v})]})}var Nn=r(30341),Rn={};Rn.styleTagTransform=sn(),Rn.setAttributes=tn(),Rn.insert=en().bind(null,"head"),Rn.domAPI=$(),Rn.insertStyleElement=an(),J()(Nn.Z,Rn);var Ln=Nn.Z&&Nn.Z.locals?Nn.Z.locals:void 0,Wn=r(56803),_n=r(50868),Vn=r(81485),Xn=r(18311);function zn(n){return zn="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},zn(n)}function Qn(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 Mn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qn(Object(r),!0).forEach((function(e){Gn(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Qn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function Gn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==zn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==zn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===zn(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function Hn(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 Jn(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)?Jn(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 Jn(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 Fn(n){var e=n.activeLayer,r=n.onSelect,i=(0,t.useRef)(null),a=(0,o.I0)(),s=(0,t.useContext)(I.V).bindingCount,c=(0,t.useContext)(Vn.c),d=(0,t.useContext)(Xn.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:s}))}),[a,s]),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,_n.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,_n.fD)(r,t,A,c,d)))}),[A,a,c,d]),h=function(n){var e=Hn((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 Mn(Mn({},n),{},{dropIndex:e})}))}),[a]),d=(0,t.useCallback)((function(n){var e=Number(n.target.dataset.dropPosition);a((function(n){return Mn(Mn({},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),g=Hn(h,2),v=g[0],m=g[1];return(0,u.jsx)("div",{className:Ln.layerSelector,ref:i,children:(0,u.jsxs)("ul",{"data-dragging":v.isDragging,children:[A.map((function(n,r){return(0,u.jsxs)("li",{className:e===r?Ln.active:"","data-slot-index":r,draggable:!0,onDragStart:m.handleDragStart,onDragEnd:m.handleDragEnd,onDrop:m.handleDrop,children:[(0,u.jsx)("div",{className:En()([Ln.dropper,v.dropIndex===r&&Ln.dropTarget]).join(" "),"data-drop-position":r,onDragEnter:m.handleDragEnter,onDragOver:m.handleDragOver,onDragLeave:m.handleDragLeave,onDrop:m.handleDrop}),(0,u.jsxs)("div",{onClick:function(){return p(r)},className:En()([Ln.layer,v.dragIndex===r&&Ln.dragging,v.isDragging&&v.dropIndex!==v.dragIndex&&v.dropIndex!==v.dragIndex+1&&null!==v.dropIndex&&r>=v.dropIndex&&Ln.displaced]).join(" "),children:[(0,u.jsx)("span",{className:Ln.index,children:r}),(0,u.jsxs)("span",{className:Ln.name,children:[n.name,(0,u.jsx)(w.Z,{name:"times-circle",className:Ln.delete,onClick:(0,Wn.s)((function(){return y(r)}))})]})]})]},"slot-".concat(r))})),v.isDragging&&v.dragIndex<A.length-1&&(0,u.jsx)("li",{"data-slot-index":A.length,onDragEnd:m.handleDragEnd,onDrop:m.handleDrop,children:(0,u.jsx)("div",{className:En()([Ln.dropper,v.dropIndex===A.length&&Ln.dropTarget]).join(" "),"data-drop-position":A.length,onDragEnter:m.handleDragEnter,onDragOver:m.handleDragOver,onDragLeave:m.handleDragLeave,onDrop:m.handleDrop})},"slot-".concat(A.length)),!v.isDragging&&(0,u.jsx)("li",{onClick:f,children:(0,u.jsxs)("div",{className:Ln.layer,children:[(0,u.jsx)(w.Z,{className:Ln.index,name:"plus"}),(0,u.jsx)("span",{className:Ln.name,children:"Add Layer"})]})})]})})}Fn.propTypes={activeLayer:a().number.isRequired,onSelect:a().func.isRequired};var $n=Fn;function ne(){var n=(0,o.I0)(),e=(0,t.useContext)(I.V).bindingCount;return(0,u.jsxs)("div",{style:{textAlign:"center"},children:[(0,u.jsx)("h3",{children:"No keymap layers defined"}),(0,u.jsx)(q.Z,{onClick:function(){return n((0,l.Xv)({bindingCount:e}))},children:"Add layer"})]})}function ee(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 re=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 ee(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)?ee(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],c=Math.max(0,Math.min(a,r.length-1));return 0===r.length?(0,u.jsx)(ne,{}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)($n,{activeLayer:c,onSelect:s}),(0,u.jsx)(Yn,{layer:r[c],layerIndex:c,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  opacity: 0.75;\n  left: 5px;\n}\n.JeRmYfUKXTg9VqWZshKO:hover {\n  opacity: initial;\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: 36px;\n  cursor: pointer;\n}\n.JeRmYfUKXTg9VqWZshKO .u2LnyyXbhUKWkR8h1WgY {\n  cursor: grab;\n}\n.Svi1LYw7uQ_NUkdl_Qqu, .QHkrJNCowEE3i9FocgKe {\n  background-color: var(--key-bg-base);\n  color: var(--key-color-base);\n  /* border-radius: 0 18px 18px 0; */\n  height: 36px;\n  padding: 0px;\n  margin: 2px;\n  width: max-content;\n}\n.JeRmYfUKXTg9VqWZshKO li:first-child .Svi1LYw7uQ_NUkdl_Qqu {\n  border-radius: 4px 4px 0 0;\n}\n.JeRmYfUKXTg9VqWZshKO li:last-child .Svi1LYw7uQ_NUkdl_Qqu {\n  border-radius: 0 0 4px 4px;\n}\n.JeRmYfUKXTg9VqWZshKO li:hover .Svi1LYw7uQ_NUkdl_Qqu {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\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: 36px;\n  height: 36px;\n  line-height: 36px;\n  text-align: center;\n}\n.JeRmYfUKXTg9VqWZshKO li .tV7QyJybi_Gy9OnFqX6l {\n  overflow: hidden;\n  width: 0;\n  height: 36px;\n  line-height: 36px;\n  padding: 0;\n  font-variant: small-caps;\n}\n\n.Svi1LYw7uQ_NUkdl_Qqu {\n  margin: 4px 2px 4px 0;\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: 40px;\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: 36px;\n  line-height: 36px;\n  padding: 0;\n  text-align: center;\n  border-radius: 18px;\n}\n\n.JeRmYfUKXTg9VqWZshKO .htA0l4uMnWt9050_zphf {\n  cursor: pointer;\n  position: absolute;\n  right: 10px;\n  visibility: hidden;\n\n  height: 36px;\n  line-height: 36px;\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;EACV,aAAa;EACb,SAAS;AACX;AACA;EACE,gBAAgB;AAClB;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,oCAAoC;EACpC,4BAA4B;EAC5B,kCAAkC;EAClC,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,kBAAkB;AACpB;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,4BAA4B;EAC5B,+BAA+B;AACjC;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,qBAAqB;EACrB,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  opacity: 0.75;\n  left: 5px;\n}\n.layerSelector:hover {\n  opacity: initial;\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: 36px;\n  cursor: pointer;\n}\n.layerSelector .active {\n  cursor: grab;\n}\n.layer, .addLayer {\n  background-color: var(--key-bg-base);\n  color: var(--key-color-base);\n  /* border-radius: 0 18px 18px 0; */\n  height: 36px;\n  padding: 0px;\n  margin: 2px;\n  width: max-content;\n}\n.layerSelector li:first-child .layer {\n  border-radius: 4px 4px 0 0;\n}\n.layerSelector li:last-child .layer {\n  border-radius: 0 0 4px 4px;\n}\n.layerSelector li:hover .layer {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\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: 36px;\n  height: 36px;\n  line-height: 36px;\n  text-align: center;\n}\n.layerSelector li .name {\n  overflow: hidden;\n  width: 0;\n  height: 36px;\n  line-height: 36px;\n  padding: 0;\n  font-variant: small-caps;\n}\n\n.layer {\n  margin: 4px 2px 4px 0;\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: 40px;\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: 36px;\n  line-height: 36px;\n  padding: 0;\n  text-align: center;\n  border-radius: 18px;\n}\n\n.layerSelector .delete {\n  cursor: pointer;\n  position: absolute;\n  right: 10px;\n  visibility: hidden;\n\n  height: 36px;\n  line-height: 36px;\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]}}},14259:function(n){n.exports=function(n,e,r){var t=-1,o=n.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++t<o;)i[t]=n[t+e];return i}},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))?",h="(?:['’](?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",v="[\\ufe0e\\ufe0f]?",m=v+g+"(?:\\u200d(?:"+["[^"+e+"]",d,A].join("|")+")"+v+g+")*",x="(?:"+[s,d,A].join("|")+")"+m,C=RegExp([p+"?"+u+"+"+b+"(?="+[a,p,"$"].join("|")+")",y+"+"+h+"(?="+[a,p+f,"$"].join("|")+")",p+"?"+f+"+"+b,p+"+"+h,"\\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=5008.d09868d054f145d059a8.js.map