UNPKG

@zoom/meetingsdk

Version:
22 lines (20 loc) 98.1 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.webIM=t():e.webIM=t()}(self,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=30)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WEBINAR_QA_COMMAND=t.MEMBER_CHANGE_ACTION=t.POLLING_USER_ACTION=t.POLLING_USER_ACTION_ERROR=t.POLLING_UI_STATUS_INDICATION=t.XMPP_EVENTS=t.XMPP_STATUS=t.NORMAL_EVENTS=t.UI_CALLBACK_EVENT_NAMES=t.WebimStatus=t.WEBINAR_MESSAGE_TYPE=t.USER_ROLE=void 0;!function(e){e.host="10",e.pannelist="20",e.attendee="30"}(t.USER_ROLE||(t.USER_ROLE={})),function(e){e[e.ChatMsgType_to_All=0]="ChatMsgType_to_All",e[e.ChatMsgType_to_Panelist=1]="ChatMsgType_to_Panelist",e[e.ChatMsgType_to_Individual_ccPanelist=2]="ChatMsgType_to_Individual_ccPanelist",e[e.ChatMsgType_to_Individual=3]="ChatMsgType_to_Individual"}(t.WEBINAR_MESSAGE_TYPE||(t.WEBINAR_MESSAGE_TYPE={})),t.WebimStatus={INIT:0,CONNECTING:1,CONNECTED:2,DISCONNECTED:3,RECONNECTING:4,FAIL:5,status:-1,canReopen:!1},function(e){e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.POOL="POOL",e.CONNFAIL="CONNFAIL",e.OnlineMembers="OnlineMembers",e.GroupChange="GroupChange",e.RosterChange="RosterChange",e.WebinarQA="WebinarQA",e.Message="Message",e.XMPPStatusResponse="XMPPStatusResponse",e.ON_WS_MESSAGE="ON_WS_MESSAGE",e.ON_WELCOME_MESSAGE="ON_WELCOME_MESSAGE",e.ON_WEBSOCKET_CONNECTED="ON_WEBSOCKET_CONNECTED",e.DELETE_QUESTION_RESPONSE="DELETE_QUESTION_RESPONSE",e.DELETE_COMMENT_RESPONSE="DELETE_COMMENT_RESPONSE",e.POLLING_DOC_UPDATE="POLLING_DOC_UPDATE",e.POLLING_UI_STATUS_UPDATE="POLLING_UI_STATUS_UPDATE",e.POLLING_UI_ACTION_FAIL="POLLING_UI_ACTION_FAIL",e.POLLING_DOWNLOAD_LINK="POLLING_DOWNLOAD_LINK",e.POLLING_DOCS_INFO="POLLING_DOCS_INFO"}(t.UI_CALLBACK_EVENT_NAMES||(t.UI_CALLBACK_EVENT_NAMES={})),function(e){e.SEND_THIS_MESSAGE="SEND_THIS_MESSAGE",e.CLOSE_SOCKET="CLOSE_SOCKET",e.JUST_CLOSE_SOCKET="JUST_CLOSE_SOCKET",e.DISABLE_RECONNECT="DISABLE_RECONNECT"}(t.NORMAL_EVENTS||(t.NORMAL_EVENTS={})),function(e){e.fail="fail",e.success="success"}(t.XMPP_STATUS||(t.XMPP_STATUS={})),function(e){e[e.WS_XMPP_JOIN_REQUEST=24576]="WS_XMPP_JOIN_REQUEST",e[e.WS_XMPP_STATUS_RESPONSE=24577]="WS_XMPP_STATUS_RESPONSE",e[e.WS_XMPP_LOWHAND_FROM_CLIENT=24578]="WS_XMPP_LOWHAND_FROM_CLIENT",e[e.WS_XMPP_LOWHAND_FROM_SERVER=24579]="WS_XMPP_LOWHAND_FROM_SERVER",e[e.WS_XMPP_RAISEHAND_FROM_CLIENT=24580]="WS_XMPP_RAISEHAND_FROM_CLIENT",e[e.WS_XMPP_RAISEHAND_FROM_SERVER=24581]="WS_XMPP_RAISEHAND_FROM_SERVER",e[e.WS_XMPP_WEBINAR_MESSAGE_FROM_CLIENT=24582]="WS_XMPP_WEBINAR_MESSAGE_FROM_CLIENT",e[e.WS_XMPP_WEBINAR_MESSAGE_FROM_SERVER=24583]="WS_XMPP_WEBINAR_MESSAGE_FROM_SERVER",e[e.WS_XMPP_WEBINAR_ANSWER_FROM_CLIENT=24584]="WS_XMPP_WEBINAR_ANSWER_FROM_CLIENT",e[e.WS_XMPP_WEBINAR_ANSWER_FROM_SERVER=24585]="WS_XMPP_WEBINAR_ANSWER_FROM_SERVER",e[e.WS_XMPP_WEBINAR_ANSWERONLINE_FROM_CLIENT=24586]="WS_XMPP_WEBINAR_ANSWERONLINE_FROM_CLIENT",e[e.WS_XMPP_WEBINAR_ANSWERONLINE_FROM_SERVER=24587]="WS_XMPP_WEBINAR_ANSWERONLINE_FROM_SERVER",e[e.WS_XMPP_REOPEN_QUESTION_FROM_CLIENT=24588]="WS_XMPP_REOPEN_QUESTION_FROM_CLIENT",e[e.WS_XMPP_REOPEN_QUESTION_FROM_SERVER=24589]="WS_XMPP_REOPEN_QUESTION_FROM_SERVER",e[e.WS_XMPP_CHANGE_QUESTION_OPEN_STATE_FROM_CLIENT=24590]="WS_XMPP_CHANGE_QUESTION_OPEN_STATE_FROM_CLIENT",e[e.WS_XMPP_CHANGE_QUESTION_OPEN_STATE_FROM_SERVER=24591]="WS_XMPP_CHANGE_QUESTION_OPEN_STATE_FROM_SERVER",e[e.WS_XMPP_ASK_FROM_CLIENT=24592]="WS_XMPP_ASK_FROM_CLIENT",e[e.WS_XMPP_ASK_FROM_SERVER=24593]="WS_XMPP_ASK_FROM_SERVER",e[e.WS_XMPP_BUDDY_FROM_SERVER=24595]="WS_XMPP_BUDDY_FROM_SERVER",e[e.WS_XMPP_PROMOTE_OR_NOT_FROM_CLIENT=24596]="WS_XMPP_PROMOTE_OR_NOT_FROM_CLIENT",e[e.WS_XMPP_PROMOTE_OR_NOT_FROM_SERVER=24597]="WS_XMPP_PROMOTE_OR_NOT_FROM_SERVER",e[e.WS_XMPP_VOTE_FROM_CLIENT=24598]="WS_XMPP_VOTE_FROM_CLIENT",e[e.WS_XMPP_VOTE_FROM_SERVER=24599]="WS_XMPP_VOTE_FROM_SERVER",e[e.WS_XMPP_RENAME_FROM_CLIENT=24600]="WS_XMPP_RENAME_FROM_CLIENT",e[e.WS_XMPP_RENAME_FROM_SERVER=24601]="WS_XMPP_RENAME_FROM_SERVER",e[e.WS_XMPP_USERREMOVE_FROM_CLIENT=24602]="WS_XMPP_USERREMOVE_FROM_CLIENT",e[e.WS_XMPP_USERREMOVE_FROM_SERVER=24603]="WS_XMPP_USERREMOVE_FROM_SERVER",e[e.WS_POLLING_USER_ACTION=24604]="WS_POLLING_USER_ACTION",e[e.WS_POLLING_DOC_UPDATE_INDICATION=24605]="WS_POLLING_DOC_UPDATE_INDICATION",e[e.WS_POLLING_UI_STATUS_INDICATION=24606]="WS_POLLING_UI_STATUS_INDICATION",e[e.WS_POLLING_USER_ACTION_ERROR=24607]="WS_POLLING_USER_ACTION_ERROR",e[e.WS_POLLING_REPORT_DOWNLOAD_LINK_INDICATION=24608]="WS_POLLING_REPORT_DOWNLOAD_LINK_INDICATION",e[e.WS_EXPEL_ATTENDEE=24609]="WS_EXPEL_ATTENDEE",e[e.WS_PRACTICE_SESSION=24610]="WS_PRACTICE_SESSION",e[e.WS_ROLE_CHANGE_REQUEST_SENT=24611]="WS_ROLE_CHANGE_REQUEST_SENT",e[e.WS_EXPEL_ATTENDEE_REQUEST_SENT=24612]="WS_EXPEL_ATTENDEE_REQUEST_SENT",e[e.WS_PRACTICE_SESSION_REQUEST_SENT=24613]="WS_PRACTICE_SESSION_REQUEST_SENT",e[e.WS_XMPP_DELETE_QUESTION_FROM_CLIENT=24614]="WS_XMPP_DELETE_QUESTION_FROM_CLIENT",e[e.WS_XMPP_DELETE_QUESTION_FROM_SERVER=24615]="WS_XMPP_DELETE_QUESTION_FROM_SERVER",e[e.WS_XMPP_DELETE_COMMENT_FROM_CLIENT=24616]="WS_XMPP_DELETE_COMMENT_FROM_CLIENT",e[e.WS_XMPP_DELETE_COMMENT_FROM_SERVER=24617]="WS_XMPP_DELETE_COMMENT_FROM_SERVER",e[e.WS_XMPP_SET_SKIN_TONE=24618]="WS_XMPP_SET_SKIN_TONE",e[e.WS_CONF_POLLING_DOCS_INFO=24619]="WS_CONF_POLLING_DOCS_INFO"}(t.XMPP_EVENTS||(t.XMPP_EVENTS={})),function(e){e[e.ZMPollUIStatus_No_Poll=0]="ZMPollUIStatus_No_Poll",e[e.ZMPollUIStatus_Not_Start=1]="ZMPollUIStatus_Not_Start",e[e.ZMPollUIStatus_Starting_Poll=2]="ZMPollUIStatus_Starting_Poll",e[e.ZMPollUIStatus_In_Progress=3]="ZMPollUIStatus_In_Progress",e[e.ZMPollUIStatus_Doing_Poll=4]="ZMPollUIStatus_Doing_Poll",e[e.ZMPollUIStatus_Submitting_Poll=5]="ZMPollUIStatus_Submitting_Poll",e[e.ZMPollUIStatus_Submitted_Poll=6]="ZMPollUIStatus_Submitted_Poll",e[e.ZMPollUIStatus_Starting_Share=7]="ZMPollUIStatus_Starting_Share",e[e.ZMPollUIStatus_Sharing_Results=8]="ZMPollUIStatus_Sharing_Results",e[e.ZMPollUIStatus_Viewing_Results=9]="ZMPollUIStatus_Viewing_Results",e[e.ZMPollUIStatus_Stopping_Poll=10]="ZMPollUIStatus_Stopping_Poll",e[e.ZMPollUIStatus_Stopping_Share=11]="ZMPollUIStatus_Stopping_Share",e[e.ZMPollUIStatus_Closed=12]="ZMPollUIStatus_Closed",e[e.ZMPollUIStatus_Relaunching_Poll=13]="ZMPollUIStatus_Relaunching_Poll"}(t.POLLING_UI_STATUS_INDICATION||(t.POLLING_UI_STATUS_INDICATION={})),function(e){e[e.ERROR_POLL_CLOSED=1]="ERROR_POLL_CLOSED",e[e.ERROR_INVALID_PARAMS=2]="ERROR_INVALID_PARAMS",e[e.ERROR_WRONG_ACTION=3]="ERROR_WRONG_ACTION",e[e.ERROR_NO_PERMISSION=4]="ERROR_NO_PERMISSION",e[e.ERROR_DUPLICATE_ACTION=5]="ERROR_DUPLICATE_ACTION",e[e.ERROR_RET_WEB_CONNECTION_FAILED=1e3]="ERROR_RET_WEB_CONNECTION_FAILED",e[e.ERROR_RET_RESPOND_DATA_TO_STREAM_FAILED=1001]="ERROR_RET_RESPOND_DATA_TO_STREAM_FAILED",e[e.ERROR_RET_NO_MEETING_ITEM=1002]="ERROR_RET_NO_MEETING_ITEM",e[e.ERROR_RET_NEW_OBJ_FAILED=1003]="ERROR_RET_NEW_OBJ_FAILED",e[e.ERROR_RET_RESPOND_RET_WRONG=1004]="ERROR_RET_RESPOND_RET_WRONG",e[e.ERROR_RET_READ_FROM_PROTO_FAILED=1005]="ERROR_RET_READ_FROM_PROTO_FAILED",e[e.ERROR_RET_TOKEN_EXPIRED=1006]="ERROR_RET_TOKEN_EXPIRED",e[e.ERROR_RET_OVER_TIME=1007]="ERROR_RET_OVER_TIME",e[e.ERROR_POLLING=4400]="ERROR_POLLING",e[e.ERROR_OPEN_POLLING=4401]="ERROR_OPEN_POLLING",e[e.ERROR_SHARE_POLLING=4402]="ERROR_SHARE_POLLING"}(t.POLLING_USER_ACTION_ERROR||(t.POLLING_USER_ACTION_ERROR={})),function(e){e.start="start",e.close="close",e.reopen="reopen",e.startShareResult="share",e.stopShareResult="stopshare",e.submit="submit"}(t.POLLING_USER_ACTION||(t.POLLING_USER_ACTION={})),function(e){e.add="add",e.list="list",e.remove="memberremove",e.rename="rename",e.update="UPDATE"}(t.MEMBER_CHANGE_ACTION||(t.MEMBER_CHANGE_ACTION={})),function(e){e.upvote="upvote",e.downvote="downvote",e.dismiss="dismiss",e.reopen="reopen",e.private="private",e.publicview="publicview",e.publicviewFromServer="make_question_public_view",e.livestart="livestart",e.liveend="liveend",e.livecancel="livecancel",e.deleteQuestion="deletequestion",e.deleteComment="deletecomment"}(t.WEBINAR_QA_COMMAND||(t.WEBINAR_QA_COMMAND={}))},function(e,t,n){var r=n(19);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.POOL_ACTION=void 0,function(e){e.expel="expel",e.promote="promote",e.depromote="depromote",e.memberChange="memberChange",e.putdownhands="putdownhands",e.raisehand="raisehand",e.lowerhand="lowerhand"}(t.POOL_ACTION||(t.POOL_ACTION={}))},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r; /*! * EventEmitter v5.2.6 - git.io/ee * Unlicense - http://unlicense.org/ * Oliver Caldwell - https://oli.me.uk/ * @preserve */!function(t){"use strict";function o(){}var i=o.prototype,s=t.EventEmitter;function a(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function u(e){return function(){return this[e].apply(this,arguments)}}i.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp)for(n in t={},r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n]);else t=r[e]||(r[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},i.addListener=function(e,t){if(!function e(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&e(t.listener)}(t))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(e),o="object"==typeof t;for(n in r)r.hasOwnProperty(n)&&-1===a(r[n],t)&&r[n].push(o?t:{listener:t,once:!1});return this},i.on=u("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=u("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,t){var n,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&-1!==(n=a(o[r],t))&&o[r].splice(n,1);return this},i.off=u("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var r,o,i=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)i.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(o=t[r])&&("function"==typeof o?i.call(this,r,o):s.call(this,r,o));return this},i.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},i.removeAllListeners=u("removeEvent"),i.emitEvent=function(e,t){var n,r,o,i,s=this.getListenersAsObject(e);for(i in s)if(s.hasOwnProperty(i))for(n=s[i].slice(0),o=0;o<n.length;o++)!0===(r=n[o]).once&&this.removeListener(e,r.listener),r.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},i.trigger=u("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},o.noConflict=function(){return t.EventEmitter=s,o},void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof window?window:this||{})},function(e,t,n){var r=n(4).default,o=n(9);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(18);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(21)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(26),o=n(27),i=n(28),s=n(29);e.exports=function(e){return r(e)||o(e)||i(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t,n,r,o,i,s){try{var a=e[i](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise(function(o,i){var s=e.apply(t,r);function a(e){n(s,o,i,a,u,"next",e)}function u(e){n(s,o,i,a,u,"throw",e)}a(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(22);function o(){return e.exports=o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=r(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},e.exports.__esModule=!0,e.exports.default=e.exports,o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t,n,r,o){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer?(Object.defineProperty(e,t,i),null):i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",function(){return ne}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function u(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}var c="An invariant failed, however the error is obfuscated because this is an production build.",l=[];Object.freeze(l);var p={};function _(){return"undefined"!=typeof window?window:e}function f(){return++Re.mobxGuid}function d(e){throw h(!1,e),"X"}function h(e,t){if(!e)throw new Error("[mobx] "+(t||c))}Object.freeze(p);function E(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function m(e){return null!==e&&"object"==typeof e}function y(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function O(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function S(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function g(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return m(e)&&!0===e[n]}}function N(e){return void 0!==_().Map&&e instanceof _().Map}function b(e){return e instanceof Set}function M(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}function P(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function A(e){return null===e?null:"object"==typeof e?""+e:e}function R(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function T(e,t){S(e,R(),t)}function I(e){return e[R()]=w,e}function L(){return"function"==typeof Symbol&&Symbol.toStringTag||"@@toStringTag"}function w(){return this}var C=function(){function e(e){void 0===e&&(e="Atom@"+f()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=_e.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.reportObserved=function(){return xe(this)},e.prototype.reportChanged=function(){we(),function(e){if(e.lowestObserverState===_e.STALE)return;e.lowestObserverState=_e.STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===_e.UP_TO_DATE&&(r.isTracing!==fe.NONE&&De(r,e),r.onBecomeStale()),r.dependenciesState=_e.STALE}}(this),Ce()},e.prototype.toString=function(){return this.name},e}(),x=g("Atom",C);function D(e,t,n){void 0===t&&(t=v),void 0===n&&(n=v);var r,o=new C(e);return nt("onBecomeObserved",o,t,r),tt(o,n),o}function k(e,t){return e===t}var W={identity:k,structural:function(e,t){return Qt(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||k(e,t)}},U={},V={};function j(e,t){var n=t?U:V;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return B(this),this[e]},set:function(t){B(this),this[e]=t}})}function B(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in O(e,"__mobxDidRunLazyInitializers",!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function X(e,t){return function(){var n,r=function(r,o,i,a){if(!0===a)return t(r,o,i,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,"__mobxDecorators")){var u=r.__mobxDecorators;O(r,"__mobxDecorators",s({},u))}return r.__mobxDecorators[o]={prop:o,propertyCreator:t,descriptor:i,decoratorTarget:r,decoratorArguments:n},j(o,e)};return G(arguments)?(n=l,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function G(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}function F(e,t,n){return st(e)?e:Array.isArray(e)?ne.array(e,{name:n}):y(e)?ne.object(e,void 0,{name:n}):N(e)?ne.map(e,{name:n}):b(e)?ne.set(e,{name:n}):e}function H(e){return e}function q(e){var t=X(!0,function(t,n,r,o,i){Ut(t,n,r?r.initializer?r.initializer.call(t):r.value:void 0,e)}),n=(void 0!==r&&r.env,t);return n.enhancer=e,n}var Q={deep:!0,name:void 0,defaultDecorator:void 0},K={deep:!1,name:void 0,defaultDecorator:void 0};function $(e){return null==e?Q:"string"==typeof e?{name:e,deep:!0}:e}function J(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?H:F}Object.freeze(Q),Object.freeze(K);var Z=q(F),z=q(function(e,t,n){return null==e?e:Gt(e)||Rt(e)||wt(e)||Dt(e)?e:Array.isArray(e)?ne.array(e,{name:n,deep:!1}):y(e)?ne.object(e,void 0,{name:n,deep:!1}):N(e)?ne.map(e,{name:n,deep:!1}):b(e)?ne.set(e,{name:n,deep:!1}):d(!1)}),Y=q(H),ee=q(function(e,t,n){return Qt(e,t)?t:e});var te={box:function(e,t){arguments.length>2&&re("box");var n=$(t);return new le(e,J(n),n.name,!0,n.equals)},shallowBox:function(e,t){return arguments.length>2&&re("shallowBox"),ne.box(e,{name:t,deep:!1})},array:function(e,t){arguments.length>2&&re("array");var n=$(t);return new gt(e,J(n),n.name)},shallowArray:function(e,t){return arguments.length>2&&re("shallowArray"),ne.array(e,{name:t,deep:!1})},map:function(e,t){arguments.length>2&&re("map");var n=$(t);return new It(e,J(n),n.name)},shallowMap:function(e,t){return arguments.length>2&&re("shallowMap"),ne.map(e,{name:t,deep:!1})},set:function(e,t){arguments.length>2&&re("set");var n=$(t);return new xt(e,J(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&re("object");var r=$(n);return rt({},e,t,r)},shallowObject:function(e,t){return"string"==typeof arguments[1]&&re("shallowObject"),ne.object(e,{},{name:t,deep:!1})},ref:Y,shallow:z,deep:Z,struct:ee},ne=function(e,t,n){if("string"==typeof arguments[1])return Z.apply(null,arguments);if(st(e))return e;var r=y(e)?ne.object(e,t,n):Array.isArray(e)?ne.array(e,t):N(e)?ne.map(e,t):b(e)?ne.set(e,t):e;if(r!==e)return r;d(!1)};function re(e){d("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(te).forEach(function(e){return ne[e]=te[e]});var oe=X(!1,function(e,t,n,r,o){var i=n.get,a=n.set,u=o[0]||{};!function(e,t,n){var r=Wt(e);n.name=r.name+"."+t,n.context=e,r.values[t]=new pe(n),Object.defineProperty(e,t,function(e){return jt[e]||(jt[e]={configurable:Re.computedConfigurable,enumerable:!1,get:function(){return Bt(this).read(this,e)},set:function(t){Bt(this).write(this,e,t)}})}(t))}(e,t,s({get:i,set:a},u))});oe({equals:W.structural});function ie(e,t){var n=function(){return se(e,t,this,arguments)};return n.isMobxAction=!0,n}function se(e,t,n,r){var o=function(e,t,n,r){var o=Xe()&&!!e,i=0;if(o){i=Date.now();var s=r&&r.length||0,a=new Array(s);if(s>0)for(var u=0;u<s;u++)a[u]=r[u];Fe({type:"action",name:e,object:n,arguments:a})}var c=ge();we();var l=ue(!0);return{prevDerivation:c,prevAllowStateChanges:l,notifySpy:o,startTime:i}}(e,0,n,r),i=!0;try{var s=t.apply(n,r);return i=!1,s}finally{i?(Re.suppressReactionErrors=i,ae(o),Re.suppressReactionErrors=!1):ae(o)}}function ae(e){ce(e.prevAllowStateChanges),Ce(),Ne(e.prevDerivation),e.notifySpy&&qe({time:Date.now()-e.startTime})}function ue(e){var t=Re.allowStateChanges;return Re.allowStateChanges=e,t}function ce(e){Re.allowStateChanges=e}var le=function(e){function t(t,n,r,o,i){void 0===r&&(r="ObservableValue@"+f()),void 0===o&&(o=!0),void 0===i&&(i=W.default);var s=e.call(this,r)||this;return s.enhancer=n,s.name=r,s.equals=i,s.hasUnreportedChange=!1,s.value=n(t,void 0,r),o&&Xe()&&Ge({type:"create",name:s.name,newValue:""+s.value}),s}return i(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==Re.UNCHANGED){var n=Xe();n&&Fe({type:"update",name:this.name,newValue:e,oldValue:t}),this.setNewValue(e),n&&qe()}},t.prototype.prepareNewValue=function(e){if(me(this),ut(this)){var t=lt(this,{object:this,type:"update",newValue:e});if(!t)return Re.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Re.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),pt(this)&&ft(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return ct(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),_t(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return A(this.get())},t}(C);le.prototype[P()]=le.prototype.valueOf;g("ObservableValue",le);var pe=function(){function e(e){this.dependenciesState=_e.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=_e.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+f(),this.value=new he(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=fe.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+f(),e.set&&(this.setter=ie(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?W.structural:W.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==_e.UP_TO_DATE)return;e.lowestObserverState=_e.POSSIBLY_STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===_e.UP_TO_DATE&&(r.dependenciesState=_e.POSSIBLY_STALE,r.isTracing!==fe.NONE&&De(r,e),r.onBecomeStale())}}(this)},e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.get=function(){this.isComputing&&d("Cycle detected in computation "+this.name+": "+this.derivation),0!==Re.inBatch||0!==this.observers.length||this.keepAlive?(xe(this),ve(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===_e.STALE)return;e.lowestObserverState=_e.STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===_e.POSSIBLY_STALE?r.dependenciesState=_e.STALE:r.dependenciesState===_e.UP_TO_DATE&&(e.lowestObserverState=_e.UP_TO_DATE)}}(this)):ve(this)&&(this.warnAboutUntrackedRead(),we(),this.value=this.computeValue(!1),Ce());var e=this.value;if(Ee(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(Ee(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){h(!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?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else h(!1,!1)},e.prototype.trackAndCompute=function(){Xe()&&Ge({object:this.scope,type:"compute",name:this.name});var e=this.value,t=this.dependenciesState===_e.NOT_TRACKING,n=this.computeValue(!0),r=t||Ee(e)||Ee(n)||!this.equals(e,n);return r&&(this.value=n),r},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Re.computationDepth++,e)t=ye(this,this.derivation,this.scope);else if(!0===Re.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new he(e)}return Re.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(Oe(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return ze(function(){var i=n.get();if(!r||t){var s=ge();e({type:"update",object:n,newValue:i,oldValue:o}),Ne(s)}r=!1,o=i})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return A(this.get())},e}();pe.prototype[P()]=pe.prototype.valueOf;var _e,fe,de=g("ComputedValue",pe);!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(_e||(_e={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(fe||(fe={}));var he=function(e){this.cause=e};function Ee(e){return e instanceof he}function ve(e){switch(e.dependenciesState){case _e.UP_TO_DATE:return!1;case _e.NOT_TRACKING:case _e.STALE:return!0;case _e.POSSIBLY_STALE:for(var t=ge(),n=e.observing,r=n.length,o=0;o<r;o++){var i=n[o];if(de(i)){if(Re.disableErrorBoundaries)i.get();else try{i.get()}catch(e){return Ne(t),!0}if(e.dependenciesState===_e.STALE)return Ne(t),!0}}return be(e),Ne(t),!1}}function me(e){var t=e.observers.length>0;Re.computationDepth>0&&t&&d(!1),Re.allowStateChanges||!t&&"strict"!==Re.enforceActions||d(!1)}function ye(e,t,n){be(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Re.runId;var r,o=Re.trackingDerivation;if(Re.trackingDerivation=e,!0===Re.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(e){r=new he(e)}return Re.trackingDerivation=o,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=_e.UP_TO_DATE,o=0,i=e.unboundDepsCount,s=0;s<i;s++){var a=n[s];0===a.diffValue&&(a.diffValue=1,o!==s&&(n[o]=a),o++),a.dependenciesState>r&&(r=a.dependenciesState)}n.length=o,e.newObserving=null,i=t.length;for(;i--;){var a=t[i];0===a.diffValue&&Ie(a,e),a.diffValue=0}for(;o--;){var a=n[o];1===a.diffValue&&(a.diffValue=0,Te(a,e))}r!==_e.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function Oe(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Ie(t[n],e);e.dependenciesState=_e.NOT_TRACKING}function Se(e){var t=ge(),n=e();return Ne(t),n}function ge(){var e=Re.trackingDerivation;return Re.trackingDerivation=null,e}function Ne(e){Re.trackingDerivation=e}function be(e){if(e.dependenciesState!==_e.UP_TO_DATE){e.dependenciesState=_e.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=_e.UP_TO_DATE}}var Me=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Pe=!0,Ae=!1,Re=function(){var e=_();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Pe=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Me).version&&(Pe=!1),Pe?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Me):(setTimeout(function(){Ae||d("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Me)}();function Te(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ie(e,t){if(1===e.observers.length)e.observers.length=0,Le(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function Le(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Re.pendingUnobservations.push(e))}function we(){Re.inBatch++}function Ce(){if(0==--Re.inBatch){Ve();for(var e=Re.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof pe&&n.suspend())}Re.pendingUnobservations=[]}}function xe(e){var t=Re.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.length&&Re.inBatch>0&&Le(e),!1)}function De(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===fe.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}((r=e,ot(Ft(r,o))),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof pe?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var r,o}var ke=function(){function e(e,t,n){void 0===e&&(e="Reaction@"+f()),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.observing=[],this.newObserving=[],this.dependenciesState=_e.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+f(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=fe.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Re.pendingReactions.push(this),Ve())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(we(),this._isScheduled=!1,ve(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Xe()&&Ge({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}Ce()}},e.prototype.track=function(e){we();var t,n=Xe();n&&(t=Date.now(),Fe({name:this.name,type:"reaction"})),this._isRunning=!0;var r=ye(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Oe(this),Ee(r)&&this.reportExceptionInDerivation(r.cause),n&&qe({time:Date.now()-t}),Ce()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Re.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Re.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Xe()&&Ge({type:"error",name:this.name,message:n,error:""+e}),Re.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(we(),Oe(this),Ce()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return Re.trackingDerivation;case 1:return Ft(e[0]);case 2:return Ft(e[0],e[1])}}(e);if(!r)return d(!1);r.isTracing===fe.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled");r.isTracing=n?fe.BREAK:fe.LOG}(this,e)},e}();var We=100,Ue=function(e){return e()};function Ve(){Re.inBatch>0||Re.isRunningReactions||Ue(je)}function je(){Re.isRunningReactions=!0;for(var e=Re.pendingReactions,t=0;e.length>0;){++t===We&&(console.error("Reaction doesn't converge to a stable state after "+We+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}Re.isRunningReactions=!1}var Be=g("Reaction",ke);function Xe(){return!!Re.spyListeners.length}function Ge(e){if(Re.spyListeners.length)for(var t=Re.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function Fe(e){Ge(s({},e,{spyReportStart:!0}))}var He={spyReportEnd:!0};function qe(e){Ge(e?s({},e,{spyReportEnd:!0}):He)}function Qe(){d(!1)}function Ke(e){return function(t,n,r){if(r){if(r.value)return{value:ie(e,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return ie(e,o.call(this))}}}return $e(e).apply(this,arguments)}}function $e(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){O(this,n,Je(e,t))}})}}var Je=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?ie(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?ie(e,t):1===arguments.length&&"string"==typeof e?Ke(e):!0!==r?Ke(t).apply(null,arguments):void(e[t]=ie(e.name||t,n.value))};function Ze(e,t,n){O(e,t,ie(t,n.bind(e)))}function ze(e,t){void 0===t&&(t=p);var n,r=t&&t.name||e.name||"Autorun@"+f();if(!t.scheduler&&!t.delay)n=new ke(r,function(){this.track(s)},t.onError);else{var o=et(t),i=!1;n=new ke(r,function(){i||(i=!0,o(function(){i=!1,n.isDisposed||n.track(s)}))},t.onError)}function s(){e(n)}return n.schedule(),n.getDisposer()}Je.bound=function(e,t,n,r){return!0===r?(Ze(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ze(this,t,n.value||n.initializer.call(this)),this[t]},set:Qe}:{enumerable:!1,configurable:!0,set:function(e){Ze(this,t,e)},get:function(){}}};var Ye=function(e){return e()};function et(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ye}function tt(e,t,n){return nt("onBecomeUnobserved",e,t,n)}function nt(e,t,n,r){var o="string"==typeof n?Ft(t,n):Ft(t),i="string"==typeof n?r:n,s=o[e];return"function"!=typeof s?d(!1):(o[e]=function(){s.call(this),i.call(this)},function(){o[e]=s})}function rt(e,t,n,r){var o=(r=$(r)).defaultDecorator||(!1===r.deep?Y:Z);B(e),Wt(e,r.name,o.enhancer),we();try{for(var i in t){var s=Object.getOwnPropertyDescriptor(t,i);0;var a=(n&&i in n?n[i]:s.get?oe:o)(e,i,s,!0);a&&Object.defineProperty(e,i,a)}}finally{Ce()}return e}function ot(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(ot)),r}function it(e,t){if(null==e)return!1;if(void 0!==t){if(Gt(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return Gt(e)||!!e.$mobx||x(e)||Be(e)||de(e)}function st(e){return 1!==arguments.length&&d(!1),it(e)}function at(e,t){void 0===t&&(t=void 0),we();try{return e.apply(t)}finally{Ce()}}function ut(e){return void 0!==e.interceptors&&e.interceptors.length>0}function ct(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),E(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function lt(e,t){var n=ge();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o<i&&(h(!(t=r[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{Ne(n)}}function pt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function _t(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),E(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function ft(e,t){var n=ge(),r=e.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](t);Ne(n)}}var dt,ht,Et,vt,mt=(dt=!1,ht={},Object.defineProperty(ht,"0",{set:function(){dt=!0}}),Object.create(ht)[0]=1,!1===dt),yt=0,Ot=function(){};Et=Ot,vt=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(Et.prototype,vt):void 0!==Et.prototype.__proto__?Et.prototype.__proto__=vt:Et.prototype=vt,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(e){Object.defineProperty(Ot.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})});var St=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.atom=new C(e||"ObservableArray@"+f()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return ct(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),_t(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>yt&&Pt(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;me(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=l),ut(this)){var i=lt(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return l;t=i.removedCount,n=i.added}var s=(n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)})).length-t;this.updateArrayLength(o,s);var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,u([e,t],n));var o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&Xe(),o=pt(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&Fe(s({},i,{name:this.atom.name})),this.atom.reportChanged(),o&&ft(this,i),r&&qe()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&Xe(),o=pt(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&Fe(s({},i,{name:this.atom.name})),this.atom.reportChanged(),o&&ft(this,i),r&&qe()},e}(),gt=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+f()),void 0===o&&(o=!1);var i=e.call(this)||this,s=new St(r,n,i,o);if(S(i,"$mobx",s),t&&t.length){var a=ue(!0);i.spliceWithArray(0,0,t),ce(a)}return mt&&Object.defineProperty(s.array,"0",Nt),i}return i(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map(function(e){return Rt(e)?e.peek():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},t.prototype.find=function(e,t,n){void 0===n&&(n=0),arguments.length;var r=this.findIndex.apply(this,arguments);return-1===r?void 0:this.get(r)},t.prototype.findIndex=function(e,t,n){void 0===n&&(n=0),arguments.length;for(var r=this.peek(),o=r.length,i=n;i<o;i++)if(e.call(t,r[i],i,this))return i;return-1},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.spliceWithArray=function(e,t,n){return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var r,o=this.$mobx.values;r=e<t?u(o.slice(0,e),o.slice(e+1,t+1),[o[e]],o.slice(t+1)):u(o.slice(0,t),[o[e]],o.slice(t,e),o.slice(e+1)),this.replace(r)}},t.prototype.get=function(e){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},t.prototype.set=function(e,t){var n=this.$mobx,r=n.values;if(e<r.length){me(n.atom);var o=r[e];if(ut(n)){var i=lt(n,{type:"update",object:this,index:e,newValue:t});if(!i)return;t=i.newValue}(t=n.enhancer(t,o))!==o&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}},t}(Ot);T(gt.prototype,function(){this.$mobx.atom.reportObserved();var e=this,t=0;return I({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})}),Object.defineProperty(gt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),O(gt.prototype,L(),"Array"),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){var t=Array.prototype[e];h("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),O(gt.prototype,e,function(){return t.apply(this.peek(),arguments)})}),function(e,t){for(var n=0;n<t.length;n++)O(e,t[n],e[t[n]])}(gt.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var Nt=bt(0);function bt(e){return{enumerable:!1,configurable:!1,get:function(){return this.get(e)},set:function(t){this.set(e,t)}}}function Mt(e){Object.defineProperty(gt.prototype,""+e,bt(e))}function Pt(e){for(var t=yt;t<e;t++)Mt(t);yt=e}Pt(1e3);var At=g("ObservableArrayAdministration",St);function Rt(e){return m(e)&&At(e.$mobx)}var Tt={},It=function(){function e(e,t,n){if(void 0===t&&(t=F),void 0===n&&(n="ObservableMap@"+f()),this.enhancer=t,this.name=n,this.$mobx=Tt,this._keys=new gt(void 0,H,this.name+".keys()",!0),"function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},