/*! For license information please see dll.Gate.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[50],{1728:function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r).a.createContext("anonymous");t.default=i},843:function(e,t,n){"use strict";n.r(t);var r=n(14),i=n.n(r),o=n(12),s=n.n(o),a=n(15),l=n.n(a),c=n(16),u=n.n(c),h=n(8),d=n.n(h),p=n(0),f=n.n(p),v=n(1),k=n.n(v),b=n(105),m=n(190),E=n(35),y=n(1728);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u()(this,n)}}var O=function(e){l()(n,e);var t=w(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,e)).state={isEnrolled:!1,isOwner:!1,validCheck:!e.check||e.check(r)},o}return s()(n,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0;var t=this.context;t&&(this.unsubscribe=t.subscribe((function(n,r){if(n!==b.RECEIVED_USER_RIGHTS&&n!==b.LOGGED_IN&&n!==b.LOGGED_OUT&&n!==m.TOGGLE_PRESENTATION_MODE||e.checkAuthorization(),e.props.check){var i=e.props.check(t);if(i!==e.state.validCheck)return e.setState({validCheck:i})}e._isMounted&&e.forceUpdate()})),this.checkAuthorization())}},{key:"componentDidUpdate",value:function(){if(this.props.check){var e=this.props.check(this.context);if(e!==this.state.validCheck)return this.setState({validCheck:e})}}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe(),this._isMounted=!1}},{key:"checkAuthorization",value:function(){var e=this.context,t={isEnrolled:e.isEnrolled(),isOwner:e.isOwner(),presentationMode:e.presentationMode};t.isEnrolled===this.state.isEnrolled&&t.isOwner===this.state.isOwner&&t.presentationMode===this.state.presentationMode||this.setState(t)}},{key:"isTimeActive",value:function(){if(!this.props.after&&!this.props.until)return!0;var e=this.context;return this.props.after&&this.props.until?this.props.after<e.startTime&&e.startTime<=this.props.until:this.props.until?e.startTime<=this.props.until:this.props.after<e.startTime}},{key:"renderChildren",value:function(e){return f.a.createElement("div",{className:"gate outer-element",style:{display:e?"inline":"none"}},e?null:this.props.banner,this.props.children)}},{key:"render",value:function(){var e=this,t=this.context;return f.a.createElement(y.default.Consumer,null,(function(n){var r=e.props,i=r.disabled,o=r.user,s=r.notUser,a=r.enrolled,l=r.notEnrolled,c=r.owner,u=r.notOwner,h=e.state.isEnrolled||"enrolled"===n,d=e.state.isOwner||"owner"===n,p=t&&!t.anonymous||"anonymous"!==n,f=!1;return i||!e.state.validCheck||s&&p||u&&d||l&&h?e.renderChildren(!1):e.isTimeActive()?(o&&p||a&&h||c&&!e.state.presentationMode&&d?f=!0:o||c||a||(f=!0),e.renderChildren(f)):e.renderChildren(!1)}))}}]),n}(p.Component);O.defaultProps={user:!1,notUser:!1,enrolled:!1,notEnrolled:!1,owner:!1,notOwner:!1,after:null,until:null,banner:null,disabled:!1,check:null},O.propTypes={user:k.a.bool,notUser:k.a.bool,enrolled:k.a.bool,notEnrolled:k.a.bool,owner:k.a.bool,notOwner:k.a.bool,after:k.a.instanceOf(Date),until:k.a.instanceOf(Date),banner:k.a.node,disabled:k.a.bool,check:k.a.func},O.contextType=E.default,t.default=O}}]);