X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Fapplication.js;h=d107877c713447de5ade4eb262e2ec13193045b4;hb=f2727e23eeb66c8f53d06013c28fef313a5527de;hp=7029d5bd38085b9423bdd2537dcf27474b599743;hpb=d293ceb1b535ab749fa841e18c1fa2ee63972afb;p=akkoma diff --git a/priv/static/packs/application.js b/priv/static/packs/application.js index 7029d5bd3..d107877c7 100644 --- a/priv/static/packs/application.js +++ b/priv/static/packs/application.js @@ -1,2 +1,2 @@ -webpackJsonp([27],{150:function(t,e,n){"use strict";n.d(e,"a",function(){return h});var o=n(2),r=n.n(o),i=n(1),a=n.n(i),s=n(3),c=n.n(s),l=n(4),u=n.n(l),f=n(0),p=n.n(f),h=function(t){function e(){var n,o,r;a()(this,e);for(var i=arguments.length,s=Array(i),l=0;l0,"Expected a maximum number of retry greater than 0 but got %s.",t),this.maxNumberOfRetry_=t},o.prototype.backoff=function(t){i.checkState(-1===this.timeoutID_,"Backoff in progress."),this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",t),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,t))},o.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},o.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=o},156:function(t,e,n){function o(t){return void 0!==t&&null!==t}function r(t){if(t=t||{},o(t.initialDelay)&&t.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(o(t.maxDelay)&&t.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=t.initialDelay||100,this.maxDelay_=t.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(o(t.randomisationFactor)&&(t.randomisationFactor<0||t.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=t.randomisationFactor||0}n(92),n(32);r.prototype.getMaxDelay=function(){return this.maxDelay_},r.prototype.getInitialDelay=function(){return this.initialDelay_},r.prototype.next=function(){var t=this.next_(),e=1+Math.random()*this.randomisationFactor_;return Math.round(t*e)},r.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},r.prototype.reset=function(){this.reset_()},r.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},t.exports=r},157:function(t,e,n){function o(t){i.call(this,t),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var r=n(32),i=n(156);r.inherits(o,i),o.prototype.next_=function(){var t=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=t,t},o.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=o},250:function(t,e,n){"use strict";n.d(e,"b",function(){return T}),n.d(e,"a",function(){return S});var o=n(2),r=n.n(o),i=n(1),a=n.n(i),s=n(3),c=n.n(s),l=n(4),u=n.n(l),f=n(0),p=n.n(f),h=n(9),d=n(126),m=n(626),y=n(58),v=n(152),g=n(627),b=n(23),_=n(274),k=n(6),w=n(7),x=n(18),O=Object(w.getLocale)(),E=O.localeData,C=O.messages;Object(k.e)(E);var T=Object(d.a)(),N=Object(b.b)(x.c);T.dispatch(N);var S=function(t){function e(){return a()(this,e),c()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.componentDidMount=function(){if(this.disconnect=T.dispatch(Object(_.d)()),void 0!==window.Notification&&"default"===Notification.permission&&window.setTimeout(function(){return Notification.requestPermission()},6e4),void 0!==navigator.registerProtocolHandler){var t=window.location.protocol+"//"+window.location.host+"/intent?uri=%s";window.setTimeout(function(){return navigator.registerProtocolHandler("web+mastodon",t,"Mastodon")},3e5)}T.dispatch(Object(m.a)())},e.prototype.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},e.prototype.render=function(){var t=this.props.locale;return r()(k.d,{locale:t,messages:C},void 0,r()(h.Provider,{store:T},void 0,r()(y.a,{basename:"/web"},void 0,r()(v.b,{},void 0,r()(y.e,{path:"/",component:g.a})))))},e}(p.a.PureComponent)},255:function(t,e,n){"use strict";function o(t){return E.findIndex(function(e){return e.props.to===t})}function r(t){return E[t].props.to}n.d(e,"d",function(){return E}),e.b=o,e.c=r,n.d(e,"a",function(){return C});var i,a,s,c=n(1),l=n.n(c),u=n(3),f=n.n(u),p=n(4),h=n.n(p),d=n(2),m=n.n(d),y=n(42),v=n.n(y),g=n(0),b=n.n(g),_=n(5),k=n.n(_),w=n(58),x=n(6),O=n(33),E=[m()(w.c,{className:"tabs-bar__link primary",to:"/statuses/new","data-preview-title-id":"tabs_bar.compose","data-preview-icon":"pencil"},void 0,m()("i",{className:"fa fa-fw fa-pencil"}),m()(x.b,{id:"tabs_bar.compose",defaultMessage:"Compose"})),m()(w.c,{className:"tabs-bar__link primary",to:"/timelines/home","data-preview-title-id":"column.home","data-preview-icon":"home"},void 0,m()("i",{className:"fa fa-fw fa-home"}),m()(x.b,{id:"tabs_bar.home",defaultMessage:"Home"})),m()(w.c,{className:"tabs-bar__link primary",to:"/notifications","data-preview-title-id":"column.notifications","data-preview-icon":"bell"},void 0,m()("i",{className:"fa fa-fw fa-bell"}),m()(x.b,{id:"tabs_bar.notifications",defaultMessage:"Notifications"})),m()(w.c,{className:"tabs-bar__link secondary",to:"/timelines/public/local","data-preview-title-id":"column.community","data-preview-icon":"users"},void 0,m()("i",{className:"fa fa-fw fa-users"}),m()(x.b,{id:"tabs_bar.local_timeline",defaultMessage:"Local"})),m()(w.c,{className:"tabs-bar__link secondary",exact:!0,to:"/timelines/public","data-preview-title-id":"column.public","data-preview-icon":"globe"},void 0,m()("i",{className:"fa fa-fw fa-globe"}),m()(x.b,{id:"tabs_bar.federated_timeline",defaultMessage:"Federated"})),m()(w.c,{className:"tabs-bar__link primary",style:{flexGrow:"0",flexBasis:"30px"},to:"/getting-started","data-preview-title-id":"getting_started.heading","data-preview-icon":"asterisk"},void 0,m()("i",{className:"fa fa-fw fa-asterisk"}))],C=Object(x.g)((s=a=function(t){function e(){var n,o,r;l()(this,e);for(var i=arguments.length,a=Array(i),s=0;s2&&void 0!==arguments[2]?arguments[2]:null;return function(o,r){var c=r().getIn(["meta","streaming_api_base_url"]),l=r().getIn(["meta","access_token"]),f=r().getIn(["meta","locale"]),p=null,h=function(){p=setInterval(function(){n(o)},2e4)},d=function(){p&&(clearInterval(p),p=null)},m=Object(i.a)(c,l,e,{connected:function(){n&&d(),o(Object(a.m)(t))},disconnected:function(){n&&h(),o(Object(a.o)(t))},received:function(e){switch(e.event){case"update":o(Object(a.C)(t,JSON.parse(e.payload)));break;case"delete":o(Object(a.n)(e.payload));break;case"notification":o(Object(s.n)(JSON.parse(e.payload),u,f))}},reconnected:function(){n&&(d(),n(o)),o(Object(a.m)(t))}});return function(){m&&m.close(),d()}}}function r(t){t(Object(a.z)()),t(Object(s.l)())}n.d(e,"d",function(){return f}),n.d(e,"a",function(){return p}),n.d(e,"c",function(){return h}),n.d(e,"b",function(){return d});var i=n(275),a=n(16),s=n(45),c=n(7),l=Object(c.getLocale)(),u=l.messages,f=function(){return o("home","user",r)},p=function(){return o("community","public:local")},h=function(){return o("public","public")},d=function(t){return o("hashtag:"+t,"hashtag&tag="+t)}},275:function(t,e,n){"use strict";function o(t,e,n,o){var r=o.connected,a=o.received,s=o.disconnected,c=o.reconnected,l=new i.a(t+"/api/v1/streaming/?access_token="+e+"&stream="+n);return l.onopen=r,l.onmessage=function(t){return a(JSON.parse(t.data))},l.onclose=s,l.onreconnect=c,l}e.a=o;var r=n(276),i=n.n(r)},276:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};o(this,t),this.url=e,this.protocols=n,this.reconnectEnabled=!0,this.listeners={},this.backoff=i[r.backoff||"fibonacci"](r),this.backoff.on("backoff",this.onBackoffStart.bind(this)),this.backoff.on("ready",this.onBackoffReady.bind(this)),this.backoff.on("fail",this.onBackoffFail.bind(this)),this.open()}return r(t,[{key:"open",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isReconnect=t,this.ws=new WebSocket(this.url,this.protocols),this.ws.onclose=this.onCloseCallback.bind(this),this.ws.onerror=this.onErrorCallback.bind(this),this.ws.onmessage=this.onMessageCallback.bind(this),this.ws.onopen=this.onOpenCallback.bind(this)}},{key:"onBackoffStart",value:function(t,e){}},{key:"onBackoffReady",value:function(t,e){this.open(!0)}},{key:"onBackoffFail",value:function(){}},{key:"onCloseCallback",value:function(){!this.isReconnect&&this.listeners.onclose&&this.listeners.onclose.apply(null,arguments),this.reconnectEnabled&&this.backoff.backoff()}},{key:"onErrorCallback",value:function(){this.listeners.onerror&&this.listeners.onerror.apply(null,arguments)}},{key:"onMessageCallback",value:function(){this.listeners.onmessage&&this.listeners.onmessage.apply(null,arguments)}},{key:"onOpenCallback",value:function(){this.listeners.onopen&&this.listeners.onopen.apply(null,arguments),this.isReconnect&&this.listeners.onreconnect&&this.listeners.onreconnect.apply(null,arguments),this.isReconnect=!1}},{key:"close",value:function(t,e){void 0===t&&(t=1e3),this.reconnectEnabled=!1,this.ws.close(t,e)}},{key:"send",value:function(t){this.ws.send(t)}},{key:"bufferedAmount",get:function(){return this.ws.bufferedAmount}},{key:"readyState",get:function(){return this.ws.readyState}},{key:"binaryType",get:function(){return this.ws.binaryType},set:function(t){this.ws.binaryType=t}},{key:"extensions",get:function(){return this.ws.extensions},set:function(t){this.ws.extensions=t}},{key:"protocol",get:function(){return this.ws.protocol},set:function(t){this.ws.protocol=t}},{key:"onclose",set:function(t){this.listeners.onclose=t},get:function(){return this.listeners.onclose}},{key:"onerror",set:function(t){this.listeners.onerror=t},get:function(){return this.listeners.onerror}},{key:"onmessage",set:function(t){this.listeners.onmessage=t},get:function(){return this.listeners.onmessage}},{key:"onopen",set:function(t){this.listeners.onopen=t},get:function(){return this.listeners.onopen}},{key:"onreconnect",set:function(t){this.listeners.onreconnect=t},get:function(){return this.listeners.onreconnect}}]),t}();a.CONNECTING=WebSocket.CONNECTING,a.OPEN=WebSocket.OPEN,a.CLOSING=WebSocket.CLOSING,a.CLOSED=WebSocket.CLOSED,e.default=a},277:function(t,e,n){var o=n(155),r=n(282),i=n(157),a=n(283);t.exports.Backoff=o,t.exports.FunctionCall=a,t.exports.FibonacciStrategy=i,t.exports.ExponentialStrategy=r,t.exports.fibonacci=function(t){return new o(new i(t))},t.exports.exponential=function(t){return new o(new r(t))},t.exports.call=function(t,e,n){var o=Array.prototype.slice.call(arguments);return t=o[0],e=o.slice(1,o.length-1),n=o[o.length-1],new a(t,e,n)}},278:function(t,e,n){function o(t,e,n,o){n=n||"";var r=c.format.apply(this,[n].concat(o)),i=new t(r);throw Error.captureStackTrace(i,e),i}function r(t,e,n){o(l.IllegalArgumentError,t,e,n)}function i(t,e,n){o(l.IllegalStateError,t,e,n)}function a(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array"}return e}function s(t){return function(e,n){var o=a(e);if(o==t)return e;r(arguments.callee,n||'Expected "'+t+'" but got "'+o+'".',Array.prototype.slice.call(arguments,2))}}var c=n(32),l=t.exports=n(281);t.exports.checkArgument=function(t,e){t||r(arguments.callee,e,Array.prototype.slice.call(arguments,2))},t.exports.checkState=function(t,e){t||i(arguments.callee,e,Array.prototype.slice.call(arguments,2))},t.exports.checkIsDef=function(t,e){if(void 0!==t)return t;r(arguments.callee,e||"Expected value to be defined but was undefined.",Array.prototype.slice.call(arguments,2))},t.exports.checkIsDefAndNotNull=function(t,e){if(null!=t)return t;r(arguments.callee,e||'Expected value to be defined and not null but got "'+a(t)+'".',Array.prototype.slice.call(arguments,2))},t.exports.checkIsString=s("string"),t.exports.checkIsArray=s("array"),t.exports.checkIsNumber=s("number"),t.exports.checkIsBoolean=s("boolean"),t.exports.checkIsFunction=s("function"),t.exports.checkIsObject=s("object")},279:function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},280:function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},281:function(t,e,n){function o(t){Error.call(this,t),this.message=t}function r(t){Error.call(this,t),this.message=t}var i=n(32);i.inherits(o,Error),o.prototype.name="IllegalArgumentError",i.inherits(r,Error),r.prototype.name="IllegalStateError",t.exports.IllegalStateError=r,t.exports.IllegalArgumentError=o},282:function(t,e,n){function o(t){a.call(this,t),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay(),this.factor_=o.DEFAULT_FACTOR,t&&void 0!==t.factor&&(i.checkArgument(t.factor>1,"Exponential factor should be greater than 1 but got %s.",t.factor),this.factor_=t.factor)}var r=n(32),i=n(93),a=n(156);r.inherits(o,a),o.DEFAULT_FACTOR=2,o.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=this.backoffDelay_*this.factor_,this.backoffDelay_},o.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},t.exports=o},283:function(t,e,n){function o(t,e,n){r.EventEmitter.call(this),i.checkIsFunction(t,"Expected fn to be a function."),i.checkIsArray(e,"Expected args to be an array."),i.checkIsFunction(n,"Expected callback to be a function."),this.function_=t,this.arguments_=e,this.callback_=n,this.lastResult_=[],this.numRetries_=0,this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.retryPredicate_=o.DEFAULT_RETRY_PREDICATE_,this.state_=o.State_.PENDING}var r=n(92),i=n(93),a=n(32),s=n(155),c=n(157);a.inherits(o,r.EventEmitter),o.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},o.DEFAULT_RETRY_PREDICATE_=function(t){return!0},o.prototype.isPending=function(){return this.state_==o.State_.PENDING},o.prototype.isRunning=function(){return this.state_==o.State_.RUNNING},o.prototype.isCompleted=function(){return this.state_==o.State_.COMPLETED},o.prototype.isAborted=function(){return this.state_==o.State_.ABORTED},o.prototype.setStrategy=function(t){return i.checkState(this.isPending(),"FunctionCall in progress."),this.strategy_=t,this},o.prototype.retryIf=function(t){return i.checkState(this.isPending(),"FunctionCall in progress."),this.retryPredicate_=t,this},o.prototype.getLastResult=function(){return this.lastResult_.concat()},o.prototype.getNumRetries=function(){return this.numRetries_},o.prototype.failAfter=function(t){return i.checkState(this.isPending(),"FunctionCall in progress."),this.failAfter_=t,this},o.prototype.abort=function(){this.isCompleted()||this.isAborted()||(this.isRunning()&&this.backoff_.reset(),this.state_=o.State_.ABORTED,this.lastResult_=[new Error("Backoff aborted.")],this.emit("abort"),this.doCallback_())},o.prototype.start=function(t){i.checkState(!this.isAborted(),"FunctionCall is aborted."),i.checkState(this.isPending(),"FunctionCall already started.");var e=this.strategy_||new c;this.backoff_=t?t(e):new s(e),this.backoff_.on("ready",this.doCall_.bind(this,!0)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=o.State_.RUNNING,this.doCall_(!1)},o.prototype.doCall_=function(t){t&&this.numRetries_++;var e=["call"].concat(this.arguments_);r.EventEmitter.prototype.emit.apply(this,e);var n=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(n))},o.prototype.doCallback_=function(){this.callback_.apply(null,this.lastResult_)},o.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var t=Array.prototype.slice.call(arguments);this.lastResult_=t,r.EventEmitter.prototype.emit.apply(this,["callback"].concat(t));var e=t[0];e&&this.retryPredicate_(e)?this.backoff_.backoff(e):(this.state_=o.State_.COMPLETED,this.doCallback_())}},o.prototype.handleBackoff_=function(t,e,n){this.emit("backoff",t,e,n)},t.exports=o},32:function(t,e,n){(function(t,o){function r(t,n){var o={seen:[],stylize:a};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),m(n)?o.showHidden=n:n&&e._extend(o,n),k(o.showHidden)&&(o.showHidden=!1),k(o.depth)&&(o.depth=2),k(o.colors)&&(o.colors=!1),k(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=i),c(o,t,o.depth)}function i(t,e){var n=r.styles[e];return n?"["+r.colors[n][0]+"m"+t+"["+r.colors[n][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function c(t,n,o){if(t.customInspect&&n&&C(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var r=n.inspect(o,t);return b(r)||(r=c(t,r,o)),r}var i=l(t,n);if(i)return i;var a=Object.keys(n),m=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return u(n);if(0===a.length){if(C(n)){var y=n.name?": "+n.name:"";return t.stylize("[Function"+y+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(O(n))return t.stylize(Date.prototype.toString.call(n),"date");if(E(n))return u(n)}var v="",g=!1,_=["{","}"];if(d(n)&&(g=!0,_=["[","]"]),C(n)){v=" [Function"+(n.name?": "+n.name:"")+"]"}if(w(n)&&(v=" "+RegExp.prototype.toString.call(n)),O(n)&&(v=" "+Date.prototype.toUTCString.call(n)),E(n)&&(v=" "+u(n)),0===a.length&&(!g||0==n.length))return _[0]+v+_[1];if(o<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var k;return k=g?f(t,n,o,m,a):a.map(function(e){return p(t,n,o,m,e,g)}),t.seen.pop(),h(k,v,_)}function l(t,e){if(k(e))return t.stylize("undefined","undefined");if(b(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return g(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function u(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,n,o,r){for(var i=[],a=0,s=e.length;a-1&&(s=i?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),k(a)){if(i&&r.match(/^\d+$/))return s;a=JSON.stringify(""+r),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function h(t,e,n){var o=0;return t.reduce(function(t,e){return o++,e.indexOf("\n")>=0&&o++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function d(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function y(t){return null===t}function v(t){return null==t}function g(t){return"number"==typeof t}function b(t){return"string"==typeof t}function _(t){return"symbol"==typeof t}function k(t){return void 0===t}function w(t){return x(t)&&"[object RegExp]"===N(t)}function x(t){return"object"==typeof t&&null!==t}function O(t){return x(t)&&"[object Date]"===N(t)}function E(t){return x(t)&&("[object Error]"===N(t)||t instanceof Error)}function C(t){return"function"==typeof t}function T(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function N(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}function D(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),L[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var A=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],n=0;n=i)return t;switch(t){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(t){return"[Circular]"}default:return t}}),s=o[n];n0&&void 0!==arguments[0]?arguments[0]:[];(Array.isArray(t)?t:[t]).forEach(function(t){t&&t.locale&&(j.a.__addLocaleData(t),I.a.__addLocaleData(t))})}function r(t){for(var e=(t||"").split("-");e.length>0;){if(i(e.join("-")))return!0;e.pop()}return!1}function i(t){var e=t&&t.toLowerCase();return!(!j.a.__localeData__[e]||!I.a.__localeData__[e])}function a(t){return(""+t).replace(_t,function(t){return bt[t]})}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce(function(e,o){return t.hasOwnProperty(o)?e[o]=t[o]:n.hasOwnProperty(o)&&(e[o]=n[o]),e},{})}function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.intl;H()(e,"[React Intl] Could not find required `intl` object. needs to exist in the component ancestry.")}function l(t,e){if(t===e)return!0;if("object"!==(void 0===t?"undefined":G(t))||null===t||"object"!==(void 0===e?"undefined":G(e))||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var r=Object.prototype.hasOwnProperty.bind(e),i=0;i3&&void 0!==arguments[3]?arguments[3]:{},u=a.intl,f=void 0===u?{}:u,p=c.intl,h=void 0===p?{}:p;return!l(e,o)||!l(n,r)||!(h===f||l(s(h,gt),s(f,gt)))}function f(t){return t.displayName||t.name||"Component"}function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.intlPropName,o=void 0===n?"intl":n,r=e.withRef,i=void 0!==r&&r,a=function(e){function n(t,e){z(this,n);var o=$(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));return c(e),o}return K(n,e),q(n,[{key:"getWrappedInstance",value:function(){return H()(i,"[React Intl] To access the wrapped instance, the `{withRef: true}` option must be set when calling: `injectIntl()`"),this.refs.wrappedInstance}},{key:"render",value:function(){return R.a.createElement(t,V({},this.props,J({},o,this.context.intl),{ref:i?"wrappedInstance":null}))}}]),n}(M.Component);return a.displayName="InjectIntl("+f(t)+")",a.contextTypes={intl:ht},a.WrappedComponent=t,a}function h(t){return t}function d(t){return j.a.prototype._resolveLocale(t)}function m(t){return j.a.prototype._findPluralRuleFunction(t)}function y(t){var e=I.a.thresholds;e.second=t.second,e.minute=t.minute,e.hour=t.hour,e.day=t.day,e.month=t.month}function v(t,e,n){var o=t&&t[e]&&t[e][n];if(o)return o}function g(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,i=t.formats,a=o.format,c=new Date(n),l=a&&v(i,"date",a),u=s(o,wt,l);try{return e.getDateTimeFormat(r,u).format(c)}catch(t){}return String(c)}function b(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,i=t.formats,a=o.format,c=new Date(n),l=a&&v(i,"time",a),u=s(o,wt,l);u.hour||u.minute||u.second||(u=V({},u,{hour:"numeric",minute:"numeric"}));try{return e.getDateTimeFormat(r,u).format(c)}catch(t){}return String(c)}function _(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,i=t.formats,a=o.format,c=new Date(n),l=new Date(o.now),u=a&&v(i,"relative",a),f=s(o,Ot,u),p=V({},I.a.thresholds);y(Ct);try{return e.getRelativeFormat(r,f).format(c,{now:isFinite(l)?l:e.now()})}catch(t){}finally{y(p)}return String(c)}function k(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,i=t.formats,a=o.format,c=a&&v(i,"number",a),l=s(o,xt,c);try{return e.getNumberFormat(r,l).format(n)}catch(t){}return String(n)}function w(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,i=s(o,Et);try{return e.getPluralFormat(r,i).format(n)}catch(t){}return"other"}function x(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.locale,i=t.formats,a=t.messages,s=t.defaultLocale,c=t.defaultFormats,l=n.id,u=n.defaultMessage;H()(l,"[React Intl] An `id` must be provided to format a message.");var f=a&&a[l];if(!(Object.keys(o).length>0))return f||u||l;var p=void 0;if(f)try{p=e.getMessageFormat(f,r,i).format(o)}catch(t){}if(!p&&u)try{p=e.getMessageFormat(u,s,c).format(o)}catch(t){}return p||f||u||l}function O(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return x(t,e,n,Object.keys(o).reduce(function(t,e){var n=o[e];return t[e]="string"==typeof n?a(n):n,t},{}))}function E(t){var e=Math.abs(t);return e=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},$=function(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},Z=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e":">","<":"<",'"':""","'":"'"},_t=/[&><"']/g,kt=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};z(this,t);var o="ordinal"===n.style,r=m(d(e));this.format=function(t){return r(t,o)}},wt=Object.keys(dt),xt=Object.keys(mt),Ot=Object.keys(yt),Et=Object.keys(vt),Ct={second:60,minute:60,hour:24,day:30,month:12},Tt=Object.freeze({formatDate:g,formatTime:b,formatRelative:_,formatNumber:k,formatPlural:w,formatMessage:x,formatHTMLMessage:O}),Nt=Object.keys(ft),St=Object.keys(pt),Dt={formats:{},messages:{},textComponent:"span",defaultLocale:"en",defaultFormats:{}},jt=function(t){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};z(this,e);var o=$(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));H()("undefined"!=typeof Intl,"[React Intl] The `Intl` APIs must be available in the runtime, and do not appear to be built-in. An `Intl` polyfill should be loaded.\nSee: http://formatjs.io/guides/runtime-environments/");var r=n.intl,i=void 0;i=isFinite(t.initialNow)?Number(t.initialNow):r?r.now():Date.now();var a=r||{},s=a.formatters,c=void 0===s?{getDateTimeFormat:B()(Intl.DateTimeFormat),getNumberFormat:B()(Intl.NumberFormat),getMessageFormat:B()(j.a),getRelativeFormat:B()(I.a),getPluralFormat:B()(kt)}:s;return o.state=V({},c,{now:function(){return o._didDisplay?Date.now():i}}),o}return K(e,t),q(e,[{key:"getConfig",value:function(){var t=this.context.intl,e=s(this.props,Nt,t);for(var n in Dt)void 0===e[n]&&(e[n]=Dt[n]);if(!r(e.locale)){var o=e,i=(o.locale,o.defaultLocale),a=o.defaultFormats;e=V({},e,{locale:i,formats:a,messages:Dt.messages})}return e}},{key:"getBoundFormatFns",value:function(t,e){return St.reduce(function(n,o){return n[o]=Tt[o].bind(null,t,e),n},{})}},{key:"getChildContext",value:function(){var t=this.getConfig(),e=this.getBoundFormatFns(t,this.state),n=this.state,o=n.now,r=Y(n,["now"]);return{intl:V({},t,e,{formatters:r,now:o})}}},{key:"shouldComponentUpdate",value:function(){for(var t=arguments.length,e=Array(t),n=0;n1?o-1:0),i=1;i0){var d=Math.floor(1099511627776*Math.random()).toString(16),m=function(){var t=0;return function(){return"ELEMENT-"+d+"-"+(t+=1)}}();f="@__"+d+"__@",p={},h={},Object.keys(s).forEach(function(t){var e=s[t];if(Object(M.isValidElement)(e)){var n=m();p[t]=f+n+f,h[n]=e}else p[t]=e})}var y={id:r,description:i,defaultMessage:a},v=e(y,p||s),g=void 0;return g=h&&Object.keys(h).length>0?v.split(f).filter(function(t){return!!t}).map(function(t){return h[t]||t}):[v],"function"==typeof u?u.apply(void 0,Z(g)):M.createElement.apply(void 0,[l,null].concat(Z(g)))}}]),e}(M.Component);Wt.displayName="FormattedMessage",Wt.contextTypes={intl:ht},Wt.defaultProps={values:{}};var Gt=function(t){function e(t,n){z(this,e);var o=$(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return c(n),o}return K(e,t),q(e,[{key:"shouldComponentUpdate",value:function(t){var e=this.props.values;if(!l(t.values,e))return!0;for(var n=V({},t,{values:e}),o=arguments.length,r=Array(o>1?o-1:0),i=1;i0||o.setState({draggingOver:!1})},o.closeUploadModal=function(){o.setState({draggingOver:!1})},o.handleServiceWorkerPostMessage=function(t){var e=t.data;"navigate"===e.type?o.context.router.history.push(e.path):console.warn("Unknown message type:",e.type)},o.setRef=function(t){o.node=t},o.setColumnsAreaRef=function(t){o.columnsAreaNode=t.getWrappedInstance().getWrappedInstance()},o.handleHotkeyNew=function(t){t.preventDefault();var e=o.node.querySelector(".compose-form__autosuggest-wrapper textarea");e&&e.focus()},o.handleHotkeySearch=function(t){t.preventDefault();var e=o.node.querySelector(".search__input");e&&e.focus()},o.handleHotkeyForceNew=function(t){o.handleHotkeyNew(t),o.props.dispatch(Object(N.P)())},o.handleHotkeyFocusColumn=function(t){var e=1*t.key+1,n=o.node.querySelector(".column:nth-child("+e+")");if(n){var r=n.querySelector(".focusable");r&&r.focus()}},o.handleHotkeyBack=function(){window.history&&1===window.history.length?o.context.router.history.push("/"):o.context.router.history.goBack()},o.setHotkeysRef=function(t){o.hotkeys=t},o.handleHotkeyGoToHome=function(){o.context.router.history.push("/timelines/home")},o.handleHotkeyGoToNotifications=function(){o.context.router.history.push("/notifications")},o.handleHotkeyGoToLocal=function(){o.context.router.history.push("/timelines/public/local")},o.handleHotkeyGoToFederated=function(){o.context.router.history.push("/timelines/public")},o.handleHotkeyGoToStart=function(){o.context.router.history.push("/getting-started")},o.handleHotkeyGoToFavourites=function(){o.context.router.history.push("/favourites")},o.handleHotkeyGoToPinned=function(){o.context.router.history.push("/pinned")},o.handleHotkeyGoToProfile=function(){o.context.router.history.push("/accounts/"+R.e)},o.handleHotkeyGoToBlocked=function(){o.context.router.history.push("/blocks")},o.handleHotkeyGoToMuted=function(){o.context.router.history.push("/mutes")},r=n,p()(o,r)}return d()(e,t),e.prototype.componentWillMount=function(){window.addEventListener("beforeunload",this.handleBeforeUnload,!1),window.addEventListener("resize",this.handleResize,{passive:!0}),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(S.z)()),this.props.dispatch(Object(D.l)())},e.prototype.componentDidMount=function(){this.hotkeys.__mousetrap__.stopCallback=function(t,e){return["TEXTAREA","SELECT","INPUT"].includes(e.tagName)}},e.prototype.shouldComponentUpdate=function(t){return t.isComposing===this.props.isComposing||(this.node.classList.toggle("is-composing",t.isComposing),!1)},e.prototype.componentDidUpdate=function(t){[this.props.location.pathname,"/"].includes(t.location.pathname)||this.columnsAreaNode.handleChildrenContentChange()},e.prototype.componentWillUnmount=function(){window.removeEventListener("beforeunload",this.handleBeforeUnload),window.removeEventListener("resize",this.handleResize),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,e=t.width,n=t.draggingOver,o=this.props.children,r={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,goToStart:this.handleHotkeyGoToStart,goToFavourites:this.handleHotkeyGoToFavourites,goToPinned:this.handleHotkeyGoToPinned,goToProfile:this.handleHotkeyGoToProfile,goToBlocked:this.handleHotkeyGoToBlocked,goToMuted:this.handleHotkeyGoToMuted};return g.a.createElement(M.HotKeys,{keyMap:B,handlers:r,ref:this.setHotkeysRef},g.a.createElement("div",{className:"ui",ref:this.setRef},c()(x.a,{}),g.a.createElement(P.a,{ref:this.setColumnsAreaRef,singleColumn:Object(T.b)(e)},c()(A.b,{},void 0,c()(C.d,{from:"/",to:"/getting-started",exact:!0}),c()(A.a,{path:"/getting-started",component:L.n,content:o}),c()(A.a,{path:"/timelines/home",component:L.p,content:o}),c()(A.a,{path:"/timelines/public",exact:!0,component:L.v,content:o}),c()(A.a,{path:"/timelines/public/local",component:L.d,content:o}),c()(A.a,{path:"/timelines/tag/:id",component:L.o,content:o}),c()(A.a,{path:"/notifications",component:L.s,content:o}),c()(A.a,{path:"/favourites",component:L.h,content:o}),c()(A.a,{path:"/pinned",component:L.u,content:o}),c()(A.a,{path:"/statuses/new",component:L.e,content:o}),c()(A.a,{path:"/statuses/:statusId",exact:!0,component:L.y,content:o}),c()(A.a,{path:"/statuses/:statusId/reblogs",component:L.w,content:o}),c()(A.a,{path:"/statuses/:statusId/favourites",component:L.i,content:o}),c()(A.a,{path:"/accounts/:accountId",exact:!0,component:L.b,content:o}),c()(A.a,{path:"/accounts/:accountId/followers",component:L.k,content:o}),c()(A.a,{path:"/accounts/:accountId/following",component:L.l,content:o}),c()(A.a,{path:"/accounts/:accountId/media",component:L.a,content:o}),c()(A.a,{path:"/follow_requests",component:L.j,content:o}),c()(A.a,{path:"/blocks",component:L.c,content:o}),c()(A.a,{path:"/mutes",component:L.r,content:o}),c()(A.a,{component:L.m,content:o}))),c()(b.a,{}),c()(w.a,{className:"loading-bar"}),c()(O.a,{}),c()(I.a,{active:n,onClose:this.closeUploadModal})))},e}(g.a.Component),i.contextTypes={router:k.a.object.isRequired},r=a))||r)||r)||r},642:function(t,e,n){"use strict";n.d(e,"b",function(){return k}),n.d(e,"a",function(){return w});var o=n(28),r=n.n(o),i=n(29),a=n.n(i),s=n(2),c=n.n(s),l=n(1),u=n.n(l),f=n(3),p=n.n(f),h=n(4),d=n.n(h),m=n(0),y=n.n(m),v=n(58),g=n(257),b=n(258),_=n(147),k=function(t){function e(){return u()(this,e),p()(this,t.apply(this,arguments))}return d()(e,t),e.prototype.render=function(){var t=this.props,e=t.multiColumn,n=t.children;return c()(v.f,{},void 0,y.a.Children.map(n,function(t){return y.a.cloneElement(t,{multiColumn:e})}))},e}(y.a.PureComponent),w=function(t){function e(){var n,o,r;u()(this,e);for(var i=arguments.length,a=Array(i),s=0;s0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,r,a,s;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.length,r=-1,n===e||o(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],o(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?o(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(o(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},93:function(t,e,n){t.exports=n(278)}},[623]); -//# sourceMappingURL=application-1b1f37dff2aac402336b.js.map \ No newline at end of file +(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 \ No newline at end of file