UNPKG

react-messagebox

Version:
2 lines 48.2 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.ReactMessageBox=e(require("React")):t.ReactMessageBox=e(t.React)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}(function(t){for(var e in t)switch(typeof t[e]){case"number":t[e]=t[t[e]];break;case"object":t[e]=function(e){var i=e.slice(1),n=t[e[0]];return function(t,e,r){n.apply(null,[t,e,r].concat(i))}}(t[e])}return t}([function(t,e,i){"use strict";function n(t){return t.charAt(0).toUpperCase()+t.substr(1)}var r=i(2),o=i(22),s=i(20),a=i(21),u=i(23),l=i(30),h=i(24),c=(r.createFactory(a),r.createClass({displayName:"ReactMessageBox",getDefaultProps:function(){return{renderOnVisible:!1,centered:!0,resizable:!0,constrainTo:!0,toolbarPosition:"bottom",toolbarBorderColor:"gray",defaultToolbarStyle:{},toolbarPadding:5}},render:function(){var t=this.prepareProps(this.props);return r.createElement(o,r.__spread({},t),t.children)},prepareProps:function(t){var e=u({},t);return e.toolbarStyle=this.prepareToolbarStyle(e),e.toolbar=this.prepareToolbar(e),e.bodyFactory=this.bodyFactory.bind(this,e),e},prepareToolbar:function(t){var e,i=r.Children.map(t.children,function(t){return t&&t.props&&t.props.isReactToolbar?(e=t,!1):t});if(t.children=i,e){var n=u({},t.toolbarStyle,e.props.style);e=h(e,{style:n})}return e},prepareToolbarStyle:function(t){var e=t.toolbarBorder,i=t.toolbarBorderColor||"gray",r=parseInt(t.toolbarBorderWidth||1)+"px";e||(e={},e["top"==t.toolbarPosition?"bottom":"top"]=r+" solid "+i);var o={margin:t.toolbarMargin,padding:t.toolbarPadding,border:e};if(o.border&&"object"==typeof o.border){var s=o.border;delete o.border,Object.keys(s).forEach(function(t){var e="border"+n(t);o[e]=s[t]})}var a=u({},t.defaultToolbarStyle,o,t.toolbarStyle);return l(a)},bodyFactory:function(t,e){var i=l({flex:1,display:"flex",flexFlow:"column"}),n=this.props.bodyFactory||r.DOM.div,o=n(e),s=t.toolbar,a="top"==t.toolbarPosition?[s,o]:[o,s];return r.createElement("div",{style:i,children:a})}}));c.Toolbar=a,c.Button=s,t.exports=c},function(t,e,i){t.exports=i(75)},function(e){e.exports=t},function(t){"use strict";function e(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t){for(var i,n,r=e(t),o=1;o<arguments.length;o++){i=arguments[o],n=Object.keys(Object(i));for(var s=0;s<n.length;s++)r[n[s]]=i[n[s]]}return r}},function(t,e){(function(e){"use strict";var i;e.document&&(i=e.document.createElement("div")),t.exports=i}).call(e,function(){return this}())},[79,6,4],function(t){"use strict";t.exports=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""}},4,[79,9,7],6,function(t,e,i){"use strict";function n(t,e){var i={key:t,value:e};return(l.plugins||[]).forEach(function(n){var r=a(function(i){return n(t,e,i)},i);r&&(i=r)}),i}function r(t,e){var i=n(t,e);return a(function(t){return{key:s(t.key),value:t.value}},i)}var o=i(57),s=i(16),a=i(58),u=i(59),l=function(t){var e,i,n={};for(e in t)if(o(t,e)){if(i=r(e,t[e]),!i)continue;a(function(t){n[t.key]=t.value},i)}return n};t.exports=u(l)},6,function(t){"use strict";t.exports={alignItems:1,justifyContent:1,flex:1,flexFlow:1,userSelect:1,transform:1,transition:1,transformOrigin:1,transformStyle:1,transitionProperty:1,transitionDuration:1,transitionTimingFunction:1,transitionDelay:1,borderImage:1,borderImageSlice:1,boxShadow:1,backgroundClip:1,backfaceVisibility:1,perspective:1,perspectiveOrigin:1,animation:1,animationDuration:1,animationName:1,animationDelay:1,animationDirection:1,animationIterationCount:1,animationTimingFunction:1,animationPlayState:1,animationFillMode:1,appearance:1}},12,4,[79,11,14],function(t,e,i){"use strict";var n=i(11),r=i(15),o={alignItems:1,justifyContent:1,flex:1,flexFlow:1,userSelect:1,transform:1,transition:1,transformOrigin:1,transformStyle:1,transitionProperty:1,transitionDuration:1,transitionTimingFunction:1,transitionDelay:1,borderImage:1,borderImageSlice:1,boxShadow:1,backgroundClip:1,backfaceVisibility:1,perspective:1,perspectiveOrigin:1,animation:1,animationDuration:1,animationName:1,animationDelay:1,animationDirection:1,animationIterationCount:1,animationTimingFunction:1,animationPlayState:1,animationFillMode:1,appearance:1};t.exports=function(t){if(!o[t])return t;var e=r(t);return e?e+n(t):t}},function(t){"use strict";function e(t,e){function i(n){function r(){var r=arguments.length,o=[].concat(n);return r&&o.push.apply(o,arguments),o.length<e?i(o):t.apply(this,o)}return r}return"number"!=typeof e&&(e=t.length),i([])}var i=Object.prototype.hasOwnProperty;t.exports=e(function(t,e){return i.call(t,e)})},function(t){"use strict";t.exports=function(t){var e=!0;return t.right<t.left&&(e=!1,t.right=t.left),t.bottom<t.top&&(e=!1,t.bottom=t.top),e}},3,function(t,e,i){"use strict";function n(){}function r(t){window.location.href=t}var o=i(2),s=i(19);t.exports=o.createClass({displayName:"ReactButton",propTypes:{fn:o.PropTypes.func,onClick:o.PropTypes.func,onMouseDown:o.PropTypes.func,onMouseUp:o.PropTypes.func,className:o.PropTypes.string,activeClassName:o.PropTypes.string,overClassName:o.PropTypes.string,focusedClassName:o.PropTypes.string},getDefaultProps:function(){return{defaultStyle:{display:"inline-block",boxSizing:"border-box",padding:5,border:"1px solid gray",cursor:"pointer"},defaultDisabledStyle:{background:"rgb(221, 221, 221)",color:"rgb(128, 128, 128)",cursor:"default"},defaultDisabledAnchorStyle:{cursor:"default"},defaultAnchorStyle:{textDecoration:"none"},href:""}},getInitialState:function(){return{mouseOver:!1,active:!1}},render:function(){var t=this.prepareProps(this.props,this.state),e=o.DOM.a,i=t.anchorFactory||e,n=i(t.anchorProps);return void 0===n&&(n=e(t.anchorProps)),o.createElement("div",o.__spread({},t),n)},prepareProps:function(t,e){var i={};s(i,t),i.active=!!e.active,i.mouseOver=!!e.mouseOver,i.focused=!!e.focused,i.style=this.prepareStyle(i,e),i.className=this.prepareClassName(i,e),i.onMouseEnter=this.handleMouseEnter.bind(this,i),i.onMouseLeave=this.handleMouseLeave.bind(this,i),i.onMouseDown=this.handleMouseDown.bind(this,i),i.onMouseUp=this.handleMouseUp.bind(this,i);var n=this.handleClick.bind(this,i);return i.onClick=i.interceptClick?i.interceptClick.bind(this,n):n,i.anchorProps=this.prepareAnchorProps(i),i},prepareAnchorProps:function(t){var e={};return s(e,{children:t.children,style:this.prepareAnchorStyle(t),href:t.href}),e.onClick=this.handleAnchorClick.bind(this,t),e.onFocus=this.handleAnchorFocus.bind(this,t),e.onBlur=this.handleAnchorBlur.bind(this,t),e},prepareAnchorStyle:function(t){var e=t.style.color?{color:t.style.color}:null,i=s({},t.defaultAnchorStyle,e,t.anchorStyle);return t.mouseOver&&s(i,t.defaultOverAnchorStyle,t.overAnchorStyle),t.active&&s(i,t.defaultActiveAnchorStyle,t.activeAnchorStyle),t.focused&&s(i,t.defaultFocusedAnchorStyle,t.focusedAnchorStyle),t.disabled&&s(i,t.defaultDisabledAnchorStyle,t.disabledAnchorStyle),i},prepareClassName:function(t){var e=t.className||"";return e+=" z-button",t.active&&(e+=" z-active "+(t.activeClassName||"")),t.mouseOver&&t.overClassName&&(e+=" "+t.overClassName),t.focused&&t.focusedClassName&&(e+=" "+t.focusedClassName),t.disabled&&t.disabledClassName&&(e+=" "+t.disabledClassName),e},prepareStyle:function(t){var e={};return s(e,t.defaultStyle,t.style),t.focused&&s(e,t.defaultFocusedStyle,t.focusedStyle),t.mouseOver&&s(e,t.defaultOverStyle,t.overStyle),t.active&&s(e,t.defaultActiveStyle,t.activeStyle),t.disabled&&s(e,t.defaultDisabledStyle,t.disabledStyle),e},navigate:function(t){t.href&&(t.navigate||r)(t.href)},isFocused:function(){return this.state.focused},handleAnchorFocus:function(t){t.disabled||this.setState({focused:!0})},handleAnchorBlur:function(t){t.disabled||this.setState({focused:!1})},handleAnchorClick:function(t,e){t.href||e.preventDefault()},handleClick:function(t,e){t.disabled||(t.href&&e.target&&"A"!==e.target.tagName&&this.navigate(t),(this.props.onClick||n)(e),(this.props.fn||n)(t,e))},handleMouseEnter:function(t,e){t.disabled||(this.setState({mouseOver:!0}),(this.props.onMouseEnter||n)(e))},handleMouseLeave:function(t,e){t.disabled||(this.setState({mouseOver:!1}),(this.props.onMouseLeave||n)(e))},handleMouseUp:function(t,e){this.setState({active:!1}),window.removeEventListener("mouseup",this.handleMouseUp),(this.props.onMouseUp||n)(e)},handleMouseDown:function(t,e){e.preventDefault(),t.disabled||(this.setState({active:!0}),window.addEventListener("mouseup",this.handleMouseUp),(this.props.onMouseDown||n)(e))},isActive:function(){return!!this.state.active}})},function(t,e,i){"use strict";var n=i(2),r=i(41),o=i(34),s=i(35),a=n.createClass({displayName:"ReactToolbar",getDefaultProps:function(){return{isReactToolbar:!0,defaultStyle:{display:"flex",boxSizing:"border-box"},defaultHorizontalStyle:{flexFlow:"row",alignItems:"center",alignContent:"stretch"},defaultVerticalStyle:{flexFlow:"column",alignItems:"stretch",alignContent:"center"}}},render:function(){var t=this.state,e=this.prepareProps(this.props,t);return n.createElement("div",n.__spread({},e))},prepareProps:function(t,e){var i=o({},t);return i.vertical="vertical"==i.orientation,i.style=this.prepareStyle(i,e),i.children=this.prepareChildren(i,e),i},prepareStyle:function(t){var e=t.defaultHorizontalStyle,i=t.horizontalStyle;t.vertical&&(e=t.defaultVerticalStyle,i=t.verticalStyle);var n=o({},t.defaultStyle,e,t.style,i);return r(n)},prepareChildren:function(t){var e=0;if(n.Children.forEach(t.children,function(t){t&&t.props&&t.props.isToolbarRegion&&e++}),!e)return n.createElement(a.Region,null,t.children);var i=-1,r=n.Children.map(t.children,function(n){if(n&&n.props&&n.props.isToolbarRegion){i++;var r=n.props,o=0===i,a=i===e-1,u=!o&&!a,l=u||3>e,h={first:o,last:a,inBetween:u,flex:r.flex?r.flex:l,orientation:t.orientation,align:r.align||"center"};!r.align&&e>1&&(o?h.align="start":a&&(h.align="end")),n=s(n,h)}return n});return r}});a.Region=n.createClass({displayName:"ReactToolbarRegion",getDefaultProps:function(){return{isToolbarRegion:!0,defaultStyle:{display:"inline-block",alignSelf:"center",boxSizing:"border-box"},defaultVerticalStyle:{display:"flex",flexFlow:"column"}}},render:function(){var t=this.prepareProps(this.props);return n.createElement("div",n.__spread({},t))},prepareProps:function(t){var e=o({},t);return e.vertical="vertical"==e.orientation,e.style=this.prepareStyle(e),e},prepareStyle:function(t){var e,i={};t.flex&&(e={flex:t.flex===!0?1:t.flex}),t.vertical?i.justifyContent="start"==t.align?"flex-start":"end"==t.align?"flex-end":"center":i.textAlign="start"==t.align?"left":"end"==t.align?"right":"center";var n=t.defaultHorizontalStyle,s=t.horizontalStyle;t.vertical&&(n=t.defaultVerticalStyle,s=t.verticalStyle);var a=o({},t.defaultStyle,e,n,t.style,s,i);return r(a)}}),t.exports=a},function(t,e,i){"use strict";function n(){}var r=i(2),o=i(3),s=i(45),a=i(1),u=i(10),l=i(54),h=i(53),c=i(44),f=i(70),p=i(69),d=i(66),g=i(67),v=!1,m=0,y="react-window-layer",b=i(63),x=r.createClass({displayName:"ReactWindow",display:"ReactWindow",mixins:[i(64)],getDefaultProps:function(){return{handleWidth:20,stateful:!0,onMount:n,onResizeStart:n,onResizeDrag:n,onResize:n,onMoveStart:n,onMoveDrag:n,onMove:n,onMaximizeChange:n,renderOnVisible:!0,defaultStyle:{background:"white",padding:0,position:"absolute",boxSizing:"border-box",border:"1px solid gray"},defaultCenteredStyle:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontSmoothing:"subpixel-antialiased"},defaultTitleStyle:{position:"relative",boxSizing:"border-box",background:"rgb(217, 217, 217)"},defaultBodyStyle:{position:"relative",boxSizing:"border-box",overflow:"auto"},defaultMaximizedStyle:{width:"100%",height:"100%",right:"inherit",bottom:"inherit",left:0,top:0},visibleDisplayValue:"block",position:null,size:null,innerStyle:{display:"flex",flexDirection:"column",position:"relative",width:"100%",height:"100%"},tagName:v?"dialog":"div",titleBorder:"",bodyBorder:"",anchor:{top:!0,left:!0},aspectRatioPrecision:5,keepAspectRatio:!1,resizeHandles:!0,resizable:!0,draggable:!0,dragCursor:"pointer",maximizable:!0,maximizeOnDoubleClick:!0,constrainTo:!1,constrainOnResize:!0,constrainOnResizeBuffer:50,centered:!1,modal:!1,bodyStyle:{},handleStyle:null,bodyPadding:10,titleStyle:{},titlePadding:10,bodyClassName:"",titleClassName:""}},getInitialState:function(){return{id:"react-window-"+m++,dragging:!1,resizing:!1}},componentDidMount:function(){var t=this.getDOMNode();this.props.onMount(this,t),this.adjustOnRender(),this.checkWindowResizeListener(),this.register()},register:function(){this.getManager().register(this,this.getId())},unregister:function(){this.getManager().unregister(this.getId())},getManager:function(){return this.props.manager||b},getId:function(){return this.props.id||this.state.id},checkWindowResizeListener:function(){var t=this.prepareMaximized(this.props,this.state);this.props.constrainTo&&this.props.constrainOnResize&&!t?this.windowResizeListener||(this.windowResizeListener=c(this.onWindowResize,this.props.constrainOnResizeBuffer),window.addEventListener("resize",this.windowResizeListener,!1)):this.windowResizeListener&&this.detachWindowResizeListener()},detachWindowResizeListener:function(){window.removeEventListener("resize",this.windowResizeListener),this.windowResizeListener=null},componentWillUnmount:function(){this.windowResizeListener&&this.detachWindowResizeListener(),this.layer=null,this.unregister()},componentDidUpdate:function(){this.adjustOnRender(),this.checkWindowResizeListener()},onWindowResize:function(){var t=this.props,e=t.anchor||{},i=this.getConstrainRegion(t),n=this.getRegion(),r=n.clone(),o=e.right,s=e.bottom;if(i&&!o&&!s){var a=n.constrainTo(i);if(a){var u=this.getRelativeRegion();u.set({left:u.left+n.left-r.left,top:u.top+n.top-r.top,width:n.width,widthheight:n.height}),this.doResize(u)}}},adjustOnRender:function(){if(this.props.modal){var t=this.getLayer();t.style.zIndex=this.visibleZIndex-1}},getLayer:function(){var t=this.layer;if(!t){for(var e,i=this.getDOMNode().parentNode,n=i.children,r=0,o=n.length,s="."+y;o>r;r++)if(e=n[r],e&&h(e,s)){t=e;break}t||(t=this.createLayer(),i.appendChild(t)),this.layer=t}return t},createLayer:function(){var t=document.createElement("div");return t.className=y,t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.width="100%",t.style.height="100%",t},render:function(){var t=this.state,e=this.prepareProps(this.props,t);if(!e.visible&&!e.renderOnVisible)return!1;var i=this.renderTitle(e),n=this.renderBody(e);return r.DOM[e.tagName](e,e.handles,r.createElement("div",{style:u(e.innerStyle)},i,n))},prepareProps:function(t,e){var i=o({},t);return i.maximized=this.prepareMaximized(i,e),i.centered=this.prepareCentered(i,e),i.resizeOrDrag=e.resizing||e.dragging,i.position=this.preparePosition(i,e),i.region=this.prepareRegion(i,e),i.className=this.prepareClassName(i,e),i.handles=this.prepareHandles(i,e),i.style=this.prepareStyle(i,e),i.onMouseDown=this.handleMouseDown,delete i.draggable,i["data-centered"]=i.centered,i["data-maximized"]=i.maximized,i},prepareRegion:function(t,e){return e.region},preparePosition:function(t,e){var i=t.position;return t.stateful&&e.region&&(i=e.region),i},prepareHandles:function(t,e){var i;return t.resizable&&!t.maximized&&(i=this.prepareResizeHandles(t,e).map(this.renderHandle.bind(this,t))),i},prepareClassName:function(t){var e=t.className||"";return e+=" react-window"},prepareMaximized:function(t,e){var i=t.maximized;return t.stateful&&"undefined"!=typeof e.maximized&&(i=e.maximized),i},prepareCentered:function(t,e){var i=t.centered;return void 0!==e.centered&&(i=e.centered),i=e.dragging||e.resizing?!1:i},prepareResizeHandles:function(t,e){var i=t.resizeHandles,n=d({outside:t.handlesOutside,width:t.handleWidth,handleStyle:t.handleStyle}),r={};return"string"==typeof i?i.split(" ").forEach(function(t){t in n?r[t]=o({},n[t]):console.warn("Cannot find handle",t)}):i===!0&&(r=o({},n)),Object.keys(r).map(function(i){var n=r[i],s=n.style;return e.dragging&&(s.cursor=t.dragCursor),o(n,{name:i,style:s}),n})},prepareSize:function(t,e){var i={},n=t.size;t.stateful&&(e.size||e.region)&&(n=void 0!==e.size?e.size:e.region);var r=typeof n,o="number"==r||"string"==r||null===n,s=o?n:n.width,a=o?n:n.height;return null!=s&&(i.width=s),null!=a&&(i.height=a),i},prepareStyle:function(t,e){var i=o({border:t.border},t.defaultStyle);o(i,this.getCenteredStyle(t));var n=(t.anchor.left,t.anchor.top,t.anchor.bottom),r=t.anchor.right,s=t.size=this.prepareSize(t,e);o(i,s,t.style,this.getRegionStyle(t.region));var a=t.position;if(a&&!t.resizeOrDrag){i.top=a.top,i.left=a.left;var l=n||r;if(this.isMounted()&&this.updateAnchor&&l){var h=this.getParentRegion(),c=this.getRegion(),f=h.right-c.right,p=h.bottom-c.bottom;r&&(i.right=f,delete i.width),n&&(i.bottom=p,delete i.height)}}return this.updateAnchor=!1,e.activeHandle&&(i.cursor=e.activeHandle.style.cursor),o(i,this.getMinMaxSize(t),this.getMaximizedStyle(t),this.getVisibleStyle(t)),i.zIndex=this.visible!=t.visible?this.visibleZIndex=this.getZIndex():this.visibleZIndex,this.visible=t.visible,u(i)},toTop:function(){this.visible="refresh",this.setState({})},getMinMaxSize:function(t){var e,i,n=t.style||{},r={};return t.minSize&&(e=typeof t.minSize,i="number"==e||"string"==e,r.minWidth=i?t.minSize:t.minSize.minWidth,r.minHeight=i?t.minSize:t.minSize.minHeight),t.maxSize&&(e=typeof t.maxSize,i="number"==e||"string"==e,r.maxWidth=i?t.maxSize:t.maxSize.maxWidth,r.maxHeight=i?t.maxSize:t.maxSize.maxHeight),void 0==r.minWidth&&void 0!=n.minWidth&&(r.minWidth=n.minWidth),void 0==r.maxWidth&&void 0!=n.maxWidth&&(r.maxWidth=n.maxWidth),void 0==r.minHeight&&void 0!=n.minHeight&&(r.minHeight=n.minHeight),void 0==r.maxHeight&&void 0!=n.maxHeight&&(r.maxHeight=n.maxHeight),r},getCenteredStyle:function(t){return t.centered?o({},t.defaultCenteredStyle,t.centeredStyle):void 0},getMaximizedStyle:function(t){return t.maximized?o({},t.defaultMaximizedStyle,t.maximizedStyle):void 0},getVisibleStyle:function(t){var e=t.style||{};return{display:t.visible?e.display&&"none"!=e.display?e.display:t.visibleDisplayValue:"none"}},getRegionStyle:function(t){return t?{top:t.top,left:t.left,width:t.width,height:t.height,right:"inherit",bottom:"inherit"}:void 0},handleMouseDown:function(t){this.props.onMouseDown&&this.props.onMouseDown(t)},getZIndex:function(){var t=this.getManager(),e=t.getNextZIndex();return e},renderHandle:function(t,e){var i={};return i[l.onMouseDown]=this.onHandleMouseDown.bind(this,t,e),r.createElement("div",r.__spread({key:e.name,style:e.style,className:"handle handle-"+e.name},i))},getParentRegion:function(){return this.getRegion(this.getDOMNode().parentNode)},getRelativeRegion:function(){return f(this.getDOMNode())},getRegion:function(t){return a.from(t||this.getDOMNode())},getConstrainRegion:function(t){return t=t||this.props,p(t.constrainTo,this.getDOMNode())},onHandleMouseDown:function(t,e,i){if(i.preventDefault(),!t.maximized){var n=this.getRegion(),r=this.getConstrainRegion(),a=this.getRelativeRegion(),u={resizing:!0,region:a,activeHandle:e};this.props.onResizeStart(i);var l={keepAspectRatio:t.keepAspectRatio,horizontalResizeOnly:t.horizontalResizeOnly,verticalResizeOnly:t.verticalResizeOnly,constrainRegion:r,activeHandle:e,relativeRegion:a,initialOffset:{top:n.top-a.top,left:n.left-a.left},sizeContraints:this.getMinMaxSize(t),initialResizeRegion:n};t.keepAspectRatio&&(l.aspectRatio=1*(n.width/n.height).toFixed(t.aspectRatioPrecision)),s(i,{constrainTo:r,scope:this,onDragStart:function(t,e){o(e,l),this.handleResizeDragStart(t,e)},onDrag:function(t,e){this.handleResizeDrag(t,e)},onDrop:function(t,e){this.handleResizeDrop(t,e),this.setState({centered:!1,resizing:!1,activeHandle:null})}}),this.visible="refresh",this.setState(u)}},handleResizeDragStart:function(t,e){this.props.onResizeStart(e.relativeRegion)},handleResizeDrag:function(t,e){var i=g(e),n=this.state.region;n.set({width:i.width,height:i.height,left:i.left-e.initialOffset.left,top:i.top-e.initialOffset.top}),n&&(this.setState({region:n}),this.props.onResizeDrag(n))},handleResizeDrop:function(t,e){var i=e?e.diff:{},n=this.state.region;n&&i&&(i.top||i.left)&&this.doResize(n)},doResize:function(t){this.props.stateful&&(this.updateAnchor=!0,this.setState({region:t})),this.props.onResize(t)},renderTitle:function(t){var e=t.titleFactory||r.DOM.div,i=this.prepareTitleStyle(t),n={style:i,className:t.titleClassName};return n[l.onMouseDown]=this.handleTitleMouseDown,n.className=n.className||"",n.className+=" title",n.onDoubleClick=this.handleTitleDoubleClick.bind(this,t),e(n,r.createElement("div",null,t.title))},handleTitleDoubleClick:function(t){var e=!t.maximized;t.stateful&&this.setState({maximized:e}),this.props.onMaximizeChange(e)},renderBody:function(t){var e=t.bodyFactory||r.DOM.div,i=this.prepareBodyStyle(t),n={style:i,className:t.bodyClassName,children:t.children};return i.flex=1,e(n)},handleTitleMouseDown:function(t){this.visible="refresh",this.setState({}),this.props.draggable&&this.setupTitleDrag(t)},setupTitleDrag:function(t){var e=this.getConstrainRegion(),i=this.getRelativeRegion(),n=i.clone();t.preventDefault(),s(t,{region:this.getRegion(),constrainTo:e,scope:this,onDragStart:function(t,e){e._initialRegion=i,e._cloneRegion=n,this.setState({dragging:!0,region:i}),this.handleDragStart(t,e)},onDrag:function(t,e){this.handleDrag(t,e)},onDrop:function(t,e){this.handleDrop(t,e)}})},handleDragStart:function(t,e){this.props.onMoveStart(e,t)},handleDrag:function(t,e){var i=e._cloneRegion;i.set(e._initialRegion),i.shift(e.diff),this.setState({region:i}),this.props.onMoveDrag(i,e,t)},handleDrop:function(t,e){var i=e?e.diff:{};if(i&&(i.top||i.left)){var n=this.state.region,r={dragging:!1,centered:!1};this.updateAnchor=!0,this.setState(r),this.props.onMove(n)}}});t.exports=x},3,function(t,e,i){"use strict";function n(t,e){var i,n=s(t);for(i in e)u.call(h,i)?h[i](n,e[i],i):u.call(n,i)||(n[i]=e[i]);return n}function r(t){return function(e,i,n){e[n]=u.call(e,n)?t(e[n],i):i}}function o(t,e){return t?t+(e?" "+e:""):e||""}function s(){for(var t={},e=0;e<arguments.length;e++)for(var i in arguments[e])u.call(arguments[e],i)&&(t[i]=arguments[e][i]);return t}var a=i(2),u=Object.prototype.hasOwnProperty,l=a.version.split(".").map(parseFloat),h={className:r(o),children:function(){},key:function(){},ref:function(){},style:r(s)};t.exports=function(t,e){function i(){}var r=n(e,t.props);return!u.call(r,"children")&&u.call(t.props,"children")&&(r.children=t.props.children),0===l[0]&&l[1]<11?t.constructor.ConvenienceConstructor(r):0===l[0]&&11===l[1]?t.constructor(r):0===l[0]&&12===l[1]?(i.isReactLegacyFactory=!0,i.type=t.type,a.createElement(i,r)):a.createElement(t.type,r)}},[78,6,5,12],[84,5,25,4],[81,28,12],[82,6,5,4],function(t){"use strict";t.exports=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},[80,29,27,31,32],function(t){"use strict";t.exports=function(t,e){return e?Array.isArray(e)?e.map(t).filter(function(t){return!!t}):t(e):void 0}},[83,26],function(t){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function n(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(t){if(!n(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},e.prototype.emit=function(t){var e,n,s,a,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],o(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(s=arguments.length,a=new Array(s-1),u=1;s>u;u++)a[u-1]=arguments[u];n.apply(this,a)}else if(r(n)){for(s=arguments.length,a=new Array(s-1),u=1;s>u;u++)a[u-1]=arguments[u];for(l=n.slice(),s=l.length,u=0;s>u;u++)l[u].apply(this,a)}return!0},e.prototype.addListener=function(t,n){var s;if(!i(n))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(n.listener)?n.listener:n),this._events[t]?r(this._events[t])?this._events[t].push(n):this._events[t]=[this._events[t],n]:this._events[t]=n,r(this._events[t])&&!this._events[t].warned){var s;s=o(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},e.prototype.removeListener=function(t,e){var n,o,s,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,o=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(a=s;a-->0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(0>o)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},e.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},e.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},e.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},3,24,[78,9,8,13],[84,8,36,7],[81,39,13],[82,9,8,7],29,[80,40,38,42,43],31,[83,37],function(t,e){(function(e){"use strict";var i=e.setImmediate,n=e.clearImmediate;t.exports=function(t,e,r){var o=-1;return function(){var s=r||this,a=arguments;if(0>e)return void t.apply(s,a);var u=e||!i,l=u?clearTimeout:n,h=u?setTimeout:i;-1!==o&&l(o),o=h(function(){t.apply(s,a),s=null},e)}}}).call(e,function(){return this}())},function(t,e,i){"use strict";function n(t){var e,i=t.pageX,n=t.pageY;return s&&t.touches&&(e=t.touches[0])&&(i=e.pageX,n=e.pageY),{pageX:i,pageY:n}}var r=i(3),o=i(51),s=i(46),a=i(52),u=function(t){this.config=t},l={move:s?"touchmove":"mousemove",up:s?"touchend":"mouseup"};r(u.prototype,{initDrag:function(t){this.onDragInit(t);var e=a(this.onDragStart,this),i=s?t.target:window,n=function(t){e(t),this.onDrag(t)}.bind(this),r=function(t){this.onDrop(t),i.removeEventListener(l.move,n),i.removeEventListener(l.up,r)}.bind(this);i.addEventListener(l.move,n,!1),i.addEventListener(l.up,r)},onDragInit:function(t){var e={diff:{left:0,top:0}};this.state={config:e},this.config.region&&(this.state.initialRegion=o.from(this.config.region),this.state.dragRegion=e.dragRegion=this.state.initialRegion.clone()),this.config.constrainTo&&(this.state.constrainTo=o.from(this.config.constrainTo)),this.callConfig("onDragInit",t)},onDragStart:function(t){this.state.initPageCoords=n(t),this.state.didDrag=this.state.config.didDrag=!0,this.callConfig("onDragStart",t)},onDrag:function(t){var e=this.state.config,i=this.state.initPageCoords,r=n(t),o=e.diff={left:r.pageX-i.pageX,top:r.pageY-i.pageY};if(this.state.initialRegion){var s=e.dragRegion;s.set(this.state.initialRegion),s.shift(o),this.state.constrainTo&&(s.constrainTo(this.state.constrainTo),o.left=s.left-this.state.initialRegion.left,o.top=s.top-this.state.initialRegion.top),e.dragRegion=s}this.callConfig("onDrag",t)},onDrop:function(t){this.callConfig("onDrop",t),this.state=null},callConfig:function(t,e){var i=this.state.config,n=[e,i],r=this.config[t];r&&r.apply(this,n)}}),t.exports=function(t,e){if(e.scope){var i={scope:1,region:1,constrainTo:1};Object.keys(e).forEach(function(t){var n=e[t];t in i||"function"==typeof n&&(e[t]=n.bind(e.scope))})}var n=new u(e);return n.initDrag(t),n}},function(t,e){(function(e){t.exports="ontouchstart"in e||e.DocumentTouch&&document instanceof DocumentTouch}).call(e,function(){return this}())},function(t,e,i){"use strict";var n=i(1);n.prototype.alignToRegion=function(t,e){return n.align(this,t,e),this},n.prototype.alignToPoint=function(t,e){return n.alignToPoint(this,t,e),this}},function(t,e,i){"use strict";var n=i(1);n.align=function(t,e,i){return e=n.from(e),i=(i||"c-c").split("-"),2!=i.length&&console.warn("Incorrect region alignment! The align parameter need to be in the form 'br-c', that is, a - separated string!",i),n.alignToPoint(t,e.getPoint(i[1]),i[0])},n.alignToPoint=function(t,e,i){t=n.from(t);var r=t.getPoint(i),o=0,s={};return null!=r.x&&null!=e.x&&(o++,s.left=e.x-r.x),null!=r.y&&null!=e.y&&(o++,s.top=e.y-r.y),o&&t.shift(s),t}},function(t,e,i){"use strict";function n(t,e,i,n){e=r.from(e),n=n||{};var o=n.constrain,s=n.sync,a=n.offset||[],u=!1,l=!1,h=t.clone();Array.isArray(i)||(i=i?[i]:[]),Array.isArray(a)||(a=a?[a]:[]),o&&(o=o===!0?r.getDocRegion():o.getRegion()),s&&(s.size?(u=!0,l=!0):(u=s===!0?!0:s.width||!1,l=s===!0?!0:s.height||!1)),u&&h.setWidth(e.getWidth()),l&&h.setHeight(e.getHeight());for(var c,f,p,d,g=0,v=i.length,m=-1,y=-1;v>g;g++){if(f=i[g],c=a[g],h.alignToRegion(e,f),c&&(Array.isArray(c)||(c=a[g]=[c.x||c.left,c.y||c.top]),h.shift({left:c[0],top:c[1]})),!o)return t.set(h),f;if(p=h.getIntersection(o),p&&p.equals(h))return t.set(h),f;p&&(d=p.getArea())>m&&(m=d,y=g)}return~y?(f=i[y],c=a[y],h.alignToRegion(e,f),c&&h.shift({left:c[0],top:c[1]}),p=h.getIntersection(o),h.setRegion(p),h.alignToRegion(e,f),c&&h.shift({left:c[0],top:c[1]}),t.set(h),f):void 0}var r=i(1);t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){t=o.from(t);var s=t.clone(),a=r(s,e,i,n);return{position:a,region:s,widthChanged:s.getWidth()!=t.getWidth(),heightChanged:s.getHeight()!=t.getHeight(),positionChanged:s.equalsPosition(t)}}var r=i(49),o=i(1);t.exports=n},function(t,e,i){"use strict";var n=i(1);i(48),i(47);var r=i(50);n.alignRegions=function(t,e,i,n){var o=r(t,e,i,n),s=o.region;return s.equals(t)||t.setRegion(s),o.position},n.prototype.alignTo=function(t,e,i){i=i||{};var o=this,s=n.from(t),a=r(o,s,e,i),u=a.region;return u.equalsSize(o)||this.setSize(u.getSize()),u.equalsPosition(o)||this.setPosition(u.getPosition(),{absolute:!!i.absolute}),a.position},t.exports=n},function(t){"use once";t.exports=function(t,e){var i,n;return function(){return i?n:(i=!0,n=t.apply(e||this,arguments))}}},function(t){"use strict";function e(t,e){if(n)return n.call(t,e);for(var i=t.parentNode.querySelectorAll(e),r=0;r<i.length;r++)if(i[r]==t)return!0;return!1}var i=Element.prototype,n=i.matches||i.matchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector;t.exports=e},function(t,e,i){"use strict";t.exports=i(55)?{onMouseDown:"onTouchStart",onMouseUp:"onTouchEnd",onMouseMove:"onTouchMove"}:{onMouseDown:"onMouseDown",onMouseUp:"onMouseUp",onMouseMove:"onMouseMove"} },46,function(t,e,i){"use strict";var n=(i(11),i(15)),r=i(16),o=i(14),s={};t.exports=function(t,e){var i=t+": "+e;if(s[i])return s[i];o.style[t]=e;var a,u,l;return o.style[t]!==e&&(a=n("appearance"),u=r(t),l="-"+a.toLowerCase()+"-"+e,o.style[u]=l,o.style[u]===l&&(e=l)),s[i]=e,e}},29,31,function(t,e,i){"use strict";var n=i(56);t.exports=function(t){return t.plugins=t.plugins||[function(){var t={flex:1,"inline-flex":1};return function(e,i){return"display"===e&&i in t?{key:e,value:n(e,i)}:void 0}}()],t.plugin=function(e){t.plugins=t.plugins||[],t.plugins.push(e)},t}},function(t){"use strict";function e(t,e){function i(n){function r(){var r=arguments.length,o=[].concat(n);return r&&o.push.apply(o,arguments),o.length<e?i(o):t.apply(this,o)}return r}return"number"!=typeof e&&(e=t.length),i([])}t.exports=e},function(t,e,i){"use strict";var n=i(60),r=i(62);t.exports=n(function(t,e){for(;e=e.parentElement;)if(r.call(e,t))return e})},function(t){"use strict";var e=Element.prototype,i=e.matches||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;t.exports=i},function(t){"use strict";function e(){var t,e=10,i=0,n=1e5,r={};return{getNextZIndex:function(){return i+=e,n+i},register:function(e,i){r[i]=e,t=e},unregister:function(t){delete r[t]},toTop:function(){}}}t.exports=e()},function(t,e,i){"use strict";var n=i(3),r=i(10);t.exports={prepareBodyStyle:function(t){var e=n({padding:t.bodyPadding,border:t.bodyBorder},t.defaultBodyStyle,t.bodyStyle);return r(e)},prepareTitleStyle:function(t){var e=n({padding:t.titlePadding,border:t.titleBorder},t.defaultTitleStyle,t.titleStyle);return this.props.draggable&&(e.cursor=t.dragCursor),r(e)}}},function(t){"use strict";t.exports=function(t,e,i,n,r,o,s,a){return 1==r.length?0===n||s?(e=t/o,n=r in{l:1,t:1}?-1:1):(t=o*e,i=r in{t:1,l:1}?-1:1):i==n?0>i?a!==!0&&(s||0>t-o*e)?e=t/o:t=e*o:s!==!0&&(a||0>t-o*e)?t=o*e:e=t/o:0>i?a!==!0&&(s||0>t+o*e)?e=-t/o:t=-e*o:s!==!0&&(a||0>t+o*e)?t=-e*o:e=-t/o,[t,e,i,n]}},function(t,e,i){"use strict";var n=i(3),r=i(10),o=function(){return{t:{x:0,y:-1},tl:{x:-1,y:-1},tr:{x:1,y:-1},l:{x:-1,y:0},bl:{x:-1,y:1},b:{x:0,y:1},br:{x:1,y:1},r:{x:1,y:0}}}(),s=function(t){var e=!1,i=5;t&&t.width&&(i=t.width),t&&t.outside&&(e=t.outside);var n=i/2;return{t:{top:e?o.t.y*i:-n,left:e?o.t.x*i:n,right:e?0:n,height:i,cursor:"n-resize"},tl:{top:e?o.tl.y*i:-n,left:e?o.tl.x*i:-n,width:i,height:i,cursor:"nw-resize"},tr:{top:e?o.tr.y*i:-n,right:e?-o.tr.x*i:-n,width:i,height:i,cursor:"ne-resize"},l:{top:e?o.l.y*i:n,left:e?o.l.x*i:-n,bottom:e?0:n,width:i,cursor:"w-resize"},bl:{bottom:e?-o.bl.y*i:-n,left:e?o.bl.x*i:-n,width:i,height:i,cursor:"sw-resize"},b:{bottom:e?-o.b.y*i:-n,left:e?-o.b.x*i:n,height:i,right:e?0:n,cursor:"s-resize"},br:{bottom:e?-o.br.y*i:-n,right:e?-o.br.x*i:-n,width:i,height:i,cursor:"se-resize"},r:{top:e?-o.r.y*i:n,right:e?-o.r.x*i:-n,bottom:e?0:n,width:i,cursor:"e-resize"}}},a={position:"absolute",boxSizing:"border-box",userSelect:"none",display:"block",zIndex:10};t.exports=function(t){var e=s(t),i={};return Object.keys(o).forEach(function(s){var u=n({},o[s]);u.style=r(n({},a,t.handleStyle,e[s])),i[s]=u}),i}},function(t,e,i){"use strict";var n=i(65),r=i(68),o=Math.abs,s=function(t){return 0===t?1:0>t?-1:1};t.exports=function(t){var e=t.diff.left,i=t.diff.top;t.horizontalResizeOnly&&(i=0),t.verticalResizeOnly&&(e=0);var a,u=t.activeHandle,l=t.initialResizeRegion,h=u.x,c=u.y,f=u.name,p=t.sizeContraints,d=t.constrainRegion,g=h,v=c,m=o(e),y=o(i),b=e?e/m:1,x=i?i/y:1,S=l.clone(),w=t.keepAspectRatio,R=t.aspectRatio,z=S.width,C=S.height;e=h>0?Math.max(e,-z):Math.min(e,z),i=c>0?Math.max(i,-C):Math.min(i,C),w?(a=n(e,i,h,c,f,R),e=a[0],i=a[1],h=a[2],c=a[3],b=s(e),x=s(i)):(h||(e=0),c||(i=0));var M,D;return e&&(M=r(e,h,S,["left","right"],"width",p,d)),w&&M&&M.constrained&&(e=b*o(M.addValue),a=n(e,i,g,v,f,R,!0),e=a[0],i=a[1],h=a[2],c=a[3],x=s(i)),i&&(D=r(i,c,S,["top","bottom"],"height",p,d)),w&&D&&M&&D.constrained&&(S.set(M.restore).shift(D.shiftObject).add(D.addObject),i=x*o(D.addValue),a=n(e,i,h,c,f,R,!1,!0),e=a[0],h=a[2],r(e,h,S,["left","right"],"width",p,d)),S?S:void 0}},function(t,e,i){"use strict";function n(t,e,i,n){var r,s={};return s[i]=!0,r=t.diff(e,s),o(Math[0>n?"max":"min"](0,r[i]))}var r=i(71),o=Math.abs;t.exports=function(t,e,i,s,a,u,l){var h=s[0],c=s[1],f={},p={},d=!1,g=r(a),v="get"+g,m="min"+g,y="max"+g;0>t?0>e?(d=!0,f[h]=t,p[c]=o(t)):p[c]=t:t>=0&&(e>0?p[c]=t:0>e&&(d=!0,p[c]=-t,f[h]=t));var b,x,S=p[c],w=S,R=!1,z=u[m],C=u[y],M=!1;(z||C)&&(x=i[v](),b=x+S,z&&z>b&&(S+=z-b,R=!0),C&&b>C&&(S-=b-C,M=!0,R=!0));var D,_=i.clone(),P=0>e?h:c;return R&&(p[c]=S,d&&(f[h]=-S)),i.shift(f).add(p),l&&!l.containsRegion(i)&&(R=!0,D=n(l,i,P,e),D&&(M&&(S=w,p[c]=S,d&&(f[h]=-S),D=n(l,_.clone().shift(f).add(p),P,e)),S-=D,p[c]=S,d&&(f[h]=-S),i.set(_).shift(f).add(p))),{addObject:p,shiftObject:f,addValue:S,constrained:R,shifted:d,restore:_}}},function(t,e,i){"use strict";var n=i(1),r=i(61);t.exports=function(t,e){var i;return t===!0&&(i=n.getDocRegion()),i||"string"!=typeof t||(i=n.from(r(t,e))),i||"function"!=typeof t||(i=n.from(t())),i}},function(t,e,i){"use strict";var n=i(1);t.exports=function(t){var e=n.from(t.parentNode),i=n.from(t);return i.shift({left:-e.left,top:-e.top}),i}},function(t){"use strict";t.exports=function(t){return t?t.charAt(0).toUpperCase()+t.substring(1):""}},function(t){t.exports=function(){"use strict";var t={};return function(e){if(!t[e]){for(var i=[],n=0;e>n;n++)i.push("a["+n+"]");t[e]=new Function("c","a","return new c("+i.join(",")+")")}return t[e]}}()},function(t,e,i){var n=i(72);t.exports=function(t,e){return n(e.length)(t,e)}},3,function(t,e,i){"use strict";function n(t,e,i){return t&&i.forEach(function(i){r(t,i)&&(e[i]=t[i])}),e}var r=i(17),o=i(73),s=i(74),a=i(33).EventEmitter,u=i(76),l=i(18),h=Object.prototype.toString,c=function(t){return"[object Object]"===h.apply(t)},f={cy:"YCenter",cx:"XCenter",t:"Top",tc:"TopCenter",tl:"TopLeft",tr:"TopRight",b:"Bottom",bc:"BottomCenter",bl:"BottomLeft",br:"BottomRight",l:"Left",lc:"LeftCenter",r:"Right",rc:"RightCenter",c:"Center"},p=function(t,e,i,r){return this instanceof p?(a.call(this),c(t)?(n(t,this,["top","right","bottom","left"]),null==t.bottom&&null!=t.height&&(this.bottom=this.top+t.height),null==t.right&&null!=t.width&&(this.right=this.left+t.width),t.emitChangeEvents&&(this.emitChangeEvents=t.emitChangeEvents)):(this.top=t,this.right=e,this.bottom=i,this.left=r),this[0]=this.left,this[1]=this.top,void l(this)):o(p,arguments)};u(p,a),s(p.prototype,{emitChangeEvents:!1,getRegion:function(t){return t?this.clone():this},setRegion:function(t){return this.set(t instanceof p?t.get():t),this},validate:function(){return p.validate(this)},_before:function(){return this.emitChangeEvents?n(this,{},["left","top","bottom","right"]):void 0},_after:function(t){this.emitChangeEvents&&((this.top!=t.top||this.left!=t.left)&&this.emitPositionChange(),(this.right!=t.right||this.bottom!=t.bottom)&&this.emitSizeChange())},notifyPositionChange:function(){this.emit("changeposition",this)},emitPositionChange:function(){this.notifyPositionChange()},notifySizeChange:function(){this.emit("changesize",this)},emitSizeChange:function(){this.notifySizeChange()},add:function(t){var e,i=this._before();for(e in t)r(t,e)&&(this[e]+=t[e]);return this[0]=this.left,this[1]=this.top,this._after(i),this},substract:function(t){var e,i=this._before();for(e in t)r(t,e)&&(this[e]-=t[e]);return this[0]=this.left,this[1]=this.top,this._after(i),this},getSize:function(){return{width:this.width,height:this.height}},setPosition:function(t){var e=this.width,i=this.height;return void 0!=t.left&&(t.right=t.left+e),void 0!=t.top&&(t.bottom=t.top+i),this.set(t)},setSize:function(t){return void 0!=t.height&&void 0!=t.width?this.set({right:this.left+t.width,bottom:this.top+t.height}):(void 0!=t.width&&this.setWidth(t.width),void 0!=t.height&&this.setHeight(t.height),this)},setWidth:function(t){return this.set({right:this.left+t})},setHeight:function(t){return this.set({bottom:this.top+t})},set:function(t){var e=this._before();return n(t,this,["left","top","bottom","right"]),null==t.bottom&&null!=t.height&&(this.bottom=this.top+t.height),null==t.right&&null!=t.width&&(this.right=this.left+t.width),this[0]=this.left,this[1]=this.top,this._after(e),this},get:function(t){return t?this[t]:n(this,{},["left","right","top","bottom"])},shift:function(t){var e=this._before();return t.top&&(this.top+=t.top,this.bottom+=t.top),t.left&&(this.left+=t.left,this.right+=t.left),this[0]=this.left,this[1]=this.top,this._after(e),this},unshift:function(t){return t.top&&(t.top*=-1),t.left&&(t.left*=-1),this.shift(t)},equals:function(t){return this.equalsPosition(t)&&this.equalsSize(t)},equalsSize:function(t){var e=t instanceof p,i={width:null==t.width&&e?t.getWidth():t.width,height:null==t.height&&e?t.getHeight():t.height};return this.getWidth()==i.width&&this.getHeight()==i.height},equalsPosition:function(t){return this.top==t.top&&this.left==t.left},addLeft:function(t){var e=this._before();return this.left=this[0]=this.left+t,this._after(e),this},addTop:function(t){var e=this._before();return this.top=this[1]=this.top+t,this._after(e),this},addBottom:function(t){var e=this._before();return this.bottom+=t,this._after(e),this},addRight:function(t){var e=this._before();return this.right+=t,this._after(e),this},minTop:function(){return this.expand({top:1})},maxBottom:function(){return this.expand({bottom:1})},minLeft:function(){return this.expand({left:1})},maxRight:function(){return this.expand({right:1})},expand:function(t,e){var i,o=e||p.getDocRegion(),s=[],a=this._before();for(i in t)r(t,i)&&s.push(i);return n(o,this,s),this[0]=this.left,this[1]=this.top,this._after(a),this},clone:function(){return new p({top:this.top,left:this.left,right:this.right,bottom:this.bottom})},containsPoint:function(t,e){return 1==arguments.length&&(e=t.y,t=t.x),this.left<=t&&t<=this.right&&this.top<=e&&e<=this.bottom},containsRegion:function(t){return this.containsPoint(t.left,t.top)&&this.containsPoint(t.right,t.bottom)},diffHeight:function(t){return this.diff(t,{top:!0,bottom:!0})},diffWidth:function(t){return this.diff(t,{left:!0,right:!0})},diff:function(t,e){var i,n={};for(i in e)r(e,i)&&(n[i]=this[i]-t[i]);return n},getPosition:function(){return{left:this.left,top:this.top}},getPoint:function(t,e){f[t]||console.warn("The position ",t," could not be found! Available options are tl, bl, tr, br, l, r, t, b.");var i="getPoint"+f[t],n=this[i]();return e?{left:n.x,top:n.y}:n},getPointYCenter:function(){return{x:null,y:this.top+this.getHeight()/2}},getPointXCenter:function(){return{x:this.left+this.getWidth()/2,y:null}},getPointTop:function(){return{x:null,y:this.top}},getPointTopCenter:function(){return{x:this.left+this.getWidth()/2,y:this.top}},getPointTopLeft:function(){return{x:this.left,y:this.top}},getPointTopRight:function(){return{x:this.right,y:this.top}},getPointBottom:function(){return{x:null,y:this.bottom}},getPointBottomCenter:function(){return{x:this.left+this.getWidth()/2,y:this.bottom}},getPointBottomLeft:function(){return{x:this.left,y:this.bottom}},getPointBottomRight:function(){return{x:this.right,y:this.bottom}},getPointLeft:function(){return{x:this.left,y:null}},getPointLeftCenter:function(){return{x:this.left,y:this.top+this.getHeight()/2}},getPointRight:function(){return{x:this.right,y:null}},getPointRightCenter:function(){return{x:this.right,y:this.top+this.getHeight()/2}},getPointCenter:function(){return{x:this.left+this.getWidth()/2,y:this.top+this.getHeight()/2}},getHeight:function(){return this.bottom-this.top},getWidth:function(){return this.right-this.left},getTop:function(){return this.top},getLeft:function(){return this.left},getBottom:function(){return this.bottom},getRight:function(){return this.right},getArea:function(){return this.getWidth()*this.getHeight()},constrainTo:function(t){var e,i=this.getIntersection(t);if(!i||!i.equals(this)){var n=t.getWidth(),r=t.getHeight();return this.getWidth()>n&&(this.left=t.left,this.setWidth(n)),this.getHeight()>r&&(this.top=t.top,this.setHeight(r)),e={},this.right>t.right&&(e.left=t.right-this.right),this.bottom>t.bottom&&(e.top=t.bottom-this.bottom),this.left<t.left&&(e.left=t.left-this.left),this.top<t.top&&(e.top=t.top-this.top),this.shift(e),!0}return!1},__IS_REGION:!0}),Object.defineProperties(p.prototype,{width:{get:function(){return this.getWidth()},set:function(t){return this.setWidth(t)}},height:{get:function(){return this.getHeight()},set:function(t){return this.setHeight(t)}}}),i(77)(p),t.exports=p},function(t){"use strict";t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}},function(t,e,i){"use strict";var n=i(17),r=i(18);t.exports=function(t){var e=Math.max,i=Math.min,o={init:function(){var e,i,r={getIntersection:!0,getIntersectionArea:!0,getIntersectionHeight:!0,getIntersectionWidth:!0,getUnion:!0},o=t.prototype,s=n(r);for(i in r)s(i)&&(e=r[i],"string"!=typeof e&&(e=i),function(e,i,n){e[i]=function(e){return t[n]||console.warn("cannot find method ",n," on ",t),t[n](this,e)}}(o,e,i))},validate:r,getDocRegion:function(){return t.fromDOM(document.documentElement)},from:function(e){if(e.__IS_REGION)return e;if("undefined"!=typeof document){if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return t.fromDOM(e);if(e.type&&"undefined"!=typeof e.pageX&&"undefined"!=typeof e.pageY)return t.fromEvent(e)}return t(e)},fromEvent:function(e){return t.fromPoint({x:e.pageX,y:e.pageY})},fromDOM:function(e){var i=e.getBoundingClientRect();return new t({top:i.top,left:i.left,bottom:i.bottom,right:i.right})},getIntersection:function(e,i){var n=this.getIntersectionArea(e,i);return n?new t(n):!1},getIntersectionWidth:function(t,n){var r=i(t.right,n.right),o=e(t.left,n.left);return r>o?r-o:0},getIntersectionHeight:function(t,n){var r=e(t.top,n.top),o=i(t.bottom,n.bottom);return o>r?o-r:0},getIntersectionArea:function(t,n){var r=e(t.top,n.top),o=i(t.right,n.right),s=i(t.bottom,n.bottom),a=e(t.left,n.left);return s>r&&o>a?{top:r,right:o,bottom:s,left:a,width:o-a,height:s-r}:!1},getUnion:function(n,r){var o=i(n.top,r.top),s=e(n.right,r.right),a=e(n.bottom,r.bottom),u=i(n.left,r.left);return new t(o,s,a,u)},getRegion:function(e){return t.from(e)},fromPoint:function(e){return new t({top:e.y,bottom:e.y,left:e.x,right:e.x})}};Object.keys(o).forEach(function(e){t[e]=o[e]}),t.init()}},function(t,e,i,n,r,o){"use strict";var s=i(n),a=i(r),u=i(o);t.exports=function(t){if(!u[t])return t;var e=a(t);return e?e+s(t):t}},function(t,e,i,n,r){"use strict";var o,s=i(n),a=["ms","Moz","Webkit","O"],u=i(r);t.exports=function(t){if(o)return o;for(var e,i,n=0,r=a.length;r>n;n++)if(i=a[n],e=i+s(t),"undefined"!=typeof u.style[e])return o=i}},function(t,e,i,n,r,o,s){"use strict";function a(t,e){var i={key:t,value:e};return(p.plugins||[]).forEach(function(n){var r=c(function(i){return n(t,e,i)},i);r&&(i=r)}),i}function u(t,e){var i=a(t,e);return c(function(t){return{key:h(t.key,t.value),value:t.value}},i)}var l=i(n),h=i(r),c=i(o),f=i(s),p=function(t){var e,i,n={};for(e in t)if(l(t,e)){if(i=u(e,t[e]),!i)continue;c(function(t){n[t.key]=t.value},i)}return n};t.exports=f(p)},function(t,e,i,n,r){"use strict";var o=i(n),s=i(r);t.exports=function(t,e){return s[t]?o(t,e):t}},function(t,e,i,n,r,o){"use strict";var s=i(n),a=i(r),u=i(o),l={},h=u.style;t.exports=function(t){var e=t;if(l[e])return l[e];var i,n;return t in h||(i=a("appearance"),i&&(n=i+s(t),n in h&&(t=n))),l[e]=t,t}},function(t,e,i,n){"use strict";var r=i(n);t.exports=function(t){return t.plugins=t.plugins||[function(){var t={flex:1,"inline-flex":1};return function(e,i){return"display"===e&&i in t?{key:e,value:r(e,i)}:void 0}}()],t.plugin=function(e){t.plugins=t.plugins||[],t.plugins.push(e)},t}},function(t,e,i,n,r,o){"use strict";var s=i(n),a=i(r),u=i(o),l={},h=u.style;t.exports=function(t,e){var i=t+": "+e;if(l[i])return l[i];var n,r,o;return t in h||(n=s("appearance"),n&&(r=a(t,e),o="-"+n.toLowerCase()+"-"+e,r in h&&(u.style[r]="",u.style[r]=o,""!==u.style[r]&&(e=o)))),l[i]=e,e}}]))});