/*! For license information please see dll.Revealer.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[111],{1027:function(e,t,n){"use strict";e.exports=function(e){return null===e}},3331:function(e,t,n){"use strict";n.r(t);var o=n(986),r=n(3332);o.default.addResources("de","revealer",r.DE),o.default.addResources("en","revealer",r.EN),o.default.addResources("es","revealer",r.ES)},3332:function(e){e.exports=JSON.parse('{"DE":{"all-students":"Alle Studenten","contents-of":"Inhalt von ","from":"von","hide":"Ausblenden","message":"Vom Instruktor verborgener Inhalt","reveal":"Aufdecken","to":"zu"},"EN":{"all-students":"All students","contents-of":"contents of ","from":"from","hide":"Hide","message":"Content hidden by instructor","reveal":"Reveal","to":"to"},"ES":{}}')},929:function(e,t,n){"use strict";n.r(t);var o=n(14),r=n.n(o),s=n(13),a=n.n(s),l=n(11),i=n.n(l),c=n(15),h=n.n(c),u=n(16),d=n.n(u),p=n(8),f=n.n(p),m=n(7),v=n.n(m),C=n(0),E=n.n(C),w=n(45),g=n.n(w),y=n(1),N=n.n(y),R=n(3611),T=n(104),b=n(996),O=n.n(b),S=n(149),_=n(151),x=n(65),k=n(34),D=n(202),I=n(108);n(3331);function A(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,o=f()(e);if(t){var r=f()(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return d()(this,n)}}var H=g()("isle:revealer"),P=Object(x.default)("revealer"),V=function(e){h()(n,e);var t=A(n);function n(e){var o;return r()(this,n),o=t.call(this,e),v()(i()(o),"toggleContent",(function(){o.setState({showChildren:!o.state.showChildren},(function(){var e=o.context;o.state.showChildren?e.log({id:o.id,type:D.REVEAL_CONTENT,value:o.state.selectedCohort},"members"):e.log({id:o.id,type:D.HIDE_CONTENT,value:o.state.selectedCohort},"members")}))})),v()(i()(o),"handleCohortChange",(function(e){var t=e.target.value;(t!==o.state.selectedCohort||"all"===t&&O()(o.state.selectedCohort))&&(H("Handle cohort change: "+t),o.setState({selectedCohort:"all"===t?null:t}))})),v()(i()(o),"stopPropagation",(function(e){e.stopPropagation()})),o.id=e.id||P(e),o.state={showChildren:e.show,selectedCohort:null,showProp:e.show},o}return a()(n,[{key:"componentDidMount",value:function(){var e=this;H("Component did mount...");var t=this.context;t&&(this.unsubscribe=t.subscribe((function(n,o){if(n===I.RETRIEVED_COHORTS)e.forceUpdate();else if(n===I.MEMBER_ACTION){if(o.id===e.id){var r=o.value;H("Received action for cohort ".concat(r,": ")),(!r||t.cohort&&t.cohort===r)&&(o.type===D.REVEAL_CONTENT?(H("Reveal content..."),e.setState({showChildren:!0})):o.type===D.HIDE_CONTENT&&(H("Hide content..."),e.setState({showChildren:!1}))),e.state.selectedCohort===r&&(o.type===D.REVEAL_CONTENT?(H("Reveal content..."),e.setState({showChildren:!0})):o.type===D.HIDE_CONTENT&&(H("Hide content..."),e.setState({showChildren:!1})))}}else if(n===I.USER_JOINED&&t.user.email!==o.email&&(t.isOwner()||o.owner)){H("Update revealer state for ".concat(o.email));var s=e.context;e.state.showChildren?s.log({id:e.id,type:D.REVEAL_CONTENT,value:e.state.selectedCohort,noSave:!0},o.email):s.log({id:e.id,type:D.HIDE_CONTENT,value:e.state.selectedCohort,noSave:!0},o.email)}})))}},{key:"componentWillUnmount",value:function(){H("Component will unmount..."),this.unsubscribe&&this.unsubscribe()}},{key:"render",value:function(){var e=this.context.cohorts||[],t=E.a.createElement("h3",{className:"center"},this.props.message||this.props.t("message"));return E.a.createElement(C.Fragment,null,E.a.createElement(_.default,{owner:!0},E.a.createElement(S.default,{className:"center",style:{marginBottom:"10px",width:"fit-content"}},E.a.createElement(T.default,{onClick:this.toggleContent,style:{marginRight:10}},this.state.showChildren?this.props.t("hide"):this.props.t("reveal")),this.props.t("contents-of"),E.a.createElement("i",null,this.id)," ",this.state.showChildren?this.props.t("from"):this.props.t("to"),E.a.createElement("select",{style:{width:"150px",background:"#2e4468",marginLeft:"10px",padding:"2px",color:"white"},onChange:this.handleCohortChange,onBlur:this.handleCohortChange,onClick:this.stopPropagation,value:this.state.selectedCohort||"all"},E.a.createElement("option",{value:"all"},this.props.t("all-students")),e.map((function(e,t){return E.a.createElement("option",{key:t,value:e.title},e.title)}))))),this.state.showChildren?this.props.children:t)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.show!==t.showProp?{showChildren:e.show,showProp:e.show}:null}}]),n}(C.Component);V.defaultProps={message:null,show:!1},V.propTypes={message:N.a.string,show:N.a.bool},V.contextType=k.default,t.default=Object(R.withTranslation)("revealer")(V)},996:function(e,t,n){"use strict";var o=n(1027);e.exports=o}}]);