1
2
|
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6793],{72054:function(n,e,r){"use strict";r.d(e,{Z:function(){return B}});var t=r(67294),o=r(45697),i=r.n(o),a=r(41051),l=r(93379),s=r.n(l),c=r(7795),u=r.n(c),d=r(90569),A=r.n(d),p=r(3565),f=r.n(p),y=r(19216),g=r.n(y),b=r(44589),h=r.n(b),m=r(56634),v={};v.styleTagTransform=h(),v.setAttributes=f(),v.insert=A().bind(null,"head"),v.domAPI=u(),v.insertStyleElement=g(),s()(m.Z,v);var x=m.Z&&m.Z.locals?m.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 B(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)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],c=(0,t.useRef)(),u=(0,t.useCallback)((function(n){c.current&&!c.current.contains(n.target)&&s(!1)}),[c,s]);return(0,t.useEffect)((function(){return document.body.addEventListener("click",u),function(){return document.body.removeEventListener("click",u)}}),[u]),(0,C.jsxs)("div",{ref:c,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)}))})]})}B.propTypes={actions:i().arrayOf(i().shape({callback:i().func.isRequired,content:i().oneOfType([i().node,i().string]).isRequired})).isRequired}},58887:function(n,e,r){"use strict";r.d(e,{Z:function(){return g}});var t=r(94184),o=r.n(t),i=r(67294),a=r(4803),l=r(32732),s=r(91118),c=r(48118),u=r(20817),d=r(85893);function A(n){return A="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},A(n)}function p(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 f(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){y(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function y(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==A(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==A(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===A(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function g(n){var e=n.keyPositions,r=n.scale,t=void 0===r?.2:r,A=n.styleOverrides,p=void 0===A?{}:A,g=(0,i.useContext)(u.V),b=g.layout,h=g.wrapperDimensions,m=(0,i.useMemo)((function(){return(0,a.fI)(h,{scale:t,overrides:f({position:"relative",pointerEvents:"none",padding:0,margin:0},p)})}),[t,h,p]);return(0,d.jsx)("div",{style:m,children:(0,d.jsx)(l.Z,{layout:b,bindings:[],scale:t,renderKey:function(n){var r,t=n.index;return(0,d.jsx)(s.Z,{onClick:function(){},selectable:!1,themeClass:o()((r={},y(r,c.Z.key,!0),y(r,c.Z.highlight,e.includes(t)),r))})}})})}},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 c(n){return c="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},c(n)}function u(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?u(Object(r),!0).forEach((function(e){A(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):u(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"!==c(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==c(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===c(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},g=o().shape(d(d(d({},p),f),y)),b=o().arrayOf(g),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 B=function(n){return a()(n,["x","y"])},j=function(n){return{x:n.rx,y:n.ry,a:n.r}},k=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,v),o=B(e),i=j(e),a=k(e),c=(0,l.Pi)(o,a,i);return(0,h.jsx)("div",C(C({className:s.Z.placer,style:c,"data-u":a.u,"data-h":a.h},t),{},{children:r}))}w.propTypes={scale:o().number,keyLayout:g.isRequired},w.defaultProps={scale:1};var S=w;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:b.isRequired,renderKey:o().func.isRequired,scale:o().number},O.defaultProps={scale:1};var I=O},86255:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return te}});var t=r(67294),o=r(95998),i=r(45697),a=r.n(i),l=r(80736),s=r(72054),c=r(85893);function u(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,c.jsx)(s.Z,{actions:[].concat((e=a,function(n){if(Array.isArray(n))return u(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 u(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)?u(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,c.jsxs)(c.Fragment,{children:["Convert ",(0,c.jsx)("code",{children:"&trans"})," to ",(0,c.jsx)("code",{children:"&kp"})]})},{callback:A.transparentToNone,content:(0,c.jsxs)(c.Fragment,{children:["Convert ",(0,c.jsx)("code",{children:"&trans"})," to ",(0,c.jsx)("code",{children:"&none"})]})},{callback:A.noneToKeypress,content:(0,c.jsxs)(c.Fragment,{children:["Convert ",(0,c.jsx)("code",{children:"&none"})," to ",(0,c.jsx)("code",{children:"&kp"})]})},{callback:A.noneToTransparent,content:(0,c.jsxs)(c.Fragment,{children:["Convert ",(0,c.jsx)("code",{children:"&none"})," to ",(0,c.jsx)("code",{children:"&trans"})]})},{callback:A.emptyKeypressToTransparent,content:(0,c.jsxs)(c.Fragment,{children:["Convert ",(0,c.jsx)("code",{children:"&kp ⦸"})," to ",(0,c.jsx)("code",{children:"&trans"})]})},{callback:A.emptyKeypressToNone,content:(0,c.jsxs)(c.Fragment,{children:["Convert ",(0,c.jsx)("code",{children:"&kp ⦸"})," to ",(0,c.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),g=r(18029),b=r.n(g),h=r(27926),m=r(41051),v=r(58887),x=r(2968),C=r(64261),E=r(96186),B=r(27213),j=r(83197),k=r(52156),w=r(55326),S=r(93379),O=r.n(S),I=r(7795),T=r.n(I),Z=r(90569),U=r.n(Z),P=r(3565),K=r.n(P),Y=r(19216),q=r.n(Y),D=r(44589),N=r.n(D),L=r(86246),R={};R.styleTagTransform=N(),R.setAttributes=K(),R.insert=U().bind(null,"head"),R.domAPI=T(),R.insertStyleElement=q(),O()(L.Z,R);var V=L.Z&&L.Z.locals?L.Z.locals:void 0,_=r(91118),W=r(61953),X=r(98588),Q=r(39017);function z(n){return z="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},z(n)}function F(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==z(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==z(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===z(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function M(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return G(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)?G(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 G(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 J="https://github.com/nickcoutsos/keymap-editor/discussions/109";function H(n){var e=n.binding,r=n.bindingIndex,o=n.onUpdate,i=n.onCancel,a=n.context,l=void 0===a?"none":a,s=M((0,t.useState)(e),2),u=s[0],d=s[1],A=M((0,w.Z)(u,void 0,d),2),p=A[0],f=p.bindTree,g=p.behavior,b=p.behaviorParams,v=p.editing,B=p.invalid,j=A[1],S=j.clearEditing,O=j.handleChange,I=j.handleConfirm,T=j.handleUpdateBindValue,Z=j.selectNodeForEditing,U=(0,t.useCallback)((function(){o((0,Q.FY)(f))}),[f,o]),P=v&&(0,c.jsx)(X.b,{node:v.node,type:v.type,behaviour:g,context:l,prompt:v.prompt,searchKey:"code",inline:!0,onSelect:T,onConfirm:I,onChange:O,onCancel:S});return(0,c.jsxs)(C.Z,{onDismiss:i,children:[(0,c.jsx)("div",{className:V.notice,children:(0,c.jsxs)("p",{children:[(0,c.jsx)(m.Z,{name:"bullhorn"})," I'm trying out a new way of editing bindings, if you hate it then ",(0,c.jsx)(x.Z,{href:J,external:!0,children:"please let me know"}),"!"]})}),(0,c.jsxs)(E.Z,{dismissText:null,classes:[V.dialogBox],children:[(0,c.jsxs)("div",{className:V.mainPanel,children:[(0,c.jsx)(en,{bindingIndex:r,bindTree:f,context:l}),(0,c.jsxs)("div",{className:V.bindingSlots,children:[(0,c.jsx)("h2",{children:"Set Key Binding"}),(0,c.jsxs)("h3",{children:["Behavior ",(0,c.jsx)("div",{style:{display:"inline-block",fontSize:"initial",fontWeight:"normal"},children:(0,c.jsx)("span",{className:y()(W.Z.extracted,F({},W.Z.highlight,0===(null==v?void 0:v.nodeIndex))),children:(0,c.jsx)("span",{className:W.Z.param,children:(0,c.jsx)(k.ZP,{slot:"behaviour",node:f,expanded:!0,onSelect:Z})})})})]}),(0,c.jsx)($,{slots:b,node:f,onSelect:Z,editing:v})]}),(0,c.jsxs)("div",{className:V.dialogActions,children:[(0,c.jsx)(h.Z,{onClick:U,disabled:B,children:"Okay"}),(0,c.jsx)(h.Z,{onClick:i,secondary:!0,children:"Cancel"})]})]}),P&&(0,c.jsxs)("div",{className:V.editPanel,children:[(0,c.jsx)("button",{onClick:I,className:V.editPanelClose,children:"Close"}),P]})]})]})}function $(n){var e=n.slots,r=n.node,o=n.editing,i=n.onSelect;return 0===e.length?null:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{children:"Parameters"}),(0,c.jsx)("ol",{className:V.parameterSlots,"data-slot-count":e.length,children:e.map((function(n,e){return"placeholder"!==n.type&&(0,c.jsx)(t.Fragment,{children:(0,c.jsx)(nn,{slot:n,param:r.params[e],editing:(null==o?void 0:o.nodeIndex)===e+1,onSelect:i},e)},e)}))})]})}function nn(n){var e=n.slot,r=n.param,o=n.editing,i=n.onSelect,a=(0,t.useMemo)((function(){var n=e.raw?"Raw value":e.name||e,r={code:"key-code"}[n]||n;return b()(r)}),[e]);return(0,c.jsxs)("li",{children:[(0,c.jsx)("label",{children:a}),(0,c.jsx)("span",{className:y()(V.param,W.Z.extracted,F({},W.Z.highlight,o)),children:(0,c.jsx)(j.N,{slot:e,node:r,onSelect:i,expanded:!0})})]})}function en(n){var e=n.bindingIndex,r=n.bindTree,t=n.context;return(0,c.jsxs)("div",{className:V.keyBindingHeader,children:[(0,c.jsx)(v.Z,{keyPositions:[e],styleOverrides:{display:"inline-block",padding:"3px",borderRadius:"3px"},scale:.15}),(0,c.jsx)(m.Z,{name:"arrow-right"}),(0,c.jsx)(_.Z,{selectable:!1,style:{pointerEvents:"none"},children:(0,c.jsx)(B.Z,{context:t,value:r.value,params:r.params,onUpdate:function(){}})})]})}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}function tn(n){var e,r,i=n.layout,a=n.activeLayer,s=(0,o.I0)(),u=(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,r)||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}}(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],g=(0,t.useCallback)((function(n,e){s((0,l.V6)({layerIndex:a,bindIndex:n,binding:e}))}),[s,a]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(A.Z,{layout:i,renderKey:function(n){var e,r,t=n.index,o=n.keyLayout;return u.parsed[t]&&(0,c.jsx)(p.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:W.Z.unified,onClick:function(n){n.stopPropagation(),y(t)}},onUpdate:function(n){return g(t,n)}})}}),null!==f&&(0,c.jsx)(H,{binding:u.parsed[f],bindingIndex:f,onCancel:function(){return y(null)},onUpdate:function(n){g(f,n),y(null)}})]})}H.propTypes={context:a().string,hideBehaviour:a().bool.isRequired,onUpdate:a().func.isRequired},H.defaultProps={hideBehaviour:!1};var on=r(67069);function an(n){var e=n.context,r=n.binding,t=n.onUpdate,o=r.value,i=r.params;return(0,c.jsx)(_.Z,{themeClass:W.Z.encoder2,children:(0,c.jsx)(B.Z,{context:e,value:o,params:i,onUpdate:t})})}an.propTypes={binding:on.dH,onUpdate:a().func.isRequired};var ln=an,sn=r(59500),cn={};cn.styleTagTransform=N(),cn.setAttributes=K(),cn.insert=U().bind(null,"head"),cn.domAPI=T(),cn.insertStyleElement=q(),O()(sn.Z,cn);var un=sn.Z&&sn.Z.locals?sn.Z.locals:void 0;function dn(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,c.jsxs)("div",{style:{margin:"0 0 30px"},children:[(0,c.jsx)("h3",{children:"Sensor bindings"}),(0,c.jsx)("div",{style:{display:"flex",flexDirection:"row",gap:"25px"},children:t.map((function(n,e){return(0,c.jsx)(An,{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 An(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,u=(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,c.jsxs)("div",{className:un.sensor,"data-unbound":!r,children:[(0,c.jsxs)("label",{style:{fontVariant:"small-caps",fontSize:"90%"},children:[(0,c.jsx)("code",{children:s}),l&&(0,c.jsx)(m.Z,{name:"trash-can",title:"Remove sensor binding from this layer",className:un.deleteSensorBinding,onClick:A})]}),r&&(0,c.jsx)(ln,{context:"encoders",binding:r||{value:u,params:d},onUpdate:function(n){return i(o,n)}}),a&&(0,c.jsx)(_.Z,{onClick:p,title:"Add sensor binding to this layer",themeClass:y()(W.Z.encoder2,un.addSensorBinding),children:(0,c.jsx)(m.Z,{name:"add"})})]})}var pn=r(97494),fn=r(62417);function yn(n){return yn="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},yn(n)}function gn(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 bn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gn(Object(r),!0).forEach((function(e){hn(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):gn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function hn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==yn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==yn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===yn(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 vn=function(n){var e,r,i,a=n.layerIndex,s=n.onClose,u=(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)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,c.jsx)(C.Z,{onDismiss:s,children:(0,c.jsxs)(E.Z,{dismissText:"",children:[(0,c.jsxs)("h2",{children:["Customize Layer ",(0,c.jsx)("code",{children:d.name})]}),(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:un.field,children:[(0,c.jsx)("label",{htmlFor:"customize-layer-name",children:"Name"}),(0,c.jsx)(pn.Z,{id:"customize-layer-name",placeholder:"Default",value:p.name,validator:fn.Gk,onChange:function(n){return f((function(e){return bn(bn({},e),{},{name:n.target.value})}))}})]}),(0,c.jsxs)("div",{className:un.field,children:[(0,c.jsx)("label",{htmlFor:"customize-layer-label",children:"Label"}),(0,c.jsx)("input",{id:"customize-layer-label",placeholder:"Default",value:p.label,onChange:function(n){return f((function(e){return bn(bn({},e),{},{label:n.target.value})}))}})]})]}),(0,c.jsxs)("div",{style:{textAlign:"center",gap:"5px"},children:[(0,c.jsx)(h.Z,{onClick:function(){u((0,l.vc)(bn({layerIndex:a},p))),s()},children:"OK"}),(0,c.jsx)(h.Z,{onClick:s,secondary:!0,children:"Cancel"})]})]})})},xn=r(39693),Cn=r.n(xn),En=r(2062),Bn=r(4803),jn=r(62029);function kn(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)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],c=a[1],u=On((0,t.useState)(0),2),d=u[0],A=u[1],p=(0,t.useCallback)((function(){d===e.length-1?(A(0),c(!1)):A(d+1)}),[d,A,e.length,c]);!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)||kn(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(r,o)||kn(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]),c=(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",c),function(){document.body.removeEventListener("keydown",s),document.body.removeEventListener("keyup",c)}}),[n,s,c])}(s,(0,t.useCallback)((function(e){var r=function(n){var e=function(n){return Cn()([n.altKey&&"LA",n.ctrlKey&&"LC",n.metaKey&&"LG",n.shiftKey&&"LS"])}(n),r=(0,jn.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(){c(!0)}),[c]),y=(0,t.useCallback)((function(){c(!1)}),[c]);return[{isActive:s,bindIndex:d},{startQuickAssignment:f,cancelQuickAssignment:y,setBindIndex:A}]}function Un(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 Pn(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,r)||function(n,e){if(n){if("string"==typeof n)return Un(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)?Un(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],d=s[1],f=(0,t.useMemo)((function(){return(0,Bn.fI)(o,{overrides:{minWidth:"400px"}})}),[o]);return(0,t.useEffect)((function(){u.isActive||l()}),[u.isActive,l]),(0,c.jsx)(C.Z,{onDismiss:l,children:(0,c.jsxs)(E.Z,{classes:[un.quickAssignDialog],dismissText:"",children:[(0,c.jsx)("h2",{children:"Quick-assign layer keybindings"}),(0,c.jsxs)("p",{children:["Press a key on your keyboard to set a ",(0,c.jsx)("code",{children:"&kp"})," binding at the highlighted position in your keymap."]}),(0,c.jsx)("div",{style:f,children:(0,c.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,c.jsx)(p.Z,{label:o.label,keyWrapperProps:{selectable:!1,onClick:function(){return d.setBindIndex(t)},className:Cn()([un.quickBindKey,u.bindIndex===t&&un.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,c.jsxs)("div",{style:{textAlign:"center"},children:[(0,c.jsx)(En.Z,{children:(0,c.jsx)("span",{children:"Click on a different key to jump ahead or correct a previous binding."})}),(0,c.jsx)("p",{children:(0,c.jsx)(h.Z,{onClick:l,children:"Done"})})]})]})})}var Kn=r(20817);function Yn(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return qn(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)?qn(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 qn(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 Dn=function(n){return n.keyboard.sensors};function Nn(n){var e=n.layer,r=n.layerIndex,i=(n.isActiveLayer,(0,o.v9)(Dn)),a=Yn((0,t.useState)(!1),2),l=a[0],s=a[1],u=Yn((0,t.useState)(!1),2),A=u[0],p=u[1],f=(0,t.useContext)(Kn.V),y=f.layout,g=f.wrapperStyle,b=(0,t.useCallback)((function(){return s(!0)}),[s]),h=(0,t.useCallback)((function(){return p(!0)}),[p]),m=(0,t.useCallback)((function(){return p(!1)}),[p]),v=(0,t.useMemo)((function(){return[{callback:b,content:"Change Configuration"},{callback:h,content:(0,c.jsxs)(c.Fragment,{children:["Quick ",(0,c.jsx)("code",{children:"&kp"})," Assignment"]})}]}),[b,h]),x=g.width,C=g.height,E=g.margin,B=g.padding;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:un.layerWrapper,style:{margin:E,padding:B},children:[(0,c.jsxs)("div",{style:{width:x},children:[(0,c.jsxs)("h3",{style:{position:"relative"},children:[e.name," ",(0,c.jsx)(d,{layerIndex:r,additionalActions:v})]}),(0,c.jsx)("div",{style:{height:C},children:(0,c.jsx)(tn,{layout:y,activeLayer:r})})]}),(0,c.jsx)("div",{className:un.sensors,"data-sensor-count":i.length,style:{},children:(0,c.jsx)(dn,{sensors:i,layerIndex:r,layer:e})})]}),l&&(0,c.jsx)(vn,{layerIndex:r,onClose:function(){return s(!1)}}),A&&(0,c.jsx)(Pn,{layout:y,layer:e,layerIndex:r,onClose:m})]})}var Ln=r(30341),Rn={};Rn.styleTagTransform=N(),Rn.setAttributes=K(),Rn.insert=U().bind(null,"head"),Rn.domAPI=T(),Rn.insertStyleElement=q(),O()(Ln.Z,Rn);var Vn=Ln.Z&&Ln.Z.locals?Ln.Z.locals:void 0,_n=r(56803),Wn=r(50868),Xn=r(81485),Qn=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 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 Mn(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){Gn(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 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 Jn(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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return Hn(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)?Hn(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 Hn(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 $n(n){var e=n.activeLayer,r=n.onSelect,i=(0,t.useRef)(null),a=(0,o.I0)(),s=(0,t.useContext)(Kn.V).bindingCount,u=(0,t.useContext)(Xn.c),d=(0,t.useContext)(Qn.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,Wn.fD)(n,null,A,u,d)))}}),[A,a,u,d]),g=(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,Wn.fD)(r,t,A,u,d)))}),[A,a,u,d]),b=function(n){var e=Jn((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]),c=(0,t.useCallback)((function(n){a((function(e){return null===e.dropIndex&&n.stopPropagation(),{dragIndex:null,dropIndex:null}}))}),[a]),u=(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:c,handleDragEnter:u,handleDragLeave:d,handleDragOver:l,handleDrop:A}]}(g),h=Jn(b,2),v=h[0],x=h[1];return(0,c.jsx)("div",{className:Vn.layerSelector,ref:i,children:(0,c.jsxs)("ul",{"data-dragging":v.isDragging,children:[A.map((function(n,r){return(0,c.jsxs)("li",{className:e===r?Vn.active:"","data-slot-index":r,draggable:!0,onDragStart:x.handleDragStart,onDragEnd:x.handleDragEnd,onDrop:x.handleDrop,children:[(0,c.jsx)("div",{className:Cn()([Vn.dropper,v.dropIndex===r&&Vn.dropTarget]).join(" "),"data-drop-position":r,onDragEnter:x.handleDragEnter,onDragOver:x.handleDragOver,onDragLeave:x.handleDragLeave,onDrop:x.handleDrop}),(0,c.jsxs)("div",{onClick:function(){return p(r)},className:Cn()([Vn.layer,v.dragIndex===r&&Vn.dragging,v.isDragging&&v.dropIndex!==v.dragIndex&&v.dropIndex!==v.dragIndex+1&&null!==v.dropIndex&&r>=v.dropIndex&&Vn.displaced]).join(" "),children:[(0,c.jsx)("span",{className:Vn.index,children:r}),(0,c.jsxs)("span",{className:Vn.name,children:[n.name,(0,c.jsx)(m.Z,{name:"times-circle",className:Vn.delete,onClick:(0,_n.s)((function(){return y(r)}))})]})]})]},"slot-".concat(r))})),v.isDragging&&v.dragIndex<A.length-1&&(0,c.jsx)("li",{"data-slot-index":A.length,onDragEnd:x.handleDragEnd,onDrop:x.handleDrop,children:(0,c.jsx)("div",{className:Cn()([Vn.dropper,v.dropIndex===A.length&&Vn.dropTarget]).join(" "),"data-drop-position":A.length,onDragEnter:x.handleDragEnter,onDragOver:x.handleDragOver,onDragLeave:x.handleDragLeave,onDrop:x.handleDrop})},"slot-".concat(A.length)),!v.isDragging&&(0,c.jsx)("li",{onClick:f,children:(0,c.jsxs)("div",{className:Vn.layer,children:[(0,c.jsx)(m.Z,{className:Vn.index,name:"plus"}),(0,c.jsx)("span",{className:Vn.name,children:"Add Layer"})]})})]})})}$n.propTypes={activeLayer:a().number.isRequired,onSelect:a().func.isRequired};var ne=$n;function ee(){var n=(0,o.I0)(),e=(0,t.useContext)(Kn.V).bindingCount;return(0,c.jsxs)("div",{style:{textAlign:"center"},children:[(0,c.jsx)("h3",{children:"No keymap layers defined"}),(0,c.jsx)(h.Z,{onClick:function(){return n((0,l.Xv)({bindingCount:e}))},children:"Add layer"})]})}function re(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 te=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,c=!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){c=!0,o=n}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return re(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)?re(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,c.jsx)(ee,{}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(ne,{activeLayer:u,onSelect:s}),(0,c.jsx)(Nn,{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},86246: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,'.Ts1XsulUxBgSoayz6GP_ {\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n background: var(--bg);\n border-radius: 30px;\n box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.4);\n font-size: 80%;\n width: 541px;\n padding: 0 20px;\n margin: 20px 0;\n}\n\n.Ts1XsulUxBgSoayz6GP_ p { margin: 5px 0; }\n\n.HvPN0ksB6oQd4qFmfPPx {\n display: flex;\n padding: 0;\n max-width: fit-content;\n}\n\n.dev9GEtyVhEyYVIUSvLb {\n text-align: center;\n}\n\n.QBp5dxen3AvfxVVq9dFX {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-width: 400px;\n max-width: 500px;\n padding: 20px 40px;\n}\n\n.vYtmo_mSCpUFrKY4Ze9c {\n margin: 0;\n padding-left: 15px;\n}\n.vYtmo_mSCpUFrKY4Ze9c[data-slot-count="1"] {\n list-style-type: none;\n padding-left: 0;\n}\n.vYtmo_mSCpUFrKY4Ze9c li {\n position: relative;\n margin: 0 0 15px 25px;\n}\n\n.sfi7oDhjUZx3J3_Xg3UA {\n display: flex;\n align-items: center;\n justify-content: center;\n border-bottom: 1px solid var(--key-bg-base);\n padding-bottom: 20px;\n gap: 40px;\n}\n\n.mbARMb51fkXt7JdPhxjQ {\n position: relative;\n\n width: auto;\n min-width: 250px;\n max-width: 400px;\n max-height: 500px;\n\n padding: 20px;\n border-left: 1px solid var(--key-bg-base)\n}\n\n.K6nQZFo_rNe0mFFLdaRV {\n background-color: var(--selection);\n color: white;\n}\n\n.V4mgWJYUfj1UeMS3VOGp {\n position: absolute;\n left: 0;\n top: 50%;\n\n font-size: 75%;\n\n transform-origin: top left;\n transform: translate(-25%, 100%) rotate(-90deg);\n\n background-color: var(--dialog-bg);\n color: var(--key-color);\n border: 1px solid var(--key-bg-base);\n border-radius: 4px;\n}\n.V4mgWJYUfj1UeMS3VOGp:hover {\n cursor: pointer;\n background-color: var(--key-bg-base);\n}',"",{version:3,sources:["webpack://./src/Keyboard/Binding/styles.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,2BAA2B;EAC3B,qBAAqB;EACrB,mBAAmB;EACnB,4CAA4C;EAC5C,cAAc;EACd,YAAY;EACZ,eAAe;EACf,cAAc;AAChB;;AAEA,0BAAY,aAAa,EAAE;;AAE3B;EACE,aAAa;EACb,UAAU;EACV,sBAAsB;AACxB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,8BAA8B;EAC9B,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;EACE,SAAS;EACT,kBAAkB;AACpB;AACA;EACE,qBAAqB;EACrB,eAAe;AACjB;AACA;EACE,kBAAkB;EAClB,qBAAqB;AACvB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,2CAA2C;EAC3C,oBAAoB;EACpB,SAAS;AACX;;AAEA;EACE,kBAAkB;;EAElB,WAAW;EACX,gBAAgB;EAChB,gBAAgB;EAChB,iBAAiB;;EAEjB,aAAa;EACb;AACF;;AAEA;EACE,kCAAkC;EAClC,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,OAAO;EACP,QAAQ;;EAER,cAAc;;EAEd,0BAA0B;EAC1B,+CAA+C;;EAE/C,kCAAkC;EAClC,uBAAuB;EACvB,oCAAoC;EACpC,kBAAkB;AACpB;AACA;EACE,eAAe;EACf,oCAAoC;AACtC",sourcesContent:['.notice {\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n background: var(--bg);\n border-radius: 30px;\n box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.4);\n font-size: 80%;\n width: 541px;\n padding: 0 20px;\n margin: 20px 0;\n}\n\n.notice p { margin: 5px 0; }\n\n.dialogBox {\n display: flex;\n padding: 0;\n max-width: fit-content;\n}\n\n.dialogActions {\n text-align: center;\n}\n\n.mainPanel {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-width: 400px;\n max-width: 500px;\n padding: 20px 40px;\n}\n\n.parameterSlots {\n margin: 0;\n padding-left: 15px;\n}\n.parameterSlots[data-slot-count="1"] {\n list-style-type: none;\n padding-left: 0;\n}\n.parameterSlots li {\n position: relative;\n margin: 0 0 15px 25px;\n}\n\n.keyBindingHeader {\n display: flex;\n align-items: center;\n justify-content: center;\n border-bottom: 1px solid var(--key-bg-base);\n padding-bottom: 20px;\n gap: 40px;\n}\n\n.editPanel {\n position: relative;\n\n width: auto;\n min-width: 250px;\n max-width: 400px;\n max-height: 500px;\n\n padding: 20px;\n border-left: 1px solid var(--key-bg-base)\n}\n\n.editing {\n background-color: var(--selection);\n color: white;\n}\n\n.editPanelClose {\n position: absolute;\n left: 0;\n top: 50%;\n\n font-size: 75%;\n\n transform-origin: top left;\n transform: translate(-25%, 100%) rotate(-90deg);\n\n background-color: var(--dialog-bg);\n color: var(--key-color);\n border: 1px solid var(--key-bg-base);\n border-radius: 4px;\n}\n.editPanelClose:hover {\n cursor: pointer;\n background-color: var(--key-bg-base);\n}'],sourceRoot:""}]),a.locals={notice:"Ts1XsulUxBgSoayz6GP_",dialogBox:"HvPN0ksB6oQd4qFmfPPx",dialogActions:"dev9GEtyVhEyYVIUSvLb",mainPanel:"QBp5dxen3AvfxVVq9dFX",parameterSlots:"vYtmo_mSCpUFrKY4Ze9c",keyBindingHeader:"sfi7oDhjUZx3J3_Xg3UA",editPanel:"mbARMb51fkXt7JdPhxjQ",editing:"K6nQZFo_rNe0mFFLdaRV",editPanelClose:"V4mgWJYUfj1UeMS3VOGp"},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+")?",c="[\\ufe0e\\ufe0f]?",u=c+s+"(?:\\u200d(?:"+[i,a,l].join("|")+")"+c+s+")*",d="(?:"+[i+t+"?",t,a,l,r].join("|")+")",A=RegExp(o+"(?="+o+")|"+d+u,"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+"]",c="["+t+"]",u="[^"+e+i+l+r+t+o+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+o+"]",f="(?:"+c+"|"+u+")",y="(?:"+p+"|"+u+")",g="(?:['’](?:d|ll|m|re|s|t|ve))?",b="(?:['’](?: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+"?"+c+"+"+g+"(?="+[a,p,"$"].join("|")+")",y+"+"+b+"(?="+[a,p+f,"$"].join("|")+")",p+"?"+f+"+"+g,p+"+"+b,"\\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),c=r(3565),u=r.n(c),d=r(19216),A=r.n(d),p=r(44589),f=r.n(p),y=r(49040),g={};g.styleTagTransform=f(),g.setAttributes=u(),g.insert=s().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=A(),o()(y.Z,g),e.Z=y.Z&&y.Z.locals?y.Z.locals:void 0}}]);
//# sourceMappingURL=LayerEditorTab.ba857aa911d25b97a771.js.map
|