text: module.exports=function(t){var e={};function o(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=12)}([function(t,e){t.exports=flarum.core.compat["forum/app"]},,function(t,e){t.exports=flarum.core.compat["common/models/User"]},function(t,e){t.exports=flarum.core.compat["common/extend"]},function(t,e){t.exports=flarum.core.compat["common/utils/computed"]},function(t,e){t.exports=flarum.core.compat["forum/components/UserCard"]},function(t,e){t.exports=flarum.core.compat["common/Model"]},function(t,e){t.exports=flarum.core.compat["common/Component"]},function(t,e){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["common/utils/classList"]},function(t,e){t.exports=flarum.core.compat["common/utils/extractText"]},function(t,e){(function(){var t=[].slice;String.prototype.autoLink=function(){var e,o,r,n,i,a;return i=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,0<(n=1<=arguments.length?t.call(arguments,0):[]).length?(r=n[0],o=function(){var t;for(e in t=[],r)a=r[e],"callback"!==e&&t.push(" "+e+"='"+a+"'");return t}().join(""),this.replace(i,(function(t,e,n){return""+e+(("function"==typeof r.callback?r.callback(n):void 0)||"<a href='"+n+"'"+o+">"+n+"</a>")}))):this.replace(i,"$1<a href='$2'>$2</a>")}}).call(this)},function(t,e,o){"use strict";o.r(e);var r=o(0),n=o.n(r),i=o(3),a=(o(11),o(4)),s=o.n(a),u=o(5),c=o.n(u),l=o(2),f=o.n(l),p=o(6),d=o.n(p);function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var b=o(7),v=o.n(b),y=o(8),g=o.n(y),x=o(9),O=o.n(x),_=o(10),j=o.n(_),P=function(t){var e,o;function r(){return t.apply(this,arguments)||this}o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,h(e,o);var i=r.prototype;return i.oninit=function(e){t.prototype.oninit.call(this,e),this.editing=!1,this.loading=!1,this.bioMaxLength=n.a.forum.attribute("fof-user-bio.maxLength"),this.bioPlaceholder=n.a.session&&n.a.session.user&&n.a.session.user.id()===this.attrs.user.id()?n.a.translator.trans("fof-user-bio.forum.userbioPlaceholder"):n.a.translator.trans("fof-user-bio.forum.userbioPlaceholderOtherUser",{username:this.attrs.user.username()})},i.view=function(){var t,e=this.attrs.user,o=this.attrs.user.attribute("canEditBio");if(this.editing)t=m("textarea",{className:"FormControl",placeholder:j()(this.bioPlaceholder),rows:"3",maxlength:this.bioMaxLength,value:e.bio()});else{var r;if(this.loading)r=m("p",{className:"UserBio-placeholder"},g.a.component({size:"tiny"}));else{var n=e.bioHtml();n?r=m.trust(n):o&&(r=m("p",{className:"UserBio-placeholder"},this.bioPlaceholder))}t=m("div",{className:"UserBio-content",onclick:o?this.edit.bind(this):function(){}},r)}return m("div",{className:"UserBio "+O()({editable:o,editing:this.editing})},t)},i.edit=function(){this.editing=!0,m.redraw.sync();var t=this,e=function(e){e.shiftKey||(e.preventDefault(),t.save($(this).val()))};this.$("textarea").focus().bind("blur",e).bind("keydown","return",e),m.redraw()},i.save=function(t){var e=this,o=this.attrs.user;o.bio()!==t&&(this.loading=!0,o.save({bio:t}).catch((function(){})).then((function(){e.loading=!1,m.redraw()}))),this.editing=!1,m.redraw()},r}(v.a);n.a.initializers.add("fof-user-bio",(function(){f.a.prototype.bio=d.a.attribute("bio"),f.a.prototype.bioHtml=s()("bio",(function(t){return t?"<p>"+$("<div/>").text(t).html().replace(/\n/g,"<br>").autoLink({rel:"nofollow ugc"})+"</p>":""})),Object(i.extend)(c.a.prototype,"infoItems",(function(t){var e=this.attrs.user;e.attribute("canViewBio")&&t.add("bio",m(P,{user:e}))}))}))}]);
  //# sourceMappingURL=forum.js.map