does.\n contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';\n }\n return contentKey;\n}\n\nmodule.exports = getTextContentAccessor;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/getTextContentAccessor.js\n// module id = 162\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule instantiateReactComponent\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar ReactCompositeComponent = require('./ReactCompositeComponent');\nvar ReactEmptyComponent = require('./ReactEmptyComponent');\nvar ReactHostComponent = require('./ReactHostComponent');\n\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n// To avoid a cyclic dependency, we create the final class in this module\nvar ReactCompositeComponentWrapper = function (element) {\n this.construct(element);\n};\n_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, {\n _instantiateReactComponent: instantiateReactComponent\n});\n\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Check if the type reference is a known internal type. I.e. not a user\n * provided composite type.\n *\n * @param {function} type\n * @return {boolean} Returns true if this is a valid internal type.\n */\nfunction isInternalComponentType(type) {\n return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';\n}\n\nvar nextDebugID = 1;\n\n/**\n * Given a ReactNode, create an instance that will actually be mounted.\n *\n * @param {ReactNode} node\n * @param {boolean} shouldHaveDebugID\n * @return {object} A new instance of the element's constructor.\n * @protected\n */\nfunction instantiateReactComponent(node, shouldHaveDebugID) {\n var instance;\n\n if (node === null || node === false) {\n instance = ReactEmptyComponent.create(instantiateReactComponent);\n } else if (typeof node === 'object') {\n var element = node;\n !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0;\n\n // Special case string values\n if (typeof element.type === 'string') {\n instance = ReactHostComponent.createInternalComponent(element);\n } else if (isInternalComponentType(element.type)) {\n // This is temporarily available for custom components that are not string\n // representations. I.e. ART. Once those are updated to use the string\n // representation, we can drop this code path.\n instance = new element.type(element);\n\n // We renamed this. Allow the old name for compat. :(\n if (!instance.getHostNode) {\n instance.getHostNode = instance.getNativeNode;\n }\n } else {\n instance = new ReactCompositeComponentWrapper(element);\n }\n } else if (typeof node === 'string' || typeof node === 'number') {\n instance = ReactHostComponent.createInstanceForText(node);\n } else {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;\n }\n\n // These two fields are used by the DOM and ART diffing algorithms\n // respectively. Instead of using expandos on components, we should be\n // storing the state needed by the diffing algorithms elsewhere.\n instance._mountIndex = 0;\n instance._mountImage = null;\n\n if (process.env.NODE_ENV !== 'production') {\n instance._debugID = shouldHaveDebugID ? nextDebugID++ : 0;\n }\n\n // Internal instances should fully constructed at this point, so they should\n // not get any new fields added to them at this point.\n if (process.env.NODE_ENV !== 'production') {\n if (Object.preventExtensions) {\n Object.preventExtensions(instance);\n }\n }\n\n return instance;\n}\n\nmodule.exports = instantiateReactComponent;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/instantiateReactComponent.js\n// module id = 163\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isTextInputElement\n * \n */\n\n'use strict';\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\n\nvar supportedInputTypes = {\n 'color': true,\n 'date': true,\n 'datetime': true,\n 'datetime-local': true,\n 'email': true,\n 'month': true,\n 'number': true,\n 'password': true,\n 'range': true,\n 'search': true,\n 'tel': true,\n 'text': true,\n 'time': true,\n 'url': true,\n 'week': true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isTextInputElement;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/isTextInputElement.js\n// module id = 164\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule setTextContent\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar setInnerHTML = require('./setInnerHTML');\n\n/**\n * Set the textContent property of a node, ensuring that whitespace is preserved\n * even in IE8. innerText is a poor substitute for textContent and, among many\n * issues, inserts
instead of the literal newline chars. innerHTML behaves\n * as it should.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n};\n\nif (ExecutionEnvironment.canUseDOM) {\n if (!('textContent' in document.documentElement)) {\n setTextContent = function (node, text) {\n setInnerHTML(node, escapeTextContentForBrowser(text));\n };\n }\n}\n\nmodule.exports = setTextContent;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/setTextContent.js\n// module id = 165\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = compose;\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n var last = funcs[funcs.length - 1];\n var rest = funcs.slice(0, -1);\n return function () {\n return rest.reduceRight(function (composed, f) {\n return f(composed);\n }, last.apply(undefined, arguments));\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/lib/compose.js\n// module id = 166\n// module chunks = 0","'use strict';\n\nexports.__esModule = true;\nexports.ActionTypes = undefined;\nexports['default'] = createStore;\n\nvar _isPlainObject = require('lodash/isPlainObject');\n\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\n\nvar _symbolObservable = require('symbol-observable');\n\nvar _symbolObservable2 = _interopRequireDefault(_symbolObservable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = exports.ActionTypes = {\n INIT: '@@redux/INIT'\n};\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} enhancer The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!(0, _isPlainObject2['default'])(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/zenparsing/es-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[_symbolObservable2['default']] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[_symbolObservable2['default']] = observable, _ref2;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/lib/createStore.js\n// module id = 167\n// module chunks = 0","'use strict';\n\nexports.__esModule = true;\nexports['default'] = warning;\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/lib/utils/warning.js\n// module id = 168\n// module chunks = 0","module.exports = function(module) {\n\tif(!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tmodule.children = [];\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 169\n// module chunks = 0","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (typeof input === 'string') {\n this.url = input\n } else {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split('\\r\\n').forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/whatwg-fetch/fetch.js\n// module id = 170\n// module chunks = 0","import React, { Component } from 'react';\nimport { Layout, Drawer, Header, Navigation, Content,\n Footer, FooterSection, FooterDropDownSection, FooterLinkList,\n Grid, Cell,\n} from 'react-mdl';\nimport style from './styles.scss';\nimport ErrorContainer from './error/error-container';\n\nimport UserContainer from './user/user-container';\nimport ShowUserContainer from './user/show-user-container';\n\nexport default class App extends Component {\n constructor (props) {\n super(props);\n this.state = { drawerActive: false };\n\n this.toggleDrawerActive = () => {\n this.setState({ drawerActive: !this.state.drawerActive });\n };\n }\n static contextTypes = {\n router: React.PropTypes.object,\n }\n\n componentDidMount () {\n document.title = `${this.getCurrentSection()} - Unleash Admin`;\n }\n\n getCurrentSection () {\n const { routes } = this.props;\n const lastRoute = routes[routes.length - 1];\n return lastRoute ? lastRoute.pageTitle : '';\n }\n\n onOverlayClick = () => this.setState({ drawerActive: false });\n\n render () {\n const createListItem = (path, caption) =>\n
\n {caption}\n ;\n\n return (\n
\n
\n
\n Unleash Admin / {this.getCurrentSection()}}>\n \n Github\n \n \n \n \n \n {createListItem('/features', 'Feature toggles')}\n {createListItem('/strategies', 'Strategies')}\n {createListItem('/history', 'Event history')}\n {createListItem('/archive', 'Archived toggles')}\n
\n {createListItem('/applications', 'Applications')}\n {createListItem('/metrics', 'Client metrics')}\n {createListItem('/client-strategies', 'Client strategies')}\n {createListItem('/client-instances', 'Client instances')}\n \n \n \n \n \n {this.props.children}\n \n | \n \n \n \n \n
\n );\n\n\n\n return (\n
\n
\n \n \n
\n
\n \n \n \n \n \n \n {this.props.children}\n
\n \n \n \n
\n
\n );\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/app.jsx","import React, { Component } from 'react';\n\nimport { Link } from 'react-router';\nimport { Grid, Cell } from 'react-mdl';\n\nclass ClientStrategies extends Component {\n\n componentDidMount () {\n this.props.fetchApplication(this.props.appName);\n }\n\n render () { \n if (!this.props.application) {\n return
Loading application info...
;\n }\n const {\n appName,\n instances,\n strategies,\n seenToggles,\n } = this.props.application;\n \n return (\n
\n
{appName}
\n \n
\n \n Instances\n \n {instances.map(({ instanceId }, i) => - {instanceId}
)}\n \n | \n \n Strategies\n \n {/*strategies.map((name, i) => - {name}
)*/}\n \n | \n \n Toggles\n \n {seenToggles.map((name, i) => - \n \n {name}\n \n
)}\n \n | \n \n
\n );\n }\n}\n\n\nexport default ClientStrategies;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/application/application-edit-component.js","import { connect } from 'react-redux';\nimport ApplicationEdit from './application-edit-component';\nimport { fetchApplication } from '../../store/application/actions';\n\nconst mapStateToProps = (state, props) => {\n let application = state.applications.getIn(['apps', props.appName]);\n if (application) {\n application = application.toJS();\n }\n return {\n application,\n };\n};\n\nconst Constainer = connect(mapStateToProps, { fetchApplication })(ApplicationEdit);\n\nexport default Constainer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/application/application-edit-container.js","import React, { Component } from 'react';\nimport { Link } from 'react-router';\n\nclass ClientStrategies extends Component {\n\n componentDidMount () {\n this.props.fetchAll();\n }\n\n render () {\n const {\n applications,\n } = this.props;\n\n if (!applications) {\n return
loading...
;\n }\n return (\n
\n {applications.map(item => (\n \n Link: {item.appName}\n \n ))}\n
\n );\n }\n}\n\n\nexport default ClientStrategies;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/application/application-list-component.js","import { connect } from 'react-redux';\nimport ApplicationList from './application-list-component';\nimport { fetchAll } from '../../store/application/actions';\n\nconst mapStateToProps = (state) => ({ applications: state.applications.get('list').toJS() });\n\nconst Container = connect(mapStateToProps, { fetchAll })(ApplicationList);\n\nexport default Container;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/application/application-list-container.js","import { connect } from 'react-redux';\nimport ListComponent from './archive-list-component';\nimport { fetchArchive, revive } from '../../store/archive-actions';\n\nconst mapStateToProps = (state) => {\n const archive = state.archive.get('list').toArray();\n\n return {\n archive,\n };\n};\n\nconst ArchiveListContainer = connect(mapStateToProps, { fetchArchive, revive })(ListComponent);\n\nexport default ArchiveListContainer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/archive/archive-container.js","import React, { Component } from 'react';\nimport { DataTable, TableHeader, Chip, Switch, IconButton } from 'react-mdl';\n\nclass ArchiveList extends Component {\n componentDidMount () {\n this.props.fetchArchive();\n }\n\n render () {\n const { archive, revive } = this.props;\n return (\n
\n
Toggle Archive
\n \n
\n (\n revive(name)} />\n )}>Revive\n (v ? 'Yes' : '-')}>Enabled\n Toggle name\n Created\n \n
\n );\n }\n}\n\n\nexport default ArchiveList;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/archive/archive-list-component.jsx","import React, { Component } from 'react';\nimport { DataTable, TableHeader } from 'react-mdl';\n\nclass ClientStrategies extends Component {\n\n componentDidMount () {\n this.props.fetchClientStrategies();\n }\n\n render () {\n const source = this.props.clientStrategies\n // temp hack for ignoring dumb data\n .filter(item => item.strategies)\n .map(item => (\n {\n appName: item.appName,\n strategies: item.strategies && item.strategies.join(', '),\n })\n );\n\n return (\n
\n Application name\n Strategies\n \n );\n }\n}\n\n\nexport default ClientStrategies;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/client-strategy/strategy-component.js","import { connect } from 'react-redux';\nimport ClientStrategies from './strategy-component';\nimport { fetchClientStrategies } from '../../store/client-strategy-actions';\n\nconst mapStateToProps = (state) => ({ clientStrategies: state.clientStrategies.toJS() });\n\nconst StrategiesContainer = connect(mapStateToProps, { fetchClientStrategies })(ClientStrategies);\n\nexport default StrategiesContainer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/client-strategy/strategy-container.js","import React, { PropTypes } from 'react';\n\nimport { Snackbar } from 'react-mdl';\n\nclass ErrorComponent extends React.Component {\n static propTypes () {\n return {\n errors: PropTypes.array.isRequired,\n muteError: PropTypes.func.isRequired,\n };\n }\n\n render () {\n const showError = this.props.errors.length > 0;\n const error = showError ? this.props.errors[0] : undefined;\n const muteError = () => this.props.muteError(error);\n return (\n
\n );\n }\n}\n\nexport default ErrorComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/error/error-component.jsx","import { connect } from 'react-redux';\nimport ErrorComponent from './error-component';\nimport { muteError } from '../../store/error-actions';\n\n\nconst mapDispatchToProps = {\n muteError,\n};\n\nconst mapStateToProps = (state) => ({\n errors: state.error.get('list').toArray(),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ErrorComponent);\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/error/error-container.jsx","import React, { PropTypes } from 'react';\nimport { Link } from 'react-router';\nimport { Chip, Switch, Icon, IconButton } from 'react-mdl';\nimport percentLib from 'percent';\nimport Progress from './progress';\n\nimport style from './feature.scss';\n\nconst Feature = ({\n feature,\n onFeatureClick,\n onFeatureRemove,\n settings,\n metricsLastHour = { yes: 0, no: 0, isFallback: true },\n metricsLastMinute = { yes: 0, no: 0, isFallback: true },\n}) => {\n const { name, description, enabled, strategies } = feature;\n\n const { showLastHour = false } = settings;\n const isStale = showLastHour ? metricsLastHour.isFallback : metricsLastMinute.isFallback;\n\n const percent = 1 * (showLastHour ?\n percentLib.calc(metricsLastHour.yes, metricsLastHour.yes + metricsLastHour.no, 0) :\n percentLib.calc(metricsLastMinute.yes, metricsLastMinute.yes + metricsLastMinute.no, 0)\n );\n return (\n
\n \n \n {\n isStale ?\n
:\n
\n }\n
\n\n \n \n onFeatureClick(feature)} checked={enabled} />\n \n \n {name} {(description && description.substring(0, 100)) || ''}\n \n \n\n \n {strategies && strategies.map((s, i) => \n {s.name}\n )}\n \n \n \n \n \n \n onFeatureRemove(name)} className={style.iconListItem} />\n \n\n \n );\n};\n\nFeature.propTypes = {\n feature: PropTypes.object,\n onFeatureClick: PropTypes.func,\n onFeatureRemove: PropTypes.func,\n};\n\nexport default Feature;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/feature-list-item-component.jsx","import { connect } from 'react-redux';\nimport { hashHistory } from 'react-router';\nimport { createFeatureToggles, validateName } from '../../store/feature-actions';\nimport { createMapper, createActions } from '../input-helpers';\nimport FormComponent from './form';\n\nconst ID = 'add-feature-toggle';\nconst mapStateToProps = createMapper({ id: ID });\nconst prepare = (methods, dispatch) => {\n methods.onSubmit = (input) => (\n (e) => {\n e.preventDefault();\n createFeatureToggles(input)(dispatch)\n .then(() => methods.clear())\n .then(() => hashHistory.push('/features'));\n }\n );\n\n methods.onCancel = (evt) => {\n evt.preventDefault();\n methods.clear();\n hashHistory.push('/features');\n };\n\n methods.addStrategy = (v) => {\n methods.pushToList('strategies', v);\n };\n\n methods.updateStrategy = (index, n) => {\n methods.updateInList('strategies', index, n);\n };\n\n methods.removeStrategy = (index) => {\n methods.removeFromList('strategies', index);\n };\n\n methods.validateName = (v) => {\n const featureToggleName = v.target.value;\n validateName(featureToggleName)\n .then(() => methods.setValue('nameError', undefined))\n .catch((err) => methods.setValue('nameError', err.message));\n };\n\n return methods;\n};\nconst actions = createActions({ id: ID, prepare });\n\nexport default connect(mapStateToProps, actions)(FormComponent);\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/form-add-container.jsx","import { connect } from 'react-redux';\nimport { hashHistory } from 'react-router';\n\nimport { requestUpdateFeatureToggle } from '../../store/feature-actions';\nimport { createMapper, createActions } from '../input-helpers';\nimport FormComponent from './form';\n\nconst ID = 'edit-feature-toggle';\nfunction getId (props) {\n return [ID, props.featureToggle.name];\n}\n// TODO: need to scope to the active featureToggle\n// best is to emulate the \"input-storage\"?\nconst mapStateToProps = createMapper({\n id: getId,\n getDefault: (state, ownProps) => ownProps.featureToggle,\n prepare: (props) => {\n props.editmode = true;\n return props;\n },\n});\n\nconst prepare = (methods, dispatch) => {\n methods.onSubmit = (input) => (\n (e) => {\n e.preventDefault();\n // TODO: should add error handling\n requestUpdateFeatureToggle(input)(dispatch)\n .then(() => methods.clear())\n .then(() => window.history.back());\n }\n );\n\n methods.onCancel = (evt) => {\n evt.preventDefault();\n methods.clear();\n hashHistory.push('/features');\n };\n\n methods.addStrategy = (v) => {\n methods.pushToList('strategies', v);\n };\n\n methods.removeStrategy = (index) => {\n methods.removeFromList('strategies', index);\n };\n\n methods.updateStrategy = (index, n) => {\n methods.updateInList('strategies', index, n);\n };\n\n methods.validateName = () => {};\n\n return methods;\n};\n\nconst actions = createActions({\n id: getId,\n prepare,\n});\n\nexport default connect(mapStateToProps, actions)(FormComponent);\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/form-edit-container.jsx","import React, { PropTypes } from 'react';\nimport { Menu, MenuItem, IconButton } from 'react-mdl';\n\nclass AddStrategy extends React.Component {\n\n static propTypes () {\n return {\n strategies: PropTypes.array.isRequired,\n addStrategy: PropTypes.func.isRequired,\n fetchStrategies: PropTypes.func.isRequired,\n };\n }\n\n addStrategy = (strategyName) => {\n const selectedStrategy = this.props.strategies.find(s => s.name === strategyName);\n const parameters = {};\n const keys = Object.keys(selectedStrategy.parametersTemplate || {});\n keys.forEach(prop => { parameters[prop] = ''; });\n\n\n this.props.addStrategy({\n name: selectedStrategy.name,\n parameters,\n });\n };\n\n stopPropagation (e) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n render () {\n return (\n
\n \n \n
\n );\n }\n}\n\n\nexport default AddStrategy;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/form/strategies-add.jsx","import React, { PropTypes } from 'react';\nimport ConfigureStrategy from './strategy-configure';\n\nclass StrategiesList extends React.Component {\n\n static propTypes () {\n return {\n strategies: PropTypes.array.isRequired,\n configuredStrategies: PropTypes.array.isRequired,\n updateStrategy: PropTypes.func.isRequired,\n removeStrategy: PropTypes.func.isRequired,\n };\n }\n\n render () {\n const {\n strategies,\n configuredStrategies,\n } = this.props;\n\n if (!configuredStrategies || configuredStrategies.length === 0) {\n return
No strategies added;\n }\n\n const blocks = configuredStrategies.map((strat, i) => (\n
s.name === strat.name)} />\n ));\n return (\n \n {blocks}\n
\n );\n }\n}\n\nexport default StrategiesList;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/form/strategies-list.jsx","import { connect } from 'react-redux';\nimport StrategiesSection from './strategies-section';\nimport { fetchStrategies } from '../../../store/strategy-actions';\n\n\nexport default connect((state) => ({\n strategies: state.strategies.get('list').toArray(),\n}), { fetchStrategies })(StrategiesSection);\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/form/strategies-section-container.jsx","import React, { PropTypes } from 'react';\nimport StrategiesList from './strategies-list';\nimport AddStrategy from './strategies-add';\n\nconst headerStyle = {\n marginBottom: '10px',\n};\n\nclass StrategiesSection extends React.Component {\n\n static propTypes () {\n return {\n strategies: PropTypes.array.isRequired,\n addStrategy: PropTypes.func.isRequired,\n removeStrategy: PropTypes.func.isRequired,\n updateStrategy: PropTypes.func.isRequired,\n fetchStrategies: PropTypes.func.isRequired,\n };\n }\n\n componentWillMount () {\n this.props.fetchStrategies();\n }\n\n render () {\n if (!this.props.strategies || this.props.strategies.length === 0) {\n return Loding available strategies;\n }\n\n return (\n \n
Activation strategies
\n
\n
\n );\n }\n}\n\nexport default StrategiesSection;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/form/strategies-section.jsx","import React, { PropTypes } from 'react';\nimport { Textfield, Button } from 'react-mdl';\n\nclass StrategyConfigure extends React.Component {\n\n static propTypes () {\n return {\n strategy: PropTypes.object.isRequired,\n strategyDefinition: PropTypes.object.isRequired,\n updateStrategy: PropTypes.func.isRequired,\n removeStrategy: PropTypes.func.isRequired,\n };\n }\n\n handleConfigChange = (key, e) => {\n const parameters = this.props.strategy.parameters || {};\n parameters[key] = e.target.value;\n\n const updatedStrategy = Object.assign({}, this.props.strategy, { parameters });\n\n this.props.updateStrategy(updatedStrategy);\n };\n\n handleRemove = (evt) => {\n evt.preventDefault();\n this.props.removeStrategy();\n }\n\n renderInputFields (strategyDefinition) {\n if (strategyDefinition.parametersTemplate) {\n return Object.keys(strategyDefinition.parametersTemplate).map(field => (\n \n ));\n }\n }\n\n render () {\n if (!this.props.strategyDefinition) {\n return (\n \n
Strategy \"{this.props.strategy.name}\" deleted
\n \n \n );\n }\n\n const inputFields = this.renderInputFields(this.props.strategyDefinition) || [];\n\n return (\n \n
\n {this.props.strategy.name} \n (remove)\n
\n
{this.props.strategyDefinition.description}\n
\n {inputFields}\n
\n
\n );\n }\n}\n\nexport default StrategyConfigure;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/form/strategy-configure.jsx","import React, { PropTypes } from 'react';\nimport Feature from './feature-list-item-component';\nimport { Link } from 'react-router';\nimport { Icon, Chip, ChipContact, IconButton, FABButton, Textfield, Menu, MenuItem } from 'react-mdl';\n\nimport styles from './feature.scss';\n\nexport default class FeatureListComponent extends React.PureComponent {\n\n static propTypes () {\n return {\n onFeatureClick: PropTypes.func.isRequired,\n onFeatureRemove: PropTypes.func.isRequired,\n features: PropTypes.array.isRequired,\n featureMetrics: PropTypes.object.isRequired,\n fetchFeatureToggles: PropTypes.func.isRequired,\n fetchFeatureMetrics: PropTypes.func.isRequired,\n };\n }\n\n static contextTypes = {\n router: React.PropTypes.object,\n }\n\n componentDidMount () {\n this.props.fetchFeatureToggles();\n this.props.fetchFeatureMetrics();\n this.timer = setInterval(() => {\n this.props.fetchFeatureMetrics();\n }, 5000);\n }\n\n componentWillUnmount () {\n clearInterval(this.timer);\n }\n\n toggleMetrics () {\n this.props.updateSetting('showLastHour', !this.props.settings.showLastHour);\n }\n\n setFilter (v) {\n this.props.updateSetting('filter', typeof v === 'string' ? v.trim() : '');\n }\n\n setSort (v) {\n this.props.updateSetting('sort', typeof v === 'string' ? v.trim() : '');\n }\n\n render () {\n const { features, onFeatureClick, onFeatureRemove, featureMetrics, settings } = this.props;\n\n return (\n \n
\n \n
this.toggleMetrics()} className={styles.topListItem0}>\n { settings.showLastHour &&\n \n \n }\n { '1 hour' }\n \n \n
this.toggleMetrics()} className={styles.topListItem0}>\n { !settings.showLastHour &&\n \n \n }\n { '1 minute' }\n \n \n \n
\n { this.setFilter(e.target.value); }}\n label=\"Filter toggles\"\n style={{ width: '100%' }}\n />\n
\n \n
\n \n
\n \n
\n
\n \n \n \n \n
\n\n
\n {features.map((feature, i) =>\n \n )}\n
\n
\n
\n
\n \n \n \n
\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/list-component.jsx","import { connect } from 'react-redux';\nimport { toggleFeature, fetchFeatureToggles, removeFeatureToggle } from '../../store/feature-actions';\nimport { fetchFeatureMetrics } from '../../store/feature-metrics-actions';\nimport { updateSettingForGroup } from '../../store/settings/actions';\n\n\nimport FeatureListComponent from './list-component';\n\nconst mapStateToProps = (state) => {\n const featureMetrics = state.featureMetrics.toJS();\n const settings = state.settings.toJS().feature || {};\n let features = state.features.toJS();\n if (settings.filter) {\n features = features.filter(feature =>\n (\n feature.name.indexOf(settings.filter) > -1 ||\n feature.description.indexOf(settings.filter) > -1 ||\n feature.strategies.some(s => s && s.name && s.name.indexOf(settings.filter) > -1)\n )\n );\n }\n\n if (settings.sort) {\n if (settings.sort === 'enabled') {\n features = features.sort((a, b) => (\n // eslint-disable-next-line\n a.enabled === b.enabled ? 0 : a.enabled ? -1 : 1\n ));\n } else if (settings.sort === 'appName') {\n // AppName\n // features = features.sort((a, b) => {\n // if (a.appName < b.appName) { return -1; }\n // if (a.appName > b.appName) { return 1; }\n // return 0;\n // });\n } else if (settings.sort === 'created') {\n features = features.sort((a, b) => (\n new Date(a.createdAt) > new Date(b.createdAt) ? -1 : 1\n ));\n } else if (settings.sort === 'name') {\n features = features.sort((a, b) => {\n if (a.name < b.name) { return -1; }\n if (a.name > b.name) { return 1; }\n return 0;\n });\n } else if (settings.sort === 'strategies') {\n features = features.sort((a, b) => (\n a.strategies.length > b.strategies.length ? -1 : 1\n ));\n } else if (settings.sort === 'metrics') {\n const target = settings.showLastHour ? featureMetrics.lastHour : featureMetrics.lastMinute;\n\n features = features.sort((a, b) => {\n if (!target[a.name]) { return 1; }\n if (!target[b.name]) { return -1; }\n if (target[a.name].yes > target[b.name].yes) {\n return -1;\n }\n return 1;\n });\n }\n }\n\n return {\n features,\n featureMetrics,\n settings,\n };\n};\n\nconst mapDispatchToProps = {\n onFeatureClick: toggleFeature,\n onFeatureRemove: removeFeatureToggle,\n fetchFeatureToggles,\n fetchFeatureMetrics,\n updateSetting: updateSettingForGroup('feature'),\n};\n\nconst FeatureListContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(FeatureListComponent);\n\nexport default FeatureListContainer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/list-container.jsx","import React, { PropTypes } from 'react';\nimport { Grid, Cell, Icon, Switch } from 'react-mdl';\nimport { Link } from 'react-router';\n\nimport percentLib from 'percent';\nimport Progress from './progress';\n\nimport { connect } from 'react-redux';\nimport EditFeatureToggle from './form-edit-container.jsx';\nimport { fetchFeatureToggles, toggleFeature } from '../../store/feature-actions';\nimport { fetchFeatureMetrics, fetchSeenApps } from '../../store/feature-metrics-actions';\n\nclass EditFeatureToggleWrapper extends React.Component {\n\n static propTypes () {\n return {\n featureToggleName: PropTypes.string.isRequired,\n features: PropTypes.array.isRequired,\n fetchFeatureToggles: PropTypes.array.isRequired,\n };\n }\n\n componentWillMount () {\n if (this.props.features.length === 0) {\n this.props.fetchFeatureToggles();\n }\n this.props.fetchSeenApps();\n this.props.fetchFeatureMetrics();\n this.timer = setInterval(() => {\n this.props.fetchSeenApps();\n this.props.fetchFeatureMetrics();\n }, 5000);\n }\n\n componentWillUnmount () {\n clearInterval(this.timer);\n }\n\n render () {\n const {\n toggleFeature,\n features,\n featureToggleName,\n metrics = {},\n } = this.props;\n\n const {\n lastHour = { yes: 0, no: 0, isFallback: true },\n lastMinute = { yes: 0, no: 0, isFallback: true },\n seenApps = [],\n } = metrics;\n\n const lastHourPercent = 1 * percentLib.calc(lastHour.yes, lastHour.yes + lastHour.no, 0);\n const lastMinutePercent = 1 * percentLib.calc(lastMinute.yes, lastMinute.yes + lastMinute.no, 0);\n\n const featureToggle = features.find(toggle => toggle.name === featureToggleName);\n\n if (!featureToggle) {\n if (features.length === 0 ) {\n return Loading;\n }\n return Could not find {this.props.featureToggleName};\n }\n\n return (\n \n
{featureToggle.name} {featureToggle.enabled ? 'is enabled' : 'is disabled'}
\n
\n
\n toggleFeature(featureToggle)} checked={featureToggle.enabled}>\n Toggle {featureToggle.name}\n \n
\n
\n
\n \n {\n lastMinute.isFallback ?\n :\n \n }\n Last minute Yes {lastMinute.yes}, No: {lastMinute.no} \n | \n \n {\n lastHour.isFallback ?\n :\n \n }\n Last hour Yes {lastHour.yes}, No: {lastHour.no} \n | \n \n {seenApps.length > 0 ?\n ( Seen in applications: ) :\n \n \n Not used in a app in the last hour. This might be due to your client implementation is not reporting usage. \n \n }\n {seenApps.length > 0 && seenApps.map((appName) => (\n \n {appName}\n \n ))}\n add instances count? \n | \n \n add history \n | \n \n
\n
Edit
\n
\n
\n );\n }\n}\n\nfunction getMetricsForToggle (state, toggleName) {\n if (!toggleName) {\n return;\n }\n const result = {};\n\n if (state.featureMetrics.hasIn(['seenApps', toggleName])) {\n result.seenApps = state.featureMetrics.getIn(['seenApps', toggleName]);\n }\n if (state.featureMetrics.hasIn(['lastHour', toggleName])) {\n result.lastHour = state.featureMetrics.getIn(['lastHour', toggleName]);\n result.lastMinute = state.featureMetrics.getIn(['lastMinute', toggleName]);\n }\n return result;\n}\n\n\nexport default connect((state, props) => ({\n features: state.features.toJS(),\n metrics: getMetricsForToggle(state, props.featureToggleName),\n}), {\n fetchFeatureMetrics,\n fetchFeatureToggles,\n toggleFeature,\n fetchSeenApps,\n})(EditFeatureToggleWrapper);\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/feature/view-edit-container.jsx","import React, { PureComponent } from 'react';\nimport HistoryList from './history-list-container';\n\nclass History extends PureComponent {\n\n componentDidMount () {\n this.props.fetchHistory();\n }\n\n toggleShowDiff () {\n this.setState({ showData: !this.state.showData });\n }\n\n render () {\n const { history } = this.props;\n if (history.length < 0) {\n return;\n }\n\n return (\n \n
Last 100 changes
\n \n \n );\n }\n}\nexport default History;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/history/history-component.jsx","import { connect } from 'react-redux';\nimport HistoryComponent from './history-component';\nimport { fetchHistory } from '../../store/history-actions';\n\nconst mapStateToProps = (state) => {\n const history = state.history.get('list').toArray();\n return {\n history,\n };\n};\n\nconst HistoryListContainer = connect(mapStateToProps, { fetchHistory })(HistoryComponent);\n\nexport default HistoryListContainer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/history/history-container.js","import React, { PropTypes, PureComponent } from 'react';\nimport { Icon } from 'react-mdl';\n\nimport style from './history.scss';\n\nconst DIFF_PREFIXES = {\n A: ' ',\n E: ' ',\n D: '-',\n N: '+',\n};\n\nconst SPADEN_CLASS = {\n A: style.blue, // array edited\n E: style.blue, // edited\n D: style.negative, // deleted\n N: style.positive, // added\n};\n\nfunction getIcon (type) {\n switch (type) {\n case 'feature-updated': return 'autorenew';\n case 'feature-created': return 'add';\n case 'feature-deleted': return 'remove';\n case 'feature-archived': return 'archived';\n default: return 'star';\n }\n}\n\nfunction buildItemDiff (diff, key) {\n let change;\n if (diff.lhs !== undefined) {\n change = (\n \n
- {key}: {JSON.stringify(diff.lhs)}
\n
\n );\n } else if (diff.rhs !== undefined) {\n change = (\n \n
+ {key}: {JSON.stringify(diff.rhs)}
\n
\n );\n }\n\n return change;\n}\n\nfunction buildDiff (diff, idx) {\n let change;\n const key = diff.path.join('.');\n\n if (diff.item) {\n change = buildItemDiff(diff.item, key);\n } else if (diff.lhs !== undefined && diff.rhs !== undefined) {\n change = (\n \n
- {key}: {JSON.stringify(diff.lhs)}
\n
+ {key}: {JSON.stringify(diff.rhs)}
\n
\n );\n } else {\n const spadenClass = SPADEN_CLASS[diff.kind];\n const prefix = DIFF_PREFIXES[diff.kind];\n\n change = ({prefix} {key}: {JSON.stringify(diff.rhs || diff.item)}
);\n }\n\n return ({change}
);\n}\n\nclass HistoryItem extends PureComponent {\n\n static propTypes () {\n return {\n entry: PropTypes.object,\n };\n }\n\n renderEventDiff (logEntry) {\n let changes;\n\n if (logEntry.diffs) {\n changes = logEntry.diffs.map(buildDiff);\n } else {\n // Just show the data if there is no diff yet.\n changes = {JSON.stringify(logEntry.data, null, 2)}
;\n }\n\n return {changes.length === 0 ? '(no changes)' : changes}
;\n }\n\n render () {\n const {\n createdBy,\n id,\n type,\n } = this.props.entry;\n\n const createdAt = (new Date(this.props.entry.createdAt)).toLocaleString('nb-NO');\n const icon = getIcon(type);\n\n const data = this.renderEventDiff(this.props.entry);\n\n return (\n \n
\n - Id:
\n - {id}
\n - Type:
\n - \n \n {type}\n
\n - Timestamp:
\n - {createdAt}
\n - Username:
\n - {createdBy}
\n - Diff
\n - {data}
\n
\n
\n );\n }\n}\n\nexport default HistoryItem;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/history/history-item-diff.jsx","import React, { PropTypes, PureComponent } from 'react';\n\nimport style from './history.scss';\n\nclass HistoryItem extends PureComponent {\n\n static propTypes () {\n return {\n entry: PropTypes.object,\n };\n }\n\n render () {\n const localEventData = JSON.parse(JSON.stringify(this.props.entry));\n delete localEventData.description;\n delete localEventData.name;\n delete localEventData.diffs;\n\n const prettyPrinted = JSON.stringify(localEventData, null, 2);\n\n return (\n \n
\n {prettyPrinted}
\n
\n
\n );\n }\n}\n\nexport default HistoryItem;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/history/history-item-json.jsx","import React, { Component } from 'react';\nimport HistoryItemDiff from './history-item-diff';\nimport HistoryItemJson from './history-item-json';\nimport { Switch } from 'react-mdl';\n\nimport style from './history.scss';\n\nclass HistoryList extends Component {\n\n toggleShowDiff () {\n this.props.updateSetting('showData', !this.props.settings.showData);\n }\n\n render () {\n const showData = this.props.settings.showData;\n const { history } = this.props;\n if (!history || history.length < 0) {\n return null;\n }\n\n let entries;\n\n if (showData) {\n entries = history.map((entry) => );\n } else {\n entries = history.map((entry) => );\n }\n\n return (\n \n Show full events\n {entries}\n
\n );\n }\n}\nexport default HistoryList;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/history/history-list-component.jsx","import React, { Component, PropTypes } from 'react';\nimport ListComponent from './history-list-container';\nimport { fetchHistoryForToggle } from '../../data/history-api';\n\nclass HistoryListToggle extends Component {\n\n constructor (props) {\n super(props);\n this.state = {\n fetching: true,\n history: undefined,\n };\n }\n\n static propTypes () {\n return {\n toggleName: PropTypes.string.isRequired,\n };\n }\n\n componentDidMount () {\n fetchHistoryForToggle(this.props.toggleName)\n .then((res) => this.setState({ history: res, fetching: false }));\n }\n\n render () {\n if (this.state.fetching) {\n return fetching..;\n }\n\n return (\n \n
Showing history for toggle: {this.props.toggleName}
\n \n \n );\n }\n}\nexport default HistoryListToggle;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/history/history-list-toggle-component.jsx","import { connect } from 'react-redux';\n\nimport { createMapper, createActions } from '../input-helpers';\nimport { createStrategy } from '../../store/strategy-actions';\n\nimport AddStrategy, { PARAM_PREFIX } from './add-strategy';\n\nconst ID = 'add-strategy';\n\nconst prepare = (methods, dispatch) => {\n methods.onSubmit = (input) => (\n (e) => {\n e.preventDefault();\n\n const parametersTemplate = {};\n Object.keys(input).forEach(key => {\n if (key.startsWith(PARAM_PREFIX)) {\n parametersTemplate[input[key]] = 'string';\n }\n });\n input.parametersTemplate = parametersTemplate;\n\n createStrategy(input)(dispatch)\n .then(() => methods.clear())\n // somewhat quickfix / hacky to go back..\n .then(() => window.history.back());\n }\n );\n\n methods.onCancel = (e) => {\n e.preventDefault();\n methods.clear();\n // somewhat quickfix / hacky to go back..\n window.history.back();\n };\n\n\n return methods;\n};\n\nconst actions = createActions({\n id: ID,\n prepare,\n});\n\nexport default connect(createMapper({ id: ID }), actions)(AddStrategy);\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/strategies/add-container.js","import React, { PropTypes } from 'react';\n\nimport { Textfield, Button, IconButton } from 'react-mdl';\n\nconst trim = (value) => {\n if (value && value.trim) {\n return value.trim();\n } else {\n return value;\n }\n};\n\nfunction gerArrayWithEntries (num) {\n return Array.from(Array(num));\n}\nexport const PARAM_PREFIX = 'param_';\n\nconst genParams = (input, num = 0, setValue) => ({gerArrayWithEntries(num).map((v, i) => {\n const key = `${PARAM_PREFIX}${i + 1}`;\n return (\n setValue(key, target.value)}\n value={input[key]} />\n );\n})}
);\n\nconst AddStrategy = ({\n input,\n setValue,\n incValue,\n // clear,\n onCancel,\n onSubmit,\n}) => (\n \n);\n\nAddStrategy.propTypes = {\n input: PropTypes.object,\n setValue: PropTypes.func,\n incValue: PropTypes.func,\n clear: PropTypes.func,\n onCancel: PropTypes.func,\n onSubmit: PropTypes.func,\n};\n\nexport default AddStrategy;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/strategies/add-strategy.jsx","import React, { Component } from 'react';\n\nimport { List, ListItem, ListItemContent, Icon, IconButton, Chip } from 'react-mdl';\n\nimport style from './strategies.scss';\n\nclass StrategiesListComponent extends Component {\n\n static contextTypes = {\n router: React.PropTypes.object,\n }\n\n componentDidMount () {\n this.props.fetchStrategies();\n }\n\n getParameterMap ({ parametersTemplate }) {\n return Object.keys(parametersTemplate || {}).map(k => (\n {k}\n ));\n }\n\n render () {\n const { strategies, removeStrategy } = this.props;\n\n return (\n \n
Strategies
\n this.context.router.push('/strategies/create')} title=\"Add new strategy\"/>\n\n
\n \n {strategies.length > 0 ? strategies.map((strategy, i) => {\n return (\n \n {strategy.name} {strategy.description}\n removeStrategy(strategy)} />\n \n );\n }) : No entries}\n \n\n
\n \n );\n }\n}\n\n\nexport default StrategiesListComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/strategies/list-component.jsx","import { connect } from 'react-redux';\nimport StrategiesListComponent from './list-component.jsx';\nimport { fetchStrategies, removeStrategy } from '../../store/strategy-actions';\n\nconst mapStateToProps = (state) => {\n const list = state.strategies.get('list').toArray();\n\n return {\n strategies: list,\n };\n};\n\nconst mapDispatchToProps = (dispatch) => ({\n removeStrategy: (strategy) => {\n if (window.confirm('Are you sure you want to remove this strategy?')) { // eslint-disable-line no-alert\n removeStrategy(strategy)(dispatch);\n }\n },\n fetchStrategies: () => fetchStrategies()(dispatch),\n});\n\nconst StrategiesListContainer = connect(mapStateToProps, mapDispatchToProps)(StrategiesListComponent);\n\nexport default StrategiesListContainer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/strategies/list-container.jsx","import React, { PropTypes } from 'react';\n\nexport default class ShowUserComponent extends React.Component {\n static propTypes () {\n return {\n user: PropTypes.object.isRequired,\n openEdit: PropTypes.func.isRequired,\n };\n }\n\n openEdit = (evt) => {\n evt.preventDefault();\n this.props.openEdit();\n }\n\n render () {\n return (\n \n Username: \n {this.props.user.userName || 'Unknown'}\n \n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/user/show-user-component.jsx","import { connect } from 'react-redux';\nimport ShowUserComponent from './show-user-component';\nimport { openEdit } from '../../store/user/actions';\n\n\nconst mapDispatchToProps = {\n openEdit,\n};\n\nconst mapStateToProps = (state) => ({\n user: state.user.toJS(),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ShowUserComponent);\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/user/show-user-container.jsx","import React, { PropTypes } from 'react';\nimport { Textfield, Dialog, DialogTitle, DialogContent, DialogActions, Button } from 'react-mdl';\n\nclass EditUserComponent extends React.Component {\n static propTypes () {\n return {\n user: PropTypes.object.isRequired,\n updateUserName: PropTypes.func.isRequired,\n };\n }\n\n handleSubmit = (evt) => {\n evt.preventDefault();\n this.props.save();\n }\n\n render () {\n return (\n \n
\n
\n );\n }\n}\n\nexport default EditUserComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/user/user-component.jsx","import { connect } from 'react-redux';\nimport UserComponent from './user-component';\nimport { updateUserName, save } from '../../store/user/actions';\n\n\nconst mapDispatchToProps = {\n updateUserName,\n save,\n};\n\nconst mapStateToProps = (state) => ({\n user: state.user.toJS(),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UserComponent);\n\n\n\n// WEBPACK FOOTER //\n// ./src/component/user/user-container.jsx","import { throwIfNotSuccess, headers } from './helper';\n\nconst URI = '/api/client/applications';\n\nfunction fetchAll () {\n return fetch(URI, { headers })\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nfunction fetchApplication (appName) {\n return fetch(`${URI}/${appName}`, { headers })\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nmodule.exports = {\n fetchApplication,\n fetchAll,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/data/applications-api.js","import { throwIfNotSuccess, headers } from './helper';\n\nconst URI = '/api/archive';\n\nfunction fetchAll () {\n return fetch(`${URI}/features`)\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nfunction revive (feature) {\n return fetch(`${URI}/revive`, {\n method: 'POST',\n headers,\n body: JSON.stringify(feature),\n credentials: 'include',\n }).then(throwIfNotSuccess);\n}\n\n\nmodule.exports = {\n fetchAll,\n revive,\n};\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/data/archive-api.js","import { throwIfNotSuccess, headers } from './helper';\n\nconst URI = '/api/client/instances';\n\nfunction fetchAll () {\n return fetch(URI, { headers })\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nmodule.exports = {\n fetchAll,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/data/client-instance-api.js","import { throwIfNotSuccess, headers } from './helper';\n\nconst URI = '/api/client/strategies';\n\nfunction fetchAll () {\n return fetch(URI, { headers })\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nmodule.exports = {\n fetchAll,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/data/client-strategy-api.js","import { throwIfNotSuccess, headers } from './helper';\n\nconst URI = '/api/features';\nconst URI_VALIDATE = '/api/features-validate';\n\nfunction validateToggle (featureToggle) {\n return new Promise((resolve, reject) => {\n if (!featureToggle.strategies || featureToggle.strategies.length === 0) {\n reject(new Error('You must add at least one activation strategy'));\n } else {\n resolve(featureToggle);\n }\n });\n}\n\nfunction fetchAll () {\n return fetch(URI)\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nfunction create (featureToggle) {\n return validateToggle(featureToggle)\n .then(() => fetch(URI, {\n method: 'POST',\n headers,\n credentials: 'include',\n body: JSON.stringify(featureToggle),\n }))\n .then(throwIfNotSuccess);\n}\n\nfunction validate (featureToggle) {\n return fetch(URI_VALIDATE, {\n method: 'POST',\n headers,\n credentials: 'include',\n body: JSON.stringify(featureToggle),\n }).then(throwIfNotSuccess);\n}\n\nfunction update (featureToggle) {\n return validateToggle(featureToggle)\n .then(() => fetch(`${URI}/${featureToggle.name}`, {\n method: 'PUT',\n headers,\n credentials: 'include',\n body: JSON.stringify(featureToggle),\n }))\n .then(throwIfNotSuccess);\n}\n\nfunction remove (featureToggleName) {\n return fetch(`${URI}/${featureToggleName}`, {\n method: 'DELETE',\n credentials: 'include',\n }).then(throwIfNotSuccess);\n}\n\nmodule.exports = {\n fetchAll,\n create,\n validate,\n update,\n remove,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/data/feature-api.js","const { throwIfNotSuccess } = require('./helper');\n\nconst URI = '/api/client/metrics/feature-toggles';\n\nfunction fetchFeatureMetrics () {\n return fetch(URI)\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nconst seenURI = '/api/client/seen-apps';\n\nfunction fetchSeenApps () {\n return fetch(seenURI)\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nmodule.exports = {\n fetchFeatureMetrics,\n fetchSeenApps,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/data/feature-metrics-api.js","import { throwIfNotSuccess } from './helper';\n\nconst URI = '/api/metrics';\n\nfunction fetchAll () {\n return fetch(URI)\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nmodule.exports = {\n fetchAll,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/data/metrics-api.js","import { throwIfNotSuccess, headers } from './helper';\n\nconst URI = '/api/strategies';\n\nfunction fetchAll () {\n return fetch(URI)\n .then(throwIfNotSuccess)\n .then(response => response.json());\n}\n\nfunction create (strategy) {\n return fetch(URI, {\n method: 'POST',\n headers,\n body: JSON.stringify(strategy),\n credentials: 'include',\n }).then(throwIfNotSuccess);\n}\n\nfunction remove (strategy) {\n return fetch(`${URI}/${strategy.name}`, {\n method: 'DELETE',\n headers,\n credentials: 'include',\n }).then(throwIfNotSuccess);\n}\n\nmodule.exports = {\n fetchAll,\n create,\n remove,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/data/strategy-api.js","import 'whatwg-fetch';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Router, Route, IndexRedirect, hashHistory } from 'react-router';\nimport { Provider } from 'react-redux';\nimport thunkMiddleware from 'redux-thunk';\nimport { createStore, applyMiddleware } from 'redux';\n\nimport store from './store';\nimport App from './component/app';\n\nimport Features from './page/features';\nimport CreateFeatureToggle from './page/features/create';\nimport EditFeatureToggle from './page/features/edit';\nimport Strategies from './page/strategies';\nimport CreateStrategies from './page/strategies/create';\nimport HistoryPage from './page/history';\nimport HistoryTogglePage from './page/history/toggle';\nimport Archive from './page/archive';\nimport Applications from './page/applications';\nimport ApplicationView from './page/applications/view';\nimport ClientStrategies from './page/client-strategies';\n\nconst unleashStore = createStore(\n store,\n applyMiddleware(\n thunkMiddleware\n )\n);\n\nReactDOM.render(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n , document.getElementById('app'));\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.jsx","import React from 'react';\nimport ApplicationListConmponent from '../../component/application/application-list-container';\n\nconst render = () => ;\n\nexport default render;\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/applications/index.js","import React from 'react';\nimport ApplicationEditComponent from '../../component/application/application-edit-container';\n\nconst render = ({ params }) => ;\n\nexport default render;\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/applications/view.js","import React from 'react';\nimport Archive from '../../component/archive/archive-container';\n\nconst render = () => ;\n\nexport default render;\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/archive/index.js","import React from 'react';\nimport ClientStrategy from '../../component/client-strategy/strategy-container';\n\nconst render = () => (\n \n
Client Strategies
\n \n \n);\n\nexport default render;\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/client-strategies/index.js","import React from 'react';\nimport AddFeatureToggleForm from '../../component/feature/form-add-container';\n\nconst render = () => (\n \n
Create feature toggle
\n
\n
\n);\n\nexport default render;\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/features/create.js","import React, { Component, PropTypes } from 'react';\nimport EditFeatureToggleForm from '../../component/feature/view-edit-container';\n\nexport default class Features extends Component {\n static propTypes () {\n return {\n params: PropTypes.object.isRequired,\n };\n }\n\n render () {\n return (\n \n );\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/features/edit.js","import React from 'react';\nimport FeatureListContainer from '../../component/feature/list-container';\n\nconst render = () => ();\n\nexport default render;\n\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/features/index.js","import React from 'react';\nimport HistoryComponent from '../../component/history/history-container';\n\nconst render = () => ;\n\nexport default render;\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/history/index.js","import React, { PropTypes } from 'react';\nimport HistoryListToggle from '../../component/history/history-list-toggle-component';\n\nconst render = ({ params }) => ;\n\nrender.propTypes = {\n params: PropTypes.object.isRequired,\n};\n\nexport default render;\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/history/toggle.js","import React from 'react';\nimport AddStrategies from '../../component/strategies/add-container';\n\nexport default () => ();\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/strategies/create.js","import React from 'react';\nimport Strategies from '../../component/strategies/list-container';\n\nexport default () => ();\n\n\n\n// WEBPACK FOOTER //\n// ./src/page/strategies/index.js","import { fromJS, List, Map } from 'immutable';\nimport { RECEIVE_ALL_APPLICATIONS, RECEIVE_APPLICATION } from './actions';\n\nfunction getInitState () {\n return fromJS({ list: [], apps: {} });\n}\n\nconst store = (state = getInitState(), action) => {\n switch (action.type) {\n case RECEIVE_APPLICATION:\n return state.setIn(['apps', action.value.appName], new Map(action.value));\n case RECEIVE_ALL_APPLICATIONS:\n return state.set('list', new List(action.value.applications));\n default:\n return state;\n }\n};\n\nexport default store;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/application/index.js","import { List, Map as $Map } from 'immutable';\nimport { RECEIVE_ARCHIVE, REVIVE_TOGGLE } from './archive-actions';\n\nfunction getInitState () {\n return new $Map({ list: new List() });\n}\n\nconst archiveStore = (state = getInitState(), action) => {\n switch (action.type) {\n case REVIVE_TOGGLE:\n return state.update('list', (list) => list.remove(list.indexOf(action.value)));\n case RECEIVE_ARCHIVE:\n return state.set('list', new List(action.value));\n default:\n return state;\n }\n};\n\nexport default archiveStore;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/archive-store.js","import api from '../data/client-instance-api';\n\nexport const RECEIVE_CLIENT_INSTANCES = 'RECEIVE_CLIENT_INSTANCES';\nexport const ERROR_RECEIVE_CLIENT_INSTANCES = 'ERROR_RECEIVE_CLIENT_INSTANCES';\n\nconst receiveClientInstances = (json) => ({\n type: RECEIVE_CLIENT_INSTANCES,\n value: json,\n});\n\nconst errorReceiveClientInstances = (statusCode) => ({\n type: RECEIVE_CLIENT_INSTANCES,\n statusCode,\n});\n\nexport function fetchClientInstances () {\n return dispatch => api.fetchAll()\n .then(json => dispatch(receiveClientInstances(json)))\n .catch(error => dispatch(errorReceiveClientInstances(error)));\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/client-instance-actions.js","import { fromJS } from 'immutable';\nimport { RECEIVE_CLIENT_INSTANCES } from './client-instance-actions';\n\nfunction getInitState () {\n return fromJS([]);\n}\n\nconst store = (state = getInitState(), action) => {\n switch (action.type) {\n case RECEIVE_CLIENT_INSTANCES:\n return fromJS(action.value);\n default:\n return state;\n }\n};\n\nexport default store;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/client-instance-store.js","import { fromJS } from 'immutable';\nimport { RECEIVE_CLIENT_STRATEGIES } from './client-strategy-actions';\n\nfunction getInitState () {\n return fromJS([]);\n}\n\nconst store = (state = getInitState(), action) => {\n switch (action.type) {\n case RECEIVE_CLIENT_STRATEGIES:\n return fromJS(action.value);\n default:\n return state;\n }\n};\n\nexport default store;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/client-strategy-store.js","import { List, Map as $Map } from 'immutable';\nimport { MUTE_ERROR } from './error-actions';\nimport {\n ERROR_FETCH_FEATURE_TOGGLES,\n ERROR_CREATING_FEATURE_TOGGLE,\n ERROR_REMOVE_FEATURE_TOGGLE,\n ERROR_UPDATE_FEATURE_TOGGLE,\n} from './feature-actions';\n\nconst debug = require('debug')('unleash:error-store');\n\nfunction getInitState () {\n return new $Map({\n list: new List(),\n });\n}\n\nfunction addErrorIfNotAlreadyInList (state, error) {\n debug('Got error', error);\n if (state.get('list').indexOf(error) < 0) {\n return state.update('list', (list) => list.push(error));\n }\n return state;\n}\n\nconst strategies = (state = getInitState(), action) => {\n switch (action.type) {\n case ERROR_CREATING_FEATURE_TOGGLE:\n case ERROR_REMOVE_FEATURE_TOGGLE:\n case ERROR_FETCH_FEATURE_TOGGLES:\n case ERROR_UPDATE_FEATURE_TOGGLE:\n return addErrorIfNotAlreadyInList(state, action.error.message);\n case MUTE_ERROR:\n return state.update('list', (list) => list.remove(list.indexOf(action.error)));\n default:\n return state;\n }\n};\n\nexport default strategies;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/error-store.js","import { Map as $Map, fromJS } from 'immutable';\n\nimport {\n RECEIVE_FEATURE_METRICS,\n RECEIVE_SEEN_APPS,\n} from './feature-metrics-actions';\n\n\nconst metrics = (state = fromJS({ lastHour: {}, lastMinute: {}, seenApps: {} }), action) => {\n switch (action.type) {\n case RECEIVE_SEEN_APPS:\n return state.set('seenApps', new $Map(action.value));\n case RECEIVE_FEATURE_METRICS:\n return state.withMutations((ctx) => {\n ctx.set('lastHour', new $Map(action.value.lastHour));\n ctx.set('lastMinute', new $Map(action.value.lastMinute));\n return ctx;\n });\n default:\n return state;\n }\n};\n\nexport default metrics;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/feature-metrics-store.js","import { List, Map as $Map } from 'immutable';\nconst debug = require('debug')('unleash:feature-store');\n\n\nimport {\n ADD_FEATURE_TOGGLE,\n RECEIVE_FEATURE_TOGGLES,\n UPDATE_FEATURE_TOGGLE,\n REMOVE_FEATURE_TOGGLE,\n} from './feature-actions';\n\n\nconst features = (state = new List([]), action) => {\n switch (action.type) {\n case ADD_FEATURE_TOGGLE:\n debug(ADD_FEATURE_TOGGLE, action);\n return state.push(new $Map(action.featureToggle));\n case REMOVE_FEATURE_TOGGLE:\n debug(REMOVE_FEATURE_TOGGLE, action);\n return state.filter(toggle => toggle.get('name') !== action.featureToggleName);\n case UPDATE_FEATURE_TOGGLE:\n debug(UPDATE_FEATURE_TOGGLE, action);\n return state.map(toggle => {\n if (toggle.get('name') === action.featureToggle.name) {\n return new $Map(action.featureToggle);\n } else {\n return toggle;\n }\n });\n case RECEIVE_FEATURE_TOGGLES:\n debug(RECEIVE_FEATURE_TOGGLES, action);\n return new List(action.featureToggles.map($Map));\n default:\n return state;\n }\n};\n\nexport default features;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/feature-store.js","import { List, Map as $Map } from 'immutable';\nimport { RECEIVE_HISTORY } from './history-actions';\n\nfunction getInitState () {\n return new $Map({ list: new List() });\n}\n\nconst historyStore = (state = getInitState(), action) => {\n switch (action.type) {\n case RECEIVE_HISTORY:\n return state.set('list', new List(action.value));\n default:\n return state;\n }\n};\n\nexport default historyStore;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/history-store.js","import { combineReducers } from 'redux';\nimport features from './feature-store';\nimport featureMetrics from './feature-metrics-store';\nimport strategies from './strategy-store';\nimport input from './input-store';\nimport history from './history-store'; // eslint-disable-line\nimport archive from './archive-store';\nimport error from './error-store';\nimport metrics from './metrics-store';\nimport clientStrategies from './client-strategy-store';\nimport clientInstances from './client-instance-store';\nimport settings from './settings';\nimport user from './user';\nimport applications from './application';\n\nconst unleashStore = combineReducers({\n features,\n featureMetrics,\n strategies,\n input,\n history,\n archive,\n error,\n metrics,\n clientStrategies,\n clientInstances,\n settings,\n user,\n applications,\n});\n\nexport default unleashStore;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","import { Map as $Map, List, fromJS } from 'immutable';\nimport actions from './input-actions';\n\nfunction getInitState () {\n return new $Map();\n}\n\nfunction init (state, { id, value }) {\n state = assertId(state, id);\n return state.setIn(id, fromJS(value));\n}\n\nfunction assertId (state, id) {\n if (!state.hasIn(id)) {\n return state.setIn(id, new $Map({ inputId: id }));\n }\n return state;\n}\n\nfunction assertList (state, id, key) {\n if (!state.getIn(id).has(key)) {\n return state.setIn(id.concat([key]), new List());\n }\n return state;\n}\n\nfunction setKeyValue (state, { id, key, value }) {\n state = assertId(state, id);\n return state.setIn(id.concat([key]), value);\n}\n\nfunction increment (state, { id, key }) {\n state = assertId(state, id);\n return state.updateIn(id.concat([key]), (value = 0) => value + 1);\n}\n\nfunction clear (state, { id }) {\n if (state.hasIn(id)) {\n return state.removeIn(id);\n }\n return state;\n}\n\nfunction addToList (state, { id, key, value }) {\n state = assertId(state, id);\n state = assertList(state, id, key);\n\n return state.updateIn(id.concat([key]), (list) => list.push(value));\n}\n\nfunction updateInList (state, { id, key, index, newValue }) {\n state = assertId(state, id);\n state = assertList(state, id, key);\n\n return state.updateIn(id.concat([key]), (list) => list.set(index, newValue));\n}\n\nfunction removeFromList (state, { id, key, index }) {\n state = assertId(state, id);\n state = assertList(state, id, key);\n\n return state.updateIn(id.concat([key]), (list) => list.remove(index));\n}\n\nconst inputState = (state = getInitState(), action) => {\n if (!action.id) {\n return state;\n }\n\n switch (action.type) {\n case actions.INIT:\n return init(state, action);\n case actions.SET_VALUE:\n if (actions.key != null && actions.value != null) {\n throw new Error('Missing required key / value');\n }\n return setKeyValue(state, action);\n case actions.INCREMENT_VALUE:\n return increment(state, action);\n case actions.LIST_PUSH:\n return addToList(state, action);\n case actions.LIST_POP:\n return removeFromList(state, action);\n case actions.LIST_UP:\n return updateInList(state, action);\n case actions.CLEAR:\n return clear(state, action);\n default:\n // console.log('TYPE', action.type, action);\n return state;\n }\n};\n\nexport default inputState;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/input-store.js","import api from '../data/metrics-api';\n\nexport const RECEIVE_METRICS = 'RECEIVE_METRICS';\nexport const ERROR_RECEIVE_METRICS = 'ERROR_RECEIVE_METRICS';\n\nconst receiveMetrics = (json) => ({\n type: RECEIVE_METRICS,\n value: json,\n});\n\nconst errorReceiveMetrics = (statusCode) => ({\n type: ERROR_RECEIVE_METRICS,\n statusCode,\n});\n\nexport function fetchMetrics () {\n return dispatch => api.fetchAll()\n .then(json => dispatch(receiveMetrics(json)))\n .catch(error => dispatch(errorReceiveMetrics(error)));\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/metrics-actions.js","import { fromJS } from 'immutable';\nimport { RECEIVE_METRICS } from './metrics-actions';\n\nfunction getInitState () {\n return fromJS({\n totalCount: 0,\n apps: [],\n clients: {},\n });\n}\n\nconst historyStore = (state = getInitState(), action) => {\n switch (action.type) {\n case RECEIVE_METRICS:\n return fromJS(action.value);\n default:\n return state;\n }\n};\n\nexport default historyStore;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/metrics-store.js","import { fromJS, Map as $Map } from 'immutable';\nimport { UPDATE_SETTING } from './actions';\n\n// TODO: provde a mock if localstorage does not exists?\nconst localStorage = window.localStorage || {};\nconst SETTINGS = 'settings';\n\nfunction getInitState () {\n try {\n const state = JSON.parse(localStorage.getItem(SETTINGS));\n return state ? fromJS(state) : new $Map();\n } catch (e) {\n return new $Map();\n }\n}\n\nfunction updateSetting (state, action) {\n const newState = state.updateIn([action.group, action.field], () => action.value);\n\n localStorage.setItem(SETTINGS, JSON.stringify(newState.toJSON()));\n return newState;\n}\n\nconst settingStore = (state = getInitState(), action) => {\n switch (action.type) {\n case UPDATE_SETTING:\n return updateSetting(state, action);\n default:\n return state;\n }\n};\n\nexport default settingStore;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/settings/index.js","import { List, Map as $Map } from 'immutable';\nimport { RECEIVE_STRATEGIES, REMOVE_STRATEGY, ADD_STRATEGY } from './strategy-actions';\n\nfunction getInitState () {\n return new $Map({ list: new List() });\n}\n\nfunction removeStrategy (state, action) {\n const indexToRemove = state.get('list').indexOf(action.strategy);\n if (indexToRemove !== -1) {\n return state.update('list', (list) => list.remove(indexToRemove));\n }\n return state;\n}\n\nconst strategies = (state = getInitState(), action) => {\n switch (action.type) {\n case RECEIVE_STRATEGIES:\n return state.set('list', new List(action.value));\n case REMOVE_STRATEGY:\n return removeStrategy(state, action);\n case ADD_STRATEGY:\n return state.update('list', (list) => list.push(action.strategy));\n default:\n return state;\n }\n};\n\nexport default strategies;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/strategy-store.js","import { Map as $Map } from 'immutable';\nimport { USER_UPDATE_USERNAME, USER_SAVE, USER_EDIT } from './actions';\n\nconst COOKIE_NAME = 'username';\n\n// Ref: http://stackoverflow.com/questions/10730362/get-cookie-by-name\nfunction readCookie () {\n const nameEQ = `${COOKIE_NAME}=`;\n const ca = document.cookie.split(';');\n for (let i = 0;i < ca.length;i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') { // eslint-disable-line eqeqeq\n c = c.substring(1, c.length);\n }\n if (c.indexOf(nameEQ) === 0) {\n return c.substring(nameEQ.length, c.length);\n }\n }\n}\n\nfunction writeCookie (userName) {\n document.cookie = `${COOKIE_NAME}=${userName}; expires=Thu, 18 Dec 2099 12:00:00 UTC`;\n}\n\n\nfunction getInitState () {\n const userName = readCookie(COOKIE_NAME);\n const showDialog = !userName;\n return new $Map({ userName, showDialog });\n}\n\nfunction updateUserName (state, action) {\n return state.set('userName', action.value);\n}\n\nfunction save (state) {\n const userName = state.get('userName');\n if (userName) {\n writeCookie(userName);\n return state.set('showDialog', false);\n } else {\n return state;\n }\n}\n\nconst settingStore = (state = getInitState(), action) => {\n switch (action.type) {\n case USER_UPDATE_USERNAME:\n return updateUserName(state, action);\n case USER_SAVE:\n return save(state);\n case USER_EDIT:\n return state.set('showDialog', true);\n default:\n return state;\n }\n};\n\nexport default settingStore;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/user/index.js","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = debug.debug = debug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lowercased letter, i.e. \"n\".\n */\n\nexports.formatters = {};\n\n/**\n * Previously assigned color.\n */\n\nvar prevColor = 0;\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n *\n * @return {Number}\n * @api private\n */\n\nfunction selectColor() {\n return exports.colors[prevColor++ % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction debug(namespace) {\n\n // define the `disabled` version\n function disabled() {\n }\n disabled.enabled = false;\n\n // define the `enabled` version\n function enabled() {\n\n var self = enabled;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // add the `color` if not set\n if (null == self.useColors) self.useColors = exports.useColors();\n if (null == self.color && self.useColors) self.color = selectColor();\n\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %o\n args = ['%o'].concat(args);\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting\n args = exports.formatArgs.apply(self, args);\n\n var logFn = enabled.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n enabled.enabled = true;\n\n var fn = exports.enabled(namespace) ? enabled : disabled;\n\n fn.namespace = namespace;\n\n return fn;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n var split = (namespaces || '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/[\\\\^$+?.()|[\\]{}]/g, '\\\\$&').replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/debug/debug.js\n// module id = 243\n// module chunks = 0","// removed by extract-text-webpack-plugin\nmodule.exports = {\"path\":\"progress-styles__path___EWzvx\",\"trail\":\"progress-styles__trail___33CET\",\"text\":\"progress-styles__text___2Ny4s\"};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/feature/progress-styles.scss\n// module id = 244\n// module chunks = 0","// removed by extract-text-webpack-plugin\nmodule.exports = {\"non-style-button\":\"strategies__non-style-button___1iQRq\"};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/strategies/strategies.scss\n// module id = 245\n// module chunks = 0","// removed by extract-text-webpack-plugin\nmodule.exports = {\"container\":\"styles__container___3RbZD\",\"navigation\":\"styles__navigation___NYjO2\",\"active\":\"styles__active___2VGIV\"};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/component/styles.scss\n// module id = 246\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar _hyphenPattern = /-(.)/g;\n\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize('background-color')\n * < \"backgroundColor\"\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nmodule.exports = camelize;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/camelize.js\n// module id = 247\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n'use strict';\n\nvar camelize = require('./camelize');\n\nvar msPattern = /^-ms-/;\n\n/**\n * Camelcases a hyphenated CSS property name, for example:\n *\n * > camelizeStyleName('background-color')\n * < \"backgroundColor\"\n * > camelizeStyleName('-moz-transition')\n * < \"MozTransition\"\n * > camelizeStyleName('-ms-transition')\n * < \"msTransition\"\n *\n * As Andi Smith suggests\n * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n * is converted to lowercase `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelizeStyleName(string) {\n return camelize(string.replace(msPattern, 'ms-'));\n}\n\nmodule.exports = camelizeStyleName;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/camelizeStyleName.js\n// module id = 248\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nvar isTextNode = require('./isTextNode');\n\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nmodule.exports = containsNode;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/containsNode.js\n// module id = 249\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar invariant = require('./invariant');\n\n/**\n * Convert array-like objects to arrays.\n *\n * This API assumes the caller knows the contents of the data type. For less\n * well defined inputs use createArrayFromMixed.\n *\n * @param {object|function|filelist} obj\n * @return {array}\n */\nfunction toArray(obj) {\n var length = obj.length;\n\n // Some browsers builtin objects can report typeof 'function' (e.g. NodeList\n // in old versions of Safari).\n !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;\n\n !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;\n\n !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;\n\n !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;\n\n // Old IE doesn't give collections access to hasOwnProperty. Assume inputs\n // without method will throw during the slice call and skip straight to the\n // fallback.\n if (obj.hasOwnProperty) {\n try {\n return Array.prototype.slice.call(obj);\n } catch (e) {\n // IE < 9 does not support Array#slice on collections objects\n }\n }\n\n // Fall back to copying key by key. This assumes all keys have a value,\n // so will not preserve sparsely populated inputs.\n var ret = Array(length);\n for (var ii = 0; ii < length; ii++) {\n ret[ii] = obj[ii];\n }\n return ret;\n}\n\n/**\n * Perform a heuristic test to determine if an object is \"array-like\".\n *\n * A monk asked Joshu, a Zen master, \"Has a dog Buddha nature?\"\n * Joshu replied: \"Mu.\"\n *\n * This function determines if its argument has \"array nature\": it returns\n * true if the argument is an actual array, an `arguments' object, or an\n * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).\n *\n * It will return false for other array-like objects like Filelist.\n *\n * @param {*} obj\n * @return {boolean}\n */\nfunction hasArrayNature(obj) {\n return (\n // not null/false\n !!obj && (\n // arrays are objects, NodeLists are functions in Safari\n typeof obj == 'object' || typeof obj == 'function') &&\n // quacks like an array\n 'length' in obj &&\n // not window\n !('setInterval' in obj) &&\n // no DOM node should be considered an array-like\n // a 'select' element has 'length' and 'item' properties on IE8\n typeof obj.nodeType != 'number' && (\n // a real array\n Array.isArray(obj) ||\n // arguments\n 'callee' in obj ||\n // HTMLCollection/NodeList\n 'item' in obj)\n );\n}\n\n/**\n * Ensure that the argument is an array by wrapping it in an array if it is not.\n * Creates a copy of the argument if it is already an array.\n *\n * This is mostly useful idiomatically:\n *\n * var createArrayFromMixed = require('createArrayFromMixed');\n *\n * function takesOneOrMoreThings(things) {\n * things = createArrayFromMixed(things);\n * ...\n * }\n *\n * This allows you to treat `things' as an array, but accept scalars in the API.\n *\n * If you need to convert an array-like object, like `arguments`, into an array\n * use toArray instead.\n *\n * @param {*} obj\n * @return {array}\n */\nfunction createArrayFromMixed(obj) {\n if (!hasArrayNature(obj)) {\n return [obj];\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else {\n return toArray(obj);\n }\n}\n\nmodule.exports = createArrayFromMixed;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/createArrayFromMixed.js\n// module id = 250\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n/*eslint-disable fb-www/unsafe-html*/\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar createArrayFromMixed = require('./createArrayFromMixed');\nvar getMarkupWrap = require('./getMarkupWrap');\nvar invariant = require('./invariant');\n\n/**\n * Dummy container used to render all markup.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Pattern used by `getNodeName`.\n */\nvar nodeNamePattern = /^\\s*<(\\w+)/;\n\n/**\n * Extracts the `nodeName` of the first element in a string of markup.\n *\n * @param {string} markup String of markup.\n * @return {?string} Node name of the supplied markup.\n */\nfunction getNodeName(markup) {\n var nodeNameMatch = markup.match(nodeNamePattern);\n return nodeNameMatch && nodeNameMatch[1].toLowerCase();\n}\n\n/**\n * Creates an array containing the nodes rendered from the supplied markup. The\n * optionally supplied `handleScript` function will be invoked once for each\n *