\n );\n }\n\n if (trackScroll) {\n return (\n \n {scrollableArea}\n \n );\n } else {\n return scrollableArea;\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/components/scrollable_list.js","import { connect } from 'react-redux';\nimport IntersectionObserverArticle from '../components/intersection_observer_article';\nimport { setHeight } from '../actions/height_cache';\n\nconst makeMapStateToProps = (state, props) => ({\n cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n\n onHeightChange (key, id, height) {\n dispatch(setHeight(key, id, height));\n },\n\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(IntersectionObserverArticle);\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/containers/intersection_observer_article_container.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport scheduleIdleTask from '../features/ui/util/schedule_idle_task';\nimport getRectFromEntry from '../features/ui/util/get_rect_from_entry';\nimport { is } from 'immutable';\n\n// Diff these props in the \"rendered\" state\nconst updateOnPropsForRendered = ['id', 'index', 'listLength'];\n// Diff these props in the \"unrendered\" state\nconst updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight'];\n\nexport default class IntersectionObserverArticle extends React.Component {\n\n static propTypes = {\n intersectionObserverWrapper: PropTypes.object.isRequired,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n index: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n listLength: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n saveHeightKey: PropTypes.string,\n cachedHeight: PropTypes.number,\n onHeightChange: PropTypes.func,\n children: PropTypes.node,\n };\n\n state = {\n isHidden: false, // set to true in requestIdleCallback to trigger un-render\n }\n\n shouldComponentUpdate (nextProps, nextState) {\n const isUnrendered = !this.state.isIntersecting && (this.state.isHidden || this.props.cachedHeight);\n const willBeUnrendered = !nextState.isIntersecting && (nextState.isHidden || nextProps.cachedHeight);\n if (!!isUnrendered !== !!willBeUnrendered) {\n // If we're going from rendered to unrendered (or vice versa) then update\n return true;\n }\n // Otherwise, diff based on props\n const propsToDiff = isUnrendered ? updateOnPropsForUnrendered : updateOnPropsForRendered;\n return !propsToDiff.every(prop => is(nextProps[prop], this.props[prop]));\n }\n\n componentDidMount () {\n const { intersectionObserverWrapper, id } = this.props;\n\n intersectionObserverWrapper.observe(\n id,\n this.node,\n this.handleIntersection\n );\n\n this.componentMounted = true;\n }\n\n componentWillUnmount () {\n const { intersectionObserverWrapper, id } = this.props;\n intersectionObserverWrapper.unobserve(id, this.node);\n\n this.componentMounted = false;\n }\n\n handleIntersection = (entry) => {\n this.entry = entry;\n\n scheduleIdleTask(this.calculateHeight);\n this.setState(this.updateStateAfterIntersection);\n }\n\n updateStateAfterIntersection = (prevState) => {\n if (prevState.isIntersecting && !this.entry.isIntersecting) {\n scheduleIdleTask(this.hideIfNotIntersecting);\n }\n return {\n isIntersecting: this.entry.isIntersecting,\n isHidden: false,\n };\n }\n\n calculateHeight = () => {\n const { onHeightChange, saveHeightKey, id } = this.props;\n // save the height of the fully-rendered element (this is expensive\n // on Chrome, where we need to fall back to getBoundingClientRect)\n this.height = getRectFromEntry(this.entry).height;\n\n if (onHeightChange && saveHeightKey) {\n onHeightChange(saveHeightKey, id, this.height);\n }\n }\n\n hideIfNotIntersecting = () => {\n if (!this.componentMounted) {\n return;\n }\n\n // When the browser gets a chance, test if we're still not intersecting,\n // and if so, set our isHidden to true to trigger an unrender. The point of\n // this is to save DOM nodes and avoid using up too much memory.\n // See: https://github.com/tootsuite/mastodon/issues/2900\n this.setState((prevState) => ({ isHidden: !prevState.isIntersecting }));\n }\n\n handleRef = (node) => {\n this.node = node;\n }\n\n render () {\n const { children, id, index, listLength, cachedHeight } = this.props;\n const { isIntersecting, isHidden } = this.state;\n\n if (!isIntersecting && (isHidden || cachedHeight)) {\n return (\n \n {children && React.cloneElement(children, { hidden: true })}\n \n );\n }\n\n return (\n \n {children && React.cloneElement(children, { hidden: false })}\n \n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/components/intersection_observer_article.js","// Wrapper to call requestIdleCallback() to schedule low-priority work.\n// See https://developer.mozilla.org/en-US/docs/Web/API/Background_Tasks_API\n// for a good breakdown of the concepts behind this.\n\nimport Queue from 'tiny-queue';\n\nconst taskQueue = new Queue();\nlet runningRequestIdleCallback = false;\n\nfunction runTasks(deadline) {\n while (taskQueue.length && deadline.timeRemaining() > 0) {\n taskQueue.shift()();\n }\n if (taskQueue.length) {\n requestIdleCallback(runTasks);\n } else {\n runningRequestIdleCallback = false;\n }\n}\n\nfunction scheduleIdleTask(task) {\n taskQueue.push(task);\n if (!runningRequestIdleCallback) {\n runningRequestIdleCallback = true;\n requestIdleCallback(runTasks);\n }\n}\n\nexport default scheduleIdleTask;\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/features/ui/util/schedule_idle_task.js","'use strict';\n\n// Simple FIFO queue implementation to avoid having to do shift()\n// on an array, which is slow.\n\nfunction Queue() {\n this.length = 0;\n}\n\nQueue.prototype.push = function (item) {\n var node = {item: item};\n if (this.last) {\n this.last = this.last.next = node;\n } else {\n this.last = this.first = node;\n }\n this.length++;\n};\n\nQueue.prototype.shift = function () {\n var node = this.first;\n if (node) {\n this.first = node.next;\n if (!(--this.length)) {\n this.last = undefined;\n }\n return node.item;\n }\n};\n\nQueue.prototype.slice = function (start, end) {\n start = typeof start === 'undefined' ? 0 : start;\n end = typeof end === 'undefined' ? Infinity : end;\n\n var output = [];\n\n var i = 0;\n for (var node = this.first; node; node = node.next) {\n if (--end < 0) {\n break;\n } else if (++i > start) {\n output.push(node.item);\n }\n }\n return output;\n}\n\nmodule.exports = Queue;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/tiny-queue/index.js","\n// Get the bounding client rect from an IntersectionObserver entry.\n// This is to work around a bug in Chrome: https://crbug.com/737228\n\nlet hasBoundingRectBug;\n\nfunction getRectFromEntry(entry) {\n if (typeof hasBoundingRectBug !== 'boolean') {\n const boundingRect = entry.target.getBoundingClientRect();\n const observerRect = entry.boundingClientRect;\n hasBoundingRectBug = boundingRect.height !== observerRect.height ||\n boundingRect.top !== observerRect.top ||\n boundingRect.width !== observerRect.width ||\n boundingRect.bottom !== observerRect.bottom ||\n boundingRect.left !== observerRect.left ||\n boundingRect.right !== observerRect.right;\n }\n return hasBoundingRectBug ? entry.target.getBoundingClientRect() : entry.boundingClientRect;\n}\n\nexport default getRectFromEntry;\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/features/ui/util/get_rect_from_entry.js","// Wrapper for IntersectionObserver in order to make working with it\n// a bit easier. We also follow this performance advice:\n// \"If you need to observe multiple elements, it is both possible and\n// advised to observe multiple elements using the same IntersectionObserver\n// instance by calling observe() multiple times.\"\n// https://developers.google.com/web/updates/2016/04/intersectionobserver\n\nclass IntersectionObserverWrapper {\n\n callbacks = {};\n observerBacklog = [];\n observer = null;\n\n connect (options) {\n const onIntersection = (entries) => {\n entries.forEach(entry => {\n const id = entry.target.getAttribute('data-id');\n if (this.callbacks[id]) {\n this.callbacks[id](entry);\n }\n });\n };\n\n this.observer = new IntersectionObserver(onIntersection, options);\n this.observerBacklog.forEach(([ id, node, callback ]) => {\n this.observe(id, node, callback);\n });\n this.observerBacklog = null;\n }\n\n observe (id, node, callback) {\n if (!this.observer) {\n this.observerBacklog.push([ id, node, callback ]);\n } else {\n this.callbacks[id] = callback;\n this.observer.observe(node);\n }\n }\n\n unobserve (id, node) {\n if (this.observer) {\n delete this.callbacks[id];\n this.observer.unobserve(node);\n }\n }\n\n disconnect () {\n if (this.observer) {\n this.callbacks = {};\n this.observer.disconnect();\n this.observer = null;\n }\n }\n\n}\n\nexport default IntersectionObserverWrapper;\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport StatusContainer from '../containers/status_container';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ScrollableList from './scrollable_list';\n\nexport default class StatusList extends ImmutablePureComponent {\n\n static propTypes = {\n scrollKey: PropTypes.string.isRequired,\n statusIds: ImmutablePropTypes.list.isRequired,\n onScrollToBottom: PropTypes.func,\n onScrollToTop: PropTypes.func,\n onScroll: PropTypes.func,\n trackScroll: PropTypes.bool,\n shouldUpdateScroll: PropTypes.func,\n isLoading: PropTypes.bool,\n hasMore: PropTypes.bool,\n prepend: PropTypes.node,\n emptyMessage: PropTypes.node,\n };\n\n static defaultProps = {\n trackScroll: true,\n };\n\n handleMoveUp = id => {\n const elementIndex = this.props.statusIds.indexOf(id) - 1;\n this._selectChild(elementIndex);\n }\n\n handleMoveDown = id => {\n const elementIndex = this.props.statusIds.indexOf(id) + 1;\n this._selectChild(elementIndex);\n }\n\n _selectChild (index) {\n const element = this.node.node.querySelector(`article:nth-of-type(${index + 1}) .focusable`);\n\n if (element) {\n element.focus();\n }\n }\n\n setRef = c => {\n this.node = c;\n }\n\n render () {\n const { statusIds, ...other } = this.props;\n const { isLoading } = other;\n\n const scrollableContent = (isLoading || statusIds.size > 0) ? (\n statusIds.map((statusId) => (\n \n ))\n ) : null;\n\n return (\n \n {scrollableContent}\n \n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/components/status_list.js","import createStream from '../stream';\nimport {\n updateTimeline,\n deleteFromTimelines,\n refreshHomeTimeline,\n connectTimeline,\n disconnectTimeline,\n} from './timelines';\nimport { updateNotifications, refreshNotifications } from './notifications';\nimport { getLocale } from '../locales';\n\nconst { messages } = getLocale();\n\nexport function connectTimelineStream (timelineId, path, pollingRefresh = null) {\n return (dispatch, getState) => {\n const streamingAPIBaseURL = getState().getIn(['meta', 'streaming_api_base_url']);\n const accessToken = getState().getIn(['meta', 'access_token']);\n const locale = getState().getIn(['meta', 'locale']);\n let polling = null;\n\n const setupPolling = () => {\n polling = setInterval(() => {\n pollingRefresh(dispatch);\n }, 20000);\n };\n\n const clearPolling = () => {\n if (polling) {\n clearInterval(polling);\n polling = null;\n }\n };\n\n const subscription = createStream(streamingAPIBaseURL, accessToken, path, {\n\n connected () {\n if (pollingRefresh) {\n clearPolling();\n }\n dispatch(connectTimeline(timelineId));\n },\n\n disconnected () {\n if (pollingRefresh) {\n setupPolling();\n }\n dispatch(disconnectTimeline(timelineId));\n },\n\n received (data) {\n switch(data.event) {\n case 'update':\n dispatch(updateTimeline(timelineId, JSON.parse(data.payload)));\n break;\n case 'delete':\n dispatch(deleteFromTimelines(data.payload));\n break;\n case 'notification':\n dispatch(updateNotifications(JSON.parse(data.payload), messages, locale));\n break;\n }\n },\n\n reconnected () {\n if (pollingRefresh) {\n clearPolling();\n pollingRefresh(dispatch);\n }\n dispatch(connectTimeline(timelineId));\n },\n\n });\n\n const disconnect = () => {\n if (subscription) {\n subscription.close();\n }\n clearPolling();\n };\n\n return disconnect;\n };\n}\n\nfunction refreshHomeTimelineAndNotification (dispatch) {\n dispatch(refreshHomeTimeline());\n dispatch(refreshNotifications());\n}\n\nexport const connectUserStream = () => connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification);\nexport const connectCommunityStream = () => connectTimelineStream('community', 'public:local');\nexport const connectMediaStream = () => connectTimelineStream('community', 'public:local');\nexport const connectPublicStream = () => connectTimelineStream('public', 'public');\nexport const connectHashtagStream = (tag) => connectTimelineStream(`hashtag:${tag}`, `hashtag&tag=${tag}`);\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/actions/streaming.js","import WebSocketClient from 'websocket.js';\n\nexport default function getStream(streamingAPIBaseURL, accessToken, stream, { connected, received, disconnected, reconnected }) {\n const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?access_token=${accessToken}&stream=${stream}`);\n\n ws.onopen = connected;\n ws.onmessage = e => received(JSON.parse(e.data));\n ws.onclose = disconnected;\n ws.onreconnect = reconnected;\n\n return ws;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/stream.js","'use strict';Object.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,WebSocketClient);this.url=url;this.protocols=protocols;this.reconnectEnabled=true;this.listeners={};this.backoff=backoff[options.backoff||'fibonacci'](options);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();}_createClass(WebSocketClient,[{key:'open',value:function open(){var reconnect=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;this.isReconnect=reconnect;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);}/**\n * @ignore\n */},{key:'onBackoffStart',value:function onBackoffStart(number,delay){}/**\n * @ignore\n */},{key:'onBackoffReady',value:function onBackoffReady(number,delay){// console.log(\"onBackoffReady\", number + ' ' + delay + 'ms');\nthis.open(true);}/**\n * @ignore\n */},{key:'onBackoffFail',value:function onBackoffFail(){}/**\n * @ignore\n */},{key:'onCloseCallback',value:function onCloseCallback(){if(!this.isReconnect&&this.listeners['onclose'])this.listeners['onclose'].apply(null,arguments);if(this.reconnectEnabled){this.backoff.backoff();}}/**\n * @ignore\n */},{key:'onErrorCallback',value:function onErrorCallback(){if(this.listeners['onerror'])this.listeners['onerror'].apply(null,arguments);}/**\n * @ignore\n */},{key:'onMessageCallback',value:function onMessageCallback(){if(this.listeners['onmessage'])this.listeners['onmessage'].apply(null,arguments);}/**\n * @ignore\n */},{key:'onOpenCallback',value:function onOpenCallback(){if(this.listeners['onopen'])this.listeners['onopen'].apply(null,arguments);if(this.isReconnect&&this.listeners['onreconnect'])this.listeners['onreconnect'].apply(null,arguments);this.isReconnect=false;}/**\n * The number of bytes of data that have been queued using calls to send()\n * but not yet transmitted to the network. This value does not reset to zero\n * when the connection is closed; if you keep calling send(), this will\n * continue to climb.\n *\n * @type unsigned long\n * @readonly\n */},{key:'close',/**\n * Closes the WebSocket connection or connection attempt, if any. If the\n * connection is already CLOSED, this method does nothing.\n *\n * @param code A numeric value indicating the status code explaining why the connection is being closed. If this parameter is not specified, a default value of 1000 (indicating a normal \"transaction complete\" closure) is assumed. See the list of status codes on the CloseEvent page for permitted values.\n * @param reason A human-readable string explaining why the connection is closing. This string must be no longer than 123 bytes of UTF-8 text (not characters).\n *\n * @return void\n */value:function close(code,reason){if(typeof code=='undefined'){code=1000;}this.reconnectEnabled=false;this.ws.close(code,reason);}/**\n * Transmits data to the server over the WebSocket connection.\n * @param data DOMString|ArrayBuffer|Blob\n * @return void\n */},{key:'send',value:function send(data){this.ws.send(data);}/**\n * An event listener to be called when the WebSocket connection's readyState changes to CLOSED. The listener receives a CloseEvent named \"close\".\n * @param listener EventListener\n */},{key:'bufferedAmount',get:function get(){return this.ws.bufferedAmount;}/**\n * The current state of the connection; this is one of the Ready state constants.\n * @type unsigned short\n * @readonly\n */},{key:'readyState',get:function get(){return this.ws.readyState;}/**\n * A string indicating the type of binary data being transmitted by the\n * connection. This should be either \"blob\" if DOM Blob objects are being\n * used or \"arraybuffer\" if ArrayBuffer objects are being used.\n * @type DOMString\n */},{key:'binaryType',get:function get(){return this.ws.binaryType;},set:function set(binaryType){this.ws.binaryType=binaryType;}/**\n * The extensions selected by the server. This is currently only the empty\n * string or a list of extensions as negotiated by the connection.\n * @type DOMString\n */},{key:'extensions',get:function get(){return this.ws.extensions;},set:function set(extensions){this.ws.extensions=extensions;}/**\n * A string indicating the name of the sub-protocol the server selected;\n * this will be one of the strings specified in the protocols parameter when\n * creating the WebSocket object.\n * @type DOMString\n */},{key:'protocol',get:function get(){return this.ws.protocol;},set:function set(protocol){this.ws.protocol=protocol;}},{key:'onclose',set:function set(listener){this.listeners['onclose']=listener;},get:function get(){return this.listeners['onclose'];}/**\n * An event listener to be called when an error occurs. This is a simple event named \"error\".\n * @param listener EventListener\n */},{key:'onerror',set:function set(listener){this.listeners['onerror']=listener;},get:function get(){return this.listeners['onerror'];}/**\n * An event listener to be called when a message is received from the server. The listener receives a MessageEvent named \"message\".\n * @param listener EventListener\n */},{key:'onmessage',set:function set(listener){this.listeners['onmessage']=listener;},get:function get(){return this.listeners['onmessage'];}/**\n * An event listener to be called when the WebSocket connection's readyState changes to OPEN; this indicates that the connection is ready to send and receive data. The event is a simple one with the name \"open\".\n * @param listener EventListener\n */},{key:'onopen',set:function set(listener){this.listeners['onopen']=listener;},get:function get(){return this.listeners['onopen'];}/**\n * @param listener EventListener\n */},{key:'onreconnect',set:function set(listener){this.listeners['onreconnect']=listener;},get:function get(){return this.listeners['onreconnect'];}}]);return WebSocketClient;}();/**\n * The connection is not yet open.\n */WebSocketClient.CONNECTING=WebSocket.CONNECTING;/**\n * The connection is open and ready to communicate.\n */WebSocketClient.OPEN=WebSocket.OPEN;/**\n * The connection is in the process of closing.\n */WebSocketClient.CLOSING=WebSocket.CLOSING;/**\n * The connection is closed or couldn't be opened.\n */WebSocketClient.CLOSED=WebSocket.CLOSED;exports.default=WebSocketClient;\n\n\n// WEBPACK FOOTER //\n// ./node_modules/websocket.js/lib/index.js","// Copyright (c) 2012 Mathieu Turcotte\n// Licensed under the MIT license.\n\nvar Backoff = require('./lib/backoff');\nvar ExponentialBackoffStrategy = require('./lib/strategy/exponential');\nvar FibonacciBackoffStrategy = require('./lib/strategy/fibonacci');\nvar FunctionCall = require('./lib/function_call.js');\n\nmodule.exports.Backoff = Backoff;\nmodule.exports.FunctionCall = FunctionCall;\nmodule.exports.FibonacciStrategy = FibonacciBackoffStrategy;\nmodule.exports.ExponentialStrategy = ExponentialBackoffStrategy;\n\n// Constructs a Fibonacci backoff.\nmodule.exports.fibonacci = function(options) {\n return new Backoff(new FibonacciBackoffStrategy(options));\n};\n\n// Constructs an exponential backoff.\nmodule.exports.exponential = function(options) {\n return new Backoff(new ExponentialBackoffStrategy(options));\n};\n\n// Constructs a FunctionCall for the given function and arguments.\nmodule.exports.call = function(fn, vargs, callback) {\n var args = Array.prototype.slice.call(arguments);\n fn = args[0];\n vargs = args.slice(1, args.length - 1);\n callback = args[args.length - 1];\n return new FunctionCall(fn, vargs, callback);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/backoff/index.js","/*\n * Copyright (c) 2012 Mathieu Turcotte\n * Licensed under the MIT license.\n */\n\nvar util = require('util');\n\nvar errors = module.exports = require('./errors');\n\nfunction failCheck(ExceptionConstructor, callee, messageFormat, formatArgs) {\n messageFormat = messageFormat || '';\n var message = util.format.apply(this, [messageFormat].concat(formatArgs));\n var error = new ExceptionConstructor(message);\n Error.captureStackTrace(error, callee);\n throw error;\n}\n\nfunction failArgumentCheck(callee, message, formatArgs) {\n failCheck(errors.IllegalArgumentError, callee, message, formatArgs);\n}\n\nfunction failStateCheck(callee, message, formatArgs) {\n failCheck(errors.IllegalStateError, callee, message, formatArgs);\n}\n\nmodule.exports.checkArgument = function(value, message) {\n if (!value) {\n failArgumentCheck(arguments.callee, message,\n Array.prototype.slice.call(arguments, 2));\n }\n};\n\nmodule.exports.checkState = function(value, message) {\n if (!value) {\n failStateCheck(arguments.callee, message,\n Array.prototype.slice.call(arguments, 2));\n }\n};\n\nmodule.exports.checkIsDef = function(value, message) {\n if (value !== undefined) {\n return value;\n }\n\n failArgumentCheck(arguments.callee, message ||\n 'Expected value to be defined but was undefined.',\n Array.prototype.slice.call(arguments, 2));\n};\n\nmodule.exports.checkIsDefAndNotNull = function(value, message) {\n // Note that undefined == null.\n if (value != null) {\n return value;\n }\n\n failArgumentCheck(arguments.callee, message ||\n 'Expected value to be defined and not null but got \"' +\n typeOf(value) + '\".', Array.prototype.slice.call(arguments, 2));\n};\n\n// Fixed version of the typeOf operator which returns 'null' for null values\n// and 'array' for arrays.\nfunction typeOf(value) {\n var s = typeof value;\n if (s == 'object') {\n if (!value) {\n return 'null';\n } else if (value instanceof Array) {\n return 'array';\n }\n }\n return s;\n}\n\nfunction typeCheck(expect) {\n return function(value, message) {\n var type = typeOf(value);\n\n if (type == expect) {\n return value;\n }\n\n failArgumentCheck(arguments.callee, message ||\n 'Expected \"' + expect + '\" but got \"' + type + '\".',\n Array.prototype.slice.call(arguments, 2));\n };\n}\n\nmodule.exports.checkIsString = typeCheck('string');\nmodule.exports.checkIsArray = typeCheck('array');\nmodule.exports.checkIsNumber = typeCheck('number');\nmodule.exports.checkIsBoolean = typeCheck('boolean');\nmodule.exports.checkIsFunction = typeCheck('function');\nmodule.exports.checkIsObject = typeCheck('object');\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/precond/lib/checks.js","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}\n\n\n// WEBPACK FOOTER //\n// ./node_modules/util/support/isBufferBrowser.js","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/util/node_modules/inherits/inherits_browser.js","/*\n * Copyright (c) 2012 Mathieu Turcotte\n * Licensed under the MIT license.\n */\n\nvar util = require('util');\n\nfunction IllegalArgumentError(message) {\n Error.call(this, message);\n this.message = message;\n}\nutil.inherits(IllegalArgumentError, Error);\n\nIllegalArgumentError.prototype.name = 'IllegalArgumentError';\n\nfunction IllegalStateError(message) {\n Error.call(this, message);\n this.message = message;\n}\nutil.inherits(IllegalStateError, Error);\n\nIllegalStateError.prototype.name = 'IllegalStateError';\n\nmodule.exports.IllegalStateError = IllegalStateError;\nmodule.exports.IllegalArgumentError = IllegalArgumentError;\n\n\n// WEBPACK FOOTER //\n// ./node_modules/precond/lib/errors.js","// Copyright (c) 2012 Mathieu Turcotte\n// Licensed under the MIT license.\n\nvar util = require('util');\nvar precond = require('precond');\n\nvar BackoffStrategy = require('./strategy');\n\n// Exponential backoff strategy.\nfunction ExponentialBackoffStrategy(options) {\n BackoffStrategy.call(this, options);\n this.backoffDelay_ = 0;\n this.nextBackoffDelay_ = this.getInitialDelay();\n this.factor_ = ExponentialBackoffStrategy.DEFAULT_FACTOR;\n\n if (options && options.factor !== undefined) {\n precond.checkArgument(options.factor > 1,\n 'Exponential factor should be greater than 1 but got %s.',\n options.factor);\n this.factor_ = options.factor;\n }\n}\nutil.inherits(ExponentialBackoffStrategy, BackoffStrategy);\n\n// Default multiplication factor used to compute the next backoff delay from\n// the current one. The value can be overridden by passing a custom factor as\n// part of the options.\nExponentialBackoffStrategy.DEFAULT_FACTOR = 2;\n\nExponentialBackoffStrategy.prototype.next_ = function() {\n this.backoffDelay_ = Math.min(this.nextBackoffDelay_, this.getMaxDelay());\n this.nextBackoffDelay_ = this.backoffDelay_ * this.factor_;\n return this.backoffDelay_;\n};\n\nExponentialBackoffStrategy.prototype.reset_ = function() {\n this.backoffDelay_ = 0;\n this.nextBackoffDelay_ = this.getInitialDelay();\n};\n\nmodule.exports = ExponentialBackoffStrategy;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/backoff/lib/strategy/exponential.js","// Copyright (c) 2012 Mathieu Turcotte\n// Licensed under the MIT license.\n\nvar events = require('events');\nvar precond = require('precond');\nvar util = require('util');\n\nvar Backoff = require('./backoff');\nvar FibonacciBackoffStrategy = require('./strategy/fibonacci');\n\n// Wraps a function to be called in a backoff loop.\nfunction FunctionCall(fn, args, callback) {\n events.EventEmitter.call(this);\n\n precond.checkIsFunction(fn, 'Expected fn to be a function.');\n precond.checkIsArray(args, 'Expected args to be an array.');\n precond.checkIsFunction(callback, 'Expected callback to be a function.');\n\n this.function_ = fn;\n this.arguments_ = args;\n this.callback_ = callback;\n this.lastResult_ = [];\n this.numRetries_ = 0;\n\n this.backoff_ = null;\n this.strategy_ = null;\n this.failAfter_ = -1;\n this.retryPredicate_ = FunctionCall.DEFAULT_RETRY_PREDICATE_;\n\n this.state_ = FunctionCall.State_.PENDING;\n}\nutil.inherits(FunctionCall, events.EventEmitter);\n\n// States in which the call can be.\nFunctionCall.State_ = {\n // Call isn't started yet.\n PENDING: 0,\n // Call is in progress.\n RUNNING: 1,\n // Call completed successfully which means that either the wrapped function\n // returned successfully or the maximal number of backoffs was reached.\n COMPLETED: 2,\n // The call was aborted.\n ABORTED: 3\n};\n\n// The default retry predicate which considers any error as retriable.\nFunctionCall.DEFAULT_RETRY_PREDICATE_ = function(err) {\n return true;\n};\n\n// Checks whether the call is pending.\nFunctionCall.prototype.isPending = function() {\n return this.state_ == FunctionCall.State_.PENDING;\n};\n\n// Checks whether the call is in progress.\nFunctionCall.prototype.isRunning = function() {\n return this.state_ == FunctionCall.State_.RUNNING;\n};\n\n// Checks whether the call is completed.\nFunctionCall.prototype.isCompleted = function() {\n return this.state_ == FunctionCall.State_.COMPLETED;\n};\n\n// Checks whether the call is aborted.\nFunctionCall.prototype.isAborted = function() {\n return this.state_ == FunctionCall.State_.ABORTED;\n};\n\n// Sets the backoff strategy to use. Can only be called before the call is\n// started otherwise an exception will be thrown.\nFunctionCall.prototype.setStrategy = function(strategy) {\n precond.checkState(this.isPending(), 'FunctionCall in progress.');\n this.strategy_ = strategy;\n return this; // Return this for chaining.\n};\n\n// Sets the predicate which will be used to determine whether the errors\n// returned from the wrapped function should be retried or not, e.g. a\n// network error would be retriable while a type error would stop the\n// function call.\nFunctionCall.prototype.retryIf = function(retryPredicate) {\n precond.checkState(this.isPending(), 'FunctionCall in progress.');\n this.retryPredicate_ = retryPredicate;\n return this;\n};\n\n// Returns all intermediary results returned by the wrapped function since\n// the initial call.\nFunctionCall.prototype.getLastResult = function() {\n return this.lastResult_.concat();\n};\n\n// Returns the number of times the wrapped function call was retried.\nFunctionCall.prototype.getNumRetries = function() {\n return this.numRetries_;\n};\n\n// Sets the backoff limit.\nFunctionCall.prototype.failAfter = function(maxNumberOfRetry) {\n precond.checkState(this.isPending(), 'FunctionCall in progress.');\n this.failAfter_ = maxNumberOfRetry;\n return this; // Return this for chaining.\n};\n\n// Aborts the call.\nFunctionCall.prototype.abort = function() {\n if (this.isCompleted() || this.isAborted()) {\n return;\n }\n\n if (this.isRunning()) {\n this.backoff_.reset();\n }\n\n this.state_ = FunctionCall.State_.ABORTED;\n this.lastResult_ = [new Error('Backoff aborted.')];\n this.emit('abort');\n this.doCallback_();\n};\n\n// Initiates the call to the wrapped function. Accepts an optional factory\n// function used to create the backoff instance; used when testing.\nFunctionCall.prototype.start = function(backoffFactory) {\n precond.checkState(!this.isAborted(), 'FunctionCall is aborted.');\n precond.checkState(this.isPending(), 'FunctionCall already started.');\n\n var strategy = this.strategy_ || new FibonacciBackoffStrategy();\n\n this.backoff_ = backoffFactory ?\n backoffFactory(strategy) :\n new Backoff(strategy);\n\n this.backoff_.on('ready', this.doCall_.bind(this, true /* isRetry */));\n this.backoff_.on('fail', this.doCallback_.bind(this));\n this.backoff_.on('backoff', this.handleBackoff_.bind(this));\n\n if (this.failAfter_ > 0) {\n this.backoff_.failAfter(this.failAfter_);\n }\n\n this.state_ = FunctionCall.State_.RUNNING;\n this.doCall_(false /* isRetry */);\n};\n\n// Calls the wrapped function.\nFunctionCall.prototype.doCall_ = function(isRetry) {\n if (isRetry) {\n this.numRetries_++;\n }\n var eventArgs = ['call'].concat(this.arguments_);\n events.EventEmitter.prototype.emit.apply(this, eventArgs);\n var callback = this.handleFunctionCallback_.bind(this);\n this.function_.apply(null, this.arguments_.concat(callback));\n};\n\n// Calls the wrapped function's callback with the last result returned by the\n// wrapped function.\nFunctionCall.prototype.doCallback_ = function() {\n this.callback_.apply(null, this.lastResult_);\n};\n\n// Handles wrapped function's completion. This method acts as a replacement\n// for the original callback function.\nFunctionCall.prototype.handleFunctionCallback_ = function() {\n if (this.isAborted()) {\n return;\n }\n\n var args = Array.prototype.slice.call(arguments);\n this.lastResult_ = args; // Save last callback arguments.\n events.EventEmitter.prototype.emit.apply(this, ['callback'].concat(args));\n\n var err = args[0];\n if (err && this.retryPredicate_(err)) {\n this.backoff_.backoff(err);\n } else {\n this.state_ = FunctionCall.State_.COMPLETED;\n this.doCallback_();\n }\n};\n\n// Handles the backoff event by reemitting it.\nFunctionCall.prototype.handleBackoff_ = function(number, delay, err) {\n this.emit('backoff', number, delay, err);\n};\n\nmodule.exports = FunctionCall;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/backoff/lib/function_call.js","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/util/util.js","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport StatusListContainer from '../ui/containers/status_list_container';\nimport Column from '../../components/column';\nimport ColumnHeader from '../../components/column_header';\nimport {\n refreshPublicTimeline,\n expandPublicTimeline,\n} from '../../actions/timelines';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ColumnSettingsContainer from './containers/column_settings_container';\nimport { connectPublicStream } from '../../actions/streaming';\n\nconst messages = defineMessages({\n title: { id: 'column.public', defaultMessage: 'Federated timeline' },\n});\n\nconst mapStateToProps = state => ({\n hasUnread: state.getIn(['timelines', 'public', 'unread']) > 0,\n});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class PublicTimeline extends React.PureComponent {\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n columnId: PropTypes.string,\n multiColumn: PropTypes.bool,\n hasUnread: PropTypes.bool,\n };\n\n handlePin = () => {\n const { columnId, dispatch } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('PUBLIC', {}));\n }\n }\n\n handleMove = (dir) => {\n const { columnId, dispatch } = this.props;\n dispatch(moveColumn(columnId, dir));\n }\n\n handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n componentDidMount () {\n const { dispatch } = this.props;\n\n dispatch(refreshPublicTimeline());\n this.disconnect = dispatch(connectPublicStream());\n }\n\n componentWillUnmount () {\n if (this.disconnect) {\n this.disconnect();\n this.disconnect = null;\n }\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleLoadMore = () => {\n this.props.dispatch(expandPublicTimeline());\n }\n\n render () {\n const { intl, columnId, hasUnread, multiColumn } = this.props;\n const pinned = !!columnId;\n\n return (\n \n \n \n \n\n }\n />\n \n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/features/public_timeline/index.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\n\nexport default class SettingText extends React.PureComponent {\n\n static propTypes = {\n settings: ImmutablePropTypes.map.isRequired,\n settingKey: PropTypes.array.isRequired,\n label: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n };\n\n handleChange = (e) => {\n this.props.onChange(this.props.settingKey, e.target.value);\n }\n\n render () {\n const { settings, settingKey, label } = this.props;\n\n return (\n \n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/components/setting_text.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport SettingText from '../../../components/setting_text';\n\nconst messages = defineMessages({\n filter_regex: { id: 'home.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },\n settings: { id: 'home.settings', defaultMessage: 'Column settings' },\n});\n\n@injectIntl\nexport default class ColumnSettings extends React.PureComponent {\n\n static propTypes = {\n settings: ImmutablePropTypes.map.isRequired,\n onChange: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n render () {\n const { settings, onChange, intl } = this.props;\n\n return (\n
\n \n\n
\n \n
\n
\n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/features/community_timeline/components/column_settings.js","import { connect } from 'react-redux';\nimport ColumnSettings from '../../community_timeline/components/column_settings';\nimport { changeSetting } from '../../../actions/settings';\n\nconst mapStateToProps = state => ({\n settings: state.getIn(['settings', 'public']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n onChange (key, checked) {\n dispatch(changeSetting(['public', ...key], checked));\n },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/events/events.js","/*\n * Copyright (c) 2012 Mathieu Turcotte\n * Licensed under the MIT license.\n */\n\nmodule.exports = require('./lib/checks');\n\n\n// WEBPACK FOOTER //\n// ./node_modules/precond/index.js"],"sourceRoot":""}