{"version":3,"file":"mids.1f83d6424ca0aeb92885.js","sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/classnames/index.js","webpack:///./node_modules/mobx/lib/mobx.module.js","webpack:///./node_modules/object-assign/index.js","webpack:///../ExternalLibs/react-svg-pan-zoom/node_modules/object-assign/index.js","webpack:///./node_modules/react-file-base64/build/build.min.js","webpack:///./node_modules/m-react-splitters/node_modules/react/cjs/react.production.min.js","webpack:///./app/components/layout/modals/addTaskModal/addTaskModal.js","webpack:///./app/components/layout/modals/trackSignalModal.js","webpack:///./node_modules/react-draggable/web/react-draggable.min.js","webpack:///./node_modules/is-buffer/index.js","webpack:///./node_modules/ua-parser-js/src/ua-parser.js","webpack:///./node_modules/scheduler/cjs/scheduler.production.min.js","webpack:///./node_modules/react-dom/cjs/react-dom.production.min.js","webpack:///./node_modules/react/cjs/react.production.min.js"],"sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t3: 0\n \t};\n\n\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar head = document.getElementsByTagName('head')[0];\n \t\t\t\tvar script = document.createElement('script');\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = __webpack_require__.p + \"\" + ({\"0\":\"plugin2\",\"1\":\"plugin0\",\"2\":\"idb\"}[chunkId]||chunkId) + \".\" + \"1f83d6424ca0aeb92885\" + \".js\";\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tfunction onScriptComplete(event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\tvar error = new Error('Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')');\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\thead.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1847);\n","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\n\n/**\n * Anything that can be used to _store_ state is an Atom in mobx. Atoms have two important jobs\n *\n * 1) detect when they are being _used_ and report this (using reportObserved). This allows mobx to make the connection between running functions and the data they used\n * 2) they should notify mobx whenever they have _changed_. This way mobx can re-run any functions (derivations) that are using this atom.\n */\nvar BaseAtom = (function () {\n /**\n * Create a new atom. For debugging purposes it is recommended to give it a name.\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\n */\n function BaseAtom(name) {\n if (name === void 0) { name = \"Atom@\" + getNextId(); }\n this.name = name;\n this.isPendingUnobservation = true; // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n this.observers = [];\n this.observersIndexes = {};\n this.diffValue = 0;\n this.lastAccessedBy = 0;\n this.lowestObserverState = IDerivationState.NOT_TRACKING;\n }\n BaseAtom.prototype.onBecomeUnobserved = function () {\n // noop\n };\n /**\n * Invoke this method to notify mobx that your atom has been used somehow.\n */\n BaseAtom.prototype.reportObserved = function () {\n reportObserved(this);\n };\n /**\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\n */\n BaseAtom.prototype.reportChanged = function () {\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n BaseAtom.prototype.toString = function () {\n return this.name;\n };\n return BaseAtom;\n}());\nvar Atom = (function (_super) {\n __extends(Atom, _super);\n /**\n * Create a new atom. For debugging purposes it is recommended to give it a name.\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\n */\n function Atom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (name === void 0) { name = \"Atom@\" + getNextId(); }\n if (onBecomeObservedHandler === void 0) { onBecomeObservedHandler = noop; }\n if (onBecomeUnobservedHandler === void 0) { onBecomeUnobservedHandler = noop; }\n var _this = _super.call(this, name) || this;\n _this.name = name;\n _this.onBecomeObservedHandler = onBecomeObservedHandler;\n _this.onBecomeUnobservedHandler = onBecomeUnobservedHandler;\n _this.isPendingUnobservation = false; // for effective unobserving.\n _this.isBeingTracked = false;\n return _this;\n }\n Atom.prototype.reportObserved = function () {\n startBatch();\n _super.prototype.reportObserved.call(this);\n if (!this.isBeingTracked) {\n this.isBeingTracked = true;\n this.onBecomeObservedHandler();\n }\n endBatch();\n return !!globalState.trackingDerivation;\n // return doesn't really give useful info, because it can be as well calling computed which calls atom (no reactions)\n // also it could not trigger when calculating reaction dependent on Atom because Atom's value was cached by computed called by given reaction.\n };\n Atom.prototype.onBecomeUnobserved = function () {\n this.isBeingTracked = false;\n this.onBecomeUnobservedHandler();\n };\n return Atom;\n}(BaseAtom));\nvar isAtom = createInstanceofPredicate(\"Atom\", BaseAtom);\n\nfunction hasInterceptors(interceptable) {\n return (interceptable.interceptors && interceptable.interceptors.length > 0);\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors || (interceptable.interceptors = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n if (idx !== -1)\n interceptors.splice(idx, 1);\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n try {\n var interceptors = interceptable.interceptors;\n if (interceptors)\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n invariant(!change || change.type, \"Intercept handlers should return nothing or a change object\");\n if (!change)\n break;\n }\n return change;\n }\n finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners && listenable.changeListeners.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners || (listenable.changeListeners = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n if (idx !== -1)\n listeners.splice(idx, 1);\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners;\n if (!listeners)\n return;\n listeners = listeners.slice();\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n untrackedEnd(prevU);\n}\n\nfunction isSpyEnabled() {\n return !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (!globalState.spyListeners.length)\n return;\n var listeners = globalState.spyListeners;\n for (var i = 0, l = listeners.length; i < l; i++)\n listeners[i](event);\n}\nfunction spyReportStart(event) {\n var change = objectAssign({}, event, { spyReportStart: true });\n spyReport(change);\n}\nvar END_EVENT = { spyReportEnd: true };\nfunction spyReportEnd(change) {\n if (change)\n spyReport(objectAssign({}, change, END_EVENT));\n else\n spyReport(END_EVENT);\n}\nfunction spy(listener) {\n globalState.spyListeners.push(listener);\n return once(function () {\n var idx = globalState.spyListeners.indexOf(listener);\n if (idx !== -1)\n globalState.spyListeners.splice(idx, 1);\n });\n}\n\nfunction iteratorSymbol() {\n return (typeof Symbol === \"function\" && Symbol.iterator) || \"@@iterator\";\n}\nvar IS_ITERATING_MARKER = \"__$$iterating\";\nfunction arrayAsIterator(array) {\n // returning an array for entries(), values() etc for maps was a mis-interpretation of the specs..,\n // yet it is quite convenient to be able to use the response both as array directly and as iterator\n // it is suboptimal, but alas...\n invariant(array[IS_ITERATING_MARKER] !== true, \"Illegal state: cannot recycle array as iterator\");\n addHiddenFinalProp(array, IS_ITERATING_MARKER, true);\n var idx = -1;\n addHiddenFinalProp(array, \"next\", function next() {\n idx++;\n return {\n done: idx >= this.length,\n value: idx < this.length ? this[idx] : undefined\n };\n });\n return array;\n}\nfunction declareIterator(prototType, iteratorFactory) {\n addHiddenFinalProp(prototType, iteratorSymbol(), iteratorFactory);\n}\n\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\n// Detects bug in safari 9.1.1 (or iOS 9 safari mobile). See #364\nvar safariPrototypeSetterInheritanceBug = (function () {\n var v = false;\n var p = {};\n Object.defineProperty(p, \"0\", { set: function () { v = true; } });\n Object.create(p)[\"0\"] = 1;\n return v === false;\n})();\n/**\n * This array buffer contains two lists of properties, so that all arrays\n * can recycle their property definitions, which significantly improves performance of creating\n * properties on the fly.\n */\nvar OBSERVABLE_ARRAY_BUFFER_SIZE = 0;\n// Typescript workaround to make sure ObservableArray extends Array\nvar StubArray = (function () {\n function StubArray() {\n }\n return StubArray;\n}());\nfunction inherit(ctor, proto) {\n if (typeof Object[\"setPrototypeOf\"] !== \"undefined\") {\n Object[\"setPrototypeOf\"](ctor.prototype, proto);\n }\n else if (typeof ctor.prototype.__proto__ !== \"undefined\") {\n ctor.prototype.__proto__ = proto;\n }\n else {\n ctor[\"prototype\"] = proto;\n }\n}\ninherit(StubArray, Array.prototype);\nvar ObservableArrayAdministration = (function () {\n function ObservableArrayAdministration(name, enhancer, array, owned) {\n this.array = array;\n this.owned = owned;\n this.values = [];\n this.lastKnownLength = 0;\n this.interceptors = null;\n this.changeListeners = null;\n this.atom = new BaseAtom(name || (\"ObservableArray@\" + getNextId()));\n this.enhancer = function (newV, oldV) { return enhancer(newV, oldV, name + \"[..]\"); };\n }\n ObservableArrayAdministration.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined)\n return this.dehancer(value);\n return value;\n };\n ObservableArrayAdministration.prototype.dehanceValues = function (values) {\n if (this.dehancer !== undefined)\n return values.map(this.dehancer);\n return values;\n };\n ObservableArrayAdministration.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableArrayAdministration.prototype.observe = function (listener, fireImmediately) {\n if (fireImmediately === void 0) { fireImmediately = false; }\n if (fireImmediately) {\n listener({\n object: this.array,\n type: \"splice\",\n index: 0,\n added: this.values.slice(),\n addedCount: this.values.length,\n removed: [],\n removedCount: 0\n });\n }\n return registerListener(this, listener);\n };\n ObservableArrayAdministration.prototype.getArrayLength = function () {\n this.atom.reportObserved();\n return this.values.length;\n };\n ObservableArrayAdministration.prototype.setArrayLength = function (newLength) {\n if (typeof newLength !== \"number\" || newLength < 0)\n throw new Error(\"[mobx.array] Out of range: \" + newLength);\n var currentLength = this.values.length;\n if (newLength === currentLength)\n return;\n else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n for (var i = 0; i < newLength - currentLength; i++)\n newItems[i] = undefined; // No Array.fill everywhere...\n this.spliceWithArray(currentLength, 0, newItems);\n }\n else\n this.spliceWithArray(newLength, currentLength - newLength);\n };\n // adds / removes the necessary numeric properties to this object\n ObservableArrayAdministration.prototype.updateArrayLength = function (oldLength, delta) {\n if (oldLength !== this.lastKnownLength)\n throw new Error(\"[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?\");\n this.lastKnownLength += delta;\n if (delta > 0 && oldLength + delta + 1 > OBSERVABLE_ARRAY_BUFFER_SIZE)\n reserveArrayBuffer(oldLength + delta + 1);\n };\n ObservableArrayAdministration.prototype.spliceWithArray = function (index, deleteCount, newItems) {\n var _this = this;\n checkIfStateModificationsAreAllowed(this.atom);\n var length = this.values.length;\n if (index === undefined)\n index = 0;\n else if (index > length)\n index = length;\n else if (index < 0)\n index = Math.max(0, length + index);\n if (arguments.length === 1)\n deleteCount = length - index;\n else if (deleteCount === undefined || deleteCount === null)\n deleteCount = 0;\n else\n deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n if (newItems === undefined)\n newItems = [];\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.array,\n type: \"splice\",\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n if (!change)\n return EMPTY_ARRAY;\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n newItems = newItems.map(function (v) { return _this.enhancer(v, undefined); });\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength(length, lengthDelta); // create or remove new entries\n var res = this.spliceItemsIntoValues(index, deleteCount, newItems);\n if (deleteCount !== 0 || newItems.length !== 0)\n this.notifyArraySplice(index, newItems, res);\n return this.dehanceValues(res);\n };\n ObservableArrayAdministration.prototype.spliceItemsIntoValues = function (index, deleteCount, newItems) {\n if (newItems.length < MAX_SPLICE_SIZE) {\n return (_a = this.values).splice.apply(_a, [index, deleteCount].concat(newItems));\n }\n else {\n var res = this.values.slice(index, index + deleteCount);\n this.values = this.values.slice(0, index).concat(newItems, this.values.slice(index + deleteCount));\n return res;\n }\n var _a;\n };\n ObservableArrayAdministration.prototype.notifyArrayChildUpdate = function (index, newValue, oldValue) {\n var notifySpy = !this.owned && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n object: this.array,\n type: \"update\",\n index: index, newValue: newValue, oldValue: oldValue\n } : null;\n if (notifySpy)\n spyReportStart(change);\n this.atom.reportChanged();\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n };\n ObservableArrayAdministration.prototype.notifyArraySplice = function (index, added, removed) {\n var notifySpy = !this.owned && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n object: this.array,\n type: \"splice\",\n index: index, removed: removed, added: added,\n removedCount: removed.length,\n addedCount: added.length\n } : null;\n if (notifySpy)\n spyReportStart(change);\n this.atom.reportChanged();\n // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n };\n return ObservableArrayAdministration;\n}());\nvar ObservableArray = (function (_super) {\n __extends(ObservableArray, _super);\n function ObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) { name = \"ObservableArray@\" + getNextId(); }\n if (owned === void 0) { owned = false; }\n var _this = _super.call(this) || this;\n var adm = new ObservableArrayAdministration(name, enhancer, _this, owned);\n addHiddenFinalProp(_this, \"$mobx\", adm);\n if (initialValues && initialValues.length) {\n _this.spliceWithArray(0, 0, initialValues);\n }\n if (safariPrototypeSetterInheritanceBug) {\n // Seems that Safari won't use numeric prototype setter untill any * numeric property is\n // defined on the instance. After that it works fine, even if this property is deleted.\n Object.defineProperty(adm.array, \"0\", ENTRY_0);\n }\n return _this;\n }\n ObservableArray.prototype.intercept = function (handler) {\n return this.$mobx.intercept(handler);\n };\n ObservableArray.prototype.observe = function (listener, fireImmediately) {\n if (fireImmediately === void 0) { fireImmediately = false; }\n return this.$mobx.observe(listener, fireImmediately);\n };\n ObservableArray.prototype.clear = function () {\n return this.splice(0);\n };\n ObservableArray.prototype.concat = function () {\n var arrays = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n arrays[_i] = arguments[_i];\n }\n this.$mobx.atom.reportObserved();\n return Array.prototype.concat.apply(this.peek(), arrays.map(function (a) { return isObservableArray(a) ? a.peek() : a; }));\n };\n ObservableArray.prototype.replace = function (newItems) {\n return this.$mobx.spliceWithArray(0, this.$mobx.values.length, newItems);\n };\n /**\n * Converts this array back to a (shallow) javascript structure.\n * For a deep clone use mobx.toJS\n */\n ObservableArray.prototype.toJS = function () {\n return this.slice();\n };\n ObservableArray.prototype.toJSON = function () {\n // Used by JSON.stringify\n return this.toJS();\n };\n ObservableArray.prototype.peek = function () {\n this.$mobx.atom.reportObserved();\n return this.$mobx.dehanceValues(this.$mobx.values);\n };\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n ObservableArray.prototype.find = function (predicate, thisArg, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n var idx = this.findIndex.apply(this, arguments);\n return idx === -1 ? undefined : this.get(idx);\n };\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\n ObservableArray.prototype.findIndex = function (predicate, thisArg, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n var items = this.peek(), l = items.length;\n for (var i = fromIndex; i < l; i++)\n if (predicate.call(thisArg, items[i], i, this))\n return i;\n return -1;\n };\n /*\n functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\n since these functions alter the inner structure of the array, the have side effects.\n Because the have side effects, they should not be used in computed function,\n and for that reason the do not call dependencyState.notifyObserved\n */\n ObservableArray.prototype.splice = function (index, deleteCount) {\n var newItems = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n newItems[_i - 2] = arguments[_i];\n }\n switch (arguments.length) {\n case 0:\n return [];\n case 1:\n return this.$mobx.spliceWithArray(index);\n case 2:\n return this.$mobx.spliceWithArray(index, deleteCount);\n }\n return this.$mobx.spliceWithArray(index, deleteCount, newItems);\n };\n ObservableArray.prototype.spliceWithArray = function (index, deleteCount, newItems) {\n return this.$mobx.spliceWithArray(index, deleteCount, newItems);\n };\n ObservableArray.prototype.push = function () {\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var adm = this.$mobx;\n adm.spliceWithArray(adm.values.length, 0, items);\n return adm.values.length;\n };\n ObservableArray.prototype.pop = function () {\n return this.splice(Math.max(this.$mobx.values.length - 1, 0), 1)[0];\n };\n ObservableArray.prototype.shift = function () {\n return this.splice(0, 1)[0];\n };\n ObservableArray.prototype.unshift = function () {\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var adm = this.$mobx;\n adm.spliceWithArray(0, 0, items);\n return adm.values.length;\n };\n ObservableArray.prototype.reverse = function () {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n // so we deviate from the default and just make it an dervitation\n var clone = this.slice();\n return clone.reverse.apply(clone, arguments);\n };\n ObservableArray.prototype.sort = function (compareFn) {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n var clone = this.slice();\n return clone.sort.apply(clone, arguments);\n };\n ObservableArray.prototype.remove = function (value) {\n var idx = this.$mobx.dehanceValues(this.$mobx.values).indexOf(value);\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n return false;\n };\n ObservableArray.prototype.move = function (fromIndex, toIndex) {\n function checkIndex(index) {\n if (index < 0) {\n throw new Error(\"[mobx.array] Index out of bounds: \" + index + \" is negative\");\n }\n var length = this.$mobx.values.length;\n if (index >= length) {\n throw new Error(\"[mobx.array] Index out of bounds: \" + index + \" is not smaller than \" + length);\n }\n }\n checkIndex.call(this, fromIndex);\n checkIndex.call(this, toIndex);\n if (fromIndex === toIndex) {\n return;\n }\n var oldItems = this.$mobx.values;\n var newItems;\n if (fromIndex < toIndex) {\n newItems = oldItems.slice(0, fromIndex).concat(oldItems.slice(fromIndex + 1, toIndex + 1), [oldItems[fromIndex]], oldItems.slice(toIndex + 1));\n }\n else {\n newItems = oldItems.slice(0, toIndex).concat([oldItems[fromIndex]], oldItems.slice(toIndex, fromIndex), oldItems.slice(fromIndex + 1));\n }\n this.replace(newItems);\n };\n // See #734, in case property accessors are unreliable...\n ObservableArray.prototype.get = function (index) {\n var impl = this.$mobx;\n if (impl) {\n if (index < impl.values.length) {\n impl.atom.reportObserved();\n return impl.dehanceValue(impl.values[index]);\n }\n console.warn(\"[mobx.array] Attempt to read an array index (\" + index + \") that is out of bounds (\" + impl.values.length + \"). Please check length first. Out of bound indices will not be tracked by MobX\");\n }\n return undefined;\n };\n // See #734, in case property accessors are unreliable...\n ObservableArray.prototype.set = function (index, newValue) {\n var adm = this.$mobx;\n var values = adm.values;\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(adm.atom);\n var oldValue = values[index];\n if (hasInterceptors(adm)) {\n var change = interceptChange(adm, {\n type: \"update\",\n object: this,\n index: index, newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n newValue = adm.enhancer(newValue, oldValue);\n var changed = newValue !== oldValue;\n if (changed) {\n values[index] = newValue;\n adm.notifyArrayChildUpdate(index, newValue, oldValue);\n }\n }\n else if (index === values.length) {\n // add a new item\n adm.spliceWithArray(index, 0, [newValue]);\n }\n else {\n // out of bounds\n throw new Error(\"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + values.length);\n }\n };\n return ObservableArray;\n}(StubArray));\ndeclareIterator(ObservableArray.prototype, function () {\n return arrayAsIterator(this.slice());\n});\nObject.defineProperty(ObservableArray.prototype, \"length\", {\n enumerable: false,\n configurable: true,\n get: function () {\n return this.$mobx.getArrayLength();\n },\n set: function (newLength) {\n this.$mobx.setArrayLength(newLength);\n }\n});\n/**\n * Wrap function from prototype\n */\n[\n \"every\",\n \"filter\",\n \"forEach\",\n \"indexOf\",\n \"join\",\n \"lastIndexOf\",\n \"map\",\n \"reduce\",\n \"reduceRight\",\n \"slice\",\n \"some\",\n \"toString\",\n \"toLocaleString\"\n].forEach(function (funcName) {\n var baseFunc = Array.prototype[funcName];\n invariant(typeof baseFunc === \"function\", \"Base function not defined on Array prototype: '\" + funcName + \"'\");\n addHiddenProp(ObservableArray.prototype, funcName, function () {\n return baseFunc.apply(this.peek(), arguments);\n });\n});\n/**\n * We don't want those to show up in `for (const key in ar)` ...\n */\nmakeNonEnumerable(ObservableArray.prototype, [\n \"constructor\",\n \"intercept\",\n \"observe\",\n \"clear\",\n \"concat\",\n \"get\",\n \"replace\",\n \"toJS\",\n \"toJSON\",\n \"peek\",\n \"find\",\n \"findIndex\",\n \"splice\",\n \"spliceWithArray\",\n \"push\",\n \"pop\",\n \"set\",\n \"shift\",\n \"unshift\",\n \"reverse\",\n \"sort\",\n \"remove\",\n \"move\",\n \"toString\",\n \"toLocaleString\"\n]);\n// See #364\nvar ENTRY_0 = createArrayEntryDescriptor(0);\nfunction createArrayEntryDescriptor(index) {\n return {\n enumerable: false,\n configurable: false,\n get: function () {\n // TODO: Check `this`?, see #752?\n return this.get(index);\n },\n set: function (value) {\n this.set(index, value);\n }\n };\n}\nfunction createArrayBufferItem(index) {\n Object.defineProperty(ObservableArray.prototype, \"\" + index, createArrayEntryDescriptor(index));\n}\nfunction reserveArrayBuffer(max) {\n for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max; index++)\n createArrayBufferItem(index);\n OBSERVABLE_ARRAY_BUFFER_SIZE = max;\n}\nreserveArrayBuffer(1000);\nvar isObservableArrayAdministration = createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing.$mobx);\n}\n\nvar UNCHANGED = {};\nvar ObservableValue = (function (_super) {\n __extends(ObservableValue, _super);\n function ObservableValue(value, enhancer, name, notifySpy) {\n if (name === void 0) { name = \"ObservableValue@\" + getNextId(); }\n if (notifySpy === void 0) { notifySpy = true; }\n var _this = _super.call(this, name) || this;\n _this.enhancer = enhancer;\n _this.hasUnreportedChange = false;\n _this.dehancer = undefined;\n _this.value = enhancer(value, undefined, name);\n if (notifySpy && isSpyEnabled()) {\n // only notify spy if this is a stand-alone observable\n spyReport({ type: \"create\", object: _this, newValue: _this.value });\n }\n return _this;\n }\n ObservableValue.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined)\n return this.dehancer(value);\n return value;\n };\n ObservableValue.prototype.set = function (newValue) {\n var oldValue = this.value;\n newValue = this.prepareNewValue(newValue);\n if (newValue !== UNCHANGED) {\n var notifySpy = isSpyEnabled();\n if (notifySpy) {\n spyReportStart({\n type: \"update\",\n object: this,\n newValue: newValue, oldValue: oldValue\n });\n }\n this.setNewValue(newValue);\n if (notifySpy)\n spyReportEnd();\n }\n };\n ObservableValue.prototype.prepareNewValue = function (newValue) {\n checkIfStateModificationsAreAllowed(this);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, { object: this, type: \"update\", newValue: newValue });\n if (!change)\n return UNCHANGED;\n newValue = change.newValue;\n }\n // apply modifier\n newValue = this.enhancer(newValue, this.value, this.name);\n return this.value !== newValue\n ? newValue\n : UNCHANGED;\n };\n ObservableValue.prototype.setNewValue = function (newValue) {\n var oldValue = this.value;\n this.value = newValue;\n this.reportChanged();\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: \"update\",\n object: this,\n newValue: newValue, oldValue: oldValue\n });\n }\n };\n ObservableValue.prototype.get = function () {\n this.reportObserved();\n return this.dehanceValue(this.value);\n };\n ObservableValue.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableValue.prototype.observe = function (listener, fireImmediately) {\n if (fireImmediately)\n listener({\n object: this,\n type: \"update\",\n newValue: this.value,\n oldValue: undefined\n });\n return registerListener(this, listener);\n };\n ObservableValue.prototype.toJSON = function () {\n return this.get();\n };\n ObservableValue.prototype.toString = function () {\n return this.name + \"[\" + this.value + \"]\";\n };\n ObservableValue.prototype.valueOf = function () {\n return toPrimitive(this.get());\n };\n return ObservableValue;\n}(BaseAtom));\nObservableValue.prototype[primitiveSymbol()] = ObservableValue.prototype.valueOf;\nvar isObservableValue = createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\nvar messages = {\n \"m001\": \"It is not allowed to assign new values to @action fields\",\n \"m002\": \"`runInAction` expects a function\",\n \"m003\": \"`runInAction` expects a function without arguments\",\n \"m004\": \"autorun expects a function\",\n \"m005\": \"Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.\",\n \"m006\": \"Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.\",\n \"m007\": \"reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object\",\n \"m008\": \"wrapping reaction expression in `asReference` is no longer supported, use options object instead\",\n \"m009\": \"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.\",\n \"m010\": \"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'\",\n \"m011\": \"First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments\",\n \"m012\": \"computed takes one or two arguments if used as function\",\n \"m013\": \"[mobx.expr] 'expr' should only be used inside other reactive functions.\",\n \"m014\": \"extendObservable expected 2 or more arguments\",\n \"m015\": \"extendObservable expects an object as first argument\",\n \"m016\": \"extendObservable should not be used on maps, use map.merge instead\",\n \"m017\": \"all arguments of extendObservable should be objects\",\n \"m018\": \"extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540\",\n \"m019\": \"[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\",\n \"m020\": \"modifiers can only be used for individual object properties\",\n \"m021\": \"observable expects zero or one arguments\",\n \"m022\": \"@observable can not be used on getters, use @computed instead\",\n \"m023\": \"Using `transaction` is deprecated, use `runInAction` or `(@)action` instead.\",\n \"m024\": \"whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.\",\n \"m025\": \"whyRun can only be used on reactions and computed values\",\n \"m026\": \"`action` can only be invoked on functions\",\n \"m028\": \"It is not allowed to set `useStrict` when a derivation is running\",\n \"m029\": \"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row\",\n \"m030a\": \"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: \",\n \"m030b\": \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: \",\n \"m031\": \"Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: \",\n \"m032\": \"* This computation is suspended (not in use by any reaction) and won't run automatically.\\n\tDidn't expect this computation to be suspended at this point?\\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\",\n \"m033\": \"`observe` doesn't support the fire immediately property for observable maps.\",\n \"m034\": \"`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead\",\n \"m035\": \"Cannot make the designated object observable; it is not extensible\",\n \"m036\": \"It is not possible to get index atoms from arrays\",\n \"m037\": \"Hi there! I'm sorry you have just run into an exception.\\nIf your debugger ends up here, know that some reaction (like the render() of an observer component, autorun or reaction)\\nthrew an exception and that mobx caught it, to avoid that it brings the rest of your application down.\\nThe original cause of the exception (the code that caused this reaction to run (again)), is still in the stack.\\n\\nHowever, more interesting is the actual stack trace of the error itself.\\nHopefully the error is an instanceof Error, because in that case you can inspect the original stack of the error from where it was thrown.\\nSee `error.stack` property, or press the very subtle \\\"(...)\\\" link you see near the console.error message that probably brought you here.\\nThat stack is more interesting than the stack of this console.error itself.\\n\\nIf the exception you see is an exception you created yourself, make sure to use `throw new Error(\\\"Oops\\\")` instead of `throw \\\"Oops\\\"`,\\nbecause the javascript environment will only preserve the original stack trace in the first form.\\n\\nYou can also make sure the debugger pauses the next time this very same exception is thrown by enabling \\\"Pause on caught exception\\\".\\n(Note that it might pause on many other, unrelated exception as well).\\n\\nIf that all doesn't help you out, feel free to open an issue https://github.com/mobxjs/mobx/issues!\\n\",\n \"m038\": \"Missing items in this list?\\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\\n\"\n};\nfunction getMessage(id) {\n return messages[id];\n}\n\nfunction createAction(actionName, fn) {\n invariant(typeof fn === \"function\", getMessage(\"m026\"));\n invariant(typeof actionName === \"string\" && actionName.length > 0, \"actions should have valid names, got: '\" + actionName + \"'\");\n var res = function () {\n return executeAction(actionName, fn, this, arguments);\n };\n res.originalFn = fn;\n res.isMobxAction = true;\n return res;\n}\nfunction executeAction(actionName, fn, scope, args) {\n var runInfo = startAction(actionName, fn, scope, args);\n try {\n return fn.apply(scope, args);\n }\n finally {\n endAction(runInfo);\n }\n}\nfunction startAction(actionName, fn, scope, args) {\n var notifySpy = isSpyEnabled() && !!actionName;\n var startTime = 0;\n if (notifySpy) {\n startTime = Date.now();\n var l = (args && args.length) || 0;\n var flattendArgs = new Array(l);\n if (l > 0)\n for (var i = 0; i < l; i++)\n flattendArgs[i] = args[i];\n spyReportStart({\n type: \"action\",\n name: actionName,\n fn: fn,\n object: scope,\n arguments: flattendArgs\n });\n }\n var prevDerivation = untrackedStart();\n startBatch();\n var prevAllowStateChanges = allowStateChangesStart(true);\n return {\n prevDerivation: prevDerivation,\n prevAllowStateChanges: prevAllowStateChanges,\n notifySpy: notifySpy,\n startTime: startTime\n };\n}\nfunction endAction(runInfo) {\n allowStateChangesEnd(runInfo.prevAllowStateChanges);\n endBatch();\n untrackedEnd(runInfo.prevDerivation);\n if (runInfo.notifySpy)\n spyReportEnd({ time: Date.now() - runInfo.startTime });\n}\nfunction useStrict(strict) {\n invariant(globalState.trackingDerivation === null, getMessage(\"m028\"));\n globalState.strictMode = strict;\n globalState.allowStateChanges = !strict;\n}\nfunction isStrictModeEnabled() {\n return globalState.strictMode;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n // TODO: deprecate / refactor this function in next major\n // Currently only used by `@observer`\n // Proposed change: remove first param, rename to `forbidStateChanges`,\n // require error callback instead of the hardcoded error message now used\n // Use `inAction` instead of allowStateChanges in derivation.ts to check strictMode\n var prev = allowStateChangesStart(allowStateChanges);\n var res;\n try {\n res = func();\n }\n finally {\n allowStateChangesEnd(prev);\n }\n return res;\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\n\n/**\n * Constructs a decorator, that normalizes the differences between\n * TypeScript and Babel. Mainly caused by the fact that legacy-decorator cannot assign\n * values during instance creation to properties that have a getter setter.\n *\n * - Sigh -\n *\n * Also takes care of the difference between @decorator field and @decorator(args) field, and different forms of values.\n * For performance (cpu and mem) reasons the properties are always defined on the prototype (at least initially).\n * This means that these properties despite being enumerable might not show up in Object.keys() (but they will show up in for...in loops).\n */\nfunction createClassPropertyDecorator(\n /**\n * This function is invoked once, when the property is added to a new instance.\n * When this happens is not strictly determined due to differences in TS and Babel:\n * Typescript: Usually when constructing the new instance\n * Babel, sometimes Typescript: during the first get / set\n * Both: when calling `runLazyInitializers(instance)`\n */\n onInitialize, get, set, enumerable, \n /**\n * Can this decorator invoked with arguments? e.g. @decorator(args)\n */\n allowCustomArguments) {\n function classPropertyDecorator(target, key, descriptor, customArgs, argLen) {\n if (argLen === void 0) { argLen = 0; }\n invariant(allowCustomArguments || quacksLikeADecorator(arguments), \"This function is a decorator, but it wasn't invoked like a decorator\");\n if (!descriptor) {\n // typescript (except for getter / setters)\n var newDescriptor = {\n enumerable: enumerable,\n configurable: true,\n get: function () {\n if (!this.__mobxInitializedProps || this.__mobxInitializedProps[key] !== true)\n typescriptInitializeProperty(this, key, undefined, onInitialize, customArgs, descriptor);\n return get.call(this, key);\n },\n set: function (v) {\n if (!this.__mobxInitializedProps || this.__mobxInitializedProps[key] !== true) {\n typescriptInitializeProperty(this, key, v, onInitialize, customArgs, descriptor);\n }\n else {\n set.call(this, key, v);\n }\n }\n };\n if (arguments.length < 3 || arguments.length === 5 && argLen < 3) {\n // Typescript target is ES3, so it won't define property for us\n // or using Reflect.decorate polyfill, which will return no descriptor\n // (see https://github.com/mobxjs/mobx/issues/333)\n Object.defineProperty(target, key, newDescriptor);\n }\n return newDescriptor;\n }\n else {\n // babel and typescript getter / setter props\n if (!hasOwnProperty(target, \"__mobxLazyInitializers\")) {\n addHiddenProp(target, \"__mobxLazyInitializers\", (target.__mobxLazyInitializers && target.__mobxLazyInitializers.slice()) || [] // support inheritance\n );\n }\n var value_1 = descriptor.value, initializer_1 = descriptor.initializer;\n target.__mobxLazyInitializers.push(function (instance) {\n onInitialize(instance, key, (initializer_1 ? initializer_1.call(instance) : value_1), customArgs, descriptor);\n });\n return {\n enumerable: enumerable, configurable: true,\n get: function () {\n if (this.__mobxDidRunLazyInitializers !== true)\n runLazyInitializers(this);\n return get.call(this, key);\n },\n set: function (v) {\n if (this.__mobxDidRunLazyInitializers !== true)\n runLazyInitializers(this);\n set.call(this, key, v);\n }\n };\n }\n }\n if (allowCustomArguments) {\n /** If custom arguments are allowed, we should return a function that returns a decorator */\n return function () {\n /** Direct invocation: @decorator bla */\n if (quacksLikeADecorator(arguments))\n return classPropertyDecorator.apply(null, arguments);\n /** Indirect invocation: @decorator(args) bla */\n var outerArgs = arguments;\n var argLen = arguments.length;\n return function (target, key, descriptor) { return classPropertyDecorator(target, key, descriptor, outerArgs, argLen); };\n };\n }\n return classPropertyDecorator;\n}\nfunction typescriptInitializeProperty(instance, key, v, onInitialize, customArgs, baseDescriptor) {\n if (!hasOwnProperty(instance, \"__mobxInitializedProps\"))\n addHiddenProp(instance, \"__mobxInitializedProps\", {});\n instance.__mobxInitializedProps[key] = true;\n onInitialize(instance, key, v, customArgs, baseDescriptor);\n}\nfunction runLazyInitializers(instance) {\n if (instance.__mobxDidRunLazyInitializers === true)\n return;\n if (instance.__mobxLazyInitializers) {\n addHiddenProp(instance, \"__mobxDidRunLazyInitializers\", true);\n instance.__mobxDidRunLazyInitializers && instance.__mobxLazyInitializers.forEach(function (initializer) { return initializer(instance); });\n }\n}\nfunction quacksLikeADecorator(args) {\n return (args.length === 2 || args.length === 3) && typeof args[1] === \"string\";\n}\n\nvar actionFieldDecorator = createClassPropertyDecorator(function (target, key, value, args, originalDescriptor) {\n var actionName = (args && args.length === 1) ? args[0] : (value.name || key || \"\");\n var wrappedAction = action(actionName, value);\n addHiddenProp(target, key, wrappedAction);\n}, function (key) {\n return this[key];\n}, function () {\n invariant(false, getMessage(\"m001\"));\n}, false, true);\nvar boundActionDecorator = createClassPropertyDecorator(function (target, key, value) {\n defineBoundAction(target, key, value);\n}, function (key) {\n return this[key];\n}, function () {\n invariant(false, getMessage(\"m001\"));\n}, false, false);\nvar action = function action(arg1, arg2, arg3, arg4) {\n if (arguments.length === 1 && typeof arg1 === \"function\")\n return createAction(arg1.name || \"\", arg1);\n if (arguments.length === 2 && typeof arg2 === \"function\")\n return createAction(arg1, arg2);\n if (arguments.length === 1 && typeof arg1 === \"string\")\n return namedActionDecorator(arg1);\n return namedActionDecorator(arg2).apply(null, arguments);\n};\naction.bound = function boundAction(arg1, arg2, arg3) {\n if (typeof arg1 === \"function\") {\n var action_1 = createAction(\"\", arg1);\n action_1.autoBind = true;\n return action_1;\n }\n return boundActionDecorator.apply(null, arguments);\n};\nfunction namedActionDecorator(name) {\n return function (target, prop, descriptor) {\n if (descriptor && typeof descriptor.value === \"function\") {\n // TypeScript @action method() { }. Defined on proto before being decorated\n // Don't use the field decorator if we are just decorating a method\n descriptor.value = createAction(name, descriptor.value);\n descriptor.enumerable = false;\n descriptor.configurable = true;\n return descriptor;\n }\n // bound instance methods\n return actionFieldDecorator(name).apply(this, arguments);\n };\n}\nfunction runInAction(arg1, arg2, arg3) {\n var actionName = typeof arg1 === \"string\" ? arg1 : arg1.name || \"\";\n var fn = typeof arg1 === \"function\" ? arg1 : arg2;\n var scope = typeof arg1 === \"function\" ? arg2 : arg3;\n invariant(typeof fn === \"function\", getMessage(\"m002\"));\n invariant(fn.length === 0, getMessage(\"m003\"));\n invariant(typeof actionName === \"string\" && actionName.length > 0, \"actions should have valid names, got: '\" + actionName + \"'\");\n return executeAction(actionName, fn, scope, undefined);\n}\nfunction isAction(thing) {\n return typeof thing === \"function\" && thing.isMobxAction === true;\n}\nfunction defineBoundAction(target, propertyName, fn) {\n var res = function () {\n return executeAction(propertyName, fn, target, arguments);\n };\n res.isMobxAction = true;\n addHiddenProp(target, propertyName, res);\n}\n\nfunction autorun(arg1, arg2, arg3) {\n var name, view, scope;\n if (typeof arg1 === \"string\") {\n name = arg1;\n view = arg2;\n scope = arg3;\n }\n else {\n name = arg1.name || (\"Autorun@\" + getNextId());\n view = arg1;\n scope = arg2;\n }\n invariant(typeof view === \"function\", getMessage(\"m004\"));\n invariant(isAction(view) === false, getMessage(\"m005\"));\n if (scope)\n view = view.bind(scope);\n var reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n });\n function reactionRunner() {\n view(reaction);\n }\n reaction.schedule();\n return reaction.getDisposer();\n}\nfunction when(arg1, arg2, arg3, arg4) {\n var name, predicate, effect, scope;\n if (typeof arg1 === \"string\") {\n name = arg1;\n predicate = arg2;\n effect = arg3;\n scope = arg4;\n }\n else {\n name = (\"When@\" + getNextId());\n predicate = arg1;\n effect = arg2;\n scope = arg3;\n }\n var disposer = autorun(name, function (r) {\n if (predicate.call(scope)) {\n r.dispose();\n var prevUntracked = untrackedStart();\n effect.call(scope);\n untrackedEnd(prevUntracked);\n }\n });\n return disposer;\n}\nfunction autorunAsync(arg1, arg2, arg3, arg4) {\n var name, func, delay, scope;\n if (typeof arg1 === \"string\") {\n name = arg1;\n func = arg2;\n delay = arg3;\n scope = arg4;\n }\n else {\n name = arg1.name || (\"AutorunAsync@\" + getNextId());\n func = arg1;\n delay = arg2;\n scope = arg3;\n }\n invariant(isAction(func) === false, getMessage(\"m006\"));\n if (delay === void 0)\n delay = 1;\n if (scope)\n func = func.bind(scope);\n var isScheduled = false;\n var r = new Reaction(name, function () {\n if (!isScheduled) {\n isScheduled = true;\n setTimeout(function () {\n isScheduled = false;\n if (!r.isDisposed)\n r.track(reactionRunner);\n }, delay);\n }\n });\n function reactionRunner() { func(r); }\n r.schedule();\n return r.getDisposer();\n}\nfunction reaction(expression, effect, arg3) {\n if (arguments.length > 3) {\n fail(getMessage(\"m007\"));\n }\n if (isModifierDescriptor(expression)) {\n fail(getMessage(\"m008\"));\n }\n var opts;\n if (typeof arg3 === \"object\") {\n opts = arg3;\n }\n else {\n opts = {};\n }\n opts.name = opts.name || expression.name || effect.name || (\"Reaction@\" + getNextId());\n opts.fireImmediately = arg3 === true || opts.fireImmediately === true;\n opts.delay = opts.delay || 0;\n opts.compareStructural = opts.compareStructural || opts.struct || false;\n effect = action(opts.name, opts.context ? effect.bind(opts.context) : effect);\n if (opts.context) {\n expression = expression.bind(opts.context);\n }\n var firstTime = true;\n var isScheduled = false;\n var nextValue;\n var r = new Reaction(opts.name, function () {\n if (firstTime || opts.delay < 1) {\n reactionRunner();\n }\n else if (!isScheduled) {\n isScheduled = true;\n setTimeout(function () {\n isScheduled = false;\n reactionRunner();\n }, opts.delay);\n }\n });\n function reactionRunner() {\n if (r.isDisposed)\n return;\n var changed = false;\n r.track(function () {\n var v = expression(r);\n changed = valueDidChange(opts.compareStructural, nextValue, v);\n nextValue = v;\n });\n if (firstTime && opts.fireImmediately)\n effect(nextValue, r);\n if (!firstTime && changed === true)\n effect(nextValue, r);\n if (firstTime)\n firstTime = false;\n }\n r.schedule();\n return r.getDisposer();\n}\n\n/**\n * A node in the state dependency root that observes other nodes, and can be observed itself.\n *\n * ComputedValue will remember result of the computation for duration of a batch, or being observed\n * During this time it will recompute only when one of its direct dependencies changed,\n * but only when it is being accessed with `ComputedValue.get()`.\n *\n * Implementation description:\n * 1. First time it's being accessed it will compute and remember result\n * give back remembered result until 2. happens\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\n * 3. When it's being accessed, recompute if any shallow dependency changed.\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\n * go to step 2. either way\n *\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\n */\nvar ComputedValue = (function () {\n /**\n * Create a new computed value based on a function expression.\n *\n * The `name` property is for debug purposes only.\n *\n * The `compareStructural` property indicates whether the return values should be compared structurally.\n * Normally, a computed value will not notify an upstream observer if a newly produced value is strictly equal to the previously produced value.\n * However, enabling compareStructural can be convenient if you always produce an new aggregated object and don't want to notify observers if it is structurally the same.\n * This is useful for working with vectors, mouse coordinates etc.\n */\n function ComputedValue(derivation, scope, compareStructural, name, setter) {\n this.derivation = derivation;\n this.scope = scope;\n this.compareStructural = compareStructural;\n this.dependenciesState = IDerivationState.NOT_TRACKING;\n this.observing = []; // nodes we are looking at. Our value depends on these nodes\n this.newObserving = null; // during tracking it's an array with new observed observers\n this.isPendingUnobservation = false;\n this.observers = [];\n this.observersIndexes = {};\n this.diffValue = 0;\n this.runId = 0;\n this.lastAccessedBy = 0;\n this.lowestObserverState = IDerivationState.UP_TO_DATE;\n this.unboundDepsCount = 0;\n this.__mapid = \"#\" + getNextId();\n this.value = undefined;\n this.isComputing = false; // to check for cycles\n this.isRunningSetter = false;\n this.name = name || \"ComputedValue@\" + getNextId();\n if (setter)\n this.setter = createAction(name + \"-setter\", setter);\n }\n ComputedValue.prototype.onBecomeStale = function () {\n propagateMaybeChanged(this);\n };\n ComputedValue.prototype.onBecomeUnobserved = function () {\n clearObserving(this);\n this.value = undefined;\n };\n /**\n * Returns the current value of this computed value.\n * Will evaluate its computation first if needed.\n */\n ComputedValue.prototype.get = function () {\n invariant(!this.isComputing, \"Cycle detected in computation \" + this.name, this.derivation);\n if (globalState.inBatch === 0) {\n // just for small optimization, can be droped for simplicity\n // computed called outside of any mobx stuff. batch observing shuold be enough, don't need tracking\n // because it will never be called again inside this batch\n startBatch();\n if (shouldCompute(this))\n this.value = this.computeValue(false);\n endBatch();\n }\n else {\n reportObserved(this);\n if (shouldCompute(this))\n if (this.trackAndCompute())\n propagateChangeConfirmed(this);\n }\n var result = this.value;\n if (isCaughtException(result))\n throw result.cause;\n return result;\n };\n ComputedValue.prototype.peek = function () {\n var res = this.computeValue(false);\n if (isCaughtException(res))\n throw res.cause;\n return res;\n };\n ComputedValue.prototype.set = function (value) {\n if (this.setter) {\n invariant(!this.isRunningSetter, \"The setter of computed value '\" + this.name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\");\n this.isRunningSetter = true;\n try {\n this.setter.call(this.scope, value);\n }\n finally {\n this.isRunningSetter = false;\n }\n }\n else\n invariant(false, \"[ComputedValue '\" + this.name + \"'] It is not possible to assign a new value to a computed value.\");\n };\n ComputedValue.prototype.trackAndCompute = function () {\n if (isSpyEnabled()) {\n spyReport({\n object: this.scope,\n type: \"compute\",\n fn: this.derivation\n });\n }\n var oldValue = this.value;\n var newValue = this.value = this.computeValue(true);\n return isCaughtException(newValue) || valueDidChange(this.compareStructural, newValue, oldValue);\n };\n ComputedValue.prototype.computeValue = function (track) {\n this.isComputing = true;\n globalState.computationDepth++;\n var res;\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope);\n }\n else {\n try {\n res = this.derivation.call(this.scope);\n }\n catch (e) {\n res = new CaughtException(e);\n }\n }\n globalState.computationDepth--;\n this.isComputing = false;\n return res;\n };\n \n ComputedValue.prototype.observe = function (listener, fireImmediately) {\n var _this = this;\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n var newValue = _this.get();\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n type: \"update\",\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n firstTime = false;\n prevValue = newValue;\n });\n };\n ComputedValue.prototype.toJSON = function () {\n return this.get();\n };\n ComputedValue.prototype.toString = function () {\n return this.name + \"[\" + this.derivation.toString() + \"]\";\n };\n ComputedValue.prototype.valueOf = function () {\n return toPrimitive(this.get());\n };\n \n ComputedValue.prototype.whyRun = function () {\n var isTracking = Boolean(globalState.trackingDerivation);\n var observing = unique(this.isComputing ? this.newObserving : this.observing).map(function (dep) { return dep.name; });\n var observers = unique(getObservers(this).map(function (dep) { return dep.name; }));\n return (\"\\nWhyRun? computation '\" + this.name + \"':\\n * Running because: \" + (isTracking ? \"[active] the value of this computation is needed by a reaction\" : this.isComputing ? \"[get] The value of this computed was requested outside a reaction\" : \"[idle] not running at the moment\") + \"\\n\" +\n (this.dependenciesState === IDerivationState.NOT_TRACKING ? getMessage(\"m032\") :\n \" * This computation will re-run if any of the following observables changes:\\n \" + joinStrings(observing) + \"\\n \" + ((this.isComputing && isTracking) ? \" (... or any observable accessed during the remainder of the current run)\" : \"\") + \"\\n\\t\" + getMessage(\"m038\") + \"\\n\\n * If the outcome of this computation changes, the following observers will be re-run:\\n \" + joinStrings(observers) + \"\\n\"));\n };\n return ComputedValue;\n}());\nComputedValue.prototype[primitiveSymbol()] = ComputedValue.prototype.valueOf;\nvar isComputedValue = createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\nvar ObservableObjectAdministration = (function () {\n function ObservableObjectAdministration(target, name) {\n this.target = target;\n this.name = name;\n this.values = {};\n this.changeListeners = null;\n this.interceptors = null;\n }\n /**\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\n * for callback details\n */\n ObservableObjectAdministration.prototype.observe = function (callback, fireImmediately) {\n invariant(fireImmediately !== true, \"`observe` doesn't support the fire immediately property for observable objects.\");\n return registerListener(this, callback);\n };\n ObservableObjectAdministration.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n return ObservableObjectAdministration;\n}());\nfunction asObservableObject(target, name) {\n if (isObservableObject(target))\n return target.$mobx;\n invariant(Object.isExtensible(target), getMessage(\"m035\"));\n if (!isPlainObject(target))\n name = (target.constructor.name || \"ObservableObject\") + \"@\" + getNextId();\n if (!name)\n name = \"ObservableObject@\" + getNextId();\n var adm = new ObservableObjectAdministration(target, name);\n addHiddenFinalProp(target, \"$mobx\", adm);\n return adm;\n}\nfunction defineObservablePropertyFromDescriptor(adm, propName, descriptor, defaultEnhancer) {\n if (adm.values[propName]) {\n // already observable property\n invariant(\"value\" in descriptor, \"The property \" + propName + \" in \" + adm.name + \" is already observable, cannot redefine it as computed property\");\n adm.target[propName] = descriptor.value; // the property setter will make 'value' reactive if needed.\n return;\n }\n // not yet observable property\n if (\"value\" in descriptor) {\n // not a computed value\n if (isModifierDescriptor(descriptor.value)) {\n // x : ref(someValue)\n var modifierDescriptor = descriptor.value;\n defineObservableProperty(adm, propName, modifierDescriptor.initialValue, modifierDescriptor.enhancer);\n }\n else if (isAction(descriptor.value) && descriptor.value.autoBind === true) {\n defineBoundAction(adm.target, propName, descriptor.value.originalFn);\n }\n else if (isComputedValue(descriptor.value)) {\n // x: computed(someExpr)\n defineComputedPropertyFromComputedValue(adm, propName, descriptor.value);\n }\n else {\n // x: someValue\n defineObservableProperty(adm, propName, descriptor.value, defaultEnhancer);\n }\n }\n else {\n // get x() { return 3 } set x(v) { }\n defineComputedProperty(adm, propName, descriptor.get, descriptor.set, false, true);\n }\n}\nfunction defineObservableProperty(adm, propName, newValue, enhancer) {\n assertPropertyConfigurable(adm.target, propName);\n if (hasInterceptors(adm)) {\n var change = interceptChange(adm, {\n object: adm.target,\n name: propName,\n type: \"add\",\n newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n var observable = adm.values[propName] = new ObservableValue(newValue, enhancer, adm.name + \".\" + propName, false);\n newValue = observable.value; // observableValue might have changed it\n Object.defineProperty(adm.target, propName, generateObservablePropConfig(propName));\n notifyPropertyAddition(adm, adm.target, propName, newValue);\n}\nfunction defineComputedProperty(adm, propName, getter, setter, compareStructural, asInstanceProperty) {\n if (asInstanceProperty)\n assertPropertyConfigurable(adm.target, propName);\n adm.values[propName] = new ComputedValue(getter, adm.target, compareStructural, adm.name + \".\" + propName, setter);\n if (asInstanceProperty) {\n Object.defineProperty(adm.target, propName, generateComputedPropConfig(propName));\n }\n}\nfunction defineComputedPropertyFromComputedValue(adm, propName, computedValue) {\n var name = adm.name + \".\" + propName;\n computedValue.name = name;\n if (!computedValue.scope)\n computedValue.scope = adm.target;\n adm.values[propName] = computedValue;\n Object.defineProperty(adm.target, propName, generateComputedPropConfig(propName));\n}\nvar observablePropertyConfigs = {};\nvar computedPropertyConfigs = {};\nfunction generateObservablePropConfig(propName) {\n return observablePropertyConfigs[propName] || (observablePropertyConfigs[propName] = {\n configurable: true,\n enumerable: true,\n get: function () {\n return this.$mobx.values[propName].get();\n },\n set: function (v) {\n setPropertyValue(this, propName, v);\n }\n });\n}\nfunction generateComputedPropConfig(propName) {\n return computedPropertyConfigs[propName] || (computedPropertyConfigs[propName] = {\n configurable: true,\n enumerable: false,\n get: function () {\n return this.$mobx.values[propName].get();\n },\n set: function (v) {\n return this.$mobx.values[propName].set(v);\n }\n });\n}\nfunction setPropertyValue(instance, name, newValue) {\n var adm = instance.$mobx;\n var observable = adm.values[name];\n // intercept\n if (hasInterceptors(adm)) {\n var change = interceptChange(adm, {\n type: \"update\",\n object: instance,\n name: name, newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n newValue = observable.prepareNewValue(newValue);\n // notify spy & observers\n if (newValue !== UNCHANGED) {\n var notify = hasListeners(adm);\n var notifySpy = isSpyEnabled();\n var change = notify || notifySpy ? {\n type: \"update\",\n object: instance,\n oldValue: observable.value,\n name: name, newValue: newValue\n } : null;\n if (notifySpy)\n spyReportStart(change);\n observable.setNewValue(newValue);\n if (notify)\n notifyListeners(adm, change);\n if (notifySpy)\n spyReportEnd();\n }\n}\nfunction notifyPropertyAddition(adm, object, name, newValue) {\n var notify = hasListeners(adm);\n var notifySpy = isSpyEnabled();\n var change = notify || notifySpy ? {\n type: \"add\",\n object: object, name: name, newValue: newValue\n } : null;\n if (notifySpy)\n spyReportStart(change);\n if (notify)\n notifyListeners(adm, change);\n if (notifySpy)\n spyReportEnd();\n}\nvar isObservableObjectAdministration = createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n runLazyInitializers(thing);\n return isObservableObjectAdministration(thing.$mobx);\n }\n return false;\n}\n\n/**\n * Returns true if the provided value is reactive.\n * @param value object, function or array\n * @param propertyName if propertyName is specified, checkes whether value.propertyName is reactive.\n */\nfunction isObservable(value, property) {\n if (value === null || value === undefined)\n return false;\n if (property !== undefined) {\n if (isObservableArray(value) || isObservableMap(value))\n throw new Error(getMessage(\"m019\"));\n else if (isObservableObject(value)) {\n var o = value.$mobx;\n return o.values && !!o.values[property];\n }\n return false;\n }\n // For first check, see #701\n return isObservableObject(value) || !!value.$mobx || isAtom(value) || isReaction(value) || isComputedValue(value);\n}\n\nfunction createDecoratorForEnhancer(enhancer) {\n invariant(!!enhancer, \":(\");\n return createClassPropertyDecorator(function (target, name, baseValue, _, baseDescriptor) {\n assertPropertyConfigurable(target, name);\n invariant(!baseDescriptor || !baseDescriptor.get, getMessage(\"m022\"));\n var adm = asObservableObject(target, undefined);\n defineObservableProperty(adm, name, baseValue, enhancer);\n }, function (name) {\n var observable = this.$mobx.values[name];\n if (observable === undefined)\n return undefined;\n return observable.get();\n }, function (name, value) {\n setPropertyValue(this, name, value);\n }, true, false);\n}\n\nfunction extendObservable(target) {\n var properties = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n properties[_i - 1] = arguments[_i];\n }\n return extendObservableHelper(target, deepEnhancer, properties);\n}\nfunction extendShallowObservable(target) {\n var properties = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n properties[_i - 1] = arguments[_i];\n }\n return extendObservableHelper(target, referenceEnhancer, properties);\n}\nfunction extendObservableHelper(target, defaultEnhancer, properties) {\n invariant(arguments.length >= 2, getMessage(\"m014\"));\n invariant(typeof target === \"object\", getMessage(\"m015\"));\n invariant(!(isObservableMap(target)), getMessage(\"m016\"));\n properties.forEach(function (propSet) {\n invariant(typeof propSet === \"object\", getMessage(\"m017\"));\n invariant(!isObservable(propSet), getMessage(\"m018\"));\n });\n var adm = asObservableObject(target);\n var definedProps = {};\n // Note could be optimised if properties.length === 1\n for (var i = properties.length - 1; i >= 0; i--) {\n var propSet = properties[i];\n for (var key in propSet)\n if (definedProps[key] !== true && hasOwnProperty(propSet, key)) {\n definedProps[key] = true;\n if (target === propSet && !isPropertyConfigurable(target, key))\n continue; // see #111, skip non-configurable or non-writable props for `observable(object)`.\n var descriptor = Object.getOwnPropertyDescriptor(propSet, key);\n defineObservablePropertyFromDescriptor(adm, key, descriptor, defaultEnhancer);\n }\n }\n return target;\n}\n\nvar deepDecorator = createDecoratorForEnhancer(deepEnhancer);\nvar shallowDecorator = createDecoratorForEnhancer(shallowEnhancer);\nvar refDecorator = createDecoratorForEnhancer(referenceEnhancer);\nvar deepStructDecorator = createDecoratorForEnhancer(deepStructEnhancer);\nvar refStructDecorator = createDecoratorForEnhancer(refStructEnhancer);\n/**\n * Turns an object, array or function into a reactive structure.\n * @param value the value which should become observable.\n */\nfunction createObservable(v) {\n if (v === void 0) { v = undefined; }\n // @observable someProp;\n if (typeof arguments[1] === \"string\")\n return deepDecorator.apply(null, arguments);\n invariant(arguments.length <= 1, getMessage(\"m021\"));\n invariant(!isModifierDescriptor(v), getMessage(\"m020\"));\n // it is an observable already, done\n if (isObservable(v))\n return v;\n // something that can be converted and mutated?\n var res = deepEnhancer(v, undefined, undefined);\n // this value could be converted to a new observable data structure, return it\n if (res !== v)\n return res;\n // otherwise, just box it\n return observable.box(v);\n}\nvar IObservableFactories = (function () {\n function IObservableFactories() {\n }\n IObservableFactories.prototype.box = function (value, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"box\");\n return new ObservableValue(value, deepEnhancer, name);\n };\n IObservableFactories.prototype.shallowBox = function (value, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"shallowBox\");\n return new ObservableValue(value, referenceEnhancer, name);\n };\n IObservableFactories.prototype.array = function (initialValues, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"array\");\n return new ObservableArray(initialValues, deepEnhancer, name);\n };\n IObservableFactories.prototype.shallowArray = function (initialValues, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"shallowArray\");\n return new ObservableArray(initialValues, referenceEnhancer, name);\n };\n IObservableFactories.prototype.map = function (initialValues, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"map\");\n return new ObservableMap(initialValues, deepEnhancer, name);\n };\n IObservableFactories.prototype.shallowMap = function (initialValues, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"shallowMap\");\n return new ObservableMap(initialValues, referenceEnhancer, name);\n };\n IObservableFactories.prototype.object = function (props, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"object\");\n var res = {};\n // convert to observable object\n asObservableObject(res, name);\n // add properties\n extendObservable(res, props);\n return res;\n };\n IObservableFactories.prototype.shallowObject = function (props, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"shallowObject\");\n var res = {};\n asObservableObject(res, name);\n extendShallowObservable(res, props);\n return res;\n };\n IObservableFactories.prototype.ref = function () {\n if (arguments.length < 2) {\n // although ref creates actually a modifier descriptor, the type of the resultig properties\n // of the object is `T` in the end, when the descriptors are interpreted\n return createModifierDescriptor(referenceEnhancer, arguments[0]);\n }\n else {\n return refDecorator.apply(null, arguments);\n }\n };\n IObservableFactories.prototype.shallow = function () {\n if (arguments.length < 2) {\n // although ref creates actually a modifier descriptor, the type of the resultig properties\n // of the object is `T` in the end, when the descriptors are interpreted\n return createModifierDescriptor(shallowEnhancer, arguments[0]);\n }\n else {\n return shallowDecorator.apply(null, arguments);\n }\n };\n IObservableFactories.prototype.deep = function () {\n if (arguments.length < 2) {\n // although ref creates actually a modifier descriptor, the type of the resultig properties\n // of the object is `T` in the end, when the descriptors are interpreted\n return createModifierDescriptor(deepEnhancer, arguments[0]);\n }\n else {\n return deepDecorator.apply(null, arguments);\n }\n };\n IObservableFactories.prototype.struct = function () {\n if (arguments.length < 2) {\n // although ref creates actually a modifier descriptor, the type of the resultig properties\n // of the object is `T` in the end, when the descriptors are interpreted\n return createModifierDescriptor(deepStructEnhancer, arguments[0]);\n }\n else {\n return deepStructDecorator.apply(null, arguments);\n }\n };\n return IObservableFactories;\n}());\nvar observable = createObservable;\n// weird trick to keep our typings nicely with our funcs, and still extend the observable function\n// ES6 class methods aren't enumerable, can't use Object.keys\nObject.getOwnPropertyNames(IObservableFactories.prototype)\n .filter(function (name) { return name !== \"constructor\"; })\n .forEach(function (name) { return observable[name] = IObservableFactories.prototype[name]; });\nobservable.deep.struct = observable.struct;\nobservable.ref.struct = function () {\n if (arguments.length < 2) {\n return createModifierDescriptor(refStructEnhancer, arguments[0]);\n }\n else {\n return refStructDecorator.apply(null, arguments);\n }\n};\nfunction incorrectlyUsedAsDecorator(methodName) {\n fail(\"Expected one or two arguments to observable.\" + methodName + \". Did you accidentally try to use observable.\" + methodName + \" as decorator?\");\n}\n\nfunction isModifierDescriptor(thing) {\n return typeof thing === \"object\" && thing !== null && thing.isMobxModifierDescriptor === true;\n}\nfunction createModifierDescriptor(enhancer, initialValue) {\n invariant(!isModifierDescriptor(initialValue), \"Modifiers cannot be nested\");\n return {\n isMobxModifierDescriptor: true,\n initialValue: initialValue,\n enhancer: enhancer\n };\n}\nfunction deepEnhancer(v, _, name) {\n if (isModifierDescriptor(v))\n fail(\"You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it\");\n // it is an observable already, done\n if (isObservable(v))\n return v;\n // something that can be converted and mutated?\n if (Array.isArray(v))\n return observable.array(v, name);\n if (isPlainObject(v))\n return observable.object(v, name);\n if (isES6Map(v))\n return observable.map(v, name);\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (isModifierDescriptor(v))\n fail(\"You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it\");\n if (v === undefined || v === null)\n return v;\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v))\n return v;\n if (Array.isArray(v))\n return observable.shallowArray(v, name);\n if (isPlainObject(v))\n return observable.shallowObject(v, name);\n if (isES6Map(v))\n return observable.shallowMap(v, name);\n return fail(\"The shallow modifier / decorator can only used in combination with arrays, objects and maps\");\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction deepStructEnhancer(v, oldValue, name) {\n // don't confuse structurally compare enhancer with ref enhancer! The latter is probably\n // more suited for immutable objects\n if (deepEqual(v, oldValue))\n return oldValue;\n // it is an observable already, done\n if (isObservable(v))\n return v;\n // something that can be converted and mutated?\n if (Array.isArray(v))\n return new ObservableArray(v, deepStructEnhancer, name);\n if (isES6Map(v))\n return new ObservableMap(v, deepStructEnhancer, name);\n if (isPlainObject(v)) {\n var res = {};\n asObservableObject(res, name);\n extendObservableHelper(res, deepStructEnhancer, [v]);\n return res;\n }\n return v;\n}\nfunction refStructEnhancer(v, oldValue, name) {\n if (deepEqual(v, oldValue))\n return oldValue;\n return v;\n}\n\n/**\n * @deprecated\n * During a transaction no views are updated until the end of the transaction.\n * The transaction will be run synchronously nonetheless.\n *\n * Deprecated to simplify api; transactions offer no real benefit above actions.\n *\n * @param action a function that updates some reactive state\n * @returns any value that was returned by the 'action' parameter.\n */\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) { thisArg = undefined; }\n deprecated(getMessage(\"m023\"));\n return runInTransaction.apply(undefined, arguments);\n}\nfunction runInTransaction(action, thisArg) {\n if (thisArg === void 0) { thisArg = undefined; }\n return executeAction(\"\", action);\n}\n\nvar ObservableMapMarker = {};\nvar ObservableMap = (function () {\n function ObservableMap(initialData, enhancer, name) {\n if (enhancer === void 0) { enhancer = deepEnhancer; }\n if (name === void 0) { name = \"ObservableMap@\" + getNextId(); }\n this.enhancer = enhancer;\n this.name = name;\n this.$mobx = ObservableMapMarker;\n this._data = Object.create(null);\n this._hasMap = Object.create(null); // hasMap, not hashMap >-).\n this._keys = new ObservableArray(undefined, referenceEnhancer, this.name + \".keys()\", true);\n this.interceptors = null;\n this.changeListeners = null;\n this.dehancer = undefined;\n this.merge(initialData);\n }\n ObservableMap.prototype._has = function (key) {\n return typeof this._data[key] !== \"undefined\";\n };\n ObservableMap.prototype.has = function (key) {\n if (!this.isValidKey(key))\n return false;\n key = \"\" + key;\n if (this._hasMap[key])\n return this._hasMap[key].get();\n return this._updateHasMapEntry(key, false).get();\n };\n ObservableMap.prototype.set = function (key, value) {\n this.assertValidKey(key);\n key = \"\" + key;\n var hasKey = this._has(key);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? \"update\" : \"add\",\n object: this,\n newValue: value,\n name: key\n });\n if (!change)\n return this;\n value = change.newValue;\n }\n if (hasKey) {\n this._updateValue(key, value);\n }\n else {\n this._addValue(key, value);\n }\n return this;\n };\n ObservableMap.prototype.delete = function (key) {\n var _this = this;\n this.assertValidKey(key);\n key = \"\" + key;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"delete\",\n object: this,\n name: key\n });\n if (!change)\n return false;\n }\n if (this._has(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n type: \"delete\",\n object: this,\n oldValue: this._data[key].value,\n name: key\n } : null;\n if (notifySpy)\n spyReportStart(change);\n runInTransaction(function () {\n _this._keys.remove(key);\n _this._updateHasMapEntry(key, false);\n var observable$$1 = _this._data[key];\n observable$$1.setNewValue(undefined);\n _this._data[key] = undefined;\n });\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n return true;\n }\n return false;\n };\n ObservableMap.prototype._updateHasMapEntry = function (key, value) {\n // optimization; don't fill the hasMap if we are not observing, or remove entry if there are no observers anymore\n var entry = this._hasMap[key];\n if (entry) {\n entry.setNewValue(value);\n }\n else {\n entry = this._hasMap[key] = new ObservableValue(value, referenceEnhancer, this.name + \".\" + key + \"?\", false);\n }\n return entry;\n };\n ObservableMap.prototype._updateValue = function (name, newValue) {\n var observable$$1 = this._data[name];\n newValue = observable$$1.prepareNewValue(newValue);\n if (newValue !== UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n type: \"update\",\n object: this,\n oldValue: observable$$1.value,\n name: name, newValue: newValue\n } : null;\n if (notifySpy)\n spyReportStart(change);\n observable$$1.setNewValue(newValue);\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n }\n };\n ObservableMap.prototype._addValue = function (name, newValue) {\n var _this = this;\n runInTransaction(function () {\n var observable$$1 = _this._data[name] = new ObservableValue(newValue, _this.enhancer, _this.name + \".\" + name, false);\n newValue = observable$$1.value; // value might have been changed\n _this._updateHasMapEntry(name, true);\n _this._keys.push(name);\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n type: \"add\",\n object: this,\n name: name,\n newValue: newValue\n } : null;\n if (notifySpy)\n spyReportStart(change);\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n };\n ObservableMap.prototype.get = function (key) {\n key = \"\" + key;\n if (this.has(key))\n return this.dehanceValue(this._data[key].get());\n return this.dehanceValue(undefined);\n };\n ObservableMap.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n ObservableMap.prototype.keys = function () {\n return arrayAsIterator(this._keys.slice());\n };\n ObservableMap.prototype.values = function () {\n return arrayAsIterator(this._keys.map(this.get, this));\n };\n ObservableMap.prototype.entries = function () {\n var _this = this;\n return arrayAsIterator(this._keys.map(function (key) { return [key, _this.get(key)]; }));\n };\n ObservableMap.prototype.forEach = function (callback, thisArg) {\n var _this = this;\n this.keys().forEach(function (key) { return callback.call(thisArg, _this.get(key), key, _this); });\n };\n /** Merge another object into this object, returns this. */\n ObservableMap.prototype.merge = function (other) {\n var _this = this;\n if (isObservableMap(other)) {\n other = other.toJS();\n }\n runInTransaction(function () {\n if (isPlainObject(other))\n Object.keys(other).forEach(function (key) { return _this.set(key, other[key]); });\n else if (Array.isArray(other))\n other.forEach(function (_a) {\n var key = _a[0], value = _a[1];\n return _this.set(key, value);\n });\n else if (isES6Map(other))\n other.forEach(function (value, key) { return _this.set(key, value); });\n else if (other !== null && other !== undefined)\n fail(\"Cannot initialize map from \" + other);\n });\n return this;\n };\n ObservableMap.prototype.clear = function () {\n var _this = this;\n runInTransaction(function () {\n untracked(function () {\n _this.keys().forEach(_this.delete, _this);\n });\n });\n };\n ObservableMap.prototype.replace = function (values) {\n var _this = this;\n runInTransaction(function () {\n _this.clear();\n _this.merge(values);\n });\n return this;\n };\n Object.defineProperty(ObservableMap.prototype, \"size\", {\n get: function () {\n return this._keys.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns a shallow non observable object clone of this map.\n * Note that the values migth still be observable. For a deep clone use mobx.toJS.\n */\n ObservableMap.prototype.toJS = function () {\n var _this = this;\n var res = {};\n this.keys().forEach(function (key) { return res[key] = _this.get(key); });\n return res;\n };\n ObservableMap.prototype.toJSON = function () {\n // Used by JSON.stringify\n return this.toJS();\n };\n ObservableMap.prototype.isValidKey = function (key) {\n if (key === null || key === undefined)\n return false;\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"boolean\")\n return true;\n return false;\n };\n ObservableMap.prototype.assertValidKey = function (key) {\n if (!this.isValidKey(key))\n throw new Error(\"[mobx.map] Invalid key: '\" + key + \"', only strings, numbers and booleans are accepted as key in observable maps.\");\n };\n ObservableMap.prototype.toString = function () {\n var _this = this;\n return this.name + \"[{ \" + this.keys().map(function (key) { return key + \": \" + (\"\" + _this.get(key)); }).join(\", \") + \" }]\";\n };\n /**\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\n * for callback details\n */\n ObservableMap.prototype.observe = function (listener, fireImmediately) {\n invariant(fireImmediately !== true, getMessage(\"m033\"));\n return registerListener(this, listener);\n };\n ObservableMap.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n return ObservableMap;\n}());\ndeclareIterator(ObservableMap.prototype, function () {\n return this.entries();\n});\nfunction map(initialValues) {\n deprecated(\"`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead\");\n return observable.map(initialValues);\n}\n/* 'var' fixes small-build issue */\nvar isObservableMap = createInstanceofPredicate(\"ObservableMap\", ObservableMap);\n\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nfunction getGlobal() {\n return global;\n}\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\nfunction fail(message, thing) {\n invariant(false, message, thing);\n throw \"X\"; // unreachable\n}\nfunction invariant(check, message, thing) {\n if (!check)\n throw new Error(\"[mobx] Invariant failed: \" + message + (thing ? \" in '\" + thing + \"'\" : \"\"));\n}\n/**\n * Prints a deprecation message, but only one time.\n * Returns false if the deprecated message was already printed before\n */\nvar deprecatedMessages = [];\nfunction deprecated(msg) {\n if (deprecatedMessages.indexOf(msg) !== -1)\n return false;\n deprecatedMessages.push(msg);\n console.error(\"[mobx] Deprecated: \" + msg);\n return true;\n}\n/**\n * Makes sure that the provided function is invoked at most once.\n */\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked)\n return;\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function () { };\nfunction unique(list) {\n var res = [];\n list.forEach(function (item) {\n if (res.indexOf(item) === -1)\n res.push(item);\n });\n return res;\n}\nfunction joinStrings(things, limit, separator) {\n if (limit === void 0) { limit = 100; }\n if (separator === void 0) { separator = \" - \"; }\n if (!things)\n return \"\";\n var sliced = things.slice(0, limit);\n return \"\" + sliced.join(separator) + (things.length > limit ? \" (... and \" + (things.length - limit) + \"more)\" : \"\");\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n if (value === null || typeof value !== \"object\")\n return false;\n var proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\nfunction objectAssign() {\n var res = arguments[0];\n for (var i = 1, l = arguments.length; i < l; i++) {\n var source = arguments[i];\n for (var key in source)\n if (hasOwnProperty(source, key)) {\n res[key] = source[key];\n }\n }\n return res;\n}\nfunction valueDidChange(compareStructural, oldValue, newValue) {\n if (typeof oldValue === 'number' && isNaN(oldValue)) {\n return typeof newValue !== 'number' || !isNaN(newValue);\n }\n return compareStructural\n ? !deepEqual(oldValue, newValue)\n : oldValue !== newValue;\n}\nvar prototypeHasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwnProperty(object, propName) {\n return prototypeHasOwnProperty.call(object, propName);\n}\nfunction makeNonEnumerable(object, propNames) {\n for (var i = 0; i < propNames.length; i++) {\n addHiddenProp(object, propNames[i], object[propNames[i]]);\n }\n}\nfunction addHiddenProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction isPropertyConfigurable(object, prop) {\n var descriptor = Object.getOwnPropertyDescriptor(object, prop);\n return !descriptor || (descriptor.configurable !== false && descriptor.writable !== false);\n}\nfunction assertPropertyConfigurable(object, prop) {\n invariant(isPropertyConfigurable(object, prop), \"Cannot make property '\" + prop + \"' observable, it is not configurable and writable in the target object\");\n}\nfunction getEnumerableKeys(obj) {\n var res = [];\n for (var key in obj)\n res.push(key);\n return res;\n}\n/**\n * Naive deepEqual. Doesn't check for prototype, non-enumerable or out-of-range properties on arrays.\n * If you have such a case, you probably should use this function but something fancier :).\n */\nfunction deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}\nfunction createInstanceofPredicate(name, clazz) {\n var propName = \"isMobX\" + name;\n clazz.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\n/**\n * Returns whether the argument is an array, disregarding observability.\n */\nfunction isArrayLike(x) {\n return Array.isArray(x) || isObservableArray(x);\n}\nfunction isMapLike(x) {\n return isES6Map(x) || isObservableMap(x);\n}\nfunction isES6Map(thing) {\n if (getGlobal().Map !== undefined && thing instanceof getGlobal().Map)\n return true;\n return false;\n}\nfunction primitiveSymbol() {\n return (typeof Symbol === \"function\" && Symbol.toPrimitive) || \"@@toPrimitive\";\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? (\"\" + value) : value;\n}\n\n/**\n * These values will persist if global state is reset\n */\nvar persistentKeys = [\"mobxGuid\", \"resetId\", \"spyListeners\", \"strictMode\", \"runId\"];\nvar MobXGlobals = (function () {\n function MobXGlobals() {\n /**\n * MobXGlobals version.\n * MobX compatiblity with other versions loaded in memory as long as this version matches.\n * It indicates that the global state still stores similar information\n */\n this.version = 5;\n /**\n * Currently running derivation\n */\n this.trackingDerivation = null;\n /**\n * Are we running a computation currently? (not a reaction)\n */\n this.computationDepth = 0;\n /**\n * Each time a derivation is tracked, it is assigned a unique run-id\n */\n this.runId = 0;\n /**\n * 'guid' for general purpose. Will be persisted amongst resets.\n */\n this.mobxGuid = 0;\n /**\n * Are we in a batch block? (and how many of them)\n */\n this.inBatch = 0;\n /**\n * Observables that don't have observers anymore, and are about to be\n * suspended, unless somebody else accesses it in the same batch\n *\n * @type {IObservable[]}\n */\n this.pendingUnobservations = [];\n /**\n * List of scheduled, not yet executed, reactions.\n */\n this.pendingReactions = [];\n /**\n * Are we currently processing reactions?\n */\n this.isRunningReactions = false;\n /**\n * Is it allowed to change observables at this point?\n * In general, MobX doesn't allow that when running computations and React.render.\n * To ensure that those functions stay pure.\n */\n this.allowStateChanges = true;\n /**\n * If strict mode is enabled, state changes are by default not allowed\n */\n this.strictMode = false;\n /**\n * Used by createTransformer to detect that the global state has been reset.\n */\n this.resetId = 0;\n /**\n * Spy callbacks\n */\n this.spyListeners = [];\n /**\n * Globally attached error handlers that react specifically to errors in reactions\n */\n this.globalReactionErrorHandlers = [];\n }\n return MobXGlobals;\n}());\nvar globalState = new MobXGlobals();\nfunction shareGlobalState() {\n var global = getGlobal();\n var ownState = globalState;\n /**\n * Backward compatibility check\n */\n if (global.__mobservableTrackingStack || global.__mobservableViewStack)\n throw new Error(\"[mobx] An incompatible version of mobservable is already loaded.\");\n if (global.__mobxGlobal && global.__mobxGlobal.version !== ownState.version)\n throw new Error(\"[mobx] An incompatible version of mobx is already loaded.\");\n if (global.__mobxGlobal)\n globalState = global.__mobxGlobal;\n else\n global.__mobxGlobal = ownState;\n}\nfunction getGlobalState() {\n return globalState;\n}\n\n/**\n * For testing purposes only; this will break the internal state of existing observables,\n * but can be used to get back at a stable state after throwing errors\n */\nfunction resetGlobalState() {\n globalState.resetId++;\n var defaultGlobals = new MobXGlobals();\n for (var key in defaultGlobals)\n if (persistentKeys.indexOf(key) === -1)\n globalState[key] = defaultGlobals[key];\n globalState.allowStateChanges = !globalState.strictMode;\n}\n\nfunction hasObservers(observable) {\n return observable.observers && observable.observers.length > 0;\n}\nfunction getObservers(observable) {\n return observable.observers;\n}\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n var l = observable.observers.length;\n if (l) {\n observable.observersIndexes[node.__mapid] = l;\n }\n observable.observers[l] = node;\n if (observable.lowestObserverState > node.dependenciesState)\n observable.lowestObserverState = node.dependenciesState;\n // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didnt add node\");\n}\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n if (observable.observers.length === 1) {\n // deleting last observer\n observable.observers.length = 0;\n queueForUnobservation(observable);\n }\n else {\n // deleting from _observersIndexes is straight forward, to delete from _observers, let's swap `node` with last element\n var list = observable.observers;\n var map = observable.observersIndexes;\n var filler = list.pop(); // get last element, which should fill the place of `node`, so the array doesnt have holes\n if (filler !== node) {\n var index = map[node.__mapid] || 0; // getting index of `node`. this is the only place we actually use map.\n if (index) {\n map[filler.__mapid] = index;\n }\n else {\n delete map[filler.__mapid];\n }\n list[index] = filler;\n }\n delete map[node.__mapid];\n }\n // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n}\nfunction queueForUnobservation(observable) {\n if (!observable.isPendingUnobservation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, shuold only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\n * Avoids unnecessary recalculations.\n */\nfunction startBatch() {\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions();\n // the batch is actually about to finish, all unobserving should happen here.\n var list = globalState.pendingUnobservations;\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation = false;\n if (observable.observers.length === 0) {\n observable.onBecomeUnobserved();\n // NOTE: onBecomeUnobserved might push to `pendingUnobservations`\n }\n }\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n var derivation = globalState.trackingDerivation;\n if (derivation !== null) {\n /**\n * Simple optimization, give each derivation run an unique id (runId)\n * Check if last time this observable was accessed the same runId is used\n * if this is the case, the relation is already known\n */\n if (derivation.runId !== observable.lastAccessedBy) {\n observable.lastAccessedBy = derivation.runId;\n derivation.newObserving[derivation.unboundDepsCount++] = observable;\n }\n }\n else if (observable.observers.length === 0) {\n queueForUnobservation(observable);\n }\n}\n/**\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\n * It will propagate changes to observers from previous run\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\n * Hopefully self reruning autoruns aren't a feature people should depend on\n * Also most basic use cases should be ok\n */\n// Called by Atom when its value changes\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState === IDerivationState.STALE)\n return;\n observable.lowestObserverState = IDerivationState.STALE;\n var observers = observable.observers;\n var i = observers.length;\n while (i--) {\n var d = observers[i];\n if (d.dependenciesState === IDerivationState.UP_TO_DATE)\n d.onBecomeStale();\n d.dependenciesState = IDerivationState.STALE;\n }\n // invariantLOS(observable, \"changed end\");\n}\n// Called by ComputedValue when it recalculate and its value changed\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState === IDerivationState.STALE)\n return;\n observable.lowestObserverState = IDerivationState.STALE;\n var observers = observable.observers;\n var i = observers.length;\n while (i--) {\n var d = observers[i];\n if (d.dependenciesState === IDerivationState.POSSIBLY_STALE)\n d.dependenciesState = IDerivationState.STALE;\n else if (d.dependenciesState === IDerivationState.UP_TO_DATE)\n observable.lowestObserverState = IDerivationState.UP_TO_DATE;\n }\n // invariantLOS(observable, \"confirmed end\");\n}\n// Used by computed when its dependency changed, but we don't wan't to immediately recompute.\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState !== IDerivationState.UP_TO_DATE)\n return;\n observable.lowestObserverState = IDerivationState.POSSIBLY_STALE;\n var observers = observable.observers;\n var i = observers.length;\n while (i--) {\n var d = observers[i];\n if (d.dependenciesState === IDerivationState.UP_TO_DATE) {\n d.dependenciesState = IDerivationState.POSSIBLY_STALE;\n d.onBecomeStale();\n }\n }\n // invariantLOS(observable, \"maybe end\");\n}\n\nvar IDerivationState;\n(function (IDerivationState) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState[IDerivationState[\"NOT_TRACKING\"] = -1] = \"NOT_TRACKING\";\n // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n IDerivationState[IDerivationState[\"UP_TO_DATE\"] = 0] = \"UP_TO_DATE\";\n // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n IDerivationState[IDerivationState[\"POSSIBLY_STALE\"] = 1] = \"POSSIBLY_STALE\";\n // shallow dependency changed\n // will need to recompute when it's needed\n IDerivationState[IDerivationState[\"STALE\"] = 2] = \"STALE\";\n})(IDerivationState || (IDerivationState = {}));\nvar CaughtException = (function () {\n function CaughtException(cause) {\n this.cause = cause;\n // Empty\n }\n return CaughtException;\n}());\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\n * Finds out wether any dependency of derivation actually changed\n * If dependenciesState is 1 it will recalculate dependencies,\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\n *\n * By iterating over dependencies in the same order they were reported and stoping on first change\n * all recalculations are called only for ComputedValues that will be tracked anyway by derivation.\n * That is because we assume that if first x dependencies of derivation doesn't change\n * than derivation shuold run the same way up until accessing x-th dependency.\n */\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState) {\n case IDerivationState.UP_TO_DATE: return false;\n case IDerivationState.NOT_TRACKING:\n case IDerivationState.STALE: return true;\n case IDerivationState.POSSIBLY_STALE: {\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n var obs = derivation.observing, l = obs.length;\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n if (isComputedValue(obj)) {\n try {\n obj.get();\n }\n catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n return true;\n }\n // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n if (derivation.dependenciesState === IDerivationState.STALE) {\n untrackedEnd(prevUntracked);\n return true;\n }\n }\n }\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n return false;\n }\n }\n}\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\nfunction checkIfStateModificationsAreAllowed(atom) {\n var hasObservers$$1 = atom.observers.length > 0;\n // Should never be possible to change an observed observable from inside computed, see #798\n if (globalState.computationDepth > 0 && hasObservers$$1)\n fail(getMessage(\"m031\") + atom.name);\n // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n if (!globalState.allowStateChanges && hasObservers$$1)\n fail(getMessage(globalState.strictMode ? \"m030a\" : \"m030b\") + atom.name);\n}\n/**\n * Executes the provided function `f` and tracks which observables are being accessed.\n * The tracking information is stored on the `derivation` object and the derivation is registered\n * as observer of any of the accessed observables.\n */\nfunction trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}\n/**\n * diffs newObserving with observing.\n * update observing to be newObserving with unique observables\n * notify observers that become observed/unobserved\n */\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing;\n var observing = derivation.observing = derivation.newObserving;\n var lowestNewObservingDerivationState = IDerivationState.UP_TO_DATE;\n derivation.newObserving = null; // newObserving shouldn't be needed outside tracking\n // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurence, change to 1 and keep it\n // 1: extra occurence, drop it\n var i0 = 0, l = derivation.unboundDepsCount;\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n if (dep.diffValue === 0) {\n dep.diffValue = 1;\n if (i0 !== i)\n observing[i0] = dep;\n i0++;\n }\n // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n if (dep.dependenciesState > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState;\n }\n }\n observing.length = i0;\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n l = prevObserving.length;\n while (l--) {\n var dep = prevObserving[l];\n if (dep.diffValue === 0) {\n removeObserver(dep, derivation);\n }\n dep.diffValue = 0;\n }\n // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n while (i0--) {\n var dep = observing[i0];\n if (dep.diffValue === 1) {\n dep.diffValue = 0;\n addObserver(dep, derivation);\n }\n }\n // Some new observed derivations might become stale during this derivation computation\n // so say had no chance to propagate staleness (#916)\n if (lowestNewObservingDerivationState !== IDerivationState.UP_TO_DATE) {\n derivation.dependenciesState = lowestNewObservingDerivationState;\n derivation.onBecomeStale();\n }\n}\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing;\n derivation.observing = [];\n var i = obs.length;\n while (i--)\n removeObserver(obs[i], derivation);\n derivation.dependenciesState = IDerivationState.NOT_TRACKING;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n var res = action();\n untrackedEnd(prev);\n return res;\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\n/**\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\n *\n */\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState === IDerivationState.UP_TO_DATE)\n return;\n derivation.dependenciesState = IDerivationState.UP_TO_DATE;\n var obs = derivation.observing;\n var i = obs.length;\n while (i--)\n obs[i].lowestObserverState = IDerivationState.UP_TO_DATE;\n}\n\nvar Reaction = (function () {\n function Reaction(name, onInvalidate) {\n if (name === void 0) { name = \"Reaction@\" + getNextId(); }\n this.name = name;\n this.onInvalidate = onInvalidate;\n this.observing = []; // nodes we are looking at. Our value depends on these nodes\n this.newObserving = [];\n this.dependenciesState = IDerivationState.NOT_TRACKING;\n this.diffValue = 0;\n this.runId = 0;\n this.unboundDepsCount = 0;\n this.__mapid = \"#\" + getNextId();\n this.isDisposed = false;\n this._isScheduled = false;\n this._isTrackPending = false;\n this._isRunning = false;\n }\n Reaction.prototype.onBecomeStale = function () {\n this.schedule();\n };\n Reaction.prototype.schedule = function () {\n if (!this._isScheduled) {\n this._isScheduled = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n Reaction.prototype.isScheduled = function () {\n return this._isScheduled;\n };\n /**\n * internal, use schedule() if you intend to kick off a reaction\n */\n Reaction.prototype.runReaction = function () {\n if (!this.isDisposed) {\n startBatch();\n this._isScheduled = false;\n if (shouldCompute(this)) {\n this._isTrackPending = true;\n this.onInvalidate();\n if (this._isTrackPending && isSpyEnabled()) {\n // onInvalidate didn't trigger track right away..\n spyReport({\n object: this,\n type: \"scheduled-reaction\"\n });\n }\n }\n endBatch();\n }\n };\n Reaction.prototype.track = function (fn) {\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n if (notify) {\n startTime = Date.now();\n spyReportStart({\n object: this,\n type: \"reaction\",\n fn: fn\n });\n }\n this._isRunning = true;\n var result = trackDerivedFunction(this, fn, undefined);\n this._isRunning = false;\n this._isTrackPending = false;\n if (this.isDisposed) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n if (isCaughtException(result))\n this.reportExceptionInDerivation(result.cause);\n if (notify) {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n endBatch();\n };\n Reaction.prototype.reportExceptionInDerivation = function (error) {\n var _this = this;\n if (this.errorHandler) {\n this.errorHandler(error, this);\n return;\n }\n var message = \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this;\n var messageToUser = getMessage(\"m037\");\n console.error(message || messageToUser /* latter will not be true, make sure uglify doesn't remove */, error);\n /** If debugging brough you here, please, read the above message :-). Tnx! */\n if (isSpyEnabled()) {\n spyReport({\n type: \"error\",\n message: message,\n error: error,\n object: this\n });\n }\n globalState.globalReactionErrorHandlers.forEach(function (f) { return f(error, _this); });\n };\n Reaction.prototype.dispose = function () {\n if (!this.isDisposed) {\n this.isDisposed = true;\n if (!this._isRunning) {\n startBatch();\n clearObserving(this); // if disposed while running, clean up later. Maybe not optimal, but rare case\n endBatch();\n }\n }\n };\n Reaction.prototype.getDisposer = function () {\n var r = this.dispose.bind(this);\n r.$mobx = this;\n r.onError = registerErrorHandler;\n return r;\n };\n Reaction.prototype.toString = function () {\n return \"Reaction[\" + this.name + \"]\";\n };\n Reaction.prototype.whyRun = function () {\n var observing = unique(this._isRunning ? this.newObserving : this.observing).map(function (dep) { return dep.name; });\n return (\"\\nWhyRun? reaction '\" + this.name + \"':\\n * Status: [\" + (this.isDisposed ? \"stopped\" : this._isRunning ? \"running\" : this.isScheduled() ? \"scheduled\" : \"idle\") + \"]\\n * This reaction will re-run if any of the following observables changes:\\n \" + joinStrings(observing) + \"\\n \" + ((this._isRunning) ? \" (... or any observable accessed during the remainder of the current run)\" : \"\") + \"\\n\\t\" + getMessage(\"m038\") + \"\\n\");\n };\n return Reaction;\n}());\nfunction registerErrorHandler(handler) {\n invariant(this && this.$mobx && isReaction(this.$mobx), \"Invalid `this`\");\n invariant(!this.$mobx.errorHandler, \"Only one onErrorHandler can be registered\");\n this.$mobx.errorHandler = handler;\n}\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n if (idx >= 0)\n globalState.globalReactionErrorHandlers.splice(idx, 1);\n };\n}\n/**\n * Magic number alert!\n * Defines within how many times a reaction is allowed to re-trigger itself\n * until it is assumed that this is gonna be a never ending loop...\n */\nvar MAX_REACTION_ITERATIONS = 100;\nvar reactionScheduler = function (f) { return f(); };\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions)\n return;\n reactionScheduler(runReactionsHelper);\n}\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0;\n // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error(\"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\"\n + (\" Probably there is a cycle in the reactive function: \" + allReactions[0]));\n allReactions.splice(0); // clear reactions\n }\n var remainingReactions = allReactions.splice(0);\n for (var i = 0, l = remainingReactions.length; i < l; i++)\n remainingReactions[i].runReaction();\n }\n globalState.isRunningReactions = false;\n}\nvar isReaction = createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n reactionScheduler = function (f) { return fn(function () { return baseScheduler(f); }); };\n}\n\nfunction asReference(value) {\n deprecated(\"asReference is deprecated, use observable.ref instead\");\n return observable.ref(value);\n}\nfunction asStructure(value) {\n deprecated(\"asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead.\");\n return observable.struct(value);\n}\nfunction asFlat(value) {\n deprecated(\"asFlat is deprecated, use observable.shallow instead\");\n return observable.shallow(value);\n}\nfunction asMap(data) {\n deprecated(\"asMap is deprecated, use observable.map or observable.shallowMap instead\");\n return observable.map(data || {});\n}\n\nfunction createComputedDecorator(compareStructural) {\n return createClassPropertyDecorator(function (target, name, _, __, originalDescriptor) {\n invariant(typeof originalDescriptor !== \"undefined\", getMessage(\"m009\"));\n invariant(typeof originalDescriptor.get === \"function\", getMessage(\"m010\"));\n var adm = asObservableObject(target, \"\");\n defineComputedProperty(adm, name, originalDescriptor.get, originalDescriptor.set, compareStructural, false);\n }, function (name) {\n var observable = this.$mobx.values[name];\n if (observable === undefined)\n return undefined;\n return observable.get();\n }, function (name, value) {\n this.$mobx.values[name].set(value);\n }, false, false);\n}\nvar computedDecorator = createComputedDecorator(false);\nvar computedStructDecorator = createComputedDecorator(true);\n/**\n * Decorator for class properties: @computed get value() { return expr; }.\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\n */\nvar computed = (function computed(arg1, arg2, arg3) {\n if (typeof arg2 === \"string\") {\n return computedDecorator.apply(null, arguments);\n }\n invariant(typeof arg1 === \"function\", getMessage(\"m011\"));\n invariant(arguments.length < 3, getMessage(\"m012\"));\n var opts = typeof arg2 === \"object\" ? arg2 : {};\n opts.setter = typeof arg2 === \"function\" ? arg2 : opts.setter;\n return new ComputedValue(arg1, opts.context, opts.compareStructural || opts.struct || false, opts.name || arg1.name || \"\", opts.setter);\n});\ncomputed.struct = computedStructDecorator;\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n invariant(property === undefined, getMessage(\"m036\"));\n return thing.$mobx.atom;\n }\n if (isObservableMap(thing)) {\n var anyThing = thing;\n if (property === undefined)\n return getAtom(anyThing._keys);\n var observable = anyThing._data[property] || anyThing._hasMap[property];\n invariant(!!observable, \"the entry '\" + property + \"' does not exist in the observable map '\" + getDebugName(thing) + \"'\");\n return observable;\n }\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n runLazyInitializers(thing);\n if (isObservableObject(thing)) {\n if (!property)\n return fail(\"please specify a property\");\n var observable = thing.$mobx.values[property];\n invariant(!!observable, \"no observable property '\" + property + \"' found on the observable object '\" + getDebugName(thing) + \"'\");\n return observable;\n }\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n }\n else if (typeof thing === \"function\") {\n if (isReaction(thing.$mobx)) {\n // disposer function\n return thing.$mobx;\n }\n }\n return fail(\"Cannot obtain atom from \" + thing);\n}\nfunction getAdministration(thing, property) {\n invariant(thing, \"Expecting some object\");\n if (property !== undefined)\n return getAdministration(getAtom(thing, property));\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing))\n return thing;\n if (isObservableMap(thing))\n return thing;\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n runLazyInitializers(thing);\n if (thing.$mobx)\n return thing.$mobx;\n invariant(false, \"Cannot obtain administration from \" + thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n if (property !== undefined)\n named = getAtom(thing, property);\n else if (isObservableObject(thing) || isObservableMap(thing))\n named = getAdministration(thing);\n else\n named = getAtom(thing); // valid for arrays as well\n return named.name;\n}\n\nfunction isComputed(value, property) {\n if (value === null || value === undefined)\n return false;\n if (property !== undefined) {\n if (isObservableObject(value) === false)\n return false;\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n }\n return isComputedValue(value);\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (typeof cbOrFire === \"function\")\n return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);\n else\n return observeObservable(thing, propOrCb, cbOrFire);\n}\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe(listener, fireImmediately);\n}\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe(listener, fireImmediately);\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (typeof handler === \"function\")\n return interceptProperty(thing, propOrHandler, handler);\n else\n return interceptInterceptable(thing, propOrHandler);\n}\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept(handler);\n}\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept(handler);\n}\n\n/**\n * expr can be used to create temporarily views inside views.\n * This can be improved to improve performance if a value changes often, but usually doesn't affect the outcome of an expression.\n *\n * In the following example the expression prevents that a component is rerender _each time_ the selection changes;\n * instead it will only rerenders when the current todo is (de)selected.\n *\n * reactiveComponent((props) => {\n * const todo = props.todo;\n * const isSelected = mobx.expr(() => props.viewState.selection === todo);\n * return
{todo.title}
\n * });\n *\n */\nfunction expr(expr, scope) {\n if (!isComputingDerivation())\n console.warn(getMessage(\"m013\"));\n // optimization: would be more efficient if the expr itself wouldn't be evaluated first on the next change, but just a 'changed' signal would be fired\n return computed(expr, { context: scope }).get();\n}\n\n// internal overload\nfunction toJS(source, detectCycles, __alreadySeen) {\n if (detectCycles === void 0) { detectCycles = true; }\n if (__alreadySeen === void 0) { __alreadySeen = []; }\n // optimization: using ES6 map would be more efficient!\n // optimization: lift this function outside toJS, this makes recursion expensive\n function cache(value) {\n if (detectCycles)\n __alreadySeen.push([source, value]);\n return value;\n }\n if (isObservable(source)) {\n if (detectCycles && __alreadySeen === null)\n __alreadySeen = [];\n if (detectCycles && source !== null && typeof source === \"object\") {\n for (var i = 0, l = __alreadySeen.length; i < l; i++)\n if (__alreadySeen[i][0] === source)\n return __alreadySeen[i][1];\n }\n if (isObservableArray(source)) {\n var res = cache([]);\n var toAdd = source.map(function (value) { return toJS(value, detectCycles, __alreadySeen); });\n res.length = toAdd.length;\n for (var i = 0, l = toAdd.length; i < l; i++)\n res[i] = toAdd[i];\n return res;\n }\n if (isObservableObject(source)) {\n var res = cache({});\n for (var key in source)\n res[key] = toJS(source[key], detectCycles, __alreadySeen);\n return res;\n }\n if (isObservableMap(source)) {\n var res_1 = cache({});\n source.forEach(function (value, key) { return res_1[key] = toJS(value, detectCycles, __alreadySeen); });\n return res_1;\n }\n if (isObservableValue(source))\n return toJS(source.get(), detectCycles, __alreadySeen);\n }\n return source;\n}\n\nfunction createTransformer(transformer, onCleanup) {\n invariant(typeof transformer === \"function\" && transformer.length < 2, \"createTransformer expects a function that accepts one argument\");\n // Memoizes: object id -> reactive view that applies transformer to the object\n var objectCache = {};\n // If the resetId changes, we will clear the object cache, see #163\n // This construction is used to avoid leaking refs to the objectCache directly\n var resetId = globalState.resetId;\n // Local transformer class specifically for this transformer\n var Transformer = (function (_super) {\n __extends(Transformer, _super);\n function Transformer(sourceIdentifier, sourceObject) {\n var _this = _super.call(this, function () { return transformer(sourceObject); }, undefined, false, \"Transformer-\" + transformer.name + \"-\" + sourceIdentifier, undefined) || this;\n _this.sourceIdentifier = sourceIdentifier;\n _this.sourceObject = sourceObject;\n return _this;\n }\n Transformer.prototype.onBecomeUnobserved = function () {\n var lastValue = this.value;\n _super.prototype.onBecomeUnobserved.call(this);\n delete objectCache[this.sourceIdentifier];\n if (onCleanup)\n onCleanup(lastValue, this.sourceObject);\n };\n return Transformer;\n }(ComputedValue));\n return function (object) {\n if (resetId !== globalState.resetId) {\n objectCache = {};\n resetId = globalState.resetId;\n }\n var identifier = getMemoizationId(object);\n var reactiveTransformer = objectCache[identifier];\n if (reactiveTransformer)\n return reactiveTransformer.get();\n // Not in cache; create a reactive view\n reactiveTransformer = objectCache[identifier] = new Transformer(identifier, object);\n return reactiveTransformer.get();\n };\n}\nfunction getMemoizationId(object) {\n if (typeof object === 'string' || typeof object === 'number')\n return object;\n if (object === null || typeof object !== \"object\")\n throw new Error(\"[mobx] transform expected some kind of object or primitive value, got: \" + object);\n var tid = object.$transformId;\n if (tid === undefined) {\n tid = getNextId();\n addHiddenProp(object, \"$transformId\", tid);\n }\n return tid;\n}\n\nfunction log(msg) {\n console.log(msg);\n return msg;\n}\nfunction whyRun(thing, prop) {\n switch (arguments.length) {\n case 0:\n thing = globalState.trackingDerivation;\n if (!thing)\n return log(getMessage(\"m024\"));\n break;\n case 2:\n thing = getAtom(thing, prop);\n break;\n }\n thing = getAtom(thing);\n if (isComputedValue(thing))\n return log(thing.whyRun());\n else if (isReaction(thing))\n return log(thing.whyRun());\n return fail(getMessage(\"m025\"));\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name\n };\n if (node.observing && node.observing.length > 0)\n result.dependencies = unique(node.observing).map(nodeToDependencyTree);\n return result;\n}\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name\n };\n if (hasObservers(node))\n result.observers = getObservers(node).map(nodeToObserverTree);\n return result;\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n }\n else if (isObservableObject(thing)) {\n if (typeof propOrHandler !== \"string\")\n return fail(\"InterceptReads can only be used with a specific property, not with an object in general\");\n target = getAdministration(thing, propOrHandler);\n }\n else {\n return fail(\"Expected observable map, object or array as first array\");\n }\n if (target.dehancer !== undefined)\n return fail(\"An intercept reader was already established\");\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\n/**\n * (c) Michel Weststrate 2015 - 2016\n * MIT Licensed\n *\n * Welcome to the mobx sources! To get an global overview of how MobX internally works,\n * this is a good place to start:\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\n *\n * Source folders:\n * ===============\n *\n * - api/ Most of the public static methods exposed by the module can be found here.\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\n * - utils/ Utility stuff.\n *\n */\nvar extras = {\n allowStateChanges: allowStateChanges,\n deepEqual: deepEqual,\n getAtom: getAtom,\n getDebugName: getDebugName,\n getDependencyTree: getDependencyTree,\n getAdministration: getAdministration,\n getGlobalState: getGlobalState,\n getObserverTree: getObserverTree,\n interceptReads: interceptReads,\n isComputingDerivation: isComputingDerivation,\n isSpyEnabled: isSpyEnabled,\n onReactionError: onReactionError,\n reserveArrayBuffer: reserveArrayBuffer,\n resetGlobalState: resetGlobalState,\n shareGlobalState: shareGlobalState,\n spyReport: spyReport,\n spyReportEnd: spyReportEnd,\n spyReportStart: spyReportStart,\n setReactionScheduler: setReactionScheduler\n};\nvar everything = {\n Reaction: Reaction,\n untracked: untracked,\n Atom: Atom, BaseAtom: BaseAtom,\n useStrict: useStrict, isStrictModeEnabled: isStrictModeEnabled,\n spy: spy,\n asReference: asReference, asFlat: asFlat, asStructure: asStructure, asMap: asMap,\n isModifierDescriptor: isModifierDescriptor,\n isObservableObject: isObservableObject,\n isBoxedObservable: isObservableValue,\n isObservableArray: isObservableArray,\n ObservableMap: ObservableMap, isObservableMap: isObservableMap, map: map,\n transaction: transaction,\n observable: observable,\n computed: computed,\n isObservable: isObservable,\n isComputed: isComputed,\n extendObservable: extendObservable, extendShallowObservable: extendShallowObservable,\n observe: observe,\n intercept: intercept,\n autorun: autorun, autorunAsync: autorunAsync, when: when, reaction: reaction,\n action: action, isAction: isAction, runInAction: runInAction,\n expr: expr,\n toJS: toJS,\n createTransformer: createTransformer,\n whyRun: whyRun,\n isArrayLike: isArrayLike,\n extras: extras,\n};\nvar warnedAboutDefaultExport = false;\nvar _loop_1 = function (p) {\n var val = everything[p];\n Object.defineProperty(everything, p, {\n get: function () {\n if (!warnedAboutDefaultExport) {\n warnedAboutDefaultExport = true;\n console.warn('Using default export (`import mobx from \\'mobx\\'`) is deprecated ' +\n 'and won’t work in mobx@4.0.0\\n' +\n 'Use `import * as mobx from \\'mobx\\'` instead');\n }\n return val;\n }\n });\n};\nfor (var p in everything) {\n _loop_1(p);\n}\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({ spy: spy, extras: extras });\n}\n\nexport { extras, Reaction, untracked, IDerivationState, Atom, BaseAtom, useStrict, isStrictModeEnabled, spy, asReference, asFlat, asStructure, asMap, isModifierDescriptor, isObservableObject, isObservableValue as isBoxedObservable, isObservableArray, ObservableMap, isObservableMap, map, transaction, observable, IObservableFactories, computed, isObservable, isComputed, extendObservable, extendShallowObservable, observe, intercept, autorun, autorunAsync, when, reaction, action, isAction, runInAction, expr, toJS, createTransformer, whyRun, isArrayLike };export default everything;\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)(\"object\"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p=\"\",t(0)}([function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function i(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function a(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,\"__esModule\",{value:!0});var u=function(){function e(e,t){for(var n=0;n1)for(var n=1;n1?t-1:0),r=1;r2?n-2:0),o=2;o1){for(var E=Array(b),N=0;N1){for(var b=Array(g),E=0;E1?t-1:0),r=1;r2?n-2:0),i=2;i.\")}return t}function a(e,n){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=h.uniqueKey||(h.uniqueKey={}),o=i(n);if(!r[o]){r[o]=!0;var a=\"\";e&&e._owner&&e._owner!==s.current&&(a=\" It was passed a child from \"+e._owner.getName()+\".\"),\"production\"!==t.env.NODE_ENV?v(!1,'Each child in an array or iterator should have a unique \"key\" prop.%s%s See https://fb.me/react-warning-keys for more information.%s',o,a,l.getCurrentStackAddendum(e)):void 0}}}function u(e,t){if(\"object\"==typeof e)if(Array.isArray(e))for(var n=0;n1?u-1:0),l=1;l>\",R={array:f(\"array\"),bool:f(\"boolean\"),func:f(\"function\"),number:f(\"number\"),object:f(\"object\"),string:f(\"string\"),symbol:f(\"symbol\"),any:d(),arrayOf:y,element:v(),instanceOf:m,node:E(),objectOf:g,oneOf:h,oneOfType:b,shape:N};return l.prototype=Error.prototype,R.checkPropTypes=u,R.PropTypes=R,R}}).call(t,n(1))},function(e,t){\"use strict\";function n(e){var t=/[=:]/g,n={\"=\":\"=0\",\":\":\"=2\"},r=(\"\"+e).replace(t,function(e){return n[e]});return\"$\"+r}function r(e){var t=/(=0|=2)/g,n={\"=0\":\"=\",\"=2\":\":\"},r=\".\"===e[0]&&\"$\"===e[1]?e.substring(2):e.substring(1);return(\"\"+r).replace(t,function(e){return n[e]})}var o={escape:n,unescape:r};e.exports=o},function(e,t,n){(function(t){\"use strict\";var r=n(5),o=n(2),i=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},u=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},c=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},s=function(e){var n=this;e instanceof n?void 0:\"production\"!==t.env.NODE_ENV?o(!1,\"Trying to release an instance into a pool of a different type.\"):r(\"25\"),e.destructor(),n.instancePool.lengthP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;h {\r\n const device = dev[id]\r\n\r\n if (isNotSafe(this.deviceTypesJSON[device.deviceTypeId])) {\r\n this.deviceTypes.push({ value: device.deviceTypeId, text: device.deviceType })\r\n this.deviceTypesJSON[device.deviceTypeId] = device.deviceType\r\n }\r\n\r\n if (isSafe(this.devicesJSON[device.deviceTypeId])) {\r\n this.devicesJSON[device.deviceTypeId].push({ value: device.id, text: `${device.name} | ${device.description}`, name: device.name })\r\n } else {\r\n this.devicesJSON[device.deviceTypeId] = []\r\n this.devicesJSON[device.deviceTypeId].push({ value: -1, text: `--${Translator.SELECT}--` })\r\n this.devicesJSON[device.deviceTypeId].push({ value: device.id, text: `${device.name} | ${device.description}`, name: device.name })\r\n }\r\n\r\n this.devicesTextJSON[device.id] = `${device.name}|${device.description}`\r\n })\r\n\r\n this.eventLevels.push({ value: -1, text: `--${Translator.SELECT}--` })\r\n this.eventLevelsJSON[-1] = `--${Translator.SELECT}--`\r\n\r\n Object.keys(Enums.Events).forEach(evt => {\r\n if (isNotSafe(this.eventLevelsJSON[Enums.Events[evt].level])) {\r\n this.eventLevels.push({ value: Enums.Events[evt].level, text: Enums.Events[evt].eventType })\r\n this.eventLevelsJSON[Enums.Events[evt].level] = Enums.Events[evt].eventType\r\n }\r\n })\r\n\r\n this.eventTypesTextJSON[''] = `--${Translator.SELECT}--`\r\n\r\n const evt = MetaDataStore.metaData.eventTypes\r\n Object.keys(evt).map(id => {\r\n const event = evt[id]\r\n\r\n if (isSafe(this.eventTypesJSON[event.level])) {\r\n this.eventTypesJSON[event.level].push({ value: event.name, text: `${event.name} | ${event.description}` })\r\n } else {\r\n this.eventTypesJSON[event.level] = []\r\n this.eventTypesJSON[event.level].push({ value: '', text: `--${Translator.SELECT}--` })\r\n this.eventTypesJSON[event.level].push({ value: event.name, text: `${event.name} | ${event.description}` })\r\n }\r\n\r\n this.eventTypesTextJSON[event.name] = `${event.name} | ${event.description}`\r\n })\r\n\r\n }\r\n\r\n\r\n render() {\r\n const state = AddTaskFormStore.formState\r\n\r\n const isOpen = state.isOpen\r\n\r\n this.solvers = []\r\n this.solversJSON = {}\r\n\r\n this.solvers.push({ value: '', text: `--${Translator.SELECT}--` })\r\n this.solversJSON[''] = { name: `--${Translator.SELECT}--` }\r\n\r\n const users = MetaDataStore.metaData.users\r\n Object.keys(MetaDataStore.metaData.users).forEach(key => {\r\n const user = users[key]\r\n const canSolveTasks = user.actions.some(a => a === 'TASK')\r\n // console.log(canSolveTasks, user)\r\n if (/*canSolveTasks && */ isSafe(user.login)) {\r\n this.solvers.push({ value: user.login, text: user.name, image: { src: ConnectionStore.getL1Url('/img/user_20x20.png') } })\r\n this.solversJSON[user.login] = { name: user.name, canSolveTasks }\r\n }\r\n })\r\n\r\n Object.keys(DataStore.userSettings.userGroups).forEach(key => {\r\n this.solvers.push({ value: `#${key}`, text: key, image: { src: ConnectionStore.getL1Url('/img/user_group_20x20.png') } })\r\n this.solversJSON[`#${key}`] = { name: key }\r\n })\r\n\r\n let template = undefined\r\n if (state.type === 1) {\r\n template =
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n AddTaskFormStore.setFormState({ schedulingPeriod: values.value, schedulingNumber: 1 })}\r\n />\r\n \r\n
\r\n
\r\n (state.schedulingPeriod === \"DAY\") ||\r\n (state.schedulingPeriod === \"WORKDAY\") ||\r\n (state.schedulingPeriod === \"WEEKEND\") ||\r\n (state.schedulingPeriod === \"WEEK\" && value >= 1 && value <= 7) ||\r\n (state.schedulingPeriod === \"MONTH\" && value >= 1 && value <= 31) ||\r\n (state.schedulingPeriod === \"YEAR\" && value >= 1 && value <= 365)}\r\n value={state.schedulingNumber}\r\n emptyErrorText={Translator.EMPTYMESSAGEFORMAT.replace('{0}', Translator.PERIODICITY)}\r\n formatErrorText={Translator.INVALIDMESSAGEFORMAT.replace('{0}', Translator.PERIODICITY)}\r\n errorText={Translator.SCHEDULEPERIODINVALID}\r\n onChange={(value) => AddTaskFormStore.setFormState({ schedulingNumber: value })} />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n AddTaskFormStore.schedulingFrom = value}\r\n onChange={(value, isError) => {\r\n AddTaskFormStore.setFormState({ schedulingFrom: value, schedulingFromError: isError })\r\n }}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n AddTaskFormStore.setFormState({ schedulingTime: value })} />\r\n
\r\n
\r\n
\r\n
\r\n \r\n AddTaskFormStore.schedulingTo = value}\r\n onChange={(value, isError) => {\r\n AddTaskFormStore.setFormState({ schedulingTo: value, schedulingToError: isError })\r\n }}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n } else if (state.type === 2 || state.isOpenedFromGrid) {\r\n template = \r\n } else {\r\n template = undefined\r\n }\r\n\r\n let radioButtons = undefined\r\n let eventButtons = undefined\r\n if (state.radioFlag) {\r\n if (state.type === 1) {\r\n radioButtons =
\r\n
\r\n AddTaskFormStore.setFormState({ type: 1 })} />\r\n
\r\n
\r\n } else {\r\n radioButtons =
\r\n
\r\n AddTaskFormStore.setFormState({ type: 2 })} />\r\n
\r\n
\r\n }\r\n eventButtons =
\r\n template.ID === state.id) ||\r\n !isNotEmpty(state.name) ||\r\n state.urgency === -1 ||\r\n !isNotEmpty(state.description) ||\r\n //!isNotEmpty(state.solver) ||\r\n !state.selectedSolvers.some(x => x.canSolveTasks) ||\r\n state.type === 1 && (state.schedulingFromError || state.schedulingToError) ||\r\n state.type === 2 && (state.deviceType === -1 || state.eventLevel === -1)}\r\n isError={() => state.type === 1 && state.schedulingFrom > state.schedulingTo}\r\n errorText={Translator.FROMVTO}\r\n className='icon medium'\r\n imageUri={ConnectionStore.getL1Url('/img/save_24x24.png')}\r\n text={Translator.SAVETEMPLATE}\r\n onClick={() => UIStore.openConfirmationDialog('lxSaveTaskTemplate')} />\r\n AddTaskFormStore.saveTaskTemplate()} />\r\n template.ID === state.id)}\r\n className='icon medium'\r\n imageUri={ConnectionStore.getL1Url('/img/templates_24x24.png')}\r\n text={Translator.DUPLICATETEMPLATE}\r\n onClick={() => AddTaskFormStore.open({ id: state.id, isDuplicateFlag: true })} />\r\n
\r\n } else {\r\n radioButtons =
\r\n
\r\n AddTaskFormStore.setFormState({ type: 0 })} />\r\n
\r\n
\r\n AddTaskFormStore.setFormState({ type: 1 })} />\r\n
\r\n
\r\n AddTaskFormStore.setFormState({ type: 2 })} />\r\n
\r\n
\r\n eventButtons =
\r\n x.canSolveTasks) ||\r\n state.type === 1 && (state.schedulingFromError || state.schedulingToError) ||\r\n state.type === 2 && (state.deviceType === -1 || state.eventLevel === -1)}\r\n isError={() => state.type === 1 && state.schedulingFrom > state.schedulingTo}\r\n errorText={Translator.FROMVTO}\r\n text={state.type === 0 ? Translator.SAVETASK : Translator.SAVETEMPLATE}\r\n onClick={() => UIStore.openConfirmationDialog('lxSaveTask')} />\r\n AddTaskFormStore.saveTaskTemplate()} />\r\n
\r\n }\r\n\r\n // console.log(state.solver)\r\n\r\n return (\r\n AddTaskFormStore.close()}\r\n closeIcon='close'\r\n className={state.isOpenedFromGrid ? 'lx-addTask-fromGrid-modal' : 'lx-addTask-modal'}\r\n >\r\n {state.type === 0 ? Translator.NEWTASK : (state.id > 0 ? Translator.TEMPLATE : Translator.NEWTEMPLATE)} {state.id === 0 ? '' : `: ${state.id}`}\r\n \r\n
\r\n {radioButtons}\r\n\r\n {template}\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n AddTaskFormStore.setFormState({ solver: values.value })}\r\n />\r\n \r\n {!isEmpty(state.solver) &&\r\n state.type === 1 && state.schedulingFrom > state.schedulingTo}\r\n //errorText={Translator.FROMVTO}\r\n // text={'Pridat'}\r\n onClick={() => {\r\n if (!state.selectedSolvers.some(x => x.login === state.solver))\r\n if (!state.solver.startsWith('#')) {\r\n const { name, canSolveTasks } = this.solversJSON[state.solver]\r\n AddTaskFormStore.setFormState({\r\n selectedSolvers: state.selectedSolvers.concat([{\r\n login: state.solver,\r\n name,\r\n canSolveTasks\r\n }])\r\n })\r\n } else {\r\n const group = DataStore.userSettings.userGroups[state.solver.replace('#', '')]\r\n if (isSafe(group)) {\r\n let selectedSolvers = state.selectedSolvers\r\n group.forEach(x => {\r\n if (!selectedSolvers.some(s => s.login === x)) {\r\n const { name, canSolveTasks } = this.solversJSON[x]\r\n selectedSolvers.push({\r\n login: x,\r\n name,\r\n canSolveTasks\r\n })\r\n }\r\n })\r\n }\r\n }\r\n }}\r\n //onClick={() => UIStore.openConfirmationDialog('lxSaveTask')}\r\n />} content={Translator.ADD} />}\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n state.selectedSolvers.length > 0 ?\r\n state.selectedSolvers.map(ss => {\r\n const color = ss.canSolveTasks ? 'black' : 'red'\r\n const solverJSX = \r\n {ss.name}\r\n {\r\n const selectedSolvers = state.selectedSolvers.filter(x => x.login !== ss.login)\r\n AddTaskFormStore.setFormState({ selectedSolvers })\r\n }}\r\n />\r\n \r\n return ss.canSolveTasks ? solverJSX : {solverJSX}}\r\n content={Translator.CANTSOLVETASKS} />\r\n })\r\n : \r\n }\r\n {/* TEST\r\n \r\n TEST2 */}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n AddTaskFormStore.setFormState({ termPeriod: values.value })}\r\n />\r\n \r\n
\r\n
\r\n AddTaskFormStore.setFormState({ termNumber: value })} />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n AddTaskFormStore.setFormState({ urgency: values.value })}\r\n />\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n AddTaskFormStore.setFormState({ name: value })}\r\n focus />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n AddTaskFormStore.handleInputChange(event, target)} />\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n AddTaskFormStore.setFormState({ hyperlink: value })} />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {\r\n // console.log(files)\r\n files.forEach(file => state.attachments.set(file.name, { size: file.size, color: 'blue', data: file.base64.split(';base64,')[1] }))\r\n }} />\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n \r\n
\r\n {\r\n state.attachments.keys().length > 0 ?\r\n state.attachments.keys().map(att => {\r\n const color = state.attachments.get(att).color\r\n const attJSX = \r\n
\r\n {att}\r\n {\r\n state.attachments.delete(att)\r\n }}\r\n />\r\n
\r\n
\r\n return {attJSX}}\r\n content={state.attachments.get(att).size} />\r\n })\r\n : \r\n }\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n\r\n {eventButtons}\r\n\r\n
\r\n
\r\n \r\n )\r\n }\r\n}\r\n","\"use strict\"\r\n\r\nimport React from 'react'\r\nimport { observer } from 'mobx-react'\r\nimport { Modal, Menu, Dropdown, Label, Form } from 'semantic-ui-react'\r\n\r\nimport TrackingFormStore from '../../../stores/forms/TrackingFormStore'\r\nimport UIStore from '../../../stores/UIStore'\r\nimport ConnectionStore from '../../../stores/ConnectionStore'\r\nimport Translator from '../../../i18n/translator'\r\n\r\nimport { LxButton } from '../../../globals/ui/LxButton'\r\nimport { LxInput } from '../../../globals/ui/LxInput'\r\nimport { LxTextArea } from '../../../globals/ui/LxTextArea'\r\nimport { LxConfirmationDialog } from '../../../globals/ui/LxDialog'\r\n\r\nconst TrackSignalModal = observer(() => {\r\n const state = TrackingFormStore.formState;\r\n\r\n const isOpen = state.isOpen\r\n && !UIStore.isSelectedScreen\r\n && isSafe(UIStore.selectedComponent)\r\n && isSafe(UIStore.selectedComponent.device)\r\n\r\n const error = isEmpty(state.error)\r\n ? undefined\r\n :
{state.error}
;\r\n\r\n const device = isOpen ? UIStore.selectedComponent.device : null;\r\n\r\n let signals = [];\r\n state.signals.map(x => {\r\n /*const dropdownClassName = isNotEmpty(x.trackingRule) ? \"trackSignal-tracked\" : undefined\r\n signals.push(\r\n TrackingFormStore.setFormState({\r\n selectedSignalId: x.signalId,\r\n selectedSignalName: x.signalName,\r\n selectedSignalValue: x.signalValueText,\r\n trackingRule: x.trackingRule\r\n })} />\r\n )*/\r\n signals.push(\r\n {\r\n value: JSON.stringify(x),\r\n text: x.signalValueText\r\n }\r\n )\r\n });\r\n\r\n return (\r\n TrackingFormStore.close()}\r\n closeIcon='close'\r\n size='tiny'\r\n className=\"trackSignal-modal\"\r\n >\r\n {Translator.THRESHOLD}\r\n \r\n
\r\n
\r\n {error}\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n {isSafe(device) ? device.name : ''}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {\r\n const valueObj = JSON.parse(values.value)\r\n TrackingFormStore.setFormState({\r\n selectedSignalId: valueObj.signalId,\r\n selectedSignalName: valueObj.signalName,\r\n selectedSignalValue: valueObj.signalValueText,\r\n trackingRule: valueObj.trackingRule,\r\n emails: valueObj.emails,\r\n message: valueObj.message,\r\n canDelete: isNotEmpty(valueObj.trackingRule)\r\n })\r\n }}\r\n />\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n return isEmpty(value) || TrackingFormStore.ParseRule(value)\r\n }}\r\n errorText={Translator.THRESHOLDINVALID\r\n .replace(\"'{0}'\", '')\r\n .replace('{1}', state.selectedSignalName)}\r\n onChange={(value) => TrackingFormStore.setFormState({ trackingRule: value })}\r\n onValidate={(isError) => TrackingFormStore.setFormState({ trackingRuleError: isError })}\r\n focus\r\n />\r\n
\r\n
\r\n
\r\n {/*!ConnectionStore.isPortalMode() &&*/
\r\n
\r\n
\r\n \r\n TrackingFormStore.setFormState({ emails: value })}\r\n />\r\n
\r\n
\r\n
}\r\n {/*!ConnectionStore.isPortalMode() &&*/
\r\n
\r\n \r\n
\r\n\r\n TrackingFormStore.handleInputChange(event, target)} \r\n onChange={(value) => TrackingFormStore.setFormState({ message: value })}\r\n regEx={/^((([^{}]*(\\{value\\}|\\{logsignal\\})[^{}]*))+|([^{}]*))$/}\r\n />\r\n \r\n
\r\n
}\r\n
\r\n
\r\n {\r\n (/*!ConnectionStore.isPortalMode()\r\n &&*/ isNotEmpty(state.emails)\r\n && isNotEmpty(state.message)\r\n && isNotEmpty(state.trackingRule)) ?\r\n TrackingFormStore.onSave(device, true)}\r\n />\r\n : TrackingFormStore.onSave(device, false)}\r\n />\r\n }\r\n TrackingFormStore.setFormState({ isFindingsOpen: true })}\r\n />\r\n TrackingFormStore.setFormState({ isSettingsOpen: true })}\r\n />\r\n UIStore.openConfirmationDialog('lxDeleteUserThreshold')}\r\n />\r\n TrackingFormStore.onDelete(state.selectedSignalName)} />\r\n
\r\n
\r\n
\r\n \r\n )\r\n})\r\n\r\nexport default TrackSignalModal\r\n","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e(require(\"react\"),require(\"react-dom\")):\"function\"==typeof define&&define.amd?define([\"react\",\"react-dom\"],e):\"object\"==typeof exports?exports.ReactDraggable=e(require(\"react\"),require(\"react-dom\")):t.ReactDraggable=e(t.React,t.ReactDOM)}(window,function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"\",n(n.s=9)}([function(t,e,n){t.exports=n(11)()},function(t,e,n){\"use strict\";function r(t,e){for(var n=0,r=t.length;n0&&void 0!==arguments[0]?arguments[0]:\"transform\";if(\"undefined\"==typeof window||void 0===window.document)return\"\";var e=window.document.documentElement.style;if(t in e)return\"\";for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{})}},function(t,e,n){\"use strict\";n.d(e,\"e\",function(){return c}),n.d(e,\"g\",function(){return u}),n.d(e,\"a\",function(){return s}),n.d(e,\"b\",function(){return l}),n.d(e,\"f\",function(){return f}),n.d(e,\"c\",function(){return p}),n.d(e,\"d\",function(){return d});var r=n(1),o=n(6),a=n.n(o),i=n(2);function c(t,e,n){if(!t.props.bounds)return[e,n];var o=t.props.bounds;o=\"string\"==typeof o?o:function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}(o);var a=g(t);if(\"string\"==typeof o){var c,u=a.ownerDocument,s=u.defaultView;if(!((c=\"parent\"===o?a.parentNode:u.querySelector(o))instanceof s.HTMLElement))throw new Error('Bounds selector \"'+o+'\" could not find an element.');var l=s.getComputedStyle(a),f=s.getComputedStyle(c);o={left:-a.offsetLeft+Object(r.c)(f.paddingLeft)+Object(r.c)(l.marginLeft),top:-a.offsetTop+Object(r.c)(f.paddingTop)+Object(r.c)(l.marginTop),right:Object(i.h)(c)-Object(i.l)(a)-a.offsetLeft+Object(r.c)(f.paddingRight)-Object(r.c)(l.marginRight),bottom:Object(i.g)(c)-Object(i.k)(a)-a.offsetTop+Object(r.c)(f.paddingBottom)-Object(r.c)(l.marginBottom)}}return Object(r.e)(o.right)&&(e=Math.min(e,o.right)),Object(r.e)(o.bottom)&&(n=Math.min(n,o.bottom)),Object(r.e)(o.left)&&(e=Math.max(e,o.left)),Object(r.e)(o.top)&&(n=Math.max(n,o.top)),[e,n]}function u(t,e,n){return[Math.round(e/t[0])*t[0],Math.round(n/t[1])*t[1]]}function s(t){return\"both\"===t.props.axis||\"x\"===t.props.axis}function l(t){return\"both\"===t.props.axis||\"y\"===t.props.axis}function f(t,e,n){var r=\"number\"==typeof e?Object(i.e)(t,e):null;if(\"number\"==typeof e&&!r)return null;var o=g(n),a=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return Object(i.j)(r||t,a)}function p(t,e,n){var o=t.state,a=!Object(r.e)(o.lastX),i=g(t);return a?{node:i,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:i,deltaX:e-o.lastX,deltaY:n-o.lastY,lastX:o.lastX,lastY:o.lastY,x:e,y:n}}function d(t,e){var n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}}function g(t){var e=a.a.findDOMNode(t);if(!e)throw new Error(\": Unmounted during event!\");return e}},function(t,e,n){\"use strict\";function r(){}n.d(e,\"a\",function(){return r})},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){\"use strict\";n.r(e),n.d(e,\"default\",function(){return w});var r=n(5),o=n.n(r),a=n(0),i=n.n(a),c=n(6),u=n.n(c),s=n(2),l=n(3),f=n(1),p=n(4);function d(t){return(d=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}()}function b(t,e){for(var n=0;n not mounted on DragStart!\");var r=e.ownerDocument;if(!(n.props.disabled||!(t.target instanceof r.defaultView.Node)||n.props.handle&&!Object(s.i)(t.target,n.props.handle,e)||n.props.cancel&&Object(s.i)(t.target,n.props.cancel,e))){var o=Object(s.f)(t);n.setState({touchIdentifier:o});var a=Object(l.f)(t,o,h(n));if(null!=a){var i=a.x,c=a.y,f=Object(l.c)(h(n),i,c);Object(p.a)(\"DraggableCore: handleDragStart: %j\",f),Object(p.a)(\"calling\",n.props.onStart),!1!==n.props.onStart(t,f)&&(n.props.enableUserSelectHack&&Object(s.b)(r),n.setState({dragging:!0,lastX:i,lastY:c}),Object(s.a)(r,j.move,n.handleDrag),Object(s.a)(r,j.stop,n.handleDragStop))}}}),O(h(n),\"handleDrag\",function(t){\"touchmove\"===t.type&&t.preventDefault();var e=Object(l.f)(t,n.state.touchIdentifier,h(n));if(null!=e){var r=e.x,o=e.y;if(Array.isArray(n.props.grid)){var a=r-n.state.lastX,i=o-n.state.lastY,c=g(Object(l.g)(n.props.grid,a,i),2);if(a=c[0],i=c[1],!a&&!i)return;r=n.state.lastX+a,o=n.state.lastY+i}var u=Object(l.c)(h(n),r,o);if(Object(p.a)(\"DraggableCore: handleDrag: %j\",u),!1!==n.props.onDrag(t,u))n.setState({lastX:r,lastY:o});else try{n.handleDragStop(new MouseEvent(\"mouseup\"))}catch(t){var s=document.createEvent(\"MouseEvents\");s.initMouseEvent(\"mouseup\",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(s)}}}),O(h(n),\"handleDragStop\",function(t){if(n.state.dragging){var e=Object(l.f)(t,n.state.touchIdentifier,h(n));if(null!=e){var r=e.x,o=e.y,a=Object(l.c)(h(n),r,o),i=u.a.findDOMNode(h(n));i&&n.props.enableUserSelectHack&&Object(s.n)(i.ownerDocument),Object(p.a)(\"DraggableCore: handleDragStop: %j\",a),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),n.props.onStop(t,a),i&&(Object(p.a)(\"DraggableCore: Removing handlers\"),Object(s.m)(i.ownerDocument,j.move,n.handleDrag),Object(s.m)(i.ownerDocument,j.stop,n.handleDragStop))}}}),O(h(n),\"onMouseDown\",function(t){return j=v.mouse,n.handleDragStart(t)}),O(h(n),\"onMouseUp\",function(t){return j=v.mouse,n.handleDragStop(t)}),O(h(n),\"onTouchStart\",function(t){return j=v.touch,n.handleDragStart(t)}),O(h(n),\"onTouchEnd\",function(t){return j=v.touch,n.handleDragStop(t)}),n}var n,r,a;return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(e,o.a.Component),n=e,(r=[{key:\"componentWillUnmount\",value:function(){var t=u.a.findDOMNode(this);if(t){var e=t.ownerDocument;Object(s.m)(e,v.mouse.move,this.handleDrag),Object(s.m)(e,v.touch.move,this.handleDrag),Object(s.m)(e,v.mouse.stop,this.handleDragStop),Object(s.m)(e,v.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&Object(s.n)(e)}}},{key:\"render\",value:function(){return o.a.cloneElement(o.a.Children.only(this.props.children),{style:Object(s.o)(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&b(n.prototype,r),a&&b(n,a),e}();O(w,\"displayName\",\"DraggableCore\"),O(w,\"propTypes\",{allowAnyClick:i.a.bool,disabled:i.a.bool,enableUserSelectHack:i.a.bool,offsetParent:function(t,e){if(t[e]&&1!==t[e].nodeType)throw new Error(\"Draggable's offsetParent must be a DOM Node.\")},grid:i.a.arrayOf(i.a.number),handle:i.a.string,cancel:i.a.string,onStart:i.a.func,onDrag:i.a.func,onStop:i.a.func,onMouseDown:i.a.func,className:f.a,style:f.a,transform:f.a}),O(w,\"defaultProps\",{allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}})},function(t,e,n){var r;\n/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/!function(){\"use strict\";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}()}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function j(t){for(var e=1;e, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.\"),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&P(t,e)}(e,o.a.Component),x(e,null,[{key:\"getDerivedStateFromProps\",value:function(t,e){var n=t.position,r=e.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:(Object(b.a)(\"Draggable: getDerivedStateFromProps %j\",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:j({},n)})}}]),x(e,[{key:\"componentDidMount\",value:function(){void 0!==window.SVGElement&&u.a.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:\"componentWillUnmount\",value:function(){this.setState({dragging:!1})}},{key:\"render\",value:function(){var t,e=this.props,n=(e.axis,e.bounds,e.children),r=e.defaultPosition,a=e.defaultClassName,i=e.defaultClassNameDragging,c=e.defaultClassNameDragged,u=e.position,s=e.positionOffset,d=(e.scale,m(e,[\"axis\",\"bounds\",\"children\",\"defaultPosition\",\"defaultClassName\",\"defaultClassNameDragging\",\"defaultClassNameDragged\",\"position\",\"positionOffset\",\"scale\"])),b={},y=null,O=!Boolean(u)||this.state.dragging,v=u||r,w={x:Object(p.a)(this)&&O?this.state.x:v.x,y:Object(p.b)(this)&&O?this.state.y:v.y};this.state.isElementSVG?y=Object(f.d)(w,s):b=Object(f.c)(w,s);var D=l()(n.props.className||\"\",a,(E(t={},i,this.state.dragging),E(t,c,this.state.dragged),t));return o.a.createElement(g.default,h({},d,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.a.cloneElement(o.a.Children.only(n),{className:D,style:j({},n.props.style,{},b),transform:y}))}}]),e}();E(T,\"displayName\",\"Draggable\"),E(T,\"propTypes\",j({},g.default.propTypes,{axis:i.a.oneOf([\"both\",\"x\",\"y\",\"none\"]),bounds:i.a.oneOfType([i.a.shape({left:i.a.number,right:i.a.number,top:i.a.number,bottom:i.a.number}),i.a.string,i.a.oneOf([!1])]),defaultClassName:i.a.string,defaultClassNameDragging:i.a.string,defaultClassNameDragged:i.a.string,defaultPosition:i.a.shape({x:i.a.number,y:i.a.number}),positionOffset:i.a.shape({x:i.a.oneOfType([i.a.number,i.a.string]),y:i.a.oneOfType([i.a.number,i.a.string])}),position:i.a.shape({x:i.a.number,y:i.a.number}),className:d.a,style:d.a,transform:d.a})),E(T,\"defaultProps\",j({},g.default.defaultProps,{axis:\"both\",bounds:!1,defaultClassName:\"react-draggable\",defaultClassNameDragging:\"react-draggable-dragging\",defaultClassNameDragged:\"react-draggable-dragged\",defaultPosition:{x:0,y:0},position:null,scale:1}))},function(t,e,n){\"use strict\";var r=n(12);function o(){}function a(){}a.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,a,i){if(i!==r){var c=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw c.name=\"Invariant Violation\",c}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(t,e,n){\"use strict\";t.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"}])});\n//# sourceMappingURL=react-draggable.min.js.map","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","/*!\n * UAParser.js v0.7.18\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2016 Faisal Salman \n * Dual licensed under GPLv2 or MIT\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.18',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var margedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n margedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n margedRegexes[i] = regexes[i];\n }\n }\n return margedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n //var result = {},\n var i = 0, j, k, p, q, matches, match;//, args = arguments;\n\n /*// construct object barebones\n for (p = 0; p < args[1].length; p++) {\n q = args[1][p];\n result[typeof q === OBJ_TYPE ? q[0] : q] = undefined;\n }*/\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n // console.log(this);\n //return this;\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]*)/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n\n // Trident based\n /(avant\\s|iemobile|slim|baidu)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser/Baidu\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]*)/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser\n ], [NAME, VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge|edgios|edgea)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [[NAME, 'Edge'], VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i\n // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(qqbrowserlite)\\/([\\w\\.]+)/i // QQBrowserLite\n ], [NAME, VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /(BIDUBrowser)[\\/\\s]?([\\w\\.]+)/i // Baidu Browser\n ], [NAME, VERSION], [\n\n /(2345Explorer)[\\/\\s]?([\\w\\.]+)/i // 2345 Browser\n ], [NAME, VERSION], [\n\n /(MetaSr)[\\/\\s]?([\\w\\.]+)/i // SouGouBrowser\n ], [NAME], [\n\n /(LBBROWSER)/i // LieBao Browser\n ], [NAME], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(konqueror)\\/([\\w\\.]+)/i, // Konqueror\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([\\w\\.-]+)$/i,\n\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]*)/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n\n /* /////////////////////\n // Media players BEGIN\n ////////////////////////\n\n , [\n\n /(apple(?:coremedia|))\\/((\\d+)[\\w\\._]+)/i, // Generic Apple CoreMedia\n /(coremedia) v((\\d+)[\\w\\._]+)/i\n ], [NAME, VERSION], [\n\n /(aqualung|lyssna|bsplayer)\\/((\\d+)?[\\w\\.-]+)/i // Aqualung/Lyssna/BSPlayer\n ], [NAME, VERSION], [\n\n /(ares|ossproxy)\\s((\\d+)[\\w\\.-]+)/i // Ares/OSSProxy\n ], [NAME, VERSION], [\n\n /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\\/((\\d+)[\\w\\.-]+)/i,\n // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC\n // NSPlayer/PSP-InternetRadioPlayer/Videos\n /(clementine|music player daemon)\\s((\\d+)[\\w\\.-]+)/i, // Clementine/MPD\n /(lg player|nexplayer)\\s((\\d+)[\\d\\.]+)/i,\n /player\\/(nexplayer|lg player)\\s((\\d+)[\\w\\.-]+)/i // NexPlayer/LG Player\n ], [NAME, VERSION], [\n /(nexplayer)\\s((\\d+)[\\w\\.-]+)/i // Nexplayer\n ], [NAME, VERSION], [\n\n /(flrp)\\/((\\d+)[\\w\\.-]+)/i // Flip Player\n ], [[NAME, 'Flip Player'], VERSION], [\n\n /(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i\n // FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit\n ], [NAME], [\n\n /(gstreamer) souphttpsrc (?:\\([^\\)]+\\)){0,1} libsoup\\/((\\d+)[\\w\\.-]+)/i\n // Gstreamer\n ], [NAME, VERSION], [\n\n /(htc streaming player)\\s[\\w_]+\\s\\/\\s((\\d+)[\\d\\.]+)/i, // HTC Streaming Player\n /(java|python-urllib|python-requests|wget|libcurl)\\/((\\d+)[\\w\\.-_]+)/i,\n // Java/urllib/requests/wget/cURL\n /(lavf)((\\d+)[\\d\\.]+)/i // Lavf (FFMPEG)\n ], [NAME, VERSION], [\n\n /(htc_one_s)\\/((\\d+)[\\d\\.]+)/i // HTC One S\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(mplayer)(?:\\s|\\/)(?:(?:sherpya-){0,1}svn)(?:-|\\s)(r\\d+(?:-\\d+[\\w\\.-]+){0,1})/i\n // MPlayer SVN\n ], [NAME, VERSION], [\n\n /(mplayer)(?:\\s|\\/|[unkow-]+)((\\d+)[\\w\\.-]+)/i // MPlayer\n ], [NAME, VERSION], [\n\n /(mplayer)/i, // MPlayer (no other info)\n /(yourmuze)/i, // YourMuze\n /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime\n ], [NAME], [\n\n /(nero (?:home|scout))\\/((\\d+)[\\w\\.-]+)/i // Nero Home/Nero Scout\n ], [NAME, VERSION], [\n\n /(nokia\\d+)\\/((\\d+)[\\w\\.-]+)/i // Nokia\n ], [NAME, VERSION], [\n\n /\\s(songbird)\\/((\\d+)[\\w\\.-]+)/i // Songbird/Philips-Songbird\n ], [NAME, VERSION], [\n\n /(winamp)3 version ((\\d+)[\\w\\.-]+)/i, // Winamp\n /(winamp)\\s((\\d+)[\\w\\.-]+)/i,\n /(winamp)mpeg\\/((\\d+)[\\w\\.-]+)/i\n ], [NAME, VERSION], [\n\n /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)\n // inlight radio\n ], [NAME], [\n\n /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\\/((\\d+)[\\w\\.-]+)/i\n // QuickTime/RealMedia/RadioApp/RadioClientApplication/\n // SoundTap/Totem/Stagefright/Streamium\n ], [NAME, VERSION], [\n\n /(smp)((\\d+)[\\d\\.]+)/i // SMP\n ], [NAME, VERSION], [\n\n /(vlc) media player - version ((\\d+)[\\w\\.]+)/i, // VLC Videolan\n /(vlc)\\/((\\d+)[\\w\\.-]+)/i,\n /(xbmc|gvfs|xine|xmms|irapp)\\/((\\d+)[\\w\\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp\n /(foobar2000)\\/((\\d+)[\\d\\.]+)/i, // Foobar2000\n /(itunes)\\/((\\d+)[\\d\\.]+)/i // iTunes\n ], [NAME, VERSION], [\n\n /(wmplayer)\\/((\\d+)[\\w\\.-]+)/i, // Windows Media Player\n /(windows-media-player)\\/((\\d+)[\\w\\.-]+)/i\n ], [[NAME, /-/g, ' '], VERSION], [\n\n /windows\\/((\\d+)[\\w\\.-]+) upnp\\/[\\d\\.]+ dlnadoc\\/[\\d\\.]+ (home media server)/i\n // Windows Media Server\n ], [VERSION, [NAME, 'Windows']], [\n\n /(com\\.riseupradioalarm)\\/((\\d+)[\\d\\.]*)/i // RiseUP Radio Alarm\n ], [NAME, VERSION], [\n\n /(rad.io)\\s((\\d+)[\\d\\.]+)/i, // Rad.io\n /(radio.(?:de|at|fr))\\s((\\d+)[\\d\\.]+)/i\n ], [[NAME, 'rad.io'], VERSION]\n\n //////////////////////\n // Media players END\n ////////////////////*/\n\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+;))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\);-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/.+silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/.+silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]*)/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(S(?:5000|6000)+(?:[-][\\w+]))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\))|\\w+)*/i, // HTC\n /(zte)-(\\w*)/i, // ZTE\n /(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]*)/i\n // Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?:?(\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w*)/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w*)/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]*)/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android\\s3\\.[\\s\\w;-]{10}(a\\d{3})/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w*)/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)\\s/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel xl|pixel)\\s/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+;\\s(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d?\\w?)[\\s_]*(?:plus)?)\\s+build/i, // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+))\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)(?:[\\s_]*[\\w\\s]+))\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu Tablet\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [\n\n /android.+a000(1)\\s+build/i, // OnePlus\n /android.+oneplus\\s(a\\d{4})\\s+build/i\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/\\s]+(Venue[\\d\\s]{2,7})\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+;\\s(k88)\\sbuild/i // ZTE K Series Tablet\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2})\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(\\w{5})\\sbuild/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?\\w{0,9})\\sbuild/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?\\w{0,9})\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(\\w{1,9})\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q\\w{1,9})\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /(android[\\w\\.\\s\\-]{0,9});.+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n\n\n /*//////////////////////////\n // TODO: move to string map\n ////////////////////////////\n\n /(C6603)/i // Sony Xperia Z C6603\n ], [[MODEL, 'Xperia Z C6603'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n /(C6903)/i // Sony Xperia Z 1\n ], [[MODEL, 'Xperia Z 1'], [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /(SM-G900[F|H])/i // Samsung Galaxy S5\n ], [[MODEL, 'Galaxy S5'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G7102)/i // Samsung Galaxy Grand 2\n ], [[MODEL, 'Galaxy Grand 2'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G530H)/i // Samsung Galaxy Grand Prime\n ], [[MODEL, 'Galaxy Grand Prime'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-G313HZ)/i // Samsung Galaxy V\n ], [[MODEL, 'Galaxy V'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T805)/i // Samsung Galaxy Tab S 10.5\n ], [[MODEL, 'Galaxy Tab S 10.5'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n /(SM-G800F)/i // Samsung Galaxy S5 Mini\n ], [[MODEL, 'Galaxy S5 Mini'], [VENDOR, 'Samsung'], [TYPE, MOBILE]], [\n /(SM-T311)/i // Samsung Galaxy Tab 3 8.0\n ], [[MODEL, 'Galaxy Tab 3 8.0'], [VENDOR, 'Samsung'], [TYPE, TABLET]], [\n\n /(T3C)/i // Advan Vandroid T3C\n ], [MODEL, [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN T1J\\+)/i // Advan Vandroid T1J+\n ], [[MODEL, 'Vandroid T1J+'], [VENDOR, 'Advan'], [TYPE, TABLET]], [\n /(ADVAN S4A)/i // Advan Vandroid S4A\n ], [[MODEL, 'Vandroid S4A'], [VENDOR, 'Advan'], [TYPE, MOBILE]], [\n\n /(V972M)/i // ZTE V972M\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n\n /(i-mobile)\\s(IQ\\s[\\d\\.]+)/i // i-mobile IQ\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(IQ6.3)/i // i-mobile IQ IQ 6.3\n ], [[MODEL, 'IQ 6.3'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n /(i-mobile)\\s(i-style\\s[\\d\\.]+)/i // i-mobile i-STYLE\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1\n ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [\n\n /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512\n ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [\n\n /////////////\n // END TODO\n ///////////*/\n\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]{1,9}).+(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s\\w]*)/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]*)/i, // Blackberry\n /(tizen)[\\/\\s]([\\w\\.]+)/i, // Tizen\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|contiki)[\\/\\s-]?([\\w\\.]*)/i,\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki\n /linux;.+(sailfish);/i // Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]*)/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]*)/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.\\d]*)/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]{2,4}(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]*)/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]*)/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.])*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS\n /(unix)\\s?([\\w\\.]*)/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n /*\n var Browser = function (name, version) {\n this[NAME] = name;\n this[VERSION] = version;\n };\n var CPU = function (arch) {\n this[ARCHITECTURE] = arch;\n };\n var Device = function (vendor, model, type) {\n this[VENDOR] = vendor;\n this[MODEL] = model;\n this[TYPE] = type;\n };\n var Engine = Browser;\n var OS = Browser;\n */\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n //var browser = new Browser();\n //var cpu = new CPU();\n //var device = new Device();\n //var engine = new Engine();\n //var os = new OS();\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n //browser = new Browser();\n //cpu = new CPU();\n //device = new Device();\n //engine = new Engine();\n //os = new OS();\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n //UAParser.Utils = util;\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n // TODO: test!!!!!!!!\n /*\n if (require && require.main === module && process) {\n // cli\n var jsonize = function (arr) {\n var res = [];\n for (var i in arr) {\n res.push(new UAParser(arr[i]).getResult());\n }\n process.stdout.write(JSON.stringify(res, null, 2) + '\\n');\n };\n if (process.stdin.isTTY) {\n // via args\n jsonize(process.argv.slice(2));\n } else {\n // via pipe\n var str = '';\n process.stdin.on('readable', function() {\n var read = process.stdin.read();\n if (read !== null) {\n str += read;\n }\n });\n process.stdin.on('end', function () {\n jsonize(str.replace(/\\n$/, '').split('\\n'));\n });\n }\n }\n */\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (window) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if (typeof $ !== UNDEF_TYPE) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n","/** @license React v16.6.0\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});var c=null,f=3,h=-1,k=-1,l=!1,m=!1,n=\"object\"===typeof performance&&\"function\"===typeof performance.now,q={timeRemaining:n?function(){if(null!==c&&c.expirationTime=b){d=a;break}a=a.next}while(a!==c);null===d?d=c:d===c&&(c=g,r());b=d.previous;b.next=d.previous=g;g.next=d;g.previous=\nb}}function x(){if(-1===h&&null!==c&&1===c.priorityLevel){l=!0;q.didTimeout=!0;try{do w();while(null!==c&&1===c.priorityLevel)}finally{l=!1,null!==c?r():m=!1}}}function v(a){l=!0;q.didTimeout=a;try{if(a)for(;null!==c;){var b=exports.unstable_now();if(c.expirationTime<=b){do w();while(null!==c&&c.expirationTime<=b)}else break}else if(null!==c){do w();while(null!==c&&0=Q-d)if(-1!==b&&b<=d)e=!0;else{O||(O=!0,F(V));L=a;N=b;return}if(null!==a){P=!0;try{a(e)}finally{P=!1}}}},!1);var V=function(a){if(null!==L){F(V);var b=a-Q+T;bb&&(b=8),T=bb?window.postMessage(U,\"*\"):O||(O=!0,F(V))};t=function(){L=null;M=!1;N=-1}}exports.unstable_ImmediatePriority=1;\nexports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:break;default:a=3}var d=f,e=h;f=a;h=exports.unstable_now();try{return b()}finally{f=d,h=e,x()}};\nexports.unstable_scheduleCallback=function(a,b){var d=-1!==h?h:exports.unstable_now();if(\"object\"===typeof b&&null!==b&&\"number\"===typeof b.timeout)b=d+b.timeout;else switch(f){case 1:b=d+-1;break;case 2:b=d+250;break;case 4:b=d+1073741823;break;default:b=d+5E3}a={callback:a,priorityLevel:f,expirationTime:b,next:null,previous:null};if(null===c)c=a.next=a.previous=a,r();else{d=null;var e=c;do{if(e.expirationTime>b){d=e;break}e=e.next}while(e!==c);null===d?d=c:d===c&&(c=a,r());b=d.previous;b.next=d.previous=\na;a.next=d;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)c=null;else{a===c&&(c=b);var d=a.previous;d.next=b;b.previous=d}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=f;return function(){var d=f,e=h;f=b;h=exports.unstable_now();try{return a.apply(this,arguments)}finally{f=d,h=e,x()}}};exports.unstable_getCurrentPriorityLevel=function(){return f};\n","/** @license React v16.6.0\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),n=require(\"object-assign\"),da=require(\"scheduler\");function ea(a,b,c,d,e,f,g,h){if(!a){a=void 0;if(void 0===b)a=Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var k=[c,d,e,f,g,h],l=0;a=Error(b.replace(/%s/g,function(){return k[l++]}));a.name=\"Invariant Violation\"}a.framesToPop=1;throw a;}}\nfunction r(a){for(var b=arguments.length-1,c=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,d=0;dthis.eventPool.length&&this.eventPool.push(a)}\nfunction sb(a){a.eventPool=[];a.getPooled=tb;a.release=ub}var vb=y.extend({data:null}),wb=y.extend({data:null}),xb=[9,13,27,32],yb=Xa&&\"CompositionEvent\"in window,zb=null;Xa&&\"documentMode\"in document&&(zb=document.documentMode);\nvar Ab=Xa&&\"TextEvent\"in window&&!zb,Bb=Xa&&(!yb||zb&&8=zb),Cb=String.fromCharCode(32),Db={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Eb=!1;\nfunction Fb(a,b){switch(a){case \"keyup\":return-1!==xb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Gb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Hb=!1;function Kb(a,b){switch(a){case \"compositionend\":return Gb(b);case \"keypress\":if(32!==b.which)return null;Eb=!0;return Cb;case \"textInput\":return a=b.data,a===Cb&&Eb?null:a;default:return null}}\nfunction Lb(a,b){if(Hb)return\"compositionend\"===a||!yb&&Fb(a,b)?(a=pb(),ob=nb=mb=null,Hb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function F(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var G={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){G[a]=new F(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];G[b]=new F(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){G[a]=new F(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){G[a]=new F(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){G[a]=new F(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){G[a]=new F(a,3,!0,a,null)});\n[\"capture\",\"download\"].forEach(function(a){G[a]=new F(a,4,!1,a,null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){G[a]=new F(a,6,!1,a,null)});[\"rowSpan\",\"start\"].forEach(function(a){G[a]=new F(a,5,!1,a.toLowerCase(),null)});var Mc=/[\\-:]([a-z])/g;function Nc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Mc,\nNc);G[b]=new F(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Mc,Nc);G[b]=new F(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Mc,Nc);G[b]=new F(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});G.tabIndex=new F(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Oc(a,b,c,d){var e=G.hasOwnProperty(b)?G[b]:null;var f=null!==e?0===e.type:d?!1:!(2ae.length&&ae.push(a)}}}var he={},ie=0,je=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);\nfunction ke(a){Object.prototype.hasOwnProperty.call(a,je)||(a[je]=ie++,he[a[je]]={});return he[a[je]]}function le(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function me(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction ne(a,b){var c=me(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=me(c)}}function oe(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?oe(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction pe(){for(var a=window,b=le();b instanceof a.HTMLIFrameElement;){try{a=b.contentDocument.defaultView}catch(c){break}b=le(a.document)}return b}function qe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar re=Xa&&\"documentMode\"in document&&11>=document.documentMode,se={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},te=null,ue=null,He=null,Ie=!1;\nfunction Je(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(Ie||null==te||te!==le(c))return null;c=te;\"selectionStart\"in c&&qe(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return He&&Fd(He,c)?null:(He=c,a=y.getPooled(se.select,ue,a,b),a.type=\"select\",a.target=te,Wa(a),a)}\nvar Ke={eventTypes:se,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=ke(e);f=va.onSelect;for(var g=0;g=b.length?void 0:r(\"93\"),b=b[0]),c=b),null==c&&(c=\"\"));a._wrapperState={initialValue:Pc(c)}}\nfunction Qe(a,b){var c=Pc(b.value),d=Pc(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function Re(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Se={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction Te(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ue(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?Te(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Ve=void 0,We=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Se.svg||\"innerHTML\"in a)a.innerHTML=b;else{Ve=Ve||document.createElement(\"div\");Ve.innerHTML=\"\"+b+\"\";for(b=Ve.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Xe(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ze=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Ye).forEach(function(a){Ze.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Ye[b]=Ye[a]})});\nfunction $e(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Ye.hasOwnProperty(e)&&Ye[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var af=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction bf(a,b){b&&(af[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?r(\"137\",a,\"\"):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?r(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:r(\"61\")),null!=b.style&&\"object\"!==typeof b.style?r(\"62\",\"\"):void 0)}\nfunction cf(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}\nfunction df(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=ke(a);b=va[b];for(var d=0;dpf||(a.current=of[pf],of[pf]=null,pf--)}function J(a,b){pf++;of[pf]=a.current;a.current=b}var qf={},K={current:qf},L={current:!1},rf=qf;\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return qf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function M(a){a=a.childContextTypes;return null!==a&&void 0!==a}function tf(a){I(L,a);I(K,a)}function uf(a){I(L,a);I(K,a)}\nfunction vf(a,b,c){K.current!==qf?r(\"168\"):void 0;J(K,b,a);J(L,c,a)}function wf(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)e in a?void 0:r(\"108\",Ac(b)||\"Unknown\",e);return n({},c,d)}function xf(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||qf;rf=K.current;J(K,b,a);J(L,L.current,a);return!0}\nfunction yf(a,b,c){var d=a.stateNode;d?void 0:r(\"169\");c?(b=wf(a,b,rf),d.__reactInternalMemoizedMergedChildContext=b,I(L,a),I(K,a),J(K,b,a)):I(L,a);J(L,c,a)}var zf=null,Af=null;function Bf(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Cf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);zf=Bf(function(a){return b.onCommitFiberRoot(c,a)});Af=Bf(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}\nfunction Df(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.firstContextDependency=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function N(a,b,c,d){return new Df(a,b,c,d)}\nfunction Ef(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Ff(a){if(\"function\"===typeof a)return Ef(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===uc)return 11;if(a===wc)return 14}return 2}\nfunction Gf(a,b){var c=a.alternate;null===c?(c=N(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;c.firstContextDependency=a.firstContextDependency;c.sibling=a.sibling;\nc.index=a.index;c.ref=a.ref;return c}\nfunction Hf(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)Ef(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case oc:return If(c.children,e,f,b);case tc:return Jf(c,e|3,f,b);case pc:return Jf(c,e|2,f,b);case qc:return a=N(12,c,b,e|4),a.elementType=qc,a.type=qc,a.expirationTime=f,a;case vc:return a=N(13,c,b,e),a.elementType=vc,a.type=vc,a.expirationTime=f,a;default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case rc:g=10;break a;case sc:g=9;break a;case uc:g=11;break a;case wc:g=\n14;break a;case xc:g=16;d=null;break a}r(\"130\",null==a?a:typeof a,\"\")}b=N(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function If(a,b,c,d){a=N(7,a,d,b);a.expirationTime=c;return a}function Jf(a,b,c,d){a=N(8,a,d,b);b=0===(b&1)?pc:tc;a.elementType=b;a.type=b;a.expirationTime=c;return a}function Kf(a,b,c){a=N(6,a,null,b);a.expirationTime=c;return a}\nfunction Lf(a,b,c){b=N(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Mf(a,b){a.didError=!1;var c=a.earliestPendingTime;0===c?a.earliestPendingTime=a.latestPendingTime=b:c>b?a.earliestPendingTime=b:a.latestPendingTimeb?a.earliestSuspendedTime=b:da)&&(e=d);a=e;0!==a&&0!==c&&ce){if(null===g&&(g=k,f=l),0===h||h>m)h=m}else l=Yf(a,b,k,l,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}m=null;for(k=b.firstCapturedUpdate;null!==k;){var p=k.expirationTime;if(p>e){if(null===m&&(m=k,null===g&&(f=l)),0===h||h>p)h=p}else l=Yf(a,b,k,l,c,d),\nnull!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===m?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===m&&(f=l);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=m;a.expirationTime=h;a.memoizedState=l}\nfunction $f(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);ag(b.firstEffect,c);b.firstEffect=b.lastEffect=null;ag(b.firstCapturedEffect,c);b.firstCapturedEffect=b.lastCapturedEffect=null}function ag(a,b){for(;null!==a;){var c=a.callback;if(null!==c){a.callback=null;var d=b;\"function\"!==typeof c?r(\"191\",c):void 0;c.call(d)}a=a.nextEffect}}\nfunction bg(a,b){return{value:a,source:b,stack:Bc(b)}}var cg={current:null},dg=null,eg=null,fg=null;function gg(a,b){var c=a.type._context;J(cg,c._currentValue,a);c._currentValue=b}function hg(a){var b=cg.current;I(cg,a);a.type._context._currentValue=b}function ig(a){dg=a;fg=eg=null;a.firstContextDependency=null}\nfunction jg(a,b){if(fg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)fg=a,b=1073741823;b={context:a,observedBits:b,next:null};null===eg?(null===dg?r(\"293\"):void 0,dg.firstContextDependency=eg=b):eg=eg.next=b}return a._currentValue}var kg={},O={current:kg},lg={current:kg},mg={current:kg};function ng(a){a===kg?r(\"174\"):void 0;return a}\nfunction og(a,b){J(mg,b,a);J(lg,a,a);J(O,kg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ue(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ue(b,c)}I(O,a);J(O,b,a)}function pg(a){I(O,a);I(lg,a);I(mg,a)}function qg(a){ng(mg.current);var b=ng(O.current);var c=Ue(b,a.type);b!==c&&(J(lg,a,a),J(O,c,a))}function rg(a){lg.current===a&&(I(O,a),I(lg,a))}var sg=kc.ReactCurrentOwner,tg=(new aa.Component).refs;\nfunction ug(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;d=a.updateQueue;null!==d&&0===a.expirationTime&&(d.baseState=c)}\nvar yg={isMounted:function(a){return(a=a._reactInternalFiber)?2===Gd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=vg();d=wg(d,a);var e=Tf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Vf(a,e);xg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=vg();d=wg(d,a);var e=Tf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Vf(a,e);xg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=vg();c=wg(c,a);var d=Tf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Vf(a,d);xg(a,c)}};function zg(a,b,c,d,e,f,g){a=a.stateNode;return\"function\"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Fd(c,d)||!Fd(e,f):!0}\nfunction Ag(a,b,c){var d=!1,e=qf;var f=b.contextType;\"object\"===typeof f&&null!==f?f=sg.currentDispatcher.readContext(f):(e=M(b)?rf:K.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?sf(a,e):qf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=yg;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}\nfunction Bg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&yg.enqueueReplaceState(b,b.state,null)}\nfunction Cg(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=tg;var f=b.contextType;\"object\"===typeof f&&null!==f?e.context=sg.currentDispatcher.readContext(f):(f=M(b)?rf:K.current,e.context=sf(a,f));f=a.updateQueue;null!==f&&(Zf(a,f,c,e,d),e.state=a.memoizedState);f=b.getDerivedStateFromProps;\"function\"===typeof f&&(ug(a,b,f,c),e.state=a.memoizedState);\"function\"===typeof b.getDerivedStateFromProps||\"function\"===typeof e.getSnapshotBeforeUpdate||\"function\"!==typeof e.UNSAFE_componentWillMount&&\n\"function\"!==typeof e.componentWillMount||(b=e.state,\"function\"===typeof e.componentWillMount&&e.componentWillMount(),\"function\"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&yg.enqueueReplaceState(e,e.state,null),f=a.updateQueue,null!==f&&(Zf(a,f,c,e,d),e.state=a.memoizedState));\"function\"===typeof e.componentDidMount&&(a.effectTag|=4)}var Dg=Array.isArray;\nfunction Eg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(1!==c.tag?r(\"289\"):void 0,d=c.stateNode);d?void 0:r(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===tg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?r(\"284\"):void 0;c._owner?void 0:r(\"290\",a)}return a}\nfunction Fg(a,b){\"textarea\"!==a.type&&r(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction Gg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Gf(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,du?(A=q,q=null):A=q.sibling;var t=v(e,q,h[u],k);if(null===t){null===q&&(q=A);break}a&&\nq&&null===t.alternate&&b(e,q);g=f(t,g,u);null===m?l=t:m.sibling=t;m=t;q=A}if(u===h.length)return c(e,q),l;if(null===q){for(;uu?(A=q,q=null):A=q.sibling;var w=v(e,q,t.value,k);if(null===w){q||(q=A);break}a&&q&&null===w.alternate&&b(e,q);g=f(w,g,u);null===m?l=w:m.sibling=w;m=w;q=A}if(t.done)return c(e,q),l;if(null===q){for(;!t.done;u++,t=h.next())t=p(e,t.value,k),null!==t&&(g=f(t,g,u),null===m?l=t:m.sibling=t,m=t);return l}for(q=d(e,q);!t.done;u++,t=h.next())t=B(q,e,u,t.value,k),null!==t&&(a&&null!==t.alternate&&q.delete(null===t.key?u:\nt.key),g=f(t,g,u),null===m?l=t:m.sibling=t,m=t);a&&q.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===oc&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case mc:a:{l=f.key;for(k=d;null!==k;){if(k.key===l)if(7===k.tag?f.type===oc:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===oc?f.props.children:f.props,h);d.ref=Eg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=\nk.sibling}f.type===oc?(d=If(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Hf(f.type,f.key,f.props,null,a.mode,h),h.ref=Eg(a,d,f),h.return=a,a=h)}return g(a);case nc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Lf(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\n\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=Kf(f,a.mode,h),d.return=a,a=d),g(a);if(Dg(f))return w(a,d,f,h);if(zc(f))return C(a,d,f,h);l&&Fg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 0:h=a.type,r(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var Hg=Gg(!0),Ig=Gg(!1),Jg=null,Kg=null,Lg=!1;\nfunction Mg(a,b){var c=N(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function Ng(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}\nfunction Og(a){if(Lg){var b=Kg;if(b){var c=b;if(!Ng(a,b)){b=mf(c);if(!b||!Ng(a,b)){a.effectTag|=2;Lg=!1;Jg=a;return}Mg(Jg,c)}Jg=a;Kg=nf(b)}else a.effectTag|=2,Lg=!1,Jg=a}}function Pg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Jg=a}function Qg(a){if(a!==Jg)return!1;if(!Lg)return Pg(a),Lg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!jf(b,a.memoizedProps))for(b=Kg;b;)Mg(a,b),b=mf(b);Pg(a);Kg=Jg?mf(a.stateNode):null;return!0}function Rg(){Kg=Jg=null;Lg=!1}\nfunction Sg(a){var b=a._result;switch(a._status){case 1:return b;case 2:throw b;case 0:throw b;default:throw a._status=0,b=a._ctor,b=b(),b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)}),a._result=b,b;}}var Tg=kc.ReactCurrentOwner;function P(a,b,c,d){b.child=null===a?Ig(b,null,c,d):Hg(b,a.child,c,d)}\nfunction Ug(a,b,c,d,e){c=c.render;var f=b.ref;if(!L.current&&b.memoizedProps===d&&f===(null!==a?a.ref:null))return Vg(a,b,e);d=c(d,f);P(a,b,d,e);return b.child}\nfunction Wg(a,b,c,d,e,f){if(null===a){var g=c.type;if(\"function\"===typeof g&&!Ef(g)&&void 0===g.defaultProps&&null===c.compare)return b.tag=15,b.type=g,Xg(a,b,g,d,e,f);a=Hf(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===e||e>f)if(e=g.memoizedProps,c=c.compare,c=null!==c?c:Fd,c(e,d)&&a.ref===b.ref)return Vg(a,b,f);a=Gf(g,d,f);a.ref=b.ref;a.return=b;return b.child=a}\nfunction Xg(a,b,c,d,e,f){return null!==a&&(0===e||e>f)&&Fd(a.memoizedProps,d)&&a.ref===b.ref?Vg(a,b,f):Yg(a,b,c,d,f)}function Zg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Yg(a,b,c,d,e){var f=M(c)?rf:K.current;f=sf(b,f);ig(b,e);c=c(d,f);b.effectTag|=1;P(a,b,c,e);return b.child}\nfunction $g(a,b,c,d,e){if(M(c)){var f=!0;xf(b)}else f=!1;ig(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Ag(b,c,d,e),Cg(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;\"object\"===typeof l&&null!==l?l=sg.currentDispatcher.readContext(l):(l=M(c)?rf:K.current,l=sf(b,l));var m=c.getDerivedStateFromProps,p=\"function\"===typeof m||\"function\"===typeof g.getSnapshotBeforeUpdate;p||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\n\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Bg(b,g,d,l);Qf=!1;var v=b.memoizedState;k=g.state=v;var B=b.updateQueue;null!==B&&(Zf(b,B,d,g,e),k=b.memoizedState);h!==d||v!==k||L.current||Qf?(\"function\"===typeof m&&(ug(b,c,m,d),k=b.memoizedState),(h=Qf||zg(b,c,h,d,v,k,l))?(p||\"function\"!==typeof g.UNSAFE_componentWillMount&&\"function\"!==typeof g.componentWillMount||(\"function\"===typeof g.componentWillMount&&g.componentWillMount(),\"function\"===typeof g.UNSAFE_componentWillMount&&\ng.UNSAFE_componentWillMount()),\"function\"===typeof g.componentDidMount&&(b.effectTag|=4)):(\"function\"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):(\"function\"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,h=b.memoizedProps,g.props=h,k=g.context,l=c.contextType,\"object\"===typeof l&&null!==l?l=sg.currentDispatcher.readContext(l):(l=M(c)?rf:K.current,l=sf(b,l)),m=c.getDerivedStateFromProps,(p=\"function\"===\ntypeof m||\"function\"===typeof g.getSnapshotBeforeUpdate)||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Bg(b,g,d,l),Qf=!1,k=b.memoizedState,v=g.state=k,B=b.updateQueue,null!==B&&(Zf(b,B,d,g,e),v=b.memoizedState),h!==d||k!==v||L.current||Qf?(\"function\"===typeof m&&(ug(b,c,m,d),v=b.memoizedState),(m=Qf||zg(b,c,h,d,k,v,l))?(p||\"function\"!==typeof g.UNSAFE_componentWillUpdate&&\"function\"!==typeof g.componentWillUpdate||(\"function\"===\ntypeof g.componentWillUpdate&&g.componentWillUpdate(d,v,l),\"function\"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,v,l)),\"function\"===typeof g.componentDidUpdate&&(b.effectTag|=4),\"function\"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=\nv),g.props=d,g.state=v,g.context=l,d=m):(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return ah(a,b,c,d,f,e)}\nfunction ah(a,b,c,d,e,f){Zg(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&yf(b,c,!1),Vg(a,b,f);d=b.stateNode;Tg.current=b;var h=g&&\"function\"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=Hg(b,a.child,null,f),b.child=Hg(b,null,h,f)):P(a,b,h,f);b.memoizedState=d.state;e&&yf(b,c,!0);return b.child}function bh(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);og(a,b.containerInfo)}\nfunction ch(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}\nfunction dh(a,b,c){var d=b.mode,e=b.pendingProps,f=b.memoizedState;null!==f&&(f.alreadyCaptured?null!==a&&f===a.memoizedState?f={alreadyCaptured:!0,didTimeout:!0,timedOutAt:f.timedOutAt}:(f.alreadyCaptured=!0,f.didTimeout=!0):f=null);var g=null!==f&&f.didTimeout;if(null===a)g?(g=e.fallback,e=If(null,d,0,null),d=If(g,d,c,null),e.sibling=d,c=e,c.return=d.return=b):c=d=Ig(b,null,e.children,c);else{var h=a.memoizedState;null!==h&&h.didTimeout?(d=a.child,a=d.sibling,g?(c=e.fallback,d=Gf(d,d.pendingProps,\n0),d.effectTag|=2,e=d.sibling=Gf(a,c,a.expirationTime),e.effectTag|=2,c=d,d.childExpirationTime=0,d=e,c.return=d.return=b):(g=a.child,d=Hg(b,d.child,e.children,c),Hg(b,g,null,c),c=d)):(a=a.child,g?(g=e.fallback,e=If(null,d,0,null),e.effectTag|=2,e.child=a,a.return=e,d=e.sibling=If(g,d,c,null),d.effectTag|=2,c=e,e.childExpirationTime=0,c.return=d.return=b):d=c=Hg(b,a,e.children,c))}b.memoizedState=f;b.child=c;return d}\nfunction Vg(a,b,c){null!==a&&(b.firstContextDependency=a.firstContextDependency);var d=b.childExpirationTime;if(0===d||d>c)return null;null!==a&&b.child!==a.child?r(\"153\"):void 0;if(null!==b.child){a=b.child;c=Gf(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Gf(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction eh(a,b,c){var d=b.expirationTime;if(null!==a&&a.memoizedProps===b.pendingProps&&!L.current&&(0===d||d>c)){switch(b.tag){case 3:bh(b);Rg();break;case 5:qg(b);break;case 1:M(b.type)&&xf(b);break;case 4:og(b,b.stateNode.containerInfo);break;case 10:gg(b,b.memoizedProps.value);break;case 13:if(d=b.memoizedState,null!==d&&d.didTimeout){d=b.child.childExpirationTime;if(0!==d&&d<=c)return dh(a,b,c);b=Vg(a,b,c);return null!==b?b.sibling:null}}return Vg(a,b,c)}b.expirationTime=0;switch(b.tag){case 2:d=\nb.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;var e=sf(b,K.current);ig(b,c);e=d(a,e);b.effectTag|=1;if(\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;if(M(d)){var f=!0;xf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;\"function\"===typeof g&&ug(b,d,g,a);e.updater=yg;b.stateNode=e;e._reactInternalFiber=b;Cg(b,d,a,c);b=ah(null,b,d,!0,f,c)}else b.tag=0,\nP(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);f=b.pendingProps;a=Sg(e);b.type=a;e=b.tag=Ff(a);f=ch(a,f);g=void 0;switch(e){case 0:g=Yg(null,b,a,f,c);break;case 1:g=$g(null,b,a,f,c);break;case 11:g=Ug(null,b,a,f,c);break;case 14:g=Wg(null,b,a,ch(a.type,f),d,c);break;default:r(\"283\",a)}return g;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ch(d,e),Yg(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===\nd?e:ch(d,e),$g(a,b,d,e,c);case 3:bh(b);d=b.updateQueue;null===d?r(\"282\"):void 0;e=b.memoizedState;e=null!==e?e.element:null;Zf(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)Rg(),b=Vg(a,b,c);else{e=b.stateNode;if(e=(null===a||null===a.child)&&e.hydrate)Kg=nf(b.stateNode.containerInfo),Jg=b,e=Lg=!0;e?(b.effectTag|=2,b.child=Ig(b,null,d,c)):(P(a,b,d,c),Rg());b=b.child}return b;case 5:return qg(b),null===a&&Og(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,jf(d,\ne)?g=null:null!==f&&jf(d,f)&&(b.effectTag|=16),Zg(a,b),1073741823!==c&&b.mode&1&&e.hidden?(b.expirationTime=1073741823,b=null):(P(a,b,g,c),b=b.child),b;case 6:return null===a&&Og(b),null;case 13:return dh(a,b,c);case 4:return og(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Hg(b,null,d,c):P(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ch(d,e),Ug(a,b,d,e,c);case 7:return P(a,b,b.pendingProps,c),b.child;case 8:return P(a,b,b.pendingProps.children,\nc),b.child;case 12:return P(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;gg(b,f);if(null!==g){var h=g.value;f=h===f&&(0!==h||1/h===1/f)||h!==h&&f!==f?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!L.current){b=Vg(a,b,c);break a}}else for(g=b.child,null!==g&&(g.return=b);null!==g;){h=g.firstContextDependency;if(null!==h){do{if(h.context===d&&0!==(h.observedBits&\nf)){if(1===g.tag){var k=Tf(c);k.tag=2;Vf(g,k)}if(0===g.expirationTime||g.expirationTime>c)g.expirationTime=c;k=g.alternate;null!==k&&(0===k.expirationTime||k.expirationTime>c)&&(k.expirationTime=c);for(var l=g.return;null!==l;){k=l.alternate;if(0===l.childExpirationTime||l.childExpirationTime>c)l.childExpirationTime=c,null!==k&&(0===k.childExpirationTime||k.childExpirationTime>c)&&(k.childExpirationTime=c);else if(null!==k&&(0===k.childExpirationTime||k.childExpirationTime>c))k.childExpirationTime=\nc;else break;l=l.return}}k=g.child;h=h.next}while(null!==h)}else k=10===g.tag?g.type===b.type?null:g.child:g.child;if(null!==k)k.return=g;else for(k=g;null!==k;){if(k===b){k=null;break}g=k.sibling;if(null!==g){g.return=k.return;k=g;break}k=k.return}g=k}}P(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,ig(b,c),e=jg(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,P(a,b,d,c),b.child;case 14:return e=b.type,f=ch(e.type,b.pendingProps),Wg(a,b,e,f,d,c);case 15:return Xg(a,\nb,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ch(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,M(d)?(a=!0,xf(b)):a=!1,ig(b,c),Ag(b,d,e,c),Cg(b,d,e,c),ah(null,b,d,!0,a,c);default:r(\"156\")}}function zh(a){a.effectTag|=4}var Ah=void 0,Bh=void 0,Ch=void 0,Dh=void 0;\nAh=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Bh=function(){};\nCh=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;ng(O.current);a=null;switch(c){case \"input\":f=Qc(g,f);d=Qc(g,d);a=[];break;case \"option\":f=Me(g,f);d=Me(g,d);a=[];break;case \"select\":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case \"textarea\":f=Oe(g,f);d=Oe(g,d);a=[];break;default:\"function\"!==typeof f.onClick&&\"function\"===typeof d.onClick&&(g.onclick=ef)}bf(c,d);g=c=void 0;var h=null;for(c in f)if(!d.hasOwnProperty(c)&&f.hasOwnProperty(c)&&null!=f[c])if(\"style\"===\nc){var k=f[c];for(g in k)k.hasOwnProperty(g)&&(h||(h={}),h[g]=\"\")}else\"dangerouslySetInnerHTML\"!==c&&\"children\"!==c&&\"suppressContentEditableWarning\"!==c&&\"suppressHydrationWarning\"!==c&&\"autoFocus\"!==c&&(ua.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in d){var l=d[c];k=null!=f?f[c]:void 0;if(d.hasOwnProperty(c)&&l!==k&&(null!=l||null!=k))if(\"style\"===c)if(k){for(g in k)!k.hasOwnProperty(g)||l&&l.hasOwnProperty(g)||(h||(h={}),h[g]=\"\");for(g in l)l.hasOwnProperty(g)&&k[g]!==l[g]&&(h||\n(h={}),h[g]=l[g])}else h||(a||(a=[]),a.push(c,h)),h=l;else\"dangerouslySetInnerHTML\"===c?(l=l?l.__html:void 0,k=k?k.__html:void 0,null!=l&&k!==l&&(a=a||[]).push(c,\"\"+l)):\"children\"===c?k===l||\"string\"!==typeof l&&\"number\"!==typeof l||(a=a||[]).push(c,\"\"+l):\"suppressContentEditableWarning\"!==c&&\"suppressHydrationWarning\"!==c&&(ua.hasOwnProperty(c)?(null!=l&&df(e,c),a||k===l||(a=[])):(a=a||[]).push(c,l))}h&&(a=a||[]).push(\"style\",h);e=a;(b.updateQueue=e)&&zh(b)}};Dh=function(a,b,c,d){c!==d&&zh(b)};\nfunction Eh(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=Bc(c));null!==c&&Ac(c.type);b=b.value;null!==a&&1===a.tag&&Ac(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Fh(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Gh(a,c)}else b.current=null}\nfunction Hh(a){\"function\"===typeof Af&&Af(a);switch(a.tag){case 1:Fh(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Gh(a,c)}break;case 5:Fh(a);break;case 4:Ih(a)}}function Jh(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Kh(a){a:{for(var b=a.return;null!==b;){if(Jh(b)){var c=b;break a}b=b.return}r(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:r(\"161\")}c.effectTag&16&&(Xe(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Jh(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(g=b,h=e.stateNode,8===g.nodeType?(f=g.parentNode,f.insertBefore(h,g)):(f=g,f.appendChild(h)),g=g._reactRootContainer,null!==g&&void 0!==g||null!==f.onclick||(f.onclick=ef)):b.appendChild(e.stateNode);\nelse if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction Ih(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?r(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(Hh(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?(d=b.stateNode.containerInfo,e=!0):Hh(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction Lh(a,b){switch(b.tag){case 1:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Ma]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&Sc(c,d);cf(a,e);b=cf(a,d);for(e=0;e\\x3c/script>\",l=e.removeChild(e.firstChild)):\"string\"===typeof p.is?l=l.createElement(e,{is:p.is}):(l=l.createElement(e),\"select\"===e&&p.multiple&&(l.multiple=!0)):l=l.createElementNS(k,e);e=l;e[La]=m;e[Ma]=f;Ah(e,b,!1,!1);p=e;l=h;m=f;var v=g,B=cf(l,m);switch(l){case \"iframe\":case \"object\":H(\"load\",\np);g=m;break;case \"video\":case \"audio\":for(g=0;g=w)v=0;else if(-1===v||wd||0!==f&&f>d||0!==g&&g>d){Of(a,d);ei(a,b,\nd,a.expirationTime,-1);return}if(!a.didError&&!c){a.didError=!0;d=a.nextExpirationTimeToWorkOn=d;c=a.expirationTime=1;ei(a,b,d,c,-1);return}}c||-1===Wh?(a.pendingCommitExpirationTime=d,a.finishedWork=b):(Of(a,d),c=10*(Pf(a,d)-2),cc?0:c))}}\nfunction Gh(a,b){var c;a:{Vh&&!Yh?r(\"263\"):void 0;for(c=a.return;null!==c;){switch(c.tag){case 1:var d=c.stateNode;if(\"function\"===typeof c.type.getDerivedStateFromError||\"function\"===typeof d.componentDidCatch&&(null===Ph||!Ph.has(d))){a=bg(b,a);a=Oh(c,a,1);Vf(c,a);xg(c,1);c=void 0;break a}break;case 3:a=bg(b,a);a=Mh(c,a,1);Vf(c,a);xg(c,1);c=void 0;break a}c=c.return}3===a.tag&&(c=bg(b,a),c=Mh(a,c,1),Vf(a,c),xg(a,1));c=void 0}return c}\nfunction wg(a,b){0!==Uh?a=Uh:Vh?a=Yh?1:S:b.mode&1?(a=fi?2+10*(((a-2+15)/10|0)+1):2+25*(((a-2+500)/25|0)+1),null!==R&&a===S&&(a+=1)):a=1;fi&&a>gi&&(gi=a);return a}\nfunction di(a,b,c,d){var e=a.earliestSuspendedTime;var f=a.latestSuspendedTime;if(0!==e&&d>=e&&d<=f){f=e=d;a.didError=!1;var g=a.latestPingedTime;if(0===g||gb)a.expirationTime=b;var c=a.alternate;null!==c&&(0===c.expirationTime||c.expirationTime>b)&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;if(0===d.childExpirationTime||d.childExpirationTime>b)d.childExpirationTime=b;null!==c&&(0===c.childExpirationTime||c.childExpirationTime>b)&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}return null===\ne?null:e}function xg(a,b){a=hi(a,b);null!==a&&(!Vh&&0!==S&&bki&&(ji=0,r(\"185\")))}function li(a,b,c,d,e){var f=Uh;Uh=1;try{return a(b,c,d,e)}finally{Uh=f}}var U=null,V=null,mi=0,ni=void 0,W=!1,X=null,Y=0,gi=0,oi=!1,pi=!1,qi=null,ri=null,Z=!1,si=!1,fi=!1,ti=null,ui=da.unstable_now(),vi=(ui/10|0)+2,wi=vi,ki=50,ji=0,xi=null,yi=1;function zi(){vi=((da.unstable_now()-ui)/10|0)+2}\nfunction Ai(a,b){if(0!==mi){if(b>mi)return;null!==ni&&da.unstable_cancelCallback(ni)}mi=b;a=da.unstable_now()-ui;ni=da.unstable_scheduleCallback(Bi,{timeout:10*(b-2)-a})}function ei(a,b,c,d,e){a.expirationTime=d;0!==e||ci()?0=c&&(b.nextExpirationTimeToWorkOn=vi);b=b.nextScheduledRoot}while(b!==U)}Gi(0,a)}\nfunction Gi(a,b){ri=b;Ei();if(null!==ri)for(zi(),wi=vi;null!==X&&0!==Y&&(0===a||a>=Y)&&(!oi||vi>=Y);)Fi(X,Y,vi>=Y),Ei(),zi(),wi=vi;else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Fi(X,Y,!0),Ei();null!==ri&&(mi=0,ni=null);0!==Y&&Ai(X,Y);ri=null;oi=!1;ji=0;xi=null;if(null!==ti)for(a=ti,ti=null,b=0;ba.latestSuspendedTime?(a.earliestSuspendedTime=0,a.latestSuspendedTime=0,a.latestPingedTime=0,Mf(a,h)):hSb){var cj=Sb;Sb=fb;fb=cj}var Tb=ne(E,fb),Ja=ne(E,Sb);if(Tb&&Ja&&(1!==ba.rangeCount||ba.anchorNode!==Tb.node||ba.anchorOffset!==Tb.offset||ba.focusNode!==\nJa.node||ba.focusOffset!==Ja.offset)){var Xc=ye.createRange();Xc.setStart(Tb.node,Tb.offset);ba.removeAllRanges();fb>Sb?(ba.addRange(Xc),ba.extend(Ja.node,Ja.offset)):(Xc.setEnd(Ja.node,Ja.offset),ba.addRange(Xc))}}}for(var ze=[],gb=E;gb=gb.parentNode;)1===gb.nodeType&&ze.push({element:gb,left:gb.scrollLeft,top:gb.scrollTop});\"function\"===typeof E.focus&&E.focus();for(var Ae=0;Aeyi?!1:oi=!0}function Nh(a){null===X?r(\"246\"):void 0;X.expirationTime=0;pi||(pi=!0,qi=a)}function Ii(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Gi(1,null)}}function Ji(a,b){if(Z&&!si){si=!0;try{return a(b)}finally{si=!1}}return a(b)}\nfunction Ki(a,b,c){if(fi)return a(b,c);Z||W||0===gi||(Gi(gi,null),gi=0);var d=fi,e=Z;Z=fi=!0;try{return a(b,c)}finally{fi=d,(Z=e)||W||Gi(1,null)}}\nfunction Li(a,b,c,d,e){var f=b.current;a:if(c){c=c._reactInternalFiber;b:{2===Gd(c)&&1===c.tag?void 0:r(\"170\");var g=c;do{switch(g.tag){case 3:g=g.stateNode.context;break b;case 1:if(M(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}}g=g.return}while(null!==g);r(\"171\");g=void 0}if(1===c.tag){var h=c.type;if(M(h)){c=wf(c,h,g);break a}}c=g}else c=qf;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Tf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);\nVf(f,e);xg(f,d);return d}function Mi(a,b,c,d){var e=b.current,f=vg();e=wg(f,e);return Li(a,b,c,e,d)}function Pi(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Qi(a,b,c){var d=3Q.length&&Q.push(a)}\nfunction T(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;h