UNPKG

@jake-niemiec/react-planner

Version:

react-planner is a React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.

1 lines 820 kB
webpackJsonp([0],[,,,function(e,t,n){"use strict";e.exports=function(e,t,n,o,r,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,r,a,i,s],u=0;(l=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";const o={white:"#FFF",black:"#000"};t.a=o;t.b={500:{red:"#F44336",pink:"#E91E63",purple:"#9C27B0",deep_purple:"#673AB7",indigo:"#3F51B5",blue:"#2196F3",light_blue:"#03A9F4",cyan:"#00BCD4",teal:"#009688",green:"#4CAF50",light_green:"#8BC34A",lime:"#CDDC39",yellow:"#FFEB3B",amber:"#FFC107",orange:"#FF9800",deep_orange:"#FF5722",brown:"#795548",grey:"#9E9E9E",blue_grey:"#607D8B"}};const r={main:"#28292D",alt:"#2E2F33",icon:"#C2C2C2",border:"1px solid #555",text_main:o.white,text_alt:"#EBEBEB"};t.c=r;t.d={main:"#1CA6FC",alt:"#005FAF",icon:"#1CA6FC",border:"1px solid #FFF"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.NEW_PROJECT="NEW_PROJECT";t.LOAD_PROJECT="LOAD_PROJECT";t.SAVE_PROJECT="SAVE_PROJECT";t.OPEN_CATALOG="OPEN_CATALOG";t.SELECT_TOOL_EDIT="SELECT_TOOL_EDIT";t.UNSELECT_ALL="UNSELECT_ALL";t.SET_PROPERTIES="SET_PROPERTIES";t.SET_ITEMS_ATTRIBUTES="SET_ITEMS_ATTRIBUTES";t.SET_LINES_ATTRIBUTES="SET_LINES_ATTRIBUTES";t.SET_HOLES_ATTRIBUTES="SET_HOLES_ATTRIBUTES";t.REMOVE="REMOVE";t.UNDO="UNDO";t.ROLLBACK="ROLLBACK";t.SET_PROJECT_PROPERTIES="SET_PROJECT_PROPERTIES";t.OPEN_PROJECT_CONFIGURATOR="OPEN_PROJECT_CONFIGURATOR";t.INIT_CATALOG="INIT_CATALOG";t.UPDATE_MOUSE_COORDS="UPDATE_MOUSE_COORDS";t.UPDATE_ZOOM_SCALE="UPDATE_ZOOM_SCALE";t.TOGGLE_SNAP="TOGGLE_SNAP";t.CHANGE_CATALOG_PAGE="CHANGE_CATALOG_PAGE";t.GO_BACK_TO_CATALOG_PAGE="GO_BACK_TO_CATALOG_PAGE";t.THROW_ERROR="THROW_ERROR";t.THROW_WARNING="THROW_WARNING";t.COPY_PROPERTIES="COPY_PROPERTIES";t.PASTE_PROPERTIES="PASTE_PROPERTIES";t.PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY="PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY";t.SELECT_TOOL_ZOOM_IN="SELECT_TOOL_ZOOM_IN";t.SELECT_TOOL_ZOOM_OUT="SELECT_TOOL_ZOOM_OUT";t.SELECT_TOOL_PAN="SELECT_TOOL_PAN";t.UPDATE_2D_CAMERA="UPDATE_2D_CAMERA";t.SELECT_TOOL_3D_VIEW="SELECT_TOOL_3D_VIEW";t.SELECT_TOOL_3D_FIRST_PERSON="SELECT_TOOL_3D_FIRST_PERSON";t.SELECT_TOOL_DRAWING_ITEM="SELECT_TOOL_DRAWING_ITEM";t.UPDATE_DRAWING_ITEM="UPDATE_DRAWING_ITEM";t.END_DRAWING_ITEM="END_DRAWING_ITEM";t.BEGIN_DRAGGING_ITEM="BEGIN_DRAGGING_ITEM";t.UPDATE_DRAGGING_ITEM="UPDATE_DRAGGING_ITEM";t.END_DRAGGING_ITEM="END_DRAGGING_ITEM";t.BEGIN_ROTATING_ITEM="BEGIN_ROTATING_ITEM";t.UPDATE_ROTATING_ITEM="UPDATE_ROTATING_ITEM";t.END_ROTATING_ITEM="END_ROTATING_ITEM";t.SELECT_HOLE="SELECT_HOLE";t.SELECT_AREA="SELECT_AREA";t.SELECT_ITEM="SELECT_ITEM";t.SELECT_LINE="SELECT_LINE";t.SELECT_TOOL_DRAWING_LINE="SELECT_TOOL_DRAWING_LINE";t.BEGIN_DRAWING_LINE="BEGIN_DRAWING_LINE";t.UPDATE_DRAWING_LINE="UPDATE_DRAWING_LINE";t.END_DRAWING_LINE="END_DRAWING_LINE";t.SELECT_TOOL_DRAWING_HOLE="SELECT_TOOL_DRAWING_HOLE";t.UPDATE_DRAWING_HOLE="UPDATE_DRAWING_HOLE";t.END_DRAWING_HOLE="END_DRAWING_HOLE";t.BEGIN_DRAGGING_LINE="BEGIN_DRAGGING_LINE";t.UPDATE_DRAGGING_LINE="UPDATE_DRAGGING_LINE";t.END_DRAGGING_LINE="END_DRAGGING_LINE";t.SELECT_TOOL_UPLOAD_IMAGE="SELECT_TOOL_UPLOAD_IMAGE";t.BEGIN_UPLOADING_IMAGE="BEGIN_UPLOADING_IMAGE";t.END_UPLOADING_IMAGE="END_UPLOADING_IMAGE";t.BEGIN_FITTING_IMAGE="BEGIN_FITTING_IMAGE";t.END_FITTING_IMAGE="END_FITTING_IMAGE";t.BEGIN_DRAGGING_HOLE="BEGIN_DRAGGING_HOLE";t.UPDATE_DRAGGING_HOLE="UPDATE_DRAGGING_HOLE";t.END_DRAGGING_HOLE="END_DRAGGING_HOLE";t.BEGIN_DRAGGING_VERTEX="BEGIN_DRAGGING_VERTEX";t.UPDATE_DRAGGING_VERTEX="UPDATE_DRAGGING_VERTEX";t.END_DRAGGING_VERTEX="END_DRAGGING_VERTEX";t.SET_LAYER_PROPERTIES="SET_LAYER_PROPERTIES";t.ADD_LAYER="ADD_LAYER";t.SELECT_LAYER="SELECT_LAYER";t.REMOVE_LAYER="REMOVE_LAYER";const o={NEW_PROJECT:"NEW_PROJECT",LOAD_PROJECT:"LOAD_PROJECT",SAVE_PROJECT:"SAVE_PROJECT",OPEN_CATALOG:"OPEN_CATALOG",SELECT_TOOL_EDIT:"SELECT_TOOL_EDIT",UNSELECT_ALL:"UNSELECT_ALL",SET_PROPERTIES:"SET_PROPERTIES",SET_ITEMS_ATTRIBUTES:"SET_ITEMS_ATTRIBUTES",SET_LINES_ATTRIBUTES:"SET_LINES_ATTRIBUTES",SET_HOLES_ATTRIBUTES:"SET_HOLES_ATTRIBUTES",REMOVE:"REMOVE",UNDO:"UNDO",ROLLBACK:"ROLLBACK",SET_PROJECT_PROPERTIES:"SET_PROJECT_PROPERTIES",OPEN_PROJECT_CONFIGURATOR:"OPEN_PROJECT_CONFIGURATOR",INIT_CATALOG:"INIT_CATALOG",UPDATE_MOUSE_COORDS:"UPDATE_MOUSE_COORDS",UPDATE_ZOOM_SCALE:"UPDATE_ZOOM_SCALE",TOGGLE_SNAP:"TOGGLE_SNAP",CHANGE_CATALOG_PAGE:"CHANGE_CATALOG_PAGE",GO_BACK_TO_CATALOG_PAGE:"GO_BACK_TO_CATALOG_PAGE",THROW_ERROR:"THROW_ERROR",THROW_WARNING:"THROW_WARNING",COPY_PROPERTIES:"COPY_PROPERTIES",PASTE_PROPERTIES:"PASTE_PROPERTIES",PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY:"PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY"};t.PROJECT_ACTIONS=o;const r={SELECT_TOOL_ZOOM_IN:"SELECT_TOOL_ZOOM_IN",SELECT_TOOL_ZOOM_OUT:"SELECT_TOOL_ZOOM_OUT",SELECT_TOOL_PAN:"SELECT_TOOL_PAN",UPDATE_2D_CAMERA:"UPDATE_2D_CAMERA"};t.VIEWER2D_ACTIONS=r;const a={SELECT_TOOL_3D_VIEW:"SELECT_TOOL_3D_VIEW",SELECT_TOOL_3D_FIRST_PERSON:"SELECT_TOOL_3D_FIRST_PERSON"};t.VIEWER3D_ACTIONS=a;const i={SELECT_ITEM:"SELECT_ITEM",SELECT_TOOL_DRAWING_ITEM:"SELECT_TOOL_DRAWING_ITEM",UPDATE_DRAWING_ITEM:"UPDATE_DRAWING_ITEM",END_DRAWING_ITEM:"END_DRAWING_ITEM",BEGIN_DRAGGING_ITEM:"BEGIN_DRAGGING_ITEM",UPDATE_DRAGGING_ITEM:"UPDATE_DRAGGING_ITEM",END_DRAGGING_ITEM:"END_DRAGGING_ITEM",BEGIN_ROTATING_ITEM:"BEGIN_ROTATING_ITEM",UPDATE_ROTATING_ITEM:"UPDATE_ROTATING_ITEM",END_ROTATING_ITEM:"END_ROTATING_ITEM"};t.ITEMS_ACTIONS=i;const s={SELECT_HOLE:"SELECT_HOLE",SELECT_TOOL_DRAWING_HOLE:"SELECT_TOOL_DRAWING_HOLE",UPDATE_DRAWING_HOLE:"UPDATE_DRAWING_HOLE",END_DRAWING_HOLE:"END_DRAWING_HOLE",BEGIN_DRAGGING_HOLE:"BEGIN_DRAGGING_HOLE",UPDATE_DRAGGING_HOLE:"UPDATE_DRAGGING_HOLE",END_DRAGGING_HOLE:"END_DRAGGING_HOLE"};t.HOLE_ACTIONS=s;const l={SELECT_LINE:"SELECT_LINE",SELECT_TOOL_DRAWING_LINE:"SELECT_TOOL_DRAWING_LINE",BEGIN_DRAWING_LINE:"BEGIN_DRAWING_LINE",UPDATE_DRAWING_LINE:"UPDATE_DRAWING_LINE",END_DRAWING_LINE:"END_DRAWING_LINE",BEGIN_DRAGGING_LINE:"BEGIN_DRAGGING_LINE",UPDATE_DRAGGING_LINE:"UPDATE_DRAGGING_LINE",END_DRAGGING_LINE:"END_DRAGGING_LINE"};t.LINE_ACTIONS=l;const c={SELECT_AREA:"SELECT_AREA"};t.AREA_ACTIONS=c;const u={ADD_LAYER:"ADD_LAYER",SET_LAYER_PROPERTIES:"SET_LAYER_PROPERTIES",SELECT_LAYER:"SELECT_LAYER",REMOVE_LAYER:"REMOVE_LAYER"};t.SCENE_ACTIONS=u;const d={BEGIN_DRAGGING_VERTEX:"BEGIN_DRAGGING_VERTEX",UPDATE_DRAGGING_VERTEX:"UPDATE_DRAGGING_VERTEX",END_DRAGGING_VERTEX:"END_DRAGGING_VERTEX"};t.VERTEX_ACTIONS=d;t.MODE_IDLE="MODE_IDLE";t.MODE_2D_ZOOM_IN="MODE_2D_ZOOM_IN";t.MODE_2D_ZOOM_OUT="MODE_2D_ZOOM_OUT";t.MODE_2D_PAN="MODE_2D_PAN";t.MODE_3D_VIEW="MODE_3D_VIEW";t.MODE_3D_FIRST_PERSON="MODE_3D_FIRST_PERSON";t.MODE_WAITING_DRAWING_LINE="MODE_WAITING_DRAWING_LINE";t.MODE_DRAGGING_LINE="MODE_DRAGGING_LINE";t.MODE_DRAGGING_VERTEX="MODE_DRAGGING_VERTEX";t.MODE_DRAGGING_ITEM="MODE_DRAGGING_ITEM";t.MODE_DRAGGING_HOLE="MODE_DRAGGING_HOLE";t.MODE_DRAWING_LINE="MODE_DRAWING_LINE";t.MODE_DRAWING_HOLE="MODE_DRAWING_HOLE";t.MODE_DRAWING_ITEM="MODE_DRAWING_ITEM";t.MODE_ROTATING_ITEM="MODE_ROTATING_ITEM";t.MODE_UPLOADING_IMAGE="MODE_UPLOADING_IMAGE";t.MODE_FITTING_IMAGE="MODE_FITTING_IMAGE";t.MODE_VIEWING_CATALOG="MODE_VIEWING_CATALOG";t.MODE_CONFIGURING_PROJECT="MODE_CONFIGURING_PROJECT";const p=["MODE_IDLE","MODE_2D_ZOOM_IN","MODE_2D_ZOOM_OUT","MODE_2D_PAN","MODE_WAITING_DRAWING_LINE","MODE_DRAWING_LINE","MODE_DRAWING_HOLE","MODE_DRAWING_ITEM","MODE_DRAGGING_LINE","MODE_DRAGGING_VERTEX","MODE_DRAGGING_ITEM","MODE_DRAGGING_HOLE","MODE_FITTING_IMAGE","MODE_UPLOADING_IMAGE","MODE_ROTATING_ITEM"];t.MODE_SNAPPING=p;t.UNIT_MILLIMETER="mm";t.UNIT_CENTIMETER="cm";t.UNIT_METER="m";t.UNIT_INCH="in";t.UNIT_FOOT="ft";t.UNIT_MILE="mi";const h=["mm","cm","m","in","ft","mi"];t.UNITS_LENGTH=h;t.EPSILON=1e-6},function(e,t,n){"use strict";var o=n(17);e.exports=o},function(e,t,n){"use strict";e.exports=function(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),o=Object.prototype.hasOwnProperty,r=1;r<arguments.length;r++){var a=arguments[r];if(null!=a){var i=Object(a);for(var s in i)o.call(i,s)&&(n[s]=i[s])}}return n}},,function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=o(n(0)),i=o(n(2)),s=function(e,t){var n=e.children,o=e.color,i=e.size,s=e.style,l=e.width,c=e.height,u=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["children","color","size","style","width","height"]),d=t.reactIconBase,p=void 0===d?{}:d,h=i||p.size||"1em";return a.default.createElement("svg",r({children:n,fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:c||h,width:l||h},p,u,{style:r({verticalAlign:"middle",color:o||p.color},p.style||{},s)}))};s.propTypes={color:i.default.string,size:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),height:i.default.oneOfType([i.default.string,i.default.number]),style:i.default.object},s.contextTypes={reactIconBase:i.default.shape(s.propTypes)},t.default=s,e.exports=t.default},function(e,t,n){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen,isInWorker:!o};e.exports=r},function(e,t,n){"use strict";function o(e){return e?e.nodeType===P?e.documentElement:e.firstChild:null}function r(e){var t=o(e);return t&&A.getID(t)}function a(e){return e&&e.getAttribute&&e.getAttribute(I)||""}function i(e,t){if(e){a(e)!==t&&_(!1);var n=A.findReactContainerForID(t);if(n&&b(n,e))return!0}return!1}function s(e){var t=r(e);return!!t&&t!==h.getReactRootIDFromNodeID(t)}var l=n(31),c=n(50),u=(n(18),n(121)),d=n(12),p=n(122),h=n(32),m=n(38),f=n(124),y=n(15),g=n(25),w=n(70),x=n(16),v=n(7),M=n(39),b=n(125),E=n(72),_=n(3),O=n(48),T=n(74),I=(n(75),n(6),l.ID_ATTRIBUTE_NAME),q={},P=9,D="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),C={},S={},G=[],k=null,L=function(){};L.prototype.isReactComponent={},L.prototype.render=function(){return this.props};var A={TopLevelWrapper:L,_instancesByReactRootID:C,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,o){return A.scrollMonitor(n,function(){w.enqueueElementInternal(e,t),o&&w.enqueueCallbackInternal(e,o)}),e},_registerComponent:function(e,t){(!t||1!==t.nodeType&&t.nodeType!==P&&11!==t.nodeType)&&_(!1),c.ensureScrollValueMonitoring();var n=A.registerContainer(t);return C[n]=e,n},_renderNewRootComponent:function(e,t,n,o){var r=E(e,null),a=A._registerComponent(r,t);return x.batchedUpdates(function(e,t,n,o,r){var a=x.ReactReconcileTransaction.getPooled(o);a.perform(function(e,t,n,o,r,a){u.useCreateElement&&(a=v({},a),n.nodeType===P?a[D]=n:a[D]=n.ownerDocument);var i=g.mountComponent(e,t,o,a);e._renderedComponent._topLevelWrapper=e,A._mountImageIntoNode(i,n,r,o)},null,e,t,n,a,o,r),x.ReactReconcileTransaction.release(a)},r,a,t,n,o),r},renderSubtreeIntoContainer:function(e,t,n,o){return(null==e||null==e._reactInternalInstance)&&_(!1),A._renderSubtreeIntoContainer(e,t,n,o)},_renderSubtreeIntoContainer:function(e,t,n,i){d.isValidElement(t)||_(!1);var l=new d(L,null,null,null,null,null,t),c=C[r(n)];if(c){var u=c._currentElement.props;if(T(u,t)){var p=c._renderedComponent.getPublicInstance(),h=i&&function(){i.call(p)};return A._updateRootComponent(c,l,n,h),p}A.unmountComponentAtNode(n)}var m=o(n),f=m&&!!a(m),y=s(n),g=f&&!c&&!y,w=A._renderNewRootComponent(l,n,g,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):M)._renderedComponent.getPublicInstance();return i&&i.call(w),w},render:function(e,t,n){return A._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=r(e);return t&&(t=h.getReactRootIDFromNodeID(t)),t||(t=h.createReactRootID()),S[t]=e,t},unmountComponentAtNode:function(e){(!e||1!==e.nodeType&&e.nodeType!==P&&11!==e.nodeType)&&_(!1);var t=r(e),n=C[t];if(!n){s(e);var o=a(e);o&&h.getReactRootIDFromNodeID(o);return!1}return x.batchedUpdates(function(e,t){for(g.unmountComponent(e),t.nodeType===P&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},n,e),delete C[t],delete S[t],!0},findReactContainerForID:function(e){var t=h.getReactRootIDFromNodeID(e),n=S[t];return n},findReactNodeByID:function(e){var t=A.findReactContainerForID(e);return A.findComponentRoot(t,e)},getFirstReactDOM:function(e){return function(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=a(e);if(t){var n,o=h.getReactRootIDFromNodeID(t),r=e;do{if(n=a(r),null==(r=r.parentNode))return null}while(n!==o);if(r===S[o])return e}}return null}(e)},findComponentRoot:function(e,t){var n=G,o=0,r=function(e){k=null,h.traverseAncestors(e,function(e){var t=q[e];if(!t||!i(t,e))return!1;k=t});var t=k;return k=null,t}(t)||e;for(n[0]=r.firstChild,n.length=1;o<n.length;){for(var a,s=n[o++];s;){var l=A.getID(s);l?t===l?a=s:h.isAncestorIDOf(l,t)&&(n.length=o=0,n.push(s.firstChild)):n.push(s.firstChild),s=s.nextSibling}if(a)return n.length=0,a}n.length=0,_(!1)},_mountImageIntoNode:function(e,t,n,r){if((!t||1!==t.nodeType&&t.nodeType!==P&&11!==t.nodeType)&&_(!1),n){var a=o(t);if(f.canReuseMarkup(e,a))return;var i=a.getAttribute(f.CHECKSUM_ATTR_NAME);a.removeAttribute(f.CHECKSUM_ATTR_NAME);var s=a.outerHTML;a.setAttribute(f.CHECKSUM_ATTR_NAME,i);var l=e,c=function(e,t){for(var n=Math.min(e.length,t.length),o=0;o<n;o++)if(e.charAt(o)!==t.charAt(o))return o;return e.length===t.length?-1:n}(l,s);l.substring(c-20,c+20),s.substring(c-20,c+20);t.nodeType===P&&_(!1)}if(t.nodeType===P&&_(!1),r.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);t.appendChild(e)}else O(t,e)},ownerDocumentContextKey:D,getReactRootID:r,getID:function(e){var t=a(e);if(t)if(q.hasOwnProperty(t)){var n=q[t];n!==e&&(i(n,t)&&_(!1),q[t]=e)}else q[t]=e;return t},setID:function(e,t){var n=a(e);n!==t&&delete q[n],e.setAttribute(I,t),q[t]=e},getNode:function(e){return q.hasOwnProperty(e)&&i(q[e],e)||(q[e]=A.findReactNodeByID(e)),q[e]},getNodeFromInstance:function(e){var t=m.get(e)._rootNodeID;return p.isNullComponentID(t)?null:(q.hasOwnProperty(t)&&i(q[t],t)||(q[t]=A.findReactNodeByID(t)),q[t])},isValid:i,purgeID:function(e){delete q[e]}};y.measureMethods(A,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),e.exports=A},function(e,t,n){"use strict";var o=n(18),r=n(7),a=(n(51),"function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103),i={key:!0,ref:!0,__self:!0,__source:!0},s=function(e,t,n,o,r,i,s){var l={$$typeof:a,type:e,key:t,ref:n,props:s,_owner:i};return l};s.createElement=function(e,t,n){var r,a={},l=null,c=null;if(null!=t){c=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key,void 0===t.__self?null:t.__self,void 0===t.__source?null:t.__source;for(r in t)t.hasOwnProperty(r)&&!i.hasOwnProperty(r)&&(a[r]=t[r])}var u=arguments.length-2;if(1===u)a.children=n;else if(u>1){for(var d=Array(u),p=0;p<u;p++)d[p]=arguments[p+2];a.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(r in h)void 0===a[r]&&(a[r]=h[r])}return s(e,l,c,0,0,o.current,a)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceKey=function(e,t){return s(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},s.cloneAndReplaceProps=function(e,t){var n=s(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},s.cloneElement=function(e,t,n){var a,l=r({},e.props),c=e.key,u=e.ref,d=(e._self,e._source,e._owner);if(null!=t){void 0!==t.ref&&(u=t.ref,d=o.current),void 0!==t.key&&(c=""+t.key);for(a in t)t.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(l[a]=t[a])}var p=arguments.length-2;if(1===p)l.children=n;else if(p>1){for(var h=Array(p),m=0;m<p;m++)h[m]=arguments[m+2];l.children=h}return s(e.type,c,u,0,0,d,l)},s.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},e.exports=s},function(e,t,n){"use strict";function o(e,t){return e.x===t.x?e.y-t.y:e.x-t.x}function r(e,t,n,o){let r=e-n,a=t-o;return Math.sqrt(r*r+a*a)}function a(e){return{a:0,b:1,c:-e}}function i(e){return{a:1,b:0,c:-e}}function s(e,t,n,o,r,a){let i=n-e,s=o-t,l=i*i+s*s,c=-1;0!=l&&(c=((r-e)*i+(a-t)*s)/l);let u,d;c<0?(u=e,d=t):c>1?(u=n,d=o):(u=e+c*i,d=t+c*s);let p=r-u,h=a-d;return Math.sqrt(p*p+h*h)}function l(e,t,n,o,r){return o+(r-o)*(e-t)/(n-t)}Object.defineProperty(t,"__esModule",{value:!0}),t.compareVertices=o,t.minVertex=function(e,t){return o(e,t)>0?t:e},t.maxVertex=function(e,t){return o(e,t)>0?e:t},t.orderVertices=function(e){return e.sort(o)},t.pointsDistance=r,t.verticesDistance=function(e,t){let{x:n,y:o}=e,{x:a,y:i}=t;return r(n,o,a,i)},t.horizontalLine=a,t.verticalLine=i,t.linePassingThroughTwoPoints=function(e,t,n,o){if(e===n&&t==o)throw new Error("Geometry error");return e===n?i(x):t===o?a(t):{a:t-o,b:n-e,c:o*e-n*t}},t.distancePointFromLine=function(e,t,n,o,r){return Object(c.fAbs)(e*o+t*r+n)/Math.sqrt(e*e+t*t)},t.closestPointFromLine=function(e,t,n,o,r){let a=e*e+t*t;return{x:(t*(t*o-e*r)-e*n)/a,y:(e*-t*o+e*r-t*n)/a}},t.intersectionFromTwoLines=function(e,t,n,o,r,a){let i=t*o-e*r;if(0===i)return;return{x:(n*r-t*a)/i,y:(e*a-n*o)/i}},t.intersectionFromTwoLineSegment=function(e,t,n,o){let{x:r,y:a}=e,{x:i,y:s}=t,{x:l,y:d}=n,{x:p,y:h}=o,m=(h-d)*(i-r)-(p-l)*(s-a),f=(p-l)*(a-d)-(h-d)*(r-l),y=(i-r)*(a-d)-(s-a)*(r-l);if(Object(c.fAbs)(m)<=u.EPSILON){if(Object(c.fAbs)(f)<=u.EPSILON&&Object(c.fAbs)(y)<=u.EPSILON){let r=(e,t)=>e.x===t.x?e.y-t.y:e.x-t.x,a=[e,t].sort(r),i=[n.toJS(),o.toJS()].sort(r),[s,l]=[a,i].sort((e,t)=>r(e[0],t[0]));return s[1].x===l[0].x?{type:l[0].y<=s[1].y?"colinear":"none"}:{type:l[0].x<=s[1].x?"colinear":"none"}}return{type:"parallel"}}var g=f/m,w=y/m;if(g>=0-u.EPSILON&&g<=1+u.EPSILON&&w>=0-u.EPSILON&&w<=1+u.EPSILON)return{type:"intersecting",point:{x:r+g*(i-r),y:a+g*(s-a)}};return{type:"none"}},t.distancePointFromLineSegment=s,t.isPointOnLineSegment=function(e,t,n,o,r,a,i=u.EPSILON){return s(e,t,n,o,r,a)<=i},t.closestPointFromLineSegment=function(e,t,n,o,r,a){if(e===n)return{x:e,y:a};if(t===o)return{x:r,y:t};let i=(o-t)/(n-e),s=t-i*e,l=-1/i,c=(a-l*r-s)/(i-l);return{x:c,y:i*c+s}},t.pointPositionOnLineSegment=function(e,t,n,o,a,i){let s=r(e,t,n,o),c=r(e,t,a,i)/s;return e>n&&(c=l(c,0,1,1,0)),c},t.mapRange=l,t.angleBetweenTwoPointsAndOrigin=function(e,t,n,o){return 180*-Math.atan2(t-o,n-e)/Math.PI},t.angleBetweenTwoPoints=function(e,t,n,o){return Math.atan2(o-t,n-e)},t.samePoints=function({x:e,y:t},{x:n,y:o}){return Object(c.fAbs)(e-n)<=u.EPSILON&&Object(c.fAbs)(t-o)<=u.EPSILON},t.extendLine=function(e,t,n,o,r,a=6){let i=Math.atan2(o-t,n-e);return{x:Object(c.toFixedFloat)(e+Math.cos(i)*r,a),y:Object(c.toFixedFloat)(t+Math.sin(i)*r,a)}},t.roundVertex=function(e,t=6){return e.set("x",Object(c.toFixedFloat)(e.get("x"),t)),e.set("y",Object(c.toFixedFloat)(e.get("y"),t)),e};var c=n(57),u=n(5)},function(e,t,n){"use strict";var o=n(46),r=n(63),a=n(108),i=n(109),s=n(110),l=n(244),c=n(245),u=n(246),d=n(64),p=n(248),h=n(111),m=n(84),f=n(36);n.d(t,"a",function(){return o.a}),n.d(t,"b",function(){return r.a}),n.d(t,"c",function(){return a.a}),n.d(t,"d",function(){return i.a}),n.d(t,"e",function(){return l.a}),n.d(t,"f",function(){return c.a}),n.d(t,"g",function(){return u.a}),n.d(t,"h",function(){return d.a}),n.d(t,"i",function(){return p.a}),n.d(t,"j",function(){return m.a}),n.d(t,"k",function(){return f.a}),t.l={Button:o.a,CancelButton:r.a,ContentContainer:a.a,ContentTitle:i.a,DeleteButton:s.a,FormBlock:l.a,FormColorInput:c.a,FormLabel:u.a,FormNumberInput:d.a,FormSelect:p.a,FormSlider:h.a,FormSubmitButton:m.a,FormTextInput:f.a}},function(e,t,n){"use strict";var o={enableMeasure:!1,storedMeasure:function(e,t,n){return n},measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};e.exports=o},function(e,t,n){"use strict";function o(){x.ReactReconcileTransaction&&y||p(!1)}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=i.getPooled(),this.reconcileTransaction=x.ReactReconcileTransaction.getPooled(!1)}function a(e){o(),y.isBatchingUpdates?h.push(e):y.batchedUpdates(a,e)}var i=n(71),s=n(21),l=n(15),c=n(25),u=n(52),d=n(7),p=n(3),h=[],m=i.getPooled(),f=!1,y=null,g=[{initialize:function(){this.dirtyComponentsLength=h.length},close:function(){this.dirtyComponentsLength!==h.length?(h.splice(0,this.dirtyComponentsLength),w()):h.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];d(r.prototype,u.Mixin,{getTransactionWrappers:function(){return g},destructor:function(){this.dirtyComponentsLength=null,i.release(this.callbackQueue),this.callbackQueue=null,x.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return u.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),s.addPoolingTo(r);var w=function(){for(;h.length||f;){if(h.length){var e=r.getPooled();e.perform(function(e){var t=e.dirtyComponentsLength;t!==h.length&&p(!1),h.sort(function(e,t){return e._mountOrder-t._mountOrder});for(var n=0;n<t;n++){var o=h[n],r=o._pendingCallbacks;if(o._pendingCallbacks=null,c.performUpdateIfNecessary(o,e.reconcileTransaction),r)for(var a=0;a<r.length;a++)e.callbackQueue.enqueue(r[a],o.getPublicInstance())}},null,e),r.release(e)}if(f){f=!1;var t=m;m=i.getPooled(),t.notifyAll(),i.release(t)}}},x={ReactReconcileTransaction:null,batchedUpdates:function(e,t,n,r,a,i){o(),y.batchedUpdates(e,t,n,r,a,i)},enqueueUpdate:a,flushBatchedUpdates:w=l.measure("ReactUpdates","flushBatchedUpdates",w),injection:{injectReconcileTransaction:function(e){e||p(!1),x.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e||p(!1),"function"!=typeof e.batchedUpdates&&p(!1),"boolean"!=typeof e.isBatchingUpdates&&p(!1),y=e}},asap:function(e,t){y.isBatchingUpdates||p(!1),m.enqueue(e,t),f=!0}};e.exports=x},function(e,t,n){"use strict";function o(e){return function(){return e}}function r(){}r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";e.exports={current:null}},function(e,t,n){"use strict";var o=n(47),r=o({bubbled:null,captured:null}),a={topLevelTypes:o({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),PropagationPhases:r};e.exports=a},function(e,t,n){"use strict";function o(e,t,n,o,a,i){return i=new r.List([i]),e.push(new p({x:t,y:n,radius:o,priority:a,related:i}))}Object.defineProperty(t,"__esModule",{value:!0}),t.nearestSnap=function(e,t,n,o){let r={point:o.get(s),line:o.get(l),"line-segment":o.get(c),grid:o.get(u)};return e.valueSeq().filter(e=>r[e.type]&&e.isNear(t,n,e.radius)).map(e=>({snap:e,point:e.nearestPoint(t,n)})).filter(({snap:{radius:e},point:{distance:t}})=>t<e).min(({snap:{priority:e},point:{distance:t}},{snap:{priority:n},point:{distance:o}})=>e===n?t<o?-1:1:e>n?-1:1)},t.addPointSnap=o,t.addLineSnap=function(e,t,n,i,s,l,c){return c=new r.List([c]),e.withMutations(e=>{if(e.some(e=>"line"===e.type&&t===e.a&&n===e.b&&i===e.c))return e;e.valueSeq().filter(e=>"line"===e.type).map(e=>a.intersectionFromTwoLines(e.a,e.b,e.c,t,n,i)).filter(e=>void 0!==e).forEach(({x:t,y:n})=>o(e,t,n,20,40)),e.push(new h({a:t,b:n,c:i,radius:s,priority:l,related:c}))})},t.addLineSegmentSnap=function(e,t,n,o,a,i,s,l){return l=new r.List([l]),e.push(new m({x1:t,y1:n,x2:o,y2:a,radius:i,priority:s,related:l}))},t.addGridSnap=function(e,t,n,o,a,i){return i=new r.List([i]),e.push(new f({x:t,y:n,radius:o,priority:a,related:i}))};var r=n(8),a=(n.n(r),n(13)),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};const s="SNAP_POINT";t.SNAP_POINT=s;const l="SNAP_LINE";t.SNAP_LINE=l;const c="SNAP_SEGMENT";t.SNAP_SEGMENT=c;const u="SNAP_GRID";t.SNAP_GRID=u;const d=new r.Map({SNAP_POINT:!0,SNAP_LINE:!0,SNAP_SEGMENT:!0,SNAP_GRID:!1});t.SNAP_MASK=d;class p extends(Object(r.Record)({type:"point",x:-1,y:-1,radius:1,priority:1,related:new r.List})){nearestPoint(e,t){return{x:this.x,y:this.y,distance:a.pointsDistance(this.x,this.y,e,t)}}isNear(e,t,n){return 1+~(this.x-e)<n&&1+~(this.y-t)<n}}class h extends(Object(r.Record)({type:"line",a:-1,b:-1,c:-1,radius:1,priority:1,related:new r.List})){nearestPoint(e,t){return i({},a.closestPointFromLine(this.a,this.b,this.c,e,t),{distance:a.distancePointFromLine(this.a,this.b,this.c,e,t)})}isNear(e,t,n){return!0}}class m extends(Object(r.Record)({type:"line-segment",x1:-1,y1:-1,x2:-1,y2:-1,radius:1,priority:1,related:new r.List})){nearestPoint(e,t){return i({},a.closestPointFromLineSegment(this.x1,this.y1,this.x2,this.y2,e,t),{distance:a.distancePointFromLineSegment(this.x1,this.y1,this.x2,this.y2,e,t)})}isNear(e,t,n){return!0}}class f extends(Object(r.Record)({type:"grid",x:-1,y:-1,radius:1,priority:1,related:new r.List})){nearestPoint(e,t){return{x:this.x,y:this.y,distance:a.pointsDistance(this.x,this.y,e,t)}}isNear(e,t,n){return 1+~(this.x-e)<n&&1+~(this.y-t)<n}}},function(e,t,n){"use strict";var o=n(3),r=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},a=r,i={addPoolingTo:function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||a,n.poolSize||(n.poolSize=10),n.release=function(e){var t=this;e instanceof t||o(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},n},oneArgumentPooler:r,twoArgumentPooler:function(e,t){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,e,t),o}return new n(e,t)},threeArgumentPooler:function(e,t,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,e,t,n),r}return new o(e,t,n)},fourArgumentPooler:function(e,t,n,o){var r=this;if(r.instancePool.length){var a=r.instancePool.pop();return r.call(a,e,t,n,o),a}return new r(e,t,n,o)},fiveArgumentPooler:function(e,t,n,o,r){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,o,r),i}return new a(e,t,n,o,r)}};e.exports=i},function(e,t,n){"use strict";e.exports=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null}},function(e,t,n){"use strict";const o={tableStyle:{width:"100%",borderSpacing:"2px 0",marginBottom:"2px"},firstTdStyle:{width:"6em",textTransform:"capitalize"}};t.a=o},function(e,t,n){"use strict";function o(e,t,n,o,r,i,s,l={}){let c;return e=e.withMutations(e=>{let u,d,p=y.a.acquireID();({layer:e,vertex:u}=a(e,n,o,"lines",p)),({layer:e,vertex:d}=a(e,r,i,"lines",p)),c=s.factoryElement(t,{id:p,name:g.a.generateName("lines",s.getIn(["elements",t,"info","title"])),vertices:new m.List([u.id,d.id]),type:t},l),e.setIn(["lines",p],c)}),{layer:e,line:c}}function r(e,t){let n=e.getIn(["lines",t]);return e=e.withMutations(e=>{l(e,"lines",t),n.holes.forEach(t=>h(e,t)),e.deleteIn(["lines",n.id]),n.vertices.forEach(t=>i(e,t,"lines",n.id))}),{layer:e,line:n}}function a(e,t,n,o,r){let a=e.vertices.find(e=>w.samePoints(e,{x:t,y:n}));return a=a?a.update(o,e=>e.push(r)):new f.Vertex({id:y.a.acquireID(),name:"Vertex",x:t,y:n,[o]:new m.List([r])}),e=e.setIn(["vertices",a.id],a),{layer:e,vertex:a}}function i(e,t,n,o){let r=e.vertices.get(t);return r=r.update(n,e=>{let t=e.findIndex(e=>o===e);return e.delete(t)}),e=r.areas.size||r.lines.size?e.setIn(["vertices",r.id],r):e.deleteIn(["vertices",r.id]),{layer:e,vertex:r}}function s(e,t){let n=e.getIn(["vertices",t]),o=e.vertices.filter(e=>e.id!==t&&w.samePoints(n,e));if(o.isEmpty())return e;let r,a,i;return r=e.vertices.withMutations(n=>{a=e.lines.withMutations(r=>{i=e.areas.withMutations(e=>{o.forEach(o=>{o.lines.forEach(e=>{let a=r.get(e);a=a.update("vertices",e=>e.map(e=>e===o.id?t:e)),r.set(e,a),n.updateIn([t,"lines"],t=>t.push(e))}),o.areas.forEach(r=>{let a=e.get(r);a=a.update("vertices",e=>e.map(e=>e===o.id?t:e)),e.set(r,a),n.updateIn([t,"areas"],e=>e.push(r))}),n.remove(o.id)})})})}),e.merge({vertices:r,lines:a,areas:i})}function l(e,t,n){return e.withMutations(e=>{let o=e.getIn(["selected",t]),r=(o=o.remove(o.indexOf(n))).some(e=>e===n);e.setIn(["selected",t],o),e.setIn([t,n,"selected"],r)})}function c(e,t,n,o){o=Object(m.fromJS)(o),e.mergeIn([t,n,"properties"],o)}function u(e,t,n,o){Object(m.fromJS)(o).forEach((o,r)=>{e.hasIn([t,n,"properties",r])&&e.mergeIn([t,n,"properties",r],o)})}function d(e,t){let n,o=[],r={},s={};e.vertices.forEach(e=>{let t=o.push([e.x,e.y])-1;r[e.id]=t,s[t]=e.id}),n=e.lines.map(e=>e.vertices.map(e=>r[e]).toArray());let c=Object(x.default)(o,n).map(e=>e.map(e=>s[e]));c=c.map(t=>Object(x.isClockWiseOrder)(t.map(t=>e.vertices.get(t)))?t.reverse():t);let u=[];return e=e.withMutations(e=>{e.areas.forEach(t=>{c.some(e=>v(e,t.vertices))||function(e,t){let n=e.getIn(["areas",t]);e=e.withMutations(e=>{l(e,"areas",t),e.deleteIn(["areas",n.id]),n.vertices.forEach(t=>i(e,t,"areas",n.id))})}(e,t.id)}),c.forEach((n,o)=>{let r=e.areas.find(e=>v(e.vertices,n));if(r)u[o]=r.id,e.setIn(["areas",u[o],"holes"],new m.List);else{let r=n.map(t=>e.vertices.get(t)),{area:i}=function(e,t,n,o){let r;return e=e.withMutations(e=>{let i=y.a.acquireID(),s=n.map(t=>a(e,t.x,t.y,"areas",i).vertex.id);r=o.factoryElement(t,{id:i,name:g.a.generateName("areas",o.getIn(["elements",t,"info","title"])),type:t,prototype:"areas",vertices:s}),e.setIn(["areas",i],r)}),{layer:e,area:r}}(e,"area",r,t);u[o]=i.id}});let n,o,r=u.map(t=>{return{id:t,vertices:e.areas.get(t).vertices.map(t=>e.vertices.get(t))}});for(n=0;n<r.length;n++){let t=new m.List,a=r[n].vertices.flatten().toArray();for(o=0;o<r.length;o++)if(n!==o){(function(e,t,n){let o,r,a=e.length>>1,i=e[2*a-3]-n,s=e[2*a-2]-t,l=e[2*a-1]-n;if(0===s&&0===l)return!1;for(let c=0;c<a;c++){if(o=s,i=l,s=e[2*c]-t,l=e[2*c+1]-n,0===s&&0===l)return!1;i!==l&&(r=l>i)}let c=0;for(let u=0;u<a;u++){if(o=s,i=l,s=e[2*u]-t,l=e[2*u+1]-n,i<0&&l<0)continue;if(i>0&&l>0)continue;if(o<0&&s<0)continue;if(i===l&&Math.min(o,s)<0)return!0;if(i===l)continue;let a=o+(s-o)*-i/(l-i);if(0===a)return!1;a>0&&c++,0===i&&r&&l>i&&c--,0===i&&!r&&l<i&&c--,r=l>i}return 1==(1&c)})(a,r[o].vertices.get(0).get(0),r[o].vertices.get(0).get(1))&&(t=t.push(r[o].id))}e.setIn(["areas",r[n].id,"holes"],t)}u.forEach(t=>{let n=new Set,o=e.getIn(["areas",t,"holes"]);o.forEach(t=>{e.getIn(["areas",t,"holes"]).forEach(e=>{-1!==o.indexOf(e)&&n.add(e)})}),n.forEach(e=>{let t=o.indexOf(e);o=o.remove(t)}),e.setIn(["areas",t,"holes"],o)})}),{layer:e}}function p(e,t,n,o,r,a={}){let i;return e=e.withMutations(e=>{let s=y.a.acquireID();i=r.factoryElement(t,{id:s,name:g.a.generateName("holes",r.getIn(["elements",t,"info","title"])),type:t,offset:o,line:n},a),e.setIn(["holes",s],i),e.updateIn(["lines",n,"holes"],e=>e.push(s))}),{layer:e,hole:i}}function h(e,t){let n=e.getIn(["holes",t]);return e=e.withMutations(e=>{l(e,"holes",t),e.deleteIn(["holes",n.id]),e.updateIn(["lines",n.line,"holes"],e=>{let n=e.findIndex(e=>t===e);return e.remove(n)})}),{layer:e,hole:n}}t.c=o,t.j=function(e,t,n,o,r){let s,c=e.getIn(["lines",t]);return e=e.withMutations(e=>e.withMutations(e=>{let u=c.vertices.get(n);l(e,"vertices",u),i(e,u,"lines",c.id),({layer:e,vertex:s}=a(e,o,r,"lines",c.id)),c=c.setIn(["vertices",n],s.id),e.setIn(["lines",t],c)})),{layer:e,line:c,vertex:s}},t.i=r,t.d=function(e,t,n,a,i,s,l,c,u){let d=[{x:n,y:a},{x:i,y:s}];return e=e.withMutations(e=>{let{lines:n,vertices:a}=e;n.forEach(t=>{let[n,i]=t.vertices.map(e=>a.get(e)).toArray(),s=w.samePoints(n,d[0])||w.samePoints(n,d[1])||w.samePoints(i,d[0])||w.samePoints(i,d[1]),c=w.intersectionFromTwoLineSegment(d[0],d[1],n,i);if("colinear"===c.type){u||(u=[]);let o=w.orderVertices(d);e.lines.get(t.id).holes.forEach(r=>{let a=e.holes.get(r),s=w.pointsDistance(n.x,n.y,i.x,i.y),l=Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x),c=a.offset;o[1].x===t.vertices.get(1).x&&o[1].y===t.vertices(1).y&&(c=1-c);let d=s*c*Math.cos(l)+n.x,p=s*c*Math.sin(l)+n.y;u.push({hole:a,offsetPosition:{x:d,y:p}})}),r(e,t.id),d.push(n,i)}"intersecting"!==c.type||s||(function(e,t,n,a,i){let s,l;e=e.withMutations(e=>{let c=e.getIn(["lines",t]),u=e.vertices.get(c.vertices.get(0)),d=e.vertices.get(c.vertices.get(1)),{x:h,y:m}=u,{x:f,y:y}=d;({line:s}=o(e,c.type,h,m,n,a,i,c.properties)),({line:l}=o(e,c.type,f,y,n,a,i,c.properties));let g=w.pointPositionOnLineSegment(h,m,f,y,n,a),x=w.minVertex(u,d);c.holes.forEach(t=>{let n=e.holes.get(t),o=n.offset;if(x.x===f&&x.y===y&&(g=1-g,o=1-n.offset),o<g){let t=o/g;x.x===f&&x.y===y&&(t=1-t),p(e,n.type,s.id,t,i,n.properties)}else{let t=(o-g)/(1-g);x.x===f&&x.y===y&&(t=1-t),p(e,n.type,l.id,t,i,n.properties)}}),r(e,t)}),new m.List([s,l])}(e,t.id,c.point.x,c.point.y,l),d.push(c.point))}),function(e,t,n,r,a,i){let s=(n=new m.List(n).sort(({x:e,y:t},{x:n,y:o})=>e===n?t-o:e-n)).zip(n.skip(1)).filterNot(([{x:e,y:t},{x:n,y:o}])=>e===n&&t===o);(new m.List).withMutations(n=>{e=e.withMutations(e=>{s.forEach(([{x:s,y:l},{x:c,y:u}])=>{let{line:d}=o(e,t,s,l,c,u,r,a);i&&i.forEach(t=>{let{x:n,y:o}=t.offsetPosition;if(w.isPointOnLineSegment(s,l,c,u,n,o)){let a=w.pointPositionOnLineSegment(s,l,c,u,n,o);a>=0&&a<=1&&p(e,t.hole.type,d.id,a,r,t.hole.properties)}}),n.push(d)})})})}(e,t,d,l,c,u)}),{layer:e}},t.f=s,t.k=function(e,t,n){return e.withMutations(e=>{e.setIn([t,n,"selected"],!0),e.updateIn(["selected",t],e=>e.push(n))})},t.n=l,t.m=function(e,t){return e.withMutations(e=>{let n=e.selected;n.lines.forEach(n=>c(e,"lines",n,t)),n.holes.forEach(n=>c(e,"holes",n,t)),n.areas.forEach(n=>c(e,"areas",n,t)),n.items.forEach(n=>c(e,"items",n,t))})},t.p=function(e,t){return e.withMutations(e=>{let n=e.selected;n.lines.forEach(n=>u(e,"lines",n,t)),n.holes.forEach(n=>u(e,"holes",n,t)),n.areas.forEach(n=>u(e,"areas",n,t)),n.items.forEach(n=>u(e,"items",n,t))})},t.l=function(e,t,n){return e.withMutations(e=>{let o=e.selected;o.lines.forEach(o=>(function(e,n,o,r,a){let i=t.toJS(),{vertexOne:l,vertexTwo:c,lineLength:u}=i;delete i.vertexOne,delete i.vertexTwo,delete i.lineLength,e=s(e=e.mergeIn([n,o],Object(m.fromJS)(i)).mergeIn(["vertices",l.id],{x:l.x,y:l.y}).mergeIn(["vertices",c.id],{x:c.x,y:c.y}).mergeDeepIn([n,o,"misc"],new m.Map({_unitLength:u._unit})),l.id),l.x!=c.x&&l.y!=c.y&&(e=s(e,c.id)),d(e,a)})(e,"lines",o,0,n)),o.holes.forEach(n=>(function(e,n,o,r){let a=t.toJS(),{offsetA:i,offsetB:s,offset:l}=a;delete a.offsetA,delete a.offsetB,delete a.offset;let c=new m.Map({_unitA:i._unit,_unitB:s._unit});e.mergeIn([n,o],Object(m.fromJS)(a)).mergeDeepIn([n,o],new m.Map({offset:l,misc:c}))})(e,"holes",n)),o.items.forEach(n=>(function(e,t,n,o){o=Object(m.fromJS)(o),e.mergeIn([t,n],o)})(e,"items",n,t))})},t.o=function(e){return e.get("selected"),e.withMutations(e=>{e.selected.forEach((t,n)=>{t.forEach(t=>l(e,n,t))})})},t.e=d,t.a=p,t.g=h,t.b=function(e,t,n,o,r,a,i,s){let l;return e=e.withMutations(e=>{let c=y.a.acquireID();l=s.factoryElement(t,{id:c,name:g.a.generateName("items",s.getIn(["elements",t,"info","title"])),type:t,height:a,width:r,x:n,y:o,rotation:i}),e.setIn(["items",c],l)}),{layer:e,item:l}},t.h=function(e,t){let n=e.getIn(["items",t]);return e=e.withMutations(e=>{l(e,"items",t),e.deleteIn(["items",n.id])}),{layer:e,item:n}};var m=n(8),f=(n.n(m),n(42)),y=n(152),g=n(369),w=n(13),x=n(154);const v=(e,t)=>e.size===t.size&&e.isSuperset(t)&&e.isSubset(t)},function(e,t,n){"use strict";function o(){r.attachRefs(this,this._currentElement)}var r=n(261),a={mountComponent:function(e,t,n,r){var a=e.mountComponent(t,n,r);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(o,e),a},unmountComponent:function(e){r.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,a){var i=e._currentElement;if(t!==i||a!==e._context){var s=r.shouldUpdateRefs(i,t);s&&r.detachRefs(e,i),e.receiveComponent(t,n,a),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(o,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=a},function(e,t,n){"use strict";function o(e,t,n,o){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a];s?this[a]=s(n):"target"===a?this.target=o:this[a]=n[a]}var l=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;this.isDefaultPrevented=l?i.thatReturnsTrue:i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse}var r=n(21),a=n(7),i=n(17),s=(n(6),{type:null,target:null,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});a(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=i.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=i.thatReturnsTrue)},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),o.Interface=s,o.augmentClass=function(e,t){var n=Object.create(this.prototype);a(n,e.prototype),e.prototype=n,e.prototype.constructor=e,e.Interface=a({},this.Interface,t),e.augmentClass=this.augmentClass,r.addPoolingTo(e,r.fourArgumentPooler)},r.addPoolingTo(o,r.fourArgumentPooler),e.exports=o},function(e,t){var n=Object.prototype.toString,o=RegExp("^"+String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");e.exports=o},function(e,t,n){"use strict";t.a=function(e,t,n){let o=new r.a;o.setTexturePath(n);let a=e;return new Promise((e,n)=>{o.load(a,n=>{n.preload();let o=new i.a;o.setMaterials(n),o.load(t,t=>e(t))})})};n(1);var o=n(472),r=n.n(o),a=n(473),i=n.n(a)},function(e,t,n){(function(e){function n(e,t){for(var n=0,o=e.length-1;o>=0;o--){var r=e[o];"."===r?e.splice(o,1):".."===r?(e.splice(o,1),n++):n&&(e.splice(o,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function o(e,t){if(e.filter)return e.filter(t);for(var n=[],o=0;o<e.length;o++)t(e[o],o,e)&&n.push(e[o]);return n}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return r.exec(e).slice(1)};t.resolve=function(){for(var t="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var i=a>=0?arguments[a]:e.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(t=i+"/"+t,r="/"===i.charAt(0))}return t=n(o(t.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+t||"."},t.normalize=function(e){var r=t.isAbsolute(e),a="/"===i(e,-1);return(e=n(o(e.split("/"),function(e){return!!e}),!r).join("/"))||r||(e="."),e&&a&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function o(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var r=o(e.split("/")),a=o(n.split("/")),i=Math.min(r.length,a.length),s=i,l=0;l<i;l++)if(r[l]!==a[l]){s=l;break}for(var c=[],l=s;l<r.length;l++)c.push("..");return(c=c.concat(a.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=a(e),n=t[0],o=t[1];return n||o?(o&&(o=o.substr(0,o.length-1)),n+o):"."},t.basename=function(e,t){var n=a(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){return a(e)[3]};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(t,n(474))},,function(e,t,n){"use strict";function o(e,t){return(e&t)===t}var r=n(3),a={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=a,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},c=e.DOMPropertyNames||{},u=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var d in n){s.properties.hasOwnProperty(d)&&r(!1);var p=d.toLowerCase(),h=n[d],m={attributeName:p,attributeNamespace:null,propertyName:d,mutationMethod:null,mustUseAttribute:o(h,t.MUST_USE_ATTRIBUTE),mustUseProperty:o(h,t.MUST_USE_PROPERTY),hasSideEffects:o(h,t.HAS_SIDE_EFFECTS),hasBooleanValue:o(h,t.HAS_BOOLEAN_VALUE),hasNumericValue:o(h,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:o(h,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:o(h,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(m.mustUseAttribute&&m.mustUseProperty&&r(!1),!m.mustUseProperty&&m.hasSideEffects&&r(!1),m.hasBooleanValue+m.hasNumericValue+m.hasOverloadedBooleanValue<=1||r(!1),l.hasOwnProperty(d)){var f=l[d];m.attributeName=f}i.hasOwnProperty(d)&&(m.attributeNamespace=i[d]),c.hasOwnProperty(d)&&(m.propertyName=c[d]),u.hasOwnProperty(d)&&(m.mutationMethod=u[d]),s.properties[d]=m}}},i={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){if((0,s._isCustomAttributeFunctions[t])(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,o=i[e];return o||(i[e]=o={}),t in o||(n=document.createElement(e),o[t]=n[t]),o[t]},injection:a};e.exports=s},function(e,t,n){"use strict";function o(e,t){return e.charAt(t)===d||t===e.length}function r(e){return""===e||e.charAt(0)===d&&e.charAt(e.length-1)!==d}function a(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function i(e,t){if(r(e)&&r(t)||u(!1),a(e,t)||u(!1),e===t)return e;var n;for(n=e.length+p;n<t.length&&!o(t,n);n++);return t.substr(0,n)}function s(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var a=0,i=0;i<=n;i++)if(o(e,i)&&o(t,i))a=i;else if(e.charAt(i)!==t.charAt(i))break;var s=e.substr(0,a);return r(s)||u(!1),s}function l(e,t,n,o,r,s){(e=e||"")===(t=t||"")&&u(!1);var l=a(t,e);l||a(e,t)||u(!1);for(var c=0,p=l?function(e){return e?e.substr(0,e.lastIndexOf(d)):""}:i,m=e;;m=p(m,t)){var f;if(r&&m===e||s&&m===t||(f=n(m,l,o)),!1===f||m===t)break;c++<h||u(!1)}}var c=n(123),u=n(3),d=".",p=d.length,h=1e4,m={createReactRootID:function(){return function(e){return d+e.toString(36)}(c.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===d&&e.length>1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,o,r){var a=s(e,t);a!==e&&l(e,a,n,o,!1,!0),a!==t&&l(a,t,n,r,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(l("",e,t,n,!0,!1),l(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(l("",e,t,n,!0,!0),l(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){l("",e,t,n,!0,!1)},getFirstCommonAncestorID:s,_getNextDescendantID:i,isAncestorIDOf:a,SEPARATOR:d};e.exports=m},function(e,t,n){var o=n(85);e.exports=function(e){return!(!e||!o[typeof e])}},,function(e,t,n){"use strict";var o=n(106),r=(n(150),n(42)),a=n(359),i=n(380),s=n(450),l=n(5),c=(n(4),n(157)),u=(n(89),n(151),n(454));n(459),n(105);n.d(t,"a",function(){return o.a}),n.d(t,"c",function(){return r}),n.d(t,"h",function(){return a.a}),n.d(t,"e",function(){return i.a}),n.d(t,"d",function(){return s.a}),n.d(t,"b",function(){return u.a}),n.d(t,"g",function(){return l}),n.d(t,"f",function(){return c.e})},function(e,t,n){"use strict";var o=n(0),r=n.n(o),a=n(4),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};const s={display:"block",width:"100%",padding:"0 2px",fontSize:"13px",lineHeight:"1.25",color:"#55595c",backgroundColor:a.a.white,backgroundImage:"none",border:"1px solid rgba(0,0,0,.15)",outline:"none",height:"30px"};class l extends o.Component{constructor(e){super(e),this.state={focus:!1}}render(){let e=this.props,{style:t}=e,n=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["style"]);return r.a.createElement("input",i({onFocus:e=>this.setState({focus:!0}),onBlur:e=>this.setState({focus:!1}),style:i({},s,t,{border:this.state.focus?"1px solid #66afe9":"1px solid rgba(0,0,0,.15)"}),type:"text"},n))}}t.a=l,l.defaultProps={style:{}}},function(e,t,n){"use strict";var o=n(116),r=n(258),a=n(117),i=n(118),s=n(119),l=n(3),c=(n(6),{}),u=null,d=function(e,t){e&&(r.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},p=null,h={injection:{injectMount:r.injection.injectMount,injectInstanceHandle:function(e){p=e},getInstanceHandle:function(){return p},injectEventPluginOrder:o.injectEventPluginOrder,injectEventPluginsByName:o.injectEventPluginsByName},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n&&l(!1);(c[t]||(c[t]={}))[e]=n;var r=o.registrationNameModules[t];r&&r.didPutListener&&r.didPutListener(e,t,n)},getListener:function(e,t){var n=c[t];return n&&n[e]},deleteListener:function(e,t){var n=o.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=c[t];r&&delete r[e]},deleteAllListeners:function(e){for(var t in c)if(c[t][e]){var n=o.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete c[t][e]}},extractEvents:function(e,t,n,r,a){for(var s,l=o.plugins,c=0;c<l.length;c++){var u=l[c];if(u){var d=u.extractEvents(e,t,n,r,a);d&&(s=i(s,d))}}return s},enqueueEvents:function(e){e&&(u=i(u,e))},processEventQueue:function(e){var t=u;u=null,e?s(t,function(e){return d(e,!0)}):s(t,function(e){return d(e,!1)}),u&&l(!1),a.rethrowCaughtError()},__purge:function(){c={}},__getListenerBank:function(){return c}};e.exports=h},function(e,t,n){"use strict";var o={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=o},function(e,t,n){"use strict";var o={};e.exports=o},function(e,t,n){"use strict";function o(e,t,n){var o=function(e,t,n){var o=t.dispatchConfig.phasedRegistrationNames[n];return u(e,o)}(e,n,t?c.bubbled:c.captured);o&&(n._dispatchListeners=s(n._dispatchListeners,o),n._dispatchIDs=s(n._dispatchIDs,e))}function r(e,t,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,r=u(e,o);r&&(n._dispatchListeners=s(n._dispatchListeners,r),n._dispatchIDs=s(n._dispatchIDs,e))}}var a=n(19),i=n(37),s=(n(6),n(118)),l=n(119),c=a.PropagationPhases,u=i.getListener,d={accumulateTwoPhaseDispatches:function(e){l(e,function(e){e&&e.dispatchConfig.phasedRegistrationNames&&i.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)})},accumulateTwoPhaseDispatchesSkipTarget:function(e){l(e,function(e){e&&e.dispatchConfig.phasedRegistrationNames&&i.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker,o,e)})},accumulateDirectDispatches:function(e){l(e,function(e){e&&e.dispatchConfig.registrationName&&r(e.dispatchMarker,0,e)})},accumulateEnterLeaveDispatches:function(e,t,n,o){i.injection.getInstanceHandle().traverseEnterLeave(n,o,r,e,t)}};e.exports=d},function(e,t,n){"use strict";function o(e,t,n,o){r.call(this,e,t,n,o)}var r=n(26),a=n(76),i={view:function(e){if(e.view)return e.view;var t=a(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),r=(n.n(o),n(5)),a=n(20),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};let s=(e,t,n)=>e?new o.Map(e).map(e=>new t(e)).toMap():n||new o.Map;class l extends(Object(o.Record)({id:"",type:"",properties:Object(o.Map)()},"Guide")){constructor(e={}){super(i({},e,{properties:Object(o.fromJS)(e.properties||{})}))}}t.Guide=l;const c=new o.Map({h1:new l({id:"h1",type:"horizontal-s