Files
ai/charting_library/bundles/4.90dade8c8bd3cf734756.js

4 lines
9.7 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"1O6C":function(e,t,n){"use strict";var o,i,r,s,a,u,d,h;n.d(t,"a",function(){return h}),o=n("mrSG"),i=n("q1tI"),r=n("TSYQ"),s=n("+EG+"),a=n("jAh7"),u=n("QpNh"),d=n("aYmi"),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._manager=new a.OverlapManager,t._handleSlot=function(e){t._manager.setContainer(e)},t}return Object(o.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.rounded,n=void 0===t||t,a=e.shadowed,h=void 0===a||a,c=e.fullscreen,l=void 0!==c&&c,p=e.darker,_=void 0!==p&&p,g=e.className,f=e.backdrop,m=r(g,d.dialog,n&&d.rounded,h&&d.shadowed,l&&d.fullscreen,_&&d.darker),v=Object(u.a)(this.props);return i.createElement(i.Fragment,null,i.createElement(s.b.Provider,{value:this._manager},f&&i.createElement("div",{className:d.backdrop}),i.createElement("div",Object(o.__assign)({},v,{className:m,style:this._createStyles(),ref:this.props.reference,onFocus:this.props.onFocus,onMouseDown:this.props.onMouseDown,onMouseUp:this.props.onMouseUp,onClick:this.props.onClick,onKeyDown:this.props.onKeyDown,tabIndex:-1}),this.props.children)),i.createElement(s.a,{reference:this._handleSlot}))},t.prototype._createStyles=function(){var e=this.props,t=e.bottom,n=e.left,o=e.width;return{bottom:t,left:n,right:e.right,top:e.top,zIndex:e.zIndex,maxWidth:o,height:e.height}},t}(i.PureComponent)},RgaO:function(e,t,n){"use strict";function o(e){var t=e.children,n=Object(i.__rest)(e,["children"]);return t(Object(r.a)(n))}var i,r;n.d(t,"a",function(){return o}),i=n("mrSG"),r=n("8Rai")},WXjp:function(e,t,n){"use strict";function o(e,t,n,o){return e+t>o&&(e=o-t),e<n&&(e=n),e}function i(e){return{x:Object(m.clamp)(e.x,20,document.documentElement.clientWidth-20),y:Object(m.clamp)(e.y,20,window.innerHeight-20)}}function r(e){return{x:e.pageX,y:e.pageY}}function s(e){return{x:e.touches[0].pageX,y:e.touches[0].pageY}}var a,u,d,h=n("mrSG"),c=n("q1tI"),l=n("TSYQ"),p=n("Eyy1"),_=n("1O6C"),g=n("uqKQ"),f=n("RgaO"),m=n("Hr11"),v=function(){function e(e,t,n){var o=this;void 0===n&&(n={boundByScreen:!0}),this._drag=null,this._canBeTouchClick=!1,this._frame=null,this._onMouseDragStart=function(e){if(0===e.button){e.preventDefault(),document.addEventListener("mousemove",o._onMouseDragMove),document.addEventListener("mouseup",o._onMouseDragEnd);var t=i(r(e));o._dragStart(t)}},this._onTouchDragStart=function(e){o._canBeTouchClick=!0,e.preventDefault(),o._header.addEventListener("touchmove",o._onTouchDragMove,{passive:!1});var t=i(s(e));o._dragStart(t)},this._onMouseDragEnd=function(e){e.target instanceof Node&&o._header.contains(e.target)&&e.preventDefault(),document.removeEventListener("mousemove",o._onMouseDragMove),document.removeEventListener("mouseup",o._onMouseDragEnd),o._onDragStop()},this._onTouchDragEnd=function(e){o._header.removeEventListener("touchmove",o._onTouchDragMove),o._onDragStop(),o._canBeTouchClick&&(o._canBeTouchClick=!1,function(e){if(e instanceof SVGElement){var t=document.createEvent("SVGEvents");t.initEvent("click",!0,!0),
e.dispatchEvent(t)}e instanceof HTMLElement&&e.click()}(e.target))},this._onMouseDragMove=function(e){var t=i(r(e));o._dragMove(t)},this._onTouchDragMove=function(e){o._canBeTouchClick=!1,e.preventDefault();var t=i(s(e));o._dragMove(t)},this._onDragStop=function(){o._drag=null,o._header.classList.remove("dragging")},this._dialog=e,this._header=t,this._options=n,this._header.addEventListener("mousedown",this._onMouseDragStart),this._header.addEventListener("touchstart",this._onTouchDragStart),this._header.addEventListener("touchend",this._onTouchDragEnd)}return e.prototype.destroy=function(){null!==this._frame&&cancelAnimationFrame(this._frame),this._header.removeEventListener("mousedown",this._onMouseDragStart),document.removeEventListener("mouseup",this._onMouseDragEnd),this._header.removeEventListener("touchstart",this._onTouchDragStart),this._header.removeEventListener("touchend",this._onTouchDragEnd),document.removeEventListener("mouseleave",this._onMouseDragEnd)},e.prototype.updateOptions=function(e){this._options=e},e.prototype._dragStart=function(e){var t,n,o=this._dialog.getBoundingClientRect();this._drag={startX:e.x,startY:e.y,finishX:e.x,finishY:e.y,dialogX:o.left,dialogY:o.top},t=Math.round(o.left),n=Math.round(o.top),this._dialog.style.transform="translate("+t+"px, "+n+"px)",this._header.classList.add("dragging")},e.prototype._dragMove=function(e){var t=this;if(this._drag){if(this._drag.finishX=e.x,this._drag.finishY=e.y,null!==this._frame)return;this._frame=requestAnimationFrame(function(){var n,o;t._drag&&(n=e.x-t._drag.startX,o=e.y-t._drag.startY,t._moveDialog(t._drag.dialogX+n,t._drag.dialogY+o)),t._frame=null})}},e.prototype._moveDialog=function(e,t){var n=this._dialog.getBoundingClientRect(),i=this._options.boundByScreen,r=o(e,n.width,i?0:-1/0,i?window.innerWidth:1/0),s=o(t,n.height,i?0:-1/0,i?window.innerHeight:1/0);this._dialog.style.transform="translate("+Math.round(r)+"px, "+Math.round(s)+"px)"},e}(),y=function(){function e(e,t){var n=this;void 0===t&&(t={vertical:0}),this._frame=null,this._isFullscreen=!1,this._handleResize=function(){null===n._frame&&(n._frame=requestAnimationFrame(function(){n.recalculateBounds(),n._frame=null}))},this._dialog=e,this._options=t,this._initialHeight=e.style.height,window.addEventListener("resize",this._handleResize)}return e.prototype.updateOptions=function(e){void 0===e&&(e={vertical:0}),this._options=e},e.prototype.setFullscreen=function(e){this._isFullscreen!==e&&(this._isFullscreen=e,this.recalculateBounds())},e.prototype.centerAndFit=function(){var e,t,n=this._options.vertical,o=document.documentElement,i=o.clientHeight,r=o.clientWidth,s=i-2*n,a=this._dialog.getBoundingClientRect(),u=a.height;s<u&&(u=s,this._dialog.style.height=u+"px"),e=r/2-a.width/2,t=i/2-u/2,this._dialog.style.top="0px",this._dialog.style.left="0px",this._dialog.style.transform="translate("+Math.round(e)+"px, "+Math.round(t)+"px)"},e.prototype.recalculateBounds=function(){var e,t,n,i,r,s,a,u;this._dialog.style.height="auto",t=(e=document.documentElement).clientHeight,n=e.clientWidth,
this._isFullscreen?(this._dialog.style.top="0px",this._dialog.style.left="0px",this._dialog.style.width=n+"px",this._dialog.style.height=t+"px",this._dialog.style.transform="none"):(i=this._options.vertical,this._dialog.style.width="",this._dialog.style.height="",s=t-2*i,a=o((r=this._dialog.getBoundingClientRect()).left,r.width,0,n),u=o(r.top,r.height,i,t),this._dialog.style.top="0px",this._dialog.style.left="0px",this._dialog.style.transform="translate("+Math.round(a)+"px, "+Math.round(u)+"px)",this._dialog.style.height=s<r.height?s+"px":this._initialHeight)},e.prototype.destroy=function(){window.removeEventListener("resize",this._handleResize),null!==this._frame&&(cancelAnimationFrame(this._frame),this._frame=null)},e}(),E=n("AiMB"),M=n("pafz"),w=n("qFKp"),x=n("ZzSk");n.d(t,"a",function(){return d}),a={boundByScreen:!0},u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._dialog=null,t._handleDialogRef=function(e){var n=t.props.reference;t._dialog&&w.isIE&&t._dialog.removeEventListener("focusin",t._handleFocusin),t._dialog=e,t._dialog&&w.isIE&&t._dialog.addEventListener("focusin",t._handleFocusin),"function"==typeof n&&n(e)},t._handleFocusin=function(){w.isIE&&t._moveToTop()},t._handleFocus=function(e){w.isIE||t._moveToTop()},t._handleMouseDown=function(e){t._moveToTop()},t._handleTouchStart=function(e){t._moveToTop()},t}return Object(h.__extends)(t,e),t.prototype.render=function(){var e=this;return c.createElement(M.a.Provider,{value:this},c.createElement(f.a,{mouseDown:!0,touchStart:!0,handler:this.props.onClickOutside},function(t){return c.createElement("div",{ref:t,onFocus:e._handleFocus,onMouseDown:e._handleMouseDown,onTouchStart:e._handleTouchStart},c.createElement(_.a,Object(h.__assign)({},e.props,{reference:e._handleDialogRef,className:l(x.dialog,e.props.className)}),e.props.children))}))},t.prototype.componentDidMount=function(){var e=Object(p.ensureNotNull)(this._dialog),t=e.querySelector("[data-dragg-area]");t&&t instanceof HTMLElement&&(this._drag=new v(e,t,{boundByScreen:Boolean(this.props.boundByScreen)})),this._resize=new y(e,this.props.guard),this._resize.centerAndFit(),this._resize.setFullscreen(Boolean(this.props.fullscreen)),this.props.shouldForceFocus&&e.focus()},t.prototype.componentDidUpdate=function(){this._resize&&(this._resize.updateOptions(this.props.guard),this._resize.setFullscreen(Boolean(this.props.fullscreen))),this._drag&&this._drag.updateOptions({boundByScreen:Boolean(this.props.boundByScreen)})},t.prototype.componentWillUnmount=function(){this._drag&&this._drag.destroy(),this._resize&&this._resize.destroy()},t.prototype.centerAndFit=function(){this._resize&&this._resize.centerAndFit()},t.prototype.recalculateBounds=function(){this._resize&&this._resize.recalculateBounds()},t.prototype._moveToTop=function(){null!==this.context&&this.context.moveToTop()},t.contextType=E.b,t.defaultProps=a,t}(c.PureComponent),d=Object(g.a)(u)},ZzSk:function(e,t,n){e.exports={dialog:"dialog-34XTwGTT",dragging:"dragging-33JfMDO6"}},aYmi:function(e,t,n){e.exports={
dialog:"dialog-2APwxL3O",rounded:"rounded-tXI9mwGE",shadowed:"shadowed-2M13-xZa",fullscreen:"fullscreen-2RqU2pqU",darker:"darker-2nhdv2oS",backdrop:"backdrop-1tKdKmN_"}},pafz:function(e,t,n){"use strict";var o,i;n.d(t,"a",function(){return i}),o=n("q1tI"),i=o.createContext(null)},uqKQ:function(e,t,n){"use strict";function o(e){return function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(n,t),n.prototype.render=function(){var t,n=this.props,o=n.isOpened,a=n.root;return o?(t=r.createElement(e,Object(i.__assign)({},this.props,{zIndex:150})),"parent"===a?t:r.createElement(s.a,null,t)):null},n}(r.PureComponent)}var i,r,s;n.d(t,"a",function(){return o}),i=n("mrSG"),r=n("q1tI"),s=n("AiMB")}}]);