UNPKG

zangai-react

Version:
1 lines 41.4 kB
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("react"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["React","ReactDOM"],e);else{var n="object"==typeof exports?e(require("react"),require("react-dom")):e(t.React,t.ReactDOM);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){t.exports=n(4)()},function(t,e,n){"use strict";e.__esModule=!0,e.default=e.EXITING=e.ENTERED=e.ENTERING=e.EXITED=e.UNMOUNTED=void 0;var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}(n(2)),o=a(n(0)),i=a(n(1)),s=n(6);n(7);function a(t){return t&&t.__esModule?t:{default:t}}var u="unmounted";e.UNMOUNTED=u;var c="exited";e.EXITED=c;var l="entering";e.ENTERING=l;var p="entered";e.ENTERED=p;e.EXITING="exiting";var h=function(t){var e,n;function r(e,n){var r;r=t.call(this,e,n)||this;var o,i=n.transitionGroup,s=i&&!i.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?s?(o=c,r.appearStatus=l):o=p:o=e.unmountOnExit||e.mountOnEnter?u:c,r.state={status:o},r.nextCallback=null,r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var s=r.prototype;return s.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(t,e){return t.in&&e.status===u?{status:c}:null},s.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},s.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==l&&n!==p&&(e=l):n!==l&&n!==p||(e="exiting")}this.updateStatus(!1,e)},s.componentWillUnmount=function(){this.cancelNextCallback()},s.getTimeouts=function(){var t,e,n,r=this.props.timeout;return t=e=n=r,null!=r&&"number"!=typeof r&&(t=r.exit,e=r.enter,n=r.appear),{exit:t,enter:e,appear:n}},s.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e){this.cancelNextCallback();var n=i.default.findDOMNode(this);e===l?this.performEnter(n,t):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:u})},s.performEnter=function(t,e){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:e,i=this.getTimeouts();e||r?(this.props.onEnter(t,o),this.safeSetState({status:l},function(){n.props.onEntering(t,o),n.onTransitionEnd(t,i.enter,function(){n.safeSetState({status:p},function(){n.props.onEntered(t,o)})})})):this.safeSetState({status:p},function(){n.props.onEntered(t)})},s.performExit=function(t){var e=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(t),this.safeSetState({status:"exiting"},function(){e.props.onExiting(t),e.onTransitionEnd(t,r.exit,function(){e.safeSetState({status:c},function(){e.props.onExited(t)})})})):this.safeSetState({status:c},function(){e.props.onExited(t)})},s.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},s.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},s.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,e.nextCallback=null,t(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},s.onTransitionEnd=function(t,e,n){this.setNextCallback(n),t?(this.props.addEndListener&&this.props.addEndListener(t,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},s.render=function(){var t=this.state.status;if(t===u)return null;var e=this.props,n=e.children,r=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(e,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(t,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},r}(o.default.Component);function f(){}h.contextTypes={transitionGroup:r.object},h.childContextTypes={transitionGroup:function(){}},h.propTypes={},h.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:f,onEntering:f,onEntered:f,onExit:f,onExiting:f,onExited:f},h.UNMOUNTED=0,h.EXITED=1,h.ENTERING=2,h.ENTERED=3,h.EXITING=4;var d=(0,s.polyfill)(h);e.default=d},function(t,e,n){"use strict";var r=n(5);function o(){}t.exports=function(){function t(t,e,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=o,n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";function r(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=t&&this.setState(t)}function o(t){this.setState(function(e){var n=this.constructor.getDerivedStateFromProps(t,e);return null!=n?n:null}.bind(this))}function i(t,e){try{var n=this.props,r=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function s(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate)return t;var n=null,s=null,a=null;if("function"==typeof e.componentWillMount?n="componentWillMount":"function"==typeof e.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof e.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof e.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof e.componentWillUpdate?a="componentWillUpdate":"function"==typeof e.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var u=t.displayName||t.name,c="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof t.getDerivedStateFromProps&&(e.componentWillMount=r,e.componentWillReceiveProps=o),"function"==typeof e.getSnapshotBeforeUpdate){if("function"!=typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=i;var l=e.componentDidUpdate;e.componentDidUpdate=function(t,e,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,t,e,r)}}return t}n.r(e),n.d(e,"polyfill",function(){return s}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(t,e,n){"use strict";e.__esModule=!0,e.transitionTimeout=function(t){var e="transition"+t+"Timeout",n="transition"+t;return function(t){if(t[n]){if(null==t[e])return new Error(e+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof t[e])return new Error(e+" must be a number (in milliseconds)")}return null}},e.classNamesShape=e.timeoutsShape=void 0;var r,o=(r=n(2))&&r.__esModule?r:{default:r};var i=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);e.timeoutsShape=i;var s=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);e.classNamesShape=s},function(t,e,n){"use strict";n.r(e);var r=n(0);function o(t){var e=[];for(var n in t)t[n]&&e.push(n);return e.join(" ")}var i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n},u=(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}("submit","button","reset"),function(t){function e(e){var n=t.call(this,e)||this;return n.handleClick=function(t){var e=n.props.onClick;e&&e(t)},n}return i(e,t),e.prototype.isIcon=function(){var t=this.props.atIcon;return t?r.createElement("i",{className:"at-btn__icon icon "+t}):null},e.prototype.isLoading=function(){var t=this.props,e=t.atIcon;return t.atLoading&&!e?r.createElement("i",{className:"at-btn__icon icon at-btn__loading icon-loader"}):null},e.prototype.childrenExist=function(){return this.props.children?r.createElement("span",{className:"at-btn__text"},this.props.children," "):null},e.prototype.render=function(){var t,e=this.props,n=e.atType,i=e.atHollow,u=e.atSize,c=(e.atLoading,e.atShape,e.atIcon,a(e,["atType","atHollow","atSize","atLoading","atShape","atIcon"])),l=o(((t={"at-btn":!0})["at-btn--"+n]=!0,t["at-btn--"+n+"--hollow"]=i,t["at-btn--"+u]=u,t)),p=c,h=p.htmlType,f=a(p,["htmlType"]);return r.createElement("button",s({type:h||"button"},f,{onClick:this.handleClick,className:l}),this.isIcon(),this.isLoading(),this.childrenExist())},e.defaultProps={atType:"default"},e}(r.Component)),c=function(){function t(){}return t.prototype.render=function(){return r.createElement("div",null,"123")},t}(),l=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.prototype.render=function(){var t={};"inline"===this.props.atType&&(t={paddingLeft:23*(this.props.level+1)});var e=o({"at-menu__item":!0,"at-menu__item--active":this.props.active});return r.createElement("li",{className:e,style:t},r.createElement("div",{className:"at-menu__item-link"},this.props.children))},e.defaultProps={active:!1,level:0},e}(r.Component),h=n(1),f=function(){function t(){if(!t.isCreating)throw new Error("只能存在一个实例")}return t.getInstance=function(){return null==t.instance&&(t.isCreating=!0,t.instance=new t,t.instance.containerDom=document.createElement("div"),t.instance.containerDom.className="cdk-overlay-container",document.body.appendChild(t.instance.containerDom),t.isCreating=!1),t.instance},t.isCreating=!1,t}(),d=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(t){function e(e){var n=t.call(this,e)||this;return n.handleBackDropClick=function(){n.props.clickBackDrop&&n.props.clickBackDrop()},n.state={overlayPosition:{pointerEvents:"auto",top:0,left:0}},n}return d(e,t),e.prototype.componentDidMount=function(){var t=this;window.document.addEventListener("scroll",function(){t.calculateOriginPosition(t.props.origin)})},e.prototype.componentWillUnmount=function(){},e.prototype.componentDidUpdate=function(){},e.prototype.componentWillReceiveProps=function(t){this.calculateOriginPosition(t.origin)},e.prototype.renderOverlayPanel=function(){return this.props.open?[this.props.hasBackDrop?r.createElement("div",{onClick:this.handleBackDropClick,key:"A",className:"cdk-overlay-backdrop cdk-overlay-dark-backdrop cdk-overlay-backdrop-showing"}):null,r.createElement("div",{key:"B",className:"cdk-overlay-connected-position-bounding-box",style:{top:"0px",left:"0px",height:"100%",width:"100%"}},r.createElement("div",{className:"cdk-overlay-pane",style:this.state.overlayPosition},this.props.children))]:null},e.prototype.calculateOriginPosition=function(t){if(t){var e=t,n=e.getBoundingClientRect(),r=e.offsetWidth,o=e.offsetHeight,i={};switch(this.props.position){case"bottom":case"left":i={pointerEvents:"auto",left:n.left,top:n.top+o,minWidth:r};break;case"right":i={pointerEvents:"auto",left:n.left+r,top:n.top,minWidth:r};break;case"top":i={pointerEvents:"auto",left:n.left,top:n.top-o,minWidth:r};break;default:i={pointerEvents:"auto",left:n.left,top:n.top+o,minWidth:r}}this.setState({overlayPosition:i})}},e.prototype.render=function(){return h.createPortal(this.renderOverlayPanel(),f.getInstance().containerDom)},e.defaultProps={open:!1,hasBackDrop:!1,position:"bottom"},e}(r.Component),m=n(3),b=n.n(m),v={transition:"all 150ms ease-in-out",opacity:0},g={entering:{opacity:0,transform:"scaleY(0)",transformOrigin:"0% 0%"},entered:{opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}},_=function(t,e){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function E(t,e){function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function S(t){return"function"==typeof t}var w=!1,x={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;w=t},get useDeprecatedSynchronousErrorHandling(){return w}};function O(t){setTimeout(function(){throw t})}var T={closed:!0,next:function(t){},error:function(t){if(x.useDeprecatedSynchronousErrorHandling)throw t;O(t)},complete:function(){}},C=Array.isArray||function(t){return t&&"number"==typeof t.length};function P(t){return null!=t&&"object"==typeof t}var D,k={e:{}};function j(){try{return D.apply(this,arguments)}catch(t){return k.e=t,k}}function N(t){return D=t,j}function I(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}I.prototype=Object.create(Error.prototype);var U=I,A=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,r=this._parents,o=this._unsubscribe,i=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,a=r?r.length:0;n;)n.remove(this),n=++s<a&&r[s]||null;if(S(o))N(o).call(this)===k&&(e=!0,t=t||(k.e instanceof U?M(k.e.errors):[k.e]));if(C(i))for(s=-1,a=i.length;++s<a;){var u=i[s];if(P(u))if(N(u.unsubscribe).call(u)===k){e=!0,t=t||[];var c=k.e;c instanceof U?t=t.concat(M(c.errors)):t.push(c)}}if(e)throw new U(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function M(t){return t.reduce(function(t,e){return t.concat(e instanceof U?e.errors:e)},[])}var H="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),W=function(t){function e(n,r,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,i._parentSubscription=null,arguments.length){case 0:i.destination=T;break;case 1:if(!n){i.destination=T;break}if("object"==typeof n){n instanceof e?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new R(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new R(i,n,r,o)}return i}return E(e,t),e.prototype[H]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this._parentSubscription=null,this},e}(A),R=function(t){function e(e,n,r,o){var i,s=t.call(this)||this;s._parentSubscriber=e;var a=s;return S(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==T&&(S((a=Object.create(n)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=i,s._error=r,s._complete=o,s}return E(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;x.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=x.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):O(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;O(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};x.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),x.useDeprecatedSynchronousErrorHandling)throw t;O(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!x.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return x.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(O(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(W);var F="function"==typeof Symbol&&Symbol.observable||"@@observable";function L(){}function B(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:L}var G=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,o=function(t,e,n){if(t){if(t instanceof W)return t;if(t[H])return t[H]()}return t||e||n?new W(t,e,n):new W(T)}(t,e,n);if(r?r.call(o,this.source):o.add(this.source||x.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),x.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){x.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,r=e.destination,o=e.isStopped;if(n||o)return!1;t=r&&r instanceof W?r:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=V(e))(function(e,r){var o;o=n.subscribe(function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}},r,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[F]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:B(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=V(t))(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}();function V(t){if(t||(t=x.Promise||Promise),!t)throw new Error("no Promise impl found");return t}function Y(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}Y.prototype=Object.create(Error.prototype);var q=Y,z=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return E(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(A),$=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return E(e,t),e}(W),X=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return E(e,t),e.prototype[H]=function(){return new $(this)},e.prototype.lift=function(t){var e=new Z(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new q;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new q;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new q;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new q;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new q;return this.hasError?(t.error(this.thrownError),A.EMPTY):this.isStopped?(t.complete(),A.EMPTY):(this.observers.push(t),new z(this,t))},e.prototype.asObservable=function(){var t=new G;return t.source=this,t},e.create=function(t,e){return new Z(t,e)},e}(G),Z=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return E(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):A.EMPTY},e}(X),J=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return E(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return E(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(A)),K=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),Q=new(function(t){function e(n,r){void 0===r&&(r=K.now);var o=t.call(this,n,function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return E(e,t),e.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,o):t.prototype.schedule.call(this,n,r,o)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(K))(J),tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return E(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(W),et=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=r,o.index=0,o}return E(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(W);function nt(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var rt=nt();var ot=function(t){if(t instanceof G)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[F])return i=t,function(t){var e=i[F]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if((o=t)&&"number"==typeof o.length&&"function"!=typeof o)return r=t,function(t){for(var e=0,n=r.length;e<n&&!t.closed;e++)t.next(r[e]);t.closed||t.complete()};if(function(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}(t))return n=t,function(t){return n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,O),t};if(t&&"function"==typeof t[rt])return e=t,function(t){for(var n=e[rt]();;){var r=n.next();if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add(function(){n.return&&n.return()}),t};var e,n,r,o,i,s=P(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+s+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};var it=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new st(t,this.durationSelector))},t}(),st=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return E(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=N(this.durationSelector)(t);if(e===k)this.destination.error(k.e);else{var n=function(t,e,n,r,o){if(void 0===o&&(o=new et(t,n,r)),!o.closed)return ot(e)(o)}(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(tt);function at(t){return!C(t)&&t-parseFloat(t)+1>=0}function ut(t){return t&&"function"==typeof t.schedule}function ct(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}function lt(t,e){return void 0===e&&(e=Q),n=function(){return function(t,e,n){void 0===t&&(t=0);var r=-1;return at(e)?r=Number(e)<1?1:Number(e):ut(e)&&(n=e),ut(n)||(n=Q),new G(function(e){var o=at(t)?t:+t-n.now();return n.schedule(ct,o,{index:0,period:r,subscriber:e})})}(t,e)},function(t){return t.lift(new it(n))};var n}var pt=function(){return(pt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ht=function(t,e){return t?r.Children.map(t,function(n,o){return"string"==typeof t.type&&(e={}),r.cloneElement(n,pt({index:o},e))}):null},ft=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dt=function(){return(dt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},yt={animating:"rah-animating",animatingUp:"rah-animating--up",animatingDown:"rah-animating--down",animatingToHeightZero:"rah-animating--to-height-zero",animatingToHeightAuto:"rah-animating--to-height-auto",animatingToHeightSpecific:"rah-animating--to-height-specific",static:"rah-static",staticHeightZero:"rah-static--height-zero",staticHeightAuto:"rah-static--height-auto",staticHeightSpecific:"rah-static--height-specific"},mt=["animateOpacity","animationStateClasses","applyInlineTransitions","children","contentClassName","delay","duration","easing","height","onAnimationEnd","onAnimationStart"];function bt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function vt(t){return"string"==typeof t&&t.search("%")===t.length-1&&bt(t.substr(0,t.length-1))}function gt(t,e){t&&"function"==typeof t&&t(e)}var _t=function(t){function e(e){var n=t.call(this,e)||this,r="auto",o="visible";bt(e.height)?(r=e.height<0?0:e.height,o="hidden"):vt(e.height)&&(r=e.height,o="hidden"),n.animationStateClasses=dt({},yt,e.animationStateClasses);var i=n.getStaticStateClasses(r);return n.state={animationStateClasses:i,height:r,overflow:o,shouldUseTransitions:!1},n}return ft(e,t),e.prototype.componentDidMount=function(){var t=this.state.height;this.contentElement&&this.contentElement.style&&this.hideContent(t)},e.prototype.componentDidUpdate=function(t,e){var n,r,i=this,s=this.props,a=s.delay,u=s.duration,c=s.height,l=s.onAnimationEnd,p=s.onAnimationStart;if(this.contentElement&&c!==t.height){this.showContent(e.height),this.contentElement.style.overflow="hidden";var h=this.contentElement.offsetHeight;this.contentElement.style.overflow="";var f=u+a,d=null,y={height:null,overflow:"hidden"},m="auto"===e.height;bt(c)?(d=c<0?0:c,y.height=d):vt(c)?(d=c,y.height=d):(d=h,y.height="auto",y.overflow=null),m&&(y.height=d,d=h);var b=o(((n={})[this.animationStateClasses.animating]=!0,n[this.animationStateClasses.animatingUp]="auto"===t.height||c<t.height,n[this.animationStateClasses.animatingDown]="auto"===c||c>t.height,n[this.animationStateClasses.animatingToHeightZero]=0===y.height,n[this.animationStateClasses.animatingToHeightAuto]="auto"===y.height,n[this.animationStateClasses.animatingToHeightSpecific]=y.height>0,n)),v=this.getStaticStateClasses(y.height);this.setState({animationStateClasses:b,height:d,overflow:"hidden",shouldUseTransitions:!m}),clearTimeout(this.timeoutID),clearTimeout(this.animationClassesTimeoutID),m?(y.shouldUseTransitions=!0,r=function(){i.setState(y),p&&gt(p,{newHeight:y.height})},requestAnimationFrame(function(){requestAnimationFrame(function(){r()})}),this.animationClassesTimeoutID=setTimeout(function(){i.setState({animationStateClasses:v,shouldUseTransitions:!1}),i.hideContent(y.height),l&&gt(l,{newHeight:y.height})},f)):(p&&gt(p,{newHeight:d}),this.timeoutID=setTimeout(function(){y.animationStateClasses=v,y.shouldUseTransitions=!1,i.setState(y),"auto"!==c&&i.hideContent(d),l&&gt(l,{newHeight:d})},f))}},e.prototype.componentWillUnmount=function(){clearTimeout(this.timeoutID),clearTimeout(this.animationClassesTimeoutID),this.timeoutID=null,this.animationClassesTimeoutID=null,this.animationStateClasses=null},e.prototype.showContent=function(t){0===t&&(this.contentElement.style.display="")},e.prototype.hideContent=function(t){0===t&&(this.contentElement.style.display="none")},e.prototype.getStaticStateClasses=function(t){var e;return o(((e={})[this.animationStateClasses.static]=!0,e[this.animationStateClasses.staticHeightZero]=0===t,e[this.animationStateClasses.staticHeightSpecific]=t>0,e[this.animationStateClasses.staticHeightAuto]="auto"===t,e))},e.prototype.render=function(){var t,e=this,n=this.props,i=n.animateOpacity,s=n.applyInlineTransitions,a=n.children,u=n.className,c=n.contentClassName,l=n.duration,p=n.easing,h=n.delay,f=n.style,d=this.state,y=d.height,m=d.overflow,b=d.animationStateClasses,v=d.shouldUseTransitions,g=dt({},f,{height:y,overflow:m||f.overflow});v&&s&&(g.transition="height "+l+"ms "+p+" "+h+"ms",f.transition&&(g.transition=f.transition+", "+g.transition),g.WebkitTransition=g.transition);var _={};i&&(_.transition="opacity "+l+"ms "+p+" "+h+"ms",_.WebkitTransition=_.transition,0===y&&(_.opacity=0));var E=o(((t={})[b]=!0,t[u]=u,t));return r.createElement("div",dt({},function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!e.length)return t;for(var r={},o=Object.keys(t),i=0;i<o.length;i++){var s=o[i];-1===e.indexOf(s)&&(r[s]=t[s])}return r}.apply(void 0,[this.props].concat(mt)),{"aria-hidden":0===y,className:E,style:g}),r.createElement("div",{className:c,style:_,ref:function(t){return e.contentElement=t}},a))},e.defaultProps={animateOpacity:!1,animationStateClasses:yt,applyInlineTransitions:!0,duration:250,delay:0,easing:"ease",style:{},onAnimationEnd:function(){},onAnimationStart:function(){}},e}(r.Component),Et=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),St=function(){return(St=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wt=function(t){function e(e){var n=t.call(this,e)||this;return n.$mouseSubject=new X,n.$mouseSub=A.EMPTY,n.setTitle=function(t){n.setState({titleRef:t})},n.handleClick=function(t){var e=!n.state.open;n.setState({open:e})},n.handleEnter=function(t){t.preventDefault();"inline"!==n.props.atType&&n.$mouseSubject.next(!0)},n.handleLeave=function(t){t.preventDefault();"inline"!==n.props.atType&&n.$mouseSubject.next(!1)},n.close=function(){n.$mouseSubject.next(!1)},n.state={titleRef:null,open:e.open,animation:!1},n}return Et(e,t),e.prototype.componentDidMount=function(){var t=this;this.$mouseSubject.asObservable().pipe(lt(150)).subscribe(function(e){t.setState({open:e})})},e.prototype.componentWillUnmount=function(){this.$mouseSub.unsubscribe()},e.prototype.render=function(){var t,e,n=this,i=o({"at-menu__submenu":!0,"at-menu__submenu--opened":this.state.open}),s=o(((t={"overlay-menu":!0})["overlay-menu-"+this.props.atType]=!0,t["at-menu--"+this.props.theme]=!0,t)),a=o(((e={"at-menu__submenu-title":!0})["menu-item-on-hover-"+this.props.atType]=this.state.open,e)),u=0===this.props.level&&"horizontal"===this.props.atType?"bottom":"right",c="inline"===this.props.atType?{paddingLeft:23*(this.props.level+1)}:{},l=r.createElement(b.a,{in:this.state.open,timeout:15},function(t){return r.createElement(y,{position:u,origin:n.state.titleRef,open:n.state.open},r.createElement("div",{onMouseLeave:n.handleLeave,onMouseEnter:n.handleEnter,className:s,style:St({},v,g[t])},r.createElement("div",{className:"at-menu-dropdown__popover"},r.createElement("div",{className:"at-dropdown-menu"},ht(n.props.children,{level:n.props.level+1,atType:n.props.atType,theme:n.props.theme})))))}),p=r.createElement(_t,{duration:150,height:this.state.open?"auto":0},r.createElement("ul",{className:"at-sub-dropdown-menu"},ht(this.props.children,{level:this.props.level+1,atType:this.props.atType,theme:this.props.theme})));return r.createElement("li",{className:i},r.createElement("div",{onClick:this.handleClick,onMouseEnter:this.handleEnter,onMouseLeave:this.handleLeave,ref:this.setTitle,className:a,style:St({},c)},this.props.title,this.props.level>0&&"horizontal"===this.props.atType||"vertical"===this.props.atType&&this.props.children?r.createElement("i",{className:"icon icon-chevron-right right-arrow"}):null,"inline"===this.props.atType&&this.props.children?r.createElement("i",{className:"icon icon-chevron-up "+(this.state.open?"chevron_open":"")}):null),"inline"===this.props.atType?p:l)},e.defaultProps={level:0,open:!1},e}(r.Component),xt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n},Tt=function(t){function e(e){return t.call(this,e)||this}return xt(e,t),e.prototype.render=function(){var t,e=o(((t={"at-menu":!0})["at-menu--"+this.props.atType]=!0,t["at-menu--"+this.props.theme]=!0,t)),n=this.props,i=(n.children,Ot(n,["children"]));return r.createElement("ul",{className:e,style:this.props.style},ht(this.props.children,i))},e.MenuItem=p,e.SubMenu=wt,e.defaultProps={atType:"horizontal",theme:"light"},e}(r.Component);n.d(e,"AtButton",function(){return u}),n.d(e,"AtInput",function(){return c}),n.d(e,"AtMenu",function(){return Tt})}])});