forked from react-grid-layout/react-grid-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact-grid-layout.min.js
2 lines (2 loc) · 86.5 KB
/
react-grid-layout.min.js
1
2
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.ReactGridLayout=e(require("react"),require("react-dom")):t.ReactGridLayout=e(t.React,t.ReactDOM)}(self,(function(t,e){return function(){var n={325:function(t,e,n){t.exports=n(319).default,t.exports.utils=n(872),t.exports.calculateUtils=n(337),t.exports.Responsive=n(94).default,t.exports.Responsive.utils=n(271),t.exports.WidthProvider=n(550).default},319:function(t,e,n){"use strict";n.d(e,{default:function(){return O}});var r=n(359),o=n.n(r),i=n(690),a=n(512),s=n(872),u=n(337),l=n(697),c=n.n(l),f=n(193),p=n(706);const d=c().arrayOf(c().oneOf(["s","w","e","n","sw","nw","se","ne"])),h=c().oneOfType([c().node,c().func]);var g={className:c().string,style:c().object,width:c().number,autoSize:c().bool,cols:c().number,draggableCancel:c().string,draggableHandle:c().string,verticalCompact:function(t){t.verticalCompact},compactType:c().oneOf(["vertical","horizontal"]),layout:function(t){var e=t.layout;void 0!==e&&n(872).validateLayout(e,"layout")},margin:c().arrayOf(c().number),containerPadding:c().arrayOf(c().number),rowHeight:c().number,maxRows:c().number,isBounded:c().bool,isDraggable:c().bool,isResizable:c().bool,allowOverlap:c().bool,preventCollision:c().bool,useCSSTransforms:c().bool,transformScale:c().number,isDroppable:c().bool,resizeHandles:d,resizeHandle:h,onLayoutChange:c().func,onDragStart:c().func,onDrag:c().func,onDragStop:c().func,onResizeStart:c().func,onResize:c().func,onResizeStop:c().func,onDrop:c().func,droppingItem:c().shape({i:c().string.isRequired,w:c().number.isRequired,h:c().number.isRequired}),children:function(t,e){const n=t[e],r={};o().Children.forEach(n,(function(t){if(null!=(null==t?void 0:t.key)){if(r[t.key])throw new Error('Duplicate child key "'+t.key+'" found! This will cause problems in ReactGridLayout.');r[t.key]=!0}}))},innerRef:c().any};function y(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class m extends o().Component{constructor(){super(...arguments),y(this,"state",{resizing:null,dragging:null,className:""}),y(this,"elementRef",o().createRef()),y(this,"onDragStart",((t,e)=>{let{node:n}=e;const{onDragStart:r,transformScale:o}=this.props;if(!r)return;const i={top:0,left:0},{offsetParent:a}=n;if(!a)return;const s=a.getBoundingClientRect(),l=n.getBoundingClientRect(),c=l.left/o,f=s.left/o,p=l.top/o,d=s.top/o;i.left=c-f+a.scrollLeft,i.top=p-d+a.scrollTop,this.setState({dragging:i});const{x:h,y:g}=(0,u.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return r.call(this,this.props.i,h,g,{e:t,node:n,newPosition:i})})),y(this,"onDrag",((t,e)=>{let{node:n,deltaX:r,deltaY:o}=e;const{onDrag:i}=this.props;if(!i)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let a=this.state.dragging.top+o,s=this.state.dragging.left+r;const{isBounded:l,i:c,w:f,h:p,containerWidth:d}=this.props,h=this.getPositionParams();if(l){const{offsetParent:t}=n;if(t){const{margin:e,rowHeight:n}=this.props,r=t.clientHeight-(0,u.calcGridItemWHPx)(p,n,e[1]);a=(0,u.clamp)(a,0,r);const o=(0,u.calcGridColWidth)(h),i=d-(0,u.calcGridItemWHPx)(f,o,e[0]);s=(0,u.clamp)(s,0,i)}}const g={top:a,left:s};this.setState({dragging:g});const{x:y,y:m}=(0,u.calcXY)(h,a,s,f,p);return i.call(this,c,y,m,{e:t,node:n,newPosition:g})})),y(this,"onDragStop",((t,e)=>{let{node:n}=e;const{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:o,h:i,i:a}=this.props,{left:s,top:l}=this.state.dragging,c={top:l,left:s};this.setState({dragging:null});const{x:f,y:p}=(0,u.calcXY)(this.getPositionParams(),l,s,o,i);return r.call(this,a,f,p,{e:t,node:n,newPosition:c})})),y(this,"onResizeStop",((t,e,n)=>this.onResizeHandler(t,e,n,"onResizeStop"))),y(this,"onResizeStart",((t,e,n)=>this.onResizeHandler(t,e,n,"onResizeStart"))),y(this,"onResize",((t,e,n)=>this.onResizeHandler(t,e,n,"onResize")))}shouldComponentUpdate(t,e){if(this.props.children!==t.children)return!0;if(this.props.droppingPosition!==t.droppingPosition)return!0;const n=(0,u.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,u.calcGridItemPosition)(this.getPositionParams(t),t.x,t.y,t.w,t.h,e);return!(0,s.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==t.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(t){this.moveDroppingItem(t)}moveDroppingItem(t){const{droppingPosition:e}=this.props;if(!e)return;const n=this.elementRef.current;if(!n)return;const r=t.droppingPosition||{left:0,top:0},{dragging:o}=this.state,i=o&&e.left!==r.left||e.top!==r.top;if(o){if(i){const t=e.left-o.left,r=e.top-o.top;this.onDrag(e.e,{node:n,deltaX:t,deltaY:r})}}else this.onDragStart(e.e,{node:n,deltaX:e.left,deltaY:e.top})}getPositionParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:t.cols,containerPadding:t.containerPadding,containerWidth:t.containerWidth,margin:t.margin,maxRows:t.maxRows,rowHeight:t.rowHeight}}createStyle(t){const{usePercentages:e,containerWidth:n,useCSSTransforms:r}=this.props;let o;return r?o=(0,s.setTransform)(t):(o=(0,s.setTopLeft)(t),e&&(o.left=(0,s.perc)(t.left/n),o.width=(0,s.perc)(t.width/n))),o}mixinDraggable(t,e){return o().createElement(f.DraggableCore,{disabled:!e,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},t)}curryResizeHandler(t,e){return(n,r)=>e(n,r,t)}mixinResizable(t,e,n){const{cols:r,x:i,minW:a,minH:s,maxW:l,maxH:c,transformScale:f,resizeHandles:d,resizeHandle:h}=this.props,g=this.getPositionParams(),y=(0,u.calcGridItemPosition)(g,0,0,r,0).width,m=(0,u.calcGridItemPosition)(g,0,0,a,s),b=(0,u.calcGridItemPosition)(g,0,0,l,c),v=[m.width,m.height],w=[Math.min(b.width,y),Math.min(b.height,1/0)];return o().createElement(p.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:e.width,height:e.height,minConstraints:v,maxConstraints:w,onResizeStop:this.curryResizeHandler(e,this.onResizeStop),onResizeStart:this.curryResizeHandler(e,this.onResizeStart),onResize:this.curryResizeHandler(e,this.onResize),transformScale:f,resizeHandles:d,handle:h},t)}onResizeHandler(t,e,n,r){let{node:o,size:i,handle:a}=e;const s=this.props[r];if(!s)return;const{x:l,y:c,i:f,maxH:p,minH:d}=this.props;let{minW:h,maxW:g}=this.props,{w:y,h:m}=(0,u.calcWH)(this.getPositionParams(),i.width,i.height,l,c,a);h=Math.max(h,1),y=(0,u.clamp)(y,h,g),m=(0,u.clamp)(m,d,p);let b=i;if(o){const t=n.left,e=n.top,o=n.width,s=n.height,u=t=>{let{left:n,height:r,width:o}=t;const i=e-(r-s);return{top:i,left:n,width:o,height:this.constrainHeight(i,s,r),top:this.constrainTop(i)}},l=e=>{let{top:n,left:r,height:i,width:a}=e;return{top:n,height:i,width:this.constrainWidth(t,o,a),left:this.constrainLeft(r)}},c=e=>{let{top:n,height:r,width:i}=e;const a=t-(i-o);return{height:r,width:a<=0?o:this.constrainWidth(t,o,i),top:this.constrainTop(n),left:this.constrainLeft(a)}},f=t=>{let{top:e,left:n,height:r,width:o}=t;return{width:o,left:n,height:this.constrainHeight(e,s,r),top:this.constrainTop(e)}},p=function(){return u(l(...arguments))},d=function(){return u(c(...arguments))},h=function(){return f(l(...arguments))},g=function(){return f(c(...arguments))},y={n:u,ne:p,e:l,se:h,s:f,sw:g,w:c,nw:d}[a];b=y?y({top:e,left:t,height:s,width:o,...i}):i,this.setState({resizing:"onResizeStop"===r?null:b})}s.call(this,f,y,m,{e:t,node:o,size:b,handle:a})}constrainWidth(t,e,n){return t+n>this.props.containerWidth?e:n}constrainHeight(t,e,n){return t<=0?e:n}constrainLeft(t){return Math.max(0,t)}constrainTop(t){return Math.max(0,t)}render(){const{x:t,y:e,w:n,h:r,isDraggable:i,isResizable:s,droppingPosition:l,useCSSTransforms:c}=this.props,f=(0,u.calcGridItemPosition)(this.getPositionParams(),t,e,n,r,this.state),p=o().Children.only(this.props.children);let d=o().cloneElement(p,{ref:this.elementRef,className:(0,a.Z)("react-grid-item",p.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":i,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(l),cssTransforms:c}),style:{...this.props.style,...p.props.style,...this.createStyle(f)}});return d=this.mixinResizable(d,f,s),d=this.mixinDraggable(d,i),d}}function b(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}y(m,"propTypes",{children:c().element,cols:c().number.isRequired,containerWidth:c().number.isRequired,rowHeight:c().number.isRequired,margin:c().array.isRequired,maxRows:c().number.isRequired,containerPadding:c().array.isRequired,x:c().number.isRequired,y:c().number.isRequired,w:c().number.isRequired,h:c().number.isRequired,minW:function(t,e){const n=t[e];return"number"!=typeof n?new Error("minWidth not Number"):n>t.w||n>t.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(t,e){const n=t[e];return"number"!=typeof n?new Error("maxWidth not Number"):n<t.w||n<t.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(t,e){const n=t[e];return"number"!=typeof n?new Error("minHeight not Number"):n>t.h||n>t.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(t,e){const n=t[e];return"number"!=typeof n?new Error("maxHeight not Number"):n<t.h||n<t.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:c().string.isRequired,resizeHandles:d,resizeHandle:h,onDragStop:c().func,onDragStart:c().func,onDrag:c().func,onResizeStop:c().func,onResizeStart:c().func,onResize:c().func,isDraggable:c().bool.isRequired,isResizable:c().bool.isRequired,isBounded:c().bool.isRequired,static:c().bool,useCSSTransforms:c().bool.isRequired,transformScale:c().number,className:c().string,handle:c().string,cancel:c().string,droppingPosition:c().shape({e:c().object.isRequired,left:c().number.isRequired,top:c().number.isRequired})}),y(m,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1});const v="react-grid-layout";let w=!1;try{w=/firefox/i.test(navigator.userAgent)}catch(t){}class O extends r.Component{constructor(){super(...arguments),b(this,"state",{activeDrag:null,layout:(0,s.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,s.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),b(this,"dragEnterCounter",0),b(this,"onDragStart",((t,e,n,r)=>{let{e:o,node:i}=r;const{layout:a}=this.state,u=(0,s.getLayoutItem)(a,t);if(u)return this.setState({oldDragItem:(0,s.cloneLayoutItem)(u),oldLayout:a}),this.props.onDragStart(a,u,u,null,o,i)})),b(this,"onDrag",((t,e,n,r)=>{let{e:o,node:i}=r;const{oldDragItem:a}=this.state;let{layout:u}=this.state;const{cols:l,allowOverlap:c,preventCollision:f}=this.props,p=(0,s.getLayoutItem)(u,t);if(!p)return;const d={w:p.w,h:p.h,x:p.x,y:p.y,placeholder:!0,i:t};u=(0,s.moveElement)(u,p,e,n,!0,f,(0,s.compactType)(this.props),l,c),this.props.onDrag(u,a,p,d,o,i),this.setState({layout:c?u:(0,s.compact)(u,(0,s.compactType)(this.props),l),activeDrag:d})})),b(this,"onDragStop",((t,e,n,r)=>{let{e:o,node:i}=r;if(!this.state.activeDrag)return;const{oldDragItem:a}=this.state;let{layout:u}=this.state;const{cols:l,preventCollision:c,allowOverlap:f}=this.props,p=(0,s.getLayoutItem)(u,t);if(!p)return;u=(0,s.moveElement)(u,p,e,n,!0,c,(0,s.compactType)(this.props),l,f);const d=f?u:(0,s.compact)(u,(0,s.compactType)(this.props),l);this.props.onDragStop(d,a,p,null,o,i);const{oldLayout:h}=this.state;this.setState({activeDrag:null,layout:d,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(d,h)})),b(this,"onResizeStart",((t,e,n,r)=>{let{e:o,node:i}=r;const{layout:a}=this.state,u=(0,s.getLayoutItem)(a,t);u&&(this.setState({oldResizeItem:(0,s.cloneLayoutItem)(u),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(a,u,u,null,o,i))})),b(this,"onResize",((t,e,n,r)=>{let{e:o,node:i,size:a,handle:u}=r;const{oldResizeItem:l}=this.state;let{layout:c}=this.state;const{cols:f,preventCollision:p,allowOverlap:d}=this.props,[h,g]=(0,s.withLayoutItem)(c,t,(t=>{let r;if(p&&!d){const o=(0,s.getAllCollisions)(c,{...t,w:e,h:n}).filter((e=>e.i!==t.i));if(r=o.length>0,r){let e=1/0,n=1/0;o.forEach((r=>{r.x>t.x&&(e=Math.min(e,r.x)),r.y>t.y&&(n=Math.min(n,r.y))})),Number.isFinite(e)&&(t.w=e-t.x),Number.isFinite(n)&&(t.h=n-t.y)}}return t}));if(!g)return;let y;if(-1!==["sw","w","nw","n","ne"].indexOf(u)){let t=g.x,r=g.y;-1!==["sw","nw","w"].indexOf(u)&&(t=g.x+(g.w-e),e=g.x!==t&&t<0?g.w:e,t=t<0?0:t),-1!==["ne","n","nw"].indexOf(u)&&(r=g.y+(g.h-n),n=g.y!==r&&r<0?g.h:n,r=r<0?0:r),g.w=e,g.h=n;const o=!0;y=(0,s.moveElement)(h,g,t,r,o,this.props.preventCollision,(0,s.compactType)(this.props),f,d)}else g.w=e,g.h=n,y=h;const m={w:g.w,h:g.h,x:g.x,y:g.y,static:!0,i:t};this.props.onResize(y,l,g,m,o,i),this.setState({layout:d?y:(0,s.compact)(y,(0,s.compactType)(this.props),f),activeDrag:m})})),b(this,"onResizeStop",((t,e,n,r)=>{let{e:o,node:i}=r;const{layout:a,oldResizeItem:u}=this.state,{cols:l,allowOverlap:c}=this.props,f=(0,s.getLayoutItem)(a,t),p=c?a:(0,s.compact)(a,(0,s.compactType)(this.props),l);this.props.onResizeStop(p,u,f,null,o,i);const{oldLayout:d}=this.state;this.setState({activeDrag:null,layout:p,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(p,d)})),b(this,"onDragOver",(t=>{var e;if(t.preventDefault(),t.stopPropagation(),w&&(null===(e=t.nativeEvent.target)||void 0===e||!e.classList.contains(v)))return!1;const{droppingItem:n,onDropDragOver:o,margin:i,cols:a,rowHeight:s,maxRows:l,width:c,containerPadding:f,transformScale:p}=this.props,d=null==o?void 0:o(t);if(!1===d)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const h={...n,...d},{layout:g}=this.state,{layerX:y,layerY:m}=t.nativeEvent,b={left:y/p,top:m/p,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:t,top:e}=this.state.droppingPosition;(t!=y||e!=m)&&this.setState({droppingPosition:b})}}else{const t={cols:a,margin:i,maxRows:l,rowHeight:s,containerWidth:c,containerPadding:f||i},e=(0,u.calcXY)(t,m,y,h.w,h.h);this.setState({droppingDOMNode:r.createElement("div",{key:h.i}),droppingPosition:b,layout:[...g,{...h,x:e.x,y:e.y,static:!1,isDraggable:!0}]})}})),b(this,"removeDroppingPlaceholder",(()=>{const{droppingItem:t,cols:e}=this.props,{layout:n}=this.state,r=(0,s.compact)(n.filter((e=>e.i!==t.i)),(0,s.compactType)(this.props),e,this.props.allowOverlap);this.setState({layout:r,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),b(this,"onDragLeave",(t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,0===this.dragEnterCounter&&this.removeDroppingPlaceholder()})),b(this,"onDragEnter",(t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++})),b(this,"onDrop",(t=>{t.preventDefault(),t.stopPropagation();const{droppingItem:e}=this.props,{layout:n}=this.state,r=n.find((t=>t.i===e.i));this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,t)}))}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,e){let n;return e.activeDrag?null:((0,i.vZ)(t.layout,e.propsLayout)&&t.compactType===e.compactType?(0,s.childrenEqual)(t.children,e.children)||(n=e.layout):n=t.layout,n?{layout:(0,s.synchronizeLayoutWithChildren)(n,t.children,t.cols,(0,s.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,e){return this.props.children!==t.children||!(0,s.fastRGLPropsEqual)(this.props,t,i.vZ)||this.state.activeDrag!==e.activeDrag||this.state.mounted!==e.mounted||this.state.droppingPosition!==e.droppingPosition}componentDidUpdate(t,e){if(!this.state.activeDrag){const t=this.state.layout,n=e.layout;this.onLayoutMaybeChanged(t,n)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,s.bottom)(this.state.layout),e=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+2*e+"px"}onLayoutMaybeChanged(t,e){e||(e=this.state.layout),(0,i.vZ)(e,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:e,cols:n,margin:o,containerPadding:i,rowHeight:a,maxRows:s,useCSSTransforms:u,transformScale:l}=this.props;return r.createElement(m,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder ".concat(this.state.resizing?"placeholder-resizing":""),containerWidth:e,cols:n,margin:o,containerPadding:i||o,maxRows:s,rowHeight:a,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:u,transformScale:l},r.createElement("div",null))}processGridItem(t,e){if(!t||!t.key)return;const n=(0,s.getLayoutItem)(this.state.layout,String(t.key));if(!n)return null;const{width:o,cols:i,margin:a,containerPadding:u,rowHeight:l,maxRows:c,isDraggable:f,isResizable:p,isBounded:d,useCSSTransforms:h,transformScale:g,draggableCancel:y,draggableHandle:b,resizeHandles:v,resizeHandle:w}=this.props,{mounted:O,droppingPosition:S}=this.state,x="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&f,D="boolean"==typeof n.isResizable?n.isResizable:!n.static&&p,P=n.resizeHandles||v,R=x&&d&&!1!==n.isBounded;return r.createElement(m,{containerWidth:o,cols:i,margin:a,containerPadding:u||a,maxRows:c,rowHeight:l,cancel:y,handle:b,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:x,isResizable:D,isBounded:R,useCSSTransforms:h&&O,usePercentages:!O,transformScale:g,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:e?S:void 0,resizeHandles:P,resizeHandle:w},t)}render(){const{className:t,style:e,isDroppable:n,innerRef:o}=this.props,i=(0,a.Z)(v,t),u={height:this.containerHeight(),...e};return r.createElement("div",{ref:o,className:i,style:u,onDrop:n?this.onDrop:s.noop,onDragLeave:n?this.onDragLeave:s.noop,onDragEnter:n?this.onDragEnter:s.noop,onDragOver:n?this.onDragOver:s.noop},r.Children.map(this.props.children,(t=>this.processGridItem(t))),n&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}b(O,"displayName","ReactGridLayout"),b(O,"propTypes",g),b(O,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:s.noop,onDragStart:s.noop,onDrag:s.noop,onDragStop:s.noop,onResizeStart:s.noop,onResize:s.noop,onResizeStop:s.noop,onDrop:s.noop,onDropDragOver:s.noop})},94:function(t,e,n){"use strict";n.d(e,{default:function(){return h}});var r=n(359),o=n(697),i=n.n(o),a=n(690),s=n(872),u=n(271),l=n(319);function c(){return c=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c.apply(this,arguments)}function f(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const p=t=>Object.prototype.toString.call(t);function d(t,e){return null==t?null:Array.isArray(t)?t:t[e]}class h extends r.Component{constructor(){super(...arguments),f(this,"state",this.generateInitialState()),f(this,"onLayoutChange",(t=>{this.props.onLayoutChange(t,{...this.props.layouts,[this.state.breakpoint]:t})}))}generateInitialState(){const{width:t,breakpoints:e,layouts:n,cols:r}=this.props,o=(0,u.getBreakpointFromWidth)(e,t),i=(0,u.getColsFromBreakpoint)(o,r),a=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,u.findOrGenerateResponsiveLayout)(n,e,o,o,i,a),breakpoint:o,cols:i}}static getDerivedStateFromProps(t,e){if(!(0,a.vZ)(t.layouts,e.layouts)){const{breakpoint:n,cols:r}=e;return{layout:(0,u.findOrGenerateResponsiveLayout)(t.layouts,t.breakpoints,n,n,r,t.compactType),layouts:t.layouts}}return null}componentDidUpdate(t){this.props.width==t.width&&this.props.breakpoint===t.breakpoint&&(0,a.vZ)(this.props.breakpoints,t.breakpoints)&&(0,a.vZ)(this.props.cols,t.cols)||this.onWidthChange(t)}onWidthChange(t){const{breakpoints:e,cols:n,layouts:r,compactType:o}=this.props,i=this.props.breakpoint||(0,u.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),a=this.state.breakpoint,l=(0,u.getColsFromBreakpoint)(i,n),c={...r};if(a!==i||t.breakpoints!==e||t.cols!==n){a in c||(c[a]=(0,s.cloneLayout)(this.state.layout));let t=(0,u.findOrGenerateResponsiveLayout)(c,e,i,a,l,o);t=(0,s.synchronizeLayoutWithChildren)(t,this.props.children,l,o,this.props.allowOverlap),c[i]=t,this.props.onLayoutChange(t,c),this.props.onBreakpointChange(i,l),this.setState({breakpoint:i,layout:t,cols:l})}const f=d(this.props.margin,i),p=d(this.props.containerPadding,i);this.props.onWidthChange(this.props.width,f,l,p)}render(){const{breakpoint:t,breakpoints:e,cols:n,layouts:o,margin:i,containerPadding:a,onBreakpointChange:s,onLayoutChange:u,onWidthChange:f,...p}=this.props;return r.createElement(l.default,c({},p,{margin:d(i,this.state.breakpoint),containerPadding:d(a,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}f(h,"propTypes",{breakpoint:i().string,breakpoints:i().object,allowOverlap:i().bool,cols:i().object,margin:i().oneOfType([i().array,i().object]),containerPadding:i().oneOfType([i().array,i().object]),layouts(t,e){if("[object Object]"!==p(t[e]))throw new Error("Layout property must be an object. Received: "+p(t[e]));Object.keys(t[e]).forEach((e=>{if(!(e in t.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,s.validateLayout)(t.layouts[e],"layouts."+e)}))},width:i().number.isRequired,onBreakpointChange:i().func,onLayoutChange:i().func,onWidthChange:i().func}),f(h,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:s.noop,onLayoutChange:s.noop,onWidthChange:s.noop})},337:function(t,e,n){"use strict";function r(t){const{margin:e,containerPadding:n,containerWidth:r,cols:o}=t;return(r-e[0]*(o-1)-2*n[0])/o}function o(t,e,n){return Number.isFinite(t)?Math.round(e*t+Math.max(0,t-1)*n):t}function i(t,e,n,i,a,s){const{margin:u,containerPadding:l,rowHeight:c}=t,f=r(t),p={};return s&&s.resizing?(p.width=Math.round(s.resizing.width),p.height=Math.round(s.resizing.height)):(p.width=o(i,f,u[0]),p.height=o(a,c,u[1])),s&&s.dragging?(p.top=Math.round(s.dragging.top),p.left=Math.round(s.dragging.left)):s&&s.resizing&&"number"==typeof s.resizing.top&&"number"==typeof s.resizing.left?(p.top=Math.round(s.resizing.top),p.left=Math.round(s.resizing.left)):(p.top=Math.round((c+u[1])*n+l[1]),p.left=Math.round((f+u[0])*e+l[0])),p}function a(t,e,n,o,i){const{margin:a,cols:s,rowHeight:l,maxRows:c}=t,f=r(t);let p=Math.round((n-a[0])/(f+a[0])),d=Math.round((e-a[1])/(l+a[1]));return p=u(p,0,s-o),d=u(d,0,c-i),{x:p,y:d}}function s(t,e,n,o,i,a){const{margin:s,maxRows:l,cols:c,rowHeight:f}=t,p=r(t);let d=Math.round((e+s[0])/(p+s[0])),h=Math.round((n+s[1])/(f+s[1])),g=u(d,0,c-o),y=u(h,0,l-i);return-1!==["sw","w","nw"].indexOf(a)&&(g=u(d,0,c)),-1!==["nw","n","ne"].indexOf(a)&&(y=u(h,0,l)),{w:g,h:y}}function u(t,e,n){return Math.max(Math.min(t,n),e)}n.r(e),n.d(e,{calcGridColWidth:function(){return r},calcGridItemPosition:function(){return i},calcGridItemWHPx:function(){return o},calcWH:function(){return s},calcXY:function(){return a},clamp:function(){return u}})},550:function(t,e,n){"use strict";n.d(e,{default:function(){return _}});var r=n(359),o=n(697),i=n.n(o),a=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];t.call(e,o[1],o[0])}},e}()}(),s="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,u=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),l="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(u):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},c=["top","right","bottom","left","width","height","size","weight"],f="undefined"!=typeof MutationObserver,p=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,o=0;function i(){n&&(n=!1,t()),r&&s()}function a(){l(i)}function s(){var t=Date.now();if(n){if(t-o<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);o=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){s&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),f?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){s&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;c.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),d=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},h=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||u},g=w(0,0,0,0);function y(t){return parseFloat(t)||0}function m(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+y(t["border-"+n+"-width"])}),0)}var b="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof h(t).SVGGraphicsElement}:function(t){return t instanceof h(t).SVGElement&&"function"==typeof t.getBBox};function v(t){return s?b(t)?function(t){var e=t.getBBox();return w(0,0,e.width,e.height)}(t):function(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return g;var r=h(t).getComputedStyle(t),o=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=t["padding-"+o];e[o]=y(i)}return e}(r),i=o.left+o.right,a=o.top+o.bottom,s=y(r.width),u=y(r.height);if("border-box"===r.boxSizing&&(Math.round(s+i)!==e&&(s-=m(r,"left","right")+i),Math.round(u+a)!==n&&(u-=m(r,"top","bottom")+a)),!function(t){return t===h(t).document.documentElement}(t)){var l=Math.round(s+i)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return w(o.left,o.top,s,u)}(t):g}function w(t,e,n,r){return{x:t,y:e,width:n,height:r}}var O=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=w(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=v(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),S=function(t,e){var n,r,o,i,a,s,u,l=(r=(n=e).x,o=n.y,i=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),d(u,{x:r,y:o,width:i,height:a,top:o,right:r+i,bottom:a+o,left:r}),u);d(this,{target:t,contentRect:l})},x=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new a,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new O(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new S(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),D="undefined"!=typeof WeakMap?new WeakMap:new a,P=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=p.getInstance(),r=new x(e,n,this);D.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){P.prototype[t]=function(){var e;return(e=D.get(this))[t].apply(e,arguments)}}));var R=void 0!==u.ResizeObserver?u.ResizeObserver:P,j=n(512);function E(){return E=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},E.apply(this,arguments)}function z(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const C="react-grid-layout";function _(t){var e;return e=class extends r.Component{constructor(){super(...arguments),z(this,"state",{width:1280}),z(this,"elementRef",r.createRef()),z(this,"mounted",!1),z(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new R((t=>{if(this.elementRef.current instanceof HTMLElement){const e=t[0].contentRect.width;this.setState({width:e})}}));const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.observe(t)}componentWillUnmount(){this.mounted=!1;const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.unobserve(t),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:e,...n}=this.props;return e&&!this.mounted?r.createElement("div",{className:(0,j.Z)(this.props.className,C),style:this.props.style,ref:this.elementRef}):r.createElement(t,E({innerRef:this.elementRef},n,this.state))}},z(e,"defaultProps",{measureBeforeMount:!1}),z(e,"propTypes",{measureBeforeMount:i().bool}),e}},378:function(t){t.exports=function(t,e,n){return t===e||t.className===e.className&&n(t.style,e.style)&&t.width===e.width&&t.autoSize===e.autoSize&&t.cols===e.cols&&t.draggableCancel===e.draggableCancel&&t.draggableHandle===e.draggableHandle&&n(t.verticalCompact,e.verticalCompact)&&n(t.compactType,e.compactType)&&n(t.layout,e.layout)&&n(t.margin,e.margin)&&n(t.containerPadding,e.containerPadding)&&t.rowHeight===e.rowHeight&&t.maxRows===e.maxRows&&t.isBounded===e.isBounded&&t.isDraggable===e.isDraggable&&t.isResizable===e.isResizable&&t.allowOverlap===e.allowOverlap&&t.preventCollision===e.preventCollision&&t.useCSSTransforms===e.useCSSTransforms&&t.transformScale===e.transformScale&&t.isDroppable===e.isDroppable&&n(t.resizeHandles,e.resizeHandles)&&n(t.resizeHandle,e.resizeHandle)&&t.onLayoutChange===e.onLayoutChange&&t.onDragStart===e.onDragStart&&t.onDrag===e.onDrag&&t.onDragStop===e.onDragStop&&t.onResizeStart===e.onResizeStart&&t.onResize===e.onResize&&t.onResizeStop===e.onResizeStop&&t.onDrop===e.onDrop&&n(t.droppingItem,e.droppingItem)&&n(t.innerRef,e.innerRef)}},271:function(t,e,n){"use strict";n.r(e),n.d(e,{findOrGenerateResponsiveLayout:function(){return a},getBreakpointFromWidth:function(){return o},getColsFromBreakpoint:function(){return i},sortBreakpoints:function(){return s}});var r=n(872);function o(t,e){const n=s(t);let r=n[0];for(let o=1,i=n.length;o<i;o++){const i=n[o];e>t[i]&&(r=i)}return r}function i(t,e){if(!e[t])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+t+" is missing!");return e[t]}function a(t,e,n,o,i,a){if(t[n])return(0,r.cloneLayout)(t[n]);let u=t[o];const l=s(e),c=l.slice(l.indexOf(n));for(let e=0,n=c.length;e<n;e++){const n=c[e];if(t[n]){u=t[n];break}}return u=(0,r.cloneLayout)(u||[]),(0,r.compact)((0,r.correctBounds)(u,{cols:i}),a,i)}function s(t){return Object.keys(t).sort((function(e,n){return t[e]-t[n]}))}},872:function(t,e,n){"use strict";n.r(e),n.d(e,{bottom:function(){return u},childrenEqual:function(){return d},cloneLayout:function(){return l},cloneLayoutItem:function(){return p},collides:function(){return y},compact:function(){return m},compactItem:function(){return w},compactType:function(){return L},correctBounds:function(){return O},fastPositionEqual:function(){return g},fastRGLPropsEqual:function(){return h},getAllCollisions:function(){return D},getFirstCollision:function(){return x},getLayoutItem:function(){return S},getStatics:function(){return P},modifyLayout:function(){return c},moveElement:function(){return R},moveElementAwayFromCollision:function(){return j},noop:function(){return N},perc:function(){return E},setTopLeft:function(){return C},setTransform:function(){return z},sortLayoutItems:function(){return _},sortLayoutItemsByColRow:function(){return T},sortLayoutItemsByRowCol:function(){return M},synchronizeLayoutWithChildren:function(){return k},validateLayout:function(){return H},withLayoutItem:function(){return f}});var r=n(690),o=n(359),i=n.n(o);const a=!0,s=!1;function u(t){let e,n=0;for(let r=0,o=t.length;r<o;r++)e=t[r].y+t[r].h,e>n&&(n=e);return n}function l(t){const e=Array(t.length);for(let n=0,r=t.length;n<r;n++)e[n]=p(t[n]);return e}function c(t,e){const n=Array(t.length);for(let r=0,o=t.length;r<o;r++)e.i===t[r].i?n[r]=e:n[r]=t[r];return n}function f(t,e,n){let r=S(t,e);return r?(r=n(p(r)),[t=c(t,r),r]):[t,null]}function p(t){return{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,minW:t.minW,maxW:t.maxW,minH:t.minH,maxH:t.maxH,moved:Boolean(t.moved),static:Boolean(t.static),isDraggable:t.isDraggable,isResizable:t.isResizable,resizeHandles:t.resizeHandles,isBounded:t.isBounded}}function d(t,e){return(0,r.vZ)(i().Children.map(t,(t=>null==t?void 0:t.key)),i().Children.map(e,(t=>null==t?void 0:t.key)))&&(0,r.vZ)(i().Children.map(t,(t=>null==t?void 0:t.props["data-grid"])),i().Children.map(e,(t=>null==t?void 0:t.props["data-grid"])))}const h=n(378);function g(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height}function y(t,e){return!(t.i===e.i||t.x+t.w<=e.x||t.x>=e.x+e.w||t.y+t.h<=e.y||t.y>=e.y+e.h)}function m(t,e,n,r){const o=P(t),i=_(t,e),a=Array(t.length);for(let s=0,u=i.length;s<u;s++){let u=p(i[s]);u.static||(u=w(o,u,e,n,i,r),o.push(u)),a[t.indexOf(i[s])]=u,u.moved=!1}return a}const b={x:"w",y:"h"};function v(t,e,n,r){const o=b[r];e[r]+=1;for(let i=t.map((t=>t.i)).indexOf(e.i)+1;i<t.length;i++){const a=t[i];if(!a.static){if(a.y>e.y+e.h)break;y(e,a)&&v(t,a,n+e[o],r)}}e[r]=n}function w(t,e,n,r,o,i){const a="horizontal"===n;if("vertical"===n)for(e.y=Math.min(u(t),e.y);e.y>0&&!x(t,e);)e.y--;else if(a)for(;e.x>0&&!x(t,e);)e.x--;let s;for(;(s=x(t,e))&&(null!==n||!i);)if(a?v(o,e,s.x+s.w,"x"):v(o,e,s.y+s.h,"y"),a&&e.x+e.w>r)for(e.x=r-e.w,e.y++;e.x>0&&!x(t,e);)e.x--;return e.y=Math.max(e.y,0),e.x=Math.max(e.x,0),e}function O(t,e){const n=P(t);for(let r=0,o=t.length;r<o;r++){const o=t[r];if(o.x+o.w>e.cols&&(o.x=e.cols-o.w),o.x<0&&(o.x=0,o.w=e.cols),o.static)for(;x(n,o);)o.y++;else n.push(o)}return t}function S(t,e){for(let n=0,r=t.length;n<r;n++)if(t[n].i===e)return t[n]}function x(t,e){for(let n=0,r=t.length;n<r;n++)if(y(t[n],e))return t[n]}function D(t,e){return t.filter((t=>y(t,e)))}function P(t){return t.filter((t=>t.static))}function R(t,e,n,r,o,i,a,s,u){if(e.static&&!0!==e.isDraggable)return t;if(e.y===r&&e.x===n)return t;W("Moving element ".concat(e.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(e.x,",").concat(e.y,"]"));const c=e.x,f=e.y;"number"==typeof n&&(e.x=n),"number"==typeof r&&(e.y=r),e.moved=!0;let p=_(t,a);("vertical"===a&&"number"==typeof r?f>=r:"horizontal"===a&&"number"==typeof n&&c>=n)&&(p=p.reverse());const d=D(p,e),h=d.length>0;if(h&&u)return l(t);if(h&&i)return W("Collision prevented on ".concat(e.i,", reverting.")),e.x=c,e.y=f,e.moved=!1,t;for(let n=0,r=d.length;n<r;n++){const r=d[n];W("Resolving collision between ".concat(e.i," at [").concat(e.x,",").concat(e.y,"] and ").concat(r.i," at [").concat(r.x,",").concat(r.y,"]")),r.moved||(t=r.static?j(t,r,e,o,a,s):j(t,e,r,o,a,s))}return t}function j(t,e,n,r,o,i){const a="horizontal"===o,s="vertical"===o,u=e.static;if(r){r=!1;const l={x:a?Math.max(e.x-n.w,0):n.x,y:s?Math.max(e.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},c=x(t,l),f=c&&c.y+c.h>e.y,p=c&&e.x+e.w>c.x;if(!c)return W("Doing reverse collision on ".concat(n.i," up to [").concat(l.x,",").concat(l.y,"].")),R(t,n,a?l.x:void 0,s?l.y:void 0,r,u,o,i);if(f&&s)return R(t,n,void 0,e.y+1,r,u,o,i);if(f&&null==o)return e.y=n.y,n.y=n.y+n.h,t;if(p&&a)return R(t,e,n.x,void 0,r,u,o,i)}const l=a?n.x+1:void 0,c=s?n.y+1:void 0;return null==l&&null==c?t:R(t,n,a?n.x+1:void 0,s?n.y+1:void 0,r,u,o,i)}function E(t){return 100*t+"%"}function z(t){let{top:e,left:n,width:r,height:o}=t;const i="translate(".concat(n,"px,").concat(e,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}}function C(t){let{top:e,left:n,width:r,height:o}=t;return{top:"".concat(e,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}}function _(t,e){return"horizontal"===e?T(t):"vertical"===e?M(t):t}function M(t){return t.slice(0).sort((function(t,e){return t.y>e.y||t.y===e.y&&t.x>e.x?1:t.y===e.y&&t.x===e.x?0:-1}))}function T(t){return t.slice(0).sort((function(t,e){return t.x>e.x||t.x===e.x&&t.y>e.y?1:-1}))}function k(t,e,n,r,o){t=t||[];const s=[];i().Children.forEach(e,(e=>{if(null==(null==e?void 0:e.key))return;const n=S(t,String(e.key)),r=e.props["data-grid"];n&&null==r?s.push(p(n)):r?(a||H([r],"ReactGridLayout.children"),s.push(p({...r,i:e.key}))):s.push(p({w:1,h:1,x:0,y:u(s),i:String(e.key)}))}));const l=O(s,{cols:n});return o?l:m(l,r,n)}function H(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(let r=0,o=t.length;r<o;r++){const o=t[r];for(let t=0;t<n.length;t++)if("number"!=typeof o[n[t]])throw new Error("ReactGridLayout: "+e+"["+r+"]."+n[t]+" must be a number!")}}function L(t){const{verticalCompact:e,compactType:n}=t||{};return!1===e?null:n}function W(){s&&console.log(...arguments)}const N=()=>{}},703:function(t,e,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:function(t,e,n){t.exports=n(703)()},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},668:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return f.default}}),e.default=void 0;var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=g(e);if(n&&n.has(t))return n.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var s=i?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=t[a]}return o.default=t,n&&n.set(t,o),o}(n(359)),i=h(n(697)),a=h(n(318)),s=h(n(946)),u=n(825),l=n(849),c=n(280),f=h(n(783)),p=h(n(904)),d=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function h(t){return t&&t.__esModule?t:{default:t}}function g(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(g=function(t){return t?n:e})(t)}function y(){return y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},y.apply(this,arguments)}function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){D(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O(t,e){return O=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},O(t,e)}function S(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function D(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}(m,t);var e,n,i,c,h,g=(c=m,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=x(c);if(h){var n=x(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return S(t)}(this,t)});function m(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),D(S(e=g.call(this,t)),"onDragStart",(function(t,n){if((0,p.default)("Draggable: onDragStart: %j",n),!1===e.props.onStart(t,(0,l.createDraggableData)(S(e),n)))return!1;e.setState({dragging:!0,dragged:!0})})),D(S(e),"onDrag",(function(t,n){if(!e.state.dragging)return!1;(0,p.default)("Draggable: onDrag: %j",n);var r,o,i=(0,l.createDraggableData)(S(e),n),a={x:i.x,y:i.y};if(e.props.bounds){var s=a.x,u=a.y;a.x+=e.state.slackX,a.y+=e.state.slackY;var c=(r=(0,l.getBoundPosition)(S(e),a.x,a.y),o=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(r,o)||function(t,e){if(t){if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(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.")}()),f=c[0],d=c[1];a.x=f,a.y=d,a.slackX=e.state.slackX+(s-a.x),a.slackY=e.state.slackY+(u-a.y),i.x=a.x,i.y=a.y,i.deltaX=a.x-e.state.x,i.deltaY=a.y-e.state.y}if(!1===e.props.onDrag(t,i))return!1;e.setState(a)})),D(S(e),"onDragStop",(function(t,n){if(!e.state.dragging)return!1;if(!1===e.props.onStop(t,(0,l.createDraggableData)(S(e),n)))return!1;(0,p.default)("Draggable: onDragStop: %j",n);var r={dragging:!1,slackX:0,slackY:0};if(Boolean(e.props.position)){var o=e.props.position,i=o.x,a=o.y;r.x=i,r.y=a}e.setState(r)})),e.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:b({},t.position),slackX:0,slackY:0,isElementSVG:!1},!t.position||t.onDrag||t.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),e}return e=m,i=[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.position,r=e.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,p.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:b({},n)})}}],(n=[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var t,e,n;return null!==(t=null===(e=this.props)||void 0===e||null===(n=e.nodeRef)||void 0===n?void 0:n.current)&&void 0!==t?t:a.default.findDOMNode(this)}},{key:"render",value:function(){var t,e=this.props,n=(e.axis,e.bounds,e.children),r=e.defaultPosition,i=e.defaultClassName,a=e.defaultClassNameDragging,c=e.defaultClassNameDragged,p=e.position,h=e.positionOffset,g=(e.scale,function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,d)),m={},v=null,w=!Boolean(p)||this.state.dragging,O=p||r,S={x:(0,l.canDragX)(this)&&w?this.state.x:O.x,y:(0,l.canDragY)(this)&&w?this.state.y:O.y};this.state.isElementSVG?v=(0,u.createSVGTransform)(S,h):m=(0,u.createCSSTransform)(S,h);var x=(0,s.default)(n.props.className||"",i,(D(t={},a,this.state.dragging),D(t,c,this.state.dragged),t));return o.createElement(f.default,y({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.cloneElement(o.Children.only(n),{className:x,style:b(b({},n.props.style),m),transform:v}))}}])&&w(e.prototype,n),i&&w(e,i),Object.defineProperty(e,"prototype",{writable:!1}),m}(o.Component);e.default=P,D(P,"displayName","Draggable"),D(P,"propTypes",b(b({},f.default.propTypes),{},{axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe})),D(P,"defaultProps",b(b({},f.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},783:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=p(e);if(n&&n.has(t))return n.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var s=i?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=t[a]}return o.default=t,n&&n.set(t,o),o}(n(359)),i=f(n(697)),a=f(n(318)),s=n(825),u=n(849),l=n(280),c=f(n(904));function f(t){return t&&t.__esModule?t:{default:t}}function p(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(p=function(t){return t?n:e})(t)}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t,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 h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w={start:"touchstart",move:"touchmove",stop:"touchend"},O={start:"mousedown",move:"mousemove",stop:"mouseup"},S=O,x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(p,t);var e,n,i,l,f=(i=p,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=b(i);if(l){var n=b(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}(this,t)});function p(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return v(m(t=f.call.apply(f,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),v(m(t),"mounted",!1),v(m(t),"handleDragStart",(function(e){if(t.props.onMouseDown(e),!t.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;var n=t.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(t.props.disabled||!(e.target instanceof r.defaultView.Node)||t.props.handle&&!(0,s.matchesSelectorAndParentsTo)(e.target,t.props.handle,n)||t.props.cancel&&(0,s.matchesSelectorAndParentsTo)(e.target,t.props.cancel,n))){"touchstart"===e.type&&e.preventDefault();var o=(0,s.getTouchIdentifier)(e);t.setState({touchIdentifier:o});var i=(0,u.getControlPosition)(e,o,m(t));if(null!=i){var a=i.x,l=i.y,f=(0,u.createCoreData)(m(t),a,l);(0,c.default)("DraggableCore: handleDragStart: %j",f),(0,c.default)("calling",t.props.onStart),!1!==t.props.onStart(e,f)&&!1!==t.mounted&&(t.props.enableUserSelectHack&&(0,s.addUserSelectStyles)(r),t.setState({dragging:!0,lastX:a,lastY:l}),(0,s.addEvent)(r,S.move,t.handleDrag),(0,s.addEvent)(r,S.stop,t.handleDragStop))}}})),v(m(t),"handleDrag",(function(e){var n=(0,u.getControlPosition)(e,t.state.touchIdentifier,m(t));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(t.props.grid)){var i=r-t.state.lastX,a=o-t.state.lastY,s=d((0,u.snapToGrid)(t.props.grid,i,a),2);if(i=s[0],a=s[1],!i&&!a)return;r=t.state.lastX+i,o=t.state.lastY+a}var l=(0,u.createCoreData)(m(t),r,o);if((0,c.default)("DraggableCore: handleDrag: %j",l),!1!==t.props.onDrag(e,l)&&!1!==t.mounted)t.setState({lastX:r,lastY:o});else try{t.handleDragStop(new MouseEvent("mouseup"))}catch(e){var f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),t.handleDragStop(f)}}})),v(m(t),"handleDragStop",(function(e){if(t.state.dragging){var n=(0,u.getControlPosition)(e,t.state.touchIdentifier,m(t));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(t.props.grid)){var i=r-t.state.lastX||0,a=o-t.state.lastY||0,l=d((0,u.snapToGrid)(t.props.grid,i,a),2);i=l[0],a=l[1],r=t.state.lastX+i,o=t.state.lastY+a}var f=(0,u.createCoreData)(m(t),r,o);if(!1===t.props.onStop(e,f)||!1===t.mounted)return!1;var p=t.findDOMNode();p&&t.props.enableUserSelectHack&&(0,s.removeUserSelectStyles)(p.ownerDocument),(0,c.default)("DraggableCore: handleDragStop: %j",f),t.setState({dragging:!1,lastX:NaN,lastY:NaN}),p&&((0,c.default)("DraggableCore: Removing handlers"),(0,s.removeEvent)(p.ownerDocument,S.move,t.handleDrag),(0,s.removeEvent)(p.ownerDocument,S.stop,t.handleDragStop))}}})),v(m(t),"onMouseDown",(function(e){return S=O,t.handleDragStart(e)})),v(m(t),"onMouseUp",(function(e){return S=O,t.handleDragStop(e)})),v(m(t),"onTouchStart",(function(e){return S=w,t.handleDragStart(e)})),v(m(t),"onTouchEnd",(function(e){return S=w,t.handleDragStop(e)})),t}return e=p,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var t=this.findDOMNode();t&&(0,s.addEvent)(t,w.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var t=this.findDOMNode();if(t){var e=t.ownerDocument;(0,s.removeEvent)(e,O.move,this.handleDrag),(0,s.removeEvent)(e,w.move,this.handleDrag),(0,s.removeEvent)(e,O.stop,this.handleDragStop),(0,s.removeEvent)(e,w.stop,this.handleDragStop),(0,s.removeEvent)(t,w.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,s.removeUserSelectStyles)(e)}}},{key:"findDOMNode",value:function(){var t,e,n;return null!==(t=this.props)&&void 0!==t&&t.nodeRef?null===(e=this.props)||void 0===e||null===(n=e.nodeRef)||void 0===n?void 0:n.current:a.default.findDOMNode(this)}},{key:"render",value:function(){return o.cloneElement(o.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&g(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),p}(o.Component);e.default=x,v(x,"displayName","DraggableCore"),v(x,"propTypes",{allowAnyClick:i.default.bool,disabled:i.default.bool,enableUserSelectHack:i.default.bool,offsetParent:function(t,e){if(t[e]&&1!==t[e].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:i.default.arrayOf(i.default.number),handle:i.default.string,cancel:i.default.string,nodeRef:i.default.object,onStart:i.default.func,onDrag:i.default.func,onStop:i.default.func,onMouseDown:i.default.func,scale:i.default.number,className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),v(x,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},193:function(t,e,n){"use strict";var r=n(668),o=r.default,i=r.DraggableCore;t.exports=o,t.exports.default=o,t.exports.DraggableCore=i},825:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.addClassName=d,e.addEvent=function(t,e,n,r){if(t){var o=u({capture:!0},r);t.addEventListener?t.addEventListener(e,n,o):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n}},e.addUserSelectStyles=function(t){if(t){var e=t.getElementById("react-draggable-style-el");e||((e=t.createElement("style")).type="text/css",e.id="react-draggable-style-el",e.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",e.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",t.getElementsByTagName("head")[0].appendChild(e)),t.body&&d(t.body,"react-draggable-transparent-selection")}},e.createCSSTransform=function(t,e){var n=p(t,e,"px");return l({},(0,i.browserPrefixToKey)("transform",i.default),n)},e.createSVGTransform=function(t,e){return p(t,e,"")},e.getTouch=function(t,e){return t.targetTouches&&(0,o.findInArray)(t.targetTouches,(function(t){return e===t.identifier}))||t.changedTouches&&(0,o.findInArray)(t.changedTouches,(function(t){return e===t.identifier}))},e.getTouchIdentifier=function(t){return t.targetTouches&&t.targetTouches[0]?t.targetTouches[0].identifier:t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].identifier:void 0},e.getTranslation=p,e.innerHeight=function(t){var e=t.clientHeight,n=t.ownerDocument.defaultView.getComputedStyle(t);return(e-=(0,o.int)(n.paddingTop))-(0,o.int)(n.paddingBottom)},e.innerWidth=function(t){var e=t.clientWidth,n=t.ownerDocument.defaultView.getComputedStyle(t);return(e-=(0,o.int)(n.paddingLeft))-(0,o.int)(n.paddingRight)},e.matchesSelector=f,e.matchesSelectorAndParentsTo=function(t,e,n){var r=t;do{if(f(r,e))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},e.offsetXYFromParent=function(t,e,n){var r=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect();return{x:(t.clientX+e.scrollLeft-r.left)/n,y:(t.clientY+e.scrollTop-r.top)/n}},e.outerHeight=function(t){var e=t.clientHeight,n=t.ownerDocument.defaultView.getComputedStyle(t);return(e+=(0,o.int)(n.borderTopWidth))+(0,o.int)(n.borderBottomWidth)},e.outerWidth=function(t){var e=t.clientWidth,n=t.ownerDocument.defaultView.getComputedStyle(t);return(e+=(0,o.int)(n.borderLeftWidth))+(0,o.int)(n.borderRightWidth)},e.removeClassName=h,e.removeEvent=function(t,e,n,r){if(t){var o=u({capture:!0},r);t.removeEventListener?t.removeEventListener(e,n,o):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null}},e.removeUserSelectStyles=function(t){if(t)try{if(t.body&&h(t.body,"react-draggable-transparent-selection"),t.selection)t.selection.empty();else{var e=(t.defaultView||window).getSelection();e&&"Caret"!==e.type&&e.removeAllRanges()}}catch(t){}};var o=n(280),i=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=a(e);if(n&&n.has(t))return n.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var u=i?Object.getOwnPropertyDescriptor(t,s):null;u&&(u.get||u.set)?Object.defineProperty(o,s,u):o[s]=t[s]}return o.default=t,n&&n.set(t,o),o}(n(650));function a(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(a=function(t){return t?n:e})(t)}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c="";function f(t,e){return c||(c=(0,o.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(e){return(0,o.isFunction)(t[e])}))),!!(0,o.isFunction)(t[c])&&t[c](e)}function p(t,e,n){var r=t.x,o=t.y,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(e){var a="".concat("string"==typeof e.x?e.x:e.x+n),s="".concat("string"==typeof e.y?e.y:e.y+n);i="translate(".concat(a,", ").concat(s,")")+i}return i}function d(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)")))||(t.className+=" ".concat(e))}function h(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g"),"")}},650:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.browserPrefixToKey=o,e.browserPrefixToStyle=function(t,e){return e?"-".concat(e.toLowerCase(),"-").concat(t):t},e.default=void 0,e.getPrefix=r;var n=["Moz","Webkit","O","ms"];function r(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";var i=null===(t=window.document)||void 0===t||null===(e=t.documentElement)||void 0===e?void 0:e.style;if(!i)return"";if(r in i)return"";for(var a=0;a<n.length;a++)if(o(r,n[a])in i)return n[a];return""}function o(t,e){return e?"".concat(e).concat(function(t){for(var e="",n=!0,r=0;r<t.length;r++)n?(e+=t[r].toUpperCase(),n=!1):"-"===t[r]?n=!0:e+=t[r];return e}(t)):t}var i=r();e.default=i},904:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){}},849:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.canDragX=function(t){return"both"===t.props.axis||"x"===t.props.axis},e.canDragY=function(t){return"both"===t.props.axis||"y"===t.props.axis},e.createCoreData=function(t,e,n){var o=t.state,a=!(0,r.isNum)(o.lastX),s=i(t);return a?{node:s,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:s,deltaX:e-o.lastX,deltaY:n-o.lastY,lastX:o.lastX,lastY:o.lastY,x:e,y:n}},e.createDraggableData=function(t,e){var n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}},e.getBoundPosition=function(t,e,n){if(!t.props.bounds)return[e,n];var a=t.props.bounds;a="string"==typeof a?a:function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}(a);var s=i(t);if("string"==typeof a){var u,l=s.ownerDocument,c=l.defaultView;if(!((u="parent"===a?s.parentNode:l.querySelector(a))instanceof c.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');var f=u,p=c.getComputedStyle(s),d=c.getComputedStyle(f);a={left:-s.offsetLeft+(0,r.int)(d.paddingLeft)+(0,r.int)(p.marginLeft),top:-s.offsetTop+(0,r.int)(d.paddingTop)+(0,r.int)(p.marginTop),right:(0,o.innerWidth)(f)-(0,o.outerWidth)(s)-s.offsetLeft+(0,r.int)(d.paddingRight)-(0,r.int)(p.marginRight),bottom:(0,o.innerHeight)(f)-(0,o.outerHeight)(s)-s.offsetTop+(0,r.int)(d.paddingBottom)-(0,r.int)(p.marginBottom)}}return(0,r.isNum)(a.right)&&(e=Math.min(e,a.right)),(0,r.isNum)(a.bottom)&&(n=Math.min(n,a.bottom)),(0,r.isNum)(a.left)&&(e=Math.max(e,a.left)),(0,r.isNum)(a.top)&&(n=Math.max(n,a.top)),[e,n]},e.getControlPosition=function(t,e,n){var r="number"==typeof e?(0,o.getTouch)(t,e):null;if("number"==typeof e&&!r)return null;var a=i(n),s=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,o.offsetXYFromParent)(r||t,s,n.props.scale)},e.snapToGrid=function(t,e,n){return[Math.round(e/t[0])*t[0],Math.round(n/t[1])*t[1]]};var r=n(280),o=n(825);function i(t){var e=t.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}},280:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dontSetMe=function(t,e,n){if(t[e])return new Error("Invalid prop ".concat(e," passed to ").concat(n," - do not set this, set it on the child."))},e.findInArray=function(t,e){for(var n=0,r=t.length;n<r;n++)if(e.apply(e,[t[n],n,t]))return t[n]},e.int=function(t){return parseInt(t,10)},e.isFunction=function(t){return"function"==typeof t||"[object Function]"===Object.prototype.toString.call(t)},e.isNum=function(t){return"number"==typeof t&&!isNaN(t)}},946:function(t,e,n){"use strict";function r(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(o&&(o+=" "),o+=n);else for(e in t)t[e]&&(o&&(o+=" "),o+=e);return o}function o(){for(var t,e,n=0,o="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(o&&(o+=" "),o+=e);return o}n.r(e),n.d(e,{clsx:function(){return o}}),e.default=o},827:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=u(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if("default"!==i&&Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}(n(359)),o=n(193),i=n(69),a=n(448),s=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(u=function(t){return t?n:e})(t)}function l(){return l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l.apply(this,arguments)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var h=function(t){var e,n;function a(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).handleRefs={},e.lastHandleRect=null,e.slack=null,e}n=t,(e=a).prototype=Object.create(n.prototype),e.prototype.constructor=e,d(e,n);var u=a.prototype;return u.componentWillUnmount=function(){this.resetData()},u.resetData=function(){this.lastHandleRect=this.slack=null},u.runConstraints=function(t,e){var n=this.props,r=n.minConstraints,o=n.maxConstraints,i=n.lockAspectRatio;if(!r&&!o&&!i)return[t,e];if(i){var a=this.props.width/this.props.height,s=t-this.props.width,u=e-this.props.height;Math.abs(s)>Math.abs(u*a)?e=t/a:t=e*a}var l=t,c=e,f=this.slack||[0,0],p=f[0],d=f[1];return t+=p,e+=d,r&&(t=Math.max(r[0],t),e=Math.max(r[1],e)),o&&(t=Math.min(o[0],t),e=Math.min(o[1],e)),this.slack=[p+(l-t),d+(c-e)],[t,e]},u.resizeHandler=function(t,e){var n=this;return function(r,o){var i=o.node,a=o.deltaX,s=o.deltaY;"onResizeStart"===t&&n.resetData();var u=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==e&&"s"!==e,l=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==e&&"w"!==e;if(u||l){var c=e[0],f=e[e.length-1],p=i.getBoundingClientRect();null!=n.lastHandleRect&&("w"===f&&(a+=p.left-n.lastHandleRect.left),"n"===c&&(s+=p.top-n.lastHandleRect.top)),n.lastHandleRect=p,"w"===f&&(a=-a),"n"===c&&(s=-s);var d=n.props.width+(u?a/n.props.transformScale:0),h=n.props.height+(l?s/n.props.transformScale:0),g=n.runConstraints(d,h);d=g[0],h=g[1];var y=d!==n.props.width||h!==n.props.height,m="function"==typeof n.props[t]?n.props[t]:null;m&&!("onResize"===t&&!y)&&(null==r.persist||r.persist(),m(r,{node:i,size:{width:d,height:h},handle:e})),"onResizeStop"===t&&n.resetData()}}},u.renderResizeHandle=function(t,e){var n=this.props.handle;if(!n)return r.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:e});if("function"==typeof n)return n(t,e);var o=f({ref:e},"string"==typeof n.type?{}:{handleAxis:t});return r.cloneElement(n,o)},u.render=function(){var t=this,e=this.props,n=e.children,a=e.className,u=e.draggableOpts,c=(e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart,e.resizeHandles),p=(e.transformScale,function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(e,s));return(0,i.cloneElement)(n,f(f({},p),{},{className:(a?a+" ":"")+"react-resizable",children:[].concat(n.props.children,c.map((function(e){var n,i=null!=(n=t.handleRefs[e])?n:t.handleRefs[e]=r.createRef();return r.createElement(o.DraggableCore,l({},u,{nodeRef:i,key:"resizableHandle-"+e,onStop:t.resizeHandler("onResizeStop",e),onStart:t.resizeHandler("onResizeStart",e),onDrag:t.resizeHandler("onResize",e)}),t.renderResizeHandle(e,i))})))}))},a}(r.Component);e.default=h,h.propTypes=a.resizableProps,h.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}},735:function(t,e,n){"use strict";e.default=void 0;var r=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=l(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if("default"!==i&&Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}(n(359)),o=u(n(697)),i=u(n(827)),a=n(448),s=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function u(t){return t&&t.__esModule?t:{default:t}}function l(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(l=function(t){return t?n:e})(t)}function c(){return c=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c.apply(this,arguments)}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var g=function(t){var e,n;function o(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).state={width:e.props.width,height:e.props.height,propsWidth:e.props.width,propsHeight:e.props.height},e.onResize=function(t,n){var r=n.size;e.props.onResize?(null==t.persist||t.persist(),e.setState(r,(function(){return e.props.onResize&&e.props.onResize(t,n)}))):e.setState(r)},e}return n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,h(e,n),o.getDerivedStateFromProps=function(t,e){return e.propsWidth!==t.width||e.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null},o.prototype.render=function(){var t=this.props,e=t.handle,n=t.handleSize,o=(t.onResize,t.onResizeStart),a=t.onResizeStop,u=t.draggableOpts,l=t.minConstraints,f=t.maxConstraints,d=t.lockAspectRatio,h=t.axis,g=(t.width,t.height,t.resizeHandles),y=t.style,m=t.transformScale,b=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,s);return r.createElement(i.default,{axis:h,draggableOpts:u,handle:e,handleSize:n,height:this.state.height,lockAspectRatio:d,maxConstraints:f,minConstraints:l,onResizeStart:o,onResize:this.onResize,onResizeStop:a,resizeHandles:g,transformScale:m,width:this.state.width},r.createElement("div",c({},b,{style:p(p({},y),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},o}(r.Component);e.default=g,g.propTypes=p(p({},a.resizableProps),{},{children:o.default.element})},448:function(t,e,n){"use strict";e.__esModule=!0,e.resizableProps=void 0;var r,o=(r=n(697))&&r.__esModule?r:{default:r};n(193);var i={axis:o.default.oneOf(["both","x","y","none"]),className:o.default.string,children:o.default.element.isRequired,draggableOpts:o.default.shape({allowAnyClick:o.default.bool,cancel:o.default.string,children:o.default.node,disabled:o.default.bool,enableUserSelectHack:o.default.bool,offsetParent:o.default.node,grid:o.default.arrayOf(o.default.number),handle:o.default.string,nodeRef:o.default.object,onStart:o.default.func,onDrag:o.default.func,onStop:o.default.func,onMouseDown:o.default.func,scale:o.default.number}),height:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e[0];return"both"===i.axis||"y"===i.axis?(r=o.default.number).isRequired.apply(r,e):o.default.number.apply(o.default,e)},handle:o.default.oneOfType([o.default.node,o.default.func]),handleSize:o.default.arrayOf(o.default.number),lockAspectRatio:o.default.bool,maxConstraints:o.default.arrayOf(o.default.number),minConstraints:o.default.arrayOf(o.default.number),onResizeStop:o.default.func,onResizeStart:o.default.func,onResize:o.default.func,resizeHandles:o.default.arrayOf(o.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:o.default.number,width:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e[0];return"both"===i.axis||"x"===i.axis?(r=o.default.number).isRequired.apply(r,e):o.default.number.apply(o.default,e)}};e.resizableProps=i},69:function(t,e,n){"use strict";e.__esModule=!0,e.cloneElement=function(t,e){return e.style&&t.props.style&&(e.style=a(a({},t.props.style),e.style)),e.className&&t.props.className&&(e.className=t.props.className+" "+e.className),o.default.cloneElement(t,e)};var r,o=(r=n(359))&&r.__esModule?r:{default:r};function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},706:function(t,e,n){"use strict";t.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},t.exports.Resizable=n(827).default,t.exports.ResizableBox=n(735).default},359:function(e){"use strict";e.exports=t},318:function(t){"use strict";t.exports=e},512:function(t,e,n){"use strict";function r(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(o&&(o+=" "),o+=n);else for(e in t)t[e]&&(o&&(o+=" "),o+=e);return o}e.Z=function(){for(var t,e,n=0,o="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(o&&(o+=" "),o+=e);return o}},690:function(t,e,n){"use strict";n.d(e,{vZ:function(){return j}});var r=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty;function a(t,e){return function(n,r,o){return t(n,r,o)&&e(n,r,o)}}function s(t){return function(e,n,r){if(!e||!n||"object"!=typeof e||"object"!=typeof n)return t(e,n,r);var o=r.cache,i=o.get(e),a=o.get(n);if(i&&a)return i===n&&a===e;o.set(e,n),o.set(n,e);var s=t(e,n,r);return o.delete(e),o.delete(n),s}}function u(t){return r(t).concat(o(t))}var l=Object.hasOwn||function(t,e){return i.call(t,e)};function c(t,e){return t||e?t===e:t===e||t!=t&&e!=e}var f="_owner",p=Object.getOwnPropertyDescriptor,d=Object.keys;function h(t,e,n){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function g(t,e){return c(t.getTime(),e.getTime())}function y(t,e,n){if(t.size!==e.size)return!1;for(var r,o,i={},a=t.entries(),s=0;(r=a.next())&&!r.done;){for(var u=e.entries(),l=!1,c=0;(o=u.next())&&!o.done;){var f=r.value,p=f[0],d=f[1],h=o.value,g=h[0],y=h[1];l||i[c]||!(l=n.equals(p,g,s,c,t,e,n)&&n.equals(d,y,p,g,t,e,n))||(i[c]=!0),c++}if(!l)return!1;s++}return!0}function m(t,e,n){var r,o=d(t),i=o.length;if(d(e).length!==i)return!1;for(;i-- >0;){if((r=o[i])===f&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof)return!1;if(!l(e,r)||!n.equals(t[r],e[r],r,r,t,e,n))return!1}return!0}function b(t,e,n){var r,o,i,a=u(t),s=a.length;if(u(e).length!==s)return!1;for(;s-- >0;){if((r=a[s])===f&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof)return!1;if(!l(e,r))return!1;if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;if(o=p(t,r),i=p(e,r),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable))return!1}return!0}function v(t,e){return c(t.valueOf(),e.valueOf())}function w(t,e){return t.source===e.source&&t.flags===e.flags}function O(t,e,n){if(t.size!==e.size)return!1;for(var r,o,i={},a=t.values();(r=a.next())&&!r.done;){for(var s=e.values(),u=!1,l=0;(o=s.next())&&!o.done;)u||i[l]||!(u=n.equals(r.value,o.value,r.value,o.value,t,e,n))||(i[l]=!0),l++;if(!u)return!1}return!0}function S(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}var x=Array.isArray,D="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,P=Object.assign,R=Object.prototype.toString.call.bind(Object.prototype.toString),j=E();function E(t){void 0===t&&(t={});var e,n=t.circular,r=void 0!==n&&n,o=t.createInternalComparator,i=t.createState,u=t.strict,l=void 0!==u&&u,c=function(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,o={areArraysEqual:r?b:h,areDatesEqual:g,areMapsEqual:r?a(y,b):y,areObjectsEqual:r?b:m,arePrimitiveWrappersEqual:v,areRegExpsEqual:w,areSetsEqual:r?a(O,b):O,areTypedArraysEqual:r?b:S};if(n&&(o=P({},o,n(o))),e){var i=s(o.areArraysEqual),u=s(o.areMapsEqual),l=s(o.areObjectsEqual),c=s(o.areSetsEqual);o=P({},o,{areArraysEqual:i,areMapsEqual:u,areObjectsEqual:l,areSetsEqual:c})}return o}(t),f=function(t){var e=t.areArraysEqual,n=t.areDatesEqual,r=t.areMapsEqual,o=t.areObjectsEqual,i=t.arePrimitiveWrappersEqual,a=t.areRegExpsEqual,s=t.areSetsEqual,u=t.areTypedArraysEqual;return function(t,l,c){if(t===l)return!0;if(null==t||null==l||"object"!=typeof t||"object"!=typeof l)return t!=t&&l!=l;var f=t.constructor;if(f!==l.constructor)return!1;if(f===Object)return o(t,l,c);if(x(t))return e(t,l,c);if(null!=D&&D(t))return u(t,l,c);if(f===Date)return n(t,l,c);if(f===RegExp)return a(t,l,c);if(f===Map)return r(t,l,c);if(f===Set)return s(t,l,c);var p=R(t);return"[object Date]"===p?n(t,l,c):"[object RegExp]"===p?a(t,l,c):"[object Map]"===p?r(t,l,c):"[object Set]"===p?s(t,l,c):"[object Object]"===p?"function"!=typeof t.then&&"function"!=typeof l.then&&o(t,l,c):"[object Arguments]"===p?o(t,l,c):("[object Boolean]"===p||"[object Number]"===p||"[object String]"===p)&&i(t,l,c)}}(c);return function(t){var e=t.circular,n=t.comparator,r=t.createState,o=t.equals,i=t.strict;if(r)return function(t,a){var s=r(),u=s.cache,l=void 0===u?e?new WeakMap:void 0:u,c=s.meta;return n(t,a,{cache:l,equals:o,meta:c,strict:i})};if(e)return function(t,e){return n(t,e,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(t,e){return n(t,e,a)}}({circular:r,comparator:f,createState:i,equals:o?o(f):(e=f,function(t,n,r,o,i,a,s){return e(t,n,s)}),strict:l})}E({strict:!0}),E({circular:!0}),E({circular:!0,strict:!0}),E({createInternalComparator:function(){return c}}),E({strict:!0,createInternalComparator:function(){return c}}),E({circular:!0,createInternalComparator:function(){return c}}),E({circular:!0,createInternalComparator:function(){return c},strict:!0})}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return n[t](i,i.exports,o),i.exports}return o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(325)}()}));
//# sourceMappingURL=react-grid-layout.min.js.map