feffery_utils_components 0.2.0-rc8 → 0.2.0-rc9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESCRIPTION +1 -1
- package/Project.toml +1 -1
- package/README.md +1 -1
- package/build/lib/feffery_utils_components/FefferyExecuteJs.py +21 -5
- package/build/lib/feffery_utils_components/FefferyRND.py +12 -3
- package/build/lib/feffery_utils_components/async-feffery_rnd.js +1 -1
- package/build/lib/feffery_utils_components/feffery_utils_components.min.js +2 -2
- package/build/lib/feffery_utils_components/metadata.json +83 -1
- package/build/lib/feffery_utils_components/package-info.json +1 -1
- package/feffery_utils_components/FefferyExecuteJs.py +21 -5
- package/feffery_utils_components/FefferyRND.py +12 -3
- package/feffery_utils_components/async-feffery_rnd.js +1 -1
- package/feffery_utils_components/async-feffery_rnd.js.LICENSE.txt +8 -0
- package/feffery_utils_components/feffery_utils_components.min.js +2 -2
- package/feffery_utils_components/metadata.json +83 -1
- package/feffery_utils_components/package-info.json +1 -1
- package/package.json +1 -1
- package/src/lib/components/FefferyExecuteJs.react.js +111 -10
- package/src/lib/components/draggable/FefferyRND.react.js +18 -1
- package/src/lib/fragments/draggable/FefferyRND.react.js +24 -4
- package/usage.py +46 -16
package/DESCRIPTION
CHANGED
package/Project.toml
CHANGED
package/README.md
CHANGED
|
@@ -5,13 +5,19 @@ from dash.development.base_component import Component, _explicitize_args
|
|
|
5
5
|
|
|
6
6
|
class FefferyExecuteJs(Component):
|
|
7
7
|
"""A FefferyExecuteJs component.
|
|
8
|
-
|
|
8
|
+
js直接执行组件FefferyExecuteJs
|
|
9
9
|
|
|
10
10
|
Keyword arguments:
|
|
11
11
|
|
|
12
12
|
- id (string; optional):
|
|
13
13
|
组件id.
|
|
14
14
|
|
|
15
|
+
- delay (number; optional):
|
|
16
|
+
delay模式下,设置延时执行时长,单位:毫秒.
|
|
17
|
+
|
|
18
|
+
- interval (number; optional):
|
|
19
|
+
interval模式下,设置轮询执行间隔时长,单位:毫秒.
|
|
20
|
+
|
|
15
21
|
- jsString (string; optional):
|
|
16
22
|
设置要执行的js代码字符串.
|
|
17
23
|
|
|
@@ -26,16 +32,26 @@ Keyword arguments:
|
|
|
26
32
|
Determines if the component is loading or not.
|
|
27
33
|
|
|
28
34
|
- prop_name (string; optional):
|
|
29
|
-
Holds which property is loading.
|
|
35
|
+
Holds which property is loading.
|
|
36
|
+
|
|
37
|
+
- mode (a value equal to: 'default', 'delay', 'interval', 'wait-until-element-rendered'; default 'default'):
|
|
38
|
+
设置执行模式,可选的有'default'(立即执行)、'delay'(延迟执行)、'interval'(定时轮询执行)、'wait-until-element-rendered'(等待目标元素渲染后执行)
|
|
39
|
+
默认:'default'.
|
|
40
|
+
|
|
41
|
+
- targetSelector (string; optional):
|
|
42
|
+
wait-until-element-rendered模式下,设置需要等待渲染完成的目标元素css选择器.
|
|
43
|
+
|
|
44
|
+
- targetWaitTimeout (number; optional):
|
|
45
|
+
wait-until-element-rendered模式下,设置目标元素渲染检测最大等待时长,单位:毫秒,默认无限制."""
|
|
30
46
|
_children_props = []
|
|
31
47
|
_base_nodes = ['children']
|
|
32
48
|
_namespace = 'feffery_utils_components'
|
|
33
49
|
_type = 'FefferyExecuteJs'
|
|
34
50
|
@_explicitize_args
|
|
35
|
-
def __init__(self, id=Component.UNDEFINED, jsString=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
36
|
-
self._prop_names = ['id', 'jsString', 'loading_state']
|
|
51
|
+
def __init__(self, id=Component.UNDEFINED, jsString=Component.UNDEFINED, mode=Component.UNDEFINED, delay=Component.UNDEFINED, interval=Component.UNDEFINED, targetSelector=Component.UNDEFINED, targetWaitTimeout=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
52
|
+
self._prop_names = ['id', 'delay', 'interval', 'jsString', 'loading_state', 'mode', 'targetSelector', 'targetWaitTimeout']
|
|
37
53
|
self._valid_wildcard_attributes = []
|
|
38
|
-
self.available_properties = ['id', 'jsString', 'loading_state']
|
|
54
|
+
self.available_properties = ['id', 'delay', 'interval', 'jsString', 'loading_state', 'mode', 'targetSelector', 'targetWaitTimeout']
|
|
39
55
|
self.available_wildcard_properties = []
|
|
40
56
|
_explicit_args = kwargs.pop('_explicit_args')
|
|
41
57
|
_locals = locals()
|
|
@@ -103,6 +103,15 @@ Keyword arguments:
|
|
|
103
103
|
- resizeGrid (list of numbers; optional):
|
|
104
104
|
针对尺寸调整行为,设置水平和竖直方向上调整的像素步长,格式为:[水平像素步长, 竖直像素步长] 默认:[1, 1].
|
|
105
105
|
|
|
106
|
+
- selected (boolean; default False):
|
|
107
|
+
设置或监听当前组件是否处于选择状态 默认:False.
|
|
108
|
+
|
|
109
|
+
- selectedClassName (string; optional):
|
|
110
|
+
配置当前组件在选中状态下的css类名.
|
|
111
|
+
|
|
112
|
+
- selectedStyle (dict; optional):
|
|
113
|
+
设置当前组件在选中状态下的css样式.
|
|
114
|
+
|
|
106
115
|
- size (dict; optional):
|
|
107
116
|
设置或监听当前组件尺寸信息.
|
|
108
117
|
|
|
@@ -121,10 +130,10 @@ Keyword arguments:
|
|
|
121
130
|
_namespace = 'feffery_utils_components'
|
|
122
131
|
_type = 'FefferyRND'
|
|
123
132
|
@_explicitize_args
|
|
124
|
-
def __init__(self, children=None, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, defaultState=Component.UNDEFINED, size=Component.UNDEFINED, position=Component.UNDEFINED, minWidth=Component.UNDEFINED, minHeight=Component.UNDEFINED, maxWidth=Component.UNDEFINED, maxHeight=Component.UNDEFINED, resizeGrid=Component.UNDEFINED, dragGrid=Component.UNDEFINED, lockAspectRatio=Component.UNDEFINED, lockAspectRatioExtraWidth=Component.UNDEFINED, lockAspectRatioExtraHeight=Component.UNDEFINED, direction=Component.UNDEFINED, disableDragging=Component.UNDEFINED, dragAxis=Component.UNDEFINED, bounds=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
125
|
-
self._prop_names = ['children', 'id', 'bounds', 'className', 'defaultState', 'direction', 'disableDragging', 'dragAxis', 'dragGrid', 'key', 'loading_state', 'lockAspectRatio', 'lockAspectRatioExtraHeight', 'lockAspectRatioExtraWidth', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'position', 'resizeGrid', 'size', 'style']
|
|
133
|
+
def __init__(self, children=None, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, defaultState=Component.UNDEFINED, size=Component.UNDEFINED, position=Component.UNDEFINED, minWidth=Component.UNDEFINED, minHeight=Component.UNDEFINED, maxWidth=Component.UNDEFINED, maxHeight=Component.UNDEFINED, resizeGrid=Component.UNDEFINED, dragGrid=Component.UNDEFINED, lockAspectRatio=Component.UNDEFINED, lockAspectRatioExtraWidth=Component.UNDEFINED, lockAspectRatioExtraHeight=Component.UNDEFINED, direction=Component.UNDEFINED, disableDragging=Component.UNDEFINED, dragAxis=Component.UNDEFINED, bounds=Component.UNDEFINED, selected=Component.UNDEFINED, selectedStyle=Component.UNDEFINED, selectedClassName=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
134
|
+
self._prop_names = ['children', 'id', 'bounds', 'className', 'defaultState', 'direction', 'disableDragging', 'dragAxis', 'dragGrid', 'key', 'loading_state', 'lockAspectRatio', 'lockAspectRatioExtraHeight', 'lockAspectRatioExtraWidth', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'position', 'resizeGrid', 'selected', 'selectedClassName', 'selectedStyle', 'size', 'style']
|
|
126
135
|
self._valid_wildcard_attributes = []
|
|
127
|
-
self.available_properties = ['children', 'id', 'bounds', 'className', 'defaultState', 'direction', 'disableDragging', 'dragAxis', 'dragGrid', 'key', 'loading_state', 'lockAspectRatio', 'lockAspectRatioExtraHeight', 'lockAspectRatioExtraWidth', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'position', 'resizeGrid', 'size', 'style']
|
|
136
|
+
self.available_properties = ['children', 'id', 'bounds', 'className', 'defaultState', 'direction', 'disableDragging', 'dragAxis', 'dragGrid', 'key', 'loading_state', 'lockAspectRatio', 'lockAspectRatioExtraHeight', 'lockAspectRatioExtraWidth', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'position', 'resizeGrid', 'selected', 'selectedClassName', 'selectedStyle', 'size', 'style']
|
|
128
137
|
self.available_wildcard_properties = []
|
|
129
138
|
_explicit_args = kwargs.pop('_explicit_args')
|
|
130
139
|
_locals = locals()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[24],{533:function(k,t,e){"use strict";e.r(t);function d(t){return Boolean(t.touches&&t.touches.length)}function a(t,e,o,i){if(t&&"string"==typeof t){if(w(t,"px"))return Number(t.replace("px",""));if(w(t,"%"))return e*(Number(t.replace("%",""))/100);if(w(t,"vw"))return o*(Number(t.replace("vw",""))/100);if(w(t,"vh"))return i*(Number(t.replace("vh",""))/100)}return t}var i,n,o,r,P=e(1),s=e(865),s=e.n(s),l=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),p=function(){return(p=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},u={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},h=(o=P.PureComponent,l(E,o),E.prototype.render=function(){return P.createElement("div",{className:this.props.className||"",style:p(p({position:"absolute",userSelect:"none"},u[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},E),l=e(869),l=e.n(l),c=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),f=function(){return(f=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},g={width:"auto",height:"auto"},y=l()(function(t,e,o){return Math.max(Math.min(t,o),e)}),b=l()(function(t,e){return Math.round(t/e)*e}),m=l()(function(t,e){return new RegExp(t,"i").test(e)}),v=l()(function(i,n,t){void 0===t&&(t=0);var e=n.reduce(function(t,e,o){return Math.abs(e-i)<Math.abs(n[t]-i)?o:t},0),o=Math.abs(n[e]-i);return 0===t||o<t?n[e]:i}),w=l()(function(t,e){return t.substr(t.length-e.length,e.length)===e}),S=l()(function(t){return"auto"===(t=t.toString())||w(t,"px")||w(t,"%")||w(t,"vh")||w(t,"vw")||w(t,"vmax")||w(t,"vmin")?t:t+"px"}),x=l()(function(t,e,o,i,n,r,s){return i=a(i,t.width,e,o),n=a(n,t.height,e,o),r=a(r,t.width,e,o),s=a(s,t.height,e,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}),z=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],R=(i=P.PureComponent,c(O,i),Object.defineProperty(O.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||g},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"size",{get:function(){var t,e,o,i=0,n=0;return this.resizable&&this.window&&(t=this.resizable.offsetWidth,e=this.resizable.offsetHeight,"relative"!==(o=this.resizable.style.position)&&(this.resizable.style.position="relative"),i="auto"!==this.resizable.style.width?this.resizable.offsetWidth:t,n="auto"!==this.resizable.style.height?this.resizable.offsetHeight:e,this.resizable.style.position=o),{width:i,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"sizeStyle",{get:function(){function t(t){var e;return void 0===o.state[t]||"auto"===o.state[t]?"auto":o.propsSize&&o.propsSize[t]&&w(o.propsSize[t].toString(),"%")?w(o.state[t].toString(),"%")?o.state[t].toString():(e=o.getParentSize(),Number(o.state[t].toString().replace("px",""))/e[t]*100+"%"):S(o.state[t])}var o=this,e=this.props.size;return{width:e&&void 0!==e.width&&!this.state.isResizing?S(e.width):t("width"),height:e&&void 0!==e.height&&!this.state.isResizing?S(e.height):t("height")}},enumerable:!1,configurable:!0}),O.prototype.getParentSize=function(){var t,e,o,i;return this.parentNode?(t=this.appendBase())?(e=!1,"wrap"!==(o=this.parentNode.style.flexWrap)&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%",i={width:t.offsetWidth,height:t.offsetHeight},e&&(this.parentNode.style.flexWrap=o),this.removeBase(t),i):{width:0,height:0}:this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0}},O.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},O.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},O.prototype.componentDidMount=function(){var t;this.resizable&&this.window&&(t=this.window.getComputedStyle(this.resizable),this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0}))},O.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},O.prototype.createSizeForCssProperty=function(t,e){var o=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==o&&"auto"!==o?t:"auto"},O.prototype.calculateNewMaxFromBoundary=function(t,e){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&m("left",r),n=n&&m("top",r);return"parent"===this.props.bounds?(r=this.parentNode)&&(o=s?this.resizableRight-this.parentLeft:r.offsetWidth+(this.parentLeft-this.resizableLeft),i=n?this.resizableBottom-this.parentTop:r.offsetHeight+(this.parentTop-this.resizableTop)):"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=n?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=n?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop)),{maxWidth:t=o&&Number.isFinite(o)?t&&t<o?t:o:t,maxHeight:e=i&&Number.isFinite(i)?e&&e<i?e:i:e}},O.prototype.calculateNewSizeFromDirection=function(t,e){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,n=n.original,s=this.props,a=s.lockAspectRatio,l=s.lockAspectRatioExtraHeight,s=s.lockAspectRatioExtraWidth,p=n.width,u=n.height,l=l||0,s=s||0;return m("right",r)&&(p=n.width+(t-n.x)*i/o,a)&&(u=(p-s)/this.ratio+l),m("left",r)&&(p=n.width-(t-n.x)*i/o,a)&&(u=(p-s)/this.ratio+l),m("bottom",r)&&(u=n.height+(e-n.y)*i/o,a)&&(p=(u-l)*this.ratio+s),{newWidth:p=m("top",r)&&(u=n.height-(e-n.y)*i/o,a)?(u-l)*this.ratio+s:p,newHeight:u}},O.prototype.calculateNewSizeFromAspectRatio=function(t,e,o,i){var n,r,s=this.props,a=s.lockAspectRatio,l=s.lockAspectRatioExtraHeight,s=s.lockAspectRatioExtraWidth,p=void 0===i.width?10:i.width,u=void 0===o.width||o.width<0?t:o.width,i=void 0===i.height?10:i.height,o=void 0===o.height||o.height<0?e:o.height,l=l||0,s=s||0;return e=a?(a=(i-l)*this.ratio+s,n=(o-l)*this.ratio+s,r=(p-s)/this.ratio+l,s=(u-s)/this.ratio+l,l=Math.max(p,a),a=Math.min(u,n),n=Math.max(i,r),r=Math.min(o,s),t=y(t,l,a),y(e,n,r)):(t=y(t,p,u),y(e,i,o)),{newWidth:t,newHeight:e}},O.prototype.setBoundingClientRect=function(){var t,e,o,i;"parent"===this.props.bounds&&(i=this.parentNode)&&(i=i.getBoundingClientRect(),this.parentLeft=i.left,this.parentTop=i.top),this.props.bounds&&"string"!=typeof this.props.bounds&&(i=this.props.bounds.getBoundingClientRect(),this.targetLeft=i.left,this.targetTop=i.top),this.resizable&&(t=(i=this.resizable.getBoundingClientRect()).left,e=i.top,o=i.right,i=i.bottom,this.resizableLeft=t,this.resizableRight=o,this.resizableTop=e,this.resizableBottom=i)},O.prototype.onResizeStart=function(t,e){var o,i,n,r,s;this.resizable&&this.window&&(n=i=0,t.nativeEvent&&(s=t.nativeEvent,Boolean((s.clientX||0===s.clientX)&&(s.clientY||0===s.clientY)))?(i=t.nativeEvent.clientX,n=t.nativeEvent.clientY):t.nativeEvent&&d(t.nativeEvent)&&(i=t.nativeEvent.touches[0].clientX,n=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(t,e,this.resizable)||(this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width)&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width}),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height,"auto"!==(s=this.window.getComputedStyle(this.resizable)).flexBasis&&(r=this.parentNode)&&(r=this.window.getComputedStyle(r).flexDirection,this.flexDir=r.startsWith("row")?"row":"column",o=s.flexBasis),this.setBoundingClientRect(),this.bindEvents(),r={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:f(f({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:o},this.setState(r)))},O.prototype.onMouseMove=function(t){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&d(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var e=this.props,o=e.maxWidth,i=e.maxHeight,n=e.minWidth,e=e.minHeight,r=(d(t)?t.touches[0]:t).clientX,s=(d(t)?t.touches[0]:t).clientY,a=this.state,l=a.direction,p=a.original,u=a.width,a=a.height,h=this.getParentSize(),c=x(h,this.window.innerWidth,this.window.innerHeight,o,i,n,e),o=c.maxWidth,i=c.maxHeight,n=c.minWidth,e=c.minHeight,c=this.calculateNewSizeFromDirection(r,s),r=c.newHeight,s=c.newWidth,c=this.calculateNewMaxFromBoundary(o,i),o=(this.props.snap&&this.props.snap.x&&(s=v(s,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(r=v(r,this.props.snap.y,this.props.snapGap)),this.calculateNewSizeFromAspectRatio(s,r,{width:c.maxWidth,height:c.maxHeight},{width:n,height:e})),e=(s=o.newWidth,r=o.newHeight,this.props.grid&&(i=b(s,this.props.grid[0]),c=b(r,this.props.grid[1]),s=0===(n=this.props.snapGap||0)||Math.abs(i-s)<=n?i:s,r=0===n||Math.abs(c-r)<=n?c:r),{width:s-p.width,height:r-p.height}),o=(u&&"string"==typeof u&&(w(u,"%")?s=s/h.width*100+"%":w(u,"vw")?s=s/this.window.innerWidth*100+"vw":w(u,"vh")&&(s=s/this.window.innerHeight*100+"vh")),a&&"string"==typeof a&&(w(a,"%")?r=r/h.height*100+"%":w(a,"vw")?r=r/this.window.innerWidth*100+"vw":w(a,"vh")&&(r=r/this.window.innerHeight*100+"vh")),{width:this.createSizeForCssProperty(s,"width"),height:this.createSizeForCssProperty(r,"height")});"row"===this.flexDir?o.flexBasis=o.width:"column"===this.flexDir&&(o.flexBasis=o.height),this.setState(o),this.props.onResize&&this.props.onResize(t,l,this.resizable,e)}},O.prototype.onMouseUp=function(t){var e=this.state,o=e.isResizing,i=e.direction,e=e.original;o&&this.resizable&&(o={width:this.size.width-e.width,height:this.size.height-e.height},this.props.onResizeStop&&this.props.onResizeStop(t,i,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:f(f({},this.state.backgroundStyle),{cursor:"auto"})}))},O.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},O.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,r=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;return o?(t=Object.keys(o).map(function(t){return!1!==o[t]?P.createElement(h,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}),P.createElement("div",{className:s,style:r},t)):null},O.prototype.render=function(){var o=this,t=Object.keys(this.props).reduce(function(t,e){return-1===z.indexOf(e)&&(t[e]=o.props[e]),t},{}),e=f(f(f({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0}),i=(this.state.flexBasis&&(e.flexBasis=this.state.flexBasis),this.props.as||"div");return P.createElement(i,f({ref:this.ref,style:e,className:this.props.className},t),this.state.isResizing&&P.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},O.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},O),D=function(t,e){return(D=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])}))(t,e)};function O(t){var o=i.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){var t,e;return o.resizable&&o.window&&(t=o.parentNode)?((e=o.window.document.createElement("div")).style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add("__resizable_base__"):e.className+="__resizable_base__",t.appendChild(e),e):null},o.removeBase=function(t){var e=o.parentNode;e&&e.removeChild(t)},o.ref=function(t){t&&(o.resizable=t)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}function E(){var e=null!==o&&o.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}var M,j,N=function(){return(N=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},A=s.a,_={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},L=(M=P.PureComponent,D(j=W,l=M),j.prototype=null===l?Object.create(l):(C.prototype=l.prototype,new C),W.prototype.componentDidMount=function(){this.updateOffsetFromParent();var t=this.offsetFromParent,e=t.left,t=t.top,o=this.getDraggablePosition(),i=o.x,o=o.y;this.draggable.setState({x:i-e,y:o-t}),this.forceUpdate()},W.prototype.getDraggablePosition=function(){var t=this.draggable.state;return{x:t.x,y:t.y}},W.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},W.prototype.getParentSize=function(){return this.resizable.getParentSize()},W.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},W.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},W.prototype.getOffsetHeight=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/e;case"body":return document.body.offsetHeight/e;default:return t.offsetHeight}},W.prototype.getOffsetWidth=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/e;case"body":return document.body.offsetWidth/e;default:return t.offsetWidth}},W.prototype.onDragStart=function(t,e){this.props.onDragStart&&this.props.onDragStart(t,e);t=this.getDraggablePosition();if(this.originalPosition=t,this.props.bounds){var o,i,n,r,s,e=this.getParent(),t=this.props.scale;if("parent"===this.props.bounds)o=e;else{if("body"===this.props.bounds)return n=(r=e.getBoundingClientRect()).left,r=r.top,s=document.body.getBoundingClientRect(),n=-(n-e.offsetLeft*t-s.left)/t,r=-(r-e.offsetTop*t-s.top)/t,s=(document.body.offsetWidth-this.resizable.size.width*t)/t+n,i=(document.body.offsetHeight-this.resizable.size.height*t)/t+r,this.setState({bounds:{top:r,right:s,bottom:i,left:n}});if("window"===this.props.bounds)return this.resizable?(n=(r=e.getBoundingClientRect()).left,r=r.top,n=-(n-e.offsetLeft*t)/t,r=-(r-e.offsetTop*t)/t,s=(window.innerWidth-this.resizable.size.width*t)/t+n,i=(window.innerHeight-this.resizable.size.height*t)/t+r,this.setState({bounds:{top:r,right:s,bottom:i,left:n}})):void 0;"string"==typeof this.props.bounds?o=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(o=this.props.bounds)}o instanceof HTMLElement&&e instanceof HTMLElement&&(s=(r=o.getBoundingClientRect()).left,i=r.top,r=(s-(n=e.getBoundingClientRect()).left)/t,s=i-n.top,this.resizable)&&(this.updateOffsetFromParent(),e=this.offsetFromParent,this.setState({bounds:{top:s-e.top,right:r+(o.offsetWidth-this.resizable.size.width)-e.left/t,bottom:s+(o.offsetHeight-this.resizable.size.height)-e.top,left:r-e.left/t}}))}},W.prototype.onDrag=function(t,e){var o,i;if(this.props.onDrag)return o=(i=this.offsetFromParent).left,i=i.top,this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(t,N(N({},e),{x:e.x+o,y:this.originalPosition.y+i,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(t,N(N({},e),{x:this.originalPosition.x+o,y:e.y+i,deltaX:0})):void 0:this.props.onDrag(t,N(N({},e),{x:e.x-o,y:e.y-i}))},W.prototype.onDragStop=function(t,e){var o,i;if(this.props.onDragStop)return o=(i=this.offsetFromParent).left,i=i.top,this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(t,N(N({},e),{x:e.x+o,y:this.originalPosition.y+i,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(t,N(N({},e),{x:this.originalPosition.x+o,y:e.y+i,deltaX:0})):void 0:this.props.onDragStop(t,N(N({},e),{x:e.x+o,y:e.y+i}))},W.prototype.onResizeStart=function(t,e,o){t.stopPropagation(),this.setState({resizing:!0});var i,n,r,s,a,l,p,u,h,c,d,f=this.props.scale,g=this.offsetFromParent,y=this.getDraggablePosition();this.resizingPosition={x:y.x+g.left,y:y.y+g.top},this.originalPosition=y,this.props.bounds?(g=this.getParent(),y=void 0,"parent"===this.props.bounds?y=g:"body"===this.props.bounds?y=document.body:"window"===this.props.bounds?y=window:"string"==typeof this.props.bounds?y=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(y=this.props.bounds),(r=this.getSelfElement())instanceof Element&&(y instanceof HTMLElement||y===window)&&g instanceof HTMLElement&&(i=(g=this.getMaxSizesFromProps()).maxWidth,g=g.maxHeight,a=this.getParentSize(),i&&"string"==typeof i&&(i.endsWith("%")?(n=Number(i.replace("%",""))/100,i=a.width*n):i.endsWith("px")&&(i=Number(i.replace("px","")))),g&&"string"==typeof g&&(g.endsWith("%")?(n=Number(g.replace("%",""))/100,g=a.width*n):g.endsWith("px")&&(g=Number(g.replace("px","")))),n=(a=r.getBoundingClientRect()).left,r=a.top,s=(a="window"===this.props.bounds?{left:0,top:0}:y.getBoundingClientRect()).left,a=a.top,l=this.getOffsetWidth(y),y=this.getOffsetHeight(y),p=e.toLowerCase().endsWith("left"),u=e.toLowerCase().endsWith("right"),h=e.startsWith("top"),c=e.startsWith("bottom"),(p||h)&&this.resizable&&(d=(n-s)/f+this.resizable.size.width,this.setState({maxWidth:d>Number(i)?i:d})),(u||this.props.lockAspectRatio&&!p&&!h)&&this.setState({maxWidth:(d=l+(s-n)/f)>Number(i)?i:d}),(h||p)&&this.resizable&&(d=(r-a)/f+this.resizable.size.height,this.setState({maxHeight:d>Number(g)?g:d})),c||this.props.lockAspectRatio&&!h&&!p)&&this.setState({maxHeight:(d=y+(a-r)/f)>Number(g)?g:d})):this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight}),this.props.onResizeStart&&this.props.onResizeStart(t,e,o)},W.prototype.onResize=function(t,e,o,i){var n={x:this.originalPosition.x,y:this.originalPosition.y},r=-i.width,s=-i.height,r=(-1!==["top","left","topLeft","bottomLeft","topRight"].indexOf(e)&&("bottomLeft"===e?n.x+=r:("topRight"!==e&&(n.x+=r),n.y+=s)),n.x===this.draggable.state.x&&n.y===this.draggable.state.y||this.draggable.setState(n),this.updateOffsetFromParent(),this.offsetFromParent),s=this.getDraggablePosition().x+r.left,n=this.getDraggablePosition().y+r.top;this.resizingPosition={x:s,y:n},this.props.onResize&&this.props.onResize(t,e,o,i,{x:s,y:n})},W.prototype.onResizeStop=function(t,e,o,i){this.setState({resizing:!1});var n=this.getMaxSizesFromProps(),r=n.maxWidth,n=n.maxHeight;this.setState({maxWidth:r,maxHeight:n}),this.props.onResizeStop&&this.props.onResizeStop(t,e,o,i,this.resizingPosition)},W.prototype.updateSize=function(t){this.resizable&&this.resizable.updateSize({width:t.width,height:t.height})},W.prototype.updatePosition=function(t){this.draggable.setState(t)},W.prototype.updateOffsetFromParent=function(){var t=this.props.scale,e=this.getParent(),o=this.getSelfElement();if(!e||null===o)return{top:0,left:0};var i=e.getBoundingClientRect(),n=i.left,i=i.top,o=o.getBoundingClientRect(),r=this.getDraggablePosition(),s=e.scrollLeft,e=e.scrollTop;this.offsetFromParent={left:o.left-n+s-r.x*t,top:o.top-i+e-r.y*t}},W.prototype.render=function(){var t=this.props,e=t.disableDragging,o=t.style,i=t.dragHandleClassName,n=t.position,r=t.onMouseDown,s=t.onMouseUp,a=t.dragAxis,l=t.dragGrid,p=t.bounds,u=t.enableUserSelectHack,h=t.cancel,c=t.children,d=(t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop,t.resizeHandleStyles),f=t.resizeHandleClasses,g=t.resizeHandleComponent,y=t.enableResizing,b=t.resizeGrid,m=t.resizeHandleWrapperClass,v=t.resizeHandleWrapperStyle,w=t.scale,S=t.allowAnyClick,t=function(t,e){var o={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(o[n[i]]=t[n[i]]);return o}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick"]),x=this.props.default?N({},this.props.default):void 0;delete t.default;var z,D=e||i?{cursor:"auto"}:{cursor:"move"},D=N(N(N({},_),D),o),o=this.offsetFromParent,O=o.left,o=o.top;n&&(z={x:n.x-O,y:n.y-o});O=this.state.resizing?void 0:z,n=this.state.resizing?"both":a;return Object(P.createElement)(A,{ref:this.refDraggable,handle:i?".".concat(i):void 0,defaultPosition:x,onMouseDown:r,onMouseUp:s,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:n,disabled:e,grid:l,bounds:p?this.state.bounds:void 0,position:O,enableUserSelectHack:u,cancel:h,scale:w,allowAnyClick:S,nodeRef:this.resizableElement},Object(P.createElement)(R,N({},t,{ref:this.refResizable,defaultSize:x,size:this.props.size,enable:"boolean"==typeof y?{bottom:y,bottomLeft:y,bottomRight:y,left:y,right:y,top:y,topLeft:y,topRight:y}:y,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:D,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:(this.state.resizing?this.state:this.props).maxWidth,maxHeight:(this.state.resizing?this.state:this.props).maxHeight,grid:b,handleWrapperClass:m,handleWrapperStyle:v,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:d,handleClasses:f,handleComponent:g,scale:this.props.scale}),c))},W.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},W),c=e(225),B=e(22);function W(t){var e=M.call(this,t)||this;return e.resizingPosition={x:0,y:0},e.offsetFromParent={left:0,top:0},e.resizableElement={current:null},e.originalPosition={x:0,y:0},e.refDraggable=function(t){t&&(e.draggable=t)},e.refResizable=function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},e.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},e.onResizeStart=e.onResizeStart.bind(e),e.onResize=e.onResize.bind(e),e.onResizeStop=e.onResizeStop.bind(e),e.onDragStart=e.onDragStart.bind(e),e.onDrag=e.onDrag.bind(e),e.onDragStop=e.onDragStop.bind(e),e.getMaxSizesFromProps=e.getMaxSizesFromProps.bind(e),e}function C(){this.constructor=j}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=new Array(e);o<e;o++)i[o]=t[o];return i}function T(t){var e=t.id,o=t.style,i=t.className,n=t.children,r=t.defaultState,s=t.size,a=t.position,l=t.minWidth,p=t.minHeight,u=t.maxWidth,h=t.maxHeight,c=t.resizeGrid,d=t.dragGrid,f=t.lockAspectRatio,g=t.lockAspectRatioExtraWidth,y=t.lockAspectRatioExtraHeight,b=t.direction,m=t.disableDragging,v=t.dragAxis,w=t.bounds,S=t.setProps,x=t.loading_state;Object(P.useEffect)(function(){!s&&r.width&&r.height&&S({size:{width:r.width,height:r.height}}),a||!r.x&&0!==r.x||!r.y&&0!==r.y||S({position:{x:r.x,y:r.y}})},[]);var z,D=Object(B.clone)({top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}),O=function(t,e){var o,i,n,r,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return n=!(i=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return i=t.done,t},e:function(t){n=!0,o=t},f:function(){try{i||null==s.return||s.return()}finally{if(n)throw o}}};if(Array.isArray(t)||(s=function(t){var e;if(t)return"string"==typeof t?H(t,void 0):"Map"===(e="Object"===(e=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:e)||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?H(t,void 0):void 0}(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),r=0,{s:e=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(b);try{for(O.s();!(z=O.n()).done;)D[z.value]=!0}catch(t){O.e(t)}finally{O.f()}return React.createElement(L,{id:e,style:o,className:i,default:r,size:s,position:a,minWidth:l,minHeight:p,maxWidth:u,maxHeight:h,resizeGrid:c,dragGrid:d,lockAspectRatio:f,lockAspectRatioExtraWidth:g,lockAspectRatioExtraHeight:y,enableResizing:D,disableDragging:m,dragAxis:v,bounds:w,onDragStop:function(t,e){return S({position:{x:e.x,y:e.y}})},onResizeStop:function(t,e,o,i,n){S({size:{width:o.style.width,height:o.style.height},position:{x:n.x,y:n.y}})},"data-dash-is-loading":x&&x.is_loading||void 0},n)}(t.default=T).defaultProps=c.b,T.propTypes=c.c},570:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dontSetMe=function(t,e,o){if(t[e])return new Error("Invalid prop ".concat(e," passed to ").concat(o," - do not set this, set it on the child."))},e.findInArray=function(t,e){for(var o=0,i=t.length;o<i;o++)if(e.apply(e,[t[o],o,t]))return t[o]},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)}},590:function(t,e,o){"use strict";function s(t){return(s="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})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.addClassName=d,e.addEvent=function(t,e,o,i){t&&(i=l({capture:!0},i),t.addEventListener?t.addEventListener(e,o,i):t.attachEvent?t.attachEvent("on"+e,o):t["on"+e]=o)},e.addUserSelectStyles=function(t){var e;t&&((e=t.getElementById("react-draggable-style-el"))||((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){t=c(t,e,"px");return p({},(0,n.browserPrefixToKey)("transform",n.default),t)},e.createSVGTransform=function(t,e){return c(t,e,"")},e.getTouch=function(t,e){return t.targetTouches&&(0,i.findInArray)(t.targetTouches,function(t){return e===t.identifier})||t.changedTouches&&(0,i.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=c,e.innerHeight=function(t){var e=t.clientHeight,t=t.ownerDocument.defaultView.getComputedStyle(t);return(e-=(0,i.int)(t.paddingTop))-(0,i.int)(t.paddingBottom)},e.innerWidth=function(t){var e=t.clientWidth,t=t.ownerDocument.defaultView.getComputedStyle(t);return(e-=(0,i.int)(t.paddingLeft))-(0,i.int)(t.paddingRight)},e.matchesSelector=h,e.matchesSelectorAndParentsTo=function(t,e,o){var i=t;do{if(h(i,e))return!0;if(i===o)return!1}while(i=i.parentNode);return!1},e.offsetXYFromParent=function(t,e,o){var i=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect();return{x:(t.clientX+e.scrollLeft-i.left)/o,y:(t.clientY+e.scrollTop-i.top)/o}},e.outerHeight=function(t){var e=t.clientHeight,t=t.ownerDocument.defaultView.getComputedStyle(t);return(e+=(0,i.int)(t.borderTopWidth))+(0,i.int)(t.borderBottomWidth)},e.outerWidth=function(t){var e=t.clientWidth,t=t.ownerDocument.defaultView.getComputedStyle(t);return(e+=(0,i.int)(t.borderLeftWidth))+(0,i.int)(t.borderRightWidth)},e.removeClassName=f,e.removeEvent=function(t,e,o,i){t&&(i=l({capture:!0},i),t.removeEventListener?t.removeEventListener(e,o,i):t.detachEvent?t.detachEvent("on"+e,o):t["on"+e]=null)},e.removeUserSelectStyles=function(t){if(t)try{var e;t.body&&f(t.body,"react-draggable-transparent-selection"),t.selection?t.selection.empty():(e=(t.defaultView||window).getSelection())&&"Caret"!==e.type&&e.removeAllRanges()}catch(t){}};var i=o(570),n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var e=a(void 0);if(e&&e.has(t))return e.get(t);var o,i,n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&((i=r?Object.getOwnPropertyDescriptor(t,o):null)&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]);return n.default=t,e&&e.set(t,n),n}(o(867));function a(t){var e,o;return"function"!=typeof WeakMap?null:(e=new WeakMap,o=new WeakMap,(a=function(t){return t?o:e})(t))}function r(e,t){var o,i=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,o)),i}function l(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(Object(o),!0).forEach(function(t){p(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function p(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var u="";function h(e,t){return u=u||(0,i.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,i.isFunction)(e[t])}),!!(0,i.isFunction)(e[u])&&e[u](t)}function c(t,e,o){var i=t.x,t=t.y,i="translate(".concat(i).concat(o,",").concat(t).concat(o,")");return e&&(t="".concat("string"==typeof e.x?e.x:e.x+o),e="".concat("string"==typeof e.y?e.y:e.y+o),i="translate(".concat(t,", ").concat(e,")")+i),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 f(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g"),"")}},644:function(t,e,o){"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,o){var i=t.state,n=!(0,a.isNum)(i.lastX),t=p(t);return n?{node:t,deltaX:0,deltaY:0,lastX:e,lastY:o,x:e,y:o}:{node:t,deltaX:e-i.lastX,deltaY:o-i.lastY,lastX:i.lastX,lastY:i.lastY,x:e,y:o}},e.createDraggableData=function(t,e){var o=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/o,y:t.state.y+e.deltaY/o,deltaX:e.deltaX/o,deltaY:e.deltaY/o,lastX:t.state.x,lastY:t.state.y}},e.getBoundPosition=function(t,e,o){if(t.props.bounds){s="string"==typeof(s=t.props.bounds)?s:{left:(i=s).left,top:i.top,right:i.right,bottom:i.bottom};var i=p(t);if("string"==typeof s){var t=i.ownerDocument,n=t.defaultView;if(!((t="parent"===s?i.parentNode:t.querySelector(s))instanceof n.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');var r=n.getComputedStyle(i),n=n.getComputedStyle(t),s={left:-i.offsetLeft+(0,a.int)(n.paddingLeft)+(0,a.int)(r.marginLeft),top:-i.offsetTop+(0,a.int)(n.paddingTop)+(0,a.int)(r.marginTop),right:(0,l.innerWidth)(t)-(0,l.outerWidth)(i)-i.offsetLeft+(0,a.int)(n.paddingRight)-(0,a.int)(r.marginRight),bottom:(0,l.innerHeight)(t)-(0,l.outerHeight)(i)-i.offsetTop+(0,a.int)(n.paddingBottom)-(0,a.int)(r.marginBottom)}}(0,a.isNum)(s.right)&&(e=Math.min(e,s.right)),(0,a.isNum)(s.bottom)&&(o=Math.min(o,s.bottom)),(0,a.isNum)(s.left)&&(e=Math.max(e,s.left)),(0,a.isNum)(s.top)&&(o=Math.max(o,s.top))}return[e,o]},e.getControlPosition=function(t,e,o){var i="number"==typeof e?(0,l.getTouch)(t,e):null;return"number"!=typeof e||i?(e=p(o),e=o.props.offsetParent||e.offsetParent||e.ownerDocument.body,(0,l.offsetXYFromParent)(i||t,e,o.props.scale)):null},e.snapToGrid=function(t,e,o){return[Math.round(e/t[0])*t[0],Math.round(o/t[1])*t[1]]};var a=o(570),l=o(590);function p(t){t=t.findDOMNode();if(t)return t;throw new Error("<DraggableCore>: Unmounted during event!")}},645:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){}},865:function(t,e,o){"use strict";var o=o(866),i=o.default,o=o.DraggableCore;t.exports=i,t.exports.default=i,t.exports.DraggableCore=o},866:function(t,e,o){"use strict";function s(t){return(s="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})(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return g.default}}),e.default=void 0;var h=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var e=p(void 0);if(e&&e.has(t))return e.get(t);var o,i,n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&((i=r?Object.getOwnPropertyDescriptor(t,o):null)&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]);return n.default=t,e&&e.set(t,n),n}(o(1)),i=a(o(0)),n=a(o(29)),c=a(o(43)),d=o(590),f=o(644),r=o(570),g=a(o(868)),l=a(o(645)),y=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function a(t){return t&&t.__esModule?t:{default:t}}function p(t){var e,o;return"function"!=typeof WeakMap?null:(e=new WeakMap,o=new WeakMap,(p=function(t){return t?o:e})(t))}function b(){return(b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o,i=arguments[e];for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t}).apply(this,arguments)}function u(e,t){var o,i=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,o)),i}function m(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach(function(t){O(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=new Array(e);o<e;o++)i[o]=t[o];return i}function w(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(o){var i=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}}();return function(){var t,e=D(o),e=(t=i?(t=D(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return z(e)}}function z(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function D(t){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e,o){e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}o=function(t){var e=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t);var o=x(i);function i(t){var a;if(this instanceof i)return O(z(a=o.call(this,t)),"onDragStart",function(t,e){if((0,l.default)("Draggable: onDragStart: %j",e),!1===a.props.onStart(t,(0,f.createDraggableData)(z(a),e)))return!1;a.setState({dragging:!0,dragged:!0})}),O(z(a),"onDrag",function(t,e){if(!a.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",e);var o,i,n,r,e=(0,f.createDraggableData)(z(a),e),s={x:e.x,y:e.y};if(a.props.bounds&&(o=s.x,i=s.y,s.x+=a.state.slackX,s.y+=a.state.slackY,n=(0,f.getBoundPosition)(z(a),s.x,s.y),r=2,r=(n=function(t){if(Array.isArray(t))return t}(n)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i,n,r=[],s=!0,a=!1;try{for(o=o.call(t);!(s=(i=o.next()).done)&&(r.push(i.value),!e||r.length!==e);s=!0);}catch(t){a=!0,n=t}finally{try{s||null==o.return||o.return()}finally{if(a)throw n}}return r}}(n,r)||function(t,e){var o;if(t)return"string"==typeof t?v(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?v(t,e):void 0}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],n=n[1],s.x=r,s.y=n,s.slackX=a.state.slackX+(o-s.x),s.slackY=a.state.slackY+(i-s.y),e.x=s.x,e.y=s.y,e.deltaX=s.x-a.state.x,e.deltaY=s.y-a.state.y),!1===a.props.onDrag(t,e))return!1;a.setState(s)}),O(z(a),"onDragStop",function(t,e){if(!a.state.dragging)return!1;if(!1===a.props.onStop(t,(0,f.createDraggableData)(z(a),e)))return!1;(0,l.default)("Draggable: onDragStop: %j",e);var o,t={dragging:!1,slackX:0,slackY:0};Boolean(a.props.position)&&(o=(e=a.props.position).x,e=e.y,t.x=o,t.y=e),a.setState(t)}),a.state={dragging:!1,dragged:!1,x:(t.position||t.defaultPosition).x,y:(t.position||t.defaultPosition).y,prevPropsPosition:m({},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."),a;throw new TypeError("Cannot call a class as a function")}return e=[{key:"getDerivedStateFromProps",value:function(t,e){t=t.position,e=e.prevPropsPosition;return!t||e&&t.x===e.x&&t.y===e.y?null:((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:t,prevPropsPosition:e}),{x:t.x,y:t.y,prevPropsPosition:m({},t)})}}],w((t=i).prototype,[{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;return null!=(t=null==(t=this.props)||null==(t=t.nodeRef)?void 0:t.current)?t:n.default.findDOMNode(this)}},{key:"render",value:function(){var t=this.props,e=(t.axis,t.bounds,t.children),o=t.defaultPosition,i=t.defaultClassName,n=t.defaultClassNameDragging,r=t.defaultClassNameDragged,s=t.position,a=t.positionOffset,t=(t.scale,function(t,e){if(null==t)return{};var o,i=function(t,e){if(null==t)return{};for(var o,i={},n=Object.keys(t),r=0;r<n.length;r++)o=n[r],0<=e.indexOf(o)||(i[o]=t[o]);return i}(t,e);if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(t),r=0;r<n.length;r++)o=n[r],0<=e.indexOf(o)||Object.prototype.propertyIsEnumerable.call(t,o)&&(i[o]=t[o]);return i}(t,y)),l={},p=null,u=!Boolean(s)||this.state.dragging,s=s||o,o={x:((0,f.canDragX)(this)&&u?this.state:s).x,y:((0,f.canDragY)(this)&&u?this.state:s).y},s=(this.state.isElementSVG?p=(0,d.createSVGTransform)(o,a):l=(0,d.createCSSTransform)(o,a),(0,c.default)(e.props.className||"",i,(O(u={},n,this.state.dragging),O(u,r,this.state.dragged),u)));return h.createElement(g.default,b({},t,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),h.cloneElement(h.Children.only(e),{className:s,style:m(m({},e.props.style),l),transform:p}))}}]),w(t,e),Object.defineProperty(t,"prototype",{writable:!1}),i}(h.Component);O(e.default=o,"displayName","Draggable"),O(o,"propTypes",m(m({},g.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:r.dontSetMe,style:r.dontSetMe,transform:r.dontSetMe})),O(o,"defaultProps",m(m({},g.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},867:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.browserPrefixToKey=r,e.browserPrefixToStyle=function(t,e){return e?"-".concat(e.toLowerCase(),"-").concat(t):t},e.default=void 0,e.getPrefix=i;var n=["Moz","Webkit","O","ms"];function i(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"!=typeof window){var o=null==(t=window.document)||null==(t=t.documentElement)?void 0:t.style;if(o&&!(e in o))for(var i=0;i<n.length;i++)if(r(e,n[i])in o)return n[i]}return""}function r(t,e){return e?"".concat(e).concat(function(t){for(var e="",o=!0,i=0;i<t.length;i++)o?(e+=t[i].toUpperCase(),o=!1):"-"===t[i]?o=!0:e+=t[i];return e}(t)):t}var s=i();e.default=s},868:function(t,e,o){"use strict";function s(t){return(s="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})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var e=c(void 0);if(e&&e.has(t))return e.get(t);var o,i,n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&((i=r?Object.getOwnPropertyDescriptor(t,o):null)&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]);return n.default=t,e&&e.set(t,n),n}(o(1)),n=a(o(0)),l=a(o(29)),p=o(590),u=o(644),r=o(570),h=a(o(645));function a(t){return t&&t.__esModule?t:{default:t}}function c(t){var e,o;return"function"!=typeof WeakMap?null:(e=new WeakMap,o=new WeakMap,(c=function(t){return t?o:e})(t))}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i,n,r=[],s=!0,a=!1;try{for(o=o.call(t);!(s=(i=o.next()).done)&&(r.push(i.value),!e||r.length!==e);s=!0);}catch(t){a=!0,n=t}finally{try{s||null==o.return||o.return()}finally{if(a)throw n}}return r}}(t,e)||function(t,e){var o;if(t)return"string"==typeof t?f(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?f(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 f(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=new Array(e);o<e;o++)i[o]=t[o];return i}function g(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(o){var i=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}}();return function(){var t,e=v(o),e=(t=i?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function w(t,e,o){e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}var S={start:"touchstart",move:"touchmove",stop:"touchend"},x={start:"mousedown",move:"mousemove",stop:"mouseup"},z=x,o=function(t){var e=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t);var r=b(a);function a(){var s,t=this,e=a;if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");for(var o=arguments.length,i=new Array(o),n=0;n<o;n++)i[n]=arguments[n];return w(m(s=r.call.apply(r,[this].concat(i))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),w(m(s),"mounted",!1),w(m(s),"handleDragStart",function(t){if(s.props.onMouseDown(t),!s.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var e=s.findDOMNode();if(!e||!e.ownerDocument||!e.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var o,i,n=e.ownerDocument;s.props.disabled||!(t.target instanceof n.defaultView.Node)||s.props.handle&&!(0,p.matchesSelectorAndParentsTo)(t.target,s.props.handle,e)||s.props.cancel&&(0,p.matchesSelectorAndParentsTo)(t.target,s.props.cancel,e)||("touchstart"===t.type&&t.preventDefault(),e=(0,p.getTouchIdentifier)(t),s.setState({touchIdentifier:e}),null!=(e=(0,u.getControlPosition)(t,e,m(s)))&&(o=e.x,e=e.y,i=(0,u.createCoreData)(m(s),o,e),(0,h.default)("DraggableCore: handleDragStart: %j",i),(0,h.default)("calling",s.props.onStart),!1!==s.props.onStart(t,i))&&!1!==s.mounted&&(s.props.enableUserSelectHack&&(0,p.addUserSelectStyles)(n),s.setState({dragging:!0,lastX:o,lastY:e}),(0,p.addEvent)(n,z.move,s.handleDrag),(0,p.addEvent)(n,z.stop,s.handleDragStop)))}),w(m(s),"handleDrag",function(t){var e=(0,u.getControlPosition)(t,s.state.touchIdentifier,m(s));if(null!=e){var o=e.x,e=e.y;if(Array.isArray(s.props.grid)){var i=o-s.state.lastX,n=e-s.state.lastY,r=d((0,u.snapToGrid)(s.props.grid,i,n),2),i=r[0],n=r[1];if(!i&&!n)return;o=s.state.lastX+i,e=s.state.lastY+n}r=(0,u.createCoreData)(m(s),o,e);if((0,h.default)("DraggableCore: handleDrag: %j",r),!1!==s.props.onDrag(t,r)&&!1!==s.mounted)s.setState({lastX:o,lastY:e});else try{s.handleDragStop(new MouseEvent("mouseup"))}catch(t){i=document.createEvent("MouseEvents");i.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.handleDragStop(i)}}}),w(m(s),"handleDragStop",function(t){if(s.state.dragging){var e=(0,u.getControlPosition)(t,s.state.touchIdentifier,m(s));if(null!=e){var o,i=e.x,e=e.y,n=(Array.isArray(s.props.grid)&&(r=i-s.state.lastX||0,o=e-s.state.lastY||0,r=(n=d((0,u.snapToGrid)(s.props.grid,r,o),2))[0],o=n[1],i=s.state.lastX+r,e=s.state.lastY+o),(0,u.createCoreData)(m(s),i,e));if(!1===s.props.onStop(t,n)||!1===s.mounted)return!1;var r=s.findDOMNode();r&&s.props.enableUserSelectHack&&(0,p.removeUserSelectStyles)(r.ownerDocument),(0,h.default)("DraggableCore: handleDragStop: %j",n),s.setState({dragging:!1,lastX:NaN,lastY:NaN}),r&&((0,h.default)("DraggableCore: Removing handlers"),(0,p.removeEvent)(r.ownerDocument,z.move,s.handleDrag),(0,p.removeEvent)(r.ownerDocument,z.stop,s.handleDragStop))}}}),w(m(s),"onMouseDown",function(t){return z=x,s.handleDragStart(t)}),w(m(s),"onMouseUp",function(t){return z=x,s.handleDragStop(t)}),w(m(s),"onTouchStart",function(t){return z=S,s.handleDragStart(t)}),w(m(s),"onTouchEnd",function(t){return z=S,s.handleDragStop(t)}),s}return g((e=a).prototype,[{key:"componentDidMount",value:function(){this.mounted=!0;var t=this.findDOMNode();t&&(0,p.addEvent)(t,S.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var t,e=this.findDOMNode();e&&(t=e.ownerDocument,(0,p.removeEvent)(t,x.move,this.handleDrag),(0,p.removeEvent)(t,S.move,this.handleDrag),(0,p.removeEvent)(t,x.stop,this.handleDragStop),(0,p.removeEvent)(t,S.stop,this.handleDragStop),(0,p.removeEvent)(e,S.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack)&&(0,p.removeUserSelectStyles)(t)}},{key:"findDOMNode",value:function(){var t;return null!=(t=this.props)&&t.nodeRef?null==(t=this.props)||null==(t=t.nodeRef)?void 0:t.current:l.default.findDOMNode(this)}},{key:"render",value:function(){return i.cloneElement(i.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.Component);w(e.default=o,"displayName","DraggableCore"),w(o,"propTypes",{allowAnyClick:n.default.bool,disabled:n.default.bool,enableUserSelectHack:n.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:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:r.dontSetMe,style:r.dontSetMe,transform:r.dontSetMe}),w(o,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},869:function(t,e){function n(t,e,o,i){var o=null==i||"number"==typeof i||"boolean"==typeof i?i:o(i),n=e.get(o);return void 0===n&&(n=t.call(this,i),e.set(o,n)),n}function r(t,e,o){var i=Array.prototype.slice.call(arguments,3),n=o(i),r=e.get(n);return void 0===r&&(r=t.apply(this,i),e.set(n,r)),r}function s(t,e,o,i,n){return o.bind(e,t,i,n)}function a(){return JSON.stringify(arguments)}function o(){this.cache=Object.create(null)}o.prototype.has=function(t){return t in this.cache},o.prototype.get=function(t){return this.cache[t]},o.prototype.set=function(t,e){this.cache[t]=e};var l={create:function(){return new o}};t.exports=function(t,e){var o=e&&e.cache?e.cache:l,i=e&&e.serializer?e.serializer:a;return(e&&e.strategy?e.strategy:function(t,e){return s(t,this,1===t.length?n:r,e.cache.create(),e.serializer)})(t,{cache:o,serializer:i})},t.exports.strategies={variadic:function(t,e){return s(t,this,r,e.cache.create(),e.serializer)},monadic:function(t,e){return s(t,this,n,e.cache.create(),e.serializer)}}}}]);
|
|
1
|
+
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[24],{533:function(k,t,e){"use strict";e.r(t);function f(t){return Boolean(t.touches&&t.touches.length)}function a(t,e,o,r){if(t&&"string"==typeof t){if(v(t,"px"))return Number(t.replace("px",""));if(v(t,"%"))return e*(Number(t.replace("%",""))/100);if(v(t,"vw"))return o*(Number(t.replace("vw",""))/100);if(v(t,"vh"))return r*(Number(t.replace("vh",""))/100)}return t}var r,i,o,n,C=e(1),s=e(865),s=e.n(s),l=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),p=function(){return(p=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},u={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},c=(o=C.PureComponent,l(z,o),z.prototype.render=function(){return C.createElement("div",{className:this.props.className||"",style:p(p({position:"absolute",userSelect:"none"},u[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},z),l=e(869),l=e.n(l),h=(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),d=function(){return(d=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},A={width:"auto",height:"auto"},g=l()(function(t,e,o){return Math.max(Math.min(t,o),e)}),y=l()(function(t,e){return Math.round(t/e)*e}),b=l()(function(t,e){return new RegExp(t,"i").test(e)}),m=l()(function(r,i,t){void 0===t&&(t=0);var e=i.reduce(function(t,e,o){return Math.abs(e-r)<Math.abs(i[t]-r)?o:t},0),o=Math.abs(i[e]-r);return 0===t||o<t?i[e]:r}),v=l()(function(t,e){return t.substr(t.length-e.length,e.length)===e}),w=l()(function(t){return"auto"===(t=t.toString())||v(t,"px")||v(t,"%")||v(t,"vh")||v(t,"vw")||v(t,"vmax")||v(t,"vmin")?t:t+"px"}),_=l()(function(t,e,o,r,i,n,s){return r=a(r,t.width,e,o),i=a(i,t.height,e,o),n=a(n,t.width,e,o),s=a(s,t.height,e,o),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===n?void 0:Number(n),minHeight:void 0===s?void 0:Number(s)}}),L=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],B=(r=C.PureComponent,h(x,r),Object.defineProperty(x.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||A},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"size",{get:function(){var t,e,o,r=0,i=0;return this.resizable&&this.window&&(t=this.resizable.offsetWidth,e=this.resizable.offsetHeight,"relative"!==(o=this.resizable.style.position)&&(this.resizable.style.position="relative"),r="auto"!==this.resizable.style.width?this.resizable.offsetWidth:t,i="auto"!==this.resizable.style.height?this.resizable.offsetHeight:e,this.resizable.style.position=o),{width:r,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"sizeStyle",{get:function(){function t(t){var e;return void 0===o.state[t]||"auto"===o.state[t]?"auto":o.propsSize&&o.propsSize[t]&&v(o.propsSize[t].toString(),"%")?v(o.state[t].toString(),"%")?o.state[t].toString():(e=o.getParentSize(),Number(o.state[t].toString().replace("px",""))/e[t]*100+"%"):w(o.state[t])}var o=this,e=this.props.size;return{width:e&&void 0!==e.width&&!this.state.isResizing?w(e.width):t("width"),height:e&&void 0!==e.height&&!this.state.isResizing?w(e.height):t("height")}},enumerable:!1,configurable:!0}),x.prototype.getParentSize=function(){var t,e,o,r;return this.parentNode?(t=this.appendBase())?(e=!1,"wrap"!==(o=this.parentNode.style.flexWrap)&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%",r={width:t.offsetWidth,height:t.offsetHeight},e&&(this.parentNode.style.flexWrap=o),this.removeBase(t),r):{width:0,height:0}:this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0}},x.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},x.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},x.prototype.componentDidMount=function(){var t;this.resizable&&this.window&&(t=this.window.getComputedStyle(this.resizable),this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0}))},x.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},x.prototype.createSizeForCssProperty=function(t,e){var o=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==o&&"auto"!==o?t:"auto"},x.prototype.calculateNewMaxFromBoundary=function(t,e){var o,r,i=this.props.boundsByDirection,n=this.state.direction,s=i&&b("left",n),i=i&&b("top",n);return"parent"===this.props.bounds?(n=this.parentNode)&&(o=s?this.resizableRight-this.parentLeft:n.offsetWidth+(this.parentLeft-this.resizableLeft),r=i?this.resizableBottom-this.parentTop:n.offsetHeight+(this.parentTop-this.resizableTop)):"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=i?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=i?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop)),{maxWidth:t=o&&Number.isFinite(o)?t&&t<o?t:o:t,maxHeight:e=r&&Number.isFinite(r)?e&&e<r?e:r:e}},x.prototype.calculateNewSizeFromDirection=function(t,e){var o=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,n=i.direction,i=i.original,s=this.props,a=s.lockAspectRatio,l=s.lockAspectRatioExtraHeight,s=s.lockAspectRatioExtraWidth,p=i.width,u=i.height,l=l||0,s=s||0;return b("right",n)&&(p=i.width+(t-i.x)*r/o,a)&&(u=(p-s)/this.ratio+l),b("left",n)&&(p=i.width-(t-i.x)*r/o,a)&&(u=(p-s)/this.ratio+l),b("bottom",n)&&(u=i.height+(e-i.y)*r/o,a)&&(p=(u-l)*this.ratio+s),{newWidth:p=b("top",n)&&(u=i.height-(e-i.y)*r/o,a)?(u-l)*this.ratio+s:p,newHeight:u}},x.prototype.calculateNewSizeFromAspectRatio=function(t,e,o,r){var i,n,s=this.props,a=s.lockAspectRatio,l=s.lockAspectRatioExtraHeight,s=s.lockAspectRatioExtraWidth,p=void 0===r.width?10:r.width,u=void 0===o.width||o.width<0?t:o.width,r=void 0===r.height?10:r.height,o=void 0===o.height||o.height<0?e:o.height,l=l||0,s=s||0;return e=a?(a=(r-l)*this.ratio+s,i=(o-l)*this.ratio+s,n=(p-s)/this.ratio+l,s=(u-s)/this.ratio+l,l=Math.max(p,a),a=Math.min(u,i),i=Math.max(r,n),n=Math.min(o,s),t=g(t,l,a),g(e,i,n)):(t=g(t,p,u),g(e,r,o)),{newWidth:t,newHeight:e}},x.prototype.setBoundingClientRect=function(){var t,e,o,r;"parent"===this.props.bounds&&(r=this.parentNode)&&(r=r.getBoundingClientRect(),this.parentLeft=r.left,this.parentTop=r.top),this.props.bounds&&"string"!=typeof this.props.bounds&&(r=this.props.bounds.getBoundingClientRect(),this.targetLeft=r.left,this.targetTop=r.top),this.resizable&&(t=(r=this.resizable.getBoundingClientRect()).left,e=r.top,o=r.right,r=r.bottom,this.resizableLeft=t,this.resizableRight=o,this.resizableTop=e,this.resizableBottom=r)},x.prototype.onResizeStart=function(t,e){var o,r,i,n,s;this.resizable&&this.window&&(i=r=0,t.nativeEvent&&(s=t.nativeEvent,Boolean((s.clientX||0===s.clientX)&&(s.clientY||0===s.clientY)))?(r=t.nativeEvent.clientX,i=t.nativeEvent.clientY):t.nativeEvent&&f(t.nativeEvent)&&(r=t.nativeEvent.touches[0].clientX,i=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(t,e,this.resizable)||(this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width)&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width}),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height,"auto"!==(s=this.window.getComputedStyle(this.resizable)).flexBasis&&(n=this.parentNode)&&(n=this.window.getComputedStyle(n).flexDirection,this.flexDir=n.startsWith("row")?"row":"column",o=s.flexBasis),this.setBoundingClientRect(),this.bindEvents(),n={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:d(d({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:o},this.setState(n)))},x.prototype.onMouseMove=function(t){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&f(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var e=this.props,o=e.maxWidth,r=e.maxHeight,i=e.minWidth,e=e.minHeight,n=(f(t)?t.touches[0]:t).clientX,s=(f(t)?t.touches[0]:t).clientY,a=this.state,l=a.direction,p=a.original,u=a.width,a=a.height,c=this.getParentSize(),h=_(c,this.window.innerWidth,this.window.innerHeight,o,r,i,e),o=h.maxWidth,r=h.maxHeight,i=h.minWidth,e=h.minHeight,h=this.calculateNewSizeFromDirection(n,s),n=h.newHeight,s=h.newWidth,h=this.calculateNewMaxFromBoundary(o,r),o=(this.props.snap&&this.props.snap.x&&(s=m(s,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(n=m(n,this.props.snap.y,this.props.snapGap)),this.calculateNewSizeFromAspectRatio(s,n,{width:h.maxWidth,height:h.maxHeight},{width:i,height:e})),e=(s=o.newWidth,n=o.newHeight,this.props.grid&&(r=y(s,this.props.grid[0]),h=y(n,this.props.grid[1]),s=0===(i=this.props.snapGap||0)||Math.abs(r-s)<=i?r:s,n=0===i||Math.abs(h-n)<=i?h:n),{width:s-p.width,height:n-p.height}),o=(u&&"string"==typeof u&&(v(u,"%")?s=s/c.width*100+"%":v(u,"vw")?s=s/this.window.innerWidth*100+"vw":v(u,"vh")&&(s=s/this.window.innerHeight*100+"vh")),a&&"string"==typeof a&&(v(a,"%")?n=n/c.height*100+"%":v(a,"vw")?n=n/this.window.innerWidth*100+"vw":v(a,"vh")&&(n=n/this.window.innerHeight*100+"vh")),{width:this.createSizeForCssProperty(s,"width"),height:this.createSizeForCssProperty(n,"height")});"row"===this.flexDir?o.flexBasis=o.width:"column"===this.flexDir&&(o.flexBasis=o.height),this.setState(o),this.props.onResize&&this.props.onResize(t,l,this.resizable,e)}},x.prototype.onMouseUp=function(t){var e=this.state,o=e.isResizing,r=e.direction,e=e.original;o&&this.resizable&&(o={width:this.size.width-e.width,height:this.size.height-e.height},this.props.onResizeStop&&this.props.onResizeStop(t,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:d(d({},this.state.backgroundStyle),{cursor:"auto"})}))},x.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},x.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,r=t.handleStyles,i=t.handleClasses,n=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;return o?(t=Object.keys(o).map(function(t){return!1!==o[t]?C.createElement(c,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t]},a&&a[t]?a[t]:null):null}),C.createElement("div",{className:s,style:n},t)):null},x.prototype.render=function(){var o=this,t=Object.keys(this.props).reduce(function(t,e){return-1===L.indexOf(e)&&(t[e]=o.props[e]),t},{}),e=d(d(d({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0}),r=(this.state.flexBasis&&(e.flexBasis=this.state.flexBasis),this.props.as||"div");return C.createElement(r,d({ref:this.ref,style:e,className:this.props.className},t),this.state.isResizing&&C.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},x.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},x),S=function(t,e){return(S=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])}))(t,e)};function x(t){var o=r.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){var t,e;return o.resizable&&o.window&&(t=o.parentNode)?((e=o.window.document.createElement("div")).style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add("__resizable_base__"):e.className+="__resizable_base__",t.appendChild(e),e):null},o.removeBase=function(t){var e=o.parentNode;e&&e.removeChild(t)},o.ref=function(t){t&&(o.resizable=t)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}function z(){var e=null!==o&&o.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}var O,D,P=function(){return(P=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},F=s.a,X={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},U=(O=C.PureComponent,S(D=R,l=O),D.prototype=null===l?Object.create(l):(j.prototype=l.prototype,new j),R.prototype.componentDidMount=function(){this.updateOffsetFromParent();var t=this.offsetFromParent,e=t.left,t=t.top,o=this.getDraggablePosition(),r=o.x,o=o.y;this.draggable.setState({x:r-e,y:o-t}),this.forceUpdate()},R.prototype.getDraggablePosition=function(){var t=this.draggable.state;return{x:t.x,y:t.y}},R.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},R.prototype.getParentSize=function(){return this.resizable.getParentSize()},R.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},R.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},R.prototype.getOffsetHeight=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/e;case"body":return document.body.offsetHeight/e;default:return t.offsetHeight}},R.prototype.getOffsetWidth=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/e;case"body":return document.body.offsetWidth/e;default:return t.offsetWidth}},R.prototype.onDragStart=function(t,e){this.props.onDragStart&&this.props.onDragStart(t,e);t=this.getDraggablePosition();if(this.originalPosition=t,this.props.bounds){var o,r,i,n,s,e=this.getParent(),t=this.props.scale;if("parent"===this.props.bounds)o=e;else{if("body"===this.props.bounds)return i=(n=e.getBoundingClientRect()).left,n=n.top,s=document.body.getBoundingClientRect(),i=-(i-e.offsetLeft*t-s.left)/t,n=-(n-e.offsetTop*t-s.top)/t,s=(document.body.offsetWidth-this.resizable.size.width*t)/t+i,r=(document.body.offsetHeight-this.resizable.size.height*t)/t+n,this.setState({bounds:{top:n,right:s,bottom:r,left:i}});if("window"===this.props.bounds)return this.resizable?(i=(n=e.getBoundingClientRect()).left,n=n.top,i=-(i-e.offsetLeft*t)/t,n=-(n-e.offsetTop*t)/t,s=(window.innerWidth-this.resizable.size.width*t)/t+i,r=(window.innerHeight-this.resizable.size.height*t)/t+n,this.setState({bounds:{top:n,right:s,bottom:r,left:i}})):void 0;"string"==typeof this.props.bounds?o=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(o=this.props.bounds)}o instanceof HTMLElement&&e instanceof HTMLElement&&(s=(n=o.getBoundingClientRect()).left,r=n.top,n=(s-(i=e.getBoundingClientRect()).left)/t,s=r-i.top,this.resizable)&&(this.updateOffsetFromParent(),e=this.offsetFromParent,this.setState({bounds:{top:s-e.top,right:n+(o.offsetWidth-this.resizable.size.width)-e.left/t,bottom:s+(o.offsetHeight-this.resizable.size.height)-e.top,left:n-e.left/t}}))}},R.prototype.onDrag=function(t,e){var o,r;if(this.props.onDrag)return o=(r=this.offsetFromParent).left,r=r.top,this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(t,P(P({},e),{x:e.x+o,y:this.originalPosition.y+r,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(t,P(P({},e),{x:this.originalPosition.x+o,y:e.y+r,deltaX:0})):void 0:this.props.onDrag(t,P(P({},e),{x:e.x-o,y:e.y-r}))},R.prototype.onDragStop=function(t,e){var o,r;if(this.props.onDragStop)return o=(r=this.offsetFromParent).left,r=r.top,this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(t,P(P({},e),{x:e.x+o,y:this.originalPosition.y+r,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(t,P(P({},e),{x:this.originalPosition.x+o,y:e.y+r,deltaX:0})):void 0:this.props.onDragStop(t,P(P({},e),{x:e.x+o,y:e.y+r}))},R.prototype.onResizeStart=function(t,e,o){t.stopPropagation(),this.setState({resizing:!0});var r,i,n,s,a,l,p,u,c,h,f,d=this.props.scale,g=this.offsetFromParent,y=this.getDraggablePosition();this.resizingPosition={x:y.x+g.left,y:y.y+g.top},this.originalPosition=y,this.props.bounds?(g=this.getParent(),y=void 0,"parent"===this.props.bounds?y=g:"body"===this.props.bounds?y=document.body:"window"===this.props.bounds?y=window:"string"==typeof this.props.bounds?y=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(y=this.props.bounds),(n=this.getSelfElement())instanceof Element&&(y instanceof HTMLElement||y===window)&&g instanceof HTMLElement&&(r=(g=this.getMaxSizesFromProps()).maxWidth,g=g.maxHeight,a=this.getParentSize(),r&&"string"==typeof r&&(r.endsWith("%")?(i=Number(r.replace("%",""))/100,r=a.width*i):r.endsWith("px")&&(r=Number(r.replace("px","")))),g&&"string"==typeof g&&(g.endsWith("%")?(i=Number(g.replace("%",""))/100,g=a.width*i):g.endsWith("px")&&(g=Number(g.replace("px","")))),i=(a=n.getBoundingClientRect()).left,n=a.top,s=(a="window"===this.props.bounds?{left:0,top:0}:y.getBoundingClientRect()).left,a=a.top,l=this.getOffsetWidth(y),y=this.getOffsetHeight(y),p=e.toLowerCase().endsWith("left"),u=e.toLowerCase().endsWith("right"),c=e.startsWith("top"),h=e.startsWith("bottom"),(p||c)&&this.resizable&&(f=(i-s)/d+this.resizable.size.width,this.setState({maxWidth:f>Number(r)?r:f})),(u||this.props.lockAspectRatio&&!p&&!c)&&this.setState({maxWidth:(f=l+(s-i)/d)>Number(r)?r:f}),(c||p)&&this.resizable&&(f=(n-a)/d+this.resizable.size.height,this.setState({maxHeight:f>Number(g)?g:f})),h||this.props.lockAspectRatio&&!c&&!p)&&this.setState({maxHeight:(f=y+(a-n)/d)>Number(g)?g:f})):this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight}),this.props.onResizeStart&&this.props.onResizeStart(t,e,o)},R.prototype.onResize=function(t,e,o,r){var i={x:this.originalPosition.x,y:this.originalPosition.y},n=-r.width,s=-r.height,n=(-1!==["top","left","topLeft","bottomLeft","topRight"].indexOf(e)&&("bottomLeft"===e?i.x+=n:("topRight"!==e&&(i.x+=n),i.y+=s)),i.x===this.draggable.state.x&&i.y===this.draggable.state.y||this.draggable.setState(i),this.updateOffsetFromParent(),this.offsetFromParent),s=this.getDraggablePosition().x+n.left,i=this.getDraggablePosition().y+n.top;this.resizingPosition={x:s,y:i},this.props.onResize&&this.props.onResize(t,e,o,r,{x:s,y:i})},R.prototype.onResizeStop=function(t,e,o,r){this.setState({resizing:!1});var i=this.getMaxSizesFromProps(),n=i.maxWidth,i=i.maxHeight;this.setState({maxWidth:n,maxHeight:i}),this.props.onResizeStop&&this.props.onResizeStop(t,e,o,r,this.resizingPosition)},R.prototype.updateSize=function(t){this.resizable&&this.resizable.updateSize({width:t.width,height:t.height})},R.prototype.updatePosition=function(t){this.draggable.setState(t)},R.prototype.updateOffsetFromParent=function(){var t=this.props.scale,e=this.getParent(),o=this.getSelfElement();if(!e||null===o)return{top:0,left:0};var r=e.getBoundingClientRect(),i=r.left,r=r.top,o=o.getBoundingClientRect(),n=this.getDraggablePosition(),s=e.scrollLeft,e=e.scrollTop;this.offsetFromParent={left:o.left-i+s-n.x*t,top:o.top-r+e-n.y*t}},R.prototype.render=function(){var t=this.props,e=t.disableDragging,o=t.style,r=t.dragHandleClassName,i=t.position,n=t.onMouseDown,s=t.onMouseUp,a=t.dragAxis,l=t.dragGrid,p=t.bounds,u=t.enableUserSelectHack,c=t.cancel,h=t.children,f=(t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop,t.resizeHandleStyles),d=t.resizeHandleClasses,g=t.resizeHandleComponent,y=t.enableResizing,b=t.resizeGrid,m=t.resizeHandleWrapperClass,v=t.resizeHandleWrapperStyle,w=t.scale,S=t.allowAnyClick,t=function(t,e){var o={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(o[i[r]]=t[i[r]]);return o}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick"]),x=this.props.default?P({},this.props.default):void 0;delete t.default;var z,O=e||r?{cursor:"auto"}:{cursor:"move"},O=P(P(P({},X),O),o),o=this.offsetFromParent,D=o.left,o=o.top;i&&(z={x:i.x-D,y:i.y-o});D=this.state.resizing?void 0:z,i=this.state.resizing?"both":a;return Object(C.createElement)(F,{ref:this.refDraggable,handle:r?".".concat(r):void 0,defaultPosition:x,onMouseDown:n,onMouseUp:s,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:i,disabled:e,grid:l,bounds:p?this.state.bounds:void 0,position:D,enableUserSelectHack:u,cancel:c,scale:w,allowAnyClick:S,nodeRef:this.resizableElement},Object(C.createElement)(B,P({},t,{ref:this.refResizable,defaultSize:x,size:this.props.size,enable:"boolean"==typeof y?{bottom:y,bottomLeft:y,bottomRight:y,left:y,right:y,top:y,topLeft:y,topRight:y}:y,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:O,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:(this.state.resizing?this.state:this.props).maxWidth,maxHeight:(this.state.resizing?this.state:this.props).maxHeight,grid:b,handleWrapperClass:m,handleWrapperStyle:v,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:f,handleClasses:d,handleComponent:g,scale:this.props.scale}),h))},R.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},R),h=e(225),Y=e(22);function R(t){var e=O.call(this,t)||this;return e.resizingPosition={x:0,y:0},e.offsetFromParent={left:0,top:0},e.resizableElement={current:null},e.originalPosition={x:0,y:0},e.refDraggable=function(t){t&&(e.draggable=t)},e.refResizable=function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},e.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},e.onResizeStart=e.onResizeStart.bind(e),e.onResize=e.onResize.bind(e),e.onResizeStop=e.onResizeStop.bind(e),e.onDragStart=e.onDragStart.bind(e),e.onDrag=e.onDrag.bind(e),e.onDragStop=e.onDragStop.bind(e),e.getMaxSizesFromProps=e.getMaxSizesFromProps.bind(e),e}function j(){this.constructor=D}function E(t){return(E="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})(t)}function M(e,t){var o,r=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)),r}function H(i){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){var e,o,r;e=i,o=n[t=t],r=function(t){if("object"!=E(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0===e)return String(t);e=e.call(t,"string");if("object"!=E(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==E(r)?r:String(r))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(n,t))})}return i}function T(t,e){var o;if(t)return"string"==typeof t?N(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?N(t,e):void 0}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=new Array(e);o<e;o++)r[o]=t[o];return r}function W(t){var e,o=t.id,r=t.style,i=t.className,n=t.children,s=t.defaultState,a=t.size,l=t.position,p=t.minWidth,u=t.minHeight,c=t.maxWidth,h=t.maxHeight,f=t.resizeGrid,d=t.dragGrid,g=t.lockAspectRatio,y=t.lockAspectRatioExtraWidth,b=t.lockAspectRatioExtraHeight,m=t.direction,v=t.disableDragging,w=t.dragAxis,S=t.bounds,x=t.selected,z=t.selectedStyle,O=t.selectedClassName,D=t.setProps,P=t.loading_state,R=(R=Object(C.useState)(0),e=2,function(t){if(Array.isArray(t))return t}(R)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var r,i,n,s,a=[],l=!0,p=!1;try{if(n=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;l=!1}else for(;!(l=(r=n.call(o)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(t){p=!0,i=t}finally{try{if(!l&&null!=o.return&&(s=o.return(),Object(s)!==s))return}finally{if(p)throw i}}return a}}(R,e)||T(R,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.")}()),j=R[0],E=R[1];Object(C.useEffect)(function(){!a&&s.width&&s.height&&D({size:{width:s.width,height:s.height}}),l||!s.x&&0!==s.x||!s.y&&0!==s.y||D({position:{x:s.x,y:s.y}})},[]);var M,N=Object(Y.clone)({top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}),W=function(t){var e,o,r,i,n,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return r=!(o=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return o=t.done,t},e:function(t){r=!0,e=t},f:function(){try{o||null==s.return||s.return()}finally{if(r)throw e}}};if(Array.isArray(t)||(s=T(t)))return s&&(t=s),i=0,{s:n=function(){},n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(m);try{for(W.s();!(M=W.n()).done;)N[M.value]=!0}catch(t){W.e(t)}finally{W.f()}return React.createElement(U,{id:o,style:H(H({},r),x?z:{}),className:x&&O?i+" "+O:i,default:s,size:a,position:l,minWidth:p,minHeight:u,maxWidth:c,maxHeight:h,resizeGrid:f,dragGrid:d,lockAspectRatio:g,lockAspectRatioExtraWidth:y,lockAspectRatioExtraHeight:b,enableResizing:N,disableDragging:v,dragAxis:w,bounds:S,onDragStop:function(t,e){!l||l.x===e.x&&l.y===e.y||E((new Date).getTime()),D({position:{x:e.x,y:e.y}})},onResizeStop:function(t,e,o,r,i){E((new Date).getTime()),D({size:{width:o.style.width,height:o.style.height},position:{x:i.x,y:i.y}})},onClick:function(){200<=(new Date).getTime()-j&&D({selected:!x})},"data-dash-is-loading":P&&P.is_loading||void 0},n)}(t.default=W).defaultProps=h.b,W.propTypes=h.c},570:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dontSetMe=function(t,e,o){if(t[e])return new Error("Invalid prop ".concat(e," passed to ").concat(o," - do not set this, set it on the child."))},e.findInArray=function(t,e){for(var o=0,r=t.length;o<r;o++)if(e.apply(e,[t[o],o,t]))return t[o]},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)}},590:function(t,e,o){"use strict";function s(t){return(s="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})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.addClassName=f,e.addEvent=function(t,e,o,r){t&&(r=l({capture:!0},r),t.addEventListener?t.addEventListener(e,o,r):t.attachEvent?t.attachEvent("on"+e,o):t["on"+e]=o)},e.addUserSelectStyles=function(t){var e;t&&((e=t.getElementById("react-draggable-style-el"))||((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)&&f(t.body,"react-draggable-transparent-selection")},e.createCSSTransform=function(t,e){t=h(t,e,"px");return p({},(0,i.browserPrefixToKey)("transform",i.default),t)},e.createSVGTransform=function(t,e){return h(t,e,"")},e.getTouch=function(t,e){return t.targetTouches&&(0,r.findInArray)(t.targetTouches,function(t){return e===t.identifier})||t.changedTouches&&(0,r.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=h,e.innerHeight=function(t){var e=t.clientHeight,t=t.ownerDocument.defaultView.getComputedStyle(t);return(e-=(0,r.int)(t.paddingTop))-(0,r.int)(t.paddingBottom)},e.innerWidth=function(t){var e=t.clientWidth,t=t.ownerDocument.defaultView.getComputedStyle(t);return(e-=(0,r.int)(t.paddingLeft))-(0,r.int)(t.paddingRight)},e.matchesSelector=c,e.matchesSelectorAndParentsTo=function(t,e,o){var r=t;do{if(c(r,e))return!0;if(r===o)return!1}while(r=r.parentNode);return!1},e.offsetXYFromParent=function(t,e,o){var r=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect();return{x:(t.clientX+e.scrollLeft-r.left)/o,y:(t.clientY+e.scrollTop-r.top)/o}},e.outerHeight=function(t){var e=t.clientHeight,t=t.ownerDocument.defaultView.getComputedStyle(t);return(e+=(0,r.int)(t.borderTopWidth))+(0,r.int)(t.borderBottomWidth)},e.outerWidth=function(t){var e=t.clientWidth,t=t.ownerDocument.defaultView.getComputedStyle(t);return(e+=(0,r.int)(t.borderLeftWidth))+(0,r.int)(t.borderRightWidth)},e.removeClassName=d,e.removeEvent=function(t,e,o,r){t&&(r=l({capture:!0},r),t.removeEventListener?t.removeEventListener(e,o,r):t.detachEvent?t.detachEvent("on"+e,o):t["on"+e]=null)},e.removeUserSelectStyles=function(t){if(t)try{var e;t.body&&d(t.body,"react-draggable-transparent-selection"),t.selection?t.selection.empty():(e=(t.defaultView||window).getSelection())&&"Caret"!==e.type&&e.removeAllRanges()}catch(t){}};var r=o(570),i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var e=a(void 0);if(e&&e.has(t))return e.get(t);var o,r,i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&((r=n?Object.getOwnPropertyDescriptor(t,o):null)&&(r.get||r.set)?Object.defineProperty(i,o,r):i[o]=t[o]);return i.default=t,e&&e.set(t,i),i}(o(867));function a(t){var e,o;return"function"!=typeof WeakMap?null:(e=new WeakMap,o=new WeakMap,(a=function(t){return t?o:e})(t))}function n(e,t){var o,r=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)),r}function l(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach(function(t){p(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function p(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var u="";function c(e,t){return u=u||(0,r.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,r.isFunction)(e[t])}),!!(0,r.isFunction)(e[u])&&e[u](t)}function h(t,e,o){var r=t.x,t=t.y,r="translate(".concat(r).concat(o,",").concat(t).concat(o,")");return e&&(t="".concat("string"==typeof e.x?e.x:e.x+o),e="".concat("string"==typeof e.y?e.y:e.y+o),r="translate(".concat(t,", ").concat(e,")")+r),r}function f(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)")))||(t.className+=" ".concat(e))}function d(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g"),"")}},644:function(t,e,o){"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,o){var r=t.state,i=!(0,a.isNum)(r.lastX),t=p(t);return i?{node:t,deltaX:0,deltaY:0,lastX:e,lastY:o,x:e,y:o}:{node:t,deltaX:e-r.lastX,deltaY:o-r.lastY,lastX:r.lastX,lastY:r.lastY,x:e,y:o}},e.createDraggableData=function(t,e){var o=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/o,y:t.state.y+e.deltaY/o,deltaX:e.deltaX/o,deltaY:e.deltaY/o,lastX:t.state.x,lastY:t.state.y}},e.getBoundPosition=function(t,e,o){if(t.props.bounds){s="string"==typeof(s=t.props.bounds)?s:{left:(r=s).left,top:r.top,right:r.right,bottom:r.bottom};var r=p(t);if("string"==typeof s){var t=r.ownerDocument,i=t.defaultView;if(!((t="parent"===s?r.parentNode:t.querySelector(s))instanceof i.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');var n=i.getComputedStyle(r),i=i.getComputedStyle(t),s={left:-r.offsetLeft+(0,a.int)(i.paddingLeft)+(0,a.int)(n.marginLeft),top:-r.offsetTop+(0,a.int)(i.paddingTop)+(0,a.int)(n.marginTop),right:(0,l.innerWidth)(t)-(0,l.outerWidth)(r)-r.offsetLeft+(0,a.int)(i.paddingRight)-(0,a.int)(n.marginRight),bottom:(0,l.innerHeight)(t)-(0,l.outerHeight)(r)-r.offsetTop+(0,a.int)(i.paddingBottom)-(0,a.int)(n.marginBottom)}}(0,a.isNum)(s.right)&&(e=Math.min(e,s.right)),(0,a.isNum)(s.bottom)&&(o=Math.min(o,s.bottom)),(0,a.isNum)(s.left)&&(e=Math.max(e,s.left)),(0,a.isNum)(s.top)&&(o=Math.max(o,s.top))}return[e,o]},e.getControlPosition=function(t,e,o){var r="number"==typeof e?(0,l.getTouch)(t,e):null;return"number"!=typeof e||r?(e=p(o),e=o.props.offsetParent||e.offsetParent||e.ownerDocument.body,(0,l.offsetXYFromParent)(r||t,e,o.props.scale)):null},e.snapToGrid=function(t,e,o){return[Math.round(e/t[0])*t[0],Math.round(o/t[1])*t[1]]};var a=o(570),l=o(590);function p(t){t=t.findDOMNode();if(t)return t;throw new Error("<DraggableCore>: Unmounted during event!")}},645:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){}},865:function(t,e,o){"use strict";var o=o(866),r=o.default,o=o.DraggableCore;t.exports=r,t.exports.default=r,t.exports.DraggableCore=o},866:function(t,e,o){"use strict";function s(t){return(s="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})(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return g.default}}),e.default=void 0;var c=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var e=p(void 0);if(e&&e.has(t))return e.get(t);var o,r,i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&((r=n?Object.getOwnPropertyDescriptor(t,o):null)&&(r.get||r.set)?Object.defineProperty(i,o,r):i[o]=t[o]);return i.default=t,e&&e.set(t,i),i}(o(1)),r=a(o(0)),i=a(o(29)),h=a(o(43)),f=o(590),d=o(644),n=o(570),g=a(o(868)),l=a(o(645)),y=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function a(t){return t&&t.__esModule?t:{default:t}}function p(t){var e,o;return"function"!=typeof WeakMap?null:(e=new WeakMap,o=new WeakMap,(p=function(t){return t?o:e})(t))}function b(){return(b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o,r=arguments[e];for(o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t}).apply(this,arguments)}function u(e,t){var o,r=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)),r}function m(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach(function(t){D(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=new Array(e);o<e;o++)r[o]=t[o];return r}function w(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(o){var r=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}}();return function(){var t,e=O(o),e=(t=r?(t=O(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return z(e)}}function z(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O(t){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function D(t,e,o){e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}o=function(t){var e=r;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t);var o=x(r);function r(t){var a;if(this instanceof r)return D(z(a=o.call(this,t)),"onDragStart",function(t,e){if((0,l.default)("Draggable: onDragStart: %j",e),!1===a.props.onStart(t,(0,d.createDraggableData)(z(a),e)))return!1;a.setState({dragging:!0,dragged:!0})}),D(z(a),"onDrag",function(t,e){if(!a.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",e);var o,r,i,n,e=(0,d.createDraggableData)(z(a),e),s={x:e.x,y:e.y};if(a.props.bounds&&(o=s.x,r=s.y,s.x+=a.state.slackX,s.y+=a.state.slackY,i=(0,d.getBoundPosition)(z(a),s.x,s.y),n=2,n=(i=function(t){if(Array.isArray(t))return t}(i)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var r,i,n=[],s=!0,a=!1;try{for(o=o.call(t);!(s=(r=o.next()).done)&&(n.push(r.value),!e||n.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==o.return||o.return()}finally{if(a)throw i}}return n}}(i,n)||function(t,e){var o;if(t)return"string"==typeof t?v(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?v(t,e):void 0}(i,n)||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.")}())[0],i=i[1],s.x=n,s.y=i,s.slackX=a.state.slackX+(o-s.x),s.slackY=a.state.slackY+(r-s.y),e.x=s.x,e.y=s.y,e.deltaX=s.x-a.state.x,e.deltaY=s.y-a.state.y),!1===a.props.onDrag(t,e))return!1;a.setState(s)}),D(z(a),"onDragStop",function(t,e){if(!a.state.dragging)return!1;if(!1===a.props.onStop(t,(0,d.createDraggableData)(z(a),e)))return!1;(0,l.default)("Draggable: onDragStop: %j",e);var o,t={dragging:!1,slackX:0,slackY:0};Boolean(a.props.position)&&(o=(e=a.props.position).x,e=e.y,t.x=o,t.y=e),a.setState(t)}),a.state={dragging:!1,dragged:!1,x:(t.position||t.defaultPosition).x,y:(t.position||t.defaultPosition).y,prevPropsPosition:m({},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."),a;throw new TypeError("Cannot call a class as a function")}return e=[{key:"getDerivedStateFromProps",value:function(t,e){t=t.position,e=e.prevPropsPosition;return!t||e&&t.x===e.x&&t.y===e.y?null:((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:t,prevPropsPosition:e}),{x:t.x,y:t.y,prevPropsPosition:m({},t)})}}],w((t=r).prototype,[{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;return null!=(t=null==(t=this.props)||null==(t=t.nodeRef)?void 0:t.current)?t:i.default.findDOMNode(this)}},{key:"render",value:function(){var t=this.props,e=(t.axis,t.bounds,t.children),o=t.defaultPosition,r=t.defaultClassName,i=t.defaultClassNameDragging,n=t.defaultClassNameDragged,s=t.position,a=t.positionOffset,t=(t.scale,function(t,e){if(null==t)return{};var o,r=function(t,e){if(null==t)return{};for(var o,r={},i=Object.keys(t),n=0;n<i.length;n++)o=i[n],0<=e.indexOf(o)||(r[o]=t[o]);return r}(t,e);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(t),n=0;n<i.length;n++)o=i[n],0<=e.indexOf(o)||Object.prototype.propertyIsEnumerable.call(t,o)&&(r[o]=t[o]);return r}(t,y)),l={},p=null,u=!Boolean(s)||this.state.dragging,s=s||o,o={x:((0,d.canDragX)(this)&&u?this.state:s).x,y:((0,d.canDragY)(this)&&u?this.state:s).y},s=(this.state.isElementSVG?p=(0,f.createSVGTransform)(o,a):l=(0,f.createCSSTransform)(o,a),(0,h.default)(e.props.className||"",r,(D(u={},i,this.state.dragging),D(u,n,this.state.dragged),u)));return c.createElement(g.default,b({},t,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),c.cloneElement(c.Children.only(e),{className:s,style:m(m({},e.props.style),l),transform:p}))}}]),w(t,e),Object.defineProperty(t,"prototype",{writable:!1}),r}(c.Component);D(e.default=o,"displayName","Draggable"),D(o,"propTypes",m(m({},g.default.propTypes),{},{axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:n.dontSetMe,style:n.dontSetMe,transform:n.dontSetMe})),D(o,"defaultProps",m(m({},g.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},867:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.browserPrefixToKey=n,e.browserPrefixToStyle=function(t,e){return e?"-".concat(e.toLowerCase(),"-").concat(t):t},e.default=void 0,e.getPrefix=r;var i=["Moz","Webkit","O","ms"];function r(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"!=typeof window){var o=null==(t=window.document)||null==(t=t.documentElement)?void 0:t.style;if(o&&!(e in o))for(var r=0;r<i.length;r++)if(n(e,i[r])in o)return i[r]}return""}function n(t,e){return e?"".concat(e).concat(function(t){for(var e="",o=!0,r=0;r<t.length;r++)o?(e+=t[r].toUpperCase(),o=!1):"-"===t[r]?o=!0:e+=t[r];return e}(t)):t}var s=r();e.default=s},868:function(t,e,o){"use strict";function s(t){return(s="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})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var e=h(void 0);if(e&&e.has(t))return e.get(t);var o,r,i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&((r=n?Object.getOwnPropertyDescriptor(t,o):null)&&(r.get||r.set)?Object.defineProperty(i,o,r):i[o]=t[o]);return i.default=t,e&&e.set(t,i),i}(o(1)),i=a(o(0)),l=a(o(29)),p=o(590),u=o(644),n=o(570),c=a(o(645));function a(t){return t&&t.__esModule?t:{default:t}}function h(t){var e,o;return"function"!=typeof WeakMap?null:(e=new WeakMap,o=new WeakMap,(h=function(t){return t?o:e})(t))}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var r,i,n=[],s=!0,a=!1;try{for(o=o.call(t);!(s=(r=o.next()).done)&&(n.push(r.value),!e||n.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==o.return||o.return()}finally{if(a)throw i}}return n}}(t,e)||function(t,e){var o;if(t)return"string"==typeof t?d(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?d(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 d(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=new Array(e);o<e;o++)r[o]=t[o];return r}function g(t,e){for(var o=0;o<e.length;o++){var r=e[o];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})(t,e)}function b(o){var r=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}}();return function(){var t,e=v(o),e=(t=r?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function w(t,e,o){e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}var S={start:"touchstart",move:"touchmove",stop:"touchend"},x={start:"mousedown",move:"mousemove",stop:"mouseup"},z=x,o=function(t){var e=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t);var n=b(a);function a(){var s,t=this,e=a;if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return w(m(s=n.call.apply(n,[this].concat(r))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),w(m(s),"mounted",!1),w(m(s),"handleDragStart",function(t){if(s.props.onMouseDown(t),!s.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var e=s.findDOMNode();if(!e||!e.ownerDocument||!e.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var o,r,i=e.ownerDocument;s.props.disabled||!(t.target instanceof i.defaultView.Node)||s.props.handle&&!(0,p.matchesSelectorAndParentsTo)(t.target,s.props.handle,e)||s.props.cancel&&(0,p.matchesSelectorAndParentsTo)(t.target,s.props.cancel,e)||("touchstart"===t.type&&t.preventDefault(),e=(0,p.getTouchIdentifier)(t),s.setState({touchIdentifier:e}),null!=(e=(0,u.getControlPosition)(t,e,m(s)))&&(o=e.x,e=e.y,r=(0,u.createCoreData)(m(s),o,e),(0,c.default)("DraggableCore: handleDragStart: %j",r),(0,c.default)("calling",s.props.onStart),!1!==s.props.onStart(t,r))&&!1!==s.mounted&&(s.props.enableUserSelectHack&&(0,p.addUserSelectStyles)(i),s.setState({dragging:!0,lastX:o,lastY:e}),(0,p.addEvent)(i,z.move,s.handleDrag),(0,p.addEvent)(i,z.stop,s.handleDragStop)))}),w(m(s),"handleDrag",function(t){var e=(0,u.getControlPosition)(t,s.state.touchIdentifier,m(s));if(null!=e){var o=e.x,e=e.y;if(Array.isArray(s.props.grid)){var r=o-s.state.lastX,i=e-s.state.lastY,n=f((0,u.snapToGrid)(s.props.grid,r,i),2),r=n[0],i=n[1];if(!r&&!i)return;o=s.state.lastX+r,e=s.state.lastY+i}n=(0,u.createCoreData)(m(s),o,e);if((0,c.default)("DraggableCore: handleDrag: %j",n),!1!==s.props.onDrag(t,n)&&!1!==s.mounted)s.setState({lastX:o,lastY:e});else try{s.handleDragStop(new MouseEvent("mouseup"))}catch(t){r=document.createEvent("MouseEvents");r.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.handleDragStop(r)}}}),w(m(s),"handleDragStop",function(t){if(s.state.dragging){var e=(0,u.getControlPosition)(t,s.state.touchIdentifier,m(s));if(null!=e){var o,r=e.x,e=e.y,i=(Array.isArray(s.props.grid)&&(n=r-s.state.lastX||0,o=e-s.state.lastY||0,n=(i=f((0,u.snapToGrid)(s.props.grid,n,o),2))[0],o=i[1],r=s.state.lastX+n,e=s.state.lastY+o),(0,u.createCoreData)(m(s),r,e));if(!1===s.props.onStop(t,i)||!1===s.mounted)return!1;var n=s.findDOMNode();n&&s.props.enableUserSelectHack&&(0,p.removeUserSelectStyles)(n.ownerDocument),(0,c.default)("DraggableCore: handleDragStop: %j",i),s.setState({dragging:!1,lastX:NaN,lastY:NaN}),n&&((0,c.default)("DraggableCore: Removing handlers"),(0,p.removeEvent)(n.ownerDocument,z.move,s.handleDrag),(0,p.removeEvent)(n.ownerDocument,z.stop,s.handleDragStop))}}}),w(m(s),"onMouseDown",function(t){return z=x,s.handleDragStart(t)}),w(m(s),"onMouseUp",function(t){return z=x,s.handleDragStop(t)}),w(m(s),"onTouchStart",function(t){return z=S,s.handleDragStart(t)}),w(m(s),"onTouchEnd",function(t){return z=S,s.handleDragStop(t)}),s}return g((e=a).prototype,[{key:"componentDidMount",value:function(){this.mounted=!0;var t=this.findDOMNode();t&&(0,p.addEvent)(t,S.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var t,e=this.findDOMNode();e&&(t=e.ownerDocument,(0,p.removeEvent)(t,x.move,this.handleDrag),(0,p.removeEvent)(t,S.move,this.handleDrag),(0,p.removeEvent)(t,x.stop,this.handleDragStop),(0,p.removeEvent)(t,S.stop,this.handleDragStop),(0,p.removeEvent)(e,S.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack)&&(0,p.removeUserSelectStyles)(t)}},{key:"findDOMNode",value:function(){var t;return null!=(t=this.props)&&t.nodeRef?null==(t=this.props)||null==(t=t.nodeRef)?void 0:t.current:l.default.findDOMNode(this)}},{key:"render",value:function(){return r.cloneElement(r.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.Component);w(e.default=o,"displayName","DraggableCore"),w(o,"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:n.dontSetMe,style:n.dontSetMe,transform:n.dontSetMe}),w(o,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},869:function(t,e){function i(t,e,o,r){var o=null==r||"number"==typeof r||"boolean"==typeof r?r:o(r),i=e.get(o);return void 0===i&&(i=t.call(this,r),e.set(o,i)),i}function n(t,e,o){var r=Array.prototype.slice.call(arguments,3),i=o(r),n=e.get(i);return void 0===n&&(n=t.apply(this,r),e.set(i,n)),n}function s(t,e,o,r,i){return o.bind(e,t,r,i)}function a(){return JSON.stringify(arguments)}function o(){this.cache=Object.create(null)}o.prototype.has=function(t){return t in this.cache},o.prototype.get=function(t){return this.cache[t]},o.prototype.set=function(t,e){this.cache[t]=e};var l={create:function(){return new o}};t.exports=function(t,e){var o=e&&e.cache?e.cache:l,r=e&&e.serializer?e.serializer:a;return(e&&e.strategy?e.strategy:function(t,e){return s(t,this,1===t.length?i:n,e.cache.create(),e.serializer)})(t,{cache:o,serializer:r})},t.exports.strategies={variadic:function(t,e){return s(t,this,n,e.cache.create(),e.serializer)},monadic:function(t,e){return s(t,this,i,e.cache.create(),e.serializer)}}}}]);
|