"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1803],{27926:function(n,e,r){r.d(e,{Z:function(){return O}});var t=r(93379),o=r.n(t),i=r(7795),a=r.n(i),l=r(90569),c=r.n(l),s=r(3565),u=r.n(s),d=r(19216),A=r.n(d),p=r(44589),f=r.n(p),b=r(56281),y={};y.styleTagTransform=f(),y.setAttributes=u(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=A(),o()(b.Z,y);var h=b.Z&&b.Z.locals?b.Z.locals:void 0,m=r(85893);function g(n){return g="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},g(n)}var v=["children","secondary","className"];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 x(n){for(var e=1;e=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,v);return(0,m.jsx)("button",x(x({className:[t,h.action,r&&h.secondary].join(" ")},o),{},{children:e}))}j.defaultProps={className:""};var O=j},97494:function(n,e,r){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),c=r.n(l),s=r(90569),u=r.n(s),d=r(3565),A=r.n(d),p=r(19216),f=r.n(p),b=r(44589),y=r.n(b),h=r(33988),m={};m.styleTagTransform=y(),m.setAttributes=A(),m.insert=u().bind(null,"head"),m.domAPI=c(),m.insertStyleElement=f(),a()(h.Z,m);var g=h.Z&&h.Z.locals?h.Z.locals:void 0,v=r(85893);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)}var x=["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=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,x),l=e(i)||!i&&t&&"cannot be empty";return(0,v.jsxs)("span",{className:g.wrapper,children:[(0,v.jsx)("input",j({type:"text",value:i},a)),l&&(0,v.jsx)("span",{className:g.error,children:l})]})}w.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},62417:function(n,e,r){function t(n){return n.length>31?"maximum length: 31":n.match(/^[^a-zA-Z]/)?"first character must be a letter":n.match(/[^a-zA-Z0-9,._+-]/)?"valid characters: a-zA-Z0-9,._+-":void 0}r.d(e,{G3:function(){return o},Gk:function(){return t},zq:function(){return i}});var o=t;function i(n){return n.length>31?"maximum length: 31":n.match(/^[^a-zA-Z]/)?"first character must be a letter":n.match(/[^a-zA-Z0-9_]/)?"valid characters: a-zA-Z0-9_":void 0}},11937:function(n,e,r){r.r(e),r.d(e,{default:function(){return G}});var t=r(67294),o=r(95998),i=r(80736),a=r(27926),l=r(62417),c=r(96186),s=r(97494),u=r(64261),d=r(80993),A=r(93379),p=r.n(A),f=r(7795),b=r.n(f),y=r(90569),h=r.n(y),m=r(3565),g=r.n(m),v=r(19216),C=r.n(v),x=r(44589),E=r.n(x),j=r(55235),O={};O.styleTagTransform=E(),O.setAttributes=g(),O.insert=h().bind(null,"head"),O.domAPI=b(),O.insertStyleElement=C(),p()(j.Z,O);var w=j.Z&&j.Z.locals?j.Z.locals:void 0,B=r(85893);function k(n){return k="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},k(n)}function S(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 P(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,t=new Array(e);r0&&!(0,l.Gk)(y.name)&&(null===(e=y.properties["if-layers"])||void 0===e||null===(r=e.parsed)||void 0===r?void 0:r.length)>0&&void 0!==(null===(t=y.properties["then-layer"])||void 0===t?void 0:t.parsed)}),[y]),v=(0,t.useMemo)((function(){return m.map((function(n,e){return{id:e,label:(0,i.EI)(n)}}))}),[m]),C=(0,t.useMemo)((function(){return v.find((function(n){var e;return n.id===(null===(e=y.properties["then-layer"])||void 0===e?void 0:e.parsed)}))}),[y,v]),x=(0,t.useMemo)((function(){var n;return((null===(n=y.properties["if-layers"])||void 0===n?void 0:n.parsed)||[]).map((function(n){return v.find((function(e){return e.id===n}))}))}),[y,v]),E=(0,t.useCallback)((function(n){return h((function(e){return P(P({},e),{},{name:n.target.value})}))}),[h]),j=(0,t.useCallback)((function(n){return h((function(e){return P(P({},e),{},{properties:P(P({},e.properties),{},{"if-layers":{parsed:n.map((function(n){return n.id}))}})})}))}),[h]),O=(0,t.useCallback)((function(n){return h((function(e){return P(P({},e),{},{properties:P(P({},e.properties),{},{"then-layer":{parsed:n.id}})})}))}),[h]),k=(0,t.useCallback)((function(){return p(y)}),[p,y]);return(0,B.jsx)(u.Z,{onDismiss:f,children:(0,B.jsxs)(c.Z,{dismissText:!1,style:{width:"500px"},children:[(0,B.jsx)("h2",{children:"Conditional Layer"}),(0,B.jsxs)("div",{className:w.form,children:[(0,B.jsxs)("div",{className:w.field,children:[(0,B.jsx)("label",{htmlFor:"pending_conditional_layer_name",children:"Condition name"}),(0,B.jsx)(s.Z,{id:"pending_conditional_layer_name",value:y.name,validator:l.Gk,onChange:E})]}),(0,B.jsxs)("div",{className:w.field,children:[(0,B.jsx)("label",{id:"pending_conditional_layer_if_layers",children:"When these layers are active"}),(0,B.jsx)(d.Z,{isMulti:!0,isSearchable:!0,id:"pending_conditional_layer_if_layers",value:x,options:v,onChange:j,getOptionValue:function(n){return n.id}})]}),(0,B.jsxs)("div",{className:w.field,children:[(0,B.jsx)("label",{htmlFor:"pending_conditional_layer_then_layer",children:"Activate this layer"}),(0,B.jsx)(d.Z,{id:"pending_conditional_layer_then_layer",value:C,options:v,onChange:O,getOptionValue:function(n){return n.id}})]})]}),(0,B.jsxs)("div",{style:{textAlign:"center",marginTop:"10px"},children:[(0,B.jsx)(a.Z,{onClick:k,disabled:!g,children:"Okay"}),(0,B.jsx)(a.Z,{onClick:f,secondary:!0,children:"Cancel"})]})]})})}var _=r(59140),N=r(90291),Y={};Y.styleTagTransform=E(),Y.setAttributes=g(),Y.insert=h().bind(null,"head"),Y.domAPI=b(),Y.insertStyleElement=C(),p()(N.Z,Y);var W=N.Z&&N.Z.locals?N.Z.locals:void 0,I=r(41051);function z(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=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return M(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)?M(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 M(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r label {\n display: inline-block;\n text-align: right;\n width: 220px;\n margin-right: 10px;\n}\n\n.H2Q5hPoGwBMYLveiskOr > label + * {\n flex-shrink: 100;\n}","",{version:3,sources:["webpack://./src/Keyboard/ConditionalLayers/node-edit-form.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,mBAAmB;EACnB,cAAc;AAChB;;AAEA;EACE,qBAAqB;EACrB,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;AAClB",sourcesContent:[".field {\n display: flex;\n align-items: center;\n margin: 10px 0;\n}\n\n.field > label {\n display: inline-block;\n text-align: right;\n width: 220px;\n margin-right: 10px;\n}\n\n.field > label + * {\n flex-shrink: 100;\n}"],sourceRoot:""}]),a.locals={field:"H2Q5hPoGwBMYLveiskOr"},e.Z=a}}]); //# sourceMappingURL=ConditionalLayerEditorTab.db97dd49c33ce73ea69e.js.map