summaryrefslogtreecommitdiffhomepage
path: root/6849.52e522c796903d1aec7c.js
blob: 380168ceeeb14afe2907a3d6f0211dfffc06a2a5 (plain)
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 ae}});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),nn=r(39017);function en(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 rn(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)?rn(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 rn(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="https://github.com/nickcoutsos/keymap-editor/discussions/109";function on(n){var e=n.binding,r=n.bindingIndex,o=n.onUpdate,i=n.onCancel,a=n.context,l=void 0===a?"none":a,u=en((0,t.useState)(e),2),c=u[0],d=u[1],A=en((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.handleChange,C=m.handleConfirm,E=m.handleUpdateBindValue,k=m.selectNodeForEditing,w=(0,t.useCallback)((function(){o((0,nn.FY)(f))}),[f,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:tn,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:f.value,params:f.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:k})})})})]}),(0,j.jsx)(an,{slots:b,node:f,onSelect:k}),g&&(0,j.jsx)(W.Z,{node:g.node,type:g.type,behaviour:y,context:l,prompt:g.prompt,searchKey:"code",onSelect:E,onConfirm:C,onChange:x,onCancel:v}),(0,j.jsxs)("div",{style:{textAlign:"center"},children:[(0,j.jsx)($.Z,{onClick:w,disabled:h,children:"Okay"}),(0,j.jsx)($.Z,{onClick:i,secondary:!0,children:"Cancel"})]})]})]})}function an(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)(ln,{slot:n,param:r.params[e],onSelect:t},e)}))})]})}function ln(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 sn(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,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 sn(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)?sn(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)(on,{binding:u.parsed[d],bindingIndex:d,onCancel:function(){return A(null)},onUpdate:function(n){p(d,n),A(null)}})]})}on.propTypes={context:a().string,hideBehaviour:a().bool.isRequired,onUpdate:a().func.isRequired},on.defaultProps={hideBehaviour:!1};var cn=r(67069);function dn(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})})}dn.propTypes={binding:cn.dH,onUpdate:a().func.isRequired};var An=dn,pn=r(59500),fn={};fn.styleTagTransform=v(),fn.setAttributes=b(),fn.insert=f().bind(null,"head"),fn.domAPI=A(),fn.insertStyleElement=h(),c()(pn.Z,fn);var yn=pn.Z&&pn.Z.locals?pn.Z.locals:void 0;function bn(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)(gn,{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 gn(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:yn.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:yn.deleteSensorBinding,onClick:A})]}),r&&(0,j.jsx)(An,{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,yn.addSensorBinding),children:(0,j.jsx)(s.Z,{name:"add"})})]})}var hn=r(97494),mn=r(62417);function vn(n){return vn="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},vn(n)}function xn(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 Cn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xn(Object(r),!0).forEach((function(e){En(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):xn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function En(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==vn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==vn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===vn(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}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}var kn=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 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}}(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:yn.field,children:[(0,j.jsx)("label",{htmlFor:"customize-layer-name",children:"Name"}),(0,j.jsx)(hn.Z,{id:"customize-layer-name",placeholder:"Default",value:A.name,validator:mn.Gk,onChange:function(n){return p((function(e){return Cn(Cn({},e),{},{name:n.target.value})}))}})]}),(0,j.jsxs)("div",{className:yn.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 Cn(Cn({},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)(Cn({layerIndex:a},A))),s()},children:"OK"}),(0,j.jsx)($.Z,{onClick:s,secondary:!0,children:"Cancel"})]})]})})},wn=r(39693),Bn=r.n(wn),Sn=r(2062),On=r(62029);function In(n,e){if(n){if("string"==typeof n)return Tn(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)?Tn(n,e):void 0}}function Tn(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 Zn={keysHeld:[],keysHeldBeforeLastRelease:[]};function Dn(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 Pn(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)?Pn(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 Pn(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 Un={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 Kn(n,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(0,o.I0)(),a=Dn((0,t.useState)(r),2),s=a[0],u=a[1],c=Dn((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 Tn(n)}(r)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(r)||In(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 Zn;default:return n}}),Zn),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)||In(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 Bn()([n.altKey&&"LA",n.ctrlKey&&"LC",n.metaKey&&"LG",n.shiftKey&&"LS"])}(n),r=(0,On.mapCharacter)(n.key.toLowerCase())||function(n){var e=Un[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 Yn(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 qn(n){var e,r,o=n.layout,i=n.layer,a=n.layerIndex,l=n.onClose,s=(e=Kn(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 Yn(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)?Yn(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:[yn.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:Bn()([yn.quickBindKey,u.bindIndex===t&&yn.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)(Sn.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 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 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}}(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 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}var Rn=function(n){return n.keyboard.sensors};function Wn(n){var e=n.layer,r=n.layerIndex,i=(n.isActiveLayer,(0,o.v9)(Rn)),a=Nn((0,t.useState)(!1),2),l=a[0],s=a[1],u=Nn((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:yn.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)(un,{layout:p,activeLayer:r})})]}),(0,j.jsx)("div",{className:yn.sensors,"data-sensor-count":i.length,style:{},children:(0,j.jsx)(bn,{sensors:i,layerIndex:r,layer:e})})]}),l&&(0,j.jsx)(kn,{layerIndex:r,onClose:function(){return s(!1)}}),c&&(0,j.jsx)(qn,{layout:p,layer:e,layerIndex:r,onClose:g})]})}var _n=r(30341),zn={};zn.styleTagTransform=v(),zn.setAttributes=b(),zn.insert=f().bind(null,"head"),zn.domAPI=A(),zn.insertStyleElement=h(),c()(_n.Z,zn);var Vn=_n.Z&&_n.Z.locals?_n.Z.locals:void 0,Xn=r(56803),Qn=r(50868),Mn=r(81485),Gn=r(18311);function Hn(n){return Hn="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},Hn(n)}function Fn(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 Jn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fn(Object(r),!0).forEach((function(e){$n(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Fn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function $n(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==Hn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==Hn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===Hn(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function ne(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 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.")}()}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}function re(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)(Mn.c),d=(0,t.useContext)(Gn.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,Qn.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,Qn.fD)(r,t,A,c,d)))}),[A,a,c,d]),g=function(n){var e=ne((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 Jn(Jn({},n),{},{dropIndex:e})}))}),[a]),d=(0,t.useCallback)((function(n){var e=Number(n.target.dataset.dropPosition);a((function(n){return Jn(Jn({},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=ne(g,2),m=h[0],v=h[1];return(0,j.jsx)("div",{className:Vn.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?Vn.active:"","data-slot-index":r,draggable:!0,onDragStart:v.handleDragStart,onDragEnd:v.handleDragEnd,onDrop:v.handleDrop,children:[(0,j.jsx)("div",{className:Bn()([Vn.dropper,m.dropIndex===r&&Vn.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:Bn()([Vn.layer,m.dragIndex===r&&Vn.dragging,m.isDragging&&m.dropIndex!==m.dragIndex&&m.dropIndex!==m.dragIndex+1&&null!==m.dropIndex&&r>=m.dropIndex&&Vn.displaced]).join(" "),children:[(0,j.jsx)("span",{className:Vn.index,children:r}),(0,j.jsxs)("span",{className:Vn.name,children:[n.name,(0,j.jsx)(s.Z,{name:"times-circle",className:Vn.delete,onClick:(0,Xn.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:Bn()([Vn.dropper,m.dropIndex===A.length&&Vn.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:Vn.layer,children:[(0,j.jsx)(s.Z,{className:Vn.index,name:"plus"}),(0,j.jsx)("span",{className:Vn.name,children:"Add Layer"})]})})]})})}re.propTypes={activeLayer:a().number.isRequired,onSelect:a().func.isRequired};var te=re;function oe(){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 ie(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 ae=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 ie(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)?ie(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)(oe,{}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(te,{activeLayer:u,onSelect:s}),(0,j.jsx)(Wn,{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.52e522c796903d1aec7c.js.map