"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1803],{27926:function(n,e,t){t.d(e,{Z:function(){return w}});var r=t(93379),o=t.n(r),i=t(7795),a=t.n(i),l=t(90569),c=t.n(l),s=t(3565),u=t.n(s),A=t(19216),d=t.n(A),p=t(44589),f=t.n(p),b=t(56281),h={};h.styleTagTransform=f(),h.setAttributes=u(),h.insert=c().bind(null,"head"),h.domAPI=a(),h.insertStyleElement=d(),o()(b.Z,h);var y=b.Z&&b.Z.locals?b.Z.locals:void 0,m=t(85893);function v(n){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},v(n)}var g=["children","secondary","className"];function C(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function E(n){for(var e=1;e=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}(n,g);return(0,m.jsx)("button",E(E({className:[r,y.action,t&&y.secondary].join(" ")},o),{},{children:e}))}j.defaultProps={className:""};var w=j},60439:function(n,e,t){t.d(e,{Z:function(){return P}});var r=t(94184),o=t.n(r),i=t(6557),a=t.n(i),l=t(67294),c=t(45697),s=t.n(c),u=t(93379),A=t.n(u),d=t(7795),p=t.n(d),f=t(90569),b=t.n(f),h=t(3565),y=t.n(h),m=t(19216),v=t.n(m),g=t(44589),C=t.n(g),E=t(86015),x={};x.styleTagTransform=C(),x.setAttributes=y(),x.insert=b().bind(null,"head"),x.domAPI=p(),x.insertStyleElement=v(),A()(E.Z,x);var j=E.Z&&E.Z.locals?E.Z.locals:void 0,w=t(41051),B=t(56803),O=t(21517),k=t(85893);function Z(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return S(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(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 S(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}(n,E),l=e(i)||!i&&r&&"cannot be empty";return(0,g.jsxs)("span",{className:v.wrapper,children:[(0,g.jsx)("input",j({type:"text",value:i},a)),l&&(0,g.jsx)("span",{className:v.error,children:l})]})}B.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},62417:function(n,e,t){function r(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}t.d(e,{G3:function(){return o},Gk:function(){return r},O8:function(){return a},zq:function(){return i}});var o=r;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}function a(n){return n.length>31?"maximum length: 31":n.match(/^[^&]/)?'must start with "&"':n.match(/^&[^a-zA-Z]/)?"first character must be a letter":n.slice(1).match(/[^a-zA-Z0-9_]/)?"valid characters: a-zA-Z0-9_":void 0}},11937:function(n,e,t){t.r(e),t.d(e,{default:function(){return V}});var r=t(50361),o=t.n(r),i=t(67294),a=t(95998),l=t(80736),c=t(27926),s=t(62417),u=t(96186),A=t(97494),d=t(64261),p=t(91892),f=t(93379),b=t.n(f),h=t(7795),y=t.n(h),m=t(90569),v=t.n(m),g=t(3565),C=t.n(g),E=t(19216),x=t.n(E),j=t(44589),w=t.n(j),B=t(55235),O={};O.styleTagTransform=w(),O.setAttributes=C(),O.insert=v().bind(null,"head"),O.domAPI=y(),O.insertStyleElement=x(),b()(B.Z,O);var k=B.Z&&B.Z.locals?B.Z.locals:void 0,Z=t(85893);function S(n){return S="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},S(n)}function P(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function Y(n){for(var e=1;en.length)&&(e=n.length);for(var t=0,r=new Array(e);t0&&!(0,s.Gk)(h.name)&&(null===(e=h.properties["if-layers"])||void 0===e||null===(t=e.parsed)||void 0===t?void 0:t.length)>0&&void 0!==(null===(r=h.properties["then-layer"])||void 0===r?void 0:r.parsed)}),[h]),g=(0,i.useMemo)((function(){return m.map((function(n,e){return{id:e,label:(0,l.EI)(n)}}))}),[m]),C=(0,i.useMemo)((function(){return g.find((function(n){var e;return n.id===(null===(e=h.properties["then-layer"])||void 0===e?void 0:e.parsed)}))}),[h,g]),E=(0,i.useMemo)((function(){var n;return((null===(n=h.properties["if-layers"])||void 0===n?void 0:n.parsed)||[]).map((function(n){return g.find((function(e){return e.id===n}))}))}),[h,g]),x=(0,i.useCallback)((function(n){return y((function(e){return Y(Y({},e),{},{name:n.target.value})}))}),[y]),j=(0,i.useCallback)((function(n){return y((function(e){return Y(Y({},e),{},{properties:Y(Y({},e.properties),{},{"if-layers":{parsed:n.map((function(n){return n.id}))}})})}))}),[y]),w=(0,i.useCallback)((function(n){return y((function(e){return Y(Y({},e),{},{properties:Y(Y({},e.properties),{},{"then-layer":{parsed:n.id}})})}))}),[y]),B=(0,i.useCallback)((function(){return o(h)}),[o,h]);return(0,Z.jsx)(d.Z,{onDismiss:f,children:(0,Z.jsxs)(u.Z,{dismissText:!1,style:{width:"500px"},children:[(0,Z.jsx)("h2",{children:"Conditional Layer"}),(0,Z.jsxs)("div",{className:k.form,children:[(0,Z.jsxs)("div",{className:k.field,children:[(0,Z.jsx)("label",{htmlFor:"pending_conditional_layer_name",children:"Condition name"}),(0,Z.jsx)(A.Z,{id:"pending_conditional_layer_name",value:h.name,validator:s.Gk,onChange:x})]}),(0,Z.jsxs)("div",{className:k.field,children:[(0,Z.jsx)("label",{id:"pending_conditional_layer_if_layers",children:"When these layers are active"}),(0,Z.jsx)(p.Z,{isMulti:!0,isSearchable:!0,id:"pending_conditional_layer_if_layers",value:E,options:g,onChange:j,getOptionValue:function(n){return n.id}})]}),(0,Z.jsxs)("div",{className:k.field,children:[(0,Z.jsx)("label",{htmlFor:"pending_conditional_layer_then_layer",children:"Activate this layer"}),(0,Z.jsx)(p.Z,{id:"pending_conditional_layer_then_layer",value:C,options:g,onChange:w,getOptionValue:function(n){return n.id}})]})]}),(0,Z.jsxs)("div",{style:{textAlign:"center",marginTop:"10px"},children:[(0,Z.jsx)(c.Z,{onClick:B,disabled:!v,children:"Okay"}),(0,Z.jsx)(c.Z,{onClick:f,secondary:!0,children:"Cancel"})]})]})})}var z=t(59140),T=t(90291),W={};W.styleTagTransform=w(),W.setAttributes=C(),W.insert=v().bind(null,"head"),W.domAPI=y(),W.insertStyleElement=x(),b()(T.Z,W);var R=T.Z&&T.Z.locals?T.Z.locals:void 0,_=t(41051),q=t(60439);function F(n){return F="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},F(n)}function J(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function U(n){for(var e=1;en.length)&&(e=n.length);for(var t=0,r=new Array(e);t 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.6410a97ffdb1b68ee5b0.js.map