" )\n .attr({\n id: id,\n role: "tooltip"\n })\n .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +\n ( this.options.tooltipClass || "" ) );\n $( "
" )\n .addClass( "ui-tooltip-content" )\n .appendTo( tooltip );\n tooltip.appendTo( this.document[0].body );\n this.tooltips[ id ] = element;\n return tooltip;\n },\n\n _find: function( target ) {\n var id = target.data( "ui-tooltip-id" );\n return id ? $( "#" + id ) : $();\n },\n\n _removeTooltip: function( tooltip ) {\n tooltip.remove();\n delete this.tooltips[ tooltip.attr( "id" ) ];\n },\n\n _destroy: function() {\n var that = this;\n\n // close open tooltips\n $.each( this.tooltips, function( id, element ) {\n // Delegate to close method to handle common cleanup\n var event = $.Event( "blur" );\n event.target = event.currentTarget = element[0];\n that.close( event, true );\n\n // Remove immediately; destroying an open tooltip doesn\'t use the\n // hide animation\n $( "#" + id ).remove();\n\n // Restore the title\n if ( element.data( "ui-tooltip-title" ) ) {\n element.attr( "title", element.data( "ui-tooltip-title" ) );\n element.removeData( "ui-tooltip-title" );\n }\n });\n }\n});\n\n}( jQuery ) );\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/jquery-ui/jquery-ui.js\n ** module id = 183\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/jquery-ui/jquery-ui.js?');
},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){eval("/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-api/modules/index.js\"), RootInstanceProvider = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/RootInstanceProvider.js\"), ReactMount = require(\"react/lib/ReactMount\"), React = require(\"react\"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(26);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _numeral = __webpack_require__(18);\n\nvar _numeral2 = _interopRequireDefault(_numeral);\n\nvar _crossfilter = __webpack_require__(86);\n\nvar _crossfilter2 = _interopRequireDefault(_crossfilter);\n\nvar _dc = __webpack_require__(75);\n\nvar _dc2 = _interopRequireDefault(_dc);\n\nvar _d3 = __webpack_require__(49);\n\nvar _d32 = _interopRequireDefault(_d3);\n\nvar _jquery = __webpack_require__(15);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _logicDatetimesDateTime = __webpack_require__(36);\n\nvar _logicDatetimesDateTime2 = _interopRequireDefault(_logicDatetimesDateTime);\n\nvar _logicGraphsHistogramFormatter = __webpack_require__(94);\n\nvar _logicGraphsHistogramFormatter2 = _interopRequireDefault(_logicGraphsHistogramFormatter);\n\nvar _utilD3Utils = __webpack_require__(95);\n\nvar _utilD3Utils2 = _interopRequireDefault(_utilD3Utils);\n\nvar _utilNumberUtils = __webpack_require__(52);\n\nvar _utilNumberUtils2 = _interopRequireDefault(_utilNumberUtils);\n\nvar _legacyGraphHelper = __webpack_require__(120);\n\nvar _legacyGraphHelper2 = _interopRequireDefault(_legacyGraphHelper);\n\n__webpack_require__(81);\n__webpack_require__(124);\n\nvar GraphFactory = {\n create: function create(config, domNode, tooltipTitleFormatter) {\n var graph = undefined;\n switch (config.renderer) {\n case 'line':\n graph = _dc2['default'].lineChart(domNode);\n _utilD3Utils2['default'].tooltipRenderlet(graph, '.chart-body circle.dot', tooltipTitleFormatter);\n break;\n case 'area':\n graph = _dc2['default'].lineChart(domNode);\n graph.renderArea(true);\n _utilD3Utils2['default'].tooltipRenderlet(graph, '.chart-body circle.dot', tooltipTitleFormatter);\n break;\n case 'bar':\n graph = _dc2['default'].barChart(domNode);\n graph.centerBar(true);\n _utilD3Utils2['default'].tooltipRenderlet(graph, '.chart-body rect.bar', tooltipTitleFormatter);\n break;\n case 'scatterplot':\n graph = _dc2['default'].lineChart(domNode);\n graph.renderDataPoints({ radius: 2, fillOpacity: 1, strokeOpacity: 1 });\n _utilD3Utils2['default'].tooltipRenderlet(graph, '.chart-body circle.dot', tooltipTitleFormatter);\n break;\n default:\n throw new Error(\"Unsupported renderer '\" + config.renderer + \"'\");\n }\n\n if (config.renderer === 'line' || config.renderer === 'area') {\n graph.interpolate(config.interpolation);\n }\n\n // Bar charts with clip padding overflow the x axis\n if (config.renderer !== 'bar') {\n graph.clipPadding(5);\n }\n\n return graph;\n }\n};\n\nvar GraphVisualization = _react2['default'].createClass({\n displayName: 'GraphVisualization',\n\n propTypes: {\n id: _react.PropTypes.string.isRequired,\n data: _react.PropTypes.object.isRequired,\n config: _react.PropTypes.object.isRequired,\n computationTimeRange: _react.PropTypes.object,\n height: _react.PropTypes.number,\n width: _react.PropTypes.number\n },\n statics: {\n getReadableFieldChartStatisticalFunction: function getReadableFieldChartStatisticalFunction(statisticalFunction) {\n switch (statisticalFunction) {\n case 'count':\n return 'total';\n case 'total':\n return 'sum';\n default:\n return statisticalFunction;\n }\n }\n },\n getInitialState: function getInitialState() {\n this.triggerRender = true;\n this.graphData = (0, _crossfilter2['default'])();\n this.dimension = this.graphData.dimension(function (d) {\n return d.x;\n });\n this.group = this.dimension.group().reduceSum(function (d) {\n return d.y;\n });\n\n return {\n dataPoints: []\n };\n },\n componentDidMount: function componentDidMount() {\n this.renderGraph();\n this._updateData(this.props.data, this.props.config);\n },\n componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n if (nextProps.height !== this.props.height || nextProps.width !== this.props.width) {\n this._resizeVisualization(nextProps.width, nextProps.height);\n }\n this._updateData(nextProps.data, nextProps.config);\n },\n _updateData: function _updateData(data, config) {\n var isSearchAll = config.timerange.type === 'relative' && config.timerange.range === 0;\n var dataPoints = _logicGraphsHistogramFormatter2['default'].format(data, this.props.computationTimeRange, config.interval, this.props.width, isSearchAll, config.valuetype);\n\n this.setState({ dataPoints: this._normalizeData(dataPoints) }, this.drawData);\n },\n _normalizeData: function _normalizeData(data) {\n if (data === null || data === undefined || !Array.isArray(data)) {\n return [];\n }\n return data.map(function (dataPoint) {\n dataPoint.y = _utilNumberUtils2['default'].normalizeGraphNumber(dataPoint.y);\n return dataPoint;\n });\n },\n _formatTooltipTitle: function _formatTooltipTitle(d) {\n var formattedKey = d.x === undefined ? d.x : new _logicDatetimesDateTime2['default'](d.x).toString(_logicDatetimesDateTime2['default'].Formats.COMPLETE);\n\n var formattedValue = undefined;\n try {\n formattedValue = (0, _numeral2['default'])(d.y).format('0,0.[00]');\n } catch (e) {\n formattedValue = _d32['default'].format('.2r')(d.y);\n }\n\n var valueText = GraphVisualization.getReadableFieldChartStatisticalFunction(this.props.config.valuetype) + ' ' + this.props.config.field + ': ' + formattedValue;\n var keyText = '
' + formattedKey + ' ';\n\n return '
' + valueText + ' ' + keyText + '
';\n },\n _resizeVisualization: function _resizeVisualization(width, height) {\n this.graph.width(width).height(height);\n this.triggerRender = true;\n },\n drawData: function drawData() {\n var _this = this;\n\n this.graph.xUnits(function () {\n return Math.max(_this.state.dataPoints.length - 1, 1);\n });\n this.graphData.remove();\n this.graphData.add(this.state.dataPoints);\n\n // Fix to make Firefox render tooltips in the right place\n // TODO: Find the cause of this\n if (this.triggerRender) {\n this.graph.render();\n this.triggerRender = false;\n } else {\n this.graph.redraw();\n }\n },\n renderGraph: function renderGraph() {\n var graphDomNode = _reactDom2['default'].findDOMNode(this);\n\n this.graph = GraphFactory.create(this.props.config, graphDomNode, this._formatTooltipTitle);\n this.graph.width(this.props.width).height(this.props.height).margins({ left: 50, right: 15, top: 10, bottom: 35 }).dimension(this.dimension).group(this.group).x(_d32['default'].time.scale()).elasticX(true).elasticY(true).renderHorizontalGridLines(true).brushOn(false).xAxisLabel('Time').yAxisLabel(this.props.config.field).renderTitle(false).colors(_utilD3Utils2['default'].glColourPalette());\n\n $(graphDomNode).tooltip({\n 'selector': '[rel=\"tooltip\"]',\n 'container': 'body',\n 'placement': 'auto',\n 'delay': { show: 300, hide: 100 },\n 'html': true\n });\n\n this.graph.xAxis().ticks(_legacyGraphHelper2['default'].customTickInterval()).tickFormat(_legacyGraphHelper2['default'].customDateTimeFormat());\n this.graph.yAxis().ticks(3).tickFormat(function (value) {\n return Math.abs(value) > 1e+30 ? value.toPrecision(1) : _d32['default'].format('.2s')(value);\n });\n this.graph.render();\n },\n render: function render() {\n return _react2['default'].createElement('div', { id: 'visualization-' + this.props.id, className: 'graph ' + this.props.config.renderer });\n }\n});\n\nexports['default'] = GraphVisualization;\nmodule.exports = exports['default'];\n\n/* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/makeExportsHot.js\"); if (makeExportsHot(module, require(\"react\"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error(\"Cannot not apply hot update to \" + \"GraphVisualization.jsx\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/components/visualizations/GraphVisualization.jsx\n ** module id = 268\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/components/visualizations/GraphVisualization.jsx?")},,,,function(module,exports,__webpack_require__){eval('/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {\n\n\'use strict\';\n\nObject.defineProperty(exports, \'__esModule\', {\n value: true\n});\n\nvar _history = __webpack_require__(649);\n\nif (!window.graylogHistory) {\n window.graylogHistory = (0, _history.createHistory)();\n}\n\nexports[\'default\'] = window.graylogHistory;\nmodule.exports = exports[\'default\'];\n\n/* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/makeExportsHot.js"); if (makeExportsHot(module, require("react"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "History.js" + ": " + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/util/History.js\n ** module id = 272\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/util/History.js?')},,,,,,,,,,function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(585);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/webpack/buildin/module.js from dll-reference __vendor\n ** module id = 282\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/webpack/buildin/module.js_from_dll-reference___vendor?")},,,,function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(process, global, setImmediate) {/* @preserve\n * The MIT License (MIT)\n * \n * Copyright (c) 2013-2015 Petka Antonov\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n * \n */\n/**\n * bluebird build version 2.10.2\n * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, cancel, using, filter, any, each, timers\n*/\n!function(e){if(true)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module \'"+o+"\'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o
0;\n};\n\nAsync.prototype.throwLater = function(fn, arg) {\n if (arguments.length === 1) {\n arg = fn;\n fn = function () { throw arg; };\n }\n if (typeof setTimeout !== "undefined") {\n setTimeout(function() {\n fn(arg);\n }, 0);\n } else try {\n this._schedule(function() {\n fn(arg);\n });\n } catch (e) {\n throw new Error("No async scheduler available\\u000a\\u000a See http://goo.gl/m3OTXk\\u000a");\n }\n};\n\nfunction AsyncInvokeLater(fn, receiver, arg) {\n this._lateQueue.push(fn, receiver, arg);\n this._queueTick();\n}\n\nfunction AsyncInvoke(fn, receiver, arg) {\n this._normalQueue.push(fn, receiver, arg);\n this._queueTick();\n}\n\nfunction AsyncSettlePromises(promise) {\n this._normalQueue._pushOne(promise);\n this._queueTick();\n}\n\nif (!util.hasDevTools) {\n Async.prototype.invokeLater = AsyncInvokeLater;\n Async.prototype.invoke = AsyncInvoke;\n Async.prototype.settlePromises = AsyncSettlePromises;\n} else {\n if (schedule.isStatic) {\n schedule = function(fn) { setTimeout(fn, 0); };\n }\n Async.prototype.invokeLater = function (fn, receiver, arg) {\n if (this._trampolineEnabled) {\n AsyncInvokeLater.call(this, fn, receiver, arg);\n } else {\n this._schedule(function() {\n setTimeout(function() {\n fn.call(receiver, arg);\n }, 100);\n });\n }\n };\n\n Async.prototype.invoke = function (fn, receiver, arg) {\n if (this._trampolineEnabled) {\n AsyncInvoke.call(this, fn, receiver, arg);\n } else {\n this._schedule(function() {\n fn.call(receiver, arg);\n });\n }\n };\n\n Async.prototype.settlePromises = function(promise) {\n if (this._trampolineEnabled) {\n AsyncSettlePromises.call(this, promise);\n } else {\n this._schedule(function() {\n promise._settlePromises();\n });\n }\n };\n}\n\nAsync.prototype.invokeFirst = function (fn, receiver, arg) {\n this._normalQueue.unshift(fn, receiver, arg);\n this._queueTick();\n};\n\nAsync.prototype._drainQueue = function(queue) {\n while (queue.length() > 0) {\n var fn = queue.shift();\n if (typeof fn !== "function") {\n fn._settlePromises();\n continue;\n }\n var receiver = queue.shift();\n var arg = queue.shift();\n fn.call(receiver, arg);\n }\n};\n\nAsync.prototype._drainQueues = function () {\n this._drainQueue(this._normalQueue);\n this._reset();\n this._drainQueue(this._lateQueue);\n};\n\nAsync.prototype._queueTick = function () {\n if (!this._isTickUsed) {\n this._isTickUsed = true;\n this._schedule(this.drainQueues);\n }\n};\n\nAsync.prototype._reset = function () {\n this._isTickUsed = false;\n};\n\nmodule.exports = new Async();\nmodule.exports.firstLineError = firstLineError;\n\n},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise) {\nvar rejectThis = function(_, e) {\n this._reject(e);\n};\n\nvar targetRejected = function(e, context) {\n context.promiseRejectionQueued = true;\n context.bindingPromise._then(rejectThis, rejectThis, null, this, e);\n};\n\nvar bindingResolved = function(thisArg, context) {\n if (this._isPending()) {\n this._resolveCallback(context.target);\n }\n};\n\nvar bindingRejected = function(e, context) {\n if (!context.promiseRejectionQueued) this._reject(e);\n};\n\nPromise.prototype.bind = function (thisArg) {\n var maybePromise = tryConvertToPromise(thisArg);\n var ret = new Promise(INTERNAL);\n ret._propagateFrom(this, 1);\n var target = this._target();\n\n ret._setBoundTo(maybePromise);\n if (maybePromise instanceof Promise) {\n var context = {\n promiseRejectionQueued: false,\n promise: ret,\n target: target,\n bindingPromise: maybePromise\n };\n target._then(INTERNAL, targetRejected, ret._progress, ret, context);\n maybePromise._then(\n bindingResolved, bindingRejected, ret._progress, ret, context);\n } else {\n ret._resolveCallback(target);\n }\n return ret;\n};\n\nPromise.prototype._setBoundTo = function (obj) {\n if (obj !== undefined) {\n this._bitField = this._bitField | 131072;\n this._boundTo = obj;\n } else {\n this._bitField = this._bitField & (~131072);\n }\n};\n\nPromise.prototype._isBound = function () {\n return (this._bitField & 131072) === 131072;\n};\n\nPromise.bind = function (thisArg, value) {\n var maybePromise = tryConvertToPromise(thisArg);\n var ret = new Promise(INTERNAL);\n\n ret._setBoundTo(maybePromise);\n if (maybePromise instanceof Promise) {\n maybePromise._then(function() {\n ret._resolveCallback(value);\n }, ret._reject, ret._progress, ret, null);\n } else {\n ret._resolveCallback(value);\n }\n return ret;\n};\n};\n\n},{}],4:[function(_dereq_,module,exports){\n"use strict";\nvar old;\nif (typeof Promise !== "undefined") old = Promise;\nfunction noConflict() {\n try { if (Promise === bluebird) Promise = old; }\n catch (e) {}\n return bluebird;\n}\nvar bluebird = _dereq_("./promise.js")();\nbluebird.noConflict = noConflict;\nmodule.exports = bluebird;\n\n},{"./promise.js":23}],5:[function(_dereq_,module,exports){\n"use strict";\nvar cr = Object.create;\nif (cr) {\n var callerCache = cr(null);\n var getterCache = cr(null);\n callerCache[" size"] = getterCache[" size"] = 0;\n}\n\nmodule.exports = function(Promise) {\nvar util = _dereq_("./util.js");\nvar canEvaluate = util.canEvaluate;\nvar isIdentifier = util.isIdentifier;\n\nvar getMethodCaller;\nvar getGetter;\nif (false) {\nvar makeMethodCaller = function (methodName) {\n return new Function("ensureMethod", " \\n\\\n return function(obj) { \\n\\\n \'use strict\' \\n\\\n var len = this.length; \\n\\\n ensureMethod(obj, \'methodName\'); \\n\\\n switch(len) { \\n\\\n case 1: return obj.methodName(this[0]); \\n\\\n case 2: return obj.methodName(this[0], this[1]); \\n\\\n case 3: return obj.methodName(this[0], this[1], this[2]); \\n\\\n case 0: return obj.methodName(); \\n\\\n default: \\n\\\n return obj.methodName.apply(obj, this); \\n\\\n } \\n\\\n }; \\n\\\n ".replace(/methodName/g, methodName))(ensureMethod);\n};\n\nvar makeGetter = function (propertyName) {\n return new Function("obj", " \\n\\\n \'use strict\'; \\n\\\n return obj.propertyName; \\n\\\n ".replace("propertyName", propertyName));\n};\n\nvar getCompiled = function(name, compiler, cache) {\n var ret = cache[name];\n if (typeof ret !== "function") {\n if (!isIdentifier(name)) {\n return null;\n }\n ret = compiler(name);\n cache[name] = ret;\n cache[" size"]++;\n if (cache[" size"] > 512) {\n var keys = Object.keys(cache);\n for (var i = 0; i < 256; ++i) delete cache[keys[i]];\n cache[" size"] = keys.length - 256;\n }\n }\n return ret;\n};\n\ngetMethodCaller = function(name) {\n return getCompiled(name, makeMethodCaller, callerCache);\n};\n\ngetGetter = function(name) {\n return getCompiled(name, makeGetter, getterCache);\n};\n}\n\nfunction ensureMethod(obj, methodName) {\n var fn;\n if (obj != null) fn = obj[methodName];\n if (typeof fn !== "function") {\n var message = "Object " + util.classString(obj) + " has no method \'" +\n util.toString(methodName) + "\'";\n throw new Promise.TypeError(message);\n }\n return fn;\n}\n\nfunction caller(obj) {\n var methodName = this.pop();\n var fn = ensureMethod(obj, methodName);\n return fn.apply(obj, this);\n}\nPromise.prototype.call = function (methodName) {\n var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}\n if (false) {\n if (canEvaluate) {\n var maybeCaller = getMethodCaller(methodName);\n if (maybeCaller !== null) {\n return this._then(\n maybeCaller, undefined, undefined, args, undefined);\n }\n }\n }\n args.push(methodName);\n return this._then(caller, undefined, undefined, args, undefined);\n};\n\nfunction namedGetter(obj) {\n return obj[this];\n}\nfunction indexedGetter(obj) {\n var index = +this;\n if (index < 0) index = Math.max(0, index + obj.length);\n return obj[index];\n}\nPromise.prototype.get = function (propertyName) {\n var isIndex = (typeof propertyName === "number");\n var getter;\n if (!isIndex) {\n if (canEvaluate) {\n var maybeGetter = getGetter(propertyName);\n getter = maybeGetter !== null ? maybeGetter : namedGetter;\n } else {\n getter = namedGetter;\n }\n } else {\n getter = indexedGetter;\n }\n return this._then(getter, undefined, undefined, propertyName, undefined);\n};\n};\n\n},{"./util.js":38}],6:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise) {\nvar errors = _dereq_("./errors.js");\nvar async = _dereq_("./async.js");\nvar CancellationError = errors.CancellationError;\n\nPromise.prototype._cancel = function (reason) {\n if (!this.isCancellable()) return this;\n var parent;\n var promiseToReject = this;\n while ((parent = promiseToReject._cancellationParent) !== undefined &&\n parent.isCancellable()) {\n promiseToReject = parent;\n }\n this._unsetCancellable();\n promiseToReject._target()._rejectCallback(reason, false, true);\n};\n\nPromise.prototype.cancel = function (reason) {\n if (!this.isCancellable()) return this;\n if (reason === undefined) reason = new CancellationError();\n async.invokeLater(this._cancel, this, reason);\n return this;\n};\n\nPromise.prototype.cancellable = function () {\n if (this._cancellable()) return this;\n async.enableTrampoline();\n this._setCancellable();\n this._cancellationParent = undefined;\n return this;\n};\n\nPromise.prototype.uncancellable = function () {\n var ret = this.then();\n ret._unsetCancellable();\n return ret;\n};\n\nPromise.prototype.fork = function (didFulfill, didReject, didProgress) {\n var ret = this._then(didFulfill, didReject, didProgress,\n undefined, undefined);\n\n ret._setCancellable();\n ret._cancellationParent = undefined;\n return ret;\n};\n};\n\n},{"./async.js":2,"./errors.js":13}],7:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function() {\nvar async = _dereq_("./async.js");\nvar util = _dereq_("./util.js");\nvar bluebirdFramePattern =\n /[\\\\\\/]bluebird[\\\\\\/]js[\\\\\\/](main|debug|zalgo|instrumented)/;\nvar stackFramePattern = null;\nvar formatStack = null;\nvar indentStackFrames = false;\nvar warn;\n\nfunction CapturedTrace(parent) {\n this._parent = parent;\n var length = this._length = 1 + (parent === undefined ? 0 : parent._length);\n captureStackTrace(this, CapturedTrace);\n if (length > 32) this.uncycle();\n}\nutil.inherits(CapturedTrace, Error);\n\nCapturedTrace.prototype.uncycle = function() {\n var length = this._length;\n if (length < 2) return;\n var nodes = [];\n var stackToIndex = {};\n\n for (var i = 0, node = this; node !== undefined; ++i) {\n nodes.push(node);\n node = node._parent;\n }\n length = this._length = i;\n for (var i = length - 1; i >= 0; --i) {\n var stack = nodes[i].stack;\n if (stackToIndex[stack] === undefined) {\n stackToIndex[stack] = i;\n }\n }\n for (var i = 0; i < length; ++i) {\n var currentStack = nodes[i].stack;\n var index = stackToIndex[currentStack];\n if (index !== undefined && index !== i) {\n if (index > 0) {\n nodes[index - 1]._parent = undefined;\n nodes[index - 1]._length = 1;\n }\n nodes[i]._parent = undefined;\n nodes[i]._length = 1;\n var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;\n\n if (index < length - 1) {\n cycleEdgeNode._parent = nodes[index + 1];\n cycleEdgeNode._parent.uncycle();\n cycleEdgeNode._length =\n cycleEdgeNode._parent._length + 1;\n } else {\n cycleEdgeNode._parent = undefined;\n cycleEdgeNode._length = 1;\n }\n var currentChildLength = cycleEdgeNode._length + 1;\n for (var j = i - 2; j >= 0; --j) {\n nodes[j]._length = currentChildLength;\n currentChildLength++;\n }\n return;\n }\n }\n};\n\nCapturedTrace.prototype.parent = function() {\n return this._parent;\n};\n\nCapturedTrace.prototype.hasParent = function() {\n return this._parent !== undefined;\n};\n\nCapturedTrace.prototype.attachExtraTrace = function(error) {\n if (error.__stackCleaned__) return;\n this.uncycle();\n var parsed = CapturedTrace.parseStackAndMessage(error);\n var message = parsed.message;\n var stacks = [parsed.stack];\n\n var trace = this;\n while (trace !== undefined) {\n stacks.push(cleanStack(trace.stack.split("\\n")));\n trace = trace._parent;\n }\n removeCommonRoots(stacks);\n removeDuplicateOrEmptyJumps(stacks);\n util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));\n util.notEnumerableProp(error, "__stackCleaned__", true);\n};\n\nfunction reconstructStack(message, stacks) {\n for (var i = 0; i < stacks.length - 1; ++i) {\n stacks[i].push("From previous event:");\n stacks[i] = stacks[i].join("\\n");\n }\n if (i < stacks.length) {\n stacks[i] = stacks[i].join("\\n");\n }\n return message + "\\n" + stacks.join("\\n");\n}\n\nfunction removeDuplicateOrEmptyJumps(stacks) {\n for (var i = 0; i < stacks.length; ++i) {\n if (stacks[i].length === 0 ||\n ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {\n stacks.splice(i, 1);\n i--;\n }\n }\n}\n\nfunction removeCommonRoots(stacks) {\n var current = stacks[0];\n for (var i = 1; i < stacks.length; ++i) {\n var prev = stacks[i];\n var currentLastIndex = current.length - 1;\n var currentLastLine = current[currentLastIndex];\n var commonRootMeetPoint = -1;\n\n for (var j = prev.length - 1; j >= 0; --j) {\n if (prev[j] === currentLastLine) {\n commonRootMeetPoint = j;\n break;\n }\n }\n\n for (var j = commonRootMeetPoint; j >= 0; --j) {\n var line = prev[j];\n if (current[currentLastIndex] === line) {\n current.pop();\n currentLastIndex--;\n } else {\n break;\n }\n }\n current = prev;\n }\n}\n\nfunction cleanStack(stack) {\n var ret = [];\n for (var i = 0; i < stack.length; ++i) {\n var line = stack[i];\n var isTraceLine = stackFramePattern.test(line) ||\n " (No stack trace)" === line;\n var isInternalFrame = isTraceLine && shouldIgnore(line);\n if (isTraceLine && !isInternalFrame) {\n if (indentStackFrames && line.charAt(0) !== " ") {\n line = " " + line;\n }\n ret.push(line);\n }\n }\n return ret;\n}\n\nfunction stackFramesAsArray(error) {\n var stack = error.stack.replace(/\\s+$/g, "").split("\\n");\n for (var i = 0; i < stack.length; ++i) {\n var line = stack[i];\n if (" (No stack trace)" === line || stackFramePattern.test(line)) {\n break;\n }\n }\n if (i > 0) {\n stack = stack.slice(i);\n }\n return stack;\n}\n\nCapturedTrace.parseStackAndMessage = function(error) {\n var stack = error.stack;\n var message = error.toString();\n stack = typeof stack === "string" && stack.length > 0\n ? stackFramesAsArray(error) : [" (No stack trace)"];\n return {\n message: message,\n stack: cleanStack(stack)\n };\n};\n\nCapturedTrace.formatAndLogError = function(error, title) {\n if (typeof console !== "undefined") {\n var message;\n if (typeof error === "object" || typeof error === "function") {\n var stack = error.stack;\n message = title + formatStack(stack, error);\n } else {\n message = title + String(error);\n }\n if (typeof warn === "function") {\n warn(message);\n } else if (typeof console.log === "function" ||\n typeof console.log === "object") {\n console.log(message);\n }\n }\n};\n\nCapturedTrace.unhandledRejection = function (reason) {\n CapturedTrace.formatAndLogError(reason, "^--- With additional stack trace: ");\n};\n\nCapturedTrace.isSupported = function () {\n return typeof captureStackTrace === "function";\n};\n\nCapturedTrace.fireRejectionEvent =\nfunction(name, localHandler, reason, promise) {\n var localEventFired = false;\n try {\n if (typeof localHandler === "function") {\n localEventFired = true;\n if (name === "rejectionHandled") {\n localHandler(promise);\n } else {\n localHandler(reason, promise);\n }\n }\n } catch (e) {\n async.throwLater(e);\n }\n\n var globalEventFired = false;\n try {\n globalEventFired = fireGlobalEvent(name, reason, promise);\n } catch (e) {\n globalEventFired = true;\n async.throwLater(e);\n }\n\n var domEventFired = false;\n if (fireDomEvent) {\n try {\n domEventFired = fireDomEvent(name.toLowerCase(), {\n reason: reason,\n promise: promise\n });\n } catch (e) {\n domEventFired = true;\n async.throwLater(e);\n }\n }\n\n if (!globalEventFired && !localEventFired && !domEventFired &&\n name === "unhandledRejection") {\n CapturedTrace.formatAndLogError(reason, "Unhandled rejection ");\n }\n};\n\nfunction formatNonError(obj) {\n var str;\n if (typeof obj === "function") {\n str = "[function " +\n (obj.name || "anonymous") +\n "]";\n } else {\n str = obj.toString();\n var ruselessToString = /\\[object [a-zA-Z0-9$_]+\\]/;\n if (ruselessToString.test(str)) {\n try {\n var newStr = JSON.stringify(obj);\n str = newStr;\n }\n catch(e) {\n\n }\n }\n if (str.length === 0) {\n str = "(empty array)";\n }\n }\n return ("(<" + snip(str) + ">, no stack trace)");\n}\n\nfunction snip(str) {\n var maxChars = 41;\n if (str.length < maxChars) {\n return str;\n }\n return str.substr(0, maxChars - 3) + "...";\n}\n\nvar shouldIgnore = function() { return false; };\nvar parseLineInfoRegex = /[\\/<\\(]([^:\\/]+):(\\d+):(?:\\d+)\\)?\\s*$/;\nfunction parseLineInfo(line) {\n var matches = line.match(parseLineInfoRegex);\n if (matches) {\n return {\n fileName: matches[1],\n line: parseInt(matches[2], 10)\n };\n }\n}\nCapturedTrace.setBounds = function(firstLineError, lastLineError) {\n if (!CapturedTrace.isSupported()) return;\n var firstStackLines = firstLineError.stack.split("\\n");\n var lastStackLines = lastLineError.stack.split("\\n");\n var firstIndex = -1;\n var lastIndex = -1;\n var firstFileName;\n var lastFileName;\n for (var i = 0; i < firstStackLines.length; ++i) {\n var result = parseLineInfo(firstStackLines[i]);\n if (result) {\n firstFileName = result.fileName;\n firstIndex = result.line;\n break;\n }\n }\n for (var i = 0; i < lastStackLines.length; ++i) {\n var result = parseLineInfo(lastStackLines[i]);\n if (result) {\n lastFileName = result.fileName;\n lastIndex = result.line;\n break;\n }\n }\n if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||\n firstFileName !== lastFileName || firstIndex >= lastIndex) {\n return;\n }\n\n shouldIgnore = function(line) {\n if (bluebirdFramePattern.test(line)) return true;\n var info = parseLineInfo(line);\n if (info) {\n if (info.fileName === firstFileName &&\n (firstIndex <= info.line && info.line <= lastIndex)) {\n return true;\n }\n }\n return false;\n };\n};\n\nvar captureStackTrace = (function stackDetection() {\n var v8stackFramePattern = /^\\s*at\\s*/;\n var v8stackFormatter = function(stack, error) {\n if (typeof stack === "string") return stack;\n\n if (error.name !== undefined &&\n error.message !== undefined) {\n return error.toString();\n }\n return formatNonError(error);\n };\n\n if (typeof Error.stackTraceLimit === "number" &&\n typeof Error.captureStackTrace === "function") {\n Error.stackTraceLimit = Error.stackTraceLimit + 6;\n stackFramePattern = v8stackFramePattern;\n formatStack = v8stackFormatter;\n var captureStackTrace = Error.captureStackTrace;\n\n shouldIgnore = function(line) {\n return bluebirdFramePattern.test(line);\n };\n return function(receiver, ignoreUntil) {\n Error.stackTraceLimit = Error.stackTraceLimit + 6;\n captureStackTrace(receiver, ignoreUntil);\n Error.stackTraceLimit = Error.stackTraceLimit - 6;\n };\n }\n var err = new Error();\n\n if (typeof err.stack === "string" &&\n err.stack.split("\\n")[0].indexOf("stackDetection@") >= 0) {\n stackFramePattern = /@/;\n formatStack = v8stackFormatter;\n indentStackFrames = true;\n return function captureStackTrace(o) {\n o.stack = new Error().stack;\n };\n }\n\n var hasStackAfterThrow;\n try { throw new Error(); }\n catch(e) {\n hasStackAfterThrow = ("stack" in e);\n }\n if (!("stack" in err) && hasStackAfterThrow &&\n typeof Error.stackTraceLimit === "number") {\n stackFramePattern = v8stackFramePattern;\n formatStack = v8stackFormatter;\n return function captureStackTrace(o) {\n Error.stackTraceLimit = Error.stackTraceLimit + 6;\n try { throw new Error(); }\n catch(e) { o.stack = e.stack; }\n Error.stackTraceLimit = Error.stackTraceLimit - 6;\n };\n }\n\n formatStack = function(stack, error) {\n if (typeof stack === "string") return stack;\n\n if ((typeof error === "object" ||\n typeof error === "function") &&\n error.name !== undefined &&\n error.message !== undefined) {\n return error.toString();\n }\n return formatNonError(error);\n };\n\n return null;\n\n})([]);\n\nvar fireDomEvent;\nvar fireGlobalEvent = (function() {\n if (util.isNode) {\n return function(name, reason, promise) {\n if (name === "rejectionHandled") {\n return process.emit(name, promise);\n } else {\n return process.emit(name, reason, promise);\n }\n };\n } else {\n var customEventWorks = false;\n var anyEventWorks = true;\n try {\n var ev = new self.CustomEvent("test");\n customEventWorks = ev instanceof CustomEvent;\n } catch (e) {}\n if (!customEventWorks) {\n try {\n var event = document.createEvent("CustomEvent");\n event.initCustomEvent("testingtheevent", false, true, {});\n self.dispatchEvent(event);\n } catch (e) {\n anyEventWorks = false;\n }\n }\n if (anyEventWorks) {\n fireDomEvent = function(type, detail) {\n var event;\n if (customEventWorks) {\n event = new self.CustomEvent(type, {\n detail: detail,\n bubbles: false,\n cancelable: true\n });\n } else if (self.dispatchEvent) {\n event = document.createEvent("CustomEvent");\n event.initCustomEvent(type, false, true, detail);\n }\n\n return event ? !self.dispatchEvent(event) : false;\n };\n }\n\n var toWindowMethodNameMap = {};\n toWindowMethodNameMap["unhandledRejection"] = ("on" +\n "unhandledRejection").toLowerCase();\n toWindowMethodNameMap["rejectionHandled"] = ("on" +\n "rejectionHandled").toLowerCase();\n\n return function(name, reason, promise) {\n var methodName = toWindowMethodNameMap[name];\n var method = self[methodName];\n if (!method) return false;\n if (name === "rejectionHandled") {\n method.call(self, promise);\n } else {\n method.call(self, reason, promise);\n }\n return true;\n };\n }\n})();\n\nif (typeof console !== "undefined" && typeof console.warn !== "undefined") {\n warn = function (message) {\n console.warn(message);\n };\n if (util.isNode && process.stderr.isTTY) {\n warn = function(message) {\n process.stderr.write("\\u001b[31m" + message + "\\u001b[39m\\n");\n };\n } else if (!util.isNode && typeof (new Error().stack) === "string") {\n warn = function(message) {\n console.warn("%c" + message, "color: red");\n };\n }\n}\n\nreturn CapturedTrace;\n};\n\n},{"./async.js":2,"./util.js":38}],8:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(NEXT_FILTER) {\nvar util = _dereq_("./util.js");\nvar errors = _dereq_("./errors.js");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar keys = _dereq_("./es5.js").keys;\nvar TypeError = errors.TypeError;\n\nfunction CatchFilter(instances, callback, promise) {\n this._instances = instances;\n this._callback = callback;\n this._promise = promise;\n}\n\nfunction safePredicate(predicate, e) {\n var safeObject = {};\n var retfilter = tryCatch(predicate).call(safeObject, e);\n\n if (retfilter === errorObj) return retfilter;\n\n var safeKeys = keys(safeObject);\n if (safeKeys.length) {\n errorObj.e = new TypeError("Catch filter must inherit from Error or be a simple predicate function\\u000a\\u000a See http://goo.gl/o84o68\\u000a");\n return errorObj;\n }\n return retfilter;\n}\n\nCatchFilter.prototype.doFilter = function (e) {\n var cb = this._callback;\n var promise = this._promise;\n var boundTo = promise._boundValue();\n for (var i = 0, len = this._instances.length; i < len; ++i) {\n var item = this._instances[i];\n var itemIsErrorType = item === Error ||\n (item != null && item.prototype instanceof Error);\n\n if (itemIsErrorType && e instanceof item) {\n var ret = tryCatch(cb).call(boundTo, e);\n if (ret === errorObj) {\n NEXT_FILTER.e = ret.e;\n return NEXT_FILTER;\n }\n return ret;\n } else if (typeof item === "function" && !itemIsErrorType) {\n var shouldHandle = safePredicate(item, e);\n if (shouldHandle === errorObj) {\n e = errorObj.e;\n break;\n } else if (shouldHandle) {\n var ret = tryCatch(cb).call(boundTo, e);\n if (ret === errorObj) {\n NEXT_FILTER.e = ret.e;\n return NEXT_FILTER;\n }\n return ret;\n }\n }\n }\n NEXT_FILTER.e = e;\n return NEXT_FILTER;\n};\n\nreturn CatchFilter;\n};\n\n},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, CapturedTrace, isDebugging) {\nvar contextStack = [];\nfunction Context() {\n this._trace = new CapturedTrace(peekContext());\n}\nContext.prototype._pushContext = function () {\n if (!isDebugging()) return;\n if (this._trace !== undefined) {\n contextStack.push(this._trace);\n }\n};\n\nContext.prototype._popContext = function () {\n if (!isDebugging()) return;\n if (this._trace !== undefined) {\n contextStack.pop();\n }\n};\n\nfunction createContext() {\n if (isDebugging()) return new Context();\n}\n\nfunction peekContext() {\n var lastIndex = contextStack.length - 1;\n if (lastIndex >= 0) {\n return contextStack[lastIndex];\n }\n return undefined;\n}\n\nPromise.prototype._peekContext = peekContext;\nPromise.prototype._pushContext = Context.prototype._pushContext;\nPromise.prototype._popContext = Context.prototype._popContext;\n\nreturn createContext;\n};\n\n},{}],10:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, CapturedTrace) {\nvar getDomain = Promise._getDomain;\nvar async = _dereq_("./async.js");\nvar Warning = _dereq_("./errors.js").Warning;\nvar util = _dereq_("./util.js");\nvar canAttachTrace = util.canAttachTrace;\nvar unhandledRejectionHandled;\nvar possiblyUnhandledRejection;\nvar debugging = false || (util.isNode &&\n (!!process.env["BLUEBIRD_DEBUG"] ||\n process.env["NODE_ENV"] === "development"));\n\nif (util.isNode && process.env["BLUEBIRD_DEBUG"] == 0) debugging = false;\n\nif (debugging) {\n async.disableTrampolineIfNecessary();\n}\n\nPromise.prototype._ignoreRejections = function() {\n this._unsetRejectionIsUnhandled();\n this._bitField = this._bitField | 16777216;\n};\n\nPromise.prototype._ensurePossibleRejectionHandled = function () {\n if ((this._bitField & 16777216) !== 0) return;\n this._setRejectionIsUnhandled();\n async.invokeLater(this._notifyUnhandledRejection, this, undefined);\n};\n\nPromise.prototype._notifyUnhandledRejectionIsHandled = function () {\n CapturedTrace.fireRejectionEvent("rejectionHandled",\n unhandledRejectionHandled, undefined, this);\n};\n\nPromise.prototype._notifyUnhandledRejection = function () {\n if (this._isRejectionUnhandled()) {\n var reason = this._getCarriedStackTrace() || this._settledValue;\n this._setUnhandledRejectionIsNotified();\n CapturedTrace.fireRejectionEvent("unhandledRejection",\n possiblyUnhandledRejection, reason, this);\n }\n};\n\nPromise.prototype._setUnhandledRejectionIsNotified = function () {\n this._bitField = this._bitField | 524288;\n};\n\nPromise.prototype._unsetUnhandledRejectionIsNotified = function () {\n this._bitField = this._bitField & (~524288);\n};\n\nPromise.prototype._isUnhandledRejectionNotified = function () {\n return (this._bitField & 524288) > 0;\n};\n\nPromise.prototype._setRejectionIsUnhandled = function () {\n this._bitField = this._bitField | 2097152;\n};\n\nPromise.prototype._unsetRejectionIsUnhandled = function () {\n this._bitField = this._bitField & (~2097152);\n if (this._isUnhandledRejectionNotified()) {\n this._unsetUnhandledRejectionIsNotified();\n this._notifyUnhandledRejectionIsHandled();\n }\n};\n\nPromise.prototype._isRejectionUnhandled = function () {\n return (this._bitField & 2097152) > 0;\n};\n\nPromise.prototype._setCarriedStackTrace = function (capturedTrace) {\n this._bitField = this._bitField | 1048576;\n this._fulfillmentHandler0 = capturedTrace;\n};\n\nPromise.prototype._isCarryingStackTrace = function () {\n return (this._bitField & 1048576) > 0;\n};\n\nPromise.prototype._getCarriedStackTrace = function () {\n return this._isCarryingStackTrace()\n ? this._fulfillmentHandler0\n : undefined;\n};\n\nPromise.prototype._captureStackTrace = function () {\n if (debugging) {\n this._trace = new CapturedTrace(this._peekContext());\n }\n return this;\n};\n\nPromise.prototype._attachExtraTrace = function (error, ignoreSelf) {\n if (debugging && canAttachTrace(error)) {\n var trace = this._trace;\n if (trace !== undefined) {\n if (ignoreSelf) trace = trace._parent;\n }\n if (trace !== undefined) {\n trace.attachExtraTrace(error);\n } else if (!error.__stackCleaned__) {\n var parsed = CapturedTrace.parseStackAndMessage(error);\n util.notEnumerableProp(error, "stack",\n parsed.message + "\\n" + parsed.stack.join("\\n"));\n util.notEnumerableProp(error, "__stackCleaned__", true);\n }\n }\n};\n\nPromise.prototype._warn = function(message) {\n var warning = new Warning(message);\n var ctx = this._peekContext();\n if (ctx) {\n ctx.attachExtraTrace(warning);\n } else {\n var parsed = CapturedTrace.parseStackAndMessage(warning);\n warning.stack = parsed.message + "\\n" + parsed.stack.join("\\n");\n }\n CapturedTrace.formatAndLogError(warning, "");\n};\n\nPromise.onPossiblyUnhandledRejection = function (fn) {\n var domain = getDomain();\n possiblyUnhandledRejection =\n typeof fn === "function" ? (domain === null ? fn : domain.bind(fn))\n : undefined;\n};\n\nPromise.onUnhandledRejectionHandled = function (fn) {\n var domain = getDomain();\n unhandledRejectionHandled =\n typeof fn === "function" ? (domain === null ? fn : domain.bind(fn))\n : undefined;\n};\n\nPromise.longStackTraces = function () {\n if (async.haveItemsQueued() &&\n debugging === false\n ) {\n throw new Error("cannot enable long stack traces after promises have been created\\u000a\\u000a See http://goo.gl/DT1qyG\\u000a");\n }\n debugging = CapturedTrace.isSupported();\n if (debugging) {\n async.disableTrampolineIfNecessary();\n }\n};\n\nPromise.hasLongStackTraces = function () {\n return debugging && CapturedTrace.isSupported();\n};\n\nif (!CapturedTrace.isSupported()) {\n Promise.longStackTraces = function(){};\n debugging = false;\n}\n\nreturn function() {\n return debugging;\n};\n};\n\n},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(_dereq_,module,exports){\n"use strict";\nvar util = _dereq_("./util.js");\nvar isPrimitive = util.isPrimitive;\n\nmodule.exports = function(Promise) {\nvar returner = function () {\n return this;\n};\nvar thrower = function () {\n throw this;\n};\nvar returnUndefined = function() {};\nvar throwUndefined = function() {\n throw undefined;\n};\n\nvar wrapper = function (value, action) {\n if (action === 1) {\n return function () {\n throw value;\n };\n } else if (action === 2) {\n return function () {\n return value;\n };\n }\n};\n\n\nPromise.prototype["return"] =\nPromise.prototype.thenReturn = function (value) {\n if (value === undefined) return this.then(returnUndefined);\n\n if (isPrimitive(value)) {\n return this._then(\n wrapper(value, 2),\n undefined,\n undefined,\n undefined,\n undefined\n );\n } else if (value instanceof Promise) {\n value._ignoreRejections();\n }\n return this._then(returner, undefined, undefined, value, undefined);\n};\n\nPromise.prototype["throw"] =\nPromise.prototype.thenThrow = function (reason) {\n if (reason === undefined) return this.then(throwUndefined);\n\n if (isPrimitive(reason)) {\n return this._then(\n wrapper(reason, 1),\n undefined,\n undefined,\n undefined,\n undefined\n );\n }\n return this._then(thrower, undefined, undefined, reason, undefined);\n};\n};\n\n},{"./util.js":38}],12:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, INTERNAL) {\nvar PromiseReduce = Promise.reduce;\n\nPromise.prototype.each = function (fn) {\n return PromiseReduce(this, fn, null, INTERNAL);\n};\n\nPromise.each = function (promises, fn) {\n return PromiseReduce(promises, fn, null, INTERNAL);\n};\n};\n\n},{}],13:[function(_dereq_,module,exports){\n"use strict";\nvar es5 = _dereq_("./es5.js");\nvar Objectfreeze = es5.freeze;\nvar util = _dereq_("./util.js");\nvar inherits = util.inherits;\nvar notEnumerableProp = util.notEnumerableProp;\n\nfunction subError(nameProperty, defaultMessage) {\n function SubError(message) {\n if (!(this instanceof SubError)) return new SubError(message);\n notEnumerableProp(this, "message",\n typeof message === "string" ? message : defaultMessage);\n notEnumerableProp(this, "name", nameProperty);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n Error.call(this);\n }\n }\n inherits(SubError, Error);\n return SubError;\n}\n\nvar _TypeError, _RangeError;\nvar Warning = subError("Warning", "warning");\nvar CancellationError = subError("CancellationError", "cancellation error");\nvar TimeoutError = subError("TimeoutError", "timeout error");\nvar AggregateError = subError("AggregateError", "aggregate error");\ntry {\n _TypeError = TypeError;\n _RangeError = RangeError;\n} catch(e) {\n _TypeError = subError("TypeError", "type error");\n _RangeError = subError("RangeError", "range error");\n}\n\nvar methods = ("join pop push shift unshift slice filter forEach some " +\n "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");\n\nfor (var i = 0; i < methods.length; ++i) {\n if (typeof Array.prototype[methods[i]] === "function") {\n AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];\n }\n}\n\nes5.defineProperty(AggregateError.prototype, "length", {\n value: 0,\n configurable: false,\n writable: true,\n enumerable: true\n});\nAggregateError.prototype["isOperational"] = true;\nvar level = 0;\nAggregateError.prototype.toString = function() {\n var indent = Array(level * 4 + 1).join(" ");\n var ret = "\\n" + indent + "AggregateError of:" + "\\n";\n level++;\n indent = Array(level * 4 + 1).join(" ");\n for (var i = 0; i < this.length; ++i) {\n var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";\n var lines = str.split("\\n");\n for (var j = 0; j < lines.length; ++j) {\n lines[j] = indent + lines[j];\n }\n str = lines.join("\\n");\n ret += str + "\\n";\n }\n level--;\n return ret;\n};\n\nfunction OperationalError(message) {\n if (!(this instanceof OperationalError))\n return new OperationalError(message);\n notEnumerableProp(this, "name", "OperationalError");\n notEnumerableProp(this, "message", message);\n this.cause = message;\n this["isOperational"] = true;\n\n if (message instanceof Error) {\n notEnumerableProp(this, "message", message.message);\n notEnumerableProp(this, "stack", message.stack);\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n}\ninherits(OperationalError, Error);\n\nvar errorTypes = Error["__BluebirdErrorTypes__"];\nif (!errorTypes) {\n errorTypes = Objectfreeze({\n CancellationError: CancellationError,\n TimeoutError: TimeoutError,\n OperationalError: OperationalError,\n RejectionError: OperationalError,\n AggregateError: AggregateError\n });\n notEnumerableProp(Error, "__BluebirdErrorTypes__", errorTypes);\n}\n\nmodule.exports = {\n Error: Error,\n TypeError: _TypeError,\n RangeError: _RangeError,\n CancellationError: errorTypes.CancellationError,\n OperationalError: errorTypes.OperationalError,\n TimeoutError: errorTypes.TimeoutError,\n AggregateError: errorTypes.AggregateError,\n Warning: Warning\n};\n\n},{"./es5.js":14,"./util.js":38}],14:[function(_dereq_,module,exports){\nvar isES5 = (function(){\n "use strict";\n return this === undefined;\n})();\n\nif (isES5) {\n module.exports = {\n freeze: Object.freeze,\n defineProperty: Object.defineProperty,\n getDescriptor: Object.getOwnPropertyDescriptor,\n keys: Object.keys,\n names: Object.getOwnPropertyNames,\n getPrototypeOf: Object.getPrototypeOf,\n isArray: Array.isArray,\n isES5: isES5,\n propertyIsWritable: function(obj, prop) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n return !!(!descriptor || descriptor.writable || descriptor.set);\n }\n };\n} else {\n var has = {}.hasOwnProperty;\n var str = {}.toString;\n var proto = {}.constructor.prototype;\n\n var ObjectKeys = function (o) {\n var ret = [];\n for (var key in o) {\n if (has.call(o, key)) {\n ret.push(key);\n }\n }\n return ret;\n };\n\n var ObjectGetDescriptor = function(o, key) {\n return {value: o[key]};\n };\n\n var ObjectDefineProperty = function (o, key, desc) {\n o[key] = desc.value;\n return o;\n };\n\n var ObjectFreeze = function (obj) {\n return obj;\n };\n\n var ObjectGetPrototypeOf = function (obj) {\n try {\n return Object(obj).constructor.prototype;\n }\n catch (e) {\n return proto;\n }\n };\n\n var ArrayIsArray = function (obj) {\n try {\n return str.call(obj) === "[object Array]";\n }\n catch(e) {\n return false;\n }\n };\n\n module.exports = {\n isArray: ArrayIsArray,\n keys: ObjectKeys,\n names: ObjectKeys,\n defineProperty: ObjectDefineProperty,\n getDescriptor: ObjectGetDescriptor,\n freeze: ObjectFreeze,\n getPrototypeOf: ObjectGetPrototypeOf,\n isES5: isES5,\n propertyIsWritable: function() {\n return true;\n }\n };\n}\n\n},{}],15:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, INTERNAL) {\nvar PromiseMap = Promise.map;\n\nPromise.prototype.filter = function (fn, options) {\n return PromiseMap(this, fn, options, INTERNAL);\n};\n\nPromise.filter = function (promises, fn, options) {\n return PromiseMap(promises, fn, options, INTERNAL);\n};\n};\n\n},{}],16:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) {\nvar util = _dereq_("./util.js");\nvar isPrimitive = util.isPrimitive;\nvar thrower = util.thrower;\n\nfunction returnThis() {\n return this;\n}\nfunction throwThis() {\n throw this;\n}\nfunction return$(r) {\n return function() {\n return r;\n };\n}\nfunction throw$(r) {\n return function() {\n throw r;\n };\n}\nfunction promisedFinally(ret, reasonOrValue, isFulfilled) {\n var then;\n if (isPrimitive(reasonOrValue)) {\n then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);\n } else {\n then = isFulfilled ? returnThis : throwThis;\n }\n return ret._then(then, thrower, undefined, reasonOrValue, undefined);\n}\n\nfunction finallyHandler(reasonOrValue) {\n var promise = this.promise;\n var handler = this.handler;\n\n var ret = promise._isBound()\n ? handler.call(promise._boundValue())\n : handler();\n\n if (ret !== undefined) {\n var maybePromise = tryConvertToPromise(ret, promise);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n return promisedFinally(maybePromise, reasonOrValue,\n promise.isFulfilled());\n }\n }\n\n if (promise.isRejected()) {\n NEXT_FILTER.e = reasonOrValue;\n return NEXT_FILTER;\n } else {\n return reasonOrValue;\n }\n}\n\nfunction tapHandler(value) {\n var promise = this.promise;\n var handler = this.handler;\n\n var ret = promise._isBound()\n ? handler.call(promise._boundValue(), value)\n : handler(value);\n\n if (ret !== undefined) {\n var maybePromise = tryConvertToPromise(ret, promise);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n return promisedFinally(maybePromise, value, true);\n }\n }\n return value;\n}\n\nPromise.prototype._passThroughHandler = function (handler, isFinally) {\n if (typeof handler !== "function") return this.then();\n\n var promiseAndHandler = {\n promise: this,\n handler: handler\n };\n\n return this._then(\n isFinally ? finallyHandler : tapHandler,\n isFinally ? finallyHandler : undefined, undefined,\n promiseAndHandler, undefined);\n};\n\nPromise.prototype.lastly =\nPromise.prototype["finally"] = function (handler) {\n return this._passThroughHandler(handler, true);\n};\n\nPromise.prototype.tap = function (handler) {\n return this._passThroughHandler(handler, false);\n};\n};\n\n},{"./util.js":38}],17:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise,\n apiRejection,\n INTERNAL,\n tryConvertToPromise) {\nvar errors = _dereq_("./errors.js");\nvar TypeError = errors.TypeError;\nvar util = _dereq_("./util.js");\nvar errorObj = util.errorObj;\nvar tryCatch = util.tryCatch;\nvar yieldHandlers = [];\n\nfunction promiseFromYieldHandler(value, yieldHandlers, traceParent) {\n for (var i = 0; i < yieldHandlers.length; ++i) {\n traceParent._pushContext();\n var result = tryCatch(yieldHandlers[i])(value);\n traceParent._popContext();\n if (result === errorObj) {\n traceParent._pushContext();\n var ret = Promise.reject(errorObj.e);\n traceParent._popContext();\n return ret;\n }\n var maybePromise = tryConvertToPromise(result, traceParent);\n if (maybePromise instanceof Promise) return maybePromise;\n }\n return null;\n}\n\nfunction PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {\n var promise = this._promise = new Promise(INTERNAL);\n promise._captureStackTrace();\n this._stack = stack;\n this._generatorFunction = generatorFunction;\n this._receiver = receiver;\n this._generator = undefined;\n this._yieldHandlers = typeof yieldHandler === "function"\n ? [yieldHandler].concat(yieldHandlers)\n : yieldHandlers;\n}\n\nPromiseSpawn.prototype.promise = function () {\n return this._promise;\n};\n\nPromiseSpawn.prototype._run = function () {\n this._generator = this._generatorFunction.call(this._receiver);\n this._receiver =\n this._generatorFunction = undefined;\n this._next(undefined);\n};\n\nPromiseSpawn.prototype._continue = function (result) {\n if (result === errorObj) {\n return this._promise._rejectCallback(result.e, false, true);\n }\n\n var value = result.value;\n if (result.done === true) {\n this._promise._resolveCallback(value);\n } else {\n var maybePromise = tryConvertToPromise(value, this._promise);\n if (!(maybePromise instanceof Promise)) {\n maybePromise =\n promiseFromYieldHandler(maybePromise,\n this._yieldHandlers,\n this._promise);\n if (maybePromise === null) {\n this._throw(\n new TypeError(\n "A value %s was yielded that could not be treated as a promise\\u000a\\u000a See http://goo.gl/4Y4pDk\\u000a\\u000a".replace("%s", value) +\n "From coroutine:\\u000a" +\n this._stack.split("\\n").slice(1, -7).join("\\n")\n )\n );\n return;\n }\n }\n maybePromise._then(\n this._next,\n this._throw,\n undefined,\n this,\n null\n );\n }\n};\n\nPromiseSpawn.prototype._throw = function (reason) {\n this._promise._attachExtraTrace(reason);\n this._promise._pushContext();\n var result = tryCatch(this._generator["throw"])\n .call(this._generator, reason);\n this._promise._popContext();\n this._continue(result);\n};\n\nPromiseSpawn.prototype._next = function (value) {\n this._promise._pushContext();\n var result = tryCatch(this._generator.next).call(this._generator, value);\n this._promise._popContext();\n this._continue(result);\n};\n\nPromise.coroutine = function (generatorFunction, options) {\n if (typeof generatorFunction !== "function") {\n throw new TypeError("generatorFunction must be a function\\u000a\\u000a See http://goo.gl/6Vqhm0\\u000a");\n }\n var yieldHandler = Object(options).yieldHandler;\n var PromiseSpawn$ = PromiseSpawn;\n var stack = new Error().stack;\n return function () {\n var generator = generatorFunction.apply(this, arguments);\n var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,\n stack);\n spawn._generator = generator;\n spawn._next(undefined);\n return spawn.promise();\n };\n};\n\nPromise.coroutine.addYieldHandler = function(fn) {\n if (typeof fn !== "function") throw new TypeError("fn must be a function\\u000a\\u000a See http://goo.gl/916lJJ\\u000a");\n yieldHandlers.push(fn);\n};\n\nPromise.spawn = function (generatorFunction) {\n if (typeof generatorFunction !== "function") {\n return apiRejection("generatorFunction must be a function\\u000a\\u000a See http://goo.gl/6Vqhm0\\u000a");\n }\n var spawn = new PromiseSpawn(generatorFunction, this);\n var ret = spawn.promise();\n spawn._run(Promise.spawn);\n return ret;\n};\n};\n\n},{"./errors.js":13,"./util.js":38}],18:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports =\nfunction(Promise, PromiseArray, tryConvertToPromise, INTERNAL) {\nvar util = _dereq_("./util.js");\nvar canEvaluate = util.canEvaluate;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar reject;\n\nif (false) {\nif (canEvaluate) {\n var thenCallback = function(i) {\n return new Function("value", "holder", " \\n\\\n \'use strict\'; \\n\\\n holder.pIndex = value; \\n\\\n holder.checkFulfillment(this); \\n\\\n ".replace(/Index/g, i));\n };\n\n var caller = function(count) {\n var values = [];\n for (var i = 1; i <= count; ++i) values.push("holder.p" + i);\n return new Function("holder", " \\n\\\n \'use strict\'; \\n\\\n var callback = holder.fn; \\n\\\n return callback(values); \\n\\\n ".replace(/values/g, values.join(", ")));\n };\n var thenCallbacks = [];\n var callers = [undefined];\n for (var i = 1; i <= 5; ++i) {\n thenCallbacks.push(thenCallback(i));\n callers.push(caller(i));\n }\n\n var Holder = function(total, fn) {\n this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null;\n this.fn = fn;\n this.total = total;\n this.now = 0;\n };\n\n Holder.prototype.callers = callers;\n Holder.prototype.checkFulfillment = function(promise) {\n var now = this.now;\n now++;\n var total = this.total;\n if (now >= total) {\n var handler = this.callers[total];\n promise._pushContext();\n var ret = tryCatch(handler)(this);\n promise._popContext();\n if (ret === errorObj) {\n promise._rejectCallback(ret.e, false, true);\n } else {\n promise._resolveCallback(ret);\n }\n } else {\n this.now = now;\n }\n };\n\n var reject = function (reason) {\n this._reject(reason);\n };\n}\n}\n\nPromise.join = function () {\n var last = arguments.length - 1;\n var fn;\n if (last > 0 && typeof arguments[last] === "function") {\n fn = arguments[last];\n if (false) {\n if (last < 6 && canEvaluate) {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n var holder = new Holder(last, fn);\n var callbacks = thenCallbacks;\n for (var i = 0; i < last; ++i) {\n var maybePromise = tryConvertToPromise(arguments[i], ret);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n if (maybePromise._isPending()) {\n maybePromise._then(callbacks[i], reject,\n undefined, ret, holder);\n } else if (maybePromise._isFulfilled()) {\n callbacks[i].call(ret,\n maybePromise._value(), holder);\n } else {\n ret._reject(maybePromise._reason());\n }\n } else {\n callbacks[i].call(ret, maybePromise, holder);\n }\n }\n return ret;\n }\n }\n }\n var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}\n if (fn) args.pop();\n var ret = new PromiseArray(args).promise();\n return fn !== undefined ? ret.spread(fn) : ret;\n};\n\n};\n\n},{"./util.js":38}],19:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise,\n PromiseArray,\n apiRejection,\n tryConvertToPromise,\n INTERNAL) {\nvar getDomain = Promise._getDomain;\nvar async = _dereq_("./async.js");\nvar util = _dereq_("./util.js");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar PENDING = {};\nvar EMPTY_ARRAY = [];\n\nfunction MappingPromiseArray(promises, fn, limit, _filter) {\n this.constructor$(promises);\n this._promise._captureStackTrace();\n var domain = getDomain();\n this._callback = domain === null ? fn : domain.bind(fn);\n this._preservedValues = _filter === INTERNAL\n ? new Array(this.length())\n : null;\n this._limit = limit;\n this._inFlight = 0;\n this._queue = limit >= 1 ? [] : EMPTY_ARRAY;\n async.invoke(init, this, undefined);\n}\nutil.inherits(MappingPromiseArray, PromiseArray);\nfunction init() {this._init$(undefined, -2);}\n\nMappingPromiseArray.prototype._init = function () {};\n\nMappingPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var values = this._values;\n var length = this.length();\n var preservedValues = this._preservedValues;\n var limit = this._limit;\n if (values[index] === PENDING) {\n values[index] = value;\n if (limit >= 1) {\n this._inFlight--;\n this._drainQueue();\n if (this._isResolved()) return;\n }\n } else {\n if (limit >= 1 && this._inFlight >= limit) {\n values[index] = value;\n this._queue.push(index);\n return;\n }\n if (preservedValues !== null) preservedValues[index] = value;\n\n var callback = this._callback;\n var receiver = this._promise._boundValue();\n this._promise._pushContext();\n var ret = tryCatch(callback).call(receiver, value, index, length);\n this._promise._popContext();\n if (ret === errorObj) return this._reject(ret.e);\n\n var maybePromise = tryConvertToPromise(ret, this._promise);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n if (maybePromise._isPending()) {\n if (limit >= 1) this._inFlight++;\n values[index] = PENDING;\n return maybePromise._proxyPromiseArray(this, index);\n } else if (maybePromise._isFulfilled()) {\n ret = maybePromise._value();\n } else {\n return this._reject(maybePromise._reason());\n }\n }\n values[index] = ret;\n }\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= length) {\n if (preservedValues !== null) {\n this._filter(values, preservedValues);\n } else {\n this._resolve(values);\n }\n\n }\n};\n\nMappingPromiseArray.prototype._drainQueue = function () {\n var queue = this._queue;\n var limit = this._limit;\n var values = this._values;\n while (queue.length > 0 && this._inFlight < limit) {\n if (this._isResolved()) return;\n var index = queue.pop();\n this._promiseFulfilled(values[index], index);\n }\n};\n\nMappingPromiseArray.prototype._filter = function (booleans, values) {\n var len = values.length;\n var ret = new Array(len);\n var j = 0;\n for (var i = 0; i < len; ++i) {\n if (booleans[i]) ret[j++] = values[i];\n }\n ret.length = j;\n this._resolve(ret);\n};\n\nMappingPromiseArray.prototype.preservedValues = function () {\n return this._preservedValues;\n};\n\nfunction map(promises, fn, options, _filter) {\n var limit = typeof options === "object" && options !== null\n ? options.concurrency\n : 0;\n limit = typeof limit === "number" &&\n isFinite(limit) && limit >= 1 ? limit : 0;\n return new MappingPromiseArray(promises, fn, limit, _filter);\n}\n\nPromise.prototype.map = function (fn, options) {\n if (typeof fn !== "function") return apiRejection("fn must be a function\\u000a\\u000a See http://goo.gl/916lJJ\\u000a");\n\n return map(this, fn, options, null).promise();\n};\n\nPromise.map = function (promises, fn, options, _filter) {\n if (typeof fn !== "function") return apiRejection("fn must be a function\\u000a\\u000a See http://goo.gl/916lJJ\\u000a");\n return map(promises, fn, options, _filter).promise();\n};\n\n\n};\n\n},{"./async.js":2,"./util.js":38}],20:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports =\nfunction(Promise, INTERNAL, tryConvertToPromise, apiRejection) {\nvar util = _dereq_("./util.js");\nvar tryCatch = util.tryCatch;\n\nPromise.method = function (fn) {\n if (typeof fn !== "function") {\n throw new Promise.TypeError("fn must be a function\\u000a\\u000a See http://goo.gl/916lJJ\\u000a");\n }\n return function () {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._pushContext();\n var value = tryCatch(fn).apply(this, arguments);\n ret._popContext();\n ret._resolveFromSyncValue(value);\n return ret;\n };\n};\n\nPromise.attempt = Promise["try"] = function (fn, args, ctx) {\n if (typeof fn !== "function") {\n return apiRejection("fn must be a function\\u000a\\u000a See http://goo.gl/916lJJ\\u000a");\n }\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._pushContext();\n var value = util.isArray(args)\n ? tryCatch(fn).apply(ctx, args)\n : tryCatch(fn).call(ctx, args);\n ret._popContext();\n ret._resolveFromSyncValue(value);\n return ret;\n};\n\nPromise.prototype._resolveFromSyncValue = function (value) {\n if (value === util.errorObj) {\n this._rejectCallback(value.e, false, true);\n } else {\n this._resolveCallback(value, true);\n }\n};\n};\n\n},{"./util.js":38}],21:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise) {\nvar util = _dereq_("./util.js");\nvar async = _dereq_("./async.js");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\n\nfunction spreadAdapter(val, nodeback) {\n var promise = this;\n if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);\n var ret =\n tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\n\nfunction successAdapter(val, nodeback) {\n var promise = this;\n var receiver = promise._boundValue();\n var ret = val === undefined\n ? tryCatch(nodeback).call(receiver, null)\n : tryCatch(nodeback).call(receiver, null, val);\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\nfunction errorAdapter(reason, nodeback) {\n var promise = this;\n if (!reason) {\n var target = promise._target();\n var newReason = target._getCarriedStackTrace();\n newReason.cause = reason;\n reason = newReason;\n }\n var ret = tryCatch(nodeback).call(promise._boundValue(), reason);\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\n\nPromise.prototype.asCallback =\nPromise.prototype.nodeify = function (nodeback, options) {\n if (typeof nodeback == "function") {\n var adapter = successAdapter;\n if (options !== undefined && Object(options).spread) {\n adapter = spreadAdapter;\n }\n this._then(\n adapter,\n errorAdapter,\n undefined,\n this,\n nodeback\n );\n }\n return this;\n};\n};\n\n},{"./async.js":2,"./util.js":38}],22:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, PromiseArray) {\nvar util = _dereq_("./util.js");\nvar async = _dereq_("./async.js");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\n\nPromise.prototype.progressed = function (handler) {\n return this._then(undefined, undefined, handler, undefined, undefined);\n};\n\nPromise.prototype._progress = function (progressValue) {\n if (this._isFollowingOrFulfilledOrRejected()) return;\n this._target()._progressUnchecked(progressValue);\n\n};\n\nPromise.prototype._progressHandlerAt = function (index) {\n return index === 0\n ? this._progressHandler0\n : this[(index << 2) + index - 5 + 2];\n};\n\nPromise.prototype._doProgressWith = function (progression) {\n var progressValue = progression.value;\n var handler = progression.handler;\n var promise = progression.promise;\n var receiver = progression.receiver;\n\n var ret = tryCatch(handler).call(receiver, progressValue);\n if (ret === errorObj) {\n if (ret.e != null &&\n ret.e.name !== "StopProgressPropagation") {\n var trace = util.canAttachTrace(ret.e)\n ? ret.e : new Error(util.toString(ret.e));\n promise._attachExtraTrace(trace);\n promise._progress(ret.e);\n }\n } else if (ret instanceof Promise) {\n ret._then(promise._progress, null, null, promise, undefined);\n } else {\n promise._progress(ret);\n }\n};\n\n\nPromise.prototype._progressUnchecked = function (progressValue) {\n var len = this._length();\n var progress = this._progress;\n for (var i = 0; i < len; i++) {\n var handler = this._progressHandlerAt(i);\n var promise = this._promiseAt(i);\n if (!(promise instanceof Promise)) {\n var receiver = this._receiverAt(i);\n if (typeof handler === "function") {\n handler.call(receiver, progressValue, promise);\n } else if (receiver instanceof PromiseArray &&\n !receiver._isResolved()) {\n receiver._promiseProgressed(progressValue, promise);\n }\n continue;\n }\n\n if (typeof handler === "function") {\n async.invoke(this._doProgressWith, this, {\n handler: handler,\n promise: promise,\n receiver: this._receiverAt(i),\n value: progressValue\n });\n } else {\n async.invoke(progress, promise, progressValue);\n }\n }\n};\n};\n\n},{"./async.js":2,"./util.js":38}],23:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function() {\nvar makeSelfResolutionError = function () {\n return new TypeError("circular promise resolution chain\\u000a\\u000a See http://goo.gl/LhFpo0\\u000a");\n};\nvar reflect = function() {\n return new Promise.PromiseInspection(this._target());\n};\nvar apiRejection = function(msg) {\n return Promise.reject(new TypeError(msg));\n};\n\nvar util = _dereq_("./util.js");\n\nvar getDomain;\nif (util.isNode) {\n getDomain = function() {\n var ret = process.domain;\n if (ret === undefined) ret = null;\n return ret;\n };\n} else {\n getDomain = function() {\n return null;\n };\n}\nutil.notEnumerableProp(Promise, "_getDomain", getDomain);\n\nvar UNDEFINED_BINDING = {};\nvar async = _dereq_("./async.js");\nvar errors = _dereq_("./errors.js");\nvar TypeError = Promise.TypeError = errors.TypeError;\nPromise.RangeError = errors.RangeError;\nPromise.CancellationError = errors.CancellationError;\nPromise.TimeoutError = errors.TimeoutError;\nPromise.OperationalError = errors.OperationalError;\nPromise.RejectionError = errors.OperationalError;\nPromise.AggregateError = errors.AggregateError;\nvar INTERNAL = function(){};\nvar APPLY = {};\nvar NEXT_FILTER = {e: null};\nvar tryConvertToPromise = _dereq_("./thenables.js")(Promise, INTERNAL);\nvar PromiseArray =\n _dereq_("./promise_array.js")(Promise, INTERNAL,\n tryConvertToPromise, apiRejection);\nvar CapturedTrace = _dereq_("./captured_trace.js")();\nvar isDebugging = _dereq_("./debuggability.js")(Promise, CapturedTrace);\n /*jshint unused:false*/\nvar createContext =\n _dereq_("./context.js")(Promise, CapturedTrace, isDebugging);\nvar CatchFilter = _dereq_("./catch_filter.js")(NEXT_FILTER);\nvar PromiseResolver = _dereq_("./promise_resolver.js");\nvar nodebackForPromise = PromiseResolver._nodebackForPromise;\nvar errorObj = util.errorObj;\nvar tryCatch = util.tryCatch;\nfunction Promise(resolver) {\n if (typeof resolver !== "function") {\n throw new TypeError("the promise constructor requires a resolver function\\u000a\\u000a See http://goo.gl/EC22Yn\\u000a");\n }\n if (this.constructor !== Promise) {\n throw new TypeError("the promise constructor cannot be invoked directly\\u000a\\u000a See http://goo.gl/KsIlge\\u000a");\n }\n this._bitField = 0;\n this._fulfillmentHandler0 = undefined;\n this._rejectionHandler0 = undefined;\n this._progressHandler0 = undefined;\n this._promise0 = undefined;\n this._receiver0 = undefined;\n this._settledValue = undefined;\n if (resolver !== INTERNAL) this._resolveFromResolver(resolver);\n}\n\nPromise.prototype.toString = function () {\n return "[object Promise]";\n};\n\nPromise.prototype.caught = Promise.prototype["catch"] = function (fn) {\n var len = arguments.length;\n if (len > 1) {\n var catchInstances = new Array(len - 1),\n j = 0, i;\n for (i = 0; i < len - 1; ++i) {\n var item = arguments[i];\n if (typeof item === "function") {\n catchInstances[j++] = item;\n } else {\n return Promise.reject(\n new TypeError("Catch filter must inherit from Error or be a simple predicate function\\u000a\\u000a See http://goo.gl/o84o68\\u000a"));\n }\n }\n catchInstances.length = j;\n fn = arguments[i];\n var catchFilter = new CatchFilter(catchInstances, fn, this);\n return this._then(undefined, catchFilter.doFilter, undefined,\n catchFilter, undefined);\n }\n return this._then(undefined, fn, undefined, undefined, undefined);\n};\n\nPromise.prototype.reflect = function () {\n return this._then(reflect, reflect, undefined, this, undefined);\n};\n\nPromise.prototype.then = function (didFulfill, didReject, didProgress) {\n if (isDebugging() && arguments.length > 0 &&\n typeof didFulfill !== "function" &&\n typeof didReject !== "function") {\n var msg = ".then() only accepts functions but was passed: " +\n util.classString(didFulfill);\n if (arguments.length > 1) {\n msg += ", " + util.classString(didReject);\n }\n this._warn(msg);\n }\n return this._then(didFulfill, didReject, didProgress,\n undefined, undefined);\n};\n\nPromise.prototype.done = function (didFulfill, didReject, didProgress) {\n var promise = this._then(didFulfill, didReject, didProgress,\n undefined, undefined);\n promise._setIsFinal();\n};\n\nPromise.prototype.spread = function (didFulfill, didReject) {\n return this.all()._then(didFulfill, didReject, undefined, APPLY, undefined);\n};\n\nPromise.prototype.isCancellable = function () {\n return !this.isResolved() &&\n this._cancellable();\n};\n\nPromise.prototype.toJSON = function () {\n var ret = {\n isFulfilled: false,\n isRejected: false,\n fulfillmentValue: undefined,\n rejectionReason: undefined\n };\n if (this.isFulfilled()) {\n ret.fulfillmentValue = this.value();\n ret.isFulfilled = true;\n } else if (this.isRejected()) {\n ret.rejectionReason = this.reason();\n ret.isRejected = true;\n }\n return ret;\n};\n\nPromise.prototype.all = function () {\n return new PromiseArray(this).promise();\n};\n\nPromise.prototype.error = function (fn) {\n return this.caught(util.originatesFromRejection, fn);\n};\n\nPromise.is = function (val) {\n return val instanceof Promise;\n};\n\nPromise.fromNode = function(fn) {\n var ret = new Promise(INTERNAL);\n var result = tryCatch(fn)(nodebackForPromise(ret));\n if (result === errorObj) {\n ret._rejectCallback(result.e, true, true);\n }\n return ret;\n};\n\nPromise.all = function (promises) {\n return new PromiseArray(promises).promise();\n};\n\nPromise.defer = Promise.pending = function () {\n var promise = new Promise(INTERNAL);\n return new PromiseResolver(promise);\n};\n\nPromise.cast = function (obj) {\n var ret = tryConvertToPromise(obj);\n if (!(ret instanceof Promise)) {\n var val = ret;\n ret = new Promise(INTERNAL);\n ret._fulfillUnchecked(val);\n }\n return ret;\n};\n\nPromise.resolve = Promise.fulfilled = Promise.cast;\n\nPromise.reject = Promise.rejected = function (reason) {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._rejectCallback(reason, true);\n return ret;\n};\n\nPromise.setScheduler = function(fn) {\n if (typeof fn !== "function") throw new TypeError("fn must be a function\\u000a\\u000a See http://goo.gl/916lJJ\\u000a");\n var prev = async._schedule;\n async._schedule = fn;\n return prev;\n};\n\nPromise.prototype._then = function (\n didFulfill,\n didReject,\n didProgress,\n receiver,\n internalData\n) {\n var haveInternalData = internalData !== undefined;\n var ret = haveInternalData ? internalData : new Promise(INTERNAL);\n\n if (!haveInternalData) {\n ret._propagateFrom(this, 4 | 1);\n ret._captureStackTrace();\n }\n\n var target = this._target();\n if (target !== this) {\n if (receiver === undefined) receiver = this._boundTo;\n if (!haveInternalData) ret._setIsMigrated();\n }\n\n var callbackIndex = target._addCallbacks(didFulfill,\n didReject,\n didProgress,\n ret,\n receiver,\n getDomain());\n\n if (target._isResolved() && !target._isSettlePromisesQueued()) {\n async.invoke(\n target._settlePromiseAtPostResolution, target, callbackIndex);\n }\n\n return ret;\n};\n\nPromise.prototype._settlePromiseAtPostResolution = function (index) {\n if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled();\n this._settlePromiseAt(index);\n};\n\nPromise.prototype._length = function () {\n return this._bitField & 131071;\n};\n\nPromise.prototype._isFollowingOrFulfilledOrRejected = function () {\n return (this._bitField & 939524096) > 0;\n};\n\nPromise.prototype._isFollowing = function () {\n return (this._bitField & 536870912) === 536870912;\n};\n\nPromise.prototype._setLength = function (len) {\n this._bitField = (this._bitField & -131072) |\n (len & 131071);\n};\n\nPromise.prototype._setFulfilled = function () {\n this._bitField = this._bitField | 268435456;\n};\n\nPromise.prototype._setRejected = function () {\n this._bitField = this._bitField | 134217728;\n};\n\nPromise.prototype._setFollowing = function () {\n this._bitField = this._bitField | 536870912;\n};\n\nPromise.prototype._setIsFinal = function () {\n this._bitField = this._bitField | 33554432;\n};\n\nPromise.prototype._isFinal = function () {\n return (this._bitField & 33554432) > 0;\n};\n\nPromise.prototype._cancellable = function () {\n return (this._bitField & 67108864) > 0;\n};\n\nPromise.prototype._setCancellable = function () {\n this._bitField = this._bitField | 67108864;\n};\n\nPromise.prototype._unsetCancellable = function () {\n this._bitField = this._bitField & (~67108864);\n};\n\nPromise.prototype._setIsMigrated = function () {\n this._bitField = this._bitField | 4194304;\n};\n\nPromise.prototype._unsetIsMigrated = function () {\n this._bitField = this._bitField & (~4194304);\n};\n\nPromise.prototype._isMigrated = function () {\n return (this._bitField & 4194304) > 0;\n};\n\nPromise.prototype._receiverAt = function (index) {\n var ret = index === 0\n ? this._receiver0\n : this[\n index * 5 - 5 + 4];\n if (ret === UNDEFINED_BINDING) {\n return undefined;\n } else if (ret === undefined && this._isBound()) {\n return this._boundValue();\n }\n return ret;\n};\n\nPromise.prototype._promiseAt = function (index) {\n return index === 0\n ? this._promise0\n : this[index * 5 - 5 + 3];\n};\n\nPromise.prototype._fulfillmentHandlerAt = function (index) {\n return index === 0\n ? this._fulfillmentHandler0\n : this[index * 5 - 5 + 0];\n};\n\nPromise.prototype._rejectionHandlerAt = function (index) {\n return index === 0\n ? this._rejectionHandler0\n : this[index * 5 - 5 + 1];\n};\n\nPromise.prototype._boundValue = function() {\n var ret = this._boundTo;\n if (ret !== undefined) {\n if (ret instanceof Promise) {\n if (ret.isFulfilled()) {\n return ret.value();\n } else {\n return undefined;\n }\n }\n }\n return ret;\n};\n\nPromise.prototype._migrateCallbacks = function (follower, index) {\n var fulfill = follower._fulfillmentHandlerAt(index);\n var reject = follower._rejectionHandlerAt(index);\n var progress = follower._progressHandlerAt(index);\n var promise = follower._promiseAt(index);\n var receiver = follower._receiverAt(index);\n if (promise instanceof Promise) promise._setIsMigrated();\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\n this._addCallbacks(fulfill, reject, progress, promise, receiver, null);\n};\n\nPromise.prototype._addCallbacks = function (\n fulfill,\n reject,\n progress,\n promise,\n receiver,\n domain\n) {\n var index = this._length();\n\n if (index >= 131071 - 5) {\n index = 0;\n this._setLength(0);\n }\n\n if (index === 0) {\n this._promise0 = promise;\n if (receiver !== undefined) this._receiver0 = receiver;\n if (typeof fulfill === "function" && !this._isCarryingStackTrace()) {\n this._fulfillmentHandler0 =\n domain === null ? fulfill : domain.bind(fulfill);\n }\n if (typeof reject === "function") {\n this._rejectionHandler0 =\n domain === null ? reject : domain.bind(reject);\n }\n if (typeof progress === "function") {\n this._progressHandler0 =\n domain === null ? progress : domain.bind(progress);\n }\n } else {\n var base = index * 5 - 5;\n this[base + 3] = promise;\n this[base + 4] = receiver;\n if (typeof fulfill === "function") {\n this[base + 0] =\n domain === null ? fulfill : domain.bind(fulfill);\n }\n if (typeof reject === "function") {\n this[base + 1] =\n domain === null ? reject : domain.bind(reject);\n }\n if (typeof progress === "function") {\n this[base + 2] =\n domain === null ? progress : domain.bind(progress);\n }\n }\n this._setLength(index + 1);\n return index;\n};\n\nPromise.prototype._setProxyHandlers = function (receiver, promiseSlotValue) {\n var index = this._length();\n\n if (index >= 131071 - 5) {\n index = 0;\n this._setLength(0);\n }\n if (index === 0) {\n this._promise0 = promiseSlotValue;\n this._receiver0 = receiver;\n } else {\n var base = index * 5 - 5;\n this[base + 3] = promiseSlotValue;\n this[base + 4] = receiver;\n }\n this._setLength(index + 1);\n};\n\nPromise.prototype._proxyPromiseArray = function (promiseArray, index) {\n this._setProxyHandlers(promiseArray, index);\n};\n\nPromise.prototype._resolveCallback = function(value, shouldBind) {\n if (this._isFollowingOrFulfilledOrRejected()) return;\n if (value === this)\n return this._rejectCallback(makeSelfResolutionError(), false, true);\n var maybePromise = tryConvertToPromise(value, this);\n if (!(maybePromise instanceof Promise)) return this._fulfill(value);\n\n var propagationFlags = 1 | (shouldBind ? 4 : 0);\n this._propagateFrom(maybePromise, propagationFlags);\n var promise = maybePromise._target();\n if (promise._isPending()) {\n var len = this._length();\n for (var i = 0; i < len; ++i) {\n promise._migrateCallbacks(this, i);\n }\n this._setFollowing();\n this._setLength(0);\n this._setFollowee(promise);\n } else if (promise._isFulfilled()) {\n this._fulfillUnchecked(promise._value());\n } else {\n this._rejectUnchecked(promise._reason(),\n promise._getCarriedStackTrace());\n }\n};\n\nPromise.prototype._rejectCallback =\nfunction(reason, synchronous, shouldNotMarkOriginatingFromRejection) {\n if (!shouldNotMarkOriginatingFromRejection) {\n util.markAsOriginatingFromRejection(reason);\n }\n var trace = util.ensureErrorObject(reason);\n var hasStack = trace === reason;\n this._attachExtraTrace(trace, synchronous ? hasStack : false);\n this._reject(reason, hasStack ? undefined : trace);\n};\n\nPromise.prototype._resolveFromResolver = function (resolver) {\n var promise = this;\n this._captureStackTrace();\n this._pushContext();\n var synchronous = true;\n var r = tryCatch(resolver)(function(value) {\n if (promise === null) return;\n promise._resolveCallback(value);\n promise = null;\n }, function (reason) {\n if (promise === null) return;\n promise._rejectCallback(reason, synchronous);\n promise = null;\n });\n synchronous = false;\n this._popContext();\n\n if (r !== undefined && r === errorObj && promise !== null) {\n promise._rejectCallback(r.e, true, true);\n promise = null;\n }\n};\n\nPromise.prototype._settlePromiseFromHandler = function (\n handler, receiver, value, promise\n) {\n if (promise._isRejected()) return;\n promise._pushContext();\n var x;\n if (receiver === APPLY && !this._isRejected()) {\n x = tryCatch(handler).apply(this._boundValue(), value);\n } else {\n x = tryCatch(handler).call(receiver, value);\n }\n promise._popContext();\n\n if (x === errorObj || x === promise || x === NEXT_FILTER) {\n var err = x === promise ? makeSelfResolutionError() : x.e;\n promise._rejectCallback(err, false, true);\n } else {\n promise._resolveCallback(x);\n }\n};\n\nPromise.prototype._target = function() {\n var ret = this;\n while (ret._isFollowing()) ret = ret._followee();\n return ret;\n};\n\nPromise.prototype._followee = function() {\n return this._rejectionHandler0;\n};\n\nPromise.prototype._setFollowee = function(promise) {\n this._rejectionHandler0 = promise;\n};\n\nPromise.prototype._cleanValues = function () {\n if (this._cancellable()) {\n this._cancellationParent = undefined;\n }\n};\n\nPromise.prototype._propagateFrom = function (parent, flags) {\n if ((flags & 1) > 0 && parent._cancellable()) {\n this._setCancellable();\n this._cancellationParent = parent;\n }\n if ((flags & 4) > 0 && parent._isBound()) {\n this._setBoundTo(parent._boundTo);\n }\n};\n\nPromise.prototype._fulfill = function (value) {\n if (this._isFollowingOrFulfilledOrRejected()) return;\n this._fulfillUnchecked(value);\n};\n\nPromise.prototype._reject = function (reason, carriedStackTrace) {\n if (this._isFollowingOrFulfilledOrRejected()) return;\n this._rejectUnchecked(reason, carriedStackTrace);\n};\n\nPromise.prototype._settlePromiseAt = function (index) {\n var promise = this._promiseAt(index);\n var isPromise = promise instanceof Promise;\n\n if (isPromise && promise._isMigrated()) {\n promise._unsetIsMigrated();\n return async.invoke(this._settlePromiseAt, this, index);\n }\n var handler = this._isFulfilled()\n ? this._fulfillmentHandlerAt(index)\n : this._rejectionHandlerAt(index);\n\n var carriedStackTrace =\n this._isCarryingStackTrace() ? this._getCarriedStackTrace() : undefined;\n var value = this._settledValue;\n var receiver = this._receiverAt(index);\n this._clearCallbackDataAtIndex(index);\n\n if (typeof handler === "function") {\n if (!isPromise) {\n handler.call(receiver, value, promise);\n } else {\n this._settlePromiseFromHandler(handler, receiver, value, promise);\n }\n } else if (receiver instanceof PromiseArray) {\n if (!receiver._isResolved()) {\n if (this._isFulfilled()) {\n receiver._promiseFulfilled(value, promise);\n }\n else {\n receiver._promiseRejected(value, promise);\n }\n }\n } else if (isPromise) {\n if (this._isFulfilled()) {\n promise._fulfill(value);\n } else {\n promise._reject(value, carriedStackTrace);\n }\n }\n\n if (index >= 4 && (index & 31) === 4)\n async.invokeLater(this._setLength, this, 0);\n};\n\nPromise.prototype._clearCallbackDataAtIndex = function(index) {\n if (index === 0) {\n if (!this._isCarryingStackTrace()) {\n this._fulfillmentHandler0 = undefined;\n }\n this._rejectionHandler0 =\n this._progressHandler0 =\n this._receiver0 =\n this._promise0 = undefined;\n } else {\n var base = index * 5 - 5;\n this[base + 3] =\n this[base + 4] =\n this[base + 0] =\n this[base + 1] =\n this[base + 2] = undefined;\n }\n};\n\nPromise.prototype._isSettlePromisesQueued = function () {\n return (this._bitField &\n -1073741824) === -1073741824;\n};\n\nPromise.prototype._setSettlePromisesQueued = function () {\n this._bitField = this._bitField | -1073741824;\n};\n\nPromise.prototype._unsetSettlePromisesQueued = function () {\n this._bitField = this._bitField & (~-1073741824);\n};\n\nPromise.prototype._queueSettlePromises = function() {\n async.settlePromises(this);\n this._setSettlePromisesQueued();\n};\n\nPromise.prototype._fulfillUnchecked = function (value) {\n if (value === this) {\n var err = makeSelfResolutionError();\n this._attachExtraTrace(err);\n return this._rejectUnchecked(err, undefined);\n }\n this._setFulfilled();\n this._settledValue = value;\n this._cleanValues();\n\n if (this._length() > 0) {\n this._queueSettlePromises();\n }\n};\n\nPromise.prototype._rejectUncheckedCheckError = function (reason) {\n var trace = util.ensureErrorObject(reason);\n this._rejectUnchecked(reason, trace === reason ? undefined : trace);\n};\n\nPromise.prototype._rejectUnchecked = function (reason, trace) {\n if (reason === this) {\n var err = makeSelfResolutionError();\n this._attachExtraTrace(err);\n return this._rejectUnchecked(err);\n }\n this._setRejected();\n this._settledValue = reason;\n this._cleanValues();\n\n if (this._isFinal()) {\n async.throwLater(function(e) {\n if ("stack" in e) {\n async.invokeFirst(\n CapturedTrace.unhandledRejection, undefined, e);\n }\n throw e;\n }, trace === undefined ? reason : trace);\n return;\n }\n\n if (trace !== undefined && trace !== reason) {\n this._setCarriedStackTrace(trace);\n }\n\n if (this._length() > 0) {\n this._queueSettlePromises();\n } else {\n this._ensurePossibleRejectionHandled();\n }\n};\n\nPromise.prototype._settlePromises = function () {\n this._unsetSettlePromisesQueued();\n var len = this._length();\n for (var i = 0; i < len; i++) {\n this._settlePromiseAt(i);\n }\n};\n\nutil.notEnumerableProp(Promise,\n "_makeSelfResolutionError",\n makeSelfResolutionError);\n\n_dereq_("./progress.js")(Promise, PromiseArray);\n_dereq_("./method.js")(Promise, INTERNAL, tryConvertToPromise, apiRejection);\n_dereq_("./bind.js")(Promise, INTERNAL, tryConvertToPromise);\n_dereq_("./finally.js")(Promise, NEXT_FILTER, tryConvertToPromise);\n_dereq_("./direct_resolve.js")(Promise);\n_dereq_("./synchronous_inspection.js")(Promise);\n_dereq_("./join.js")(Promise, PromiseArray, tryConvertToPromise, INTERNAL);\nPromise.Promise = Promise;\n_dereq_(\'./map.js\')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);\n_dereq_(\'./cancel.js\')(Promise);\n_dereq_(\'./using.js\')(Promise, apiRejection, tryConvertToPromise, createContext);\n_dereq_(\'./generators.js\')(Promise, apiRejection, INTERNAL, tryConvertToPromise);\n_dereq_(\'./nodeify.js\')(Promise);\n_dereq_(\'./call_get.js\')(Promise);\n_dereq_(\'./props.js\')(Promise, PromiseArray, tryConvertToPromise, apiRejection);\n_dereq_(\'./race.js\')(Promise, INTERNAL, tryConvertToPromise, apiRejection);\n_dereq_(\'./reduce.js\')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);\n_dereq_(\'./settle.js\')(Promise, PromiseArray);\n_dereq_(\'./some.js\')(Promise, PromiseArray, apiRejection);\n_dereq_(\'./promisify.js\')(Promise, INTERNAL);\n_dereq_(\'./any.js\')(Promise);\n_dereq_(\'./each.js\')(Promise, INTERNAL);\n_dereq_(\'./timers.js\')(Promise, INTERNAL);\n_dereq_(\'./filter.js\')(Promise, INTERNAL);\n \n util.toFastProperties(Promise); \n util.toFastProperties(Promise.prototype); \n function fillTypes(value) { \n var p = new Promise(INTERNAL); \n p._fulfillmentHandler0 = value; \n p._rejectionHandler0 = value; \n p._progressHandler0 = value; \n p._promise0 = value; \n p._receiver0 = value; \n p._settledValue = value; \n } \n // Complete slack tracking, opt out of field-type tracking and \n // stabilize map \n fillTypes({a: 1}); \n fillTypes({b: 2}); \n fillTypes({c: 3}); \n fillTypes(1); \n fillTypes(function(){}); \n fillTypes(undefined); \n fillTypes(false); \n fillTypes(new Promise(INTERNAL)); \n CapturedTrace.setBounds(async.firstLineError, util.lastLineError); \n return Promise; \n\n};\n\n},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise,\n apiRejection) {\nvar util = _dereq_("./util.js");\nvar isArray = util.isArray;\n\nfunction toResolutionValue(val) {\n switch(val) {\n case -2: return [];\n case -3: return {};\n }\n}\n\nfunction PromiseArray(values) {\n var promise = this._promise = new Promise(INTERNAL);\n var parent;\n if (values instanceof Promise) {\n parent = values;\n promise._propagateFrom(parent, 1 | 4);\n }\n this._values = values;\n this._length = 0;\n this._totalResolved = 0;\n this._init(undefined, -2);\n}\nPromiseArray.prototype.length = function () {\n return this._length;\n};\n\nPromiseArray.prototype.promise = function () {\n return this._promise;\n};\n\nPromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {\n var values = tryConvertToPromise(this._values, this._promise);\n if (values instanceof Promise) {\n values = values._target();\n this._values = values;\n if (values._isFulfilled()) {\n values = values._value();\n if (!isArray(values)) {\n var err = new Promise.TypeError("expecting an array, a promise or a thenable\\u000a\\u000a See http://goo.gl/s8MMhc\\u000a");\n this.__hardReject__(err);\n return;\n }\n } else if (values._isPending()) {\n values._then(\n init,\n this._reject,\n undefined,\n this,\n resolveValueIfEmpty\n );\n return;\n } else {\n this._reject(values._reason());\n return;\n }\n } else if (!isArray(values)) {\n this._promise._reject(apiRejection("expecting an array, a promise or a thenable\\u000a\\u000a See http://goo.gl/s8MMhc\\u000a")._reason());\n return;\n }\n\n if (values.length === 0) {\n if (resolveValueIfEmpty === -5) {\n this._resolveEmptyArray();\n }\n else {\n this._resolve(toResolutionValue(resolveValueIfEmpty));\n }\n return;\n }\n var len = this.getActualLength(values.length);\n this._length = len;\n this._values = this.shouldCopyValues() ? new Array(len) : this._values;\n var promise = this._promise;\n for (var i = 0; i < len; ++i) {\n var isResolved = this._isResolved();\n var maybePromise = tryConvertToPromise(values[i], promise);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n if (isResolved) {\n maybePromise._ignoreRejections();\n } else if (maybePromise._isPending()) {\n maybePromise._proxyPromiseArray(this, i);\n } else if (maybePromise._isFulfilled()) {\n this._promiseFulfilled(maybePromise._value(), i);\n } else {\n this._promiseRejected(maybePromise._reason(), i);\n }\n } else if (!isResolved) {\n this._promiseFulfilled(maybePromise, i);\n }\n }\n};\n\nPromiseArray.prototype._isResolved = function () {\n return this._values === null;\n};\n\nPromiseArray.prototype._resolve = function (value) {\n this._values = null;\n this._promise._fulfill(value);\n};\n\nPromiseArray.prototype.__hardReject__ =\nPromiseArray.prototype._reject = function (reason) {\n this._values = null;\n this._promise._rejectCallback(reason, false, true);\n};\n\nPromiseArray.prototype._promiseProgressed = function (progressValue, index) {\n this._promise._progress({\n index: index,\n value: progressValue\n });\n};\n\n\nPromiseArray.prototype._promiseFulfilled = function (value, index) {\n this._values[index] = value;\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= this._length) {\n this._resolve(this._values);\n }\n};\n\nPromiseArray.prototype._promiseRejected = function (reason, index) {\n this._totalResolved++;\n this._reject(reason);\n};\n\nPromiseArray.prototype.shouldCopyValues = function () {\n return true;\n};\n\nPromiseArray.prototype.getActualLength = function (len) {\n return len;\n};\n\nreturn PromiseArray;\n};\n\n},{"./util.js":38}],25:[function(_dereq_,module,exports){\n"use strict";\nvar util = _dereq_("./util.js");\nvar maybeWrapAsError = util.maybeWrapAsError;\nvar errors = _dereq_("./errors.js");\nvar TimeoutError = errors.TimeoutError;\nvar OperationalError = errors.OperationalError;\nvar haveGetters = util.haveGetters;\nvar es5 = _dereq_("./es5.js");\n\nfunction isUntypedError(obj) {\n return obj instanceof Error &&\n es5.getPrototypeOf(obj) === Error.prototype;\n}\n\nvar rErrorKey = /^(?:name|message|stack|cause)$/;\nfunction wrapAsOperationalError(obj) {\n var ret;\n if (isUntypedError(obj)) {\n ret = new OperationalError(obj);\n ret.name = obj.name;\n ret.message = obj.message;\n ret.stack = obj.stack;\n var keys = es5.keys(obj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!rErrorKey.test(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n }\n util.markAsOriginatingFromRejection(obj);\n return obj;\n}\n\nfunction nodebackForPromise(promise) {\n return function(err, value) {\n if (promise === null) return;\n\n if (err) {\n var wrapped = wrapAsOperationalError(maybeWrapAsError(err));\n promise._attachExtraTrace(wrapped);\n promise._reject(wrapped);\n } else if (arguments.length > 2) {\n var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}\n promise._fulfill(args);\n } else {\n promise._fulfill(value);\n }\n\n promise = null;\n };\n}\n\n\nvar PromiseResolver;\nif (!haveGetters) {\n PromiseResolver = function (promise) {\n this.promise = promise;\n this.asCallback = nodebackForPromise(promise);\n this.callback = this.asCallback;\n };\n}\nelse {\n PromiseResolver = function (promise) {\n this.promise = promise;\n };\n}\nif (haveGetters) {\n var prop = {\n get: function() {\n return nodebackForPromise(this.promise);\n }\n };\n es5.defineProperty(PromiseResolver.prototype, "asCallback", prop);\n es5.defineProperty(PromiseResolver.prototype, "callback", prop);\n}\n\nPromiseResolver._nodebackForPromise = nodebackForPromise;\n\nPromiseResolver.prototype.toString = function () {\n return "[object PromiseResolver]";\n};\n\nPromiseResolver.prototype.resolve =\nPromiseResolver.prototype.fulfill = function (value) {\n if (!(this instanceof PromiseResolver)) {\n throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\\u000a\\u000a See http://goo.gl/sdkXL9\\u000a");\n }\n this.promise._resolveCallback(value);\n};\n\nPromiseResolver.prototype.reject = function (reason) {\n if (!(this instanceof PromiseResolver)) {\n throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\\u000a\\u000a See http://goo.gl/sdkXL9\\u000a");\n }\n this.promise._rejectCallback(reason);\n};\n\nPromiseResolver.prototype.progress = function (value) {\n if (!(this instanceof PromiseResolver)) {\n throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\\u000a\\u000a See http://goo.gl/sdkXL9\\u000a");\n }\n this.promise._progress(value);\n};\n\nPromiseResolver.prototype.cancel = function (err) {\n this.promise.cancel(err);\n};\n\nPromiseResolver.prototype.timeout = function () {\n this.reject(new TimeoutError("timeout"));\n};\n\nPromiseResolver.prototype.isResolved = function () {\n return this.promise.isResolved();\n};\n\nPromiseResolver.prototype.toJSON = function () {\n return this.promise.toJSON();\n};\n\nmodule.exports = PromiseResolver;\n\n},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, INTERNAL) {\nvar THIS = {};\nvar util = _dereq_("./util.js");\nvar nodebackForPromise = _dereq_("./promise_resolver.js")\n ._nodebackForPromise;\nvar withAppended = util.withAppended;\nvar maybeWrapAsError = util.maybeWrapAsError;\nvar canEvaluate = util.canEvaluate;\nvar TypeError = _dereq_("./errors").TypeError;\nvar defaultSuffix = "Async";\nvar defaultPromisified = {__isPromisified__: true};\nvar noCopyProps = [\n "arity", "length",\n "name",\n "arguments",\n "caller",\n "callee",\n "prototype",\n "__isPromisified__"\n];\nvar noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");\n\nvar defaultFilter = function(name) {\n return util.isIdentifier(name) &&\n name.charAt(0) !== "_" &&\n name !== "constructor";\n};\n\nfunction propsFilter(key) {\n return !noCopyPropsPattern.test(key);\n}\n\nfunction isPromisified(fn) {\n try {\n return fn.__isPromisified__ === true;\n }\n catch (e) {\n return false;\n }\n}\n\nfunction hasPromisified(obj, key, suffix) {\n var val = util.getDataPropertyOrDefault(obj, key + suffix,\n defaultPromisified);\n return val ? isPromisified(val) : false;\n}\nfunction checkValid(ret, suffix, suffixRegexp) {\n for (var i = 0; i < ret.length; i += 2) {\n var key = ret[i];\n if (suffixRegexp.test(key)) {\n var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");\n for (var j = 0; j < ret.length; j += 2) {\n if (ret[j] === keyWithoutAsyncSuffix) {\n throw new TypeError("Cannot promisify an API that has normal methods with \'%s\'-suffix\\u000a\\u000a See http://goo.gl/iWrZbw\\u000a"\n .replace("%s", suffix));\n }\n }\n }\n }\n}\n\nfunction promisifiableMethods(obj, suffix, suffixRegexp, filter) {\n var keys = util.inheritedDataKeys(obj);\n var ret = [];\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = obj[key];\n var passesDefaultFilter = filter === defaultFilter\n ? true : defaultFilter(key, value, obj);\n if (typeof value === "function" &&\n !isPromisified(value) &&\n !hasPromisified(obj, key, suffix) &&\n filter(key, value, obj, passesDefaultFilter)) {\n ret.push(key, value);\n }\n }\n checkValid(ret, suffix, suffixRegexp);\n return ret;\n}\n\nvar escapeIdentRegex = function(str) {\n return str.replace(/([$])/, "\\\\$");\n};\n\nvar makeNodePromisifiedEval;\nif (false) {\nvar switchCaseArgumentOrder = function(likelyArgumentCount) {\n var ret = [likelyArgumentCount];\n var min = Math.max(0, likelyArgumentCount - 1 - 3);\n for(var i = likelyArgumentCount - 1; i >= min; --i) {\n ret.push(i);\n }\n for(var i = likelyArgumentCount + 1; i <= 3; ++i) {\n ret.push(i);\n }\n return ret;\n};\n\nvar argumentSequence = function(argumentCount) {\n return util.filledRange(argumentCount, "_arg", "");\n};\n\nvar parameterDeclaration = function(parameterCount) {\n return util.filledRange(\n Math.max(parameterCount, 3), "_arg", "");\n};\n\nvar parameterCount = function(fn) {\n if (typeof fn.length === "number") {\n return Math.max(Math.min(fn.length, 1023 + 1), 0);\n }\n return 0;\n};\n\nmakeNodePromisifiedEval =\nfunction(callback, receiver, originalName, fn) {\n var newParameterCount = Math.max(0, parameterCount(fn) - 1);\n var argumentOrder = switchCaseArgumentOrder(newParameterCount);\n var shouldProxyThis = typeof callback === "string" || receiver === THIS;\n\n function generateCallForArgumentCount(count) {\n var args = argumentSequence(count).join(", ");\n var comma = count > 0 ? ", " : "";\n var ret;\n if (shouldProxyThis) {\n ret = "ret = callback.call(this, {{args}}, nodeback); break;\\n";\n } else {\n ret = receiver === undefined\n ? "ret = callback({{args}}, nodeback); break;\\n"\n : "ret = callback.call(receiver, {{args}}, nodeback); break;\\n";\n }\n return ret.replace("{{args}}", args).replace(", ", comma);\n }\n\n function generateArgumentSwitchCase() {\n var ret = "";\n for (var i = 0; i < argumentOrder.length; ++i) {\n ret += "case " + argumentOrder[i] +":" +\n generateCallForArgumentCount(argumentOrder[i]);\n }\n\n ret += " \\n\\\n default: \\n\\\n var args = new Array(len + 1); \\n\\\n var i = 0; \\n\\\n for (var i = 0; i < len; ++i) { \\n\\\n args[i] = arguments[i]; \\n\\\n } \\n\\\n args[i] = nodeback; \\n\\\n [CodeForCall] \\n\\\n break; \\n\\\n ".replace("[CodeForCall]", (shouldProxyThis\n ? "ret = callback.apply(this, args);\\n"\n : "ret = callback.apply(receiver, args);\\n"));\n return ret;\n }\n\n var getFunctionCode = typeof callback === "string"\n ? ("this != null ? this[\'"+callback+"\'] : fn")\n : "fn";\n\n return new Function("Promise",\n "fn",\n "receiver",\n "withAppended",\n "maybeWrapAsError",\n "nodebackForPromise",\n "tryCatch",\n "errorObj",\n "notEnumerableProp",\n "INTERNAL","\'use strict\'; \\n\\\n var ret = function (Parameters) { \\n\\\n \'use strict\'; \\n\\\n var len = arguments.length; \\n\\\n var promise = new Promise(INTERNAL); \\n\\\n promise._captureStackTrace(); \\n\\\n var nodeback = nodebackForPromise(promise); \\n\\\n var ret; \\n\\\n var callback = tryCatch([GetFunctionCode]); \\n\\\n switch(len) { \\n\\\n [CodeForSwitchCase] \\n\\\n } \\n\\\n if (ret === errorObj) { \\n\\\n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\\n\\\n } \\n\\\n return promise; \\n\\\n }; \\n\\\n notEnumerableProp(ret, \'__isPromisified__\', true); \\n\\\n return ret; \\n\\\n "\n .replace("Parameters", parameterDeclaration(newParameterCount))\n .replace("[CodeForSwitchCase]", generateArgumentSwitchCase())\n .replace("[GetFunctionCode]", getFunctionCode))(\n Promise,\n fn,\n receiver,\n withAppended,\n maybeWrapAsError,\n nodebackForPromise,\n util.tryCatch,\n util.errorObj,\n util.notEnumerableProp,\n INTERNAL\n );\n};\n}\n\nfunction makeNodePromisifiedClosure(callback, receiver, _, fn) {\n var defaultThis = (function() {return this;})();\n var method = callback;\n if (typeof method === "string") {\n callback = fn;\n }\n function promisified() {\n var _receiver = receiver;\n if (receiver === THIS) _receiver = this;\n var promise = new Promise(INTERNAL);\n promise._captureStackTrace();\n var cb = typeof method === "string" && this !== defaultThis\n ? this[method] : callback;\n var fn = nodebackForPromise(promise);\n try {\n cb.apply(_receiver, withAppended(arguments, fn));\n } catch(e) {\n promise._rejectCallback(maybeWrapAsError(e), true, true);\n }\n return promise;\n }\n util.notEnumerableProp(promisified, "__isPromisified__", true);\n return promisified;\n}\n\nvar makeNodePromisified = canEvaluate\n ? makeNodePromisifiedEval\n : makeNodePromisifiedClosure;\n\nfunction promisifyAll(obj, suffix, filter, promisifier) {\n var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");\n var methods =\n promisifiableMethods(obj, suffix, suffixRegexp, filter);\n\n for (var i = 0, len = methods.length; i < len; i+= 2) {\n var key = methods[i];\n var fn = methods[i+1];\n var promisifiedKey = key + suffix;\n if (promisifier === makeNodePromisified) {\n obj[promisifiedKey] =\n makeNodePromisified(key, THIS, key, fn, suffix);\n } else {\n var promisified = promisifier(fn, function() {\n return makeNodePromisified(key, THIS, key, fn, suffix);\n });\n util.notEnumerableProp(promisified, "__isPromisified__", true);\n obj[promisifiedKey] = promisified;\n }\n }\n util.toFastProperties(obj);\n return obj;\n}\n\nfunction promisify(callback, receiver) {\n return makeNodePromisified(callback, receiver, undefined, callback);\n}\n\nPromise.promisify = function (fn, receiver) {\n if (typeof fn !== "function") {\n throw new TypeError("fn must be a function\\u000a\\u000a See http://goo.gl/916lJJ\\u000a");\n }\n if (isPromisified(fn)) {\n return fn;\n }\n var ret = promisify(fn, arguments.length < 2 ? THIS : receiver);\n util.copyDescriptors(fn, ret, propsFilter);\n return ret;\n};\n\nPromise.promisifyAll = function (target, options) {\n if (typeof target !== "function" && typeof target !== "object") {\n throw new TypeError("the target of promisifyAll must be an object or a function\\u000a\\u000a See http://goo.gl/9ITlV0\\u000a");\n }\n options = Object(options);\n var suffix = options.suffix;\n if (typeof suffix !== "string") suffix = defaultSuffix;\n var filter = options.filter;\n if (typeof filter !== "function") filter = defaultFilter;\n var promisifier = options.promisifier;\n if (typeof promisifier !== "function") promisifier = makeNodePromisified;\n\n if (!util.isIdentifier(suffix)) {\n throw new RangeError("suffix must be a valid identifier\\u000a\\u000a See http://goo.gl/8FZo5V\\u000a");\n }\n\n var keys = util.inheritedDataKeys(target);\n for (var i = 0; i < keys.length; ++i) {\n var value = target[keys[i]];\n if (keys[i] !== "constructor" &&\n util.isClass(value)) {\n promisifyAll(value.prototype, suffix, filter, promisifier);\n promisifyAll(value, suffix, filter, promisifier);\n }\n }\n\n return promisifyAll(target, suffix, filter, promisifier);\n};\n};\n\n\n},{"./errors":13,"./promise_resolver.js":25,"./util.js":38}],27:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(\n Promise, PromiseArray, tryConvertToPromise, apiRejection) {\nvar util = _dereq_("./util.js");\nvar isObject = util.isObject;\nvar es5 = _dereq_("./es5.js");\n\nfunction PropertiesPromiseArray(obj) {\n var keys = es5.keys(obj);\n var len = keys.length;\n var values = new Array(len * 2);\n for (var i = 0; i < len; ++i) {\n var key = keys[i];\n values[i] = obj[key];\n values[i + len] = key;\n }\n this.constructor$(values);\n}\nutil.inherits(PropertiesPromiseArray, PromiseArray);\n\nPropertiesPromiseArray.prototype._init = function () {\n this._init$(undefined, -3) ;\n};\n\nPropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {\n this._values[index] = value;\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= this._length) {\n var val = {};\n var keyOffset = this.length();\n for (var i = 0, len = this.length(); i < len; ++i) {\n val[this._values[i + keyOffset]] = this._values[i];\n }\n this._resolve(val);\n }\n};\n\nPropertiesPromiseArray.prototype._promiseProgressed = function (value, index) {\n this._promise._progress({\n key: this._values[index + this.length()],\n value: value\n });\n};\n\nPropertiesPromiseArray.prototype.shouldCopyValues = function () {\n return false;\n};\n\nPropertiesPromiseArray.prototype.getActualLength = function (len) {\n return len >> 1;\n};\n\nfunction props(promises) {\n var ret;\n var castValue = tryConvertToPromise(promises);\n\n if (!isObject(castValue)) {\n return apiRejection("cannot await properties of a non-object\\u000a\\u000a See http://goo.gl/OsFKC8\\u000a");\n } else if (castValue instanceof Promise) {\n ret = castValue._then(\n Promise.props, undefined, undefined, undefined, undefined);\n } else {\n ret = new PropertiesPromiseArray(castValue).promise();\n }\n\n if (castValue instanceof Promise) {\n ret._propagateFrom(castValue, 4);\n }\n return ret;\n}\n\nPromise.prototype.props = function () {\n return props(this);\n};\n\nPromise.props = function (promises) {\n return props(promises);\n};\n};\n\n},{"./es5.js":14,"./util.js":38}],28:[function(_dereq_,module,exports){\n"use strict";\nfunction arrayMove(src, srcIndex, dst, dstIndex, len) {\n for (var j = 0; j < len; ++j) {\n dst[j + dstIndex] = src[j + srcIndex];\n src[j + srcIndex] = void 0;\n }\n}\n\nfunction Queue(capacity) {\n this._capacity = capacity;\n this._length = 0;\n this._front = 0;\n}\n\nQueue.prototype._willBeOverCapacity = function (size) {\n return this._capacity < size;\n};\n\nQueue.prototype._pushOne = function (arg) {\n var length = this.length();\n this._checkCapacity(length + 1);\n var i = (this._front + length) & (this._capacity - 1);\n this[i] = arg;\n this._length = length + 1;\n};\n\nQueue.prototype._unshiftOne = function(value) {\n var capacity = this._capacity;\n this._checkCapacity(this.length() + 1);\n var front = this._front;\n var i = (((( front - 1 ) &\n ( capacity - 1) ) ^ capacity ) - capacity );\n this[i] = value;\n this._front = i;\n this._length = this.length() + 1;\n};\n\nQueue.prototype.unshift = function(fn, receiver, arg) {\n this._unshiftOne(arg);\n this._unshiftOne(receiver);\n this._unshiftOne(fn);\n};\n\nQueue.prototype.push = function (fn, receiver, arg) {\n var length = this.length() + 3;\n if (this._willBeOverCapacity(length)) {\n this._pushOne(fn);\n this._pushOne(receiver);\n this._pushOne(arg);\n return;\n }\n var j = this._front + length - 3;\n this._checkCapacity(length);\n var wrapMask = this._capacity - 1;\n this[(j + 0) & wrapMask] = fn;\n this[(j + 1) & wrapMask] = receiver;\n this[(j + 2) & wrapMask] = arg;\n this._length = length;\n};\n\nQueue.prototype.shift = function () {\n var front = this._front,\n ret = this[front];\n\n this[front] = undefined;\n this._front = (front + 1) & (this._capacity - 1);\n this._length--;\n return ret;\n};\n\nQueue.prototype.length = function () {\n return this._length;\n};\n\nQueue.prototype._checkCapacity = function (size) {\n if (this._capacity < size) {\n this._resizeTo(this._capacity << 1);\n }\n};\n\nQueue.prototype._resizeTo = function (capacity) {\n var oldCapacity = this._capacity;\n this._capacity = capacity;\n var front = this._front;\n var length = this._length;\n var moveItemsCount = (front + length) & (oldCapacity - 1);\n arrayMove(this, 0, this, oldCapacity, moveItemsCount);\n};\n\nmodule.exports = Queue;\n\n},{}],29:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(\n Promise, INTERNAL, tryConvertToPromise, apiRejection) {\nvar isArray = _dereq_("./util.js").isArray;\n\nvar raceLater = function (promise) {\n return promise.then(function(array) {\n return race(array, promise);\n });\n};\n\nfunction race(promises, parent) {\n var maybePromise = tryConvertToPromise(promises);\n\n if (maybePromise instanceof Promise) {\n return raceLater(maybePromise);\n } else if (!isArray(promises)) {\n return apiRejection("expecting an array, a promise or a thenable\\u000a\\u000a See http://goo.gl/s8MMhc\\u000a");\n }\n\n var ret = new Promise(INTERNAL);\n if (parent !== undefined) {\n ret._propagateFrom(parent, 4 | 1);\n }\n var fulfill = ret._fulfill;\n var reject = ret._reject;\n for (var i = 0, len = promises.length; i < len; ++i) {\n var val = promises[i];\n\n if (val === undefined && !(i in promises)) {\n continue;\n }\n\n Promise.cast(val)._then(fulfill, reject, undefined, ret, null);\n }\n return ret;\n}\n\nPromise.race = function (promises) {\n return race(promises, undefined);\n};\n\nPromise.prototype.race = function () {\n return race(this, undefined);\n};\n\n};\n\n},{"./util.js":38}],30:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise,\n PromiseArray,\n apiRejection,\n tryConvertToPromise,\n INTERNAL) {\nvar getDomain = Promise._getDomain;\nvar async = _dereq_("./async.js");\nvar util = _dereq_("./util.js");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nfunction ReductionPromiseArray(promises, fn, accum, _each) {\n this.constructor$(promises);\n this._promise._captureStackTrace();\n this._preservedValues = _each === INTERNAL ? [] : null;\n this._zerothIsAccum = (accum === undefined);\n this._gotAccum = false;\n this._reducingIndex = (this._zerothIsAccum ? 1 : 0);\n this._valuesPhase = undefined;\n var maybePromise = tryConvertToPromise(accum, this._promise);\n var rejected = false;\n var isPromise = maybePromise instanceof Promise;\n if (isPromise) {\n maybePromise = maybePromise._target();\n if (maybePromise._isPending()) {\n maybePromise._proxyPromiseArray(this, -1);\n } else if (maybePromise._isFulfilled()) {\n accum = maybePromise._value();\n this._gotAccum = true;\n } else {\n this._reject(maybePromise._reason());\n rejected = true;\n }\n }\n if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true;\n var domain = getDomain();\n this._callback = domain === null ? fn : domain.bind(fn);\n this._accum = accum;\n if (!rejected) async.invoke(init, this, undefined);\n}\nfunction init() {\n this._init$(undefined, -5);\n}\nutil.inherits(ReductionPromiseArray, PromiseArray);\n\nReductionPromiseArray.prototype._init = function () {};\n\nReductionPromiseArray.prototype._resolveEmptyArray = function () {\n if (this._gotAccum || this._zerothIsAccum) {\n this._resolve(this._preservedValues !== null\n ? [] : this._accum);\n }\n};\n\nReductionPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var values = this._values;\n values[index] = value;\n var length = this.length();\n var preservedValues = this._preservedValues;\n var isEach = preservedValues !== null;\n var gotAccum = this._gotAccum;\n var valuesPhase = this._valuesPhase;\n var valuesPhaseIndex;\n if (!valuesPhase) {\n valuesPhase = this._valuesPhase = new Array(length);\n for (valuesPhaseIndex=0; valuesPhaseIndex= this._length) {\n this._resolve(this._values);\n }\n};\n\nSettledPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var ret = new PromiseInspection();\n ret._bitField = 268435456;\n ret._settledValue = value;\n this._promiseResolved(index, ret);\n};\nSettledPromiseArray.prototype._promiseRejected = function (reason, index) {\n var ret = new PromiseInspection();\n ret._bitField = 134217728;\n ret._settledValue = reason;\n this._promiseResolved(index, ret);\n};\n\nPromise.settle = function (promises) {\n return new SettledPromiseArray(promises).promise();\n};\n\nPromise.prototype.settle = function () {\n return new SettledPromiseArray(this).promise();\n};\n};\n\n},{"./util.js":38}],33:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports =\nfunction(Promise, PromiseArray, apiRejection) {\nvar util = _dereq_("./util.js");\nvar RangeError = _dereq_("./errors.js").RangeError;\nvar AggregateError = _dereq_("./errors.js").AggregateError;\nvar isArray = util.isArray;\n\n\nfunction SomePromiseArray(values) {\n this.constructor$(values);\n this._howMany = 0;\n this._unwrap = false;\n this._initialized = false;\n}\nutil.inherits(SomePromiseArray, PromiseArray);\n\nSomePromiseArray.prototype._init = function () {\n if (!this._initialized) {\n return;\n }\n if (this._howMany === 0) {\n this._resolve([]);\n return;\n }\n this._init$(undefined, -5);\n var isArrayResolved = isArray(this._values);\n if (!this._isResolved() &&\n isArrayResolved &&\n this._howMany > this._canPossiblyFulfill()) {\n this._reject(this._getRangeError(this.length()));\n }\n};\n\nSomePromiseArray.prototype.init = function () {\n this._initialized = true;\n this._init();\n};\n\nSomePromiseArray.prototype.setUnwrap = function () {\n this._unwrap = true;\n};\n\nSomePromiseArray.prototype.howMany = function () {\n return this._howMany;\n};\n\nSomePromiseArray.prototype.setHowMany = function (count) {\n this._howMany = count;\n};\n\nSomePromiseArray.prototype._promiseFulfilled = function (value) {\n this._addFulfilled(value);\n if (this._fulfilled() === this.howMany()) {\n this._values.length = this.howMany();\n if (this.howMany() === 1 && this._unwrap) {\n this._resolve(this._values[0]);\n } else {\n this._resolve(this._values);\n }\n }\n\n};\nSomePromiseArray.prototype._promiseRejected = function (reason) {\n this._addRejected(reason);\n if (this.howMany() > this._canPossiblyFulfill()) {\n var e = new AggregateError();\n for (var i = this.length(); i < this._values.length; ++i) {\n e.push(this._values[i]);\n }\n this._reject(e);\n }\n};\n\nSomePromiseArray.prototype._fulfilled = function () {\n return this._totalResolved;\n};\n\nSomePromiseArray.prototype._rejected = function () {\n return this._values.length - this.length();\n};\n\nSomePromiseArray.prototype._addRejected = function (reason) {\n this._values.push(reason);\n};\n\nSomePromiseArray.prototype._addFulfilled = function (value) {\n this._values[this._totalResolved++] = value;\n};\n\nSomePromiseArray.prototype._canPossiblyFulfill = function () {\n return this.length() - this._rejected();\n};\n\nSomePromiseArray.prototype._getRangeError = function (count) {\n var message = "Input array must contain at least " +\n this._howMany + " items but contains only " + count + " items";\n return new RangeError(message);\n};\n\nSomePromiseArray.prototype._resolveEmptyArray = function () {\n this._reject(this._getRangeError(0));\n};\n\nfunction some(promises, howMany) {\n if ((howMany | 0) !== howMany || howMany < 0) {\n return apiRejection("expecting a positive integer\\u000a\\u000a See http://goo.gl/1wAmHx\\u000a");\n }\n var ret = new SomePromiseArray(promises);\n var promise = ret.promise();\n ret.setHowMany(howMany);\n ret.init();\n return promise;\n}\n\nPromise.some = function (promises, howMany) {\n return some(promises, howMany);\n};\n\nPromise.prototype.some = function (howMany) {\n return some(this, howMany);\n};\n\nPromise._SomePromiseArray = SomePromiseArray;\n};\n\n},{"./errors.js":13,"./util.js":38}],34:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise) {\nfunction PromiseInspection(promise) {\n if (promise !== undefined) {\n promise = promise._target();\n this._bitField = promise._bitField;\n this._settledValue = promise._settledValue;\n }\n else {\n this._bitField = 0;\n this._settledValue = undefined;\n }\n}\n\nPromiseInspection.prototype.value = function () {\n if (!this.isFulfilled()) {\n throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\\u000a\\u000a See http://goo.gl/hc1DLj\\u000a");\n }\n return this._settledValue;\n};\n\nPromiseInspection.prototype.error =\nPromiseInspection.prototype.reason = function () {\n if (!this.isRejected()) {\n throw new TypeError("cannot get rejection reason of a non-rejected promise\\u000a\\u000a See http://goo.gl/hPuiwB\\u000a");\n }\n return this._settledValue;\n};\n\nPromiseInspection.prototype.isFulfilled =\nPromise.prototype._isFulfilled = function () {\n return (this._bitField & 268435456) > 0;\n};\n\nPromiseInspection.prototype.isRejected =\nPromise.prototype._isRejected = function () {\n return (this._bitField & 134217728) > 0;\n};\n\nPromiseInspection.prototype.isPending =\nPromise.prototype._isPending = function () {\n return (this._bitField & 402653184) === 0;\n};\n\nPromiseInspection.prototype.isResolved =\nPromise.prototype._isResolved = function () {\n return (this._bitField & 402653184) > 0;\n};\n\nPromise.prototype.isPending = function() {\n return this._target()._isPending();\n};\n\nPromise.prototype.isRejected = function() {\n return this._target()._isRejected();\n};\n\nPromise.prototype.isFulfilled = function() {\n return this._target()._isFulfilled();\n};\n\nPromise.prototype.isResolved = function() {\n return this._target()._isResolved();\n};\n\nPromise.prototype._value = function() {\n return this._settledValue;\n};\n\nPromise.prototype._reason = function() {\n this._unsetRejectionIsUnhandled();\n return this._settledValue;\n};\n\nPromise.prototype.value = function() {\n var target = this._target();\n if (!target.isFulfilled()) {\n throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\\u000a\\u000a See http://goo.gl/hc1DLj\\u000a");\n }\n return target._settledValue;\n};\n\nPromise.prototype.reason = function() {\n var target = this._target();\n if (!target.isRejected()) {\n throw new TypeError("cannot get rejection reason of a non-rejected promise\\u000a\\u000a See http://goo.gl/hPuiwB\\u000a");\n }\n target._unsetRejectionIsUnhandled();\n return target._settledValue;\n};\n\n\nPromise.PromiseInspection = PromiseInspection;\n};\n\n},{}],35:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, INTERNAL) {\nvar util = _dereq_("./util.js");\nvar errorObj = util.errorObj;\nvar isObject = util.isObject;\n\nfunction tryConvertToPromise(obj, context) {\n if (isObject(obj)) {\n if (obj instanceof Promise) {\n return obj;\n }\n else if (isAnyBluebirdPromise(obj)) {\n var ret = new Promise(INTERNAL);\n obj._then(\n ret._fulfillUnchecked,\n ret._rejectUncheckedCheckError,\n ret._progressUnchecked,\n ret,\n null\n );\n return ret;\n }\n var then = util.tryCatch(getThen)(obj);\n if (then === errorObj) {\n if (context) context._pushContext();\n var ret = Promise.reject(then.e);\n if (context) context._popContext();\n return ret;\n } else if (typeof then === "function") {\n return doThenable(obj, then, context);\n }\n }\n return obj;\n}\n\nfunction getThen(obj) {\n return obj.then;\n}\n\nvar hasProp = {}.hasOwnProperty;\nfunction isAnyBluebirdPromise(obj) {\n return hasProp.call(obj, "_promise0");\n}\n\nfunction doThenable(x, then, context) {\n var promise = new Promise(INTERNAL);\n var ret = promise;\n if (context) context._pushContext();\n promise._captureStackTrace();\n if (context) context._popContext();\n var synchronous = true;\n var result = util.tryCatch(then).call(x,\n resolveFromThenable,\n rejectFromThenable,\n progressFromThenable);\n synchronous = false;\n if (promise && result === errorObj) {\n promise._rejectCallback(result.e, true, true);\n promise = null;\n }\n\n function resolveFromThenable(value) {\n if (!promise) return;\n promise._resolveCallback(value);\n promise = null;\n }\n\n function rejectFromThenable(reason) {\n if (!promise) return;\n promise._rejectCallback(reason, synchronous, true);\n promise = null;\n }\n\n function progressFromThenable(value) {\n if (!promise) return;\n if (typeof promise._progress === "function") {\n promise._progress(value);\n }\n }\n return ret;\n}\n\nreturn tryConvertToPromise;\n};\n\n},{"./util.js":38}],36:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function(Promise, INTERNAL) {\nvar util = _dereq_("./util.js");\nvar TimeoutError = Promise.TimeoutError;\n\nvar afterTimeout = function (promise, message) {\n if (!promise.isPending()) return;\n \n var err;\n if(!util.isPrimitive(message) && (message instanceof Error)) {\n err = message;\n } else {\n if (typeof message !== "string") {\n message = "operation timed out";\n }\n err = new TimeoutError(message);\n }\n util.markAsOriginatingFromRejection(err);\n promise._attachExtraTrace(err);\n promise._cancel(err);\n};\n\nvar afterValue = function(value) { return delay(+this).thenReturn(value); };\nvar delay = Promise.delay = function (value, ms) {\n if (ms === undefined) {\n ms = value;\n value = undefined;\n var ret = new Promise(INTERNAL);\n setTimeout(function() { ret._fulfill(); }, ms);\n return ret;\n }\n ms = +ms;\n return Promise.resolve(value)._then(afterValue, null, null, ms, undefined);\n};\n\nPromise.prototype.delay = function (ms) {\n return delay(this, ms);\n};\n\nfunction successClear(value) {\n var handle = this;\n if (handle instanceof Number) handle = +handle;\n clearTimeout(handle);\n return value;\n}\n\nfunction failureClear(reason) {\n var handle = this;\n if (handle instanceof Number) handle = +handle;\n clearTimeout(handle);\n throw reason;\n}\n\nPromise.prototype.timeout = function (ms, message) {\n ms = +ms;\n var ret = this.then().cancellable();\n ret._cancellationParent = this;\n var handle = setTimeout(function timeoutTimeout() {\n afterTimeout(ret, message);\n }, ms);\n return ret._then(successClear, failureClear, undefined, handle, undefined);\n};\n\n};\n\n},{"./util.js":38}],37:[function(_dereq_,module,exports){\n"use strict";\nmodule.exports = function (Promise, apiRejection, tryConvertToPromise,\n createContext) {\n var TypeError = _dereq_("./errors.js").TypeError;\n var inherits = _dereq_("./util.js").inherits;\n var PromiseInspection = Promise.PromiseInspection;\n\n function inspectionMapper(inspections) {\n var len = inspections.length;\n for (var i = 0; i < len; ++i) {\n var inspection = inspections[i];\n if (inspection.isRejected()) {\n return Promise.reject(inspection.error());\n }\n inspections[i] = inspection._settledValue;\n }\n return inspections;\n }\n\n function thrower(e) {\n setTimeout(function(){throw e;}, 0);\n }\n\n function castPreservingDisposable(thenable) {\n var maybePromise = tryConvertToPromise(thenable);\n if (maybePromise !== thenable &&\n typeof thenable._isDisposable === "function" &&\n typeof thenable._getDisposer === "function" &&\n thenable._isDisposable()) {\n maybePromise._setDisposable(thenable._getDisposer());\n }\n return maybePromise;\n }\n function dispose(resources, inspection) {\n var i = 0;\n var len = resources.length;\n var ret = Promise.defer();\n function iterator() {\n if (i >= len) return ret.resolve();\n var maybePromise = castPreservingDisposable(resources[i++]);\n if (maybePromise instanceof Promise &&\n maybePromise._isDisposable()) {\n try {\n maybePromise = tryConvertToPromise(\n maybePromise._getDisposer().tryDispose(inspection),\n resources.promise);\n } catch (e) {\n return thrower(e);\n }\n if (maybePromise instanceof Promise) {\n return maybePromise._then(iterator, thrower,\n null, null, null);\n }\n }\n iterator();\n }\n iterator();\n return ret.promise;\n }\n\n function disposerSuccess(value) {\n var inspection = new PromiseInspection();\n inspection._settledValue = value;\n inspection._bitField = 268435456;\n return dispose(this, inspection).thenReturn(value);\n }\n\n function disposerFail(reason) {\n var inspection = new PromiseInspection();\n inspection._settledValue = reason;\n inspection._bitField = 134217728;\n return dispose(this, inspection).thenThrow(reason);\n }\n\n function Disposer(data, promise, context) {\n this._data = data;\n this._promise = promise;\n this._context = context;\n }\n\n Disposer.prototype.data = function () {\n return this._data;\n };\n\n Disposer.prototype.promise = function () {\n return this._promise;\n };\n\n Disposer.prototype.resource = function () {\n if (this.promise().isFulfilled()) {\n return this.promise().value();\n }\n return null;\n };\n\n Disposer.prototype.tryDispose = function(inspection) {\n var resource = this.resource();\n var context = this._context;\n if (context !== undefined) context._pushContext();\n var ret = resource !== null\n ? this.doDispose(resource, inspection) : null;\n if (context !== undefined) context._popContext();\n this._promise._unsetDisposable();\n this._data = null;\n return ret;\n };\n\n Disposer.isDisposer = function (d) {\n return (d != null &&\n typeof d.resource === "function" &&\n typeof d.tryDispose === "function");\n };\n\n function FunctionDisposer(fn, promise, context) {\n this.constructor$(fn, promise, context);\n }\n inherits(FunctionDisposer, Disposer);\n\n FunctionDisposer.prototype.doDispose = function (resource, inspection) {\n var fn = this.data();\n return fn.call(resource, resource, inspection);\n };\n\n function maybeUnwrapDisposer(value) {\n if (Disposer.isDisposer(value)) {\n this.resources[this.index]._setDisposable(value);\n return value.promise();\n }\n return value;\n }\n\n Promise.using = function () {\n var len = arguments.length;\n if (len < 2) return apiRejection(\n "you must pass at least 2 arguments to Promise.using");\n var fn = arguments[len - 1];\n if (typeof fn !== "function") return apiRejection("fn must be a function\\u000a\\u000a See http://goo.gl/916lJJ\\u000a");\n\n var input;\n var spreadArgs = true;\n if (len === 2 && Array.isArray(arguments[0])) {\n input = arguments[0];\n len = input.length;\n spreadArgs = false;\n } else {\n input = arguments;\n len--;\n }\n var resources = new Array(len);\n for (var i = 0; i < len; ++i) {\n var resource = input[i];\n if (Disposer.isDisposer(resource)) {\n var disposer = resource;\n resource = resource.promise();\n resource._setDisposable(disposer);\n } else {\n var maybePromise = tryConvertToPromise(resource);\n if (maybePromise instanceof Promise) {\n resource =\n maybePromise._then(maybeUnwrapDisposer, null, null, {\n resources: resources,\n index: i\n }, undefined);\n }\n }\n resources[i] = resource;\n }\n\n var promise = Promise.settle(resources)\n .then(inspectionMapper)\n .then(function(vals) {\n promise._pushContext();\n var ret;\n try {\n ret = spreadArgs\n ? fn.apply(undefined, vals) : fn.call(undefined, vals);\n } finally {\n promise._popContext();\n }\n return ret;\n })\n ._then(\n disposerSuccess, disposerFail, undefined, resources, undefined);\n resources.promise = promise;\n return promise;\n };\n\n Promise.prototype._setDisposable = function (disposer) {\n this._bitField = this._bitField | 262144;\n this._disposer = disposer;\n };\n\n Promise.prototype._isDisposable = function () {\n return (this._bitField & 262144) > 0;\n };\n\n Promise.prototype._getDisposer = function () {\n return this._disposer;\n };\n\n Promise.prototype._unsetDisposable = function () {\n this._bitField = this._bitField & (~262144);\n this._disposer = undefined;\n };\n\n Promise.prototype.disposer = function (fn) {\n if (typeof fn === "function") {\n return new FunctionDisposer(fn, this, createContext());\n }\n throw new TypeError();\n };\n\n};\n\n},{"./errors.js":13,"./util.js":38}],38:[function(_dereq_,module,exports){\n"use strict";\nvar es5 = _dereq_("./es5.js");\nvar canEvaluate = typeof navigator == "undefined";\nvar haveGetters = (function(){\n try {\n var o = {};\n es5.defineProperty(o, "f", {\n get: function () {\n return 3;\n }\n });\n return o.f === 3;\n }\n catch (e) {\n return false;\n }\n\n})();\n\nvar errorObj = {e: {}};\nvar tryCatchTarget;\nfunction tryCatcher() {\n try {\n var target = tryCatchTarget;\n tryCatchTarget = null;\n return target.apply(this, arguments);\n } catch (e) {\n errorObj.e = e;\n return errorObj;\n }\n}\nfunction tryCatch(fn) {\n tryCatchTarget = fn;\n return tryCatcher;\n}\n\nvar inherits = function(Child, Parent) {\n var hasProp = {}.hasOwnProperty;\n\n function T() {\n this.constructor = Child;\n this.constructor$ = Parent;\n for (var propertyName in Parent.prototype) {\n if (hasProp.call(Parent.prototype, propertyName) &&\n propertyName.charAt(propertyName.length-1) !== "$"\n ) {\n this[propertyName + "$"] = Parent.prototype[propertyName];\n }\n }\n }\n T.prototype = Parent.prototype;\n Child.prototype = new T();\n return Child.prototype;\n};\n\n\nfunction isPrimitive(val) {\n return val == null || val === true || val === false ||\n typeof val === "string" || typeof val === "number";\n\n}\n\nfunction isObject(value) {\n return !isPrimitive(value);\n}\n\nfunction maybeWrapAsError(maybeError) {\n if (!isPrimitive(maybeError)) return maybeError;\n\n return new Error(safeToString(maybeError));\n}\n\nfunction withAppended(target, appendee) {\n var len = target.length;\n var ret = new Array(len + 1);\n var i;\n for (i = 0; i < len; ++i) {\n ret[i] = target[i];\n }\n ret[i] = appendee;\n return ret;\n}\n\nfunction getDataPropertyOrDefault(obj, key, defaultValue) {\n if (es5.isES5) {\n var desc = Object.getOwnPropertyDescriptor(obj, key);\n\n if (desc != null) {\n return desc.get == null && desc.set == null\n ? desc.value\n : defaultValue;\n }\n } else {\n return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;\n }\n}\n\nfunction notEnumerableProp(obj, name, value) {\n if (isPrimitive(obj)) return obj;\n var descriptor = {\n value: value,\n configurable: true,\n enumerable: false,\n writable: true\n };\n es5.defineProperty(obj, name, descriptor);\n return obj;\n}\n\nfunction thrower(r) {\n throw r;\n}\n\nvar inheritedDataKeys = (function() {\n var excludedPrototypes = [\n Array.prototype,\n Object.prototype,\n Function.prototype\n ];\n\n var isExcludedProto = function(val) {\n for (var i = 0; i < excludedPrototypes.length; ++i) {\n if (excludedPrototypes[i] === val) {\n return true;\n }\n }\n return false;\n };\n\n if (es5.isES5) {\n var getKeys = Object.getOwnPropertyNames;\n return function(obj) {\n var ret = [];\n var visitedKeys = Object.create(null);\n while (obj != null && !isExcludedProto(obj)) {\n var keys;\n try {\n keys = getKeys(obj);\n } catch (e) {\n return ret;\n }\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (visitedKeys[key]) continue;\n visitedKeys[key] = true;\n var desc = Object.getOwnPropertyDescriptor(obj, key);\n if (desc != null && desc.get == null && desc.set == null) {\n ret.push(key);\n }\n }\n obj = es5.getPrototypeOf(obj);\n }\n return ret;\n };\n } else {\n var hasProp = {}.hasOwnProperty;\n return function(obj) {\n if (isExcludedProto(obj)) return [];\n var ret = [];\n\n /*jshint forin:false */\n enumeration: for (var key in obj) {\n if (hasProp.call(obj, key)) {\n ret.push(key);\n } else {\n for (var i = 0; i < excludedPrototypes.length; ++i) {\n if (hasProp.call(excludedPrototypes[i], key)) {\n continue enumeration;\n }\n }\n ret.push(key);\n }\n }\n return ret;\n };\n }\n\n})();\n\nvar thisAssignmentPattern = /this\\s*\\.\\s*\\S+\\s*=/;\nfunction isClass(fn) {\n try {\n if (typeof fn === "function") {\n var keys = es5.names(fn.prototype);\n\n var hasMethods = es5.isES5 && keys.length > 1;\n var hasMethodsOtherThanConstructor = keys.length > 0 &&\n !(keys.length === 1 && keys[0] === "constructor");\n var hasThisAssignmentAndStaticMethods =\n thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;\n\n if (hasMethods || hasMethodsOtherThanConstructor ||\n hasThisAssignmentAndStaticMethods) {\n return true;\n }\n }\n return false;\n } catch (e) {\n return false;\n }\n}\n\nfunction toFastProperties(obj) {\n /*jshint -W027,-W055,-W031*/\n function f() {}\n f.prototype = obj;\n var l = 8;\n while (l--) new f();\n return obj;\n eval(obj);\n}\n\nvar rident = /^[a-z$_][a-z$_0-9]*$/i;\nfunction isIdentifier(str) {\n return rident.test(str);\n}\n\nfunction filledRange(count, prefix, suffix) {\n var ret = new Array(count);\n for(var i = 0; i < count; ++i) {\n ret[i] = prefix + i + suffix;\n }\n return ret;\n}\n\nfunction safeToString(obj) {\n try {\n return obj + "";\n } catch (e) {\n return "[no string representation]";\n }\n}\n\nfunction markAsOriginatingFromRejection(e) {\n try {\n notEnumerableProp(e, "isOperational", true);\n }\n catch(ignore) {}\n}\n\nfunction originatesFromRejection(e) {\n if (e == null) return false;\n return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||\n e["isOperational"] === true);\n}\n\nfunction canAttachTrace(obj) {\n return obj instanceof Error && es5.propertyIsWritable(obj, "stack");\n}\n\nvar ensureErrorObject = (function() {\n if (!("stack" in new Error())) {\n return function(value) {\n if (canAttachTrace(value)) return value;\n try {throw new Error(safeToString(value));}\n catch(err) {return err;}\n };\n } else {\n return function(value) {\n if (canAttachTrace(value)) return value;\n return new Error(safeToString(value));\n };\n }\n})();\n\nfunction classString(obj) {\n return {}.toString.call(obj);\n}\n\nfunction copyDescriptors(from, to, filter) {\n var keys = es5.names(from);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (filter(key)) {\n try {\n es5.defineProperty(to, key, es5.getDescriptor(from, key));\n } catch (ignore) {}\n }\n }\n}\n\nvar ret = {\n isClass: isClass,\n isIdentifier: isIdentifier,\n inheritedDataKeys: inheritedDataKeys,\n getDataPropertyOrDefault: getDataPropertyOrDefault,\n thrower: thrower,\n isArray: es5.isArray,\n haveGetters: haveGetters,\n notEnumerableProp: notEnumerableProp,\n isPrimitive: isPrimitive,\n isObject: isObject,\n canEvaluate: canEvaluate,\n errorObj: errorObj,\n tryCatch: tryCatch,\n inherits: inherits,\n withAppended: withAppended,\n maybeWrapAsError: maybeWrapAsError,\n toFastProperties: toFastProperties,\n filledRange: filledRange,\n toString: safeToString,\n canAttachTrace: canAttachTrace,\n ensureErrorObject: ensureErrorObject,\n originatesFromRejection: originatesFromRejection,\n markAsOriginatingFromRejection: markAsOriginatingFromRejection,\n classString: classString,\n copyDescriptors: copyDescriptors,\n hasDevTools: typeof chrome !== "undefined" && chrome &&\n typeof chrome.loadTimes === "function",\n isNode: typeof process !== "undefined" &&\n classString(process).toLowerCase() === "[object process]"\n};\nret.isRecentNode = ret.isNode && (function() {\n var version = process.versions.node.split(".").map(Number);\n return (version[0] === 0 && version[1] > 10) || (version[0] > 0);\n})();\n\nif (ret.isNode) ret.toFastProperties(process);\n\ntry {throw new Error(); } catch (e) {ret.lastLineError = e;}\nmodule.exports = ret;\n\n},{"./es5.js":14}]},{},[4])(4)\n}); ;if (typeof window !== \'undefined\' && window !== null) { window.P = window.Promise; } else if (typeof self !== \'undefined\' && self !== null) { self.P = self.Promise; }\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58), (function() { return this; }()), __webpack_require__(396).setImmediate))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bluebird/js/browser/bluebird.js\n ** module id = 286\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/bluebird/js/browser/bluebird.js?');
},function(module,exports){eval("var charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/charenc/charenc.js\n ** module id = 287\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/charenc/charenc.js?")},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "1d9c7945c7bc7dd0909105119bfbc191.eot";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Bold-webfont.eot\n ** module id = 322\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Bold-webfont.eot?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "56d9d42e23863ce0ee8e8c2e2f22843f.eot";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-ExtraBold-webfont.eot\n ** module id = 323\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-ExtraBold-webfont.eot?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "43d5342998f3607bd61a8239e98b1160.eot";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Italic-webfont.eot\n ** module id = 324\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Italic-webfont.eot?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "09e00aa7622ece30a0f1e06b55f66c2a.eot";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Light-webfont.eot\n ** module id = 325\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Light-webfont.eot?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "c4d82460ef260eb1589e73528cbfb257.eot";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Regular-webfont.eot\n ** module id = 326\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Regular-webfont.eot?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "f28eb362fb6afe946d822ee5451c2146.eot";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Semibold-webfont.eot\n ** module id = 327\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Semibold-webfont.eot?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "f9a25466e5ac752f14dfa013fad9730a.jpg";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/images/auth/loginbg.jpg\n ** module id = 328\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/images/auth/loginbg.jpg?')},function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(process) {'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _warning = __webpack_require__(392);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _ExecutionEnvironment = __webpack_require__(398);\n\nvar _DOMUtils = __webpack_require__(389);\n\nvar _deprecate = __webpack_require__(159);\n\nvar _deprecate2 = _interopRequireDefault(_deprecate);\n\nfunction startBeforeUnloadListener(getBeforeUnloadPromptMessage) {\n function listener(event) {\n var message = getBeforeUnloadPromptMessage();\n\n if (typeof message === 'string') {\n (event || window.event).returnValue = message;\n return message;\n }\n }\n\n _DOMUtils.addEventListener(window, 'beforeunload', listener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'beforeunload', listener);\n };\n}\n\n/**\n * Returns a new createHistory function that can be used to create\n * history objects that know how to use the beforeunload event in web\n * browsers to cancel navigation.\n */\nfunction useBeforeUnload(createHistory) {\n return function (options) {\n var history = createHistory(options);\n\n var stopBeforeUnloadListener = undefined;\n var beforeUnloadHooks = [];\n\n function getBeforeUnloadPromptMessage() {\n var message = undefined;\n\n for (var i = 0, len = beforeUnloadHooks.length; message == null && i < len; ++i) {\n message = beforeUnloadHooks[i].call();\n }return message;\n }\n\n function listenBeforeUnload(hook) {\n beforeUnloadHooks.push(hook);\n\n if (beforeUnloadHooks.length === 1) {\n if (_ExecutionEnvironment.canUseDOM) {\n stopBeforeUnloadListener = startBeforeUnloadListener(getBeforeUnloadPromptMessage);\n } else {\n process.env.NODE_ENV !== 'production' ? _warning2['default'](false, 'listenBeforeUnload only works in DOM environments') : undefined;\n }\n }\n\n return function () {\n beforeUnloadHooks = beforeUnloadHooks.filter(function (item) {\n return item !== hook;\n });\n\n if (beforeUnloadHooks.length === 0 && stopBeforeUnloadListener) {\n stopBeforeUnloadListener();\n stopBeforeUnloadListener = null;\n }\n };\n }\n\n // deprecated\n function registerBeforeUnloadHook(hook) {\n if (_ExecutionEnvironment.canUseDOM && beforeUnloadHooks.indexOf(hook) === -1) {\n beforeUnloadHooks.push(hook);\n\n if (beforeUnloadHooks.length === 1) stopBeforeUnloadListener = startBeforeUnloadListener(getBeforeUnloadPromptMessage);\n }\n }\n\n // deprecated\n function unregisterBeforeUnloadHook(hook) {\n if (beforeUnloadHooks.length > 0) {\n beforeUnloadHooks = beforeUnloadHooks.filter(function (item) {\n return item !== hook;\n });\n\n if (beforeUnloadHooks.length === 0) stopBeforeUnloadListener();\n }\n }\n\n return _extends({}, history, {\n listenBeforeUnload: listenBeforeUnload,\n\n registerBeforeUnloadHook: _deprecate2['default'](registerBeforeUnloadHook, 'registerBeforeUnloadHook is deprecated; use listenBeforeUnload instead'),\n unregisterBeforeUnloadHook: _deprecate2['default'](unregisterBeforeUnloadHook, 'unregisterBeforeUnloadHook is deprecated; use the callback returned from listenBeforeUnload instead')\n });\n };\n}\n\nexports['default'] = useBeforeUnload;\nmodule.exports = exports['default'];\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/history/lib/useBeforeUnload.js\n ** module id = 329\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/history/lib/useBeforeUnload.js?")},function(module,exports,__webpack_require__){eval("(function(){\r\n var crypt = __webpack_require__(546),\r\n utf8 = __webpack_require__(287).utf8,\r\n isBuffer = __webpack_require__(651),\r\n bin = __webpack_require__(287).bin,\r\n\r\n // The core\r\n md5 = function (message, options) {\r\n // Convert to byte array\r\n if (message.constructor == String)\r\n if (options && options.encoding === 'binary')\r\n message = bin.stringToBytes(message);\r\n else\r\n message = utf8.stringToBytes(message);\r\n else if (isBuffer(message))\r\n message = Array.prototype.slice.call(message, 0);\r\n else if (!Array.isArray(message))\r\n message = message.toString();\r\n // else, assume byte array already\r\n\r\n var m = crypt.bytesToWords(message),\r\n l = message.length * 8,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n // Swap endian\r\n for (var i = 0; i < m.length; i++) {\r\n m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |\r\n ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;\r\n }\r\n\r\n // Padding\r\n m[l >>> 5] |= 0x80 << (l % 32);\r\n m[(((l + 64) >>> 9) << 4) + 14] = l;\r\n\r\n // Method shortcuts\r\n var FF = md5._ff,\r\n GG = md5._gg,\r\n HH = md5._hh,\r\n II = md5._ii;\r\n\r\n for (var i = 0; i < m.length; i += 16) {\r\n\r\n var aa = a,\r\n bb = b,\r\n cc = c,\r\n dd = d;\r\n\r\n a = FF(a, b, c, d, m[i+ 0], 7, -680876936);\r\n d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\r\n c = FF(c, d, a, b, m[i+ 2], 17, 606105819);\r\n b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\r\n a = FF(a, b, c, d, m[i+ 4], 7, -176418897);\r\n d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);\r\n c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\r\n b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\r\n a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);\r\n d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\r\n c = FF(c, d, a, b, m[i+10], 17, -42063);\r\n b = FF(b, c, d, a, m[i+11], 22, -1990404162);\r\n a = FF(a, b, c, d, m[i+12], 7, 1804603682);\r\n d = FF(d, a, b, c, m[i+13], 12, -40341101);\r\n c = FF(c, d, a, b, m[i+14], 17, -1502002290);\r\n b = FF(b, c, d, a, m[i+15], 22, 1236535329);\r\n\r\n a = GG(a, b, c, d, m[i+ 1], 5, -165796510);\r\n d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);\r\n c = GG(c, d, a, b, m[i+11], 14, 643717713);\r\n b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\r\n a = GG(a, b, c, d, m[i+ 5], 5, -701558691);\r\n d = GG(d, a, b, c, m[i+10], 9, 38016083);\r\n c = GG(c, d, a, b, m[i+15], 14, -660478335);\r\n b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\r\n a = GG(a, b, c, d, m[i+ 9], 5, 568446438);\r\n d = GG(d, a, b, c, m[i+14], 9, -1019803690);\r\n c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\r\n b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);\r\n a = GG(a, b, c, d, m[i+13], 5, -1444681467);\r\n d = GG(d, a, b, c, m[i+ 2], 9, -51403784);\r\n c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);\r\n b = GG(b, c, d, a, m[i+12], 20, -1926607734);\r\n\r\n a = HH(a, b, c, d, m[i+ 5], 4, -378558);\r\n d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\r\n c = HH(c, d, a, b, m[i+11], 16, 1839030562);\r\n b = HH(b, c, d, a, m[i+14], 23, -35309556);\r\n a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);\r\n d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);\r\n c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\r\n b = HH(b, c, d, a, m[i+10], 23, -1094730640);\r\n a = HH(a, b, c, d, m[i+13], 4, 681279174);\r\n d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\r\n c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\r\n b = HH(b, c, d, a, m[i+ 6], 23, 76029189);\r\n a = HH(a, b, c, d, m[i+ 9], 4, -640364487);\r\n d = HH(d, a, b, c, m[i+12], 11, -421815835);\r\n c = HH(c, d, a, b, m[i+15], 16, 530742520);\r\n b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\r\n\r\n a = II(a, b, c, d, m[i+ 0], 6, -198630844);\r\n d = II(d, a, b, c, m[i+ 7], 10, 1126891415);\r\n c = II(c, d, a, b, m[i+14], 15, -1416354905);\r\n b = II(b, c, d, a, m[i+ 5], 21, -57434055);\r\n a = II(a, b, c, d, m[i+12], 6, 1700485571);\r\n d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\r\n c = II(c, d, a, b, m[i+10], 15, -1051523);\r\n b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\r\n a = II(a, b, c, d, m[i+ 8], 6, 1873313359);\r\n d = II(d, a, b, c, m[i+15], 10, -30611744);\r\n c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\r\n b = II(b, c, d, a, m[i+13], 21, 1309151649);\r\n a = II(a, b, c, d, m[i+ 4], 6, -145523070);\r\n d = II(d, a, b, c, m[i+11], 10, -1120210379);\r\n c = II(c, d, a, b, m[i+ 2], 15, 718787259);\r\n b = II(b, c, d, a, m[i+ 9], 21, -343485551);\r\n\r\n a = (a + aa) >>> 0;\r\n b = (b + bb) >>> 0;\r\n c = (c + cc) >>> 0;\r\n d = (d + dd) >>> 0;\r\n }\r\n\r\n return crypt.endian([a, b, c, d]);\r\n };\r\n\r\n // Auxiliary functions\r\n md5._ff = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & c | ~b & d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._gg = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & d | c & ~d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._hh = function (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._ii = function (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n\r\n // Package private blocksize\r\n md5._blocksize = 16;\r\n md5._digestsize = 16;\r\n\r\n module.exports = function (message, options) {\r\n if(typeof message == 'undefined')\r\n return;\r\n\r\n var digestbytes = crypt.wordsToBytes(md5(message, options));\r\n return options && options.asBytes ? digestbytes :\r\n options && options.asString ? bin.bytesToString(digestbytes) :\r\n crypt.bytesToHex(digestbytes);\r\n };\r\n\r\n})();\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/md5/md5.js\n ** module id = 330\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/md5/md5.js?")},function(module,exports){eval("// Load modules\n\n\n// Declare internals\n\nvar internals = {};\ninternals.hexTable = new Array(256);\nfor (var h = 0; h < 256; ++h) {\n internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase();\n}\n\n\nexports.arrayToObject = function (source, options) {\n\n var obj = options.plainObjects ? Object.create(null) : {};\n for (var i = 0, il = source.length; i < il; ++i) {\n if (typeof source[i] !== 'undefined') {\n\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\n\nexports.merge = function (target, source, options) {\n\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (Array.isArray(target)) {\n target.push(source);\n }\n else if (typeof target === 'object') {\n target[source] = true;\n }\n else {\n target = [target, source];\n }\n\n return target;\n }\n\n if (typeof target !== 'object') {\n target = [target].concat(source);\n return target;\n }\n\n if (Array.isArray(target) &&\n !Array.isArray(source)) {\n\n target = exports.arrayToObject(target, options);\n }\n\n var keys = Object.keys(source);\n for (var k = 0, kl = keys.length; k < kl; ++k) {\n var key = keys[k];\n var value = source[key];\n\n if (!Object.prototype.hasOwnProperty.call(target, key)) {\n target[key] = value;\n }\n else {\n target[key] = exports.merge(target[key], value, options);\n }\n }\n\n return target;\n};\n\n\nexports.decode = function (str) {\n\n try {\n return decodeURIComponent(str.replace(/\\+/g, ' '));\n } catch (e) {\n return str;\n }\n};\n\nexports.encode = function (str) {\n\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n if (typeof str !== 'string') {\n str = '' + str;\n }\n\n var out = '';\n for (var i = 0, il = str.length; i < il; ++i) {\n var c = str.charCodeAt(i);\n\n if (c === 0x2D || // -\n c === 0x2E || // .\n c === 0x5F || // _\n c === 0x7E || // ~\n (c >= 0x30 && c <= 0x39) || // 0-9\n (c >= 0x41 && c <= 0x5A) || // a-z\n (c >= 0x61 && c <= 0x7A)) { // A-Z\n\n out += str[i];\n continue;\n }\n\n if (c < 0x80) {\n out += internals.hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out += internals.hexTable[0xC0 | (c >> 6)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out += internals.hexTable[0xE0 | (c >> 12)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n ++i;\n c = 0x10000 + (((c & 0x3FF) << 10) | (str.charCodeAt(i) & 0x3FF));\n out += internals.hexTable[0xF0 | (c >> 18)] + internals.hexTable[0x80 | ((c >> 12) & 0x3F)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nexports.compact = function (obj, refs) {\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return obj;\n }\n\n refs = refs || [];\n var lookup = refs.indexOf(obj);\n if (lookup !== -1) {\n return refs[lookup];\n }\n\n refs.push(obj);\n\n if (Array.isArray(obj)) {\n var compacted = [];\n\n for (var i = 0, il = obj.length; i < il; ++i) {\n if (typeof obj[i] !== 'undefined') {\n compacted.push(obj[i]);\n }\n }\n\n return compacted;\n }\n\n var keys = Object.keys(obj);\n for (i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n obj[key] = exports.compact(obj[key], refs);\n }\n\n return obj;\n};\n\n\nexports.isRegExp = function (obj) {\n\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\n\nexports.isBuffer = function (obj) {\n\n if (obj === null ||\n typeof obj === 'undefined') {\n\n return false;\n }\n\n return !!(obj.constructor &&\n obj.constructor.isBuffer &&\n obj.constructor.isBuffer(obj));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/qs/lib/utils.js\n ** module id = 331\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/qs/lib/utils.js?")},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){eval("/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-api/modules/index.js\"), RootInstanceProvider = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/RootInstanceProvider.js\"), ReactMount = require(\"react/lib/ReactMount\"), React = require(\"react\"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _rickshaw = __webpack_require__(153);\n\nvar _rickshaw2 = _interopRequireDefault(_rickshaw);\n\nvar _moment = __webpack_require__(21);\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _legacyGraphHelper = __webpack_require__(120);\n\nvar _legacyGraphHelper2 = _interopRequireDefault(_legacyGraphHelper);\n\n_rickshaw2['default'].namespace('Rickshaw.Fixtures.Graylog2Time');\n\nvar Graylog2Time = function Graylog2Time() {\n\n var self = this;\n\n this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n this.units = [{\n name: 'decade',\n seconds: 86400 * 365.25 * 10,\n formatter: function formatter(d) {\n return self.formatDate(d);\n }\n }, {\n name: 'year',\n seconds: 86400 * 365.25,\n formatter: function formatter(d) {\n return self.formatDate(d);\n }\n }, {\n name: 'month',\n seconds: 86400 * 30.5,\n formatter: function formatter(d) {\n return self.formatDate(d);\n }\n }, {\n name: 'week',\n seconds: 86400 * 7,\n formatter: function formatter(d) {\n return self.formatDate(d);\n }\n }, {\n name: 'day',\n seconds: 86400,\n formatter: function formatter(d) {\n return self.formatDate(d);\n }\n }, {\n name: '3 hours',\n seconds: 3600 * 3,\n formatter: function formatter(d) {\n return self.formatDateTime(d);\n }\n }, {\n name: 'hour',\n seconds: 3600,\n formatter: function formatter(d) {\n return self.formatDateTime(d);\n }\n }, {\n name: '15 minutes',\n seconds: 60 * 15,\n formatter: function formatter(d) {\n return self.formatDateTime(d);\n }\n }, {\n name: '5 minutes',\n seconds: 60 * 5,\n formatter: function formatter(d) {\n return self.formatDateTime(d);\n }\n }, {\n name: 'minute',\n seconds: 60,\n formatter: function formatter(d) {\n return self.formatDateTime(d);\n }\n }, {\n name: '15 second',\n seconds: 15,\n formatter: function formatter(d) {\n return self.formatDateTime(d);\n }\n }, {\n name: 'second',\n seconds: 1,\n formatter: function formatter(d) {\n return self.formatDateTime(d);\n }\n }, {\n name: 'millisecond',\n seconds: 1 / 1000,\n formatter: function formatter(d) {\n return self.formatDateTime(d);\n }\n }];\n\n this.unit = function (unitName) {\n return this.units.filter(function (unit) {\n return unitName == unit.name;\n }).shift();\n };\n\n this.formatDateTime = _legacyGraphHelper2['default'].customDateTimeFormat();\n\n // Data in histograms is calculated using UTC. When the histogram resolution is day or lower,\n // we can't extrapolate the data to the user's local time, so we use UTC instead.\n this.formatDate = _legacyGraphHelper2['default'].customDateTimeFormat(0);\n\n this.ceil = function (time, unit) {\n\n var date, floor, year;\n\n if (unit.name == 'week') {\n var momentDate = _moment2['default'].utc(time * 1000);\n momentDate.startOf('isoWeek');\n\n if (momentDate.unix() == time) return time;\n\n momentDate.add(1, 'week');\n return momentDate.unix();\n }\n\n if (unit.name == 'month') {\n\n date = new Date(time * 1000);\n\n floor = Date.UTC(date.getUTCFullYear(), date.getUTCMonth()) / 1000;\n if (floor == time) return time;\n\n year = date.getUTCFullYear();\n var month = date.getUTCMonth();\n\n if (month == 11) {\n month = 0;\n year = year + 1;\n } else {\n month += 1;\n }\n\n return Date.UTC(year, month) / 1000;\n }\n\n if (unit.name == 'year') {\n\n date = new Date(time * 1000);\n\n floor = Date.UTC(date.getUTCFullYear(), 0) / 1000;\n if (floor == time) return time;\n\n year = date.getUTCFullYear() + 1;\n\n return Date.UTC(year, 0) / 1000;\n }\n\n return Math.ceil(time / unit.seconds) * unit.seconds;\n };\n};\n\n_rickshaw2['default'].Fixtures.Graylog2Time = Graylog2Time;\n\nexports['default'] = Graylog2Time;\nmodule.exports = exports['default'];\n\n/* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/makeExportsHot.js\"); if (makeExportsHot(module, require(\"react\"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error(\"Cannot not apply hot update to \" + \"Rickshaw.Fixtures.Graylog2Time.js\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/legacy/Rickshaw.Fixtures.Graylog2Time.js\n ** module id = 373\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/legacy/Rickshaw.Fixtures.Graylog2Time.js?")},function(module,exports,__webpack_require__){eval("/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-api/modules/index.js\"), RootInstanceProvider = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/RootInstanceProvider.js\"), ReactMount = require(\"react/lib/ReactMount\"), React = require(\"react\"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _jquery = __webpack_require__(15);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\n__webpack_require__(183);\n\nvar _rickshaw = __webpack_require__(153);\n\nvar _rickshaw2 = _interopRequireDefault(_rickshaw);\n\nvar _utilNumberUtils = __webpack_require__(52);\n\nvar _utilNumberUtils2 = _interopRequireDefault(_utilNumberUtils);\n\nvar _logicDatetimesDateTime = __webpack_require__(36);\n\nvar _logicDatetimesDateTime2 = _interopRequireDefault(_logicDatetimesDateTime);\n\nvar _injectionStoreProvider = __webpack_require__(3);\n\nvar _injectionStoreProvider2 = _interopRequireDefault(_injectionStoreProvider);\n\nvar SearchStore = _injectionStoreProvider2['default'].getStore('Search');\n\n_rickshaw2['default'].namespace('Rickshaw.Graph.Graylog2Selector');\n\nvar Graylog2Selector = _rickshaw2['default'].Class.create({\n\n initialize: function initialize(args) {\n var graph = args.graph;\n this.graph = args.graph;\n this.build();\n graph.onUpdate((function () {\n this.update();\n }).bind(this));\n },\n\n build: function build() {\n var graph = this.graph;\n var parent = graph.element.getElementsByTagName('svg')[0];\n\n var selectingActive = false;\n var position = this.position = {};\n\n // Create selector box.\n var selectionBox = document.createElement('div');\n selectionBox.setAttribute('class', 'graph-range-selector');\n graph.element.appendChild(selectionBox);\n\n parent.oncontextmenu = function () {\n e.preventDefault();\n };\n\n // Function to reset selection.\n var clearSelection = function clearSelection() {\n selectionBox.style.transition = 'opacity 0.2s ease-out';\n selectionBox.style.opacity = 0;\n\n setTimeout(function () {\n selectionBox.style.width = 0;\n selectionBox.style.height = 0;\n selectionBox.style.top = 0;\n selectionBox.style.left = 0;\n }, 200);\n\n parent.style.pointerEvents = 'auto';\n graph.element.style.cursor = 'auto';\n };\n\n var selectionDraw = function selectionDraw(startPointX) {\n if (selectingActive === true) {\n parent.style.pointerEvents = 'none';\n }\n\n graph.element.style.cursor = 'crosshair';\n graph.element.addEventListener('mousemove', function (e) {\n if (selectingActive === true) {\n position.x = e.offsetX | e.layerX;\n position.deltaX = Math.round(Math.max(position.x, startPointX) - Math.min(position.x, startPointX));\n position.minX = Math.min(position.x, startPointX);\n position.maxX = position.minX + position.deltaX;\n\n selectionBox.style.transition = 'none';\n selectionBox.style.opacity = '1';\n selectionBox.style.width = position.deltaX + \"px\";\n selectionBox.style.height = '100%';\n selectionBox.style.left = position.minX + \"px\";\n } else {\n return false;\n }\n }, false);\n };\n\n // On click in graph until button is released again. (begin of drag)\n graph.element.addEventListener('mousedown', function (e) {\n e.stopPropagation();\n e.preventDefault();\n\n if (e.button === 0 | e.button === 1) {\n var startPointX = e.layerX;\n selectionBox.style.left = e.layerX;\n selectingActive = true;\n selectionDraw(startPointX);\n } else {\n return;\n }\n }, true);\n\n // On mouse button release after click. (end of drag / complete)\n graph.element.addEventListener('mouseup', function (e) {\n selectingActive = false;\n position.xMin = Math.round(graph.x.invert(position.minX));\n position.xMax = Math.round(graph.x.invert(position.maxX));\n\n var from = (0, _jquery2['default'])('#universalsearch .absolute .absolute-from-human');\n var to = (0, _jquery2['default'])('#universalsearch .absolute .absolute-to-human');\n\n if (!_utilNumberUtils2['default'].isNumber(position.xMin) || !_utilNumberUtils2['default'].isNumber(position.xMax)) {\n clearSelection();\n return;\n }\n\n var fromDate = new _logicDatetimesDateTime2['default'](position.xMin * 1000);\n var toDate = new _logicDatetimesDateTime2['default'](position.xMax * 1000);\n\n SearchStore.changeTimeRange('absolute', { from: fromDate.toString(), to: toDate.toString() });\n\n (0, _jquery2['default'])(\".timerange-selector-container\").effect(\"bounce\", {\n complete: function complete() {\n // Submit search directly if alt key is pressed.\n if (e.altKey) {\n submitSearch();\n }\n }\n });\n\n clearSelection();\n }, false);\n\n // Stop at chart boundaries.\n if (graph.dataDomain()[0] === position.xMin) {\n graph.window.xMin = undefined;\n }\n if (graph.dataDomain()[1] === position.xMax) {\n graph.window.xMax = undefined;\n }\n\n graph.window.xMin = position.xMin;\n graph.window.xMax = position.xMax;\n },\n\n update: function update() {\n var graph = this.graph,\n position = this.position;\n graph.window.xMin = position.xMin;\n graph.window.xMax = position.xMax;\n\n if (graph.window.xMin === null) {\n position.xMin = graph.dataDomain()[0];\n }\n\n if (graph.window.xMax === null) {\n position.xMax = graph.dataDomain()[1];\n }\n\n position.xMin = graph.window.xMin;\n position.xMax = graph.window.xMax;\n }\n\n});\n\n_rickshaw2['default'].Graph.Graylog2Selector = Graylog2Selector;\nexports['default'] = Graylog2Selector;\nmodule.exports = exports['default'];\n\n/* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/makeExportsHot.js\"); if (makeExportsHot(module, require(\"react\"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error(\"Cannot not apply hot update to \" + \"Rickshaw.Graph.Graylog2Selector.js\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/legacy/Rickshaw.Graph.Graylog2Selector.js\n ** module id = 374\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/legacy/Rickshaw.Graph.Graylog2Selector.js?");
},function(module,exports,__webpack_require__){eval('/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {\n\n"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nvar Store = {\n set: function set(key, value) {\n localStorage.setItem(key, JSON.stringify(value));\n },\n\n get: function get(key) {\n var value = localStorage.getItem(key);\n if (value === undefined || value === null) {\n return undefined;\n }\n\n try {\n return JSON.parse(value);\n } catch (e) {\n return value;\n }\n },\n\n "delete": function _delete(key) {\n localStorage.removeItem(key);\n }\n};\n\nexports["default"] = Store;\nmodule.exports = exports["default"];\n\n/* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/makeExportsHot.js"); if (makeExportsHot(module, require("react"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "Store.js" + ": " + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/logic/local-storage/Store.js\n ** module id = 375\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/logic/local-storage/Store.js?')},function(module,exports,__webpack_require__){eval("/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-api/modules/index.js\"), RootInstanceProvider = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/RootInstanceProvider.js\"), ReactMount = require(\"react/lib/ReactMount\"), React = require(\"react\"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nvar MessageFieldsFilter = {\n FILTERED_FIELDS: [\n // ElasticSearch fields.\n '_id', '_ttl', '_source', '_all', '_index', '_type', '_score',\n\n // Our reserved fields.\n 'gl2_source_node', 'gl2_source_input', 'gl2_source_collector', 'gl2_source_collector_input', 'gl2_remote_ip', 'gl2_remote_port', 'gl2_remote_hostname', 'streams',\n // TODO Due to be removed in Graylog 3.x\n 'gl2_source_radio', 'gl2_source_radio_input'],\n filterFields: function filterFields(fields) {\n var _this = this;\n\n var result = {};\n\n Object.keys(fields).forEach(function (field) {\n if (_this.FILTERED_FIELDS.indexOf(field) < 0) {\n result[field] = fields[field];\n }\n });\n\n return result;\n }\n};\n\nexports['default'] = MessageFieldsFilter;\nmodule.exports = exports['default'];\n\n/* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require(\"/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/makeExportsHot.js\"); if (makeExportsHot(module, require(\"react\"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error(\"Cannot not apply hot update to \" + \"MessageFieldsFilter.js\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/logic/message/MessageFieldsFilter.js\n ** module id = 376\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/logic/message/MessageFieldsFilter.js?")},function(module,exports,__webpack_require__){eval('/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {\n\n"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nvar AppConfig = {\n gl2ServerUrl: function gl2ServerUrl() {\n return window.appConfig.gl2ServerUrl;\n },\n\n gl2AppPathPrefix: function gl2AppPathPrefix() {\n return window.appConfig.gl2AppPathPrefix;\n },\n\n rootTimeZone: function rootTimeZone() {\n return window.appConfig.rootTimeZone;\n }\n};\n\nexports["default"] = AppConfig;\nmodule.exports = exports["default"];\n\n/* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require("/var/lib/jenkins/jobs/graylog-release/workspace/target/checkout/graylog2-web-interface/node_modules/react-hot-loader/makeExportsHot.js"); if (makeExportsHot(module, require("react"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "AppConfig.js" + ": " + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/util/AppConfig.js\n ** module id = 377\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/util/AppConfig.js?')},,,,,,,,,function(module,exports,__webpack_require__){eval("var refs = 0;\nvar dispose;\nvar content = __webpack_require__(552);\nif(typeof content === 'string') content = [[module.id, content, '']];\nexports.use = exports.ref = function() {\n if(!(refs++)) {\n exports.locals = content.locals;\n dispose = __webpack_require__(29)(content, {});\n }\n return exports;\n};\nexports.unuse = exports.unref = function() {\n if(!(--refs)) {\n dispose();\n dispose = null;\n }\n};\nif(false) {\n var lastRefs = module.hot.data && module.hot.data.refs || 0;\n if(lastRefs) {\n exports.ref();\n if(!content.locals) {\n refs = lastRefs;\n }\n }\n if(!content.locals) {\n module.hot.accept();\n }\n module.hot.dispose(function(data) {\n data.refs = content.locals ? 0 : refs;\n if(dispose) {\n dispose();\n }\n });\n}\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/style-loader/useable.js!./~/css-loader!./~/less-loader!./public/stylesheets/disconnected.less\n ** module id = 386\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/disconnected.less?./~/style-loader/useable.js!./~/css-loader!./~/less-loader")},,function(module,exports){eval("/**\n * Check if `obj` is an object.\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isObject(obj) {\n return null != obj && 'object' == typeof obj;\n}\n\nmodule.exports = isObject;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/superagent/lib/is-object.js\n ** module id = 388\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/superagent/lib/is-object.js?")},function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(132);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/history/lib/DOMUtils.js from dll-reference __vendor\n ** module id = 389\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/history/lib/DOMUtils.js_from_dll-reference___vendor?")},function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(329);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/history/lib/useQueries.js from dll-reference __vendor\n ** module id = 390\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/history/lib/useQueries.js_from_dll-reference___vendor?")},function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(50);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/history/lib/Actions.js from dll-reference __vendor\n ** module id = 391\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/history/lib/Actions.js_from_dll-reference___vendor?")},function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(594);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/warning/browser.js from dll-reference __vendor\n ** module id = 392\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/warning/browser.js_from_dll-reference___vendor?")},,,,function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(636);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/timers-browserify/main.js from dll-reference __vendor\n ** module id = 396\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/timers-browserify/main.js_from_dll-reference___vendor?")},,function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(80);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/history/lib/ExecutionEnvironment.js from dll-reference __vendor\n ** module id = 398\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/history/lib/ExecutionEnvironment.js_from_dll-reference___vendor?")},,,,,,,,function(module,exports,__webpack_require__){eval('"use strict";\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar ApiRoutes = __webpack_require__(14);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar AlarmCallbackHistoryStore = (function () {\n function AlarmCallbackHistoryStore() {}\n AlarmCallbackHistoryStore.prototype.listForAlert = function (streamId, alertId) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Fetching alarm callback history failed with status: " + error, "Could not retrieve alarm callback history.");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.AlarmCallbackHistoryApiController.list(streamId, alertId).url);\n return fetch(\'GET\', url).then(function (response) {\n return response.histories;\n }, failCallback);\n };\n return AlarmCallbackHistoryStore;\n})();\nvar alarmCallbackHistoryStore = new AlarmCallbackHistoryStore();\nmodule.exports = alarmCallbackHistoryStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/alarmcallbacks/AlarmCallbackHistoryStore.ts\n ** module id = 406\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/alarmcallbacks/AlarmCallbackHistoryStore.ts?')},function(module,exports,__webpack_require__){eval('/// \n/// \n/// \n"use strict";\nvar Immutable = __webpack_require__(22);\nvar UserNotification = __webpack_require__(8);\nvar ApiRoutes = __webpack_require__(14);\nvar URLUtils = __webpack_require__(9);\nvar Builder = __webpack_require__(10).Builder;\nvar fetch = __webpack_require__(10)[\'default\'];\nvar PermissionsMixin = __webpack_require__(27);\nvar StoreProvider = __webpack_require__(3);\nvar CurrentUserStore = StoreProvider.getStore(\'CurrentUser\');\nvar DashboardsStore = (function () {\n function DashboardsStore() {\n this._onWritableDashboardsChanged = [];\n this._onDashboardsChanged = [];\n this._dashboards = Immutable.List();\n this._writableDashboards = Immutable.Map();\n }\n Object.defineProperty(DashboardsStore.prototype, "dashboards", {\n get: function get() {\n return this._dashboards;\n },\n set: function set(newDashboards) {\n this._dashboards = newDashboards;\n this._emitDashboardsChange();\n },\n enumerable: true,\n configurable: true\n });\n DashboardsStore.prototype._emitDashboardsChange = function () {\n var _this = this;\n this._onDashboardsChanged.forEach(function (callback) {\n return callback(_this.dashboards);\n });\n };\n Object.defineProperty(DashboardsStore.prototype, "writableDashboards", {\n get: function get() {\n return this._writableDashboards;\n },\n set: function set(newDashboards) {\n this._writableDashboards = newDashboards;\n this._emitWritableDashboardsChange();\n },\n enumerable: true,\n configurable: true\n });\n DashboardsStore.prototype._emitWritableDashboardsChange = function () {\n var _this = this;\n this._onWritableDashboardsChanged.forEach(function (callback) {\n return callback(_this.writableDashboards);\n });\n };\n DashboardsStore.prototype.addOnWritableDashboardsChangedCallback = function (dashboardChangeCallback) {\n this._onWritableDashboardsChanged.push(dashboardChangeCallback);\n };\n DashboardsStore.prototype.addOnDashboardsChangedCallback = function (dashboardChangeCallback) {\n this._onDashboardsChanged.push(dashboardChangeCallback);\n };\n DashboardsStore.prototype.updateWritableDashboards = function () {\n var _this = this;\n var permissions = CurrentUserStore.get().permissions;\n var promise = this.updateDashboards();\n promise.then(function () {\n var dashboards = {};\n _this.getWritableDashboardList(permissions).forEach(function (dashboard) {\n dashboards[dashboard.id] = dashboard;\n });\n _this.writableDashboards = Immutable.Map(dashboards);\n });\n };\n DashboardsStore.prototype.updateDashboards = function () {\n var _this = this;\n var promise = this.listDashboards();\n promise.then(function (dashboardList) {\n _this.dashboards = dashboardList;\n });\n return promise;\n };\n DashboardsStore.prototype.listDashboards = function () {\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.index().url);\n var promise = fetch(\'GET\', url).then(function (response) {\n var dashboardList = Immutable.List(response.dashboards);\n return dashboardList;\n }, function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error("Loading dashboard list failed with status: " + error, "Could not load dashboards");\n }\n });\n return promise;\n };\n DashboardsStore.prototype.getWritableDashboardList = function (permissions) {\n return this.dashboards.toArray().filter(function (dashboard) {\n return PermissionsMixin.isPermitted(permissions, \'dashboards:edit:\' + dashboard.id);\n });\n };\n DashboardsStore.prototype.get = function (id) {\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.get(id).url);\n var promise = new Builder(\'GET\', url).authenticated().setHeader(\'X-Graylog-No-Session-Extension\', \'true\').json().build();\n promise[\'catch\'](function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error("Loading your dashboard failed with status: " + error.message, "Could not load your dashboard");\n }\n });\n return promise;\n };\n DashboardsStore.prototype.createDashboard = function (title, description) {\n var _this = this;\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.create().url);\n var promise = fetch(\'POST\', url, { title: title, description: description }).then(function (response) {\n UserNotification.success("Dashboard successfully created");\n _this.updateWritableDashboards();\n return response.dashboard_id;\n }, function (error) {\n UserNotification.error("Creating dashboard \\"" + title + "\\" failed with status: " + error, "Could not create dashboard");\n });\n return promise;\n };\n DashboardsStore.prototype.saveDashboard = function (dashboard) {\n var _this = this;\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.update(dashboard.id).url);\n var promise = fetch(\'PUT\', url, { title: dashboard.title, description: dashboard.description });\n promise.then(function () {\n UserNotification.success("Dashboard successfully updated");\n _this.updateWritableDashboards();\n }, function (error) {\n UserNotification.error("Saving dashboard \\"" + dashboard.title + "\\" failed with status: " + error, "Could not save dashboard");\n });\n return promise;\n };\n DashboardsStore.prototype.remove = function (dashboard) {\n var _this = this;\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController[\'delete\'](dashboard.id).url);\n var promise = fetch(\'DELETE\', url);\n promise.then(function () {\n UserNotification.success("Dashboard successfully deleted");\n _this.updateWritableDashboards();\n }, function (error) {\n UserNotification.error("Deleting dashboard \\"" + dashboard.title + "\\" failed with status: " + error, "Could not delete dashboard");\n });\n return promise;\n };\n DashboardsStore.prototype.updatePositions = function (dashboard, positions) {\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.updatePositions(dashboard.id).url);\n var promise = fetch(\'PUT\', url, { positions: positions })[\'catch\'](function (error) {\n UserNotification.error("Updating widget positions for dashboard \\"" + dashboard.title + "\\" failed with status: " + error.message, "Could not update dashboard");\n });\n return promise;\n };\n return DashboardsStore;\n})();\nvar dashboardsStore = new DashboardsStore();\nmodule.exports = dashboardsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/dashboards/DashboardsStore.ts\n ** module id = 407\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/dashboards/DashboardsStore.ts?')},function(module,exports,__webpack_require__){eval("/// \n\"use strict\";\nvar $ = __webpack_require__(15);\nvar Immutable = __webpack_require__(22);\nvar Store = __webpack_require__(375);\nvar fieldCharts = __webpack_require__(964);\nvar generateId = fieldCharts.generateId;\nvar FieldChart = fieldCharts.FieldChart;\nvar EventHandlersThrottler = __webpack_require__(122);\nvar UserNotification = __webpack_require__(8);\nvar FieldGraphsStore = (function () {\n function FieldGraphsStore() {\n var _this = this;\n this.resetStore();\n this._eventsThrottle = new EventHandlersThrottler();\n $(document).on('created.graylog.fieldgraph', function (event, data) {\n _this.saveGraph(data.graphOptions['chartid'], data.graphOptions);\n _this.combineStackedGraphs(data.graphOptions['chartid']);\n _this.renderedGraphs.add(data.graphOptions['chartid']);\n if (typeof _this.onFieldGraphCreated === 'function') {\n _this.onFieldGraphCreated(data.graphOptions['chartid']);\n }\n });\n $(document).on('failed.graylog.fieldgraph', function (event, data) {\n UserNotification.error(data.errorMessage, \"Could not create field graph\");\n _this.deleteGraph(data.graphId);\n });\n $(document).on('updated.graylog.fieldgraph', function (event, data) {\n _this.saveGraph(data.graphOptions['chartid'], data.graphOptions);\n });\n $(document).on('merged.graylog.fieldgraph', function (event, data) {\n _this.updateStackedGraphs(data.targetGraphId, data.draggedGraphId);\n });\n window.addEventListener('resize', function () {\n _this._eventsThrottle.throttle(function () {\n return _this.redrawGraphs();\n });\n });\n }\n FieldGraphsStore.prototype.resetStore = function () {\n this.renderedGraphs = Immutable.Set();\n this._fieldGraphs = Immutable.Map(Store.get(\"pinned-field-charts\"));\n this._stackedGraphs = Immutable.fromJS(Store.get(\"stacked-graphs\") || {}, function (key, value) {\n var isIndexed = Immutable.Iterable.isIndexed(value);\n return isIndexed ? value.toSet() : value.toMap();\n });\n FieldChart.reload();\n };\n Object.defineProperty(FieldGraphsStore.prototype, \"fieldGraphs\", {\n get: function get() {\n return this._fieldGraphs;\n },\n set: function set(newFieldGraphs) {\n this._fieldGraphs = newFieldGraphs;\n Store.set(\"pinned-field-charts\", newFieldGraphs.toJS());\n if (typeof this.onFieldGraphsUpdated === 'function') {\n this.onFieldGraphsUpdated(newFieldGraphs);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FieldGraphsStore.prototype, \"stackedGraphs\", {\n get: function get() {\n return this._stackedGraphs;\n },\n set: function set(newStackedGraphs) {\n this._stackedGraphs = newStackedGraphs;\n Store.set(\"stacked-graphs\", newStackedGraphs.toJS());\n if (typeof this.onFieldGraphsMerged === 'function') {\n this.onFieldGraphsMerged(newStackedGraphs);\n }\n },\n enumerable: true,\n configurable: true\n });\n FieldGraphsStore.prototype.combineStackedGraphs = function (graphId) {\n var _this = this;\n this.renderedGraphs = this.renderedGraphs.add(graphId);\n if (this.stackedGraphs.has(graphId)) {\n var stackedGraphs = this.stackedGraphs.get(graphId);\n stackedGraphs.forEach(function (stackedGraphId) {\n if (_this.renderedGraphs.has(stackedGraphId)) {\n _this.stackGraphs(graphId, stackedGraphId);\n }\n });\n } else {\n this.stackedGraphs.forEach(function (stackedGraphs, targetGraphId) {\n if (stackedGraphs.has(graphId) && _this.renderedGraphs.has(targetGraphId)) {\n _this.stackGraphs(targetGraphId, graphId);\n }\n });\n }\n };\n FieldGraphsStore.prototype.saveGraph = function (graphId, graphOptions) {\n this.fieldGraphs = this.fieldGraphs.set(graphId, graphOptions);\n };\n FieldGraphsStore.prototype.deleteGraph = function (graphId) {\n if (this.fieldGraphs.has(graphId)) {\n this.fieldGraphs = this.fieldGraphs['delete'](graphId);\n if (this.stackedGraphs.has(graphId)) {\n this.deleteStackedGraphs(graphId);\n }\n }\n };\n FieldGraphsStore.prototype.updateStackedGraphs = function (targetGraphId, sourceGraphId) {\n var newStackedGraphs = this.stackedGraphs;\n if (newStackedGraphs.has(targetGraphId)) {\n // targetGraphId was a stacked graph\n newStackedGraphs = newStackedGraphs.set(targetGraphId, newStackedGraphs.get(targetGraphId).add(sourceGraphId));\n } else if (newStackedGraphs.has(sourceGraphId)) {\n // draggedGraphId was a stacked graph\n var draggedMergedGraphs = newStackedGraphs.get(sourceGraphId);\n newStackedGraphs = newStackedGraphs.set(targetGraphId, draggedMergedGraphs.add(sourceGraphId));\n newStackedGraphs = newStackedGraphs['delete'](sourceGraphId);\n } else {\n // None of the graphs were merged\n newStackedGraphs = newStackedGraphs.set(targetGraphId, Immutable.Set().add(sourceGraphId));\n }\n this.stackedGraphs = newStackedGraphs;\n };\n FieldGraphsStore.prototype.deleteStackedGraphs = function (graphId) {\n var _this = this;\n var stackedGraphs = this.stackedGraphs.get(graphId);\n stackedGraphs.forEach(function (stackedGraphId) {\n return _this.deleteGraph(stackedGraphId);\n });\n this.stackedGraphs = this.stackedGraphs['delete'](graphId);\n };\n FieldGraphsStore.prototype.newFieldGraph = function (field, options) {\n var graphId = generateId();\n var givenOptions = Immutable.Map(options);\n var defaultOptions = Immutable.Map({ chartid: graphId, field: field });\n this.saveGraph(graphId, defaultOptions.merge(givenOptions).toJS());\n };\n FieldGraphsStore.prototype.renderFieldGraph = function (graphOptions, graphContainer, options) {\n if (options === void 0) {\n options = { 'new': true };\n }\n if (options['new']) {\n FieldChart.renderNewFieldChart(graphOptions, graphContainer);\n } else {\n FieldChart.renderFieldChart(graphOptions, graphContainer, { newGraph: false });\n }\n };\n FieldGraphsStore.prototype.updateFieldGraphData = function (graphId) {\n var seriesName = graphId;\n var graphOptions = this.fieldGraphs.get(graphId);\n var effectiveGraphId;\n // First we figure out if the graphId is part of a stacked graph\n this.stackedGraphs.some(function (stackedGraphsIds, containerGraphId) {\n if (stackedGraphsIds.has(graphId)) {\n effectiveGraphId = containerGraphId;\n return true;\n }\n });\n // If it is not part of a stacked graph, use the graphId given as argument\n if (!effectiveGraphId) {\n effectiveGraphId = graphId;\n }\n FieldChart.updateFieldChartData(effectiveGraphId, graphOptions, seriesName);\n };\n FieldGraphsStore.prototype.stackGraphs = function (targetGraphId, sourceGraphId) {\n FieldChart.stackGraphs(targetGraphId, sourceGraphId);\n };\n FieldGraphsStore.prototype.getFieldGraphAsCreateWidgetRequestParams = function (graphId, widgetType) {\n var graphOptions = this.fieldGraphs.get(graphId);\n if (graphOptions === undefined) {\n throw 'Invalid graph ID \"' + graphId + '\"';\n }\n var requestParams = {\n valuetype: graphOptions['valuetype'],\n renderer: graphOptions['renderer'],\n interpolation: graphOptions['interpolation'],\n interval: graphOptions['interval'],\n field: graphOptions['field'],\n query: graphOptions['query'],\n rangeType: graphOptions['rangetype']\n };\n switch (graphOptions['rangetype']) {\n case \"relative\":\n requestParams['relative'] = graphOptions['range']['relative'];\n break;\n case \"absolute\":\n requestParams['from'] = graphOptions['range']['from'];\n requestParams['to'] = graphOptions['range']['to'];\n break;\n case \"keyword\":\n requestParams['keyword'] = graphOptions['range']['keyword'];\n break;\n }\n return requestParams;\n };\n FieldGraphsStore.prototype.getSeriesInformation = function (graphOptions) {\n var series = {\n query: graphOptions['query'],\n field: graphOptions['field'],\n statistical_function: graphOptions['valuetype']\n };\n return series;\n };\n FieldGraphsStore.prototype.getStackedGraphAsCreateWidgetRequestParams = function (graphId, widgetType) {\n var _this = this;\n var graphOptions = this.fieldGraphs.get(graphId);\n if (graphOptions === undefined) {\n throw 'Invalid graph ID \"' + graphId + '\"';\n }\n var requestParams = {\n renderer: graphOptions['renderer'],\n interpolation: graphOptions['interpolation'],\n interval: graphOptions['interval'],\n rangeType: graphOptions['rangetype']\n };\n var series = [this.getSeriesInformation(graphOptions)];\n var stackedGraphs = this.stackedGraphs.get(graphId);\n stackedGraphs.forEach(function (stackedGraphId) {\n var stackedGraph = _this.fieldGraphs.get(stackedGraphId);\n series.push(_this.getSeriesInformation(stackedGraph));\n }, this);\n requestParams['series'] = series;\n switch (graphOptions['rangetype']) {\n case \"relative\":\n requestParams['relative'] = graphOptions['range']['relative'];\n break;\n case \"absolute\":\n requestParams['from'] = graphOptions['range']['from'];\n requestParams['to'] = graphOptions['range']['to'];\n break;\n case \"keyword\":\n requestParams['keyword'] = graphOptions['range']['keyword'];\n break;\n }\n return requestParams;\n };\n FieldGraphsStore.prototype.redrawGraphs = function () {\n this.fieldGraphs.forEach(function (fieldGraph, id) {\n return FieldChart.redraw(id);\n });\n };\n FieldGraphsStore.FUNCTIONS = Immutable.OrderedMap({\n count: 'Total',\n mean: 'Mean',\n min: 'Minimum',\n max: 'Maximum',\n total: 'Sum',\n cardinality: 'Cardinality'\n });\n return FieldGraphsStore;\n})();\nvar fieldGraphsStore = new FieldGraphsStore();\nmodule.exports = fieldGraphsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/field-analyzers/FieldGraphsStore.ts\n ** module id = 408\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/field-analyzers/FieldGraphsStore.ts?")},function(module,exports,__webpack_require__){eval("/// \n\"use strict\";\nvar fetch = __webpack_require__(10)['default'];\nvar StoreProvider = __webpack_require__(3);\nvar SearchStore = StoreProvider.getStore('Search');\nvar UserNotification = __webpack_require__(8);\nvar ApiRoutes = __webpack_require__(14);\nvar URLUtils = __webpack_require__(9);\nvar FieldQuickValuesStore = {\n getQuickValues: function getQuickValues(field) {\n var originalSearchURLParams = SearchStore.getOriginalSearchURLParams();\n var streamId = SearchStore.searchInStream ? SearchStore.searchInStream.id : null;\n var rangeType = originalSearchURLParams.get('rangetype');\n var timerange = {};\n switch (rangeType) {\n case 'relative':\n timerange['range'] = originalSearchURLParams.get('relative');\n break;\n case 'absolute':\n timerange['from'] = originalSearchURLParams.get('from');\n timerange['to'] = originalSearchURLParams.get('to');\n break;\n case 'keyword':\n timerange['keyword'] = originalSearchURLParams.get('keyword');\n break;\n }\n var url = ApiRoutes.UniversalSearchApiController.fieldTerms(rangeType, originalSearchURLParams.get('q') || '*', field, timerange, streamId).url;\n url = URLUtils.qualifyUrl(url);\n var promise = fetch('GET', url);\n promise['catch'](function (error) {\n UserNotification.error('Loading quick values failed with status: ' + error, 'Could not load quick values');\n });\n return promise;\n }\n};\nmodule.exports = FieldQuickValuesStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/field-analyzers/FieldQuickValuesStore.ts\n ** module id = 409\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/field-analyzers/FieldQuickValuesStore.ts?");
},function(module,exports,__webpack_require__){eval("/// \n/// \n/// \n\"use strict\";\nvar fetch = __webpack_require__(10)['default'];\nvar Immutable = __webpack_require__(22);\nvar ApiRoutes = __webpack_require__(14);\nvar URLUtils = __webpack_require__(9);\nvar UserNotification = __webpack_require__(8);\nvar StoreProvider = __webpack_require__(3);\nvar SearchStore = StoreProvider.getStore('Search');\nvar FieldStatisticsStore = {\n FUNCTIONS: Immutable.OrderedMap({\n count: 'Total',\n mean: 'Mean',\n min: 'Minimum',\n max: 'Maximum',\n std_deviation: 'Std. deviation',\n variance: 'Variance',\n sum: 'Sum',\n cardinality: 'Cardinality'\n }),\n getFieldStatistics: function getFieldStatistics(field) {\n var originalSearchURLParams = SearchStore.getOriginalSearchURLParams();\n var streamId = SearchStore.searchInStream ? SearchStore.searchInStream.id : null;\n var rangeType = originalSearchURLParams.get('rangetype');\n var timerange = {};\n switch (rangeType) {\n case 'relative':\n timerange['range'] = originalSearchURLParams.get('relative');\n break;\n case 'absolute':\n timerange['from'] = originalSearchURLParams.get('from');\n timerange['to'] = originalSearchURLParams.get('to');\n break;\n case 'keyword':\n timerange['keyword'] = originalSearchURLParams.get('keyword');\n break;\n }\n var url = ApiRoutes.UniversalSearchApiController.fieldStats(rangeType, originalSearchURLParams.get('q') || '*', field, timerange, streamId).url;\n url = URLUtils.qualifyUrl(url);\n var promise = fetch('GET', url);\n promise['catch'](function (error) {\n UserNotification.error(\"Loading field statistics failed with status: \" + error, \"Could not load field statistics\");\n });\n return promise;\n }\n};\nmodule.exports = FieldStatisticsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/field-analyzers/FieldStatisticsStore.ts\n ** module id = 410\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/field-analyzers/FieldStatisticsStore.ts?")},function(module,exports,__webpack_require__){eval('/// \n"use strict";\nvar ApiRoutes = __webpack_require__(14);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar FieldsStore = {\n loadFields: function loadFields() {\n var url = ApiRoutes.SystemApiController.fields().url;\n var promise = fetch(\'GET\', URLUtils.qualifyUrl(url));\n promise = promise.then(function (data) {\n return data.fields;\n });\n promise[\'catch\'](function (errorThrown) {\n UserNotification.error("Loading field information failed with status: " + errorThrown.additional.message, "Could not load field information");\n });\n return promise;\n }\n};\nmodule.exports = FieldsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/fields/FieldsStore.ts\n ** module id = 411\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/fields/FieldsStore.ts?')},function(module,exports,__webpack_require__){eval('\'use strict\';\n\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar GrokPatternsStore = {\n URL: URLUtils.qualifyUrl(\'/system/grok\'),\n loadPatterns: function loadPatterns(callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Loading Grok patterns failed with status: " + error.message, "Could not load Grok patterns");\n };\n // get the current list of patterns and sort it by name\n fetch(\'GET\', this.URL).then(function (resp) {\n var patterns = resp.patterns;\n patterns.sort(function (pattern1, pattern2) {\n return pattern1.name.toLowerCase().localeCompare(pattern2.name.toLowerCase());\n });\n callback(patterns);\n }, failCallback);\n },\n savePattern: function savePattern(pattern, callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Saving Grok pattern \\"" + pattern.name + "\\" failed with status: " + error.message, "Could not save Grok pattern");\n };\n var requestPatterb = {\n id: pattern.id,\n pattern: pattern.pattern,\n name: pattern.name,\n \'content_pack\': pattern[\'content_pack\']\n };\n var url = this.URL;\n var method;\n if (pattern.id === "") {\n method = \'POST\';\n } else {\n url += \'/\' + pattern.id;\n method = \'PUT\';\n }\n fetch(method, url, requestPatterb).then(function () {\n callback();\n var action = pattern.id === "" ? "created" : "updated";\n var message = "Grok pattern \\"" + pattern.name + "\\" successfully " + action;\n UserNotification.success(message);\n })[\'catch\'](failCallback);\n },\n deletePattern: function deletePattern(pattern, callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Deleting Grok pattern \\"" + pattern.name + "\\" failed with status: " + error.message, "Could not delete Grok pattern");\n };\n fetch(\'DELETE\', this.URL + "/" + pattern.id).then(function () {\n callback();\n UserNotification.success("Grok pattern \\"" + pattern.name + "\\" successfully deleted");\n })[\'catch\'](failCallback);\n },\n bulkImport: function bulkImport(patterns, replaceAll) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Importing Grok pattern file failed with status: " + error.message, "Could not load Grok patterns");\n };\n var promise = fetch(\'PUT\', this.URL, { patterns: patterns });\n promise[\'catch\'](failCallback);\n return promise;\n }\n};\nmodule.exports = GrokPatternsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/grok-patterns/GrokPatternsStore.ts\n ** module id = 412\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/grok-patterns/GrokPatternsStore.ts?')},function(module,exports,__webpack_require__){eval('/// \n"use strict";\nvar moment = __webpack_require__(21);\nvar ApiRoutes = __webpack_require__(14);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar MessageFieldsFilter = __webpack_require__(376);\nvar MessagesStore = {\n loadMessage: function loadMessage(index, messageId) {\n var url = ApiRoutes.MessagesController.single(index.trim(), messageId.trim()).url;\n var promise = fetch(\'GET\', URLUtils.qualifyUrl(url)).then(function (response) {\n var message = response.message;\n var fields = message.fields;\n var filteredFields = MessageFieldsFilter.filterFields(fields);\n var newMessage = {\n id: message.id,\n timestamp: moment(message.timestamp).unix(),\n filtered_fields: filteredFields,\n formatted_fields: filteredFields,\n fields: fields,\n index: response.index,\n source_node_id: fields.gl2_source_node,\n source_input_id: fields.gl2_source_input,\n stream_ids: message.streams\n };\n return newMessage;\n })[\'catch\'](function (errorThrown) {\n UserNotification.error("Loading message information failed with status: " + errorThrown, "Could not load message information");\n });\n return promise;\n },\n fieldTerms: function fieldTerms(index, string) {\n var url = ApiRoutes.MessagesController.analyze(index, string).url;\n var promise = fetch(\'GET\', URLUtils.qualifyUrl(url)).then(function (response) {\n return response.tokens;\n })[\'catch\'](function (error) {\n UserNotification.error("Loading field terms failed with status: " + error, "Could not load field terms.");\n });\n return promise;\n }\n};\nmodule.exports = MessagesStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/messages/MessagesStore.ts\n ** module id = 413\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/messages/MessagesStore.ts?')},function(module,exports,__webpack_require__){eval('"use strict";\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar ApiRoutes = __webpack_require__(14);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar OutputsStore = {\n OUTPUTS_URL: URLUtils.qualifyUrl(ApiRoutes.OutputsApiController.index().url),\n load: function load(callback) {\n fetch(\'GET\', this.OUTPUTS_URL).then(callback, this._failCallback);\n },\n loadForStreamId: function loadForStreamId(streamId, callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamOutputsApiController.index(streamId).url);\n fetch(\'GET\', url).then(callback, this._failCallback);\n },\n loadAvailableTypes: function loadAvailableTypes(callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.OutputsApiController.availableTypes().url);\n fetch(\'GET\', url).then(callback, this._failCallback);\n },\n loadAvailable: function loadAvailable(typeName, callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.OutputsApiController.availableTypes().url);\n fetch(\'GET\', url).then(function (resp) {\n return resp.types[typeName];\n }, this._failCallback).then(callback);\n },\n remove: function remove(outputId, callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.OutputsApiController[\'delete\'](outputId).url);\n fetch(\'DELETE\', url).then(callback, function (error) {\n UserNotification.error("Terminating output failed with status: " + error, "Could not terminate output");\n });\n },\n save: function save(output, callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Saving Output \\"" + output.title + "\\" failed with status: " + error, "Could not save Output");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.OutputsApiController.create().url);\n fetch(\'POST\', url, output).then(callback, failCallback);\n },\n update: function update(output, deltas, callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Updating Output \\"" + output.title + "\\" failed with status: " + error, "Could not update Output");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.OutputsApiController.update(output.id).url);\n fetch(\'PUT\', url, deltas).then(callback, failCallback);\n },\n _failCallback: function _failCallback(error) {\n UserNotification.error("Loading outputs failed with status: " + error, "Could not load outputs");\n }\n};\nmodule.exports = OutputsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/outputs/OutputsStore.ts\n ** module id = 414\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/outputs/OutputsStore.ts?')},function(module,exports,__webpack_require__){eval("/// \n/// \n/// \n'use strict';\nvar Immutable = __webpack_require__(22);\nvar Routes = __webpack_require__(13);\nvar Qs = __webpack_require__(76);\nvar URLUtils = __webpack_require__(9);\nvar moment = __webpack_require__(21);\nvar SearchStore = (function () {\n function SearchStore() {\n var _this = this;\n this.load(true);\n window.addEventListener('resize', function () {\n return _this.width = window.innerWidth;\n });\n }\n SearchStore.prototype.load = function (firstLoad) {\n var parsedSearch = Immutable.Map(URLUtils.getParsedSearch(window.location));\n this.originalSearch = SearchStore._initializeOriginalSearch(parsedSearch);\n if (firstLoad) {\n this.query = this.originalSearch.get('query');\n this.rangeType = this.originalSearch.get('rangeType');\n this.rangeParams = this.originalSearch.get('rangeParams');\n this.page = this.originalSearch.get('page');\n this.resolution = this.originalSearch.get('resolution');\n this.highlightMessage = this.originalSearch.get('highlightMessage');\n } else {\n this._query = this.originalSearch.get('query');\n this._rangeType = this.originalSearch.get('rangeType');\n this._rangeParams = this.originalSearch.get('rangeParams');\n this._page = this.originalSearch.get('page');\n this._resolution = this.originalSearch.get('resolution');\n this._highlightMessage = this.originalSearch.get('highlightMessage');\n }\n this.savedSearch = this.originalSearch.get('saved');\n this.sortField = this.originalSearch.get('sortField');\n this.sortOrder = this.originalSearch.get('sortOrder');\n this.width = window.innerWidth;\n };\n SearchStore.prototype.unload = function () {\n var _this = this;\n window.removeEventListener('resize', function () {\n return _this.width = window.innerWidth;\n });\n };\n SearchStore.prototype.initializeFieldsFromHash = function () {\n var parsedSearch = Immutable.Map(URLUtils.getParsedSearch(window.location));\n var parsedHash = Immutable.Map(URLUtils.getParsedHash(window.location));\n var fieldsFromHash = parsedHash.get('fields');\n var fieldsFromQuery = parsedSearch.get('fields');\n if (fieldsFromHash === undefined) {\n // no hash value, fall back to query if present\n if (fieldsFromQuery === undefined) {\n // neither hash nor query set, fall back to defaults\n this.fields = Immutable.Set(['message', 'source']);\n } else {\n this.fields = Immutable.Set(fieldsFromQuery.split(','));\n }\n } else {\n // hash value, if present, always wins\n this.fields = Immutable.Set(fieldsFromHash.split(','));\n }\n };\n Object.defineProperty(SearchStore.prototype, \"query\", {\n get: function get() {\n return this._query;\n },\n set: function set(newQuery) {\n this._query = newQuery;\n if (this.onParamsChanged !== undefined) {\n this.onParamsChanged(this.getParams());\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchStore.prototype, \"page\", {\n get: function get() {\n return this._page;\n },\n set: function set(newPage) {\n if (this._page === undefined) {\n this._page = newPage;\n } else {\n this._reloadSearchWithNewParam('page', newPage);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchStore.prototype, \"rangeType\", {\n get: function get() {\n return this._rangeType;\n },\n set: function set(newRangeType) {\n this._rangeType = newRangeType;\n this.rangeParams = this.originalSearch.get('rangeType') === newRangeType ? this.originalSearch.get('rangeParams') : Immutable.Map();\n if (this.onParamsChanged !== undefined) {\n this.onParamsChanged(this.getParams());\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchStore.prototype, \"rangeParams\", {\n get: function get() {\n return this._rangeParams;\n },\n set: function set(value) {\n this._rangeParams = value;\n if (this.onParamsChanged !== undefined) {\n this.onParamsChanged(this.getParams());\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchStore.prototype, \"resolution\", {\n get: function get() {\n return this._resolution;\n },\n set: function set(newResolution) {\n if (this._resolution === undefined) {\n this._resolution = newResolution;\n } else {\n this._reloadSearchWithNewParam('interval', newResolution);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchStore.prototype, \"fields\", {\n get: function get() {\n return this._fields;\n },\n set: function set(newFields) {\n // TODO: Add parameters once we know how to handle them\n //URLUtils.replaceHashParam('fields', newFields.join(','));\n this._fields = newFields;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchStore.prototype, \"highlightMessage\", {\n get: function get() {\n return this._highlightMessage;\n },\n set: function set(id) {\n this._highlightMessage = id;\n },\n enumerable: true,\n configurable: true\n });\n SearchStore.prototype.sort = function (sortField, sortOrder) {\n this._reloadSearchWithNewParams(Immutable.Map({ sortField: sortField, sortOrder: sortOrder }));\n };\n SearchStore._initializeOriginalSearch = function (parsedSearch) {\n var originalSearch = Immutable.Map();\n originalSearch = originalSearch.set('query', parsedSearch.get('q', ''));\n originalSearch = originalSearch.set('resolution', parsedSearch.get('interval'));\n originalSearch = originalSearch.set('page', Math.max(parsedSearch.get('page', 1), 1));\n originalSearch = originalSearch.set('rangeType', parsedSearch.get('rangetype', 'relative'));\n originalSearch = originalSearch.set('sortField', parsedSearch.get('sortField', 'timestamp'));\n originalSearch = originalSearch.set('sortOrder', parsedSearch.get('sortOrder', 'desc'));\n originalSearch = originalSearch.set('highlightMessage', parsedSearch.get('highlightMessage', ''));\n if (parsedSearch.get('saved') !== undefined) {\n originalSearch = originalSearch.set('saved', parsedSearch.get('saved'));\n }\n var rangeParams;\n switch (originalSearch.get('rangeType')) {\n case 'relative':\n rangeParams = Immutable.Map({ relative: Number(parsedSearch.get('relative', 5 * 60)) });\n break;\n case 'absolute':\n rangeParams = Immutable.Map({\n from: parsedSearch.get('from', null),\n to: parsedSearch.get('to', null)\n });\n break;\n case 'keyword':\n rangeParams = Immutable.Map({ keyword: parsedSearch.get('keyword', '') });\n break;\n default:\n throw 'Unsupported range type ' + originalSearch.get('rangeType');\n }\n return originalSearch.set('rangeParams', rangeParams);\n };\n SearchStore.prototype.addSearchTerm = function (field, value, operator) {\n var term = field + \":\" + SearchStore.escape(value);\n var effectiveOperator = operator || SearchStore.AND_OPERATOR;\n this.addQueryTerm(term, effectiveOperator);\n };\n SearchStore.prototype.changeTimeRange = function (newRangeType, newRangeParams) {\n this.rangeType = newRangeType;\n this.rangeParams = Immutable.fromJS(newRangeParams);\n };\n SearchStore.prototype._submitSearch = function (event) {\n if (this.onSubmitSearch !== undefined) {\n this.onSubmitSearch();\n }\n };\n SearchStore.prototype.savedSearchDeleted = function (savedSearchId) {\n if (savedSearchId === this.savedSearch) {\n this._submitSearch(null);\n }\n };\n SearchStore.isPhrase = function (searchTerm) {\n return String(searchTerm).indexOf(\" \") !== -1;\n };\n SearchStore.escape = function (searchTerm) {\n var escapedTerm = String(searchTerm);\n // Replace newlines.\n escapedTerm = escapedTerm.replace(/\\r\\n/g, \" \");\n escapedTerm = escapedTerm.replace(/\\n/g, \" \");\n escapedTerm = escapedTerm.replace(/ /g, \" \");\n if (this.isPhrase(escapedTerm)) {\n escapedTerm = String(escapedTerm).replace(/\\\"/g, '\\\\\"');\n escapedTerm = '\"' + escapedTerm + '\"';\n } else {\n // Escape all lucene special characters from the source: && || : \\ / + - ! ( ) { } [ ] ^ \" ~ * ?\n escapedTerm = String(escapedTerm).replace(/(&&|\\|\\||[\\:\\\\\\/\\+\\-\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?])/g, \"\\\\$&\");\n }\n return escapedTerm;\n };\n SearchStore.prototype.queryContainsTerm = function (termInQuestion) {\n return this.query.indexOf(termInQuestion) != -1;\n };\n SearchStore.prototype.addQueryTerm = function (term, operator) {\n if (this.queryContainsTerm(term)) {\n return;\n }\n var newQuery = \"\";\n if (typeof operator !== 'undefined' && this.query !== \"\" && this.query !== \"*\") {\n newQuery = this.query + \" \" + operator + \" \";\n }\n newQuery += term;\n this.query = newQuery;\n if (this.onAddQueryTerm !== undefined) {\n this.onAddQueryTerm();\n }\n };\n SearchStore.prototype.getParams = function () {\n return {\n query: this.query,\n rangeType: this.rangeType,\n rangeParams: this.rangeParams\n };\n };\n // Get initial search params, with names used in AJAX requests\n SearchStore.prototype.getOriginalSearchParams = function () {\n var originalParams = Immutable.Map();\n originalParams = originalParams.set('range_type', this.originalSearch.get('rangeType'));\n originalParams = originalParams.merge(this.originalSearch.get('rangeParams'));\n originalParams = originalParams.set('query', this.originalSearch.get('query'));\n originalParams = originalParams.set('interval', this.originalSearch.get('resolution'));\n if (this.searchInStream) {\n originalParams = originalParams.set('streamId', this.searchInStream.id);\n }\n return originalParams;\n };\n // Get initial search params with the current selected fields\n SearchStore.prototype.getOriginalSearchParamsWithFields = function () {\n var originalParams = this.getOriginalSearchParams();\n originalParams = originalParams.set('fields', this.fields.join(','));\n return originalParams;\n };\n // Get initial search params, with the names used in a search URL request\n SearchStore.prototype.getOriginalSearchURLParams = function () {\n var originalURLParams = Immutable.Map();\n originalURLParams = originalURLParams.set('rangetype', this.originalSearch.get('rangeType'));\n originalURLParams = originalURLParams.merge(this.originalSearch.get('rangeParams'));\n originalURLParams = originalURLParams.set('q', this.originalSearch.get('query'));\n originalURLParams = originalURLParams.set('interval', this.originalSearch.get('resolution'));\n originalURLParams = originalURLParams.set('page', this.originalSearch.get('page'));\n originalURLParams = originalURLParams.set('fields', this.fields ? this.fields.join(',') : '');\n originalURLParams = originalURLParams.set('sortField', this.originalSearch.get('sortField'));\n originalURLParams = originalURLParams.set('sortOrder', this.originalSearch.get('sortOrder'));\n if (this.originalSearch.has('saved')) {\n originalURLParams = originalURLParams.set('saved', this.originalSearch.get('saved'));\n }\n return originalURLParams;\n };\n SearchStore.prototype.searchBaseLocation = function (action) {\n var location;\n if (this.searchInStream) {\n location = Routes.stream_search(this.searchInStream.id);\n } else {\n location = Routes.SEARCH;\n }\n return location;\n };\n SearchStore.prototype._reloadSearchWithNewParam = function (param, value) {\n var searchURLParams = this.getOriginalSearchURLParams();\n searchURLParams = searchURLParams.set(\"width\", this.width);\n searchURLParams = searchURLParams.set(param, value);\n URLUtils.openLink(this.searchBaseLocation(\"index\") + \"?\" + Qs.stringify(searchURLParams.toJS()), false);\n };\n SearchStore.prototype._reloadSearchWithNewParams = function (newParams) {\n var searchURLParams = this.getOriginalSearchURLParams();\n searchURLParams = searchURLParams.set(\"width\", this.width);\n searchURLParams = searchURLParams.merge(newParams);\n URLUtils.openLink(this.searchBaseLocation(\"index\") + \"?\" + Qs.stringify(searchURLParams.toJS()), false);\n };\n SearchStore.prototype.getCsvExportURL = function () {\n var searchURLParams = this.getOriginalSearchURLParams();\n searchURLParams = searchURLParams['delete']('page');\n return this.searchBaseLocation(\"exportAsCsv\") + \"?\" + Qs.stringify(searchURLParams.toJS());\n };\n SearchStore.prototype.searchSurroundingMessages = function (messageId, fromTime, toTime, filter) {\n var originalParams = this.getOriginalSearchParamsWithFields().toJS();\n var query = Object.keys(filter).filter(function (key) {\n return filter[key];\n }).map(function (key) {\n return key + \":\\\"\" + filter[key] + \"\\\"\";\n }).join(' AND ');\n var params = {\n rangetype: 'absolute',\n from: fromTime,\n to: toTime,\n q: query,\n highlightMessage: messageId,\n fields: originalParams.fields\n };\n URLUtils.openLink(this.searchBaseLocation('index') + '?' + Qs.stringify(params));\n };\n SearchStore.NOT_OPERATOR = \"NOT\";\n SearchStore.OR_OPERATOR = \"OR\";\n SearchStore.AND_OPERATOR = \"AND\";\n return SearchStore;\n})();\nvar searchStore = new SearchStore();\nmodule.exports = searchStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/search/SearchStore.ts\n ** module id = 415\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/search/SearchStore.ts?")},function(module,exports,__webpack_require__){eval("\"use strict\";\nvar $ = __webpack_require__(15);\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar StringUtils = __webpack_require__(44);\nvar fetch = __webpack_require__(10)['default'];\nvar processSourcesData = function processSourcesData(sources) {\n var total = 0;\n var sourcesArray = [];\n $.each(sources, function (name, count) {\n total += count;\n sourcesArray.push({ name: StringUtils.escapeHTML(name), message_count: count });\n });\n sourcesArray.forEach(function (d) {\n d.percentage = d.message_count / total * 100;\n });\n return sourcesArray;\n};\nvar SourcesStore = {\n SOURCES_URL: URLUtils.appPrefixed('/sources'),\n loadSources: function loadSources(range, callback) {\n var url = URLUtils.qualifyUrl(this.SOURCES_URL);\n if (typeof range !== 'undefined') {\n url += \"?range=\" + range;\n }\n fetch('GET', url).then(function (response) {\n var sources = processSourcesData(response.sources);\n callback(sources);\n })['catch'](function (errorThrown) {\n UserNotification.error(\"Loading of sources data failed with status: \" + errorThrown + \". Try reloading the page.\", \"Could not load sources data\");\n });\n }\n};\nmodule.exports = SourcesStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/sources/SourcesStore.ts\n ** module id = 416\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/sources/SourcesStore.ts?")},function(module,exports,__webpack_require__){eval('"use strict";\nvar ApiRoutes = __webpack_require__(14);\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar StreamRulesStore = (function () {\n function StreamRulesStore() {\n this.callbacks = [];\n }\n StreamRulesStore.prototype.types = function (callback) {\n var url = "/streams/null/rules/types";\n var promise = fetch(\'GET\', URLUtils.qualifyUrl(url));\n return promise;\n };\n StreamRulesStore.prototype.list = function (streamId, callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Fetching Stream Rules failed with status: " + error, "Could not retrieve Stream Rules");\n };\n fetch(\'GET\', URLUtils.qualifyUrl(ApiRoutes.StreamRulesApiController.list(streamId).url)).then(callback, failCallback);\n };\n StreamRulesStore.prototype.update = function (streamId, streamRuleId, data, callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Updating Stream Rule failed with status: " + error, "Could not update Stream Rule");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamRulesApiController.update(streamId, streamRuleId).url);\n var request = { field: data.field, type: data.type, value: data.value, inverted: data.inverted };\n fetch(\'PUT\', url, request).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamRulesStore.prototype.remove = function (streamId, streamRuleId, callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Deleting Stream Rule failed with status: " + error, "Could not delete Stream Rule");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamRulesApiController[\'delete\'](streamId, streamRuleId).url);\n fetch(\'DELETE\', url).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamRulesStore.prototype.create = function (streamId, data, callback) {\n var failCallback = function failCallback(error) {\n UserNotification.error("Creating Stream Rule failed with status: " + error, "Could not create Stream Rule");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamRulesApiController.create(streamId).url);\n fetch(\'POST\', url, data).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamRulesStore.prototype.onChange = function (callback) {\n this.callbacks.push(callback);\n };\n StreamRulesStore.prototype._emitChange = function () {\n this.callbacks.forEach(function (callback) {\n return callback();\n });\n };\n return StreamRulesStore;\n})();\nvar streamRulesStore = new StreamRulesStore();\nmodule.exports = streamRulesStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/streams/StreamRulesStore.ts\n ** module id = 417\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/streams/StreamRulesStore.ts?');
},function(module,exports,__webpack_require__){eval('"use strict";\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar ApiRoutes = __webpack_require__(14);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar StreamsStore = (function () {\n function StreamsStore() {\n this.callbacks = [];\n }\n StreamsStore.prototype.listStreams = function () {\n var url = "/streams";\n var promise = fetch(\'GET\', URLUtils.qualifyUrl(url)).then(function (result) {\n return result.streams;\n })[\'catch\'](function (errorThrown) {\n UserNotification.error("Loading streams failed with status: " + errorThrown, "Could not load streams");\n });\n return promise;\n };\n StreamsStore.prototype.load = function (callback) {\n this.listStreams().then(function (streams) {\n callback(streams);\n });\n };\n StreamsStore.prototype.get = function (streamId, callback) {\n var failCallback = function failCallback(errorThrown) {\n UserNotification.error("Loading Stream failed with status: " + errorThrown, "Could not retrieve Stream");\n };\n var url = ApiRoutes.StreamsApiController.get(streamId).url;\n fetch(\'GET\', URLUtils.qualifyUrl(url)).then(callback, failCallback);\n };\n StreamsStore.prototype.remove = function (streamId, callback) {\n var failCallback = function failCallback(errorThrown) {\n UserNotification.error("Removing Stream failed with status: " + errorThrown, "Could not remove Stream");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamsApiController[\'delete\'](streamId).url);\n fetch(\'DELETE\', url).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.pause = function (streamId, callback) {\n var failCallback = function failCallback(errorThrown) {\n UserNotification.error("Pausing Stream failed with status: " + errorThrown, "Could not pause Stream");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamsApiController.pause(streamId).url);\n fetch(\'POST\', url).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.resume = function (streamId, callback) {\n var failCallback = function failCallback(errorThrown) {\n UserNotification.error("Resuming Stream failed with status: " + errorThrown, "Could not resume Stream");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamsApiController.resume(streamId).url);\n fetch(\'POST\', url).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.save = function (stream, callback) {\n var failCallback = function failCallback(errorThrown) {\n UserNotification.error("Saving Stream failed with status: " + errorThrown, "Could not save Stream");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamsApiController.create().url);\n fetch(\'POST\', url, stream).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.update = function (streamId, data, callback) {\n var failCallback = function failCallback(errorThrown) {\n UserNotification.error("Updating Stream failed with status: " + errorThrown, "Could not update Stream");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamsApiController.update(streamId).url);\n fetch(\'PUT\', url, data).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.cloneStream = function (streamId, data, callback) {\n var failCallback = function failCallback(errorThrown) {\n UserNotification.error("Cloning Stream failed with status: " + errorThrown, "Could not clone Stream");\n };\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamsApiController.cloneStream(streamId).url);\n fetch(\'POST\', url, data).then(callback, failCallback).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.removeOutput = function (streamId, outputId, callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamOutputsApiController[\'delete\'](streamId, outputId).url);\n fetch(\'DELETE\', url).then(callback, function (errorThrown) {\n UserNotification.error("Removing output from stream failed with status: " + errorThrown, "Could not remove output from stream");\n }).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.addOutput = function (streamId, outputId, callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamOutputsApiController.add(streamId, outputId).url);\n fetch(\'POST\', url, { outputs: [outputId] }).then(callback, function (errorThrown) {\n UserNotification.error("Adding output to stream failed with status: " + errorThrown, "Could not add output to stream");\n }).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.testMatch = function (streamId, message, callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamsApiController.testMatch(streamId).url);\n fetch(\'POST\', url, message).then(callback, function (error) {\n UserNotification.error("Testing stream rules of stream failed with status: " + error.message, "Could not test stream rules of stream");\n });\n };\n StreamsStore.prototype.addReceiver = function (streamId, type, entity, callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamAlertsApiController.addReceiver(streamId, type, entity).url);\n fetch(\'POST\', url).then(callback, function (error) {\n UserNotification.error("Adding stream alert received failed with error: " + error.message, "Could not add stream alert receiver");\n }).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.deleteReceiver = function (streamId, type, entity, callback) {\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamAlertsApiController.deleteReceiver(streamId, type, entity).url);\n fetch(\'DELETE\', url).then(callback, function (error) {\n UserNotification.error("Deleting stream alert received failed with error: " + error.message, "Could not delete stream alert receiver");\n }).then(this._emitChange.bind(this));\n };\n StreamsStore.prototype.sendDummyAlert = function (streamId) {\n var url = URLUtils.qualifyUrl(ApiRoutes.StreamAlertsApiController.sendDummyAlert(streamId).url);\n var promise = fetch(\'POST\', url);\n return promise;\n };\n StreamsStore.prototype.onChange = function (callback) {\n this.callbacks.push(callback);\n };\n StreamsStore.prototype._emitChange = function () {\n this.callbacks.forEach(function (callback) {\n return callback();\n });\n };\n return StreamsStore;\n})();\nvar streamsStore = new StreamsStore();\nmodule.exports = streamsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/streams/StreamsStore.ts\n ** module id = 418\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/streams/StreamsStore.ts?')},function(module,exports,__webpack_require__){eval("/// \n\"use strict\";\nvar ApiRoutes = __webpack_require__(14);\nvar URLUtils = __webpack_require__(9);\nvar UserNotification = __webpack_require__(8);\nvar fetch = __webpack_require__(10)['default'];\nvar ToolsStore = {\n testNaturalDate: function testNaturalDate(text) {\n var url = ApiRoutes.ToolsApiController.naturalDateTest(text).url;\n var promise = fetch('GET', URLUtils.qualifyUrl(url));\n promise['catch'](function (errorThrown) {\n if (errorThrown.additional.status !== 422) {\n UserNotification.error(\"Loading keyword preview failed with status: \" + errorThrown, \"Could not load keyword preview\");\n }\n });\n return promise;\n },\n testGrok: function testGrok(pattern, string) {\n var url = ApiRoutes.ToolsApiController.grokTest().url;\n var promise = fetch('POST', URLUtils.qualifyUrl(url), { pattern: pattern, string: string });\n promise['catch'](function (errorThrown) {\n UserNotification.error('Details: ' + errorThrown, 'We were not able to run the grok extraction. Please check your parameters.');\n });\n return promise;\n },\n testJSON: function testJSON(flatten, listSeparator, keySeparator, kvSeparator, string) {\n var url = ApiRoutes.ToolsApiController.jsonTest().url;\n var payload = {\n flatten: flatten,\n list_separator: listSeparator,\n key_separator: keySeparator,\n kv_separator: kvSeparator,\n string: string\n };\n var promise = fetch('POST', URLUtils.qualifyUrl(url), payload);\n promise['catch'](function (errorThrown) {\n UserNotification.error('Details: ' + errorThrown, 'We were not able to run the JSON extraction. Please check your parameters.');\n });\n return promise;\n },\n testRegex: function testRegex(regex, string) {\n var url = ApiRoutes.ToolsApiController.regexTest().url;\n var promise = fetch('POST', URLUtils.qualifyUrl(url), { regex: regex, string: string });\n promise['catch'](function (errorThrown) {\n UserNotification.error('Details: ' + errorThrown, 'Could not try regular expression. Make sure that it is valid.');\n });\n return promise;\n },\n testRegexReplace: function testRegexReplace(regex, replacement, replaceAll, string) {\n var url = ApiRoutes.ToolsApiController.regexReplaceTest().url;\n var payload = {\n regex: regex,\n replacement: replacement,\n replace_all: replaceAll,\n string: string\n };\n var promise = fetch('POST', URLUtils.qualifyUrl(url), payload);\n promise['catch'](function (errorThrown) {\n UserNotification.error('Details: ' + errorThrown, 'Could not try regular expression. Make sure that it is valid.');\n });\n return promise;\n },\n testSplitAndIndex: function testSplitAndIndex(splitBy, index, string) {\n var url = ApiRoutes.ToolsApiController.splitAndIndexTest().url;\n var payload = {\n split_by: splitBy,\n index: index,\n string: string\n };\n var promise = fetch('POST', URLUtils.qualifyUrl(url), payload);\n promise['catch'](function (errorThrown) {\n UserNotification.error('Details: ' + errorThrown, 'We were not able to run the split and index extraction. Please check your parameters.');\n });\n return promise;\n },\n testSubstring: function testSubstring(beginIndex, endIndex, string) {\n var url = ApiRoutes.ToolsApiController.substringTest().url;\n var payload = {\n start: beginIndex,\n end: endIndex,\n string: string\n };\n var promise = fetch('POST', URLUtils.qualifyUrl(url), payload);\n promise['catch'](function (errorThrown) {\n UserNotification.error('Details: ' + errorThrown, 'We were not able to run the substring extraction. Please check index boundaries.');\n });\n return promise;\n }\n};\nmodule.exports = ToolsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/tools/ToolsStore.ts\n ** module id = 419\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/tools/ToolsStore.ts?")},function(module,exports,__webpack_require__){eval("/// \n\"use strict\";\nvar ApiRoutes = __webpack_require__(14);\nvar URLUtils = __webpack_require__(9);\nvar fetch = __webpack_require__(10)['default'];\nvar UserNotification = __webpack_require__(8);\nvar UsageStatsOptOutStore = {\n pluginEnabled: function pluginEnabled() {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsageStatsApiController.pluginEnabled().url);\n var promise = fetch('GET', url);\n promise = promise.then(function (response) {\n return response.enabled;\n })['catch'](function () {\n // When the plugin is not loaded the CORS options request will fail and we can't tell at this point\n // what was the cause for the problem. Therefore, we return false and don't notify the user.\n return false;\n });\n return promise;\n },\n getOptOutState: function getOptOutState() {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsageStatsApiController.setOptOutState().url);\n var promise = fetch('GET', url);\n promise = promise['catch'](function () {\n // When the plugin is not loaded the CORS options request will fail and we can't tell at this point\n // what was the cause for the problem. Therefore, we return false and don't notify the user.\n return null;\n });\n return promise;\n },\n setOptOut: function setOptOut(notify) {\n return this._sendOptOutState({ opt_out: true }, function () {\n if (notify === true) {\n UserNotification.success(\"No anonymous usage stats will be sent.\", \"Opt-out created\");\n }\n }, function (error) {\n UserNotification.error(\"Please try again\", \"Setting anonymous usage stats opt-out failed: \" + error);\n });\n },\n setOptIn: function setOptIn(notify) {\n return this._sendOptOutState({ opt_out: false }, function () {\n if (notify === true) {\n UserNotification.success(\"Thank you for helping us making Graylog better!\");\n }\n }, function (error) {\n UserNotification.error(\"Please try again\", \"Opt-in failed: \" + error);\n });\n },\n _sendOptOutState: function _sendOptOutState(optOutState, success, error) {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsageStatsApiController.setOptOutState().url);\n var promise = fetch('POST', url, JSON.stringify(optOutState));\n promise.then(function () {\n return success();\n })['catch'](function (error) {\n return error(error);\n });\n return promise;\n }\n};\nmodule.exports = UsageStatsOptOutStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/usagestats/UsageStatsOptOutStore.ts\n ** module id = 420\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/usagestats/UsageStatsOptOutStore.ts?")},function(module,exports,__webpack_require__){eval('"use strict";\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar PreferencesStore = {\n URL: URLUtils.qualifyUrl(\'/users/\'),\n convertPreferenceMapToArray: function convertPreferenceMapToArray(preferencesAsMap) {\n preferencesAsMap = preferencesAsMap || {};\n var preferences = Object.keys(preferencesAsMap).map(function (name) {\n return {\n name: name,\n value: preferencesAsMap[name]\n };\n });\n preferences = preferences.sort(function (t1, t2) {\n return t1.name.localeCompare(t2.name);\n });\n return preferences;\n },\n convertPreferenceArrayToMap: function convertPreferenceArrayToMap(preferences) {\n var preferencesAsMap = {};\n preferences.forEach(function (element) {\n // TODO: Converting all preferences to booleans for now, we should change this when we support more types\n preferencesAsMap[element.name] = element.value === true || element.value === \'true\';\n });\n return preferencesAsMap;\n },\n saveUserPreferences: function saveUserPreferences(preferences, callback) {\n var _this = this;\n if (!this._userName) {\n throw new Error("Need to load user preferences before you can save them");\n }\n var preferencesAsMap = this.convertPreferenceArrayToMap(preferences);\n var url = this.URL + this._userName + "/preferences";\n fetch(\'PUT\', url, { preferences: preferencesAsMap }).then(function () {\n UserNotification.success("User preferences successfully saved");\n callback(preferences);\n }, function (errorThrown) {\n UserNotification.error("Saving of preferences for \\"" + _this._userName + "\\" failed with status: " + errorThrown, "Could not save user preferences");\n });\n },\n loadUserPreferences: function loadUserPreferences(userName, callback) {\n var _this = this;\n this._userName = userName;\n var url = this.URL + userName;\n var successCallback = function successCallback(data) {\n var sortedArray = _this.convertPreferenceMapToArray(data.preferences);\n callback(sortedArray);\n };\n var failCallback = function failCallback(errorThrown) {\n UserNotification.error("Loading of user preferences for \\"" + userName + "\\" failed with status: " + errorThrown + ". Try reloading the page", "Could not retrieve user preferences from server");\n };\n fetch(\'GET\', url).then(successCallback, failCallback);\n }\n};\nmodule.exports = PreferencesStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/users/PreferencesStore.ts\n ** module id = 421\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/users/PreferencesStore.ts?')},function(module,exports,__webpack_require__){eval('/// \n"use strict";\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar ApiRoutes = __webpack_require__(14);\nvar fetch = __webpack_require__(10)[\'default\'];\nvar RolesStore = {\n loadRoles: function loadRoles() {\n var promise = fetch(\'GET\', URLUtils.qualifyUrl(ApiRoutes.RolesApiController.listRoles().url)).then(function (response) {\n return response.roles;\n }, function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error("Loading role list failed with status: " + error, "Could not load role list");\n }\n });\n return promise;\n },\n createRole: function createRole(role) {\n var url = URLUtils.qualifyUrl(ApiRoutes.RolesApiController.createRole().url);\n var promise = fetch(\'POST\', url, role);\n promise.then(function (newRole) {\n UserNotification.success("Role \\"" + newRole.name + "\\" was created successfully");\n }, function (error) {\n UserNotification.error("Creating role \\"" + role.name + "\\" failed with status: " + error, "Could not create role");\n });\n return promise;\n },\n updateRole: function updateRole(rolename, role) {\n var promise = fetch(\'PUT\', URLUtils.qualifyUrl(ApiRoutes.RolesApiController.updateRole(rolename).url), role);\n promise.then(function (newRole) {\n UserNotification.success("Role \\"" + newRole.name + "\\" was updated successfully");\n }, function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error("Updating role failed with status: " + error, "Could not update role");\n }\n });\n return promise;\n },\n deleteRole: function deleteRole(rolename) {\n var url = URLUtils.qualifyUrl(ApiRoutes.RolesApiController.deleteRole(rolename).url);\n var promise = fetch(\'DELETE\', url);\n promise.then(function () {\n UserNotification.success("Role \\"" + rolename + "\\" was deleted successfully");\n }, function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error("Deleting role failed with status: " + error, "Could not delete role");\n }\n });\n return promise;\n },\n getMembers: function getMembers(rolename) {\n var url = URLUtils.qualifyUrl(ApiRoutes.RolesApiController.loadMembers(rolename).url);\n var promise = fetch(\'GET\', url);\n promise[\'catch\'](function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error("Could not load role\'s members with status: " + error, "Could not load role members");\n }\n });\n return promise;\n }\n};\nmodule.exports = RolesStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/users/RolesStore.ts\n ** module id = 422\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/users/RolesStore.ts?')},function(module,exports,__webpack_require__){eval('/// \n"use strict";\nvar UserNotification = __webpack_require__(8);\nvar URLUtils = __webpack_require__(9);\nvar ApiRoutes = __webpack_require__(14);\nvar fetch = __webpack_require__(10)[\'default\'];\nexports.UsersStore = {\n editUserFormUrl: function editUserFormUrl(username) {\n return URLUtils.qualifyUrl("/system/users/edit/" + username);\n },\n create: function create(request) {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsersApiController.create().url);\n var promise = fetch(\'POST\', url, request);\n return promise;\n },\n loadUsers: function loadUsers() {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsersApiController.list().url);\n var promise = fetch(\'GET\', url).then(function (response) {\n return response.users;\n }, function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error("Loading user list failed with status: " + error, "Could not load user list");\n }\n });\n return promise;\n },\n load: function load(username) {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsersApiController.load(username).url);\n var promise = fetch(\'GET\', url);\n promise[\'catch\'](function (error) {\n UserNotification.error("Loading user failed with status: " + error, "Could not load user " + username);\n });\n return promise;\n },\n deleteUser: function deleteUser(username) {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsersApiController[\'delete\'](username).url);\n var promise = fetch(\'DELETE\', url);\n promise.then(function () {\n UserNotification.success("User \\"" + username + "\\" was deleted successfully");\n }, function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error("Delete user failed with status: " + error, "Could not delete user");\n }\n });\n return promise;\n },\n updateRoles: function updateRoles(username, roles) {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsersApiController.update(username).url);\n var promise = fetch(\'PUT\', url, { roles: roles });\n return promise;\n },\n changePassword: function changePassword(username, request) {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsersApiController.changePassword(username).url);\n var promise = fetch(\'PUT\', url, request);\n return promise;\n },\n update: function update(username, request) {\n var url = URLUtils.qualifyUrl(ApiRoutes.UsersApiController.update(username).url);\n var promise = fetch(\'PUT\', url, request);\n return promise;\n }\n};\nmodule.exports = exports.UsersStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/users/UsersStore.ts\n ** module id = 423\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/users/UsersStore.ts?')},function(module,exports,__webpack_require__){eval("/// \n\"use strict\";\nvar Reflux = __webpack_require__(4);\nvar UserNotification = __webpack_require__(8);\nvar ApiRoutes = __webpack_require__(14);\nvar URLUtils = __webpack_require__(9);\nvar Builder = __webpack_require__(10).Builder;\nvar fetch = __webpack_require__(10)['default'];\nvar ActionsProvider = __webpack_require__(6);\nvar WidgetsActions = ActionsProvider.getActions('Widgets');\nvar WidgetsStore = Reflux.createStore({\n listenables: [WidgetsActions],\n _serializeWidgetForUpdate: function _serializeWidgetForUpdate(widget) {\n return {\n description: widget.description,\n type: widget.type,\n cache_time: widget.cache_time,\n creator_user_id: widget.creator_user_id,\n config: widget.config\n };\n },\n addWidget: function addWidget(dashboardId, widgetType, widgetTitle, widgetConfig) {\n var widgetData = { description: widgetTitle, type: widgetType, config: widgetConfig };\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.addWidget(dashboardId).url);\n var promise = fetch('POST', url, widgetData);\n promise.then(function () {\n return UserNotification.success(\"Widget created successfully\");\n }, function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error(\"Creating widget failed with status: \" + error, \"Could not create widget\");\n }\n });\n return promise;\n },\n loadWidget: function loadWidget(dashboardId, widgetId) {\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.widget(dashboardId, widgetId).url);\n var promise = new Builder('GET', url).authenticated().setHeader('X-Graylog-No-Session-Extension', 'true').json().build();\n promise['catch'](function (error) {\n if (error.additional.status !== 404) {\n UserNotification.error(\"Loading widget information failed with status: \" + error, \"Could not load widget information\");\n }\n });\n return promise;\n },\n updateWidget: function updateWidget(dashboardId, widget) {\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.updateWidget(dashboardId, widget.id).url);\n var promise = fetch('PUT', url, this._serializeWidgetForUpdate(widget));\n promise.then(function () {\n return UserNotification.success(\"Widget updated successfully\");\n }, function (error) {\n UserNotification.error(\"Updating widget \\\"\" + widget.description + \"\\\" failed with status: \" + error.message, \"Could not update widget\");\n });\n return promise;\n },\n loadValue: function loadValue(dashboardId, widgetId, resolution) {\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.widgetValue(dashboardId, widgetId, resolution).url);\n return new Builder('GET', url).authenticated().setHeader('X-Graylog-No-Session-Extension', 'true').json().build();\n },\n removeWidget: function removeWidget(dashboardId, widgetId) {\n var _this = this;\n var url = URLUtils.qualifyUrl(ApiRoutes.DashboardsApiController.removeWidget(dashboardId, widgetId).url);\n var promise = fetch('DELETE', url).then(function () {\n _this.trigger({ 'delete': widgetId });\n });\n WidgetsActions.removeWidget.promise(promise);\n return promise;\n }\n});\nmodule.exports = WidgetsStore;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/stores/widgets/WidgetsStore.ts\n ** module id = 424\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/stores/widgets/WidgetsStore.ts?")},,,,,function(module,exports){eval("\n/**\n * Expose `Emitter`.\n */\n\nmodule.exports = Emitter;\n\n/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nfunction Emitter(obj) {\n if (obj) return mixin(obj);\n};\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on =\nEmitter.prototype.addEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\n .push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function(event, fn){\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off =\nEmitter.prototype.removeListener =\nEmitter.prototype.removeAllListeners =\nEmitter.prototype.removeEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function(event){\n this._callbacks = this._callbacks || {};\n var args = [].slice.call(arguments, 1)\n , callbacks = this._callbacks['$' + event];\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n};\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function(event){\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function(event){\n return !! this.listeners(event).length;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/component-emitter/index.js\n ** module id = 429\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/component-emitter/index.js?")},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports){eval("(function(exports){\ncrossfilter.version = \"1.3.12\";\nfunction crossfilter_identity(d) {\n return d;\n}\ncrossfilter.permute = permute;\n\nfunction permute(array, index) {\n for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) {\n copy[i] = array[index[i]];\n }\n return copy;\n}\nvar bisect = crossfilter.bisect = bisect_by(crossfilter_identity);\n\nbisect.by = bisect_by;\n\nfunction bisect_by(f) {\n\n // Locate the insertion point for x in a to maintain sorted order. The\n // arguments lo and hi may be used to specify a subset of the array which\n // should be considered; by default the entire array is used. If x is already\n // present in a, the insertion point will be before (to the left of) any\n // existing entries. The return value is suitable for use as the first\n // argument to `array.splice` assuming that a is already sorted.\n //\n // The returned insertion point i partitions the array a into two halves so\n // that all v < x for v in a[lo:i] for the left side and all v >= x for v in\n // a[i:hi] for the right side.\n function bisectLeft(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (f(a[mid]) < x) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n // Similar to bisectLeft, but returns an insertion point which comes after (to\n // the right of) any existing entries of x in a.\n //\n // The returned insertion point i partitions the array into two halves so that\n // all v <= x for v in a[lo:i] for the left side and all v > x for v in\n // a[i:hi] for the right side.\n function bisectRight(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (x < f(a[mid])) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n\n bisectRight.right = bisectRight;\n bisectRight.left = bisectLeft;\n return bisectRight;\n}\nvar heap = crossfilter.heap = heap_by(crossfilter_identity);\n\nheap.by = heap_by;\n\nfunction heap_by(f) {\n\n // Builds a binary heap within the specified array a[lo:hi]. The heap has the\n // property such that the parent a[lo+i] is always less than or equal to its\n // two children: a[lo+2*i+1] and a[lo+2*i+2].\n function heap(a, lo, hi) {\n var n = hi - lo,\n i = (n >>> 1) + 1;\n while (--i > 0) sift(a, i, n, lo);\n return a;\n }\n\n // Sorts the specified array a[lo:hi] in descending order, assuming it is\n // already a heap.\n function sort(a, lo, hi) {\n var n = hi - lo,\n t;\n while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo);\n return a;\n }\n\n // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous\n // slice of array a[lo:lo+n]. This method can also be used to update the heap\n // incrementally, without incurring the full cost of reconstructing the heap.\n function sift(a, i, n, lo) {\n var d = a[--lo + i],\n x = f(d),\n child;\n while ((child = i << 1) <= n) {\n if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++;\n if (x <= f(a[lo + child])) break;\n a[lo + i] = a[lo + child];\n i = child;\n }\n a[lo + i] = d;\n }\n\n heap.sort = sort;\n return heap;\n}\nvar heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity);\n\nheapselect.by = heapselect_by;\n\nfunction heapselect_by(f) {\n var heap = heap_by(f);\n\n // Returns a new array containing the top k elements in the array a[lo:hi].\n // The returned array is not sorted, but maintains the heap property. If k is\n // greater than hi - lo, then fewer than k elements will be returned. The\n // order of elements in a is unchanged by this operation.\n function heapselect(a, lo, hi, k) {\n var queue = new Array(k = Math.min(hi - lo, k)),\n min,\n i,\n x,\n d;\n\n for (i = 0; i < k; ++i) queue[i] = a[lo++];\n heap(queue, 0, k);\n\n if (lo < hi) {\n min = f(queue[0]);\n do {\n if (x = f(d = a[lo]) > min) {\n queue[0] = d;\n min = f(heap(queue, 0, k)[0]);\n }\n } while (++lo < hi);\n }\n\n return queue;\n }\n\n return heapselect;\n}\nvar insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity);\n\ninsertionsort.by = insertionsort_by;\n\nfunction insertionsort_by(f) {\n\n function insertionsort(a, lo, hi) {\n for (var i = lo + 1; i < hi; ++i) {\n for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) {\n a[j] = a[j - 1];\n }\n a[j] = t;\n }\n return a;\n }\n\n return insertionsort;\n}\n// Algorithm designed by Vladimir Yaroslavskiy.\n// Implementation based on the Dart project; see lib/dart/LICENSE for details.\n\nvar quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity);\n\nquicksort.by = quicksort_by;\n\nfunction quicksort_by(f) {\n var insertionsort = insertionsort_by(f);\n\n function sort(a, lo, hi) {\n return (hi - lo < quicksort_sizeThreshold\n ? insertionsort\n : quicksort)(a, lo, hi);\n }\n\n function quicksort(a, lo, hi) {\n // Compute the two pivots by looking at 5 elements.\n var sixth = (hi - lo) / 6 | 0,\n i1 = lo + sixth,\n i5 = hi - 1 - sixth,\n i3 = lo + hi - 1 >> 1, // The midpoint.\n i2 = i3 - sixth,\n i4 = i3 + sixth;\n\n var e1 = a[i1], x1 = f(e1),\n e2 = a[i2], x2 = f(e2),\n e3 = a[i3], x3 = f(e3),\n e4 = a[i4], x4 = f(e4),\n e5 = a[i5], x5 = f(e5);\n\n var t;\n\n // Sort the selected 5 elements using a sorting network.\n if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t;\n if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;\n if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t;\n if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;\n if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t;\n if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t;\n if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t;\n if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;\n if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;\n\n var pivot1 = e2, pivotValue1 = x2,\n pivot2 = e4, pivotValue2 = x4;\n\n // e2 and e4 have been saved in the pivot variables. They will be written\n // back, once the partitioning is finished.\n a[i1] = e1;\n a[i2] = a[lo];\n a[i3] = e3;\n a[i4] = a[hi - 1];\n a[i5] = e5;\n\n var less = lo + 1, // First element in the middle partition.\n great = hi - 2; // Last element in the middle partition.\n\n // Note that for value comparison, <, <=, >= and > coerce to a primitive via\n // Object.prototype.valueOf; == and === do not, so in order to be consistent\n // with natural order (such as for Date objects), we must do two compares.\n var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2;\n if (pivotsEqual) {\n\n // Degenerated case where the partitioning becomes a dutch national flag\n // problem.\n //\n // [ | < pivot | == pivot | unpartitioned | > pivot | ]\n // ^ ^ ^ ^ ^\n // left less k great right\n //\n // a[left] and a[right] are undefined and are filled after the\n // partitioning.\n //\n // Invariants:\n // 1) for x in ]left, less[ : x < pivot.\n // 2) for x in [less, k[ : x == pivot.\n // 3) for x in ]great, right[ : x > pivot.\n for (var k = less; k <= great; ++k) {\n var ek = a[k], xk = f(ek);\n if (xk < pivotValue1) {\n if (k !== less) {\n a[k] = a[less];\n a[less] = ek;\n }\n ++less;\n } else if (xk > pivotValue1) {\n\n // Find the first element <= pivot in the range [k - 1, great] and\n // put [:ek:] there. We know that such an element must exist:\n // When k == less, then el3 (which is equal to pivot) lies in the\n // interval. Otherwise a[k - 1] == pivot and the search stops at k-1.\n // Note that in the latter case invariant 2 will be violated for a\n // short amount of time. The invariant will be restored when the\n // pivots are put into their final positions.\n while (true) {\n var greatValue = f(a[great]);\n if (greatValue > pivotValue1) {\n great--;\n // This is the only location in the while-loop where a new\n // iteration is started.\n continue;\n } else if (greatValue < pivotValue1) {\n // Triple exchange.\n a[k] = a[less];\n a[less++] = a[great];\n a[great--] = ek;\n break;\n } else {\n a[k] = a[great];\n a[great--] = ek;\n // Note: if great < k then we will exit the outer loop and fix\n // invariant 2 (which we just violated).\n break;\n }\n }\n }\n }\n } else {\n\n // We partition the list into three parts:\n // 1. < pivot1\n // 2. >= pivot1 && <= pivot2\n // 3. > pivot2\n //\n // During the loop we have:\n // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned | > pivot2 | ]\n // ^ ^ ^ ^ ^\n // left less k great right\n //\n // a[left] and a[right] are undefined and are filled after the\n // partitioning.\n //\n // Invariants:\n // 1. for x in ]left, less[ : x < pivot1\n // 2. for x in [less, k[ : pivot1 <= x && x <= pivot2\n // 3. for x in ]great, right[ : x > pivot2\n for (var k = less; k <= great; k++) {\n var ek = a[k], xk = f(ek);\n if (xk < pivotValue1) {\n if (k !== less) {\n a[k] = a[less];\n a[less] = ek;\n }\n ++less;\n } else {\n if (xk > pivotValue2) {\n while (true) {\n var greatValue = f(a[great]);\n if (greatValue > pivotValue2) {\n great--;\n if (great < k) break;\n // This is the only location inside the loop where a new\n // iteration is started.\n continue;\n } else {\n // a[great] <= pivot2.\n if (greatValue < pivotValue1) {\n // Triple exchange.\n a[k] = a[less];\n a[less++] = a[great];\n a[great--] = ek;\n } else {\n // a[great] >= pivot1.\n a[k] = a[great];\n a[great--] = ek;\n }\n break;\n }\n }\n }\n }\n }\n }\n\n // Move pivots into their final positions.\n // We shrunk the list from both sides (a[left] and a[right] have\n // meaningless values in them) and now we move elements from the first\n // and third partition into these locations so that we can store the\n // pivots.\n a[lo] = a[less - 1];\n a[less - 1] = pivot1;\n a[hi - 1] = a[great + 1];\n a[great + 1] = pivot2;\n\n // The list is now partitioned into three partitions:\n // [ < pivot1 | >= pivot1 && <= pivot2 | > pivot2 ]\n // ^ ^ ^ ^\n // left less great right\n\n // Recursive descent. (Don't include the pivot values.)\n sort(a, lo, less - 1);\n sort(a, great + 2, hi);\n\n if (pivotsEqual) {\n // All elements in the second partition are equal to the pivot. No\n // need to sort them.\n return a;\n }\n\n // In theory it should be enough to call _doSort recursively on the second\n // partition.\n // The Android source however removes the pivot elements from the recursive\n // call if the second partition is too large (more than 2/3 of the list).\n if (less < i1 && great > i5) {\n var lessValue, greatValue;\n while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less;\n while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great;\n\n // Copy paste of the previous 3-way partitioning with adaptions.\n //\n // We partition the list into three parts:\n // 1. == pivot1\n // 2. > pivot1 && < pivot2\n // 3. == pivot2\n //\n // During the loop we have:\n // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned | == pivot2 ]\n // ^ ^ ^\n // less k great\n //\n // Invariants:\n // 1. for x in [ *, less[ : x == pivot1\n // 2. for x in [less, k[ : pivot1 < x && x < pivot2\n // 3. for x in ]great, * ] : x == pivot2\n for (var k = less; k <= great; k++) {\n var ek = a[k], xk = f(ek);\n if (xk <= pivotValue1 && xk >= pivotValue1) {\n if (k !== less) {\n a[k] = a[less];\n a[less] = ek;\n }\n less++;\n } else {\n if (xk <= pivotValue2 && xk >= pivotValue2) {\n while (true) {\n var greatValue = f(a[great]);\n if (greatValue <= pivotValue2 && greatValue >= pivotValue2) {\n great--;\n if (great < k) break;\n // This is the only location inside the loop where a new\n // iteration is started.\n continue;\n } else {\n // a[great] < pivot2.\n if (greatValue < pivotValue1) {\n // Triple exchange.\n a[k] = a[less];\n a[less++] = a[great];\n a[great--] = ek;\n } else {\n // a[great] == pivot1.\n a[k] = a[great];\n a[great--] = ek;\n }\n break;\n }\n }\n }\n }\n }\n }\n\n // The second partition has now been cleared of pivot elements and looks\n // as follows:\n // [ * | > pivot1 && < pivot2 | * ]\n // ^ ^\n // less great\n // Sort the second partition using recursive descent.\n\n // The second partition looks as follows:\n // [ * | >= pivot1 && <= pivot2 | * ]\n // ^ ^\n // less great\n // Simply sort it by recursive descent.\n\n return sort(a, less, great + 1);\n }\n\n return sort;\n}\n\nvar quicksort_sizeThreshold = 32;\nvar crossfilter_array8 = crossfilter_arrayUntyped,\n crossfilter_array16 = crossfilter_arrayUntyped,\n crossfilter_array32 = crossfilter_arrayUntyped,\n crossfilter_arrayLengthen = crossfilter_arrayLengthenUntyped,\n crossfilter_arrayWiden = crossfilter_arrayWidenUntyped;\n\nif (typeof Uint8Array !== \"undefined\") {\n crossfilter_array8 = function(n) { return new Uint8Array(n); };\n crossfilter_array16 = function(n) { return new Uint16Array(n); };\n crossfilter_array32 = function(n) { return new Uint32Array(n); };\n\n crossfilter_arrayLengthen = function(array, length) {\n if (array.length >= length) return array;\n var copy = new array.constructor(length);\n copy.set(array);\n return copy;\n };\n\n crossfilter_arrayWiden = function(array, width) {\n var copy;\n switch (width) {\n case 16: copy = crossfilter_array16(array.length); break;\n case 32: copy = crossfilter_array32(array.length); break;\n default: throw new Error(\"invalid array width!\");\n }\n copy.set(array);\n return copy;\n };\n}\n\nfunction crossfilter_arrayUntyped(n) {\n var array = new Array(n), i = -1;\n while (++i < n) array[i] = 0;\n return array;\n}\n\nfunction crossfilter_arrayLengthenUntyped(array, length) {\n var n = array.length;\n while (n < length) array[n++] = 0;\n return array;\n}\n\nfunction crossfilter_arrayWidenUntyped(array, width) {\n if (width > 32) throw new Error(\"invalid array width!\");\n return array;\n}\nfunction crossfilter_filterExact(bisect, value) {\n return function(values) {\n var n = values.length;\n return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)];\n };\n}\n\nfunction crossfilter_filterRange(bisect, range) {\n var min = range[0],\n max = range[1];\n return function(values) {\n var n = values.length;\n return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)];\n };\n}\n\nfunction crossfilter_filterAll(values) {\n return [0, values.length];\n}\nfunction crossfilter_null() {\n return null;\n}\nfunction crossfilter_zero() {\n return 0;\n}\nfunction crossfilter_reduceIncrement(p) {\n return p + 1;\n}\n\nfunction crossfilter_reduceDecrement(p) {\n return p - 1;\n}\n\nfunction crossfilter_reduceAdd(f) {\n return function(p, v) {\n return p + +f(v);\n };\n}\n\nfunction crossfilter_reduceSubtract(f) {\n return function(p, v) {\n return p - f(v);\n };\n}\nexports.crossfilter = crossfilter;\n\nfunction crossfilter() {\n var crossfilter = {\n add: add,\n remove: removeData,\n dimension: dimension,\n groupAll: groupAll,\n size: size\n };\n\n var data = [], // the records\n n = 0, // the number of records; data.length\n m = 0, // a bit mask representing which dimensions are in use\n M = 8, // number of dimensions that can fit in `filters`\n filters = crossfilter_array8(0), // M bits per record; 1 is filtered out\n filterListeners = [], // when the filters change\n dataListeners = [], // when data is added\n removeDataListeners = []; // when data is removed\n\n // Adds the specified new records to this crossfilter.\n function add(newData) {\n var n0 = n,\n n1 = newData.length;\n\n // If there's actually new data to add…\n // Merge the new data into the existing data.\n // Lengthen the filter bitset to handle the new records.\n // Notify listeners (dimensions and groups) that new data is available.\n if (n1) {\n data = data.concat(newData);\n filters = crossfilter_arrayLengthen(filters, n += n1);\n dataListeners.forEach(function(l) { l(newData, n0, n1); });\n }\n\n return crossfilter;\n }\n\n // Removes all records that match the current filters.\n function removeData() {\n var newIndex = crossfilter_index(n, n),\n removed = [];\n for (var i = 0, j = 0; i < n; ++i) {\n if (filters[i]) newIndex[i] = j++;\n else removed.push(i);\n }\n\n // Remove all matching records from groups.\n filterListeners.forEach(function(l) { l(0, [], removed); });\n\n // Update indexes.\n removeDataListeners.forEach(function(l) { l(newIndex); });\n\n // Remove old filters and data by overwriting.\n for (var i = 0, j = 0, k; i < n; ++i) {\n if (k = filters[i]) {\n if (i !== j) filters[j] = k, data[j] = data[i];\n ++j;\n }\n }\n data.length = j;\n while (n > j) filters[--n] = 0;\n }\n\n // Adds a new dimension with the specified value accessor function.\n function dimension(value) {\n var dimension = {\n filter: filter,\n filterExact: filterExact,\n filterRange: filterRange,\n filterFunction: filterFunction,\n filterAll: filterAll,\n top: top,\n bottom: bottom,\n group: group,\n groupAll: groupAll,\n dispose: dispose,\n remove: dispose // for backwards-compatibility\n };\n\n var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000\n zero = ~one, // inverted one, e.g., 11110111\n values, // sorted, cached array\n index, // value rank ↦ object id\n newValues, // temporary array storing newly-added values\n newIndex, // temporary array storing newly-added index\n sort = quicksort_by(function(i) { return newValues[i]; }),\n refilter = crossfilter_filterAll, // for recomputing filter\n refilterFunction, // the custom filter function in use\n indexListeners = [], // when data is added\n dimensionGroups = [],\n lo0 = 0,\n hi0 = 0;\n\n // Updating a dimension is a two-stage process. First, we must update the\n // associated filters for the newly-added records. Once all dimensions have\n // updated their filters, the groups are notified to update.\n dataListeners.unshift(preAdd);\n dataListeners.push(postAdd);\n\n removeDataListeners.push(removeData);\n\n // Incorporate any existing data into this dimension, and make sure that the\n // filter bitset is wide enough to handle the new dimension.\n m |= one;\n if (M >= 32 ? !one : m & -(1 << M)) {\n filters = crossfilter_arrayWiden(filters, M <<= 1);\n }\n preAdd(data, 0, n);\n postAdd(data, 0, n);\n\n // Incorporates the specified new records into this dimension.\n // This function is responsible for updating filters, values, and index.\n function preAdd(newData, n0, n1) {\n\n // Permute new values into natural order using a sorted index.\n newValues = newData.map(value);\n newIndex = sort(crossfilter_range(n1), 0, n1);\n newValues = permute(newValues, newIndex);\n\n // Bisect newValues to determine which new records are selected.\n var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;\n if (refilterFunction) {\n for (i = 0; i < n1; ++i) {\n if (!refilterFunction(newValues[i], i)) filters[newIndex[i] + n0] |= one;\n }\n } else {\n for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;\n for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;\n }\n\n // If this dimension previously had no data, then we don't need to do the\n // more expensive merge operation; use the new values and index as-is.\n if (!n0) {\n values = newValues;\n index = newIndex;\n lo0 = lo1;\n hi0 = hi1;\n return;\n }\n\n var oldValues = values,\n oldIndex = index,\n i0 = 0,\n i1 = 0;\n\n // Otherwise, create new arrays into which to merge new and old.\n values = new Array(n);\n index = crossfilter_index(n, n);\n\n // Merge the old and new sorted values, and old and new index.\n for (i = 0; i0 < n0 && i1 < n1; ++i) {\n if (oldValues[i0] < newValues[i1]) {\n values[i] = oldValues[i0];\n index[i] = oldIndex[i0++];\n } else {\n values[i] = newValues[i1];\n index[i] = newIndex[i1++] + n0;\n }\n }\n\n // Add any remaining old values.\n for (; i0 < n0; ++i0, ++i) {\n values[i] = oldValues[i0];\n index[i] = oldIndex[i0];\n }\n\n // Add any remaining new values.\n for (; i1 < n1; ++i1, ++i) {\n values[i] = newValues[i1];\n index[i] = newIndex[i1] + n0;\n }\n\n // Bisect again to recompute lo0 and hi0.\n bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];\n }\n\n // When all filters have updated, notify index listeners of the new values.\n function postAdd(newData, n0, n1) {\n indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n newValues = newIndex = null;\n }\n\n function removeData(reIndex) {\n for (var i = 0, j = 0, k; i < n; ++i) {\n if (filters[k = index[i]]) {\n if (i !== j) values[j] = values[i];\n index[j] = reIndex[k];\n ++j;\n }\n }\n values.length = j;\n while (j < n) index[j++] = 0;\n\n // Bisect again to recompute lo0 and hi0.\n var bounds = refilter(values);\n lo0 = bounds[0], hi0 = bounds[1];\n }\n\n // Updates the selected values based on the specified bounds [lo, hi].\n // This implementation is used by all the public filter methods.\n function filterIndexBounds(bounds) {\n var lo1 = bounds[0],\n hi1 = bounds[1];\n\n if (refilterFunction) {\n refilterFunction = null;\n filterIndexFunction(function(d, i) { return lo1 <= i && i < hi1; });\n lo0 = lo1;\n hi0 = hi1;\n return dimension;\n }\n\n var i,\n j,\n k,\n added = [],\n removed = [];\n\n // Fast incremental update based on previous lo index.\n if (lo1 < lo0) {\n for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {\n filters[k = index[i]] ^= one;\n added.push(k);\n }\n } else if (lo1 > lo0) {\n for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {\n filters[k = index[i]] ^= one;\n removed.push(k);\n }\n }\n\n // Fast incremental update based on previous hi index.\n if (hi1 > hi0) {\n for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {\n filters[k = index[i]] ^= one;\n added.push(k);\n }\n } else if (hi1 < hi0) {\n for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {\n filters[k = index[i]] ^= one;\n removed.push(k);\n }\n }\n\n lo0 = lo1;\n hi0 = hi1;\n filterListeners.forEach(function(l) { l(one, added, removed); });\n return dimension;\n }\n\n // Filters this dimension using the specified range, value, or null.\n // If the range is null, this is equivalent to filterAll.\n // If the range is an array, this is equivalent to filterRange.\n // Otherwise, this is equivalent to filterExact.\n function filter(range) {\n return range == null\n ? filterAll() : Array.isArray(range)\n ? filterRange(range) : typeof range === \"function\"\n ? filterFunction(range)\n : filterExact(range);\n }\n\n // Filters this dimension to select the exact value.\n function filterExact(value) {\n return filterIndexBounds((refilter = crossfilter_filterExact(bisect, value))(values));\n }\n\n // Filters this dimension to select the specified range [lo, hi].\n // The lower bound is inclusive, and the upper bound is exclusive.\n function filterRange(range) {\n return filterIndexBounds((refilter = crossfilter_filterRange(bisect, range))(values));\n }\n\n // Clears any filters on this dimension.\n function filterAll() {\n return filterIndexBounds((refilter = crossfilter_filterAll)(values));\n }\n\n // Filters this dimension using an arbitrary function.\n function filterFunction(f) {\n refilter = crossfilter_filterAll;\n\n filterIndexFunction(refilterFunction = f);\n\n lo0 = 0;\n hi0 = n;\n\n return dimension;\n }\n\n function filterIndexFunction(f) {\n var i,\n k,\n x,\n added = [],\n removed = [];\n\n for (i = 0; i < n; ++i) {\n if (!(filters[k = index[i]] & one) ^ !!(x = f(values[i], i))) {\n if (x) filters[k] &= zero, added.push(k);\n else filters[k] |= one, removed.push(k);\n }\n }\n filterListeners.forEach(function(l) { l(one, added, removed); });\n }\n\n // Returns the top K selected records based on this dimension's order.\n // Note: observes this dimension's filter, unlike group and groupAll.\n function top(k) {\n var array = [],\n i = hi0,\n j;\n\n while (--i >= lo0 && k > 0) {\n if (!filters[j = index[i]]) {\n array.push(data[j]);\n --k;\n }\n }\n\n return array;\n }\n\n // Returns the bottom K selected records based on this dimension's order.\n // Note: observes this dimension's filter, unlike group and groupAll.\n function bottom(k) {\n var array = [],\n i = lo0,\n j;\n\n while (i < hi0 && k > 0) {\n if (!filters[j = index[i]]) {\n array.push(data[j]);\n --k;\n }\n i++;\n }\n\n return array;\n }\n\n // Adds a new group to this dimension, using the specified key function.\n function group(key) {\n var group = {\n top: top,\n all: all,\n reduce: reduce,\n reduceCount: reduceCount,\n reduceSum: reduceSum,\n order: order,\n orderNatural: orderNatural,\n size: size,\n dispose: dispose,\n remove: dispose // for backwards-compatibility\n };\n\n // Ensure that this group will be removed when the dimension is removed.\n dimensionGroups.push(group);\n\n var groups, // array of {key, value}\n groupIndex, // object id ↦ group id\n groupWidth = 8,\n groupCapacity = crossfilter_capacity(groupWidth),\n k = 0, // cardinality\n select,\n heap,\n reduceAdd,\n reduceRemove,\n reduceInitial,\n update = crossfilter_null,\n reset = crossfilter_null,\n resetNeeded = true,\n groupAll = key === crossfilter_null;\n\n if (arguments.length < 1) key = crossfilter_identity;\n\n // The group listens to the crossfilter for when any dimension changes, so\n // that it can update the associated reduce values. It must also listen to\n // the parent dimension for when data is added, and compute new keys.\n filterListeners.push(update);\n indexListeners.push(add);\n removeDataListeners.push(removeData);\n\n // Incorporate any existing data into the grouping.\n add(values, index, 0, n);\n\n // Incorporates the specified new values into this group.\n // This function is responsible for updating groups and groupIndex.\n function add(newValues, newIndex, n0, n1) {\n var oldGroups = groups,\n reIndex = crossfilter_index(k, groupCapacity),\n add = reduceAdd,\n initial = reduceInitial,\n k0 = k, // old cardinality\n i0 = 0, // index of old group\n i1 = 0, // index of new record\n j, // object id\n g0, // old group\n x0, // old key\n x1, // new key\n g, // group to add\n x; // key of group to add\n\n // If a reset is needed, we don't need to update the reduce values.\n if (resetNeeded) add = initial = crossfilter_null;\n\n // Reset the new groups (k is a lower bound).\n // Also, make sure that groupIndex exists and is long enough.\n groups = new Array(k), k = 0;\n groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);\n\n // Get the first old key (x0 of g0), if it exists.\n if (k0) x0 = (g0 = oldGroups[0]).key;\n\n // Find the first new key (x1), skipping NaN keys.\n while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;\n\n // While new keys remain…\n while (i1 < n1) {\n\n // Determine the lesser of the two current keys; new and old.\n // If there are no old keys remaining, then always add the new key.\n if (g0 && x0 <= x1) {\n g = g0, x = x0;\n\n // Record the new index of the old group.\n reIndex[i0] = k;\n\n // Retrieve the next old key.\n if (g0 = oldGroups[++i0]) x0 = g0.key;\n } else {\n g = {key: x1, value: initial()}, x = x1;\n }\n\n // Add the lesser group.\n groups[k] = g;\n\n // Add any selected records belonging to the added group, while\n // advancing the new key and populating the associated group index.\n while (!(x1 > x)) {\n groupIndex[j = newIndex[i1] + n0] = k;\n if (!(filters[j] & zero)) g.value = add(g.value, data[j]);\n if (++i1 >= n1) break;\n x1 = key(newValues[i1]);\n }\n\n groupIncrement();\n }\n\n // Add any remaining old groups that were greater than all new keys.\n // No incremental reduce is needed; these groups have no new records.\n // Also record the new index of the old group.\n while (i0 < k0) {\n groups[reIndex[i0] = k] = oldGroups[i0++];\n groupIncrement();\n }\n\n // If we added any new groups before any old groups,\n // update the group index of all the old records.\n if (k > i0) for (i0 = 0; i0 < n0; ++i0) {\n groupIndex[i0] = reIndex[groupIndex[i0]];\n }\n\n // Modify the update and reset behavior based on the cardinality.\n // If the cardinality is less than or equal to one, then the groupIndex\n // is not needed. If the cardinality is zero, then there are no records\n // and therefore no groups to update or reset. Note that we also must\n // change the registered listener to point to the new method.\n j = filterListeners.indexOf(update);\n if (k > 1) {\n update = updateMany;\n reset = resetMany;\n } else {\n if (!k && groupAll) {\n k = 1;\n groups = [{key: null, value: initial()}];\n }\n if (k === 1) {\n update = updateOne;\n reset = resetOne;\n } else {\n update = crossfilter_null;\n reset = crossfilter_null;\n }\n groupIndex = null;\n }\n filterListeners[j] = update;\n\n // Count the number of added groups,\n // and widen the group index as needed.\n function groupIncrement() {\n if (++k === groupCapacity) {\n reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);\n groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);\n groupCapacity = crossfilter_capacity(groupWidth);\n }\n }\n }\n\n function removeData() {\n if (k > 1) {\n var oldK = k,\n oldGroups = groups,\n seenGroups = crossfilter_index(oldK, oldK);\n\n // Filter out non-matches by copying matching group index entries to\n // the beginning of the array.\n for (var i = 0, j = 0; i < n; ++i) {\n if (filters[i]) {\n seenGroups[groupIndex[j] = groupIndex[i]] = 1;\n ++j;\n }\n }\n\n // Reassemble groups including only those groups that were referred\n // to by matching group index entries. Note the new group index in\n // seenGroups.\n groups = [], k = 0;\n for (i = 0; i < oldK; ++i) {\n if (seenGroups[i]) {\n seenGroups[i] = k++;\n groups.push(oldGroups[i]);\n }\n }\n\n if (k > 1) {\n // Reindex the group index using seenGroups to find the new index.\n for (var i = 0; i < j; ++i) groupIndex[i] = seenGroups[groupIndex[i]];\n } else {\n groupIndex = null;\n }\n filterListeners[filterListeners.indexOf(update)] = k > 1\n ? (reset = resetMany, update = updateMany)\n : k === 1 ? (reset = resetOne, update = updateOne)\n : reset = update = crossfilter_null;\n } else if (k === 1) {\n if (groupAll) return;\n for (var i = 0; i < n; ++i) if (filters[i]) return;\n groups = [], k = 0;\n filterListeners[filterListeners.indexOf(update)] =\n update = reset = crossfilter_null;\n }\n }\n\n // Reduces the specified selected or deselected records.\n // This function is only used when the cardinality is greater than 1.\n function updateMany(filterOne, added, removed) {\n if (filterOne === one || resetNeeded) return;\n\n var i,\n k,\n n,\n g;\n\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (!(filters[k = added[i]] & zero)) {\n g = groups[groupIndex[k]];\n g.value = reduceAdd(g.value, data[k]);\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if ((filters[k = removed[i]] & zero) === filterOne) {\n g = groups[groupIndex[k]];\n g.value = reduceRemove(g.value, data[k]);\n }\n }\n }\n\n // Reduces the specified selected or deselected records.\n // This function is only used when the cardinality is 1.\n function updateOne(filterOne, added, removed) {\n if (filterOne === one || resetNeeded) return;\n\n var i,\n k,\n n,\n g = groups[0];\n\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (!(filters[k = added[i]] & zero)) {\n g.value = reduceAdd(g.value, data[k]);\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if ((filters[k = removed[i]] & zero) === filterOne) {\n g.value = reduceRemove(g.value, data[k]);\n }\n }\n }\n\n // Recomputes the group reduce values from scratch.\n // This function is only used when the cardinality is greater than 1.\n function resetMany() {\n var i,\n g;\n\n // Reset all group values.\n for (i = 0; i < k; ++i) {\n groups[i].value = reduceInitial();\n }\n\n // Add any selected records.\n for (i = 0; i < n; ++i) {\n if (!(filters[i] & zero)) {\n g = groups[groupIndex[i]];\n g.value = reduceAdd(g.value, data[i]);\n }\n }\n }\n\n // Recomputes the group reduce values from scratch.\n // This function is only used when the cardinality is 1.\n function resetOne() {\n var i,\n g = groups[0];\n\n // Reset the singleton group values.\n g.value = reduceInitial();\n\n // Add any selected records.\n for (i = 0; i < n; ++i) {\n if (!(filters[i] & zero)) {\n g.value = reduceAdd(g.value, data[i]);\n }\n }\n }\n\n // Returns the array of group values, in the dimension's natural order.\n function all() {\n if (resetNeeded) reset(), resetNeeded = false;\n return groups;\n }\n\n // Returns a new array containing the top K group values, in reduce order.\n function top(k) {\n var top = select(all(), 0, groups.length, k);\n return heap.sort(top, 0, top.length);\n }\n\n // Sets the reduce behavior for this group to use the specified functions.\n // This method lazily recomputes the reduce values, waiting until needed.\n function reduce(add, remove, initial) {\n reduceAdd = add;\n reduceRemove = remove;\n reduceInitial = initial;\n resetNeeded = true;\n return group;\n }\n\n // A convenience method for reducing by count.\n function reduceCount() {\n return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);\n }\n\n // A convenience method for reducing by sum(value).\n function reduceSum(value) {\n return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);\n }\n\n // Sets the reduce order, using the specified accessor.\n function order(value) {\n select = heapselect_by(valueOf);\n heap = heap_by(valueOf);\n function valueOf(d) { return value(d.value); }\n return group;\n }\n\n // A convenience method for natural ordering by reduce value.\n function orderNatural() {\n return order(crossfilter_identity);\n }\n\n // Returns the cardinality of this group, irrespective of any filters.\n function size() {\n return k;\n }\n\n // Removes this group and associated event listeners.\n function dispose() {\n var i = filterListeners.indexOf(update);\n if (i >= 0) filterListeners.splice(i, 1);\n i = indexListeners.indexOf(add);\n if (i >= 0) indexListeners.splice(i, 1);\n i = removeDataListeners.indexOf(removeData);\n if (i >= 0) removeDataListeners.splice(i, 1);\n return group;\n }\n\n return reduceCount().orderNatural();\n }\n\n // A convenience function for generating a singleton group.\n function groupAll() {\n var g = group(crossfilter_null), all = g.all;\n delete g.all;\n delete g.top;\n delete g.order;\n delete g.orderNatural;\n delete g.size;\n g.value = function() { return all()[0].value; };\n return g;\n }\n\n // Removes this dimension and associated groups and event listeners.\n function dispose() {\n dimensionGroups.forEach(function(group) { group.dispose(); });\n var i = dataListeners.indexOf(preAdd);\n if (i >= 0) dataListeners.splice(i, 1);\n i = dataListeners.indexOf(postAdd);\n if (i >= 0) dataListeners.splice(i, 1);\n i = removeDataListeners.indexOf(removeData);\n if (i >= 0) removeDataListeners.splice(i, 1);\n m &= zero;\n return filterAll();\n }\n\n return dimension;\n }\n\n // A convenience method for groupAll on a dummy dimension.\n // This implementation can be optimized since it always has cardinality 1.\n function groupAll() {\n var group = {\n reduce: reduce,\n reduceCount: reduceCount,\n reduceSum: reduceSum,\n value: value,\n dispose: dispose,\n remove: dispose // for backwards-compatibility\n };\n\n var reduceValue,\n reduceAdd,\n reduceRemove,\n reduceInitial,\n resetNeeded = true;\n\n // The group listens to the crossfilter for when any dimension changes, so\n // that it can update the reduce value. It must also listen to the parent\n // dimension for when data is added.\n filterListeners.push(update);\n dataListeners.push(add);\n\n // For consistency; actually a no-op since resetNeeded is true.\n add(data, 0, n);\n\n // Incorporates the specified new values into this group.\n function add(newData, n0) {\n var i;\n\n if (resetNeeded) return;\n\n // Add the added values.\n for (i = n0; i < n; ++i) {\n if (!filters[i]) {\n reduceValue = reduceAdd(reduceValue, data[i]);\n }\n }\n }\n\n // Reduces the specified selected or deselected records.\n function update(filterOne, added, removed) {\n var i,\n k,\n n;\n\n if (resetNeeded) return;\n\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (!filters[k = added[i]]) {\n reduceValue = reduceAdd(reduceValue, data[k]);\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if (filters[k = removed[i]] === filterOne) {\n reduceValue = reduceRemove(reduceValue, data[k]);\n }\n }\n }\n\n // Recomputes the group reduce value from scratch.\n function reset() {\n var i;\n\n reduceValue = reduceInitial();\n\n for (i = 0; i < n; ++i) {\n if (!filters[i]) {\n reduceValue = reduceAdd(reduceValue, data[i]);\n }\n }\n }\n\n // Sets the reduce behavior for this group to use the specified functions.\n // This method lazily recomputes the reduce value, waiting until needed.\n function reduce(add, remove, initial) {\n reduceAdd = add;\n reduceRemove = remove;\n reduceInitial = initial;\n resetNeeded = true;\n return group;\n }\n\n // A convenience method for reducing by count.\n function reduceCount() {\n return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);\n }\n\n // A convenience method for reducing by sum(value).\n function reduceSum(value) {\n return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);\n }\n\n // Returns the computed reduce value.\n function value() {\n if (resetNeeded) reset(), resetNeeded = false;\n return reduceValue;\n }\n\n // Removes this group and associated event listeners.\n function dispose() {\n var i = filterListeners.indexOf(update);\n if (i >= 0) filterListeners.splice(i);\n i = dataListeners.indexOf(add);\n if (i >= 0) dataListeners.splice(i);\n return group;\n }\n\n return reduceCount();\n }\n\n // Returns the number of records in this crossfilter, irrespective of any filters.\n function size() {\n return n;\n }\n\n return arguments.length\n ? add(arguments[0])\n : crossfilter;\n}\n\n// Returns an array of size n, big enough to store ids up to m.\nfunction crossfilter_index(n, m) {\n return (m < 0x101\n ? crossfilter_array8 : m < 0x10001\n ? crossfilter_array16\n : crossfilter_array32)(n);\n}\n\n// Constructs a new array of size n, with sequential values from 0 to n - 1.\nfunction crossfilter_range(n) {\n var range = crossfilter_index(n, n);\n for (var i = -1; ++i < n;) range[i] = i;\n return range;\n}\n\nfunction crossfilter_capacity(w) {\n return w === 8\n ? 0x100 : w === 16\n ? 0x10000\n : 0x100000000;\n}\n})(typeof exports !== 'undefined' && exports || this);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/crossfilter/crossfilter.js\n ** module id = 545\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/crossfilter/crossfilter.js?");
},function(module,exports){eval("(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/crypt/crypt.js\n ** module id = 546\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/crypt/crypt.js?")},,,,function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, ".dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;content:\\" \\";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;border-radius:6px 0 6px 6px}.right-menu{right:0;left:auto}.left-submenu{float:none}.left-submenu>.dropdown-menu{border-radius:6px 0 6px 6px;left:auto;margin-left:10px;right:98%}", ""]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./~/less-loader!./public/stylesheets/bootstrap-submenus.less\n ** module id = 550\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/bootstrap-submenus.less?./~/css-loader!./~/less-loader')},,function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, "body{font-family:Open Sans,sans-serif;background:url(" + __webpack_require__(328) + ") no-repeat 50% fixed;background-size:cover}#disconnected-box{margin-top:120px}#disconnected-box-content{background-color:#fff;box-shadow:0 0 40px #000}.never-seen-warning{margin-top:4px;margin-left:10px}.via-node-headline{margin-left:20px}.via-node-headline:hover{cursor:pointer}.discovered-node-link{margin-left:20px}.discovered-node-link:hover{cursor:pointer}#nodes-box,hr{margin-top:10px}hr{margin-bottom:10px}", ""]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./~/less-loader!./public/stylesheets/disconnected.less\n ** module id = 552\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/disconnected.less?./~/css-loader!./~/less-loader')},function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, "#editor{height:256px}body{background-color:#e3e3e3;font-family:Open Sans,sans-serif;font-size:12px;overflow-x:hidden;margin-top:45px}ul{list-style-type:none;margin:0}hr{border-top:1px solid #e3e3e3}h1,h2,h3,h4,h5,h6{font-weight:400;padding:0;margin:0;color:#333}h1{font-size:28px}h2{font-size:21px}h3{font-size:18px}h4{font-size:14px;font-weight:700;font-weight:400}a{color:#16ace3}.btn:active,a:active,input[type=checkbox]:active,input[type=file]:active,input[type=radio]:active,select:active{outline:none;outline-offset:0}input.form-control,select.form-control,textarea.form-control{color:#666}.input-group-addon.input-group-separator{border-right-width:0;border-left-width:0}label{font-size:14px}legend small{color:#aaa;margin-left:5px}.btn:focus{background-position:0}#footer{text-align:center;font-size:11px;color:#aaa;margin-bottom:15px}.modal-title{font-size:21px}.modal-dialog{margin-top:55px!important}.modal .modal-backdrop{z-index:0}.modal-backdrop{height:100000%;z-index:1030}.navbar-brand{width:155px}#universalsearch{padding:15px;background-color:#fff;border:1px solid #d1d1d1}#universalsearch-container{padding:0 25px}.content{padding-top:15px;padding-bottom:15px;background-color:#fff;border:1px solid #d1d1d1;margin-bottom:10px}.content p.description{margin-top:3px}.content-head{padding-bottom:0}.content p.description{color:#939393}.content-head p{margin-top:15px}.content-head .actions-lg{float:right}.actions-lg .actions-container{height:60px;margin-top:10px;padding-left:50px}.content-head .actions-sm{padding-bottom:15px}.content-head .description-tooltips .fa-stack{margin-right:3px}.content p.description-tooltips-small .fa-stack{margin-right:1px;position:relative;top:-1px}.content p.description-tooltips{margin-top:10px}.content-col{padding:15px 10px;background-color:#fff;border:1px solid #d1d1d1;margin-top:15px}#sidebar{padding-left:0}@media (max-height:991px){#sidebar{padding-right:0}}@media (min-width:991px){#sidebar{padding-right:15px}}@media (max-width:991px){#sidebar .affix{position:relative}}@media (min-width:991px){#sidebar .affix{top:45px;z-index:1000;position:fixed}}#sidebar .actions{margin-top:10px}#sidebar .actions>div{margin:5px 5px 0 0}#main-row{margin-bottom:0}#main-content-sidebar{padding-left:0;padding-right:0}#main-content{margin-top:10px;padding:5px 25px}#main-content-search{margin-bottom:0;margin-top:-15px}#universalsearch{padding:5px;margin-bottom:0;margin-top:15px}.universalsearch-timerange-selector{font-size:12px}.universalsearch-timerange-selector label{font-size:12px;margin-left:5px!important}.universalsearch-timerange-selector .radio input{margin-left:-17px;position:relative;top:-2px}.universalsearch-form{margin-bottom:0}.universalsearch-form #search-container{margin-left:5px}.universalsearch-form button{font-size:13px}.universalsearch-form button.btn-sm{font-size:12px}.universalsearch-form div .query{margin-left:45px;margin-right:25px}.universalsearch-form .query input{font-family:monospace;font-size:13px;width:100%;border:0;background-color:#fff;box-shadow:none;color:inherit;-moz-box-shadow:none;-webkit-box-shadow:none;-webkit-transition:none;transition:none;outline:none;padding:0;margin-left:5px;margin-bottom:5px}.universalsearch-form .form-group{margin-bottom:0}a.fields-set-chooser{margin-right:2px;margin-left:2px}#result-graph-container{margin-right:12px;margin-bottom:25px}#result-graph{margin-top:5px}#result-graph,#result-graph-timeline{margin-left:40px}#y_axis{float:left;height:200px;width:40px}.search-result-fields{margin-top:3px;padding-left:0}.search-result-fields li{margin-top:1px;margin-bottom:1px;padding:2px 0}.search-result-fields label{font-size:12px;display:inline;position:relative;top:3px;font-weight:400!important}.search-result-fields .form-group{margin-bottom:0}.search-result-fields .checkbox{margin:0}.search-result-fields input[type=checkbox]{position:relative;right:4px}.search-result-fields .dropdown .caret{display:none}.search-result-fields button.dropdown-toggle{padding:0}.message-terms{margin-right:8px;font-family:monospace}.support-sources ul{margin-top:5px}.systemjob{margin-top:10px;border-bottom:1px solid #ccc}.systemjob .progress{margin-top:2px;margin-bottom:5px}.systemjob .finished{display:none;position:relative;top:-1px;left:2px;font-family:Arial,sans-serif;font-size:11px}.notifications-none,.systemjobs-none{margin-top:10px}.notification-badge-link:hover{border:0!important;text-decoration:none!important}.row{margin-bottom:15px}.alert,.no-bm{margin-bottom:0}.alert{margin-top:5px}.system-messages{font-size:12px}.notification{margin-top:10px!important}.notification i{color:#000}.notification-head{margin-bottom:5px}.notification-timestamp{margin-left:3px;font-size:10px}.notification-solutions{margin-top:10px}.notification-solutions label{font-size:13px}.notification form{margin-bottom:0}.notification-solutions h4{font-size:13px;font-weight:700;margin-bottom:1px}.notification-solutions .btn{margin-top:3px;font-size:12px;padding:3px 11px}.node-row{border-bottom:1px solid #ccc;padding-bottom:8px;margin-top:15px;margin-bottom:0}.change-message-processing{position:relative;top:-1px}.es-cluster-status{margin-top:10px;margin-bottom:5px}.node-row .hostname{font-size:12px}.rickshaw_graph .x_tick{position:relative;top:38px}.graph-resolution-selector{margin-top:5px;margin-bottom:20px}.graph-resolution-selector li{padding-right:0}.graph-resolution-selector a{text-transform:capitalize}.selected-resolution{font-weight:700}.search-result-fields .fa-cog{position:relative;top:3px}.modal form{margin-bottom:0}s .input-list h2{margin-bottom:5px}.node-row{margin-bottom:8px;margin-top:0}.node-row .well{margin-bottom:0;margin-top:3px;font-family:monospace;font-size:11px}.node-row-info{position:relative;top:2px}.node-row-info form{display:inline}.node-row-info .text{position:relative;top:3px}.node-row-info-negative-correction{position:relative;top:-15px}.input-list .alert{margin-top:10px}.input-new{margin-bottom:8px}.alert-bar{margin:10px -20px 0}.system-messages a{color:#000}.xtrc-new-example{margin-bottom:5px;font-family:monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word}.xtrc-no-example{margin-top:15px;margin-bottom:12px}.xtrc-hl{background-color:#f8b9b7;padding-top:3px;padding-bottom:3px}#create-extractor{margin-top:10px}.xtrc-converter-subfields{margin-left:20px}.xtrc-list-container{margin-top:15px}.xtrc-list-container h2{margin-bottom:5px}.xtrc-list-container .alert{margin-top:5px}.xtrc-list-drag{margin-top:10px}.manual-selector-form{margin-top:5px}.node-row .xtrc-converters{margin-top:10px}.node-row .xtrc-config li,.node-row .xtrc-converters li{margin-left:10px}.node-row .xtrc-converter-config li{margin-left:20px}.u-light{border-bottom:1px dotted #bbb;margin-bottom:5px;padding-bottom:5px}.xtrc-metrics{margin-top:7px;margin-left:5px}.xtrc-metrics .span4{margin-left:0}.xtrc-metrics h3 .unit{font-size:11px}.xtrc-metrics dl{margin-top:3px;margin-bottom:0}.xtrc-metrics dt{float:left}.xtrc-metrics dd{margin-left:130px}.xtrc-exception-bubble{position:relative;top:-7px;margin-left:2px;cursor:pointer}.extractor-condition-summary{margin-left:5px;margin-top:10px}.success-match{color:#408140}.fail-match{color:#da4f49}.input-docs{margin-left:3px}.input-docs:hover{text-decoration:none}.open-analyze-field{cursor:pointer;font-size:16px;position:relative;top:4px;color:#16ace3}.open-analyze-field-active,.open-analyze-field:hover{color:#1189b5}.analyze-field{margin-top:10px}.analyzer-content dl{margin-top:10px;margin-bottom:5px;border-left:3px solid #eee;padding-left:7px;padding-top:1px;padding-bottom:1px}.analyzer-content dt{float:left;height:25px}.analyzer-content dd{margin-left:120px;height:25px}.analyze-field .statistics .wrong-type{margin-top:5px;color:#bbb}.timerange-selector-container{border-bottom:1px solid #eee;padding-bottom:6px;margin-bottom:8px;margin-left:5px}.input-append,.timerange-selector-container .input-prepend,.timerange-selector select{margin-bottom:0}.timerange-chooser{float:left;margin-right:5px}.timerange-chooser .btn{padding:6px 7px;line-height:15px;font-size:12px}.timerange-chooser .btn .caret{margin-left:1px}.timerange-chooser .selected a{font-weight:700}.master-node{color:#f89406}.permission-select{width:350px}.loglevel-metrics-row{margin-top:2px;margin-left:10px}.loglevel-metrics dl{margin-bottom:5px;margin-top:5px}.loglevel-metrics dt{float:left;margin-right:5px}.subsystems{margin-top:10px;margin-left:10px}.subsystems-row{margin-bottom:10px}#universalsearch .timerange-selector-container .keyword .icon{margin-left:5px}#universalsearch .timerange-selector-container .keyword .keyword-preview{margin-top:4px;margin-left:45px;font-size:11px}#universalsearch .timerange-selector-container .keyword .keyword-preview .fromto span{background-color:#fec;padding-left:3px;padding-right:3px}.no-active-nodes{margin-top:8px}.alpha80{background:#000 transparent;background:rgba(0,0,0,.8)}.alpha70,.alpha80{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000);-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000)}.alpha70{background:#000 transparent;background:rgba(0,0,0,.7)}#scroll-to-hint{position:fixed;left:50%;margin-left:-125px;top:50px;color:#fff;font-size:80px;padding:25px;z-index:2000;width:200px;text-align:center;-webkit-border-radius:10px 10px 10px 10px;-moz-border-radius:10px 10px 10px 10px;cursor:pointer;border-radius:10px 10px 10px 10px}.graph-range-selector{outline:1px solid #eee;background:rgba(0,0,0,.3);position:absolute;top:0;z-index:1;cursor:pointer;pointer-events:none}.rickshaw_graph:active,.rickshaw_graph :active,.rickshaw_graph:focus,.rickshaw_graph :focus{cursor:crosshair!important}.rickshaw_graph .detail .x_label{display:none}.rickshaw_graph .detail .item{line-height:1.4;padding:.5em}.detail_swatch{display:inline-block;width:10px;height:10px;margin:0 4px 0 0}.rickshaw_graph .detail .date{color:#a0a0a0}.input-io .total{color:#b8b8b8}.input-list .static-fields{margin-top:10px;margin-left:3px}.input-list .static-fields ul{margin:0;padding:0}.input-list .static-fields ul .remove-static-field{margin-left:5px}.field-graph-container{padding-bottom:35px}.field-graph-container .dropdown-menu a.selected{font-weight:700}.field-graph-container .type-description{color:#bbb;font-size:11px}.field-graph-container .field-graph-components{margin-top:10px;margin-right:12px}.field-graph-container .field-graph{margin-left:40px;margin-bottom:25px}.field-graph-container .field-graph-y-axis{float:left;height:200px;width:40px}#field-graphs .spinner{margin-bottom:10px;text-align:center}.sources.overlay{background-color:#aaa;height:200px;line-height:200px;opacity:.2;position:absolute;text-align:center;font-size:50px}ul.index-list{margin-left:25px;margin-top:5px;list-style-type:square}.metric-list{padding:0}.metric-list li{margin-bottom:5px}.metric-list li .prefix{color:#aaa}.metric-list li .name{font-size:13px;font-family:monospace;word-break:break-all}.metric-list li .metric{margin-left:10px;padding:10px}.metric-list li .metric h3{margin-bottom:5px}.metric-list dl{margin-top:0;margin-bottom:0}.metrics-filter{margin-bottom:15px!important}dl.metric-def dt{float:left}dl.metric-timer dd{margin-left:125px}dl.metric-meter dd{margin-left:95px}dl.metric-counter dd,dl.metric-gauge dd{margin-left:80px}dl.metric-histogram dd{margin-left:125px}.metric-list li .name .open:hover{text-decoration:none}#user-list th.user-type{width:50px}td.centered{text-align:center}td.limited{max-width:180px;overflow:hidden;text-overflow:ellipsis}.dashboard{color:#333;height:100%;margin:0;overflow:auto;width:100%}.dashboard .gridster .gs-w{background-color:#fff;border:1px solid #d1d1d1;z-index:auto}.dashboard .gridster .player{border-style:dashed;border-color:#d1d1d1}.dashboard .gridster .preview-holder{border:none!important;background:#16ace3!important}.dashboard .gridster .resize-preview-holder{z-index:-1}.dashboard .widget{height:inherit;margin:0;padding:15px}.dashboard .widget .widget-top{position:relative;margin-bottom:-15px;top:-5px;font-size:11px;line-height:11px}.dashboard .widget .controls{position:relative;left:-3px}.dashboard .widget .reloading{margin-right:2px;font-weight:700;color:#0085a7;display:none}.dashboard .widget .search_result_count .value{line-height:70px!important;text-align:center;font-size:70px;position:relative;top:20px}.dashboard .widget .search_result_count .trend-indicators{font-size:25px;height:70px;position:absolute;top:35px;left:345px;width:25px}.dashboard .widget .search_result_count .trend-indicators .trend-icon{height:25px;margin-bottom:-18px}.dashboard .widget .search_result_count .trend-indicators .trend-icons-higher{margin-bottom:5px}.dashboard .widget .search_result_count .icon{color:#ebebeb}.dashboard .widget .loading-failed{color:#ff4646!important}.dashboard .widget .controls{display:none}.dashboard .widget .edit-description{display:none;color:#0085a7!important;font-size:12px}.dashboard .widget .edit-description .icon{color:#0085a7!important}.dashboard .widget .description-form,.dashboard .widget .info .cache-info{display:none}.datatable-badge{border-radius:2px;display:inline-block;padding:5px;vertical-align:baseline}.tooltip .tooltip-inner{max-width:300px}.tooltip .tooltip-inner .datapoint-info{text-align:left}.tooltip .tooltip-inner .datapoint-info .date{color:#e3e5e5}.dashboard .gridster{margin-left:-10px;transition:none}.dashboard .gridster .widget{cursor:move}.dashboard .gridster.gs-resize-disabled .widget{cursor:default}.dashboard .widget .dc-chart{float:none}.dashboard .widget .widget-title{font-size:18px;height:25px;margin-right:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard .widget .load-error{color:#ff3b00;margin-right:5px}.dashboard .widget .widget-update-info{text-align:right;float:right;font-size:11px;height:25px;line-height:25px;width:130px}.dashboard .widget .configuration dt{text-transform:capitalize}.dashboard .widget svg{overflow:hidden}.dashboard .widget .number{line-height:70px}.dashboard .widget .number .value{line-height:100px;text-align:center;font-size:70px;position:relative}.dashboard .widget .number .trend-indicators{font-size:25px;height:70px;position:absolute;top:30px;right:20px;width:25px}.dashboard .widget .number .trend-indicators .trend-icon{color:#e3e5e5;height:25px;margin-bottom:-18px}.dashboard .widget .number .trend-indicators .trend-icon.trend-good{color:#8dc63f}.dashboard .widget .number .trend-indicators .trend-icon.trend-bad{color:#be1e2d}.dashboard .widget .number .trend-indicators .trend-icons-higher{margin-bottom:5px}.dashboard .widget .quickvalues-visualization{overflow:auto}.dashboard .widget .quickvalues-graph{text-align:center}.dashboard .widget .graph.scatterplot path.line{display:none}.dashboard .widget .actions{position:absolute;right:15px;bottom:10px}.dashboard .widget .actions div{display:inline-block;margin-left:5px}.dashboard .widget .actions button{padding:0 5px}.dashboard .widget .not-available{font-size:70px}.dashboard .widget .loading,.dashboard .widget .not-available{line-height:100px;text-align:center}.dashboard .widget .loading .spinner,.dashboard .widget .not-available .spinner{vertical-align:middle}.configuration-field-optional{margin-left:5px;font-size:11px}.message-result-fields-range{font-size:11px}.message-result-fields-set{margin-bottom:10px}.message-result-fields-set .btn-mini{padding-top:1px}.index-description{margin-bottom:7px}.index-description .index-info,.index-description .index-info dl{margin-top:5px}.index-details{margin-left:5px}.index-label{vertical-align:text-top}.index-label .label{margin-right:5px}.index-more-actions{font-size:90%;margin-left:5px}.shard-meters{margin-top:10px}.shard-meters dl{margin-bottom:0;margin-top:0}.shard-meters dl dt{float:left}.shard-meters dl dd{margin-left:65px}.shards{margin:0;padding:0;margin-top:5px}.shard-routing .shards .shard{padding:10px;margin:5px;width:50px;float:left;text-align:center}.shard-routing .shards .shard-started{background-color:#dff0d8}.shard-routing .shards .shard-relocating{background-color:#de9df4}.shard-routing .shards .shard-initializing{background-color:#f4ddbc}.shard-routing .shards .shard-unassigned{background-color:#c3c3c3}.shard-routing .shards .shard-primary .id{font-weight:700;margin-bottom:3px;border-bottom:1px solid #000}.shard-routing .description{font-size:11px;margin-top:2px;margin-left:6px}.node-buffer-usage{margin-top:10px;margin-bottom:7px}.journal-details-usage .progress-bar,.node-buffer-usage .progress-bar{text-shadow:0 1px 2px rgba(0,0,0,.4),2px -1px 3px hsla(0,0%,100%,.5)}.journal-details-usage .progress-bar span,.node-buffer-usage .progress-bar span{margin-left:1px}.system-system dt{float:left}.system-system dd{margin-left:75px}dl.system-journal{margin-top:5px;margin-bottom:0}.system-journal dt{float:left}.system-journal dd{margin-left:120px}dl.system-dl{margin:0}.system-dl dt{float:left;clear:left}.system-dl dd{margin-left:180px}.system-rest dt{float:left}.system-rest dd{margin-left:120px}.closed-indices{cursor:pointer}.closed-indices ul{margin-top:5px;list-style-type:square;margin-left:25px}#streamrule-form-modal .well{font-family:Open Sans,sans-serif!important}.search-help{margin:0 5px;line-height:34px}.no-widgets{margin-top:15px}table .dc-table-column{word-break:break-all}.quickvalues-table th,.sources th{background-color:#333;color:#fff;font-weight:400}.quickvalues-table .dc-table-column._3,.sources .dc-table-column._3{padding-right:0;text-align:right}.dynatable-per-page-label,.dynatable-search{font-size:14px}.dynatable-per-page select,.dynatable-search input{position:relative;top:3px;margin-left:3px}.dynatable-pagination-links li:first-child{display:none}.field-graph-query-container{position:relative;padding-left:10px}.field-graph-query{font-family:monospace;color:#9da096}.field-graph-container .reposition-handle{cursor:move}.field-graph-container .merge-hint{text-align:center;position:relative;top:-115px;margin-bottom:-21px;display:none;z-index:2000}.field-graph-container .merge-hint span{padding:15px 50px;font-size:15px;color:#fff}.field-graph-container .merge-drop-ready{background-color:#000}.parse-error{background-color:#f2dede;color:#a94442;padding-left:2px;padding-right:2px}.field-graph-query-color{width:8px;height:8px;display:inline-block;margin-right:1px}.messages th i.sort-order-desc{position:relative;top:-1px}.messages th i.sort-order-item{margin-right:2px;color:#222}.messages th:hover i.sort-order-item,.messages th i.sort-order-active{color:#fff}.add-alert-type{margin-bottom:0}.alert-type-form{font-size:14px;margin-top:15px}.alert-type-form input[type=number],.alert-type-form input[type=text],.alert-type-form select{padding:0 0 0 5px;height:25px;width:50px}.alert-type-form input[type=text]{width:200px}.add-alert-destination-type{margin-bottom:0}.alert-destination-form{display:none;font-size:14px;margin-top:15px}#add-alert-receivers{margin-top:15px}#add-alert-receivers span.twitter-typeahead{vertical-align:middle}.alert-receivers{padding-left:10px}.alerts{margin-top:15px}.alerts tbody{border:none}.alerts th{background-color:#333;color:#fff;font-weight:400}.alerts th a{display:block}.alerts th a:focus{color:#fff}li.alert-condition-item:not(:last-child){margin-bottom:10px;border-bottom:1px solid #ececec}.alert-condition .in-grace{color:#8c8e86}.alert-conditions hr{margin-top:7px;margin-bottom:7px}.dashboardeditpermissions,.streameditpermissions{margin-top:10px}.query-exception{margin-bottom:0}input.required-input-highlight{border-color:#e9322d;color:#e9322d}.widget .replay-link{color:#000}.widget .replay-link:hover{text-decoration:none}.zeroclipboard-is-hover{color:#333;background-color:#d7d9d9;border-color:#c3c8c8;cursor:move}.zeroclipboard-is-active{color:#1a5273}.result-highlight-colored{background-color:#fffcb0}.result-highlight-control label{font-size:12px;display:block;position:relative;top:3px}.result-highlight-control input{font-size:12px;display:inline}.node-state{cursor:help}.node-row .dropdown-menu a.selected{font-weight:700}#result-graph-timeline .annotation .content{left:-120px}#result-graph-timeline .annotation .content:before{left:117px}.annotation .content{margin-bottom:10px;cursor:auto!important}.xtrc-order-handle{cursor:move;margin-right:2px}.xtrc-order-active{background-color:#00a5cf}textarea.textarea-xlarge{width:95%;height:300px}.extractor-json{font-family:monospace;font-size:13px}.scrollable-table{width:100%;overflow:auto}.well.configuration-well{margin-top:5px;margin-bottom:0;padding:9px;font-family:monospace;word-wrap:break-word}.well.configuration-well>ul{padding:0;margin:0}.well.react-configuration-well{white-space:pre-line}.well.configuration-well .configuration-section{margin-bottom:10px}.well.configuration-well li:not(:last-child){margin-bottom:5px}.well.configuration-well .key{display:inline}.alert-callback .well.configuration-well .key{display:inline-block;min-width:140px;vertical-align:top}.well.configuration-well .value{display:inline}.alert-callback .well.configuration-well .value{display:inline-block}.card{padding:12px 20px;font-size:15px;font-weight:300;background-color:#fafafa;border:1px solid #ececec;border-radius:2px;margin:10px}.card h1{margin-bottom:5px;font-size:28px;line-height:1;letter-spacing:-1}.card label{font-weight:inherit}.card div{margin-left:0}.card ul li{margin-bottom:5px}.card.info p{margin:0}.card .configuration-bundles .bundle-preview{border:1px solid #ececec;border-radius:2px;background-color:#fff;padding:20px}.card .configuration-bundles .bundle-preview pre{background-color:#f5f5f5}.configuration-bundles .accordion{background-color:#fff;border:1px solid #ececec;border-radius:2px}.configuration-bundles .accordion-group{margin:0;border:0;border-bottom:1px solid #ececec;border-radius:0;-webkit-border-radius:0;-moz-border-radius:0}.configuration-bundles .accordion-inner{padding-left:30px}.configuration-bundles .accordion-inner .upload input[type=file]{height:32px}.configuration-bundles .bundle-preview{background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:3px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05);padding:10px}.configuration-bundles .bundle-preview .preview-actions form{display:inline-block;margin-left:20px;margin-bottom:0}.configuration-bundles .bundle-preview .preview-actions form:first-child{margin-left:0}.configuration-bundles .bundle-preview pre{background-color:#cfcfcf}.configuration-bundles .bundle-preview dd{margin-bottom:10px}.bundle-preview ol,.bundle-preview ul{margin:0 0 10px 25px}.bundle-preview ul{list-style-type:circle}.build-content-pack button.select-all{margin-top:7px;padding:0}#react-configuration-bundles{font-size:14px;font-weight:400;line-height:20px;margin-top:15px}.form-inline label{margin-right:10px}.form-horizontal .help-block.help-standalone{line-height:20px;margin-top:7px}.form-horizontal.pull-left label.control-label{width:auto}.form-horizontal.pull-left div.controls{display:inline-block;float:right;margin-left:20px}.sources-title{height:22px;line-height:22px;vertical-align:top}.sources-filtering{margin-top:10px}.sources-filtering .control-group{margin-bottom:0}#dc-sources-pie-chart svg{margin-top:20px}#dc-sources-pie-chart g.pie-slice.highlighted{fill-opacity:.8}.form-horizontal .control-group .controls .checkbox-control:first-child{padding-top:5px}.form-horizontal .control-group .controls .checkbox-control label.checkbox{display:inline-block}.form-horizontal .control-group .controls .checkbox-control span.help-inline{vertical-align:top}form.extractor-form .control-group label{display:inline-block}.fa-mini{font-size:10px}.configuration-bundles input[type=file]{line-height:inherit!important}table td.actions,table th.actions{width:110px}#grok-pattern-list th.name{min-width:200px}#grok-pattern-list td{word-break:break-all}.btn-text{font-family:Open Sans,sans-serif;font-size:12px;padding:0;vertical-align:baseline}.message-loader-form input{margin-right:5px}ul.streams{padding:0;margin:0}ul.streams li.stream{display:block;padding:15px 0}ul.streams li.stream:not(:last-child){border-bottom:1px solid #6dcff6}ul.streams li.stream .stream-data{margin-top:8px}ul.streams li.stream .stream-data .stream-actions{position:relative;float:right;right:0;bottom:20px}ul.streams li.stream .stream-data .stream-actions form.action-form{display:inline-block}ul.streams li.stream .stream-data .stream-actions .btn-delete{margin-left:15px;margin-right:15px}ul.streams li.stream .stream-data .stream-actions .btn-delete.last{margin-right:0}ul.streams li.stream .stream-description{margin-bottom:3px}ul.streams li.stream .streamrules-details{margin-top:15px}ul.streams li.stream .streamrules-list{margin:0;padding:0}ul.streams li.stream .streamrules-list li{margin-bottom:3px}.stream-stopped{position:relative;top:-3px}ul.entity-list{padding:0;margin:0}ul.entity-list li.entity-list-item{display:block;padding:15px 0}ul.entity-list li.entity-list-item h2 .label{margin-left:5px;line-height:2;vertical-align:bottom}ul.entity-list li.entity-list-item .item-description{min-height:17px;margin:5px 0}ul.entity-list li.entity-list-item .item-actions>.btn,ul.entity-list li.entity-list-item .item-actions>.btn-group,ul.entity-list li.entity-list-item .item-actions>span>.btn{margin-left:5px;margin-bottom:5px}ul.entity-list li.entity-list-item:not(:last-child){border-bottom:1px solid #6dcff6}.breadcrumb{margin-bottom:10px!important;margin-left:-15px;margin-right:-15px}.graylog-node{margin-top:15px}.graylog-node-title{margin-top:8px}dl.graylog-node-state{margin-top:0;margin-bottom:0}dl.graylog-node-state dt{float:left}dl.graylog-node-state dd{margin-left:180px}.graylog-node .graylog-node-heap{margin-top:10px}.graylog-node .graylog-node-heap .progress{height:25px;margin-bottom:5px}span.blob{display:inline-block;width:9px;height:9px;margin-left:2px}#message-table-paginator-top{width:90%}#message-table-paginator-top ul{margin:0}#message-table-paginator-bottom{height:75px}#message-table-paginator-bottom nav{background-color:hsla(0,0%,100%,.9);border-top:1px solid #ddd;margin-left:-10px}#message-table-paginator-bottom .affix{z-index:3;bottom:1px}#message-table-paginator-bottom .affix-bottom{position:absolute}#message-table-paginator-bottom .affix-bottom nav{border:0}table.messages tbody.message-group{border-top:0}table.messages tbody.message-group-toggled{border-left:5px solid #16ace3}table.messages tbody.message-highlight{border-left:5px solid #8dc63f}table.messages tr.fields-row{cursor:pointer}table.messages tr.fields-row td{padding-top:10px}table.messages tr.message-row td{border-top:0;padding-top:0;padding-bottom:5px;font-family:monospace;color:#16ace3}table.messages tr.message-row{margin-bottom:5px;cursor:pointer}table.messages tr.message-row .message-wrapper{line-height:1.5em;white-space:pre-line;max-height:6em;overflow:hidden}table.messages tr.message-row .message-wrapper:after{content:\\"\\";text-align:right;position:absolute;width:99%;left:5px;top:4.5em;height:1.5em;background:linear-gradient(180deg,hsla(0,0%,100%,0),#fff 95%)}table.messages tr.message-detail-row{display:none}table.messages tr.message-detail-row td{padding-top:5px;border-top:0}dl.message-details{margin-top:10px;margin-bottom:0}dl.message-details dt{font-weight:700;margin-left:1px}dl.message-details dd{margin-bottom:5px;padding-bottom:5px;margin-left:1px}dl.message-details-fields dd:not(:last-child){border-bottom:1px solid #ececec}dl.message-details-fields dd{white-space:pre-wrap}dl.message-details-fields .field-value{font-family:monospace}dl.message-details-fields dd.message-field .field-value{max-height:500px;overflow:auto}dl.message-details dd.stream-list ul{list-style-type:disc;padding-left:25px}dl.message-details dd.stream-list ul li{margin-top:3px}table.messages{position:static;margin-left:-13px;font-size:11px;margin-top:15px;border-collapse:collapse;width:100%;word-break:break-all}table.messages thead>tr{color:#fff}table.messages td,table.messages th{position:relative;left:13px}table.messages>thead th{border:0;font-size:11px;font-weight:400;background-color:#222;white-space:nowrap}table.messages tr{border:0!important}dl.message-details dd div.message-field-actions{padding-left:10px;position:relative;top:-10px}.greyed-out{filter:alpha(opacity=50);opacity:.5;-moz-opacity:.5;z-index:20}@media (min-width:600px){.table-responsive{overflow-x:visible}}div#navigation-bar ul.dropdown-menu li a{font-size:12px}div#navigation-bar ul.dropdown-menu{padding-top:10px;padding-bottom:10px}div#navigation-bar ul.dropdown-menu li{padding:2px 2px 2px 0}div#navigation-bar ul.dropdown-menu li.divider{padding:0}.indexer-failures-body select.dynatable-per-page-select{position:relative;top:0}table.indexer-failures{margin-top:10px}.graylog-node-heap .progress,.journal-details-usage .progress,.node-buffer-usage .progress,div.row-sm{margin-bottom:5px}.journal-details-usage .progress{margin-top:10px}.journal-details-usage .progress .progress-bar{min-width:3em}.progress-bar{max-width:100%}.graylog-node-heap p{margin-bottom:0}.graylog-node-heap .used-memory{background-color:#9e1f63}.graylog-node-heap .committed-memory{background-color:#f7941e}.graylog-node-heap .max-memory{background-color:#f5f5f5}dl.system-rest,dl.system-system{margin-top:5px;margin-bottom:0}.table-sm{margin-bottom:0}.graylog-input{margin-top:15px;border-bottom:1px}.graylog-input-actions{margin-top:5px;text-align:right}.graylog-input-subtitle{margin-top:5px;margin-bottom:0}.graylog-input-error{position:relative;top:-4px;margin:0;padding:7px 7px 7px 10px}.graylog-input-error a{font-weight:400}.graylog-input-error i.master-node{display:none}.graylog-input-metrics{margin-top:5px}.react-input-metrics{margin-top:5px;font-size:13px}.input-io .value{font-family:monospace}.input-io .persec{margin-left:3px}.input-io .channel-direction{position:relative;left:-1px}.input-io .channel-direction-down{position:relative;top:1px}.input-io .channel-direction-up{position:relative;top:-1px}#field-statistics th{cursor:pointer}.alert-type-form{line-height:26px}.alert-type-form label.radio-inline{margin-right:0;vertical-align:baseline}.alert-type-form .radio-inline input[type=radio]{position:relative;margin-left:-20px;margin-right:5px}.alert-type-form div.well{margin-bottom:0}.alert-type-form .threshold-type{margin:0 5px;vertical-align:baseline}.form-inline .alert-type-form .form-control{vertical-align:baseline}.filter .form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.no-alarm-callbacks{margin-top:10px}div.alert-callback hr{margin-top:10px;margin-bottom:10px}div.alert-callbacks{margin-top:10px}.alarm-callbacks{padding:0}.alarm-callbacks li:not(:last-child){margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #ececec}.triggered-alerts .page-size{margin-top:-23px}.toggle-stream-button{width:8.5em}.threaddump{font-size:11px}.stream-rules-link{margin-left:5px}.modal-body .form-group{margin-bottom:5px}h2.extractor-title{margin-bottom:2px}p.failure-exception{margin-top:5px;margin-bottom:10px;color:#aaa}i.error-icon{position:relative;top:-3px}.support-sources ul{margin:0;padding:0;margin-top:5px}.failure-object{padding:6px 10px 10px;margin:10px 0 0;font-family:monospace}.stream-description .fa-cube{margin-right:5px}.content-head .btn-lg{font-size:16px}.stream-loader{margin-top:5px}.streamrules-list{margin:0;padding:0}#field-statistics table{margin-top:10px}.quickvalues-visualization{padding-top:15px}.quickvalues-visualization .dc-chart{float:none}.quickvalues-visualization .col-md-8{padding-right:0}.form-inline .typeahead-wrapper{display:inline-block;vertical-align:middle;width:auto}.list-group-header{background-color:#f1f2f2;padding:0 15px}.list-group-header .form-group{margin:0}.form-group-inline{display:inline-block;margin:0}ul.pill-list,ul.tag-list{display:inline-block;list-style:none;padding:0;position:relative}ul.pill-list{margin-left:10px;vertical-align:middle}ul.pill-list>li,ul.tag-list>li{display:inline-block;vertical-align:middle}.tags-input ul.tag-list>li{padding-top:10px;padding-bottom:5px}.pill,.tag{font-size:14px;margin-right:5px}.pill{background-color:#e3e5e5;padding:6px 12px;line-height:1.42857143}.pill,.pill-remove,.tag-remove{color:#333;vertical-align:middle}.pill-remove,.tag-remove{cursor:pointer;margin-left:5px}.pill-remove:before,.tag-remove:before{content:\\"\\\\D7\\"}.streamrule-connector-type-form label{font-size:12px}.streamrule-connector-type-form{margin-top:10px;margin-bottom:13px}.streamrule-connector-type-form .form-group{margin-bottom:5px}.streamrule-connector-type-form .radio{margin-top:0;margin-bottom:0}.streamrule-connector-type-form input[type=radio]{margin-top:2px;margin-bottom:2px}#react-gettingstarted{margin-left:-19px;margin-right:-19px;margin-top:-4px}#react-gettingstarted iframe{height:1000px}.sortable-list{cursor:move}.sortable-list .dragging{opacity:.5}.sortable-list .over{border:1px dashed #8c8e86}.sortable-list .sortable-list-item:first-child .list-group-item{border-top-right-radius:4px;border-top-left-radius:4px}.sortable-list .sortable-list-item:last-child .list-group-item{border-bottom-right-radius:4px;border-bottom-left-radius:4px;margin-bottom:0}.sortable-list .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.sortable-list .list-group-item:last-child{border-bottom-right-radius:0;border-bottom-left-radius:0}.field-analyzer{margin-left:0!important;margin-top:10px!important}", ""]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./~/less-loader!./public/stylesheets/graylog2.less\n ** module id = 553\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/graylog2.less?./~/css-loader!./~/less-loader');
},function(module,exports,__webpack_require__){eval("exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, \"@font-face{font-family:Open Sans;font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light');src:url(\" + __webpack_require__(325) + \");src:url(\" + __webpack_require__(325) + \"?#iefix) format('embedded-opentype'),url(\" + __webpack_require__(632) + \") format('woff')}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans');src:url(\" + __webpack_require__(326) + \");src:url(\" + __webpack_require__(326) + \"?#iefix) format('embedded-opentype'),url(\" + __webpack_require__(633) + \") format('woff')}@font-face{font-family:Open Sans;font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic');src:url(\" + __webpack_require__(324) + \");src:url(\" + __webpack_require__(324) + \"?#iefix) format('embedded-opentype'),url(\" + __webpack_require__(631) + \") format('woff')}@font-face{font-family:Open Sans;font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold');src:url(\" + __webpack_require__(327) + \");src:url(\" + __webpack_require__(327) + \"?#iefix) format('embedded-opentype'),url(\" + __webpack_require__(634) + \") format('woff')}@font-face{font-family:Open Sans;font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold');src:url(\" + __webpack_require__(322) + \");src:url(\" + __webpack_require__(322) + \"?#iefix) format('embedded-opentype'),url(\" + __webpack_require__(629) + \") format('woff')}@font-face{font-family:Open Sans;font-style:normal;font-weight:800;src:local('Open Sans Extrabold'),local('OpenSans-Extrabold');src:url(\" + __webpack_require__(323) + \");src:url(\" + __webpack_require__(323) + \"?#iefix) format('embedded-opentype'),url(\" + __webpack_require__(630) + \") format('woff')}\", \"\"]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./~/less-loader!./public/stylesheets/newfonts.less\n ** module id = 554\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/newfonts.less?./~/css-loader!./~/less-loader")},,,,function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, ".ws-important-hide{display:none!important;visibility:hidden!important;position:absolute;top:-999999px}.ws-capture-file>button,.ws-custom-file>button,.ws-po-box button{display:inline-block;overflow:visible;position:relative;margin:0;border:0;padding:0;-webkit-appearance:none;appearance:none;font-family:inherit;background:transparent;cursor:pointer;font-size:inherit;line-height:inherit;touch-action:none}.ws-capture-file>button::-moz-focus-inner,.ws-custom-file>button::-moz-focus-inner,.ws-po-box button::-moz-focus-inner{border:0;padding:0}.ws-capture-file>button[disabled],.ws-custom-file>button[disabled],.ws-po-box button[disabled]{cursor:default;color:#888}[hidden]{display:none}article,aside,canvas,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio{display:none;height:0;width:0}audio,video{overflow:hidden}audio[controls],video{display:inline-block;min-height:45px;min-width:40px}audio[controls]{width:300px}.polyfill-mediaelement>iframe{border:0;padding:0;margin:0;width:100%;height:100%}.flashblocker-assumed{min-height:20px;min-width:20px;z-index:99999}.cue-display{position:absolute!important;margin:0;padding:0!important;max-width:100%!important;max-height:100%!important;border:0!important;background:none!important;text-align:center;visibility:hidden;font-family:sans-serif;font-size:12px;white-space:pre-wrap;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cue-display b{font-weight:700}.cue-display i{font-style:italic}.cue-display u{text-decoration:underline}.cue-display span.cue-wrapper{position:absolute;left:0;bottom:0;right:0;display:block;padding:0;margin:0;width:100%;font-size:160%;color:#fff;visibility:visible!important;pointer-events:none}.cue-display .cue-line{display:block}.cue-display span.cue{display:inline-block;padding:3px 5px;background:#000;background:rgba(0,0,0,.7);color:#fff}.cue-display .description-cues{position:absolute;top:-99px;left:-99px;display:block;width:5px;height:5px;overflow:hidden}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:700}.details-open-indicator,.placeholder-box,.placeholder-text,progress span.progress-value{margin:0;padding:0;border:0;width:auto;background:transparent none}output{position:relative}.webshims-visual-hide{position:absolute!important;top:0!important;left:0!important;visibility:hidden!important;width:0!important;height:0!important;overflow:hidden!important}.placeholder-box{position:relative;display:inline-block;zoom:1}.placeholder-box-input{vertical-align:bottom}.placeholder-box-left{float:left}.placeholder-box-right{float:right}.placeholder-text{position:absolute;display:none;top:0;left:0;overflow:hidden;color:#999;line-height:1;cursor:text}.placeholder-text.placeholder-visible,.placeholder-visible .placeholder-text{display:inline-block}.placeholder-box-input .placeholder-text{white-space:nowrap}.placeholder-visible{color:#999}.placeholder-focused.placeholder-visible{color:#ccc}.ws-popover{font-size:13px;display:block;visibility:hidden;overflow:hidden;position:absolute;top:0;left:0;outline:0;padding:0 .92308em;margin:0 0 0 -.92308em;z-index:1100;min-width:3.84615em;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:visibility .4s ease-in-out;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;direction:ltr;-webkit-tap-highlight-color:transparent}.ws-popover.ws-popover-constrained-width{box-sizing:content-box}.ws-popover.ws-is-rtl{direction:rtl;margin:0 0 0 .92308em}.ws-popover.no-transition{display:none}.ws-popover.ws-po-visible{visibility:visible;display:block}.ws-popinline{position:relative;visibility:visible;display:none}.ws-po-outerbox{position:relative;opacity:0;padding:.84615em 0 .69231em;-webkit-transform:translateY(-100%);transform:translateY(-100%);transition:all .4s ease-in-out}[data-vertical=bottom] .ws-po-outerbox{-webkit-transform:translateY(100%);transform:translateY(100%);padding:.30769em 0 .84615em}[data-vertical=middle] .ws-po-outerbox{-webkit-transform:translate(0) scale(.3);transform:translate(0) scale(.3);padding:.30769em 0}.ws-popover.ws-po-visible .ws-po-outerbox,div.ws-popover[data-vertical][data-horizontal].ws-po-visible .ws-po-outerbox{opacity:1;-webkit-transform:translate(0) scale(1);transform:translate(0) scale(1)}.ws-po-box{border:.07692em solid #ccc;background:#fff;color:#000;padding:.38462em .38462em .23077em}.ws-po-arrow{position:absolute;top:.30769em;left:1.53846em;display:block;width:0;height:0;border-left:.61538em solid transparent;border-right:.61538em solid transparent;border-bottom:.61538em solid #ccc;border-top:0;zoom:1}.ws-is-rtl .ws-po-arrow{left:auto;right:1.53846em}[data-horizontal=center] .ws-po-arrow{left:50%;margin-left:-.30769em}[data-horizontal=right] .ws-po-arrow{left:auto;right:1.53846em}[data-vertical=bottom] .ws-po-arrow{top:auto;bottom:.30769em;border-bottom:0;border-top:.61538em solid #ccc}html .ws-po-arrow,html .ws-po-arrow .ws-po-arrowbox{border-left-color:transparent;border-right-color:transparent}[data-vertical=middle] .ws-po-arrow{display:none}.ws-po-arrow .ws-po-arrowbox{position:relative;top:.07692em;left:-.53846em;display:block;width:0;height:0;border-left:.53846em solid transparent;border-right:.53846em solid transparent;border-bottom:.53846em solid #fefefe;border-top:0;z-index:999999999}.ws-is-rtl .ws-po-arrow .ws-po-arrowbox{left:auto;right:-.53846em}[data-vertical=bottom] .ws-po-arrow .ws-po-arrowbox{top:-.61538em;border-bottom:0;border-top:.53846em solid #fefefe}datalist{display:none}input[data-wslist]::-webkit-calendar-picker-indicator{display:none}.datalist-polyfill{position:absolute;text-align:left}.datalist-polyfill .ws-po-box{padding:.38462em 0}.datalist-polyfill .datalist-box{position:relative;max-height:15.38462em;overflow:hidden;overflow-x:hidden!important;overflow-y:auto}.datalist-polyfill .datalist-box li,.datalist-polyfill .datalist-box ul{font-size:100%;list-style:none!important}.datalist-polyfill .datalist-box ul{position:static!important;overflow:hidden;margin:0;padding:.07692em 0;height:auto!important;background-color:#fff;color:#000}.datalist-polyfill .datalist-box li{margin:.07692em 0;padding:.30769em .76923em;white-space:nowrap;cursor:default;zoom:1;overflow:hidden;text-overflow:ellipsis;background-color:#fff;transition:background-color .4s;touch-action:none}.datalist-polyfill .datalist-box mark{font-weight:400;font-style:normal}.datalist-polyfill .datalist-box .option-value{display:block;text-overflow:ellipsis;max-width:100%;color:#000;transition:color .4s}.datalist-polyfill .datalist-box .option-label{display:none;font-size:90%;color:#666;text-overflow:ellipsis;margin-top:.1em;transition:color .4s}.datalist-polyfill .datalist-box .has-option-label .option-label{display:block}.datalist-polyfill .datalist-box .hidden-item{display:none!important}.datalist-polyfill .datalist-box .active-item{cursor:default;background-color:#39f}.datalist-polyfill .datalist-box .active-item .option-value{color:#fff}.datalist-polyfill .datalist-box .active-item .option-label{color:#eee}.validity-alert{display:inline-block;z-index:1000000000}.validity-alert .ws-titlevalue{display:block}.ws-errorbox{display:none;border:0;margin:0;padding:0;overflow:hidden;position:relative;clear:both;font-family:sans-serif}.ws-errorbox p{margin:2px 0 3px;padding:0;color:#a94442}progress{position:relative;display:inline-block;width:164px;height:20px;overflow:hidden;box-sizing:border-box;vertical-align:-.2em}progress.ws-style{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border:1px solid #ddd;background:#f0f0f0}progress.ws-style::-webkit-progress-bar{border:1px solid #ddd;background:#f0f0f0;border:0 none}progress.ws-style::-moz-progress-bar{border:1px solid #ddd;background:#f0f0f0}progress.ws-style::-ms-fill{animation-name:none;border:1px solid #ddd;background:#f0f0f0}progress.ws-style>span.progress-value{left:0}progress.ws-style.ws-is-rtl>span.progress-value{left:auto;right:0}progress.ws-style::-webkit-progress-value{position:absolute;top:0;bottom:0;height:100%;background:#0063a6 url(" + __webpack_require__(156) + ");border:0}progress.ws-style::-moz-progress-bar{position:absolute;top:0;bottom:0;height:100%;background:#0063a6 url(" + __webpack_require__(156) + ");border:0}progress.ws-style::-ms-fill{animation-name:none;position:absolute;top:0;bottom:0;height:100%;background:#0063a6 url(" + __webpack_require__(156) + ");border:0}progress.ws-style>span.progress-value{display:block!important;position:absolute;top:0;bottom:0;height:100%;background:#0063a6 url(" + __webpack_require__(156) + ");border:0}progress.ws-style:indeterminate::-webkit-progress-bar{background-image:url(" + __webpack_require__(140) + ")}progress.ws-style:indeterminate::-moz-progress-bar{background-image:url(" + __webpack_require__(140) + ")}progress.ws-style:indeterminate{animation-name:none;background-image:url(" + __webpack_require__(140) + ")}progress.ws-style.ws-indeterminate>span.progress-value{display:block!important;width:100%;right:0;background-image:url(" + __webpack_require__(140) + ")}details{overflow:hidden}summary{position:relative}.closed-details-child{display:none!important}.details-open-indicator{margin:-1px 0 0;display:inline-block;margin-right:.4em;width:0;height:0;border-style:solid;border-width:.76923em .38462em 0;border-color:#000 transparent transparent;vertical-align:middle}.closed-details-summary .details-open-indicator{border-width:.38462em 0 .38462em .76923em;border-color:transparent transparent transparent #000}summary.summary-has-focus{outline:1px dotted #aaa;outline-offset:-1px}.ws-capture-file,.ws-custom-file{position:relative;overflow:hidden}.ws-capture-file>button,.ws-capture-file>input,.ws-custom-file>button,.ws-custom-file>input{box-sizing:border-box;cursor:pointer}.ws-capture-file>.ws-file-value,.ws-capture-file>button,.ws-custom-file>.ws-file-value,.ws-custom-file>button{position:relative;z-index:0;display:inline-block;padding:.38462em;border:1px solid #ccc;background:#eee;color:#333;transition:.4s all}.ws-capture-file>button,.ws-custom-file>button{margin-right:.4em;float:left}.ws-capture-file>button{padding-bottom:.30769em;padding-top:.30769em}.ws-custom-file .ws-file-value{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ws-custom-file .ws-coverfile,.ws-custom-file>input[type=file]{position:absolute;top:-1%;left:-3%;bottom:-1%;right:-1%;height:102%;width:104%;z-index:9;padding:0;margin:0;border:0 none;color:transparent;background:transparent}.ws-custom-file>input[type=file]{filter:alpha(opacity=0);opacity:.00001}.ws-custom-file>input[type=file][disabled]{cursor:default;cursor:not-allowed}.ws-custom-file .ws-coverfile{background:url(" + __webpack_require__(1165) + ");z-index:10;cursor:pointer}[readonly]+.ws-custom-file .ws-coverfile{cursor:default}[disabled]+.ws-custom-file .ws-coverfile{cursor:default;cursor:not-allowed}.ws-custom-file>.moxie-shim{z-index:20}.ws-custom-file.ws-mouseenter>button,.ws-custom-file:hover>button,.ws-custom-file>input[type=file]:focus~button{background:#fff;border-color:#999;background:#eee linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.ws-custom-file.ws-mouseenter>.ws-file-value,.ws-custom-file:hover>.ws-file-value,.ws-custom-file>input[type=file]:focus~.ws-file-value{border-color:#999}.ws-custom-file.ws-active>.ws-file-value,.ws-custom-file.ws-active>button,.ws-custom-file>input[type=file]:active~.ws-file-value,.ws-custom-file>input[type=file]:active~button{border-color:#000}.ws-custom-file>input[type=file][disabled]~.ws-file-value,.ws-custom-file>input[type=file][disabled]~button{border-color:#bbb;background:#eee;color:#999}.ws-sticky{top:auto;left:auto!important;right:auto!important;bottom:auto;position:static;position:-webkit-sticky;position:-ms-sticky;position:sticky;float:none!important;margin-left:0;margin-right:0}tbody.ws-sticky,tfoot.ws-sticky,thead.ws-sticky{margin-left:-.8px;margin-right:-1px}.ws-sticky.ws-sticky-on{position:fixed!important}.ws-fixedsticky-placeholder{position:static!important;visibility:hidden!important;padding:0;border:0;margin:0;left:-999px;zoom:1}", ""]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./public/javascripts/shims/styles/shim.css\n ** module id = 558\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/javascripts/shims/styles/shim.css?./~/css-loader')},function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, "/*!\\n * Bootstrap v3.3.2 (http://getbootstrap.com)\\n * Copyright 2011-2015 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n */\\n\\n/*!\\n * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=479c4402f5d9ee9aeb83)\\n * Config saved to config.json and https://gist.github.com/479c4402f5d9ee9aeb83\\n *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{background:transparent!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:\\" (\\" attr(href) \\")\\"}abbr[title]:after{content:\\" (\\" attr(title) \\")\\"}a[href^=\\"#\\"]:after,a[href^=\\"javascript:\\"]:after{content:\\"\\"}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#666;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#9e1f63;text-decoration:none}a:focus,a:hover{color:#5e123b;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #fff}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#aaa}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#aaa}.text-primary{color:#9e1f63}a.text-primary:hover{color:#731748}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#9e1f63}a.bg-primary:hover{background-color:#731748}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #fff}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #aaa}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #fff}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#aaa}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\\\2014 \\\\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #fff;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\\\A0 \\\\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#666;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#aaa}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{margin:0;min-width:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#666;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#888}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#fff;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=datetime-local],input[type=month],input[type=time]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px\\\\9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#a6a6a6}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.333333px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-default{color:#333;background-color:#f1f2f2;border-color:#e3e5e5}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#d7d9d9;border-color:#c3c8c8}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#f1f2f2;border-color:#e3e5e5}.btn-default .badge{color:#f1f2f2;background-color:#333}.btn-primary{color:#fff;background-color:#9e1f63;border-color:#891b56}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#731748;border-color:#561136}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#9e1f63;border-color:#891b56}.btn-primary .badge{color:#9e1f63;background-color:#fff}.btn-success{color:#fff;background-color:#8dc63f;border-color:#80b636}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#72a230;border-color:#5f8628}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#8dc63f;border-color:#80b636}.btn-success .badge{color:#8dc63f;background-color:#fff}.btn-info{color:#fff;background-color:#16ace3;border-color:#149acc}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#1189b5;border-color:#0e7094}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#16ace3;border-color:#149acc}.btn-info .badge{color:#16ace3;background-color:#fff}.btn-warning{color:#fff;background-color:#f7941e;border-color:#f38809}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#da7a08;border-color:#b86707}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f7941e;border-color:#f38809}.btn-warning .badge{color:#f7941e;background-color:#fff}.btn-danger{color:#fff;background-color:#ff3b00;border-color:#e63500}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#cc2f00;border-color:#a82700}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#ff3b00;border-color:#e63500}.btn-danger .badge{color:#ff3b00;background-color:#fff}.btn-link{color:#9e1f63;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#5e123b;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#aaa;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#666;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#595959;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#9e1f63}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#aaa}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#aaa;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:\\"\\"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#888;text-align:center;background-color:#fff;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#fff}.nav>li.disabled>a{color:#aaa}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#aaa;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#fff;border-color:#9e1f63}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#fff #fff #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#888;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#9e1f63}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;visibility:visible!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin:8px -15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#d0d0d0}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#d0d0d0}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#d0d0d0}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#d0d0d0}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#d0d0d0}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:\\"/\\\\A0\\";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#aaa}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#9e1f63;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#5e123b;background-color:#fff;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;background-color:#9e1f63;border-color:#9e1f63;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#aaa;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#fff}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#aaa;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#aaa}.label-default[href]:focus,.label-default[href]:hover{background-color:#919191}.label-primary{background-color:#9e1f63}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#731748}.label-success{background-color:#8dc63f}.label-success[href]:focus,.label-success[href]:hover{background-color:#72a230}.label-info{background-color:#16ace3}.label-info[href]:focus,.label-info[href]:hover{background-color:#1189b5}.label-warning{background-color:#f7941e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#da7a08}.label-danger{background-color:#ff3b00}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#cc2f00}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#aaa;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#9e1f63;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#e6e6e6}.container-fluid .jumbotron,.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container-fluid .jumbotron,.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#9e1f63}.thumbnail .caption{padding:9px;color:#666}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#9e1f63;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#8dc63f}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#16ace3}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f7941e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#ff3b00}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#fff;color:#aaa;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#aaa}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#9e1f63;border-color:#9e1f63}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#ec9dc7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-left:15px;padding-right:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#666;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#666}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#9e1f63}.panel-primary>.panel-heading{color:#fff;background-color:#9e1f63;border-color:#9e1f63}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#9e1f63}.panel-primary>.panel-heading .badge{color:#9e1f63;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#9e1f63}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#e3e5e5;border:1px solid #d0d4d4;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal,.modal-open{overflow:hidden}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translateY(-25%);transform:translateY(-25%);-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:absolute;top:0;right:0;left:0;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;visibility:visible;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:\\"\\"}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:\\" \\";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:\\" \\";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:\\" \\";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:\\" \\";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel,.carousel-inner{position:relative}.carousel-inner{overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translateZ(0);transform:translateZ(0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1)}.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:\'\\\\2039\'}.carousel-control .icon-next:before{content:\'\\\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000\\\\9;background-color:transparent}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{content:\\" \\";display:table}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}", ""]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./public/stylesheets/bootstrap.min.css\n ** module id = 559\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/bootstrap.min.css?./~/css-loader');
},,function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, "/*!\\n * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome\\n * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\\n */@font-face{font-family:FontAwesome;src:url(" + __webpack_require__(636) + ");src:url(" + __webpack_require__(635) + "?#iefix&v=4.3.0) format(\'embedded-opentype\'),url(" + __webpack_require__(639) + ") format(\'woff2\'),url(" + __webpack_require__(640) + ") format(\'woff\'),url(" + __webpack_require__(638) + ") format(\'truetype\'),url(" + __webpack_require__(637) + "#fontawesomeregular) format(\'svg\');font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:\\"\\\\F000\\"}.fa-music:before{content:\\"\\\\F001\\"}.fa-search:before{content:\\"\\\\F002\\"}.fa-envelope-o:before{content:\\"\\\\F003\\"}.fa-heart:before{content:\\"\\\\F004\\"}.fa-star:before{content:\\"\\\\F005\\"}.fa-star-o:before{content:\\"\\\\F006\\"}.fa-user:before{content:\\"\\\\F007\\"}.fa-film:before{content:\\"\\\\F008\\"}.fa-th-large:before{content:\\"\\\\F009\\"}.fa-th:before{content:\\"\\\\F00A\\"}.fa-th-list:before{content:\\"\\\\F00B\\"}.fa-check:before{content:\\"\\\\F00C\\"}.fa-close:before,.fa-remove:before,.fa-times:before{content:\\"\\\\F00D\\"}.fa-search-plus:before{content:\\"\\\\F00E\\"}.fa-search-minus:before{content:\\"\\\\F010\\"}.fa-power-off:before{content:\\"\\\\F011\\"}.fa-signal:before{content:\\"\\\\F012\\"}.fa-cog:before,.fa-gear:before{content:\\"\\\\F013\\"}.fa-trash-o:before{content:\\"\\\\F014\\"}.fa-home:before{content:\\"\\\\F015\\"}.fa-file-o:before{content:\\"\\\\F016\\"}.fa-clock-o:before{content:\\"\\\\F017\\"}.fa-road:before{content:\\"\\\\F018\\"}.fa-download:before{content:\\"\\\\F019\\"}.fa-arrow-circle-o-down:before{content:\\"\\\\F01A\\"}.fa-arrow-circle-o-up:before{content:\\"\\\\F01B\\"}.fa-inbox:before{content:\\"\\\\F01C\\"}.fa-play-circle-o:before{content:\\"\\\\F01D\\"}.fa-repeat:before,.fa-rotate-right:before{content:\\"\\\\F01E\\"}.fa-refresh:before{content:\\"\\\\F021\\"}.fa-list-alt:before{content:\\"\\\\F022\\"}.fa-lock:before{content:\\"\\\\F023\\"}.fa-flag:before{content:\\"\\\\F024\\"}.fa-headphones:before{content:\\"\\\\F025\\"}.fa-volume-off:before{content:\\"\\\\F026\\"}.fa-volume-down:before{content:\\"\\\\F027\\"}.fa-volume-up:before{content:\\"\\\\F028\\"}.fa-qrcode:before{content:\\"\\\\F029\\"}.fa-barcode:before{content:\\"\\\\F02A\\"}.fa-tag:before{content:\\"\\\\F02B\\"}.fa-tags:before{content:\\"\\\\F02C\\"}.fa-book:before{content:\\"\\\\F02D\\"}.fa-bookmark:before{content:\\"\\\\F02E\\"}.fa-print:before{content:\\"\\\\F02F\\"}.fa-camera:before{content:\\"\\\\F030\\"}.fa-font:before{content:\\"\\\\F031\\"}.fa-bold:before{content:\\"\\\\F032\\"}.fa-italic:before{content:\\"\\\\F033\\"}.fa-text-height:before{content:\\"\\\\F034\\"}.fa-text-width:before{content:\\"\\\\F035\\"}.fa-align-left:before{content:\\"\\\\F036\\"}.fa-align-center:before{content:\\"\\\\F037\\"}.fa-align-right:before{content:\\"\\\\F038\\"}.fa-align-justify:before{content:\\"\\\\F039\\"}.fa-list:before{content:\\"\\\\F03A\\"}.fa-dedent:before,.fa-outdent:before{content:\\"\\\\F03B\\"}.fa-indent:before{content:\\"\\\\F03C\\"}.fa-video-camera:before{content:\\"\\\\F03D\\"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:\\"\\\\F03E\\"}.fa-pencil:before{content:\\"\\\\F040\\"}.fa-map-marker:before{content:\\"\\\\F041\\"}.fa-adjust:before{content:\\"\\\\F042\\"}.fa-tint:before{content:\\"\\\\F043\\"}.fa-edit:before,.fa-pencil-square-o:before{content:\\"\\\\F044\\"}.fa-share-square-o:before{content:\\"\\\\F045\\"}.fa-check-square-o:before{content:\\"\\\\F046\\"}.fa-arrows:before{content:\\"\\\\F047\\"}.fa-step-backward:before{content:\\"\\\\F048\\"}.fa-fast-backward:before{content:\\"\\\\F049\\"}.fa-backward:before{content:\\"\\\\F04A\\"}.fa-play:before{content:\\"\\\\F04B\\"}.fa-pause:before{content:\\"\\\\F04C\\"}.fa-stop:before{content:\\"\\\\F04D\\"}.fa-forward:before{content:\\"\\\\F04E\\"}.fa-fast-forward:before{content:\\"\\\\F050\\"}.fa-step-forward:before{content:\\"\\\\F051\\"}.fa-eject:before{content:\\"\\\\F052\\"}.fa-chevron-left:before{content:\\"\\\\F053\\"}.fa-chevron-right:before{content:\\"\\\\F054\\"}.fa-plus-circle:before{content:\\"\\\\F055\\"}.fa-minus-circle:before{content:\\"\\\\F056\\"}.fa-times-circle:before{content:\\"\\\\F057\\"}.fa-check-circle:before{content:\\"\\\\F058\\"}.fa-question-circle:before{content:\\"\\\\F059\\"}.fa-info-circle:before{content:\\"\\\\F05A\\"}.fa-crosshairs:before{content:\\"\\\\F05B\\"}.fa-times-circle-o:before{content:\\"\\\\F05C\\"}.fa-check-circle-o:before{content:\\"\\\\F05D\\"}.fa-ban:before{content:\\"\\\\F05E\\"}.fa-arrow-left:before{content:\\"\\\\F060\\"}.fa-arrow-right:before{content:\\"\\\\F061\\"}.fa-arrow-up:before{content:\\"\\\\F062\\"}.fa-arrow-down:before{content:\\"\\\\F063\\"}.fa-mail-forward:before,.fa-share:before{content:\\"\\\\F064\\"}.fa-expand:before{content:\\"\\\\F065\\"}.fa-compress:before{content:\\"\\\\F066\\"}.fa-plus:before{content:\\"\\\\F067\\"}.fa-minus:before{content:\\"\\\\F068\\"}.fa-asterisk:before{content:\\"\\\\F069\\"}.fa-exclamation-circle:before{content:\\"\\\\F06A\\"}.fa-gift:before{content:\\"\\\\F06B\\"}.fa-leaf:before{content:\\"\\\\F06C\\"}.fa-fire:before{content:\\"\\\\F06D\\"}.fa-eye:before{content:\\"\\\\F06E\\"}.fa-eye-slash:before{content:\\"\\\\F070\\"}.fa-exclamation-triangle:before,.fa-warning:before{content:\\"\\\\F071\\"}.fa-plane:before{content:\\"\\\\F072\\"}.fa-calendar:before{content:\\"\\\\F073\\"}.fa-random:before{content:\\"\\\\F074\\"}.fa-comment:before{content:\\"\\\\F075\\"}.fa-magnet:before{content:\\"\\\\F076\\"}.fa-chevron-up:before{content:\\"\\\\F077\\"}.fa-chevron-down:before{content:\\"\\\\F078\\"}.fa-retweet:before{content:\\"\\\\F079\\"}.fa-shopping-cart:before{content:\\"\\\\F07A\\"}.fa-folder:before{content:\\"\\\\F07B\\"}.fa-folder-open:before{content:\\"\\\\F07C\\"}.fa-arrows-v:before{content:\\"\\\\F07D\\"}.fa-arrows-h:before{content:\\"\\\\F07E\\"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:\\"\\\\F080\\"}.fa-twitter-square:before{content:\\"\\\\F081\\"}.fa-facebook-square:before{content:\\"\\\\F082\\"}.fa-camera-retro:before{content:\\"\\\\F083\\"}.fa-key:before{content:\\"\\\\F084\\"}.fa-cogs:before,.fa-gears:before{content:\\"\\\\F085\\"}.fa-comments:before{content:\\"\\\\F086\\"}.fa-thumbs-o-up:before{content:\\"\\\\F087\\"}.fa-thumbs-o-down:before{content:\\"\\\\F088\\"}.fa-star-half:before{content:\\"\\\\F089\\"}.fa-heart-o:before{content:\\"\\\\F08A\\"}.fa-sign-out:before{content:\\"\\\\F08B\\"}.fa-linkedin-square:before{content:\\"\\\\F08C\\"}.fa-thumb-tack:before{content:\\"\\\\F08D\\"}.fa-external-link:before{content:\\"\\\\F08E\\"}.fa-sign-in:before{content:\\"\\\\F090\\"}.fa-trophy:before{content:\\"\\\\F091\\"}.fa-github-square:before{content:\\"\\\\F092\\"}.fa-upload:before{content:\\"\\\\F093\\"}.fa-lemon-o:before{content:\\"\\\\F094\\"}.fa-phone:before{content:\\"\\\\F095\\"}.fa-square-o:before{content:\\"\\\\F096\\"}.fa-bookmark-o:before{content:\\"\\\\F097\\"}.fa-phone-square:before{content:\\"\\\\F098\\"}.fa-twitter:before{content:\\"\\\\F099\\"}.fa-facebook-f:before,.fa-facebook:before{content:\\"\\\\F09A\\"}.fa-github:before{content:\\"\\\\F09B\\"}.fa-unlock:before{content:\\"\\\\F09C\\"}.fa-credit-card:before{content:\\"\\\\F09D\\"}.fa-rss:before{content:\\"\\\\F09E\\"}.fa-hdd-o:before{content:\\"\\\\F0A0\\"}.fa-bullhorn:before{content:\\"\\\\F0A1\\"}.fa-bell:before{content:\\"\\\\F0F3\\"}.fa-certificate:before{content:\\"\\\\F0A3\\"}.fa-hand-o-right:before{content:\\"\\\\F0A4\\"}.fa-hand-o-left:before{content:\\"\\\\F0A5\\"}.fa-hand-o-up:before{content:\\"\\\\F0A6\\"}.fa-hand-o-down:before{content:\\"\\\\F0A7\\"}.fa-arrow-circle-left:before{content:\\"\\\\F0A8\\"}.fa-arrow-circle-right:before{content:\\"\\\\F0A9\\"}.fa-arrow-circle-up:before{content:\\"\\\\F0AA\\"}.fa-arrow-circle-down:before{content:\\"\\\\F0AB\\"}.fa-globe:before{content:\\"\\\\F0AC\\"}.fa-wrench:before{content:\\"\\\\F0AD\\"}.fa-tasks:before{content:\\"\\\\F0AE\\"}.fa-filter:before{content:\\"\\\\F0B0\\"}.fa-briefcase:before{content:\\"\\\\F0B1\\"}.fa-arrows-alt:before{content:\\"\\\\F0B2\\"}.fa-group:before,.fa-users:before{content:\\"\\\\F0C0\\"}.fa-chain:before,.fa-link:before{content:\\"\\\\F0C1\\"}.fa-cloud:before{content:\\"\\\\F0C2\\"}.fa-flask:before{content:\\"\\\\F0C3\\"}.fa-cut:before,.fa-scissors:before{content:\\"\\\\F0C4\\"}.fa-copy:before,.fa-files-o:before{content:\\"\\\\F0C5\\"}.fa-paperclip:before{content:\\"\\\\F0C6\\"}.fa-floppy-o:before,.fa-save:before{content:\\"\\\\F0C7\\"}.fa-square:before{content:\\"\\\\F0C8\\"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:\\"\\\\F0C9\\"}.fa-list-ul:before{content:\\"\\\\F0CA\\"}.fa-list-ol:before{content:\\"\\\\F0CB\\"}.fa-strikethrough:before{content:\\"\\\\F0CC\\"}.fa-underline:before{content:\\"\\\\F0CD\\"}.fa-table:before{content:\\"\\\\F0CE\\"}.fa-magic:before{content:\\"\\\\F0D0\\"}.fa-truck:before{content:\\"\\\\F0D1\\"}.fa-pinterest:before{content:\\"\\\\F0D2\\"}.fa-pinterest-square:before{content:\\"\\\\F0D3\\"}.fa-google-plus-square:before{content:\\"\\\\F0D4\\"}.fa-google-plus:before{content:\\"\\\\F0D5\\"}.fa-money:before{content:\\"\\\\F0D6\\"}.fa-caret-down:before{content:\\"\\\\F0D7\\"}.fa-caret-up:before{content:\\"\\\\F0D8\\"}.fa-caret-left:before{content:\\"\\\\F0D9\\"}.fa-caret-right:before{content:\\"\\\\F0DA\\"}.fa-columns:before{content:\\"\\\\F0DB\\"}.fa-sort:before,.fa-unsorted:before{content:\\"\\\\F0DC\\"}.fa-sort-desc:before,.fa-sort-down:before{content:\\"\\\\F0DD\\"}.fa-sort-asc:before,.fa-sort-up:before{content:\\"\\\\F0DE\\"}.fa-envelope:before{content:\\"\\\\F0E0\\"}.fa-linkedin:before{content:\\"\\\\F0E1\\"}.fa-rotate-left:before,.fa-undo:before{content:\\"\\\\F0E2\\"}.fa-gavel:before,.fa-legal:before{content:\\"\\\\F0E3\\"}.fa-dashboard:before,.fa-tachometer:before{content:\\"\\\\F0E4\\"}.fa-comment-o:before{content:\\"\\\\F0E5\\"}.fa-comments-o:before{content:\\"\\\\F0E6\\"}.fa-bolt:before,.fa-flash:before{content:\\"\\\\F0E7\\"}.fa-sitemap:before{content:\\"\\\\F0E8\\"}.fa-umbrella:before{content:\\"\\\\F0E9\\"}.fa-clipboard:before,.fa-paste:before{content:\\"\\\\F0EA\\"}.fa-lightbulb-o:before{content:\\"\\\\F0EB\\"}.fa-exchange:before{content:\\"\\\\F0EC\\"}.fa-cloud-download:before{content:\\"\\\\F0ED\\"}.fa-cloud-upload:before{content:\\"\\\\F0EE\\"}.fa-user-md:before{content:\\"\\\\F0F0\\"}.fa-stethoscope:before{content:\\"\\\\F0F1\\"}.fa-suitcase:before{content:\\"\\\\F0F2\\"}.fa-bell-o:before{content:\\"\\\\F0A2\\"}.fa-coffee:before{content:\\"\\\\F0F4\\"}.fa-cutlery:before{content:\\"\\\\F0F5\\"}.fa-file-text-o:before{content:\\"\\\\F0F6\\"}.fa-building-o:before{content:\\"\\\\F0F7\\"}.fa-hospital-o:before{content:\\"\\\\F0F8\\"}.fa-ambulance:before{content:\\"\\\\F0F9\\"}.fa-medkit:before{content:\\"\\\\F0FA\\"}.fa-fighter-jet:before{content:\\"\\\\F0FB\\"}.fa-beer:before{content:\\"\\\\F0FC\\"}.fa-h-square:before{content:\\"\\\\F0FD\\"}.fa-plus-square:before{content:\\"\\\\F0FE\\"}.fa-angle-double-left:before{content:\\"\\\\F100\\"}.fa-angle-double-right:before{content:\\"\\\\F101\\"}.fa-angle-double-up:before{content:\\"\\\\F102\\"}.fa-angle-double-down:before{content:\\"\\\\F103\\"}.fa-angle-left:before{content:\\"\\\\F104\\"}.fa-angle-right:before{content:\\"\\\\F105\\"}.fa-angle-up:before{content:\\"\\\\F106\\"}.fa-angle-down:before{content:\\"\\\\F107\\"}.fa-desktop:before{content:\\"\\\\F108\\"}.fa-laptop:before{content:\\"\\\\F109\\"}.fa-tablet:before{content:\\"\\\\F10A\\"}.fa-mobile-phone:before,.fa-mobile:before{content:\\"\\\\F10B\\"}.fa-circle-o:before{content:\\"\\\\F10C\\"}.fa-quote-left:before{content:\\"\\\\F10D\\"}.fa-quote-right:before{content:\\"\\\\F10E\\"}.fa-spinner:before{content:\\"\\\\F110\\"}.fa-circle:before{content:\\"\\\\F111\\"}.fa-mail-reply:before,.fa-reply:before{content:\\"\\\\F112\\"}.fa-github-alt:before{content:\\"\\\\F113\\"}.fa-folder-o:before{content:\\"\\\\F114\\"}.fa-folder-open-o:before{content:\\"\\\\F115\\"}.fa-smile-o:before{content:\\"\\\\F118\\"}.fa-frown-o:before{content:\\"\\\\F119\\"}.fa-meh-o:before{content:\\"\\\\F11A\\"}.fa-gamepad:before{content:\\"\\\\F11B\\"}.fa-keyboard-o:before{content:\\"\\\\F11C\\"}.fa-flag-o:before{content:\\"\\\\F11D\\"}.fa-flag-checkered:before{content:\\"\\\\F11E\\"}.fa-terminal:before{content:\\"\\\\F120\\"}.fa-code:before{content:\\"\\\\F121\\"}.fa-mail-reply-all:before,.fa-reply-all:before{content:\\"\\\\F122\\"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:\\"\\\\F123\\"}.fa-location-arrow:before{content:\\"\\\\F124\\"}.fa-crop:before{content:\\"\\\\F125\\"}.fa-code-fork:before{content:\\"\\\\F126\\"}.fa-chain-broken:before,.fa-unlink:before{content:\\"\\\\F127\\"}.fa-question:before{content:\\"\\\\F128\\"}.fa-info:before{content:\\"\\\\F129\\"}.fa-exclamation:before{content:\\"\\\\F12A\\"}.fa-superscript:before{content:\\"\\\\F12B\\"}.fa-subscript:before{content:\\"\\\\F12C\\"}.fa-eraser:before{content:\\"\\\\F12D\\"}.fa-puzzle-piece:before{content:\\"\\\\F12E\\"}.fa-microphone:before{content:\\"\\\\F130\\"}.fa-microphone-slash:before{content:\\"\\\\F131\\"}.fa-shield:before{content:\\"\\\\F132\\"}.fa-calendar-o:before{content:\\"\\\\F133\\"}.fa-fire-extinguisher:before{content:\\"\\\\F134\\"}.fa-rocket:before{content:\\"\\\\F135\\"}.fa-maxcdn:before{content:\\"\\\\F136\\"}.fa-chevron-circle-left:before{content:\\"\\\\F137\\"}.fa-chevron-circle-right:before{content:\\"\\\\F138\\"}.fa-chevron-circle-up:before{content:\\"\\\\F139\\"}.fa-chevron-circle-down:before{content:\\"\\\\F13A\\"}.fa-html5:before{content:\\"\\\\F13B\\"}.fa-css3:before{content:\\"\\\\F13C\\"}.fa-anchor:before{content:\\"\\\\F13D\\"}.fa-unlock-alt:before{content:\\"\\\\F13E\\"}.fa-bullseye:before{content:\\"\\\\F140\\"}.fa-ellipsis-h:before{content:\\"\\\\F141\\"}.fa-ellipsis-v:before{content:\\"\\\\F142\\"}.fa-rss-square:before{content:\\"\\\\F143\\"}.fa-play-circle:before{content:\\"\\\\F144\\"}.fa-ticket:before{content:\\"\\\\F145\\"}.fa-minus-square:before{content:\\"\\\\F146\\"}.fa-minus-square-o:before{content:\\"\\\\F147\\"}.fa-level-up:before{content:\\"\\\\F148\\"}.fa-level-down:before{content:\\"\\\\F149\\"}.fa-check-square:before{content:\\"\\\\F14A\\"}.fa-pencil-square:before{content:\\"\\\\F14B\\"}.fa-external-link-square:before{content:\\"\\\\F14C\\"}.fa-share-square:before{content:\\"\\\\F14D\\"}.fa-compass:before{content:\\"\\\\F14E\\"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:\\"\\\\F150\\"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:\\"\\\\F151\\"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:\\"\\\\F152\\"}.fa-eur:before,.fa-euro:before{content:\\"\\\\F153\\"}.fa-gbp:before{content:\\"\\\\F154\\"}.fa-dollar:before,.fa-usd:before{content:\\"\\\\F155\\"}.fa-inr:before,.fa-rupee:before{content:\\"\\\\F156\\"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:\\"\\\\F157\\"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:\\"\\\\F158\\"}.fa-krw:before,.fa-won:before{content:\\"\\\\F159\\"}.fa-bitcoin:before,.fa-btc:before{content:\\"\\\\F15A\\"}.fa-file:before{content:\\"\\\\F15B\\"}.fa-file-text:before{content:\\"\\\\F15C\\"}.fa-sort-alpha-asc:before{content:\\"\\\\F15D\\"}.fa-sort-alpha-desc:before{content:\\"\\\\F15E\\"}.fa-sort-amount-asc:before{content:\\"\\\\F160\\"}.fa-sort-amount-desc:before{content:\\"\\\\F161\\"}.fa-sort-numeric-asc:before{content:\\"\\\\F162\\"}.fa-sort-numeric-desc:before{content:\\"\\\\F163\\"}.fa-thumbs-up:before{content:\\"\\\\F164\\"}.fa-thumbs-down:before{content:\\"\\\\F165\\"}.fa-youtube-square:before{content:\\"\\\\F166\\"}.fa-youtube:before{content:\\"\\\\F167\\"}.fa-xing:before{content:\\"\\\\F168\\"}.fa-xing-square:before{content:\\"\\\\F169\\"}.fa-youtube-play:before{content:\\"\\\\F16A\\"}.fa-dropbox:before{content:\\"\\\\F16B\\"}.fa-stack-overflow:before{content:\\"\\\\F16C\\"}.fa-instagram:before{content:\\"\\\\F16D\\"}.fa-flickr:before{content:\\"\\\\F16E\\"}.fa-adn:before{content:\\"\\\\F170\\"}.fa-bitbucket:before{content:\\"\\\\F171\\"}.fa-bitbucket-square:before{content:\\"\\\\F172\\"}.fa-tumblr:before{content:\\"\\\\F173\\"}.fa-tumblr-square:before{content:\\"\\\\F174\\"}.fa-long-arrow-down:before{content:\\"\\\\F175\\"}.fa-long-arrow-up:before{content:\\"\\\\F176\\"}.fa-long-arrow-left:before{content:\\"\\\\F177\\"}.fa-long-arrow-right:before{content:\\"\\\\F178\\"}.fa-apple:before{content:\\"\\\\F179\\"}.fa-windows:before{content:\\"\\\\F17A\\"}.fa-android:before{content:\\"\\\\F17B\\"}.fa-linux:before{content:\\"\\\\F17C\\"}.fa-dribbble:before{content:\\"\\\\F17D\\"}.fa-skype:before{content:\\"\\\\F17E\\"}.fa-foursquare:before{content:\\"\\\\F180\\"}.fa-trello:before{content:\\"\\\\F181\\"}.fa-female:before{content:\\"\\\\F182\\"}.fa-male:before{content:\\"\\\\F183\\"}.fa-gittip:before,.fa-gratipay:before{content:\\"\\\\F184\\"}.fa-sun-o:before{content:\\"\\\\F185\\"}.fa-moon-o:before{content:\\"\\\\F186\\"}.fa-archive:before{content:\\"\\\\F187\\"}.fa-bug:before{content:\\"\\\\F188\\"}.fa-vk:before{content:\\"\\\\F189\\"}.fa-weibo:before{content:\\"\\\\F18A\\"}.fa-renren:before{content:\\"\\\\F18B\\"}.fa-pagelines:before{content:\\"\\\\F18C\\"}.fa-stack-exchange:before{content:\\"\\\\F18D\\"}.fa-arrow-circle-o-right:before{content:\\"\\\\F18E\\"}.fa-arrow-circle-o-left:before{content:\\"\\\\F190\\"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:\\"\\\\F191\\"}.fa-dot-circle-o:before{content:\\"\\\\F192\\"}.fa-wheelchair:before{content:\\"\\\\F193\\"}.fa-vimeo-square:before{content:\\"\\\\F194\\"}.fa-try:before,.fa-turkish-lira:before{content:\\"\\\\F195\\"}.fa-plus-square-o:before{content:\\"\\\\F196\\"}.fa-space-shuttle:before{content:\\"\\\\F197\\"}.fa-slack:before{content:\\"\\\\F198\\"}.fa-envelope-square:before{content:\\"\\\\F199\\"}.fa-wordpress:before{content:\\"\\\\F19A\\"}.fa-openid:before{content:\\"\\\\F19B\\"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:\\"\\\\F19C\\"}.fa-graduation-cap:before,.fa-mortar-board:before{content:\\"\\\\F19D\\"}.fa-yahoo:before{content:\\"\\\\F19E\\"}.fa-google:before{content:\\"\\\\F1A0\\"}.fa-reddit:before{content:\\"\\\\F1A1\\"}.fa-reddit-square:before{content:\\"\\\\F1A2\\"}.fa-stumbleupon-circle:before{content:\\"\\\\F1A3\\"}.fa-stumbleupon:before{content:\\"\\\\F1A4\\"}.fa-delicious:before{content:\\"\\\\F1A5\\"}.fa-digg:before{content:\\"\\\\F1A6\\"}.fa-pied-piper:before{content:\\"\\\\F1A7\\"}.fa-pied-piper-alt:before{content:\\"\\\\F1A8\\"}.fa-drupal:before{content:\\"\\\\F1A9\\"}.fa-joomla:before{content:\\"\\\\F1AA\\"}.fa-language:before{content:\\"\\\\F1AB\\"}.fa-fax:before{content:\\"\\\\F1AC\\"}.fa-building:before{content:\\"\\\\F1AD\\"}.fa-child:before{content:\\"\\\\F1AE\\"}.fa-paw:before{content:\\"\\\\F1B0\\"}.fa-spoon:before{content:\\"\\\\F1B1\\"}.fa-cube:before{content:\\"\\\\F1B2\\"}.fa-cubes:before{content:\\"\\\\F1B3\\"}.fa-behance:before{content:\\"\\\\F1B4\\"}.fa-behance-square:before{content:\\"\\\\F1B5\\"}.fa-steam:before{content:\\"\\\\F1B6\\"}.fa-steam-square:before{content:\\"\\\\F1B7\\"}.fa-recycle:before{content:\\"\\\\F1B8\\"}.fa-automobile:before,.fa-car:before{content:\\"\\\\F1B9\\"}.fa-cab:before,.fa-taxi:before{content:\\"\\\\F1BA\\"}.fa-tree:before{content:\\"\\\\F1BB\\"}.fa-spotify:before{content:\\"\\\\F1BC\\"}.fa-deviantart:before{content:\\"\\\\F1BD\\"}.fa-soundcloud:before{content:\\"\\\\F1BE\\"}.fa-database:before{content:\\"\\\\F1C0\\"}.fa-file-pdf-o:before{content:\\"\\\\F1C1\\"}.fa-file-word-o:before{content:\\"\\\\F1C2\\"}.fa-file-excel-o:before{content:\\"\\\\F1C3\\"}.fa-file-powerpoint-o:before{content:\\"\\\\F1C4\\"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:\\"\\\\F1C5\\"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:\\"\\\\F1C6\\"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:\\"\\\\F1C7\\"}.fa-file-movie-o:before,.fa-file-video-o:before{content:\\"\\\\F1C8\\"}.fa-file-code-o:before{content:\\"\\\\F1C9\\"}.fa-vine:before{content:\\"\\\\F1CA\\"}.fa-codepen:before{content:\\"\\\\F1CB\\"}.fa-jsfiddle:before{content:\\"\\\\F1CC\\"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:\\"\\\\F1CD\\"}.fa-circle-o-notch:before{content:\\"\\\\F1CE\\"}.fa-ra:before,.fa-rebel:before{content:\\"\\\\F1D0\\"}.fa-empire:before,.fa-ge:before{content:\\"\\\\F1D1\\"}.fa-git-square:before{content:\\"\\\\F1D2\\"}.fa-git:before{content:\\"\\\\F1D3\\"}.fa-hacker-news:before{content:\\"\\\\F1D4\\"}.fa-tencent-weibo:before{content:\\"\\\\F1D5\\"}.fa-qq:before{content:\\"\\\\F1D6\\"}.fa-wechat:before,.fa-weixin:before{content:\\"\\\\F1D7\\"}.fa-paper-plane:before,.fa-send:before{content:\\"\\\\F1D8\\"}.fa-paper-plane-o:before,.fa-send-o:before{content:\\"\\\\F1D9\\"}.fa-history:before{content:\\"\\\\F1DA\\"}.fa-circle-thin:before,.fa-genderless:before{content:\\"\\\\F1DB\\"}.fa-header:before{content:\\"\\\\F1DC\\"}.fa-paragraph:before{content:\\"\\\\F1DD\\"}.fa-sliders:before{content:\\"\\\\F1DE\\"}.fa-share-alt:before{content:\\"\\\\F1E0\\"}.fa-share-alt-square:before{content:\\"\\\\F1E1\\"}.fa-bomb:before{content:\\"\\\\F1E2\\"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:\\"\\\\F1E3\\"}.fa-tty:before{content:\\"\\\\F1E4\\"}.fa-binoculars:before{content:\\"\\\\F1E5\\"}.fa-plug:before{content:\\"\\\\F1E6\\"}.fa-slideshare:before{content:\\"\\\\F1E7\\"}.fa-twitch:before{content:\\"\\\\F1E8\\"}.fa-yelp:before{content:\\"\\\\F1E9\\"}.fa-newspaper-o:before{content:\\"\\\\F1EA\\"}.fa-wifi:before{content:\\"\\\\F1EB\\"}.fa-calculator:before{content:\\"\\\\F1EC\\"}.fa-paypal:before{content:\\"\\\\F1ED\\"}.fa-google-wallet:before{content:\\"\\\\F1EE\\"}.fa-cc-visa:before{content:\\"\\\\F1F0\\"}.fa-cc-mastercard:before{content:\\"\\\\F1F1\\"}.fa-cc-discover:before{content:\\"\\\\F1F2\\"}.fa-cc-amex:before{content:\\"\\\\F1F3\\"}.fa-cc-paypal:before{content:\\"\\\\F1F4\\"}.fa-cc-stripe:before{content:\\"\\\\F1F5\\"}.fa-bell-slash:before{content:\\"\\\\F1F6\\"}.fa-bell-slash-o:before{content:\\"\\\\F1F7\\"}.fa-trash:before{content:\\"\\\\F1F8\\"}.fa-copyright:before{content:\\"\\\\F1F9\\"}.fa-at:before{content:\\"\\\\F1FA\\"}.fa-eyedropper:before{content:\\"\\\\F1FB\\"}.fa-paint-brush:before{content:\\"\\\\F1FC\\"}.fa-birthday-cake:before{content:\\"\\\\F1FD\\"}.fa-area-chart:before{content:\\"\\\\F1FE\\"}.fa-pie-chart:before{content:\\"\\\\F200\\"}.fa-line-chart:before{content:\\"\\\\F201\\"}.fa-lastfm:before{content:\\"\\\\F202\\"}.fa-lastfm-square:before{content:\\"\\\\F203\\"}.fa-toggle-off:before{content:\\"\\\\F204\\"}.fa-toggle-on:before{content:\\"\\\\F205\\"}.fa-bicycle:before{content:\\"\\\\F206\\"}.fa-bus:before{content:\\"\\\\F207\\"}.fa-ioxhost:before{content:\\"\\\\F208\\"}.fa-angellist:before{content:\\"\\\\F209\\"}.fa-cc:before{content:\\"\\\\F20A\\"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:\\"\\\\F20B\\"}.fa-meanpath:before{content:\\"\\\\F20C\\"}.fa-buysellads:before{content:\\"\\\\F20D\\"}.fa-connectdevelop:before{content:\\"\\\\F20E\\"}.fa-dashcube:before{content:\\"\\\\F210\\"}.fa-forumbee:before{content:\\"\\\\F211\\"}.fa-leanpub:before{content:\\"\\\\F212\\"}.fa-sellsy:before{content:\\"\\\\F213\\"}.fa-shirtsinbulk:before{content:\\"\\\\F214\\"}.fa-simplybuilt:before{content:\\"\\\\F215\\"}.fa-skyatlas:before{content:\\"\\\\F216\\"}.fa-cart-plus:before{content:\\"\\\\F217\\"}.fa-cart-arrow-down:before{content:\\"\\\\F218\\"}.fa-diamond:before{content:\\"\\\\F219\\"}.fa-ship:before{content:\\"\\\\F21A\\"}.fa-user-secret:before{content:\\"\\\\F21B\\"}.fa-motorcycle:before{content:\\"\\\\F21C\\"}.fa-street-view:before{content:\\"\\\\F21D\\"}.fa-heartbeat:before{content:\\"\\\\F21E\\"}.fa-venus:before{content:\\"\\\\F221\\"}.fa-mars:before{content:\\"\\\\F222\\"}.fa-mercury:before{content:\\"\\\\F223\\"}.fa-transgender:before{content:\\"\\\\F224\\"}.fa-transgender-alt:before{content:\\"\\\\F225\\"}.fa-venus-double:before{content:\\"\\\\F226\\"}.fa-mars-double:before{content:\\"\\\\F227\\"}.fa-venus-mars:before{content:\\"\\\\F228\\"}.fa-mars-stroke:before{content:\\"\\\\F229\\"}.fa-mars-stroke-v:before{content:\\"\\\\F22A\\"}.fa-mars-stroke-h:before{content:\\"\\\\F22B\\"}.fa-neuter:before{content:\\"\\\\F22C\\"}.fa-facebook-official:before{content:\\"\\\\F230\\"}.fa-pinterest-p:before{content:\\"\\\\F231\\"}.fa-whatsapp:before{content:\\"\\\\F232\\"}.fa-server:before{content:\\"\\\\F233\\"}.fa-user-plus:before{content:\\"\\\\F234\\"}.fa-user-times:before{content:\\"\\\\F235\\"}.fa-bed:before,.fa-hotel:before{content:\\"\\\\F236\\"}.fa-viacoin:before{content:\\"\\\\F237\\"}.fa-train:before{content:\\"\\\\F238\\"}.fa-subway:before{content:\\"\\\\F239\\"}.fa-medium:before{content:\\"\\\\F23A\\"}", ""]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./public/stylesheets/font-awesome.min.css\n ** module id = 561\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/font-awesome.min.css?./~/css-loader')},,,function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, ".rickshaw_graph .detail{pointer-events:none;position:absolute;top:0;z-index:2;background:rgba(0,0,0,.1);bottom:0;width:1px;transition:opacity .25s linear;-moz-transition:opacity .25s linear;-o-transition:opacity .25s linear;-webkit-transition:opacity .25s linear}.rickshaw_graph .detail.inactive{opacity:0}.rickshaw_graph .detail .item.active{opacity:1}.rickshaw_graph .detail .x_label{font-family:Arial,sans-serif;border-radius:3px;padding:6px;opacity:.5;border:1px solid #e0e0e0;font-size:12px;position:absolute;background:#fff;white-space:nowrap}.rickshaw_graph .detail .x_label.left{left:0}.rickshaw_graph .detail .x_label.right{right:0}.rickshaw_graph .detail .item{position:absolute;z-index:2;border-radius:3px;padding:.25em;font-size:12px;font-family:Arial,sans-serif;opacity:0;background:rgba(0,0,0,.4);color:#fff;border:1px solid rgba(0,0,0,.4);margin-left:1em;margin-right:1em;margin-top:-1em;white-space:nowrap}.rickshaw_graph .detail .item.left{left:0}.rickshaw_graph .detail .item.right{right:0}.rickshaw_graph .detail .item.active{opacity:1;background:rgba(0,0,0,.8)}.rickshaw_graph .detail .item:after{position:absolute;display:block;width:0;height:0;content:\\"\\";border:5px solid transparent}.rickshaw_graph .detail .item.left:after{top:1em;left:-5px;margin-top:-5px;border-right-color:rgba(0,0,0,.8);border-left-width:0}.rickshaw_graph .detail .item.right:after{top:1em;right:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,.8);border-right-width:0}.rickshaw_graph .detail .dot{width:4px;height:4px;margin-left:-2px;margin-top:-2px;border-radius:5px;position:absolute;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;border-width:2px;border-style:solid;display:none;background-clip:padding-box}.rickshaw_graph .detail .dot.active{display:block}.rickshaw_graph{position:relative}.rickshaw_graph svg{display:block;overflow:hidden}.rickshaw_graph .x_tick{position:absolute;top:0;bottom:0;width:0;border-left:1px dotted rgba(0,0,0,.2);pointer-events:none}.rickshaw_graph .x_tick .title{position:absolute;font-size:12px;font-family:Arial,sans-serif;opacity:.5;white-space:nowrap;margin-left:3px;bottom:1px}.rickshaw_annotation_timeline{height:1px;border-top:1px solid #e0e0e0;margin-top:10px;position:relative}.rickshaw_annotation_timeline .annotation{position:absolute;height:6px;width:6px;margin-left:-2px;top:-3px;border-radius:5px;background-color:rgba(0,0,0,.25)}.rickshaw_graph .annotation_line{position:absolute;top:0;bottom:-6px;width:0;border-left:2px solid rgba(0,0,0,.3);display:none}.rickshaw_graph .annotation_line.active{display:block}.rickshaw_graph .annotation_range{background:rgba(0,0,0,.1);display:none;position:absolute;top:0;bottom:-6px}.rickshaw_graph .annotation_range.active{display:block}.rickshaw_graph .annotation_range.active.offscreen{display:none}.rickshaw_annotation_timeline .annotation .content{background:#fff;color:#000;opacity:.9;padding:5px;box-shadow:0 0 2px rgba(0,0,0,.8);border-radius:3px;position:relative;z-index:20;font-size:12px;padding:6px 8px 8px;top:18px;left:-11px;width:160px;display:none;cursor:pointer}.rickshaw_annotation_timeline .annotation .content:before{content:\\"\\\\25B2\\";position:absolute;top:-11px;color:#fff;text-shadow:0 -1px 1px rgba(0,0,0,.8)}.rickshaw_annotation_timeline .annotation.active,.rickshaw_annotation_timeline .annotation:hover{background-color:rgba(0,0,0,.8);cursor:none}.rickshaw_annotation_timeline .annotation .content:hover{z-index:50}.rickshaw_annotation_timeline .annotation.active .content{display:block}.rickshaw_annotation_timeline .annotation:hover .content{display:block;z-index:50}.rickshaw_graph .x_axis_d3,.rickshaw_graph .y_axis{fill:none}.rickshaw_graph .x_ticks_d3 .tick,.rickshaw_graph .y_ticks .tick{stroke:rgba(0,0,0,.16);stroke-width:2px;shape-rendering:crisp-edges;pointer-events:none}.rickshaw_graph .x_grid_d3 .tick,.rickshaw_graph .y_grid .tick{z-index:-1;stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:1 1}.rickshaw_graph .y_grid .tick[data-y-value=\\"0\\"]{stroke-dasharray:1 0}.rickshaw_graph .x_grid_d3 path,.rickshaw_graph .y_grid path{fill:none;stroke:none}.rickshaw_graph .x_ticks_d3 path,.rickshaw_graph .y_ticks path{fill:none;stroke:gray}.rickshaw_graph .x_ticks_d3 text,.rickshaw_graph .y_ticks text{opacity:.5;font-size:12px;pointer-events:none}.rickshaw_graph .x_tick.glow .title,.rickshaw_graph .y_ticks.glow text{fill:#000;color:#000;text-shadow:-1px 1px 0 hsla(0,0%,100%,.1),1px -1px 0 hsla(0,0%,100%,.1),1px 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1),0 -1px 0 hsla(0,0%,100%,.1),1px 0 0 hsla(0,0%,100%,.1),-1px 0 0 hsla(0,0%,100%,.1),-1px -1px 0 hsla(0,0%,100%,.1)}.rickshaw_graph .x_tick.inverse .title,.rickshaw_graph .y_ticks.inverse text{fill:#fff;color:#fff;text-shadow:-1px 1px 0 rgba(0,0,0,.8),1px -1px 0 rgba(0,0,0,.8),1px 1px 0 rgba(0,0,0,.8),0 1px 0 rgba(0,0,0,.8),0 -1px 0 rgba(0,0,0,.8),1px 0 0 rgba(0,0,0,.8),-1px 0 0 rgba(0,0,0,.8),-1px -1px 0 rgba(0,0,0,.8)}.rickshaw_legend{font-family:Arial;font-size:12px;color:#fff;background:#404040;display:inline-block;padding:12px 5px;border-radius:2px;position:relative}.rickshaw_legend:hover{z-index:10}.rickshaw_legend .swatch{width:10px;height:10px;border:1px solid rgba(0,0,0,.2)}.rickshaw_legend .line{clear:both;line-height:140%;padding-right:15px}.rickshaw_legend .line .swatch{display:inline-block;margin-right:3px;border-radius:2px}.rickshaw_legend .label{margin:0;white-space:nowrap;display:inline;font-size:inherit;background-color:transparent;color:inherit;font-weight:400;line-height:normal;padding:0;text-shadow:none}.rickshaw_legend .action:hover{opacity:.6}.rickshaw_legend .action{margin-right:.2em;font-size:10px;opacity:.2;cursor:pointer;font-size:14px}.rickshaw_legend .line.disabled{opacity:.4}.rickshaw_legend ul{list-style-type:none;margin:0;padding:0;margin:2px;cursor:pointer}.rickshaw_legend li{padding:0 0 0 2px;min-width:80px;white-space:nowrap}.rickshaw_legend li:hover{background:hsla(0,0%,100%,.08);border-radius:3px}.rickshaw_legend li:active{background:hsla(0,0%,100%,.2);border-radius:3px}", ""]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./public/stylesheets/rickshaw.min.css\n ** module id = 564\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/rickshaw.min.css?./~/css-loader');
},function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(28)();\n// imports\n\n\n// module\nexports.push([module.id, ".toast-title{font-weight:700}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#fff}.toast-message a:hover{color:#ccc;text-decoration:none}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999}#toast-container *{box-sizing:border-box}#toast-container>div{margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;border-radius:3px 3px 3px 3px;background-position:15px;background-repeat:no-repeat;box-shadow:0 0 12px #999;color:#fff;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}#toast-container>:hover{box-shadow:0 0 12px #000;opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url(\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=\\")!important}#toast-container>.toast-error{background-image:url(\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=\\")!important}#toast-container>.toast-success{background-image:url(\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==\\")!important}#toast-container>.toast-warning{background-image:url(\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=\\")!important}#toast-container.toast-bottom-full-width>div,#toast-container.toast-top-full-width>div{width:96%;margin:auto}.toast{background-color:#030303}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:108px}}@media all and (min-width:241px)and (max-width:320px){#toast-container>div{padding:8px 8px 8px 50px;width:128px}}@media all and (min-width:321px)and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:192px}}@media all and (min-width:481px)and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:300px}}", ""]);\n\n// exports\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader!./public/stylesheets/toastr.min.css\n ** module id = 565\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/stylesheets/toastr.min.css?./~/css-loader')},,,,function(module,exports,__webpack_require__){eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * dc 2.0.0-beta.19\n * http://dc-js.github.io/dc.js/\n * Copyright 2012-2015 Nick Zhu & the dc.js Developers\n * https://github.com/dc-js/dc.js/blob/master/AUTHORS\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n(function() { function _dc(d3, crossfilter) {\n'use strict';\n\n/**\n * The entire dc.js library is scoped under the **dc** name space. It does not introduce\n * anything else into the global name space.\n *\n * Most `dc` functions are designed to allow function chaining, meaning they return the current chart\n * instance whenever it is appropriate. The getter forms of functions do not participate in function\n * chaining because they necessarily return values that are not the chart. Although some,\n * such as `.svg` and `.xAxis`, return values that are chainable d3 objects.\n * @namespace dc\n * @version 2.0.0-beta.19\n * @example\n * // Example chaining\n * chart.width(300)\n * .height(300)\n * .filter('sunday');\n */\n/*jshint -W079*/\nvar dc = {\n version: '2.0.0-beta.19',\n constants: {\n CHART_CLASS: 'dc-chart',\n DEBUG_GROUP_CLASS: 'debug',\n STACK_CLASS: 'stack',\n DESELECTED_CLASS: 'deselected',\n SELECTED_CLASS: 'selected',\n NODE_INDEX_NAME: '__index__',\n GROUP_INDEX_NAME: '__group_index__',\n DEFAULT_CHART_GROUP: '__default_chart_group__',\n EVENT_DELAY: 40,\n NEGLIGIBLE_NUMBER: 1e-10\n },\n _renderlet: null\n};\n/*jshint +W079*/\n\ndc.chartRegistry = (function () {\n // chartGroup:string => charts:array\n var _chartMap = {};\n\n function initializeChartGroup (group) {\n if (!group) {\n group = dc.constants.DEFAULT_CHART_GROUP;\n }\n\n if (!_chartMap[group]) {\n _chartMap[group] = [];\n }\n\n return group;\n }\n\n return {\n has: function (chart) {\n for (var e in _chartMap) {\n if (_chartMap[e].indexOf(chart) >= 0) {\n return true;\n }\n }\n return false;\n },\n\n register: function (chart, group) {\n group = initializeChartGroup(group);\n _chartMap[group].push(chart);\n },\n\n deregister: function (chart, group) {\n group = initializeChartGroup(group);\n for (var i = 0; i < _chartMap[group].length; i++) {\n if (_chartMap[group][i].anchorName() === chart.anchorName()) {\n _chartMap[group].splice(i, 1);\n break;\n }\n }\n },\n\n clear: function (group) {\n if (group) {\n delete _chartMap[group];\n } else {\n _chartMap = {};\n }\n },\n\n list: function (group) {\n group = initializeChartGroup(group);\n return _chartMap[group];\n }\n };\n})();\n\ndc.registerChart = function (chart, group) {\n dc.chartRegistry.register(chart, group);\n};\n\ndc.deregisterChart = function (chart, group) {\n dc.chartRegistry.deregister(chart, group);\n};\n\ndc.hasChart = function (chart) {\n return dc.chartRegistry.has(chart);\n};\n\ndc.deregisterAllCharts = function (group) {\n dc.chartRegistry.clear(group);\n};\n\n/**\n * Clear all filters on all charts within the given chart group. If the chart group is not given then\n * only charts that belong to the default chart group will be reset.\n * @memberof dc\n * @name filterAll\n * @param {String} [group]\n */\ndc.filterAll = function (group) {\n var charts = dc.chartRegistry.list(group);\n for (var i = 0; i < charts.length; ++i) {\n charts[i].filterAll();\n }\n};\n\n/**\n * Reset zoom level / focus on all charts that belong to the given chart group. If the chart group is\n * not given then only charts that belong to the default chart group will be reset.\n * @memberof dc\n * @name refocusAll\n * @param {String} [group]\n */\ndc.refocusAll = function (group) {\n var charts = dc.chartRegistry.list(group);\n for (var i = 0; i < charts.length; ++i) {\n if (charts[i].focus) {\n charts[i].focus();\n }\n }\n};\n\n/**\n * Re-render all charts belong to the given chart group. If the chart group is not given then only\n * charts that belong to the default chart group will be re-rendered.\n * @memberof dc\n * @name renderAll\n * @param {String} [group]\n */\ndc.renderAll = function (group) {\n var charts = dc.chartRegistry.list(group);\n for (var i = 0; i < charts.length; ++i) {\n charts[i].render();\n }\n\n if (dc._renderlet !== null) {\n dc._renderlet(group);\n }\n};\n\n/**\n * Redraw all charts belong to the given chart group. If the chart group is not given then only charts\n * that belong to the default chart group will be re-drawn. Redraw is different from re-render since\n * when redrawing dc tries to update the graphic incrementally, using transitions, instead of starting\n * from scratch.\n * @memberof dc\n * @name redrawAll\n * @param {String} [group]\n */\ndc.redrawAll = function (group) {\n var charts = dc.chartRegistry.list(group);\n for (var i = 0; i < charts.length; ++i) {\n charts[i].redraw();\n }\n\n if (dc._renderlet !== null) {\n dc._renderlet(group);\n }\n};\n\n/**\n * If this boolean is set truthy, all transitions will be disabled, and changes to the charts will happen\n * immediately\n * @memberof dc\n * @name disableTransitions\n * @type {Boolean}\n * @default false\n */\ndc.disableTransitions = false;\n\ndc.transition = function (selections, duration, callback, name) {\n if (duration <= 0 || duration === undefined || dc.disableTransitions) {\n return selections;\n }\n\n var s = selections\n .transition(name)\n .duration(duration);\n\n if (typeof(callback) === 'function') {\n callback(s);\n }\n\n return s;\n};\n\n/* somewhat silly, but to avoid duplicating logic */\ndc.optionalTransition = function (enable, duration, callback, name) {\n if (enable) {\n return function (selection) {\n return dc.transition(selection, duration, callback, name);\n };\n } else {\n return function (selection) {\n return selection;\n };\n }\n};\n\n/**\n * @name units\n * @memberof dc\n * @type {{}}\n */\ndc.units = {};\n\n/**\n * The default value for `xUnits` for the [Coordinate Grid Chart](#coordinate-grid-chart) and should\n * be used when the x values are a sequence of integers.\n * It is a function that counts the number of integers in the range supplied in its start and end parameters.\n * @name integers\n * @memberof dc.units\n * @example\n * chart.xUnits(dc.units.integers) // already the default\n * @param {Number} start\n * @param {Number} end\n * @returns {Number}\n */\ndc.units.integers = function (start, end) {\n return Math.abs(end - start);\n};\n\n/**\n * This argument can be passed to the `xUnits` function of the to specify ordinal units for the x\n * axis. Usually this parameter is used in combination with passing `d3.scale.ordinal()` to `.x`.\n * It just returns the domain passed to it, which for ordinal charts is an array of all values.\n * @name ordinal\n * @memberof dc.units\n * @example\n * chart.xUnits(dc.units.ordinal)\n * .x(d3.scale.ordinal())\n * @param {*} start\n * @param {*} end\n * @param {Array} domain\n * @returns {Array}\n */\ndc.units.ordinal = function (start, end, domain) {\n return domain;\n};\n\n/**\n * @name fp\n * @memberof dc.units\n * @type {{}}\n */\ndc.units.fp = {};\n/**\n * This function generates an argument for the [Coordinate Grid Chart's](#coordinate-grid-chart)\n * `xUnits` function specifying that the x values are floating-point numbers with the given\n * precision.\n * The returned function determines how many values at the given precision will fit into the range\n * supplied in its start and end parameters.\n * @name precision\n * @memberof dc.units.fp\n * @example\n * // specify values (and ticks) every 0.1 units\n * chart.xUnits(dc.units.fp.precision(0.1)\n * // there are 500 units between 0.5 and 1 if the precision is 0.001\n * var thousandths = dc.units.fp.precision(0.001);\n * thousandths(0.5, 1.0) // returns 500\n * @param {Number} precision\n * @returns {Function} start-end unit function\n */\ndc.units.fp.precision = function (precision) {\n var _f = function (s, e) {\n var d = Math.abs((e - s) / _f.resolution);\n if (dc.utils.isNegligible(d - Math.floor(d))) {\n return Math.floor(d);\n } else {\n return Math.ceil(d);\n }\n };\n _f.resolution = precision;\n return _f;\n};\n\ndc.round = {};\ndc.round.floor = function (n) {\n return Math.floor(n);\n};\ndc.round.ceil = function (n) {\n return Math.ceil(n);\n};\ndc.round.round = function (n) {\n return Math.round(n);\n};\n\ndc.override = function (obj, functionName, newFunction) {\n var existingFunction = obj[functionName];\n obj['_' + functionName] = existingFunction;\n obj[functionName] = newFunction;\n};\n\ndc.renderlet = function (_) {\n if (!arguments.length) {\n return dc._renderlet;\n }\n dc._renderlet = _;\n return dc;\n};\n\ndc.instanceOfChart = function (o) {\n return o instanceof Object && o.__dcFlag__ && true;\n};\n\ndc.errors = {};\n\ndc.errors.Exception = function (msg) {\n var _msg = msg || 'Unexpected internal error';\n\n this.message = _msg;\n\n this.toString = function () {\n return _msg;\n };\n this.stack = (new Error()).stack;\n};\ndc.errors.Exception.prototype = Object.create(Error.prototype);\ndc.errors.Exception.prototype.constructor = dc.errors.Exception;\n\ndc.errors.InvalidStateException = function () {\n dc.errors.Exception.apply(this, arguments);\n};\n\ndc.errors.InvalidStateException.prototype = Object.create(dc.errors.Exception.prototype);\ndc.errors.InvalidStateException.prototype.constructor = dc.errors.InvalidStateException;\n\ndc.errors.BadArgumentException = function() {\n dc.errors.Exception.apply(this, arguments);\n};\n\ndc.errors.BadArgumentException.prototype = Object.create(dc.errors.Exception.prototype);\ndc.errors.BadArgumentException.prototype.constructor = dc.errors.BadArgumentException;\n\ndc.dateFormat = d3.time.format('%m/%d/%Y');\n\ndc.printers = {};\n\ndc.printers.filters = function (filters) {\n var s = '';\n\n for (var i = 0; i < filters.length; ++i) {\n if (i > 0) {\n s += ', ';\n }\n s += dc.printers.filter(filters[i]);\n }\n\n return s;\n};\n\ndc.printers.filter = function (filter) {\n var s = '';\n\n if (typeof filter !== 'undefined' && filter !== null) {\n if (filter instanceof Array) {\n if (filter.length >= 2) {\n s = '[' + dc.utils.printSingleValue(filter[0]) + ' -> ' + dc.utils.printSingleValue(filter[1]) + ']';\n } else if (filter.length >= 1) {\n s = dc.utils.printSingleValue(filter[0]);\n }\n } else {\n s = dc.utils.printSingleValue(filter);\n }\n }\n\n return s;\n};\n\ndc.pluck = function (n, f) {\n if (!f) {\n return function (d) { return d[n]; };\n }\n return function (d, i) { return f.call(d, d[n], i); };\n};\n\ndc.utils = {};\n\ndc.utils.printSingleValue = function (filter) {\n var s = '' + filter;\n\n if (filter instanceof Date) {\n s = dc.dateFormat(filter);\n } else if (typeof(filter) === 'string') {\n s = filter;\n } else if (dc.utils.isFloat(filter)) {\n s = dc.utils.printSingleValue.fformat(filter);\n } else if (dc.utils.isInteger(filter)) {\n s = Math.round(filter);\n }\n\n return s;\n};\ndc.utils.printSingleValue.fformat = d3.format('.2f');\n\n// FIXME: these assume than any string r is a percentage (whether or not it\n// includes %). They also generate strange results if l is a string.\ndc.utils.add = function (l, r) {\n if (typeof r === 'string') {\n r = r.replace('%', '');\n }\n\n if (l instanceof Date) {\n if (typeof r === 'string') {\n r = +r;\n }\n var d = new Date();\n d.setTime(l.getTime());\n d.setDate(l.getDate() + r);\n return d;\n } else if (typeof r === 'string') {\n var percentage = (+r / 100);\n return l > 0 ? l * (1 + percentage) : l * (1 - percentage);\n } else {\n return l + r;\n }\n};\n\ndc.utils.subtract = function (l, r) {\n if (typeof r === 'string') {\n r = r.replace('%', '');\n }\n\n if (l instanceof Date) {\n if (typeof r === 'string') {\n r = +r;\n }\n var d = new Date();\n d.setTime(l.getTime());\n d.setDate(l.getDate() - r);\n return d;\n } else if (typeof r === 'string') {\n var percentage = (+r / 100);\n return l < 0 ? l * (1 + percentage) : l * (1 - percentage);\n } else {\n return l - r;\n }\n};\n\ndc.utils.isNumber = function (n) {\n return n === +n;\n};\n\ndc.utils.isFloat = function (n) {\n return n === +n && n !== (n | 0);\n};\n\ndc.utils.isInteger = function (n) {\n return n === +n && n === (n | 0);\n};\n\ndc.utils.isNegligible = function (n) {\n return !dc.utils.isNumber(n) || (n < dc.constants.NEGLIGIBLE_NUMBER && n > -dc.constants.NEGLIGIBLE_NUMBER);\n};\n\ndc.utils.clamp = function (val, min, max) {\n return val < min ? min : (val > max ? max : val);\n};\n\nvar _idCounter = 0;\ndc.utils.uniqueId = function () {\n return ++_idCounter;\n};\n\ndc.utils.nameToId = function (name) {\n return name.toLowerCase().replace(/[\\s]/g, '_').replace(/[\\.']/g, '');\n};\n\ndc.utils.appendOrSelect = function (parent, selector, tag) {\n tag = tag || selector;\n var element = parent.select(selector);\n if (element.empty()) {\n element = parent.append(tag);\n }\n return element;\n};\n\ndc.utils.safeNumber = function (n) { return dc.utils.isNumber(+n) ? +n : 0;};\n\ndc.logger = {};\n\ndc.logger.enableDebugLog = false;\n\ndc.logger.warn = function (msg) {\n if (console) {\n if (console.warn) {\n console.warn(msg);\n } else if (console.log) {\n console.log(msg);\n }\n }\n\n return dc.logger;\n};\n\ndc.logger.debug = function (msg) {\n if (dc.logger.enableDebugLog && console) {\n if (console.debug) {\n console.debug(msg);\n } else if (console.log) {\n console.log(msg);\n }\n }\n\n return dc.logger;\n};\n\ndc.logger.deprecate = function (fn, msg) {\n // Allow logging of deprecation\n var warned = false;\n function deprecated () {\n if (!warned) {\n dc.logger.warn(msg);\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n return deprecated;\n};\n\ndc.events = {\n current: null\n};\n\n/**\n * This function triggers a throttled event function with a specified delay (in milli-seconds). Events\n * that are triggered repetitively due to user interaction such brush dragging might flood the library\n * and invoke more renders than can be executed in time. Using this function to wrap your event\n * function allows the library to smooth out the rendering by throttling events and only responding to\n * the most recent event.\n * @name events.trigger\n * @memberof dc\n * @example\n * chart.on('renderlet', function(chart) {\n * // smooth the rendering through event throttling\n * dc.events.trigger(function(){\n * // focus some other chart to the range selected by user on this chart\n * someOtherChart.focus(chart.filter());\n * });\n * })\n * @param {Function} closure\n * @param {Number} [delay]\n */\ndc.events.trigger = function (closure, delay) {\n if (!delay) {\n closure();\n return;\n }\n\n dc.events.current = closure;\n\n setTimeout(function () {\n if (closure === dc.events.current) {\n closure();\n }\n }, delay);\n};\n\n/**\n * The dc.js filters are functions which are passed into crossfilter to chose which records will be\n * accumulated to produce values for the charts. In the crossfilter model, any filters applied on one\n * dimension will affect all the other dimensions but not that one. dc always applies a filter\n * function to the dimension; the function combines multiple filters and if any of them accept a\n * record, it is filtered in.\n *\n * These filter constructors are used as appropriate by the various charts to implement brushing. We\n * mention below which chart uses which filter. In some cases, many instances of a filter will be added.\n *\n * Each of the dc.js filters is an object with the following properties:\n * * `isFiltered` - a function that returns true if a value is within the filter\n * * `filterType` - a string identifying the filter, here the name of the constructor\n *\n * Currently these filter objects are also arrays, but this is not a requirement. Custom filters\n * can be used as long as they have the properties above.\n * @name filters\n * @memberof dc\n * @type {{}}\n */\ndc.filters = {};\n\n/**\n * RangedFilter is a filter which accepts keys between `low` and `high`. It is used to implement X\n * axis brushing for the [coordinate grid charts](#coordinate-grid-mixin).\n *\n * Its `filterType` is 'RangedFilter'\n * @name RangedFilter\n * @memberof dc.filters\n * @param {Number} low\n * @param {Number} high\n * @returns {Array}\n * @constructor\n */\ndc.filters.RangedFilter = function (low, high) {\n var range = new Array(low, high);\n range.isFiltered = function (value) {\n return value >= this[0] && value < this[1];\n };\n range.filterType = 'RangedFilter';\n\n return range;\n};\n\n/**\n * TwoDimensionalFilter is a filter which accepts a single two-dimensional value. It is used by the\n * [heat map chart](#heat-map) to include particular cells as they are clicked. (Rows and columns are\n * filtered by filtering all the cells in the row or column.)\n *\n * Its `filterType` is 'TwoDimensionalFilter'\n * @name TwoDimensionalFilter\n * @memberof dc.filters\n * @param {Array} filter\n * @returns {Array}\n * @constructor\n */\ndc.filters.TwoDimensionalFilter = function (filter) {\n if (filter === null) { return null; }\n\n var f = filter;\n f.isFiltered = function (value) {\n return value.length && value.length === f.length &&\n value[0] === f[0] && value[1] === f[1];\n };\n f.filterType = 'TwoDimensionalFilter';\n\n return f;\n};\n\n/**\n * The RangedTwoDimensionalFilter allows filtering all values which fit within a rectangular\n * region. It is used by the [scatter plot](#scatter-plot) to implement rectangular brushing.\n *\n * It takes two two-dimensional points in the form `[[x1,y1],[x2,y2]]`, and normalizes them so that\n * `x1 <= x2` and `y1 <- y2`. It then returns a filter which accepts any points which are in the\n * rectangular range including the lower values but excluding the higher values.\n *\n * If an array of two values are given to the RangedTwoDimensionalFilter, it interprets the values as\n * two x coordinates `x1` and `x2` and returns a filter which accepts any points for which `x1 <= x <\n * x2`.\n *\n * Its `filterType` is 'RangedTwoDimensionalFilter'\n * @name RangedTwoDimensionalFilter\n * @memberof dc.filters\n * @param {Array>} filter\n * @returns {Array>}\n * @constructor\n */\ndc.filters.RangedTwoDimensionalFilter = function (filter) {\n if (filter === null) { return null; }\n\n var f = filter;\n var fromBottomLeft;\n\n if (f[0] instanceof Array) {\n fromBottomLeft = [\n [Math.min(filter[0][0], filter[1][0]), Math.min(filter[0][1], filter[1][1])],\n [Math.max(filter[0][0], filter[1][0]), Math.max(filter[0][1], filter[1][1])]\n ];\n } else {\n fromBottomLeft = [[filter[0], -Infinity], [filter[1], Infinity]];\n }\n\n f.isFiltered = function (value) {\n var x, y;\n\n if (value instanceof Array) {\n if (value.length !== 2) {\n return false;\n }\n x = value[0];\n y = value[1];\n } else {\n x = value;\n y = fromBottomLeft[0][1];\n }\n\n return x >= fromBottomLeft[0][0] && x < fromBottomLeft[1][0] &&\n y >= fromBottomLeft[0][1] && y < fromBottomLeft[1][1];\n };\n f.filterType = 'RangedTwoDimensionalFilter';\n\n return f;\n};\n\n/**\n * `dc.baseMixin` is an abstract functional object representing a basic `dc` chart object\n * for all chart and widget implementations. Methods from the `dc.baseMixin` are inherited\n * and available on all chart implementations in the `dc` library.\n * @name baseMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @return {dc.baseMixin}\n */\ndc.baseMixin = function (_chart) {\n _chart.__dcFlag__ = dc.utils.uniqueId();\n\n var _dimension;\n var _group;\n\n var _anchor;\n var _root;\n var _svg;\n var _isChild;\n\n var _minWidth = 200;\n var _defaultWidth = function (element) {\n var width = element && element.getBoundingClientRect && element.getBoundingClientRect().width;\n return (width && width > _minWidth) ? width : _minWidth;\n };\n var _width = _defaultWidth;\n\n var _minHeight = 200;\n var _defaultHeight = function (element) {\n var height = element && element.getBoundingClientRect && element.getBoundingClientRect().height;\n return (height && height > _minHeight) ? height : _minHeight;\n };\n var _height = _defaultHeight;\n\n var _keyAccessor = dc.pluck('key');\n var _valueAccessor = dc.pluck('value');\n var _label = dc.pluck('key');\n\n var _ordering = dc.pluck('key');\n var _orderSort;\n\n var _renderLabel = false;\n\n var _title = function (d) {\n return _chart.keyAccessor()(d) + ': ' + _chart.valueAccessor()(d);\n };\n var _renderTitle = true;\n\n var _transitionDuration = 750;\n\n var _filterPrinter = dc.printers.filters;\n\n var _mandatoryAttributes = ['dimension', 'group'];\n\n var _chartGroup = dc.constants.DEFAULT_CHART_GROUP;\n\n var _listeners = d3.dispatch(\n 'preRender',\n 'postRender',\n 'preRedraw',\n 'postRedraw',\n 'filtered',\n 'zoomed',\n 'renderlet',\n 'pretransition');\n\n var _legend;\n\n var _filters = [];\n var _filterHandler = function (dimension, filters) {\n if (filters.length === 0) {\n dimension.filter(null);\n } else if (filters.length === 1 && !filters[0].isFiltered) {\n // single value and not a function-based filter\n dimension.filterExact(filters[0]);\n } else if (filters.length === 1 && filters[0].filterType==='RangedFilter') {\n // single range-based filter\n dimension.filterRange(filters[0]);\n } else {\n dimension.filterFunction(function (d) {\n for (var i = 0; i < filters.length; i++) {\n var filter = filters[i];\n if (filter.isFiltered && filter.isFiltered(d)) {\n return true;\n } else if (filter <= d && filter >= d) {\n return true;\n }\n }\n return false;\n });\n }\n return filters;\n };\n\n var _data = function (group) {\n return group.all();\n };\n\n /**\n * Set or get the height attribute of a chart. The height is applied to the SVGElement generated by\n * the chart when rendered (or re-rendered). If a value is given, then it will be used to calculate\n * the new height and the chart returned for method chaining. The value can either be a numeric, a\n * function, or falsy. If no value is specified then the value of the current height attribute will\n * be returned.\n *\n * By default, without an explicit height being given, the chart will select the width of its\n * anchor element. If that isn't possible it defaults to 200 (provided by the\n * {@link #dc.baseMixin.minHeight minHeight} property). Setting the value falsy will return\n * the chart to the default behavior.\n * @name height\n * @memberof dc.baseMixin\n * @instance\n * @see {@link #dc.baseMixin+minHeight minHeight}\n * @example\n * // Default height\n * chart.height(function (element) {\n * var height = element && element.getBoundingClientRect && element.getBoundingClientRect().height;\n * return (height && height > chart.minHeight()) ? height : chart.minHeight();\n * });\n *\n * chart.height(250); // Set the chart's height to 250px;\n * chart.height(function(anchor) { return doSomethingWith(anchor); }); // set the chart's height with a function\n * chart.height(null); // reset the height to the default auto calculation\n * @param {Number|Function} [height]\n * @return {Number}\n * @return {dc.baseMixin}\n */\n _chart.height = function (height) {\n if (!arguments.length) {\n return _height(_root.node());\n }\n _height = d3.functor(height || _defaultHeight);\n return _chart;\n };\n\n /**\n * Set or get the width attribute of a chart.\n * @name width\n * @memberof dc.baseMixin\n * @instance\n * @see {@link #dc.baseMixin+height height}\n * @see {@link #dc.baseMixin+minWidth minWidth}\n * @example\n * // Default width\n * chart.width(function (element) {\n * var width = element && element.getBoundingClientRect && element.getBoundingClientRect().width;\n * return (width && width > chart.minWidth()) ? width : chart.minWidth();\n * });\n * @param {Number|Function} [width]\n * @return {Number}\n * @return {dc.baseMixin}\n */\n _chart.width = function (width) {\n if (!arguments.length) {\n return _width(_root.node());\n }\n _width = d3.functor(width || _defaultWidth);\n return _chart;\n };\n\n /**\n * Set or get the minimum width attribute of a chart. This only has effect when used with the default `width` function.\n * @name minWidth\n * @memberof dc.baseMixin\n * @instance\n * @see {@link #dc.baseMixin+width width}\n * @param {Number} [minWidth=200]\n * @return {Number}\n * @return {dc.baseMixin}\n */\n _chart.minWidth = function (minWidth) {\n if (!arguments.length) {\n return _minWidth;\n }\n _minWidth = minWidth;\n return _chart;\n };\n\n /**\n * Set or get the minimum height attribute of a chart. This only has effect when used with the default `height` function.\n * @name minHeight\n * @memberof dc.baseMixin\n * @instance\n * @see {@link #dc.baseMixin+height height}\n * @param {Number} [minHeight=200]\n * @return {Number}\n * @return {dc.baseMixin}\n */\n _chart.minHeight = function (minHeight) {\n if (!arguments.length) {\n return _minHeight;\n }\n _minHeight = minHeight;\n return _chart;\n };\n\n /**\n * **mandatory**\n *\n * Set or get the dimension attribute of a chart. In `dc`, a dimension can be any valid [crossfilter\n * dimension](https://github.com/square/crossfilter/wiki/API-Reference#wiki-dimension).\n *\n * If a value is given, then it will be used as the new dimension. If no value is specified then\n * the current dimension will be returned.\n * @name dimension\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/square/crossfilter/wiki/API-Reference#dimension crossfilter.dimension}\n * @example\n * var index = crossfilter([]);\n * var dimension = index.dimension(dc.pluck('key'));\n * chart.dimension(dimension);\n * @param {crossfilter.dimension} [dimension]\n * @return {crossfilter.dimension}\n * @return {dc.baseMixin}\n */\n _chart.dimension = function (dimension) {\n if (!arguments.length) {\n return _dimension;\n }\n _dimension = dimension;\n _chart.expireCache();\n return _chart;\n };\n\n /**\n * Set the data callback or retrieve the chart's data set. The data callback is passed the chart's\n * group and by default will return `group.all()`. This behavior may be modified to, for instance,\n * return only the top 5 groups.\n * @name data\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // Default data function\n * chart.data(function (group) { return group.all(); });\n *\n * chart.data(function (group) { return group.top(5); });\n * @param {Function} [callback]\n * @return {*}\n * @return {dc.baseMixin}\n */\n _chart.data = function (callback) {\n if (!arguments.length) {\n return _data.call(_chart, _group);\n }\n _data = d3.functor(callback);\n _chart.expireCache();\n return _chart;\n };\n\n /**\n * **mandatory**\n *\n * Set or get the group attribute of a chart. In `dc` a group is a [crossfilter\n * group](https://github.com/square/crossfilter/wiki/API-Reference#group-map-reduce). Usually the group\n * should be created from the particular dimension associated with the same chart. If a value is\n * given, then it will be used as the new group.\n *\n * If no value specified then the current group will be returned.\n * If `name` is specified then it will be used to generate legend label.\n * @name group\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/square/crossfilter/wiki/API-Reference#group-map-reduce crossfilter.group}\n * @example\n * var index = crossfilter([]);\n * var dimension = index.dimension(dc.pluck('key'));\n * chart.dimension(dimension);\n * chart.group(dimension.group(crossfilter.reduceSum()));\n * @param {crossfilter.group} [group]\n * @param {String} [name]\n * @return {crossfilter.group}\n * @return {dc.baseMixin}\n */\n _chart.group = function (group, name) {\n if (!arguments.length) {\n return _group;\n }\n _group = group;\n _chart._groupName = name;\n _chart.expireCache();\n return _chart;\n };\n\n /**\n * Get or set an accessor to order ordinal dimensions. This uses `crossfilter.quicksort.by` as the\n * sort.\n * @name ordering\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/square/crossfilter/wiki/API-Reference#quicksort_by crossfilter.quicksort.by}\n * @example\n * // Default ordering accessor\n * _chart.ordering(dc.pluck('key'));\n * @param {Function} [orderFunction]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.ordering = function (orderFunction) {\n if (!arguments.length) {\n return _ordering;\n }\n _ordering = orderFunction;\n _orderSort = crossfilter.quicksort.by(_ordering);\n _chart.expireCache();\n return _chart;\n };\n\n _chart._computeOrderedGroups = function (data) {\n var dataCopy = data.slice(0);\n\n if (dataCopy.length <= 1) {\n return dataCopy;\n }\n\n if (!_orderSort) {\n _orderSort = crossfilter.quicksort.by(_ordering);\n }\n\n return _orderSort(dataCopy, 0, dataCopy.length);\n };\n\n /**\n * Clear all filters associated with this chart\n *\n * The same can be achieved by calling `chart.filter(null)`.\n * @name filterAll\n * @memberof dc.baseMixin\n * @instance\n * @return {dc.baseMixin}\n */\n _chart.filterAll = function () {\n return _chart.filter(null);\n };\n\n /**\n * Execute d3 single selection in the chart's scope using the given selector and return the d3\n * selection.\n *\n * This function is **not chainable** since it does not return a chart instance; however the d3\n * selection result can be chained to d3 function calls.\n * @name select\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/mbostock/d3/wiki/Selections d3.selection}\n * @example\n * // Similar to:\n * d3.select('#chart-id').select(selector);\n * @return {d3.selection}\n */\n _chart.select = function (s) {\n return _root.select(s);\n };\n\n /**\n * Execute in scope d3 selectAll using the given selector and return d3 selection result.\n *\n * This function is **not chainable** since it does not return a chart instance; however the d3\n * selection result can be chained to d3 function calls.\n * @name selectAll\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/mbostock/d3/wiki/Selections d3.selection}\n * @example\n * // Similar to:\n * d3.select('#chart-id').selectAll(selector);\n * @return {d3.selection}\n */\n _chart.selectAll = function (s) {\n return _root ? _root.selectAll(s) : null;\n };\n\n /**\n * Set the root SVGElement to either be an existing chart's root; or any valid [d3 single\n * selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying a dom\n * block element such as a div; or a dom element or d3 selection. Optionally registers the chart\n * within the chartGroup. This class is called internally on chart initialization, but be called\n * again to relocate the chart. However, it will orphan any previously created SVGElements.\n * @name anchor\n * @memberof dc.baseMixin\n * @instance\n * @param {anchorChart|anchorSelector|anchorNode} [parent]\n * @param {String} [chartGroup]\n * @return {String|node|d3.selection}\n * @return {dc.baseMixin}\n */\n _chart.anchor = function (parent, chartGroup) {\n if (!arguments.length) {\n return _anchor;\n }\n if (dc.instanceOfChart(parent)) {\n _anchor = parent.anchor();\n _root = parent.root();\n _isChild = true;\n } else if(parent) {\n if(parent.select && parent.classed) { // detect d3 selection\n _anchor = parent.node();\n } else {\n _anchor = parent;\n }\n _root = d3.select(_anchor);\n _root.classed(dc.constants.CHART_CLASS, true);\n dc.registerChart(_chart, chartGroup);\n _isChild = false;\n }\n else {\n throw new dc.errors.BadArgumentException('parent must be defined');\n }\n _chartGroup = chartGroup;\n return _chart;\n };\n\n /**\n * Returns the DOM id for the chart's anchored location.\n * @name anchorName\n * @memberof dc.baseMixin\n * @instance\n * @return {String}\n */\n _chart.anchorName = function () {\n var a = _chart.anchor();\n if (a && a.id) {\n return a.id;\n }\n if (a && a.replace) {\n return a.replace('#', '');\n }\n return 'dc-chart' + _chart.chartID();\n };\n\n /**\n * Returns the root element where a chart resides. Usually it will be the parent div element where\n * the SVGElement was created. You can also pass in a new root element however this is usually handled by\n * dc internally. Resetting the root element on a chart outside of dc internals may have\n * unexpected consequences.\n * @name root\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement HTMLElement}\n * @param {HTMLElement} [rootElement]\n * @return {HTMLElement}\n * @return {dc.baseMixin}\n */\n _chart.root = function (rootElement) {\n if (!arguments.length) {\n return _root;\n }\n _root = rootElement;\n return _chart;\n };\n\n /**\n * Returns the top SVGElement for this specific chart. You can also pass in a new SVGElement,\n * however this is usually handled by dc internally. Resetting the SVGElement on a chart outside\n * of dc internals may have unexpected consequences.\n * @name svg\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SVGElement SVGElement}\n * @param {SVGElement} [svgElement]\n * @return {SVGElement}\n * @return {dc.baseMixin}\n */\n _chart.svg = function (svgElement) {\n if (!arguments.length) {\n return _svg;\n }\n _svg = svgElement;\n return _chart;\n };\n\n /**\n * Remove the chart's SVGElements from the dom and recreate the container SVGElement.\n * @name resetSvg\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SVGElement SVGElement}\n * @return {SVGElement}\n */\n _chart.resetSvg = function () {\n _chart.select('svg').remove();\n return generateSvg();\n };\n\n function sizeSvg () {\n if (_svg) {\n _svg\n .attr('width', _chart.width())\n .attr('height', _chart.height());\n }\n }\n\n function generateSvg () {\n _svg = _chart.root().append('svg');\n sizeSvg();\n return _svg;\n }\n\n /**\n * Set or get the filter printer function. The filter printer function is used to generate human\n * friendly text for filter value(s) associated with the chart instance. By default dc charts use a\n * default filter printer `dc.printers.filter` that provides simple printing support for both\n * single value and ranged filters.\n * @name filterPrinter\n * @memberof dc.baseMixin\n * @instance\n * @param {Function} [filterPrinterFunction=dc.printers.filter]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.filterPrinter = function (filterPrinterFunction) {\n if (!arguments.length) {\n return _filterPrinter;\n }\n _filterPrinter = filterPrinterFunction;\n return _chart;\n };\n\n /**\n * Turn on optional control elements within the root element. dc currently supports the\n * following html control elements.\n * * root.selectAll('.reset') - elements are turned on if the chart has an active filter. This type\n * of control element is usually used to store a reset link to allow user to reset filter on a\n * certain chart. This element will be turned off automatically if the filter is cleared.\n * * root.selectAll('.filter') elements are turned on if the chart has an active filter. The text\n * content of this element is then replaced with the current filter value using the filter printer\n * function. This type of element will be turned off automatically if the filter is cleared.\n * @name turnOnControls\n * @memberof dc.baseMixin\n * @instance\n * @return {dc.baseMixin}\n */\n _chart.turnOnControls = function () {\n if (_root) {\n _chart.selectAll('.reset').style('display', null);\n _chart.selectAll('.filter').text(_filterPrinter(_chart.filters())).style('display', null);\n }\n return _chart;\n };\n\n /**\n * Turn off optional control elements within the root element.\n * @name turnOffControls\n * @memberof dc.baseMixin\n * @see {@link #dc.baseMixin+turnOnControls turnOnControls}\n * @instance\n * @return {dc.baseMixin}\n */\n _chart.turnOffControls = function () {\n if (_root) {\n _chart.selectAll('.reset').style('display', 'none');\n _chart.selectAll('.filter').style('display', 'none').text(_chart.filter());\n }\n return _chart;\n };\n\n /**\n * Set or get the animation transition duration (in milliseconds) for this chart instance.\n * @name transitionDuration\n * @memberof dc.baseMixin\n * @instance\n * @param {Number} [duration=750]\n * @return {Number}\n * @return {dc.baseMixin}\n */\n _chart.transitionDuration = function (duration) {\n if (!arguments.length) {\n return _transitionDuration;\n }\n _transitionDuration = duration;\n return _chart;\n };\n\n _chart._mandatoryAttributes = function (_) {\n if (!arguments.length) {\n return _mandatoryAttributes;\n }\n _mandatoryAttributes = _;\n return _chart;\n };\n\n function checkForMandatoryAttributes (a) {\n if (!_chart[a] || !_chart[a]()) {\n throw new dc.errors.InvalidStateException('Mandatory attribute chart.' + a +\n ' is missing on chart[#' + _chart.anchorName() + ']');\n }\n }\n\n /**\n * Invoking this method will force the chart to re-render everything from scratch. Generally it\n * should only be used to render the chart for the first time on the page or if you want to make\n * sure everything is redrawn from scratch instead of relying on the default incremental redrawing\n * behaviour.\n * @name render\n * @memberof dc.baseMixin\n * @instance\n * @return {dc.baseMixin}\n */\n _chart.render = function () {\n _listeners.preRender(_chart);\n\n if (_mandatoryAttributes) {\n _mandatoryAttributes.forEach(checkForMandatoryAttributes);\n }\n\n var result = _chart._doRender();\n\n if (_legend) {\n _legend.render();\n }\n\n _chart._activateRenderlets('postRender');\n\n return result;\n };\n\n _chart._activateRenderlets = function (event) {\n _listeners.pretransition(_chart);\n if (_chart.transitionDuration() > 0 && _svg) {\n _svg.transition().duration(_chart.transitionDuration())\n .each('end', function () {\n _listeners.renderlet(_chart);\n if (event) {\n _listeners[event](_chart);\n }\n });\n } else {\n _listeners.renderlet(_chart);\n if (event) {\n _listeners[event](_chart);\n }\n }\n };\n\n /**\n * Calling redraw will cause the chart to re-render data changes incrementally. If there is no\n * change in the underlying data dimension then calling this method will have no effect on the\n * chart. Most chart interaction in dc will automatically trigger this method through internal\n * events (in particular [dc.redrawAll](#dcredrawallchartgroup)); therefore, you only need to\n * manually invoke this function if data is manipulated outside of dc's control (for example if\n * data is loaded in the background using `crossfilter.add()`).\n * @name redraw\n * @memberof dc.baseMixin\n * @instance\n * @return {dc.baseMixin}\n */\n _chart.redraw = function () {\n sizeSvg();\n _listeners.preRedraw(_chart);\n\n var result = _chart._doRedraw();\n\n if (_legend) {\n _legend.render();\n }\n\n _chart._activateRenderlets('postRedraw');\n\n return result;\n };\n\n _chart.redrawGroup = function () {\n dc.redrawAll(_chart.chartGroup());\n };\n\n _chart.renderGroup = function () {\n dc.renderAll(_chart.chartGroup());\n };\n\n _chart._invokeFilteredListener = function (f) {\n if (f !== undefined) {\n _listeners.filtered(_chart, f);\n }\n };\n\n _chart._invokeZoomedListener = function () {\n _listeners.zoomed(_chart);\n };\n\n var _hasFilterHandler = function (filters, filter) {\n if (filter === null || typeof(filter) === 'undefined') {\n return filters.length > 0;\n }\n return filters.some(function (f) {\n return filter <= f && filter >= f;\n });\n };\n\n /**\n * Set or get the has filter handler. The has filter handler is a function that checks to see if\n * the chart's current filters include a specific filter. Using a custom has filter handler allows\n * you to change the way filters are checked for and replaced.\n * @name hasFilterHandler\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default has filter handler\n * chart.hasFilterHandler(function (filters, filter) {\n * if (filter === null || typeof(filter) === 'undefined') {\n * return filters.length > 0;\n * }\n * return filters.some(function (f) {\n * return filter <= f && filter >= f;\n * });\n * });\n *\n * // custom filter handler (no-op)\n * chart.hasFilterHandler(function(filters, filter) {\n * return false;\n * });\n * @param {Function} [hasFilterHandler]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.hasFilterHandler = function (hasFilterHandler) {\n if (!arguments.length) {\n return _hasFilterHandler;\n }\n _hasFilterHandler = hasFilterHandler;\n return _chart;\n };\n\n /**\n * Check whether any active filter or a specific filter is associated with particular chart instance.\n * This function is **not chainable**.\n * @name hasFilter\n * @memberof dc.baseMixin\n * @instance\n * @see {@link #dc.baseMixin+hasFilterHandler hasFilterHandler}\n * @param {*} [filter]\n * @return {Boolean}\n */\n _chart.hasFilter = function (filter) {\n return _hasFilterHandler(_filters, filter);\n };\n\n var _removeFilterHandler = function (filters, filter) {\n for (var i = 0; i < filters.length; i++) {\n if (filters[i] <= filter && filters[i] >= filter) {\n filters.splice(i, 1);\n break;\n }\n }\n return filters;\n };\n\n /**\n * Set or get the remove filter handler. The remove filter handler is a function that removes a\n * filter from the chart's current filters. Using a custom remove filter handler allows you to\n * change how filters are removed or perform additional work when removing a filter, e.g. when\n * using a filter server other than crossfilter.\n *\n * Any changes should modify the `filters` array argument and return that array.\n * @name removeFilterHandler\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default remove filter handler\n * chart.removeFilterHandler(function (filters, filter) {\n * for (var i = 0; i < filters.length; i++) {\n * if (filters[i] <= filter && filters[i] >= filter) {\n * filters.splice(i, 1);\n * break;\n * }\n * }\n * return filters;\n * });\n *\n * // custom filter handler (no-op)\n * chart.removeFilterHandler(function(filters, filter) {\n * return filters;\n * });\n * @param {Function} [removeFilterHandler]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.removeFilterHandler = function (removeFilterHandler) {\n if (!arguments.length) {\n return _removeFilterHandler;\n }\n _removeFilterHandler = removeFilterHandler;\n return _chart;\n };\n\n var _addFilterHandler = function (filters, filter) {\n filters.push(filter);\n return filters;\n };\n\n /**\n * Set or get the add filter handler. The add filter handler is a function that adds a filter to\n * the chart's filter list. Using a custom add filter handler allows you to change the way filters\n * are added or perform additional work when adding a filter, e.g. when using a filter server other\n * than crossfilter.\n *\n * Any changes should modify the `filters` array argument and return that array.\n * @name addFilterHandler\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default add filter handler\n * chart.addFilterHandler(function (filters, filter) {\n * filters.push(filter);\n * return filters;\n * });\n *\n * // custom filter handler (no-op)\n * chart.addFilterHandler(function(filters, filter) {\n * return filters;\n * });\n * @param {Function} [addFilterHandler]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.addFilterHandler = function (addFilterHandler) {\n if (!arguments.length) {\n return _addFilterHandler;\n }\n _addFilterHandler = addFilterHandler;\n return _chart;\n };\n\n var _resetFilterHandler = function (filters) {\n return [];\n };\n\n /**\n * Set or get the reset filter handler. The reset filter handler is a function that resets the\n * chart's filter list by returning a new list. Using a custom reset filter handler allows you to\n * change the way filters are reset, or perform additional work when resetting the filters,\n * e.g. when using a filter server other than crossfilter.\n *\n * This function should return an array.\n * @name resetFilterHandler\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default remove filter handler\n * function (filters) {\n * return [];\n * }\n *\n * // custom filter handler (no-op)\n * chart.resetFilterHandler(function(filters) {\n * return filters;\n * });\n * @param {Function} [resetFilterHandler]\n * @return {dc.baseMixin}\n */\n _chart.resetFilterHandler = function (resetFilterHandler) {\n if (!arguments.length) {\n return _resetFilterHandler;\n }\n _resetFilterHandler = resetFilterHandler;\n return _chart;\n };\n\n function applyFilters () {\n if (_chart.dimension() && _chart.dimension().filter) {\n var fs = _filterHandler(_chart.dimension(), _filters);\n _filters = fs ? fs : _filters;\n }\n }\n\n _chart.replaceFilter = function (_) {\n _filters = [];\n _chart.filter(_);\n };\n\n /**\n * Filter the chart by the given value or return the current filter if the input parameter is missing.\n * If the passed filter is not currently in the chart's filters, it is added to the filters by the\n * {@link #dc.baseMixin+addFilterHandler addFilterHandler}. If a filter exists already within the chart's\n * filters, it will be removed by the {@link #dc.baseMixin+removeFilterHandler removeFilterHandler}. If\n * a `null` value was passed at the filter, this denotes that the filters should be reset, and is performed\n * by the {@link #dc.baseMixin+resetFilterHandler resetFilterHandler}.\n *\n * Once the filters array has been updated, the filters are applied to the crossfilter.dimension, using the\n * {@link #dc.baseMixin+filterHandler filterHandler}.\n * @name filter\n * @memberof dc.baseMixin\n * @instance\n * @see {@link #dc.baseMixin+addFilterHandler addFilterHandler}\n * @see {@link #dc.baseMixin+removeFilterHandler removeFilterHandler}\n * @see {@link #dc.baseMixin+resetFilterHandler resetFilterHandler}\n * @see {@link #dc.baseMixin+filterHandler filterHandler}\n * @example\n * // filter by a single string\n * chart.filter('Sunday');\n * // filter by a single age\n * chart.filter(18);\n * @param {*} [filter]\n * @return {dc.baseMixin}\n */\n _chart.filter = function (filter) {\n if (!arguments.length) {\n return _filters.length > 0 ? _filters[0] : null;\n }\n if (filter instanceof Array && filter[0] instanceof Array && !filter.isFiltered) {\n filter[0].forEach(function (d) {\n if (_chart.hasFilter(d)) {\n _removeFilterHandler(_filters, d);\n } else {\n _addFilterHandler(_filters, d);\n }\n });\n } else if (filter === null) {\n _filters = _resetFilterHandler(_filters);\n } else {\n if (_chart.hasFilter(filter)) {\n _removeFilterHandler(_filters, filter);\n } else {\n _addFilterHandler(_filters, filter);\n }\n }\n applyFilters();\n _chart._invokeFilteredListener(filter);\n\n if (_root !== null && _chart.hasFilter()) {\n _chart.turnOnControls();\n } else {\n _chart.turnOffControls();\n }\n\n return _chart;\n };\n\n /**\n * Returns all current filters. This method does not perform defensive cloning of the internal\n * filter array before returning, therefore any modification of the returned array will effect the\n * chart's internal filter storage.\n * @name filters\n * @memberof dc.baseMixin\n * @instance\n * @return {Array<*>}\n */\n _chart.filters = function () {\n return _filters;\n };\n\n _chart.highlightSelected = function (e) {\n d3.select(e).classed(dc.constants.SELECTED_CLASS, true);\n d3.select(e).classed(dc.constants.DESELECTED_CLASS, false);\n };\n\n _chart.fadeDeselected = function (e) {\n d3.select(e).classed(dc.constants.SELECTED_CLASS, false);\n d3.select(e).classed(dc.constants.DESELECTED_CLASS, true);\n };\n\n _chart.resetHighlight = function (e) {\n d3.select(e).classed(dc.constants.SELECTED_CLASS, false);\n d3.select(e).classed(dc.constants.DESELECTED_CLASS, false);\n };\n\n /**\n * This function is passed to d3 as the onClick handler for each chart. The default behavior is to\n * filter on the clicked datum (passed to the callback) and redraw the chart group.\n * @name onClick\n * @memberof dc.baseMixin\n * @instance\n * @param {*} datum\n */\n _chart.onClick = function (datum) {\n var filter = _chart.keyAccessor()(datum);\n dc.events.trigger(function () {\n _chart.filter(filter);\n _chart.redrawGroup();\n });\n };\n\n /**\n * Set or get the filter handler. The filter handler is a function that performs the filter action\n * on a specific dimension. Using a custom filter handler allows you to perform additional logic\n * before or after filtering.\n * @name filterHandler\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/square/crossfilter/wiki/API-Reference#dimension_filter crossfilter.dimension.filter}\n * @example\n * // default filter handler\n * chart.filterHandler(function (dimension, filters) {\n * dimension.filter(null);\n * if (filters.length === 0) {\n * dimension.filter(null);\n * } else {\n * dimension.filterFunction(function (d) {\n * for (var i = 0; i < filters.length; i++) {\n * var filter = filters[i];\n * if (filter.isFiltered && filter.isFiltered(d)) {\n * return true;\n * } else if (filter <= d && filter >= d) {\n * return true;\n * }\n * }\n * return false;\n * });\n * }\n * return filters;\n * });\n *\n * // custom filter handler\n * chart.filterHandler(function(dimension, filter){\n * var newFilter = filter + 10;\n * dimension.filter(newFilter);\n * return newFilter; // set the actual filter value to the new value\n * });\n * @param {Function} [filterHandler]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.filterHandler = function (filterHandler) {\n if (!arguments.length) {\n return _filterHandler;\n }\n _filterHandler = filterHandler;\n return _chart;\n };\n\n // abstract function stub\n _chart._doRender = function () {\n // do nothing in base, should be overridden by sub-function\n return _chart;\n };\n\n _chart._doRedraw = function () {\n // do nothing in base, should be overridden by sub-function\n return _chart;\n };\n\n _chart.legendables = function () {\n // do nothing in base, should be overridden by sub-function\n return [];\n };\n\n _chart.legendHighlight = function () {\n // do nothing in base, should be overridden by sub-function\n };\n\n _chart.legendReset = function () {\n // do nothing in base, should be overridden by sub-function\n };\n\n _chart.legendToggle = function () {\n // do nothing in base, should be overriden by sub-function\n };\n\n _chart.isLegendableHidden = function () {\n // do nothing in base, should be overridden by sub-function\n return false;\n };\n\n /**\n * Set or get the key accessor function. The key accessor function is used to retrieve the key\n * value from the crossfilter group. Key values are used differently in different charts, for\n * example keys correspond to slices in a pie chart and x axis positions in a grid coordinate chart.\n * @name keyAccessor\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default key accessor\n * chart.keyAccessor(function(d) { return d.key; });\n * // custom key accessor for a multi-value crossfilter reduction\n * chart.keyAccessor(function(p) { return p.value.absGain; });\n * @param {Function} [keyAccessor]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.keyAccessor = function (keyAccessor) {\n if (!arguments.length) {\n return _keyAccessor;\n }\n _keyAccessor = keyAccessor;\n return _chart;\n };\n\n /**\n * Set or get the value accessor function. The value accessor function is used to retrieve the\n * value from the crossfilter group. Group values are used differently in different charts, for\n * example values correspond to slice sizes in a pie chart and y axis positions in a grid\n * coordinate chart.\n * @name valueAccessor\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default value accessor\n * chart.valueAccessor(function(d) { return d.value; });\n * // custom value accessor for a multi-value crossfilter reduction\n * chart.valueAccessor(function(p) { return p.value.percentageGain; });\n * @param {Function} [valueAccessor]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.valueAccessor = function (valueAccessor) {\n if (!arguments.length) {\n return _valueAccessor;\n }\n _valueAccessor = valueAccessor;\n return _chart;\n };\n\n /**\n * Set or get the label function. The chart class will use this function to render labels for each\n * child element in the chart, e.g. slices in a pie chart or bubbles in a bubble chart. Not every\n * chart supports the label function for example bar chart and line chart do not use this function\n * at all.\n * @name label\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default label function just return the key\n * chart.label(function(d) { return d.key; });\n * // label function has access to the standard d3 data binding and can get quite complicated\n * chart.label(function(d) { return d.data.key + '(' + Math.floor(d.data.value / all.value() * 100) + '%)'; });\n * @param {Function} [labelFunction]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.label = function (labelFunction) {\n if (!arguments.length) {\n return _label;\n }\n _label = labelFunction;\n _renderLabel = true;\n return _chart;\n };\n\n /**\n * Turn on/off label rendering\n * @name renderLabel\n * @memberof dc.baseMixin\n * @instance\n * @param {Boolean} [renderLabel=false]\n * @return {Boolean}\n * @return {dc.baseMixin}\n */\n _chart.renderLabel = function (renderLabel) {\n if (!arguments.length) {\n return _renderLabel;\n }\n _renderLabel = renderLabel;\n return _chart;\n };\n\n /**\n * Set or get the title function. The chart class will use this function to render the SVGElement title\n * (usually interpreted by browser as tooltips) for each child element in the chart, e.g. a slice\n * in a pie chart or a bubble in a bubble chart. Almost every chart supports the title function;\n * however in grid coordinate charts you need to turn off the brush in order to see titles, because\n * otherwise the brush layer will block tooltip triggering.\n * @name title\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default title function just return the key\n * chart.title(function(d) { return d.key + ': ' + d.value; });\n * // title function has access to the standard d3 data binding and can get quite complicated\n * chart.title(function(p) {\n * return p.key.getFullYear()\n * + '\\n'\n * + 'Index Gain: ' + numberFormat(p.value.absGain) + '\\n'\n * + 'Index Gain in Percentage: ' + numberFormat(p.value.percentageGain) + '%\\n'\n * + 'Fluctuation / Index Ratio: ' + numberFormat(p.value.fluctuationPercentage) + '%';\n * });\n * @param {Function} [titleFunction]\n * @return {Function}\n * @return {dc.baseMixin}\n */\n _chart.title = function (titleFunction) {\n if (!arguments.length) {\n return _title;\n }\n _title = titleFunction;\n return _chart;\n };\n\n /**\n * Turn on/off title rendering, or return the state of the render title flag if no arguments are\n * given.\n * @name renderTitle\n * @memberof dc.baseMixin\n * @instance\n * @param {Boolean} [renderTitle=true]\n * @return {Boolean}\n * @return {dc.baseMixin}\n */\n _chart.renderTitle = function (renderTitle) {\n if (!arguments.length) {\n return _renderTitle;\n }\n _renderTitle = renderTitle;\n return _chart;\n };\n\n /**\n * A renderlet is similar to an event listener on rendering event. Multiple renderlets can be added\n * to an individual chart. Each time a chart is rerendered or redrawn the renderlets are invoked\n * right after the chart finishes its transitions, giving you a way to modify the SVGElements.\n * Renderlet functions take the chart instance as the only input parameter and you can\n * use the dc API or use raw d3 to achieve pretty much any effect.\n *\n * Use {@link #dc.baseMixin+on on} with a 'renderlet' prefix.\n * Generates a random key for the renderlet, which makes it hard to remove.\n * @name renderlet\n * @memberof dc.baseMixin\n * @instance\n * @deprecated\n * @example\n * // do this instead of .renderlet(function(chart) { ... })\n * chart.on(\"renderlet\", function(chart){\n * // mix of dc API and d3 manipulation\n * chart.select('g.y').style('display', 'none');\n * // its a closure so you can also access other chart variable available in the closure scope\n * moveChart.filter(chart.filter());\n * });\n * @param {Function} renderletFunction\n * @return {dc.baseMixin}\n */\n _chart.renderlet = dc.logger.deprecate(function (renderletFunction) {\n _chart.on('renderlet.' + dc.utils.uniqueId(), renderletFunction);\n return _chart;\n }, 'chart.renderlet has been deprecated. Please use chart.on(\"renderlet.\", renderletFunction)');\n\n /**\n * Get or set the chart group to which this chart belongs. Chart groups are rendered or redrawn\n * together since it is expected they share the same underlying crossfilter data set.\n * @name chartGroup\n * @memberof dc.baseMixin\n * @instance\n * @param {String} [chartGroup]\n * @return {String}\n * @return {dc.baseMixin}\n */\n _chart.chartGroup = function (chartGroup) {\n if (!arguments.length) {\n return _chartGroup;\n }\n if (!_isChild) {\n dc.deregisterChart(_chart, _chartGroup);\n }\n _chartGroup = chartGroup;\n if (!_isChild) {\n dc.registerChart(_chart, _chartGroup);\n }\n return _chart;\n };\n\n /**\n * Expire the internal chart cache. dc charts cache some data internally on a per chart basis to\n * speed up rendering and avoid unnecessary calculation; however it might be useful to clear the\n * cache if you have changed state which will affect rendering. For example if you invoke the\n * `crossfilter.add` function or reset group or dimension after rendering it is a good idea to\n * clear the cache to make sure charts are rendered properly.\n * @name expireCache\n * @memberof dc.baseMixin\n * @instance\n * @return {dc.baseMixin}\n */\n _chart.expireCache = function () {\n // do nothing in base, should be overridden by sub-function\n return _chart;\n };\n\n /**\n * Attach a dc.legend widget to this chart. The legend widget will automatically draw legend labels\n * based on the color setting and names associated with each group.\n * @name legend\n * @memberof dc.baseMixin\n * @instance\n * @example\n * chart.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5))\n * @param {dc.legend} [legend]\n * @return {dc.legend}\n * @return {dc.baseMixin}\n */\n _chart.legend = function (legend) {\n if (!arguments.length) {\n return _legend;\n }\n _legend = legend;\n _legend.parent(_chart);\n return _chart;\n };\n\n /**\n * Returns the internal numeric ID of the chart.\n * @name chartID\n * @memberof dc.baseMixin\n * @instance\n * @return {String}\n */\n _chart.chartID = function () {\n return _chart.__dcFlag__;\n };\n\n /**\n * Set chart options using a configuration object. Each key in the object will cause the method of\n * the same name to be called with the value to set that attribute for the chart.\n * @name options\n * @memberof dc.baseMixin\n * @instance\n * @example\n * chart.options({dimension: myDimension, group: myGroup});\n * @param {{}} opts\n * @return {dc.baseMixin}\n */\n _chart.options = function (opts) {\n var applyOptions = [\n 'anchor',\n 'group',\n 'xAxisLabel',\n 'yAxisLabel',\n 'stack',\n 'title',\n 'point',\n 'getColor',\n 'overlayGeoJson'\n ];\n\n for (var o in opts) {\n if (typeof(_chart[o]) === 'function') {\n if (opts[o] instanceof Array && applyOptions.indexOf(o) !== -1) {\n _chart[o].apply(_chart, opts[o]);\n } else {\n _chart[o].call(_chart, opts[o]);\n }\n } else {\n dc.logger.debug('Not a valid option setter name: ' + o);\n }\n }\n return _chart;\n };\n\n /**\n * All dc chart instance supports the following listeners.\n * Supports the following events:\n * * `renderlet` - This listener function will be invoked after transitions after redraw and render. Replaces the\n * deprecated {@link #dc.baseMixin+renderlet renderlet} method.\n * * `pretransition` - Like `.on('renderlet', ...)` but the event is fired before transitions start.\n * * `preRender` - This listener function will be invoked before chart rendering.\n * * `postRender` - This listener function will be invoked after chart finish rendering including\n * all renderlets' logic.\n * * `preRedraw` - This listener function will be invoked before chart redrawing.\n * * `postRedraw` - This listener function will be invoked after chart finish redrawing\n * including all renderlets' logic.\n * * `filtered` - This listener function will be invoked after a filter is applied, added or removed.\n * * `zoomed` - This listener function will be invoked after a zoom is triggered.\n * @name on\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/mbostock/d3/wiki/Internals#dispatch_on d3.dispatch.on}\n * @example\n * .on('renderlet', function(chart, filter){...})\n * .on('pretransition', function(chart, filter){...})\n * .on('preRender', function(chart){...})\n * .on('postRender', function(chart){...})\n * .on('preRedraw', function(chart){...})\n * .on('postRedraw', function(chart){...})\n * .on('filtered', function(chart, filter){...})\n * .on('zoomed', function(chart, filter){...})\n * @param {String} event\n * @param {Function} listener\n * @return {dc.baseMixin}\n */\n _chart.on = function (event, listener) {\n _listeners.on(event, listener);\n return _chart;\n };\n\n return _chart;\n};\n\n/**\n * Margin is a mixin that provides margin utility functions for both the Row Chart and Coordinate Grid\n * Charts.\n * @name marginMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @return {dc.marginMixin}\n */\ndc.marginMixin = function (_chart) {\n var _margin = {top: 10, right: 50, bottom: 30, left: 30};\n\n /**\n * Get or set the margins for a particular coordinate grid chart instance. The margins is stored as\n * an associative Javascript array.\n * @name margins\n * @memberof dc.marginMixin\n * @instance\n * @example\n * var leftMargin = chart.margins().left; // 30 by default\n * chart.margins().left = 50;\n * leftMargin = chart.margins().left; // now 50\n * @param {{top: Number, right: Number, left: Number, bottom: Number}} [margins={top: 10, right: 50, bottom: 30, left: 30}]\n * @return {{top: Number, right: Number, left: Number, bottom: Number}}\n * @return {dc.marginMixin}\n */\n _chart.margins = function (margins) {\n if (!arguments.length) {\n return _margin;\n }\n _margin = margins;\n return _chart;\n };\n\n _chart.effectiveWidth = function () {\n return _chart.width() - _chart.margins().left - _chart.margins().right;\n };\n\n _chart.effectiveHeight = function () {\n return _chart.height() - _chart.margins().top - _chart.margins().bottom;\n };\n\n return _chart;\n};\n\n/**\n * The Color Mixin is an abstract chart functional class providing universal coloring support\n * as a mix-in for any concrete chart implementation.\n * @name colorMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @return {dc.colorMixin}\n */\ndc.colorMixin = function (_chart) {\n var _colors = d3.scale.category20c();\n var _defaultAccessor = true;\n\n var _colorAccessor = function (d) { return _chart.keyAccessor()(d); };\n\n /**\n * Retrieve current color scale or set a new color scale. This methods accepts any function that\n * operates like a d3 scale.\n * @name colors\n * @memberof dc.colorMixin\n * @instance\n * @see {@link http://github.com/mbostock/d3/wiki/Scales d3.scale}\n * @example\n * // alternate categorical scale\n * chart.colors(d3.scale.category20b());\n * // ordinal scale\n * chart.colors(d3.scale.ordinal().range(['red','green','blue']));\n * // convenience method, the same as above\n * chart.ordinalColors(['red','green','blue']);\n * // set a linear scale\n * chart.linearColors([\"#4575b4\", \"#ffffbf\", \"#a50026\"]);\n * @param {d3.scale} [colorScale=d3.scale.category20c()]\n * @return {d3.scale}\n * @return {dc.colorMixin}\n */\n _chart.colors = function (colorScale) {\n if (!arguments.length) {\n return _colors;\n }\n if (colorScale instanceof Array) {\n _colors = d3.scale.quantize().range(colorScale); // deprecated legacy support, note: this fails for ordinal domains\n } else {\n _colors = d3.functor(colorScale);\n }\n return _chart;\n };\n\n /**\n * Convenience method to set the color scale to d3.scale.ordinal with range `r`.\n * @name ordinalColors\n * @memberof dc.colorMixin\n * @instance\n * @param {Array} r\n * @return {dc.colorMixin}\n */\n _chart.ordinalColors = function (r) {\n return _chart.colors(d3.scale.ordinal().range(r));\n };\n\n /**\n * Convenience method to set the color scale to an Hcl interpolated linear scale with range `r`.\n * @name linearColors\n * @memberof dc.colorMixin\n * @instance\n * @param {Array} r\n * @return {dc.colorMixin}\n */\n _chart.linearColors = function (r) {\n return _chart.colors(d3.scale.linear()\n .range(r)\n .interpolate(d3.interpolateHcl));\n };\n\n /**\n * Set or the get color accessor function. This function will be used to map a data point in a\n * crossfilter group to a color value on the color scale. The default function uses the key\n * accessor.\n * @name colorAccessor\n * @memberof dc.colorMixin\n * @instance\n * @example\n * // default index based color accessor\n * .colorAccessor(function (d, i){return i;})\n * // color accessor for a multi-value crossfilter reduction\n * .colorAccessor(function (d){return d.value.absGain;})\n * @param {Function} [colorAccessor]\n * @return {Function}\n * @return {dc.colorMixin}\n */\n _chart.colorAccessor = function (colorAccessor) {\n if (!arguments.length) {\n return _colorAccessor;\n }\n _colorAccessor = colorAccessor;\n _defaultAccessor = false;\n return _chart;\n };\n\n // what is this?\n _chart.defaultColorAccessor = function () {\n return _defaultAccessor;\n };\n\n /**\n * Set or get the current domain for the color mapping function. The domain must be supplied as an\n * array.\n *\n * Note: previously this method accepted a callback function. Instead you may use a custom scale\n * set by `.colors`.\n * @name colorDomain\n * @memberof dc.colorMixin\n * @instance\n * @param {Array} [domain]\n * @return {Array}\n * @return {dc.colorMixin}\n */\n _chart.colorDomain = function (domain) {\n if (!arguments.length) {\n return _colors.domain();\n }\n _colors.domain(domain);\n return _chart;\n };\n\n /**\n * Set the domain by determining the min and max values as retrieved by `.colorAccessor` over the\n * chart's dataset.\n * @name calculateColorDomain\n * @memberof dc.colorMixin\n * @instance\n * @return {dc.colorMixin}\n */\n _chart.calculateColorDomain = function () {\n var newDomain = [d3.min(_chart.data(), _chart.colorAccessor()),\n d3.max(_chart.data(), _chart.colorAccessor())];\n _colors.domain(newDomain);\n return _chart;\n };\n\n /**\n * Get the color for the datum d and counter i. This is used internally by charts to retrieve a color.\n * @name getColor\n * @memberof dc.colorMixin\n * @instance\n * @param {*} d\n * @param {Number} [i]\n * @return {String}\n */\n _chart.getColor = function (d, i) {\n return _colors(_colorAccessor.call(this, d, i));\n };\n\n /**\n * Get the color for the datum d and counter i. This is used internally by charts to retrieve a color.\n * @name colorCalculator\n * @memberof dc.colorMixin\n * @instance\n * @param {*} [colorCalculator]\n * @return {*}\n */\n _chart.colorCalculator = function (colorCalculator) {\n if (!arguments.length) {\n return _chart.getColor;\n }\n _chart.getColor = colorCalculator;\n return _chart;\n };\n\n return _chart;\n};\n\n/**\n * Coordinate Grid is an abstract base chart designed to support a number of coordinate grid based\n * concrete chart types, e.g. bar chart, line chart, and bubble chart.\n * @name coordinateGridMixin\n * @memberof dc\n * @mixin\n * @mixes dc.colorMixin\n * @mixes dc.marginMixin\n * @mixes dc.baseMixin\n * @param {Object} _chart\n * @return {dc.coordinateGridMixin}\n */\ndc.coordinateGridMixin = function (_chart) {\n var GRID_LINE_CLASS = 'grid-line';\n var HORIZONTAL_CLASS = 'horizontal';\n var VERTICAL_CLASS = 'vertical';\n var Y_AXIS_LABEL_CLASS = 'y-axis-label';\n var X_AXIS_LABEL_CLASS = 'x-axis-label';\n var DEFAULT_AXIS_LABEL_PADDING = 12;\n\n _chart = dc.colorMixin(dc.marginMixin(dc.baseMixin(_chart)));\n\n _chart.colors(d3.scale.category10());\n _chart._mandatoryAttributes().push('x');\n\n function zoomHandler () {\n _refocused = true;\n if (_zoomOutRestrict) {\n _chart.x().domain(constrainRange(_chart.x().domain(), _xOriginalDomain));\n if (_rangeChart) {\n _chart.x().domain(constrainRange(_chart.x().domain(), _rangeChart.x().domain()));\n }\n }\n\n var domain = _chart.x().domain();\n var domFilter = dc.filters.RangedFilter(domain[0], domain[1]);\n\n _chart.replaceFilter(domFilter);\n _chart.rescale();\n _chart.redraw();\n\n if (_rangeChart && !rangesEqual(_chart.filter(), _rangeChart.filter())) {\n dc.events.trigger(function () {\n _rangeChart.replaceFilter(domFilter);\n _rangeChart.redraw();\n });\n }\n\n _chart._invokeZoomedListener();\n\n dc.events.trigger(function () {\n _chart.redrawGroup();\n }, dc.constants.EVENT_DELAY);\n\n _refocused = !rangesEqual(domain, _xOriginalDomain);\n }\n\n var _parent;\n var _g;\n var _chartBodyG;\n\n var _x;\n var _xOriginalDomain;\n var _xAxis = d3.svg.axis().orient('bottom');\n var _xUnits = dc.units.integers;\n var _xAxisPadding = 0;\n var _xElasticity = false;\n var _xAxisLabel;\n var _xAxisLabelPadding = 0;\n var _lastXDomain;\n\n var _y;\n var _yAxis = d3.svg.axis().orient('left');\n var _yAxisPadding = 0;\n var _yElasticity = false;\n var _yAxisLabel;\n var _yAxisLabelPadding = 0;\n\n var _brush = d3.svg.brush();\n var _brushOn = true;\n var _round;\n\n var _renderHorizontalGridLine = false;\n var _renderVerticalGridLine = false;\n\n var _refocused = false, _resizing = false;\n var _unitCount;\n\n var _zoomScale = [1, Infinity];\n var _zoomOutRestrict = true;\n\n var _zoom = d3.behavior.zoom().on('zoom', zoomHandler);\n var _nullZoom = d3.behavior.zoom().on('zoom', null);\n var _hasBeenMouseZoomable = false;\n\n var _rangeChart;\n var _focusChart;\n\n var _mouseZoomable = false;\n var _clipPadding = 0;\n\n var _outerRangeBandPadding = 0.5;\n var _rangeBandPadding = 0;\n\n var _useRightYAxis = false;\n\n /**\n * When changing the domain of the x or y scale, it is necessary to tell the chart to recalculate\n * and redraw the axes. (`.rescale()` is called automatically when the x or y scale is replaced\n * with `.x()` or `.y()`, and has no effect on elastic scales.)\n * @name rescale\n * @memberof dc.coordinateGridMixin\n * @instance\n * @return {dc.coordinateGridMixin}\n */\n _chart.rescale = function () {\n _unitCount = undefined;\n _resizing = true;\n return _chart;\n };\n\n /**\n * Get or set the range selection chart associated with this instance. Setting the range selection\n * chart using this function will automatically update its selection brush when the current chart\n * zooms in. In return the given range chart will also automatically attach this chart as its focus\n * chart hence zoom in when range brush updates. See the [Nasdaq 100\n * Index](http://dc-js.github.com/dc.js/) example for this effect in action.\n * @name rangeChart\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {dc.coordinateGridMixin} [rangeChart]\n * @return {dc.coordinateGridMixin}\n */\n _chart.rangeChart = function (rangeChart) {\n if (!arguments.length) {\n return _rangeChart;\n }\n _rangeChart = rangeChart;\n _rangeChart.focusChart(_chart);\n return _chart;\n };\n\n /**\n * Get or set the scale extent for mouse zooms.\n * @name zoomScale\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Array} [extent=[1, Infinity]]\n * @return {Array}\n * @return {dc.coordinateGridMixin}\n */\n _chart.zoomScale = function (extent) {\n if (!arguments.length) {\n return _zoomScale;\n }\n _zoomScale = extent;\n return _chart;\n };\n\n /**\n * Get or set the zoom restriction for the chart. If true limits the zoom to origional domain of the chart.\n * @name zoomOutRestrict\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [zoomOutRestrict=true]\n * @return {Boolean}\n * @return {dc.coordinateGridMixin}\n */\n _chart.zoomOutRestrict = function (zoomOutRestrict) {\n if (!arguments.length) {\n return _zoomOutRestrict;\n }\n _zoomScale[0] = zoomOutRestrict ? 1 : 0;\n _zoomOutRestrict = zoomOutRestrict;\n return _chart;\n };\n\n _chart._generateG = function (parent) {\n if (parent === undefined) {\n _parent = _chart.svg();\n } else {\n _parent = parent;\n }\n\n _g = _parent.append('g');\n\n _chartBodyG = _g.append('g').attr('class', 'chart-body')\n .attr('transform', 'translate(' + _chart.margins().left + ', ' + _chart.margins().top + ')')\n .attr('clip-path', 'url(#' + getClipPathId() + ')');\n\n return _g;\n };\n\n /**\n * Get or set the root g element. This method is usually used to retrieve the g element in order to\n * overlay custom svg drawing programatically. **Caution**: The root g element is usually generated\n * by dc.js internals, and resetting it might produce unpredictable result.\n * @name g\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {SVGElement} [gElement]\n * @return {SVGElement}\n * @return {dc.coordinateGridMixin}\n */\n _chart.g = function (gElement) {\n if (!arguments.length) {\n return _g;\n }\n _g = gElement;\n return _chart;\n };\n\n /**\n * Set or get mouse zoom capability flag (default: false). When turned on the chart will be\n * zoomable using the mouse wheel. If the range selector chart is attached zooming will also update\n * the range selection brush on the associated range selector chart.\n * @name mouseZoomable\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [mouseZoomable=false]\n * @return {Boolean}\n * @return {dc.coordinateGridMixin}\n */\n _chart.mouseZoomable = function (mouseZoomable) {\n if (!arguments.length) {\n return _mouseZoomable;\n }\n _mouseZoomable = mouseZoomable;\n return _chart;\n };\n\n /**\n * Retrieve the svg group for the chart body.\n * @name chartBodyG\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {SVGElement} [chartBodyG]\n * @return {SVGElement}\n */\n _chart.chartBodyG = function (chartBodyG) {\n if (!arguments.length) {\n return _chartBodyG;\n }\n _chartBodyG = chartBodyG;\n return _chart;\n };\n\n /**\n * **mandatory**\n *\n * Get or set the x scale. The x scale can be any d3\n * [quantitive scale](https://github.com/mbostock/d3/wiki/Quantitative-Scales) or\n * [ordinal scale](https://github.com/mbostock/d3/wiki/Ordinal-Scales).\n * @name x\n * @memberof dc.coordinateGridMixin\n * @instance\n * @see {@link http://github.com/mbostock/d3/wiki/Scales d3.scale}\n * @example\n * // set x to a linear scale\n * chart.x(d3.scale.linear().domain([-2500, 2500]))\n * // set x to a time scale to generate histogram\n * chart.x(d3.time.scale().domain([new Date(1985, 0, 1), new Date(2012, 11, 31)]))\n * @param {d3.scale} [xScale]\n * @return {d3.scale}\n * @return {dc.coordinateGridMixin}\n */\n _chart.x = function (xScale) {\n if (!arguments.length) {\n return _x;\n }\n _x = xScale;\n _xOriginalDomain = _x.domain();\n _chart.rescale();\n return _chart;\n };\n\n _chart.xOriginalDomain = function () {\n return _xOriginalDomain;\n };\n\n /**\n * Set or get the xUnits function. The coordinate grid chart uses the xUnits function to calculate\n * the number of data projections on x axis such as the number of bars for a bar chart or the\n * number of dots for a line chart. This function is expected to return a Javascript array of all\n * data points on x axis, or the number of points on the axis. [d3 time range functions\n * d3.time.days, d3.time.months, and\n * d3.time.years](https://github.com/mbostock/d3/wiki/Time-Intervals#aliases) are all valid xUnits\n * function. dc.js also provides a few units function, see the [Utilities](#utilities) section for\n * a list of built-in units functions. The default xUnits function is dc.units.integers.\n * @name xUnits\n * @memberof dc.coordinateGridMixin\n * @instance\n * @example\n * // set x units to count days\n * chart.xUnits(d3.time.days);\n * // set x units to count months\n * chart.xUnits(d3.time.months);\n *\n * // A custom xUnits function can be used as long as it follows the following interface:\n * // units in integer\n * function(start, end, xDomain) {\n * // simply calculates how many integers in the domain\n * return Math.abs(end - start);\n * };\n *\n * // fixed units\n * function(start, end, xDomain) {\n * // be aware using fixed units will disable the focus/zoom ability on the chart\n * return 1000;\n * @param {Function} [xUnits]\n * @return {Function}\n * @return {dc.coordinateGridMixin}\n */\n _chart.xUnits = function (xUnits) {\n if (!arguments.length) {\n return _xUnits;\n }\n _xUnits = xUnits;\n return _chart;\n };\n\n /**\n * Set or get the x axis used by a particular coordinate grid chart instance. This function is most\n * useful when x axis customization is required. The x axis in dc.js is an instance of a [d3\n * axis object](https://github.com/mbostock/d3/wiki/SVG-Axes#wiki-axis); therefore it supports any\n * valid d3 axis manipulation. **Caution**: The x axis is usually generated internally by dc;\n * resetting it may cause unexpected results.\n * @name xAxis\n * @memberof dc.coordinateGridMixin\n * @instance\n * @see {@link http://github.com/mbostock/d3/wiki/SVG-Axes d3.svg.axis}\n * @example\n * // customize x axis tick format\n * chart.xAxis().tickFormat(function(v) {return v + '%';});\n * // customize x axis tick values\n * chart.xAxis().tickValues([0, 100, 200, 300]);\n * @param {d3.svg.axis} [xAxis=d3.svg.axis().orient('bottom')]\n * @return {d3.svg.axis}\n * @return {dc.coordinateGridMixin}\n */\n _chart.xAxis = function (xAxis) {\n if (!arguments.length) {\n return _xAxis;\n }\n _xAxis = xAxis;\n return _chart;\n };\n\n /**\n * Turn on/off elastic x axis behavior. If x axis elasticity is turned on, then the grid chart will\n * attempt to recalculate the x axis range whenever a redraw event is triggered.\n * @name elasticX\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [elasticX=false]\n * @return {Boolean}\n * @return {dc.coordinateGridMixin}\n */\n _chart.elasticX = function (elasticX) {\n if (!arguments.length) {\n return _xElasticity;\n }\n _xElasticity = elasticX;\n return _chart;\n };\n\n /**\n * Set or get x axis padding for the elastic x axis. The padding will be added to both end of the x\n * axis if elasticX is turned on; otherwise it is ignored.\n *\n * padding can be an integer or percentage in string (e.g. '10%'). Padding can be applied to\n * number or date x axes. When padding a date axis, an integer represents number of days being padded\n * and a percentage string will be treated the same as an integer.\n * @name xAxisPadding\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Number|String} [padding=0]\n * @return {Number|String}\n * @return {dc.coordinateGridMixin}\n */\n _chart.xAxisPadding = function (padding) {\n if (!arguments.length) {\n return _xAxisPadding;\n }\n _xAxisPadding = padding;\n return _chart;\n };\n\n /**\n * Returns the number of units displayed on the x axis using the unit measure configured by\n * .xUnits.\n * @name xUnitCount\n * @memberof dc.coordinateGridMixin\n * @instance\n * @return {Number}\n */\n _chart.xUnitCount = function () {\n if (_unitCount === undefined) {\n var units = _chart.xUnits()(_chart.x().domain()[0], _chart.x().domain()[1], _chart.x().domain());\n\n if (units instanceof Array) {\n _unitCount = units.length;\n } else {\n _unitCount = units;\n }\n }\n\n return _unitCount;\n };\n\n /**\n * Gets or sets whether the chart should be drawn with a right axis instead of a left axis. When\n * used with a chart in a composite chart, allows both left and right Y axes to be shown on a\n * chart.\n * @name useRightYAxis\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [useRightYAxis=false]\n * @return {Boolean}\n * @return {dc.coordinateGridMixin}\n */\n _chart.useRightYAxis = function (useRightYAxis) {\n if (!arguments.length) {\n return _useRightYAxis;\n }\n _useRightYAxis = useRightYAxis;\n return _chart;\n };\n\n /**\n * Returns true if the chart is using ordinal xUnits ([dc.units.ordinal](#dcunitsordinal)), or false\n * otherwise. Most charts behave differently with ordinal data and use the result of this method to\n * trigger the appropriate logic.\n * @name isOrdinal\n * @memberof dc.coordinateGridMixin\n * @instance\n * @return {Boolean}\n */\n _chart.isOrdinal = function () {\n return _chart.xUnits() === dc.units.ordinal;\n };\n\n _chart._useOuterPadding = function () {\n return true;\n };\n\n _chart._ordinalXDomain = function () {\n var groups = _chart._computeOrderedGroups(_chart.data());\n return groups.map(_chart.keyAccessor());\n };\n\n function compareDomains (d1, d2) {\n return !d1 || !d2 || d1.length !== d2.length ||\n d1.some(function (elem, i) { return elem.toString() !== d2[i].toString(); });\n }\n\n function prepareXAxis (g, render) {\n if (!_chart.isOrdinal()) {\n if (_chart.elasticX()) {\n _x.domain([_chart.xAxisMin(), _chart.xAxisMax()]);\n }\n } else { // _chart.isOrdinal()\n if (_chart.elasticX() || _x.domain().length === 0) {\n _x.domain(_chart._ordinalXDomain());\n }\n }\n\n // has the domain changed?\n var xdom = _x.domain();\n if (render || compareDomains(_lastXDomain, xdom)) {\n _chart.rescale();\n }\n _lastXDomain = xdom;\n\n // please can't we always use rangeBands for bar charts?\n if (_chart.isOrdinal()) {\n _x.rangeBands([0, _chart.xAxisLength()], _rangeBandPadding,\n _chart._useOuterPadding() ? _outerRangeBandPadding : 0);\n } else {\n _x.range([0, _chart.xAxisLength()]);\n }\n\n _xAxis = _xAxis.scale(_chart.x());\n\n renderVerticalGridLines(g);\n }\n\n _chart.renderXAxis = function (g) {\n var axisXG = g.selectAll('g.x');\n\n if (axisXG.empty()) {\n axisXG = g.append('g')\n .attr('class', 'axis x')\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart._xAxisY() + ')');\n }\n\n var axisXLab = g.selectAll('text.' + X_AXIS_LABEL_CLASS);\n if (axisXLab.empty() && _chart.xAxisLabel()) {\n axisXLab = g.append('text')\n .attr('class', X_AXIS_LABEL_CLASS)\n .attr('transform', 'translate(' + (_chart.margins().left + _chart.xAxisLength() / 2) + ',' +\n (_chart.height() - _xAxisLabelPadding) + ')')\n .attr('text-anchor', 'middle');\n }\n if (_chart.xAxisLabel() && axisXLab.text() !== _chart.xAxisLabel()) {\n axisXLab.text(_chart.xAxisLabel());\n }\n\n dc.transition(axisXG, _chart.transitionDuration())\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart._xAxisY() + ')')\n .call(_xAxis);\n dc.transition(axisXLab, _chart.transitionDuration())\n .attr('transform', 'translate(' + (_chart.margins().left + _chart.xAxisLength() / 2) + ',' +\n (_chart.height() - _xAxisLabelPadding) + ')');\n };\n\n function renderVerticalGridLines (g) {\n var gridLineG = g.selectAll('g.' + VERTICAL_CLASS);\n\n if (_renderVerticalGridLine) {\n if (gridLineG.empty()) {\n gridLineG = g.insert('g', ':first-child')\n .attr('class', GRID_LINE_CLASS + ' ' + VERTICAL_CLASS)\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')');\n }\n\n var ticks = _xAxis.tickValues() ? _xAxis.tickValues() :\n (typeof _x.ticks === 'function' ? _x.ticks(_xAxis.ticks()[0]) : _x.domain());\n\n var lines = gridLineG.selectAll('line')\n .data(ticks);\n\n // enter\n var linesGEnter = lines.enter()\n .append('line')\n .attr('x1', function (d) {\n return _x(d);\n })\n .attr('y1', _chart._xAxisY() - _chart.margins().top)\n .attr('x2', function (d) {\n return _x(d);\n })\n .attr('y2', 0)\n .attr('opacity', 0);\n dc.transition(linesGEnter, _chart.transitionDuration())\n .attr('opacity', 1);\n\n // update\n dc.transition(lines, _chart.transitionDuration())\n .attr('x1', function (d) {\n return _x(d);\n })\n .attr('y1', _chart._xAxisY() - _chart.margins().top)\n .attr('x2', function (d) {\n return _x(d);\n })\n .attr('y2', 0);\n\n // exit\n lines.exit().remove();\n } else {\n gridLineG.selectAll('line').remove();\n }\n }\n\n _chart._xAxisY = function () {\n return (_chart.height() - _chart.margins().bottom);\n };\n\n _chart.xAxisLength = function () {\n return _chart.effectiveWidth();\n };\n\n /**\n * Set or get the x axis label. If setting the label, you may optionally include additional padding to\n * the margin to make room for the label. By default the padded is set to 12 to accomodate the text height.\n * @name xAxisLabel\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {String} [labelText]\n * @param {Number} [padding=12]\n * @return {String}\n */\n _chart.xAxisLabel = function (labelText, padding) {\n if (!arguments.length) {\n return _xAxisLabel;\n }\n _xAxisLabel = labelText;\n _chart.margins().bottom -= _xAxisLabelPadding;\n _xAxisLabelPadding = (padding === undefined) ? DEFAULT_AXIS_LABEL_PADDING : padding;\n _chart.margins().bottom += _xAxisLabelPadding;\n return _chart;\n };\n\n _chart._prepareYAxis = function (g) {\n if (_y === undefined || _chart.elasticY()) {\n if (_y === undefined) {\n _y = d3.scale.linear();\n }\n var min = _chart.yAxisMin() || 0,\n max = _chart.yAxisMax() || 0;\n _y.domain([min, max]).rangeRound([_chart.yAxisHeight(), 0]);\n }\n\n _y.range([_chart.yAxisHeight(), 0]);\n _yAxis = _yAxis.scale(_y);\n\n if (_useRightYAxis) {\n _yAxis.orient('right');\n }\n\n _chart._renderHorizontalGridLinesForAxis(g, _y, _yAxis);\n };\n\n _chart.renderYAxisLabel = function (axisClass, text, rotation, labelXPosition) {\n labelXPosition = labelXPosition || _yAxisLabelPadding;\n\n var axisYLab = _chart.g().selectAll('text.' + Y_AXIS_LABEL_CLASS + '.' + axisClass + '-label');\n var labelYPosition = (_chart.margins().top + _chart.yAxisHeight() / 2);\n if (axisYLab.empty() && text) {\n axisYLab = _chart.g().append('text')\n .attr('transform', 'translate(' + labelXPosition + ',' + labelYPosition + '),rotate(' + rotation + ')')\n .attr('class', Y_AXIS_LABEL_CLASS + ' ' + axisClass + '-label')\n .attr('text-anchor', 'middle')\n .text(text);\n }\n if (text && axisYLab.text() !== text) {\n axisYLab.text(text);\n }\n dc.transition(axisYLab, _chart.transitionDuration())\n .attr('transform', 'translate(' + labelXPosition + ',' + labelYPosition + '),rotate(' + rotation + ')');\n };\n\n _chart.renderYAxisAt = function (axisClass, axis, position) {\n var axisYG = _chart.g().selectAll('g.' + axisClass);\n if (axisYG.empty()) {\n axisYG = _chart.g().append('g')\n .attr('class', 'axis ' + axisClass)\n .attr('transform', 'translate(' + position + ',' + _chart.margins().top + ')');\n }\n\n dc.transition(axisYG, _chart.transitionDuration())\n .attr('transform', 'translate(' + position + ',' + _chart.margins().top + ')')\n .call(axis);\n };\n\n _chart.renderYAxis = function () {\n var axisPosition = _useRightYAxis ? (_chart.width() - _chart.margins().right) : _chart._yAxisX();\n _chart.renderYAxisAt('y', _yAxis, axisPosition);\n var labelPosition = _useRightYAxis ? (_chart.width() - _yAxisLabelPadding) : _yAxisLabelPadding;\n var rotation = _useRightYAxis ? 90 : -90;\n _chart.renderYAxisLabel('y', _chart.yAxisLabel(), rotation, labelPosition);\n };\n\n _chart._renderHorizontalGridLinesForAxis = function (g, scale, axis) {\n var gridLineG = g.selectAll('g.' + HORIZONTAL_CLASS);\n\n if (_renderHorizontalGridLine) {\n var ticks = axis.tickValues() ? axis.tickValues() : scale.ticks(axis.ticks()[0]);\n\n if (gridLineG.empty()) {\n gridLineG = g.insert('g', ':first-child')\n .attr('class', GRID_LINE_CLASS + ' ' + HORIZONTAL_CLASS)\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')');\n }\n\n var lines = gridLineG.selectAll('line')\n .data(ticks);\n\n // enter\n var linesGEnter = lines.enter()\n .append('line')\n .attr('x1', 1)\n .attr('y1', function (d) {\n return scale(d);\n })\n .attr('x2', _chart.xAxisLength())\n .attr('y2', function (d) {\n return scale(d);\n })\n .attr('opacity', 0);\n dc.transition(linesGEnter, _chart.transitionDuration())\n .attr('opacity', 1);\n\n // update\n dc.transition(lines, _chart.transitionDuration())\n .attr('x1', 1)\n .attr('y1', function (d) {\n return scale(d);\n })\n .attr('x2', _chart.xAxisLength())\n .attr('y2', function (d) {\n return scale(d);\n });\n\n // exit\n lines.exit().remove();\n } else {\n gridLineG.selectAll('line').remove();\n }\n };\n\n _chart._yAxisX = function () {\n return _chart.useRightYAxis() ? _chart.width() - _chart.margins().right : _chart.margins().left;\n };\n\n /**\n * Set or get the y axis label. If setting the label, you may optionally include additional padding\n * to the margin to make room for the label. By default the padded is set to 12 to accomodate the\n * text height.\n * @name yAxisLabel\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {String} [labelText]\n * @param {Number} [padding=12]\n * @return {String}\n * @return {dc.coordinateGridMixin}\n */\n _chart.yAxisLabel = function (labelText, padding) {\n if (!arguments.length) {\n return _yAxisLabel;\n }\n _yAxisLabel = labelText;\n _chart.margins().left -= _yAxisLabelPadding;\n _yAxisLabelPadding = (padding === undefined) ? DEFAULT_AXIS_LABEL_PADDING : padding;\n _chart.margins().left += _yAxisLabelPadding;\n return _chart;\n };\n\n /**\n * Get or set the y scale. The y scale is typically automatically determined by the chart implementation.\n * @name y\n * @memberof dc.coordinateGridMixin\n * @instance\n * @see {@link http://github.com/mbostock/d3/wiki/Scales d3.scale}\n * @param {d3.scale} [yScale]\n * @return {d3.scale}\n * @return {dc.coordinateGridMixin}\n */\n _chart.y = function (yScale) {\n if (!arguments.length) {\n return _y;\n }\n _y = yScale;\n _chart.rescale();\n return _chart;\n };\n\n /**\n * Set or get the y axis used by the coordinate grid chart instance. This function is most useful\n * when y axis customization is required. The y axis in dc.js is simply an instance of a [d3 axis\n * object](https://github.com/mbostock/d3/wiki/SVG-Axes#wiki-_axis); therefore it supports any\n * valid d3 axis manipulation. **Caution**: The y axis is usually generated internally by dc;\n * resetting it may cause unexpected results.\n * @name yAxis\n * @memberof dc.coordinateGridMixin\n * @instance\n * @see {@link http://github.com/mbostock/d3/wiki/SVG-Axes d3.svg.axis}\n * @example\n * // customize y axis tick format\n * chart.yAxis().tickFormat(function(v) {return v + '%';});\n * // customize y axis tick values\n * chart.yAxis().tickValues([0, 100, 200, 300]);\n * @param {d3.svg.axis} [yAxis=d3.svg.axis().orient('left')]\n * @return {d3.svg.axis}\n * @return {dc.coordinateGridMixin}\n */\n _chart.yAxis = function (yAxis) {\n if (!arguments.length) {\n return _yAxis;\n }\n _yAxis = yAxis;\n return _chart;\n };\n\n /**\n * Turn on/off elastic y axis behavior. If y axis elasticity is turned on, then the grid chart will\n * attempt to recalculate the y axis range whenever a redraw event is triggered.\n * @name elasticY\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [elasticY=false]\n * @return {Boolean}\n * @return {dc.coordinateGridMixin}\n */\n _chart.elasticY = function (elasticY) {\n if (!arguments.length) {\n return _yElasticity;\n }\n _yElasticity = elasticY;\n return _chart;\n };\n\n /**\n * Turn on/off horizontal grid lines.\n * @name renderHorizontalGridLines\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [renderHorizontalGridLines=false]\n * @return {Boolean}\n * @return {dc.coordinateGridMixin}\n */\n _chart.renderHorizontalGridLines = function (renderHorizontalGridLines) {\n if (!arguments.length) {\n return _renderHorizontalGridLine;\n }\n _renderHorizontalGridLine = renderHorizontalGridLines;\n return _chart;\n };\n\n /**\n * Turn on/off vertical grid lines.\n * @name renderVerticalGridLines\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [renderVerticalGridLines=false]\n * @return {Boolean}\n * @return {dc.coordinateGridMixin}\n */\n _chart.renderVerticalGridLines = function (renderVerticalGridLines) {\n if (!arguments.length) {\n return _renderVerticalGridLine;\n }\n _renderVerticalGridLine = renderVerticalGridLines;\n return _chart;\n };\n\n /**\n * Calculates the minimum x value to display in the chart. Includes xAxisPadding if set.\n * @name xAxisMin\n * @memberof dc.coordinateGridMixin\n * @instance\n * @return {*}\n */\n _chart.xAxisMin = function () {\n var min = d3.min(_chart.data(), function (e) {\n return _chart.keyAccessor()(e);\n });\n return dc.utils.subtract(min, _xAxisPadding);\n };\n\n /**\n * Calculates the maximum x value to display in the chart. Includes xAxisPadding if set.\n * @name xAxisMax\n * @memberof dc.coordinateGridMixin\n * @instance\n * @return {*}\n */\n _chart.xAxisMax = function () {\n var max = d3.max(_chart.data(), function (e) {\n return _chart.keyAccessor()(e);\n });\n return dc.utils.add(max, _xAxisPadding);\n };\n\n /**\n * Calculates the minimum y value to display in the chart. Includes yAxisPadding if set.\n * @name yAxisMin\n * @memberof dc.coordinateGridMixin\n * @instance\n * @return {*}\n */\n _chart.yAxisMin = function () {\n var min = d3.min(_chart.data(), function (e) {\n return _chart.valueAccessor()(e);\n });\n return dc.utils.subtract(min, _yAxisPadding);\n };\n\n /**\n * Calculates the maximum y value to display in the chart. Includes yAxisPadding if set.\n * @name yAxisMax\n * @memberof dc.coordinateGridMixin\n * @instance\n * @return {*}\n */\n _chart.yAxisMax = function () {\n var max = d3.max(_chart.data(), function (e) {\n return _chart.valueAccessor()(e);\n });\n return dc.utils.add(max, _yAxisPadding);\n };\n\n /**\n * Set or get y axis padding for the elastic y axis. The padding will be added to the top of the y\n * axis if elasticY is turned on; otherwise it is ignored.\n *\n * padding can be an integer or percentage in string (e.g. '10%'). Padding can be applied to\n * number or date axes. When padding a date axis, an integer represents number of days being padded\n * and a percentage string will be treated the same as an integer.\n * @name yAxisPadding\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Number|String} [padding=0]\n * @return {Number}\n * @return {dc.coordinateGridMixin}\n */\n _chart.yAxisPadding = function (padding) {\n if (!arguments.length) {\n return _yAxisPadding;\n }\n _yAxisPadding = padding;\n return _chart;\n };\n\n _chart.yAxisHeight = function () {\n return _chart.effectiveHeight();\n };\n\n /**\n * Set or get the rounding function used to quantize the selection when brushing is enabled.\n * @name round\n * @memberof dc.coordinateGridMixin\n * @instance\n * @example\n * // set x unit round to by month, this will make sure range selection brush will\n * // select whole months\n * chart.round(d3.time.month.round);\n * @param {Function} [round]\n * @return {Function}\n * @return {dc.coordinateGridMixin}\n */\n _chart.round = function (round) {\n if (!arguments.length) {\n return _round;\n }\n _round = round;\n return _chart;\n };\n\n _chart._rangeBandPadding = function (_) {\n if (!arguments.length) {\n return _rangeBandPadding;\n }\n _rangeBandPadding = _;\n return _chart;\n };\n\n _chart._outerRangeBandPadding = function (_) {\n if (!arguments.length) {\n return _outerRangeBandPadding;\n }\n _outerRangeBandPadding = _;\n return _chart;\n };\n\n dc.override(_chart, 'filter', function (_) {\n if (!arguments.length) {\n return _chart._filter();\n }\n\n _chart._filter(_);\n\n if (_) {\n _chart.brush().extent(_);\n } else {\n _chart.brush().clear();\n }\n\n return _chart;\n });\n\n _chart.brush = function (_) {\n if (!arguments.length) {\n return _brush;\n }\n _brush = _;\n return _chart;\n };\n\n function brushHeight () {\n return _chart._xAxisY() - _chart.margins().top;\n }\n\n _chart.renderBrush = function (g) {\n if (_brushOn) {\n _brush.on('brush', _chart._brushing);\n _brush.on('brushstart', _chart._disableMouseZoom);\n _brush.on('brushend', configureMouseZoom);\n\n var gBrush = g.append('g')\n .attr('class', 'brush')\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')')\n .call(_brush.x(_chart.x()));\n _chart.setBrushY(gBrush, false);\n _chart.setHandlePaths(gBrush);\n\n if (_chart.hasFilter()) {\n _chart.redrawBrush(g, false);\n }\n }\n };\n\n _chart.setHandlePaths = function (gBrush) {\n gBrush.selectAll('.resize').append('path').attr('d', _chart.resizeHandlePath);\n };\n\n _chart.setBrushY = function (gBrush) {\n gBrush.selectAll('.brush rect')\n .attr('height', brushHeight());\n gBrush.selectAll('.resize path')\n .attr('d', _chart.resizeHandlePath);\n };\n\n _chart.extendBrush = function () {\n var extent = _brush.extent();\n if (_chart.round()) {\n extent[0] = extent.map(_chart.round())[0];\n extent[1] = extent.map(_chart.round())[1];\n\n _g.select('.brush')\n .call(_brush.extent(extent));\n }\n return extent;\n };\n\n _chart.brushIsEmpty = function (extent) {\n return _brush.empty() || !extent || extent[1] <= extent[0];\n };\n\n _chart._brushing = function () {\n var extent = _chart.extendBrush();\n\n _chart.redrawBrush(_g, false);\n\n if (_chart.brushIsEmpty(extent)) {\n dc.events.trigger(function () {\n _chart.filter(null);\n _chart.redrawGroup();\n }, dc.constants.EVENT_DELAY);\n } else {\n var rangedFilter = dc.filters.RangedFilter(extent[0], extent[1]);\n\n dc.events.trigger(function () {\n _chart.replaceFilter(rangedFilter);\n _chart.redrawGroup();\n }, dc.constants.EVENT_DELAY);\n }\n };\n\n _chart.redrawBrush = function (g, doTransition) {\n if (_brushOn) {\n if (_chart.filter() && _chart.brush().empty()) {\n _chart.brush().extent(_chart.filter());\n }\n\n var gBrush = dc.optionalTransition(doTransition, _chart.transitionDuration())(g.select('g.brush'));\n _chart.setBrushY(gBrush);\n gBrush.call(_chart.brush()\n .x(_chart.x())\n .extent(_chart.brush().extent()));\n }\n\n _chart.fadeDeselectedArea();\n };\n\n _chart.fadeDeselectedArea = function () {\n // do nothing, sub-chart should override this function\n };\n\n // borrowed from Crossfilter example\n _chart.resizeHandlePath = function (d) {\n var e = +(d === 'e'), x = e ? 1 : -1, y = brushHeight() / 3;\n return 'M' + (0.5 * x) + ',' + y +\n 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6) +\n 'V' + (2 * y - 6) +\n 'A6,6 0 0 ' + e + ' ' + (0.5 * x) + ',' + (2 * y) +\n 'Z' +\n 'M' + (2.5 * x) + ',' + (y + 8) +\n 'V' + (2 * y - 8) +\n 'M' + (4.5 * x) + ',' + (y + 8) +\n 'V' + (2 * y - 8);\n };\n\n function getClipPathId () {\n return _chart.anchorName().replace(/[ .#=\\[\\]]/g, '-') + '-clip';\n }\n\n /**\n * Get or set the padding in pixels for the clip path. Once set padding will be applied evenly to\n * the top, left, right, and bottom when the clip path is generated. If set to zero, the clip area\n * will be exactly the chart body area minus the margins.\n * @name clipPadding\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Number} [padding=5]\n * @return {Number}\n * @return {dc.coordinateGridMixin}\n */\n _chart.clipPadding = function (padding) {\n if (!arguments.length) {\n return _clipPadding;\n }\n _clipPadding = padding;\n return _chart;\n };\n\n function generateClipPath () {\n var defs = dc.utils.appendOrSelect(_parent, 'defs');\n // cannot select elements; bug in WebKit, must select by id\n // https://groups.google.com/forum/#!topic/d3-js/6EpAzQ2gU9I\n var id = getClipPathId();\n var chartBodyClip = dc.utils.appendOrSelect(defs, '#' + id, 'clipPath').attr('id', id);\n\n var padding = _clipPadding * 2;\n\n dc.utils.appendOrSelect(chartBodyClip, 'rect')\n .attr('width', _chart.xAxisLength() + padding)\n .attr('height', _chart.yAxisHeight() + padding)\n .attr('transform', 'translate(-' + _clipPadding + ', -' + _clipPadding + ')');\n }\n\n _chart._preprocessData = function () {};\n\n _chart._doRender = function () {\n _chart.resetSvg();\n\n _chart._preprocessData();\n\n _chart._generateG();\n generateClipPath();\n\n drawChart(true);\n\n configureMouseZoom();\n\n return _chart;\n };\n\n _chart._doRedraw = function () {\n _chart._preprocessData();\n\n drawChart(false);\n generateClipPath();\n\n return _chart;\n };\n\n function drawChart (render) {\n if (_chart.isOrdinal()) {\n _brushOn = false;\n }\n\n prepareXAxis(_chart.g(), render);\n _chart._prepareYAxis(_chart.g());\n\n _chart.plotData();\n\n if (_chart.elasticX() || _resizing || render) {\n _chart.renderXAxis(_chart.g());\n }\n\n if (_chart.elasticY() || _resizing || render) {\n _chart.renderYAxis(_chart.g());\n }\n\n if (render) {\n _chart.renderBrush(_chart.g(), false);\n } else {\n _chart.redrawBrush(_chart.g(), _resizing);\n }\n _chart.fadeDeselectedArea();\n _resizing = false;\n }\n\n function configureMouseZoom () {\n if (_mouseZoomable) {\n _chart._enableMouseZoom();\n } else if (_hasBeenMouseZoomable) {\n _chart._disableMouseZoom();\n }\n }\n\n _chart._enableMouseZoom = function () {\n _hasBeenMouseZoomable = true;\n _zoom.x(_chart.x())\n .scaleExtent(_zoomScale)\n .size([_chart.width(), _chart.height()])\n .duration(_chart.transitionDuration());\n _chart.root().call(_zoom);\n };\n\n _chart._disableMouseZoom = function () {\n _chart.root().call(_nullZoom);\n };\n\n function constrainRange (range, constraint) {\n var constrainedRange = [];\n constrainedRange[0] = d3.max([range[0], constraint[0]]);\n constrainedRange[1] = d3.min([range[1], constraint[1]]);\n return constrainedRange;\n }\n\n /**\n * Zoom this chart to focus on the given range. The given range should be an array containing only\n * 2 elements (`[start, end]`) defining a range in the x domain. If the range is not given or set\n * to null, then the zoom will be reset. _For focus to work elasticX has to be turned off;\n * otherwise focus will be ignored.\n * @name focus\n * @memberof dc.coordinateGridMixin\n * @instance\n * @example\n * chart.on('renderlet', function(chart) {\n * // smooth the rendering through event throttling\n * dc.events.trigger(function(){\n * // focus some other chart to the range selected by user on this chart\n * someOtherChart.focus(chart.filter());\n * });\n * })\n * @param {Array} [range]\n */\n _chart.focus = function (range) {\n if (hasRangeSelected(range)) {\n _chart.x().domain(range);\n } else {\n _chart.x().domain(_xOriginalDomain);\n }\n\n _zoom.x(_chart.x());\n zoomHandler();\n };\n\n _chart.refocused = function () {\n return _refocused;\n };\n\n _chart.focusChart = function (c) {\n if (!arguments.length) {\n return _focusChart;\n }\n _focusChart = c;\n _chart.on('filtered', function (chart) {\n if (!chart.filter()) {\n dc.events.trigger(function () {\n _focusChart.x().domain(_focusChart.xOriginalDomain());\n });\n } else if (!rangesEqual(chart.filter(), _focusChart.filter())) {\n dc.events.trigger(function () {\n _focusChart.focus(chart.filter());\n });\n }\n });\n return _chart;\n };\n\n function rangesEqual (range1, range2) {\n if (!range1 && !range2) {\n return true;\n } else if (!range1 || !range2) {\n return false;\n } else if (range1.length === 0 && range2.length === 0) {\n return true;\n } else if (range1[0].valueOf() === range2[0].valueOf() &&\n range1[1].valueOf() === range2[1].valueOf()) {\n return true;\n }\n return false;\n }\n\n /**\n * Turn on/off the brush-based range filter. When brushing is on then user can drag the mouse\n * across a chart with a quantitative scale to perform range filtering based on the extent of the\n * brush, or click on the bars of an ordinal bar chart or slices of a pie chart to filter and\n * un-filter them. However turning on the brush filter will disable other interactive elements on\n * the chart such as highlighting, tool tips, and reference lines. Zooming will still be possible\n * if enabled, but only via scrolling (panning will be disabled.)\n * @name brushOn\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [brushOn=true]\n * @return {Boolean}\n * @return {dc.coordinateGridMixin}\n */\n _chart.brushOn = function (brushOn) {\n if (!arguments.length) {\n return _brushOn;\n }\n _brushOn = brushOn;\n return _chart;\n };\n\n function hasRangeSelected (range) {\n return range instanceof Array && range.length > 1;\n }\n\n return _chart;\n};\n\n/**\n * Stack Mixin is an mixin that provides cross-chart support of stackability using d3.layout.stack.\n * @name stackMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @return {dc.stackMixin}\n */\ndc.stackMixin = function (_chart) {\n\n function prepareValues (layer, layerIdx) {\n var valAccessor = layer.accessor || _chart.valueAccessor();\n layer.name = String(layer.name || layerIdx);\n layer.values = layer.group.all().map(function (d, i) {\n return {\n x: _chart.keyAccessor()(d, i),\n y: layer.hidden ? null : valAccessor(d, i),\n data: d,\n layer: layer.name,\n hidden: layer.hidden\n };\n });\n\n layer.values = layer.values.filter(domainFilter());\n return layer.values;\n }\n\n var _stackLayout = d3.layout.stack()\n .values(prepareValues);\n\n var _stack = [];\n var _titles = {};\n\n var _hidableStacks = false;\n\n function domainFilter () {\n if (!_chart.x()) {\n return d3.functor(true);\n }\n var xDomain = _chart.x().domain();\n if (_chart.isOrdinal()) {\n // TODO #416\n //var domainSet = d3.set(xDomain);\n return function () {\n return true; //domainSet.has(p.x);\n };\n }\n if (_chart.elasticX()) {\n return function () { return true; };\n }\n return function (p) {\n //return true;\n return p.x >= xDomain[0] && p.x <= xDomain[xDomain.length - 1];\n };\n }\n\n /**\n * Stack a new crossfilter group onto this chart with an optional custom value accessor. All stacks\n * in the same chart will share the same key accessor and therefore the same set of keys.\n *\n * For example, in a stacked bar chart, the bars of each stack will be positioned using the same set\n * of keys on the x axis, while stacked vertically. If name is specified then it will be used to\n * generate the legend label.\n * @name stack\n * @memberof dc.stackMixin\n * @instance\n * @see {@link https://github.com/square/crossfilter/wiki/API-Reference#group-map-reduce crossfilter.group}\n * @example\n * // stack group using default accessor\n * chart.stack(valueSumGroup)\n * // stack group using custom accessor\n * .stack(avgByDayGroup, function(d){return d.value.avgByDay;});\n * @param {crossfilter.group} group\n * @param {String} [name]\n * @param {Function} [accessor]\n * @return {Array<{group: crossfilter.group, name: String, accessor: Function}>}\n * @return {dc.stackMixin}\n */\n _chart.stack = function (group, name, accessor) {\n if (!arguments.length) {\n return _stack;\n }\n\n if (arguments.length <= 2) {\n accessor = name;\n }\n\n var layer = {group: group};\n if (typeof name === 'string') {\n layer.name = name;\n }\n if (typeof accessor === 'function') {\n layer.accessor = accessor;\n }\n _stack.push(layer);\n\n return _chart;\n };\n\n dc.override(_chart, 'group', function (g, n, f) {\n if (!arguments.length) {\n return _chart._group();\n }\n _stack = [];\n _titles = {};\n _chart.stack(g, n);\n if (f) {\n _chart.valueAccessor(f);\n }\n return _chart._group(g, n);\n });\n\n /**\n * Allow named stacks to be hidden or shown by clicking on legend items.\n * This does not affect the behavior of hideStack or showStack.\n * @name hidableStacks\n * @memberof dc.stackMixin\n * @instance\n * @param {Boolean} [hidableStacks=false]\n * @return {Boolean}\n * @return {dc.stackMixin}\n */\n _chart.hidableStacks = function (hidableStacks) {\n if (!arguments.length) {\n return _hidableStacks;\n }\n _hidableStacks = hidableStacks;\n return _chart;\n };\n\n function findLayerByName (n) {\n var i = _stack.map(dc.pluck('name')).indexOf(n);\n return _stack[i];\n }\n\n /**\n * Hide all stacks on the chart with the given name.\n * The chart must be re-rendered for this change to appear.\n * @name hideStack\n * @memberof dc.stackMixin\n * @instance\n * @param {String} stackName\n * @return {dc.stackMixin}\n */\n _chart.hideStack = function (stackName) {\n var layer = findLayerByName(stackName);\n if (layer) {\n layer.hidden = true;\n }\n return _chart;\n };\n\n /**\n * Show all stacks on the chart with the given name.\n * The chart must be re-rendered for this change to appear.\n * @name showStack\n * @memberof dc.stackMixin\n * @instance\n * @param {String} stackName\n * @return {dc.stackMixin}\n */\n _chart.showStack = function (stackName) {\n var layer = findLayerByName(stackName);\n if (layer) {\n layer.hidden = false;\n }\n return _chart;\n };\n\n _chart.getValueAccessorByIndex = function (index) {\n return _stack[index].accessor || _chart.valueAccessor();\n };\n\n _chart.yAxisMin = function () {\n var min = d3.min(flattenStack(), function (p) {\n return (p.y + p.y0 < p.y0) ? (p.y + p.y0) : p.y0;\n });\n\n return dc.utils.subtract(min, _chart.yAxisPadding());\n\n };\n\n _chart.yAxisMax = function () {\n var max = d3.max(flattenStack(), function (p) {\n return p.y + p.y0;\n });\n\n return dc.utils.add(max, _chart.yAxisPadding());\n };\n\n function flattenStack () {\n var valueses = _chart.data().map(function (layer) { return layer.values; });\n return Array.prototype.concat.apply([], valueses);\n }\n\n _chart.xAxisMin = function () {\n var min = d3.min(flattenStack(), dc.pluck('x'));\n return dc.utils.subtract(min, _chart.xAxisPadding());\n };\n\n _chart.xAxisMax = function () {\n var max = d3.max(flattenStack(), dc.pluck('x'));\n return dc.utils.add(max, _chart.xAxisPadding());\n };\n\n /**\n * Set or get the title function. Chart class will use this function to render svg title (usually interpreted by\n * browser as tooltips) for each child element in the chart, i.e. a slice in a pie chart or a bubble in a bubble chart.\n * Almost every chart supports title function however in grid coordinate chart you need to turn off brush in order to\n * use title otherwise the brush layer will block tooltip trigger.\n *\n * If the first argument is a stack name, the title function will get or set the title for that stack. If stackName\n * is not provided, the first stack is implied.\n * @name title\n * @memberof dc.stackMixin\n * @instance\n * @example\n * // set a title function on 'first stack'\n * chart.title('first stack', function(d) { return d.key + ': ' + d.value; });\n * // get a title function from 'second stack'\n * var secondTitleFunction = chart.title('second stack');\n * @param {String} [stackName]\n * @param {Function} [titleAccessor]\n * @return {String}\n * @return {dc.stackMixin}\n */\n dc.override(_chart, 'title', function (stackName, titleAccessor) {\n if (!stackName) {\n return _chart._title();\n }\n\n if (typeof stackName === 'function') {\n return _chart._title(stackName);\n }\n if (stackName === _chart._groupName && typeof titleAccessor === 'function') {\n return _chart._title(titleAccessor);\n }\n\n if (typeof titleAccessor !== 'function') {\n return _titles[stackName] || _chart._title();\n }\n\n _titles[stackName] = titleAccessor;\n\n return _chart;\n });\n\n /**\n * Gets or sets the stack layout algorithm, which computes a baseline for each stack and\n * propagates it to the next\n * @name stackLayout\n * @memberof dc.stackMixin\n * @instance\n * @see {@link http://github.com/mbostock/d3/wiki/Stack-Layout d3.layout.stack}\n * @param {Function} [stack=d3.layout.stack]\n * @return {Function}\n * @return {dc.stackMixin}\n */\n _chart.stackLayout = function (stack) {\n if (!arguments.length) {\n return _stackLayout;\n }\n _stackLayout = stack;\n return _chart;\n };\n\n function visability (l) {\n return !l.hidden;\n }\n\n _chart.data(function () {\n var layers = _stack.filter(visability);\n return layers.length ? _chart.stackLayout()(layers) : [];\n });\n\n _chart._ordinalXDomain = function () {\n var flat = flattenStack().map(dc.pluck('data'));\n var ordered = _chart._computeOrderedGroups(flat);\n return ordered.map(_chart.keyAccessor());\n };\n\n _chart.colorAccessor(function (d) {\n var layer = this.layer || this.name || d.name || d.layer;\n return layer;\n });\n\n _chart.legendables = function () {\n return _stack.map(function (layer, i) {\n return {\n chart: _chart,\n name: layer.name,\n hidden: layer.hidden || false,\n color: _chart.getColor.call(layer, layer.values, i)\n };\n });\n };\n\n _chart.isLegendableHidden = function (d) {\n var layer = findLayerByName(d.name);\n return layer ? layer.hidden : false;\n };\n\n _chart.legendToggle = function (d) {\n if (_hidableStacks) {\n if (_chart.isLegendableHidden(d)) {\n _chart.showStack(d.name);\n } else {\n _chart.hideStack(d.name);\n }\n //_chart.redraw();\n _chart.renderGroup();\n }\n };\n\n return _chart;\n};\n\n/**\n * Cap is a mixin that groups small data elements below a _cap_ into an *others* grouping for both the\n * Row and Pie Charts.\n *\n * The top ordered elements in the group up to the cap amount will be kept in the chart, and the rest\n * will be replaced with an *others* element, with value equal to the sum of the replaced values. The\n * keys of the elements below the cap limit are recorded in order to filter by those keys when the\n * others* element is clicked.\n * @name capMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @return {dc.capMixin}\n */\ndc.capMixin = function (_chart) {\n\n var _cap = Infinity;\n\n var _othersLabel = 'Others';\n\n var _othersGrouper = function (topRows) {\n var topRowsSum = d3.sum(topRows, _chart.valueAccessor()),\n allRows = _chart.group().all(),\n allRowsSum = d3.sum(allRows, _chart.valueAccessor()),\n topKeys = topRows.map(_chart.keyAccessor()),\n allKeys = allRows.map(_chart.keyAccessor()),\n topSet = d3.set(topKeys),\n others = allKeys.filter(function (d) {return !topSet.has(d);});\n if (allRowsSum > topRowsSum) {\n return topRows.concat([{'others': others, 'key': _othersLabel, 'value': allRowsSum - topRowsSum}]);\n }\n return topRows;\n };\n\n _chart.cappedKeyAccessor = function (d, i) {\n if (d.others) {\n return d.key;\n }\n return _chart.keyAccessor()(d, i);\n };\n\n _chart.cappedValueAccessor = function (d, i) {\n if (d.others) {\n return d.value;\n }\n return _chart.valueAccessor()(d, i);\n };\n\n _chart.data(function (group) {\n if (_cap === Infinity) {\n return _chart._computeOrderedGroups(group.all());\n } else {\n var topRows = group.top(_cap); // ordered by crossfilter group order (default value)\n topRows = _chart._computeOrderedGroups(topRows); // re-order using ordering (default key)\n if (_othersGrouper) {\n return _othersGrouper(topRows);\n }\n return topRows;\n }\n });\n\n /**\n * Get or set the count of elements to that will be included in the cap.\n * @name cap\n * @memberof dc.capMixin\n * @instance\n * @param {Number} [count=Infinity]\n * @return {Number}\n * @return {dc.capMixin}\n */\n _chart.cap = function (count) {\n if (!arguments.length) {\n return _cap;\n }\n _cap = count;\n return _chart;\n };\n\n /**\n * Get or set the label for *Others* slice when slices cap is specified\n * @name othersLabel\n * @memberof dc.capMixin\n * @instance\n * @param {String} [label=\"Others\"]\n * @return {String}\n * @return {dc.capMixin}\n */\n _chart.othersLabel = function (label) {\n if (!arguments.length) {\n return _othersLabel;\n }\n _othersLabel = label;\n return _chart;\n };\n\n /**\n * Get or set the grouper function that will perform the insertion of data for the *Others* slice\n * if the slices cap is specified. If set to a falsy value, no others will be added. By default the\n * grouper function computes the sum of all values below the cap.\n * @name othersGrouper\n * @memberof dc.capMixin\n * @instance\n * @example\n * // Default others grouper\n * chart.othersGrouper(function (topRows) {\n * var topRowsSum = d3.sum(topRows, _chart.valueAccessor()),\n * allRows = _chart.group().all(),\n * allRowsSum = d3.sum(allRows, _chart.valueAccessor()),\n * topKeys = topRows.map(_chart.keyAccessor()),\n * allKeys = allRows.map(_chart.keyAccessor()),\n * topSet = d3.set(topKeys),\n * others = allKeys.filter(function (d) {return !topSet.has(d);});\n * if (allRowsSum > topRowsSum) {\n * return topRows.concat([{'others': others, 'key': _othersLabel, 'value': allRowsSum - topRowsSum}]);\n * }\n * return topRows;\n * });\n * // Custom others grouper\n * chart.othersGrouper(function (data) {\n * // compute the value for others, presumably the sum of all values below the cap\n * var othersSum = yourComputeOthersValueLogic(data)\n *\n * // the keys are needed to properly filter when the others element is clicked\n * var othersKeys = yourComputeOthersKeysArrayLogic(data);\n *\n * // add the others row to the dataset\n * data.push({'key': 'Others', 'value': othersSum, 'others': othersKeys });\n *\n * return data;\n * });\n * @param {Function} [grouperFunction]\n * @return {Function}\n * @return {dc.capMixin}\n */\n _chart.othersGrouper = function (grouperFunction) {\n if (!arguments.length) {\n return _othersGrouper;\n }\n _othersGrouper = grouperFunction;\n return _chart;\n };\n\n dc.override(_chart, 'onClick', function (d) {\n if (d.others) {\n _chart.filter([d.others]);\n }\n _chart._onClick(d);\n });\n\n return _chart;\n};\n\n/**\n * This Mixin provides reusable functionalities for any chart that needs to visualize data using bubbles.\n * @name bubbleMixin\n * @memberof dc\n * @mixin\n * @mixes dc.colorMixin\n * @param {Object} _chart\n * @return {dc.bubbleMixin}\n */\ndc.bubbleMixin = function (_chart) {\n var _maxBubbleRelativeSize = 0.3;\n var _minRadiusWithLabel = 10;\n\n _chart.BUBBLE_NODE_CLASS = 'node';\n _chart.BUBBLE_CLASS = 'bubble';\n _chart.MIN_RADIUS = 10;\n\n _chart = dc.colorMixin(_chart);\n\n _chart.renderLabel(true);\n\n _chart.data(function (group) {\n return group.top(Infinity);\n });\n\n var _r = d3.scale.linear().domain([0, 100]);\n\n var _rValueAccessor = function (d) {\n return d.r;\n };\n\n /**\n * Get or set the bubble radius scale. By default the bubble chart uses\n * `d3.scale.linear().domain([0, 100])` as its radius scale.\n * @name r\n * @memberof dc.bubbleMixin\n * @instance\n * @see {@link http://github.com/mbostock/d3/wiki/Scales d3.scale}\n * @param {d3.scale} [bubbleRadiusScale=d3.scale.linear().domain([0, 100])]\n * @return {d3.scale}\n * @return {dc.bubbleMixin}\n */\n _chart.r = function (bubbleRadiusScale) {\n if (!arguments.length) {\n return _r;\n }\n _r = bubbleRadiusScale;\n return _chart;\n };\n\n /**\n * Get or set the radius value accessor function. If set, the radius value accessor function will\n * be used to retrieve a data value for each bubble. The data retrieved then will be mapped using\n * the r scale to the actual bubble radius. This allows you to encode a data dimension using bubble\n * size.\n * @name radiusValueAccessor\n * @memberof dc.bubbleMixin\n * @instance\n * @param {Function} [radiusValueAccessor]\n * @return {Function}\n * @return {dc.bubbleMixin}\n */\n _chart.radiusValueAccessor = function (radiusValueAccessor) {\n if (!arguments.length) {\n return _rValueAccessor;\n }\n _rValueAccessor = radiusValueAccessor;\n return _chart;\n };\n\n _chart.rMin = function () {\n var min = d3.min(_chart.data(), function (e) {\n return _chart.radiusValueAccessor()(e);\n });\n return min;\n };\n\n _chart.rMax = function () {\n var max = d3.max(_chart.data(), function (e) {\n return _chart.radiusValueAccessor()(e);\n });\n return max;\n };\n\n _chart.bubbleR = function (d) {\n var value = _chart.radiusValueAccessor()(d);\n var r = _chart.r()(value);\n if (isNaN(r) || value <= 0) {\n r = 0;\n }\n return r;\n };\n\n var labelFunction = function (d) {\n return _chart.label()(d);\n };\n\n var labelOpacity = function (d) {\n return (_chart.bubbleR(d) > _minRadiusWithLabel) ? 1 : 0;\n };\n\n _chart._doRenderLabel = function (bubbleGEnter) {\n if (_chart.renderLabel()) {\n var label = bubbleGEnter.select('text');\n\n if (label.empty()) {\n label = bubbleGEnter.append('text')\n .attr('text-anchor', 'middle')\n .attr('dy', '.3em')\n .on('click', _chart.onClick);\n }\n\n label\n .attr('opacity', 0)\n .text(labelFunction);\n dc.transition(label, _chart.transitionDuration())\n .attr('opacity', labelOpacity);\n }\n };\n\n _chart.doUpdateLabels = function (bubbleGEnter) {\n if (_chart.renderLabel()) {\n var labels = bubbleGEnter.selectAll('text')\n .text(labelFunction);\n dc.transition(labels, _chart.transitionDuration())\n .attr('opacity', labelOpacity);\n }\n };\n\n var titleFunction = function (d) {\n return _chart.title()(d);\n };\n\n _chart._doRenderTitles = function (g) {\n if (_chart.renderTitle()) {\n var title = g.select('title');\n\n if (title.empty()) {\n g.append('title').text(titleFunction);\n }\n }\n };\n\n _chart.doUpdateTitles = function (g) {\n if (_chart.renderTitle()) {\n g.selectAll('title').text(titleFunction);\n }\n };\n\n /**\n * Get or set the minimum radius. This will be used to initialize the radius scale's range.\n * @name minRadius\n * @memberof dc.bubbleMixin\n * @instance\n * @param {Number} [radius=10]\n * @return {Number}\n * @return {dc.bubbleMixin}\n */\n _chart.minRadius = function (radius) {\n if (!arguments.length) {\n return _chart.MIN_RADIUS;\n }\n _chart.MIN_RADIUS = radius;\n return _chart;\n };\n\n /**\n * Get or set the minimum radius for label rendering. If a bubble's radius is less than this value\n * then no label will be rendered.\n * @name minRadiusWithLabel\n * @memberof dc.bubbleMixin\n * @instance\n * @param {Number} [radius=10]\n * @return {Number}\n * @return {dc.bubbleMixin}\n */\n\n _chart.minRadiusWithLabel = function (radius) {\n if (!arguments.length) {\n return _minRadiusWithLabel;\n }\n _minRadiusWithLabel = radius;\n return _chart;\n };\n\n /**\n * Get or set the maximum relative size of a bubble to the length of x axis. This value is useful\n * when the difference in radius between bubbles is too great.\n * @name maxBubbleRelativeSize\n * @memberof dc.bubbleMixin\n * @instance\n * @param {Number} [relativeSize=0.3]\n * @return {Number}\n * @return {dc.bubbleMixin}\n */\n _chart.maxBubbleRelativeSize = function (relativeSize) {\n if (!arguments.length) {\n return _maxBubbleRelativeSize;\n }\n _maxBubbleRelativeSize = relativeSize;\n return _chart;\n };\n\n _chart.fadeDeselectedArea = function () {\n if (_chart.hasFilter()) {\n _chart.selectAll('g.' + _chart.BUBBLE_NODE_CLASS).each(function (d) {\n if (_chart.isSelectedNode(d)) {\n _chart.highlightSelected(this);\n } else {\n _chart.fadeDeselected(this);\n }\n });\n } else {\n _chart.selectAll('g.' + _chart.BUBBLE_NODE_CLASS).each(function () {\n _chart.resetHighlight(this);\n });\n }\n };\n\n _chart.isSelectedNode = function (d) {\n return _chart.hasFilter(d.key);\n };\n\n _chart.onClick = function (d) {\n var filter = d.key;\n dc.events.trigger(function () {\n _chart.filter(filter);\n _chart.redrawGroup();\n });\n };\n\n return _chart;\n};\n\n/**\n * The pie chart implementation is usually used to visualize a small categorical distribution. The pie\n * chart uses keyAccessor to determine the slices, and valueAccessor to calculate the size of each\n * slice relative to the sum of all values. Slices are ordered by `.ordering` which defaults to sorting\n * by key.\n * @name pieChart\n * @memberof dc\n * @mixes dc.capMixin\n * @mixes dc.colorMixin\n * @mixes dc.baseMixin\n * @example\n * // create a pie chart under #chart-container1 element using the default global chart group\n * var chart1 = dc.pieChart('#chart-container1');\n * // create a pie chart under #chart-container2 element using chart group A\n * var chart2 = dc.pieChart('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {PieChart}\n */\ndc.pieChart = function (parent, chartGroup) {\n var DEFAULT_MIN_ANGLE_FOR_LABEL = 0.5;\n\n var _sliceCssClass = 'pie-slice';\n var _emptyCssClass = 'empty-chart';\n var _emptyTitle = 'empty';\n\n var _radius,\n _givenRadius, // specified radius, if any\n _innerRadius = 0,\n _externalRadiusPadding = 0;\n\n var _g;\n var _cx;\n var _cy;\n var _minAngleForLabel = DEFAULT_MIN_ANGLE_FOR_LABEL;\n var _externalLabelRadius;\n var _chart = dc.capMixin(dc.colorMixin(dc.baseMixin({})));\n\n _chart.colorAccessor(_chart.cappedKeyAccessor);\n\n _chart.title(function (d) {\n return _chart.cappedKeyAccessor(d) + ': ' + _chart.cappedValueAccessor(d);\n });\n\n /**\n * Get or set the maximum number of slices the pie chart will generate. The top slices are determined by\n * value from high to low. Other slices exeeding the cap will be rolled up into one single *Others* slice.\n * @name slicesCap\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [cap]\n * @returns {Chart}\n */\n _chart.slicesCap = _chart.cap;\n\n _chart.label(_chart.cappedKeyAccessor);\n _chart.renderLabel(true);\n\n _chart.transitionDuration(350);\n\n _chart._doRender = function () {\n _chart.resetSvg();\n\n _g = _chart.svg()\n .append('g')\n .attr('transform', 'translate(' + _chart.cx() + ',' + _chart.cy() + ')');\n\n drawChart();\n\n return _chart;\n };\n\n function drawChart () {\n // set radius on basis of chart dimension if missing\n _radius = _givenRadius ? _givenRadius : d3.min([_chart.width(), _chart.height()]) / 2;\n\n var arc = buildArcs();\n\n var pie = pieLayout();\n var pieData;\n // if we have data...\n if (d3.sum(_chart.data(), _chart.valueAccessor())) {\n pieData = pie(_chart.data());\n _g.classed(_emptyCssClass, false);\n } else {\n // otherwise we'd be getting NaNs, so override\n // note: abuse others for its ignoring the value accessor\n pieData = pie([{key: _emptyTitle, value: 1, others: [_emptyTitle]}]);\n _g.classed(_emptyCssClass, true);\n }\n\n if (_g) {\n var slices = _g.selectAll('g.' + _sliceCssClass)\n .data(pieData);\n\n createElements(slices, arc, pieData);\n\n updateElements(pieData, arc);\n\n removeElements(slices);\n\n highlightFilter();\n\n dc.transition(_g, _chart.transitionDuration())\n .attr('transform', 'translate(' + _chart.cx() + ',' + _chart.cy() + ')');\n }\n }\n\n function createElements (slices, arc, pieData) {\n var slicesEnter = createSliceNodes(slices);\n\n createSlicePath(slicesEnter, arc);\n\n createTitles(slicesEnter);\n\n createLabels(pieData, arc);\n }\n\n function createSliceNodes (slices) {\n var slicesEnter = slices\n .enter()\n .append('g')\n .attr('class', function (d, i) {\n return _sliceCssClass + ' _' + i;\n });\n return slicesEnter;\n }\n\n function createSlicePath (slicesEnter, arc) {\n var slicePath = slicesEnter.append('path')\n .attr('fill', fill)\n .on('click', onClick)\n .attr('d', function (d, i) {\n return safeArc(d, i, arc);\n });\n\n dc.transition(slicePath, _chart.transitionDuration(), function (s) {\n s.attrTween('d', tweenPie);\n });\n }\n\n function createTitles (slicesEnter) {\n if (_chart.renderTitle()) {\n slicesEnter.append('title').text(function (d) {\n return _chart.title()(d.data);\n });\n }\n }\n\n function positionLabels (labelsEnter, arc) {\n dc.transition(labelsEnter, _chart.transitionDuration())\n .attr('transform', function (d) {\n return labelPosition(d, arc);\n })\n .attr('text-anchor', 'middle')\n .text(function (d) {\n var data = d.data;\n if ((sliceHasNoData(data) || sliceTooSmall(d)) && !isSelectedSlice(d)) {\n return '';\n }\n return _chart.label()(d.data);\n });\n }\n\n function createLabels (pieData, arc) {\n if (_chart.renderLabel()) {\n var labels = _g.selectAll('text.' + _sliceCssClass)\n .data(pieData);\n\n labels.exit().remove();\n\n var labelsEnter = labels\n .enter()\n .append('text')\n .attr('class', function (d, i) {\n var classes = _sliceCssClass + ' _' + i;\n if (_externalLabelRadius) {\n classes += ' external';\n }\n return classes;\n })\n .on('click', onClick);\n positionLabels(labelsEnter, arc);\n }\n }\n\n function updateElements (pieData, arc) {\n updateSlicePaths(pieData, arc);\n updateLabels(pieData, arc);\n updateTitles(pieData);\n }\n\n function updateSlicePaths (pieData, arc) {\n var slicePaths = _g.selectAll('g.' + _sliceCssClass)\n .data(pieData)\n .select('path')\n .attr('d', function (d, i) {\n return safeArc(d, i, arc);\n });\n dc.transition(slicePaths, _chart.transitionDuration(),\n function (s) {\n s.attrTween('d', tweenPie);\n }).attr('fill', fill);\n }\n\n function updateLabels (pieData, arc) {\n if (_chart.renderLabel()) {\n var labels = _g.selectAll('text.' + _sliceCssClass)\n .data(pieData);\n positionLabels(labels, arc);\n }\n }\n\n function updateTitles (pieData) {\n if (_chart.renderTitle()) {\n _g.selectAll('g.' + _sliceCssClass)\n .data(pieData)\n .select('title')\n .text(function (d) {\n return _chart.title()(d.data);\n });\n }\n }\n\n function removeElements (slices) {\n slices.exit().remove();\n }\n\n function highlightFilter () {\n if (_chart.hasFilter()) {\n _chart.selectAll('g.' + _sliceCssClass).each(function (d) {\n if (isSelectedSlice(d)) {\n _chart.highlightSelected(this);\n } else {\n _chart.fadeDeselected(this);\n }\n });\n } else {\n _chart.selectAll('g.' + _sliceCssClass).each(function () {\n _chart.resetHighlight(this);\n });\n }\n }\n\n /**\n * Get or set the external radius padding of the pie chart. This will force the radius of the\n * pie chart to become smaller or larger depending on the value.\n * @name externalRadiusPadding\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [externalRadiusPadding=0]\n * @returns {Chart}\n */\n _chart.externalRadiusPadding = function (externalRadiusPadding) {\n if (!arguments.length) {\n return _externalRadiusPadding;\n }\n _externalRadiusPadding = externalRadiusPadding;\n return _chart;\n };\n\n /**\n * Get or set the inner radius of the pie chart. If the inner radius is greater than 0px then the\n * pie chart will be rendered as a doughnut chart.\n * @name innerRadius\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [innerRadius=0]\n * @returns {Chart}\n */\n _chart.innerRadius = function (innerRadius) {\n if (!arguments.length) {\n return _innerRadius;\n }\n _innerRadius = innerRadius;\n return _chart;\n };\n\n /**\n * Get or set the outer radius. If the radius is not set, it will be half of the minimum of the\n * chart width and height.\n * @name radius\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [radius]\n * @returns {Chart}\n */\n _chart.radius = function (radius) {\n if (!arguments.length) {\n return _givenRadius;\n }\n _givenRadius = radius;\n return _chart;\n };\n\n /**\n * Get or set center x coordinate position. Default is center of svg.\n * @name cx\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [cx]\n * @returns {Chart}\n */\n _chart.cx = function (cx) {\n if (!arguments.length) {\n return (_cx || _chart.width() / 2);\n }\n _cx = cx;\n return _chart;\n };\n\n /**\n * Get or set center y coordinate position. Default is center of svg.\n * @name cy\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [cy]\n * @returns {Chart}\n */\n _chart.cy = function (cy) {\n if (!arguments.length) {\n return (_cy || _chart.height() / 2);\n }\n _cy = cy;\n return _chart;\n };\n\n function buildArcs () {\n return d3.svg.arc().outerRadius(_radius - _externalRadiusPadding).innerRadius(_innerRadius);\n }\n\n function isSelectedSlice (d) {\n return _chart.hasFilter(_chart.cappedKeyAccessor(d.data));\n }\n\n _chart._doRedraw = function () {\n drawChart();\n return _chart;\n };\n\n /**\n * Get or set the minimal slice angle for label rendering. Any slice with a smaller angle will not\n * display a slice label.\n * @name minAngleForLabel\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [minAngleForLabel=0.5]\n * @returns {Chart}\n */\n _chart.minAngleForLabel = function (minAngleForLabel) {\n if (!arguments.length) {\n return _minAngleForLabel;\n }\n _minAngleForLabel = minAngleForLabel;\n return _chart;\n };\n\n function pieLayout () {\n return d3.layout.pie().sort(null).value(_chart.cappedValueAccessor);\n }\n\n function sliceTooSmall (d) {\n var angle = (d.endAngle - d.startAngle);\n return isNaN(angle) || angle < _minAngleForLabel;\n }\n\n function sliceHasNoData (d) {\n return _chart.cappedValueAccessor(d) === 0;\n }\n\n function tweenPie (b) {\n b.innerRadius = _innerRadius;\n var current = this._current;\n if (isOffCanvas(current)) {\n current = {startAngle: 0, endAngle: 0};\n }\n var i = d3.interpolate(current, b);\n this._current = i(0);\n return function (t) {\n return safeArc(i(t), 0, buildArcs());\n };\n }\n\n function isOffCanvas (current) {\n return !current || isNaN(current.startAngle) || isNaN(current.endAngle);\n }\n\n function fill (d, i) {\n return _chart.getColor(d.data, i);\n }\n\n function onClick (d, i) {\n if (_g.attr('class') !== _emptyCssClass) {\n _chart.onClick(d.data, i);\n }\n }\n\n function safeArc (d, i, arc) {\n var path = arc(d, i);\n if (path.indexOf('NaN') >= 0) {\n path = 'M0,0';\n }\n return path;\n }\n\n /**\n * Title to use for the only slice when there is no data.\n * @name emptyTitle\n * @memberof dc.pieChart\n * @instance\n * @param {String} [title]\n * @returns {Chart}\n */\n _chart.emptyTitle = function (title) {\n if (arguments.length === 0) {\n return _emptyTitle;\n }\n _emptyTitle = title;\n return _chart;\n };\n\n /**\n * Position slice labels offset from the outer edge of the chart\n *\n * The given argument sets the radial offset.\n * @name externalLabels\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [radius]\n * @returns {Chart}\n */\n _chart.externalLabels = function (radius) {\n if (arguments.length === 0) {\n return _externalLabelRadius;\n } else if (radius) {\n _externalLabelRadius = radius;\n } else {\n _externalLabelRadius = undefined;\n }\n\n return _chart;\n };\n\n function labelPosition (d, arc) {\n var centroid;\n if (_externalLabelRadius) {\n centroid = d3.svg.arc()\n .outerRadius(_radius - _externalRadiusPadding + _externalLabelRadius)\n .innerRadius(_radius - _externalRadiusPadding + _externalLabelRadius)\n .centroid(d);\n } else {\n centroid = arc.centroid(d);\n }\n if (isNaN(centroid[0]) || isNaN(centroid[1])) {\n return 'translate(0,0)';\n } else {\n return 'translate(' + centroid + ')';\n }\n }\n\n _chart.legendables = function () {\n return _chart.data().map(function (d, i) {\n var legendable = {name: d.key, data: d.value, others: d.others, chart: _chart};\n legendable.color = _chart.getColor(d, i);\n return legendable;\n });\n };\n\n _chart.legendHighlight = function (d) {\n highlightSliceFromLegendable(d, true);\n };\n\n _chart.legendReset = function (d) {\n highlightSliceFromLegendable(d, false);\n };\n\n _chart.legendToggle = function (d) {\n _chart.onClick({key: d.name, others: d.others});\n };\n\n function highlightSliceFromLegendable (legendable, highlighted) {\n _chart.selectAll('g.pie-slice').each(function (d) {\n if (legendable.name === d.data.key) {\n d3.select(this).classed('highlight', highlighted);\n }\n });\n }\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * Concrete bar chart/histogram implementation.\n *\n * Examples:\n * - [Nasdaq 100 Index](http://dc-js.github.com/dc.js/)\n * - [Canadian City Crime Stats](http://dc-js.github.com/dc.js/crime/index.html)\n * @name barChart\n * @memberof dc\n * @mixes dc.stackMixin\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a bar chart under #chart-container1 element using the default global chart group\n * var chart1 = dc.barChart('#chart-container1');\n * // create a bar chart under #chart-container2 element using chart group A\n * var chart2 = dc.barChart('#chart-container2', 'chartGroupA');\n * // create a sub-chart under a composite parent chart\n * var chart3 = dc.barChart(compositeChart);\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @return {dc.barChart}\n */\ndc.barChart = function (parent, chartGroup) {\n var MIN_BAR_WIDTH = 1;\n var DEFAULT_GAP_BETWEEN_BARS = 2;\n\n var _chart = dc.stackMixin(dc.coordinateGridMixin({}));\n\n var _gap = DEFAULT_GAP_BETWEEN_BARS;\n var _centerBar = false;\n var _alwaysUseRounding = false;\n\n var _barWidth;\n\n dc.override(_chart, 'rescale', function () {\n _chart._rescale();\n _barWidth = undefined;\n return _chart;\n });\n\n dc.override(_chart, 'render', function () {\n if (_chart.round() && _centerBar && !_alwaysUseRounding) {\n dc.logger.warn('By default, brush rounding is disabled if bars are centered. ' +\n 'See dc.js bar chart API documentation for details.');\n }\n\n return _chart._render();\n });\n\n _chart.plotData = function () {\n var layers = _chart.chartBodyG().selectAll('g.stack')\n .data(_chart.data());\n\n calculateBarWidth();\n\n layers\n .enter()\n .append('g')\n .attr('class', function (d, i) {\n return 'stack ' + '_' + i;\n });\n\n layers.each(function (d, i) {\n var layer = d3.select(this);\n\n renderBars(layer, i, d);\n });\n };\n\n function barHeight (d) {\n return dc.utils.safeNumber(Math.abs(_chart.y()(d.y + d.y0) - _chart.y()(d.y0)));\n }\n\n function renderBars (layer, layerIndex, d) {\n var bars = layer.selectAll('rect.bar')\n .data(d.values, dc.pluck('x'));\n\n var enter = bars.enter()\n .append('rect')\n .attr('class', 'bar')\n .attr('fill', dc.pluck('data', _chart.getColor))\n .attr('y', _chart.yAxisHeight())\n .attr('height', 0);\n\n if (_chart.renderTitle()) {\n enter.append('title').text(dc.pluck('data', _chart.title(d.name)));\n }\n\n if (_chart.isOrdinal()) {\n bars.on('click', _chart.onClick);\n }\n\n dc.transition(bars, _chart.transitionDuration())\n .attr('x', function (d) {\n var x = _chart.x()(d.x);\n if (_centerBar) {\n x -= _barWidth / 2;\n }\n if (_chart.isOrdinal() && _gap !== undefined) {\n x += _gap / 2;\n }\n return dc.utils.safeNumber(x);\n })\n .attr('y', function (d) {\n var y = _chart.y()(d.y + d.y0);\n\n if (d.y < 0) {\n y -= barHeight(d);\n }\n\n return dc.utils.safeNumber(y);\n })\n .attr('width', _barWidth)\n .attr('height', function (d) {\n return barHeight(d);\n })\n .attr('fill', dc.pluck('data', _chart.getColor))\n .select('title').text(dc.pluck('data', _chart.title(d.name)));\n\n dc.transition(bars.exit(), _chart.transitionDuration())\n .attr('height', 0)\n .remove();\n }\n\n function calculateBarWidth () {\n if (_barWidth === undefined) {\n var numberOfBars = _chart.xUnitCount();\n\n // please can't we always use rangeBands for bar charts?\n if (_chart.isOrdinal() && _gap === undefined) {\n _barWidth = Math.floor(_chart.x().rangeBand());\n } else if (_gap) {\n _barWidth = Math.floor((_chart.xAxisLength() - (numberOfBars - 1) * _gap) / numberOfBars);\n } else {\n _barWidth = Math.floor(_chart.xAxisLength() / (1 + _chart.barPadding()) / numberOfBars);\n }\n\n if (_barWidth === Infinity || isNaN(_barWidth) || _barWidth < MIN_BAR_WIDTH) {\n _barWidth = MIN_BAR_WIDTH;\n }\n }\n }\n\n _chart.fadeDeselectedArea = function () {\n var bars = _chart.chartBodyG().selectAll('rect.bar');\n var extent = _chart.brush().extent();\n\n if (_chart.isOrdinal()) {\n if (_chart.hasFilter()) {\n bars.classed(dc.constants.SELECTED_CLASS, function (d) {\n return _chart.hasFilter(d.x);\n });\n bars.classed(dc.constants.DESELECTED_CLASS, function (d) {\n return !_chart.hasFilter(d.x);\n });\n } else {\n bars.classed(dc.constants.SELECTED_CLASS, false);\n bars.classed(dc.constants.DESELECTED_CLASS, false);\n }\n } else {\n if (!_chart.brushIsEmpty(extent)) {\n var start = extent[0];\n var end = extent[1];\n\n bars.classed(dc.constants.DESELECTED_CLASS, function (d) {\n return d.x < start || d.x >= end;\n });\n } else {\n bars.classed(dc.constants.DESELECTED_CLASS, false);\n }\n }\n };\n\n /**\n * Whether the bar chart will render each bar centered around the data position on the x-axis.\n * @name centerBar\n * @memberof dc.barChart\n * @instance\n * @param {Boolean} [centerBar=false]\n * @return {Boolean}\n * @return {dc.barChart}\n */\n _chart.centerBar = function (centerBar) {\n if (!arguments.length) {\n return _centerBar;\n }\n _centerBar = centerBar;\n return _chart;\n };\n\n dc.override(_chart, 'onClick', function (d) {\n _chart._onClick(d.data);\n });\n\n /**\n * Get or set the spacing between bars as a fraction of bar size. Valid values are between 0-1.\n * Setting this value will also remove any previously set `gap`. See the\n * [d3 docs](https://github.com/mbostock/d3/wiki/Ordinal-Scales#wiki-ordinal_rangeBands)\n * for a visual description of how the padding is applied.\n * @name barPadding\n * @memberof dc.barChart\n * @instance\n * @param {Number} [barPadding=0]\n * @return {Number}\n * @return {dc.barChart}\n */\n _chart.barPadding = function (barPadding) {\n if (!arguments.length) {\n return _chart._rangeBandPadding();\n }\n _chart._rangeBandPadding(barPadding);\n _gap = undefined;\n return _chart;\n };\n\n _chart._useOuterPadding = function () {\n return _gap === undefined;\n };\n\n /**\n * Get or set the outer padding on an ordinal bar chart. This setting has no effect on non-ordinal charts.\n * Will pad the width by `padding * barWidth` on each side of the chart.\n * @name outerPadding\n * @memberof dc.barChart\n * @instance\n * @param {Number} [padding=0.5]\n * @return {Number}\n * @return {dc.barChart}\n */\n _chart.outerPadding = _chart._outerRangeBandPadding;\n\n /**\n * Manually set fixed gap (in px) between bars instead of relying on the default auto-generated\n * gap. By default the bar chart implementation will calculate and set the gap automatically\n * based on the number of data points and the length of the x axis.\n * @name gap\n * @memberof dc.barChart\n * @instance\n * @param {Number} [gap=2]\n * @return {Number}\n * @return {dc.barChart}\n */\n _chart.gap = function (gap) {\n if (!arguments.length) {\n return _gap;\n }\n _gap = gap;\n return _chart;\n };\n\n _chart.extendBrush = function () {\n var extent = _chart.brush().extent();\n if (_chart.round() && (!_centerBar || _alwaysUseRounding)) {\n extent[0] = extent.map(_chart.round())[0];\n extent[1] = extent.map(_chart.round())[1];\n\n _chart.chartBodyG().select('.brush')\n .call(_chart.brush().extent(extent));\n }\n\n return extent;\n };\n\n /**\n * Set or get whether rounding is enabled when bars are centered. If false, using\n * rounding with centered bars will result in a warning and rounding will be ignored. This flag\n * has no effect if bars are not {@link #dc.barChart+centerBar centered}.\n * When using standard d3.js rounding methods, the brush often doesn't align correctly with\n * centered bars since the bars are offset. The rounding function must add an offset to\n * compensate, such as in the following example.\n * @name alwaysUseRounding\n * @memberof dc.barChart\n * @instance\n * @example\n * chart.round(function(n) { return Math.floor(n) + 0.5; });\n * @param {Boolean} [alwaysUseRounding=false]\n * @return {Boolean}\n * @return {dc.barChart}\n */\n _chart.alwaysUseRounding = function (alwaysUseRounding) {\n if (!arguments.length) {\n return _alwaysUseRounding;\n }\n _alwaysUseRounding = alwaysUseRounding;\n return _chart;\n };\n\n function colorFilter (color, inv) {\n return function () {\n var item = d3.select(this);\n var match = item.attr('fill') === color;\n return inv ? !match : match;\n };\n }\n\n _chart.legendHighlight = function (d) {\n if (!_chart.isLegendableHidden(d)) {\n _chart.g().selectAll('rect.bar')\n .classed('highlight', colorFilter(d.color))\n .classed('fadeout', colorFilter(d.color, true));\n }\n };\n\n _chart.legendReset = function () {\n _chart.g().selectAll('rect.bar')\n .classed('highlight', false)\n .classed('fadeout', false);\n };\n\n dc.override(_chart, 'xAxisMax', function () {\n var max = this._xAxisMax();\n if ('resolution' in _chart.xUnits()) {\n var res = _chart.xUnits().resolution;\n max += res;\n }\n return max;\n });\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * Concrete line/area chart implementation.\n * Examples:\n * - [Nasdaq 100 Index](http://dc-js.github.com/dc.js/)\n * - [Canadian City Crime Stats](http://dc-js.github.com/dc.js/crime/index.html)\n * @name lineChart\n * @memberof dc\n * @mixes dc.stackMixin\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a line chart under #chart-container1 element using the default global chart group\n * var chart1 = dc.lineChart('#chart-container1');\n * // create a line chart under #chart-container2 element using chart group A\n * var chart2 = dc.lineChart('#chart-container2', 'chartGroupA');\n * // create a sub-chart under a composite parent chart\n * var chart3 = dc.lineChart(compositeChart);\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {LineChart}\n */\ndc.lineChart = function (parent, chartGroup) {\n var DEFAULT_DOT_RADIUS = 5;\n var TOOLTIP_G_CLASS = 'dc-tooltip';\n var DOT_CIRCLE_CLASS = 'dot';\n var Y_AXIS_REF_LINE_CLASS = 'yRef';\n var X_AXIS_REF_LINE_CLASS = 'xRef';\n var DEFAULT_DOT_OPACITY = 1e-6;\n\n var _chart = dc.stackMixin(dc.coordinateGridMixin({}));\n var _renderArea = false;\n var _dotRadius = DEFAULT_DOT_RADIUS;\n var _dataPointRadius = null;\n var _dataPointFillOpacity = DEFAULT_DOT_OPACITY;\n var _dataPointStrokeOpacity = DEFAULT_DOT_OPACITY;\n var _interpolate = 'linear';\n var _tension = 0.7;\n var _defined;\n var _dashStyle;\n var _xyTipsOn = true;\n\n _chart.transitionDuration(500);\n _chart._rangeBandPadding(1);\n\n _chart.plotData = function () {\n var chartBody = _chart.chartBodyG();\n var layersList = chartBody.selectAll('g.stack-list');\n\n if (layersList.empty()) {\n layersList = chartBody.append('g').attr('class', 'stack-list');\n }\n\n var layers = layersList.selectAll('g.stack').data(_chart.data());\n\n var layersEnter = layers\n .enter()\n .append('g')\n .attr('class', function (d, i) {\n return 'stack ' + '_' + i;\n });\n\n drawLine(layersEnter, layers);\n\n drawArea(layersEnter, layers);\n\n drawDots(chartBody, layers);\n };\n\n /**\n * Gets or sets the interpolator to use for lines drawn, by string name, allowing e.g. step\n * functions, splines, and cubic interpolation. This is passed to\n * [d3.svg.line.interpolate](https://github.com/mbostock/d3/wiki/SVG-Shapes#line_interpolate) and\n * [d3.svg.area.interpolate](https://github.com/mbostock/d3/wiki/SVG-Shapes#area_interpolate),\n * where you can find a complete list of valid arguments\n * @name interpolate\n * @memberof dc.lineChart\n * @instance\n * @param {String} [interpolate='linear']\n * @returns {Chart}\n */\n _chart.interpolate = function (interpolate) {\n if (!arguments.length) {\n return _interpolate;\n }\n _interpolate = interpolate;\n return _chart;\n };\n\n /**\n * Gets or sets the tension to use for lines drawn, in the range 0 to 1.\n * This parameter further customizes the interpolation behavior. It is passed to\n * [d3.svg.line.tension](https://github.com/mbostock/d3/wiki/SVG-Shapes#line_tension) and\n * [d3.svg.area.tension](https://github.com/mbostock/d3/wiki/SVG-Shapes#area_tension).\n * @name tension\n * @memberof dc.lineChart\n * @instance\n * @param {Number} [tension=0.7]\n * @returns {Chart}\n */\n _chart.tension = function (tension) {\n if (!arguments.length) {\n return _tension;\n }\n _tension = tension;\n return _chart;\n };\n\n /**\n * Gets or sets a function that will determine discontinuities in the line which should be\n * skipped: the path will be broken into separate subpaths if some points are undefined.\n * This function is passed to\n * [d3.svg.line.defined](https://github.com/mbostock/d3/wiki/SVG-Shapes#line_defined)\n *\n * Note: crossfilter will sometimes coerce nulls to 0, so you may need to carefully write\n * custom reduce functions to get this to work, depending on your data. See\n * https://github.com/dc-js/dc.js/issues/615#issuecomment-49089248\n * @name defined\n * @memberof dc.lineChart\n * @instance\n * @param {Function} [defined]\n * @returns {Chart}\n */\n _chart.defined = function (defined) {\n if (!arguments.length) {\n return _defined;\n }\n _defined = defined;\n return _chart;\n };\n\n /**\n * Set the line's d3 dashstyle. This value becomes the 'stroke-dasharray' of line. Defaults to empty\n * array (solid line).\n * @name dashStyle\n * @memberof dc.lineChart\n * @instance\n * @example\n * // create a Dash Dot Dot Dot\n * chart.dashStyle([3,1,1,1]);\n * @param {Array} [dashStyle=[]]\n * @returns {Chart}\n */\n _chart.dashStyle = function (dashStyle) {\n if (!arguments.length) {\n return _dashStyle;\n }\n _dashStyle = dashStyle;\n return _chart;\n };\n\n /**\n * Get or set render area flag. If the flag is set to true then the chart will render the area\n * beneath each line and the line chart effectively becomes an area chart.\n * @name renderArea\n * @memberof dc.lineChart\n * @instance\n * @param {Boolean} [renderArea=false]\n * @returns {Chart}\n */\n _chart.renderArea = function (renderArea) {\n if (!arguments.length) {\n return _renderArea;\n }\n _renderArea = renderArea;\n return _chart;\n };\n\n function colors (d, i) {\n return _chart.getColor.call(d, d.values, i);\n }\n\n function drawLine (layersEnter, layers) {\n var line = d3.svg.line()\n .x(function (d) {\n return _chart.x()(d.x);\n })\n .y(function (d) {\n return _chart.y()(d.y + d.y0);\n })\n .interpolate(_interpolate)\n .tension(_tension);\n if (_defined) {\n line.defined(_defined);\n }\n\n var path = layersEnter.append('path')\n .attr('class', 'line')\n .attr('stroke', colors);\n if (_dashStyle) {\n path.attr('stroke-dasharray', _dashStyle);\n }\n\n dc.transition(layers.select('path.line'), _chart.transitionDuration())\n //.ease('linear')\n .attr('stroke', colors)\n .attr('d', function (d) {\n return safeD(line(d.values));\n });\n }\n\n function drawArea (layersEnter, layers) {\n if (_renderArea) {\n var area = d3.svg.area()\n .x(function (d) {\n return _chart.x()(d.x);\n })\n .y(function (d) {\n return _chart.y()(d.y + d.y0);\n })\n .y0(function (d) {\n return _chart.y()(d.y0);\n })\n .interpolate(_interpolate)\n .tension(_tension);\n if (_defined) {\n area.defined(_defined);\n }\n\n layersEnter.append('path')\n .attr('class', 'area')\n .attr('fill', colors)\n .attr('d', function (d) {\n return safeD(area(d.values));\n });\n\n dc.transition(layers.select('path.area'), _chart.transitionDuration())\n //.ease('linear')\n .attr('fill', colors)\n .attr('d', function (d) {\n return safeD(area(d.values));\n });\n }\n }\n\n function safeD (d) {\n return (!d || d.indexOf('NaN') >= 0) ? 'M0,0' : d;\n }\n\n function drawDots (chartBody, layers) {\n if (!_chart.brushOn() && _chart.xyTipsOn()) {\n var tooltipListClass = TOOLTIP_G_CLASS + '-list';\n var tooltips = chartBody.select('g.' + tooltipListClass);\n\n if (tooltips.empty()) {\n tooltips = chartBody.append('g').attr('class', tooltipListClass);\n }\n\n layers.each(function (d, layerIndex) {\n var points = d.values;\n if (_defined) {\n points = points.filter(_defined);\n }\n\n var g = tooltips.select('g.' + TOOLTIP_G_CLASS + '._' + layerIndex);\n if (g.empty()) {\n g = tooltips.append('g').attr('class', TOOLTIP_G_CLASS + ' _' + layerIndex);\n }\n\n createRefLines(g);\n\n var dots = g.selectAll('circle.' + DOT_CIRCLE_CLASS)\n .data(points, dc.pluck('x'));\n\n dots.enter()\n .append('circle')\n .attr('class', DOT_CIRCLE_CLASS)\n .attr('r', getDotRadius())\n .style('fill-opacity', _dataPointFillOpacity)\n .style('stroke-opacity', _dataPointStrokeOpacity)\n .on('mousemove', function () {\n var dot = d3.select(this);\n showDot(dot);\n showRefLines(dot, g);\n })\n .on('mouseout', function () {\n var dot = d3.select(this);\n hideDot(dot);\n hideRefLines(g);\n });\n\n dots\n .attr('cx', function (d) {\n return dc.utils.safeNumber(_chart.x()(d.x));\n })\n .attr('cy', function (d) {\n return dc.utils.safeNumber(_chart.y()(d.y + d.y0));\n })\n .attr('fill', _chart.getColor)\n .call(renderTitle, d);\n\n dots.exit().remove();\n });\n }\n }\n\n function createRefLines (g) {\n var yRefLine = g.select('path.' + Y_AXIS_REF_LINE_CLASS).empty() ?\n g.append('path').attr('class', Y_AXIS_REF_LINE_CLASS) : g.select('path.' + Y_AXIS_REF_LINE_CLASS);\n yRefLine.style('display', 'none').attr('stroke-dasharray', '5,5');\n\n var xRefLine = g.select('path.' + X_AXIS_REF_LINE_CLASS).empty() ?\n g.append('path').attr('class', X_AXIS_REF_LINE_CLASS) : g.select('path.' + X_AXIS_REF_LINE_CLASS);\n xRefLine.style('display', 'none').attr('stroke-dasharray', '5,5');\n }\n\n function showDot (dot) {\n dot.style('fill-opacity', 0.8);\n dot.style('stroke-opacity', 0.8);\n dot.attr('r', _dotRadius);\n return dot;\n }\n\n function showRefLines (dot, g) {\n var x = dot.attr('cx');\n var y = dot.attr('cy');\n var yAxisX = (_chart._yAxisX() - _chart.margins().left);\n var yAxisRefPathD = 'M' + yAxisX + ' ' + y + 'L' + (x) + ' ' + (y);\n var xAxisRefPathD = 'M' + x + ' ' + _chart.yAxisHeight() + 'L' + x + ' ' + y;\n g.select('path.' + Y_AXIS_REF_LINE_CLASS).style('display', '').attr('d', yAxisRefPathD);\n g.select('path.' + X_AXIS_REF_LINE_CLASS).style('display', '').attr('d', xAxisRefPathD);\n }\n\n function getDotRadius () {\n return _dataPointRadius || _dotRadius;\n }\n\n function hideDot (dot) {\n dot.style('fill-opacity', _dataPointFillOpacity)\n .style('stroke-opacity', _dataPointStrokeOpacity)\n .attr('r', getDotRadius());\n }\n\n function hideRefLines (g) {\n g.select('path.' + Y_AXIS_REF_LINE_CLASS).style('display', 'none');\n g.select('path.' + X_AXIS_REF_LINE_CLASS).style('display', 'none');\n }\n\n function renderTitle (dot, d) {\n if (_chart.renderTitle()) {\n dot.selectAll('title').remove();\n dot.append('title').text(dc.pluck('data', _chart.title(d.name)));\n }\n }\n\n /**\n * Turn on/off the mouseover behavior of an individual data point which renders a circle and x/y axis\n * dashed lines back to each respective axis. This is ignored if the chart brush is on (`brushOn`)\n * @name xyTipsOn\n * @memberof dc.lineChart\n * @instance\n * @param {Boolean} [xyTipsOn=false]\n * @returns {Chart}\n */\n _chart.xyTipsOn = function (xyTipsOn) {\n if (!arguments.length) {\n return _xyTipsOn;\n }\n _xyTipsOn = xyTipsOn;\n return _chart;\n };\n\n /**\n * Get or set the radius (in px) for dots displayed on the data points.\n * @name dotRadius\n * @memberof dc.lineChart\n * @instance\n * @param {Number} [dotRadius=5]\n * @returns {Chart}\n */\n _chart.dotRadius = function (dotRadius) {\n if (!arguments.length) {\n return _dotRadius;\n }\n _dotRadius = dotRadius;\n return _chart;\n };\n\n /**\n * Always show individual dots for each datapoint.\n * If `options` is falsy, it disables data point rendering.\n *\n * If no `options` are provided, the current `options` values are instead returned.\n * @name renderDataPoints\n * @memberof dc.lineChart\n * @instance\n * @example\n * chart.renderDataPoints({radius: 2, fillOpacity: 0.8, strokeOpacity: 0.8})\n * @param {{fillOpacity: Number, strokeOpacity: Number, radius: Number}} [options={fillOpacity: 0.8, strokeOpacity: 0.8, radius: 2}]\n * @returns {Chart}\n */\n _chart.renderDataPoints = function (options) {\n if (!arguments.length) {\n return {\n fillOpacity: _dataPointFillOpacity,\n strokeOpacity: _dataPointStrokeOpacity,\n radius: _dataPointRadius\n };\n } else if (!options) {\n _dataPointFillOpacity = DEFAULT_DOT_OPACITY;\n _dataPointStrokeOpacity = DEFAULT_DOT_OPACITY;\n _dataPointRadius = null;\n } else {\n _dataPointFillOpacity = options.fillOpacity || 0.8;\n _dataPointStrokeOpacity = options.strokeOpacity || 0.8;\n _dataPointRadius = options.radius || 2;\n }\n return _chart;\n };\n\n function colorFilter (color, dashstyle, inv) {\n return function () {\n var item = d3.select(this);\n var match = (item.attr('stroke') === color &&\n item.attr('stroke-dasharray') === ((dashstyle instanceof Array) ?\n dashstyle.join(',') : null)) || item.attr('fill') === color;\n return inv ? !match : match;\n };\n }\n\n _chart.legendHighlight = function (d) {\n if (!_chart.isLegendableHidden(d)) {\n _chart.g().selectAll('path.line, path.area')\n .classed('highlight', colorFilter(d.color, d.dashstyle))\n .classed('fadeout', colorFilter(d.color, d.dashstyle, true));\n }\n };\n\n _chart.legendReset = function () {\n _chart.g().selectAll('path.line, path.area')\n .classed('highlight', false)\n .classed('fadeout', false);\n };\n\n dc.override(_chart, 'legendables', function () {\n var legendables = _chart._legendables();\n if (!_dashStyle) {\n return legendables;\n }\n return legendables.map(function (l) {\n l.dashstyle = _dashStyle;\n return l;\n });\n });\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * The data count widget is a simple widget designed to display the number of records selected by the\n * current filters out of the total number of records in the data set. Once created the data count widget\n * will automatically update the text content of the following elements under the parent element.\n *\n * '.total-count' - total number of records\n * '.filter-count' - number of records matched by the current filters\n *\n * Examples:\n * - [Nasdaq 100 Index](http://dc-js.github.com/dc.js/)\n * @name dataCount\n * @memberof dc\n * @mixes dc.baseMixin\n * @example\n * var ndx = crossfilter(data);\n * var all = ndx.groupAll();\n *\n * dc.dataCount('.dc-data-count')\n * .dimension(ndx)\n * .group(all);\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {DataCount}\n */\ndc.dataCount = function (parent, chartGroup) {\n var _formatNumber = d3.format(',d');\n var _chart = dc.baseMixin({});\n var _html = {some: '', all: ''};\n\n /**\n * Gets or sets an optional object specifying HTML templates to use depending how many items are\n * selected. The text `%total-count` will replaced with the total number of records, and the text\n * `%filter-count` will be replaced with the number of selected records.\n * - all: HTML template to use if all items are selected\n * - some: HTML template to use if not all items are selected\n * @name html\n * @memberof dc.dataCount\n * @instance\n * @example\n * counter.html({\n * some: '%filter-count out of %total-count records selected',\n * all: 'All records selected. Click on charts to apply filters'\n * })\n * @param {{some:String, all: String}} [options]\n * @returns {Chart}\n */\n _chart.html = function (options) {\n if (!arguments.length) {\n return _html;\n }\n if (options.all) {\n _html.all = options.all;\n }\n if (options.some) {\n _html.some = options.some;\n }\n return _chart;\n };\n\n /**\n * Gets or sets an optional function to format the filter count and total count.\n * @name formatNumber\n * @memberof dc.dataCount\n * @instance\n * @example\n * counter.formatNumber(d3.format('.2g'))\n * @param {Function} [formatter=d3.format('.2g')]\n * @returns {Chart}\n */\n _chart.formatNumber = function (formatter) {\n if (!arguments.length) {\n return _formatNumber;\n }\n _formatNumber = formatter;\n return _chart;\n };\n\n _chart._doRender = function () {\n var tot = _chart.dimension().size(),\n val = _chart.group().value();\n var all = _formatNumber(tot);\n var selected = _formatNumber(val);\n\n if ((tot === val) && (_html.all !== '')) {\n _chart.root().html(_html.all.replace('%total-count', all).replace('%filter-count', selected));\n } else if (_html.some !== '') {\n _chart.root().html(_html.some.replace('%total-count', all).replace('%filter-count', selected));\n } else {\n _chart.selectAll('.total-count').text(all);\n _chart.selectAll('.filter-count').text(selected);\n }\n return _chart;\n };\n\n _chart._doRedraw = function () {\n return _chart._doRender();\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * The data table is a simple widget designed to list crossfilter focused data set (rows being\n * filtered) in a good old tabular fashion.\n *\n * Note: Unlike other charts, the data table (and data grid chart) use the group attribute as a keying function\n * for [nesting](https://github.com/mbostock/d3/wiki/Arrays#-nest) the data together in groups.\n * Do not pass in a crossfilter group as this will not work.\n *\n * Examples:\n * - [Nasdaq 100 Index](http://dc-js.github.com/dc.js/)\n * @name dataTable\n * @memberof dc\n * @mixes dc.baseMixin\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {DataTable}\n */\ndc.dataTable = function (parent, chartGroup) {\n var LABEL_CSS_CLASS = 'dc-table-label';\n var ROW_CSS_CLASS = 'dc-table-row';\n var COLUMN_CSS_CLASS = 'dc-table-column';\n var GROUP_CSS_CLASS = 'dc-table-group';\n var HEAD_CSS_CLASS = 'dc-table-head';\n\n var _chart = dc.baseMixin({});\n\n var _size = 25;\n var _columns = [];\n var _sortBy = function (d) {\n return d;\n };\n var _order = d3.ascending;\n var _showGroups = true;\n\n _chart._doRender = function () {\n _chart.selectAll('tbody').remove();\n\n renderRows(renderGroups());\n\n return _chart;\n };\n\n _chart._doColumnValueFormat = function (v, d) {\n return ((typeof v === 'function') ?\n v(d) : // v as function\n ((typeof v === 'string') ?\n d[v] : // v is field name string\n v.format(d) // v is Object, use fn (element 2)\n )\n );\n };\n\n _chart._doColumnHeaderFormat = function (d) {\n // if 'function', convert to string representation\n // show a string capitalized\n // if an object then display it's label string as-is.\n return (typeof d === 'function') ?\n _chart._doColumnHeaderFnToString(d) :\n ((typeof d === 'string') ?\n _chart._doColumnHeaderCapitalize(d) : String(d.label));\n };\n\n _chart._doColumnHeaderCapitalize = function (s) {\n // capitalize\n return s.charAt(0).toUpperCase() + s.slice(1);\n };\n\n _chart._doColumnHeaderFnToString = function (f) {\n // columnString(f) {\n var s = String(f);\n var i1 = s.indexOf('return ');\n if (i1 >= 0) {\n var i2 = s.lastIndexOf(';');\n if (i2 >= 0) {\n s = s.substring(i1 + 7, i2);\n var i3 = s.indexOf('numberFormat');\n if (i3 >= 0) {\n s = s.replace('numberFormat', '');\n }\n }\n }\n return s;\n };\n\n function renderGroups () {\n // The 'original' example uses all 'functions'.\n // If all 'functions' are used, then don't remove/add a header, and leave\n // the html alone. This preserves the functionality of earlier releases.\n // A 2nd option is a string representing a field in the data.\n // A third option is to supply an Object such as an array of 'information', and\n // supply your own _doColumnHeaderFormat and _doColumnValueFormat functions to\n // create what you need.\n var bAllFunctions = true;\n _columns.forEach(function (f) {\n bAllFunctions = bAllFunctions & (typeof f === 'function');\n });\n\n if (!bAllFunctions) {\n _chart.selectAll('th').remove();\n var headcols = _chart.root().selectAll('th')\n .data(_columns);\n\n var headGroup = headcols\n .enter()\n .append('th');\n\n headGroup\n .attr('class', HEAD_CSS_CLASS)\n .html(function (d) {\n return (_chart._doColumnHeaderFormat(d));\n\n });\n }\n\n var groups = _chart.root().selectAll('tbody')\n .data(nestEntries(), function (d) {\n return _chart.keyAccessor()(d);\n });\n\n var rowGroup = groups\n .enter()\n .append('tbody');\n\n if (_showGroups === true) {\n rowGroup\n .append('tr')\n .attr('class', GROUP_CSS_CLASS)\n .append('td')\n .attr('class', LABEL_CSS_CLASS)\n .attr('colspan', _columns.length)\n .html(function (d) {\n return _chart.keyAccessor()(d);\n });\n }\n\n groups.exit().remove();\n\n return rowGroup;\n }\n\n function nestEntries () {\n var entries;\n if (_order === d3.ascending) {\n entries = _chart.dimension().bottom(_size);\n } else {\n entries = _chart.dimension().top(_size);\n }\n\n return d3.nest()\n .key(_chart.group())\n .sortKeys(_order)\n .entries(entries.sort(function (a, b) {\n return _order(_sortBy(a), _sortBy(b));\n }));\n }\n\n function renderRows (groups) {\n var rows = groups.order()\n .selectAll('tr.' + ROW_CSS_CLASS)\n .data(function (d) {\n return d.values;\n });\n\n var rowEnter = rows.enter()\n .append('tr')\n .attr('class', ROW_CSS_CLASS);\n\n _columns.forEach(function (v, i) {\n rowEnter.append('td')\n .attr('class', COLUMN_CSS_CLASS + ' _' + i)\n .html(function (d) {\n return _chart._doColumnValueFormat(v, d);\n });\n });\n\n rows.exit().remove();\n\n return rows;\n }\n\n _chart._doRedraw = function () {\n return _chart._doRender();\n };\n\n /**\n * Get or set the table size which determines the number of rows displayed by the widget.\n * @name size\n * @memberof dc.dataTable\n * @instance\n * @param {Number} [size=25]\n * @returns {Chart}\n */\n _chart.size = function (size) {\n if (!arguments.length) {\n return _size;\n }\n _size = size;\n return _chart;\n };\n\n /**\n * Get or set column functions. The data table widget now supports several methods of specifying\n * the columns to display. The original method, first shown below, uses an array of functions to\n * generate dynamic columns. Column functions are simple javascript functions with only one input\n * argument `d` which represents a row in the data set. The return value of these functions will be\n * used directly to generate table content for each cell. However, this method requires the .html\n * table entry to have a fixed set of column headers.\n *\n * The second example shows you can simply list the data (d) content directly without\n * specifying it as a function, except where necessary (ie, computed columns). Note\n * the data element accessor name is capitalized when displayed in the table. You can\n * also mix in functions as desired or necessary, but you must use the\n * Object = [Label, Fn] method as shown below.\n * You may wish to override the following two functions, which are internally used to\n * translate the column information or function into a displayed header. The first one\n * is used on the simple \"string\" column specifier, the second is used to transform the\n * String(fn) into something displayable. For the Stock example, the function for Change\n * becomes a header of 'd.close - d.open'.\n * _chart._doColumnHeaderCapitalize _chart._doColumnHeaderFnToString\n * You may use your own Object definition, however you must then override\n * _chart._doColumnHeaderFormat , _chart._doColumnValueFormat\n * Be aware that fields without numberFormat specification will be displayed just as\n * they are stored in the data, unformatted.\n *\n * The third example, where all fields are specified using the Object = [Label, Fn] method.\n * @name columns\n * @memberof dc.dataTable\n * @instance\n * @example\n * chart.columns([\n * function(d) { return d.date; },\n * function(d) { return d.open; },\n * function(d) { return d.close; },\n * function(d) { return numberFormat(d.close - d.open); },\n * function(d) { return d.volume; }\n * ]);\n * @example\n * chart.columns([\n * \"date\", // d[\"date\"], ie, a field accessor; capitalized automatically\n * \"open\", // ...\n * \"close\", // ...\n * [\"Change\", // Specify an Object = [Label, Fn]\n * function (d) { return numberFormat(d.close - d.open); }],\n * \"volume\" // d[\"volume\"], ie, a field accessor; capitalized automatically\n * ]);\n * @example\n * chart.columns([\n * [\"Date\", // Specify an Object = [Label, Fn]\n * function (d) { return d.date; }],\n * [\"Open\",\n * function (d) { return numberFormat(d.open); }],\n * [\"Close\",\n * function (d) { return numberFormat(d.close); }],\n * [\"Change\",\n * function (d) { return numberFormat(d.close - d.open); }],\n * [\"Volume\",\n * function (d) { return d.volume; }]\n * ]);\n * @param {Array} [columns=[]]\n * @returns {Chart}\n */\n _chart.columns = function (columns) {\n if (!arguments.length) {\n return _columns;\n }\n _columns = columns;\n return _chart;\n };\n\n /**\n * Get or set sort-by function. This function works as a value accessor at row level and returns a\n * particular field to be sorted by. Default value: identity function\n * @name sortBy\n * @memberof dc.dataTable\n * @instance\n * @example\n * chart.sortBy(function(d) {\n * return d.date;\n * });\n * @param {Function} [sortBy]\n * @returns {Chart}\n */\n _chart.sortBy = function (sortBy) {\n if (!arguments.length) {\n return _sortBy;\n }\n _sortBy = sortBy;\n return _chart;\n };\n\n /**\n * Get or set sort order.\n * @name order\n * @memberof dc.dataTable\n * @instance\n * @example\n * chart.order(d3.descending);\n * @param {Function} [order=d3.ascending]\n * @returns {Chart}\n */\n _chart.order = function (order) {\n if (!arguments.length) {\n return _order;\n }\n _order = order;\n return _chart;\n };\n\n /**\n * Get or set if group rows will be shown.\n *\n * The .group() getter-setter must be provided in either case.\n * @name showGroups\n * @memberof dc.dataTable\n * @instance\n * @example\n * chart\n * .group([value], [name])\n * .showGroups(true|false);\n * @param {Boolean} [showGroups=true]\n * @returns {Chart}\n */\n _chart.showGroups = function (showGroups) {\n if (!arguments.length) {\n return _showGroups;\n }\n _showGroups = showGroups;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * Data grid is a simple widget designed to list the filtered records, providing\n * a simple way to define how the items are displayed.\n *\n * Note: Unlike other charts, the data grid chart (and data table) use the group attribute as a keying function\n * for [nesting](https://github.com/mbostock/d3/wiki/Arrays#-nest) the data together in groups.\n * Do not pass in a crossfilter group as this will not work.\n *\n * Examples:\n * - [List of members of the european parliament](http://europarl.me/dc.js/web/ep/index.html)\n * @name dataGrid\n * @memberof dc\n * @mixes dc.baseMixin\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {DataGrid}\n */\ndc.dataGrid = function (parent, chartGroup) {\n var LABEL_CSS_CLASS = 'dc-grid-label';\n var ITEM_CSS_CLASS = 'dc-grid-item';\n var GROUP_CSS_CLASS = 'dc-grid-group';\n var GRID_CSS_CLASS = 'dc-grid-top';\n\n var _chart = dc.baseMixin({});\n\n var _size = 999; // shouldn't be needed, but you might\n var _html = function (d) { return 'you need to provide an html() handling param: ' + JSON.stringify(d); };\n var _sortBy = function (d) {\n return d;\n };\n var _order = d3.ascending;\n var _beginSlice = 0, _endSlice;\n\n var _htmlGroup = function (d) {\n return '
' +\n _chart.keyAccessor()(d) + ' ';\n };\n\n _chart._doRender = function () {\n _chart.selectAll('div.' + GRID_CSS_CLASS).remove();\n\n renderItems(renderGroups());\n\n return _chart;\n };\n\n function renderGroups () {\n var groups = _chart.root().selectAll('div.' + GRID_CSS_CLASS)\n .data(nestEntries(), function (d) {\n return _chart.keyAccessor()(d);\n });\n\n var itemGroup = groups\n .enter()\n .append('div')\n .attr('class', GRID_CSS_CLASS);\n\n if (_htmlGroup) {\n itemGroup\n .html(function (d) {\n return _htmlGroup(d);\n });\n }\n\n groups.exit().remove();\n return itemGroup;\n }\n\n function nestEntries () {\n var entries = _chart.dimension().top(_size);\n\n return d3.nest()\n .key(_chart.group())\n .sortKeys(_order)\n .entries(entries.sort(function (a, b) {\n return _order(_sortBy(a), _sortBy(b));\n }).slice(_beginSlice, _endSlice));\n }\n\n function renderItems (groups) {\n var items = groups.order()\n .selectAll('div.' + ITEM_CSS_CLASS)\n .data(function (d) {\n return d.values;\n });\n\n items.enter()\n .append('div')\n .attr('class', ITEM_CSS_CLASS)\n .html(function (d) {\n return _html(d);\n });\n\n items.exit().remove();\n\n return items;\n }\n\n _chart._doRedraw = function () {\n return _chart._doRender();\n };\n\n /**\n * Get or set the index of the beginning slice which determines which entries get displayed by the widget\n * Useful when implementing pagination.\n * @name beginSlice\n * @memberof dc.dataGrid\n * @instance\n * @param {Number} [beginSlice=0]\n * @returns {Chart}\n */\n _chart.beginSlice = function (beginSlice) {\n if (!arguments.length) {\n return _beginSlice;\n }\n _beginSlice = beginSlice;\n return _chart;\n };\n\n /**\n * Get or set the index of the end slice which determines which entries get displayed by the widget\n * Useful when implementing pagination.\n * @name endSlice\n * @memberof dc.dataGrid\n * @instance\n * @param {Number} [endSlice]\n * @returns {Chart}\n */\n _chart.endSlice = function (endSlice) {\n if (!arguments.length) {\n return _endSlice;\n }\n _endSlice = endSlice;\n return _chart;\n };\n\n /**\n * Get or set the grid size which determines the number of items displayed by the widget.\n * @name size\n * @memberof dc.dataGrid\n * @instance\n * @param {Number} [size=999]\n * @returns {Chart}\n */\n _chart.size = function (size) {\n if (!arguments.length) {\n return _size;\n }\n _size = size;\n return _chart;\n };\n\n /**\n * Get or set the function that formats an item. The data grid widget uses a\n * function to generate dynamic html. Use your favourite templating engine or\n * generate the string directly.\n * @name html\n * @memberof dc.dataGrid\n * @instance\n * @example\n * chart.html(function (d) { return ''+data.exampleString+'
';});\n * @param {Function} [html]\n * @returns {Chart}\n */\n _chart.html = function (html) {\n if (!arguments.length) {\n return _html;\n }\n _html = html;\n return _chart;\n };\n\n /**\n * Get or set the function that formats a group label.\n * @name htmlGroup\n * @memberof dc.dataGrid\n * @instance\n * @example\n * chart.htmlGroup (function (d) { return ''.d.key . 'with ' . d.values.length .' items '});\n * @param {Function} [htmlGroup]\n * @returns {Chart}\n */\n _chart.htmlGroup = function (htmlGroup) {\n if (!arguments.length) {\n return _htmlGroup;\n }\n _htmlGroup = htmlGroup;\n return _chart;\n };\n\n /**\n * Get or set sort-by function. This function works as a value accessor at the item\n * level and returns a particular field to be sorted.\n * @name sortBy\n * @memberof dc.dataGrid\n * @instance\n * @example\n * chart.sortBy(function(d) {\n * return d.date;\n * });\n * @param {Function} [sortByFunction]\n * @returns {Chart}\n */\n _chart.sortBy = function (sortByFunction) {\n if (!arguments.length) {\n return _sortBy;\n }\n _sortBy = sortByFunction;\n return _chart;\n };\n\n /**\n * Get or set sort order function.\n * @name order\n * @memberof dc.dataGrid\n * @instance\n * @example\n * chart.order(d3.descending);\n * @param {Function} [order=d3.ascending]\n * @returns {Chart}\n */\n _chart.order = function (order) {\n if (!arguments.length) {\n return _order;\n }\n _order = order;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * A concrete implementation of a general purpose bubble chart that allows data visualization using the\n * following dimensions:\n * - x axis position\n * - y axis position\n * - bubble radius\n * - color\n * Examples:\n * - [Nasdaq 100 Index](http://dc-js.github.com/dc.js/)\n * - [US Venture Capital Landscape 2011](http://dc-js.github.com/dc.js/vc/index.html)\n * @name bubbleChart\n * @memberof dc\n * @mixes dc.bubbleMixin\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a bubble chart under #chart-container1 element using the default global chart group\n * var bubbleChart1 = dc.bubbleChart('#chart-container1');\n * // create a bubble chart under #chart-container2 element using chart group A\n * var bubbleChart2 = dc.bubbleChart('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {BubbleChart}\n */\ndc.bubbleChart = function (parent, chartGroup) {\n var _chart = dc.bubbleMixin(dc.coordinateGridMixin({}));\n\n var _elasticRadius = false;\n\n _chart.transitionDuration(750);\n\n var bubbleLocator = function (d) {\n return 'translate(' + (bubbleX(d)) + ',' + (bubbleY(d)) + ')';\n };\n\n /**\n * Turn on or off the elastic bubble radius feature, or return the value of the flag. If this\n * feature is turned on, then bubble radii will be automatically rescaled to fit the chart better.\n * @name elasticRadius\n * @memberof dc.bubbleChart\n * @instance\n * @param {Boolean} [elasticRadius=false]\n * @returns {Boolean}\n */\n _chart.elasticRadius = function (elasticRadius) {\n if (!arguments.length) {\n return _elasticRadius;\n }\n _elasticRadius = elasticRadius;\n return _chart;\n };\n\n _chart.plotData = function () {\n if (_elasticRadius) {\n _chart.r().domain([_chart.rMin(), _chart.rMax()]);\n }\n\n _chart.r().range([_chart.MIN_RADIUS, _chart.xAxisLength() * _chart.maxBubbleRelativeSize()]);\n\n var bubbleG = _chart.chartBodyG().selectAll('g.' + _chart.BUBBLE_NODE_CLASS)\n .data(_chart.data(), function (d) { return d.key; });\n\n renderNodes(bubbleG);\n\n updateNodes(bubbleG);\n\n removeNodes(bubbleG);\n\n _chart.fadeDeselectedArea();\n };\n\n function renderNodes (bubbleG) {\n var bubbleGEnter = bubbleG.enter().append('g');\n\n bubbleGEnter\n .attr('class', _chart.BUBBLE_NODE_CLASS)\n .attr('transform', bubbleLocator)\n .append('circle').attr('class', function (d, i) {\n return _chart.BUBBLE_CLASS + ' _' + i;\n })\n .on('click', _chart.onClick)\n .attr('fill', _chart.getColor)\n .attr('r', 0);\n dc.transition(bubbleG, _chart.transitionDuration())\n .selectAll('circle.' + _chart.BUBBLE_CLASS)\n .attr('r', function (d) {\n return _chart.bubbleR(d);\n })\n .attr('opacity', function (d) {\n return (_chart.bubbleR(d) > 0) ? 1 : 0;\n });\n\n _chart._doRenderLabel(bubbleGEnter);\n\n _chart._doRenderTitles(bubbleGEnter);\n }\n\n function updateNodes (bubbleG) {\n dc.transition(bubbleG, _chart.transitionDuration())\n .attr('transform', bubbleLocator)\n .selectAll('circle.' + _chart.BUBBLE_CLASS)\n .attr('fill', _chart.getColor)\n .attr('r', function (d) {\n return _chart.bubbleR(d);\n })\n .attr('opacity', function (d) {\n return (_chart.bubbleR(d) > 0) ? 1 : 0;\n });\n\n _chart.doUpdateLabels(bubbleG);\n _chart.doUpdateTitles(bubbleG);\n }\n\n function removeNodes (bubbleG) {\n bubbleG.exit().remove();\n }\n\n function bubbleX (d) {\n var x = _chart.x()(_chart.keyAccessor()(d));\n if (isNaN(x)) {\n x = 0;\n }\n return x;\n }\n\n function bubbleY (d) {\n var y = _chart.y()(_chart.valueAccessor()(d));\n if (isNaN(y)) {\n y = 0;\n }\n return y;\n }\n\n _chart.renderBrush = function () {\n // override default x axis brush from parent chart\n };\n\n _chart.redrawBrush = function () {\n // override default x axis brush from parent chart\n _chart.fadeDeselectedArea();\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * Composite charts are a special kind of chart that render multiple charts on the same Coordinate\n * Grid. You can overlay (compose) different bar/line/area charts in a single composite chart to\n * achieve some quite flexible charting effects.\n * @name compositeChart\n * @memberof dc\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a composite chart under #chart-container1 element using the default global chart group\n * var compositeChart1 = dc.compositeChart('#chart-container1');\n * // create a composite chart under #chart-container2 element using chart group A\n * var compositeChart2 = dc.compositeChart('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {CompositeChart}\n */\ndc.compositeChart = function (parent, chartGroup) {\n\n var SUB_CHART_CLASS = 'sub';\n var DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING = 12;\n\n var _chart = dc.coordinateGridMixin({});\n var _children = [];\n\n var _childOptions = {};\n\n var _shareColors = false,\n _shareTitle = true;\n\n var _rightYAxis = d3.svg.axis(),\n _rightYAxisLabel = 0,\n _rightYAxisLabelPadding = DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING,\n _rightY,\n _rightAxisGridLines = false;\n\n _chart._mandatoryAttributes([]);\n _chart.transitionDuration(500);\n\n dc.override(_chart, '_generateG', function () {\n var g = this.__generateG();\n\n for (var i = 0; i < _children.length; ++i) {\n var child = _children[i];\n\n generateChildG(child, i);\n\n if (!child.dimension()) {\n child.dimension(_chart.dimension());\n }\n if (!child.group()) {\n child.group(_chart.group());\n }\n\n child.chartGroup(_chart.chartGroup());\n child.svg(_chart.svg());\n child.xUnits(_chart.xUnits());\n child.transitionDuration(_chart.transitionDuration());\n child.brushOn(_chart.brushOn());\n child.renderTitle(_chart.renderTitle());\n child.elasticX(_chart.elasticX());\n }\n\n return g;\n });\n\n _chart._brushing = function () {\n var extent = _chart.extendBrush();\n var brushIsEmpty = _chart.brushIsEmpty(extent);\n\n for (var i = 0; i < _children.length; ++i) {\n _children[i].filter(null);\n if (!brushIsEmpty) {\n _children[i].filter(extent);\n }\n }\n };\n\n _chart._prepareYAxis = function () {\n if (leftYAxisChildren().length !== 0) { prepareLeftYAxis(); }\n if (rightYAxisChildren().length !== 0) { prepareRightYAxis(); }\n\n if (leftYAxisChildren().length > 0 && !_rightAxisGridLines) {\n _chart._renderHorizontalGridLinesForAxis(_chart.g(), _chart.y(), _chart.yAxis());\n } else if (rightYAxisChildren().length > 0) {\n _chart._renderHorizontalGridLinesForAxis(_chart.g(), _rightY, _rightYAxis);\n }\n };\n\n _chart.renderYAxis = function () {\n if (leftYAxisChildren().length !== 0) {\n _chart.renderYAxisAt('y', _chart.yAxis(), _chart.margins().left);\n _chart.renderYAxisLabel('y', _chart.yAxisLabel(), -90);\n }\n\n if (rightYAxisChildren().length !== 0) {\n _chart.renderYAxisAt('yr', _chart.rightYAxis(), _chart.width() - _chart.margins().right);\n _chart.renderYAxisLabel('yr', _chart.rightYAxisLabel(), 90, _chart.width() - _rightYAxisLabelPadding);\n }\n };\n\n function prepareRightYAxis () {\n if (_chart.rightY() === undefined || _chart.elasticY()) {\n if (_chart.rightY() === undefined) {\n _chart.rightY(d3.scale.linear());\n }\n _chart.rightY().domain([rightYAxisMin(), rightYAxisMax()]).rangeRound([_chart.yAxisHeight(), 0]);\n }\n\n _chart.rightY().range([_chart.yAxisHeight(), 0]);\n _chart.rightYAxis(_chart.rightYAxis().scale(_chart.rightY()));\n\n _chart.rightYAxis().orient('right');\n }\n\n function prepareLeftYAxis () {\n if (_chart.y() === undefined || _chart.elasticY()) {\n if (_chart.y() === undefined) {\n _chart.y(d3.scale.linear());\n }\n _chart.y().domain([yAxisMin(), yAxisMax()]).rangeRound([_chart.yAxisHeight(), 0]);\n }\n\n _chart.y().range([_chart.yAxisHeight(), 0]);\n _chart.yAxis(_chart.yAxis().scale(_chart.y()));\n\n _chart.yAxis().orient('left');\n }\n\n function generateChildG (child, i) {\n child._generateG(_chart.g());\n child.g().attr('class', SUB_CHART_CLASS + ' _' + i);\n }\n\n _chart.plotData = function () {\n for (var i = 0; i < _children.length; ++i) {\n var child = _children[i];\n\n if (!child.g()) {\n generateChildG(child, i);\n }\n\n if (_shareColors) {\n child.colors(_chart.colors());\n }\n\n child.x(_chart.x());\n\n child.xAxis(_chart.xAxis());\n\n if (child.useRightYAxis()) {\n child.y(_chart.rightY());\n child.yAxis(_chart.rightYAxis());\n } else {\n child.y(_chart.y());\n child.yAxis(_chart.yAxis());\n }\n\n child.plotData();\n\n child._activateRenderlets();\n }\n };\n\n /**\n * Get or set whether to draw gridlines from the right y axis. Drawing from the left y axis is the\n * default behavior. This option is only respected when subcharts with both left and right y-axes\n * are present.\n * @name useRightAxisGridLines\n * @memberof dc.compositeChart\n * @instance\n * @param {Boolean} [useRightAxisGridLines=false]\n * @return {Chart}\n */\n _chart.useRightAxisGridLines = function (useRightAxisGridLines) {\n if (!arguments) {\n return _rightAxisGridLines;\n }\n\n _rightAxisGridLines = useRightAxisGridLines;\n return _chart;\n };\n\n /**\n * Get or set chart-specific options for all child charts. This is equivalent to calling `.options`\n * on each child chart.\n * @name childOptions\n * @memberof dc.compositeChart\n * @instance\n * @param {Object} [childOptions]\n * @return {Chart}\n */\n _chart.childOptions = function (childOptions) {\n if (!arguments.length) {\n return _childOptions;\n }\n _childOptions = childOptions;\n _children.forEach(function (child) {\n child.options(_childOptions);\n });\n return _chart;\n };\n\n _chart.fadeDeselectedArea = function () {\n for (var i = 0; i < _children.length; ++i) {\n var child = _children[i];\n child.brush(_chart.brush());\n child.fadeDeselectedArea();\n }\n };\n\n /**\n * Set or get the right y axis label.\n * @name rightYAxisLabel\n * @memberof dc.compositeChart\n * @instance\n * @param {String} [rightYAxisLabel]\n * @param {Number} [padding]\n * @return {Chart}\n */\n _chart.rightYAxisLabel = function (rightYAxisLabel, padding) {\n if (!arguments.length) {\n return _rightYAxisLabel;\n }\n _rightYAxisLabel = rightYAxisLabel;\n _chart.margins().right -= _rightYAxisLabelPadding;\n _rightYAxisLabelPadding = (padding === undefined) ? DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING : padding;\n _chart.margins().right += _rightYAxisLabelPadding;\n return _chart;\n };\n\n /**\n * Combine the given charts into one single composite coordinate grid chart.\n * @name compose\n * @memberof dc.compositeChart\n * @instance\n * @example\n * moveChart.compose([\n * // when creating sub-chart you need to pass in the parent chart\n * dc.lineChart(moveChart)\n * .group(indexAvgByMonthGroup) // if group is missing then parent's group will be used\n * .valueAccessor(function (d){return d.value.avg;})\n * // most of the normal functions will continue to work in a composed chart\n * .renderArea(true)\n * .stack(monthlyMoveGroup, function (d){return d.value;})\n * .title(function (d){\n * var value = d.value.avg?d.value.avg:d.value;\n * if(isNaN(value)) value = 0;\n * return dateFormat(d.key) + '\\n' + numberFormat(value);\n * }),\n * dc.barChart(moveChart)\n * .group(volumeByMonthGroup)\n * .centerBar(true)\n * ]);\n * @param {Array} [subChartArray]\n * @return {Chart}\n */\n _chart.compose = function (subChartArray) {\n _children = subChartArray;\n _children.forEach(function (child) {\n child.height(_chart.height());\n child.width(_chart.width());\n child.margins(_chart.margins());\n\n if (_shareTitle) {\n child.title(_chart.title());\n }\n\n child.options(_childOptions);\n });\n return _chart;\n };\n\n /**\n * Returns the child charts which are composed into the composite chart.\n * @name children\n * @memberof dc.compositeChart\n * @instance\n * @return {Array}\n */\n _chart.children = function () {\n return _children;\n };\n\n /**\n * Get or set color sharing for the chart. If set, the `.colors()` value from this chart\n * will be shared with composed children. Additionally if the child chart implements\n * Stackable and has not set a custom .colorAccessor, then it will generate a color\n * specific to its order in the composition.\n * @name shareColors\n * @memberof dc.compositeChart\n * @instance\n * @param {Boolean} [shareColors=false]\n * @return {Chart}\n */\n _chart.shareColors = function (shareColors) {\n if (!arguments.length) {\n return _shareColors;\n }\n _shareColors = shareColors;\n return _chart;\n };\n\n /**\n * Get or set title sharing for the chart. If set, the `.title()` value from this chart will be\n * shared with composed children.\n * @name shareTitle\n * @memberof dc.compositeChart\n * @instance\n * @param {Boolean} [shareTitle=true]\n * @return {Chart}\n */\n _chart.shareTitle = function (shareTitle) {\n if (!arguments.length) {\n return _shareTitle;\n }\n _shareTitle = shareTitle;\n return _chart;\n };\n\n /**\n * Get or set the y scale for the right axis. The right y scale is typically automatically\n * generated by the chart implementation.\n * @name rightY\n * @memberof dc.compositeChart\n * @instance\n * @param {d3.scale} [yScale]\n * @return {Chart}\n */\n _chart.rightY = function (yScale) {\n if (!arguments.length) {\n return _rightY;\n }\n _rightY = yScale;\n _chart.rescale();\n return _chart;\n };\n\n function leftYAxisChildren () {\n return _children.filter(function (child) {\n return !child.useRightYAxis();\n });\n }\n\n function rightYAxisChildren () {\n return _children.filter(function (child) {\n return child.useRightYAxis();\n });\n }\n\n function getYAxisMin (charts) {\n return charts.map(function (c) {\n return c.yAxisMin();\n });\n }\n\n delete _chart.yAxisMin;\n function yAxisMin () {\n return d3.min(getYAxisMin(leftYAxisChildren()));\n }\n\n function rightYAxisMin () {\n return d3.min(getYAxisMin(rightYAxisChildren()));\n }\n\n function getYAxisMax (charts) {\n return charts.map(function (c) {\n return c.yAxisMax();\n });\n }\n\n delete _chart.yAxisMax;\n function yAxisMax () {\n return dc.utils.add(d3.max(getYAxisMax(leftYAxisChildren())), _chart.yAxisPadding());\n }\n\n function rightYAxisMax () {\n return dc.utils.add(d3.max(getYAxisMax(rightYAxisChildren())), _chart.yAxisPadding());\n }\n\n function getAllXAxisMinFromChildCharts () {\n return _children.map(function (c) {\n return c.xAxisMin();\n });\n }\n\n dc.override(_chart, 'xAxisMin', function () {\n return dc.utils.subtract(d3.min(getAllXAxisMinFromChildCharts()), _chart.xAxisPadding());\n });\n\n function getAllXAxisMaxFromChildCharts () {\n return _children.map(function (c) {\n return c.xAxisMax();\n });\n }\n\n dc.override(_chart, 'xAxisMax', function () {\n return dc.utils.add(d3.max(getAllXAxisMaxFromChildCharts()), _chart.xAxisPadding());\n });\n\n _chart.legendables = function () {\n return _children.reduce(function (items, child) {\n if (_shareColors) {\n child.colors(_chart.colors());\n }\n items.push.apply(items, child.legendables());\n return items;\n }, []);\n };\n\n _chart.legendHighlight = function (d) {\n for (var j = 0; j < _children.length; ++j) {\n var child = _children[j];\n child.legendHighlight(d);\n }\n };\n\n _chart.legendReset = function (d) {\n for (var j = 0; j < _children.length; ++j) {\n var child = _children[j];\n child.legendReset(d);\n }\n };\n\n _chart.legendToggle = function () {\n console.log('composite should not be getting legendToggle itself');\n };\n\n /**\n * Set or get the right y axis used by the composite chart. This function is most useful when y\n * axis customization is required. The y axis in dc.js is an instance of a [d3 axis\n * object](https://github.com/mbostock/d3/wiki/SVG-Axes#wiki-_axis) therefore it supports any valid\n * d3 axis manipulation. **Caution**: The y axis is usually generated internally by dc;\n * resetting it may cause unexpected results.\n * @name rightYAxis\n * @memberof dc.compositeChart\n * @instance\n * @example\n * // customize y axis tick format\n * chart.rightYAxis().tickFormat(function (v) {return v + '%';});\n * // customize y axis tick values\n * chart.rightYAxis().tickValues([0, 100, 200, 300]);\n * @param {d3.svg.axis} [rightYAxis]\n * @return {Chart}\n */\n _chart.rightYAxis = function (rightYAxis) {\n if (!arguments.length) {\n return _rightYAxis;\n }\n _rightYAxis = rightYAxis;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * A series chart is a chart that shows multiple series of data overlaid on one chart, where the\n * series is specified in the data. It is a specialization of Composite Chart and inherits all\n * composite features other than recomposing the chart.\n * @name seriesChart\n * @memberof dc\n * @mixes dc.compositeChart\n * @example\n * // create a series chart under #chart-container1 element using the default global chart group\n * var seriesChart1 = dc.seriesChart(\"#chart-container1\");\n * // create a series chart under #chart-container2 element using chart group A\n * var seriesChart2 = dc.seriesChart(\"#chart-container2\", \"chartGroupA\");\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {SeriesChart}\n */\ndc.seriesChart = function (parent, chartGroup) {\n var _chart = dc.compositeChart(parent, chartGroup);\n\n function keySort (a, b) {\n return d3.ascending(_chart.keyAccessor()(a), _chart.keyAccessor()(b));\n }\n\n var _charts = {};\n var _chartFunction = dc.lineChart;\n var _seriesAccessor;\n var _seriesSort = d3.ascending;\n var _valueSort = keySort;\n\n _chart._mandatoryAttributes().push('seriesAccessor', 'chart');\n _chart.shareColors(true);\n\n _chart._preprocessData = function () {\n var keep = [];\n var childrenChanged;\n var nester = d3.nest().key(_seriesAccessor);\n if (_seriesSort) {\n nester.sortKeys(_seriesSort);\n }\n if (_valueSort) {\n nester.sortValues(_valueSort);\n }\n var nesting = nester.entries(_chart.data());\n var children =\n nesting.map(function (sub, i) {\n var subChart = _charts[sub.key] || _chartFunction.call(_chart, _chart, chartGroup, sub.key, i);\n if (!_charts[sub.key]) {\n childrenChanged = true;\n }\n _charts[sub.key] = subChart;\n keep.push(sub.key);\n return subChart\n .dimension(_chart.dimension())\n .group({all: d3.functor(sub.values)}, sub.key)\n .keyAccessor(_chart.keyAccessor())\n .valueAccessor(_chart.valueAccessor())\n .brushOn(_chart.brushOn());\n });\n // this works around the fact compositeChart doesn't really\n // have a removal interface\n Object.keys(_charts)\n .filter(function (c) {return keep.indexOf(c) === -1;})\n .forEach(function (c) {\n clearChart(c);\n childrenChanged = true;\n });\n _chart._compose(children);\n if (childrenChanged && _chart.legend()) {\n _chart.legend().render();\n }\n };\n\n function clearChart (c) {\n if (_charts[c].g()) {\n _charts[c].g().remove();\n }\n delete _charts[c];\n }\n\n function resetChildren () {\n Object.keys(_charts).map(clearChart);\n _charts = {};\n }\n\n /**\n * Get or set the chart function, which generates the child charts.\n * @name chart\n * @memberof dc.seriesChart\n * @instance\n * @example\n * // put interpolation on the line charts used for the series\n * chart.chart(function(c) { return dc.lineChart(c).interpolate('basis'); })\n * // do a scatter series chart\n * chart.chart(dc.scatterPlot)\n * @param {Function} [chartFunction=dc.lineChart]\n * @returns {Chart}\n */\n _chart.chart = function (chartFunction) {\n if (!arguments.length) {\n return _chartFunction;\n }\n _chartFunction = chartFunction;\n resetChildren();\n return _chart;\n };\n\n /**\n * Get or set accessor function for the displayed series. Given a datum, this function\n * should return the series that datum belongs to.\n * @name seriesAccessor\n * @memberof dc.seriesChart\n * @instance\n * @param {Function} [accessor]\n * @returns {Chart}\n */\n _chart.seriesAccessor = function (accessor) {\n if (!arguments.length) {\n return _seriesAccessor;\n }\n _seriesAccessor = accessor;\n resetChildren();\n return _chart;\n };\n\n /**\n * Get or set a function to sort the list of series by, given series values.\n * @name seriesSort\n * @memberof dc.seriesChart\n * @instance\n * @example\n * chart.seriesSort(d3.descending);\n * @param {Function} [sortFunction=d3.ascending]\n * @returns {Chart}\n */\n _chart.seriesSort = function (sortFunction) {\n if (!arguments.length) {\n return _seriesSort;\n }\n _seriesSort = sortFunction;\n resetChildren();\n return _chart;\n };\n\n /**\n * Get or set a function to sort each series values by. By default this is the key accessor which,\n * for example, will ensure a lineChart series connects its points in increasing key/x order,\n * rather than haphazardly.\n * @name valueSort\n * @memberof dc.seriesChart\n * @instance\n * @param {Function} [sortFunction]\n * @returns {Chart}\n */\n _chart.valueSort = function (sortFunction) {\n if (!arguments.length) {\n return _valueSort;\n }\n _valueSort = sortFunction;\n resetChildren();\n return _chart;\n };\n\n // make compose private\n _chart._compose = _chart.compose;\n delete _chart.compose;\n\n return _chart;\n};\n\n/**\n * The geo choropleth chart is designed as an easy way to create a crossfilter driven choropleth map\n * from GeoJson data. This chart implementation was inspired by [the great d3 choropleth example](http://bl.ocks.org/4060606).\n * Examples:\n * - [US Venture Capital Landscape 2011](http://dc-js.github.com/dc.js/vc/index.html)\n * @name geoChoroplethChart\n * @memberof dc\n * @mixes dc.colorMixin\n * @mixes dc.baseMixin\n * @example\n * // create a choropleth chart under '#us-chart' element using the default global chart group\n * var chart1 = dc.geoChoroplethChart('#us-chart');\n * // create a choropleth chart under '#us-chart2' element using chart group A\n * var chart2 = dc.compositeChart('#us-chart2', 'chartGroupA');\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {GeoChoroplethChart}\n */\ndc.geoChoroplethChart = function (parent, chartGroup) {\n var _chart = dc.colorMixin(dc.baseMixin({}));\n\n _chart.colorAccessor(function (d) {\n return d || 0;\n });\n\n var _geoPath = d3.geo.path();\n var _projectionFlag;\n\n var _geoJsons = [];\n\n _chart._doRender = function () {\n _chart.resetSvg();\n for (var layerIndex = 0; layerIndex < _geoJsons.length; ++layerIndex) {\n var states = _chart.svg().append('g')\n .attr('class', 'layer' + layerIndex);\n\n var regionG = states.selectAll('g.' + geoJson(layerIndex).name)\n .data(geoJson(layerIndex).data)\n .enter()\n .append('g')\n .attr('class', geoJson(layerIndex).name);\n\n regionG\n .append('path')\n .attr('fill', 'white')\n .attr('d', _geoPath);\n\n regionG.append('title');\n\n plotData(layerIndex);\n }\n _projectionFlag = false;\n };\n\n function plotData (layerIndex) {\n var data = generateLayeredData();\n\n if (isDataLayer(layerIndex)) {\n var regionG = renderRegionG(layerIndex);\n\n renderPaths(regionG, layerIndex, data);\n\n renderTitle(regionG, layerIndex, data);\n }\n }\n\n function generateLayeredData () {\n var data = {};\n var groupAll = _chart.data();\n for (var i = 0; i < groupAll.length; ++i) {\n data[_chart.keyAccessor()(groupAll[i])] = _chart.valueAccessor()(groupAll[i]);\n }\n return data;\n }\n\n function isDataLayer (layerIndex) {\n return geoJson(layerIndex).keyAccessor;\n }\n\n function renderRegionG (layerIndex) {\n var regionG = _chart.svg()\n .selectAll(layerSelector(layerIndex))\n .classed('selected', function (d) {\n return isSelected(layerIndex, d);\n })\n .classed('deselected', function (d) {\n return isDeselected(layerIndex, d);\n })\n .attr('class', function (d) {\n var layerNameClass = geoJson(layerIndex).name;\n var regionClass = dc.utils.nameToId(geoJson(layerIndex).keyAccessor(d));\n var baseClasses = layerNameClass + ' ' + regionClass;\n if (isSelected(layerIndex, d)) {\n baseClasses += ' selected';\n }\n if (isDeselected(layerIndex, d)) {\n baseClasses += ' deselected';\n }\n return baseClasses;\n });\n return regionG;\n }\n\n function layerSelector (layerIndex) {\n return 'g.layer' + layerIndex + ' g.' + geoJson(layerIndex).name;\n }\n\n function isSelected (layerIndex, d) {\n return _chart.hasFilter() && _chart.hasFilter(getKey(layerIndex, d));\n }\n\n function isDeselected (layerIndex, d) {\n return _chart.hasFilter() && !_chart.hasFilter(getKey(layerIndex, d));\n }\n\n function getKey (layerIndex, d) {\n return geoJson(layerIndex).keyAccessor(d);\n }\n\n function geoJson (index) {\n return _geoJsons[index];\n }\n\n function renderPaths (regionG, layerIndex, data) {\n var paths = regionG\n .select('path')\n .attr('fill', function () {\n var currentFill = d3.select(this).attr('fill');\n if (currentFill) {\n return currentFill;\n }\n return 'none';\n })\n .on('click', function (d) {\n return _chart.onClick(d, layerIndex);\n });\n\n dc.transition(paths, _chart.transitionDuration()).attr('fill', function (d, i) {\n return _chart.getColor(data[geoJson(layerIndex).keyAccessor(d)], i);\n });\n }\n\n _chart.onClick = function (d, layerIndex) {\n var selectedRegion = geoJson(layerIndex).keyAccessor(d);\n dc.events.trigger(function () {\n _chart.filter(selectedRegion);\n _chart.redrawGroup();\n });\n };\n\n function renderTitle (regionG, layerIndex, data) {\n if (_chart.renderTitle()) {\n regionG.selectAll('title').text(function (d) {\n var key = getKey(layerIndex, d);\n var value = data[key];\n return _chart.title()({key: key, value: value});\n });\n }\n }\n\n _chart._doRedraw = function () {\n for (var layerIndex = 0; layerIndex < _geoJsons.length; ++layerIndex) {\n plotData(layerIndex);\n if (_projectionFlag) {\n _chart.svg().selectAll('g.' + geoJson(layerIndex).name + ' path').attr('d', _geoPath);\n }\n }\n _projectionFlag = false;\n };\n\n /**\n * **mandatory**\n *\n * Use this function to insert a new GeoJson map layer. This function can be invoked multiple times\n * if you have multiple GeoJson data layers to render on top of each other. If you overlay multiple\n * layers with the same name the new overlay will override the existing one.\n * @name overlayGeoJson\n * @memberof dc.geoChoroplethChart\n * @instance\n * @example\n * // insert a layer for rendering US states\n * chart.overlayGeoJson(statesJson.features, 'state', function(d) {\n * return d.properties.name;\n * });\n * @param {Object} json - a geojson feed\n * @param {String} name - name of the layer\n * @param {Function} keyAccessor - accessor function used to extract 'key' from the GeoJson data. The key extracted by\n * this function should match the keys returned by the crossfilter groups.\n * @returns {Chart}\n */\n _chart.overlayGeoJson = function (json, name, keyAccessor) {\n for (var i = 0; i < _geoJsons.length; ++i) {\n if (_geoJsons[i].name === name) {\n _geoJsons[i].data = json;\n _geoJsons[i].keyAccessor = keyAccessor;\n return _chart;\n }\n }\n _geoJsons.push({name: name, data: json, keyAccessor: keyAccessor});\n return _chart;\n };\n\n /**\n * Set custom geo projection function. See the available [d3 geo projection\n * functions](https://github.com/mbostock/d3/wiki/Geo-Projections).\n * @name projection\n * @memberof dc.geoChoroplethChart\n * @instance\n * @param {d3.projection} [projection=d3.projection.albersUsa()]\n * @returns {Chart}\n */\n _chart.projection = function (projection) {\n _geoPath.projection(projection);\n _projectionFlag = true;\n return _chart;\n };\n\n /**\n * Returns all GeoJson layers currently registered with this chart. The returned array is a\n * reference to this chart's internal data structure, so any modification to this array will also\n * modify this chart's internal registration.\n * @name geoJsons\n * @memberof dc.geoChoroplethChart\n * @instance\n * @returns {Array<{name:String, data: Object, accessor: Function}>}\n */\n _chart.geoJsons = function () {\n return _geoJsons;\n };\n\n /**\n * Returns the [d3.geo.path](https://github.com/mbostock/d3/wiki/Geo-Paths#path) object used to\n * render the projection and features. Can be useful for figuring out the bounding box of the\n * feature set and thus a way to calculate scale and translation for the projection.\n * @name geoPath\n * @memberof dc.geoChoroplethChart\n * @instance\n * @returns {d3.geo.path}\n */\n _chart.geoPath = function () {\n return _geoPath;\n };\n\n /**\n * Remove a GeoJson layer from this chart by name\n * @name removeGeoJson\n * @memberof dc.geoChoroplethChart\n * @instance\n * @param {String} name\n * @returns {Chart}\n */\n _chart.removeGeoJson = function (name) {\n var geoJsons = [];\n\n for (var i = 0; i < _geoJsons.length; ++i) {\n var layer = _geoJsons[i];\n if (layer.name !== name) {\n geoJsons.push(layer);\n }\n }\n\n _geoJsons = geoJsons;\n\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * The bubble overlay chart is quite different from the typical bubble chart. With the bubble overlay\n * chart you can arbitrarily place bubbles on an existing svg or bitmap image, thus changing the\n * typical x and y positioning while retaining the capability to visualize data using bubble radius\n * and coloring.\n * Examples:\n * - [Canadian City Crime Stats](http://dc-js.github.com/dc.js/crime/index.html)\n * @name bubbleOverlay\n * @memberof dc\n * @mixes dc.bubbleMixin\n * @mixes dc.baseMixin\n * @example\n * // create a bubble overlay chart on top of the '#chart-container1 svg' element using the default global chart group\n * var bubbleChart1 = dc.bubbleOverlayChart('#chart-container1').svg(d3.select('#chart-container1 svg'));\n * // create a bubble overlay chart on top of the '#chart-container2 svg' element using chart group A\n * var bubbleChart2 = dc.compositeChart('#chart-container2', 'chartGroupA').svg(d3.select('#chart-container2 svg'));\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {BubbleOverlay}\n */\ndc.bubbleOverlay = function (parent, chartGroup) {\n var BUBBLE_OVERLAY_CLASS = 'bubble-overlay';\n var BUBBLE_NODE_CLASS = 'node';\n var BUBBLE_CLASS = 'bubble';\n\n /**\n * **mandatory**\n *\n * Set the underlying svg image element. Unlike other dc charts this chart will not generate a svg\n * element; therefore the bubble overlay chart will not work if this function is not invoked. If the\n * underlying image is a bitmap, then an empty svg will need to be created on top of the image.\n * @name svg\n * @memberof dc.bubbleOverlay\n * @instance\n * @example\n * // set up underlying svg element\n * chart.svg(d3.select('#chart svg'));\n * @param {Selection} [imageElement]\n * @returns {Chart}\n */\n var _chart = dc.bubbleMixin(dc.baseMixin({}));\n var _g;\n var _points = [];\n\n _chart.transitionDuration(750);\n\n _chart.radiusValueAccessor(function (d) {\n return d.value;\n });\n\n /**\n * **mandatory**\n *\n * Set up a data point on the overlay. The name of a data point should match a specific 'key' among\n * data groups generated using keyAccessor. If a match is found (point name <-> data group key)\n * then a bubble will be generated at the position specified by the function. x and y\n * value specified here are relative to the underlying svg.\n * @name point\n * @memberof dc.bubbleOverlay\n * @instance\n * @param {String} name\n * @param {Number} x\n * @param {Number} y\n * @returns {Chart}\n */\n _chart.point = function (name, x, y) {\n _points.push({name: name, x: x, y: y});\n return _chart;\n };\n\n _chart._doRender = function () {\n _g = initOverlayG();\n\n _chart.r().range([_chart.MIN_RADIUS, _chart.width() * _chart.maxBubbleRelativeSize()]);\n\n initializeBubbles();\n\n _chart.fadeDeselectedArea();\n\n return _chart;\n };\n\n function initOverlayG () {\n _g = _chart.select('g.' + BUBBLE_OVERLAY_CLASS);\n if (_g.empty()) {\n _g = _chart.svg().append('g').attr('class', BUBBLE_OVERLAY_CLASS);\n }\n return _g;\n }\n\n function initializeBubbles () {\n var data = mapData();\n\n _points.forEach(function (point) {\n var nodeG = getNodeG(point, data);\n\n var circle = nodeG.select('circle.' + BUBBLE_CLASS);\n\n if (circle.empty()) {\n circle = nodeG.append('circle')\n .attr('class', BUBBLE_CLASS)\n .attr('r', 0)\n .attr('fill', _chart.getColor)\n .on('click', _chart.onClick);\n }\n\n dc.transition(circle, _chart.transitionDuration())\n .attr('r', function (d) {\n return _chart.bubbleR(d);\n });\n\n _chart._doRenderLabel(nodeG);\n\n _chart._doRenderTitles(nodeG);\n });\n }\n\n function mapData () {\n var data = {};\n _chart.data().forEach(function (datum) {\n data[_chart.keyAccessor()(datum)] = datum;\n });\n return data;\n }\n\n function getNodeG (point, data) {\n var bubbleNodeClass = BUBBLE_NODE_CLASS + ' ' + dc.utils.nameToId(point.name);\n\n var nodeG = _g.select('g.' + dc.utils.nameToId(point.name));\n\n if (nodeG.empty()) {\n nodeG = _g.append('g')\n .attr('class', bubbleNodeClass)\n .attr('transform', 'translate(' + point.x + ',' + point.y + ')');\n }\n\n nodeG.datum(data[point.name]);\n\n return nodeG;\n }\n\n _chart._doRedraw = function () {\n updateBubbles();\n\n _chart.fadeDeselectedArea();\n\n return _chart;\n };\n\n function updateBubbles () {\n var data = mapData();\n\n _points.forEach(function (point) {\n var nodeG = getNodeG(point, data);\n\n var circle = nodeG.select('circle.' + BUBBLE_CLASS);\n\n dc.transition(circle, _chart.transitionDuration())\n .attr('r', function (d) {\n return _chart.bubbleR(d);\n })\n .attr('fill', _chart.getColor);\n\n _chart.doUpdateLabels(nodeG);\n\n _chart.doUpdateTitles(nodeG);\n });\n }\n\n _chart.debug = function (flag) {\n if (flag) {\n var debugG = _chart.select('g.' + dc.constants.DEBUG_GROUP_CLASS);\n\n if (debugG.empty()) {\n debugG = _chart.svg()\n .append('g')\n .attr('class', dc.constants.DEBUG_GROUP_CLASS);\n }\n\n var debugText = debugG.append('text')\n .attr('x', 10)\n .attr('y', 20);\n\n debugG\n .append('rect')\n .attr('width', _chart.width())\n .attr('height', _chart.height())\n .on('mousemove', function () {\n var position = d3.mouse(debugG.node());\n var msg = position[0] + ', ' + position[1];\n debugText.text(msg);\n });\n } else {\n _chart.selectAll('.debug').remove();\n }\n\n return _chart;\n };\n\n _chart.anchor(parent, chartGroup);\n\n return _chart;\n};\n\n/**\n * Concrete row chart implementation.\n * @name rowChart\n * @memberof dc\n * @mixes dc.capMixin\n * @mixes dc.marginMixin\n * @mixes dc.colorMixin\n * @mixes dc.baseMixin\n * @example\n * // create a row chart under #chart-container1 element using the default global chart group\n * var chart1 = dc.rowChart('#chart-container1');\n * // create a row chart under #chart-container2 element using chart group A\n * var chart2 = dc.rowChart('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {RowChart}\n */\ndc.rowChart = function (parent, chartGroup) {\n\n var _g;\n\n var _labelOffsetX = 10;\n var _labelOffsetY = 15;\n var _hasLabelOffsetY = false;\n var _dyOffset = '0.35em'; // this helps center labels https://github.com/mbostock/d3/wiki/SVG-Shapes#svg_text\n var _titleLabelOffsetX = 2;\n\n var _gap = 5;\n\n var _fixedBarHeight = false;\n var _rowCssClass = 'row';\n var _titleRowCssClass = 'titlerow';\n var _renderTitleLabel = false;\n\n var _chart = dc.capMixin(dc.marginMixin(dc.colorMixin(dc.baseMixin({}))));\n\n var _x;\n\n var _elasticX;\n\n var _xAxis = d3.svg.axis().orient('bottom');\n\n var _rowData;\n\n _chart.rowsCap = _chart.cap;\n\n function calculateAxisScale () {\n if (!_x || _elasticX) {\n var extent = d3.extent(_rowData, _chart.cappedValueAccessor);\n if (extent[0] > 0) {\n extent[0] = 0;\n }\n _x = d3.scale.linear().domain(extent)\n .range([0, _chart.effectiveWidth()]);\n }\n _xAxis.scale(_x);\n }\n\n function drawAxis () {\n var axisG = _g.select('g.axis');\n\n calculateAxisScale();\n\n if (axisG.empty()) {\n axisG = _g.append('g').attr('class', 'axis');\n }\n axisG.attr('transform', 'translate(0, ' + _chart.effectiveHeight() + ')');\n\n dc.transition(axisG, _chart.transitionDuration())\n .call(_xAxis);\n }\n\n _chart._doRender = function () {\n _chart.resetSvg();\n\n _g = _chart.svg()\n .append('g')\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')');\n\n drawChart();\n\n return _chart;\n };\n\n _chart.title(function (d) {\n return _chart.cappedKeyAccessor(d) + ': ' + _chart.cappedValueAccessor(d);\n });\n\n _chart.label(_chart.cappedKeyAccessor);\n\n /**\n * Gets or sets the x scale. The x scale can be any d3\n * [quantitive scale](https://github.com/mbostock/d3/wiki/Quantitative-Scales)\n * @name x\n * @memberof dc.rowChart\n * @instance\n * @param {d3.scale} [scale]\n * @returns {Chart}\n */\n _chart.x = function (scale) {\n if (!arguments.length) {\n return _x;\n }\n _x = scale;\n return _chart;\n };\n\n function drawGridLines () {\n _g.selectAll('g.tick')\n .select('line.grid-line')\n .remove();\n\n _g.selectAll('g.tick')\n .append('line')\n .attr('class', 'grid-line')\n .attr('x1', 0)\n .attr('y1', 0)\n .attr('x2', 0)\n .attr('y2', function () {\n return -_chart.effectiveHeight();\n });\n }\n\n function drawChart () {\n _rowData = _chart.data();\n\n drawAxis();\n drawGridLines();\n\n var rows = _g.selectAll('g.' + _rowCssClass)\n .data(_rowData);\n\n createElements(rows);\n removeElements(rows);\n updateElements(rows);\n }\n\n function createElements (rows) {\n var rowEnter = rows.enter()\n .append('g')\n .attr('class', function (d, i) {\n return _rowCssClass + ' _' + i;\n });\n\n rowEnter.append('rect').attr('width', 0);\n\n createLabels(rowEnter);\n updateLabels(rows);\n }\n\n function removeElements (rows) {\n rows.exit().remove();\n }\n\n function rootValue () {\n var root = _x(0);\n return (root === -Infinity || root !== root) ? _x(1) : root;\n }\n\n function updateElements (rows) {\n var n = _rowData.length;\n\n var height;\n if (!_fixedBarHeight) {\n height = (_chart.effectiveHeight() - (n + 1) * _gap) / n;\n } else {\n height = _fixedBarHeight;\n }\n\n // vertically align label in center unless they override the value via property setter\n if (!_hasLabelOffsetY) {\n _labelOffsetY = height / 2;\n }\n\n var rect = rows.attr('transform', function (d, i) {\n return 'translate(0,' + ((i + 1) * _gap + i * height) + ')';\n }).select('rect')\n .attr('height', height)\n .attr('fill', _chart.getColor)\n .on('click', onClick)\n .classed('deselected', function (d) {\n return (_chart.hasFilter()) ? !isSelectedRow(d) : false;\n })\n .classed('selected', function (d) {\n return (_chart.hasFilter()) ? isSelectedRow(d) : false;\n });\n\n dc.transition(rect, _chart.transitionDuration())\n .attr('width', function (d) {\n return Math.abs(rootValue() - _x(_chart.valueAccessor()(d)));\n })\n .attr('transform', translateX);\n\n createTitles(rows);\n updateLabels(rows);\n }\n\n function createTitles (rows) {\n if (_chart.renderTitle()) {\n rows.selectAll('title').remove();\n rows.append('title').text(_chart.title());\n }\n }\n\n function createLabels (rowEnter) {\n if (_chart.renderLabel()) {\n rowEnter.append('text')\n .on('click', onClick);\n }\n if (_chart.renderTitleLabel()) {\n rowEnter.append('text')\n .attr('class', _titleRowCssClass)\n .on('click', onClick);\n }\n }\n\n function updateLabels (rows) {\n if (_chart.renderLabel()) {\n var lab = rows.select('text')\n .attr('x', _labelOffsetX)\n .attr('y', _labelOffsetY)\n .attr('dy', _dyOffset)\n .on('click', onClick)\n .attr('class', function (d, i) {\n return _rowCssClass + ' _' + i;\n })\n .text(function (d) {\n return _chart.label()(d);\n });\n dc.transition(lab, _chart.transitionDuration())\n .attr('transform', translateX);\n }\n if (_chart.renderTitleLabel()) {\n var titlelab = rows.select('.' + _titleRowCssClass)\n .attr('x', _chart.effectiveWidth() - _titleLabelOffsetX)\n .attr('y', _labelOffsetY)\n .attr('text-anchor', 'end')\n .on('click', onClick)\n .attr('class', function (d, i) {\n return _titleRowCssClass + ' _' + i ;\n })\n .text(function (d) {\n return _chart.title()(d);\n });\n dc.transition(titlelab, _chart.transitionDuration())\n .attr('transform', translateX);\n }\n }\n\n /**\n * Turn on/off Title label rendering (values) using SVG style of text-anchor 'end'\n * @name renderTitleLabel\n * @memberof dc.rowChart\n * @instance\n * @param {Boolean} [renderTitleLabel=false]\n * @returns {Chart}\n */\n _chart.renderTitleLabel = function (renderTitleLabel) {\n if (!arguments.length) {\n return _renderTitleLabel;\n }\n _renderTitleLabel = renderTitleLabel;\n return _chart;\n };\n\n function onClick (d) {\n _chart.onClick(d);\n }\n\n function translateX (d) {\n var x = _x(_chart.cappedValueAccessor(d)),\n x0 = rootValue(),\n s = x > x0 ? x0 : x;\n return 'translate(' + s + ',0)';\n }\n\n _chart._doRedraw = function () {\n drawChart();\n return _chart;\n };\n\n /**\n * Get the x axis for the row chart instance. Note: not settable for row charts.\n * See the [d3 axis object](https://github.com/mbostock/d3/wiki/SVG-Axes#wiki-axis) documention for more information.\n * @name xAxis\n * @memberof dc.rowChart\n * @instance\n * @example\n * // customize x axis tick format\n * chart.xAxis().tickFormat(function (v) {return v + '%';});\n * // customize x axis tick values\n * chart.xAxis().tickValues([0, 100, 200, 300]);\n * @returns {d3.svg.Axis}\n */\n _chart.xAxis = function () {\n return _xAxis;\n };\n\n /**\n * Get or set the fixed bar height. Default is [false] which will auto-scale bars.\n * For example, if you want to fix the height for a specific number of bars (useful in TopN charts)\n * you could fix height as follows (where count = total number of bars in your TopN and gap is\n * your vertical gap space).\n * @name fixedBarHeight\n * @memberof dc.rowChart\n * @instance\n * @example\n * chart.fixedBarHeight( chartheight - (count + 1) * gap / count);\n * @param {Boolean|Number} [fixedBarHeight=false]\n * @returns {Chart}\n */\n _chart.fixedBarHeight = function (fixedBarHeight) {\n if (!arguments.length) {\n return _fixedBarHeight;\n }\n _fixedBarHeight = fixedBarHeight;\n return _chart;\n };\n\n /**\n * Get or set the vertical gap space between rows on a particular row chart instance\n * @name gap\n * @memberof dc.rowChart\n * @instance\n * @param {Number} [gap=5]\n * @returns {Chart}\n */\n _chart.gap = function (gap) {\n if (!arguments.length) {\n return _gap;\n }\n _gap = gap;\n return _chart;\n };\n\n /**\n * Get or set the elasticity on x axis. If this attribute is set to true, then the x axis will rescle to auto-fit the\n * data range when filtered.\n * @name elasticX\n * @memberof dc.rowChart\n * @instance\n * @param {Boolean} [elasticX]\n * @returns {Chart}\n */\n _chart.elasticX = function (elasticX) {\n if (!arguments.length) {\n return _elasticX;\n }\n _elasticX = elasticX;\n return _chart;\n };\n\n /**\n * Get or set the x offset (horizontal space to the top left corner of a row) for labels on a particular row chart.\n * @name labelOffsetX\n * @memberof dc.rowChart\n * @instance\n * @param {Number} [labelOffsetX=10]\n * @returns {Chart}\n */\n _chart.labelOffsetX = function (labelOffsetX) {\n if (!arguments.length) {\n return _labelOffsetX;\n }\n _labelOffsetX = labelOffsetX;\n return _chart;\n };\n\n /**\n * Get or set the y offset (vertical space to the top left corner of a row) for labels on a particular row chart.\n * @name labelOffsetY\n * @memberof dc.rowChart\n * @instance\n * @param {Number} [labelOffsety=15]\n * @returns {Chart}\n */\n _chart.labelOffsetY = function (labelOffsety) {\n if (!arguments.length) {\n return _labelOffsetY;\n }\n _labelOffsetY = labelOffsety;\n _hasLabelOffsetY = true;\n return _chart;\n };\n\n /**\n * Get of set the x offset (horizontal space between right edge of row and right edge or text.\n * @name titleLabelOffsetX\n * @memberof dc.rowChart\n * @instance\n * @param {Number} [titleLabelOffsetX=2]\n * @returns {Chart}\n */\n _chart.titleLabelOffsetX = function (titleLabelOffsetX) {\n if (!arguments.length) {\n return _titleLabelOffsetX;\n }\n _titleLabelOffsetX = titleLabelOffsetX;\n return _chart;\n };\n\n function isSelectedRow (d) {\n return _chart.hasFilter(_chart.cappedKeyAccessor(d));\n }\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * Legend is a attachable widget that can be added to other dc charts to render horizontal legend\n * labels.\n * Examples:\n * - [Nasdaq 100 Index](http://dc-js.github.com/dc.js/)\n * - [Canadian City Crime Stats](http://dc-js.github.com/dc.js/crime/index.html)\n * @name legend\n * @memberof dc\n * @example\n * chart.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5))\n * @returns {Legend}\n */\ndc.legend = function () {\n var LABEL_GAP = 2;\n\n var _legend = {},\n _parent,\n _x = 0,\n _y = 0,\n _itemHeight = 12,\n _gap = 5,\n _horizontal = false,\n _legendWidth = 560,\n _itemWidth = 70,\n _autoItemWidth = false;\n\n var _g;\n\n _legend.parent = function (p) {\n if (!arguments.length) {\n return _parent;\n }\n _parent = p;\n return _legend;\n };\n\n _legend.render = function () {\n _parent.svg().select('g.dc-legend').remove();\n _g = _parent.svg().append('g')\n .attr('class', 'dc-legend')\n .attr('transform', 'translate(' + _x + ',' + _y + ')');\n var legendables = _parent.legendables();\n\n var itemEnter = _g.selectAll('g.dc-legend-item')\n .data(legendables)\n .enter()\n .append('g')\n .attr('class', 'dc-legend-item')\n .on('mouseover', function (d) {\n _parent.legendHighlight(d);\n })\n .on('mouseout', function (d) {\n _parent.legendReset(d);\n })\n .on('click', function (d) {\n d.chart.legendToggle(d);\n });\n\n _g.selectAll('g.dc-legend-item')\n .classed('fadeout', function (d) {\n return d.chart.isLegendableHidden(d);\n });\n\n if (legendables.some(dc.pluck('dashstyle'))) {\n itemEnter\n .append('line')\n .attr('x1', 0)\n .attr('y1', _itemHeight / 2)\n .attr('x2', _itemHeight)\n .attr('y2', _itemHeight / 2)\n .attr('stroke-width', 2)\n .attr('stroke-dasharray', dc.pluck('dashstyle'))\n .attr('stroke', dc.pluck('color'));\n } else {\n itemEnter\n .append('rect')\n .attr('width', _itemHeight)\n .attr('height', _itemHeight)\n .attr('fill', function (d) {return d ? d.color : 'blue';});\n }\n\n itemEnter.append('text')\n .text(dc.pluck('name'))\n .attr('x', _itemHeight + LABEL_GAP)\n .attr('y', function () {\n return _itemHeight / 2 + (this.clientHeight ? this.clientHeight : 13) / 2 - 2;\n });\n\n var _cumulativeLegendTextWidth = 0;\n var row = 0;\n itemEnter.attr('transform', function (d, i) {\n if (_horizontal) {\n var translateBy = 'translate(' + _cumulativeLegendTextWidth + ',' + row * legendItemHeight() + ')';\n var itemWidth = _autoItemWidth === true ? this.getBBox().width + _gap : _itemWidth;\n\n if ((_cumulativeLegendTextWidth + itemWidth) >= _legendWidth) {\n ++row ;\n _cumulativeLegendTextWidth = 0 ;\n } else {\n _cumulativeLegendTextWidth += itemWidth;\n }\n return translateBy;\n } else {\n return 'translate(0,' + i * legendItemHeight() + ')';\n }\n });\n };\n\n function legendItemHeight () {\n return _gap + _itemHeight;\n }\n\n /**\n * Set or get x coordinate for legend widget.\n * @name x\n * @memberof dc.legend\n * @instance\n * @param {Number} [x=0]\n * @returns {Legend}\n */\n _legend.x = function (x) {\n if (!arguments.length) {\n return _x;\n }\n _x = x;\n return _legend;\n };\n\n /**\n * Set or get y coordinate for legend widget.\n * @name y\n * @memberof dc.legend\n * @instance\n * @param {Number} [y=0]\n * @returns {Legend}\n */\n _legend.y = function (y) {\n if (!arguments.length) {\n return _y;\n }\n _y = y;\n return _legend;\n };\n\n /**\n * Set or get gap between legend items.\n * @name gap\n * @memberof dc.legend\n * @instance\n * @param {Number} [gap=5]\n * @returns {Legend}\n */\n _legend.gap = function (gap) {\n if (!arguments.length) {\n return _gap;\n }\n _gap = gap;\n return _legend;\n };\n\n /**\n * Set or get legend item height.\n * @name itemHeight\n * @memberof dc.legend\n * @instance\n * @param {Number} [itemHeight=12]\n * @returns {Legend}\n */\n _legend.itemHeight = function (itemHeight) {\n if (!arguments.length) {\n return _itemHeight;\n }\n _itemHeight = itemHeight;\n return _legend;\n };\n\n /**\n * Position legend horizontally instead of vertically.\n * @name horizontal\n * @memberof dc.legend\n * @instance\n * @param {Boolean} [horizontal=false]\n * @returns {Legend}\n */\n _legend.horizontal = function (horizontal) {\n if (!arguments.length) {\n return _horizontal;\n }\n _horizontal = horizontal;\n return _legend;\n };\n\n /**\n * Maximum width for horizontal legend.\n * @name legendWidth\n * @memberof dc.legend\n * @instance\n * @param {Number} [legendWidth=500]\n * @returns {Legend}\n */\n _legend.legendWidth = function (legendWidth) {\n if (!arguments.length) {\n return _legendWidth;\n }\n _legendWidth = legendWidth;\n return _legend;\n };\n\n /**\n * legendItem width for horizontal legend.\n * @name itemWidth\n * @memberof dc.legend\n * @instance\n * @param {Number} [itemWidth=70]\n * @returns {Legend}\n */\n _legend.itemWidth = function (itemWidth) {\n if (!arguments.length) {\n return _itemWidth;\n }\n _itemWidth = itemWidth;\n return _legend;\n };\n\n /**\n * Turn automatic width for legend items on or off. If true, itemWidth() is ignored.\n * This setting takes into account gap().\n * @name autoItemWidth\n * @memberof dc.legend\n * @instance\n * @param {Boolean} [autoItemWidth=false]\n * @returns {Legend}\n */\n _legend.autoItemWidth = function (autoItemWidth) {\n if (!arguments.length) {\n return _autoItemWidth;\n }\n _autoItemWidth = autoItemWidth;\n return _legend;\n };\n\n return _legend;\n};\n\n/**\n * A scatter plot chart\n * @name scatterPlot\n * @memberof dc\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a scatter plot under #chart-container1 element using the default global chart group\n * var chart1 = dc.scatterPlot('#chart-container1');\n * // create a scatter plot under #chart-container2 element using chart group A\n * var chart2 = dc.scatterPlot('#chart-container2', 'chartGroupA');\n * // create a sub-chart under a composite parent chart\n * var chart3 = dc.scatterPlot(compositeChart);\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {SeriesChart}\n */\ndc.scatterPlot = function (parent, chartGroup) {\n var _chart = dc.coordinateGridMixin({});\n var _symbol = d3.svg.symbol();\n\n var _existenceAccessor = function (d) { return d.value; };\n\n var originalKeyAccessor = _chart.keyAccessor();\n _chart.keyAccessor(function (d) { return originalKeyAccessor(d)[0]; });\n _chart.valueAccessor(function (d) { return originalKeyAccessor(d)[1]; });\n _chart.colorAccessor(function () { return _chart._groupName; });\n\n var _locator = function (d) {\n return 'translate(' + _chart.x()(_chart.keyAccessor()(d)) + ',' +\n _chart.y()(_chart.valueAccessor()(d)) + ')';\n };\n\n var _symbolSize = 3;\n var _highlightedSize = 5;\n var _hiddenSize = 0;\n\n _symbol.size(function (d) {\n if (!_existenceAccessor(d)) {\n return _hiddenSize;\n } else if (this.filtered) {\n return Math.pow(_highlightedSize, 2);\n } else {\n return Math.pow(_symbolSize, 2);\n }\n });\n\n dc.override(_chart, '_filter', function (filter) {\n if (!arguments.length) {\n return _chart.__filter();\n }\n\n return _chart.__filter(dc.filters.RangedTwoDimensionalFilter(filter));\n });\n\n _chart.plotData = function () {\n var symbols = _chart.chartBodyG().selectAll('path.symbol')\n .data(_chart.data());\n\n symbols\n .enter()\n .append('path')\n .attr('class', 'symbol')\n .attr('opacity', 0)\n .attr('fill', _chart.getColor)\n .attr('transform', _locator);\n\n dc.transition(symbols, _chart.transitionDuration())\n .attr('opacity', function (d) { return _existenceAccessor(d) ? 1 : 0; })\n .attr('fill', _chart.getColor)\n .attr('transform', _locator)\n .attr('d', _symbol);\n\n dc.transition(symbols.exit(), _chart.transitionDuration())\n .attr('opacity', 0).remove();\n };\n\n /**\n * Get or set the existence accessor. If a point exists, it is drawn with symbolSize radius and\n * opacity 1; if it does not exist, it is drawn with hiddenSize radius and opacity 0. By default,\n * the existence accessor checks if the reduced value is truthy.\n * @name existenceAccessor\n * @memberof dc.scatterPlot\n * @instance\n * @param {Function} [accessor]\n * @returns {Chart}\n */\n _chart.existenceAccessor = function (accessor) {\n if (!arguments.length) {\n return _existenceAccessor;\n }\n _existenceAccessor = accessor;\n return this;\n };\n\n /**\n * Get or set the symbol type used for each point. By default the symbol is a circle. See the D3\n * [docs](https://github.com/mbostock/d3/wiki/SVG-Shapes#wiki-symbol_type) for acceptable types.\n * Type can be a constant or an accessor.\n * @name symbol\n * @memberof dc.scatterPlot\n * @instance\n * @param {Function} [type]\n * @returns {Chart}\n */\n _chart.symbol = function (type) {\n if (!arguments.length) {\n return _symbol.type();\n }\n _symbol.type(type);\n return _chart;\n };\n\n /**\n * Set or get radius for symbols.\n * @name symbolSize\n * @memberof dc.scatterPlot\n * @instance\n * @param {Number} [symbolSize=3]\n * @returns {Chart}\n */\n _chart.symbolSize = function (symbolSize) {\n if (!arguments.length) {\n return _symbolSize;\n }\n _symbolSize = symbolSize;\n return _chart;\n };\n\n /**\n * Set or get radius for highlighted symbols.\n * @name highlightedSize\n * @memberof dc.scatterPlot\n * @instance\n * @param {Number} [highlightedSize=5]\n * @returns {Chart}\n */\n _chart.highlightedSize = function (highlightedSize) {\n if (!arguments.length) {\n return _highlightedSize;\n }\n _highlightedSize = highlightedSize;\n return _chart;\n };\n\n /**\n * Set or get radius for symbols when the group is empty.\n * @name hiddenSize\n * @memberof dc.scatterPlot\n * @instance\n * @param {Number} [hiddenSize=0]\n * @returns {Chart}\n */\n _chart.hiddenSize = function (hiddenSize) {\n if (!arguments.length) {\n return _hiddenSize;\n }\n _hiddenSize = hiddenSize;\n return _chart;\n };\n\n _chart.legendables = function () {\n return [{chart: _chart, name: _chart._groupName, color: _chart.getColor()}];\n };\n\n _chart.legendHighlight = function (d) {\n resizeSymbolsWhere(function (symbol) {\n return symbol.attr('fill') === d.color;\n }, _highlightedSize);\n _chart.selectAll('.chart-body path.symbol').filter(function () {\n return d3.select(this).attr('fill') !== d.color;\n }).classed('fadeout', true);\n };\n\n _chart.legendReset = function (d) {\n resizeSymbolsWhere(function (symbol) {\n return symbol.attr('fill') === d.color;\n }, _symbolSize);\n _chart.selectAll('.chart-body path.symbol').filter(function () {\n return d3.select(this).attr('fill') !== d.color;\n }).classed('fadeout', false);\n };\n\n function resizeSymbolsWhere (condition, size) {\n var symbols = _chart.selectAll('.chart-body path.symbol').filter(function () {\n return condition(d3.select(this));\n });\n var oldSize = _symbol.size();\n _symbol.size(Math.pow(size, 2));\n dc.transition(symbols, _chart.transitionDuration()).attr('d', _symbol);\n _symbol.size(oldSize);\n }\n\n _chart.setHandlePaths = function () {\n // no handle paths for poly-brushes\n };\n\n _chart.extendBrush = function () {\n var extent = _chart.brush().extent();\n if (_chart.round()) {\n extent[0] = extent[0].map(_chart.round());\n extent[1] = extent[1].map(_chart.round());\n\n _chart.g().select('.brush')\n .call(_chart.brush().extent(extent));\n }\n return extent;\n };\n\n _chart.brushIsEmpty = function (extent) {\n return _chart.brush().empty() || !extent || extent[0][0] >= extent[1][0] || extent[0][1] >= extent[1][1];\n };\n\n function resizeFiltered (filter) {\n var symbols = _chart.selectAll('.chart-body path.symbol').each(function (d) {\n this.filtered = filter && filter.isFiltered(d.key);\n });\n\n dc.transition(symbols, _chart.transitionDuration()).attr('d', _symbol);\n }\n\n _chart._brushing = function () {\n var extent = _chart.extendBrush();\n\n _chart.redrawBrush(_chart.g());\n\n if (_chart.brushIsEmpty(extent)) {\n dc.events.trigger(function () {\n _chart.filter(null);\n _chart.redrawGroup();\n });\n\n resizeFiltered(false);\n\n } else {\n var ranged2DFilter = dc.filters.RangedTwoDimensionalFilter(extent);\n dc.events.trigger(function () {\n _chart.filter(null);\n _chart.filter(ranged2DFilter);\n _chart.redrawGroup();\n }, dc.constants.EVENT_DELAY);\n\n resizeFiltered(ranged2DFilter);\n }\n };\n\n _chart.setBrushY = function (gBrush) {\n gBrush.call(_chart.brush().y(_chart.y()));\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * A display of a single numeric value.\n * Unlike other charts, you do not need to set a dimension. Instead a group object must be provided and\n * a valueAccessor that returns a single value.\n * @name numberDisplay\n * @memberof dc\n * @mixes dc.baseMixin\n * @example\n * // create a number display under #chart-container1 element using the default global chart group\n * var display1 = dc.numberDisplay('#chart-container1');\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {NumberDisplay}\n */\ndc.numberDisplay = function (parent, chartGroup) {\n var SPAN_CLASS = 'number-display';\n var _formatNumber = d3.format('.2s');\n var _chart = dc.baseMixin({});\n var _html = {one: '', some: '', none: ''};\n\n // dimension not required\n _chart._mandatoryAttributes(['group']);\n\n /**\n * Gets or sets an optional object specifying HTML templates to use depending on the number\n * displayed. The text `%number` will be replaced with the current value.\n * - one: HTML template to use if the number is 1\n * - zero: HTML template to use if the number is 0\n * - some: HTML template to use otherwise\n * @name html\n * @memberof dc.numberDisplay\n * @instance\n * @example\n * numberWidget.html({\n * one:'%number record',\n * some:'%number records',\n * none:'no records'})\n * @param {{one:String, some:String, none:String}} [html={one: '', some: '', none: ''}]\n * @returns {Chart}\n */\n _chart.html = function (html) {\n if (!arguments.length) {\n return _html;\n }\n if (html.none) {\n _html.none = html.none;//if none available\n } else if (html.one) {\n _html.none = html.one;//if none not available use one\n } else if (html.some) {\n _html.none = html.some;//if none and one not available use some\n }\n if (html.one) {\n _html.one = html.one;//if one available\n } else if (html.some) {\n _html.one = html.some;//if one not available use some\n }\n if (html.some) {\n _html.some = html.some;//if some available\n } else if (html.one) {\n _html.some = html.one;//if some not available use one\n }\n return _chart;\n };\n\n /**\n * Calculate and return the underlying value of the display\n * @name value\n * @memberof dc.numberDisplay\n * @instance\n * @returns {Number}\n */\n _chart.value = function () {\n return _chart.data();\n };\n\n _chart.data(function (group) {\n var valObj = group.value ? group.value() : group.top(1)[0];\n return _chart.valueAccessor()(valObj);\n });\n\n _chart.transitionDuration(250); // good default\n\n _chart._doRender = function () {\n var newValue = _chart.value(),\n span = _chart.selectAll('.' + SPAN_CLASS);\n\n if (span.empty()) {\n span = span.data([0])\n .enter()\n .append('span')\n .attr('class', SPAN_CLASS);\n }\n\n span.transition()\n .duration(_chart.transitionDuration())\n .ease('quad-out-in')\n .tween('text', function () {\n var interp = d3.interpolateNumber(this.lastValue || 0, newValue);\n this.lastValue = newValue;\n return function (t) {\n var html = null, num = _chart.formatNumber()(interp(t));\n if (newValue === 0 && (_html.none !== '')) {\n html = _html.none;\n } else if (newValue === 1 && (_html.one !== '')) {\n html = _html.one;\n } else if (_html.some !== '') {\n html = _html.some;\n }\n this.innerHTML = html ? html.replace('%number', num) : num;\n };\n });\n };\n\n _chart._doRedraw = function () {\n return _chart._doRender();\n };\n\n /**\n * Get or set a function to format the value for the display.\n * @name formatNumber\n * @memberof dc.numberDisplay\n * @instance\n * @param {Function} [formatter=d3.format('.2s')]\n * @returns {Chart}\n */\n _chart.formatNumber = function (formatter) {\n if (!arguments.length) {\n return _formatNumber;\n }\n _formatNumber = formatter;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n/**\n * A heat map is matrix that represents the values of two dimensions of data using colors.\n * @name heatMap\n * @memberof dc\n * @mixes dc.colorMixin\n * @mixes dc.marginMixin\n * @mixes dc.baseMixin\n * @example\n * // create a heat map under #chart-container1 element using the default global chart group\n * var heatMap1 = dc.heatMap('#chart-container1');\n * // create a heat map under #chart-container2 element using chart group A\n * var heatMap2 = dc.heatMap('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {HeatMap}\n */\ndc.heatMap = function (parent, chartGroup) {\n\n var DEFAULT_BORDER_RADIUS = 6.75;\n\n var _chartBody;\n\n var _cols;\n var _rows;\n var _xBorderRadius = DEFAULT_BORDER_RADIUS;\n var _yBorderRadius = DEFAULT_BORDER_RADIUS;\n\n var _chart = dc.colorMixin(dc.marginMixin(dc.baseMixin({})));\n _chart._mandatoryAttributes(['group']);\n _chart.title(_chart.colorAccessor());\n\n var _colsLabel = function (d) {\n return d;\n };\n var _rowsLabel = function (d) {\n return d;\n };\n\n /**\n * Set or get the column label function. The chart class uses this function to render\n * column labels on the X axis. It is passed the column name.\n * @name colsLabel\n * @memberof dc.heatMap\n * @instance\n * @example\n * // the default label function just returns the name\n * chart.colsLabel(function(d) { return d; });\n * @param {Function} [labelFunction=function(d) { return d; }]\n * @returns {Chart}\n */\n _chart.colsLabel = function (labelFunction) {\n if (!arguments.length) {\n return _colsLabel;\n }\n _colsLabel = labelFunction;\n return _chart;\n };\n\n /**\n * Set or get the row label function. The chart class uses this function to render\n * row labels on the Y axis. It is passed the row name.\n * @name rowsLabel\n * @memberof dc.heatMap\n * @instance\n * @example\n * // the default label function just returns the name\n * chart.rowsLabel(function(d) { return d; });\n * @param {Function} [labelFunction=function(d) { return d; }]\n * @returns {Chart}\n */\n _chart.rowsLabel = function (labelFunction) {\n if (!arguments.length) {\n return _rowsLabel;\n }\n _rowsLabel = labelFunction;\n return _chart;\n };\n\n var _xAxisOnClick = function (d) { filterAxis(0, d); };\n var _yAxisOnClick = function (d) { filterAxis(1, d); };\n var _boxOnClick = function (d) {\n var filter = d.key;\n dc.events.trigger(function () {\n _chart.filter(filter);\n _chart.redrawGroup();\n });\n };\n\n function filterAxis (axis, value) {\n var cellsOnAxis = _chart.selectAll('.box-group').filter(function (d) {\n return d.key[axis] === value;\n });\n var unfilteredCellsOnAxis = cellsOnAxis.filter(function (d) {\n return !_chart.hasFilter(d.key);\n });\n dc.events.trigger(function () {\n if (unfilteredCellsOnAxis.empty()) {\n cellsOnAxis.each(function (d) {\n _chart.filter(d.key);\n });\n } else {\n unfilteredCellsOnAxis.each(function (d) {\n _chart.filter(d.key);\n });\n }\n _chart.redrawGroup();\n });\n }\n\n dc.override(_chart, 'filter', function (filter) {\n if (!arguments.length) {\n return _chart._filter();\n }\n\n return _chart._filter(dc.filters.TwoDimensionalFilter(filter));\n });\n\n function uniq (d, i, a) {\n return !i || a[i - 1] !== d;\n }\n\n /**\n * Gets or sets the values used to create the rows of the heatmap, as an array. By default, all\n * the values will be fetched from the data using the value accessor, and they will be sorted in\n * ascending order.\n * @name rows\n * @memberof dc.heatMap\n * @instance\n * @param {Array} [rows]\n * @returns {Chart}\n */\n _chart.rows = function (rows) {\n if (arguments.length) {\n _rows = rows;\n return _chart;\n }\n if (_rows) {\n return _rows;\n }\n var rowValues = _chart.data().map(_chart.valueAccessor());\n rowValues.sort(d3.ascending);\n return d3.scale.ordinal().domain(rowValues.filter(uniq));\n };\n\n /**\n * Gets or sets the keys used to create the columns of the heatmap, as an array. By default, all\n * the values will be fetched from the data using the key accessor, and they will be sorted in\n * ascending order.\n * @name cols\n * @memberof dc.heatMap\n * @instance\n * @param {Array} [cols]\n * @returns {Chart}\n */\n _chart.cols = function (cols) {\n if (arguments.length) {\n _cols = cols;\n return _chart;\n }\n if (_cols) {\n return _cols;\n }\n var colValues = _chart.data().map(_chart.keyAccessor());\n colValues.sort(d3.ascending);\n return d3.scale.ordinal().domain(colValues.filter(uniq));\n };\n\n _chart._doRender = function () {\n _chart.resetSvg();\n\n _chartBody = _chart.svg()\n .append('g')\n .attr('class', 'heatmap')\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')');\n\n return _chart._doRedraw();\n };\n\n _chart._doRedraw = function () {\n var rows = _chart.rows(),\n cols = _chart.cols(),\n rowCount = rows.domain().length,\n colCount = cols.domain().length,\n boxWidth = Math.floor(_chart.effectiveWidth() / colCount),\n boxHeight = Math.floor(_chart.effectiveHeight() / rowCount);\n\n cols.rangeRoundBands([0, _chart.effectiveWidth()]);\n rows.rangeRoundBands([_chart.effectiveHeight(), 0]);\n\n var boxes = _chartBody.selectAll('g.box-group').data(_chart.data(), function (d, i) {\n return _chart.keyAccessor()(d, i) + '\\0' + _chart.valueAccessor()(d, i);\n });\n var gEnter = boxes.enter().append('g')\n .attr('class', 'box-group');\n\n gEnter.append('rect')\n .attr('class', 'heat-box')\n .attr('fill', 'white')\n .on('click', _chart.boxOnClick());\n\n if (_chart.renderTitle()) {\n gEnter.append('title');\n boxes.selectAll('title').text(_chart.title());\n }\n\n dc.transition(boxes.selectAll('rect'), _chart.transitionDuration())\n .attr('x', function (d, i) { return cols(_chart.keyAccessor()(d, i)); })\n .attr('y', function (d, i) { return rows(_chart.valueAccessor()(d, i)); })\n .attr('rx', _xBorderRadius)\n .attr('ry', _yBorderRadius)\n .attr('fill', _chart.getColor)\n .attr('width', boxWidth)\n .attr('height', boxHeight);\n\n boxes.exit().remove();\n\n var gCols = _chartBody.selectAll('g.cols');\n if (gCols.empty()) {\n gCols = _chartBody.append('g').attr('class', 'cols axis');\n }\n var gColsText = gCols.selectAll('text').data(cols.domain());\n gColsText.enter().append('text')\n .attr('x', function (d) { return cols(d) + boxWidth / 2; })\n .style('text-anchor', 'middle')\n .attr('y', _chart.effectiveHeight())\n .attr('dy', 12)\n .on('click', _chart.xAxisOnClick())\n .text(_chart.colsLabel());\n dc.transition(gColsText, _chart.transitionDuration())\n .text(_chart.colsLabel())\n .attr('x', function (d) { return cols(d) + boxWidth / 2; })\n .attr('y', _chart.effectiveHeight());\n gColsText.exit().remove();\n var gRows = _chartBody.selectAll('g.rows');\n if (gRows.empty()) {\n gRows = _chartBody.append('g').attr('class', 'rows axis');\n }\n var gRowsText = gRows.selectAll('text').data(rows.domain());\n gRowsText.enter().append('text')\n .attr('dy', 6)\n .style('text-anchor', 'end')\n .attr('x', 0)\n .attr('dx', -2)\n .on('click', _chart.yAxisOnClick())\n .text(_chart.rowsLabel());\n dc.transition(gRowsText, _chart.transitionDuration())\n .text(_chart.rowsLabel())\n .attr('y', function (d) { return rows(d) + boxHeight / 2; });\n gRowsText.exit().remove();\n\n if (_chart.hasFilter()) {\n _chart.selectAll('g.box-group').each(function (d) {\n if (_chart.isSelectedNode(d)) {\n _chart.highlightSelected(this);\n } else {\n _chart.fadeDeselected(this);\n }\n });\n } else {\n _chart.selectAll('g.box-group').each(function () {\n _chart.resetHighlight(this);\n });\n }\n return _chart;\n };\n\n /**\n * Gets or sets the handler that fires when an individual cell is clicked in the heatmap.\n * By default, filtering of the cell will be toggled.\n * @name boxOnClick\n * @memberof dc.heatMap\n * @instance\n * @param {Function} [handler]\n * @returns {Chart}\n */\n _chart.boxOnClick = function (handler) {\n if (!arguments.length) {\n return _boxOnClick;\n }\n _boxOnClick = handler;\n return _chart;\n };\n\n /**\n * Gets or sets the handler that fires when a column tick is clicked in the x axis.\n * By default, if any cells in the column are unselected, the whole column will be selected,\n * otherwise the whole column will be unselected.\n * @name xAxisOnClick\n * @memberof dc.heatMap\n * @instance\n * @param {Function} [handler]\n * @returns {Chart}\n */\n _chart.xAxisOnClick = function (handler) {\n if (!arguments.length) {\n return _xAxisOnClick;\n }\n _xAxisOnClick = handler;\n return _chart;\n };\n\n /**\n * Gets or sets the handler that fires when a row tick is clicked in the y axis.\n * By default, if any cells in the row are unselected, the whole row will be selected,\n * otherwise the whole row will be unselected.\n * @name yAxisOnClick\n * @memberof dc.heatMap\n * @instance\n * @param {Function} [handler]\n * @returns {Chart}\n */\n _chart.yAxisOnClick = function (handler) {\n if (!arguments.length) {\n return _yAxisOnClick;\n }\n _yAxisOnClick = handler;\n return _chart;\n };\n\n /**\n * Gets or sets the X border radius. Set to 0 to get full rectangles.\n * @name xBorderRadius\n * @memberof dc.heatMap\n * @instance\n * @param {Number} [xBorderRadius=6.75]\n * @returns {Chart}\n */\n _chart.xBorderRadius = function (xBorderRadius) {\n if (!arguments.length) {\n return _xBorderRadius;\n }\n _xBorderRadius = xBorderRadius;\n return _chart;\n };\n\n /**\n * Gets or sets the Y border radius. Set to 0 to get full rectangles.\n * @name yBorderRadius\n * @memberof dc.heatMap\n * @instance\n * @param {Number} [yBorderRadius=6.75]\n * @returns {Chart}\n */\n _chart.yBorderRadius = function (yBorderRadius) {\n if (!arguments.length) {\n return _yBorderRadius;\n }\n _yBorderRadius = yBorderRadius;\n return _chart;\n };\n\n _chart.isSelectedNode = function (d) {\n return _chart.hasFilter(d.key);\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n// https://github.com/d3/d3-plugins/blob/master/box/box.js\n(function () {\n\n // Inspired by http://informationandvisualization.de/blog/box-plot\n d3.box = function () {\n var width = 1,\n height = 1,\n duration = 0,\n domain = null,\n value = Number,\n whiskers = boxWhiskers,\n quartiles = boxQuartiles,\n tickFormat = null;\n\n // For each small multiple…\n function box (g) {\n g.each(function (d, i) {\n d = d.map(value).sort(d3.ascending);\n var g = d3.select(this),\n n = d.length,\n min = d[0],\n max = d[n - 1];\n\n // Compute quartiles. Must return exactly 3 elements.\n var quartileData = d.quartiles = quartiles(d);\n\n // Compute whiskers. Must return exactly 2 elements, or null.\n var whiskerIndices = whiskers && whiskers.call(this, d, i),\n whiskerData = whiskerIndices && whiskerIndices.map(function (i) { return d[i]; });\n\n // Compute outliers. If no whiskers are specified, all data are 'outliers'.\n // We compute the outliers as indices, so that we can join across transitions!\n var outlierIndices = whiskerIndices ?\n d3.range(0, whiskerIndices[0]).concat(d3.range(whiskerIndices[1] + 1, n)) : d3.range(n);\n\n // Compute the new x-scale.\n var x1 = d3.scale.linear()\n .domain(domain && domain.call(this, d, i) || [min, max])\n .range([height, 0]);\n\n // Retrieve the old x-scale, if this is an update.\n var x0 = this.__chart__ || d3.scale.linear()\n .domain([0, Infinity])\n .range(x1.range());\n\n // Stash the new scale.\n this.__chart__ = x1;\n\n // Note: the box, median, and box tick elements are fixed in number,\n // so we only have to handle enter and update. In contrast, the outliers\n // and other elements are variable, so we need to exit them! Variable\n // elements also fade in and out.\n\n // Update center line: the vertical line spanning the whiskers.\n var center = g.selectAll('line.center')\n .data(whiskerData ? [whiskerData] : []);\n\n center.enter().insert('line', 'rect')\n .attr('class', 'center')\n .attr('x1', width / 2)\n .attr('y1', function (d) { return x0(d[0]); })\n .attr('x2', width / 2)\n .attr('y2', function (d) { return x0(d[1]); })\n .style('opacity', 1e-6)\n .transition()\n .duration(duration)\n .style('opacity', 1)\n .attr('y1', function (d) { return x1(d[0]); })\n .attr('y2', function (d) { return x1(d[1]); });\n\n center.transition()\n .duration(duration)\n .style('opacity', 1)\n .attr('y1', function (d) { return x1(d[0]); })\n .attr('y2', function (d) { return x1(d[1]); });\n\n center.exit().transition()\n .duration(duration)\n .style('opacity', 1e-6)\n .attr('y1', function (d) { return x1(d[0]); })\n .attr('y2', function (d) { return x1(d[1]); })\n .remove();\n\n // Update innerquartile box.\n var box = g.selectAll('rect.box')\n .data([quartileData]);\n\n box.enter().append('rect')\n .attr('class', 'box')\n .attr('x', 0)\n .attr('y', function (d) { return x0(d[2]); })\n .attr('width', width)\n .attr('height', function (d) { return x0(d[0]) - x0(d[2]); })\n .transition()\n .duration(duration)\n .attr('y', function (d) { return x1(d[2]); })\n .attr('height', function (d) { return x1(d[0]) - x1(d[2]); });\n\n box.transition()\n .duration(duration)\n .attr('y', function (d) { return x1(d[2]); })\n .attr('height', function (d) { return x1(d[0]) - x1(d[2]); });\n\n // Update median line.\n var medianLine = g.selectAll('line.median')\n .data([quartileData[1]]);\n\n medianLine.enter().append('line')\n .attr('class', 'median')\n .attr('x1', 0)\n .attr('y1', x0)\n .attr('x2', width)\n .attr('y2', x0)\n .transition()\n .duration(duration)\n .attr('y1', x1)\n .attr('y2', x1);\n\n medianLine.transition()\n .duration(duration)\n .attr('y1', x1)\n .attr('y2', x1);\n\n // Update whiskers.\n var whisker = g.selectAll('line.whisker')\n .data(whiskerData || []);\n\n whisker.enter().insert('line', 'circle, text')\n .attr('class', 'whisker')\n .attr('x1', 0)\n .attr('y1', x0)\n .attr('x2', width)\n .attr('y2', x0)\n .style('opacity', 1e-6)\n .transition()\n .duration(duration)\n .attr('y1', x1)\n .attr('y2', x1)\n .style('opacity', 1);\n\n whisker.transition()\n .duration(duration)\n .attr('y1', x1)\n .attr('y2', x1)\n .style('opacity', 1);\n\n whisker.exit().transition()\n .duration(duration)\n .attr('y1', x1)\n .attr('y2', x1)\n .style('opacity', 1e-6)\n .remove();\n\n // Update outliers.\n var outlier = g.selectAll('circle.outlier')\n .data(outlierIndices, Number);\n\n outlier.enter().insert('circle', 'text')\n .attr('class', 'outlier')\n .attr('r', 5)\n .attr('cx', width / 2)\n .attr('cy', function (i) { return x0(d[i]); })\n .style('opacity', 1e-6)\n .transition()\n .duration(duration)\n .attr('cy', function (i) { return x1(d[i]); })\n .style('opacity', 1);\n\n outlier.transition()\n .duration(duration)\n .attr('cy', function (i) { return x1(d[i]); })\n .style('opacity', 1);\n\n outlier.exit().transition()\n .duration(duration)\n .attr('cy', function (i) { return x1(d[i]); })\n .style('opacity', 1e-6)\n .remove();\n\n // Compute the tick format.\n var format = tickFormat || x1.tickFormat(8);\n\n // Update box ticks.\n var boxTick = g.selectAll('text.box')\n .data(quartileData);\n\n boxTick.enter().append('text')\n .attr('class', 'box')\n .attr('dy', '.3em')\n .attr('dx', function (d, i) { return i & 1 ? 6 : -6; })\n .attr('x', function (d, i) { return i & 1 ? width : 0; })\n .attr('y', x0)\n .attr('text-anchor', function (d, i) { return i & 1 ? 'start' : 'end'; })\n .text(format)\n .transition()\n .duration(duration)\n .attr('y', x1);\n\n boxTick.transition()\n .duration(duration)\n .text(format)\n .attr('y', x1);\n\n // Update whisker ticks. These are handled separately from the box\n // ticks because they may or may not exist, and we want don't want\n // to join box ticks pre-transition with whisker ticks post-.\n var whiskerTick = g.selectAll('text.whisker')\n .data(whiskerData || []);\n\n whiskerTick.enter().append('text')\n .attr('class', 'whisker')\n .attr('dy', '.3em')\n .attr('dx', 6)\n .attr('x', width)\n .attr('y', x0)\n .text(format)\n .style('opacity', 1e-6)\n .transition()\n .duration(duration)\n .attr('y', x1)\n .style('opacity', 1);\n\n whiskerTick.transition()\n .duration(duration)\n .text(format)\n .attr('y', x1)\n .style('opacity', 1);\n\n whiskerTick.exit().transition()\n .duration(duration)\n .attr('y', x1)\n .style('opacity', 1e-6)\n .remove();\n });\n d3.timer.flush();\n }\n\n box.width = function (x) {\n if (!arguments.length) {\n return width;\n }\n width = x;\n return box;\n };\n\n box.height = function (x) {\n if (!arguments.length) {\n return height;\n }\n height = x;\n return box;\n };\n\n box.tickFormat = function (x) {\n if (!arguments.length) {\n return tickFormat;\n }\n tickFormat = x;\n return box;\n };\n\n box.duration = function (x) {\n if (!arguments.length) {\n return duration;\n }\n duration = x;\n return box;\n };\n\n box.domain = function (x) {\n if (!arguments.length) {\n return domain;\n }\n domain = x === null ? x : d3.functor(x);\n return box;\n };\n\n box.value = function (x) {\n if (!arguments.length) {\n return value;\n }\n value = x;\n return box;\n };\n\n box.whiskers = function (x) {\n if (!arguments.length) {\n return whiskers;\n }\n whiskers = x;\n return box;\n };\n\n box.quartiles = function (x) {\n if (!arguments.length) {\n return quartiles;\n }\n quartiles = x;\n return box;\n };\n\n return box;\n };\n\n function boxWhiskers (d) {\n return [0, d.length - 1];\n }\n\n function boxQuartiles (d) {\n return [\n d3.quantile(d, 0.25),\n d3.quantile(d, 0.5),\n d3.quantile(d, 0.75)\n ];\n }\n\n})();\n\n/**\n * A box plot is a chart that depicts numerical data via their quartile ranges.\n * Examples:\n * - [Nasdaq 100 Index](http://dc-js.github.com/dc.js/)\n * - [Canadian City Crime Stats](http://dc-js.github.com/dc.js/crime/index.html)\n * @name boxPlot\n * @memberof dc\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a box plot under #chart-container1 element using the default global chart group\n * var boxPlot1 = dc.boxPlot('#chart-container1');\n * // create a box plot under #chart-container2 element using chart group A\n * var boxPlot2 = dc.boxPlot('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection. If the bar chart is a sub-chart\n * in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {BoxPlot}\n */\ndc.boxPlot = function (parent, chartGroup) {\n var _chart = dc.coordinateGridMixin({});\n\n // Returns a function to compute the interquartile range.\n function DEFAULT_WHISKERS_IQR (k) {\n return function (d) {\n var q1 = d.quartiles[0],\n q3 = d.quartiles[2],\n iqr = (q3 - q1) * k,\n i = -1,\n j = d.length;\n do { ++i; } while (d[i] < q1 - iqr);\n do { --j; } while (d[j] > q3 + iqr);\n return [i, j];\n };\n }\n\n var _whiskerIqrFactor = 1.5;\n var _whiskersIqr = DEFAULT_WHISKERS_IQR;\n var _whiskers = _whiskersIqr(_whiskerIqrFactor);\n\n var _box = d3.box();\n var _tickFormat = null;\n\n var _boxWidth = function (innerChartWidth, xUnits) {\n if (_chart.isOrdinal()) {\n return _chart.x().rangeBand();\n } else {\n return innerChartWidth / (1 + _chart.boxPadding()) / xUnits;\n }\n };\n\n // default padding to handle min/max whisker text\n _chart.yAxisPadding(12);\n\n // default to ordinal\n _chart.x(d3.scale.ordinal());\n _chart.xUnits(dc.units.ordinal);\n\n // valueAccessor should return an array of values that can be coerced into numbers\n // or if data is overloaded for a static array of arrays, it should be `Number`.\n // Empty arrays are not included.\n _chart.data(function (group) {\n return group.all().map(function (d) {\n d.map = function (accessor) { return accessor.call(d, d); };\n return d;\n }).filter(function (d) {\n var values = _chart.valueAccessor()(d);\n return values.length !== 0;\n });\n });\n\n /**\n * Get or set the spacing between boxes as a fraction of box size. Valid values are within 0-1.\n * See the [d3 docs](https://github.com/mbostock/d3/wiki/Ordinal-Scales#wiki-ordinal_rangeBands)\n * for a visual description of how the padding is applied.\n * @name boxPadding\n * @memberof dc.boxPlot\n * @instance\n * @param {Number} [padding=0.8]\n * @returns {Number}\n */\n _chart.boxPadding = _chart._rangeBandPadding;\n _chart.boxPadding(0.8);\n\n /**\n * Get or set the outer padding on an ordinal box chart. This setting has no effect on non-ordinal charts\n * or on charts with a custom `.boxWidth`. Will pad the width by `padding * barWidth` on each side of the chart.\n * @name outerPadding\n * @memberof dc.boxPlot\n * @instance\n * @param {Number} [padding=0.5]\n * @returns {Number}\n */\n _chart.outerPadding = _chart._outerRangeBandPadding;\n _chart.outerPadding(0.5);\n\n /**\n * Get or set the numerical width of the boxplot box. The width may also be a function taking as\n * parameters the chart width excluding the right and left margins, as well as the number of x\n * units.\n * @example\n * // Using numerical parameter\n * chart.boxWidth(10);\n * // Using function\n * chart.boxWidth((innerChartWidth, xUnits) { ... });\n * @name boxWidth\n * @memberof dc.boxPlot\n * @instance\n * @param {Number|Function} [boxWidth=0.5]\n * @returns {Number|Function}\n */\n _chart.boxWidth = function (boxWidth) {\n if (!arguments.length) {\n return _boxWidth;\n }\n _boxWidth = d3.functor(boxWidth);\n return _chart;\n };\n\n var boxTransform = function (d, i) {\n var xOffset = _chart.x()(_chart.keyAccessor()(d, i));\n return 'translate(' + xOffset + ', 0)';\n };\n\n _chart._preprocessData = function () {\n if (_chart.elasticX()) {\n _chart.x().domain([]);\n }\n };\n\n _chart.plotData = function () {\n var _calculatedBoxWidth = _boxWidth(_chart.effectiveWidth(), _chart.xUnitCount());\n\n _box.whiskers(_whiskers)\n .width(_calculatedBoxWidth)\n .height(_chart.effectiveHeight())\n .value(_chart.valueAccessor())\n .domain(_chart.y().domain())\n .duration(_chart.transitionDuration())\n .tickFormat(_tickFormat);\n\n var boxesG = _chart.chartBodyG().selectAll('g.box').data(_chart.data(), function (d) { return d.key; });\n\n renderBoxes(boxesG);\n updateBoxes(boxesG);\n removeBoxes(boxesG);\n\n _chart.fadeDeselectedArea();\n };\n\n function renderBoxes (boxesG) {\n var boxesGEnter = boxesG.enter().append('g');\n\n boxesGEnter\n .attr('class', 'box')\n .attr('transform', boxTransform)\n .call(_box)\n .on('click', function (d) {\n _chart.filter(d.key);\n _chart.redrawGroup();\n });\n }\n\n function updateBoxes (boxesG) {\n dc.transition(boxesG, _chart.transitionDuration())\n .attr('transform', boxTransform)\n .call(_box)\n .each(function () {\n d3.select(this).select('rect.box').attr('fill', _chart.getColor);\n });\n }\n\n function removeBoxes (boxesG) {\n boxesG.exit().remove().call(_box);\n }\n\n _chart.fadeDeselectedArea = function () {\n if (_chart.hasFilter()) {\n _chart.g().selectAll('g.box').each(function (d) {\n if (_chart.isSelectedNode(d)) {\n _chart.highlightSelected(this);\n } else {\n _chart.fadeDeselected(this);\n }\n });\n } else {\n _chart.g().selectAll('g.box').each(function () {\n _chart.resetHighlight(this);\n });\n }\n };\n\n _chart.isSelectedNode = function (d) {\n return _chart.hasFilter(d.key);\n };\n\n _chart.yAxisMin = function () {\n var min = d3.min(_chart.data(), function (e) {\n return d3.min(_chart.valueAccessor()(e));\n });\n return dc.utils.subtract(min, _chart.yAxisPadding());\n };\n\n _chart.yAxisMax = function () {\n var max = d3.max(_chart.data(), function (e) {\n return d3.max(_chart.valueAccessor()(e));\n });\n return dc.utils.add(max, _chart.yAxisPadding());\n };\n\n /**\n * Set the numerical format of the boxplot median, whiskers and quartile labels. Defaults to\n * integer formatting.\n * @example\n * // format ticks to 2 decimal places\n * chart.tickFormat(d3.format('.2f'));\n * @name tickFormat\n * @memberof dc.boxPlot\n * @instance\n * @param {Function} [tickFormat]\n * @returns {Number|Function}\n */\n _chart.tickFormat = function (tickFormat) {\n if (!arguments.length) {\n return _tickFormat;\n }\n _tickFormat = tickFormat;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n\n// Renamed functions\n\ndc.abstractBubbleChart = dc.bubbleMixin;\ndc.baseChart = dc.baseMixin;\ndc.capped = dc.capMixin;\ndc.colorChart = dc.colorMixin;\ndc.coordinateGridChart = dc.coordinateGridMixin;\ndc.marginable = dc.marginMixin;\ndc.stackableChart = dc.stackMixin;\n\n// Expose d3 and crossfilter, so that clients in browserify\n// case can obtain them if they need them.\ndc.d3 = d3;\ndc.crossfilter = crossfilter;\n\nreturn dc;}\n if(true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(49), __webpack_require__(86)], __WEBPACK_AMD_DEFINE_FACTORY__ = (_dc), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if(typeof module === \"object\" && module.exports) {\n var _d3 = require('d3');\n var _crossfilter = require('crossfilter');\n // When using npm + browserify, 'crossfilter' is a function,\n // since package.json specifies index.js as main function, and it\n // does special handling. When using bower + browserify,\n // there's no main in bower.json (in fact, there's no bower.json),\n // so we need to fix it.\n if (typeof _crossfilter !== \"function\") {\n _crossfilter = _crossfilter.crossfilter;\n }\n module.exports = _dc(_d3, _crossfilter);\n } else {\n this.dc = _dc(d3, crossfilter);\n }\n}\n)();\n\n//# sourceMappingURL=dc.js.map\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/dc/dc.js\n ** module id = 569\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/dc/dc.js?");
},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "2e90d5152ce92858b62ba053c7b9d2cb.woff";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Bold-webfont.woff\n ** module id = 629\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Bold-webfont.woff?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "6ad396399f4022ccd1616cf11d0985be.woff";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-ExtraBold-webfont.woff\n ** module id = 630\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-ExtraBold-webfont.woff?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "f42641eed834f7b97a9499362c6c8855.woff";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Italic-webfont.woff\n ** module id = 631\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Italic-webfont.woff?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "45b47f3e9c7d74b80f5c6e0a3c513b23.woff";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Light-webfont.woff\n ** module id = 632\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Light-webfont.woff?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "79515ad0788973c533405f7012dfeccd.woff";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Regular-webfont.woff\n ** module id = 633\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Regular-webfont.woff?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "697574b47bcfdd2c45e3e63c7380dd67.woff";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/OpenSans-Semibold-webfont.woff\n ** module id = 634\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/OpenSans-Semibold-webfont.woff?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "f7c2b4b747b1a225eb8dee034134a1b0.eot";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/fontawesome-webfont.eot\n ** module id = 635\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/fontawesome-webfont.eot?')},635,function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "2980083682e94d33a66eef2e7d612519.svg";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/fontawesome-webfont.svg?v=4.3.0\n ** module id = 637\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/fontawesome-webfont.svg?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "706450d7bba6374ca02fe167d86685cb.ttf";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/fontawesome-webfont.ttf?v=4.3.0\n ** module id = 638\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/fontawesome-webfont.ttf?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "97493d3f11c0a3bd5cbd959f5d19b699.woff2";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/fontawesome-webfont.woff2?v=4.3.0\n ** module id = 639\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/fontawesome-webfont.woff2?')},function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "d9ee23d59d0e0e727b51368b458a0bff.woff";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./public/fonts/fontawesome-webfont.woff?v=4.3.0\n ** module id = 640\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/fonts/fontawesome-webfont.woff?')},,,,,,function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(process) {'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _invariant = __webpack_require__(43);\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _Actions = __webpack_require__(391);\n\nvar _ExecutionEnvironment = __webpack_require__(398);\n\nvar _DOMUtils = __webpack_require__(389);\n\nvar _DOMStateStorage = __webpack_require__(1169);\n\nvar _createDOMHistory = __webpack_require__(1170);\n\nvar _createDOMHistory2 = _interopRequireDefault(_createDOMHistory);\n\nvar _parsePath = __webpack_require__(1175);\n\nvar _parsePath2 = _interopRequireDefault(_parsePath);\n\n/**\n * Creates and returns a history object that uses HTML5's history API\n * (pushState, replaceState, and the popstate event) to manage history.\n * This is the recommended method of managing history in browsers because\n * it provides the cleanest URLs.\n *\n * Note: In browsers that do not support the HTML5 history API full\n * page reloads will be used to preserve URLs.\n */\nfunction createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n historyState = historyState || window.history.state || {};\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n }\n\n var location = _parsePath2['default'](path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}\n\nexports['default'] = createBrowserHistory;\nmodule.exports = exports['default'];\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/history/lib/createBrowserHistory.js\n ** module id = 646\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/history/lib/createBrowserHistory.js?")},function(module,exports,__webpack_require__){eval("'use strict';\n\nexports.__esModule = true;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _deprecate = __webpack_require__(159);\n\nvar _deprecate2 = _interopRequireDefault(_deprecate);\n\nvar _useBeforeUnload = __webpack_require__(329);\n\nvar _useBeforeUnload2 = _interopRequireDefault(_useBeforeUnload);\n\nexports['default'] = _deprecate2['default'](_useBeforeUnload2['default'], 'enableBeforeUnload is deprecated, use useBeforeUnload instead');\nmodule.exports = exports['default'];\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/history/lib/enableBeforeUnload.js\n ** module id = 647\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/history/lib/enableBeforeUnload.js?")},function(module,exports,__webpack_require__){eval("'use strict';\n\nexports.__esModule = true;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _deprecate = __webpack_require__(159);\n\nvar _deprecate2 = _interopRequireDefault(_deprecate);\n\nvar _useQueries = __webpack_require__(390);\n\nvar _useQueries2 = _interopRequireDefault(_useQueries);\n\nexports['default'] = _deprecate2['default'](_useQueries2['default'], 'enableQueries is deprecated, use useQueries instead');\nmodule.exports = exports['default'];\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/history/lib/enableQueries.js\n ** module id = 648\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/history/lib/enableQueries.js?")},function(module,exports,__webpack_require__){eval("'use strict';\n\nexports.__esModule = true;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _deprecate = __webpack_require__(159);\n\nvar _deprecate2 = _interopRequireDefault(_deprecate);\n\nvar _createLocation2 = __webpack_require__(1172);\n\nvar _createLocation3 = _interopRequireDefault(_createLocation2);\n\nvar _createBrowserHistory = __webpack_require__(646);\n\nvar _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);\n\nexports.createHistory = _createBrowserHistory2['default'];\n\nvar _createHashHistory2 = __webpack_require__(1171);\n\nvar _createHashHistory3 = _interopRequireDefault(_createHashHistory2);\n\nexports.createHashHistory = _createHashHistory3['default'];\n\nvar _createMemoryHistory2 = __webpack_require__(1173);\n\nvar _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);\n\nexports.createMemoryHistory = _createMemoryHistory3['default'];\n\nvar _useBasename2 = __webpack_require__(1174);\n\nvar _useBasename3 = _interopRequireDefault(_useBasename2);\n\nexports.useBasename = _useBasename3['default'];\n\nvar _useBeforeUnload2 = __webpack_require__(329);\n\nvar _useBeforeUnload3 = _interopRequireDefault(_useBeforeUnload2);\n\nexports.useBeforeUnload = _useBeforeUnload3['default'];\n\nvar _useQueries2 = __webpack_require__(390);\n\nvar _useQueries3 = _interopRequireDefault(_useQueries2);\n\nexports.useQueries = _useQueries3['default'];\n\nvar _Actions2 = __webpack_require__(391);\n\nvar _Actions3 = _interopRequireDefault(_Actions2);\n\nexports.Actions = _Actions3['default'];\n\n// deprecated\n\nvar _enableBeforeUnload2 = __webpack_require__(647);\n\nvar _enableBeforeUnload3 = _interopRequireDefault(_enableBeforeUnload2);\n\nexports.enableBeforeUnload = _enableBeforeUnload3['default'];\n\nvar _enableQueries2 = __webpack_require__(648);\n\nvar _enableQueries3 = _interopRequireDefault(_enableQueries2);\n\nexports.enableQueries = _enableQueries3['default'];\nvar createLocation = _deprecate2['default'](_createLocation3['default'], 'Using createLocation without a history instance is deprecated; please use history.createLocation instead');\nexports.createLocation = createLocation;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/history/lib/index.js\n ** module id = 649\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/history/lib/index.js?")},,function(module,exports){eval("/**\n * Determine if an object is Buffer\n *\n * Author: Feross Aboukhadijeh \n * License: MIT\n *\n * `npm install is-buffer`\n */\n\nmodule.exports = function (obj) {\n return !!(obj != null &&\n (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)\n (obj.constructor &&\n typeof obj.constructor.isBuffer === 'function' &&\n obj.constructor.isBuffer(obj))\n ))\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/is-buffer/index.js\n ** module id = 651\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/is-buffer/index.js?")},,,,,function(module,exports,__webpack_require__){eval("// Load modules\n\nvar Utils = __webpack_require__(331);\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n depth: 5,\n arrayLimit: 20,\n parameterLimit: 1000,\n strictNullHandling: false,\n plainObjects: false,\n allowPrototypes: false,\n allowDots: false\n};\n\n\ninternals.parseValues = function (str, options) {\n\n var obj = {};\n var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);\n\n for (var i = 0, il = parts.length; i < il; ++i) {\n var part = parts[i];\n var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;\n\n if (pos === -1) {\n obj[Utils.decode(part)] = '';\n\n if (options.strictNullHandling) {\n obj[Utils.decode(part)] = null;\n }\n }\n else {\n var key = Utils.decode(part.slice(0, pos));\n var val = Utils.decode(part.slice(pos + 1));\n\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n }\n else {\n obj[key] = [].concat(obj[key]).concat(val);\n }\n }\n }\n\n return obj;\n};\n\n\ninternals.parseObject = function (chain, val, options) {\n\n if (!chain.length) {\n return val;\n }\n\n var root = chain.shift();\n\n var obj;\n if (root === '[]') {\n obj = [];\n obj = obj.concat(internals.parseObject(chain, val, options));\n }\n else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;\n var index = parseInt(cleanRoot, 10);\n var indexString = '' + index;\n if (!isNaN(index) &&\n root !== cleanRoot &&\n indexString === cleanRoot &&\n index >= 0 &&\n (options.parseArrays &&\n index <= options.arrayLimit)) {\n\n obj = [];\n obj[index] = internals.parseObject(chain, val, options);\n }\n else {\n obj[cleanRoot] = internals.parseObject(chain, val, options);\n }\n }\n\n return obj;\n};\n\n\ninternals.parseKeys = function (key, val, options) {\n\n if (!key) {\n return;\n }\n\n // Transform dot notation to bracket notation\n\n if (options.allowDots) {\n key = key.replace(/\\.([^\\.\\[]+)/g, '[$1]');\n }\n\n // The regex chunks\n\n var parent = /^([^\\[\\]]*)/;\n var child = /(\\[[^\\[\\]]*\\])/g;\n\n // Get the parent\n\n var segment = parent.exec(key);\n\n // Stash the parent if it exists\n\n var keys = [];\n if (segment[1]) {\n // If we aren't using plain objects, optionally prefix keys\n // that would overwrite object prototype properties\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1])) {\n\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(segment[1]);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while ((segment = child.exec(key)) !== null && i < options.depth) {\n\n ++i;\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1].replace(/\\[|\\]/g, ''))) {\n\n if (!options.allowPrototypes) {\n continue;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return internals.parseObject(keys, val, options);\n};\n\n\nmodule.exports = function (str, options) {\n\n options = options || {};\n options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;\n options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;\n options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;\n options.parseArrays = options.parseArrays !== false;\n options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;\n options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;\n options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;\n options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;\n options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\n if (str === '' ||\n str === null ||\n typeof str === 'undefined') {\n\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n var newObj = internals.parseKeys(key, tempObj[key], options);\n obj = Utils.merge(obj, newObj, options);\n }\n\n return Utils.compact(obj);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/qs/lib/parse.js\n ** module id = 656\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/qs/lib/parse.js?")},function(module,exports,__webpack_require__){eval("// Load modules\n\nvar Utils = __webpack_require__(331);\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n arrayPrefixGenerators: {\n brackets: function (prefix, key) {\n\n return prefix + '[]';\n },\n indices: function (prefix, key) {\n\n return prefix + '[' + key + ']';\n },\n repeat: function (prefix, key) {\n\n return prefix;\n }\n },\n strictNullHandling: false,\n skipNulls: false,\n encode: true\n};\n\n\ninternals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter) {\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n }\n else if (Utils.isBuffer(obj)) {\n obj = obj.toString();\n }\n else if (obj instanceof Date) {\n obj = obj.toISOString();\n }\n else if (obj === null) {\n if (strictNullHandling) {\n return encode ? Utils.encode(prefix) : prefix;\n }\n\n obj = '';\n }\n\n if (typeof obj === 'string' ||\n typeof obj === 'number' ||\n typeof obj === 'boolean') {\n\n if (encode) {\n return [Utils.encode(prefix) + '=' + Utils.encode(obj)];\n }\n return [prefix + '=' + obj];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys = Array.isArray(filter) ? filter : Object.keys(obj);\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n if (Array.isArray(obj)) {\n values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n else {\n values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n }\n\n return values;\n};\n\n\nmodule.exports = function (obj, options) {\n\n options = options || {};\n var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;\n var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;\n var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;\n var objKeys;\n var filter;\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n }\n else if (Array.isArray(options.filter)) {\n objKeys = filter = options.filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return '';\n }\n\n var arrayFormat;\n if (options.arrayFormat in internals.arrayPrefixGenerators) {\n arrayFormat = options.arrayFormat;\n }\n else if ('indices' in options) {\n arrayFormat = options.indices ? 'indices' : 'repeat';\n }\n else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n\n return keys.join(delimiter);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/qs/lib/stringify.js\n ** module id = 657\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/qs/lib/stringify.js?")},function(module,exports){eval('module.exports = "/*!\\n * Bootstrap v3.3.2 (http://getbootstrap.com)\\n * Copyright 2011-2015 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n */\\n\\n/*!\\n * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=8cbe4b24dc3441f9a6c1)\\n * Config saved to config.json and https://gist.github.com/8cbe4b24dc3441f9a6c1\\n */\\nif(\\"undefined\\"==typeof jQuery)throw new Error(\\"Bootstrap\'s JavaScript requires jQuery\\");+function(t){\\"use strict\\";var e=t.fn.jquery.split(\\" \\")[0].split(\\".\\");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error(\\"Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher\\")}(jQuery),+function(t){\\"use strict\\";function e(e){return this.each(function(){var i=t(this),s=i.data(\\"bs.alert\\");s||i.data(\\"bs.alert\\",s=new o(this)),\\"string\\"==typeof e&&s[e].call(i)})}var i=\'[data-dismiss=\\"alert\\"]\',o=function(e){t(e).on(\\"click\\",i,this.close)};o.VERSION=\\"3.3.2\\",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){a.detach().trigger(\\"closed.bs.alert\\").remove()}var s=t(this),n=s.attr(\\"data-target\\");n||(n=s.attr(\\"href\\"),n=n&&n.replace(/.*(?=#[^\\\\s]*$)/,\\"\\"));var a=t(n);e&&e.preventDefault(),a.length||(a=s.closest(\\".alert\\")),a.trigger(e=t.Event(\\"close.bs.alert\\")),e.isDefaultPrevented()||(a.removeClass(\\"in\\"),t.support.transition&&a.hasClass(\\"fade\\")?a.one(\\"bsTransitionEnd\\",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var s=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=s,this},t(document).on(\\"click.bs.alert.data-api\\",i,o.prototype.close)}(jQuery),+function(t){\\"use strict\\";function e(e){return this.each(function(){var o=t(this),s=o.data(\\"bs.button\\"),n=\\"object\\"==typeof e&&e;s||o.data(\\"bs.button\\",s=new i(this,n)),\\"toggle\\"==e?s.toggle():e&&s.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION=\\"3.3.2\\",i.DEFAULTS={loadingText:\\"loading...\\"},i.prototype.setState=function(e){var i=\\"disabled\\",o=this.$element,s=o.is(\\"input\\")?\\"val\\":\\"html\\",n=o.data();e+=\\"Text\\",null==n.resetText&&o.data(\\"resetText\\",o[s]()),setTimeout(t.proxy(function(){o[s](null==n[e]?this.options[e]:n[e]),\\"loadingText\\"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest(\'[data-toggle=\\"buttons\\"]\');if(e.length){var i=this.$element.find(\\"input\\");\\"radio\\"==i.prop(\\"type\\")&&(i.prop(\\"checked\\")&&this.$element.hasClass(\\"active\\")?t=!1:e.find(\\".active\\").removeClass(\\"active\\")),t&&i.prop(\\"checked\\",!this.$element.hasClass(\\"active\\")).trigger(\\"change\\")}else this.$element.attr(\\"aria-pressed\\",!this.$element.hasClass(\\"active\\"));t&&this.$element.toggleClass(\\"active\\")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on(\\"click.bs.button.data-api\\",\'[data-toggle^=\\"button\\"]\',function(i){var o=t(i.target);o.hasClass(\\"btn\\")||(o=o.closest(\\".btn\\")),e.call(o,\\"toggle\\"),i.preventDefault()}).on(\\"focus.bs.button.data-api blur.bs.button.data-api\\",\'[data-toggle^=\\"button\\"]\',function(e){t(e.target).closest(\\".btn\\").toggleClass(\\"focus\\",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){\\"use strict\\";function e(e){return this.each(function(){var o=t(this),s=o.data(\\"bs.carousel\\"),n=t.extend({},i.DEFAULTS,o.data(),\\"object\\"==typeof e&&e),a=\\"string\\"==typeof e?e:n.slide;s||o.data(\\"bs.carousel\\",s=new i(this,n)),\\"number\\"==typeof e?s.to(e):a?s[a]():n.interval&&s.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(\\".carousel-indicators\\"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on(\\"keydown.bs.carousel\\",t.proxy(this.keydown,this)),\\"hover\\"==this.options.pause&&!(\\"ontouchstart\\"in document.documentElement)&&this.$element.on(\\"mouseenter.bs.carousel\\",t.proxy(this.pause,this)).on(\\"mouseleave.bs.carousel\\",t.proxy(this.cycle,this))};i.VERSION=\\"3.3.2\\",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:\\"hover\\",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(\\".item\\"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),o=\\"prev\\"==t&&0===i||\\"next\\"==t&&i==this.$items.length-1;if(o&&!this.options.wrap)return e;var s=\\"prev\\"==t?-1:1,n=(i+s)%this.$items.length;return this.$items.eq(n)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(\\".item.active\\"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one(\\"slid.bs.carousel\\",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?\\"next\\":\\"prev\\",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(\\".next, .prev\\").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide(\\"next\\")},i.prototype.prev=function(){return this.sliding?void 0:this.slide(\\"prev\\")},i.prototype.slide=function(e,o){var s=this.$element.find(\\".item.active\\"),n=o||this.getItemForDirection(e,s),a=this.interval,r=\\"next\\"==e?\\"left\\":\\"right\\",l=this;if(n.hasClass(\\"active\\"))return this.sliding=!1;var h=n[0],d=t.Event(\\"slide.bs.carousel\\",{relatedTarget:h,direction:r});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(\\".active\\").removeClass(\\"active\\");var p=t(this.$indicators.children()[this.getItemIndex(n)]);p&&p.addClass(\\"active\\")}var c=t.Event(\\"slid.bs.carousel\\",{relatedTarget:h,direction:r});return t.support.transition&&this.$element.hasClass(\\"slide\\")?(n.addClass(e),n[0].offsetWidth,s.addClass(r),n.addClass(r),s.one(\\"bsTransitionEnd\\",function(){n.removeClass([e,r].join(\\" \\")).addClass(\\"active\\"),s.removeClass([\\"active\\",r].join(\\" \\")),l.sliding=!1,setTimeout(function(){l.$element.trigger(c)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(s.removeClass(\\"active\\"),n.addClass(\\"active\\"),this.sliding=!1,this.$element.trigger(c)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var s=function(i){var o,s=t(this),n=t(s.attr(\\"data-target\\")||(o=s.attr(\\"href\\"))&&o.replace(/.*(?=#[^\\\\s]+$)/,\\"\\"));if(n.hasClass(\\"carousel\\")){var a=t.extend({},n.data(),s.data()),r=s.attr(\\"data-slide-to\\");r&&(a.interval=!1),e.call(n,a),r&&n.data(\\"bs.carousel\\").to(r),i.preventDefault()}};t(document).on(\\"click.bs.carousel.data-api\\",\\"[data-slide]\\",s).on(\\"click.bs.carousel.data-api\\",\\"[data-slide-to]\\",s),t(window).on(\\"load\\",function(){t(\'[data-ride=\\"carousel\\"]\').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){\\"use strict\\";function e(e){e&&3===e.which||(t(s).remove(),t(n).each(function(){var o=t(this),s=i(o),n={relatedTarget:this};s.hasClass(\\"open\\")&&(s.trigger(e=t.Event(\\"hide.bs.dropdown\\",n)),e.isDefaultPrevented()||(o.attr(\\"aria-expanded\\",\\"false\\"),s.removeClass(\\"open\\").trigger(\\"hidden.bs.dropdown\\",n)))}))}function i(e){var i=e.attr(\\"data-target\\");i||(i=e.attr(\\"href\\"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\\\\s]*$)/,\\"\\"));var o=i&&t(i);return o&&o.length?o:e.parent()}function o(e){return this.each(function(){var i=t(this),o=i.data(\\"bs.dropdown\\");o||i.data(\\"bs.dropdown\\",o=new a(this)),\\"string\\"==typeof e&&o[e].call(i)})}var s=\\".dropdown-backdrop\\",n=\'[data-toggle=\\"dropdown\\"]\',a=function(e){t(e).on(\\"click.bs.dropdown\\",this.toggle)};a.VERSION=\\"3.3.2\\",a.prototype.toggle=function(o){var s=t(this);if(!s.is(\\".disabled, :disabled\\")){var n=i(s),a=n.hasClass(\\"open\\");if(e(),!a){\\"ontouchstart\\"in document.documentElement&&!n.closest(\\".navbar-nav\\").length&&t(\'\').insertAfter(t(this)).on(\\"click\\",e);var r={relatedTarget:this};if(n.trigger(o=t.Event(\\"show.bs.dropdown\\",r)),o.isDefaultPrevented())return;s.trigger(\\"focus\\").attr(\\"aria-expanded\\",\\"true\\"),n.toggleClass(\\"open\\").trigger(\\"shown.bs.dropdown\\",r)}return!1}},a.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var o=t(this);if(e.preventDefault(),e.stopPropagation(),!o.is(\\".disabled, :disabled\\")){var s=i(o),a=s.hasClass(\\"open\\");if(!a&&27!=e.which||a&&27==e.which)return 27==e.which&&s.find(n).trigger(\\"focus\\"),o.trigger(\\"click\\");var r=\\" li:not(.divider):visible a\\",l=s.find(\'[role=\\"menu\\"]\'+r+\', [role=\\"listbox\\"]\'+r);if(l.length){var h=l.index(e.target);38==e.which&&h>0&&h--,40==e.which&&h
\').prependTo(this.$element).on(\\"click.dismiss.bs.modal\\",t.proxy(function(t){t.target===t.currentTarget&&(\\"static\\"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),n&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass(\\"in\\"),!e)return;n?this.$backdrop.one(\\"bsTransitionEnd\\",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass(\\"in\\");var a=function(){o.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass(\\"fade\\")?this.$backdrop.one(\\"bsTransitionEnd\\",a).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},i.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},i.prototype.adjustBackdrop=function(){this.$backdrop.css(\\"height\\",0).css(\\"height\\",this.$element[0].scrollHeight)},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:\\"\\",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:\\"\\"})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:\\"\\",paddingRight:\\"\\"})},i.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css(\\"padding-right\\")||0,10);this.bodyIsOverflowing&&this.$body.css(\\"padding-right\\",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css(\\"padding-right\\",\\"\\")},i.prototype.measureScrollbar=function(){var t=document.createElement(\\"div\\");t.className=\\"modal-scrollbar-measure\\",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var o=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=o,this},t(document).on(\\"click.bs.modal.data-api\\",\'[data-toggle=\\"modal\\"]\',function(i){var o=t(this),s=o.attr(\\"href\\"),n=t(o.attr(\\"data-target\\")||s&&s.replace(/.*(?=#[^\\\\s]+$)/,\\"\\")),a=n.data(\\"bs.modal\\")?\\"toggle\\":t.extend({remote:!/#/.test(s)&&s},n.data(),o.data());o.is(\\"a\\")&&i.preventDefault(),n.one(\\"show.bs.modal\\",function(t){t.isDefaultPrevented()||n.one(\\"hidden.bs.modal\\",function(){o.is(\\":visible\\")&&o.trigger(\\"focus\\")})}),e.call(n,a,this)})}(jQuery),+function(t){\\"use strict\\";function e(e){return this.each(function(){var o=t(this),s=o.data(\\"bs.tooltip\\"),n=\\"object\\"==typeof e&&e;(s||\\"destroy\\"!=e)&&(s||o.data(\\"bs.tooltip\\",s=new i(this,n)),\\"string\\"==typeof e&&s[e]())})}var i=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init(\\"tooltip\\",t,e)};i.VERSION=\\"3.3.2\\",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:\\"top\\",selector:!1,template:\'
\',trigger:\\"hover focus\\",title:\\"\\",delay:0,html:!1,container:!1,viewport:{selector:\\"body\\",padding:0}},i.prototype.init=function(e,i,o){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var s=this.options.trigger.split(\\" \\"),n=s.length;n--;){var a=s[n];if(\\"click\\"==a)this.$element.on(\\"click.\\"+this.type,this.options.selector,t.proxy(this.toggle,this));else if(\\"manual\\"!=a){var r=\\"hover\\"==a?\\"mouseenter\\":\\"focusin\\",l=\\"hover\\"==a?\\"mouseleave\\":\\"focusout\\";this.$element.on(r+\\".\\"+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+\\".\\"+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:\\"manual\\",selector:\\"\\"}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&\\"number\\"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data(\\"bs.\\"+this.type);return i&&i.$tip&&i.$tip.is(\\":visible\\")?void(i.hoverState=\\"in\\"):(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data(\\"bs.\\"+this.type,i)),clearTimeout(i.timeout),i.hoverState=\\"in\\",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){\\"in\\"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data(\\"bs.\\"+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data(\\"bs.\\"+this.type,i)),clearTimeout(i.timeout),i.hoverState=\\"out\\",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){\\"out\\"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},i.prototype.show=function(){var e=t.Event(\\"show.bs.\\"+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var s=this,n=this.tip(),a=this.getUID(this.type);this.setContent(),n.attr(\\"id\\",a),this.$element.attr(\\"aria-describedby\\",a),this.options.animation&&n.addClass(\\"fade\\");var r=\\"function\\"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,l=/\\\\s?auto?\\\\s?/i,h=l.test(r);h&&(r=r.replace(l,\\"\\")||\\"top\\"),n.detach().css({top:0,left:0,display:\\"block\\"}).addClass(r).data(\\"bs.\\"+this.type,this),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var d=this.getPosition(),p=n[0].offsetWidth,c=n[0].offsetHeight;if(h){var f=r,u=this.options.container?t(this.options.container):this.$element.parent(),g=this.getPosition(u);r=\\"bottom\\"==r&&d.bottom+c>g.bottom?\\"top\\":\\"top\\"==r&&d.top-c
g.width?\\"left\\":\\"left\\"==r&&d.left-pa.top+a.height&&(s.top=a.top+a.height-l)}else{var h=e.left-n,d=e.left+n+i;ha.width&&(s.left=a.left+a.width-d)}return s},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr(\\"data-original-title\\")||(\\"function\\"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\\".tooltip-arrow\\")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data(\\"bs.\\"+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data(\\"bs.\\"+this.type,i))),i.tip().hasClass(\\"in\\")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off(\\".\\"+t.type).removeData(\\"bs.\\"+t.type)})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),+function(t){\\"use strict\\";function e(e){return this.each(function(){var o=t(this),s=o.data(\\"bs.popover\\"),n=\\"object\\"==typeof e&&e;(s||\\"destroy\\"!=e)&&(s||o.data(\\"bs.popover\\",s=new i(this,n)),\\"string\\"==typeof e&&s[e]())})}var i=function(t,e){this.init(\\"popover\\",t,e)};if(!t.fn.tooltip)throw new Error(\\"Popover requires tooltip.js\\");i.VERSION=\\"3.3.2\\",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:\\"right\\",trigger:\\"click\\",content:\\"\\",template:\'\'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(\\".popover-title\\")[this.options.html?\\"html\\":\\"text\\"](e),t.find(\\".popover-content\\").children().detach().end()[this.options.html?\\"string\\"==typeof i?\\"html\\":\\"append\\":\\"text\\"](i),t.removeClass(\\"fade top bottom left right in\\"),t.find(\\".popover-title\\").html()||t.find(\\".popover-title\\").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr(\\"data-content\\")||(\\"function\\"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\\".arrow\\")},i.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery),+function(t){\\"use strict\\";function e(e){return this.each(function(){var o=t(this),s=o.data(\\"bs.tab\\");s||o.data(\\"bs.tab\\",s=new i(this)),\\"string\\"==typeof e&&s[e]()})}var i=function(e){this.element=t(e)};i.VERSION=\\"3.3.2\\",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest(\\"ul:not(.dropdown-menu)\\"),o=e.data(\\"target\\");if(o||(o=e.attr(\\"href\\"),o=o&&o.replace(/.*(?=#[^\\\\s]*$)/,\\"\\")),!e.parent(\\"li\\").hasClass(\\"active\\")){var s=i.find(\\".active:last a\\"),n=t.Event(\\"hide.bs.tab\\",{relatedTarget:e[0]}),a=t.Event(\\"show.bs.tab\\",{relatedTarget:s[0]});if(s.trigger(n),e.trigger(a),!a.isDefaultPrevented()&&!n.isDefaultPrevented()){var r=t(o);this.activate(e.closest(\\"li\\"),i),this.activate(r,r.parent(),function(){s.trigger({type:\\"hidden.bs.tab\\",relatedTarget:e[0]}),e.trigger({type:\\"shown.bs.tab\\",relatedTarget:s[0]})})}}},i.prototype.activate=function(e,o,s){function n(){a.removeClass(\\"active\\").find(\\"> .dropdown-menu > .active\\").removeClass(\\"active\\").end().find(\'[data-toggle=\\"tab\\"]\').attr(\\"aria-expanded\\",!1),e.addClass(\\"active\\").find(\'[data-toggle=\\"tab\\"]\').attr(\\"aria-expanded\\",!0),r?(e[0].offsetWidth,e.addClass(\\"in\\")):e.removeClass(\\"fade\\"),e.parent(\\".dropdown-menu\\")&&e.closest(\\"li.dropdown\\").addClass(\\"active\\").end().find(\'[data-toggle=\\"tab\\"]\').attr(\\"aria-expanded\\",!0),s&&s()}var a=o.find(\\"> .active\\"),r=s&&t.support.transition&&(a.length&&a.hasClass(\\"fade\\")||!!o.find(\\"> .fade\\").length);a.length&&r?a.one(\\"bsTransitionEnd\\",n).emulateTransitionEnd(i.TRANSITION_DURATION):n(),a.removeClass(\\"in\\")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var s=function(i){i.preventDefault(),e.call(t(this),\\"show\\")};t(document).on(\\"click.bs.tab.data-api\\",\'[data-toggle=\\"tab\\"]\',s).on(\\"click.bs.tab.data-api\\",\'[data-toggle=\\"pill\\"]\',s)}(jQuery),+function(t){\\"use strict\\";function e(e){return this.each(function(){var o=t(this),s=o.data(\\"bs.affix\\"),n=\\"object\\"==typeof e&&e;s||o.data(\\"bs.affix\\",s=new i(this,n)),\\"string\\"==typeof e&&s[e]()})}var i=function(e,o){this.options=t.extend({},i.DEFAULTS,o),this.$target=t(this.options.target).on(\\"scroll.bs.affix.data-api\\",t.proxy(this.checkPosition,this)).on(\\"click.bs.affix.data-api\\",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};i.VERSION=\\"3.3.2\\",i.RESET=\\"affix affix-top affix-bottom\\",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,o){var s=this.$target.scrollTop(),n=this.$element.offset(),a=this.$target.height();if(null!=i&&\\"top\\"==this.affixed)return i>s?\\"top\\":!1;if(\\"bottom\\"==this.affixed)return null!=i?s+this.unpin<=n.top?!1:\\"bottom\\":t-o>=s+a?!1:\\"bottom\\";var r=null==this.affixed,l=r?s:n.top,h=r?a:e;return null!=i&&i>=s?\\"top\\":null!=o&&l+h>=t-o?\\"bottom\\":!1},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass(\\"affix\\");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(\\":visible\\")){var e=this.$element.height(),o=this.options.offset,s=o.top,n=o.bottom,a=t(\\"body\\").height();\\"object\\"!=typeof o&&(n=s=o),\\"function\\"==typeof s&&(s=o.top(this.$element)),\\"function\\"==typeof n&&(n=o.bottom(this.$element));var r=this.getState(a,e,s,n);if(this.affixed!=r){null!=this.unpin&&this.$element.css(\\"top\\",\\"\\");var l=\\"affix\\"+(r?\\"-\\"+r:\\"\\"),h=t.Event(l+\\".bs.affix\\");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=r,this.unpin=\\"bottom\\"==r?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace(\\"affix\\",\\"affixed\\")+\\".bs.affix\\")}\\"bottom\\"==r&&this.$element.offset({top:a-e-n})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on(\\"load\\",function(){t(\'[data-spy=\\"affix\\"]\').each(function(){var i=t(this),o=i.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(i,o)})})}(jQuery),+function(t){\\"use strict\\";function e(e){var i,o=e.attr(\\"data-target\\")||(i=e.attr(\\"href\\"))&&i.replace(/.*(?=#[^\\\\s]+$)/,\\"\\");return t(o)}function i(e){return this.each(function(){var i=t(this),s=i.data(\\"bs.collapse\\"),n=t.extend({},o.DEFAULTS,i.data(),\\"object\\"==typeof e&&e);!s&&n.toggle&&\\"show\\"==e&&(n.toggle=!1),s||i.data(\\"bs.collapse\\",s=new o(this,n)),\\"string\\"==typeof e&&s[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t(this.options.trigger).filter(\'[href=\\"#\'+e.id+\'\\"], [data-target=\\"#\'+e.id+\'\\"]\'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION=\\"3.3.2\\",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0,trigger:\'[data-toggle=\\"collapse\\"]\'},o.prototype.dimension=function(){var t=this.$element.hasClass(\\"width\\");return t?\\"width\\":\\"height\\"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass(\\"in\\")){var e,s=this.$parent&&this.$parent.children(\\".panel\\").children(\\".in, .collapsing\\");if(!(s&&s.length&&(e=s.data(\\"bs.collapse\\"),e&&e.transitioning))){var n=t.Event(\\"show.bs.collapse\\");if(this.$element.trigger(n),!n.isDefaultPrevented()){s&&s.length&&(i.call(s,\\"hide\\"),e||s.data(\\"bs.collapse\\",null));var a=this.dimension();this.$element.removeClass(\\"collapse\\").addClass(\\"collapsing\\")[a](0).attr(\\"aria-expanded\\",!0),this.$trigger.removeClass(\\"collapsed\\").attr(\\"aria-expanded\\",!0),this.transitioning=1;var r=function(){this.$element.removeClass(\\"collapsing\\").addClass(\\"collapse in\\")[a](\\"\\"),this.transitioning=0,this.$element.trigger(\\"shown.bs.collapse\\")};if(!t.support.transition)return r.call(this);var l=t.camelCase([\\"scroll\\",a].join(\\"-\\"));this.$element.one(\\"bsTransitionEnd\\",t.proxy(r,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass(\\"in\\")){var e=t.Event(\\"hide.bs.collapse\\");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass(\\"collapsing\\").removeClass(\\"collapse in\\").attr(\\"aria-expanded\\",!1),this.$trigger.addClass(\\"collapsed\\").attr(\\"aria-expanded\\",!1),this.transitioning=1;var s=function(){this.transitioning=0,this.$element.removeClass(\\"collapsing\\").addClass(\\"collapse\\").trigger(\\"hidden.bs.collapse\\")};return t.support.transition?void this.$element[i](0).one(\\"bsTransitionEnd\\",t.proxy(s,this)).emulateTransitionEnd(o.TRANSITION_DURATION):s.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass(\\"in\\")?\\"hide\\":\\"show\\"]()},o.prototype.getParent=function(){return t(this.options.parent).find(\'[data-toggle=\\"collapse\\"][data-parent=\\"\'+this.options.parent+\'\\"]\').each(t.proxy(function(i,o){var s=t(o);this.addAriaAndCollapsedClass(e(s),s)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass(\\"in\\");t.attr(\\"aria-expanded\\",i),e.toggleClass(\\"collapsed\\",!i).attr(\\"aria-expanded\\",i)};var s=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=s,this},t(document).on(\\"click.bs.collapse.data-api\\",\'[data-toggle=\\"collapse\\"]\',function(o){var s=t(this);s.attr(\\"data-target\\")||o.preventDefault();\\nvar n=e(s),a=n.data(\\"bs.collapse\\"),r=a?\\"toggle\\":t.extend({},s.data(),{trigger:this});i.call(n,r)})}(jQuery),+function(t){\\"use strict\\";function e(i,o){var s=t.proxy(this.process,this);this.$body=t(\\"body\\"),this.$scrollElement=t(t(i).is(\\"body\\")?window:i),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||\\"\\")+\\" .nav li > a\\",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on(\\"scroll.bs.scrollspy\\",s),this.refresh(),this.process()}function i(i){return this.each(function(){var o=t(this),s=o.data(\\"bs.scrollspy\\"),n=\\"object\\"==typeof i&&i;s||o.data(\\"bs.scrollspy\\",s=new e(this,n)),\\"string\\"==typeof i&&s[i]()})}e.VERSION=\\"3.3.2\\",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=\\"offset\\",i=0;t.isWindow(this.$scrollElement[0])||(e=\\"position\\",i=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var o=this;this.$body.find(this.selector).map(function(){var o=t(this),s=o.data(\\"target\\")||o.attr(\\"href\\"),n=/^#./.test(s)&&t(s);return n&&n.length&&n.is(\\":visible\\")&&[[n[e]().top+i,s]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){o.offsets.push(this[0]),o.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),s=this.offsets,n=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=o)return a!=(t=n[n.length-1])&&this.activate(t);if(a&&e=s[t]&&(!s[t+1]||e<=s[t+1])&&this.activate(n[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+\'[data-target=\\"\'+e+\'\\"],\'+this.selector+\'[href=\\"\'+e+\'\\"]\',o=t(i).parents(\\"li\\").addClass(\\"active\\");o.parent(\\".dropdown-menu\\").length&&(o=o.closest(\\"li.dropdown\\").addClass(\\"active\\")),o.trigger(\\"activate.bs.scrollspy\\")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,\\".active\\").removeClass(\\"active\\")};var o=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=o,this},t(window).on(\\"load.bs.scrollspy.data-api\\",function(){t(\'[data-spy=\\"scroll\\"]\').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),+function(t){\\"use strict\\";function e(){var t=document.createElement(\\"bootstrap\\"),e={WebkitTransition:\\"webkitTransitionEnd\\",MozTransition:\\"transitionend\\",OTransition:\\"oTransitionEnd otransitionend\\",transition:\\"transitionend\\"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one(\\"bsTransitionEnd\\",function(){i=!0});var s=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(s,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery);"\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/raw-loader!./public/javascripts/bootstrap.min.js\n ** module id = 658\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./public/javascripts/bootstrap.min.js?./~/raw-loader');
},,function(module,exports){eval('module.exports = "/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\\n!function(a,b){\\"object\\"==typeof module&&\\"object\\"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error(\\"jQuery requires a window with a document\\");return b(a)}:b(a)}(\\"undefined\\"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m=\\"2.1.1\\",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\\\s\\\\uFEFF\\\\xA0]+|[\\\\s\\\\uFEFF\\\\xA0]+$/g,p=/^-ms-/,q=/-([\\\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:\\"\\",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for(\\"boolean\\"==typeof g&&(j=g,g=arguments[h]||{},h++),\\"object\\"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:\\"jQuery\\"+(m+Math.random()).replace(/\\\\D/g,\\"\\"),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return\\"function\\"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return\\"object\\"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,\\"isPrototypeOf\\")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+\\"\\":\\"object\\"==typeof a||\\"function\\"==typeof a?h[i.call(a)]||\\"object\\":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf(\\"use strict\\")?(b=l.createElement(\\"script\\"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,\\"ms-\\").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?\\"\\":(a+\\"\\").replace(o,\\"\\")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,\\"string\\"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return\\"string\\"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each(\\"Boolean Number String Function Array Date RegExp Object Error\\".split(\\" \\"),function(a,b){h[\\"[object \\"+b+\\"]\\"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return\\"function\\"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:\\"array\\"===c||0===b||\\"number\\"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=\\"sizzle\\"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C=\\"undefined\\",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L=\\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\\",M=\\"[\\\\\\\\x20\\\\\\\\t\\\\\\\\r\\\\\\\\n\\\\\\\\f]\\",N=\\"(?:\\\\\\\\\\\\\\\\.|[\\\\\\\\w-]|[^\\\\\\\\x00-\\\\\\\\xa0])+\\",O=N.replace(\\"w\\",\\"w#\\"),P=\\"\\\\\\\\[\\"+M+\\"*(\\"+N+\\")(?:\\"+M+\\"*([*^$|!~]?=)\\"+M+\\"*(?:\'((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\\'])*)\'|\\\\\\"((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\\\\\\\"])*)\\\\\\"|(\\"+O+\\"))|)\\"+M+\\"*\\\\\\\\]\\",Q=\\":(\\"+N+\\")(?:\\\\\\\\(((\'((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\\'])*)\'|\\\\\\"((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\\\\\\\"])*)\\\\\\")|((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\()[\\\\\\\\]]|\\"+P+\\")*)|.*)\\\\\\\\)|)\\",R=new RegExp(\\"^\\"+M+\\"+|((?:^|[^\\\\\\\\\\\\\\\\])(?:\\\\\\\\\\\\\\\\.)*)\\"+M+\\"+$\\",\\"g\\"),S=new RegExp(\\"^\\"+M+\\"*,\\"+M+\\"*\\"),T=new RegExp(\\"^\\"+M+\\"*([>+~]|\\"+M+\\")\\"+M+\\"*\\"),U=new RegExp(\\"=\\"+M+\\"*([^\\\\\\\\]\'\\\\\\"]*?)\\"+M+\\"*\\\\\\\\]\\",\\"g\\"),V=new RegExp(Q),W=new RegExp(\\"^\\"+O+\\"$\\"),X={ID:new RegExp(\\"^#(\\"+N+\\")\\"),CLASS:new RegExp(\\"^\\\\\\\\.(\\"+N+\\")\\"),TAG:new RegExp(\\"^(\\"+N.replace(\\"w\\",\\"w*\\")+\\")\\"),ATTR:new RegExp(\\"^\\"+P),PSEUDO:new RegExp(\\"^\\"+Q),CHILD:new RegExp(\\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\\\\\(\\"+M+\\"*(even|odd|(([+-]|)(\\\\\\\\d*)n|)\\"+M+\\"*(?:([+-]|)\\"+M+\\"*(\\\\\\\\d+)|))\\"+M+\\"*\\\\\\\\)|)\\",\\"i\\"),bool:new RegExp(\\"^(?:\\"+L+\\")$\\",\\"i\\"),needsContext:new RegExp(\\"^\\"+M+\\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\\\\\(\\"+M+\\"*((?:-\\\\\\\\d)?\\\\\\\\d*)\\"+M+\\"*\\\\\\\\)|)(?=[^-]|$)\\",\\"i\\")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\\\d$/i,$=/^[^{]+\\\\{\\\\s*\\\\[native \\\\w/,_=/^(?:#([\\\\w-]+)|(\\\\w+)|\\\\.([\\\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\\\\\/g,cb=new RegExp(\\"\\\\\\\\\\\\\\\\([\\\\\\\\da-f]{1,6}\\"+M+\\"?|(\\"+M+\\")|.)\\",\\"ig\\"),db=function(a,b,c){var d=\\"0x\\"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||\\"string\\"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&\\"object\\"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute(\\"id\\"))?s=r.replace(bb,\\"\\\\\\\\$&\\"):b.setAttribute(\\"id\\",s),s=\\"[id=\'\\"+s+\\"\'] \\",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(\\",\\")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute(\\"id\\")}}}return i(a.replace(R,\\"$1\\"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+\\" \\")>d.cacheLength&&delete b[a.shift()],b[c+\\" \\"]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement(\\"div\\");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split(\\"|\\"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return\\"input\\"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return(\\"input\\"===c||\\"button\\"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?\\"HTML\\"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener(\\"unload\\",function(){m()},!1):g.attachEvent&&g.attachEvent(\\"onunload\\",function(){m()})),c.attributes=ib(function(a){return a.className=\\"i\\",!a.getAttribute(\\"className\\")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment(\\"\\")),!a.getElementsByTagName(\\"*\\").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML=\\"
\\",a.firstChild.className=\\"i\\",2===a.getElementsByClassName(\\"i\\").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute(\\"id\\")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode(\\"id\\");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(\\"*\\"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML=\\" \\",a.querySelectorAll(\\"[msallowclip^=\'\']\\").length&&q.push(\\"[*^$]=\\"+M+\\"*(?:\'\'|\\\\\\"\\\\\\")\\"),a.querySelectorAll(\\"[selected]\\").length||q.push(\\"\\\\\\\\[\\"+M+\\"*(?:value|\\"+L+\\")\\"),a.querySelectorAll(\\":checked\\").length||q.push(\\":checked\\")}),ib(function(a){var b=e.createElement(\\"input\\");b.setAttribute(\\"type\\",\\"hidden\\"),a.appendChild(b).setAttribute(\\"name\\",\\"D\\"),a.querySelectorAll(\\"[name=d]\\").length&&q.push(\\"name\\"+M+\\"*[*^$|!~]?=\\"),a.querySelectorAll(\\":enabled\\").length||q.push(\\":enabled\\",\\":disabled\\"),a.querySelectorAll(\\"*,:x\\"),q.push(\\",.*:\\")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,\\"div\\"),s.call(a,\\"[s!=\'\']:x\\"),r.push(\\"!=\\",Q)}),q=q.length&&new RegExp(q.join(\\"|\\")),r=r.length&&new RegExp(r.join(\\"|\\")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,\\"=\'$1\']\\"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error(\\"Syntax error, unrecognized expression: \\"+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c=\\"\\",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if(\\"string\\"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{\\">\\":{dir:\\"parentNode\\",first:!0},\\" \\":{dir:\\"parentNode\\"},\\"+\\":{dir:\\"previousSibling\\",first:!0},\\"~\\":{dir:\\"previousSibling\\"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||\\"\\").replace(cb,db),\\"~=\\"===a[2]&&(a[3]=\\" \\"+a[3]+\\" \\"),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),\\"nth\\"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*(\\"even\\"===a[3]||\\"odd\\"===a[3])),a[5]=+(a[7]+a[8]||\\"odd\\"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||\\"\\":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(\\")\\",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return\\"*\\"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+\\" \\"];return b||(b=new RegExp(\\"(^|\\"+M+\\")\\"+a+\\"(\\"+M+\\"|$)\\"))&&y(a,function(a){return b.test(\\"string\\"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute(\\"class\\")||\\"\\")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?\\"!=\\"===b:b?(e+=\\"\\",\\"=\\"===b?e===c:\\"!=\\"===b?e!==c:\\"^=\\"===b?c&&0===e.indexOf(c):\\"*=\\"===b?c&&e.indexOf(c)>-1:\\"$=\\"===b?c&&e.slice(-c.length)===c:\\"~=\\"===b?(\\" \\"+e+\\" \\").indexOf(c)>-1:\\"|=\\"===b?e===c||e.slice(0,c.length+1)===c+\\"-\\":!1):!0}},CHILD:function(a,b,c,d,e){var f=\\"nth\\"!==a.slice(0,3),g=\\"last\\"!==a.slice(-4),h=\\"of-type\\"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?\\"nextSibling\\":\\"previousSibling\\",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p=\\"only\\"===a&&!o&&\\"nextSibling\\"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error(\\"unsupported pseudo: \\"+a);return e[u]?e(b):e.length>1?(c=[a,a,\\"\\",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,\\"$1\\"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||\\"\\")||fb.error(\\"unsupported lang: \\"+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute(\\"xml:lang\\")||b.getAttribute(\\"lang\\"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+\\"-\\");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return\\"input\\"===b&&!!a.checked||\\"option\\"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return\\"input\\"===b&&\\"button\\"===a.type||\\"button\\"===b},text:function(a){var b;return\\"input\\"===a.nodeName.toLowerCase()&&\\"text\\"===a.type&&(null==(b=a.getAttribute(\\"type\\"))||\\"text\\"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&\\"parentNode\\"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||\\"*\\",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[\\" \\"],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:\\" \\"===a[i-2].type?\\"*\\":\\"\\"})).replace(R,\\"$1\\"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q=\\"0\\",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG(\\"*\\",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+\\" \\"];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n=\\"function\\"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&\\"ID\\"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split(\\"\\").sort(B).join(\\"\\")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement(\\"div\\"))}),ib(function(a){return a.innerHTML=\\" \\",\\"#\\"===a.firstChild.getAttribute(\\"href\\")})||jb(\\"type|href|height|width\\",function(a,b,c){return c?void 0:a.getAttribute(b,\\"type\\"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML=\\" \\",a.firstChild.setAttribute(\\"value\\",\\"\\"),\\"\\"===a.firstChild.getAttribute(\\"value\\")})||jb(\\"value\\",function(a,b,c){return c||\\"input\\"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute(\\"disabled\\")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[\\":\\"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\\\w+)\\\\s*\\\\/?>(?:<\\\\/\\\\1>|)$/,w=/^.[^:#\\\\[\\\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if(\\"string\\"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=\\":not(\\"+a+\\")\\"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if(\\"string\\"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+\\" \\"+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,\\"string\\"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\\\s*(<[\\\\w\\\\W]+>)[^>]*|#([\\\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if(\\"string\\"==typeof a){if(c=\\"<\\"===a[0]&&\\">\\"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?\\"undefined\\"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||\\"string\\"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?\\"string\\"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,\\"parentNode\\")},parentsUntil:function(a,b,c){return n.dir(a,\\"parentNode\\",c)},next:function(a){return D(a,\\"nextSibling\\")},prev:function(a){return D(a,\\"previousSibling\\")},nextAll:function(a){return n.dir(a,\\"nextSibling\\")},prevAll:function(a){return n.dir(a,\\"previousSibling\\")},nextUntil:function(a,b,c){return n.dir(a,\\"nextSibling\\",c)},prevUntil:function(a,b,c){return n.dir(a,\\"previousSibling\\",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return\\"Until\\"!==a.slice(-5)&&(d=c),d&&\\"string\\"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a=\\"string\\"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);\\"function\\"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&\\"string\\"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[[\\"resolve\\",\\"done\\",n.Callbacks(\\"once memory\\"),\\"resolved\\"],[\\"reject\\",\\"fail\\",n.Callbacks(\\"once memory\\"),\\"rejected\\"],[\\"notify\\",\\"progress\\",n.Callbacks(\\"memory\\")]],c=\\"pending\\",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+\\"With\\"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+\\"With\\"](this===e?d:this,arguments),this},e[f[0]+\\"With\\"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler(\\"ready\\"),n(l).off(\\"ready\\"))))}});function I(){l.removeEventListener(\\"DOMContentLoaded\\",I,!1),a.removeEventListener(\\"load\\",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),\\"complete\\"===l.readyState?setTimeout(n.ready):(l.addEventListener(\\"DOMContentLoaded\\",I,!1),a.addEventListener(\\"load\\",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if(\\"object\\"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if(\\"string\\"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&\\"string\\"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\\\{[\\\\w\\\\W]*\\\\}|\\\\[[\\\\w\\\\W]*\\\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d=\\"data-\\"+b.replace(O,\\"-$1\\").toLowerCase(),c=a.getAttribute(d),\\"string\\"==typeof c){try{c=\\"true\\"===c?!0:\\"false\\"===c?!1:\\"null\\"===c?null:+c+\\"\\"===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,\\"hasDataAttrs\\"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf(\\"data-\\")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,\\"hasDataAttrs\\",!0)}return e}return\\"object\\"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf(\\"-\\")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||\\"fx\\")+\\"queue\\",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||\\"fx\\";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};\\"inprogress\\"===e&&(e=c.shift(),d--),e&&(\\"fx\\"===b&&c.unshift(\\"inprogress\\"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+\\"queueHooks\\";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks(\\"once memory\\").add(function(){L.remove(a,[b+\\"queue\\",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return\\"string\\"!=typeof a&&(b=a,a=\\"fx\\",c--),arguments.lengthx\\",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U=\\"undefined\\";k.focusinBubbles=\\"onfocusin\\"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||\\"\\").match(E)||[\\"\\"],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||\\"\\").split(\\".\\").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(\\".\\")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||\\"\\").match(E)||[\\"\\"],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||\\"\\").split(\\".\\").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp(\\"(^|\\\\\\\\.)\\"+p.join(\\"\\\\\\\\.(?:.*\\\\\\\\.|)\\")+\\"(\\\\\\\\.|$)\\"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&(\\"**\\"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,\\"events\\"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,\\"type\\")?b.type:b,r=j.call(b,\\"namespace\\")?b.namespace.split(\\".\\"):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(\\".\\")>=0&&(r=q.split(\\".\\"),q=r.shift(),r.sort()),k=q.indexOf(\\":\\")<0&&\\"on\\"+q,b=b[n.expando]?b:new n.Event(q,\\"object\\"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join(\\".\\"),b.namespace_re=b.namespace?new RegExp(\\"(^|\\\\\\\\.)\\"+r.join(\\"\\\\\\\\.(?:.*\\\\\\\\.|)\\")+\\"(\\\\\\\\.|$)\\"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,\\"events\\")||{})[b.type]&&L.get(g,\\"handle\\"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,\\"events\\")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||\\"click\\"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||\\"click\\"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+\\" \\",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\\\\/>/gi,bb=/<([\\\\w:]+)/,cb=/<|?\\\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\\\s*(?:[^=]|=\\\\s*.checked.)/i,fb=/^$|\\\\/(?:java|ecma)script/i,gb=/^true\\\\/(.*)/,hb=/^\\\\s*\\\\s*$/g,ib={option:[1,\\"\\",\\" \\"],thead:[1,\\"\\"],col:[2,\\"\\"],tr:[2,\\"\\"],td:[3,\\"\\"],_default:[0,\\"\\",\\"\\"]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,\\"table\\")&&n.nodeName(11!==b.nodeType?b:b.firstChild,\\"tr\\")?a.getElementsByTagName(\\"tbody\\")[0]||a.appendChild(a.ownerDocument.createElement(\\"tbody\\")):a}function kb(a){return a.type=(null!==a.getAttribute(\\"type\\"))+\\"/\\"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute(\\"type\\"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],\\"globalEval\\",!b||L.get(b[c],\\"globalEval\\"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||\\"*\\"):a.querySelectorAll?a.querySelectorAll(b||\\"*\\"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();\\"input\\"===c&&T.test(a.type)?b.checked=a.checked:(\\"input\\"===c||\\"textarea\\"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,\\"script\\"),g.length>0&&mb(g,!i&&ob(a,\\"script\\")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if(\\"object\\"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement(\\"div\\")),g=(bb.exec(e)||[\\"\\",\\"\\"])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,\\"<$1>$2>\\")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=\\"\\"}else l.push(b.createTextNode(e));k.textContent=\\"\\",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),\\"script\\"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||\\"\\")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,\\"script\\")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent=\\"\\");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if(\\"string\\"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||[\\"\\",\\"\\"])[1].toLowerCase()]){a=a.replace(ab,\\"<$1>$2>\\");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&\\"string\\"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,\\"script\\"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,\\"script\\"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||\\"\\")&&!L.access(h,\\"globalEval\\")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,\\"\\")))}return this}}),n.each({appendTo:\\"append\\",prependTo:\\"prepend\\",insertBefore:\\"before\\",insertAfter:\\"after\\",replaceAll:\\"replaceWith\\"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],\\"display\\");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),\\"none\\"!==c&&c||(qb=(qb||n(\\"