All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.app.953c47d61addc4443908.js Maven / Gradle / Ivy

There is a newer version: 6.0.6
Show newest version
!function(e){function n(t){if(r[t])return r[t].exports;var i=r[t]={exports:{},id:t,loaded:!1};return e[t].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t=window.webpackJsonp;window.webpackJsonp=function(r,a){for(var o,s,l=0,c=[];l 1) {\n        query = query.substr(1, query.length - 1);\n        search = _qs2['default'].parse(query);\n      }\n    }\n\n    return search;\n  },\n  getParsedHash: function getParsedHash(location) {\n    var result = {};\n    var hash = location.hash;\n    if (hash) {\n      if (hash.indexOf('#') === 0 && hash.length > 1) {\n        hash = hash.substr(1, hash.length - 1);\n        result = _qs2['default'].parse(hash);\n      }\n    }\n    return result;\n  },\n  replaceHashParam: function replaceHashParam(name, newValue) {\n    var origHash = this.getParsedHash(window.location);\n    origHash[name] = newValue;\n    window.location.replace('#' + _qs2['default'].stringify(origHash));\n  },\n  concatURLPath: function concatURLPath() {\n    for (var _len = arguments.length, allArgs = Array(_len), _key = 0; _key < _len; _key++) {\n      allArgs[_key] = arguments[_key];\n    }\n\n    var args = Array(allArgs.length);\n    for (var i = 0; i < allArgs.length; i++) {\n      args[i] = allArgs[i];\n    }\n\n    var joinedPath = '/' + args.join('/');\n    return joinedPath.replace(/[\\/]+/g, '/');\n  }\n};\n\nexports['default'] = URLUtils;\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 \" + \"URLUtils.js\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/util/URLUtils.js\n ** module id = 9\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/util/URLUtils.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\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nexports['default'] = fetch;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _superagentBluebirdPromise = __webpack_require__(1155);\n\nvar _superagentBluebirdPromise2 = _interopRequireDefault(_superagentBluebirdPromise);\n\nvar _injectionStoreProvider = __webpack_require__(3);\n\nvar _injectionStoreProvider2 = _interopRequireDefault(_injectionStoreProvider);\n\nvar _injectionActionsProvider = __webpack_require__(6);\n\nvar _injectionActionsProvider2 = _interopRequireDefault(_injectionActionsProvider);\n\nvar _routingRoutes = __webpack_require__(13);\n\nvar _routingRoutes2 = _interopRequireDefault(_routingRoutes);\n\nvar _utilHistory = __webpack_require__(272);\n\nvar _utilHistory2 = _interopRequireDefault(_utilHistory);\n\nvar SessionActions = _injectionActionsProvider2['default'].getActions('Session');\nvar ServerAvailabilityActions = _injectionActionsProvider2['default'].getActions('ServerAvailability');\n\nvar FetchError = (function (_Error) {\n  _inherits(FetchError, _Error);\n\n  function FetchError(message, additional) {\n    _classCallCheck(this, FetchError);\n\n    _get(Object.getPrototypeOf(FetchError.prototype), 'constructor', this).call(this, message);\n    this.message = message || additional.message || 'Undefined error.';\n    /* eslint-disable no-console */\n    try {\n      console.error('There was an error fetching a resource: ' + this.message + '.', 'Additional information: ' + (additional.body && additional.body.message ? additional.body.message : 'Not available'));\n    } catch (e) {\n      console.error('There was an error fetching a resource: ' + this.message + '. No additional information available.');\n    }\n    /* eslint-enable no-console */\n\n    this.additional = additional;\n  }\n\n  return FetchError;\n})(Error);\n\nexports.FetchError = FetchError;\n\nvar Builder = (function () {\n  function Builder(method, url) {\n    _classCallCheck(this, Builder);\n\n    this.request = (0, _superagentBluebirdPromise2['default'])(method, url.replace(/([^:])\\/\\//, '$1/')).set('X-Requested-With', 'XMLHttpRequest');\n  }\n\n  _createClass(Builder, [{\n    key: 'authenticated',\n    value: function authenticated() {\n      var SessionStore = _injectionStoreProvider2['default'].getStore('Session');\n      var token = SessionStore.getSessionId();\n\n      return this.session(token);\n    }\n  }, {\n    key: 'session',\n    value: function session(sessionId) {\n      this.request = this.request.auth(sessionId, 'session');\n\n      return this;\n    }\n  }, {\n    key: 'setHeader',\n    value: function setHeader(header, value) {\n      this.request = this.request.set(header, value);\n\n      return this;\n    }\n  }, {\n    key: 'json',\n    value: function json(body) {\n      this.request = this.request.send(body).type('json').accept('json').then(function (resp) {\n        if (resp.ok) {\n          ServerAvailabilityActions.reportSuccess();\n          return resp.body;\n        }\n\n        throw new FetchError(resp.statusText, resp);\n      }, function (error) {\n        var SessionStore = _injectionStoreProvider2['default'].getStore('Session');\n        if (SessionStore.isLoggedIn() && error.status === 401) {\n          SessionActions.logout(SessionStore.getSessionId());\n        }\n\n        // Redirect to the start page if a user is logged in but not allowed to access a certain HTTP API.\n        if (SessionStore.isLoggedIn() && error.status === 403) {\n          _utilHistory2['default'].replaceState(null, _routingRoutes2['default'].STARTPAGE);\n        }\n\n        if (error.originalError && !error.originalError.status) {\n          ServerAvailabilityActions.reportError(error);\n        }\n\n        throw new FetchError(error.statusText, error);\n      });\n\n      return this;\n    }\n  }, {\n    key: 'build',\n    value: function build() {\n      return this.request;\n    }\n  }]);\n\n  return Builder;\n})();\n\nexports.Builder = Builder;\n\nfunction fetch(method, url, body) {\n  var promise = function promise() {\n    return new Builder(method, url).authenticated().json(body).build();\n  };\n\n  var SessionStore = _injectionStoreProvider2['default'].getStore('Session');\n\n  if (!SessionStore.isLoggedIn()) {\n    return new Promise(function (resolve, reject) {\n      SessionActions.login.completed.listen(function () {\n        promise().then(resolve, reject);\n      });\n    });\n  }\n  return promise();\n}\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 \" + \"FetchProvider.js\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/logic/rest/FetchProvider.js\n ** module id = 10\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/logic/rest/FetchProvider.js?");
},function(module,exports){eval('module.exports = __vendor;\n\n/*****************\n ** WEBPACK FOOTER\n ** external "__vendor"\n ** module id = 11\n ** module chunks = 0 1\n **/\n//# sourceURL=webpack:///external_%22__vendor%22?')},,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 Routes = {\n  STARTPAGE: '/',\n  SEARCH: '/search',\n  STREAMS: '/streams',\n  SOURCES: '/sources',\n  DASHBOARDS: '/dashboards',\n  GETTING_STARTED: '/gettingstarted',\n  SYSTEM: {\n    CONFIGURATIONS: '/system/configurations',\n    CONTENTPACKS: {\n      LIST: '/system/contentpacks',\n      EXPORT: '/system/contentpacks/export'\n    },\n    GROKPATTERNS: '/system/grokpatterns',\n    INDICES: {\n      LIST: '/system/indices',\n      FAILURES: '/system/indices/failures'\n    },\n    INPUTS: '/system/inputs',\n    LOGGING: '/system/logging',\n    METRICS: function METRICS(nodeId) {\n      return '/system/metrics/node/' + nodeId;\n    },\n    NODES: {\n      LIST: '/system/nodes',\n      SHOW: function SHOW(nodeId) {\n        return '/system/nodes/' + nodeId;\n      }\n    },\n    THREADDUMP: function THREADDUMP(nodeId) {\n      return '/system/threaddump/' + nodeId;\n    },\n    OUTPUTS: '/system/outputs',\n    OVERVIEW: '/system/overview',\n    ROLES: '/system/roles',\n    USERS: {\n      CREATE: '/system/users/new',\n      edit: function edit(username) {\n        return '/system/users/edit/' + username;\n      },\n      LIST: '/system/users'\n    },\n    LDAP: {\n      SETTINGS: '/system/ldap',\n      GROUPS: '/system/ldap/groups'\n    }\n  },\n  message_show: function message_show(index, messageId) {\n    return '/messages/' + index + '/' + messageId;\n  },\n  stream_edit: function stream_edit(streamId) {\n    return '/streams/' + streamId + '/edit';\n  },\n  stream_edit_example: function stream_edit_example(streamId, index, messageId) {\n    return Routes.stream_edit(streamId) + '?index=' + index + '&message_id=' + messageId;\n  },\n  stream_outputs: function stream_outputs(streamId) {\n    return '/streams/' + streamId + '/outputs';\n  },\n  stream_alerts: function stream_alerts(streamId) {\n    return '/streams/' + streamId + '/alerts';\n  },\n  stream_search: function stream_search(streamId) {\n    return '/streams/' + streamId + '/search';\n  },\n  legacy_stream_search: function legacy_stream_search(streamId) {\n    return '/streams/' + streamId + '/messages';\n  },\n\n  dashboard_show: function dashboard_show(dashboardId) {\n    return '/dashboards/' + dashboardId;\n  },\n\n  node: function node(nodeId) {\n    return '/system/nodes/' + nodeId;\n  },\n\n  node_inputs: function node_inputs(nodeId) {\n    return Routes.SYSTEM.INPUTS + '/' + nodeId;\n  },\n  global_input_extractors: function global_input_extractors(inputId) {\n    return '/system/inputs/' + inputId + '/extractors';\n  },\n  local_input_extractors: function local_input_extractors(nodeId, inputId) {\n    return '/system/inputs/' + nodeId + '/' + inputId + '/extractors';\n  },\n  export_extractors: function export_extractors(nodeId, inputId) {\n    return Routes.local_input_extractors(nodeId, inputId) + '/export';\n  },\n  import_extractors: function import_extractors(nodeId, inputId) {\n    return Routes.local_input_extractors(nodeId, inputId) + '/import';\n  },\n  new_extractor: function new_extractor(nodeId, inputId) {\n    return '/system/inputs/' + nodeId + '/' + inputId + '/extractors/new';\n  },\n  edit_extractor: function edit_extractor(nodeId, inputId, extractorId) {\n    return '/system/inputs/' + nodeId + '/' + inputId + '/extractors/' + extractorId + '/edit';\n  },\n\n  edit_input_extractor: function edit_input_extractor(nodeId, inputId, extractorId) {\n    return '/system/inputs/' + nodeId + '/' + inputId + '/extractors/' + extractorId + '/edit';\n  },\n  getting_started: function getting_started(fromMenu) {\n    return Routes.GETTING_STARTED + '?menu=' + fromMenu;\n  },\n  filtered_metrics: function filtered_metrics(nodeId, filter) {\n    return Routes.SYSTEM.METRICS(nodeId) + '?filter=' + filter;\n  }\n};\n\nexports['default'] = Routes;\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 \" + \"Routes.jsx\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/routing/Routes.jsx\n ** module id = 13\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/routing/Routes.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\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _qs = __webpack_require__(76);\n\nvar _qs2 = _interopRequireDefault(_qs);\n\nvar ApiRoutes = {\n  AlarmCallbacksApiController: {\n    available: function available(streamId) {\n      return { url: '/streams/' + streamId + '/alarmcallbacks/available' };\n    },\n    create: function create(streamId) {\n      return { url: '/streams/' + streamId + '/alarmcallbacks' };\n    },\n    'delete': function _delete(streamId, alarmCallbackId) {\n      return { url: '/streams/' + streamId + '/alarmcallbacks/' + alarmCallbackId };\n    },\n    list: function list(streamId) {\n      return { url: '/streams/' + streamId + '/alarmcallbacks' };\n    },\n    update: function update(streamId, alarmCallbackId) {\n      return { url: '/streams/' + streamId + '/alarmcallbacks/' + alarmCallbackId };\n    }\n  },\n  AlarmCallbackHistoryApiController: {\n    list: function list(streamId, alertId) {\n      return { url: '/streams/' + streamId + '/alerts/' + alertId + '/history' };\n    }\n  },\n  AlertsApiController: {\n    list: function list(streamId, since) {\n      return { url: '/streams/' + streamId + '/alerts/?since=' + since };\n    },\n    listPaginated: function listPaginated(streamId, skip, limit) {\n      return { url: '/streams/' + streamId + '/alerts/paginated?skip=' + skip + '&limit=' + limit };\n    },\n    listAllStreams: function listAllStreams(since) {\n      return { url: '/streams/alerts/?since=' + since };\n    }\n  },\n  BundlesApiController: {\n    apply: function apply(bundleId) {\n      return { url: '/system/bundles/' + bundleId + '/apply' };\n    },\n    create: function create() {\n      return { url: '/system/bundles' };\n    },\n    'delete': function _delete(bundleId) {\n      return { url: '/system/bundles/' + bundleId };\n    },\n    'export': function _export() {\n      return { url: '/system/bundles/export' };\n    },\n    list: function list() {\n      return { url: '/system/bundles' };\n    }\n  },\n  CountsApiController: {\n    total: function total() {\n      return { url: '/count/total' };\n    }\n  },\n  ClusterApiResource: {\n    node: function node() {\n      return { url: '/system/cluster/node' };\n    }\n  },\n  DashboardsApiController: {\n    create: function create() {\n      return { url: '/dashboards' };\n    },\n    index: function index() {\n      return { url: '/dashboards' };\n    },\n    get: function get(id) {\n      return { url: '/dashboards/' + id };\n    },\n    'delete': function _delete(id) {\n      return { url: '/dashboards/' + id };\n    },\n    update: function update(id) {\n      return { url: '/dashboards/' + id };\n    },\n    addWidget: function addWidget(id) {\n      return { url: '/dashboards/' + id + '/widgets' };\n    },\n    removeWidget: function removeWidget(dashboardId, widgetId) {\n      return { url: '/dashboards/' + dashboardId + '/widgets/' + widgetId };\n    },\n    widget: function widget(dashboardId, widgetId) {\n      return { url: '/dashboards/' + dashboardId + '/widgets/' + widgetId };\n    },\n    updateWidget: function updateWidget(dashboardId, widgetId) {\n      return { url: '/dashboards/' + dashboardId + '/widgets/' + widgetId };\n    },\n    widgetValue: function widgetValue(dashboardId, widgetId) {\n      return { url: '/dashboards/' + dashboardId + '/widgets/' + widgetId + '/value' };\n    },\n    updatePositions: function updatePositions(dashboardId) {\n      return { url: '/dashboards/' + dashboardId + '/positions' };\n    }\n  },\n  DeflectorApiController: {\n    cycle: function cycle() {\n      return { url: '/system/deflector/cycle' };\n    },\n    list: function list() {\n      return { url: '/system/deflector' };\n    }\n  },\n  IndexerClusterApiController: {\n    health: function health() {\n      return { url: '/system/indexer/cluster/health' };\n    },\n    name: function name() {\n      return { url: '/system/indexer/cluster/name' };\n    }\n  },\n  IndexerFailuresApiController: {\n    count: function count(since) {\n      return { url: '/system/indexer/failures/count?since=' + since };\n    },\n    list: function list(limit, offset) {\n      return { url: '/system/indexer/failures?limit=' + limit + '&offset=' + offset };\n    }\n  },\n  IndexerOverviewApiResource: {\n    list: function list() {\n      return { url: '/system/indexer/overview' };\n    }\n  },\n  IndexRangesApiController: {\n    list: function list() {\n      return { url: '/system/indices/ranges' };\n    },\n    rebuild: function rebuild() {\n      return { url: '/system/indices/ranges/rebuild' };\n    },\n    rebuildSingle: function rebuildSingle(index) {\n      return { url: '/system/indices/ranges/' + index + '/rebuild' };\n    }\n  },\n  IndicesApiController: {\n    close: function close(indexName) {\n      return { url: '/system/indexer/indices/' + indexName + '/close' };\n    },\n    'delete': function _delete(indexName) {\n      return { url: '/system/indexer/indices/' + indexName };\n    },\n    list: function list() {\n      return { url: '/system/indexer/indices' };\n    },\n    listClosed: function listClosed() {\n      return { url: '/system/indexer/indices/closed' };\n    },\n    multiple: function multiple() {\n      return { url: '/system/indexer/indices/multiple' };\n    },\n    reopen: function reopen(indexName) {\n      return { url: '/system/indexer/indices/' + indexName + '/reopen' };\n    }\n  },\n  InputsApiController: {\n    list: function list() {\n      return { url: '/system/inputs' };\n    },\n    get: function get(id) {\n      return { url: '/system/inputs/' + id };\n    },\n    globalRecentMessage: function globalRecentMessage(inputId) {\n      return { url: '/' + inputId };\n    }\n  },\n  InputStatesController: {\n    start: function start(inputId) {\n      return { url: '/system/inputstates/' + inputId };\n    },\n    stop: function stop(inputId) {\n      return { url: '/system/inputstates/' + inputId };\n    }\n  },\n  ClusterInputStatesController: {\n    list: function list() {\n      return { url: '/cluster/inputstates' };\n    },\n    start: function start(inputId) {\n      return { url: '/cluster/inputstates/' + inputId };\n    },\n    stop: function stop(inputId) {\n      return { url: '/cluster/inputstates/' + inputId };\n    }\n  },\n  ClusterLoggersResource: {\n    loggers: function loggers() {\n      return { url: '/cluster/system/loggers' };\n    },\n    subsystems: function subsystems() {\n      return { url: '/cluster/system/loggers/subsystems' };\n    },\n    setSubsystemLoggerLevel: function setSubsystemLoggerLevel(nodeId, subsystem, loglevel) {\n      return { url: '/cluster/system/loggers/' + nodeId + '/subsystems/' + subsystem + '/level/' + loglevel };\n    }\n  },\n  MessageFieldsApiController: {\n    list: function list() {\n      return { url: '/system/fields' };\n    }\n  },\n  MetricsApiController: {\n    multiple: function multiple() {\n      return { url: '/system/metrics/multiple' };\n    },\n    byNamespace: function byNamespace(namespace) {\n      return { url: '/system/metrics/namespace/' + namespace };\n    }\n  },\n  ClusterMetricsApiController: {\n    multiple: function multiple(nodeId) {\n      return { url: '/cluster/' + nodeId + '/metrics/multiple' };\n    },\n    multipleAllNodes: function multipleAllNodes() {\n      return { url: '/cluster/metrics/multiple' };\n    },\n    byNamespace: function byNamespace(nodeId, namespace) {\n      return { url: '/cluster/' + nodeId + '/metrics/namespace/' + namespace };\n    }\n  },\n  NotificationsApiController: {\n    'delete': function _delete(type) {\n      return { url: '/system/notifications/' + type };\n    },\n    list: function list() {\n      return { url: '/system/notifications' };\n    }\n  },\n  OutputsApiController: {\n    index: function index() {\n      return { url: '/system/outputs' };\n    },\n    create: function create() {\n      return { url: '/system/outputs' };\n    },\n    'delete': function _delete(outputId) {\n      return { url: '/system/outputs/' + outputId };\n    },\n    update: function update(outputId) {\n      return { url: '/system/outputs/' + outputId };\n    },\n    availableType: function availableType(type) {\n      return { url: '/system/outputs/available/' + type };\n    },\n    availableTypes: function availableTypes() {\n      return { url: '/system/outputs/available' };\n    }\n  },\n  RolesApiController: {\n    listRoles: function listRoles() {\n      return { url: '/roles' };\n    },\n    createRole: function createRole() {\n      return { url: '/roles' };\n    },\n    updateRole: function updateRole(rolename) {\n      return { url: '/roles/' + rolename };\n    },\n    deleteRole: function deleteRole(rolename) {\n      return { url: '/roles/' + rolename };\n    },\n    loadMembers: function loadMembers(rolename) {\n      return { url: '/roles/' + rolename + '/members' };\n    }\n  },\n  SavedSearchesApiController: {\n    create: function create() {\n      return { url: '/search/saved' };\n    },\n    'delete': function _delete(savedSearchId) {\n      return { url: '/search/saved/' + savedSearchId };\n    },\n    update: function update(savedSearchId) {\n      return { url: '/search/saved/' + savedSearchId };\n    }\n  },\n  SessionsApiController: {\n    validate: function validate() {\n      return { url: '/system/sessions' };\n    }\n  },\n  StreamAlertsApiController: {\n    create: function create(streamId) {\n      return { url: '/streams/' + streamId + '/alerts/conditions' };\n    },\n    'delete': function _delete(streamId, alertConditionId) {\n      return { url: '/streams/' + streamId + '/alerts/conditions/' + alertConditionId };\n    },\n    list: function list(streamId) {\n      return { url: '/streams/' + streamId + '/alerts/conditions' };\n    },\n    update: function update(streamId, alertConditionId) {\n      return { url: '/streams/' + streamId + '/alerts/conditions/' + alertConditionId };\n    },\n    addReceiver: function addReceiver(streamId, type, entity) {\n      return { url: '/streams/' + streamId + '/alerts/receivers?entity=' + entity + '&type=' + type };\n    },\n    deleteReceiver: function deleteReceiver(streamId, type, entity) {\n      return { url: '/streams/' + streamId + '/alerts/receivers?entity=' + entity + '&type=' + type };\n    },\n    sendDummyAlert: function sendDummyAlert(streamId) {\n      return { url: '/streams/' + streamId + '/alerts/sendDummyAlert' };\n    }\n  },\n  StreamsApiController: {\n    get: function get(streamId) {\n      return { url: '/streams/' + streamId };\n    },\n    create: function create() {\n      return { url: '/streams' };\n    },\n    update: function update(streamId) {\n      return { url: '/streams/' + streamId };\n    },\n    cloneStream: function cloneStream(streamId) {\n      return { url: '/streams/' + streamId + '/clone' };\n    },\n    'delete': function _delete(streamId) {\n      return { url: '/streams/' + streamId };\n    },\n    pause: function pause(streamId) {\n      return { url: '/streams/' + streamId + '/pause' };\n    },\n    resume: function resume(streamId) {\n      return { url: '/streams/' + streamId + '/resume' };\n    },\n    testMatch: function testMatch(streamId) {\n      return { url: '/streams/' + streamId + '/testMatch' };\n    }\n  },\n  StreamOutputsApiController: {\n    add: function add(streamId) {\n      return { url: '/streams/' + streamId + '/outputs' };\n    },\n    index: function index(streamId) {\n      return { url: '/streams/' + streamId + '/outputs' };\n    },\n    'delete': function _delete(streamId, outputId) {\n      return { url: '/streams/' + streamId + '/outputs/' + outputId };\n    }\n  },\n  StreamRulesApiController: {\n    'delete': function _delete(streamId, streamRuleId) {\n      return { url: '/streams/' + streamId + '/rules/' + streamRuleId };\n    },\n    update: function update(streamId, streamRuleId) {\n      return { url: '/streams/' + streamId + '/rules/' + streamRuleId };\n    },\n    create: function create(streamId) {\n      return { url: '/streams/' + streamId + '/rules' };\n    }\n  },\n  SystemApiController: {\n    info: function info() {\n      return { url: '/system' };\n    },\n    jvm: function jvm() {\n      return { url: '/system/jvm' };\n    },\n    fields: function fields() {\n      return { url: '/system/fields' };\n    }\n  },\n  SystemJobsApiController: {\n    list: function list() {\n      return { url: '/cluster/jobs' };\n    },\n    getJob: function getJob(jobId) {\n      return { url: '/cluster/jobs/' + jobId };\n    },\n    cancelJob: function cancelJob(jobId) {\n      return { url: '/cluster/jobs/' + jobId };\n    }\n  },\n  SystemMessagesApiController: {\n    all: function all(page) {\n      return { url: '/system/messages?page=' + page };\n    }\n  },\n  ToolsApiController: {\n    grokTest: function grokTest() {\n      return { url: '/tools/grok_tester' };\n    },\n    jsonTest: function jsonTest() {\n      return { url: '/tools/json_tester' };\n    },\n    naturalDateTest: function naturalDateTest(text) {\n      return { url: '/tools/natural_date_tester?string=' + text };\n    },\n    regexTest: function regexTest() {\n      return { url: '/tools/regex_tester' };\n    },\n    regexReplaceTest: function regexReplaceTest() {\n      return { url: '/tools/regex_replace_tester' };\n    },\n    splitAndIndexTest: function splitAndIndexTest() {\n      return { url: '/tools/split_and_index_tester' };\n    },\n    substringTest: function substringTest() {\n      return { url: '/tools/substring_tester' };\n    }\n  },\n  UniversalSearchApiController: {\n    _streamFilter: function _streamFilter(streamId) {\n      return streamId ? { filter: 'streams:' + streamId } : {};\n    },\n    _buildBaseQueryString: function _buildBaseQueryString(query, timerange, streamId) {\n      var queryString = {};\n\n      var streamFilter = this._streamFilter(streamId);\n\n      queryString.query = query;\n      Object.keys(timerange).forEach(function (key) {\n        queryString[key] = timerange[key];\n      });\n      Object.keys(streamFilter).forEach(function (key) {\n        queryString[key] = streamFilter[key];\n      });\n\n      return queryString;\n    },\n    _buildUrl: function _buildUrl(url, queryString) {\n      return url + '?' + _qs2['default'].stringify(queryString);\n    },\n    search: function search(type, query, timerange, streamId, limit, offset, sortField, sortOrder) {\n      var url = '/search/universal/' + type;\n      var queryString = this._buildBaseQueryString(query, timerange, streamId);\n\n      if (limit) {\n        queryString.limit = limit;\n      }\n      if (offset) {\n        queryString.offset = offset;\n      }\n      if (sortField && sortOrder) {\n        queryString.sort = sortField + ':' + sortOrder;\n      }\n\n      return { url: this._buildUrl(url, queryString) };\n    },\n    'export': function _export(type, query, timerange, streamId, limit, offset, fields) {\n      var url = '/search/universal/' + type + '/export';\n      var queryString = this._buildBaseQueryString(query, timerange, streamId);\n\n      if (limit) {\n        queryString.limit = limit;\n      }\n      if (offset) {\n        queryString.offset = offset;\n      }\n\n      if (fields) {\n        queryString.fields = fields.join(',');\n      }\n\n      return { url: this._buildUrl(url, queryString) };\n    },\n    histogram: function histogram(type, query, resolution, timerange, streamId) {\n      var url = '/search/universal/' + type + '/histogram';\n      var queryString = this._buildBaseQueryString(query, timerange, streamId);\n      queryString.interval = resolution;\n\n      return { url: this._buildUrl(url, queryString) };\n    },\n    fieldHistogram: function fieldHistogram(type, query, field, resolution, timerange, streamId) {\n      var url = '/search/universal/' + type + '/fieldhistogram';\n      var queryString = this._buildBaseQueryString(query, timerange, streamId);\n      queryString.interval = resolution;\n      queryString.field = field;\n      return { url: this._buildUrl(url, queryString) };\n    },\n    fieldStats: function fieldStats(type, query, field, timerange, streamId) {\n      var url = '/search/universal/' + type + '/stats';\n      var queryString = this._buildBaseQueryString(query, timerange, streamId);\n      queryString.field = field;\n      return { url: this._buildUrl(url, queryString) };\n    },\n    fieldTerms: function fieldTerms(type, query, field, timerange, streamId) {\n      var url = '/search/universal/' + type + '/terms';\n      var queryString = this._buildBaseQueryString(query, timerange, streamId);\n      queryString.field = field;\n      return { url: this._buildUrl(url, queryString) };\n    }\n  },\n  UsageStatsApiController: {\n    pluginEnabled: function pluginEnabled() {\n      return { url: '/plugins/org.graylog.plugins.usagestatistics/config' };\n    },\n    setOptOutState: function setOptOutState() {\n      return { url: '/plugins/org.graylog.plugins.usagestatistics/opt-out' };\n    }\n  },\n  UsersApiController: {\n    changePassword: function changePassword(username) {\n      return { url: '/users/' + username + '/password' };\n    },\n    create: function create() {\n      return { url: '/users' };\n    },\n    list: function list() {\n      return { url: '/users' };\n    },\n    load: function load(username) {\n      return { url: '/users/' + username };\n    },\n    'delete': function _delete(username) {\n      return { url: '/users/' + username };\n    },\n    update: function update(username) {\n      return { url: '/users/' + username };\n    }\n  },\n  DashboardsController: {\n    show: function show(id) {\n      return { url: '/dashboards/' + id };\n    }\n  },\n  ExtractorsController: {\n    create: function create(inputId) {\n      return { url: '/system/inputs/' + inputId + '/extractors' };\n    },\n    'delete': function _delete(inputId, extractorId) {\n      return { url: '/system/inputs/' + inputId + '/extractors/' + extractorId };\n    },\n    newExtractor: function newExtractor(nodeId, inputId, extractorType, fieldName, index, messageId) {\n      return { url: '/system/inputs/' + nodeId + '/' + inputId + '/extractors/new?extractor_type=' + extractorType + '&field=' + fieldName + '&example_index=' + index + '&example_id=' + messageId };\n    },\n    order: function order(inputId) {\n      return { url: '/system/inputs/' + inputId + '/extractors/order' };\n    },\n    update: function update(inputId, extractorId) {\n      return { url: '/system/inputs/' + inputId + '/extractors/' + extractorId };\n    }\n  },\n  MessagesController: {\n    single: function single(index, messageId) {\n      return { url: '/messages/' + index + '/' + messageId };\n    },\n    analyze: function analyze(index, string) {\n      return { url: '/messages/' + index + '/analyze?string=' + string };\n    }\n  },\n  NodesController: {\n    node: function node(nodeId) {\n      return { url: '/system/nodes/' + nodeId };\n    }\n  },\n  SearchController: {\n    index: function index(query, rangetype, timerange) {\n      var route = undefined;\n      if (query && rangetype && timerange) {\n        route = { url: '/search?q=' + query + '&' + rangetype + '=' + timerange };\n      } else {\n        route = { url: '/search' };\n      }\n\n      return route;\n    },\n    showMessage: function showMessage(index, messageId) {\n      return { url: '/messages/' + index + '/' + messageId };\n    }\n  }\n};\n\nexports['default'] = ApiRoutes;\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 \" + \"ApiRoutes.js\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/routing/ApiRoutes.js\n ** module id = 14\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/routing/ApiRoutes.js?")},function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(798);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/jquery/dist/jquery.js from dll-reference __vendor\n ** module id = 15\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/jquery/dist/jquery.js_from_dll-reference___vendor?")},function(module,exports){eval('module.exports = function(React, desc) {\r\n	desc.displayName = "ReactProxy";\r\n	desc.render = function() {\r\n		var Component = this.state.component;\r\n		if(Component) {\r\n			return React.createElement(Component, this.props, this.props.children);\r\n		} else if(this.renderUnavailable) {\r\n			return this.renderUnavailable();\r\n		} else {\r\n			return null;\r\n		}\r\n	};\r\n	desc.getInitialState = function() {\r\n		return { component: this.loadComponent() };\r\n	};\r\n	desc.componentDidMount = function() {\r\n		if(!this.state.component) {\r\n			this.loadComponent(function(component) {\r\n				if(this.isMounted()) {\r\n					this.setState({ component: component });\r\n				}\r\n			}.bind(this));\r\n		}\r\n	};\r\n};\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-proxy-loader/mixinReactProxy.js\n ** module id = 16\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-proxy-loader/mixinReactProxy.js?')},,function(module,exports,__webpack_require__){eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * numeral.js\n * version : 1.5.3\n * author : Adam Draper\n * license : MIT\n * http://adamwdraper.github.com/Numeral-js/\n */\n\n(function () {\n\n    /************************************\n        Constants\n    ************************************/\n\n    var numeral,\n        VERSION = '1.5.3',\n        // internal storage for language config files\n        languages = {},\n        currentLanguage = 'en',\n        zeroFormat = null,\n        defaultFormat = '0,0',\n        // check for nodeJS\n        hasModule = (typeof module !== 'undefined' && module.exports);\n\n\n    /************************************\n        Constructors\n    ************************************/\n\n\n    // Numeral prototype object\n    function Numeral (number) {\n        this._value = number;\n    }\n\n    /**\n     * Implementation of toFixed() that treats floats more like decimals\n     *\n     * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present\n     * problems for accounting- and finance-related software.\n     */\n    function toFixed (value, precision, roundingFunction, optionals) {\n        var power = Math.pow(10, precision),\n            optionalsRegExp,\n            output;\n            \n        //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n        // Multiply up by precision, round accurately, then divide and use native toFixed():\n        output = (roundingFunction(value * power) / power).toFixed(precision);\n\n        if (optionals) {\n            optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n            output = output.replace(optionalsRegExp, '');\n        }\n\n        return output;\n    }\n\n    /************************************\n        Formatting\n    ************************************/\n\n    // determine what type of formatting we need to do\n    function formatNumeral (n, format, roundingFunction) {\n        var output;\n\n        // figure out what kind of format we are dealing with\n        if (format.indexOf('$') > -1) { // currency!!!!!\n            output = formatCurrency(n, format, roundingFunction);\n        } else if (format.indexOf('%') > -1) { // percentage\n            output = formatPercentage(n, format, roundingFunction);\n        } else if (format.indexOf(':') > -1) { // time\n            output = formatTime(n, format);\n        } else { // plain ol' numbers or bytes\n            output = formatNumber(n._value, format, roundingFunction);\n        }\n\n        // return string\n        return output;\n    }\n\n    // revert to number\n    function unformatNumeral (n, string) {\n        var stringOriginal = string,\n            thousandRegExp,\n            millionRegExp,\n            billionRegExp,\n            trillionRegExp,\n            suffixes = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n            bytesMultiplier = false,\n            power;\n\n        if (string.indexOf(':') > -1) {\n            n._value = unformatTime(string);\n        } else {\n            if (string === zeroFormat) {\n                n._value = 0;\n            } else {\n                if (languages[currentLanguage].delimiters.decimal !== '.') {\n                    string = string.replace(/\\./g,'').replace(languages[currentLanguage].delimiters.decimal, '.');\n                }\n\n                // see if abbreviations are there so that we can multiply to the correct number\n                thousandRegExp = new RegExp('[^a-zA-Z]' + languages[currentLanguage].abbreviations.thousand + '(?:\\\\)|(\\\\' + languages[currentLanguage].currency.symbol + ')?(?:\\\\))?)?$');\n                millionRegExp = new RegExp('[^a-zA-Z]' + languages[currentLanguage].abbreviations.million + '(?:\\\\)|(\\\\' + languages[currentLanguage].currency.symbol + ')?(?:\\\\))?)?$');\n                billionRegExp = new RegExp('[^a-zA-Z]' + languages[currentLanguage].abbreviations.billion + '(?:\\\\)|(\\\\' + languages[currentLanguage].currency.symbol + ')?(?:\\\\))?)?$');\n                trillionRegExp = new RegExp('[^a-zA-Z]' + languages[currentLanguage].abbreviations.trillion + '(?:\\\\)|(\\\\' + languages[currentLanguage].currency.symbol + ')?(?:\\\\))?)?$');\n\n                // see if bytes are there so that we can multiply to the correct number\n                for (power = 0; power <= suffixes.length; power++) {\n                    bytesMultiplier = (string.indexOf(suffixes[power]) > -1) ? Math.pow(1024, power + 1) : false;\n\n                    if (bytesMultiplier) {\n                        break;\n                    }\n                }\n\n                // do some math to create our number\n                n._value = ((bytesMultiplier) ? bytesMultiplier : 1) * ((stringOriginal.match(thousandRegExp)) ? Math.pow(10, 3) : 1) * ((stringOriginal.match(millionRegExp)) ? Math.pow(10, 6) : 1) * ((stringOriginal.match(billionRegExp)) ? Math.pow(10, 9) : 1) * ((stringOriginal.match(trillionRegExp)) ? Math.pow(10, 12) : 1) * ((string.indexOf('%') > -1) ? 0.01 : 1) * (((string.split('-').length + Math.min(string.split('(').length-1, string.split(')').length-1)) % 2)? 1: -1) * Number(string.replace(/[^0-9\\.]+/g, ''));\n\n                // round if we are talking about bytes\n                n._value = (bytesMultiplier) ? Math.ceil(n._value) : n._value;\n            }\n        }\n        return n._value;\n    }\n\n    function formatCurrency (n, format, roundingFunction) {\n        var symbolIndex = format.indexOf('$'),\n            openParenIndex = format.indexOf('('),\n            minusSignIndex = format.indexOf('-'),\n            space = '',\n            spliceIndex,\n            output;\n\n        // check for space before or after currency\n        if (format.indexOf(' $') > -1) {\n            space = ' ';\n            format = format.replace(' $', '');\n        } else if (format.indexOf('$ ') > -1) {\n            space = ' ';\n            format = format.replace('$ ', '');\n        } else {\n            format = format.replace('$', '');\n        }\n\n        // format the number\n        output = formatNumber(n._value, format, roundingFunction);\n\n        // position the symbol\n        if (symbolIndex <= 1) {\n            if (output.indexOf('(') > -1 || output.indexOf('-') > -1) {\n                output = output.split('');\n                spliceIndex = 1;\n                if (symbolIndex < openParenIndex || symbolIndex < minusSignIndex){\n                    // the symbol appears before the \"(\" or \"-\"\n                    spliceIndex = 0;\n                }\n                output.splice(spliceIndex, 0, languages[currentLanguage].currency.symbol + space);\n                output = output.join('');\n            } else {\n                output = languages[currentLanguage].currency.symbol + space + output;\n            }\n        } else {\n            if (output.indexOf(')') > -1) {\n                output = output.split('');\n                output.splice(-1, 0, space + languages[currentLanguage].currency.symbol);\n                output = output.join('');\n            } else {\n                output = output + space + languages[currentLanguage].currency.symbol;\n            }\n        }\n\n        return output;\n    }\n\n    function formatPercentage (n, format, roundingFunction) {\n        var space = '',\n            output,\n            value = n._value * 100;\n\n        // check for space before %\n        if (format.indexOf(' %') > -1) {\n            space = ' ';\n            format = format.replace(' %', '');\n        } else {\n            format = format.replace('%', '');\n        }\n\n        output = formatNumber(value, format, roundingFunction);\n        \n        if (output.indexOf(')') > -1 ) {\n            output = output.split('');\n            output.splice(-1, 0, space + '%');\n            output = output.join('');\n        } else {\n            output = output + space + '%';\n        }\n\n        return output;\n    }\n\n    function formatTime (n) {\n        var hours = Math.floor(n._value/60/60),\n            minutes = Math.floor((n._value - (hours * 60 * 60))/60),\n            seconds = Math.round(n._value - (hours * 60 * 60) - (minutes * 60));\n        return hours + ':' + ((minutes < 10) ? '0' + minutes : minutes) + ':' + ((seconds < 10) ? '0' + seconds : seconds);\n    }\n\n    function unformatTime (string) {\n        var timeArray = string.split(':'),\n            seconds = 0;\n        // turn hours and minutes into seconds and add them all up\n        if (timeArray.length === 3) {\n            // hours\n            seconds = seconds + (Number(timeArray[0]) * 60 * 60);\n            // minutes\n            seconds = seconds + (Number(timeArray[1]) * 60);\n            // seconds\n            seconds = seconds + Number(timeArray[2]);\n        } else if (timeArray.length === 2) {\n            // minutes\n            seconds = seconds + (Number(timeArray[0]) * 60);\n            // seconds\n            seconds = seconds + Number(timeArray[1]);\n        }\n        return Number(seconds);\n    }\n\n    function formatNumber (value, format, roundingFunction) {\n        var negP = false,\n            signed = false,\n            optDec = false,\n            abbr = '',\n            abbrK = false, // force abbreviation to thousands\n            abbrM = false, // force abbreviation to millions\n            abbrB = false, // force abbreviation to billions\n            abbrT = false, // force abbreviation to trillions\n            abbrForce = false, // force abbreviation\n            bytes = '',\n            ord = '',\n            abs = Math.abs(value),\n            suffixes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n            min,\n            max,\n            power,\n            w,\n            precision,\n            thousands,\n            d = '',\n            neg = false;\n\n        // check if number is zero and a custom zero format has been set\n        if (value === 0 && zeroFormat !== null) {\n            return zeroFormat;\n        } else {\n            // see if we should use parentheses for negative number or if we should prefix with a sign\n            // if both are present we default to parentheses\n            if (format.indexOf('(') > -1) {\n                negP = true;\n                format = format.slice(1, -1);\n            } else if (format.indexOf('+') > -1) {\n                signed = true;\n                format = format.replace(/\\+/g, '');\n            }\n\n            // see if abbreviation is wanted\n            if (format.indexOf('a') > -1) {\n                // check if abbreviation is specified\n                abbrK = format.indexOf('aK') >= 0;\n                abbrM = format.indexOf('aM') >= 0;\n                abbrB = format.indexOf('aB') >= 0;\n                abbrT = format.indexOf('aT') >= 0;\n                abbrForce = abbrK || abbrM || abbrB || abbrT;\n\n                // check for space before abbreviation\n                if (format.indexOf(' a') > -1) {\n                    abbr = ' ';\n                    format = format.replace(' a', '');\n                } else {\n                    format = format.replace('a', '');\n                }\n\n                if (abs >= Math.pow(10, 12) && !abbrForce || abbrT) {\n                    // trillion\n                    abbr = abbr + languages[currentLanguage].abbreviations.trillion;\n                    value = value / Math.pow(10, 12);\n                } else if (abs < Math.pow(10, 12) && abs >= Math.pow(10, 9) && !abbrForce || abbrB) {\n                    // billion\n                    abbr = abbr + languages[currentLanguage].abbreviations.billion;\n                    value = value / Math.pow(10, 9);\n                } else if (abs < Math.pow(10, 9) && abs >= Math.pow(10, 6) && !abbrForce || abbrM) {\n                    // million\n                    abbr = abbr + languages[currentLanguage].abbreviations.million;\n                    value = value / Math.pow(10, 6);\n                } else if (abs < Math.pow(10, 6) && abs >= Math.pow(10, 3) && !abbrForce || abbrK) {\n                    // thousand\n                    abbr = abbr + languages[currentLanguage].abbreviations.thousand;\n                    value = value / Math.pow(10, 3);\n                }\n            }\n\n            // see if we are formatting bytes\n            if (format.indexOf('b') > -1) {\n                // check for space before\n                if (format.indexOf(' b') > -1) {\n                    bytes = ' ';\n                    format = format.replace(' b', '');\n                } else {\n                    format = format.replace('b', '');\n                }\n\n                for (power = 0; power <= suffixes.length; power++) {\n                    min = Math.pow(1024, power);\n                    max = Math.pow(1024, power+1);\n\n                    if (value >= min && value < max) {\n                        bytes = bytes + suffixes[power];\n                        if (min > 0) {\n                            value = value / min;\n                        }\n                        break;\n                    }\n                }\n            }\n\n            // see if ordinal is wanted\n            if (format.indexOf('o') > -1) {\n                // check for space before\n                if (format.indexOf(' o') > -1) {\n                    ord = ' ';\n                    format = format.replace(' o', '');\n                } else {\n                    format = format.replace('o', '');\n                }\n\n                ord = ord + languages[currentLanguage].ordinal(value);\n            }\n\n            if (format.indexOf('[.]') > -1) {\n                optDec = true;\n                format = format.replace('[.]', '.');\n            }\n\n            w = value.toString().split('.')[0];\n            precision = format.split('.')[1];\n            thousands = format.indexOf(',');\n\n            if (precision) {\n                if (precision.indexOf('[') > -1) {\n                    precision = precision.replace(']', '');\n                    precision = precision.split('[');\n                    d = toFixed(value, (precision[0].length + precision[1].length), roundingFunction, precision[1].length);\n                } else {\n                    d = toFixed(value, precision.length, roundingFunction);\n                }\n\n                w = d.split('.')[0];\n\n                if (d.split('.')[1].length) {\n                    d = languages[currentLanguage].delimiters.decimal + d.split('.')[1];\n                } else {\n                    d = '';\n                }\n\n                if (optDec && Number(d.slice(1)) === 0) {\n                    d = '';\n                }\n            } else {\n                w = toFixed(value, null, roundingFunction);\n            }\n\n            // format number\n            if (w.indexOf('-') > -1) {\n                w = w.slice(1);\n                neg = true;\n            }\n\n            if (thousands > -1) {\n                w = w.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1' + languages[currentLanguage].delimiters.thousands);\n            }\n\n            if (format.indexOf('.') === 0) {\n                w = '';\n            }\n\n            return ((negP && neg) ? '(' : '') + ((!negP && neg) ? '-' : '') + ((!neg && signed) ? '+' : '') + w + d + ((ord) ? ord : '') + ((abbr) ? abbr : '') + ((bytes) ? bytes : '') + ((negP && neg) ? ')' : '');\n        }\n    }\n\n    /************************************\n        Top Level Functions\n    ************************************/\n\n    numeral = function (input) {\n        if (numeral.isNumeral(input)) {\n            input = input.value();\n        } else if (input === 0 || typeof input === 'undefined') {\n            input = 0;\n        } else if (!Number(input)) {\n            input = numeral.fn.unformat(input);\n        }\n\n        return new Numeral(Number(input));\n    };\n\n    // version number\n    numeral.version = VERSION;\n\n    // compare numeral object\n    numeral.isNumeral = function (obj) {\n        return obj instanceof Numeral;\n    };\n\n    // This function will load languages and then set the global language.  If\n    // no arguments are passed in, it will simply return the current global\n    // language key.\n    numeral.language = function (key, values) {\n        if (!key) {\n            return currentLanguage;\n        }\n\n        if (key && !values) {\n            if(!languages[key]) {\n                throw new Error('Unknown language : ' + key);\n            }\n            currentLanguage = key;\n        }\n\n        if (values || !languages[key]) {\n            loadLanguage(key, values);\n        }\n\n        return numeral;\n    };\n    \n    // This function provides access to the loaded language data.  If\n    // no arguments are passed in, it will simply return the current\n    // global language object.\n    numeral.languageData = function (key) {\n        if (!key) {\n            return languages[currentLanguage];\n        }\n        \n        if (!languages[key]) {\n            throw new Error('Unknown language : ' + key);\n        }\n        \n        return languages[key];\n    };\n\n    numeral.language('en', {\n        delimiters: {\n            thousands: ',',\n            decimal: '.'\n        },\n        abbreviations: {\n            thousand: 'k',\n            million: 'm',\n            billion: 'b',\n            trillion: 't'\n        },\n        ordinal: function (number) {\n            var b = number % 10;\n            return (~~ (number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n        },\n        currency: {\n            symbol: '$'\n        }\n    });\n\n    numeral.zeroFormat = function (format) {\n        zeroFormat = typeof(format) === 'string' ? format : null;\n    };\n\n    numeral.defaultFormat = function (format) {\n        defaultFormat = typeof(format) === 'string' ? format : '0.0';\n    };\n\n    /************************************\n        Helpers\n    ************************************/\n\n    function loadLanguage(key, values) {\n        languages[key] = values;\n    }\n\n    /************************************\n        Floating-point helpers\n    ************************************/\n\n    // The floating-point helper functions and implementation\n    // borrows heavily from sinful.js: http://guipn.github.io/sinful.js/\n\n    /**\n     * Array.prototype.reduce for browsers that don't support it\n     * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce#Compatibility\n     */\n    if ('function' !== typeof Array.prototype.reduce) {\n        Array.prototype.reduce = function (callback, opt_initialValue) {\n            'use strict';\n            \n            if (null === this || 'undefined' === typeof this) {\n                // At the moment all modern browsers, that support strict mode, have\n                // native implementation of Array.prototype.reduce. For instance, IE8\n                // does not support strict mode, so this check is actually useless.\n                throw new TypeError('Array.prototype.reduce called on null or undefined');\n            }\n            \n            if ('function' !== typeof callback) {\n                throw new TypeError(callback + ' is not a function');\n            }\n\n            var index,\n                value,\n                length = this.length >>> 0,\n                isValueSet = false;\n\n            if (1 < arguments.length) {\n                value = opt_initialValue;\n                isValueSet = true;\n            }\n\n            for (index = 0; length > index; ++index) {\n                if (this.hasOwnProperty(index)) {\n                    if (isValueSet) {\n                        value = callback(value, this[index], index, this);\n                    } else {\n                        value = this[index];\n                        isValueSet = true;\n                    }\n                }\n            }\n\n            if (!isValueSet) {\n                throw new TypeError('Reduce of empty array with no initial value');\n            }\n\n            return value;\n        };\n    }\n\n    \n    /**\n     * Computes the multiplier necessary to make x >= 1,\n     * effectively eliminating miscalculations caused by\n     * finite precision.\n     */\n    function multiplier(x) {\n        var parts = x.toString().split('.');\n        if (parts.length < 2) {\n            return 1;\n        }\n        return Math.pow(10, parts[1].length);\n    }\n\n    /**\n     * Given a variable number of arguments, returns the maximum\n     * multiplier that must be used to normalize an operation involving\n     * all of them.\n     */\n    function correctionFactor() {\n        var args = Array.prototype.slice.call(arguments);\n        return args.reduce(function (prev, next) {\n            var mp = multiplier(prev),\n                mn = multiplier(next);\n        return mp > mn ? mp : mn;\n        }, -Infinity);\n    }        \n\n\n    /************************************\n        Numeral Prototype\n    ************************************/\n\n\n    numeral.fn = Numeral.prototype = {\n\n        clone : function () {\n            return numeral(this);\n        },\n\n        format : function (inputString, roundingFunction) {\n            return formatNumeral(this, \n                  inputString ? inputString : defaultFormat, \n                  (roundingFunction !== undefined) ? roundingFunction : Math.round\n              );\n        },\n\n        unformat : function (inputString) {\n            if (Object.prototype.toString.call(inputString) === '[object Number]') { \n                return inputString; \n            }\n            return unformatNumeral(this, inputString ? inputString : defaultFormat);\n        },\n\n        value : function () {\n            return this._value;\n        },\n\n        valueOf : function () {\n            return this._value;\n        },\n\n        set : function (value) {\n            this._value = Number(value);\n            return this;\n        },\n\n        add : function (value) {\n            var corrFactor = correctionFactor.call(null, this._value, value);\n            function cback(accum, curr, currI, O) {\n                return accum + corrFactor * curr;\n            }\n            this._value = [this._value, value].reduce(cback, 0) / corrFactor;\n            return this;\n        },\n\n        subtract : function (value) {\n            var corrFactor = correctionFactor.call(null, this._value, value);\n            function cback(accum, curr, currI, O) {\n                return accum - corrFactor * curr;\n            }\n            this._value = [value].reduce(cback, this._value * corrFactor) / corrFactor;            \n            return this;\n        },\n\n        multiply : function (value) {\n            function cback(accum, curr, currI, O) {\n                var corrFactor = correctionFactor(accum, curr);\n                return (accum * corrFactor) * (curr * corrFactor) /\n                    (corrFactor * corrFactor);\n            }\n            this._value = [this._value, value].reduce(cback, 1);\n            return this;\n        },\n\n        divide : function (value) {\n            function cback(accum, curr, currI, O) {\n                var corrFactor = correctionFactor(accum, curr);\n                return (accum * corrFactor) / (curr * corrFactor);\n            }\n            this._value = [this._value, value].reduce(cback);            \n            return this;\n        },\n\n        difference : function (value) {\n            return Math.abs(numeral(this._value).subtract(value).value());\n        }\n\n    };\n\n    /************************************\n        Exposing Numeral\n    ************************************/\n\n    // CommonJS module is defined\n    if (hasModule) {\n        module.exports = numeral;\n    }\n\n    /*global ender:false */\n    if (typeof ender === 'undefined') {\n        // here, `this` means `window` in the browser, or `global` on the server\n        // add `numeral` as a global object via a string identifier,\n        // for Closure Compiler 'advanced' mode\n        this['numeral'] = numeral;\n    }\n\n    /*global define:false */\n    if (true) {\n        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {\n            return numeral;\n        }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n    }\n}).call(this);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/numeral/numeral.js\n ** module id = 18\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/numeral/numeral.js?");
},,,function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(3);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/moment/moment.js from dll-reference __vendor\n ** module id = 21\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/moment/moment.js_from_dll-reference___vendor?")},function(module,exports,__webpack_require__){eval("/**\n *  Copyright (c) 2014-2015, Facebook, Inc.\n *  All rights reserved.\n *\n *  This source code is licensed under the BSD-style license found in the\n *  LICENSE file in the root directory of this source tree. An additional grant\n *  of patent rights can be found in the PATENTS file in the same directory.\n */\n\n(function (global, factory) {\n   true ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  global.Immutable = factory();\n}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;\n\n  function createClass(ctor, superClass) {\n    if (superClass) {\n      ctor.prototype = Object.create(superClass.prototype);\n    }\n    ctor.prototype.constructor = ctor;\n  }\n\n  function Iterable(value) {\n      return isIterable(value) ? value : Seq(value);\n    }\n\n\n  createClass(KeyedIterable, Iterable);\n    function KeyedIterable(value) {\n      return isKeyed(value) ? value : KeyedSeq(value);\n    }\n\n\n  createClass(IndexedIterable, Iterable);\n    function IndexedIterable(value) {\n      return isIndexed(value) ? value : IndexedSeq(value);\n    }\n\n\n  createClass(SetIterable, Iterable);\n    function SetIterable(value) {\n      return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n    }\n\n\n\n  function isIterable(maybeIterable) {\n    return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n  }\n\n  function isKeyed(maybeKeyed) {\n    return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n  }\n\n  function isIndexed(maybeIndexed) {\n    return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n  }\n\n  function isAssociative(maybeAssociative) {\n    return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n  }\n\n  function isOrdered(maybeOrdered) {\n    return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n  }\n\n  Iterable.isIterable = isIterable;\n  Iterable.isKeyed = isKeyed;\n  Iterable.isIndexed = isIndexed;\n  Iterable.isAssociative = isAssociative;\n  Iterable.isOrdered = isOrdered;\n\n  Iterable.Keyed = KeyedIterable;\n  Iterable.Indexed = IndexedIterable;\n  Iterable.Set = SetIterable;\n\n\n  var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n  var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n  var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n  var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n  // Used for setting prototype methods that IE8 chokes on.\n  var DELETE = 'delete';\n\n  // Constants describing the size of trie nodes.\n  var SHIFT = 5; // Resulted in best performance after ______?\n  var SIZE = 1 << SHIFT;\n  var MASK = SIZE - 1;\n\n  // A consistent shared value representing \"not set\" which equals nothing other\n  // than itself, and nothing that could be provided externally.\n  var NOT_SET = {};\n\n  // Boolean references, Rough equivalent of `bool &`.\n  var CHANGE_LENGTH = { value: false };\n  var DID_ALTER = { value: false };\n\n  function MakeRef(ref) {\n    ref.value = false;\n    return ref;\n  }\n\n  function SetRef(ref) {\n    ref && (ref.value = true);\n  }\n\n  // A function which returns a value representing an \"owner\" for transient writes\n  // to tries. The return value will only ever equal itself, and will not equal\n  // the return of any subsequent call of this function.\n  function OwnerID() {}\n\n  // http://jsperf.com/copy-array-inline\n  function arrCopy(arr, offset) {\n    offset = offset || 0;\n    var len = Math.max(0, arr.length - offset);\n    var newArr = new Array(len);\n    for (var ii = 0; ii < len; ii++) {\n      newArr[ii] = arr[ii + offset];\n    }\n    return newArr;\n  }\n\n  function ensureSize(iter) {\n    if (iter.size === undefined) {\n      iter.size = iter.__iterate(returnTrue);\n    }\n    return iter.size;\n  }\n\n  function wrapIndex(iter, index) {\n    // This implements \"is array index\" which the ECMAString spec defines as:\n    //\n    //     A String property name P is an array index if and only if\n    //     ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n    //     to 2^32−1.\n    //\n    // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n    if (typeof index !== 'number') {\n      var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n      if ('' + uint32Index !== index || uint32Index === 4294967295) {\n        return NaN;\n      }\n      index = uint32Index;\n    }\n    return index < 0 ? ensureSize(iter) + index : index;\n  }\n\n  function returnTrue() {\n    return true;\n  }\n\n  function wholeSlice(begin, end, size) {\n    return (begin === 0 || (size !== undefined && begin <= -size)) &&\n      (end === undefined || (size !== undefined && end >= size));\n  }\n\n  function resolveBegin(begin, size) {\n    return resolveIndex(begin, size, 0);\n  }\n\n  function resolveEnd(end, size) {\n    return resolveIndex(end, size, size);\n  }\n\n  function resolveIndex(index, size, defaultIndex) {\n    return index === undefined ?\n      defaultIndex :\n      index < 0 ?\n        Math.max(0, size + index) :\n        size === undefined ?\n          index :\n          Math.min(size, index);\n  }\n\n  /* global Symbol */\n\n  var ITERATE_KEYS = 0;\n  var ITERATE_VALUES = 1;\n  var ITERATE_ENTRIES = 2;\n\n  var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n  var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n  function Iterator(next) {\n      this.next = next;\n    }\n\n    Iterator.prototype.toString = function() {\n      return '[Iterator]';\n    };\n\n\n  Iterator.KEYS = ITERATE_KEYS;\n  Iterator.VALUES = ITERATE_VALUES;\n  Iterator.ENTRIES = ITERATE_ENTRIES;\n\n  Iterator.prototype.inspect =\n  Iterator.prototype.toSource = function () { return this.toString(); }\n  Iterator.prototype[ITERATOR_SYMBOL] = function () {\n    return this;\n  };\n\n\n  function iteratorValue(type, k, v, iteratorResult) {\n    var value = type === 0 ? k : type === 1 ? v : [k, v];\n    iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n      value: value, done: false\n    });\n    return iteratorResult;\n  }\n\n  function iteratorDone() {\n    return { value: undefined, done: true };\n  }\n\n  function hasIterator(maybeIterable) {\n    return !!getIteratorFn(maybeIterable);\n  }\n\n  function isIterator(maybeIterator) {\n    return maybeIterator && typeof maybeIterator.next === 'function';\n  }\n\n  function getIterator(iterable) {\n    var iteratorFn = getIteratorFn(iterable);\n    return iteratorFn && iteratorFn.call(iterable);\n  }\n\n  function getIteratorFn(iterable) {\n    var iteratorFn = iterable && (\n      (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n      iterable[FAUX_ITERATOR_SYMBOL]\n    );\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  function isArrayLike(value) {\n    return value && typeof value.length === 'number';\n  }\n\n  createClass(Seq, Iterable);\n    function Seq(value) {\n      return value === null || value === undefined ? emptySequence() :\n        isIterable(value) ? value.toSeq() : seqFromValue(value);\n    }\n\n    Seq.of = function(/*...values*/) {\n      return Seq(arguments);\n    };\n\n    Seq.prototype.toSeq = function() {\n      return this;\n    };\n\n    Seq.prototype.toString = function() {\n      return this.__toString('Seq {', '}');\n    };\n\n    Seq.prototype.cacheResult = function() {\n      if (!this._cache && this.__iterateUncached) {\n        this._cache = this.entrySeq().toArray();\n        this.size = this._cache.length;\n      }\n      return this;\n    };\n\n    // abstract __iterateUncached(fn, reverse)\n\n    Seq.prototype.__iterate = function(fn, reverse) {\n      return seqIterate(this, fn, reverse, true);\n    };\n\n    // abstract __iteratorUncached(type, reverse)\n\n    Seq.prototype.__iterator = function(type, reverse) {\n      return seqIterator(this, type, reverse, true);\n    };\n\n\n\n  createClass(KeyedSeq, Seq);\n    function KeyedSeq(value) {\n      return value === null || value === undefined ?\n        emptySequence().toKeyedSeq() :\n        isIterable(value) ?\n          (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n          keyedSeqFromValue(value);\n    }\n\n    KeyedSeq.prototype.toKeyedSeq = function() {\n      return this;\n    };\n\n\n\n  createClass(IndexedSeq, Seq);\n    function IndexedSeq(value) {\n      return value === null || value === undefined ? emptySequence() :\n        !isIterable(value) ? indexedSeqFromValue(value) :\n        isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n    }\n\n    IndexedSeq.of = function(/*...values*/) {\n      return IndexedSeq(arguments);\n    };\n\n    IndexedSeq.prototype.toIndexedSeq = function() {\n      return this;\n    };\n\n    IndexedSeq.prototype.toString = function() {\n      return this.__toString('Seq [', ']');\n    };\n\n    IndexedSeq.prototype.__iterate = function(fn, reverse) {\n      return seqIterate(this, fn, reverse, false);\n    };\n\n    IndexedSeq.prototype.__iterator = function(type, reverse) {\n      return seqIterator(this, type, reverse, false);\n    };\n\n\n\n  createClass(SetSeq, Seq);\n    function SetSeq(value) {\n      return (\n        value === null || value === undefined ? emptySequence() :\n        !isIterable(value) ? indexedSeqFromValue(value) :\n        isKeyed(value) ? value.entrySeq() : value\n      ).toSetSeq();\n    }\n\n    SetSeq.of = function(/*...values*/) {\n      return SetSeq(arguments);\n    };\n\n    SetSeq.prototype.toSetSeq = function() {\n      return this;\n    };\n\n\n\n  Seq.isSeq = isSeq;\n  Seq.Keyed = KeyedSeq;\n  Seq.Set = SetSeq;\n  Seq.Indexed = IndexedSeq;\n\n  var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n  Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n  createClass(ArraySeq, IndexedSeq);\n    function ArraySeq(array) {\n      this._array = array;\n      this.size = array.length;\n    }\n\n    ArraySeq.prototype.get = function(index, notSetValue) {\n      return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n    };\n\n    ArraySeq.prototype.__iterate = function(fn, reverse) {\n      var array = this._array;\n      var maxIndex = array.length - 1;\n      for (var ii = 0; ii <= maxIndex; ii++) {\n        if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n          return ii + 1;\n        }\n      }\n      return ii;\n    };\n\n    ArraySeq.prototype.__iterator = function(type, reverse) {\n      var array = this._array;\n      var maxIndex = array.length - 1;\n      var ii = 0;\n      return new Iterator(function() \n        {return ii > maxIndex ?\n          iteratorDone() :\n          iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n      );\n    };\n\n\n\n  createClass(ObjectSeq, KeyedSeq);\n    function ObjectSeq(object) {\n      var keys = Object.keys(object);\n      this._object = object;\n      this._keys = keys;\n      this.size = keys.length;\n    }\n\n    ObjectSeq.prototype.get = function(key, notSetValue) {\n      if (notSetValue !== undefined && !this.has(key)) {\n        return notSetValue;\n      }\n      return this._object[key];\n    };\n\n    ObjectSeq.prototype.has = function(key) {\n      return this._object.hasOwnProperty(key);\n    };\n\n    ObjectSeq.prototype.__iterate = function(fn, reverse) {\n      var object = this._object;\n      var keys = this._keys;\n      var maxIndex = keys.length - 1;\n      for (var ii = 0; ii <= maxIndex; ii++) {\n        var key = keys[reverse ? maxIndex - ii : ii];\n        if (fn(object[key], key, this) === false) {\n          return ii + 1;\n        }\n      }\n      return ii;\n    };\n\n    ObjectSeq.prototype.__iterator = function(type, reverse) {\n      var object = this._object;\n      var keys = this._keys;\n      var maxIndex = keys.length - 1;\n      var ii = 0;\n      return new Iterator(function()  {\n        var key = keys[reverse ? maxIndex - ii : ii];\n        return ii++ > maxIndex ?\n          iteratorDone() :\n          iteratorValue(type, key, object[key]);\n      });\n    };\n\n  ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n  createClass(IterableSeq, IndexedSeq);\n    function IterableSeq(iterable) {\n      this._iterable = iterable;\n      this.size = iterable.length || iterable.size;\n    }\n\n    IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var iterable = this._iterable;\n      var iterator = getIterator(iterable);\n      var iterations = 0;\n      if (isIterator(iterator)) {\n        var step;\n        while (!(step = iterator.next()).done) {\n          if (fn(step.value, iterations++, this) === false) {\n            break;\n          }\n        }\n      }\n      return iterations;\n    };\n\n    IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n      if (reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      var iterable = this._iterable;\n      var iterator = getIterator(iterable);\n      if (!isIterator(iterator)) {\n        return new Iterator(iteratorDone);\n      }\n      var iterations = 0;\n      return new Iterator(function()  {\n        var step = iterator.next();\n        return step.done ? step : iteratorValue(type, iterations++, step.value);\n      });\n    };\n\n\n\n  createClass(IteratorSeq, IndexedSeq);\n    function IteratorSeq(iterator) {\n      this._iterator = iterator;\n      this._iteratorCache = [];\n    }\n\n    IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var iterator = this._iterator;\n      var cache = this._iteratorCache;\n      var iterations = 0;\n      while (iterations < cache.length) {\n        if (fn(cache[iterations], iterations++, this) === false) {\n          return iterations;\n        }\n      }\n      var step;\n      while (!(step = iterator.next()).done) {\n        var val = step.value;\n        cache[iterations] = val;\n        if (fn(val, iterations++, this) === false) {\n          break;\n        }\n      }\n      return iterations;\n    };\n\n    IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n      if (reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      var iterator = this._iterator;\n      var cache = this._iteratorCache;\n      var iterations = 0;\n      return new Iterator(function()  {\n        if (iterations >= cache.length) {\n          var step = iterator.next();\n          if (step.done) {\n            return step;\n          }\n          cache[iterations] = step.value;\n        }\n        return iteratorValue(type, iterations, cache[iterations++]);\n      });\n    };\n\n\n\n\n  // # pragma Helper functions\n\n  function isSeq(maybeSeq) {\n    return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n  }\n\n  var EMPTY_SEQ;\n\n  function emptySequence() {\n    return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n  }\n\n  function keyedSeqFromValue(value) {\n    var seq =\n      Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n      isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n      hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n      typeof value === 'object' ? new ObjectSeq(value) :\n      undefined;\n    if (!seq) {\n      throw new TypeError(\n        'Expected Array or iterable object of [k, v] entries, '+\n        'or keyed object: ' + value\n      );\n    }\n    return seq;\n  }\n\n  function indexedSeqFromValue(value) {\n    var seq = maybeIndexedSeqFromValue(value);\n    if (!seq) {\n      throw new TypeError(\n        'Expected Array or iterable object of values: ' + value\n      );\n    }\n    return seq;\n  }\n\n  function seqFromValue(value) {\n    var seq = maybeIndexedSeqFromValue(value) ||\n      (typeof value === 'object' && new ObjectSeq(value));\n    if (!seq) {\n      throw new TypeError(\n        'Expected Array or iterable object of values, or keyed object: ' + value\n      );\n    }\n    return seq;\n  }\n\n  function maybeIndexedSeqFromValue(value) {\n    return (\n      isArrayLike(value) ? new ArraySeq(value) :\n      isIterator(value) ? new IteratorSeq(value) :\n      hasIterator(value) ? new IterableSeq(value) :\n      undefined\n    );\n  }\n\n  function seqIterate(seq, fn, reverse, useKeys) {\n    var cache = seq._cache;\n    if (cache) {\n      var maxIndex = cache.length - 1;\n      for (var ii = 0; ii <= maxIndex; ii++) {\n        var entry = cache[reverse ? maxIndex - ii : ii];\n        if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n          return ii + 1;\n        }\n      }\n      return ii;\n    }\n    return seq.__iterateUncached(fn, reverse);\n  }\n\n  function seqIterator(seq, type, reverse, useKeys) {\n    var cache = seq._cache;\n    if (cache) {\n      var maxIndex = cache.length - 1;\n      var ii = 0;\n      return new Iterator(function()  {\n        var entry = cache[reverse ? maxIndex - ii : ii];\n        return ii++ > maxIndex ?\n          iteratorDone() :\n          iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n      });\n    }\n    return seq.__iteratorUncached(type, reverse);\n  }\n\n  function fromJS(json, converter) {\n    return converter ?\n      fromJSWith(converter, json, '', {'': json}) :\n      fromJSDefault(json);\n  }\n\n  function fromJSWith(converter, json, key, parentJSON) {\n    if (Array.isArray(json)) {\n      return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k)  {return fromJSWith(converter, v, k, json)}));\n    }\n    if (isPlainObj(json)) {\n      return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k)  {return fromJSWith(converter, v, k, json)}));\n    }\n    return json;\n  }\n\n  function fromJSDefault(json) {\n    if (Array.isArray(json)) {\n      return IndexedSeq(json).map(fromJSDefault).toList();\n    }\n    if (isPlainObj(json)) {\n      return KeyedSeq(json).map(fromJSDefault).toMap();\n    }\n    return json;\n  }\n\n  function isPlainObj(value) {\n    return value && (value.constructor === Object || value.constructor === undefined);\n  }\n\n  /**\n   * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n   * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n   *\n   * NaN is considered the same as NaN, however -0 and 0 are considered the same\n   * value, which is different from the algorithm described by\n   * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n   *\n   * This is extended further to allow Objects to describe the values they\n   * represent, by way of `valueOf` or `equals` (and `hashCode`).\n   *\n   * Note: because of this extension, the key equality of Immutable.Map and the\n   * value equality of Immutable.Set will differ from ES6 Map and Set.\n   *\n   * ### Defining custom values\n   *\n   * The easiest way to describe the value an object represents is by implementing\n   * `valueOf`. For example, `Date` represents a value by returning a unix\n   * timestamp for `valueOf`:\n   *\n   *     var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n   *     var date2 = new Date(1234567890000);\n   *     date1.valueOf(); // 1234567890000\n   *     assert( date1 !== date2 );\n   *     assert( Immutable.is( date1, date2 ) );\n   *\n   * Note: overriding `valueOf` may have other implications if you use this object\n   * where JavaScript expects a primitive, such as implicit string coercion.\n   *\n   * For more complex types, especially collections, implementing `valueOf` may\n   * not be performant. An alternative is to implement `equals` and `hashCode`.\n   *\n   * `equals` takes another object, presumably of similar type, and returns true\n   * if the it is equal. Equality is symmetrical, so the same result should be\n   * returned if this and the argument are flipped.\n   *\n   *     assert( a.equals(b) === b.equals(a) );\n   *\n   * `hashCode` returns a 32bit integer number representing the object which will\n   * be used to determine how to store the value object in a Map or Set. You must\n   * provide both or neither methods, one must not exist without the other.\n   *\n   * Also, an important relationship between these methods must be upheld: if two\n   * values are equal, they *must* return the same hashCode. If the values are not\n   * equal, they might have the same hashCode; this is called a hash collision,\n   * and while undesirable for performance reasons, it is acceptable.\n   *\n   *     if (a.equals(b)) {\n   *       assert( a.hashCode() === b.hashCode() );\n   *     }\n   *\n   * All Immutable collections implement `equals` and `hashCode`.\n   *\n   */\n  function is(valueA, valueB) {\n    if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n      return true;\n    }\n    if (!valueA || !valueB) {\n      return false;\n    }\n    if (typeof valueA.valueOf === 'function' &&\n        typeof valueB.valueOf === 'function') {\n      valueA = valueA.valueOf();\n      valueB = valueB.valueOf();\n      if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n        return true;\n      }\n      if (!valueA || !valueB) {\n        return false;\n      }\n    }\n    if (typeof valueA.equals === 'function' &&\n        typeof valueB.equals === 'function' &&\n        valueA.equals(valueB)) {\n      return true;\n    }\n    return false;\n  }\n\n  function deepEqual(a, b) {\n    if (a === b) {\n      return true;\n    }\n\n    if (\n      !isIterable(b) ||\n      a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n      a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n      isKeyed(a) !== isKeyed(b) ||\n      isIndexed(a) !== isIndexed(b) ||\n      isOrdered(a) !== isOrdered(b)\n    ) {\n      return false;\n    }\n\n    if (a.size === 0 && b.size === 0) {\n      return true;\n    }\n\n    var notAssociative = !isAssociative(a);\n\n    if (isOrdered(a)) {\n      var entries = a.entries();\n      return b.every(function(v, k)  {\n        var entry = entries.next().value;\n        return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n      }) && entries.next().done;\n    }\n\n    var flipped = false;\n\n    if (a.size === undefined) {\n      if (b.size === undefined) {\n        if (typeof a.cacheResult === 'function') {\n          a.cacheResult();\n        }\n      } else {\n        flipped = true;\n        var _ = a;\n        a = b;\n        b = _;\n      }\n    }\n\n    var allEqual = true;\n    var bSize = b.__iterate(function(v, k)  {\n      if (notAssociative ? !a.has(v) :\n          flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n        allEqual = false;\n        return false;\n      }\n    });\n\n    return allEqual && a.size === bSize;\n  }\n\n  createClass(Repeat, IndexedSeq);\n\n    function Repeat(value, times) {\n      if (!(this instanceof Repeat)) {\n        return new Repeat(value, times);\n      }\n      this._value = value;\n      this.size = times === undefined ? Infinity : Math.max(0, times);\n      if (this.size === 0) {\n        if (EMPTY_REPEAT) {\n          return EMPTY_REPEAT;\n        }\n        EMPTY_REPEAT = this;\n      }\n    }\n\n    Repeat.prototype.toString = function() {\n      if (this.size === 0) {\n        return 'Repeat []';\n      }\n      return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n    };\n\n    Repeat.prototype.get = function(index, notSetValue) {\n      return this.has(index) ? this._value : notSetValue;\n    };\n\n    Repeat.prototype.includes = function(searchValue) {\n      return is(this._value, searchValue);\n    };\n\n    Repeat.prototype.slice = function(begin, end) {\n      var size = this.size;\n      return wholeSlice(begin, end, size) ? this :\n        new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n    };\n\n    Repeat.prototype.reverse = function() {\n      return this;\n    };\n\n    Repeat.prototype.indexOf = function(searchValue) {\n      if (is(this._value, searchValue)) {\n        return 0;\n      }\n      return -1;\n    };\n\n    Repeat.prototype.lastIndexOf = function(searchValue) {\n      if (is(this._value, searchValue)) {\n        return this.size;\n      }\n      return -1;\n    };\n\n    Repeat.prototype.__iterate = function(fn, reverse) {\n      for (var ii = 0; ii < this.size; ii++) {\n        if (fn(this._value, ii, this) === false) {\n          return ii + 1;\n        }\n      }\n      return ii;\n    };\n\n    Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n      var ii = 0;\n      return new Iterator(function() \n        {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n      );\n    };\n\n    Repeat.prototype.equals = function(other) {\n      return other instanceof Repeat ?\n        is(this._value, other._value) :\n        deepEqual(other);\n    };\n\n\n  var EMPTY_REPEAT;\n\n  function invariant(condition, error) {\n    if (!condition) throw new Error(error);\n  }\n\n  createClass(Range, IndexedSeq);\n\n    function Range(start, end, step) {\n      if (!(this instanceof Range)) {\n        return new Range(start, end, step);\n      }\n      invariant(step !== 0, 'Cannot step a Range by 0');\n      start = start || 0;\n      if (end === undefined) {\n        end = Infinity;\n      }\n      step = step === undefined ? 1 : Math.abs(step);\n      if (end < start) {\n        step = -step;\n      }\n      this._start = start;\n      this._end = end;\n      this._step = step;\n      this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n      if (this.size === 0) {\n        if (EMPTY_RANGE) {\n          return EMPTY_RANGE;\n        }\n        EMPTY_RANGE = this;\n      }\n    }\n\n    Range.prototype.toString = function() {\n      if (this.size === 0) {\n        return 'Range []';\n      }\n      return 'Range [ ' +\n        this._start + '...' + this._end +\n        (this._step > 1 ? ' by ' + this._step : '') +\n      ' ]';\n    };\n\n    Range.prototype.get = function(index, notSetValue) {\n      return this.has(index) ?\n        this._start + wrapIndex(this, index) * this._step :\n        notSetValue;\n    };\n\n    Range.prototype.includes = function(searchValue) {\n      var possibleIndex = (searchValue - this._start) / this._step;\n      return possibleIndex >= 0 &&\n        possibleIndex < this.size &&\n        possibleIndex === Math.floor(possibleIndex);\n    };\n\n    Range.prototype.slice = function(begin, end) {\n      if (wholeSlice(begin, end, this.size)) {\n        return this;\n      }\n      begin = resolveBegin(begin, this.size);\n      end = resolveEnd(end, this.size);\n      if (end <= begin) {\n        return new Range(0, 0);\n      }\n      return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n    };\n\n    Range.prototype.indexOf = function(searchValue) {\n      var offsetValue = searchValue - this._start;\n      if (offsetValue % this._step === 0) {\n        var index = offsetValue / this._step;\n        if (index >= 0 && index < this.size) {\n          return index\n        }\n      }\n      return -1;\n    };\n\n    Range.prototype.lastIndexOf = function(searchValue) {\n      return this.indexOf(searchValue);\n    };\n\n    Range.prototype.__iterate = function(fn, reverse) {\n      var maxIndex = this.size - 1;\n      var step = this._step;\n      var value = reverse ? this._start + maxIndex * step : this._start;\n      for (var ii = 0; ii <= maxIndex; ii++) {\n        if (fn(value, ii, this) === false) {\n          return ii + 1;\n        }\n        value += reverse ? -step : step;\n      }\n      return ii;\n    };\n\n    Range.prototype.__iterator = function(type, reverse) {\n      var maxIndex = this.size - 1;\n      var step = this._step;\n      var value = reverse ? this._start + maxIndex * step : this._start;\n      var ii = 0;\n      return new Iterator(function()  {\n        var v = value;\n        value += reverse ? -step : step;\n        return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n      });\n    };\n\n    Range.prototype.equals = function(other) {\n      return other instanceof Range ?\n        this._start === other._start &&\n        this._end === other._end &&\n        this._step === other._step :\n        deepEqual(this, other);\n    };\n\n\n  var EMPTY_RANGE;\n\n  createClass(Collection, Iterable);\n    function Collection() {\n      throw TypeError('Abstract');\n    }\n\n\n  createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n  createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n  createClass(SetCollection, Collection);function SetCollection() {}\n\n\n  Collection.Keyed = KeyedCollection;\n  Collection.Indexed = IndexedCollection;\n  Collection.Set = SetCollection;\n\n  var imul =\n    typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n    Math.imul :\n    function imul(a, b) {\n      a = a | 0; // int\n      b = b | 0; // int\n      var c = a & 0xffff;\n      var d = b & 0xffff;\n      // Shift by 0 fixes the sign on the high part.\n      return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n    };\n\n  // v8 has an optimization for storing 31-bit signed numbers.\n  // Values which have either 00 or 11 as the high order bits qualify.\n  // This function drops the highest order bit in a signed number, maintaining\n  // the sign bit.\n  function smi(i32) {\n    return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n  }\n\n  function hash(o) {\n    if (o === false || o === null || o === undefined) {\n      return 0;\n    }\n    if (typeof o.valueOf === 'function') {\n      o = o.valueOf();\n      if (o === false || o === null || o === undefined) {\n        return 0;\n      }\n    }\n    if (o === true) {\n      return 1;\n    }\n    var type = typeof o;\n    if (type === 'number') {\n      var h = o | 0;\n      if (h !== o) {\n        h ^= o * 0xFFFFFFFF;\n      }\n      while (o > 0xFFFFFFFF) {\n        o /= 0xFFFFFFFF;\n        h ^= o;\n      }\n      return smi(h);\n    }\n    if (type === 'string') {\n      return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n    }\n    if (typeof o.hashCode === 'function') {\n      return o.hashCode();\n    }\n    if (type === 'object') {\n      return hashJSObj(o);\n    }\n    if (typeof o.toString === 'function') {\n      return hashString(o.toString());\n    }\n    throw new Error('Value type ' + type + ' cannot be hashed.');\n  }\n\n  function cachedHashString(string) {\n    var hash = stringHashCache[string];\n    if (hash === undefined) {\n      hash = hashString(string);\n      if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n        STRING_HASH_CACHE_SIZE = 0;\n        stringHashCache = {};\n      }\n      STRING_HASH_CACHE_SIZE++;\n      stringHashCache[string] = hash;\n    }\n    return hash;\n  }\n\n  // http://jsperf.com/hashing-strings\n  function hashString(string) {\n    // This is the hash from JVM\n    // The hash code for a string is computed as\n    // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n    // where s[i] is the ith character of the string and n is the length of\n    // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n    // (exclusive) by dropping high bits.\n    var hash = 0;\n    for (var ii = 0; ii < string.length; ii++) {\n      hash = 31 * hash + string.charCodeAt(ii) | 0;\n    }\n    return smi(hash);\n  }\n\n  function hashJSObj(obj) {\n    var hash;\n    if (usingWeakMap) {\n      hash = weakMap.get(obj);\n      if (hash !== undefined) {\n        return hash;\n      }\n    }\n\n    hash = obj[UID_HASH_KEY];\n    if (hash !== undefined) {\n      return hash;\n    }\n\n    if (!canDefineProperty) {\n      hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n      if (hash !== undefined) {\n        return hash;\n      }\n\n      hash = getIENodeHash(obj);\n      if (hash !== undefined) {\n        return hash;\n      }\n    }\n\n    hash = ++objHashUID;\n    if (objHashUID & 0x40000000) {\n      objHashUID = 0;\n    }\n\n    if (usingWeakMap) {\n      weakMap.set(obj, hash);\n    } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n      throw new Error('Non-extensible objects are not allowed as keys.');\n    } else if (canDefineProperty) {\n      Object.defineProperty(obj, UID_HASH_KEY, {\n        'enumerable': false,\n        'configurable': false,\n        'writable': false,\n        'value': hash\n      });\n    } else if (obj.propertyIsEnumerable !== undefined &&\n               obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n      // Since we can't define a non-enumerable property on the object\n      // we'll hijack one of the less-used non-enumerable properties to\n      // save our hash on it. Since this is a function it will not show up in\n      // `JSON.stringify` which is what we want.\n      obj.propertyIsEnumerable = function() {\n        return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n      };\n      obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n    } else if (obj.nodeType !== undefined) {\n      // At this point we couldn't get the IE `uniqueID` to use as a hash\n      // and we couldn't use a non-enumerable property to exploit the\n      // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n      // itself.\n      obj[UID_HASH_KEY] = hash;\n    } else {\n      throw new Error('Unable to set a non-enumerable property on object.');\n    }\n\n    return hash;\n  }\n\n  // Get references to ES5 object methods.\n  var isExtensible = Object.isExtensible;\n\n  // True if Object.defineProperty works as expected. IE8 fails this test.\n  var canDefineProperty = (function() {\n    try {\n      Object.defineProperty({}, '@', {});\n      return true;\n    } catch (e) {\n      return false;\n    }\n  }());\n\n  // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n  // and avoid memory leaks from the IE cloneNode bug.\n  function getIENodeHash(node) {\n    if (node && node.nodeType > 0) {\n      switch (node.nodeType) {\n        case 1: // Element\n          return node.uniqueID;\n        case 9: // Document\n          return node.documentElement && node.documentElement.uniqueID;\n      }\n    }\n  }\n\n  // If possible, use a WeakMap.\n  var usingWeakMap = typeof WeakMap === 'function';\n  var weakMap;\n  if (usingWeakMap) {\n    weakMap = new WeakMap();\n  }\n\n  var objHashUID = 0;\n\n  var UID_HASH_KEY = '__immutablehash__';\n  if (typeof Symbol === 'function') {\n    UID_HASH_KEY = Symbol(UID_HASH_KEY);\n  }\n\n  var STRING_HASH_CACHE_MIN_STRLEN = 16;\n  var STRING_HASH_CACHE_MAX_SIZE = 255;\n  var STRING_HASH_CACHE_SIZE = 0;\n  var stringHashCache = {};\n\n  function assertNotInfinite(size) {\n    invariant(\n      size !== Infinity,\n      'Cannot perform this action with an infinite size.'\n    );\n  }\n\n  createClass(Map, KeyedCollection);\n\n    // @pragma Construction\n\n    function Map(value) {\n      return value === null || value === undefined ? emptyMap() :\n        isMap(value) && !isOrdered(value) ? value :\n        emptyMap().withMutations(function(map ) {\n          var iter = KeyedIterable(value);\n          assertNotInfinite(iter.size);\n          iter.forEach(function(v, k)  {return map.set(k, v)});\n        });\n    }\n\n    Map.prototype.toString = function() {\n      return this.__toString('Map {', '}');\n    };\n\n    // @pragma Access\n\n    Map.prototype.get = function(k, notSetValue) {\n      return this._root ?\n        this._root.get(0, undefined, k, notSetValue) :\n        notSetValue;\n    };\n\n    // @pragma Modification\n\n    Map.prototype.set = function(k, v) {\n      return updateMap(this, k, v);\n    };\n\n    Map.prototype.setIn = function(keyPath, v) {\n      return this.updateIn(keyPath, NOT_SET, function()  {return v});\n    };\n\n    Map.prototype.remove = function(k) {\n      return updateMap(this, k, NOT_SET);\n    };\n\n    Map.prototype.deleteIn = function(keyPath) {\n      return this.updateIn(keyPath, function()  {return NOT_SET});\n    };\n\n    Map.prototype.update = function(k, notSetValue, updater) {\n      return arguments.length === 1 ?\n        k(this) :\n        this.updateIn([k], notSetValue, updater);\n    };\n\n    Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n      if (!updater) {\n        updater = notSetValue;\n        notSetValue = undefined;\n      }\n      var updatedValue = updateInDeepMap(\n        this,\n        forceIterator(keyPath),\n        notSetValue,\n        updater\n      );\n      return updatedValue === NOT_SET ? undefined : updatedValue;\n    };\n\n    Map.prototype.clear = function() {\n      if (this.size === 0) {\n        return this;\n      }\n      if (this.__ownerID) {\n        this.size = 0;\n        this._root = null;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return emptyMap();\n    };\n\n    // @pragma Composition\n\n    Map.prototype.merge = function(/*...iters*/) {\n      return mergeIntoMapWith(this, undefined, arguments);\n    };\n\n    Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return mergeIntoMapWith(this, merger, iters);\n    };\n\n    Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n      return this.updateIn(\n        keyPath,\n        emptyMap(),\n        function(m ) {return typeof m.merge === 'function' ?\n          m.merge.apply(m, iters) :\n          iters[iters.length - 1]}\n      );\n    };\n\n    Map.prototype.mergeDeep = function(/*...iters*/) {\n      return mergeIntoMapWith(this, deepMerger, arguments);\n    };\n\n    Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n    };\n\n    Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n      return this.updateIn(\n        keyPath,\n        emptyMap(),\n        function(m ) {return typeof m.mergeDeep === 'function' ?\n          m.mergeDeep.apply(m, iters) :\n          iters[iters.length - 1]}\n      );\n    };\n\n    Map.prototype.sort = function(comparator) {\n      // Late binding\n      return OrderedMap(sortFactory(this, comparator));\n    };\n\n    Map.prototype.sortBy = function(mapper, comparator) {\n      // Late binding\n      return OrderedMap(sortFactory(this, comparator, mapper));\n    };\n\n    // @pragma Mutability\n\n    Map.prototype.withMutations = function(fn) {\n      var mutable = this.asMutable();\n      fn(mutable);\n      return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n    };\n\n    Map.prototype.asMutable = function() {\n      return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n    };\n\n    Map.prototype.asImmutable = function() {\n      return this.__ensureOwner();\n    };\n\n    Map.prototype.wasAltered = function() {\n      return this.__altered;\n    };\n\n    Map.prototype.__iterator = function(type, reverse) {\n      return new MapIterator(this, type, reverse);\n    };\n\n    Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      var iterations = 0;\n      this._root && this._root.iterate(function(entry ) {\n        iterations++;\n        return fn(entry[1], entry[0], this$0);\n      }, reverse);\n      return iterations;\n    };\n\n    Map.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this.__altered = false;\n        return this;\n      }\n      return makeMap(this.size, this._root, ownerID, this.__hash);\n    };\n\n\n  function isMap(maybeMap) {\n    return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n  }\n\n  Map.isMap = isMap;\n\n  var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n  var MapPrototype = Map.prototype;\n  MapPrototype[IS_MAP_SENTINEL] = true;\n  MapPrototype[DELETE] = MapPrototype.remove;\n  MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n  // #pragma Trie Nodes\n\n\n\n    function ArrayMapNode(ownerID, entries) {\n      this.ownerID = ownerID;\n      this.entries = entries;\n    }\n\n    ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      var entries = this.entries;\n      for (var ii = 0, len = entries.length; ii < len; ii++) {\n        if (is(key, entries[ii][0])) {\n          return entries[ii][1];\n        }\n      }\n      return notSetValue;\n    };\n\n    ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      var removed = value === NOT_SET;\n\n      var entries = this.entries;\n      var idx = 0;\n      for (var len = entries.length; idx < len; idx++) {\n        if (is(key, entries[idx][0])) {\n          break;\n        }\n      }\n      var exists = idx < len;\n\n      if (exists ? entries[idx][1] === value : removed) {\n        return this;\n      }\n\n      SetRef(didAlter);\n      (removed || !exists) && SetRef(didChangeSize);\n\n      if (removed && entries.length === 1) {\n        return; // undefined\n      }\n\n      if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n        return createNodes(ownerID, entries, key, value);\n      }\n\n      var isEditable = ownerID && ownerID === this.ownerID;\n      var newEntries = isEditable ? entries : arrCopy(entries);\n\n      if (exists) {\n        if (removed) {\n          idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n        } else {\n          newEntries[idx] = [key, value];\n        }\n      } else {\n        newEntries.push([key, value]);\n      }\n\n      if (isEditable) {\n        this.entries = newEntries;\n        return this;\n      }\n\n      return new ArrayMapNode(ownerID, newEntries);\n    };\n\n\n\n\n    function BitmapIndexedNode(ownerID, bitmap, nodes) {\n      this.ownerID = ownerID;\n      this.bitmap = bitmap;\n      this.nodes = nodes;\n    }\n\n    BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n      var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n      var bitmap = this.bitmap;\n      return (bitmap & bit) === 0 ? notSetValue :\n        this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n    };\n\n    BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n      var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n      var bit = 1 << keyHashFrag;\n      var bitmap = this.bitmap;\n      var exists = (bitmap & bit) !== 0;\n\n      if (!exists && value === NOT_SET) {\n        return this;\n      }\n\n      var idx = popCount(bitmap & (bit - 1));\n      var nodes = this.nodes;\n      var node = exists ? nodes[idx] : undefined;\n      var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n      if (newNode === node) {\n        return this;\n      }\n\n      if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n        return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n      }\n\n      if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n        return nodes[idx ^ 1];\n      }\n\n      if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n        return newNode;\n      }\n\n      var isEditable = ownerID && ownerID === this.ownerID;\n      var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n      var newNodes = exists ? newNode ?\n        setIn(nodes, idx, newNode, isEditable) :\n        spliceOut(nodes, idx, isEditable) :\n        spliceIn(nodes, idx, newNode, isEditable);\n\n      if (isEditable) {\n        this.bitmap = newBitmap;\n        this.nodes = newNodes;\n        return this;\n      }\n\n      return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n    };\n\n\n\n\n    function HashArrayMapNode(ownerID, count, nodes) {\n      this.ownerID = ownerID;\n      this.count = count;\n      this.nodes = nodes;\n    }\n\n    HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n      var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n      var node = this.nodes[idx];\n      return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n    };\n\n    HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n      var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n      var removed = value === NOT_SET;\n      var nodes = this.nodes;\n      var node = nodes[idx];\n\n      if (removed && !node) {\n        return this;\n      }\n\n      var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n      if (newNode === node) {\n        return this;\n      }\n\n      var newCount = this.count;\n      if (!node) {\n        newCount++;\n      } else if (!newNode) {\n        newCount--;\n        if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n          return packNodes(ownerID, nodes, newCount, idx);\n        }\n      }\n\n      var isEditable = ownerID && ownerID === this.ownerID;\n      var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n      if (isEditable) {\n        this.count = newCount;\n        this.nodes = newNodes;\n        return this;\n      }\n\n      return new HashArrayMapNode(ownerID, newCount, newNodes);\n    };\n\n\n\n\n    function HashCollisionNode(ownerID, keyHash, entries) {\n      this.ownerID = ownerID;\n      this.keyHash = keyHash;\n      this.entries = entries;\n    }\n\n    HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      var entries = this.entries;\n      for (var ii = 0, len = entries.length; ii < len; ii++) {\n        if (is(key, entries[ii][0])) {\n          return entries[ii][1];\n        }\n      }\n      return notSetValue;\n    };\n\n    HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      if (keyHash === undefined) {\n        keyHash = hash(key);\n      }\n\n      var removed = value === NOT_SET;\n\n      if (keyHash !== this.keyHash) {\n        if (removed) {\n          return this;\n        }\n        SetRef(didAlter);\n        SetRef(didChangeSize);\n        return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n      }\n\n      var entries = this.entries;\n      var idx = 0;\n      for (var len = entries.length; idx < len; idx++) {\n        if (is(key, entries[idx][0])) {\n          break;\n        }\n      }\n      var exists = idx < len;\n\n      if (exists ? entries[idx][1] === value : removed) {\n        return this;\n      }\n\n      SetRef(didAlter);\n      (removed || !exists) && SetRef(didChangeSize);\n\n      if (removed && len === 2) {\n        return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n      }\n\n      var isEditable = ownerID && ownerID === this.ownerID;\n      var newEntries = isEditable ? entries : arrCopy(entries);\n\n      if (exists) {\n        if (removed) {\n          idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n        } else {\n          newEntries[idx] = [key, value];\n        }\n      } else {\n        newEntries.push([key, value]);\n      }\n\n      if (isEditable) {\n        this.entries = newEntries;\n        return this;\n      }\n\n      return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n    };\n\n\n\n\n    function ValueNode(ownerID, keyHash, entry) {\n      this.ownerID = ownerID;\n      this.keyHash = keyHash;\n      this.entry = entry;\n    }\n\n    ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n      return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n    };\n\n    ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n      var removed = value === NOT_SET;\n      var keyMatch = is(key, this.entry[0]);\n      if (keyMatch ? value === this.entry[1] : removed) {\n        return this;\n      }\n\n      SetRef(didAlter);\n\n      if (removed) {\n        SetRef(didChangeSize);\n        return; // undefined\n      }\n\n      if (keyMatch) {\n        if (ownerID && ownerID === this.ownerID) {\n          this.entry[1] = value;\n          return this;\n        }\n        return new ValueNode(ownerID, this.keyHash, [key, value]);\n      }\n\n      SetRef(didChangeSize);\n      return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n    };\n\n\n\n  // #pragma Iterators\n\n  ArrayMapNode.prototype.iterate =\n  HashCollisionNode.prototype.iterate = function (fn, reverse) {\n    var entries = this.entries;\n    for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n      if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n        return false;\n      }\n    }\n  }\n\n  BitmapIndexedNode.prototype.iterate =\n  HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n    var nodes = this.nodes;\n    for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n      var node = nodes[reverse ? maxIndex - ii : ii];\n      if (node && node.iterate(fn, reverse) === false) {\n        return false;\n      }\n    }\n  }\n\n  ValueNode.prototype.iterate = function (fn, reverse) {\n    return fn(this.entry);\n  }\n\n  createClass(MapIterator, Iterator);\n\n    function MapIterator(map, type, reverse) {\n      this._type = type;\n      this._reverse = reverse;\n      this._stack = map._root && mapIteratorFrame(map._root);\n    }\n\n    MapIterator.prototype.next = function() {\n      var type = this._type;\n      var stack = this._stack;\n      while (stack) {\n        var node = stack.node;\n        var index = stack.index++;\n        var maxIndex;\n        if (node.entry) {\n          if (index === 0) {\n            return mapIteratorValue(type, node.entry);\n          }\n        } else if (node.entries) {\n          maxIndex = node.entries.length - 1;\n          if (index <= maxIndex) {\n            return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n          }\n        } else {\n          maxIndex = node.nodes.length - 1;\n          if (index <= maxIndex) {\n            var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n            if (subNode) {\n              if (subNode.entry) {\n                return mapIteratorValue(type, subNode.entry);\n              }\n              stack = this._stack = mapIteratorFrame(subNode, stack);\n            }\n            continue;\n          }\n        }\n        stack = this._stack = this._stack.__prev;\n      }\n      return iteratorDone();\n    };\n\n\n  function mapIteratorValue(type, entry) {\n    return iteratorValue(type, entry[0], entry[1]);\n  }\n\n  function mapIteratorFrame(node, prev) {\n    return {\n      node: node,\n      index: 0,\n      __prev: prev\n    };\n  }\n\n  function makeMap(size, root, ownerID, hash) {\n    var map = Object.create(MapPrototype);\n    map.size = size;\n    map._root = root;\n    map.__ownerID = ownerID;\n    map.__hash = hash;\n    map.__altered = false;\n    return map;\n  }\n\n  var EMPTY_MAP;\n  function emptyMap() {\n    return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n  }\n\n  function updateMap(map, k, v) {\n    var newRoot;\n    var newSize;\n    if (!map._root) {\n      if (v === NOT_SET) {\n        return map;\n      }\n      newSize = 1;\n      newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n    } else {\n      var didChangeSize = MakeRef(CHANGE_LENGTH);\n      var didAlter = MakeRef(DID_ALTER);\n      newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n      if (!didAlter.value) {\n        return map;\n      }\n      newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n    }\n    if (map.__ownerID) {\n      map.size = newSize;\n      map._root = newRoot;\n      map.__hash = undefined;\n      map.__altered = true;\n      return map;\n    }\n    return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n  }\n\n  function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n    if (!node) {\n      if (value === NOT_SET) {\n        return node;\n      }\n      SetRef(didAlter);\n      SetRef(didChangeSize);\n      return new ValueNode(ownerID, keyHash, [key, value]);\n    }\n    return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n  }\n\n  function isLeafNode(node) {\n    return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n  }\n\n  function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n    if (node.keyHash === keyHash) {\n      return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n    }\n\n    var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n    var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n    var newNode;\n    var nodes = idx1 === idx2 ?\n      [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n      ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n    return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n  }\n\n  function createNodes(ownerID, entries, key, value) {\n    if (!ownerID) {\n      ownerID = new OwnerID();\n    }\n    var node = new ValueNode(ownerID, hash(key), [key, value]);\n    for (var ii = 0; ii < entries.length; ii++) {\n      var entry = entries[ii];\n      node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n    }\n    return node;\n  }\n\n  function packNodes(ownerID, nodes, count, excluding) {\n    var bitmap = 0;\n    var packedII = 0;\n    var packedNodes = new Array(count);\n    for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n      var node = nodes[ii];\n      if (node !== undefined && ii !== excluding) {\n        bitmap |= bit;\n        packedNodes[packedII++] = node;\n      }\n    }\n    return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n  }\n\n  function expandNodes(ownerID, nodes, bitmap, including, node) {\n    var count = 0;\n    var expandedNodes = new Array(SIZE);\n    for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n      expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n    }\n    expandedNodes[including] = node;\n    return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n  }\n\n  function mergeIntoMapWith(map, merger, iterables) {\n    var iters = [];\n    for (var ii = 0; ii < iterables.length; ii++) {\n      var value = iterables[ii];\n      var iter = KeyedIterable(value);\n      if (!isIterable(value)) {\n        iter = iter.map(function(v ) {return fromJS(v)});\n      }\n      iters.push(iter);\n    }\n    return mergeIntoCollectionWith(map, merger, iters);\n  }\n\n  function deepMerger(existing, value, key) {\n    return existing && existing.mergeDeep && isIterable(value) ?\n      existing.mergeDeep(value) :\n      is(existing, value) ? existing : value;\n  }\n\n  function deepMergerWith(merger) {\n    return function(existing, value, key)  {\n      if (existing && existing.mergeDeepWith && isIterable(value)) {\n        return existing.mergeDeepWith(merger, value);\n      }\n      var nextValue = merger(existing, value, key);\n      return is(existing, nextValue) ? existing : nextValue;\n    };\n  }\n\n  function mergeIntoCollectionWith(collection, merger, iters) {\n    iters = iters.filter(function(x ) {return x.size !== 0});\n    if (iters.length === 0) {\n      return collection;\n    }\n    if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n      return collection.constructor(iters[0]);\n    }\n    return collection.withMutations(function(collection ) {\n      var mergeIntoMap = merger ?\n        function(value, key)  {\n          collection.update(key, NOT_SET, function(existing )\n            {return existing === NOT_SET ? value : merger(existing, value, key)}\n          );\n        } :\n        function(value, key)  {\n          collection.set(key, value);\n        }\n      for (var ii = 0; ii < iters.length; ii++) {\n        iters[ii].forEach(mergeIntoMap);\n      }\n    });\n  }\n\n  function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n    var isNotSet = existing === NOT_SET;\n    var step = keyPathIter.next();\n    if (step.done) {\n      var existingValue = isNotSet ? notSetValue : existing;\n      var newValue = updater(existingValue);\n      return newValue === existingValue ? existing : newValue;\n    }\n    invariant(\n      isNotSet || (existing && existing.set),\n      'invalid keyPath'\n    );\n    var key = step.value;\n    var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n    var nextUpdated = updateInDeepMap(\n      nextExisting,\n      keyPathIter,\n      notSetValue,\n      updater\n    );\n    return nextUpdated === nextExisting ? existing :\n      nextUpdated === NOT_SET ? existing.remove(key) :\n      (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n  }\n\n  function popCount(x) {\n    x = x - ((x >> 1) & 0x55555555);\n    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n    x = (x + (x >> 4)) & 0x0f0f0f0f;\n    x = x + (x >> 8);\n    x = x + (x >> 16);\n    return x & 0x7f;\n  }\n\n  function setIn(array, idx, val, canEdit) {\n    var newArray = canEdit ? array : arrCopy(array);\n    newArray[idx] = val;\n    return newArray;\n  }\n\n  function spliceIn(array, idx, val, canEdit) {\n    var newLen = array.length + 1;\n    if (canEdit && idx + 1 === newLen) {\n      array[idx] = val;\n      return array;\n    }\n    var newArray = new Array(newLen);\n    var after = 0;\n    for (var ii = 0; ii < newLen; ii++) {\n      if (ii === idx) {\n        newArray[ii] = val;\n        after = -1;\n      } else {\n        newArray[ii] = array[ii + after];\n      }\n    }\n    return newArray;\n  }\n\n  function spliceOut(array, idx, canEdit) {\n    var newLen = array.length - 1;\n    if (canEdit && idx === newLen) {\n      array.pop();\n      return array;\n    }\n    var newArray = new Array(newLen);\n    var after = 0;\n    for (var ii = 0; ii < newLen; ii++) {\n      if (ii === idx) {\n        after = 1;\n      }\n      newArray[ii] = array[ii + after];\n    }\n    return newArray;\n  }\n\n  var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n  var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n  var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n  createClass(List, IndexedCollection);\n\n    // @pragma Construction\n\n    function List(value) {\n      var empty = emptyList();\n      if (value === null || value === undefined) {\n        return empty;\n      }\n      if (isList(value)) {\n        return value;\n      }\n      var iter = IndexedIterable(value);\n      var size = iter.size;\n      if (size === 0) {\n        return empty;\n      }\n      assertNotInfinite(size);\n      if (size > 0 && size < SIZE) {\n        return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n      }\n      return empty.withMutations(function(list ) {\n        list.setSize(size);\n        iter.forEach(function(v, i)  {return list.set(i, v)});\n      });\n    }\n\n    List.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    List.prototype.toString = function() {\n      return this.__toString('List [', ']');\n    };\n\n    // @pragma Access\n\n    List.prototype.get = function(index, notSetValue) {\n      index = wrapIndex(this, index);\n      if (index >= 0 && index < this.size) {\n        index += this._origin;\n        var node = listNodeFor(this, index);\n        return node && node.array[index & MASK];\n      }\n      return notSetValue;\n    };\n\n    // @pragma Modification\n\n    List.prototype.set = function(index, value) {\n      return updateList(this, index, value);\n    };\n\n    List.prototype.remove = function(index) {\n      return !this.has(index) ? this :\n        index === 0 ? this.shift() :\n        index === this.size - 1 ? this.pop() :\n        this.splice(index, 1);\n    };\n\n    List.prototype.insert = function(index, value) {\n      return this.splice(index, 0, value);\n    };\n\n    List.prototype.clear = function() {\n      if (this.size === 0) {\n        return this;\n      }\n      if (this.__ownerID) {\n        this.size = this._origin = this._capacity = 0;\n        this._level = SHIFT;\n        this._root = this._tail = null;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return emptyList();\n    };\n\n    List.prototype.push = function(/*...values*/) {\n      var values = arguments;\n      var oldSize = this.size;\n      return this.withMutations(function(list ) {\n        setListBounds(list, 0, oldSize + values.length);\n        for (var ii = 0; ii < values.length; ii++) {\n          list.set(oldSize + ii, values[ii]);\n        }\n      });\n    };\n\n    List.prototype.pop = function() {\n      return setListBounds(this, 0, -1);\n    };\n\n    List.prototype.unshift = function(/*...values*/) {\n      var values = arguments;\n      return this.withMutations(function(list ) {\n        setListBounds(list, -values.length);\n        for (var ii = 0; ii < values.length; ii++) {\n          list.set(ii, values[ii]);\n        }\n      });\n    };\n\n    List.prototype.shift = function() {\n      return setListBounds(this, 1);\n    };\n\n    // @pragma Composition\n\n    List.prototype.merge = function(/*...iters*/) {\n      return mergeIntoListWith(this, undefined, arguments);\n    };\n\n    List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return mergeIntoListWith(this, merger, iters);\n    };\n\n    List.prototype.mergeDeep = function(/*...iters*/) {\n      return mergeIntoListWith(this, deepMerger, arguments);\n    };\n\n    List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return mergeIntoListWith(this, deepMergerWith(merger), iters);\n    };\n\n    List.prototype.setSize = function(size) {\n      return setListBounds(this, 0, size);\n    };\n\n    // @pragma Iteration\n\n    List.prototype.slice = function(begin, end) {\n      var size = this.size;\n      if (wholeSlice(begin, end, size)) {\n        return this;\n      }\n      return setListBounds(\n        this,\n        resolveBegin(begin, size),\n        resolveEnd(end, size)\n      );\n    };\n\n    List.prototype.__iterator = function(type, reverse) {\n      var index = 0;\n      var values = iterateList(this, reverse);\n      return new Iterator(function()  {\n        var value = values();\n        return value === DONE ?\n          iteratorDone() :\n          iteratorValue(type, index++, value);\n      });\n    };\n\n    List.prototype.__iterate = function(fn, reverse) {\n      var index = 0;\n      var values = iterateList(this, reverse);\n      var value;\n      while ((value = values()) !== DONE) {\n        if (fn(value, index++, this) === false) {\n          break;\n        }\n      }\n      return index;\n    };\n\n    List.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        return this;\n      }\n      return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n    };\n\n\n  function isList(maybeList) {\n    return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n  }\n\n  List.isList = isList;\n\n  var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n  var ListPrototype = List.prototype;\n  ListPrototype[IS_LIST_SENTINEL] = true;\n  ListPrototype[DELETE] = ListPrototype.remove;\n  ListPrototype.setIn = MapPrototype.setIn;\n  ListPrototype.deleteIn =\n  ListPrototype.removeIn = MapPrototype.removeIn;\n  ListPrototype.update = MapPrototype.update;\n  ListPrototype.updateIn = MapPrototype.updateIn;\n  ListPrototype.mergeIn = MapPrototype.mergeIn;\n  ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n  ListPrototype.withMutations = MapPrototype.withMutations;\n  ListPrototype.asMutable = MapPrototype.asMutable;\n  ListPrototype.asImmutable = MapPrototype.asImmutable;\n  ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n    function VNode(array, ownerID) {\n      this.array = array;\n      this.ownerID = ownerID;\n    }\n\n    // TODO: seems like these methods are very similar\n\n    VNode.prototype.removeBefore = function(ownerID, level, index) {\n      if (index === level ? 1 << level : 0 || this.array.length === 0) {\n        return this;\n      }\n      var originIndex = (index >>> level) & MASK;\n      if (originIndex >= this.array.length) {\n        return new VNode([], ownerID);\n      }\n      var removingFirst = originIndex === 0;\n      var newChild;\n      if (level > 0) {\n        var oldChild = this.array[originIndex];\n        newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n        if (newChild === oldChild && removingFirst) {\n          return this;\n        }\n      }\n      if (removingFirst && !newChild) {\n        return this;\n      }\n      var editable = editableVNode(this, ownerID);\n      if (!removingFirst) {\n        for (var ii = 0; ii < originIndex; ii++) {\n          editable.array[ii] = undefined;\n        }\n      }\n      if (newChild) {\n        editable.array[originIndex] = newChild;\n      }\n      return editable;\n    };\n\n    VNode.prototype.removeAfter = function(ownerID, level, index) {\n      if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n        return this;\n      }\n      var sizeIndex = ((index - 1) >>> level) & MASK;\n      if (sizeIndex >= this.array.length) {\n        return this;\n      }\n\n      var newChild;\n      if (level > 0) {\n        var oldChild = this.array[sizeIndex];\n        newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n        if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n          return this;\n        }\n      }\n\n      var editable = editableVNode(this, ownerID);\n      editable.array.splice(sizeIndex + 1);\n      if (newChild) {\n        editable.array[sizeIndex] = newChild;\n      }\n      return editable;\n    };\n\n\n\n  var DONE = {};\n\n  function iterateList(list, reverse) {\n    var left = list._origin;\n    var right = list._capacity;\n    var tailPos = getTailOffset(right);\n    var tail = list._tail;\n\n    return iterateNodeOrLeaf(list._root, list._level, 0);\n\n    function iterateNodeOrLeaf(node, level, offset) {\n      return level === 0 ?\n        iterateLeaf(node, offset) :\n        iterateNode(node, level, offset);\n    }\n\n    function iterateLeaf(node, offset) {\n      var array = offset === tailPos ? tail && tail.array : node && node.array;\n      var from = offset > left ? 0 : left - offset;\n      var to = right - offset;\n      if (to > SIZE) {\n        to = SIZE;\n      }\n      return function()  {\n        if (from === to) {\n          return DONE;\n        }\n        var idx = reverse ? --to : from++;\n        return array && array[idx];\n      };\n    }\n\n    function iterateNode(node, level, offset) {\n      var values;\n      var array = node && node.array;\n      var from = offset > left ? 0 : (left - offset) >> level;\n      var to = ((right - offset) >> level) + 1;\n      if (to > SIZE) {\n        to = SIZE;\n      }\n      return function()  {\n        do {\n          if (values) {\n            var value = values();\n            if (value !== DONE) {\n              return value;\n            }\n            values = null;\n          }\n          if (from === to) {\n            return DONE;\n          }\n          var idx = reverse ? --to : from++;\n          values = iterateNodeOrLeaf(\n            array && array[idx], level - SHIFT, offset + (idx << level)\n          );\n        } while (true);\n      };\n    }\n  }\n\n  function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n    var list = Object.create(ListPrototype);\n    list.size = capacity - origin;\n    list._origin = origin;\n    list._capacity = capacity;\n    list._level = level;\n    list._root = root;\n    list._tail = tail;\n    list.__ownerID = ownerID;\n    list.__hash = hash;\n    list.__altered = false;\n    return list;\n  }\n\n  var EMPTY_LIST;\n  function emptyList() {\n    return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n  }\n\n  function updateList(list, index, value) {\n    index = wrapIndex(list, index);\n\n    if (index !== index) {\n      return list;\n    }\n\n    if (index >= list.size || index < 0) {\n      return list.withMutations(function(list ) {\n        index < 0 ?\n          setListBounds(list, index).set(0, value) :\n          setListBounds(list, 0, index + 1).set(index, value)\n      });\n    }\n\n    index += list._origin;\n\n    var newTail = list._tail;\n    var newRoot = list._root;\n    var didAlter = MakeRef(DID_ALTER);\n    if (index >= getTailOffset(list._capacity)) {\n      newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n    } else {\n      newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n    }\n\n    if (!didAlter.value) {\n      return list;\n    }\n\n    if (list.__ownerID) {\n      list._root = newRoot;\n      list._tail = newTail;\n      list.__hash = undefined;\n      list.__altered = true;\n      return list;\n    }\n    return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n  }\n\n  function updateVNode(node, ownerID, level, index, value, didAlter) {\n    var idx = (index >>> level) & MASK;\n    var nodeHas = node && idx < node.array.length;\n    if (!nodeHas && value === undefined) {\n      return node;\n    }\n\n    var newNode;\n\n    if (level > 0) {\n      var lowerNode = node && node.array[idx];\n      var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n      if (newLowerNode === lowerNode) {\n        return node;\n      }\n      newNode = editableVNode(node, ownerID);\n      newNode.array[idx] = newLowerNode;\n      return newNode;\n    }\n\n    if (nodeHas && node.array[idx] === value) {\n      return node;\n    }\n\n    SetRef(didAlter);\n\n    newNode = editableVNode(node, ownerID);\n    if (value === undefined && idx === newNode.array.length - 1) {\n      newNode.array.pop();\n    } else {\n      newNode.array[idx] = value;\n    }\n    return newNode;\n  }\n\n  function editableVNode(node, ownerID) {\n    if (ownerID && node && ownerID === node.ownerID) {\n      return node;\n    }\n    return new VNode(node ? node.array.slice() : [], ownerID);\n  }\n\n  function listNodeFor(list, rawIndex) {\n    if (rawIndex >= getTailOffset(list._capacity)) {\n      return list._tail;\n    }\n    if (rawIndex < 1 << (list._level + SHIFT)) {\n      var node = list._root;\n      var level = list._level;\n      while (node && level > 0) {\n        node = node.array[(rawIndex >>> level) & MASK];\n        level -= SHIFT;\n      }\n      return node;\n    }\n  }\n\n  function setListBounds(list, begin, end) {\n    // Sanitize begin & end using this shorthand for ToInt32(argument)\n    // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n    if (begin !== undefined) {\n      begin = begin | 0;\n    }\n    if (end !== undefined) {\n      end = end | 0;\n    }\n    var owner = list.__ownerID || new OwnerID();\n    var oldOrigin = list._origin;\n    var oldCapacity = list._capacity;\n    var newOrigin = oldOrigin + begin;\n    var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n    if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n      return list;\n    }\n\n    // If it's going to end after it starts, it's empty.\n    if (newOrigin >= newCapacity) {\n      return list.clear();\n    }\n\n    var newLevel = list._level;\n    var newRoot = list._root;\n\n    // New origin might need creating a higher root.\n    var offsetShift = 0;\n    while (newOrigin + offsetShift < 0) {\n      newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n      newLevel += SHIFT;\n      offsetShift += 1 << newLevel;\n    }\n    if (offsetShift) {\n      newOrigin += offsetShift;\n      oldOrigin += offsetShift;\n      newCapacity += offsetShift;\n      oldCapacity += offsetShift;\n    }\n\n    var oldTailOffset = getTailOffset(oldCapacity);\n    var newTailOffset = getTailOffset(newCapacity);\n\n    // New size might need creating a higher root.\n    while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n      newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n      newLevel += SHIFT;\n    }\n\n    // Locate or create the new tail.\n    var oldTail = list._tail;\n    var newTail = newTailOffset < oldTailOffset ?\n      listNodeFor(list, newCapacity - 1) :\n      newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n    // Merge Tail into tree.\n    if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n      newRoot = editableVNode(newRoot, owner);\n      var node = newRoot;\n      for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n        var idx = (oldTailOffset >>> level) & MASK;\n        node = node.array[idx] = editableVNode(node.array[idx], owner);\n      }\n      node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n    }\n\n    // If the size has been reduced, there's a chance the tail needs to be trimmed.\n    if (newCapacity < oldCapacity) {\n      newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n    }\n\n    // If the new origin is within the tail, then we do not need a root.\n    if (newOrigin >= newTailOffset) {\n      newOrigin -= newTailOffset;\n      newCapacity -= newTailOffset;\n      newLevel = SHIFT;\n      newRoot = null;\n      newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n    // Otherwise, if the root has been trimmed, garbage collect.\n    } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n      offsetShift = 0;\n\n      // Identify the new top root node of the subtree of the old root.\n      while (newRoot) {\n        var beginIndex = (newOrigin >>> newLevel) & MASK;\n        if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n          break;\n        }\n        if (beginIndex) {\n          offsetShift += (1 << newLevel) * beginIndex;\n        }\n        newLevel -= SHIFT;\n        newRoot = newRoot.array[beginIndex];\n      }\n\n      // Trim the new sides of the new root.\n      if (newRoot && newOrigin > oldOrigin) {\n        newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n      }\n      if (newRoot && newTailOffset < oldTailOffset) {\n        newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n      }\n      if (offsetShift) {\n        newOrigin -= offsetShift;\n        newCapacity -= offsetShift;\n      }\n    }\n\n    if (list.__ownerID) {\n      list.size = newCapacity - newOrigin;\n      list._origin = newOrigin;\n      list._capacity = newCapacity;\n      list._level = newLevel;\n      list._root = newRoot;\n      list._tail = newTail;\n      list.__hash = undefined;\n      list.__altered = true;\n      return list;\n    }\n    return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n  }\n\n  function mergeIntoListWith(list, merger, iterables) {\n    var iters = [];\n    var maxSize = 0;\n    for (var ii = 0; ii < iterables.length; ii++) {\n      var value = iterables[ii];\n      var iter = IndexedIterable(value);\n      if (iter.size > maxSize) {\n        maxSize = iter.size;\n      }\n      if (!isIterable(value)) {\n        iter = iter.map(function(v ) {return fromJS(v)});\n      }\n      iters.push(iter);\n    }\n    if (maxSize > list.size) {\n      list = list.setSize(maxSize);\n    }\n    return mergeIntoCollectionWith(list, merger, iters);\n  }\n\n  function getTailOffset(size) {\n    return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n  }\n\n  createClass(OrderedMap, Map);\n\n    // @pragma Construction\n\n    function OrderedMap(value) {\n      return value === null || value === undefined ? emptyOrderedMap() :\n        isOrderedMap(value) ? value :\n        emptyOrderedMap().withMutations(function(map ) {\n          var iter = KeyedIterable(value);\n          assertNotInfinite(iter.size);\n          iter.forEach(function(v, k)  {return map.set(k, v)});\n        });\n    }\n\n    OrderedMap.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    OrderedMap.prototype.toString = function() {\n      return this.__toString('OrderedMap {', '}');\n    };\n\n    // @pragma Access\n\n    OrderedMap.prototype.get = function(k, notSetValue) {\n      var index = this._map.get(k);\n      return index !== undefined ? this._list.get(index)[1] : notSetValue;\n    };\n\n    // @pragma Modification\n\n    OrderedMap.prototype.clear = function() {\n      if (this.size === 0) {\n        return this;\n      }\n      if (this.__ownerID) {\n        this.size = 0;\n        this._map.clear();\n        this._list.clear();\n        return this;\n      }\n      return emptyOrderedMap();\n    };\n\n    OrderedMap.prototype.set = function(k, v) {\n      return updateOrderedMap(this, k, v);\n    };\n\n    OrderedMap.prototype.remove = function(k) {\n      return updateOrderedMap(this, k, NOT_SET);\n    };\n\n    OrderedMap.prototype.wasAltered = function() {\n      return this._map.wasAltered() || this._list.wasAltered();\n    };\n\n    OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return this._list.__iterate(\n        function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n        reverse\n      );\n    };\n\n    OrderedMap.prototype.__iterator = function(type, reverse) {\n      return this._list.fromEntrySeq().__iterator(type, reverse);\n    };\n\n    OrderedMap.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      var newMap = this._map.__ensureOwner(ownerID);\n      var newList = this._list.__ensureOwner(ownerID);\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this._map = newMap;\n        this._list = newList;\n        return this;\n      }\n      return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n    };\n\n\n  function isOrderedMap(maybeOrderedMap) {\n    return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n  }\n\n  OrderedMap.isOrderedMap = isOrderedMap;\n\n  OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n  OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n  function makeOrderedMap(map, list, ownerID, hash) {\n    var omap = Object.create(OrderedMap.prototype);\n    omap.size = map ? map.size : 0;\n    omap._map = map;\n    omap._list = list;\n    omap.__ownerID = ownerID;\n    omap.__hash = hash;\n    return omap;\n  }\n\n  var EMPTY_ORDERED_MAP;\n  function emptyOrderedMap() {\n    return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n  }\n\n  function updateOrderedMap(omap, k, v) {\n    var map = omap._map;\n    var list = omap._list;\n    var i = map.get(k);\n    var has = i !== undefined;\n    var newMap;\n    var newList;\n    if (v === NOT_SET) { // removed\n      if (!has) {\n        return omap;\n      }\n      if (list.size >= SIZE && list.size >= map.size * 2) {\n        newList = list.filter(function(entry, idx)  {return entry !== undefined && i !== idx});\n        newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n        if (omap.__ownerID) {\n          newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n        }\n      } else {\n        newMap = map.remove(k);\n        newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n      }\n    } else {\n      if (has) {\n        if (v === list.get(i)[1]) {\n          return omap;\n        }\n        newMap = map;\n        newList = list.set(i, [k, v]);\n      } else {\n        newMap = map.set(k, list.size);\n        newList = list.set(list.size, [k, v]);\n      }\n    }\n    if (omap.__ownerID) {\n      omap.size = newMap.size;\n      omap._map = newMap;\n      omap._list = newList;\n      omap.__hash = undefined;\n      return omap;\n    }\n    return makeOrderedMap(newMap, newList);\n  }\n\n  createClass(ToKeyedSequence, KeyedSeq);\n    function ToKeyedSequence(indexed, useKeys) {\n      this._iter = indexed;\n      this._useKeys = useKeys;\n      this.size = indexed.size;\n    }\n\n    ToKeyedSequence.prototype.get = function(key, notSetValue) {\n      return this._iter.get(key, notSetValue);\n    };\n\n    ToKeyedSequence.prototype.has = function(key) {\n      return this._iter.has(key);\n    };\n\n    ToKeyedSequence.prototype.valueSeq = function() {\n      return this._iter.valueSeq();\n    };\n\n    ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n      var reversedSequence = reverseFactory(this, true);\n      if (!this._useKeys) {\n        reversedSequence.valueSeq = function()  {return this$0._iter.toSeq().reverse()};\n      }\n      return reversedSequence;\n    };\n\n    ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n      var mappedSequence = mapFactory(this, mapper, context);\n      if (!this._useKeys) {\n        mappedSequence.valueSeq = function()  {return this$0._iter.toSeq().map(mapper, context)};\n      }\n      return mappedSequence;\n    };\n\n    ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      var ii;\n      return this._iter.__iterate(\n        this._useKeys ?\n          function(v, k)  {return fn(v, k, this$0)} :\n          ((ii = reverse ? resolveSize(this) : 0),\n            function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n        reverse\n      );\n    };\n\n    ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n      if (this._useKeys) {\n        return this._iter.__iterator(type, reverse);\n      }\n      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n      var ii = reverse ? resolveSize(this) : 0;\n      return new Iterator(function()  {\n        var step = iterator.next();\n        return step.done ? step :\n          iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n      });\n    };\n\n  ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n  createClass(ToIndexedSequence, IndexedSeq);\n    function ToIndexedSequence(iter) {\n      this._iter = iter;\n      this.size = iter.size;\n    }\n\n    ToIndexedSequence.prototype.includes = function(value) {\n      return this._iter.includes(value);\n    };\n\n    ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      var iterations = 0;\n      return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n    };\n\n    ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n      var iterations = 0;\n      return new Iterator(function()  {\n        var step = iterator.next();\n        return step.done ? step :\n          iteratorValue(type, iterations++, step.value, step)\n      });\n    };\n\n\n\n  createClass(ToSetSequence, SetSeq);\n    function ToSetSequence(iter) {\n      this._iter = iter;\n      this.size = iter.size;\n    }\n\n    ToSetSequence.prototype.has = function(key) {\n      return this._iter.includes(key);\n    };\n\n    ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n    };\n\n    ToSetSequence.prototype.__iterator = function(type, reverse) {\n      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n      return new Iterator(function()  {\n        var step = iterator.next();\n        return step.done ? step :\n          iteratorValue(type, step.value, step.value, step);\n      });\n    };\n\n\n\n  createClass(FromEntriesSequence, KeyedSeq);\n    function FromEntriesSequence(entries) {\n      this._iter = entries;\n      this.size = entries.size;\n    }\n\n    FromEntriesSequence.prototype.entrySeq = function() {\n      return this._iter.toSeq();\n    };\n\n    FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return this._iter.__iterate(function(entry ) {\n        // Check if entry exists first so array access doesn't throw for holes\n        // in the parent iteration.\n        if (entry) {\n          validateEntry(entry);\n          var indexedIterable = isIterable(entry);\n          return fn(\n            indexedIterable ? entry.get(1) : entry[1],\n            indexedIterable ? entry.get(0) : entry[0],\n            this$0\n          );\n        }\n      }, reverse);\n    };\n\n    FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n      return new Iterator(function()  {\n        while (true) {\n          var step = iterator.next();\n          if (step.done) {\n            return step;\n          }\n          var entry = step.value;\n          // Check if entry exists first so array access doesn't throw for holes\n          // in the parent iteration.\n          if (entry) {\n            validateEntry(entry);\n            var indexedIterable = isIterable(entry);\n            return iteratorValue(\n              type,\n              indexedIterable ? entry.get(0) : entry[0],\n              indexedIterable ? entry.get(1) : entry[1],\n              step\n            );\n          }\n        }\n      });\n    };\n\n\n  ToIndexedSequence.prototype.cacheResult =\n  ToKeyedSequence.prototype.cacheResult =\n  ToSetSequence.prototype.cacheResult =\n  FromEntriesSequence.prototype.cacheResult =\n    cacheResultThrough;\n\n\n  function flipFactory(iterable) {\n    var flipSequence = makeSequence(iterable);\n    flipSequence._iter = iterable;\n    flipSequence.size = iterable.size;\n    flipSequence.flip = function()  {return iterable};\n    flipSequence.reverse = function () {\n      var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n      reversedSequence.flip = function()  {return iterable.reverse()};\n      return reversedSequence;\n    };\n    flipSequence.has = function(key ) {return iterable.includes(key)};\n    flipSequence.includes = function(key ) {return iterable.has(key)};\n    flipSequence.cacheResult = cacheResultThrough;\n    flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n      return iterable.__iterate(function(v, k)  {return fn(k, v, this$0) !== false}, reverse);\n    }\n    flipSequence.__iteratorUncached = function(type, reverse) {\n      if (type === ITERATE_ENTRIES) {\n        var iterator = iterable.__iterator(type, reverse);\n        return new Iterator(function()  {\n          var step = iterator.next();\n          if (!step.done) {\n            var k = step.value[0];\n            step.value[0] = step.value[1];\n            step.value[1] = k;\n          }\n          return step;\n        });\n      }\n      return iterable.__iterator(\n        type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n        reverse\n      );\n    }\n    return flipSequence;\n  }\n\n\n  function mapFactory(iterable, mapper, context) {\n    var mappedSequence = makeSequence(iterable);\n    mappedSequence.size = iterable.size;\n    mappedSequence.has = function(key ) {return iterable.has(key)};\n    mappedSequence.get = function(key, notSetValue)  {\n      var v = iterable.get(key, NOT_SET);\n      return v === NOT_SET ?\n        notSetValue :\n        mapper.call(context, v, key, iterable);\n    };\n    mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n      return iterable.__iterate(\n        function(v, k, c)  {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n        reverse\n      );\n    }\n    mappedSequence.__iteratorUncached = function (type, reverse) {\n      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n      return new Iterator(function()  {\n        var step = iterator.next();\n        if (step.done) {\n          return step;\n        }\n        var entry = step.value;\n        var key = entry[0];\n        return iteratorValue(\n          type,\n          key,\n          mapper.call(context, entry[1], key, iterable),\n          step\n        );\n      });\n    }\n    return mappedSequence;\n  }\n\n\n  function reverseFactory(iterable, useKeys) {\n    var reversedSequence = makeSequence(iterable);\n    reversedSequence._iter = iterable;\n    reversedSequence.size = iterable.size;\n    reversedSequence.reverse = function()  {return iterable};\n    if (iterable.flip) {\n      reversedSequence.flip = function () {\n        var flipSequence = flipFactory(iterable);\n        flipSequence.reverse = function()  {return iterable.flip()};\n        return flipSequence;\n      };\n    }\n    reversedSequence.get = function(key, notSetValue) \n      {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n    reversedSequence.has = function(key )\n      {return iterable.has(useKeys ? key : -1 - key)};\n    reversedSequence.includes = function(value ) {return iterable.includes(value)};\n    reversedSequence.cacheResult = cacheResultThrough;\n    reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n      return iterable.__iterate(function(v, k)  {return fn(v, k, this$0)}, !reverse);\n    };\n    reversedSequence.__iterator =\n      function(type, reverse)  {return iterable.__iterator(type, !reverse)};\n    return reversedSequence;\n  }\n\n\n  function filterFactory(iterable, predicate, context, useKeys) {\n    var filterSequence = makeSequence(iterable);\n    if (useKeys) {\n      filterSequence.has = function(key ) {\n        var v = iterable.get(key, NOT_SET);\n        return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n      };\n      filterSequence.get = function(key, notSetValue)  {\n        var v = iterable.get(key, NOT_SET);\n        return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n          v : notSetValue;\n      };\n    }\n    filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n      var iterations = 0;\n      iterable.__iterate(function(v, k, c)  {\n        if (predicate.call(context, v, k, c)) {\n          iterations++;\n          return fn(v, useKeys ? k : iterations - 1, this$0);\n        }\n      }, reverse);\n      return iterations;\n    };\n    filterSequence.__iteratorUncached = function (type, reverse) {\n      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n      var iterations = 0;\n      return new Iterator(function()  {\n        while (true) {\n          var step = iterator.next();\n          if (step.done) {\n            return step;\n          }\n          var entry = step.value;\n          var key = entry[0];\n          var value = entry[1];\n          if (predicate.call(context, value, key, iterable)) {\n            return iteratorValue(type, useKeys ? key : iterations++, value, step);\n          }\n        }\n      });\n    }\n    return filterSequence;\n  }\n\n\n  function countByFactory(iterable, grouper, context) {\n    var groups = Map().asMutable();\n    iterable.__iterate(function(v, k)  {\n      groups.update(\n        grouper.call(context, v, k, iterable),\n        0,\n        function(a ) {return a + 1}\n      );\n    });\n    return groups.asImmutable();\n  }\n\n\n  function groupByFactory(iterable, grouper, context) {\n    var isKeyedIter = isKeyed(iterable);\n    var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n    iterable.__iterate(function(v, k)  {\n      groups.update(\n        grouper.call(context, v, k, iterable),\n        function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n      );\n    });\n    var coerce = iterableClass(iterable);\n    return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n  }\n\n\n  function sliceFactory(iterable, begin, end, useKeys) {\n    var originalSize = iterable.size;\n\n    // Sanitize begin & end using this shorthand for ToInt32(argument)\n    // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n    if (begin !== undefined) {\n      begin = begin | 0;\n    }\n    if (end !== undefined) {\n      end = end | 0;\n    }\n\n    if (wholeSlice(begin, end, originalSize)) {\n      return iterable;\n    }\n\n    var resolvedBegin = resolveBegin(begin, originalSize);\n    var resolvedEnd = resolveEnd(end, originalSize);\n\n    // begin or end will be NaN if they were provided as negative numbers and\n    // this iterable's size is unknown. In that case, cache first so there is\n    // a known size and these do not resolve to NaN.\n    if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n      return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n    }\n\n    // Note: resolvedEnd is undefined when the original sequence's length is\n    // unknown and this slice did not supply an end and should contain all\n    // elements after resolvedBegin.\n    // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n    var resolvedSize = resolvedEnd - resolvedBegin;\n    var sliceSize;\n    if (resolvedSize === resolvedSize) {\n      sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n    }\n\n    var sliceSeq = makeSequence(iterable);\n\n    // If iterable.size is undefined, the size of the realized sliceSeq is\n    // unknown at this point unless the number of items to slice is 0\n    sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n    if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n      sliceSeq.get = function (index, notSetValue) {\n        index = wrapIndex(this, index);\n        return index >= 0 && index < sliceSize ?\n          iterable.get(index + resolvedBegin, notSetValue) :\n          notSetValue;\n      }\n    }\n\n    sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n      if (sliceSize === 0) {\n        return 0;\n      }\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var skipped = 0;\n      var isSkipping = true;\n      var iterations = 0;\n      iterable.__iterate(function(v, k)  {\n        if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n          iterations++;\n          return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n                 iterations !== sliceSize;\n        }\n      });\n      return iterations;\n    };\n\n    sliceSeq.__iteratorUncached = function(type, reverse) {\n      if (sliceSize !== 0 && reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      // Don't bother instantiating parent iterator if taking 0.\n      var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n      var skipped = 0;\n      var iterations = 0;\n      return new Iterator(function()  {\n        while (skipped++ < resolvedBegin) {\n          iterator.next();\n        }\n        if (++iterations > sliceSize) {\n          return iteratorDone();\n        }\n        var step = iterator.next();\n        if (useKeys || type === ITERATE_VALUES) {\n          return step;\n        } else if (type === ITERATE_KEYS) {\n          return iteratorValue(type, iterations - 1, undefined, step);\n        } else {\n          return iteratorValue(type, iterations - 1, step.value[1], step);\n        }\n      });\n    }\n\n    return sliceSeq;\n  }\n\n\n  function takeWhileFactory(iterable, predicate, context) {\n    var takeSequence = makeSequence(iterable);\n    takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var iterations = 0;\n      iterable.__iterate(function(v, k, c) \n        {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n      );\n      return iterations;\n    };\n    takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n      if (reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n      var iterating = true;\n      return new Iterator(function()  {\n        if (!iterating) {\n          return iteratorDone();\n        }\n        var step = iterator.next();\n        if (step.done) {\n          return step;\n        }\n        var entry = step.value;\n        var k = entry[0];\n        var v = entry[1];\n        if (!predicate.call(context, v, k, this$0)) {\n          iterating = false;\n          return iteratorDone();\n        }\n        return type === ITERATE_ENTRIES ? step :\n          iteratorValue(type, k, v, step);\n      });\n    };\n    return takeSequence;\n  }\n\n\n  function skipWhileFactory(iterable, predicate, context, useKeys) {\n    var skipSequence = makeSequence(iterable);\n    skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n      if (reverse) {\n        return this.cacheResult().__iterate(fn, reverse);\n      }\n      var isSkipping = true;\n      var iterations = 0;\n      iterable.__iterate(function(v, k, c)  {\n        if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n          iterations++;\n          return fn(v, useKeys ? k : iterations - 1, this$0);\n        }\n      });\n      return iterations;\n    };\n    skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n      if (reverse) {\n        return this.cacheResult().__iterator(type, reverse);\n      }\n      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n      var skipping = true;\n      var iterations = 0;\n      return new Iterator(function()  {\n        var step, k, v;\n        do {\n          step = iterator.next();\n          if (step.done) {\n            if (useKeys || type === ITERATE_VALUES) {\n              return step;\n            } else if (type === ITERATE_KEYS) {\n              return iteratorValue(type, iterations++, undefined, step);\n            } else {\n              return iteratorValue(type, iterations++, step.value[1], step);\n            }\n          }\n          var entry = step.value;\n          k = entry[0];\n          v = entry[1];\n          skipping && (skipping = predicate.call(context, v, k, this$0));\n        } while (skipping);\n        return type === ITERATE_ENTRIES ? step :\n          iteratorValue(type, k, v, step);\n      });\n    };\n    return skipSequence;\n  }\n\n\n  function concatFactory(iterable, values) {\n    var isKeyedIterable = isKeyed(iterable);\n    var iters = [iterable].concat(values).map(function(v ) {\n      if (!isIterable(v)) {\n        v = isKeyedIterable ?\n          keyedSeqFromValue(v) :\n          indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n      } else if (isKeyedIterable) {\n        v = KeyedIterable(v);\n      }\n      return v;\n    }).filter(function(v ) {return v.size !== 0});\n\n    if (iters.length === 0) {\n      return iterable;\n    }\n\n    if (iters.length === 1) {\n      var singleton = iters[0];\n      if (singleton === iterable ||\n          isKeyedIterable && isKeyed(singleton) ||\n          isIndexed(iterable) && isIndexed(singleton)) {\n        return singleton;\n      }\n    }\n\n    var concatSeq = new ArraySeq(iters);\n    if (isKeyedIterable) {\n      concatSeq = concatSeq.toKeyedSeq();\n    } else if (!isIndexed(iterable)) {\n      concatSeq = concatSeq.toSetSeq();\n    }\n    concatSeq = concatSeq.flatten(true);\n    concatSeq.size = iters.reduce(\n      function(sum, seq)  {\n        if (sum !== undefined) {\n          var size = seq.size;\n          if (size !== undefined) {\n            return sum + size;\n          }\n        }\n      },\n      0\n    );\n    return concatSeq;\n  }\n\n\n  function flattenFactory(iterable, depth, useKeys) {\n    var flatSequence = makeSequence(iterable);\n    flatSequence.__iterateUncached = function(fn, reverse) {\n      var iterations = 0;\n      var stopped = false;\n      function flatDeep(iter, currentDepth) {var this$0 = this;\n        iter.__iterate(function(v, k)  {\n          if ((!depth || currentDepth < depth) && isIterable(v)) {\n            flatDeep(v, currentDepth + 1);\n          } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n            stopped = true;\n          }\n          return !stopped;\n        }, reverse);\n      }\n      flatDeep(iterable, 0);\n      return iterations;\n    }\n    flatSequence.__iteratorUncached = function(type, reverse) {\n      var iterator = iterable.__iterator(type, reverse);\n      var stack = [];\n      var iterations = 0;\n      return new Iterator(function()  {\n        while (iterator) {\n          var step = iterator.next();\n          if (step.done !== false) {\n            iterator = stack.pop();\n            continue;\n          }\n          var v = step.value;\n          if (type === ITERATE_ENTRIES) {\n            v = v[1];\n          }\n          if ((!depth || stack.length < depth) && isIterable(v)) {\n            stack.push(iterator);\n            iterator = v.__iterator(type, reverse);\n          } else {\n            return useKeys ? step : iteratorValue(type, iterations++, v, step);\n          }\n        }\n        return iteratorDone();\n      });\n    }\n    return flatSequence;\n  }\n\n\n  function flatMapFactory(iterable, mapper, context) {\n    var coerce = iterableClass(iterable);\n    return iterable.toSeq().map(\n      function(v, k)  {return coerce(mapper.call(context, v, k, iterable))}\n    ).flatten(true);\n  }\n\n\n  function interposeFactory(iterable, separator) {\n    var interposedSequence = makeSequence(iterable);\n    interposedSequence.size = iterable.size && iterable.size * 2 -1;\n    interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n      var iterations = 0;\n      iterable.__iterate(function(v, k) \n        {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n        fn(v, iterations++, this$0) !== false},\n        reverse\n      );\n      return iterations;\n    };\n    interposedSequence.__iteratorUncached = function(type, reverse) {\n      var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n      var iterations = 0;\n      var step;\n      return new Iterator(function()  {\n        if (!step || iterations % 2) {\n          step = iterator.next();\n          if (step.done) {\n            return step;\n          }\n        }\n        return iterations % 2 ?\n          iteratorValue(type, iterations++, separator) :\n          iteratorValue(type, iterations++, step.value, step);\n      });\n    };\n    return interposedSequence;\n  }\n\n\n  function sortFactory(iterable, comparator, mapper) {\n    if (!comparator) {\n      comparator = defaultComparator;\n    }\n    var isKeyedIterable = isKeyed(iterable);\n    var index = 0;\n    var entries = iterable.toSeq().map(\n      function(v, k)  {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n    ).toArray();\n    entries.sort(function(a, b)  {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n      isKeyedIterable ?\n      function(v, i)  { entries[i].length = 2; } :\n      function(v, i)  { entries[i] = v[1]; }\n    );\n    return isKeyedIterable ? KeyedSeq(entries) :\n      isIndexed(iterable) ? IndexedSeq(entries) :\n      SetSeq(entries);\n  }\n\n\n  function maxFactory(iterable, comparator, mapper) {\n    if (!comparator) {\n      comparator = defaultComparator;\n    }\n    if (mapper) {\n      var entry = iterable.toSeq()\n        .map(function(v, k)  {return [v, mapper(v, k, iterable)]})\n        .reduce(function(a, b)  {return maxCompare(comparator, a[1], b[1]) ? b : a});\n      return entry && entry[0];\n    } else {\n      return iterable.reduce(function(a, b)  {return maxCompare(comparator, a, b) ? b : a});\n    }\n  }\n\n  function maxCompare(comparator, a, b) {\n    var comp = comparator(b, a);\n    // b is considered the new max if the comparator declares them equal, but\n    // they are not equal and b is in fact a nullish value.\n    return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n  }\n\n\n  function zipWithFactory(keyIter, zipper, iters) {\n    var zipSequence = makeSequence(keyIter);\n    zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n    // Note: this a generic base implementation of __iterate in terms of\n    // __iterator which may be more generically useful in the future.\n    zipSequence.__iterate = function(fn, reverse) {\n      /* generic:\n      var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n      var step;\n      var iterations = 0;\n      while (!(step = iterator.next()).done) {\n        iterations++;\n        if (fn(step.value[1], step.value[0], this) === false) {\n          break;\n        }\n      }\n      return iterations;\n      */\n      // indexed:\n      var iterator = this.__iterator(ITERATE_VALUES, reverse);\n      var step;\n      var iterations = 0;\n      while (!(step = iterator.next()).done) {\n        if (fn(step.value, iterations++, this) === false) {\n          break;\n        }\n      }\n      return iterations;\n    };\n    zipSequence.__iteratorUncached = function(type, reverse) {\n      var iterators = iters.map(function(i )\n        {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n      );\n      var iterations = 0;\n      var isDone = false;\n      return new Iterator(function()  {\n        var steps;\n        if (!isDone) {\n          steps = iterators.map(function(i ) {return i.next()});\n          isDone = steps.some(function(s ) {return s.done});\n        }\n        if (isDone) {\n          return iteratorDone();\n        }\n        return iteratorValue(\n          type,\n          iterations++,\n          zipper.apply(null, steps.map(function(s ) {return s.value}))\n        );\n      });\n    };\n    return zipSequence\n  }\n\n\n  // #pragma Helper Functions\n\n  function reify(iter, seq) {\n    return isSeq(iter) ? seq : iter.constructor(seq);\n  }\n\n  function validateEntry(entry) {\n    if (entry !== Object(entry)) {\n      throw new TypeError('Expected [K, V] tuple: ' + entry);\n    }\n  }\n\n  function resolveSize(iter) {\n    assertNotInfinite(iter.size);\n    return ensureSize(iter);\n  }\n\n  function iterableClass(iterable) {\n    return isKeyed(iterable) ? KeyedIterable :\n      isIndexed(iterable) ? IndexedIterable :\n      SetIterable;\n  }\n\n  function makeSequence(iterable) {\n    return Object.create(\n      (\n        isKeyed(iterable) ? KeyedSeq :\n        isIndexed(iterable) ? IndexedSeq :\n        SetSeq\n      ).prototype\n    );\n  }\n\n  function cacheResultThrough() {\n    if (this._iter.cacheResult) {\n      this._iter.cacheResult();\n      this.size = this._iter.size;\n      return this;\n    } else {\n      return Seq.prototype.cacheResult.call(this);\n    }\n  }\n\n  function defaultComparator(a, b) {\n    return a > b ? 1 : a < b ? -1 : 0;\n  }\n\n  function forceIterator(keyPath) {\n    var iter = getIterator(keyPath);\n    if (!iter) {\n      // Array might not be iterable in this environment, so we need a fallback\n      // to our wrapped type.\n      if (!isArrayLike(keyPath)) {\n        throw new TypeError('Expected iterable or array-like: ' + keyPath);\n      }\n      iter = getIterator(Iterable(keyPath));\n    }\n    return iter;\n  }\n\n  createClass(Record, KeyedCollection);\n\n    function Record(defaultValues, name) {\n      var hasInitialized;\n\n      var RecordType = function Record(values) {\n        if (values instanceof RecordType) {\n          return values;\n        }\n        if (!(this instanceof RecordType)) {\n          return new RecordType(values);\n        }\n        if (!hasInitialized) {\n          hasInitialized = true;\n          var keys = Object.keys(defaultValues);\n          setProps(RecordTypePrototype, keys);\n          RecordTypePrototype.size = keys.length;\n          RecordTypePrototype._name = name;\n          RecordTypePrototype._keys = keys;\n          RecordTypePrototype._defaultValues = defaultValues;\n        }\n        this._map = Map(values);\n      };\n\n      var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n      RecordTypePrototype.constructor = RecordType;\n\n      return RecordType;\n    }\n\n    Record.prototype.toString = function() {\n      return this.__toString(recordName(this) + ' {', '}');\n    };\n\n    // @pragma Access\n\n    Record.prototype.has = function(k) {\n      return this._defaultValues.hasOwnProperty(k);\n    };\n\n    Record.prototype.get = function(k, notSetValue) {\n      if (!this.has(k)) {\n        return notSetValue;\n      }\n      var defaultVal = this._defaultValues[k];\n      return this._map ? this._map.get(k, defaultVal) : defaultVal;\n    };\n\n    // @pragma Modification\n\n    Record.prototype.clear = function() {\n      if (this.__ownerID) {\n        this._map && this._map.clear();\n        return this;\n      }\n      var RecordType = this.constructor;\n      return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n    };\n\n    Record.prototype.set = function(k, v) {\n      if (!this.has(k)) {\n        throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n      }\n      var newMap = this._map && this._map.set(k, v);\n      if (this.__ownerID || newMap === this._map) {\n        return this;\n      }\n      return makeRecord(this, newMap);\n    };\n\n    Record.prototype.remove = function(k) {\n      if (!this.has(k)) {\n        return this;\n      }\n      var newMap = this._map && this._map.remove(k);\n      if (this.__ownerID || newMap === this._map) {\n        return this;\n      }\n      return makeRecord(this, newMap);\n    };\n\n    Record.prototype.wasAltered = function() {\n      return this._map.wasAltered();\n    };\n\n    Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n      return KeyedIterable(this._defaultValues).map(function(_, k)  {return this$0.get(k)}).__iterator(type, reverse);\n    };\n\n    Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return KeyedIterable(this._defaultValues).map(function(_, k)  {return this$0.get(k)}).__iterate(fn, reverse);\n    };\n\n    Record.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      var newMap = this._map && this._map.__ensureOwner(ownerID);\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this._map = newMap;\n        return this;\n      }\n      return makeRecord(this, newMap, ownerID);\n    };\n\n\n  var RecordPrototype = Record.prototype;\n  RecordPrototype[DELETE] = RecordPrototype.remove;\n  RecordPrototype.deleteIn =\n  RecordPrototype.removeIn = MapPrototype.removeIn;\n  RecordPrototype.merge = MapPrototype.merge;\n  RecordPrototype.mergeWith = MapPrototype.mergeWith;\n  RecordPrototype.mergeIn = MapPrototype.mergeIn;\n  RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n  RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n  RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n  RecordPrototype.setIn = MapPrototype.setIn;\n  RecordPrototype.update = MapPrototype.update;\n  RecordPrototype.updateIn = MapPrototype.updateIn;\n  RecordPrototype.withMutations = MapPrototype.withMutations;\n  RecordPrototype.asMutable = MapPrototype.asMutable;\n  RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n  function makeRecord(likeRecord, map, ownerID) {\n    var record = Object.create(Object.getPrototypeOf(likeRecord));\n    record._map = map;\n    record.__ownerID = ownerID;\n    return record;\n  }\n\n  function recordName(record) {\n    return record._name || record.constructor.name || 'Record';\n  }\n\n  function setProps(prototype, names) {\n    try {\n      names.forEach(setProp.bind(undefined, prototype));\n    } catch (error) {\n      // Object.defineProperty failed. Probably IE8.\n    }\n  }\n\n  function setProp(prototype, name) {\n    Object.defineProperty(prototype, name, {\n      get: function() {\n        return this.get(name);\n      },\n      set: function(value) {\n        invariant(this.__ownerID, 'Cannot set on an immutable record.');\n        this.set(name, value);\n      }\n    });\n  }\n\n  createClass(Set, SetCollection);\n\n    // @pragma Construction\n\n    function Set(value) {\n      return value === null || value === undefined ? emptySet() :\n        isSet(value) && !isOrdered(value) ? value :\n        emptySet().withMutations(function(set ) {\n          var iter = SetIterable(value);\n          assertNotInfinite(iter.size);\n          iter.forEach(function(v ) {return set.add(v)});\n        });\n    }\n\n    Set.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    Set.fromKeys = function(value) {\n      return this(KeyedIterable(value).keySeq());\n    };\n\n    Set.prototype.toString = function() {\n      return this.__toString('Set {', '}');\n    };\n\n    // @pragma Access\n\n    Set.prototype.has = function(value) {\n      return this._map.has(value);\n    };\n\n    // @pragma Modification\n\n    Set.prototype.add = function(value) {\n      return updateSet(this, this._map.set(value, true));\n    };\n\n    Set.prototype.remove = function(value) {\n      return updateSet(this, this._map.remove(value));\n    };\n\n    Set.prototype.clear = function() {\n      return updateSet(this, this._map.clear());\n    };\n\n    // @pragma Composition\n\n    Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n      iters = iters.filter(function(x ) {return x.size !== 0});\n      if (iters.length === 0) {\n        return this;\n      }\n      if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n        return this.constructor(iters[0]);\n      }\n      return this.withMutations(function(set ) {\n        for (var ii = 0; ii < iters.length; ii++) {\n          SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n        }\n      });\n    };\n\n    Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n      if (iters.length === 0) {\n        return this;\n      }\n      iters = iters.map(function(iter ) {return SetIterable(iter)});\n      var originalSet = this;\n      return this.withMutations(function(set ) {\n        originalSet.forEach(function(value ) {\n          if (!iters.every(function(iter ) {return iter.includes(value)})) {\n            set.remove(value);\n          }\n        });\n      });\n    };\n\n    Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n      if (iters.length === 0) {\n        return this;\n      }\n      iters = iters.map(function(iter ) {return SetIterable(iter)});\n      var originalSet = this;\n      return this.withMutations(function(set ) {\n        originalSet.forEach(function(value ) {\n          if (iters.some(function(iter ) {return iter.includes(value)})) {\n            set.remove(value);\n          }\n        });\n      });\n    };\n\n    Set.prototype.merge = function() {\n      return this.union.apply(this, arguments);\n    };\n\n    Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n      return this.union.apply(this, iters);\n    };\n\n    Set.prototype.sort = function(comparator) {\n      // Late binding\n      return OrderedSet(sortFactory(this, comparator));\n    };\n\n    Set.prototype.sortBy = function(mapper, comparator) {\n      // Late binding\n      return OrderedSet(sortFactory(this, comparator, mapper));\n    };\n\n    Set.prototype.wasAltered = function() {\n      return this._map.wasAltered();\n    };\n\n    Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n      return this._map.__iterate(function(_, k)  {return fn(k, k, this$0)}, reverse);\n    };\n\n    Set.prototype.__iterator = function(type, reverse) {\n      return this._map.map(function(_, k)  {return k}).__iterator(type, reverse);\n    };\n\n    Set.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      var newMap = this._map.__ensureOwner(ownerID);\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this._map = newMap;\n        return this;\n      }\n      return this.__make(newMap, ownerID);\n    };\n\n\n  function isSet(maybeSet) {\n    return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n  }\n\n  Set.isSet = isSet;\n\n  var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n  var SetPrototype = Set.prototype;\n  SetPrototype[IS_SET_SENTINEL] = true;\n  SetPrototype[DELETE] = SetPrototype.remove;\n  SetPrototype.mergeDeep = SetPrototype.merge;\n  SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n  SetPrototype.withMutations = MapPrototype.withMutations;\n  SetPrototype.asMutable = MapPrototype.asMutable;\n  SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n  SetPrototype.__empty = emptySet;\n  SetPrototype.__make = makeSet;\n\n  function updateSet(set, newMap) {\n    if (set.__ownerID) {\n      set.size = newMap.size;\n      set._map = newMap;\n      return set;\n    }\n    return newMap === set._map ? set :\n      newMap.size === 0 ? set.__empty() :\n      set.__make(newMap);\n  }\n\n  function makeSet(map, ownerID) {\n    var set = Object.create(SetPrototype);\n    set.size = map ? map.size : 0;\n    set._map = map;\n    set.__ownerID = ownerID;\n    return set;\n  }\n\n  var EMPTY_SET;\n  function emptySet() {\n    return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n  }\n\n  createClass(OrderedSet, Set);\n\n    // @pragma Construction\n\n    function OrderedSet(value) {\n      return value === null || value === undefined ? emptyOrderedSet() :\n        isOrderedSet(value) ? value :\n        emptyOrderedSet().withMutations(function(set ) {\n          var iter = SetIterable(value);\n          assertNotInfinite(iter.size);\n          iter.forEach(function(v ) {return set.add(v)});\n        });\n    }\n\n    OrderedSet.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    OrderedSet.fromKeys = function(value) {\n      return this(KeyedIterable(value).keySeq());\n    };\n\n    OrderedSet.prototype.toString = function() {\n      return this.__toString('OrderedSet {', '}');\n    };\n\n\n  function isOrderedSet(maybeOrderedSet) {\n    return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n  }\n\n  OrderedSet.isOrderedSet = isOrderedSet;\n\n  var OrderedSetPrototype = OrderedSet.prototype;\n  OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n  OrderedSetPrototype.__empty = emptyOrderedSet;\n  OrderedSetPrototype.__make = makeOrderedSet;\n\n  function makeOrderedSet(map, ownerID) {\n    var set = Object.create(OrderedSetPrototype);\n    set.size = map ? map.size : 0;\n    set._map = map;\n    set.__ownerID = ownerID;\n    return set;\n  }\n\n  var EMPTY_ORDERED_SET;\n  function emptyOrderedSet() {\n    return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n  }\n\n  createClass(Stack, IndexedCollection);\n\n    // @pragma Construction\n\n    function Stack(value) {\n      return value === null || value === undefined ? emptyStack() :\n        isStack(value) ? value :\n        emptyStack().unshiftAll(value);\n    }\n\n    Stack.of = function(/*...values*/) {\n      return this(arguments);\n    };\n\n    Stack.prototype.toString = function() {\n      return this.__toString('Stack [', ']');\n    };\n\n    // @pragma Access\n\n    Stack.prototype.get = function(index, notSetValue) {\n      var head = this._head;\n      index = wrapIndex(this, index);\n      while (head && index--) {\n        head = head.next;\n      }\n      return head ? head.value : notSetValue;\n    };\n\n    Stack.prototype.peek = function() {\n      return this._head && this._head.value;\n    };\n\n    // @pragma Modification\n\n    Stack.prototype.push = function(/*...values*/) {\n      if (arguments.length === 0) {\n        return this;\n      }\n      var newSize = this.size + arguments.length;\n      var head = this._head;\n      for (var ii = arguments.length - 1; ii >= 0; ii--) {\n        head = {\n          value: arguments[ii],\n          next: head\n        };\n      }\n      if (this.__ownerID) {\n        this.size = newSize;\n        this._head = head;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return makeStack(newSize, head);\n    };\n\n    Stack.prototype.pushAll = function(iter) {\n      iter = IndexedIterable(iter);\n      if (iter.size === 0) {\n        return this;\n      }\n      assertNotInfinite(iter.size);\n      var newSize = this.size;\n      var head = this._head;\n      iter.reverse().forEach(function(value ) {\n        newSize++;\n        head = {\n          value: value,\n          next: head\n        };\n      });\n      if (this.__ownerID) {\n        this.size = newSize;\n        this._head = head;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return makeStack(newSize, head);\n    };\n\n    Stack.prototype.pop = function() {\n      return this.slice(1);\n    };\n\n    Stack.prototype.unshift = function(/*...values*/) {\n      return this.push.apply(this, arguments);\n    };\n\n    Stack.prototype.unshiftAll = function(iter) {\n      return this.pushAll(iter);\n    };\n\n    Stack.prototype.shift = function() {\n      return this.pop.apply(this, arguments);\n    };\n\n    Stack.prototype.clear = function() {\n      if (this.size === 0) {\n        return this;\n      }\n      if (this.__ownerID) {\n        this.size = 0;\n        this._head = undefined;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return emptyStack();\n    };\n\n    Stack.prototype.slice = function(begin, end) {\n      if (wholeSlice(begin, end, this.size)) {\n        return this;\n      }\n      var resolvedBegin = resolveBegin(begin, this.size);\n      var resolvedEnd = resolveEnd(end, this.size);\n      if (resolvedEnd !== this.size) {\n        // super.slice(begin, end);\n        return IndexedCollection.prototype.slice.call(this, begin, end);\n      }\n      var newSize = this.size - resolvedBegin;\n      var head = this._head;\n      while (resolvedBegin--) {\n        head = head.next;\n      }\n      if (this.__ownerID) {\n        this.size = newSize;\n        this._head = head;\n        this.__hash = undefined;\n        this.__altered = true;\n        return this;\n      }\n      return makeStack(newSize, head);\n    };\n\n    // @pragma Mutability\n\n    Stack.prototype.__ensureOwner = function(ownerID) {\n      if (ownerID === this.__ownerID) {\n        return this;\n      }\n      if (!ownerID) {\n        this.__ownerID = ownerID;\n        this.__altered = false;\n        return this;\n      }\n      return makeStack(this.size, this._head, ownerID, this.__hash);\n    };\n\n    // @pragma Iteration\n\n    Stack.prototype.__iterate = function(fn, reverse) {\n      if (reverse) {\n        return this.reverse().__iterate(fn);\n      }\n      var iterations = 0;\n      var node = this._head;\n      while (node) {\n        if (fn(node.value, iterations++, this) === false) {\n          break;\n        }\n        node = node.next;\n      }\n      return iterations;\n    };\n\n    Stack.prototype.__iterator = function(type, reverse) {\n      if (reverse) {\n        return this.reverse().__iterator(type);\n      }\n      var iterations = 0;\n      var node = this._head;\n      return new Iterator(function()  {\n        if (node) {\n          var value = node.value;\n          node = node.next;\n          return iteratorValue(type, iterations++, value);\n        }\n        return iteratorDone();\n      });\n    };\n\n\n  function isStack(maybeStack) {\n    return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n  }\n\n  Stack.isStack = isStack;\n\n  var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n  var StackPrototype = Stack.prototype;\n  StackPrototype[IS_STACK_SENTINEL] = true;\n  StackPrototype.withMutations = MapPrototype.withMutations;\n  StackPrototype.asMutable = MapPrototype.asMutable;\n  StackPrototype.asImmutable = MapPrototype.asImmutable;\n  StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n  function makeStack(size, head, ownerID, hash) {\n    var map = Object.create(StackPrototype);\n    map.size = size;\n    map._head = head;\n    map.__ownerID = ownerID;\n    map.__hash = hash;\n    map.__altered = false;\n    return map;\n  }\n\n  var EMPTY_STACK;\n  function emptyStack() {\n    return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n  }\n\n  /**\n   * Contributes additional methods to a constructor\n   */\n  function mixin(ctor, methods) {\n    var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n    Object.keys(methods).forEach(keyCopier);\n    Object.getOwnPropertySymbols &&\n      Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n    return ctor;\n  }\n\n  Iterable.Iterator = Iterator;\n\n  mixin(Iterable, {\n\n    // ### Conversion to other types\n\n    toArray: function() {\n      assertNotInfinite(this.size);\n      var array = new Array(this.size || 0);\n      this.valueSeq().__iterate(function(v, i)  { array[i] = v; });\n      return array;\n    },\n\n    toIndexedSeq: function() {\n      return new ToIndexedSequence(this);\n    },\n\n    toJS: function() {\n      return this.toSeq().map(\n        function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n      ).__toJS();\n    },\n\n    toJSON: function() {\n      return this.toSeq().map(\n        function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n      ).__toJS();\n    },\n\n    toKeyedSeq: function() {\n      return new ToKeyedSequence(this, true);\n    },\n\n    toMap: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return Map(this.toKeyedSeq());\n    },\n\n    toObject: function() {\n      assertNotInfinite(this.size);\n      var object = {};\n      this.__iterate(function(v, k)  { object[k] = v; });\n      return object;\n    },\n\n    toOrderedMap: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return OrderedMap(this.toKeyedSeq());\n    },\n\n    toOrderedSet: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n    },\n\n    toSet: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return Set(isKeyed(this) ? this.valueSeq() : this);\n    },\n\n    toSetSeq: function() {\n      return new ToSetSequence(this);\n    },\n\n    toSeq: function() {\n      return isIndexed(this) ? this.toIndexedSeq() :\n        isKeyed(this) ? this.toKeyedSeq() :\n        this.toSetSeq();\n    },\n\n    toStack: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return Stack(isKeyed(this) ? this.valueSeq() : this);\n    },\n\n    toList: function() {\n      // Use Late Binding here to solve the circular dependency.\n      return List(isKeyed(this) ? this.valueSeq() : this);\n    },\n\n\n    // ### Common JavaScript methods and properties\n\n    toString: function() {\n      return '[Iterable]';\n    },\n\n    __toString: function(head, tail) {\n      if (this.size === 0) {\n        return head + tail;\n      }\n      return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n    },\n\n\n    // ### ES6 Collection methods (ES6 Array and Map)\n\n    concat: function() {var values = SLICE$0.call(arguments, 0);\n      return reify(this, concatFactory(this, values));\n    },\n\n    includes: function(searchValue) {\n      return this.some(function(value ) {return is(value, searchValue)});\n    },\n\n    entries: function() {\n      return this.__iterator(ITERATE_ENTRIES);\n    },\n\n    every: function(predicate, context) {\n      assertNotInfinite(this.size);\n      var returnValue = true;\n      this.__iterate(function(v, k, c)  {\n        if (!predicate.call(context, v, k, c)) {\n          returnValue = false;\n          return false;\n        }\n      });\n      return returnValue;\n    },\n\n    filter: function(predicate, context) {\n      return reify(this, filterFactory(this, predicate, context, true));\n    },\n\n    find: function(predicate, context, notSetValue) {\n      var entry = this.findEntry(predicate, context);\n      return entry ? entry[1] : notSetValue;\n    },\n\n    findEntry: function(predicate, context) {\n      var found;\n      this.__iterate(function(v, k, c)  {\n        if (predicate.call(context, v, k, c)) {\n          found = [k, v];\n          return false;\n        }\n      });\n      return found;\n    },\n\n    findLastEntry: function(predicate, context) {\n      return this.toSeq().reverse().findEntry(predicate, context);\n    },\n\n    forEach: function(sideEffect, context) {\n      assertNotInfinite(this.size);\n      return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n    },\n\n    join: function(separator) {\n      assertNotInfinite(this.size);\n      separator = separator !== undefined ? '' + separator : ',';\n      var joined = '';\n      var isFirst = true;\n      this.__iterate(function(v ) {\n        isFirst ? (isFirst = false) : (joined += separator);\n        joined += v !== null && v !== undefined ? v.toString() : '';\n      });\n      return joined;\n    },\n\n    keys: function() {\n      return this.__iterator(ITERATE_KEYS);\n    },\n\n    map: function(mapper, context) {\n      return reify(this, mapFactory(this, mapper, context));\n    },\n\n    reduce: function(reducer, initialReduction, context) {\n      assertNotInfinite(this.size);\n      var reduction;\n      var useFirst;\n      if (arguments.length < 2) {\n        useFirst = true;\n      } else {\n        reduction = initialReduction;\n      }\n      this.__iterate(function(v, k, c)  {\n        if (useFirst) {\n          useFirst = false;\n          reduction = v;\n        } else {\n          reduction = reducer.call(context, reduction, v, k, c);\n        }\n      });\n      return reduction;\n    },\n\n    reduceRight: function(reducer, initialReduction, context) {\n      var reversed = this.toKeyedSeq().reverse();\n      return reversed.reduce.apply(reversed, arguments);\n    },\n\n    reverse: function() {\n      return reify(this, reverseFactory(this, true));\n    },\n\n    slice: function(begin, end) {\n      return reify(this, sliceFactory(this, begin, end, true));\n    },\n\n    some: function(predicate, context) {\n      return !this.every(not(predicate), context);\n    },\n\n    sort: function(comparator) {\n      return reify(this, sortFactory(this, comparator));\n    },\n\n    values: function() {\n      return this.__iterator(ITERATE_VALUES);\n    },\n\n\n    // ### More sequential methods\n\n    butLast: function() {\n      return this.slice(0, -1);\n    },\n\n    isEmpty: function() {\n      return this.size !== undefined ? this.size === 0 : !this.some(function()  {return true});\n    },\n\n    count: function(predicate, context) {\n      return ensureSize(\n        predicate ? this.toSeq().filter(predicate, context) : this\n      );\n    },\n\n    countBy: function(grouper, context) {\n      return countByFactory(this, grouper, context);\n    },\n\n    equals: function(other) {\n      return deepEqual(this, other);\n    },\n\n    entrySeq: function() {\n      var iterable = this;\n      if (iterable._cache) {\n        // We cache as an entries array, so we can just return the cache!\n        return new ArraySeq(iterable._cache);\n      }\n      var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n      entriesSequence.fromEntrySeq = function()  {return iterable.toSeq()};\n      return entriesSequence;\n    },\n\n    filterNot: function(predicate, context) {\n      return this.filter(not(predicate), context);\n    },\n\n    findLast: function(predicate, context, notSetValue) {\n      return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n    },\n\n    first: function() {\n      return this.find(returnTrue);\n    },\n\n    flatMap: function(mapper, context) {\n      return reify(this, flatMapFactory(this, mapper, context));\n    },\n\n    flatten: function(depth) {\n      return reify(this, flattenFactory(this, depth, true));\n    },\n\n    fromEntrySeq: function() {\n      return new FromEntriesSequence(this);\n    },\n\n    get: function(searchKey, notSetValue) {\n      return this.find(function(_, key)  {return is(key, searchKey)}, undefined, notSetValue);\n    },\n\n    getIn: function(searchKeyPath, notSetValue) {\n      var nested = this;\n      // Note: in an ES6 environment, we would prefer:\n      // for (var key of searchKeyPath) {\n      var iter = forceIterator(searchKeyPath);\n      var step;\n      while (!(step = iter.next()).done) {\n        var key = step.value;\n        nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n        if (nested === NOT_SET) {\n          return notSetValue;\n        }\n      }\n      return nested;\n    },\n\n    groupBy: function(grouper, context) {\n      return groupByFactory(this, grouper, context);\n    },\n\n    has: function(searchKey) {\n      return this.get(searchKey, NOT_SET) !== NOT_SET;\n    },\n\n    hasIn: function(searchKeyPath) {\n      return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n    },\n\n    isSubset: function(iter) {\n      iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n      return this.every(function(value ) {return iter.includes(value)});\n    },\n\n    isSuperset: function(iter) {\n      iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n      return iter.isSubset(this);\n    },\n\n    keySeq: function() {\n      return this.toSeq().map(keyMapper).toIndexedSeq();\n    },\n\n    last: function() {\n      return this.toSeq().reverse().first();\n    },\n\n    max: function(comparator) {\n      return maxFactory(this, comparator);\n    },\n\n    maxBy: function(mapper, comparator) {\n      return maxFactory(this, comparator, mapper);\n    },\n\n    min: function(comparator) {\n      return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n    },\n\n    minBy: function(mapper, comparator) {\n      return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n    },\n\n    rest: function() {\n      return this.slice(1);\n    },\n\n    skip: function(amount) {\n      return this.slice(Math.max(0, amount));\n    },\n\n    skipLast: function(amount) {\n      return reify(this, this.toSeq().reverse().skip(amount).reverse());\n    },\n\n    skipWhile: function(predicate, context) {\n      return reify(this, skipWhileFactory(this, predicate, context, true));\n    },\n\n    skipUntil: function(predicate, context) {\n      return this.skipWhile(not(predicate), context);\n    },\n\n    sortBy: function(mapper, comparator) {\n      return reify(this, sortFactory(this, comparator, mapper));\n    },\n\n    take: function(amount) {\n      return this.slice(0, Math.max(0, amount));\n    },\n\n    takeLast: function(amount) {\n      return reify(this, this.toSeq().reverse().take(amount).reverse());\n    },\n\n    takeWhile: function(predicate, context) {\n      return reify(this, takeWhileFactory(this, predicate, context));\n    },\n\n    takeUntil: function(predicate, context) {\n      return this.takeWhile(not(predicate), context);\n    },\n\n    valueSeq: function() {\n      return this.toIndexedSeq();\n    },\n\n\n    // ### Hashable Object\n\n    hashCode: function() {\n      return this.__hash || (this.__hash = hashIterable(this));\n    }\n\n\n    // ### Internal\n\n    // abstract __iterate(fn, reverse)\n\n    // abstract __iterator(type, reverse)\n  });\n\n  // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n  // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n  // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n  // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n  var IterablePrototype = Iterable.prototype;\n  IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n  IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n  IterablePrototype.__toJS = IterablePrototype.toArray;\n  IterablePrototype.__toStringMapper = quoteString;\n  IterablePrototype.inspect =\n  IterablePrototype.toSource = function() { return this.toString(); };\n  IterablePrototype.chain = IterablePrototype.flatMap;\n  IterablePrototype.contains = IterablePrototype.includes;\n\n  // Temporary warning about using length\n  (function () {\n    try {\n      Object.defineProperty(IterablePrototype, 'length', {\n        get: function () {\n          if (!Iterable.noLengthWarning) {\n            var stack;\n            try {\n              throw new Error();\n            } catch (error) {\n              stack = error.stack;\n            }\n            if (stack.indexOf('_wrapObject') === -1) {\n              console && console.warn && console.warn(\n                'iterable.length has been deprecated, '+\n                'use iterable.size or iterable.count(). '+\n                'This warning will become a silent error in a future version. ' +\n                stack\n              );\n              return this.size;\n            }\n          }\n        }\n      });\n    } catch (e) {}\n  })();\n\n\n\n  mixin(KeyedIterable, {\n\n    // ### More sequential methods\n\n    flip: function() {\n      return reify(this, flipFactory(this));\n    },\n\n    findKey: function(predicate, context) {\n      var entry = this.findEntry(predicate, context);\n      return entry && entry[0];\n    },\n\n    findLastKey: function(predicate, context) {\n      return this.toSeq().reverse().findKey(predicate, context);\n    },\n\n    keyOf: function(searchValue) {\n      return this.findKey(function(value ) {return is(value, searchValue)});\n    },\n\n    lastKeyOf: function(searchValue) {\n      return this.findLastKey(function(value ) {return is(value, searchValue)});\n    },\n\n    mapEntries: function(mapper, context) {var this$0 = this;\n      var iterations = 0;\n      return reify(this,\n        this.toSeq().map(\n          function(v, k)  {return mapper.call(context, [k, v], iterations++, this$0)}\n        ).fromEntrySeq()\n      );\n    },\n\n    mapKeys: function(mapper, context) {var this$0 = this;\n      return reify(this,\n        this.toSeq().flip().map(\n          function(k, v)  {return mapper.call(context, k, v, this$0)}\n        ).flip()\n      );\n    }\n\n  });\n\n  var KeyedIterablePrototype = KeyedIterable.prototype;\n  KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n  KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n  KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n  KeyedIterablePrototype.__toStringMapper = function(v, k)  {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n  mixin(IndexedIterable, {\n\n    // ### Conversion to other types\n\n    toKeyedSeq: function() {\n      return new ToKeyedSequence(this, false);\n    },\n\n\n    // ### ES6 Collection methods (ES6 Array and Map)\n\n    filter: function(predicate, context) {\n      return reify(this, filterFactory(this, predicate, context, false));\n    },\n\n    findIndex: function(predicate, context) {\n      var entry = this.findEntry(predicate, context);\n      return entry ? entry[0] : -1;\n    },\n\n    indexOf: function(searchValue) {\n      var key = this.toKeyedSeq().keyOf(searchValue);\n      return key === undefined ? -1 : key;\n    },\n\n    lastIndexOf: function(searchValue) {\n      var key = this.toKeyedSeq().reverse().keyOf(searchValue);\n      return key === undefined ? -1 : key;\n\n      // var index =\n      // return this.toSeq().reverse().indexOf(searchValue);\n    },\n\n    reverse: function() {\n      return reify(this, reverseFactory(this, false));\n    },\n\n    slice: function(begin, end) {\n      return reify(this, sliceFactory(this, begin, end, false));\n    },\n\n    splice: function(index, removeNum /*, ...values*/) {\n      var numArgs = arguments.length;\n      removeNum = Math.max(removeNum | 0, 0);\n      if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n        return this;\n      }\n      // If index is negative, it should resolve relative to the size of the\n      // collection. However size may be expensive to compute if not cached, so\n      // only call count() if the number is in fact negative.\n      index = resolveBegin(index, index < 0 ? this.count() : this.size);\n      var spliced = this.slice(0, index);\n      return reify(\n        this,\n        numArgs === 1 ?\n          spliced :\n          spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n      );\n    },\n\n\n    // ### More collection methods\n\n    findLastIndex: function(predicate, context) {\n      var key = this.toKeyedSeq().findLastKey(predicate, context);\n      return key === undefined ? -1 : key;\n    },\n\n    first: function() {\n      return this.get(0);\n    },\n\n    flatten: function(depth) {\n      return reify(this, flattenFactory(this, depth, false));\n    },\n\n    get: function(index, notSetValue) {\n      index = wrapIndex(this, index);\n      return (index < 0 || (this.size === Infinity ||\n          (this.size !== undefined && index > this.size))) ?\n        notSetValue :\n        this.find(function(_, key)  {return key === index}, undefined, notSetValue);\n    },\n\n    has: function(index) {\n      index = wrapIndex(this, index);\n      return index >= 0 && (this.size !== undefined ?\n        this.size === Infinity || index < this.size :\n        this.indexOf(index) !== -1\n      );\n    },\n\n    interpose: function(separator) {\n      return reify(this, interposeFactory(this, separator));\n    },\n\n    interleave: function(/*...iterables*/) {\n      var iterables = [this].concat(arrCopy(arguments));\n      var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n      var interleaved = zipped.flatten(true);\n      if (zipped.size) {\n        interleaved.size = zipped.size * iterables.length;\n      }\n      return reify(this, interleaved);\n    },\n\n    last: function() {\n      return this.get(-1);\n    },\n\n    skipWhile: function(predicate, context) {\n      return reify(this, skipWhileFactory(this, predicate, context, false));\n    },\n\n    zip: function(/*, ...iterables */) {\n      var iterables = [this].concat(arrCopy(arguments));\n      return reify(this, zipWithFactory(this, defaultZipper, iterables));\n    },\n\n    zipWith: function(zipper/*, ...iterables */) {\n      var iterables = arrCopy(arguments);\n      iterables[0] = this;\n      return reify(this, zipWithFactory(this, zipper, iterables));\n    }\n\n  });\n\n  IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n  IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n  mixin(SetIterable, {\n\n    // ### ES6 Collection methods (ES6 Array and Map)\n\n    get: function(value, notSetValue) {\n      return this.has(value) ? value : notSetValue;\n    },\n\n    includes: function(value) {\n      return this.has(value);\n    },\n\n\n    // ### More sequential methods\n\n    keySeq: function() {\n      return this.valueSeq();\n    }\n\n  });\n\n  SetIterable.prototype.has = IterablePrototype.includes;\n\n\n  // Mixin subclasses\n\n  mixin(KeyedSeq, KeyedIterable.prototype);\n  mixin(IndexedSeq, IndexedIterable.prototype);\n  mixin(SetSeq, SetIterable.prototype);\n\n  mixin(KeyedCollection, KeyedIterable.prototype);\n  mixin(IndexedCollection, IndexedIterable.prototype);\n  mixin(SetCollection, SetIterable.prototype);\n\n\n  // #pragma Helper functions\n\n  function keyMapper(v, k) {\n    return k;\n  }\n\n  function entryMapper(v, k) {\n    return [k, v];\n  }\n\n  function not(predicate) {\n    return function() {\n      return !predicate.apply(this, arguments);\n    }\n  }\n\n  function neg(predicate) {\n    return function() {\n      return -predicate.apply(this, arguments);\n    }\n  }\n\n  function quoteString(value) {\n    return typeof value === 'string' ? JSON.stringify(value) : value;\n  }\n\n  function defaultZipper() {\n    return arrCopy(arguments);\n  }\n\n  function defaultNegComparator(a, b) {\n    return a < b ? 1 : a > b ? -1 : 0;\n  }\n\n  function hashIterable(iterable) {\n    if (iterable.size === Infinity) {\n      return 0;\n    }\n    var ordered = isOrdered(iterable);\n    var keyed = isKeyed(iterable);\n    var h = ordered ? 1 : 0;\n    var size = iterable.__iterate(\n      keyed ?\n        ordered ?\n          function(v, k)  { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n          function(v, k)  { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n        ordered ?\n          function(v ) { h = 31 * h + hash(v) | 0; } :\n          function(v ) { h = h + hash(v) | 0; }\n    );\n    return murmurHashOfSize(size, h);\n  }\n\n  function murmurHashOfSize(size, h) {\n    h = imul(h, 0xCC9E2D51);\n    h = imul(h << 15 | h >>> -15, 0x1B873593);\n    h = imul(h << 13 | h >>> -13, 5);\n    h = (h + 0xE6546B64 | 0) ^ size;\n    h = imul(h ^ h >>> 16, 0x85EBCA6B);\n    h = imul(h ^ h >>> 13, 0xC2B2AE35);\n    h = smi(h ^ h >>> 16);\n    return h;\n  }\n\n  function hashMerge(a, b) {\n    return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n  }\n\n  var Immutable = {\n\n    Iterable: Iterable,\n\n    Seq: Seq,\n    Collection: Collection,\n    Map: Map,\n    OrderedMap: OrderedMap,\n    List: List,\n    Stack: Stack,\n    Set: Set,\n    OrderedSet: OrderedSet,\n\n    Record: Record,\n    Range: Range,\n    Repeat: Repeat,\n\n    is: is,\n    fromJS: fromJS\n\n  };\n\n  return Immutable;\n\n}));\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/immutable/dist/immutable.js\n ** module id = 22\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/immutable/dist/immutable.js?");
},,,,function(module,exports,__webpack_require__){eval("module.exports = (__webpack_require__(11))(19);\n\n/*****************\n ** WEBPACK FOOTER\n ** delegated ./node_modules/react-dom/index.js from dll-reference __vendor\n ** module id = 26\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///delegated_./node_modules/react-dom/index.js_from_dll-reference___vendor?")},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 PermissionsMixin = {\n  _isWildCard: function _isWildCard(permissionSet) {\n    return permissionSet.indexOf('*') > -1;\n  },\n\n  _permissionPredicate: function _permissionPredicate(permissionSet, p) {\n    if (p.split(':').length === 3) {\n      // eslint-disable-next-line prefer-template\n      return permissionSet.indexOf(p) > -1 || permissionSet.indexOf(p.split(':').slice(0, 2).join(':') + ':*') > -1;\n    }\n    return permissionSet.indexOf(p) > -1 || permissionSet.indexOf(p + ':*') > -1;\n  },\n\n  isPermitted: function isPermitted(permissionSet, permissions) {\n    var _this = this;\n\n    if (this._isWildCard(permissionSet)) {\n      return true;\n    }\n    if (permissions.every) {\n      return permissions.every(function (p) {\n        return _this._permissionPredicate(permissionSet, p);\n      });\n    }\n    return this._permissionPredicate(permissionSet, permissions);\n  },\n\n  isAnyPermitted: function isAnyPermitted(permissionSet, permissions) {\n    var _this2 = this;\n\n    if (this._isWildCard(permissionSet)) {\n      return true;\n    }\n    return permissions.some(function (p) {\n      return _this2._permissionPredicate(permissionSet, p);\n    });\n  }\n};\n\nexports['default'] = PermissionsMixin;\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 \" + \"PermissionsMixin.jsx\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/util/PermissionsMixin.jsx\n ** module id = 27\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/util/PermissionsMixin.jsx?")},function(module,exports){eval('/*\r\n	MIT License http://www.opensource.org/licenses/mit-license.php\r\n	Author Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n	var list = [];\r\n\r\n	// return the list of modules as css string\r\n	list.toString = function toString() {\r\n		var result = [];\r\n		for(var i = 0; i < this.length; i++) {\r\n			var item = this[i];\r\n			if(item[2]) {\r\n				result.push("@media " + item[2] + "{" + item[1] + "}");\r\n			} else {\r\n				result.push(item[1]);\r\n			}\r\n		}\r\n		return result.join("");\r\n	};\r\n\r\n	// import a list of modules into the list\r\n	list.i = function(modules, mediaQuery) {\r\n		if(typeof modules === "string")\r\n			modules = [[null, modules, ""]];\r\n		var alreadyImportedModules = {};\r\n		for(var i = 0; i < this.length; i++) {\r\n			var id = this[i][0];\r\n			if(typeof id === "number")\r\n				alreadyImportedModules[id] = true;\r\n		}\r\n		for(i = 0; i < modules.length; i++) {\r\n			var item = modules[i];\r\n			// skip already imported module\r\n			// this implementation is not 100% perfect for weird media query combinations\r\n			//  when a module is imported multiple times with different media queries.\r\n			//  I hope this will never occur (Hey this way we have smaller bundles)\r\n			if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {\r\n				if(mediaQuery && !item[2]) {\r\n					item[2] = mediaQuery;\r\n				} else if(mediaQuery) {\r\n					item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";\r\n				}\r\n				list.push(item);\r\n			}\r\n		}\r\n	};\r\n	return list;\r\n};\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/css-loader/lib/css-base.js\n ** module id = 28\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/css-loader/lib/css-base.js?')},function(module,exports,__webpack_require__){eval('/*\r\n	MIT License http://www.opensource.org/licenses/mit-license.php\r\n	Author Tobias Koppers @sokra\r\n*/\r\nvar stylesInDom = {},\r\n	memoize = function(fn) {\r\n		var memo;\r\n		return function () {\r\n			if (typeof memo === "undefined") memo = fn.apply(this, arguments);\r\n			return memo;\r\n		};\r\n	},\r\n	isOldIE = memoize(function() {\r\n		return /msie [6-9]\\b/.test(window.navigator.userAgent.toLowerCase());\r\n	}),\r\n	getHeadElement = memoize(function () {\r\n		return document.head || document.getElementsByTagName("head")[0];\r\n	}),\r\n	singletonElement = null,\r\n	singletonCounter = 0,\r\n	styleElementsInsertedAtTop = [];\r\n\r\nmodule.exports = function(list, options) {\r\n	if(false) {\r\n		if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");\r\n	}\r\n\r\n	options = options || {};\r\n	// Force single-tag solution on IE6-9, which has a hard limit on the # of " ).appendTo( body );\n		}\n\n		if(o.opacity) { // opacity option\n			if (this.helper.css("opacity")) {\n				this._storedOpacity = this.helper.css("opacity");\n			}\n			this.helper.css("opacity", o.opacity);\n		}\n\n		if(o.zIndex) { // zIndex option\n			if (this.helper.css("zIndex")) {\n				this._storedZIndex = this.helper.css("zIndex");\n			}\n			this.helper.css("zIndex", o.zIndex);\n		}\n\n		//Prepare scrolling\n		if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {\n			this.overflowOffset = this.scrollParent.offset();\n		}\n\n		//Call callbacks\n		this._trigger("start", event, this._uiHash());\n\n		//Recache the helper size\n		if(!this._preserveHelperProportions) {\n			this._cacheHelperProportions();\n		}\n\n\n		//Post "activate" events to possible containers\n		if( !noActivation ) {\n			for ( i = this.containers.length - 1; i >= 0; i-- ) {\n				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );\n			}\n		}\n\n		//Prepare possible droppables\n		if($.ui.ddmanager) {\n			$.ui.ddmanager.current = this;\n		}\n\n		if ($.ui.ddmanager && !o.dropBehaviour) {\n			$.ui.ddmanager.prepareOffsets(this, event);\n		}\n\n		this.dragging = true;\n\n		this.helper.addClass("ui-sortable-helper");\n		this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n		return true;\n\n	},\n\n	_mouseDrag: function(event) {\n		var i, item, itemElement, intersection,\n			o = this.options,\n			scrolled = false;\n\n		//Compute the helpers position\n		this.position = this._generatePosition(event);\n		this.positionAbs = this._convertPositionTo("absolute");\n\n		if (!this.lastPositionAbs) {\n			this.lastPositionAbs = this.positionAbs;\n		}\n\n		//Do scrolling\n		if(this.options.scroll) {\n			if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {\n\n				if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {\n					this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;\n				} else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {\n					this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;\n				}\n\n				if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {\n					this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;\n				} else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {\n					this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;\n				}\n\n			} else {\n\n				if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {\n					scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n				} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {\n					scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n				}\n\n				if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {\n					scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n				} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {\n					scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n				}\n\n			}\n\n			if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n				$.ui.ddmanager.prepareOffsets(this, event);\n			}\n		}\n\n		//Regenerate the absolute position used for position checks\n		this.positionAbs = this._convertPositionTo("absolute");\n\n		//Set the helper position\n		if(!this.options.axis || this.options.axis !== "y") {\n			this.helper[0].style.left = this.position.left+"px";\n		}\n		if(!this.options.axis || this.options.axis !== "x") {\n			this.helper[0].style.top = this.position.top+"px";\n		}\n\n		//Rearrange\n		for (i = this.items.length - 1; i >= 0; i--) {\n\n			//Cache variables and intersection, continue if no intersection\n			item = this.items[i];\n			itemElement = item.item[0];\n			intersection = this._intersectsWithPointer(item);\n			if (!intersection) {\n				continue;\n			}\n\n			// Only put the placeholder inside the current Container, skip all\n			// items form other containers. This works because when moving\n			// an item from one container to another the\n			// currentContainer is switched before the placeholder is moved.\n			//\n			// Without this moving items in "sub-sortables" can cause the placeholder to jitter\n			// beetween the outer and inner container.\n			if (item.instance !== this.currentContainer) {\n				continue;\n			}\n\n			// cannot intersect with itself\n			// no useless actions that have been done before\n			// no action if the item moved is the parent of the item checked\n			if (itemElement !== this.currentItem[0] &&\n				this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&\n				!$.contains(this.placeholder[0], itemElement) &&\n				(this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)\n			) {\n\n				this.direction = intersection === 1 ? "down" : "up";\n\n				if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {\n					this._rearrange(event, item);\n				} else {\n					break;\n				}\n\n				this._trigger("change", event, this._uiHash());\n				break;\n			}\n		}\n\n		//Post events to containers\n		this._contactContainers(event);\n\n		//Interconnect with droppables\n		if($.ui.ddmanager) {\n			$.ui.ddmanager.drag(this, event);\n		}\n\n		//Call callbacks\n		this._trigger("sort", event, this._uiHash());\n\n		this.lastPositionAbs = this.positionAbs;\n		return false;\n\n	},\n\n	_mouseStop: function(event, noPropagation) {\n\n		if(!event) {\n			return;\n		}\n\n		//If we are using droppables, inform the manager about the drop\n		if ($.ui.ddmanager && !this.options.dropBehaviour) {\n			$.ui.ddmanager.drop(this, event);\n		}\n\n		if(this.options.revert) {\n			var that = this,\n				cur = this.placeholder.offset(),\n				axis = this.options.axis,\n				animation = {};\n\n			if ( !axis || axis === "x" ) {\n				animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);\n			}\n			if ( !axis || axis === "y" ) {\n				animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);\n			}\n			this.reverting = true;\n			$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {\n				that._clear(event);\n			});\n		} else {\n			this._clear(event, noPropagation);\n		}\n\n		return false;\n\n	},\n\n	cancel: function() {\n\n		if(this.dragging) {\n\n			this._mouseUp({ target: null });\n\n			if(this.options.helper === "original") {\n				this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");\n			} else {\n				this.currentItem.show();\n			}\n\n			//Post deactivating events to containers\n			for (var i = this.containers.length - 1; i >= 0; i--){\n				this.containers[i]._trigger("deactivate", null, this._uiHash(this));\n				if(this.containers[i].containerCache.over) {\n					this.containers[i]._trigger("out", null, this._uiHash(this));\n					this.containers[i].containerCache.over = 0;\n				}\n			}\n\n		}\n\n		if (this.placeholder) {\n			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n			if(this.placeholder[0].parentNode) {\n				this.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n			}\n			if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {\n				this.helper.remove();\n			}\n\n			$.extend(this, {\n				helper: null,\n				dragging: false,\n				reverting: false,\n				_noFinalSort: null\n			});\n\n			if(this.domPosition.prev) {\n				$(this.domPosition.prev).after(this.currentItem);\n			} else {\n				$(this.domPosition.parent).prepend(this.currentItem);\n			}\n		}\n\n		return this;\n\n	},\n\n	serialize: function(o) {\n\n		var items = this._getItemsAsjQuery(o && o.connected),\n			str = [];\n		o = o || {};\n\n		$(items).each(function() {\n			var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\\-=_](.+)/));\n			if (res) {\n				str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));\n			}\n		});\n\n		if(!str.length && o.key) {\n			str.push(o.key + "=");\n		}\n\n		return str.join("&");\n\n	},\n\n	toArray: function(o) {\n\n		var items = this._getItemsAsjQuery(o && o.connected),\n			ret = [];\n\n		o = o || {};\n\n		items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });\n		return ret;\n\n	},\n\n	/* Be careful with the following core functions */\n	_intersectsWith: function(item) {\n\n		var x1 = this.positionAbs.left,\n			x2 = x1 + this.helperProportions.width,\n			y1 = this.positionAbs.top,\n			y2 = y1 + this.helperProportions.height,\n			l = item.left,\n			r = l + item.width,\n			t = item.top,\n			b = t + item.height,\n			dyClick = this.offset.click.top,\n			dxClick = this.offset.click.left,\n			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),\n			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),\n			isOverElement = isOverElementHeight && isOverElementWidth;\n\n		if ( this.options.tolerance === "pointer" ||\n			this.options.forcePointerForContainers ||\n			(this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])\n		) {\n			return isOverElement;\n		} else {\n\n			return (l < x1 + (this.helperProportions.width / 2) && // Right Half\n				x2 - (this.helperProportions.width / 2) < r && // Left Half\n				t < y1 + (this.helperProportions.height / 2) && // Bottom Half\n				y2 - (this.helperProportions.height / 2) < b ); // Top Half\n\n		}\n	},\n\n	_intersectsWithPointer: function(item) {\n\n		var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),\n			isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),\n			isOverElement = isOverElementHeight && isOverElementWidth,\n			verticalDirection = this._getDragVerticalDirection(),\n			horizontalDirection = this._getDragHorizontalDirection();\n\n		if (!isOverElement) {\n			return false;\n		}\n\n		return this.floating ?\n			( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )\n			: ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );\n\n	},\n\n	_intersectsWithSides: function(item) {\n\n		var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),\n			isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),\n			verticalDirection = this._getDragVerticalDirection(),\n			horizontalDirection = this._getDragHorizontalDirection();\n\n		if (this.floating && horizontalDirection) {\n			return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));\n		} else {\n			return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));\n		}\n\n	},\n\n	_getDragVerticalDirection: function() {\n		var delta = this.positionAbs.top - this.lastPositionAbs.top;\n		return delta !== 0 && (delta > 0 ? "down" : "up");\n	},\n\n	_getDragHorizontalDirection: function() {\n		var delta = this.positionAbs.left - this.lastPositionAbs.left;\n		return delta !== 0 && (delta > 0 ? "right" : "left");\n	},\n\n	refresh: function(event) {\n		this._refreshItems(event);\n		this.refreshPositions();\n		return this;\n	},\n\n	_connectWith: function() {\n		var options = this.options;\n		return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;\n	},\n\n	_getItemsAsjQuery: function(connected) {\n\n		var i, j, cur, inst,\n			items = [],\n			queries = [],\n			connectWith = this._connectWith();\n\n		if(connectWith && connected) {\n			for (i = connectWith.length - 1; i >= 0; i--){\n				cur = $(connectWith[i]);\n				for ( j = cur.length - 1; j >= 0; j--){\n					inst = $.data(cur[j], this.widgetFullName);\n					if(inst && inst !== this && !inst.options.disabled) {\n						queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);\n					}\n				}\n			}\n		}\n\n		queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);\n\n		for (i = queries.length - 1; i >= 0; i--){\n			queries[i][0].each(function() {\n				items.push(this);\n			});\n		}\n\n		return $(items);\n\n	},\n\n	_removeCurrentsFromItems: function() {\n\n		var list = this.currentItem.find(":data(" + this.widgetName + "-item)");\n\n		this.items = $.grep(this.items, function (item) {\n			for (var j=0; j < list.length; j++) {\n				if(list[j] === item.item[0]) {\n					return false;\n				}\n			}\n			return true;\n		});\n\n	},\n\n	_refreshItems: function(event) {\n\n		this.items = [];\n		this.containers = [this];\n\n		var i, j, cur, inst, targetData, _queries, item, queriesLength,\n			items = this.items,\n			queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],\n			connectWith = this._connectWith();\n\n		if(connectWith && this.ready) { //Shouldn\'t be run the first time through due to massive slow-down\n			for (i = connectWith.length - 1; i >= 0; i--){\n				cur = $(connectWith[i]);\n				for (j = cur.length - 1; j >= 0; j--){\n					inst = $.data(cur[j], this.widgetFullName);\n					if(inst && inst !== this && !inst.options.disabled) {\n						queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);\n						this.containers.push(inst);\n					}\n				}\n			}\n		}\n\n		for (i = queries.length - 1; i >= 0; i--) {\n			targetData = queries[i][1];\n			_queries = queries[i][0];\n\n			for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {\n				item = $(_queries[j]);\n\n				item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)\n\n				items.push({\n					item: item,\n					instance: targetData,\n					width: 0, height: 0,\n					left: 0, top: 0\n				});\n			}\n		}\n\n	},\n\n	refreshPositions: function(fast) {\n\n		//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent\'s position will change\n		if(this.offsetParent && this.helper) {\n			this.offset.parent = this._getParentOffset();\n		}\n\n		var i, item, t, p;\n\n		for (i = this.items.length - 1; i >= 0; i--){\n			item = this.items[i];\n\n			//We ignore calculating positions of all connected containers when we\'re not over them\n			if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {\n				continue;\n			}\n\n			t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;\n\n			if (!fast) {\n				item.width = t.outerWidth();\n				item.height = t.outerHeight();\n			}\n\n			p = t.offset();\n			item.left = p.left;\n			item.top = p.top;\n		}\n\n		if(this.options.custom && this.options.custom.refreshContainers) {\n			this.options.custom.refreshContainers.call(this);\n		} else {\n			for (i = this.containers.length - 1; i >= 0; i--){\n				p = this.containers[i].element.offset();\n				this.containers[i].containerCache.left = p.left;\n				this.containers[i].containerCache.top = p.top;\n				this.containers[i].containerCache.width	= this.containers[i].element.outerWidth();\n				this.containers[i].containerCache.height = this.containers[i].element.outerHeight();\n			}\n		}\n\n		return this;\n	},\n\n	_createPlaceholder: function(that) {\n		that = that || this;\n		var className,\n			o = that.options;\n\n		if(!o.placeholder || o.placeholder.constructor === String) {\n			className = o.placeholder;\n			o.placeholder = {\n				element: function() {\n\n					var nodeName = that.currentItem[0].nodeName.toLowerCase(),\n						element = $( "<" + nodeName + ">", that.document[0] )\n							.addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")\n							.removeClass("ui-sortable-helper");\n\n					if ( nodeName === "tr" ) {\n						that.currentItem.children().each(function() {\n							$( " ", that.document[0] )\n								.attr( "colspan", $( this ).attr( "colspan" ) || 1 )\n								.appendTo( element );\n						});\n					} else if ( nodeName === "img" ) {\n						element.attr( "src", that.currentItem.attr( "src" ) );\n					}\n\n					if ( !className ) {\n						element.css( "visibility", "hidden" );\n					}\n\n					return element;\n				},\n				update: function(container, p) {\n\n					// 1. If a className is set as \'placeholder option, we don\'t force sizes - the class is responsible for that\n					// 2. The option \'forcePlaceholderSize can be enabled to force it even if a class name is specified\n					if(className && !o.forcePlaceholderSize) {\n						return;\n					}\n\n					//If the element doesn\'t have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item\n					if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }\n					if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }\n				}\n			};\n		}\n\n		//Create the placeholder\n		that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));\n\n		//Append it after the actual current item\n		that.currentItem.after(that.placeholder);\n\n		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n		o.placeholder.update(that, that.placeholder);\n\n	},\n\n	_contactContainers: function(event) {\n		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,\n			innermostContainer = null,\n			innermostIndex = null;\n\n		// get innermost container that intersects with item\n		for (i = this.containers.length - 1; i >= 0; i--) {\n\n			// never consider a container that\'s located within the item itself\n			if($.contains(this.currentItem[0], this.containers[i].element[0])) {\n				continue;\n			}\n\n			if(this._intersectsWith(this.containers[i].containerCache)) {\n\n				// if we\'ve already found a container and it\'s more "inner" than this, then continue\n				if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {\n					continue;\n				}\n\n				innermostContainer = this.containers[i];\n				innermostIndex = i;\n\n			} else {\n				// container doesn\'t intersect. trigger "out" event if necessary\n				if(this.containers[i].containerCache.over) {\n					this.containers[i]._trigger("out", event, this._uiHash(this));\n					this.containers[i].containerCache.over = 0;\n				}\n			}\n\n		}\n\n		// if no intersecting containers found, return\n		if(!innermostContainer) {\n			return;\n		}\n\n		// move the item into the container if it\'s not there already\n		if(this.containers.length === 1) {\n			if (!this.containers[innermostIndex].containerCache.over) {\n				this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));\n				this.containers[innermostIndex].containerCache.over = 1;\n			}\n		} else {\n\n			//When entering a new container, we will find the item with the least distance and append our item near it\n			dist = 10000;\n			itemWithLeastDistance = null;\n			floating = innermostContainer.floating || isFloating(this.currentItem);\n			posProperty = floating ? "left" : "top";\n			sizeProperty = floating ? "width" : "height";\n			base = this.positionAbs[posProperty] + this.offset.click[posProperty];\n			for (j = this.items.length - 1; j >= 0; j--) {\n				if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {\n					continue;\n				}\n				if(this.items[j].item[0] === this.currentItem[0]) {\n					continue;\n				}\n				if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {\n					continue;\n				}\n				cur = this.items[j].item.offset()[posProperty];\n				nearBottom = false;\n				if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){\n					nearBottom = true;\n					cur += this.items[j][sizeProperty];\n				}\n\n				if(Math.abs(cur - base) < dist) {\n					dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];\n					this.direction = nearBottom ? "up": "down";\n				}\n			}\n\n			//Check if dropOnEmpty is enabled\n			if(!itemWithLeastDistance && !this.options.dropOnEmpty) {\n				return;\n			}\n\n			if(this.currentContainer === this.containers[innermostIndex]) {\n				return;\n			}\n\n			itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);\n			this._trigger("change", event, this._uiHash());\n			this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));\n			this.currentContainer = this.containers[innermostIndex];\n\n			//Update the placeholder\n			this.options.placeholder.update(this.currentContainer, this.placeholder);\n\n			this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));\n			this.containers[innermostIndex].containerCache.over = 1;\n		}\n\n\n	},\n\n	_createHelper: function(event) {\n\n		var o = this.options,\n			helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);\n\n		//Add the helper to the DOM if that didn\'t happen already\n		if(!helper.parents("body").length) {\n			$(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);\n		}\n\n		if(helper[0] === this.currentItem[0]) {\n			this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };\n		}\n\n		if(!helper[0].style.width || o.forceHelperSize) {\n			helper.width(this.currentItem.width());\n		}\n		if(!helper[0].style.height || o.forceHelperSize) {\n			helper.height(this.currentItem.height());\n		}\n\n		return helper;\n\n	},\n\n	_adjustOffsetFromHelper: function(obj) {\n		if (typeof obj === "string") {\n			obj = obj.split(" ");\n		}\n		if ($.isArray(obj)) {\n			obj = {left: +obj[0], top: +obj[1] || 0};\n		}\n		if ("left" in obj) {\n			this.offset.click.left = obj.left + this.margins.left;\n		}\n		if ("right" in obj) {\n			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n		}\n		if ("top" in obj) {\n			this.offset.click.top = obj.top + this.margins.top;\n		}\n		if ("bottom" in obj) {\n			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n		}\n	},\n\n	_getParentOffset: function() {\n\n\n		//Get the offsetParent and cache its position\n		this.offsetParent = this.helper.offsetParent();\n		var po = this.offsetParent.offset();\n\n		// This is a special case where we need to modify a offset calculated on start, since the following happened:\n		// 1. The position of the helper is absolute, so it\'s position is calculated based on the next positioned parent\n		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn\'t the document, which means that\n		//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n		if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n			po.left += this.scrollParent.scrollLeft();\n			po.top += this.scrollParent.scrollTop();\n		}\n\n		// This needs to be actually done for all browsers, since pageX/pageY includes this information\n		// with an ugly IE fix\n		if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {\n			po = { top: 0, left: 0 };\n		}\n\n		return {\n			top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),\n			left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)\n		};\n\n	},\n\n	_getRelativeOffset: function() {\n\n		if(this.cssPosition === "relative") {\n			var p = this.currentItem.position();\n			return {\n				top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),\n				left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()\n			};\n		} else {\n			return { top: 0, left: 0 };\n		}\n\n	},\n\n	_cacheMargins: function() {\n		this.margins = {\n			left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),\n			top: (parseInt(this.currentItem.css("marginTop"),10) || 0)\n		};\n	},\n\n	_cacheHelperProportions: function() {\n		this.helperProportions = {\n			width: this.helper.outerWidth(),\n			height: this.helper.outerHeight()\n		};\n	},\n\n	_setContainment: function() {\n\n		var ce, co, over,\n			o = this.options;\n		if(o.containment === "parent") {\n			o.containment = this.helper[0].parentNode;\n		}\n		if(o.containment === "document" || o.containment === "window") {\n			this.containment = [\n				0 - this.offset.relative.left - this.offset.parent.left,\n				0 - this.offset.relative.top - this.offset.parent.top,\n				$(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,\n				($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top\n			];\n		}\n\n		if(!(/^(document|window|parent)$/).test(o.containment)) {\n			ce = $(o.containment)[0];\n			co = $(o.containment).offset();\n			over = ($(ce).css("overflow") !== "hidden");\n\n			this.containment = [\n				co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,\n				co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,\n				co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,\n				co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top\n			];\n		}\n\n	},\n\n	_convertPositionTo: function(d, pos) {\n\n		if(!pos) {\n			pos = this.position;\n		}\n		var mod = d === "absolute" ? 1 : -1,\n			scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,\n			scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n		return {\n			top: (\n				pos.top	+																// The absolute mouse position\n				this.offset.relative.top * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent\n				this.offset.parent.top * mod -											// The offsetParent\'s offset without borders (offset + border)\n				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)\n			),\n			left: (\n				pos.left +																// The absolute mouse position\n				this.offset.relative.left * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent\n				this.offset.parent.left * mod	-										// The offsetParent\'s offset without borders (offset + border)\n				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)\n			)\n		};\n\n	},\n\n	_generatePosition: function(event) {\n\n		var top, left,\n			o = this.options,\n			pageX = event.pageX,\n			pageY = event.pageY,\n			scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n		// This is another very weird special case that only happens for relative elements:\n		// 1. If the css position is relative\n		// 2. and the scroll parent is the document or similar to the offset parent\n		// we have to refresh the relative offset during the scroll so there are no jumps\n		if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {\n			this.offset.relative = this._getRelativeOffset();\n		}\n\n		/*\n		 * - Position constraining -\n		 * Constrain the position to a mix of grid, containment.\n		 */\n\n		if(this.originalPosition) { //If we are not dragging yet, we won\'t check for options\n\n			if(this.containment) {\n				if(event.pageX - this.offset.click.left < this.containment[0]) {\n					pageX = this.containment[0] + this.offset.click.left;\n				}\n				if(event.pageY - this.offset.click.top < this.containment[1]) {\n					pageY = this.containment[1] + this.offset.click.top;\n				}\n				if(event.pageX - this.offset.click.left > this.containment[2]) {\n					pageX = this.containment[2] + this.offset.click.left;\n				}\n				if(event.pageY - this.offset.click.top > this.containment[3]) {\n					pageY = this.containment[3] + this.offset.click.top;\n				}\n			}\n\n			if(o.grid) {\n				top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];\n				pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n				left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];\n				pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n			}\n\n		}\n\n		return {\n			top: (\n				pageY -																// The absolute mouse position\n				this.offset.click.top -													// Click offset (relative to the element)\n				this.offset.relative.top	-											// Only for relative positioned nodes: Relative offset from element to offset parent\n				this.offset.parent.top +												// The offsetParent\'s offset without borders (offset + border)\n				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))\n			),\n			left: (\n				pageX -																// The absolute mouse position\n				this.offset.click.left -												// Click offset (relative to the element)\n				this.offset.relative.left	-											// Only for relative positioned nodes: Relative offset from element to offset parent\n				this.offset.parent.left +												// The offsetParent\'s offset without borders (offset + border)\n				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))\n			)\n		};\n\n	},\n\n	_rearrange: function(event, i, a, hardRefresh) {\n\n		a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));\n\n		//Various things done here to improve the performance:\n		// 1. we create a setTimeout, that calls refreshPositions\n		// 2. on the instance, we have a counter variable, that get\'s higher after every append\n		// 3. on the local scope, we copy the counter variable, and check in the timeout, if it\'s still the same\n		// 4. this lets only the last addition to the timeout stack through\n		this.counter = this.counter ? ++this.counter : 1;\n		var counter = this.counter;\n\n		this._delay(function() {\n			if(counter === this.counter) {\n				this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove\n			}\n		});\n\n	},\n\n	_clear: function(event, noPropagation) {\n\n		this.reverting = false;\n		// We delay all events that have to be triggered to after the point where the placeholder has been removed and\n		// everything else normalized again\n		var i,\n			delayedTriggers = [];\n\n		// We first have to update the dom position of the actual currentItem\n		// Note: don\'t do it if the current item is already removed (by a user), or it gets reappended (see #4088)\n		if(!this._noFinalSort && this.currentItem.parent().length) {\n			this.placeholder.before(this.currentItem);\n		}\n		this._noFinalSort = null;\n\n		if(this.helper[0] === this.currentItem[0]) {\n			for(i in this._storedCSS) {\n				if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {\n					this._storedCSS[i] = "";\n				}\n			}\n			this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");\n		} else {\n			this.currentItem.show();\n		}\n\n		if(this.fromOutside && !noPropagation) {\n			delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });\n		}\n		if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {\n			delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed\n		}\n\n		// Check if the items Container has Changed and trigger appropriate\n		// events.\n		if (this !== this.currentContainer) {\n			if(!noPropagation) {\n				delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });\n				delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); };  }).call(this, this.currentContainer));\n				delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this));  }; }).call(this, this.currentContainer));\n			}\n		}\n\n\n		//Post events to containers\n		for (i = this.containers.length - 1; i >= 0; i--){\n			if(!noPropagation) {\n				delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n			}\n			if(this.containers[i].containerCache.over) {\n				delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n				this.containers[i].containerCache.over = 0;\n			}\n		}\n\n		//Do what was originally in plugins\n		if ( this.storedCursor ) {\n			this.document.find( "body" ).css( "cursor", this.storedCursor );\n			this.storedStylesheet.remove();\n		}\n		if(this._storedOpacity) {\n			this.helper.css("opacity", this._storedOpacity);\n		}\n		if(this._storedZIndex) {\n			this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);\n		}\n\n		this.dragging = false;\n		if(this.cancelHelperRemoval) {\n			if(!noPropagation) {\n				this._trigger("beforeStop", event, this._uiHash());\n				for (i=0; i < delayedTriggers.length; i++) {\n					delayedTriggers[i].call(this, event);\n				} //Trigger all delayed events\n				this._trigger("stop", event, this._uiHash());\n			}\n\n			this.fromOutside = false;\n			return false;\n		}\n\n		if(!noPropagation) {\n			this._trigger("beforeStop", event, this._uiHash());\n		}\n\n		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n		this.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\n		if(this.helper[0] !== this.currentItem[0]) {\n			this.helper.remove();\n		}\n		this.helper = null;\n\n		if(!noPropagation) {\n			for (i=0; i < delayedTriggers.length; i++) {\n				delayedTriggers[i].call(this, event);\n			} //Trigger all delayed events\n			this._trigger("stop", event, this._uiHash());\n		}\n\n		this.fromOutside = false;\n		return true;\n\n	},\n\n	_trigger: function() {\n		if ($.Widget.prototype._trigger.apply(this, arguments) === false) {\n			this.cancel();\n		}\n	},\n\n	_uiHash: function(_inst) {\n		var inst = _inst || this;\n		return {\n			helper: inst.helper,\n			placeholder: inst.placeholder || $([]),\n			position: inst.position,\n			originalPosition: inst.originalPosition,\n			offset: inst.positionAbs,\n			item: inst.currentItem,\n			sender: _inst ? _inst.element : null\n		};\n	}\n\n});\n\n})(jQuery);\n\n(function($, undefined) {\n\nvar dataSpace = "ui-effects-";\n\n$.effects = {\n	effect: {}\n};\n\n/*!\n * jQuery Color Animations v2.1.2\n * https://github.com/jquery/jquery-color\n *\n * Copyright 2013 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * Date: Wed Jan 16 08:47:09 2013 -0600\n */\n(function( jQuery, undefined ) {\n\n	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",\n\n	// plusequals test for += 100 -= 100\n	rplusequals = /^([\\-+])=\\s*(\\d+\\.?\\d*)/,\n	// a set of RE\'s that can match strings and generate color tuples.\n	stringParsers = [{\n			re: /rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n			parse: function( execResult ) {\n				return [\n					execResult[ 1 ],\n					execResult[ 2 ],\n					execResult[ 3 ],\n					execResult[ 4 ]\n				];\n			}\n		}, {\n			re: /rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n			parse: function( execResult ) {\n				return [\n					execResult[ 1 ] * 2.55,\n					execResult[ 2 ] * 2.55,\n					execResult[ 3 ] * 2.55,\n					execResult[ 4 ]\n				];\n			}\n		}, {\n			// this regex ignores A-F because it\'s compared against an already lowercased string\n			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,\n			parse: function( execResult ) {\n				return [\n					parseInt( execResult[ 1 ], 16 ),\n					parseInt( execResult[ 2 ], 16 ),\n					parseInt( execResult[ 3 ], 16 )\n				];\n			}\n		}, {\n			// this regex ignores A-F because it\'s compared against an already lowercased string\n			re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,\n			parse: function( execResult ) {\n				return [\n					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),\n					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),\n					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )\n				];\n			}\n		}, {\n			re: /hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n			space: "hsla",\n			parse: function( execResult ) {\n				return [\n					execResult[ 1 ],\n					execResult[ 2 ] / 100,\n					execResult[ 3 ] / 100,\n					execResult[ 4 ]\n				];\n			}\n		}],\n\n	// jQuery.Color( )\n	color = jQuery.Color = function( color, green, blue, alpha ) {\n		return new jQuery.Color.fn.parse( color, green, blue, alpha );\n	},\n	spaces = {\n		rgba: {\n			props: {\n				red: {\n					idx: 0,\n					type: "byte"\n				},\n				green: {\n					idx: 1,\n					type: "byte"\n				},\n				blue: {\n					idx: 2,\n					type: "byte"\n				}\n			}\n		},\n\n		hsla: {\n			props: {\n				hue: {\n					idx: 0,\n					type: "degrees"\n				},\n				saturation: {\n					idx: 1,\n					type: "percent"\n				},\n				lightness: {\n					idx: 2,\n					type: "percent"\n				}\n			}\n		}\n	},\n	propTypes = {\n		"byte": {\n			floor: true,\n			max: 255\n		},\n		"percent": {\n			max: 1\n		},\n		"degrees": {\n			mod: 360,\n			floor: true\n		}\n	},\n	support = color.support = {},\n\n	// element for support tests\n	supportElem = jQuery( "

" )[ 0 ],\n\n // colors = jQuery.Color.names\n colors,\n\n // local aliases of functions called often\n each = jQuery.each;\n\n// determine rgba support immediately\nsupportElem.style.cssText = "background-color:rgba(1,1,1,.5)";\nsupport.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;\n\n// define cache name and alpha properties\n// for rgba and hsla spaces\neach( spaces, function( spaceName, space ) {\n space.cache = "_" + spaceName;\n space.props.alpha = {\n idx: 3,\n type: "percent",\n def: 1\n };\n});\n\nfunction clamp( value, prop, allowEmpty ) {\n var type = propTypes[ prop.type ] || {};\n\n if ( value == null ) {\n return (allowEmpty || !prop.def) ? null : prop.def;\n }\n\n // ~~ is an short way of doing floor for positive numbers\n value = type.floor ? ~~value : parseFloat( value );\n\n // IE will pass in empty strings as value for alpha,\n // which will hit this case\n if ( isNaN( value ) ) {\n return prop.def;\n }\n\n if ( type.mod ) {\n // we add mod before modding to make sure that negatives values\n // get converted properly: -10 -> 350\n return (value + type.mod) % type.mod;\n }\n\n // for now all property types without mod have min and max\n return 0 > value ? 0 : type.max < value ? type.max : value;\n}\n\nfunction stringParse( string ) {\n var inst = color(),\n rgba = inst._rgba = [];\n\n string = string.toLowerCase();\n\n each( stringParsers, function( i, parser ) {\n var parsed,\n match = parser.re.exec( string ),\n values = match && parser.parse( match ),\n spaceName = parser.space || "rgba";\n\n if ( values ) {\n parsed = inst[ spaceName ]( values );\n\n // if this was an rgba parse the assignment might happen twice\n // oh well....\n inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];\n rgba = inst._rgba = parsed._rgba;\n\n // exit each( stringParsers ) here because we matched\n return false;\n }\n });\n\n // Found a stringParser that handled it\n if ( rgba.length ) {\n\n // if this came from a parsed string, force "transparent" when alpha is 0\n // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)\n if ( rgba.join() === "0,0,0,0" ) {\n jQuery.extend( rgba, colors.transparent );\n }\n return inst;\n }\n\n // named colors\n return colors[ string ];\n}\n\ncolor.fn = jQuery.extend( color.prototype, {\n parse: function( red, green, blue, alpha ) {\n if ( red === undefined ) {\n this._rgba = [ null, null, null, null ];\n return this;\n }\n if ( red.jquery || red.nodeType ) {\n red = jQuery( red ).css( green );\n green = undefined;\n }\n\n var inst = this,\n type = jQuery.type( red ),\n rgba = this._rgba = [];\n\n // more than 1 argument specified - assume ( red, green, blue, alpha )\n if ( green !== undefined ) {\n red = [ red, green, blue, alpha ];\n type = "array";\n }\n\n if ( type === "string" ) {\n return this.parse( stringParse( red ) || colors._default );\n }\n\n if ( type === "array" ) {\n each( spaces.rgba.props, function( key, prop ) {\n rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );\n });\n return this;\n }\n\n if ( type === "object" ) {\n if ( red instanceof color ) {\n each( spaces, function( spaceName, space ) {\n if ( red[ space.cache ] ) {\n inst[ space.cache ] = red[ space.cache ].slice();\n }\n });\n } else {\n each( spaces, function( spaceName, space ) {\n var cache = space.cache;\n each( space.props, function( key, prop ) {\n\n // if the cache doesn\'t exist, and we know how to convert\n if ( !inst[ cache ] && space.to ) {\n\n // if the value was null, we don\'t need to copy it\n // if the key was alpha, we don\'t need to copy it either\n if ( key === "alpha" || red[ key ] == null ) {\n return;\n }\n inst[ cache ] = space.to( inst._rgba );\n }\n\n // this is the only case where we allow nulls for ALL properties.\n // call clamp with alwaysAllowEmpty\n inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );\n });\n\n // everything defined but alpha?\n if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {\n // use the default of 1\n inst[ cache ][ 3 ] = 1;\n if ( space.from ) {\n inst._rgba = space.from( inst[ cache ] );\n }\n }\n });\n }\n return this;\n }\n },\n is: function( compare ) {\n var is = color( compare ),\n same = true,\n inst = this;\n\n each( spaces, function( _, space ) {\n var localCache,\n isCache = is[ space.cache ];\n if (isCache) {\n localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];\n each( space.props, function( _, prop ) {\n if ( isCache[ prop.idx ] != null ) {\n same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );\n return same;\n }\n });\n }\n return same;\n });\n return same;\n },\n _space: function() {\n var used = [],\n inst = this;\n each( spaces, function( spaceName, space ) {\n if ( inst[ space.cache ] ) {\n used.push( spaceName );\n }\n });\n return used.pop();\n },\n transition: function( other, distance ) {\n var end = color( other ),\n spaceName = end._space(),\n space = spaces[ spaceName ],\n startColor = this.alpha() === 0 ? color( "transparent" ) : this,\n start = startColor[ space.cache ] || space.to( startColor._rgba ),\n result = start.slice();\n\n end = end[ space.cache ];\n each( space.props, function( key, prop ) {\n var index = prop.idx,\n startValue = start[ index ],\n endValue = end[ index ],\n type = propTypes[ prop.type ] || {};\n\n // if null, don\'t override start value\n if ( endValue === null ) {\n return;\n }\n // if null - use end\n if ( startValue === null ) {\n result[ index ] = endValue;\n } else {\n if ( type.mod ) {\n if ( endValue - startValue > type.mod / 2 ) {\n startValue += type.mod;\n } else if ( startValue - endValue > type.mod / 2 ) {\n startValue -= type.mod;\n }\n }\n result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );\n }\n });\n return this[ spaceName ]( result );\n },\n blend: function( opaque ) {\n // if we are already opaque - return ourself\n if ( this._rgba[ 3 ] === 1 ) {\n return this;\n }\n\n var rgb = this._rgba.slice(),\n a = rgb.pop(),\n blend = color( opaque )._rgba;\n\n return color( jQuery.map( rgb, function( v, i ) {\n return ( 1 - a ) * blend[ i ] + a * v;\n }));\n },\n toRgbaString: function() {\n var prefix = "rgba(",\n rgba = jQuery.map( this._rgba, function( v, i ) {\n return v == null ? ( i > 2 ? 1 : 0 ) : v;\n });\n\n if ( rgba[ 3 ] === 1 ) {\n rgba.pop();\n prefix = "rgb(";\n }\n\n return prefix + rgba.join() + ")";\n },\n toHslaString: function() {\n var prefix = "hsla(",\n hsla = jQuery.map( this.hsla(), function( v, i ) {\n if ( v == null ) {\n v = i > 2 ? 1 : 0;\n }\n\n // catch 1 and 2\n if ( i && i < 3 ) {\n v = Math.round( v * 100 ) + "%";\n }\n return v;\n });\n\n if ( hsla[ 3 ] === 1 ) {\n hsla.pop();\n prefix = "hsl(";\n }\n return prefix + hsla.join() + ")";\n },\n toHexString: function( includeAlpha ) {\n var rgba = this._rgba.slice(),\n alpha = rgba.pop();\n\n if ( includeAlpha ) {\n rgba.push( ~~( alpha * 255 ) );\n }\n\n return "#" + jQuery.map( rgba, function( v ) {\n\n // default to 0 when nulls exist\n v = ( v || 0 ).toString( 16 );\n return v.length === 1 ? "0" + v : v;\n }).join("");\n },\n toString: function() {\n return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();\n }\n});\ncolor.fn.parse.prototype = color.fn;\n\n// hsla conversions adapted from:\n// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021\n\nfunction hue2rgb( p, q, h ) {\n h = ( h + 1 ) % 1;\n if ( h * 6 < 1 ) {\n return p + (q - p) * h * 6;\n }\n if ( h * 2 < 1) {\n return q;\n }\n if ( h * 3 < 2 ) {\n return p + (q - p) * ((2/3) - h) * 6;\n }\n return p;\n}\n\nspaces.hsla.to = function ( rgba ) {\n if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {\n return [ null, null, null, rgba[ 3 ] ];\n }\n var r = rgba[ 0 ] / 255,\n g = rgba[ 1 ] / 255,\n b = rgba[ 2 ] / 255,\n a = rgba[ 3 ],\n max = Math.max( r, g, b ),\n min = Math.min( r, g, b ),\n diff = max - min,\n add = max + min,\n l = add * 0.5,\n h, s;\n\n if ( min === max ) {\n h = 0;\n } else if ( r === max ) {\n h = ( 60 * ( g - b ) / diff ) + 360;\n } else if ( g === max ) {\n h = ( 60 * ( b - r ) / diff ) + 120;\n } else {\n h = ( 60 * ( r - g ) / diff ) + 240;\n }\n\n // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%\n // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)\n if ( diff === 0 ) {\n s = 0;\n } else if ( l <= 0.5 ) {\n s = diff / add;\n } else {\n s = diff / ( 2 - add );\n }\n return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];\n};\n\nspaces.hsla.from = function ( hsla ) {\n if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {\n return [ null, null, null, hsla[ 3 ] ];\n }\n var h = hsla[ 0 ] / 360,\n s = hsla[ 1 ],\n l = hsla[ 2 ],\n a = hsla[ 3 ],\n q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,\n p = 2 * l - q;\n\n return [\n Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),\n Math.round( hue2rgb( p, q, h ) * 255 ),\n Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),\n a\n ];\n};\n\n\neach( spaces, function( spaceName, space ) {\n var props = space.props,\n cache = space.cache,\n to = space.to,\n from = space.from;\n\n // makes rgba() and hsla()\n color.fn[ spaceName ] = function( value ) {\n\n // generate a cache for this space if it doesn\'t exist\n if ( to && !this[ cache ] ) {\n this[ cache ] = to( this._rgba );\n }\n if ( value === undefined ) {\n return this[ cache ].slice();\n }\n\n var ret,\n type = jQuery.type( value ),\n arr = ( type === "array" || type === "object" ) ? value : arguments,\n local = this[ cache ].slice();\n\n each( props, function( key, prop ) {\n var val = arr[ type === "object" ? key : prop.idx ];\n if ( val == null ) {\n val = local[ prop.idx ];\n }\n local[ prop.idx ] = clamp( val, prop );\n });\n\n if ( from ) {\n ret = color( from( local ) );\n ret[ cache ] = local;\n return ret;\n } else {\n return color( local );\n }\n };\n\n // makes red() green() blue() alpha() hue() saturation() lightness()\n each( props, function( key, prop ) {\n // alpha is included in more than one space\n if ( color.fn[ key ] ) {\n return;\n }\n color.fn[ key ] = function( value ) {\n var vtype = jQuery.type( value ),\n fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),\n local = this[ fn ](),\n cur = local[ prop.idx ],\n match;\n\n if ( vtype === "undefined" ) {\n return cur;\n }\n\n if ( vtype === "function" ) {\n value = value.call( this, cur );\n vtype = jQuery.type( value );\n }\n if ( value == null && prop.empty ) {\n return this;\n }\n if ( vtype === "string" ) {\n match = rplusequals.exec( value );\n if ( match ) {\n value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );\n }\n }\n local[ prop.idx ] = value;\n return this[ fn ]( local );\n };\n });\n});\n\n// add cssHook and .fx.step function for each named hook.\n// accept a space separated string of properties\ncolor.hook = function( hook ) {\n var hooks = hook.split( " " );\n each( hooks, function( i, hook ) {\n jQuery.cssHooks[ hook ] = {\n set: function( elem, value ) {\n var parsed, curElem,\n backgroundColor = "";\n\n if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {\n value = color( parsed || value );\n if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {\n curElem = hook === "backgroundColor" ? elem.parentNode : elem;\n while (\n (backgroundColor === "" || backgroundColor === "transparent") &&\n curElem && curElem.style\n ) {\n try {\n backgroundColor = jQuery.css( curElem, "backgroundColor" );\n curElem = curElem.parentNode;\n } catch ( e ) {\n }\n }\n\n value = value.blend( backgroundColor && backgroundColor !== "transparent" ?\n backgroundColor :\n "_default" );\n }\n\n value = value.toRgbaString();\n }\n try {\n elem.style[ hook ] = value;\n } catch( e ) {\n // wrapped to prevent IE from throwing errors on "invalid" values like \'auto\' or \'inherit\'\n }\n }\n };\n jQuery.fx.step[ hook ] = function( fx ) {\n if ( !fx.colorInit ) {\n fx.start = color( fx.elem, hook );\n fx.end = color( fx.end );\n fx.colorInit = true;\n }\n jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );\n };\n });\n\n};\n\ncolor.hook( stepHooks );\n\njQuery.cssHooks.borderColor = {\n expand: function( value ) {\n var expanded = {};\n\n each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {\n expanded[ "border" + part + "Color" ] = value;\n });\n return expanded;\n }\n};\n\n// Basic color names only.\n// Usage of any of the other color names requires adding yourself or including\n// jquery.color.svg-names.js.\ncolors = jQuery.Color.names = {\n // 4.1. Basic color keywords\n aqua: "#00ffff",\n black: "#000000",\n blue: "#0000ff",\n fuchsia: "#ff00ff",\n gray: "#808080",\n green: "#008000",\n lime: "#00ff00",\n maroon: "#800000",\n navy: "#000080",\n olive: "#808000",\n purple: "#800080",\n red: "#ff0000",\n silver: "#c0c0c0",\n teal: "#008080",\n white: "#ffffff",\n yellow: "#ffff00",\n\n // 4.2.3. "transparent" color keyword\n transparent: [ null, null, null, 0 ],\n\n _default: "#ffffff"\n};\n\n})( jQuery );\n\n\n/******************************************************************************/\n/****************************** CLASS ANIMATIONS ******************************/\n/******************************************************************************/\n(function() {\n\nvar classAnimationActions = [ "add", "remove", "toggle" ],\n shorthandStyles = {\n border: 1,\n borderBottom: 1,\n borderColor: 1,\n borderLeft: 1,\n borderRight: 1,\n borderTop: 1,\n borderWidth: 1,\n margin: 1,\n padding: 1\n };\n\n$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {\n $.fx.step[ prop ] = function( fx ) {\n if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {\n jQuery.style( fx.elem, prop, fx.end );\n fx.setAttr = true;\n }\n };\n});\n\nfunction getElementStyles( elem ) {\n var key, len,\n style = elem.ownerDocument.defaultView ?\n elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :\n elem.currentStyle,\n styles = {};\n\n if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {\n len = style.length;\n while ( len-- ) {\n key = style[ len ];\n if ( typeof style[ key ] === "string" ) {\n styles[ $.camelCase( key ) ] = style[ key ];\n }\n }\n // support: Opera, IE <9\n } else {\n for ( key in style ) {\n if ( typeof style[ key ] === "string" ) {\n styles[ key ] = style[ key ];\n }\n }\n }\n\n return styles;\n}\n\n\nfunction styleDifference( oldStyle, newStyle ) {\n var diff = {},\n name, value;\n\n for ( name in newStyle ) {\n value = newStyle[ name ];\n if ( oldStyle[ name ] !== value ) {\n if ( !shorthandStyles[ name ] ) {\n if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {\n diff[ name ] = value;\n }\n }\n }\n }\n\n return diff;\n}\n\n// support: jQuery <1.8\nif ( !$.fn.addBack ) {\n $.fn.addBack = function( selector ) {\n return this.add( selector == null ?\n this.prevObject : this.prevObject.filter( selector )\n );\n };\n}\n\n$.effects.animateClass = function( value, duration, easing, callback ) {\n var o = $.speed( duration, easing, callback );\n\n return this.queue( function() {\n var animated = $( this ),\n baseClass = animated.attr( "class" ) || "",\n applyClassChange,\n allAnimations = o.children ? animated.find( "*" ).addBack() : animated;\n\n // map the animated objects to store the original styles.\n allAnimations = allAnimations.map(function() {\n var el = $( this );\n return {\n el: el,\n start: getElementStyles( this )\n };\n });\n\n // apply class change\n applyClassChange = function() {\n $.each( classAnimationActions, function(i, action) {\n if ( value[ action ] ) {\n animated[ action + "Class" ]( value[ action ] );\n }\n });\n };\n applyClassChange();\n\n // map all animated objects again - calculate new styles and diff\n allAnimations = allAnimations.map(function() {\n this.end = getElementStyles( this.el[ 0 ] );\n this.diff = styleDifference( this.start, this.end );\n return this;\n });\n\n // apply original class\n animated.attr( "class", baseClass );\n\n // map all animated objects again - this time collecting a promise\n allAnimations = allAnimations.map(function() {\n var styleInfo = this,\n dfd = $.Deferred(),\n opts = $.extend({}, o, {\n queue: false,\n complete: function() {\n dfd.resolve( styleInfo );\n }\n });\n\n this.el.animate( this.diff, opts );\n return dfd.promise();\n });\n\n // once all animations have completed:\n $.when.apply( $, allAnimations.get() ).done(function() {\n\n // set the final class\n applyClassChange();\n\n // for each animated element,\n // clear all css properties that were animated\n $.each( arguments, function() {\n var el = this.el;\n $.each( this.diff, function(key) {\n el.css( key, "" );\n });\n });\n\n // this is guarnteed to be there if you use jQuery.speed()\n // it also handles dequeuing the next anim...\n o.complete.call( animated[ 0 ] );\n });\n });\n};\n\n$.fn.extend({\n addClass: (function( orig ) {\n return function( classNames, speed, easing, callback ) {\n return speed ?\n $.effects.animateClass.call( this,\n { add: classNames }, speed, easing, callback ) :\n orig.apply( this, arguments );\n };\n })( $.fn.addClass ),\n\n removeClass: (function( orig ) {\n return function( classNames, speed, easing, callback ) {\n return arguments.length > 1 ?\n $.effects.animateClass.call( this,\n { remove: classNames }, speed, easing, callback ) :\n orig.apply( this, arguments );\n };\n })( $.fn.removeClass ),\n\n toggleClass: (function( orig ) {\n return function( classNames, force, speed, easing, callback ) {\n if ( typeof force === "boolean" || force === undefined ) {\n if ( !speed ) {\n // without speed parameter\n return orig.apply( this, arguments );\n } else {\n return $.effects.animateClass.call( this,\n (force ? { add: classNames } : { remove: classNames }),\n speed, easing, callback );\n }\n } else {\n // without force parameter\n return $.effects.animateClass.call( this,\n { toggle: classNames }, force, speed, easing );\n }\n };\n })( $.fn.toggleClass ),\n\n switchClass: function( remove, add, speed, easing, callback) {\n return $.effects.animateClass.call( this, {\n add: add,\n remove: remove\n }, speed, easing, callback );\n }\n});\n\n})();\n\n/******************************************************************************/\n/*********************************** EFFECTS **********************************/\n/******************************************************************************/\n\n(function() {\n\n$.extend( $.effects, {\n version: "1.10.3",\n\n // Saves a set of properties in a data storage\n save: function( element, set ) {\n for( var i=0; i < set.length; i++ ) {\n if ( set[ i ] !== null ) {\n element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );\n }\n }\n },\n\n // Restores a set of previously saved properties from a data storage\n restore: function( element, set ) {\n var val, i;\n for( i=0; i < set.length; i++ ) {\n if ( set[ i ] !== null ) {\n val = element.data( dataSpace + set[ i ] );\n // support: jQuery 1.6.2\n // http://bugs.jquery.com/ticket/9917\n // jQuery 1.6.2 incorrectly returns undefined for any falsy value.\n // We can\'t differentiate between "" and 0 here, so we just assume\n // empty string since it\'s likely to be a more common value...\n if ( val === undefined ) {\n val = "";\n }\n element.css( set[ i ], val );\n }\n }\n },\n\n setMode: function( el, mode ) {\n if (mode === "toggle") {\n mode = el.is( ":hidden" ) ? "show" : "hide";\n }\n return mode;\n },\n\n // Translates a [top,left] array into a baseline value\n // this should be a little more flexible in the future to handle a string & hash\n getBaseline: function( origin, original ) {\n var y, x;\n switch ( origin[ 0 ] ) {\n case "top": y = 0; break;\n case "middle": y = 0.5; break;\n case "bottom": y = 1; break;\n default: y = origin[ 0 ] / original.height;\n }\n switch ( origin[ 1 ] ) {\n case "left": x = 0; break;\n case "center": x = 0.5; break;\n case "right": x = 1; break;\n default: x = origin[ 1 ] / original.width;\n }\n return {\n x: x,\n y: y\n };\n },\n\n // Wraps the element around a wrapper that copies position properties\n createWrapper: function( element ) {\n\n // if the element is already wrapped, return it\n if ( element.parent().is( ".ui-effects-wrapper" )) {\n return element.parent();\n }\n\n // wrap the element\n var props = {\n width: element.outerWidth(true),\n height: element.outerHeight(true),\n "float": element.css( "float" )\n },\n wrapper = $( "

" )\n .addClass( "ui-effects-wrapper" )\n .css({\n fontSize: "100%",\n background: "transparent",\n border: "none",\n margin: 0,\n padding: 0\n }),\n // Store the size in case width/height are defined in % - Fixes #5245\n size = {\n width: element.width(),\n height: element.height()\n },\n active = document.activeElement;\n\n // support: Firefox\n // Firefox incorrectly exposes anonymous content\n // https://bugzilla.mozilla.org/show_bug.cgi?id=561664\n try {\n active.id;\n } catch( e ) {\n active = document.body;\n }\n\n element.wrap( wrapper );\n\n // Fixes #7595 - Elements lose focus when wrapped.\n if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n $( active ).focus();\n }\n\n wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element\n\n // transfer positioning properties to the wrapper\n if ( element.css( "position" ) === "static" ) {\n wrapper.css({ position: "relative" });\n element.css({ position: "relative" });\n } else {\n $.extend( props, {\n position: element.css( "position" ),\n zIndex: element.css( "z-index" )\n });\n $.each([ "top", "left", "bottom", "right" ], function(i, pos) {\n props[ pos ] = element.css( pos );\n if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {\n props[ pos ] = "auto";\n }\n });\n element.css({\n position: "relative",\n top: 0,\n left: 0,\n right: "auto",\n bottom: "auto"\n });\n }\n element.css(size);\n\n return wrapper.css( props ).show();\n },\n\n removeWrapper: function( element ) {\n var active = document.activeElement;\n\n if ( element.parent().is( ".ui-effects-wrapper" ) ) {\n element.parent().replaceWith( element );\n\n // Fixes #7595 - Elements lose focus when wrapped.\n if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n $( active ).focus();\n }\n }\n\n\n return element;\n },\n\n setTransition: function( element, list, factor, value ) {\n value = value || {};\n $.each( list, function( i, x ) {\n var unit = element.cssUnit( x );\n if ( unit[ 0 ] > 0 ) {\n value[ x ] = unit[ 0 ] * factor + unit[ 1 ];\n }\n });\n return value;\n }\n});\n\n// return an effect options object for the given parameters:\nfunction _normalizeArguments( effect, options, speed, callback ) {\n\n // allow passing all options as the first parameter\n if ( $.isPlainObject( effect ) ) {\n options = effect;\n effect = effect.effect;\n }\n\n // convert to an object\n effect = { effect: effect };\n\n // catch (effect, null, ...)\n if ( options == null ) {\n options = {};\n }\n\n // catch (effect, callback)\n if ( $.isFunction( options ) ) {\n callback = options;\n speed = null;\n options = {};\n }\n\n // catch (effect, speed, ?)\n if ( typeof options === "number" || $.fx.speeds[ options ] ) {\n callback = speed;\n speed = options;\n options = {};\n }\n\n // catch (effect, options, callback)\n if ( $.isFunction( speed ) ) {\n callback = speed;\n speed = null;\n }\n\n // add options to effect\n if ( options ) {\n $.extend( effect, options );\n }\n\n speed = speed || options.duration;\n effect.duration = $.fx.off ? 0 :\n typeof speed === "number" ? speed :\n speed in $.fx.speeds ? $.fx.speeds[ speed ] :\n $.fx.speeds._default;\n\n effect.complete = callback || options.complete;\n\n return effect;\n}\n\nfunction standardAnimationOption( option ) {\n // Valid standard speeds (nothing, number, named speed)\n if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {\n return true;\n }\n\n // Invalid strings - treat as "normal" speed\n if ( typeof option === "string" && !$.effects.effect[ option ] ) {\n return true;\n }\n\n // Complete callback\n if ( $.isFunction( option ) ) {\n return true;\n }\n\n // Options hash (but not naming an effect)\n if ( typeof option === "object" && !option.effect ) {\n return true;\n }\n\n // Didn\'t match any standard API\n return false;\n}\n\n$.fn.extend({\n effect: function( /* effect, options, speed, callback */ ) {\n var args = _normalizeArguments.apply( this, arguments ),\n mode = args.mode,\n queue = args.queue,\n effectMethod = $.effects.effect[ args.effect ];\n\n if ( $.fx.off || !effectMethod ) {\n // delegate to the original method (e.g., .show()) if possible\n if ( mode ) {\n return this[ mode ]( args.duration, args.complete );\n } else {\n return this.each( function() {\n if ( args.complete ) {\n args.complete.call( this );\n }\n });\n }\n }\n\n function run( next ) {\n var elem = $( this ),\n complete = args.complete,\n mode = args.mode;\n\n function done() {\n if ( $.isFunction( complete ) ) {\n complete.call( elem[0] );\n }\n if ( $.isFunction( next ) ) {\n next();\n }\n }\n\n // If the element already has the correct final state, delegate to\n // the core methods so the internal tracking of "olddisplay" works.\n if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {\n elem[ mode ]();\n done();\n } else {\n effectMethod.call( elem[0], args, done );\n }\n }\n\n return queue === false ? this.each( run ) : this.queue( queue || "fx", run );\n },\n\n show: (function( orig ) {\n return function( option ) {\n if ( standardAnimationOption( option ) ) {\n return orig.apply( this, arguments );\n } else {\n var args = _normalizeArguments.apply( this, arguments );\n args.mode = "show";\n return this.effect.call( this, args );\n }\n };\n })( $.fn.show ),\n\n hide: (function( orig ) {\n return function( option ) {\n if ( standardAnimationOption( option ) ) {\n return orig.apply( this, arguments );\n } else {\n var args = _normalizeArguments.apply( this, arguments );\n args.mode = "hide";\n return this.effect.call( this, args );\n }\n };\n })( $.fn.hide ),\n\n toggle: (function( orig ) {\n return function( option ) {\n if ( standardAnimationOption( option ) || typeof option === "boolean" ) {\n return orig.apply( this, arguments );\n } else {\n var args = _normalizeArguments.apply( this, arguments );\n args.mode = "toggle";\n return this.effect.call( this, args );\n }\n };\n })( $.fn.toggle ),\n\n // helper functions\n cssUnit: function(key) {\n var style = this.css( key ),\n val = [];\n\n $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {\n if ( style.indexOf( unit ) > 0 ) {\n val = [ parseFloat( style ), unit ];\n }\n });\n return val;\n }\n});\n\n})();\n\n/******************************************************************************/\n/*********************************** EASING ***********************************/\n/******************************************************************************/\n\n(function() {\n\n// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\nvar baseEasings = {};\n\n$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {\n baseEasings[ name ] = function( p ) {\n return Math.pow( p, i + 2 );\n };\n});\n\n$.extend( baseEasings, {\n Sine: function ( p ) {\n return 1 - Math.cos( p * Math.PI / 2 );\n },\n Circ: function ( p ) {\n return 1 - Math.sqrt( 1 - p * p );\n },\n Elastic: function( p ) {\n return p === 0 || p === 1 ? p :\n -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );\n },\n Back: function( p ) {\n return p * p * ( 3 * p - 2 );\n },\n Bounce: function ( p ) {\n var pow2,\n bounce = 4;\n\n while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}\n return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );\n }\n});\n\n$.each( baseEasings, function( name, easeIn ) {\n $.easing[ "easeIn" + name ] = easeIn;\n $.easing[ "easeOut" + name ] = function( p ) {\n return 1 - easeIn( 1 - p );\n };\n $.easing[ "easeInOut" + name ] = function( p ) {\n return p < 0.5 ?\n easeIn( p * 2 ) / 2 :\n 1 - easeIn( p * -2 + 2 ) / 2;\n };\n});\n\n})();\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nvar uid = 0,\n hideProps = {},\n showProps = {};\n\nhideProps.height = hideProps.paddingTop = hideProps.paddingBottom =\n hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";\nshowProps.height = showProps.paddingTop = showProps.paddingBottom =\n showProps.borderTopWidth = showProps.borderBottomWidth = "show";\n\n$.widget( "ui.accordion", {\n version: "1.10.3",\n options: {\n active: 0,\n animate: {},\n collapsible: false,\n event: "click",\n header: "> li > :first-child,> :not(li):even",\n heightStyle: "auto",\n icons: {\n activeHeader: "ui-icon-triangle-1-s",\n header: "ui-icon-triangle-1-e"\n },\n\n // callbacks\n activate: null,\n beforeActivate: null\n },\n\n _create: function() {\n var options = this.options;\n this.prevShow = this.prevHide = $();\n this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )\n // ARIA\n .attr( "role", "tablist" );\n\n // don\'t allow collapsible: false and active: false / null\n if ( !options.collapsible && (options.active === false || options.active == null) ) {\n options.active = 0;\n }\n\n this._processPanels();\n // handle negative values\n if ( options.active < 0 ) {\n options.active += this.headers.length;\n }\n this._refresh();\n },\n\n _getCreateEventData: function() {\n return {\n header: this.active,\n panel: !this.active.length ? $() : this.active.next(),\n content: !this.active.length ? $() : this.active.next()\n };\n },\n\n _createIcons: function() {\n var icons = this.options.icons;\n if ( icons ) {\n $( "" )\n .addClass( "ui-accordion-header-icon ui-icon " + icons.header )\n .prependTo( this.headers );\n this.active.children( ".ui-accordion-header-icon" )\n .removeClass( icons.header )\n .addClass( icons.activeHeader );\n this.headers.addClass( "ui-accordion-icons" );\n }\n },\n\n _destroyIcons: function() {\n this.headers\n .removeClass( "ui-accordion-icons" )\n .children( ".ui-accordion-header-icon" )\n .remove();\n },\n\n _destroy: function() {\n var contents;\n\n // clean up main element\n this.element\n .removeClass( "ui-accordion ui-widget ui-helper-reset" )\n .removeAttr( "role" );\n\n // clean up headers\n this.headers\n .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )\n .removeAttr( "role" )\n .removeAttr( "aria-selected" )\n .removeAttr( "aria-controls" )\n .removeAttr( "tabIndex" )\n .each(function() {\n if ( /^ui-accordion/.test( this.id ) ) {\n this.removeAttribute( "id" );\n }\n });\n this._destroyIcons();\n\n // clean up content panels\n contents = this.headers.next()\n .css( "display", "" )\n .removeAttr( "role" )\n .removeAttr( "aria-expanded" )\n .removeAttr( "aria-hidden" )\n .removeAttr( "aria-labelledby" )\n .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )\n .each(function() {\n if ( /^ui-accordion/.test( this.id ) ) {\n this.removeAttribute( "id" );\n }\n });\n if ( this.options.heightStyle !== "content" ) {\n contents.css( "height", "" );\n }\n },\n\n _setOption: function( key, value ) {\n if ( key === "active" ) {\n // _activate() will handle invalid values and update this.options\n this._activate( value );\n return;\n }\n\n if ( key === "event" ) {\n if ( this.options.event ) {\n this._off( this.headers, this.options.event );\n }\n this._setupEvents( value );\n }\n\n this._super( key, value );\n\n // setting collapsible: false while collapsed; open first panel\n if ( key === "collapsible" && !value && this.options.active === false ) {\n this._activate( 0 );\n }\n\n if ( key === "icons" ) {\n this._destroyIcons();\n if ( value ) {\n this._createIcons();\n }\n }\n\n // #5332 - opacity doesn\'t cascade to positioned elements in IE\n // so we need to add the disabled class to the headers and panels\n if ( key === "disabled" ) {\n this.headers.add( this.headers.next() )\n .toggleClass( "ui-state-disabled", !!value );\n }\n },\n\n _keydown: function( event ) {\n /*jshint maxcomplexity:15*/\n if ( event.altKey || event.ctrlKey ) {\n return;\n }\n\n var keyCode = $.ui.keyCode,\n length = this.headers.length,\n currentIndex = this.headers.index( event.target ),\n toFocus = false;\n\n switch ( event.keyCode ) {\n case keyCode.RIGHT:\n case keyCode.DOWN:\n toFocus = this.headers[ ( currentIndex + 1 ) % length ];\n break;\n case keyCode.LEFT:\n case keyCode.UP:\n toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];\n break;\n case keyCode.SPACE:\n case keyCode.ENTER:\n this._eventHandler( event );\n break;\n case keyCode.HOME:\n toFocus = this.headers[ 0 ];\n break;\n case keyCode.END:\n toFocus = this.headers[ length - 1 ];\n break;\n }\n\n if ( toFocus ) {\n $( event.target ).attr( "tabIndex", -1 );\n $( toFocus ).attr( "tabIndex", 0 );\n toFocus.focus();\n event.preventDefault();\n }\n },\n\n _panelKeyDown : function( event ) {\n if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {\n $( event.currentTarget ).prev().focus();\n }\n },\n\n refresh: function() {\n var options = this.options;\n this._processPanels();\n\n // was collapsed or no panel\n if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {\n options.active = false;\n this.active = $();\n // active false only when collapsible is true\n } else if ( options.active === false ) {\n this._activate( 0 );\n // was active, but active panel is gone\n } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n // all remaining panel are disabled\n if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {\n options.active = false;\n this.active = $();\n // activate previous panel\n } else {\n this._activate( Math.max( 0, options.active - 1 ) );\n }\n // was active, active panel still exists\n } else {\n // make sure active index is correct\n options.active = this.headers.index( this.active );\n }\n\n this._destroyIcons();\n\n this._refresh();\n },\n\n _processPanels: function() {\n this.headers = this.element.find( this.options.header )\n .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );\n\n this.headers.next()\n .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )\n .filter(":not(.ui-accordion-content-active)")\n .hide();\n },\n\n _refresh: function() {\n var maxHeight,\n options = this.options,\n heightStyle = options.heightStyle,\n parent = this.element.parent(),\n accordionId = this.accordionId = "ui-accordion-" +\n (this.element.attr( "id" ) || ++uid);\n\n this.active = this._findActive( options.active )\n .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )\n .removeClass( "ui-corner-all" );\n this.active.next()\n .addClass( "ui-accordion-content-active" )\n .show();\n\n this.headers\n .attr( "role", "tab" )\n .each(function( i ) {\n var header = $( this ),\n headerId = header.attr( "id" ),\n panel = header.next(),\n panelId = panel.attr( "id" );\n if ( !headerId ) {\n headerId = accordionId + "-header-" + i;\n header.attr( "id", headerId );\n }\n if ( !panelId ) {\n panelId = accordionId + "-panel-" + i;\n panel.attr( "id", panelId );\n }\n header.attr( "aria-controls", panelId );\n panel.attr( "aria-labelledby", headerId );\n })\n .next()\n .attr( "role", "tabpanel" );\n\n this.headers\n .not( this.active )\n .attr({\n "aria-selected": "false",\n tabIndex: -1\n })\n .next()\n .attr({\n "aria-expanded": "false",\n "aria-hidden": "true"\n })\n .hide();\n\n // make sure at least one header is in the tab order\n if ( !this.active.length ) {\n this.headers.eq( 0 ).attr( "tabIndex", 0 );\n } else {\n this.active.attr({\n "aria-selected": "true",\n tabIndex: 0\n })\n .next()\n .attr({\n "aria-expanded": "true",\n "aria-hidden": "false"\n });\n }\n\n this._createIcons();\n\n this._setupEvents( options.event );\n\n if ( heightStyle === "fill" ) {\n maxHeight = parent.height();\n this.element.siblings( ":visible" ).each(function() {\n var elem = $( this ),\n position = elem.css( "position" );\n\n if ( position === "absolute" || position === "fixed" ) {\n return;\n }\n maxHeight -= elem.outerHeight( true );\n });\n\n this.headers.each(function() {\n maxHeight -= $( this ).outerHeight( true );\n });\n\n this.headers.next()\n .each(function() {\n $( this ).height( Math.max( 0, maxHeight -\n $( this ).innerHeight() + $( this ).height() ) );\n })\n .css( "overflow", "auto" );\n } else if ( heightStyle === "auto" ) {\n maxHeight = 0;\n this.headers.next()\n .each(function() {\n maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );\n })\n .height( maxHeight );\n }\n },\n\n _activate: function( index ) {\n var active = this._findActive( index )[ 0 ];\n\n // trying to activate the already active panel\n if ( active === this.active[ 0 ] ) {\n return;\n }\n\n // trying to collapse, simulate a click on the currently active header\n active = active || this.active[ 0 ];\n\n this._eventHandler({\n target: active,\n currentTarget: active,\n preventDefault: $.noop\n });\n },\n\n _findActive: function( selector ) {\n return typeof selector === "number" ? this.headers.eq( selector ) : $();\n },\n\n _setupEvents: function( event ) {\n var events = {\n keydown: "_keydown"\n };\n if ( event ) {\n $.each( event.split(" "), function( index, eventName ) {\n events[ eventName ] = "_eventHandler";\n });\n }\n\n this._off( this.headers.add( this.headers.next() ) );\n this._on( this.headers, events );\n this._on( this.headers.next(), { keydown: "_panelKeyDown" });\n this._hoverable( this.headers );\n this._focusable( this.headers );\n },\n\n _eventHandler: function( event ) {\n var options = this.options,\n active = this.active,\n clicked = $( event.currentTarget ),\n clickedIsActive = clicked[ 0 ] === active[ 0 ],\n collapsing = clickedIsActive && options.collapsible,\n toShow = collapsing ? $() : clicked.next(),\n toHide = active.next(),\n eventData = {\n oldHeader: active,\n oldPanel: toHide,\n newHeader: collapsing ? $() : clicked,\n newPanel: toShow\n };\n\n event.preventDefault();\n\n if (\n // click on active header, but not collapsible\n ( clickedIsActive && !options.collapsible ) ||\n // allow canceling activation\n ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {\n return;\n }\n\n options.active = collapsing ? false : this.headers.index( clicked );\n\n // when the call to ._toggle() comes after the class changes\n // it causes a very odd bug in IE 8 (see #6720)\n this.active = clickedIsActive ? $() : clicked;\n this._toggle( eventData );\n\n // switch classes\n // corner classes on the previously active header stay after the animation\n active.removeClass( "ui-accordion-header-active ui-state-active" );\n if ( options.icons ) {\n active.children( ".ui-accordion-header-icon" )\n .removeClass( options.icons.activeHeader )\n .addClass( options.icons.header );\n }\n\n if ( !clickedIsActive ) {\n clicked\n .removeClass( "ui-corner-all" )\n .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );\n if ( options.icons ) {\n clicked.children( ".ui-accordion-header-icon" )\n .removeClass( options.icons.header )\n .addClass( options.icons.activeHeader );\n }\n\n clicked\n .next()\n .addClass( "ui-accordion-content-active" );\n }\n },\n\n _toggle: function( data ) {\n var toShow = data.newPanel,\n toHide = this.prevShow.length ? this.prevShow : data.oldPanel;\n\n // handle activating a panel during the animation for another activation\n this.prevShow.add( this.prevHide ).stop( true, true );\n this.prevShow = toShow;\n this.prevHide = toHide;\n\n if ( this.options.animate ) {\n this._animate( toShow, toHide, data );\n } else {\n toHide.hide();\n toShow.show();\n this._toggleComplete( data );\n }\n\n toHide.attr({\n "aria-expanded": "false",\n "aria-hidden": "true"\n });\n toHide.prev().attr( "aria-selected", "false" );\n // if we\'re switching panels, remove the old header from the tab order\n // if we\'re opening from collapsed state, remove the previous header from the tab order\n // if we\'re collapsing, then keep the collapsing header in the tab order\n if ( toShow.length && toHide.length ) {\n toHide.prev().attr( "tabIndex", -1 );\n } else if ( toShow.length ) {\n this.headers.filter(function() {\n return $( this ).attr( "tabIndex" ) === 0;\n })\n .attr( "tabIndex", -1 );\n }\n\n toShow\n .attr({\n "aria-expanded": "true",\n "aria-hidden": "false"\n })\n .prev()\n .attr({\n "aria-selected": "true",\n tabIndex: 0\n });\n },\n\n _animate: function( toShow, toHide, data ) {\n var total, easing, duration,\n that = this,\n adjust = 0,\n down = toShow.length &&\n ( !toHide.length || ( toShow.index() < toHide.index() ) ),\n animate = this.options.animate || {},\n options = down && animate.down || animate,\n complete = function() {\n that._toggleComplete( data );\n };\n\n if ( typeof options === "number" ) {\n duration = options;\n }\n if ( typeof options === "string" ) {\n easing = options;\n }\n // fall back from options to animation in case of partial down settings\n easing = easing || options.easing || animate.easing;\n duration = duration || options.duration || animate.duration;\n\n if ( !toHide.length ) {\n return toShow.animate( showProps, duration, easing, complete );\n }\n if ( !toShow.length ) {\n return toHide.animate( hideProps, duration, easing, complete );\n }\n\n total = toShow.show().outerHeight();\n toHide.animate( hideProps, {\n duration: duration,\n easing: easing,\n step: function( now, fx ) {\n fx.now = Math.round( now );\n }\n });\n toShow\n .hide()\n .animate( showProps, {\n duration: duration,\n easing: easing,\n complete: complete,\n step: function( now, fx ) {\n fx.now = Math.round( now );\n if ( fx.prop !== "height" ) {\n adjust += fx.now;\n } else if ( that.options.heightStyle !== "content" ) {\n fx.now = Math.round( total - toHide.outerHeight() - adjust );\n adjust = 0;\n }\n }\n });\n },\n\n _toggleComplete: function( data ) {\n var toHide = data.oldPanel;\n\n toHide\n .removeClass( "ui-accordion-content-active" )\n .prev()\n .removeClass( "ui-corner-top" )\n .addClass( "ui-corner-all" );\n\n // Work around for rendering bug in IE (#5421)\n if ( toHide.length ) {\n toHide.parent()[0].className = toHide.parent()[0].className;\n }\n\n this._trigger( "activate", null, data );\n }\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n// used to prevent race conditions with remote data sources\nvar requestIndex = 0;\n\n$.widget( "ui.autocomplete", {\n version: "1.10.3",\n defaultElement: "",\n options: {\n appendTo: null,\n autoFocus: false,\n delay: 300,\n minLength: 1,\n position: {\n my: "left top",\n at: "left bottom",\n collision: "none"\n },\n source: null,\n\n // callbacks\n change: null,\n close: null,\n focus: null,\n open: null,\n response: null,\n search: null,\n select: null\n },\n\n pending: 0,\n\n _create: function() {\n // Some browsers only repeat keydown events, not keypress events,\n // so we use the suppressKeyPress flag to determine if we\'ve already\n // handled the keydown event. #7269\n // Unfortunately the code for & in keypress is the same as the up arrow,\n // so we use the suppressKeyPressRepeat flag to avoid handling keypress\n // events when we know the keydown event was used to modify the\n // search term. #7799\n var suppressKeyPress, suppressKeyPressRepeat, suppressInput,\n nodeName = this.element[0].nodeName.toLowerCase(),\n isTextarea = nodeName === "textarea",\n isInput = nodeName === "input";\n\n this.isMultiLine =\n // Textareas are always multi-line\n isTextarea ? true :\n // Inputs are always single-line, even if inside a contentEditable element\n // IE also treats inputs as contentEditable\n isInput ? false :\n // All other element types are determined by whether or not they\'re contentEditable\n this.element.prop( "isContentEditable" );\n\n this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];\n this.isNewMenu = true;\n\n this.element\n .addClass( "ui-autocomplete-input" )\n .attr( "autocomplete", "off" );\n\n this._on( this.element, {\n keydown: function( event ) {\n /*jshint maxcomplexity:15*/\n if ( this.element.prop( "readOnly" ) ) {\n suppressKeyPress = true;\n suppressInput = true;\n suppressKeyPressRepeat = true;\n return;\n }\n\n suppressKeyPress = false;\n suppressInput = false;\n suppressKeyPressRepeat = false;\n var keyCode = $.ui.keyCode;\n switch( event.keyCode ) {\n case keyCode.PAGE_UP:\n suppressKeyPress = true;\n this._move( "previousPage", event );\n break;\n case keyCode.PAGE_DOWN:\n suppressKeyPress = true;\n this._move( "nextPage", event );\n break;\n case keyCode.UP:\n suppressKeyPress = true;\n this._keyEvent( "previous", event );\n break;\n case keyCode.DOWN:\n suppressKeyPress = true;\n this._keyEvent( "next", event );\n break;\n case keyCode.ENTER:\n case keyCode.NUMPAD_ENTER:\n // when menu is open and has focus\n if ( this.menu.active ) {\n // #6055 - Opera still allows the keypress to occur\n // which causes forms to submit\n suppressKeyPress = true;\n event.preventDefault();\n this.menu.select( event );\n }\n break;\n case keyCode.TAB:\n if ( this.menu.active ) {\n this.menu.select( event );\n }\n break;\n case keyCode.ESCAPE:\n if ( this.menu.element.is( ":visible" ) ) {\n this._value( this.term );\n this.close( event );\n // Different browsers have different default behavior for escape\n // Single press can mean undo or clear\n // Double press in IE means clear the whole form\n event.preventDefault();\n }\n break;\n default:\n suppressKeyPressRepeat = true;\n // search timeout should be triggered before the input value is changed\n this._searchTimeout( event );\n break;\n }\n },\n keypress: function( event ) {\n if ( suppressKeyPress ) {\n suppressKeyPress = false;\n if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {\n event.preventDefault();\n }\n return;\n }\n if ( suppressKeyPressRepeat ) {\n return;\n }\n\n // replicate some key handlers to allow them to repeat in Firefox and Opera\n var keyCode = $.ui.keyCode;\n switch( event.keyCode ) {\n case keyCode.PAGE_UP:\n this._move( "previousPage", event );\n break;\n case keyCode.PAGE_DOWN:\n this._move( "nextPage", event );\n break;\n case keyCode.UP:\n this._keyEvent( "previous", event );\n break;\n case keyCode.DOWN:\n this._keyEvent( "next", event );\n break;\n }\n },\n input: function( event ) {\n if ( suppressInput ) {\n suppressInput = false;\n event.preventDefault();\n return;\n }\n this._searchTimeout( event );\n },\n focus: function() {\n this.selectedItem = null;\n this.previous = this._value();\n },\n blur: function( event ) {\n if ( this.cancelBlur ) {\n delete this.cancelBlur;\n return;\n }\n\n clearTimeout( this.searching );\n this.close( event );\n this._change( event );\n }\n });\n\n this._initSource();\n this.menu = $( "