!function(){"use strict";vare,t={4254:function(e,t,n){varr=n(2541),o=(n(3233),n(4458),n(5101),n(2004),n(8407),n(6394),n(4669),n(2322),n(9268),n(3080),n(8288),n(5677),n(2129),n(4655),n(5466)),i=n(3074),a=n.n(i),u=n(137),l=n.n(u),c=n(3613),s=n(473),f=n(541),p=n(8578),m=n(8556),d=n(6970),h=n(7180),y=n(4982),b=n(1283);functionv(e){return(v="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(e)}functiong(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionS(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}functionk(e,t,n){returnt&&S(e.prototype,t),n&&S(e,n),e}functionw(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}functionE(e,t){return(E=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functionP(e){vart=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnBoolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();returnfunction(){varn,r=A(e);if(t){varo=A(this).constructor;n=Reflect.construct(r,arguments,o)}elsen=r.apply(this,arguments);returnO(this,n)}}functionO(e,t){return!t||"object"!==v(t)&&"function"!=typeoft?_(e):t}function_(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functionA(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)})(e)}varj=function(e){w(n,e);vart=P(n);functionn(e){varr;returng(this,n),(r=t.call(this,e)).state={subject:"",body:"",isSending:!1},r.onUpdateSubject=r.onUpdateSubject.bind(_(r)),r.onUpdateBody=r.onUpdateBody.bind(_(r)),r.onSubmit=r.onSubmit.bind(_(r)),r.onSubmitSuccess=r.onSubmitSuccess.bind(_(r)),r.onSubmitFail=r.onSubmitFail.bind(_(r)),r}returnk(n,[{key:"onUpdateSubject",value:function(){this.setState({subject:this.refs.msgSubject.value.trim()})}},{key:"onUpdateBody",value:function(){this.setState({body:this.refs.msgBody.value.trim()})}},{key:"onSubmitSuccess",value:function(e){this.setState({subject:"",body:"",isSending:!1},(function(){setTimeout(function(){f.PageActions.addNotification("Your message was successfully submitted to "+this.props.author.name,"messageSubmitSucceed")}.bind(this),100)}))}},{key:"onSubmitFail",value:function(e){this.setState({isSending:!1},(function(){b.log(e),setTimeout(function(){f.PageActions.addNotification("Your message failed to submit. Please try again","messageSubmitFailed")}.bind(this),100)}))}},{key:"onSubmit",value:function(e){this.state.isSending||""===this.state.subject||""===this.state.body||(e.preventDefault(),e.stopPropagation(),this.setState({isSending:!0},(function(){vare=c.ApiUrlContext._currentValue.users+"/"+this.props.author.username+"/contact";(0,s.postRequest)(e,{subject:this.state.subject,body:this.state.body},{headers:{"X-CSRFToken":(0,s.csrfToken)()}},!1,this.onSubmitSuccess,this.onSubmitFail)})))}},{key:"render",value:function(){returno.createElement("div",{className:"media-list-row profile-contact"},o.createElement("div",{className:"media-list-header"},o.createElement("h2",null,"Contact")),o.createElement("form",{method:"post",className:"user-contact-form"+(this.state.isSending?" pending-response":"")},o.createElement("span",null,o.createElement("label",null,"Subject"),o.createElement("input",{ref:"msgSubject",type:"text",required:!0,onChange:this.onUpdateSubject,value:this.state.subject})),o.createElement("span",null,o.createElement("label",null,"Message"),o.createElement("textarea",{ref:"msgBody",required:!0,cols:"40",rows:"10",onChange:this.onUpdateBody,value:this