(window.webpackJsonp=window.webpackJsonp||[]).push([[90],{373:function(t,e,o){"use strict";var n=function(){};t.exports=n},389:function(t,e,o){"use strict";o.r(e);var n=o(82),r=o(0),a=o.n(r),i=o(6),s=o.n(i),c=o(3),l=o.n(c),p=o(7),u=o.n(p),d=o(1),h=o.n(d),f=o(12),m=o(101),y=o(21),g=o(33);var v=o(373),b=o.n(v),w=o(2),S=o.n(w),T=o(54),k=o(43),O=o.n(k),C=o(24),E=o.n(C),_=Object.assign||function(t){for(var e=1;e may have only one child element"),this.unlisten=n.listen(function(){t.setState({match:t.computeMatch(n.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){O()(this.props.history===t.history,"You cannot change ")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?h.a.Children.only(t):null},e}(h.a.Component);x.propTypes={history:S.a.object.isRequired,children:S.a.node},x.contextTypes={router:S.a.object},x.childContextTypes={router:S.a.object.isRequired};var j=x;function P(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var R=function(t){function e(){var o,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,a=Array(r),i=0;i ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return h.a.createElement(j,{history:this.history,children:this.props.children})},e}(h.a.Component),M=o(811),N=o(123),L=o(38),H=o.n(L),D=o(14),I=o.n(D),q=o(118),A=o(4),W=o(145),G=o.n(W),B={},F=0,z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,o=B[e]||(B[e]={});if(o[t])return o[t];var n=G.a.compile(t);return F<1e4&&(o[t]=n,F++),n}(t)(e,{pretty:!0})},Y=Object.assign||function(t){for(var e=1;e outside a "),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=Object(T.createLocation)(t.to),o=Object(T.createLocation)(this.props.to);Object(T.locationsAreEqual)(e,o)?O()(!1,"You tried to redirect to the same route you're currently on: \""+o.pathname+o.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,o=t.to;return e?"string"==typeof o?z(o,e.params):Y({},o,{pathname:z(o.pathname,e.params)}):o},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,o=this.computeTo(this.props);e?t.push(o):t.replace(o)},e.prototype.render=function(){return null},e}(h.a.Component);V.propTypes={computedMatch:S.a.object,push:S.a.bool,from:S.a.string,to:S.a.oneOfType([S.a.string,S.a.object]).isRequired},V.defaultProps={push:!1},V.contextTypes={router:S.a.shape({history:S.a.shape({push:S.a.func.isRequired,replace:S.a.func.isRequired}).isRequired,staticContext:S.a.object}).isRequired};var J,K=V,X=o(812),Z=o(144),$=o(143),Q=o(813),tt=o(36),et=[a()(Q.a,{className:"tabs-bar__link primary",to:"/timelines/home","data-preview-title-id":"column.home","data-preview-icon":"home"},void 0,a()("i",{className:"fa fa-fw fa-home"}),a()(A.b,{id:"tabs_bar.home",defaultMessage:"Home"})),a()(Q.a,{className:"tabs-bar__link primary",to:"/notifications","data-preview-title-id":"column.notifications","data-preview-icon":"bell"},void 0,a()("i",{className:"fa fa-fw fa-bell"}),a()(A.b,{id:"tabs_bar.notifications",defaultMessage:"Notifications"})),a()(Q.a,{className:"tabs-bar__link secondary",to:"/timelines/public/local","data-preview-title-id":"column.community","data-preview-icon":"users"},void 0,a()("i",{className:"fa fa-fw fa-users"}),a()(A.b,{id:"tabs_bar.local_timeline",defaultMessage:"Local"})),a()(Q.a,{className:"tabs-bar__link secondary",exact:!0,to:"/timelines/public","data-preview-title-id":"column.public","data-preview-icon":"globe"},void 0,a()("i",{className:"fa fa-fw fa-globe"}),a()(A.b,{id:"tabs_bar.federated_timeline",defaultMessage:"Federated"})),a()(Q.a,{className:"tabs-bar__link primary",to:"/search","data-preview-title-id":"tabs_bar.search","data-preview-icon":"bell"},void 0,a()("i",{className:"fa fa-fw fa-search"}),a()(A.b,{id:"tabs_bar.search",defaultMessage:"Search"})),a()(Q.a,{className:"tabs-bar__link primary",style:{flexGrow:"0",flexBasis:"30px"},to:"/getting-started","data-preview-title-id":"getting_started.heading","data-preview-icon":"bars"},void 0,a()("i",{className:"fa fa-fw fa-bars"}))];function ot(t){return et.findIndex(function(e){return e.props.to===t})}var nt=Object(A.g)(J=Object(X.a)(J=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c outside a ")},e.prototype.componentWillReceiveProps=function(t){O()(!(t.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),O()(!(!t.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,o=this.props.location||t.location,n=void 0,r=void 0;return h.a.Children.forEach(e,function(e){if(null==n&&h.a.isValidElement(e)){var a=e.props,i=a.path,s=a.exact,c=a.strict,l=a.sensitive,p=a.from,u=i||p;r=e,n=Object(ft.a)(o.pathname,{path:u,exact:s,strict:c,sensitive:l},t.match)}}),n?h.a.cloneElement(r,{location:o,computedMatch:n}):null},e}(h.a.Component);mt.contextTypes={router:S.a.shape({route:S.a.object.isRequired}).isRequired};var yt,gt,vt,bt,wt,St,Tt,kt,Ot,Ct,Et=mt,_t=o(62),Ut=o(60),xt=o(18),jt=(gt=yt=function(t){function e(){return s()(this,e),l()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.render=function(){var t=this.props,e=t.title,o=t.icon;return a()(_t.a,{},void 0,a()(Ut.a,{icon:o,title:e,multiColumn:!1,focusable:!1}),a()("div",{className:"scrollable"}))},e}(xt.a),yt.propTypes={title:S.a.oneOfType([S.a.node,S.a.string]),icon:S.a.string},yt.defaultProps={title:"",icon:""},gt),Pt=o(193),Rt=o(135),Mt=o(197),Nt=o(20),Lt=Object(A.f)({title:{id:"bundle_column_error.title",defaultMessage:"Network error"},body:{id:"bundle_column_error.body",defaultMessage:"Something went wrong while loading this component."},retry:{id:"bundle_column_error.retry",defaultMessage:"Try again"}}),Ht=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c0||n.setState({draggingOver:!1})},n.closeUploadModal=function(){n.setState({draggingOver:!1})},n.handleServiceWorkerPostMessage=function(t){var e=t.data;"navigate"===e.type?n.context.router.history.push(e.path):console.warn("Unknown message type:",e.type)},n.setRef=function(t){n.node=t},n.handleHotkeyNew=function(t){t.preventDefault();var e=n.node.querySelector(".compose-form__autosuggest-wrapper textarea");e&&e.focus()},n.handleHotkeySearch=function(t){t.preventDefault();var e=n.node.querySelector(".search__input");e&&e.focus()},n.handleHotkeyForceNew=function(t){n.handleHotkeyNew(t),n.props.dispatch(Object(at.U)())},n.handleHotkeyFocusColumn=function(t){var e=1*t.key+1,o=n.node.querySelector(".column:nth-child("+e+")");if(o){var r=o.querySelector(".focusable");r&&r.focus()}},n.handleHotkeyBack=function(){window.history&&1===window.history.length?n.context.router.history.push("/"):n.context.router.history.goBack()},n.setHotkeysRef=function(t){n.hotkeys=t},n.handleHotkeyToggleHelp=function(){"/keyboard-shortcuts"===n.props.location.pathname?n.context.router.history.goBack():n.context.router.history.push("/keyboard-shortcuts")},n.handleHotkeyGoToHome=function(){n.context.router.history.push("/timelines/home")},n.handleHotkeyGoToNotifications=function(){n.context.router.history.push("/notifications")},n.handleHotkeyGoToLocal=function(){n.context.router.history.push("/timelines/public/local")},n.handleHotkeyGoToFederated=function(){n.context.router.history.push("/timelines/public")},n.handleHotkeyGoToDirect=function(){n.context.router.history.push("/timelines/direct")},n.handleHotkeyGoToStart=function(){n.context.router.history.push("/getting-started")},n.handleHotkeyGoToFavourites=function(){n.context.router.history.push("/favourites")},n.handleHotkeyGoToPinned=function(){n.context.router.history.push("/pinned")},n.handleHotkeyGoToProfile=function(){n.context.router.history.push("/accounts/"+ae.i)},n.handleHotkeyGoToBlocked=function(){n.context.router.history.push("/blocks")},n.handleHotkeyGoToMuted=function(){n.context.router.history.push("/mutes")},n.handleHotkeyGoToRequests=function(){n.context.router.history.push("/follow_requests")},r=o,l()(n,r)}return u()(e,t),e.prototype.componentWillMount=function(){var t=this;window.addEventListener("beforeunload",this.handleBeforeUnload,!1),document.addEventListener("dragenter",this.handleDragEnter,!1),document.addEventListener("dragover",this.handleDragOver,!1),document.addEventListener("drop",this.handleDrop,!1),document.addEventListener("dragleave",this.handleDragLeave,!1),document.addEventListener("dragend",this.handleDragEnd,!1),"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",this.handleServiceWorkerPostMessage),this.props.dispatch(Object(it.p)()),this.props.dispatch(Object(st.h)()),setTimeout(function(){return t.props.dispatch(Object(ct.b)())},500)},e.prototype.componentDidMount=function(){this.hotkeys.__mousetrap__.stopCallback=function(t,e){return["TEXTAREA","SELECT","INPUT"].includes(e.tagName)}},e.prototype.componentWillUnmount=function(){window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("dragenter",this.handleDragEnter),document.removeEventListener("dragover",this.handleDragOver),document.removeEventListener("drop",this.handleDrop),document.removeEventListener("dragleave",this.handleDragLeave),document.removeEventListener("dragend",this.handleDragEnd)},e.prototype.render=function(){var t=this.state.draggingOver,e=this.props,o=e.children,n=e.isComposing,r=e.location,i=e.dropdownMenuIsOpen,s={help:this.handleHotkeyToggleHelp,new:this.handleHotkeyNew,search:this.handleHotkeySearch,forceNew:this.handleHotkeyForceNew,focusColumn:this.handleHotkeyFocusColumn,back:this.handleHotkeyBack,goToHome:this.handleHotkeyGoToHome,goToNotifications:this.handleHotkeyGoToNotifications,goToLocal:this.handleHotkeyGoToLocal,goToFederated:this.handleHotkeyGoToFederated,goToDirect:this.handleHotkeyGoToDirect,goToStart:this.handleHotkeyGoToStart,goToFavourites:this.handleHotkeyGoToFavourites,goToPinned:this.handleHotkeyGoToPinned,goToProfile:this.handleHotkeyGoToProfile,goToBlocked:this.handleHotkeyGoToBlocked,goToMuted:this.handleHotkeyGoToMuted,goToRequests:this.handleHotkeyGoToRequests};return h.a.createElement(q.HotKeys,{keyMap:ce,handlers:s,ref:this.setHotkeysRef},h.a.createElement("div",{className:I()("ui",{"is-composing":n}),ref:this.setRef,style:{pointerEvents:i?"none":null}},a()(nt,{}),a()(le,{location:r,onLayoutChange:this.handleLayoutChange},void 0,o),a()(Z.a,{}),a()($.a,{className:"loading-bar"}),a()(rt.a,{}),a()(Ft,{active:t,onClose:this.closeUploadModal})))},e}(h.a.PureComponent),Ot.contextTypes={router:S.a.object.isRequired},kt=Ct))||kt)||kt)||kt,ue=o(150),de=o(29),he=o(63),fe=o(8),me=Object(fe.getLocale)(),ye=me.localeData,ge=me.messages;Object(A.e)(ye);var ve=Object(m.a)(),be=Object(de.b)(ae.c);ve.dispatch(be),ve.dispatch(Object(ue.b)());var we=function(t){function e(){return s()(this,e),l()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.componentDidMount=function(){this.disconnect=ve.dispatch(Object(he.f)()),void 0!==window.Notification&&"default"===Notification.permission&&window.setTimeout(function(){return Notification.requestPermission()},6e4),ve.dispatch(function(t,e){e().getIn(["settings","onboarded"])||(t(Object(y.d)("ONBOARDING")),t(Object(g.c)(["onboarded"],!0)),t(Object(g.d)()))})},e.prototype.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},e.prototype.render=function(){var t=this.props.locale;return a()(A.d,{locale:t,messages:ge},void 0,a()(f.Provider,{store:ve},void 0,a()(R,{basename:"/web"},void 0,a()(N.b,{},void 0,a()(M.a,{path:"/",component:pe})))))},e}(h.a.PureComponent),Se=o(28),Te=o.n(Se),ke=o(80),Oe=o(454);e.default=function(){if(Oe.start("main()"),window.history&&history.replaceState){var t=window.location,e=t.pathname+t.search+t.hash;/^\/web($|\/)/.test(e)||history.replaceState(null,document.title,"/web"+e)}Object(ke.default)(function(){var t=document.getElementById("mastodon"),e=JSON.parse(t.getAttribute("data-props"));Te.a.render(h.a.createElement(we,e),t),o(453).install(),ve.dispatch(n.f()),Oe.stop("main()")})}},453:function(t,e){function o(){return"serviceWorker"in navigator&&("https:"===window.location.protocol||"localhost"===window.location.hostname||0===window.location.hostname.indexOf("127."))}e.install=function(t){t||(t={}),o()&&navigator.serviceWorker.register("/sw.js",{})},e.applyUpdate=function(t,e){},e.update=function(){o()&&navigator.serviceWorker.getRegistration().then(function(t){if(t)return t.update()})}},454:function(t,e,o){"use strict";o.r(e),o.d(e,"start",function(){return n}),o.d(e,"stop",function(){return r});function n(t){0}function r(t){0}},457:function(t,e,o){"use strict";o.r(e);var n=o(67),r=o(66);Object(r.a)(),Object(n.a)().then(function(){o(389).default()}).catch(function(t){console.error(t)})}},[[457,0]]]); //# sourceMappingURL=application.js.map