Files
im_webapp/umd/index.prod.js
T
2018-10-29 13:37:35 +03:00

2 lines
559 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Webapp=e()}}(function(){return function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){return i(t[a][1][e]||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}}()({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@firebase/util"),i=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o="[DEFAULT]",a=[],s=function(){function e(e,t,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled||!1,this.options_=r.deepCopy(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){a.push(e),setTimeout(function(){return e(null)},0)},removeAuthTokenListener:function(e){a=a.filter(function(t){return t!==e})}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed_(),this._automaticDataCollectionEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){e.firebase_.INTERNAL.removeApp(e.name_);var t=[];return Object.keys(e.services_).forEach(function(n){Object.keys(e.services_[n]).forEach(function(r){t.push(e.services_[n][r])})}),Promise.all(t.map(function(e){return e.INTERNAL.delete()}))}).then(function(){e.isDeleted_=!0,e.services_={}})},e.prototype._getService=function(e,t){if(void 0===t&&(t=o),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var n=t!==o?t:void 0,r=this.firebase_.INTERNAL.factories[e](this,this.extendApp.bind(this),n);this.services_[e][t]=r}return this.services_[e][t]},e.prototype.extendApp=function(e){var t=this;r.deepExtend(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(a.forEach(function(e){t.INTERNAL.addAuthTokenListener(e)}),a=[])},e.prototype.checkDestroyed_=function(){this.isDeleted_&&l("app-deleted",{name:this.name_})},e}();function l(e,t){throw u.create(e,t)}s.prototype.name&&s.prototype.options||s.prototype.delete||console.log("dc");var u=new r.ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."}),c=function e(){var t={},n={},a={},u={__esModule:!0,initializeApp:function(e,n){if(void 0===n&&(n={}),"object"!=typeof n||null===n){var r=n;n={name:r}}var a=n;void 0===a.name&&(a.name=o);var c=a.name;"string"==typeof c&&c||l("bad-app-name",{name:c+""}),i(t,c)&&l("duplicate-app",{name:c});var d=new s(e,a,u);return t[c]=d,p(d,"create"),d},app:c,apps:null,Promise:Promise,SDK_VERSION:"5.5.0",INTERNAL:{registerService:function(e,t,i,o,p){n[e]&&l("duplicate-service",{name:e}),n[e]=t,o&&(a[e]=o,d().forEach(function(e){o("create",e)}));var f=function(t){return void 0===t&&(t=c()),"function"!=typeof t[e]&&l("invalid-app-argument",{name:e}),t[e]()};return void 0!==i&&r.deepExtend(f,i),u[e]=f,s.prototype[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._getService.bind(this,e).apply(this,p?t:[])},f},createFirebaseNamespace:e,extendNamespace:function(e){r.deepExtend(u,e)},createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,removeApp:function(e){p(t[e],"delete"),delete t[e]},factories:n,useAsService:f,Promise:Promise,deepExtend:r.deepExtend}};function c(e){return i(t,e=e||o)||l("no-app",{name:e}),t[e]}function d(){return Object.keys(t).map(function(e){return t[e]})}function p(e,t){Object.keys(n).forEach(function(n){var r=f(e,n);null!==r&&a[r]&&a[r](t,e)})}function f(e,t){if("serverAuth"===t)return null;var n=t;return e.options,n}return r.patchProperty(u,"default",u),Object.defineProperty(u,"apps",{get:d}),r.patchProperty(c,"App",s),u}();n.firebase=c,n.default=c},{"@firebase/util":5}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i,o,a,s=e("@firebase/util"),l=e("tslib"),u=(r=e("@firebase/app"))&&"object"==typeof r&&"default"in r?r.default:r,c={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},d=((i={})[c.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",i[c.AVAILABLE_IN_SW]="This method is available in a service worker context.",i[c.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",i[c.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",i[c.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",i[c.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",i[c.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",i[c.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",i[c.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",i[c.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",i[c.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",i[c.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",i[c.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",i[c.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",i[c.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",i[c.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",i[c.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",i[c.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",i[c.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",i[c.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",i[c.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",i[c.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",i[c.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",i[c.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",i[c.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",i[c.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",i[c.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",i[c.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",i[c.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",i[c.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",i[c.BAD_SCOPE]="The service worker scope must be a string with at least one character.",i[c.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",i[c.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",i[c.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",i[c.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",i[c.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",i[c.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",i[c.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",i),p=new s.ErrorFactory("messaging","Messaging",d),f=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),h="https://fcm.googleapis.com";function m(e,t){if(null==e||null==t)return!1;if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e),r=new DataView(t),i=0;i<e.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function v(e){return function(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(null,t))}(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}!function(e){e.TYPE_OF_MSG="firebase-messaging-msg-type",e.DATA="firebase-messaging-msg-data"}(o||(o={})),function(e){e.PUSH_MSG_RECEIVED="push-msg-received",e.NOTIFICATION_CLICKED="notification-clicked"}(a||(a={}));var g=function(){function e(){}return e.prototype.getToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i,o,a,s,u,d,g;return l.__generator(this,function(l){switch(l.label){case 0:r=v(t.getKey("p256dh")),i=v(t.getKey("auth")),o="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+r+"&encryption_auth="+i,m(n.buffer,f.buffer)||(a=v(n),o+="&application_pub_key="+a),(s=new Headers).append("Content-Type","application/x-www-form-urlencoded"),u={method:"POST",headers:s,body:o},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(h+"/fcm/connect/subscribe",u)];case 2:return[4,l.sent().json()];case 3:return d=l.sent(),[3,5];case 4:throw l.sent(),p.create(c.TOKEN_SUBSCRIBE_FAILED);case 5:if(d.error)throw g=d.error.message,p.create(c.TOKEN_SUBSCRIBE_FAILED,{message:g});if(!d.token)throw p.create(c.TOKEN_SUBSCRIBE_NO_TOKEN);if(!d.pushSet)throw p.create(c.TOKEN_SUBSCRIBE_NO_PUSH_SET);return[2,{token:d.token,pushSet:d.pushSet}]}})})},e.prototype.updateToken=function(e,t,n,r,i){return l.__awaiter(this,void 0,void 0,function(){var o,a,s,u,d,g,y,b;return l.__generator(this,function(l){switch(l.label){case 0:o=v(r.getKey("p256dh")),a=v(r.getKey("auth")),s="push_set="+n+"&token="+t+"&authorized_entity="+e+"&endpoint="+r.endpoint+"&encryption_key="+o+"&encryption_auth="+a,m(i.buffer,f.buffer)||(u=v(i),s+="&application_pub_key="+u),(d=new Headers).append("Content-Type","application/x-www-form-urlencoded"),g={method:"POST",headers:d,body:s},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(h+"/fcm/connect/subscribe",g)];case 2:return[4,l.sent().json()];case 3:return y=l.sent(),[3,5];case 4:throw l.sent(),p.create(c.TOKEN_UPDATE_FAILED);case 5:if(y.error)throw b=y.error.message,p.create(c.TOKEN_UPDATE_FAILED,{message:b});if(!y.token)throw p.create(c.TOKEN_UPDATE_NO_TOKEN);return[2,y.token]}})})},e.prototype.deleteToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i,o,a,s;return l.__generator(this,function(l){switch(l.label){case 0:r="authorized_entity="+e+"&token="+t+"&pushSet="+n,(i=new Headers).append("Content-Type","application/x-www-form-urlencoded"),o={method:"POST",headers:i,body:r},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(h+"/fcm/connect/unsubscribe",o)];case 2:return[4,l.sent().json()];case 3:if((a=l.sent()).error)throw s=a.error.message,p.create(c.TOKEN_UNSUBSCRIBE_FAILED,{message:s});return[3,5];case 4:throw l.sent(),p.create(c.TOKEN_UNSUBSCRIBE_FAILED);case 5:return[2]}})})},e}();function y(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}var b="undefined",w="fcm_token_object_Store";function _(){var e=indexedDB.open(b);e.onerror=function(e){},e.onsuccess=function(t){!function(e){if(e.objectStoreNames.contains(w)){var t=e.transaction(w).objectStore(w),n=new g,r=t.openCursor();r.onerror=function(e){console.warn("Unable to cleanup old IDB.",e)},r.onsuccess=function(){var t=r.result;if(t){var i=t.value;n.deleteToken(i.fcmSenderId,i.fcmToken,i.fcmPushSet),t.continue()}else e.close(),indexedDB.deleteDatabase(b)}}}(e.result)}}var E=function(){function e(){this.dbPromise=null}return e.prototype.get=function(e){return this.createTransaction(function(t){return t.get(e)})},e.prototype.getIndex=function(e,t){return this.createTransaction(function(n){return n.index(e).get(t)})},e.prototype.put=function(e){return this.createTransaction(function(t){return t.put(e)},"readwrite")},e.prototype.delete=function(e){return this.createTransaction(function(t){return t.delete(e)},"readwrite")},e.prototype.closeDatabase=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:e.sent().close(),this.dbPromise=null,e.label=2;case 2:return[2]}})})},e.prototype.createTransaction=function(e,t){return void 0===t&&(t="readonly"),l.__awaiter(this,void 0,void 0,function(){var n,r,i,o;return l.__generator(this,function(a){switch(a.label){case 0:return[4,this.getDb()];case 1:return n=a.sent(),r=n.transaction(this.objectStoreName,t),i=r.objectStore(this.objectStoreName),[4,function(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}(e(i))];case 2:return o=a.sent(),[2,new Promise(function(e,t){r.oncomplete=function(){e(o)},r.onerror=function(){t(r.error)}})]}})})},e.prototype.getDb=function(){var e=this;return this.dbPromise||(this.dbPromise=new Promise(function(t,n){var r=indexedDB.open(e.dbName,e.dbVersion);r.onsuccess=function(){t(r.result)},r.onerror=function(){e.dbPromise=null,n(r.error)},r.onupgradeneeded=function(t){return e.onDbUpgrade(r,t)}})),this.dbPromise},e}();var k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_token_details_db",t.dbVersion=3,t.objectStoreName="fcm_token_object_Store",t}return l.__extends(t,e),t.prototype.onDbUpgrade=function(e,t){var n=e.result;switch(t.oldVersion){case 0:(r=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0});case 1:_();case 2:var r,i=(r=e.transaction.objectStore(this.objectStoreName)).openCursor();i.onsuccess=function(){var e=i.result;if(e){var t=e.value,n=l.__assign({},t);t.createTime||(n.createTime=Date.now()),"string"==typeof t.vapidKey&&(n.vapidKey=y(t.vapidKey)),"string"==typeof t.auth&&(n.auth=y(t.auth).buffer),"string"==typeof t.auth&&(n.p256dh=y(t.p256dh).buffer),e.update(n),e.continue()}}}},t.prototype.getTokenDetailsFromToken=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e)throw p.create(c.BAD_TOKEN);return S({fcmToken:e}),[2,this.getIndex("fcmToken",e)]})})},t.prototype.getTokenDetailsFromSWScope=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e)throw p.create(c.BAD_SCOPE);return S({swScope:e}),[2,this.get(e)]})})},t.prototype.saveTokenDetails=function(e){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){if(!e.swScope)throw p.create(c.BAD_SCOPE);if(!e.vapidKey)throw p.create(c.BAD_VAPID_KEY);if(!e.endpoint||!e.auth||!e.p256dh)throw p.create(c.BAD_SUBSCRIPTION);if(!e.fcmSenderId)throw p.create(c.BAD_SENDER_ID);if(!e.fcmToken)throw p.create(c.BAD_TOKEN);if(!e.fcmPushSet)throw p.create(c.BAD_PUSH_SET);return S(e),[2,this.put(e)]})})},t.prototype.deleteToken=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return"string"!=typeof e||0===e.length?[2,Promise.reject(p.create(c.INVALID_DELETE_TOKEN))]:[4,this.getTokenDetailsFromToken(e)];case 1:if(!(t=n.sent()))throw p.create(c.DELETE_TOKEN_NOT_FOUND);return[4,this.delete(t.swScope)];case 2:return n.sent(),[2,t]}})})},t}(E);function S(e){if(e.fcmToken&&("string"!=typeof e.fcmToken||0===e.fcmToken.length))throw p.create(c.BAD_TOKEN);if(e.swScope&&("string"!=typeof e.swScope||0===e.swScope.length))throw p.create(c.BAD_SCOPE);if(e.vapidKey&&(!(e.vapidKey instanceof Uint8Array)||65!==e.vapidKey.length))throw p.create(c.BAD_VAPID_KEY);if(e.endpoint&&("string"!=typeof e.endpoint||0===e.endpoint.length))throw p.create(c.BAD_SUBSCRIPTION);if(e.auth&&!(e.auth instanceof ArrayBuffer))throw p.create(c.BAD_SUBSCRIPTION);if(e.p256dh&&!(e.p256dh instanceof ArrayBuffer))throw p.create(c.BAD_SUBSCRIPTION);if(e.fcmSenderId&&("string"!=typeof e.fcmSenderId||0===e.fcmSenderId.length))throw p.create(c.BAD_SENDER_ID);if(e.fcmPushSet&&("string"!=typeof e.fcmPushSet||0===e.fcmPushSet.length))throw p.create(c.BAD_PUSH_SET)}var T=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_vapid_details_db",t.dbVersion=1,t.objectStoreName="fcm_vapid_object_Store",t}return l.__extends(t,e),t.prototype.onDbUpgrade=function(e){e.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},t.prototype.getVapidFromSWScope=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.length)throw p.create(c.BAD_SCOPE);return[4,this.get(e)];case 1:return[2,(t=n.sent())?t.vapidKey:void 0]}})})},t.prototype.saveVapidDetails=function(e,t){return l.__awaiter(this,void 0,void 0,function(){var n;return l.__generator(this,function(r){if("string"!=typeof e||0===e.length)throw p.create(c.BAD_SCOPE);if(null===t||65!==t.length)throw p.create(c.BAD_VAPID_KEY);return n={swScope:e,vapidKey:t},[2,this.put(n)]})})},t.prototype.deleteVapidDetails=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(e)];case 1:if(!(t=n.sent()))throw p.create(c.DELETE_SCOPE_NOT_FOUND);return[4,this.delete(e)];case 2:return n.sent(),[2,t]}})})},t}(E),C="messagingSenderId",x=function(){function e(e){var t=this;if(!e.options[C]||"string"!=typeof e.options[C])throw p.create(c.BAD_SENDER_ID);this.messagingSenderId=e.options[C],this.tokenDetailsModel=new k,this.vapidDetailsModel=new T,this.iidModel=new g,this.app=e,this.INTERNAL={delete:function(){return t.delete()}}}return e.prototype.getToken=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t,n,r,i;return l.__generator(this,function(o){switch(o.label){case 0:if("denied"===(e=this.getNotificationPermission_()))throw p.create(c.NOTIFICATIONS_BLOCKED);return"granted"!==e?[2,null]:[4,this.getSWRegistration_()];case 1:return t=o.sent(),[4,this.getPublicVapidKey_()];case 2:return n=o.sent(),[4,this.getPushSubscription(t,n)];case 3:return r=o.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(t.scope)];case 4:return(i=o.sent())?[2,this.manageExistingToken(t,r,n,i)]:[2,this.getNewToken(t,r,n)]}})})},e.prototype.manageExistingToken=function(e,t,n,r){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(i){switch(i.label){case 0:return function(e,t,n){if(!n.vapidKey||!m(t.buffer,n.vapidKey.buffer))return!1;var r=e.endpoint===n.endpoint,i=m(e.getKey("auth"),n.auth),o=m(e.getKey("p256dh"),n.p256dh);return r&&i&&o}(t,n,r)?Date.now()<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(e,t,n,r)]:[4,this.deleteTokenFromDB(r.fcmToken)];case 1:return i.sent(),[2,this.getNewToken(e,t,n)]}})})},e.prototype.updateToken=function(e,t,n,r){return l.__awaiter(this,void 0,void 0,function(){var i,o,a;return l.__generator(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,r.fcmToken,r.fcmPushSet,t,n)];case 1:return i=s.sent(),o={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i,fcmPushSet:r.fcmPushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)];case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return s.sent(),[2,i];case 4:return a=s.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw s.sent(),a;case 6:return[2]}})})},e.prototype.getNewToken=function(e,t,n){return l.__awaiter(this,void 0,void 0,function(){var r,i;return l.__generator(this,function(o){switch(o.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,t,n)];case 1:return r=o.sent(),i={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:r.token,fcmPushSet:r.pushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(i)];case 2:return o.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return o.sent(),[2,r.token]}})})},e.prototype.deleteToken=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n;return l.__generator(this,function(r){switch(r.label){case 0:return[4,this.deleteTokenFromDB(e)];case 1:return r.sent(),[4,this.getSWRegistration_()];case 2:return(t=r.sent())?[4,t.pushManager.getSubscription()]:[3,4];case 3:if(n=r.sent())return[2,n.unsubscribe()];r.label=4;case 4:return[2,!0]}})})},e.prototype.deleteTokenFromDB=function(e){return l.__awaiter(this,void 0,void 0,function(){var t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(e)];case 1:return t=n.sent(),[4,this.iidModel.deleteToken(t.fcmSenderId,t.fcmToken,t.fcmPushSet)];case 2:return n.sent(),[2]}})})},e.prototype.getPushSubscription=function(e,t){return e.pushManager.getSubscription().then(function(n){return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t})})},e.prototype.requestPermission=function(){throw p.create(c.AVAILABLE_IN_WINDOW)},e.prototype.useServiceWorker=function(e){throw p.create(c.AVAILABLE_IN_WINDOW)},e.prototype.usePublicVapidKey=function(e){throw p.create(c.AVAILABLE_IN_WINDOW)},e.prototype.onMessage=function(e,t,n){throw p.create(c.AVAILABLE_IN_WINDOW)},e.prototype.onTokenRefresh=function(e,t,n){throw p.create(c.AVAILABLE_IN_WINDOW)},e.prototype.setBackgroundMessageHandler=function(e){throw p.create(c.AVAILABLE_IN_SW)},e.prototype.delete=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return e.sent(),[2]}})})},e.prototype.getNotificationPermission_=function(){return Notification.permission},e.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},e.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},e.prototype.getIidModel=function(){return this.iidModel},e}();var P=function(e){function t(t){var n=e.call(this,t)||this;return n.bgMessageHandler=null,self.addEventListener("push",function(e){n.onPush(e)}),self.addEventListener("pushsubscriptionchange",function(e){n.onSubChange(e)}),self.addEventListener("notificationclick",function(e){n.onNotificationClick(e)}),n}return l.__extends(t,e),t.prototype.onPush=function(e){e.waitUntil(this.onPush_(e))},t.prototype.onSubChange=function(e){e.waitUntil(this.onSubChange_(e))},t.prototype.onNotificationClick=function(e){e.waitUntil(this.onNotificationClick_(e))},t.prototype.onPush_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i,o,a;return l.__generator(this,function(s){switch(s.label){case 0:if(!e.data)return[2];try{t=e.data.json()}catch(e){return[2]}return[4,this.hasVisibleClients_()];case 1:return s.sent()?[2,this.sendMessageToWindowClients_(t)]:(n=this.getNotificationData_(t))?(r=n.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return i=s.sent(),o=n.actions,a=Notification.maxActions,o&&a&&o.length>a&&console.warn("This browser only supports "+a+" actions.The remaining actions will not be displayed."),[2,i.showNotification(r,n)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5];case 4:return s.sent(),[2];case 5:return[2]}})})},t.prototype.onSubChange_=function(e){return l.__awaiter(this,void 0,void 0,function(){var e,t,n,r;return l.__generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return e=i.sent(),[3,3];case 2:throw t=i.sent(),p.create(c.UNABLE_TO_RESUBSCRIBE,{message:t});case 3:return i.trys.push([3,5,,8]),[4,e.pushManager.getSubscription()];case 4:return i.sent(),[3,8];case 5:return n=i.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(e.scope)];case 6:if(!(r=i.sent()))throw n;return[4,this.deleteToken(r.fcmToken)];case 7:throw i.sent(),n;case 8:return[2]}})})},t.prototype.onNotificationClick_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i;return l.__generator(this,function(o){switch(o.label){case 0:return e.notification&&e.notification.data&&e.notification.data.FCM_MSG?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(t=e.notification.data.FCM_MSG).notification&&(n=t.fcmOptions&&t.fcmOptions.link||t.notification.click_action)?[4,this.getWindowClient_(n)]:[2]):[2];case 1:return(r=o.sent())?[3,3]:[4,self.clients.openWindow(n)];case 2:return r=o.sent(),[3,5];case 3:return[4,r.focus()];case 4:r=o.sent(),o.label=5;case 5:return r?(delete t.notification,delete t.fcmOptions,i=O(a.NOTIFICATION_CLICKED,t),[2,this.attemptToMessageClient_(r,i)]):[2]}})})},t.prototype.getNotificationData_=function(e){if(e&&"object"==typeof e.notification){var t,n=l.__assign({},e.notification);return n.data=l.__assign({},e.notification.data,((t={}).FCM_MSG=e,t)),n}},t.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!=typeof e)throw p.create(c.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler=e},t.prototype.getWindowClient_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r,i;return l.__generator(this,function(o){switch(o.label){case 0:return t=new URL(e,self.location.href).href,[4,N()];case 1:for(n=o.sent(),r=null,i=0;i<n.length;i++)if(new URL(n[i].url,self.location.href).href===t){r=n[i];break}return[2,r]}})})},t.prototype.attemptToMessageClient_=function(e,t){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(n){if(!e)throw p.create(c.NO_WINDOW_CLIENT_TO_MSG);return e.postMessage(t),[2]})})},t.prototype.hasVisibleClients_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){switch(e.label){case 0:return[4,N()];case 1:return[2,e.sent().some(function(e){return"visible"===e.visibilityState})]}})})},t.prototype.sendMessageToWindowClients_=function(e){return l.__awaiter(this,void 0,void 0,function(){var t,n,r=this;return l.__generator(this,function(i){switch(i.label){case 0:return[4,N()];case 1:return t=i.sent(),n=O(a.PUSH_MSG_RECEIVED,e),[4,Promise.all(t.map(function(e){return r.attemptToMessageClient_(e,n)}))];case 2:return i.sent(),[2]}})})},t.prototype.getSWRegistration_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return[2,self.registration]})})},t.prototype.getPublicVapidKey_=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t;return l.__generator(this,function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(e=n.sent()))throw p.create(c.SW_REGISTRATION_EXPECTED);return[4,this.getVapidDetailsModel().getVapidFromSWScope(e.scope)];case 2:return null==(t=n.sent())?[2,f]:[2,t]}})})},t}(x);function N(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function O(e,t){return(n={})[o.TYPE_OF_MSG]=e,n[o.DATA]=t,n;var n}var D=function(e){function t(t){var n=e.call(this,t)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.manifestCheckPromise=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=s.createSubscribe(function(e){n.messageObserver=e}),n.onTokenRefreshInternal=s.createSubscribe(function(e){n.tokenRefreshObserver=e}),n.setupSWMessageListener_(),n}return l.__extends(t,e),t.prototype.getToken=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){switch(t.label){case 0:return this.manifestCheckPromise||(this.manifestCheckPromise=function(){return l.__awaiter(this,void 0,void 0,function(){var e,t;return l.__generator(this,function(n){switch(n.label){case 0:if(!(e=document.querySelector('link[rel="manifest"]')))return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(e.href)];case 2:return[4,n.sent().json()];case 3:return t=n.sent(),[3,5];case 4:return n.sent(),[2];case 5:if(!t||!t.gcm_sender_id)return[2];if("103953800507"!==t.gcm_sender_id)throw p.create(c.INCORRECT_GCM_SENDER_ID);return[2]}})})}()),[4,this.manifestCheckPromise];case 1:return t.sent(),[2,e.prototype.getToken.call(this)]}})})},t.prototype.requestPermission=function(){return l.__awaiter(this,void 0,void 0,function(){var e;return l.__generator(this,function(t){switch(t.label){case 0:return"granted"===this.getNotificationPermission_()?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?p.create(c.PERMISSION_BLOCKED):p.create(c.PERMISSION_DEFAULT)}})})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw p.create(c.SW_REGISTRATION_EXPECTED);if(null!=this.registrationToUse)throw p.create(c.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse=e},t.prototype.usePublicVapidKey=function(e){if("string"!=typeof e)throw p.create(c.INVALID_PUBLIC_VAPID_KEY);if(null!=this.publicVapidKeyToUse)throw p.create(c.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var t=y(e);if(65!==t.length)throw p.create(c.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse=t},t.prototype.onMessage=function(e,t,n){return"function"==typeof e?this.onMessageInternal(e,t,n):this.onMessageInternal(e)},t.prototype.onTokenRefresh=function(e,t,n){return"function"==typeof e?this.onTokenRefreshInternal(e,t,n):this.onTokenRefreshInternal(e)},t.prototype.waitForRegistrationToActivate_=function(e){var t=e.installing||e.waiting||e.active;return new Promise(function(n,r){if(t)if("activated"!==t.state)if("redundant"!==t.state){var i=function(){if("activated"===t.state)n(e);else{if("redundant"!==t.state)return;r(p.create(c.SW_REG_REDUNDANT))}t.removeEventListener("statechange",i)};t.addEventListener("statechange",i)}else r(p.create(c.SW_REG_REDUNDANT));else n(e);else r(p.create(c.NO_SW_IN_REG))})},t.prototype.getSWRegistration_=function(){var e=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(e){throw p.create(c.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:e.message})}).then(function(t){return e.waitForRegistrationToActivate_(t).then(function(){return e.registrationToUse=t,t.update(),t})}))},t.prototype.getPublicVapidKey_=function(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,f]})})},t.prototype.setupSWMessageListener_=function(){var e=this;navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[o.TYPE_OF_MSG]){var n=t.data;switch(n[o.TYPE_OF_MSG]){case a.PUSH_MSG_RECEIVED:case a.NOTIFICATION_CLICKED:var r=n[o.DATA];e.messageObserver&&e.messageObserver.next(r)}}},!1)},t}(x);function M(e){var t={isSupported:A};e.INTERNAL.registerService("messaging",function(e){if(!A())throw p.create(c.UNSUPPORTED_BROWSER);return self&&"ServiceWorkerGlobalScope"in self?new P(e):new D(e)},t)}function A(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}M(u),n.registerMessaging=M,n.isSupported=A},{"@firebase/app":1,"@firebase/util":5,tslib:24}],3:[function(e,t,n){(function(t,n){"use strict";e("whatwg-fetch");var r=setTimeout;function i(){}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function a(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void l(t.promise,e)}s(t.promise,r)}else(1===e._state?s:l)(t.promise,e._value)})):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void c((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){l(e,t)}var r,i}function l(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)a(e,e._deferreds[t]);e._deferreds=null}function c(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,l(t,e))})}catch(e){if(n)return;n=!0,l(t,e)}}o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=new this.constructor(i);return a(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},o.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},o.all=function(e){return new o(function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var i=r.length;function o(e,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(t){o(e,t)},n)}r[e]=a,0==--i&&t(r)}catch(e){n(e)}}for(var a=0;a<r.length;a++)o(a,r[a])})},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},o._immediateFn="function"==typeof n&&function(e){n(e)}||function(e){r(e,0)},o._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var d=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}();function p(e,t){return e(t={exports:{}},t.exports),t.exports}d.Promise||(d.Promise=o);var f=p(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),h=p(function(e){var t=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=t)}),m=(h.version,function(e){return"object"==typeof e?null!==e:"function"==typeof e}),v=function(e){if(!m(e))throw TypeError(e+" is not an object!");return e},g=function(e){try{return!!e()}catch(e){return!0}},y=!g(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),b=f.document,w=m(b)&&m(b.createElement),_=function(e){return w?b.createElement(e):{}},E=!y&&!g(function(){return 7!=Object.defineProperty(_("div"),"a",{get:function(){return 7}}).a}),k=function(e,t){if(!m(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!m(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},S=Object.defineProperty,T={f:y?Object.defineProperty:function(e,t,n){if(v(e),t=k(t,!0),v(n),E)try{return S(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},C=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},x=y?function(e,t,n){return T.f(e,t,C(1,n))}:function(e,t,n){return e[t]=n,e},P={}.hasOwnProperty,N=function(e,t){return P.call(e,t)},O=0,D=Math.random(),M=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++O+D).toString(36))},A=p(function(e){var t=M("src"),n=Function.toString,r=(""+n).split("toString");h.inspectSource=function(e){return n.call(e)},(e.exports=function(e,n,i,o){var a="function"==typeof i;a&&(N(i,"name")||x(i,"name",n)),e[n]!==i&&(a&&(N(i,t)||x(i,t,e[n]?""+e[n]:r.join(String(n)))),e===f?e[n]=i:o?e[n]?e[n]=i:x(e,n,i):(delete e[n],x(e,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||n.call(this)})}),R=function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!")}(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},I=function(e,t,n){var r,i,o,a,s=e&I.F,l=e&I.G,u=e&I.S,c=e&I.P,d=e&I.B,p=l?f:u?f[t]||(f[t]={}):(f[t]||{}).prototype,m=l?h:h[t]||(h[t]={}),v=m.prototype||(m.prototype={});for(r in l&&(n=t),n)o=((i=!s&&p&&void 0!==p[r])?p:n)[r],a=d&&i?R(o,f):c&&"function"==typeof o?R(Function.call,o):o,p&&A(p,r,o,e&I.U),m[r]!=o&&x(m,r,a),c&&v[r]!=o&&(v[r]=o)};f.core=h,I.F=1,I.G=2,I.S=4,I.P=8,I.B=16,I.W=32,I.U=64,I.R=128;var U=I,F={}.toString,L=function(e){return F.call(e).slice(8,-1)},j=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==L(e)?e.split(""):Object(e)},W=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},B=function(e){return Object(W(e))},z=Math.ceil,V=Math.floor,q=function(e){return isNaN(e=+e)?0:(e>0?V:z)(e)},H=Math.min,K=function(e){return e>0?H(q(e),9007199254740991):0},G=Array.isArray||function(e){return"Array"==L(e)},$=f["__core-js_shared__"]||(f["__core-js_shared__"]={}),Y=function(e){return $[e]||($[e]={})},Q=p(function(e){var t=Y("wks"),n=f.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:M)("Symbol."+e))}).store=t}),X=Q("species"),J=function(e,t){return new(function(e){var t;return G(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!G(t.prototype)||(t=void 0),m(t)&&null===(t=t[X])&&(t=void 0)),void 0===t?Array:t}(e))(t)},Z=function(e,t){var n=1==e,r=2==e,i=3==e,o=4==e,a=6==e,s=5==e||a,l=t||J;return function(t,u,c){for(var d,p,f=B(t),h=j(f),m=R(u,c,3),v=K(h.length),g=0,y=n?l(t,v):r?l(t,0):void 0;v>g;g++)if((s||g in h)&&(p=m(d=h[g],g,f),e))if(n)y[g]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return g;case 2:y.push(d)}else if(o)return!1;return a?-1:i||o?o:y}},ee=Q("unscopables"),te=Array.prototype;void 0==te[ee]&&x(te,ee,{});var ne=function(e){te[ee][e]=!0},re=Z(5),ie=!0;"find"in[]&&Array(1).find(function(){ie=!1}),U(U.P+U.F*ie,"Array",{find:function(e){return re(this,e,arguments.length>1?arguments[1]:void 0)}}),ne("find");h.Array.find;var oe=Z(6),ae=!0;"findIndex"in[]&&Array(1).findIndex(function(){ae=!1}),U(U.P+U.F*ae,"Array",{findIndex:function(e){return oe(this,e,arguments.length>1?arguments[1]:void 0)}}),ne("findIndex");h.Array.findIndex;var se,le=function(e){return j(W(e))},ue=Math.max,ce=Math.min,de=Y("keys"),pe=function(e){return de[e]||(de[e]=M(e))},fe=(se=!1,function(e,t,n){var r,i=le(e),o=K(i.length),a=function(e,t){return(e=q(e))<0?ue(e+t,0):ce(e,t)}(n,o);if(se&&t!=t){for(;o>a;)if((r=i[a++])!=r)return!0}else for(;o>a;a++)if((se||a in i)&&i[a]===t)return se||a||0;return!se&&-1}),he=pe("IE_PROTO"),me=function(e,t){var n,r=le(e),i=0,o=[];for(n in r)n!=he&&N(r,n)&&o.push(n);for(;t.length>i;)N(r,n=t[i++])&&(~fe(o,n)||o.push(n));return o},ve="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ge=Object.keys||function(e){return me(e,ve)},ye={f:Object.getOwnPropertySymbols},be={f:{}.propertyIsEnumerable},we=Object.assign,_e=!we||g(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=we({},e)[n]||Object.keys(we({},t)).join("")!=r})?function(e,t){for(var n=B(e),r=arguments.length,i=1,o=ye.f,a=be.f;r>i;)for(var s,l=j(arguments[i++]),u=o?ge(l).concat(o(l)):ge(l),c=u.length,d=0;c>d;)a.call(l,s=u[d++])&&(n[s]=l[s]);return n}:we;U(U.S+U.F,"Object",{assign:_e});h.Object.assign;var Ee=Q("match"),ke=function(e,t,n){if(m(r=t)&&(void 0!==(i=r[Ee])?i:"RegExp"==L(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(W(e))},Se=Q("match"),Te="".startsWith;U(U.P+U.F*function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Se]=!1,!"/./"[e](t)}catch(e){}}return!0}("startsWith"),"String",{startsWith:function(e){var t=ke(this,e,"startsWith"),n=K(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return Te?Te.call(t,r,n):t.slice(n,n+r.length)===r}});h.String.startsWith;U(U.P,"String",{repeat:function(e){var t=String(W(this)),n="",r=q(e);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}});h.String.repeat;var Ce=p(function(e){var t=M("meta"),n=T.f,r=0,i=Object.isExtensible||function(){return!0},o=!g(function(){return i(Object.preventExtensions({}))}),a=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!m(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!N(e,t)){if(!i(e))return"F";if(!n)return"E";a(e)}return e[t].i},getWeak:function(e,n){if(!N(e,t)){if(!i(e))return!0;if(!n)return!1;a(e)}return e[t].w},onFreeze:function(e){return o&&s.NEED&&i(e)&&!N(e,t)&&a(e),e}}}),xe=(Ce.KEY,Ce.NEED,Ce.fastKey,Ce.getWeak,Ce.onFreeze,T.f),Pe=Q("toStringTag"),Ne=function(e,t,n){e&&!N(e=n?e:e.prototype,Pe)&&xe(e,Pe,{configurable:!0,value:t})},Oe={f:Q},De=T.f,Me=function(e){var t=h.Symbol||(h.Symbol=f.Symbol||{});"_"==e.charAt(0)||e in t||De(t,e,{value:Oe.f(e)})},Ae=y?Object.defineProperties:function(e,t){v(e);for(var n,r=ge(t),i=r.length,o=0;i>o;)T.f(e,n=r[o++],t[n]);return e},Re=f.document,Ie=Re&&Re.documentElement,Ue=pe("IE_PROTO"),Fe=function(){},Le=function(){var e,t=_("iframe"),n=ve.length;for(t.style.display="none",Ie.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),Le=e.F;n--;)delete Le.prototype[ve[n]];return Le()},je=Object.create||function(e,t){var n;return null!==e?(Fe.prototype=v(e),n=new Fe,Fe.prototype=null,n[Ue]=e):n=Le(),void 0===t?n:Ae(n,t)},We=ve.concat("length","prototype"),Be={f:Object.getOwnPropertyNames||function(e){return me(e,We)}},ze=Be.f,Ve={}.toString,qe="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],He={f:function(e){return qe&&"[object Window]"==Ve.call(e)?function(e){try{return ze(e)}catch(e){return qe.slice()}}(e):ze(le(e))}},Ke=Object.getOwnPropertyDescriptor,Ge={f:y?Ke:function(e,t){if(e=le(e),t=k(t,!0),E)try{return Ke(e,t)}catch(e){}if(N(e,t))return C(!be.f.call(e,t),e[t])}},$e=Ce.KEY,Ye=Ge.f,Qe=T.f,Xe=He.f,Je=f.Symbol,Ze=f.JSON,et=Ze&&Ze.stringify,tt=Q("_hidden"),nt=Q("toPrimitive"),rt={}.propertyIsEnumerable,it=Y("symbol-registry"),ot=Y("symbols"),at=Y("op-symbols"),st=Object.prototype,lt="function"==typeof Je,ut=f.QObject,ct=!ut||!ut.prototype||!ut.prototype.findChild,dt=y&&g(function(){return 7!=je(Qe({},"a",{get:function(){return Qe(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=Ye(st,t);r&&delete st[t],Qe(e,t,n),r&&e!==st&&Qe(st,t,r)}:Qe,pt=function(e){var t=ot[e]=je(Je.prototype);return t._k=e,t},ft=lt&&"symbol"==typeof Je.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Je},ht=function(e,t,n){return e===st&&ht(at,t,n),v(e),t=k(t,!0),v(n),N(ot,t)?(n.enumerable?(N(e,tt)&&e[tt][t]&&(e[tt][t]=!1),n=je(n,{enumerable:C(0,!1)})):(N(e,tt)||Qe(e,tt,C(1,{})),e[tt][t]=!0),dt(e,t,n)):Qe(e,t,n)},mt=function(e,t){v(e);for(var n,r=function(e){var t=ge(e),n=ye.f;if(n)for(var r,i=n(e),o=be.f,a=0;i.length>a;)o.call(e,r=i[a++])&&t.push(r);return t}(t=le(t)),i=0,o=r.length;o>i;)ht(e,n=r[i++],t[n]);return e},vt=function(e){var t=rt.call(this,e=k(e,!0));return!(this===st&&N(ot,e)&&!N(at,e))&&(!(t||!N(this,e)||!N(ot,e)||N(this,tt)&&this[tt][e])||t)},gt=function(e,t){if(e=le(e),t=k(t,!0),e!==st||!N(ot,t)||N(at,t)){var n=Ye(e,t);return!n||!N(ot,t)||N(e,tt)&&e[tt][t]||(n.enumerable=!0),n}},yt=function(e){for(var t,n=Xe(le(e)),r=[],i=0;n.length>i;)N(ot,t=n[i++])||t==tt||t==$e||r.push(t);return r},bt=function(e){for(var t,n=e===st,r=Xe(n?at:le(e)),i=[],o=0;r.length>o;)!N(ot,t=r[o++])||n&&!N(st,t)||i.push(ot[t]);return i};lt||(A((Je=function(){if(this instanceof Je)throw TypeError("Symbol is not a constructor!");var e=M(arguments.length>0?arguments[0]:void 0),t=function(n){this===st&&t.call(at,n),N(this,tt)&&N(this[tt],e)&&(this[tt][e]=!1),dt(this,e,C(1,n))};return y&&ct&&dt(st,e,{configurable:!0,set:t}),pt(e)}).prototype,"toString",function(){return this._k}),Ge.f=gt,T.f=ht,Be.f=He.f=yt,be.f=vt,ye.f=bt,y&&A(st,"propertyIsEnumerable",vt,!0),Oe.f=function(e){return pt(Q(e))}),U(U.G+U.W+U.F*!lt,{Symbol:Je});for(var wt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),_t=0;wt.length>_t;)Q(wt[_t++]);for(var Et=ge(Q.store),kt=0;Et.length>kt;)Me(Et[kt++]);U(U.S+U.F*!lt,"Symbol",{for:function(e){return N(it,e+="")?it[e]:it[e]=Je(e)},keyFor:function(e){if(!ft(e))throw TypeError(e+" is not a symbol!");for(var t in it)if(it[t]===e)return t},useSetter:function(){ct=!0},useSimple:function(){ct=!1}}),U(U.S+U.F*!lt,"Object",{create:function(e,t){return void 0===t?je(e):mt(je(e),t)},defineProperty:ht,defineProperties:mt,getOwnPropertyDescriptor:gt,getOwnPropertyNames:yt,getOwnPropertySymbols:bt}),Ze&&U(U.S+U.F*(!lt||g(function(){var e=Je();return"[null]"!=et([e])||"{}"!=et({a:e})||"{}"!=et(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(m(t)||void 0!==e)&&!ft(e))return G(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!ft(t))return t}),r[1]=t,et.apply(Ze,r)}}),Je.prototype[nt]||x(Je.prototype,nt,Je.prototype.valueOf),Ne(Je,"Symbol"),Ne(Math,"Math",!0),Ne(f.JSON,"JSON",!0);var St=Q("toStringTag"),Tt="Arguments"==L(function(){return arguments}()),Ct={};Ct[Q("toStringTag")]="z",Ct+""!="[object z]"&&A(Object.prototype,"toString",function(){return"[object "+(void 0===(e=this)?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),St))?n:Tt?L(t):"Object"==(r=L(t))&&"function"==typeof t.callee?"Arguments":r)+"]";var e,t,n,r},!0),Me("asyncIterator"),Me("observable");h.Symbol;var xt={},Pt={};x(Pt,Q("iterator"),function(){return this});var Nt,Ot=function(e,t,n){e.prototype=je(Pt,{next:C(1,n)}),Ne(e,t+" Iterator")},Dt=pe("IE_PROTO"),Mt=Object.prototype,At=Object.getPrototypeOf||function(e){return e=B(e),N(e,Dt)?e[Dt]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Mt:null},Rt=Q("iterator"),It=!([].keys&&"next"in[].keys()),Ut=function(){return this},Ft=function(e,t,n,r,i,o,a){Ot(n,t,r);var s,l,u,c=function(e){if(!It&&e in h)return h[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},d=t+" Iterator",p="values"==i,f=!1,h=e.prototype,m=h[Rt]||h["@@iterator"]||i&&h[i],v=m||c(i),g=i?p?c("entries"):v:void 0,y="Array"==t&&h.entries||m;if(y&&(u=At(y.call(new e)))!==Object.prototype&&u.next&&(Ne(u,d,!0),"function"!=typeof u[Rt]&&x(u,Rt,Ut)),p&&m&&"values"!==m.name&&(f=!0,v=function(){return m.call(this)}),(It||f||!h[Rt])&&x(h,Rt,v),xt[t]=v,xt[d]=Ut,i)if(s={values:p?v:c("values"),keys:o?v:c("keys"),entries:g},a)for(l in s)l in h||A(h,l,s[l]);else U(U.P+U.F*(It||f),t,s);return s},Lt=(Nt=!0,function(e,t){var n,r,i=String(W(e)),o=q(t),a=i.length;return o<0||o>=a?Nt?"":void 0:(n=i.charCodeAt(o))<55296||n>56319||o+1===a||(r=i.charCodeAt(o+1))<56320||r>57343?Nt?i.charAt(o):n:Nt?i.slice(o,o+2):r-56320+(n-55296<<10)+65536});Ft(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=Lt(t,n),this._i+=e.length,{value:e,done:!1})});var jt=function(e,t){return{value:t,done:!!e}},Wt=Ft(Array,"Array",function(e,t){this._t=le(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,jt(1)):jt(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values");xt.Arguments=xt.Array,ne("keys"),ne("values"),ne("entries");for(var Bt=Q("iterator"),zt=Q("toStringTag"),Vt=xt.Array,qt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Ht=ge(qt),Kt=0;Kt<Ht.length;Kt++){var Gt,$t=Ht[Kt],Yt=qt[$t],Qt=f[$t],Xt=Qt&&Qt.prototype;if(Xt&&(Xt[Bt]||x(Xt,Bt,Vt),Xt[zt]||x(Xt,zt,$t),xt[$t]=Vt,Yt))for(Gt in Wt)Xt[Gt]||A(Xt,Gt,Wt[Gt],!0)}Oe.f("iterator")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{timers:29,"whatwg-fetch":4}],4:[function(e,t,n){!function(e){"use strict";if(!e.fetch){var t={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(t.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(e){return e&&DataView.prototype.isPrototypeOf(e)},i=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};c.prototype.append=function(e,t){e=s(e),t=l(t);var n=this.map[e];this.map[e]=n?n+","+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=l(t)},c.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},c.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),u(e)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},c.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),u(e)},t.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var a=[301,302,303,307,308];y.redirect=function(e,t){if(-1===a.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},e.Headers=c,e.Request=v,e.Response=y,e.fetch=function(e,n){return new Promise(function(r,i){var o=new v(e,n),a=new XMLHttpRequest;a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new y(i,n))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function c(e){this.map={},e instanceof c?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function f(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&r(e))this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!i(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=h(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=p(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}function v(e,t){var n,r,i=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new c(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),o.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function y(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("tslib"),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},l={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var o=e[i],a=i+1<e.length,s=a?e[i+1]:0,l=i+2<e.length,u=l?e[i+2]:0,c=o>>2,d=(3&o)<<4|s>>4,p=(15&s)<<2|u>>6,f=63&u;l||(f=64,a||(p=64)),r.push(n[c],n[d],n[p],n[f])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{o=e[n++];var s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var o=n[e.charAt(i++)],a=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,l=++i<e.length?n[e.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==l)throw Error();var u=o<<2|a>>4;if(r.push(u),64!=s){var c=a<<4&240|s>>2;if(r.push(c),64!=l){var d=s<<6&192|l;r.push(d)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},u=function(e){try{return l.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function c(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&(e[n]=c(e[n],t[n]));return e}var d=function(){function e(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,r))}},e}(),p=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},f="FirebaseError",h=Error.captureStackTrace;var m=function(){return function(e,t){if(this.code=e,this.message=t,h)h(this,v.prototype.create);else try{throw Error.apply(this,arguments)}catch(e){this.name=f,Object.defineProperty(this,"stack",{get:function(){return e.stack}})}}}();m.prototype=Object.create(Error.prototype),m.prototype.constructor=m,m.prototype.name=f;var v=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n,r=this.errors[e],i=this.service+"/"+e;n=void 0===r?"Error":r.replace(this.pattern,function(e,n){var r=t[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new m(i,n);for(var a in t)t.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=t[a]);return o},e}();function g(e){return JSON.parse(e)}var y=function(e){var t={},n={},r={},i="";try{var o=e.split(".");t=g(u(o[0])||""),n=g(u(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:i}},b=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},w=function(e,t){return b(t,function(t,n){e[t]=n}),e},_=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},E=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;n<t.blockSize;++n)t.pad_[n]=0;return t.reset(),t}return r.__extends(t,e),t.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},t.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"==typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],l=this.chain_[1],u=this.chain_[2],c=this.chain_[3],d=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=c^l&(u^c),a=1518500249):(o=l^u^c,a=1859775393):r<60?(o=l&u|c&(l|u),a=2400959708):(o=l^u^c,a=3395469782);i=(s<<5|s>>>27)+o+d+a+n[r]&4294967295;d=c,c=u,u=4294967295&(l<<30|l>>>2),l=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+l&4294967295,this.chain_[2]=this.chain_[2]+u&4294967295,this.chain_[3]=this.chain_[3]+c&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<t;){if(0==o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++r,++o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++r,++o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}},t.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)e[r]=this.chain_[n]>>i&255,++r;return e},t}(function(){return function(){this.blockSize=-1}}());var k=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(e){n.error(e)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var i=r[n];if(i in e&&"function"==typeof e[i])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=S),void 0===r.error&&(r.error=S),void 0===r.complete&&(r.complete=S);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}}),this.observers.push(r),o},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},e}();function S(){}function T(e,t,n){var r="";switch(t){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}var i=e+" failed: ";return i+=r+" argument "}n.assert=o,n.assertionError=a,n.base64=l,n.base64Decode=u,n.base64Encode=function(e){var t=s(e);return l.encodeByteArray(t,!0)},n.CONSTANTS=i,n.deepCopy=function(e){return c(void 0,e)},n.deepExtend=c,n.patchProperty=function(e,t,n){e[t]=n},n.Deferred=d,n.getUA=p,n.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(p())},n.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},n.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},n.ErrorFactory=v,n.FirebaseError=m,n.patchCapture=function(e){var t=h;return h=e,t},n.jsonEval=g,n.stringify=function(e){return JSON.stringify(e)},n.decode=y,n.isAdmin=function(e){var t=y(e).claims;return"object"==typeof t&&!0===t.admin},n.issuedAtTime=function(e){var t=y(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},n.isValidFormat=function(e){var t=y(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},n.isValidTimestamp=function(e){var t,n,r=y(e).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof r&&(r.hasOwnProperty("nbf")?t=r.nbf:r.hasOwnProperty("iat")&&(t=r.iat),n=r.hasOwnProperty("exp")?r.exp:t+86400),i&&t&&n&&i>=t&&i<=n},n.clone=function(e){return w({},e)},n.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0},n.extend=w,n.findKey=_,n.findValue=function(e,t,n){var r=_(e,t,n);return r&&e[r]},n.forEach=b,n.getAnyKey=function(e){for(var t in e)return t},n.getCount=function(e){var t=0;for(var n in e)t++;return t},n.getValues=function(e){var t=[],n=0;for(var r in e)t[n++]=e[r];return t},n.isEmpty=function(e){for(var t in e)return!1;return!0},n.isNonNullObject=function(e){return"object"==typeof e&&null!==e},n.map=function(e,t,n){var r={};for(var i in e)r[i]=t.call(n,e[i],i,e);return r},n.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},n.querystring=function(e){var t=[];return b(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},n.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},n.Sha1=E,n.async=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){e.apply(void 0,n)}).catch(function(e){t&&t(e)})}},n.createSubscribe=function(e,t){var n=new k(e,t);return n.subscribe.bind(n)},n.errorPrefix=T,n.validateArgCount=function(e,t,n,r){var i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},n.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(T(e,t,r)+"must be a valid function.")},n.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(T(e,t,r)+"must be a valid context object.")},n.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(T(e,t,r)+"must be a valid firebase namespace.")},n.stringLength=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},n.stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;o(++r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}},{tslib:24}],6:[function(e,t,n){"use strict";e("@firebase/polyfill");var r,i=(r=e("@firebase/app"))&&"object"==typeof r&&"default"in r?r.default:r;t.exports=i},{"@firebase/app":1,"@firebase/polyfill":3}],7:[function(e,t,n){"use strict";e("@firebase/messaging")},{"@firebase/messaging":2}],8:[function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))i.call(n,u)&&(s[u]=n[u]);if(r){a=r(n);for(var c=0;c<a.length;c++)o.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s}},{}],9:[function(e,t,n){(function(n){"use strict";var r=function(){};if("production"!==n.env.NODE_ENV){var i=e("./lib/ReactPropTypesSecret"),o={};r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}t.exports=function(e,t,a,s,l){if("production"!==n.env.NODE_ENV)for(var u in e)if(e.hasOwnProperty(u)){var c;try{if("function"!=typeof e[u]){var d=Error((s||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.");throw d.name="Invariant Violation",d}c=e[u](t,u,s,a,null,i)}catch(e){c=e}if(!c||c instanceof Error||r((s||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in o)){o[c.message]=!0;var p=l?l():"";r("Failed "+a+" type: "+c.message+(null!=p?p:""))}}}}).call(this,e("_process"))},{"./lib/ReactPropTypesSecret":10,_process:28}],10:[function(e,t,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}],11:[function(e,t,n){(function(n){"use strict";"production"!==n.env.NODE_ENV&&function(){var n=e("react"),r=e("object-assign"),i=e("prop-types/checkPropTypes"),o=e("schedule"),a=e("schedule/tracing"),s=function(){};function l(e,t,n,r,i,o,a,l){if(s(t),!e){var u=void 0;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,l],d=0;(u=new Error(t.replace(/%s/g,function(){return c[d++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}s=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},n||l(!1,"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");var u=function(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}};if("undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var c=document.createElement("react");u=function(e,t,n,r,i,o,a,s,u){"undefined"==typeof document&&l(!1,"The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var d=document.createEvent("Event"),p=!0,f=window.event,h=Array.prototype.slice.call(arguments,3);var m=void 0,v=!1,g=!1;function y(e){if(m=e.error,v=!0,null===m&&0===e.colno&&0===e.lineno&&(g=!0),e.defaultPrevented&&null!=m&&"object"==typeof m)try{m._suppressLogging=!0}catch(e){}}var b="react-"+(e||"invokeguardedcallback");window.addEventListener("error",y),c.addEventListener(b,function e(){c.removeEventListener(b,e,!1),void 0!==window.event&&window.hasOwnProperty("event")&&(window.event=f),t.apply(n,h),p=!1},!1),d.initEvent(b,!1,!1),c.dispatchEvent(d),p&&(v?g&&(m=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):m=new Error("An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue."),this.onError(m)),window.removeEventListener("error",y)}}var d=u,p=!1,f=null,h=!1,m=null,v={onError:function(e){p=!0,f=e}};function g(e,t,n,r,i,o,a,s,l){p=!1,f=null,d.apply(v,arguments)}function y(){return p}function b(){if(p){var e=f;return p=!1,f=null,e}l(!1,"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}var w=null,_={};function E(){if(w)for(var e in _){var t=_[e],n=w.indexOf(e);if(n>-1||l(!1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e),!T[n]){t.extractEvents||l(!1,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e),T[n]=t;var r=t.eventTypes;for(var i in r)k(r[i],t,i)||l(!1,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",i,e)}}}function k(e,t,n){C.hasOwnProperty(n)&&l(!1,"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",n),C[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r){if(r.hasOwnProperty(i))S(r[i],t,n)}return!0}return!!e.registrationName&&(S(e.registrationName,t,n),!0)}function S(e,t,n){x[e]&&l(!1,"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e),x[e]=t,P[e]=t.eventTypes[n].dependencies;var r=e.toLowerCase();N[r]=e,"onDoubleClick"===e&&(N.ondblclick=e)}var T=[],C={},x={},P={},N={};var O=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(void 0===t)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(r.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var o=r.map(function(e){return""+e}),a=o[0],s=o[1],l=o[2],u=o[3],c=o[4],d=o[5],p=o[6],f=o[7],h="Warning: "+t;switch(r.length){case 0:console.error(h);break;case 1:console.error(h,a);break;case 2:console.error(h,a,s);break;case 3:console.error(h,a,s,l);break;case 4:console.error(h,a,s,l,u);break;case 5:console.error(h,a,s,l,u,c);break;case 6:console.error(h,a,s,l,u,c,d);break;case 7:console.error(h,a,s,l,u,c,d,p);break;case 8:console.error(h,a,s,l,u,c,d,p,f);break;default:throw new Error("warningWithoutStack() currently supports at most 8 arguments.")}}try{var m=0,v="Warning: "+t.replace(/%s/g,function(){return r[m++]});throw new Error(v)}catch(e){}}},D=null,M=null,A=null;var R=void 0;function I(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=A(r),function(e,t,n,r,i,o,a,s,l){if(g.apply(this,arguments),p){var u=b();h||(h=!0,m=u)}}(i,n,void 0,e),e.currentTarget=null}function U(e,t){return null==t&&l(!1,"accumulateInto(...): Accumulated items must not be null or undefined."),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function F(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}R=function(e){var t=e._dispatchListeners,n=e._dispatchInstances,r=Array.isArray(t),i=r?t.length:t?1:0,o=Array.isArray(n),a=o?n.length:n?1:0;(o!==r||a!==i)&&O(!1,"EventPluginUtils: Invalid `event`.")};var L=null,j=function(e,t){e&&(!function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(R(e),Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)I(e,0,n[i],r[i]);else n&&I(e,0,n,r);e._dispatchListeners=null,e._dispatchInstances=null}(e),e.isPersistent()||e.constructor.release(e))},W=function(e){return j(e)},B=function(e){return j(e)};var z={injectEventPluginOrder:function(e){w&&l(!1,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."),w=Array.prototype.slice.call(e),E()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];_.hasOwnProperty(n)&&_[n]===r||(_[n]&&l(!1,"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",n),_[n]=r,t=!0)}t&&E()}};function V(e,t){var n,r=e.stateNode;if(!r)return null;var i=D(r);return i?(n=i[t],function(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||(r=t,"button"!==r&&"input"!==r&&"select"!==r&&"textarea"!==r));default:return!1}var r}(t,e.type,i)?null:(n&&"function"!=typeof n&&l(!1,"Expected `%s` listener to be a function, instead got a value of `%s` type.",t,typeof n),n)):null}function q(e,t){null!==e&&(L=U(L,e));var n=L;L=null,n&&(F(n,t?W:B),L&&l(!1,"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."),function(){if(h){var e=m;throw h=!1,m=null,e}}())}function H(e,t,n,r){q(function(e,t,n,r){for(var i=null,o=0;o<T.length;o++){var a=T[o];if(a){var s=a.extractEvents(e,t,n,r);s&&(i=U(i,s))}}return i}(e,t,n,r),!1)}var K=0,G=1,$=2,Y=3,Q=4,X=5,J=6,Z=7,ee=8,te=9,ne=10,re=11,ie=12,oe=13,ae=14,se=15,le=16,ue=Math.random().toString(36).slice(2),ce="__reactInternalInstance$"+ue,de="__reactEventHandlers$"+ue;function pe(e,t){t[ce]=e}function fe(e){if(e[ce])return e[ce];for(;!e[ce];){if(!e.parentNode)return null;e=e.parentNode}var t=e[ce];return t.tag===Z||t.tag===ee?t:null}function he(e){var t=e[ce];return t&&(t.tag===Z||t.tag===ee)?t:null}function me(e){if(e.tag===Z||e.tag===ee)return e.stateNode;l(!1,"getNodeFromInstance: Invalid argument.")}function ve(e){return e[de]||null}function ge(e,t){e[de]=t}function ye(e){do{e=e.return}while(e&&e.tag!==Z);return e||null}function be(e,t,n,r,i){for(var o=e&&t?function(e,t){for(var n=0,r=e;r;r=ye(r))n++;for(var i=0,o=t;o;o=ye(o))i++;for(;n-i>0;)e=ye(e),n--;for(;i-n>0;)t=ye(t),i--;for(var a=n;a--;){if(e===t||e===t.alternate)return e;e=ye(e),t=ye(t)}return null}(e,t):null,a=[];e&&e!==o;){var s=e.alternate;if(null!==s&&s===o)break;a.push(e),e=ye(e)}for(var l=[];t&&t!==o;){var u=t.alternate;if(null!==u&&u===o)break;l.push(t),t=ye(t)}for(var c=0;c<a.length;c++)n(a[c],"bubbled",r);for(var d=l.length;d-- >0;)n(l[d],"captured",i)}function we(e,t,n){e||O(!1,"Dispatching inst must not be null");var r=function(e,t,n){return V(e,t.dispatchConfig.phasedRegistrationNames[n])}(e,n,t);r&&(n._dispatchListeners=U(n._dispatchListeners,r),n._dispatchInstances=U(n._dispatchInstances,e))}function _e(e){e&&e.dispatchConfig.phasedRegistrationNames&&function(e,t,n){for(var r=[];e;)r.push(e),e=ye(e);var i=void 0;for(i=r.length;i-- >0;)t(r[i],"captured",n);for(i=0;i<r.length;i++)t(r[i],"bubbled",n)}(e._targetInst,we,e)}function Ee(e,t,n){if(e&&n&&n.dispatchConfig.registrationName){var r=V(e,n.dispatchConfig.registrationName);r&&(n._dispatchListeners=U(n._dispatchListeners,r),n._dispatchInstances=U(n._dispatchInstances,e))}}function ke(e){e&&e.dispatchConfig.registrationName&&Ee(e._targetInst,0,e)}function Se(e){F(e,_e)}var Te=!("undefined"==typeof window||!window.document||!window.document.createElement);function Ce(e){return e}function xe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pe={animationend:xe("Animation","AnimationEnd"),animationiteration:xe("Animation","AnimationIteration"),animationstart:xe("Animation","AnimationStart"),transitionend:xe("Transition","TransitionEnd")},Ne={},Oe={};function De(e){if(Ne[e])return Ne[e];if(!Pe[e])return e;var t=Pe[e];for(var n in t)if(t.hasOwnProperty(n)&&n in Oe)return Ne[e]=t[n];return e}Te&&(Oe=document.createElement("div").style,"AnimationEvent"in window||(delete Pe.animationend.animation,delete Pe.animationiteration.animation,delete Pe.animationstart.animation),"TransitionEvent"in window||delete Pe.transitionend.transition);var Me=Ce("abort"),Ae=Ce(De("animationend")),Re=Ce(De("animationiteration")),Ie=Ce(De("animationstart")),Ue=Ce("blur"),Fe=Ce("canplay"),Le=Ce("canplaythrough"),je=Ce("cancel"),We=Ce("change"),Be=Ce("click"),ze=Ce("close"),Ve=Ce("compositionend"),qe=Ce("compositionstart"),He=Ce("compositionupdate"),Ke=Ce("contextmenu"),Ge=Ce("copy"),$e=Ce("cut"),Ye=Ce("dblclick"),Qe=Ce("auxclick"),Xe=Ce("drag"),Je=Ce("dragend"),Ze=Ce("dragenter"),et=Ce("dragexit"),tt=Ce("dragleave"),nt=Ce("dragover"),rt=Ce("dragstart"),it=Ce("drop"),ot=Ce("durationchange"),at=Ce("emptied"),st=Ce("encrypted"),lt=Ce("ended"),ut=Ce("error"),ct=Ce("focus"),dt=Ce("gotpointercapture"),pt=Ce("input"),ft=Ce("invalid"),ht=Ce("keydown"),mt=Ce("keypress"),vt=Ce("keyup"),gt=Ce("load"),yt=Ce("loadstart"),bt=Ce("loadeddata"),wt=Ce("loadedmetadata"),_t=Ce("lostpointercapture"),Et=Ce("mousedown"),kt=Ce("mousemove"),St=Ce("mouseout"),Tt=Ce("mouseover"),Ct=Ce("mouseup"),xt=Ce("paste"),Pt=Ce("pause"),Nt=Ce("play"),Ot=Ce("playing"),Dt=Ce("pointercancel"),Mt=Ce("pointerdown"),At=Ce("pointermove"),Rt=Ce("pointerout"),It=Ce("pointerover"),Ut=Ce("pointerup"),Ft=Ce("progress"),Lt=Ce("ratechange"),jt=Ce("reset"),Wt=Ce("scroll"),Bt=Ce("seeked"),zt=Ce("seeking"),Vt=Ce("selectionchange"),qt=Ce("stalled"),Ht=Ce("submit"),Kt=Ce("suspend"),Gt=Ce("textInput"),$t=Ce("timeupdate"),Yt=Ce("toggle"),Qt=Ce("touchcancel"),Xt=Ce("touchend"),Jt=Ce("touchmove"),Zt=Ce("touchstart"),en=Ce(De("transitionend")),tn=Ce("volumechange"),nn=Ce("waiting"),rn=Ce("wheel"),on=[Me,Fe,Le,ot,at,st,lt,ut,bt,wt,yt,Pt,Nt,Ot,Ft,Lt,Bt,zt,qt,Kt,$t,tn,nn];function an(e){return function(e){return e}(e)}var sn=null,ln=null,un=null;function cn(){if(un)return un;var e=void 0,t=ln,n=t.length,r=void 0,i=dn(),o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);var s=r>1?1-r:void 0;return un=i.slice(e,s)}function dn(){return"value"in sn?sn.value:sn.textContent}var pn=10,fn={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function hn(){return!0}function mn(){return!1}function vn(e,t,n,r){delete this.nativeEvent,delete this.preventDefault,delete this.stopPropagation,delete this.isDefaultPrevented,delete this.isPropagationStopped,this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){delete this[o];var a=i[o];a?this[o]=a(n):"target"===o?this.target=r:this[o]=n[o]}var s=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;return this.isDefaultPrevented=s?hn:mn,this.isPropagationStopped=mn,this}function gn(e,t){var n="function"==typeof t;return{configurable:!0,set:function(e){return r(n?"setting the method":"setting the property","This is effectively a no-op"),e},get:function(){return r(n?"accessing the method":"accessing the property",n?"This is a no-op function":"This is set to null"),t}};function r(t,n){O(!1,"This synthetic event is reused for performance reasons. If you're seeing this, you're %s `%s` on a released/nullified synthetic event. %s. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.",t,e,n)}}function yn(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function bn(e){e instanceof this||l(!1,"Trying to release an event instance into a pool of a different type."),e.destructor(),this.eventPool.length<pn&&this.eventPool.push(e)}function wn(e){e.eventPool=[],e.getPooled=yn,e.release=bn}r(vn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=hn)},persist:function(){this.isPersistent=hn},isPersistent:mn,destructor:function(){var e=this.constructor.Interface;for(var t in e)Object.defineProperty(this,t,gn(t,e[t]));this.dispatchConfig=null,this._targetInst=null,this.nativeEvent=null,this.isDefaultPrevented=mn,this.isPropagationStopped=mn,this._dispatchListeners=null,this._dispatchInstances=null,Object.defineProperty(this,"nativeEvent",gn("nativeEvent",null)),Object.defineProperty(this,"isDefaultPrevented",gn("isDefaultPrevented",mn)),Object.defineProperty(this,"isPropagationStopped",gn("isPropagationStopped",mn)),Object.defineProperty(this,"preventDefault",gn("preventDefault",function(){})),Object.defineProperty(this,"stopPropagation",gn("stopPropagation",function(){}))}}),vn.Interface=fn,vn.extend=function(e){var t=this,n=function(){};n.prototype=t.prototype;var i=new n;function o(){return t.apply(this,arguments)}return r(i,o.prototype),o.prototype=i,o.prototype.constructor=o,o.Interface=r({},t.Interface,e),o.extend=t.extend,wn(o),o},wn(vn);var _n=vn.extend({data:null}),En=vn.extend({data:null}),kn=[9,13,27,32],Sn=229,Tn=Te&&"CompositionEvent"in window,Cn=null;Te&&"documentMode"in document&&(Cn=document.documentMode);var xn=Te&&"TextEvent"in window&&!Cn,Pn=Te&&(!Tn||Cn&&Cn>8&&Cn<=11),Nn=32,On=String.fromCharCode(Nn),Dn={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:[Ve,mt,Gt,xt]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:[Ue,Ve,ht,mt,vt,Et]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:[Ue,qe,ht,mt,vt,Et]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:[Ue,He,ht,mt,vt,Et]}},Mn=!1;function An(e,t){switch(e){case vt:return-1!==kn.indexOf(t.keyCode);case ht:return t.keyCode!==Sn;case mt:case Et:case Ue:return!0;default:return!1}}function Rn(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function In(e){return"ko"===e.locale}var Un=!1;function Fn(e,t,n,r){var i=void 0,o=void 0;if(Tn?i=function(e){switch(e){case qe:return Dn.compositionStart;case Ve:return Dn.compositionEnd;case He:return Dn.compositionUpdate}}(e):Un?An(e,n)&&(i=Dn.compositionEnd):function(e,t){return e===ht&&t.keyCode===Sn}(e,n)&&(i=Dn.compositionStart),!i)return null;Pn&&!In(n)&&(Un||i!==Dn.compositionStart?i===Dn.compositionEnd&&Un&&(o=cn()):Un=function(e){return sn=e,ln=dn(),!0}(r));var a=_n.getPooled(i,t,n,r);if(o)a.data=o;else{var s=Rn(n);null!==s&&(a.data=s)}return Se(a),a}function Ln(e,t){if(Un){if(e===Ve||!Tn&&An(e,t)){var n=cn();return sn=null,ln=null,un=null,Un=!1,n}return null}switch(e){case xt:return null;case mt:if(!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case Ve:return Pn&&!In(t)?null:t.data;default:return null}}function jn(e,t,n,r){var i=void 0;if(!(i=xn?function(e,t){switch(e){case Ve:return Rn(t);case mt:return t.which!==Nn?null:(Mn=!0,On);case Gt:var n=t.data;return n===On&&Mn?null:n;default:return null}}(e,n):Ln(e,n)))return null;var o=En.getPooled(Dn.beforeInput,t,n,r);return o.data=i,Se(o),o}var Wn={eventTypes:Dn,extractEvents:function(e,t,n,r){var i=Fn(e,t,n,r),o=jn(e,t,n,r);return null===i?o:null===o?i:[i,o]}},Bn=null,zn=null,Vn=null;function qn(e){var t=M(e);if(t){"function"!=typeof Bn&&l(!1,"setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var n=D(t.stateNode);Bn(t.stateNode,t.type,n)}}function Hn(e){zn?Vn?Vn.push(e):Vn=[e]:zn=e}function Kn(){if(zn){var e=zn,t=Vn;if(zn=null,Vn=null,qn(e),t)for(var n=0;n<t.length;n++)qn(t[n])}}var Gn=function(e,t){return e(t)},$n=function(e,t,n){return e(t,n)},Yn=function(){},Qn=!1;function Xn(e,t){if(Qn)return e(t);Qn=!0;try{return Gn(e,t)}finally{Qn=!1,(null!==zn||null!==Vn)&&(Yn(),Kn())}}var Jn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Jn[e.type]:"textarea"===t}var er=1,tr=3,nr=8,rr=9,ir=11;function or(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===tr?t.parentNode:t}function ar(e){if(!Te)return!1;var t="on"+e,n=t in document;if(!n){var r=document.createElement("div");r.setAttribute(t,"return;"),n="function"==typeof r[t]}return n}function sr(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function lr(e){return e._valueTracker}function ur(e){lr(e)||(e._valueTracker=function(e){var t=sr(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){!function(e){e._valueTracker=null}(e),delete e[t]}}}}(e))}function cr(e){if(!e)return!1;var t=lr(e);if(!t)return!0;var n=t.getValue(),r=function(e){var t="";return e?t=sr(e)?e.checked?"true":"false":e.value:t}(e);return r!==n&&(t.setValue(r),!0)}var dr=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pr=/^(.*)[\\\/]/,fr=function(e,t,n){var r="";if(t){var i=t.fileName,o=i.replace(pr,"");if(/^index\./.test(o)){var a=i.match(pr);if(a){var s=a[1];if(s)o=s.replace(pr,"")+"/"+o}}r=" (at "+o+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r},hr="function"==typeof Symbol&&Symbol.for,mr=hr?Symbol.for("react.element"):60103,vr=hr?Symbol.for("react.portal"):60106,gr=hr?Symbol.for("react.fragment"):60107,yr=hr?Symbol.for("react.strict_mode"):60108,br=hr?Symbol.for("react.profiler"):60114,wr=hr?Symbol.for("react.provider"):60109,_r=hr?Symbol.for("react.context"):60110,Er=hr?Symbol.for("react.async_mode"):60111,kr=hr?Symbol.for("react.forward_ref"):60112,Sr=hr?Symbol.for("react.placeholder"):60113,Tr="function"==typeof Symbol&&Symbol.iterator,Cr="@@iterator";function xr(e){if(null===e||"object"!=typeof e)return null;var t=Tr&&e[Tr]||e[Cr];return"function"==typeof t?t:null}var Pr=0,Nr=1,Or=2;function Dr(e){return e._reactResult}function Mr(e){if(null==e)return null;if("number"==typeof e.tag&&O(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Er:return"AsyncMode";case gr:return"Fragment";case vr:return"Portal";case br:return"Profiler";case yr:return"StrictMode";case Sr:return"Placeholder"}if("object"==typeof e){switch(e.$$typeof){case _r:return"Context.Consumer";case wr:return"Context.Provider";case kr:var t=e.render,n=t.displayName||t.name||"";return e.displayName||(""!==n?"ForwardRef("+n+")":"ForwardRef")}if("function"==typeof e.then){var r=function(e){return e._reactStatus===Nr?e._reactResult:null}(e);if(r)return Mr(r)}}return null}var Ar=dr.ReactDebugCurrentFrame;function Rr(e){switch(e.tag){case Q:case K:case G:case $:case Y:case Z:case ne:var t=e._debugOwner,n=e._debugSource,r=Mr(e.type),i=null;return t&&(i=Mr(t.type)),fr(r,n,i);default:return""}}function Ir(e){var t="",n=e;do{t+=Rr(n),n=n.return}while(n);return t}var Ur=null,Fr=null;function Lr(){if(null===Ur)return null;var e=Ur._debugOwner;return null!==e&&void 0!==e?Mr(e.type):null}function jr(){return null===Ur?"":Ir(Ur)}function Wr(){Ar.getCurrentStack=null,Ur=null,Fr=null}function Br(e){Ar.getCurrentStack=jr,Ur=e,Fr=null}function zr(e){Fr=e}var Vr=function(e,t){if(!e){for(var n=dr.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];O.apply(void 0,[!1,t+"%s"].concat(i,[n]))}},qr=0,Hr=2,Kr=3,Gr=4,$r=5,Yr=6,Qr=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Xr=Qr+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Jr="data-reactroot",Zr=new RegExp("^["+Qr+"]["+Xr+"]*$"),ei=Object.prototype.hasOwnProperty,ti={},ni={};function ri(e){return!!ei.call(ni,e)||!ei.call(ti,e)&&(Zr.test(e)?(ni[e]=!0,!0):(ti[e]=!0,Vr(!1,"Invalid attribute name: `%s`",e),!1))}function ii(e,t,n){return null!==t?t.type===qr:!n&&(e.length>2&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))}function oi(e,t,n,r){if(null!==n&&n.type===qr)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==n)return!n.acceptsBooleans;var i=e.toLowerCase().slice(0,5);return"data-"!==i&&"aria-"!==i;default:return!1}}function ai(e,t,n,r){if(null===t||void 0===t)return!0;if(oi(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case Kr:return!t;case Gr:return!1===t;case $r:return isNaN(t);case Yr:return isNaN(t)||t<1}return!1}function si(e){return ui.hasOwnProperty(e)?ui[e]:null}function li(e,t,n,r,i){this.acceptsBooleans=t===Hr||t===Kr||t===Gr,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var ui={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(function(e){ui[e]=new li(e,qr,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],n=e[1];ui[t]=new li(t,1,!1,n,null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ui[e]=new li(e,Hr,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ui[e]=new li(e,Hr,!1,e,null)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){ui[e]=new li(e,Kr,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ui[e]=new li(e,Kr,!0,e,null)}),["capture","download"].forEach(function(e){ui[e]=new li(e,Gr,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){ui[e]=new li(e,Yr,!1,e,null)}),["rowSpan","start"].forEach(function(e){ui[e]=new li(e,$r,!1,e.toLowerCase(),null)});var ci=/[\-\:]([a-z])/g,di=function(e){return e[1].toUpperCase()};function pi(e,t,n,r){if(r.mustUseProperty)return e[r.propertyName];var i=r.attributeName,o=null;if(r.type===Gr){if(e.hasAttribute(i)){var a=e.getAttribute(i);return""===a||(ai(t,n,r,!1)?a:a===""+n?n:a)}}else if(e.hasAttribute(i)){if(ai(t,n,r,!1))return e.getAttribute(i);if(r.type===Kr)return n;o=e.getAttribute(i)}return ai(t,n,r,!1)?null===o?n:o:o===""+n?n:o}function fi(e,t,n){if(ri(t)){if(!e.hasAttribute(t))return void 0===n?void 0:null;var r=e.getAttribute(t);return r===""+n?n:r}}function hi(e,t,n,r){var i=si(t);if(!ii(t,i,r))if(ai(t,n,i,r)&&(n=null),r||null===i){if(ri(t)){var o=t;null===n?e.removeAttribute(o):e.setAttribute(o,""+n)}}else if(i.mustUseProperty){var a=i.propertyName;if(null===n){var s=i.type;e[a]=s!==Kr&&""}else e[a]=n}else{var l=i.attributeName,u=i.attributeNamespace;if(null===n)e.removeAttribute(l);else{var c=i.type,d=void 0;d=c===Kr||c===Gr&&!0===n?"":""+n,u?e.setAttributeNS(u,l,d):e.setAttribute(l,d)}}}function mi(e){return""+e}function vi(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}["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"].forEach(function(e){var t=e.replace(ci,di);ui[t]=new li(t,1,!1,e,null)}),["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(ci,di);ui[t]=new li(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ci,di);ui[t]=new li(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ui.tabIndex=new li("tabIndex",1,!1,"tabindex",null);var gi,yi={checkPropTypes:null};gi=dr.ReactDebugCurrentFrame;var bi={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},wi={value:function(e,t,n){return bi[e.type]||e.onChange||e.readOnly||e.disabled||null==e[t]?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return e.onChange||e.readOnly||e.disabled||null==e[t]?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}};yi.checkPropTypes=function(e,t){i(wi,t,"prop",e,gi.getStackAddendum)};var _i=!0,Ei=!1,ki=!1,Si=!1,Ti=!0,Ci=!0,xi=!1,Pi=!1,Ni=!0,Oi=!0,Di=!1,Mi=!1,Ai=!1,Ri=!1,Ii=!1;function Ui(e){return"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}function Fi(e,t){var n=e,i=t.checked;return r({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=i?i:n._wrapperState.initialChecked})}function Li(e,t){yi.checkPropTypes("input",t),void 0===t.checked||void 0===t.defaultChecked||Ai||(Vr(!1,"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components",Lr()||"A component",t.type),Ai=!0),void 0===t.value||void 0===t.defaultValue||Mi||(Vr(!1,"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components",Lr()||"A component",t.type),Mi=!0);var n=e,r=null==t.defaultValue?"":t.defaultValue;n._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:vi(null!=t.value?t.value:r),controlled:Ui(t)}}function ji(e,t){var n=e,r=t.checked;null!=r&&hi(n,"checked",r,!1)}function Wi(e,t){var n=e,r=Ui(t);n._wrapperState.controlled||!r||Ii||(Vr(!1,"A component is changing an uncontrolled input of type %s to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components",t.type),Ii=!0),!n._wrapperState.controlled||r||Ri||(Vr(!1,"A component is changing a controlled input of type %s to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components",t.type),Ri=!0),ji(e,t);var i=vi(t.value),o=t.type;if(null!=i)"number"===o?(0===i&&""===n.value||n.value!=i)&&(n.value=mi(i)):n.value!==mi(i)&&(n.value=mi(i));else if("submit"===o||"reset"===o)return void n.removeAttribute("value");Di?t.hasOwnProperty("defaultValue")&&Vi(n,t.type,vi(t.defaultValue)):t.hasOwnProperty("value")?Vi(n,t.type,i):t.hasOwnProperty("defaultValue")&&Vi(n,t.type,vi(t.defaultValue)),Di?null==t.defaultChecked?n.removeAttribute("checked"):n.defaultChecked=!!t.defaultChecked:null==t.checked&&null!=t.defaultChecked&&(n.defaultChecked=!!t.defaultChecked)}function Bi(e,t,n){var r=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type,o="submit"===i||"reset"===i;if(o&&(void 0===t.value||null===t.value))return;var a=mi(r._wrapperState.initialValue);if(!n)if(Di){var s=vi(t.value);null!=s&&(o||s!==r.value)&&(r.value=mi(s))}else a!==r.value&&(r.value=a);if(Di){var l=vi(t.defaultValue);null!=l&&(r.defaultValue=mi(l))}else r.defaultValue=a}var u=r.name;""!==u&&(r.name=""),Di?(n||ji(e,t),t.hasOwnProperty("defaultChecked")&&(r.defaultChecked=!r.defaultChecked,r.defaultChecked=!!t.defaultChecked)):(r.defaultChecked=!r.defaultChecked,r.defaultChecked=!!r._wrapperState.initialChecked),""!==u&&(r.name=u)}function zi(e,t){var n=e;Wi(n,t),function(e,t){var n=t.name;if("radio"===t.type&&null!=n){for(var r=e;r.parentNode;)r=r.parentNode;for(var i=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),o=0;o<i.length;o++){var a=i[o];if(a!==e&&a.form===e.form){var s=ve(a);s||l(!1,"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."),cr(a),Wi(a,s)}}}}(n,t)}function Vi(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=mi(e._wrapperState.initialValue):e.defaultValue!==mi(n)&&(e.defaultValue=mi(n)))}var qi={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:[Ue,We,Be,ct,pt,ht,vt,Vt]}};function Hi(e,t,n){var r=vn.getPooled(qi.change,e,t,n);return r.type="change",Hn(n),Se(r),r}var Ki=null,Gi=null;function $i(e){q(e,!1)}function Yi(e){if(cr(me(e)))return e}function Qi(e,t){if(e===We)return t}var Xi=!1;function Ji(){Ki&&(Ki.detachEvent("onpropertychange",Zi),Ki=null,Gi=null)}function Zi(e){"value"===e.propertyName&&Yi(Gi)&&function(e){Xn($i,Hi(Gi,e,or(e)))}(e)}function eo(e,t,n){e===ct?(Ji(),function(e,t){Gi=t,(Ki=e).attachEvent("onpropertychange",Zi)}(t,n)):e===Ue&&Ji()}function to(e,t){if(e===Vt||e===vt||e===ht)return Yi(Gi)}function no(e,t){if(e===Be)return Yi(t)}function ro(e,t){if(e===pt||e===We)return Yi(t)}Te&&(Xi=ar("input")&&(!document.documentMode||document.documentMode>9));var io={eventTypes:qi,_isInputEventSupported:Xi,extractEvents:function(e,t,n,r){var i,o,a,s,l=t?me(t):window,u=void 0,c=void 0;if("select"===(o=(i=l).nodeName&&i.nodeName.toLowerCase())||"input"===o&&"file"===i.type?u=Qi:Zn(l)?Xi?u=ro:(u=to,c=eo):function(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}(l)&&(u=no),u){var d=u(e,t);if(d)return Hi(d,n,r)}c&&c(e,l,t),e===Ue&&(s=(a=l)._wrapperState)&&s.controlled&&"number"===a.type&&(Di||Vi(a,"number",a.value))}},oo=vn.extend({view:null,detail:null}),ao={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function so(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=ao[e];return!!n&&!!t[n]}function lo(e){return so}var uo=0,co=0,po=!1,fo=!1,ho=oo.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:lo,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=uo;return uo=e.screenX,po?"mousemove"===e.type?e.screenX-t:0:(po=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=co;return co=e.screenY,fo?"mousemove"===e.type?e.screenY-t:0:(fo=!0,0)}}),mo=ho.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),vo={mouseEnter:{registrationName:"onMouseEnter",dependencies:[St,Tt]},mouseLeave:{registrationName:"onMouseLeave",dependencies:[St,Tt]},pointerEnter:{registrationName:"onPointerEnter",dependencies:[Rt,It]},pointerLeave:{registrationName:"onPointerLeave",dependencies:[Rt,It]}},go={eventTypes:vo,extractEvents:function(e,t,n,r){var i=e===Tt||e===It,o=e===St||e===Rt;if(i&&(n.relatedTarget||n.fromElement))return null;if(!o&&!i)return null;var a=void 0;if(r.window===r)a=r;else{var s=r.ownerDocument;a=s?s.defaultView||s.parentWindow:window}var l=void 0,u=void 0;if(o){l=t;var c=n.relatedTarget||n.toElement;u=c?fe(c):null}else l=null,u=t;if(l===u)return null;var d=void 0,p=void 0,f=void 0,h=void 0;e===St||e===Tt?(d=ho,p=vo.mouseLeave,f=vo.mouseEnter,h="mouse"):e!==Rt&&e!==It||(d=mo,p=vo.pointerLeave,f=vo.pointerEnter,h="pointer");var m=null==l?a:me(l),v=null==u?a:me(u),g=d.getPooled(p,l,n,r);g.type=h+"leave",g.target=m,g.relatedTarget=v;var y=d.getPooled(f,u,n,r);return y.type=h+"enter",y.target=v,y.relatedTarget=m,function(e,t,n,r){be(n,r,Ee,e,t)}(g,y,l,u),[g,y]}},yo=Object.prototype.hasOwnProperty;function bo(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function wo(e,t){if(bo(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!yo.call(t,n[i])||!bo(e[n[i]],t[n[i]]))return!1;return!0}function _o(e){return e._reactInternalFiber}var Eo=0,ko=1,So=2,To=4,Co=6,xo=8,Po=16,No=32,Oo=64,Do=128,Mo=256,Ao=420,Ro=511,Io=512,Uo=1024,Fo=dr.ReactCurrentOwner,Lo=1,jo=2,Wo=3;function Bo(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if((t.effectTag&So)!==Eo)return Lo;for(;t.return;)if(((t=t.return).effectTag&So)!==Eo)return Lo}return t.tag===X?jo:Wo}function zo(e){return Bo(e)===jo}function Vo(e){Bo(e)!==jo&&l(!1,"Unable to find node on an unmounted component.")}function qo(e){var t=e.alternate;if(!t){var n=Bo(e);return n===Wo&&l(!1,"Unable to find node on an unmounted component."),n===Lo?null:e}for(var r=e,i=t;;){var o=r.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var s=o.child;s;){if(s===r)return Vo(o),e;if(s===i)return Vo(o),t;s=s.sibling}l(!1,"Unable to find node on an unmounted component.")}if(r.return!==i.return)r=o,i=a;else{for(var u=!1,c=o.child;c;){if(c===r){u=!0,r=o,i=a;break}if(c===i){u=!0,i=o,r=a;break}c=c.sibling}if(!u){for(c=a.child;c;){if(c===r){u=!0,r=a,i=o;break}if(c===i){u=!0,i=a,r=o;break}c=c.sibling}u||l(!1,"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}r.alternate!==i&&l(!1,"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}return r.tag!==X&&l(!1,"Unable to find node on an unmounted component."),r.stateNode.current===r?e:t}function Ho(e){var t=qo(e);if(!t)return null;for(var n=t;;){if(n.tag===Z||n.tag===ee)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===t)return null;for(;!n.sibling;){if(!n.return||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}var Ko=vn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Go=vn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$o=oo.extend({relatedTarget:null});function Yo(e){var t=void 0,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,10===t&&(t=13),t>=32||13===t?t:0}var Qo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xo={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};var Jo=oo.extend({key:function(e){if(e.key){var t=Qo[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=Yo(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?Xo[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:lo,charCode:function(e){return"keypress"===e.type?Yo(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yo(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Zo=ho.extend({dataTransfer:null}),ea=oo.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:lo}),ta=vn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),na=ho.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),ra=[[Me,"abort"],[Ae,"animationEnd"],[Re,"animationIteration"],[Ie,"animationStart"],[Fe,"canPlay"],[Le,"canPlayThrough"],[Xe,"drag"],[Ze,"dragEnter"],[et,"dragExit"],[tt,"dragLeave"],[nt,"dragOver"],[ot,"durationChange"],[at,"emptied"],[st,"encrypted"],[lt,"ended"],[ut,"error"],[dt,"gotPointerCapture"],[gt,"load"],[bt,"loadedData"],[wt,"loadedMetadata"],[yt,"loadStart"],[_t,"lostPointerCapture"],[kt,"mouseMove"],[St,"mouseOut"],[Tt,"mouseOver"],[Ot,"playing"],[At,"pointerMove"],[Rt,"pointerOut"],[It,"pointerOver"],[Ft,"progress"],[Wt,"scroll"],[zt,"seeking"],[qt,"stalled"],[Kt,"suspend"],[$t,"timeUpdate"],[Yt,"toggle"],[Jt,"touchMove"],[en,"transitionEnd"],[nn,"waiting"],[rn,"wheel"]],ia={},oa={};function aa(e,t){var n=e[0],r=e[1],i="on"+(r[0].toUpperCase()+r.slice(1)),o={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[n],isInteractive:t};ia[r]=o,oa[n]=o}[[Ue,"blur"],[je,"cancel"],[Be,"click"],[ze,"close"],[Ke,"contextMenu"],[Ge,"copy"],[$e,"cut"],[Qe,"auxClick"],[Ye,"doubleClick"],[Je,"dragEnd"],[rt,"dragStart"],[it,"drop"],[ct,"focus"],[pt,"input"],[ft,"invalid"],[ht,"keyDown"],[mt,"keyPress"],[vt,"keyUp"],[Et,"mouseDown"],[Ct,"mouseUp"],[xt,"paste"],[Pt,"pause"],[Nt,"play"],[Dt,"pointerCancel"],[Mt,"pointerDown"],[Ut,"pointerUp"],[Lt,"rateChange"],[jt,"reset"],[Bt,"seeked"],[Ht,"submit"],[Qt,"touchCancel"],[Xt,"touchEnd"],[Zt,"touchStart"],[tn,"volumeChange"]].forEach(function(e){aa(e,!0)}),ra.forEach(function(e){aa(e,!1)});var sa=[Me,je,Fe,Le,ze,ot,at,st,lt,ut,pt,ft,gt,bt,wt,yt,Pt,Nt,Ot,Ft,Lt,jt,Bt,zt,qt,Ht,Kt,$t,Yt,tn,nn],la={eventTypes:ia,isInteractiveTopLevelEventType:function(e){var t=oa[e];return void 0!==t&&!0===t.isInteractive},extractEvents:function(e,t,n,r){var i=oa[e];if(!i)return null;var o=void 0;switch(e){case mt:if(0===Yo(n))return null;case ht:case vt:o=Jo;break;case Ue:case ct:o=$o;break;case Be:if(2===n.button)return null;case Qe:case Ye:case Et:case kt:case Ct:case St:case Tt:case Ke:o=ho;break;case Xe:case Je:case Ze:case et:case tt:case nt:case rt:case it:o=Zo;break;case Qt:case Xt:case Jt:case Zt:o=ea;break;case Ae:case Re:case Ie:o=Ko;break;case en:o=ta;break;case Wt:o=oo;break;case rn:o=na;break;case Ge:case $e:case xt:o=Go;break;case dt:case _t:case Dt:case Mt:case At:case Rt:case It:case Ut:o=mo;break;default:-1===sa.indexOf(e)&&O(!1,"SimpleEventPlugin: Unhandled event type, `%s`. This warning is likely caused by a bug in React. Please file an issue.",e),o=vn}var a=o.getPooled(i,t,n,r);return Se(a),a}},ua=la.isInteractiveTopLevelEventType,ca=10,da=[];function pa(e){for(;e.return;)e=e.return;return e.tag!==X?null:e.stateNode.containerInfo}function fa(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=pa(n);if(!r)break;e.ancestors.push(n),n=fe(r)}while(n);for(var i=0;i<e.ancestors.length;i++)t=e.ancestors[i],H(e.topLevelType,t,e.nativeEvent,or(e.nativeEvent))}var ha=!0;function ma(e){ha=!!e}function va(e,t){if(!t)return null;var n=ua(e)?ya:ba;!function(e,t,n){e.addEventListener(t,n,!1)}(t,an(e),n.bind(null,e))}function ga(e,t){if(!t)return null;var n=ua(e)?ya:ba;!function(e,t,n){e.addEventListener(t,n,!0)}(t,an(e),n.bind(null,e))}function ya(e,t){$n(ba,e,t)}function ba(e,t){if(ha){var n=fe(or(t));null===n||"number"!=typeof n.tag||zo(n)||(n=null);var r,i=function(e,t,n){if(da.length){var r=da.pop();return r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,r}return{topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]}}(e,t,n);try{Xn(fa,i)}finally{(r=i).topLevelType=null,r.nativeEvent=null,r.targetInst=null,r.ancestors.length=0,da.length<ca&&da.push(r)}}}var wa={},_a=0,Ea="_reactListenersID"+(""+Math.random()).slice(2);function ka(e){return Object.prototype.hasOwnProperty.call(e,Ea)||(e[Ea]=_a++,wa[e[Ea]]={}),wa[e[Ea]]}function Sa(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Ta(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ca(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function xa(e,t){for(var n=Ta(e),r=0,i=0;n;){if(n.nodeType===tr){if(i=r+n.textContent.length,r<=t&&i>=t)return{node:n,offset:t-r};r=i}n=Ta(Ca(n))}}function Pa(e){var t=e.ownerDocument,n=t&&t.defaultView||window,r=n.getSelection&&n.getSelection();if(!r||0===r.rangeCount)return null;var i=r.anchorNode,o=r.anchorOffset,a=r.focusNode,s=r.focusOffset;try{i.nodeType,a.nodeType}catch(e){return null}return function(e,t,n,r,i){var o=0,a=-1,s=-1,l=0,u=0,c=e,d=null;e:for(;;){for(var p=null;c!==t||0!==n&&c.nodeType!==tr||(a=o+n),c!==r||0!==i&&c.nodeType!==tr||(s=o+i),c.nodeType===tr&&(o+=c.nodeValue.length),null!==(p=c.firstChild);)d=c,c=p;for(;;){if(c===e)break e;if(d===t&&++l===n&&(a=o),d===r&&++u===i&&(s=o),null!==(p=c.nextSibling))break;d=(c=d).parentNode}c=p}if(-1===a||-1===s)return null;return{start:a,end:s}}(e,i,o,a,s)}function Na(e){return e&&e.nodeType===tr}function Oa(e){return e&&e.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||!Na(t)&&(Na(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(e.ownerDocument.documentElement,e)}function Da(){for(var e=window,t=Sa();t instanceof e.HTMLIFrameElement;){try{e=t.contentDocument.defaultView}catch(e){return t}t=Sa(e.document)}return t}function Ma(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Aa(){var e=Da();return{focusedElem:e,selectionRange:Ma(e)?function(e){var t=void 0;t="selectionStart"in e?{start:e.selectionStart,end:e.selectionEnd}:Pa(e);return t||{start:0,end:0}}(e):null}}function Ra(e){var t=Da(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&Oa(n)){null!==r&&Ma(n)&&function(e,t){var n=t.start,r=t.end;void 0===r&&(r=n);"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):function(e,t){var n=e.ownerDocument||document,r=(n&&n.defaultView||window).getSelection(),i=e.textContent.length,o=Math.min(t.start,i),a=void 0===t.end?o:Math.min(t.end,i);if(!r.extend&&o>a){var s=a;a=o,o=s}var l=xa(e,o),u=xa(e,a);if(l&&u){if(1===r.rangeCount&&r.anchorNode===l.node&&r.anchorOffset===l.offset&&r.focusNode===u.node&&r.focusOffset===u.offset)return;var c=n.createRange();c.setStart(l.node,l.offset),r.removeAllRanges(),o>a?(r.addRange(c),r.extend(u.node,u.offset)):(c.setEnd(u.node,u.offset),r.addRange(c))}}(e,t)}(n,r);for(var i=[],o=n;o=o.parentNode;)o.nodeType===er&&i.push({element:o,left:o.scrollLeft,top:o.scrollTop});"function"==typeof n.focus&&n.focus();for(var a=0;a<i.length;a++){var s=i[a];s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}}var Ia=Te&&"documentMode"in document&&document.documentMode<=11,Ua={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:[Ue,Ke,Je,ct,ht,vt,Et,Ct,Vt]}},Fa=null,La=null,ja=null,Wa=!1;function Ba(e){return e.window===e?e.document:e.nodeType===rr?e:e.ownerDocument}function za(e,t){var n=Ba(t);if(Wa||null==Fa||Fa!==Sa(n))return null;var r=function(e){if("selectionStart"in e&&Ma(e))return{start:e.selectionStart,end:e.selectionEnd};var t=(e.ownerDocument&&e.ownerDocument.defaultView||window).getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}(Fa);if(!ja||!wo(ja,r)){ja=r;var i=vn.getPooled(Ua.select,La,e,t);return i.type="select",i.target=Fa,Se(i),i}return null}var Va={eventTypes:Ua,extractEvents:function(e,t,n,r){var i=Ba(r);if(!i||!function(e,t){for(var n=ka(t),r=P[e],i=0;i<r.length;i++){var o=r[i];if(!n.hasOwnProperty(o)||!n[o])return!1}return!0}("onSelect",i))return null;var o=t?me(t):window;switch(e){case ct:(Zn(o)||"true"===o.contentEditable)&&(Fa=o,La=t,ja=null);break;case Ue:Fa=null,La=null,ja=null;break;case Et:Wa=!0;break;case Ke:case Ct:case Je:return Wa=!1,za(n,r);case Vt:if(Ia)break;case ht:case vt:return za(n,r)}return null}};z.injectEventPluginOrder(["ResponderEventPlugin","SimpleEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"]),D=ve,M=he,(A=me)&&M||O(!1,"EventPluginUtils.setComponentTree(...): Injected module is missing getNodeFromInstance or getInstanceFromNode."),z.injectEventPluginsByName({SimpleEventPlugin:la,EnterLeaveEventPlugin:go,ChangeEventPlugin:io,SelectEventPlugin:Va,BeforeInputEventPlugin:Wn});var qa=!1,Ha=!1;function Ka(e,t){"object"==typeof t.children&&null!==t.children&&n.Children.forEach(t.children,function(e){null!=e&&"string"!=typeof e&&"number"!=typeof e&&"string"==typeof e.type&&(Ha||(Ha=!0,Vr(!1,"Only strings and numbers are supported as <option> children.")))}),null==t.selected||qa||(Vr(!1,"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),qa=!0)}function Ga(e,t){var i=r({children:void 0},t),o=function(e){var t="";return n.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(t.children);return o&&(i.children=o),i}var $a=void 0;function Ya(){var e=Lr();return e?"\n\nCheck the render method of `"+e+"`.":""}$a=!1;var Qa=["value","defaultValue"];function Xa(e,t,n,r){var i=e.options;if(t){for(var o=n,a={},s=0;s<o.length;s++)a["$"+o[s]]=!0;for(var l=0;l<i.length;l++){var u=a.hasOwnProperty("$"+i[l].value);i[l].selected!==u&&(i[l].selected=u),u&&r&&(i[l].defaultSelected=!0)}}else{for(var c=mi(vi(n)),d=null,p=0;p<i.length;p++){if(i[p].value===c)return i[p].selected=!0,void(r&&(i[p].defaultSelected=!0));null!==d||i[p].disabled||(d=i[p])}null!==d&&(d.selected=!0)}}function Ja(e,t){return r({},t,{value:void 0})}function Za(e,t){var n=e;!function(e){yi.checkPropTypes("select",e);for(var t=0;t<Qa.length;t++){var n=Qa[t];if(null!=e[n]){var r=Array.isArray(e[n]);e.multiple&&!r?Vr(!1,"The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,Ya()):!e.multiple&&r&&Vr(!1,"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,Ya())}}}(t),n._wrapperState={wasMultiple:!!t.multiple},void 0===t.value||void 0===t.defaultValue||$a||(Vr(!1,"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://fb.me/react-controlled-components"),$a=!0)}var es=!1;function ts(e,t){var n=e;return null!=t.dangerouslySetInnerHTML&&l(!1,"`dangerouslySetInnerHTML` does not make sense on <textarea>."),r({},t,{value:void 0,defaultValue:void 0,children:mi(n._wrapperState.initialValue)})}function ns(e,t){var n=e;yi.checkPropTypes("textarea",t),void 0===t.value||void 0===t.defaultValue||es||(Vr(!1,"%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://fb.me/react-controlled-components",Lr()||"A component"),es=!0);var r=t.value;if(null==r){var i=t.defaultValue,o=t.children;null!=o&&(Vr(!1,"Use the `defaultValue` or `value` props instead of setting children on <textarea>."),null!=i&&l(!1,"If you supply `defaultValue` on a <textarea>, do not pass children."),Array.isArray(o)&&(o.length<=1||l(!1,"<textarea> can only have at most one child."),o=o[0]),i=o),null==i&&(i=""),r=i}n._wrapperState={initialValue:vi(r)}}function rs(e,t){var n=e,r=vi(t.value),i=vi(t.defaultValue);if(null!=r){var o=mi(r);o!==n.value&&(n.value=o),null==t.defaultValue&&n.defaultValue!==o&&(n.defaultValue=o)}null!=i&&(n.defaultValue=mi(i))}function is(e,t){var n=e,r=n.textContent;r===n._wrapperState.initialValue&&(n.value=r)}var os="http://www.w3.org/1999/xhtml",as="http://www.w3.org/1998/Math/MathML",ss="http://www.w3.org/2000/svg",ls={html:os,mathml:as,svg:ss};function us(e){switch(e){case"svg":return ss;case"math":return as;default:return os}}function cs(e,t){return null==e||e===os?us(t):e===ss&&"foreignObject"===t?os:e}var ds,ps=void 0,fs=(ds=function(e,t){if(e.namespaceURI!==ls.svg||"innerHTML"in e)e.innerHTML=t;else{(ps=ps||document.createElement("div")).innerHTML="<svg>"+t+"</svg>";for(var n=ps.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ds(e,t,n,r)})}:ds),hs=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===tr)return void(n.nodeValue=t)}e.textContent=t},ms={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,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};var vs=["Webkit","ms","Moz","O"];function gs(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ms.hasOwnProperty(e)&&ms[e]?(""+t).trim():t+"px"}Object.keys(ms).forEach(function(e){vs.forEach(function(t){ms[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=ms[e]})});var ys=/([A-Z])/g,bs=/^ms-/;var ws=/^(?:webkit|moz|o)[A-Z]/,_s=/^-ms-/,Es=/-(.)/g,ks=/;\s*$/,Ss={},Ts={},Cs=!1,xs=!1,Ps=function(e){Ss.hasOwnProperty(e)&&Ss[e]||(Ss[e]=!0,Vr(!1,"Unsupported style property %s. Did you mean %s?",e,e.replace(_s,"ms-").replace(Es,function(e,t){return t.toUpperCase()})))},Ns=function(e,t){e.indexOf("-")>-1?Ps(e):ws.test(e)?function(e){Ss.hasOwnProperty(e)&&Ss[e]||(Ss[e]=!0,Vr(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))}(e):ks.test(t)&&function(e,t){Ts.hasOwnProperty(t)&&Ts[t]||(Ts[t]=!0,Vr(!1,'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,t.replace(ks,"")))}(e,t),"number"==typeof t&&(isNaN(t)?function(e,t){Cs||(Cs=!0,Vr(!1,"`NaN` is an invalid value for the `%s` css style property.",e))}(e):isFinite(t)||function(e,t){xs||(xs=!0,Vr(!1,"`Infinity` is an invalid value for the `%s` css style property.",e))}(e))};function Os(e){var t="",n="";for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i){var o=0===r.indexOf("--");t+=n+r.replace(ys,"-$1").toLowerCase().replace(bs,"-ms-")+":",t+=gs(r,i,o),n=";"}}return t||null}function Ds(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--");i||Ns(r,t[r]);var o=gs(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,o):n[r]=o}}var Ms=r({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}),As="__html",Rs=null;function Is(e,t){t&&(Ms[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&l(!1,"%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s",e,Rs.getStackAddendum()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&l(!1,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."),"object"==typeof t.dangerouslySetInnerHTML&&As in t.dangerouslySetInnerHTML||l(!1,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.")),!t.suppressContentEditableWarning&&t.contentEditable&&null!=t.children&&Vr(!1,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),null!=t.style&&"object"!=typeof t.style&&l(!1,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s",Rs.getStackAddendum()))}function Us(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){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}}Rs=dr.ReactDebugCurrentFrame;var Fs={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",download:"download",draggable:"draggable",enctype:"encType",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Ls={"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},js={},Ws=new RegExp("^(aria)-["+Xr+"]*$"),Bs=new RegExp("^(aria)[A-Z]["+Xr+"]*$"),zs=Object.prototype.hasOwnProperty;function Vs(e,t){if(zs.call(js,t)&&js[t])return!0;if(Bs.test(t)){var n="aria-"+t.slice(4).toLowerCase(),r=Ls.hasOwnProperty(n)?n:null;if(null==r)return Vr(!1,"Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),js[t]=!0,!0;if(t!==r)return Vr(!1,"Invalid ARIA attribute `%s`. Did you mean `%s`?",t,r),js[t]=!0,!0}if(Ws.test(t)){var i=t.toLowerCase(),o=Ls.hasOwnProperty(i)?i:null;if(null==o)return js[t]=!0,!1;if(t!==o)return Vr(!1,"Unknown ARIA attribute `%s`. Did you mean `%s`?",t,o),js[t]=!0,!0}return!0}function qs(e,t){Us(e,t)||function(e,t){var n=[];for(var r in t)Vs(0,r)||n.push(r);var i=n.map(function(e){return"`"+e+"`"}).join(", ");1===n.length?Vr(!1,"Invalid aria prop %s on <%s> tag. For details, see https://fb.me/invalid-aria-prop",i,e):n.length>1&&Vr(!1,"Invalid aria props %s on <%s> tag. For details, see https://fb.me/invalid-aria-prop",i,e)}(e,t)}var Hs=!1;var Ks,Gs={},$s=Object.prototype.hasOwnProperty,Ys=/^on./,Qs=/^on[^A-Z]/,Xs=new RegExp("^(aria)-["+Xr+"]*$"),Js=new RegExp("^(aria)[A-Z]["+Xr+"]*$");Ks=function(e,t,n,r){if($s.call(Gs,t)&&Gs[t])return!0;var i=t.toLowerCase();if("onfocusin"===i||"onfocusout"===i)return Vr(!1,"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Gs[t]=!0,!0;if(r){if(x.hasOwnProperty(t))return!0;var o=N.hasOwnProperty(i)?N[i]:null;if(null!=o)return Vr(!1,"Invalid event handler property `%s`. Did you mean `%s`?",t,o),Gs[t]=!0,!0;if(Ys.test(t))return Vr(!1,"Unknown event handler property `%s`. It will be ignored.",t),Gs[t]=!0,!0}else if(Ys.test(t))return Qs.test(t)&&Vr(!1,"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Gs[t]=!0,!0;if(Xs.test(t)||Js.test(t))return!0;if("innerhtml"===i)return Vr(!1,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Gs[t]=!0,!0;if("aria"===i)return Vr(!1,"The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Gs[t]=!0,!0;if("is"===i&&null!==n&&void 0!==n&&"string"!=typeof n)return Vr(!1,"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),Gs[t]=!0,!0;if("number"==typeof n&&isNaN(n))return Vr(!1,"Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Gs[t]=!0,!0;var a=si(t),s=null!==a&&a.type===qr;if(Fs.hasOwnProperty(i)){var l=Fs[i];if(l!==t)return Vr(!1,"Invalid DOM property `%s`. Did you mean `%s`?",t,l),Gs[t]=!0,!0}else if(!s&&t!==i)return Vr(!1,"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,i),Gs[t]=!0,!0;return"boolean"==typeof n&&oi(t,n,a,!1)?(n?Vr(!1,'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):Vr(!1,'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),Gs[t]=!0,!0):!!s||(oi(t,n,a,!1)?(Gs[t]=!0,!1):"false"!==n&&"true"!==n||null===a||a.type!==Kr||(Vr(!1,"Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,"false"===n?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),Gs[t]=!0,!0))};var Zs=function(e,t,n){var r=[];for(var i in t){Ks(0,i,t[i],n)||r.push(i)}var o=r.map(function(e){return"`"+e+"`"}).join(", ");1===r.length?Vr(!1,"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://fb.me/react-attribute-behavior",o,e):r.length>1&&Vr(!1,"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://fb.me/react-attribute-behavior",o,e)};var el,tl=!1,nl=!1,rl="dangerouslySetInnerHTML",il="suppressContentEditableWarning",ol="suppressHydrationWarning",al="autoFocus",sl="children",ll="style",ul="__html",cl=ls.html,dl=void 0,pl=void 0,fl=void 0,hl=void 0,ml=void 0,vl=void 0,gl=void 0,yl=void 0,bl=void 0;dl={time:!0,dialog:!0,webview:!0},fl=function(e,t){qs(e,t),function(e,t){"input"!==e&&"textarea"!==e&&"select"!==e||null==t||null!==t.value||Hs||(Hs=!0,"select"===e&&t.multiple?Vr(!1,"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):Vr(!1,"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}(e,t),function(e,t,n){Us(e,t)||Zs(e,t,n)}(e,t,!0)},yl=Te&&!document.documentMode;var wl=/\r\n?/g,_l=/\u0000|\uFFFD/g;function El(e,t){!function(e,t){for(var n=ka(t),r=P[e],i=0;i<r.length;i++){var o=r[i];if(!n.hasOwnProperty(o)||!n[o]){switch(o){case Wt:ga(Wt,t);break;case ct:case Ue:ga(ct,t),ga(Ue,t),n[Ue]=!0,n[ct]=!0;break;case je:case ze:ar(an(o))&&ga(o,t);break;case ft:case Ht:case jt:break;default:-1!==on.indexOf(o)||va(o,t)}n[o]=!0}}}(t,e.nodeType===rr||e.nodeType===ir?e:e.ownerDocument)}function kl(e){return e.nodeType===rr?e:e.ownerDocument}function Sl(){}function Tl(e){e.onclick=Sl}function Cl(e,t,n,r){var i=Us(t,n);fl(t,n),i&&!nl&&e.shadyRoot&&(Vr(!1,"%s is using shady DOM. Using shady DOM with React can cause things to break subtly.",Lr()||"A component"),nl=!0);var o=void 0;switch(t){case"iframe":case"object":va(gt,e),o=n;break;case"video":case"audio":for(var a=0;a<on.length;a++)va(on[a],e);o=n;break;case"source":va(ut,e),o=n;break;case"img":case"image":case"link":va(ut,e),va(gt,e),o=n;break;case"form":va(jt,e),va(Ht,e),o=n;break;case"details":va(Yt,e),o=n;break;case"input":Li(e,n),o=Fi(e,n),va(ft,e),El(r,"onChange");break;case"option":Ka(0,n),o=Ga(0,n);break;case"select":Za(e,n),o=Ja(0,n),va(ft,e),El(r,"onChange");break;case"textarea":ns(e,n),o=ts(e,n),va(ft,e),El(r,"onChange");break;default:o=n}switch(Is(t,o),function(e,t,n,r,i){for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];if(o===ll)a&&Object.freeze(a),Ds(t,a);else if(o===rl){var s=a?a[ul]:void 0;null!=s&&fs(t,s)}else o===sl?"string"==typeof a?("textarea"!==e||""!==a)&&hs(t,a):"number"==typeof a&&hs(t,""+a):o===il||o===ol||o===al||(x.hasOwnProperty(o)?null!=a&&("function"!=typeof a&&gl(o,a),El(n,o)):null!=a&&hi(t,o,a,i))}}(t,e,r,o,i),t){case"input":ur(e),Bi(e,n,!1);break;case"textarea":ur(e),is(e);break;case"option":!function(e,t){null!=t.value&&e.setAttribute("value",mi(vi(t.value)))}(e,n);break;case"select":!function(e,t){var n=e;n.multiple=!!t.multiple;var r=t.value;null!=r?Xa(n,!!t.multiple,r,!1):null!=t.defaultValue&&Xa(n,!!t.multiple,t.defaultValue,!0)}(e,n);break;default:"function"==typeof o.onClick&&Tl(e)}}function xl(e,t,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&ji(e,i);Us(n,r);switch(function(e,t,n,r){for(var i=0;i<t.length;i+=2){var o=t[i],a=t[i+1];o===ll?Ds(e,a):o===rl?fs(e,a):o===sl?hs(e,a):hi(e,o,a,r)}}(e,t,0,Us(n,i)),n){case"input":Wi(e,i);break;case"textarea":rs(e,i);break;case"select":!function(e,t){var n=e,r=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var i=t.value;null!=i?Xa(n,!!t.multiple,i,!1):r!==!!t.multiple&&(null!=t.defaultValue?Xa(n,!!t.multiple,t.defaultValue,!0):Xa(n,!!t.multiple,t.multiple?[]:"",!1))}(e,i)}}function Pl(e,t){hl(e.nodeValue,t)}function Nl(e,t){tl||(tl=!0,O(!1,"Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase()))}function Ol(e,t){tl||(tl=!0,O(!1,'Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase()))}function Dl(e,t,n){tl||(tl=!0,O(!1,"Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase()))}function Ml(e,t){""!==t&&(tl||(tl=!0,O(!1,'Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())))}el=function(e){return("string"==typeof e?e:""+e).replace(wl,"\n").replace(_l,"")},hl=function(e,t){if(!tl){var n=el(t),r=el(e);r!==n&&(tl=!0,O(!1,'Text content did not match. Server: "%s" Client: "%s"',r,n))}},ml=function(e,t,n){if(!tl){var r=el(n),i=el(t);i!==r&&(tl=!0,O(!1,"Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(i),JSON.stringify(r)))}},vl=function(e){if(!tl){tl=!0;var t=[];e.forEach(function(e){t.push(e)}),O(!1,"Extra attributes from the server: %s",t)}},gl=function(e,t){!1===t?Vr(!1,"Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):Vr(!1,"Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},bl=function(e,t){var n=e.namespaceURI===cl?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var Al=function(){},Rl=function(){},Il=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Ul=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],Fl=Ul.concat(["button"]),Ll=["dd","dt","li","option","optgroup","p","rp","rt"],jl={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Rl=function(e,t){var n=r({},e||jl),i={tag:t};return-1!==Ul.indexOf(t)&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),-1!==Fl.indexOf(t)&&(n.pTagInButtonScope=null),-1!==Il.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=i,"form"===t&&(n.formTag=i),"a"===t&&(n.aTagInScope=i),"button"===t&&(n.buttonTagInScope=i),"nobr"===t&&(n.nobrTagInScope=i),"p"===t&&(n.pTagInButtonScope=i),"li"===t&&(n.listItemTagAutoclosing=i),"dd"!==t&&"dt"!==t||(n.dlItemTagAutoclosing=i),n};var Wl={};function Bl(){l(!1,"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.")}Al=function(e,t,n){var r=(n=n||jl).current,i=r&&r.tag;null!=t&&(null!=e&&O(!1,"validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var o=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e;case"#document":return"html"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===Ll.indexOf(t);case"body":case"caption":case"col":case"colgroup":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0}(e,i)?null:r,a=o?null:function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}(e,n),s=o||a;if(s){var l=s.tag,u=jr(),c=!!o+"|"+e+"|"+l+"|"+u;if(!Wl[c]){Wl[c]=!0;var d=e,p="";if("#text"===e?/\S/.test(t)?d="Text nodes":(d="Whitespace text nodes",p=" Make sure you don't have any extra whitespace between tags on each line of your source code."):d="<"+e+">",o){var f="";"table"===l&&"tr"===e&&(f+=" Add a <tbody> to your code to match the DOM tree generated by the browser."),O(!1,"validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s",d,l,p,f,u)}else O(!1,"validateDOMNesting(...): %s cannot appear as a descendant of <%s>.%s",d,l,u)}}};var zl=!1,Vl=Bl,ql=Bl,Hl=Bl,Kl=Bl,Gl=Bl,$l=void 0;$l="suppressHydrationWarning";var Yl=null,Ql=null;function Xl(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Jl(e){return e}function Zl(e){Yl=ha,Ql=Aa(),ma(!1)}function eu(e,t,n,r,i){var o=r;if(Al(e,null,o.ancestorInfo),"string"==typeof t.children||"number"==typeof t.children){var a=""+t.children,s=Rl(o.ancestorInfo,e);Al(null,a,s)}var l=function(e,t,n,r){var i=void 0,o=kl(n),a=void 0,s=r;if(s===cl&&(s=us(e)),s===cl)if((i=Us(e,t))||e===e.toLowerCase()||Vr(!1,"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),"script"===e){var l=o.createElement("div");l.innerHTML="<script><\/script>";var u=l.firstChild;a=l.removeChild(u)}else"string"==typeof t.is?a=o.createElement(e,{is:t.is}):(a=o.createElement(e),"select"===e&&t.multiple&&(a.multiple=!0));else a=o.createElementNS(s,e);return s===cl&&(i||"[object HTMLUnknownElement]"!==Object.prototype.toString.call(a)||Object.prototype.hasOwnProperty.call(dl,e)||(dl[e]=!0,Vr(!1,"The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e))),a}(e,t,n,o.namespace);return pe(i,l),ge(l,t),l}function tu(e,t,n,r,i){return Cl(e,t,n,r),Xl(t,n)}function nu(e,t,n,r,i,o){var a=o;if(typeof r.children!=typeof n.children&&("string"==typeof r.children||"number"==typeof r.children)){var s=""+r.children,l=Rl(a.ancestorInfo,t);Al(null,s,l)}return function(e,t,n,r,i){fl(t,r);var o=null,a=void 0,s=void 0;switch(t){case"input":a=Fi(e,n),s=Fi(e,r),o=[];break;case"option":a=Ga(0,n),s=Ga(0,r),o=[];break;case"select":a=Ja(0,n),s=Ja(0,r),o=[];break;case"textarea":a=ts(e,n),s=ts(e,r),o=[];break;default:s=r,"function"!=typeof(a=n).onClick&&"function"==typeof s.onClick&&Tl(e)}Is(t,s);var l=void 0,u=void 0,c=null;for(l in a)if(!s.hasOwnProperty(l)&&a.hasOwnProperty(l)&&null!=a[l])if(l===ll){var d=a[l];for(u in d)d.hasOwnProperty(u)&&(c||(c={}),c[u]="")}else l===rl||l===sl||l===il||l===ol||l===al||(x.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in s){var p=s[l],f=null!=a?a[l]:void 0;if(s.hasOwnProperty(l)&&p!==f&&(null!=p||null!=f))if(l===ll)if(p&&Object.freeze(p),f){for(u in f)!f.hasOwnProperty(u)||p&&p.hasOwnProperty(u)||(c||(c={}),c[u]="");for(u in p)p.hasOwnProperty(u)&&f[u]!==p[u]&&(c||(c={}),c[u]=p[u])}else c||(o||(o=[]),o.push(l,c)),c=p;else if(l===rl){var h=p?p[ul]:void 0,m=f?f[ul]:void 0;null!=h&&m!==h&&(o=o||[]).push(l,""+h)}else l===sl?f===p||"string"!=typeof p&&"number"!=typeof p||(o=o||[]).push(l,""+p):l===il||l===ol||(x.hasOwnProperty(l)?(null!=p&&("function"!=typeof p&&gl(l,p),El(i,l)),o||f===p||(o=[])):(o=o||[]).push(l,p))}return c&&(o=o||[]).push(ll,c),o}(e,t,n,r,i)}function ru(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}function iu(e,t,n,r){Al(null,e,n.ancestorInfo);var i=function(e,t){return kl(t).createTextNode(e)}(e,t);return pe(r,i),i}var ou=!0,au=setTimeout,su=clearTimeout,lu=-1,uu=!0;function cu(e){hs(e,"")}function du(e,t){e.appendChild(t)}function pu(e,t){var n=void 0;e.nodeType===nr?(n=e.parentNode).insertBefore(t,e):(n=e).appendChild(t),null===n.onclick&&Tl(n)}function fu(e,t,n){e.insertBefore(t,n)}function hu(e,t){e.removeChild(t)}var mu=!0;function vu(e){for(var t=e.nextSibling;t&&t.nodeType!==er&&t.nodeType!==tr;)t=t.nextSibling;return t}function gu(e){for(var t=e.firstChild;t&&t.nodeType!==er&&t.nodeType!==tr;)t=t.nextSibling;return t}function yu(e,t,n,r,i,o){pe(o,e),ge(e,n);return function(e,t,n,r,i){var o,a=void 0;switch(pl=!0===n[ol],o=Us(t,n),fl(t,n),o&&!nl&&e.shadyRoot&&(Vr(!1,"%s is using shady DOM. Using shady DOM with React can cause things to break subtly.",Lr()||"A component"),nl=!0),t){case"iframe":case"object":va(gt,e);break;case"video":case"audio":for(var s=0;s<on.length;s++)va(on[s],e);break;case"source":va(ut,e);break;case"img":case"image":case"link":va(ut,e),va(gt,e);break;case"form":va(jt,e),va(Ht,e);break;case"details":va(Yt,e);break;case"input":Li(e,n),va(ft,e),El(i,"onChange");break;case"option":Ka(0,n);break;case"select":Za(e,n),va(ft,e),El(i,"onChange");break;case"textarea":ns(e,n),va(ft,e),El(i,"onChange")}Is(t,n),a=new Set;for(var l=e.attributes,u=0;u<l.length;u++)switch(l[u].name.toLowerCase()){case"data-reactroot":case"value":case"checked":case"selected":break;default:a.add(l[u].name)}var c,d=null;for(var p in n)if(n.hasOwnProperty(p)){var f=n[p];if(p===sl)"string"==typeof f?e.textContent!==f&&(pl||hl(e.textContent,f),d=[sl,f]):"number"==typeof f&&e.textContent!==""+f&&(pl||hl(e.textContent,f),d=[sl,""+f]);else if(x.hasOwnProperty(p))null!=f&&("function"!=typeof f&&gl(p,f),El(i,p));else if("boolean"==typeof o){var h=void 0,m=si(p);if(pl);else if(p===il||p===ol||"value"===p||"checked"===p||"selected"===p);else if(p===rl){var v=e.innerHTML,g=f?f[ul]:void 0,y=bl(e,null!=g?g:"");y!==v&&ml(p,v,y)}else if(p===ll){if(a.delete(p),yl){var b=Os(f);b!==(h=e.getAttribute("style"))&&ml(p,h,b)}}else if(o)a.delete(p.toLowerCase()),f!==(h=fi(e,p,f))&&ml(p,h,f);else if(!ii(p,m,o)&&!ai(p,f,m,o)){var w=!1;if(null!==m)a.delete(m.attributeName),h=pi(e,p,f,m);else{var _=r;if(_===cl&&(_=us(t)),_===cl)a.delete(p.toLowerCase());else{var E=(c=p.toLowerCase(),Fs.hasOwnProperty(c)&&Fs[c]||null);null!==E&&E!==p&&(w=!0,a.delete(E)),a.delete(p)}h=fi(e,p,f)}f===h||w||ml(p,h,f)}}}switch(a.size>0&&!pl&&vl(a),t){case"input":ur(e),Bi(e,n,!0);break;case"textarea":ur(e),is(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&Tl(e)}return d}(e,t,n,i.namespace,r)}var bu="undefined"!=typeof performance&&"function"==typeof performance.mark&&"function"==typeof performance.clearMarks&&"function"==typeof performance.measure&&"function"==typeof performance.clearMeasures,wu=null,_u=null,Eu=null,ku=!1,Su=!1,Tu=!1,Cu=0,xu=0,Pu=!1,Nu=new Set,Ou=function(e){return"⚛ "+e},Du=function(e){performance.mark(Ou(e))},Mu=function(e,t,n){var r=Ou(t),i=function(e,t){return(t?"⛔ ":"⚛ ")+e+(t?" Warning: "+t:"")}(e,n);try{performance.measure(i,r)}catch(e){}performance.clearMarks(r),performance.clearMeasures(i)},Au=function(e,t){return e+" (#"+t+")"},Ru=function(e,t,n){return null===n?e+" ["+(t?"update":"mount")+"]":e+"."+n},Iu=function(e,t){var n=Mr(e.type)||"Unknown",r=e._debugID,i=null!==e.alternate,o=Ru(n,i,t);if(ku&&Nu.has(o))return!1;Nu.add(o);var a=Au(o,r);return Du(a),!0},Uu=function(e,t){var n=Mr(e.type)||"Unknown",r=e._debugID,i=null!==e.alternate,o=Ru(n,i,t);!function(e){performance.clearMarks(Ou(e))}(Au(o,r))},Fu=function(e,t,n){var r=Mr(e.type)||"Unknown",i=e._debugID,o=null!==e.alternate,a=Ru(r,o,t),s=Au(a,i);Mu(a,s,n)},Lu=function(e){switch(e.tag){case X:case Z:case ee:case J:case te:case ie:case re:case ne:return!0;default:return!1}},ju=function(){null!==_u&&null!==Eu&&Uu(Eu,_u),Eu=null,_u=null,Tu=!1},Wu=function(){for(var e=wu;e;)e._debugIsCurrentlyTiming&&Fu(e,null,null),e=e.return},Bu=function(e){null!==e.return&&Bu(e.return),e._debugIsCurrentlyTiming&&Iu(e,null)},zu=function(){null!==wu&&Bu(wu)};function Vu(){_i&&xu++}function qu(e){if(_i){if(!bu||Lu(e))return;if(wu=e.return,!e._debugIsCurrentlyTiming)return;e._debugIsCurrentlyTiming=!1,Fu(e,null,null)}}function Hu(e){if(_i){if(!bu||Lu(e))return;if(wu=e.return,!e._debugIsCurrentlyTiming)return;e._debugIsCurrentlyTiming=!1;Fu(e,null,"An error was thrown inside this error boundary")}}function Ku(e,t){if(_i){if(!bu)return;if(ju(),!Iu(e,t))return;Eu=e,_u=t}}function Gu(){if(_i){if(!bu)return;if(null!==_u&&null!==Eu)Fu(Eu,_u,Tu?"Scheduled a cascading update":null);_u=null,Eu=null}}function $u(e,t){if(_i){if(!bu)return;var n=null;if(null!==e)if(e.tag===X)n="A top-level update interrupted the previous render";else n="An update to "+(Mr(e.type)||"Unknown")+" interrupted the previous render";else Cu>1&&(n="There were cascading updates");Cu=0;var r=t?"(React Tree Reconciliation: Completed Root)":"(React Tree Reconciliation: Yielded)";Wu(),Mu(r,"(React Tree Reconciliation)",n)}}var Yu=[],Qu=void 0;Qu=[];var Xu=-1;function Ju(e){return{current:e}}function Zu(e,t){Xu<0?O(!1,"Unexpected pop."):(t!==Qu[Xu]&&O(!1,"Unexpected Fiber popped."),e.current=Yu[Xu],Yu[Xu]=null,Qu[Xu]=null,Xu--)}function ec(e,t,n){Yu[++Xu]=e.current,Qu[Xu]=n,e.current=t}var tc=void 0;tc={};var nc={};Object.freeze(nc);var rc=Ju(nc),ic=Ju(!1),oc=nc;function ac(e,t,n){return n&&cc(t)?oc:rc.current}function sc(e,t,n){var r=e.stateNode;r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=n}function lc(e,t){var n=e.type,r=n.contextTypes;if(!r)return nc;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var a={};for(var s in r)a[s]=t[s];var l=Mr(n)||"Unknown";return i(r,a,"context",l,jr),o&&sc(e,t,a),a}function uc(){return ic.current}function cc(e){var t=e.childContextTypes;return null!==t&&void 0!==t}function dc(e){Zu(ic,e),Zu(rc,e)}function pc(e){Zu(ic,e),Zu(rc,e)}function fc(e,t,n){rc.current!==nc&&l(!1,"Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."),ec(rc,t,e),ec(ic,n,e)}function hc(e,t,n){var o=e.stateNode,a=t.childContextTypes;if("function"!=typeof o.getChildContext){var s=Mr(t)||"Unknown";return tc[s]||(tc[s]=!0,O(!1,"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",s,s)),n}var u;for(var c in zr("getChildContext"),Ku(e,"getChildContext"),u=o.getChildContext(),Gu(),zr(null),u)c in a||l(!1,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',Mr(t)||"Unknown",c);var d=Mr(t)||"Unknown";return i(a,u,"child context",d,jr),r({},n,u)}function mc(e){var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||nc;return oc=rc.current,ec(rc,n,e),ec(ic,ic.current,e),!0}function vc(e,t,n){var r=e.stateNode;if(r||l(!1,"Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."),n){var i=hc(e,t,oc);r.__reactInternalMemoizedMergedChildContext=i,Zu(ic,e),Zu(rc,e),ec(rc,i,e),ec(ic,n,e)}else Zu(ic,e),ec(ic,n,e)}var gc=null,yc=null,bc=!1;function wc(e){return function(t){try{return e(t)}catch(e){bc||(bc=!0,O(!1,"React DevTools encountered an error: %s",e))}}}var _c="undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;var Ec=1073741823,kc=0,Sc=1,Tc=Ec,Cc=10,xc=2;function Pc(e){return(e/Cc|0)+xc}function Nc(e){return(e-xc)*Cc}function Oc(e,t,n){return xc+(1+((e-xc+t/Cc)/(r=n/Cc)|0))*r;var r}var Dc=5e3,Mc=250;function Ac(e){return Oc(e,Dc,Mc)}var Rc=500,Ic=100;var Uc=0,Fc=1,Lc=2,jc=4,Wc=void 0;Wc=!1;try{var Bc=Object.preventExtensions({}),zc=new Map([[Bc,null]]),Vc=new Set([Bc]);zc.set(0,0),Vc.add(0)}catch(e){Wc=!0}var qc=void 0;qc=1;var Hc=function(e,t,n,r){return new function(e,t,n,r){this.tag=e,this.key=n,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.firstContextDependency=null,this.mode=r,this.effectTag=Eo,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.expirationTime=kc,this.childExpirationTime=kc,this.alternate=null,Ni&&(this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0),this._debugID=qc++,this._debugSource=null,this._debugOwner=null,this._debugIsCurrentlyTiming=!1,Wc||"function"!=typeof Object.preventExtensions||Object.preventExtensions(this)}(e,t,n,r)};function Kc(e){var t=e.prototype;return!(!t||!t.isReactComponent)}function Gc(e,t,n){var r=e.alternate;return null===r?((r=Hc(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r._debugID=e._debugID,r._debugSource=e._debugSource,r._debugOwner=e._debugOwner,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=Eo,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,Ni&&(r.actualDuration=0,r.actualStartTime=-1)),r.childExpirationTime=e.childExpirationTime,t!==e.pendingProps?r.expirationTime=n:r.expirationTime=e.expirationTime,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.firstContextDependency=e.firstContextDependency,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,Ni&&(r.selfBaseDuration=e.selfBaseDuration,r.treeBaseDuration=e.treeBaseDuration),r}function $c(e,t,n){var r;r=e._owner;var i=void 0,o=e.type,a=e.key,s=e.props,u=void 0;if("function"==typeof o)u=Kc(o)?$:Q;else if("string"==typeof o)u=Z;else e:switch(o){case gr:return Yc(s.children,t,n,a);case Er:u=ne,t|=Fc|Lc;break;case yr:u=ne,t|=Lc;break;case br:return function(e,t,n,r){"string"==typeof e.id&&"function"==typeof e.onRender||O(!1,'Profiler must specify an "id" string and "onRender" function as props');var i=Hc(se,e,r,t|jc);return i.type=br,i.expirationTime=n,i}(s,t,n,a);case Sr:u=le;break;default:if("object"==typeof o&&null!==o)switch(o.$$typeof){case wr:u=ie;break e;case _r:u=re;break e;case kr:u=oe;break e;default:if("function"==typeof o.then){u=Q;break e}}var c="";(void 0===o||"object"==typeof o&&null!==o&&0===Object.keys(o).length)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=r?Mr(r.type):null;d&&(c+="\n\nCheck the render method of `"+d+"`."),l(!1,"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",null==o?o:typeof o,c)}return(i=Hc(u,s,a,t)).type=o,i.expirationTime=n,i._debugSource=e._source,i._debugOwner=e._owner,i}function Yc(e,t,n,r){var i=Hc(te,e,r,t);return i.expirationTime=n,i}function Qc(e,t,n){var r=Hc(ee,e,null,t);return r.expirationTime=n,r}function Xc(e,t,n){var r=null!==e.children?e.children:[],i=Hc(J,r,e.key,t);return i.expirationTime=n,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}function Jc(e,t){return null===e&&(e=Hc(Q,null,null,Uc)),e.tag=t.tag,e.key=t.key,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.firstContextDependency=t.firstContextDependency,e.mode=t.mode,e.effectTag=t.effectTag,e.nextEffect=t.nextEffect,e.firstEffect=t.firstEffect,e.lastEffect=t.lastEffect,e.expirationTime=t.expirationTime,e.childExpirationTime=t.childExpirationTime,e.alternate=t.alternate,Ni&&(e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration),e._debugID=t._debugID,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugIsCurrentlyTiming=t._debugIsCurrentlyTiming,e}function Zc(e,t,n){var r=function(e){var t=e?Fc|Lc:Uc;return Ni&&_c&&(t|=jc),Hc(X,null,null,t)}(t),i=void 0;return i=Oi?{current:r,containerInfo:e,pendingChildren:null,earliestPendingTime:kc,latestPendingTime:kc,earliestSuspendedTime:kc,latestSuspendedTime:kc,latestPingedTime:kc,didError:!1,pendingCommitExpirationTime:kc,finishedWork:null,timeoutHandle:lu,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:kc,expirationTime:kc,firstBatch:null,nextScheduledRoot:null,interactionThreadID:a.unstable_getThreadID(),memoizedInteractions:new Set,pendingInteractionMap:new Map}:{current:r,containerInfo:e,pendingChildren:null,earliestPendingTime:kc,latestPendingTime:kc,earliestSuspendedTime:kc,latestSuspendedTime:kc,latestPingedTime:kc,didError:!1,pendingCommitExpirationTime:kc,finishedWork:null,timeoutHandle:lu,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:kc,expirationTime:kc,firstBatch:null,nextScheduledRoot:null},r.stateNode=i,i}var ed=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.warn(o);try{throw new Error(o)}catch(e){}}).apply(void 0,[t].concat(r))}},td={discardPendingWarnings:function(){},flushPendingDeprecationWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordDeprecationWarnings:function(e,t){},recordUnsafeLifecycleWarnings:function(e,t){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){}},nd={UNSAFE_componentWillMount:"componentDidMount",UNSAFE_componentWillReceiveProps:"static getDerivedStateFromProps",UNSAFE_componentWillUpdate:"componentDidUpdate"},rd=[],id=[],od=[],ad=new Map,sd=new Map,ld=new Set,ud=new Set,cd=new Set,dd=function(e){var t=[];return e.forEach(function(e){t.push(e)}),t.sort().join(", ")};td.discardPendingWarnings=function(){rd=[],id=[],od=[],ad=new Map,sd=new Map},td.flushPendingUnsafeLifecycleWarnings=function(){ad.forEach(function(e,t){var n=[];if(Object.keys(e).forEach(function(t){var r=e[t];if(r.length>0){var i=new Set;r.forEach(function(e){i.add(Mr(e.type)||"Component"),ud.add(e.type)});var o=t.replace("UNSAFE_",""),a=nd[t],s=dd(i);n.push(o+": Please update the following components to use "+a+" instead: "+s)}}),n.length>0){var r=Ir(t);O(!1,"Unsafe lifecycle methods were found within a strict-mode tree:%s\n\n%s\n\nLearn more about this warning here:\nhttps://fb.me/react-strict-mode-warnings",r,n.join("\n\n"))}}),ad=new Map};var pd=function(e){for(var t=null,n=e;null!==n;)n.mode&Lc&&(t=n),n=n.return;return t};td.flushPendingDeprecationWarnings=function(){if(rd.length>0){var e=new Set;rd.forEach(function(t){e.add(Mr(t.type)||"Component"),ld.add(t.type)});var t=dd(e);ed(!1,"componentWillMount is deprecated and will be removed in the next major version. Use componentDidMount instead. As a temporary workaround, you can rename to UNSAFE_componentWillMount.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",t),rd=[]}if(id.length>0){var n=new Set;id.forEach(function(e){n.add(Mr(e.type)||"Component"),ld.add(e.type)});var r=dd(n);ed(!1,"componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",r),id=[]}if(od.length>0){var i=new Set;od.forEach(function(e){i.add(Mr(e.type)||"Component"),ld.add(e.type)});var o=dd(i);ed(!1,"componentWillUpdate is deprecated and will be removed in the next major version. Use componentDidUpdate instead. As a temporary workaround, you can rename to UNSAFE_componentWillUpdate.\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",o),od=[]}},td.recordDeprecationWarnings=function(e,t){ld.has(e.type)||("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning&&rd.push(e),"function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning&&id.push(e),"function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning&&od.push(e))},td.recordUnsafeLifecycleWarnings=function(e,t){var n=pd(e);if(null!==n){if(!ud.has(e.type)){var r=void 0;ad.has(n)?r=ad.get(n):(r={UNSAFE_componentWillMount:[],UNSAFE_componentWillReceiveProps:[],UNSAFE_componentWillUpdate:[]},ad.set(n,r));var i=[];("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillMount)&&i.push("UNSAFE_componentWillMount"),("function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillReceiveProps)&&i.push("UNSAFE_componentWillReceiveProps"),("function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning||"function"==typeof t.UNSAFE_componentWillUpdate)&&i.push("UNSAFE_componentWillUpdate"),i.length>0&&i.forEach(function(t){r[t].push(e)})}}else O(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},td.recordLegacyContextWarning=function(e,t){var n=pd(e);if(null!==n){if(!cd.has(e.type)){var r=sd.get(n);(null!=e.type.contextTypes||null!=e.type.childContextTypes||null!==t&&"function"==typeof t.getChildContext)&&(void 0===r&&(r=[],sd.set(n,r)),r.push(e))}}else O(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},td.flushLegacyContextWarning=function(){sd.forEach(function(e,t){var n=new Set;e.forEach(function(e){n.add(Mr(e.type)||"Component"),cd.add(e.type)});var r=dd(n),i=Ir(t);O(!1,"Legacy context API has been detected within a strict-mode tree: %s\n\nPlease update the following components: %s\n\nLearn more about this warning here:\nhttps://fb.me/react-strict-mode-warnings",i,r)})};var fd={debugTool:null};function hd(e,t){e.didError=!1;var n=e.earliestPendingTime;n===kc?e.earliestPendingTime=e.latestPendingTime=t:n>t?e.earliestPendingTime=t:e.latestPendingTime<t&&(e.latestPendingTime=t);yd(t,e)}function md(e,t){e.didError=!1,function(e,t){var n=e.latestPingedTime;n!==kc&&n<=t&&(e.latestPingedTime=kc)}(e,t);var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=kc:r:r===t&&(e.latestPendingTime=n);var i=e.earliestSuspendedTime,o=e.latestSuspendedTime;i===kc?e.earliestSuspendedTime=e.latestSuspendedTime=t:i>t?e.earliestSuspendedTime=t:o<t&&(e.latestSuspendedTime=t),yd(t,e)}function vd(e,t){var n=t,r=e.earliestPendingTime,i=e.earliestSuspendedTime;return(n===kc||r!==kc&&r<n)&&(n=r),(n===kc||i!==kc&&i<n)&&(n=i),n}function gd(e,t){var n=e.expirationTime;n!==kc&&t>=n&&(e.nextExpirationTimeToWorkOn=t)}function yd(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,i=t.earliestPendingTime,o=t.latestPingedTime,a=i!==kc?i:o;a===kc&&(e===kc||r>e)&&(a=r);var s=a;s!==kc&&n!==kc&&n<s&&(s=n),t.nextExpirationTimeToWorkOn=a,t.expirationTime=s}var bd=0,wd=1,_d=2,Ed=3,kd=!1,Sd=void 0,Td=void 0,Cd=void 0;function xd(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Pd(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Nd(e){return{expirationTime:e,tag:bd,payload:null,callback:null,next:null,nextEffect:null}}function Od(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Dd(e,t){var n=e.alternate,r=void 0,i=void 0;null===n?(i=null,null===(r=e.updateQueue)&&(r=e.updateQueue=xd(e.memoizedState))):(r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=xd(e.memoizedState),i=n.updateQueue=xd(n.memoizedState)):r=e.updateQueue=Pd(i):null===i&&(i=n.updateQueue=Pd(r))),null===i||r===i?Od(r,t):null===r.lastUpdate||null===i.lastUpdate?(Od(r,t),Od(i,t)):(Od(r,t),i.lastUpdate=t),e.tag!==$&&e.tag!==Y||Td!==r&&(null===i||Td!==i)||Sd||(O(!1,"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),Sd=!0)}function Md(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=xd(e.memoizedState):Ad(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function Ad(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Pd(t)),t}function Rd(e,t,n,i,o,a){switch(n.tag){case wd:var s=n.payload;return"function"==typeof s?((Si||Ti&&e.mode&Lc)&&s.call(a,i,o),s.call(a,i,o)):s;case Ed:e.effectTag=e.effectTag&~Uo|Oo;case bd:var l=n.payload,u=void 0;return"function"==typeof l?((Si||Ti&&e.mode&Lc)&&l.call(a,i,o),u=l.call(a,i,o)):u=l,null===u||void 0===u?i:r({},i,u);case _d:return kd=!0,i}return i}function Id(e,t,n,r,i){kd=!1,t=Ad(e,t),Td=t;for(var o=t.baseState,a=null,s=kc,l=t.firstUpdate,u=o;null!==l;){var c=l.expirationTime;if(c>i)null===a&&(a=l,o=u),(s===kc||s>c)&&(s=c);else u=Rd(e,0,l,u,n,r),null!==l.callback&&(e.effectTag|=No,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l));l=l.next}var d=null;for(l=t.firstCapturedUpdate;null!==l;){var p=l.expirationTime;if(p>i)null===d&&(d=l,null===a&&(o=u)),(s===kc||s>p)&&(s=p);else u=Rd(e,0,l,u,n,r),null!==l.callback&&(e.effectTag|=No,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l));l=l.next}null===a&&(t.lastUpdate=null),null===d?t.lastCapturedUpdate=null:e.effectTag|=No,null===a&&null===d&&(o=u),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=d,e.expirationTime=s,e.memoizedState=u,Td=null}function Ud(){kd=!1}function Fd(){return kd}function Ld(e,t,n,r){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),jd(t.firstEffect,n),t.firstEffect=t.lastEffect=null,jd(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function jd(e,t){for(;null!==e;){var n=e.callback;null!==n&&(e.callback=null,i=t,"function"!=typeof(r=n)&&l(!1,"Invalid argument passed as callback. Expected a function. Instead received: %s",r),r.call(i)),e=e.nextEffect}var r,i}function Wd(e,t){return{value:e,source:t,stack:Ir(t)}}Sd=!1,Td=null,Cd=function(){Td=null};var Bd=Ju(null),zd=void 0;zd={};var Vd=null,qd=null,Hd=null;function Kd(e,t){var n=e.type._context;ou?(ec(Bd,n._currentValue,e),n._currentValue=t,void 0!==n._currentRenderer&&null!==n._currentRenderer&&n._currentRenderer!==zd&&O(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=zd):(ec(Bd,n._currentValue2,e),n._currentValue2=t,void 0!==n._currentRenderer2&&null!==n._currentRenderer2&&n._currentRenderer2!==zd&&O(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer2=zd)}function Gd(e){var t=Bd.current;Zu(Bd,e);var n=e.type._context;ou?n._currentValue=t:n._currentValue2=t}function $d(e,t){Vd=e,qd=null,Hd=null,e.firstContextDependency=null}function Yd(e,t){if(Hd===e);else if(!1===t||0===t);else{var n=void 0;"number"!=typeof t||t===Ec?(Hd=e,n=Ec):n=t;var r={context:e,observedBits:n,next:null};null===qd?(null===Vd&&l(!1,"Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps."),Vd.firstContextDependency=qd=r):qd=qd.next=r}return ou?e._currentValue:e._currentValue2}var Qd={},Xd=Ju(Qd),Jd=Ju(Qd),Zd=Ju(Qd);function ep(e){return e===Qd&&l(!1,"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function tp(){return ep(Zd.current)}function np(e,t){ec(Zd,t,e),ec(Jd,e,e),ec(Xd,Qd,e);var n=function(e){var t=void 0,n=void 0,r=e.nodeType;switch(r){case rr:case ir:t=r===rr?"#document":"#fragment";var i=e.documentElement;n=i?i.namespaceURI:cs(null,"");break;default:var o=r===nr?e.parentNode:e;n=cs(o.namespaceURI||null,t=o.tagName)}var a=t.toLowerCase();return{namespace:n,ancestorInfo:Rl(null,a)}}(t);Zu(Xd,e),ec(Xd,n,e)}function rp(e){Zu(Xd,e),Zu(Jd,e),Zu(Zd,e)}function ip(){return ep(Xd.current)}function op(e){ep(Zd.current);var t,n,r,i=ep(Xd.current),o=(t=i,n=e.type,{namespace:cs((r=t).namespace,n),ancestorInfo:Rl(r.ancestorInfo,n)});i!==o&&(ec(Jd,e,e),ec(Xd,o,e))}function ap(e){Jd.current===e&&(Zu(Xd,e),Zu(Jd,e))}var sp=0,lp=-1;function up(){return sp}function cp(e){Ni&&(lp=o.unstable_now(),e.actualStartTime<0&&(e.actualStartTime=o.unstable_now()))}function dp(e){Ni&&(lp=-1)}function pp(e,t){if(Ni&&lp>=0){var n=o.unstable_now()-lp;e.actualDuration+=n,t&&(e.selfBaseDuration=n),lp=-1}}var fp,hp={},mp=Array.isArray,vp=(new n.Component).refs,gp=void 0,yp=void 0,bp=void 0,wp=void 0,_p=void 0,Ep=void 0,kp=void 0;gp=new Set,yp=new Set,bp=new Set,wp=new Set,kp=new Set,_p=new Set;var Sp=new Set;function Tp(e,t,n,i){var o=e.memoizedState;(Si||Ti&&e.mode&Lc)&&n(i,o);var a=n(i,o);Ep(t,a);var s=null===a||void 0===a?o:r({},o,a);e.memoizedState=s;var l=e.updateQueue;null!==l&&e.expirationTime===kc&&(l.baseState=s)}fp=function(e,t){if(null!==e&&"function"!=typeof e){var n=t+"_"+e;Sp.has(n)||(Sp.add(n),O(!1,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},Ep=function(e,t){if(void 0===t){var n=Mr(e)||"Component";_p.has(n)||(_p.add(n),O(!1,"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(hp,"_processChildContext",{enumerable:!1,value:function(){l(!1,"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(hp);var Cp={isMounted:function(e){var t=Fo.current;if(null!==t&&(t.tag===$||t.tag===Y)){var n=t,r=n.stateNode;r._warnedAboutRefsInRender||O(!1,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Mr(n.type)||"A component"),r._warnedAboutRefsInRender=!0}var i=_o(e);return!!i&&Bo(i)===jo},enqueueSetState:function(e,t,n){var r=_o(e),i=Rh(fm(),r),o=Nd(i);o.payload=t,void 0!==n&&null!==n&&(fp(n,"setState"),o.callback=n),Dd(r,o),jh(r,i)},enqueueReplaceState:function(e,t,n){var r=_o(e),i=Rh(fm(),r),o=Nd(i);o.tag=wd,o.payload=t,void 0!==n&&null!==n&&(fp(n,"replaceState"),o.callback=n),Dd(r,o),jh(r,i)},enqueueForceUpdate:function(e,t){var n=_o(e),r=Rh(fm(),n),i=Nd(r);i.tag=_d,void 0!==t&&null!==t&&(fp(t,"forceUpdate"),i.callback=t),Dd(n,i),jh(n,r)}};function xp(e,t,n,r,i,o,a){var s=e.stateNode;if("function"==typeof s.shouldComponentUpdate){Ku(e,"shouldComponentUpdate");var l=s.shouldComponentUpdate(r,o,a);return Gu(),void 0===l&&O(!1,"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Mr(t)||"Component"),l}return!t.prototype||!t.prototype.isPureReactComponent||(!wo(n,r)||!wo(i,o))}function Pp(e,t){var n;t.updater=Cp,e.stateNode=t,n=e,t._reactInternalFiber=n,t._reactInternalInstance=hp}function Np(e,t,n,r){var i=t.state;if(Ku(e,"componentWillReceiveProps"),"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),Gu(),t.state!==i){var o=Mr(e.type)||"Component";gp.has(o)||(gp.add(o),O(!1,"%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",o)),Cp.enqueueReplaceState(t,t.state,null)}}function Op(e,t,n,r){!function(e,t,n){var r=e.stateNode,i=Mr(t)||"Component";r.render||(t.prototype&&"function"==typeof t.prototype.render?O(!1,"%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",i):O(!1,"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",i)),!r.getInitialState||r.getInitialState.isReactClassApproved||r.state||O(!1,"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",i),!r.getDefaultProps||r.getDefaultProps.isReactClassApproved||O(!1,"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",i),!r.propTypes||O(!1,"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",i),!r.contextTypes||O(!1,"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",i),"function"!=typeof r.componentShouldUpdate||O(!1,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",i),t.prototype&&t.prototype.isPureReactComponent&&void 0!==r.shouldComponentUpdate&&O(!1,"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Mr(t)||"A pure component"),"function"!=typeof r.componentDidUnmount||O(!1,"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",i),"function"!=typeof r.componentDidReceiveProps||O(!1,"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",i),"function"!=typeof r.componentWillRecieveProps||O(!1,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",i),"function"!=typeof r.UNSAFE_componentWillRecieveProps||O(!1,"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",i);var o=r.props!==n;void 0!==r.props&&o&&O(!1,"%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",i,i),!r.defaultProps||O(!1,"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",i,i),"function"!=typeof r.getSnapshotBeforeUpdate||"function"==typeof r.componentDidUpdate||bp.has(t)||(bp.add(t),O(!1,"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Mr(t))),"function"!=typeof r.getDerivedStateFromProps||O(!1,"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"!=typeof r.getDerivedStateFromCatch||O(!1,"%s: getDerivedStateFromCatch() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"!=typeof t.getSnapshotBeforeUpdate||O(!1,"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",i);var a=r.state;a&&("object"!=typeof a||mp(a))&&O(!1,"%s.state: must be set to an object or null",i),"function"==typeof r.getChildContext&&"object"!=typeof t.childContextTypes&&O(!1,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",i)}(e,t,n);var i=e.stateNode,o=ac(0,t,!0);if(i.props=n,i.state=e.memoizedState,i.refs=vp,i.context=lc(e,o),i.state===n){var a=Mr(t)||"Component";kp.has(a)||(kp.add(a),O(!1,"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",a))}e.mode&Lc&&(td.recordUnsafeLifecycleWarnings(e,i),td.recordLegacyContextWarning(e,i)),xi&&td.recordDeprecationWarnings(e,i);var s=e.updateQueue;null!==s&&(Id(e,s,n,i,r),i.state=e.memoizedState);var l=t.getDerivedStateFromProps;"function"==typeof l&&(Tp(e,t,l,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(!function(e,t){Ku(e,"componentWillMount");var n=t.state;"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),Gu(),n!==t.state&&(O(!1,"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Mr(e.type)||"Component"),Cp.enqueueReplaceState(t,t.state,null))}(e,i),null!==(s=e.updateQueue)&&(Id(e,s,n,i,r),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=To)}var Dp=void 0,Mp=void 0,Ap=void 0,Rp=void 0,Ip=void 0,Up=function(e){};Dp=!1,Mp=!1,Ap={},Rp={},Ip={},Up=function(e){if(null!==e&&"object"==typeof e&&e._store&&!e._store.validated&&null==e.key){"object"!=typeof e._store&&l(!1,"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."),e._store.validated=!0;var t='Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.'+jr();Rp[t]||(Rp[t]=!0,Vr(!1,'Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.'))}};var Fp=Array.isArray;function Lp(e,t,n){var r=n.ref;if(null!==r&&"function"!=typeof r&&"object"!=typeof r){if(e.mode&Lc){var i=Mr(e.type)||"Component";Ap[i]||(O(!1,'A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using createRef() instead.\n%s\n\nLearn more about using refs safely here:\nhttps://fb.me/react-strict-mode-string-ref',r,Ir(e)),Ap[i]=!0)}if(n._owner){var o=n._owner,a=void 0;if(o){var s=o;s.tag!==$&&s.tag!==Y&&l(!1,"Stateless function components cannot have refs."),a=s.stateNode}a||l(!1,"Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.",r);var u=""+r;if(null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===u)return t.ref;var c=function(e){var t=a.refs;t===vp&&(t=a.refs={}),null===e?delete t[u]:t[u]=e};return c._stringRef=u,c}"string"!=typeof r&&l(!1,"Expected ref to be a function, a string, an object returned by React.createRef(), or null."),n._owner||l(!1,"Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.",r)}return r}function jp(e,t){if("textarea"!==e.type){var n;n=" If you meant to render a collection of children, use an array instead."+jr(),l(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,n)}}function Wp(){var e="Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."+jr();Ip[e]||(Ip[e]=!0,Vr(!1,"Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."))}function Bp(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=xo}}function n(n,r){if(!e)return null;for(var i=r;null!==i;)t(n,i),i=i.sibling;return null}function r(e,t){for(var n=new Map,r=t;null!==r;)null!==r.key?n.set(r.key,r):n.set(r.index,r),r=r.sibling;return n}function i(e,t,n){var r=Gc(e,t,n);return r.index=0,r.sibling=null,r}function o(t,n,r){if(t.index=r,!e)return n;var i=t.alternate;if(null!==i){var o=i.index;return o<n?(t.effectTag=So,n):o}return t.effectTag=So,n}function a(t){return e&&null===t.alternate&&(t.effectTag=So),t}function s(e,t,n,r){if(null===t||t.tag!==ee){var o=Qc(n,e.mode,r);return o.return=e,o}var a=i(t,n,r);return a.return=e,a}function u(e,t,n,r){if(null!==t&&t.type===n.type){var o=i(t,n.props,r);return o.ref=Lp(e,t,n),o.return=e,o._debugSource=n._source,o._debugOwner=n._owner,o}var a=$c(n,e.mode,r);return a.ref=Lp(e,t,n),a.return=e,a}function c(e,t,n,r){if(null===t||t.tag!==J||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation){var o=Xc(n,e.mode,r);return o.return=e,o}var a=i(t,n.children||[],r);return a.return=e,a}function d(e,t,n,r,o){if(null===t||t.tag!==te){var a=Yc(n,e.mode,r,o);return a.return=e,a}var s=i(t,n,r);return s.return=e,s}function p(e,t,n){if("string"==typeof t||"number"==typeof t){var r=Qc(""+t,e.mode,n);return r.return=e,r}if("object"==typeof t&&null!==t){switch(t.$$typeof){case mr:var i=$c(t,e.mode,n);return i.ref=Lp(e,null,t),i.return=e,i;case vr:var o=Xc(t,e.mode,n);return o.return=e,o}if(Fp(t)||xr(t)){var a=Yc(t,e.mode,n,null);return a.return=e,a}jp(e,t)}return"function"==typeof t&&Wp(),null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case mr:return n.key===i?n.type===gr?d(e,t,n.props.children,r,i):u(e,t,n,r):null;case vr:return n.key===i?c(e,t,n,r):null}if(Fp(n)||xr(n))return null!==i?null:d(e,t,n,r,null);jp(e,n)}return"function"==typeof n&&Wp(),null}function h(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return s(t,e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case mr:var o=e.get(null===r.key?n:r.key)||null;return r.type===gr?d(t,o,r.props.children,i,r.key):u(t,o,r,i);case vr:return c(t,e.get(null===r.key?n:r.key)||null,r,i)}if(Fp(r)||xr(r))return d(t,e.get(n)||null,r,i,null);jp(t,r)}return"function"==typeof r&&Wp(),null}function m(e,t){if("object"!=typeof e||null===e)return t;switch(e.$$typeof){case mr:case vr:Up(e);var n=e.key;if("string"!=typeof n)break;if(null===t){(t=new Set).add(n);break}if(!t.has(n)){t.add(n);break}Vr(!1,"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",n)}return t}return function(s,u,c,d){var v="object"==typeof c&&null!==c&&c.type===gr&&null===c.key;v&&(c=c.props.children);var g="object"==typeof c&&null!==c;if(g)switch(c.$$typeof){case mr:return a(function(e,r,o,a){for(var s=o.key,l=r;null!==l;){if(l.key===s){if(l.tag===te?o.type===gr:l.type===o.type){n(e,l.sibling);var u=i(l,o.type===gr?o.props.children:o.props,a);return u.ref=Lp(e,l,o),u.return=e,u._debugSource=o._source,u._debugOwner=o._owner,u}n(e,l);break}t(e,l),l=l.sibling}if(o.type===gr){var c=Yc(o.props.children,e.mode,a,o.key);return c.return=e,c}var d=$c(o,e.mode,a);return d.ref=Lp(e,r,o),d.return=e,d}(s,u,c,d));case vr:return a(function(e,r,o,a){for(var s=o.key,l=r;null!==l;){if(l.key===s){if(l.tag===J&&l.stateNode.containerInfo===o.containerInfo&&l.stateNode.implementation===o.implementation){n(e,l.sibling);var u=i(l,o.children||[],a);return u.return=e,u}n(e,l);break}t(e,l),l=l.sibling}var c=Xc(o,e.mode,a);return c.return=e,c}(s,u,c,d))}if("string"==typeof c||"number"==typeof c)return a(function(e,t,r,o){if(null!==t&&t.tag===ee){n(e,t.sibling);var a=i(t,r,o);return a.return=e,a}n(e,t);var s=Qc(r,e.mode,o);return s.return=e,s}(s,u,""+c,d));if(Fp(c))return function(i,a,s,l){for(var u=null,c=0;c<s.length;c++)u=m(s[c],u);for(var d=null,v=null,g=a,y=0,b=0,w=null;null!==g&&b<s.length;b++){g.index>b?(w=g,g=null):w=g.sibling;var _=f(i,g,s[b],l);if(null===_){null===g&&(g=w);break}e&&g&&null===_.alternate&&t(i,g),y=o(_,y,b),null===v?d=_:v.sibling=_,v=_,g=w}if(b===s.length)return n(i,g),d;if(null===g){for(;b<s.length;b++){var E=p(i,s[b],l);E&&(y=o(E,y,b),null===v?d=E:v.sibling=E,v=E)}return d}for(var k=r(0,g);b<s.length;b++){var S=h(k,i,b,s[b],l);S&&(e&&null!==S.alternate&&k.delete(null===S.key?b:S.key),y=o(S,y,b),null===v?d=S:v.sibling=S,v=S)}return e&&k.forEach(function(e){return t(i,e)}),d}(s,u,c,d);if(xr(c))return function(i,a,s,u){var c=xr(s);"function"!=typeof c&&l(!1,"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."),"function"==typeof Symbol&&"Generator"===s[Symbol.toStringTag]&&(Mp||Vr(!1,"Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Mp=!0),s.entries===c&&(Dp||Vr(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),Dp=!0);var d=c.call(s);if(d)for(var v=null,g=d.next();!g.done;g=d.next())v=m(g.value,v);var y=c.call(s);null==y&&l(!1,"An iterable object provided no iterator.");for(var b=null,w=null,_=a,E=0,k=0,S=null,T=y.next();null!==_&&!T.done;k++,T=y.next()){_.index>k?(S=_,_=null):S=_.sibling;var C=f(i,_,T.value,u);if(null===C){_||(_=S);break}e&&_&&null===C.alternate&&t(i,_),E=o(C,E,k),null===w?b=C:w.sibling=C,w=C,_=S}if(T.done)return n(i,_),b;if(null===_){for(;!T.done;k++,T=y.next()){var x=p(i,T.value,u);null!==x&&(E=o(x,E,k),null===w?b=x:w.sibling=x,w=x)}return b}for(var P=r(0,_);!T.done;k++,T=y.next()){var N=h(P,i,k,T.value,u);null!==N&&(e&&null!==N.alternate&&P.delete(null===N.key?k:N.key),E=o(N,E,k),null===w?b=N:w.sibling=N,w=N)}return e&&P.forEach(function(e){return t(i,e)}),b}(s,u,c,d);if(g&&jp(s,c),"function"==typeof c&&Wp(),void 0===c&&!v)switch(s.tag){case $:case Y:if(s.stateNode.render._isMockFunction)break;case K:var y=s.type;l(!1,"%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.",y.displayName||y.name||"Component")}return n(s,u)}}var zp=Bp(!0),Vp=Bp(!1);var qp=null,Hp=null,Kp=!1;function Gp(e,t){switch(e.tag){case X:!function(e,t){t.nodeType===er?Nl(e,t):Ol(e,t)}(e.stateNode.containerInfo,t);break;case Z:!function(e,t,n,r){!0!==t[$l]&&(r.nodeType===er?Nl(n,r):Ol(n,r))}(e.type,e.memoizedProps,e.stateNode,t)}var n,r=((n=Hc(Z,null,null,Uc)).type="DELETED",n);r.stateNode=t,r.return=e,r.effectTag=xo,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function $p(e,t){switch(t.effectTag|=So,e.tag){case X:var n=e.stateNode.containerInfo;switch(t.tag){case Z:var r=t.type;t.pendingProps;!function(e,t,n){Dl(e,t)}(n,r);break;case ee:!function(e,t){Ml(e,t)}(n,t.pendingProps)}break;case Z:e.type;var i=e.memoizedProps,o=e.stateNode;switch(t.tag){case Z:var a=t.type;t.pendingProps;!function(e,t,n,r,i){!0!==t[$l]&&Dl(n,r)}(0,i,o,a);break;case ee:!function(e,t,n,r){!0!==t[$l]&&Ml(n,r)}(0,i,o,t.pendingProps)}break;default:return}}function Yp(e,t){switch(e.tag){case Z:var n=e.type,r=(e.pendingProps,function(e,t,n){return e.nodeType!==er||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}(t,n));return null!==r&&(e.stateNode=r,!0);case ee:var i=function(e,t){return""===t||e.nodeType!==tr?null:e}(t,e.pendingProps);return null!==i&&(e.stateNode=i,!0);default:return!1}}function Qp(e){if(Kp){var t=Hp;if(!t)return $p(qp,e),Kp=!1,void(qp=e);var n=t;if(!Yp(e,t)){if(!(t=vu(n))||!Yp(e,t))return $p(qp,e),Kp=!1,void(qp=e);Gp(qp,n)}qp=e,Hp=gu(t)}}function Xp(e){mu||l(!1,"Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var t=e.stateNode,n=e.memoizedProps,r=function(e,t,n){return pe(n,e),function(e,t){return e.nodeValue!==t}(e,t)}(t,n,e);if(r){var i=qp;if(null!==i)switch(i.tag){case X:i.stateNode.containerInfo;!function(e,t,n){Pl(t,n)}(0,t,n);break;case Z:i.type;var o=i.memoizedProps;i.stateNode;!function(e,t,n,r,i){!0!==t[$l]&&Pl(r,i)}(0,o,0,t,n)}}return r}function Jp(e){for(var t=e.return;null!==t&&t.tag!==Z&&t.tag!==X;)t=t.return;qp=t}function Zp(e){if(!mu)return!1;if(e!==qp)return!1;if(!Kp)return Jp(e),Kp=!0,!1;var t=e.type;if(e.tag!==Z||"head"!==t&&"body"!==t&&!ru(t,e.memoizedProps))for(var n=Hp;n;)Gp(e,n),n=vu(n);return Jp(e),Hp=qp?vu(e.stateNode):null,!0}function ef(){mu&&(qp=null,Hp=null,Kp=!1)}var tf=dr.ReactCurrentOwner,nf=void 0,rf=void 0,of=void 0;function af(e,t,n,r){t.child=null===e?Vp(t,null,n,r):zp(t,e.child,n,r)}function sf(e,t,n,r,i){var o=n.render,a=t.ref;if(uc());else if(t.memoizedProps===r){if(a===(null!==e?e.ref:null))return gf(e,t,i)}var s;return tf.current=t,zr("render"),s=o(r,a),zr(null),af(e,t,s,i),yf(t,r),t.child}function lf(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=Do)}function uf(e,t,n,r,i){var o,a=lc(t,ac(0,n,!0));return $d(t),tf.current=t,zr("render"),o=n(r,a),zr(null),t.effectTag|=ko,af(e,t,o,i),yf(t,r),t.child}function cf(e,t,n,r,i){var o=void 0;cc(n)?(o=!0,mc(t)):o=!1,$d(t);var a=void 0;return null===e?null===t.stateNode?(!function(e,t,n,r){var i=ac(0,t,!0),o=t.contextTypes,a=null!==o&&void 0!==o,s=a?lc(e,i):nc;(Si||Ti&&e.mode&Lc)&&new t(n,s);var l=new t(n,s),u=e.memoizedState=null!==l.state&&void 0!==l.state?l.state:null;if(Pp(e,l),"function"==typeof t.getDerivedStateFromProps&&null===u){var c=Mr(t)||"Component";yp.has(c)||(yp.add(c),O(!1,"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",c,null===l.state?"null":"undefined",c))}if("function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate){var d=null,p=null,f=null;if("function"==typeof l.componentWillMount&&!0!==l.componentWillMount.__suppressDeprecationWarning?d="componentWillMount":"function"==typeof l.UNSAFE_componentWillMount&&(d="UNSAFE_componentWillMount"),"function"==typeof l.componentWillReceiveProps&&!0!==l.componentWillReceiveProps.__suppressDeprecationWarning?p="componentWillReceiveProps":"function"==typeof l.UNSAFE_componentWillReceiveProps&&(p="UNSAFE_componentWillReceiveProps"),"function"==typeof l.componentWillUpdate&&!0!==l.componentWillUpdate.__suppressDeprecationWarning?f="componentWillUpdate":"function"==typeof l.UNSAFE_componentWillUpdate&&(f="UNSAFE_componentWillUpdate"),null!==d||null!==p||null!==f){var h=Mr(t)||"Component",m="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";wp.has(h)||(wp.add(h),O(!1,"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks",h,m,null!==d?"\n "+d:"",null!==p?"\n "+p:"",null!==f?"\n "+f:""))}}a&&sc(e,i,s)}(t,n,r),Op(t,n,r,i),a=!0):a=function(e,t,n,r){var i=e.stateNode,o=e.memoizedProps;i.props=o;var a=i.context,s=lc(e,ac(0,t,!0)),l=t.getDerivedStateFromProps,u="function"==typeof l||"function"==typeof i.getSnapshotBeforeUpdate;u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||o===n&&a===s||Np(e,i,n,s),Ud();var c=e.memoizedState,d=i.state=c,p=e.updateQueue;if(null!==p&&(Id(e,p,n,i,r),d=e.memoizedState),o===n&&c===d&&!uc()&&!Fd())return"function"==typeof i.componentDidMount&&(e.effectTag|=To),!1;"function"==typeof l&&(Tp(e,t,l,n),d=e.memoizedState);var f=Fd()||xp(e,t,o,n,c,d,s);return f?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(Ku(e,"componentWillMount"),"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),Gu()),"function"==typeof i.componentDidMount&&(e.effectTag|=To)):("function"==typeof i.componentDidMount&&(e.effectTag|=To),e.memoizedProps=n,e.memoizedState=d),i.props=n,i.state=d,i.context=s,f}(t,n,r,i):a=function(e,t,n,r,i){var o=t.stateNode,a=t.memoizedProps;o.props=a;var s=o.context,l=lc(t,ac(0,n,!0)),u=n.getDerivedStateFromProps,c="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;c||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||a===r&&s===l||Np(t,o,r,l),Ud();var d=t.memoizedState,p=o.state=d,f=t.updateQueue;if(null!==f&&(Id(t,f,r,o,i),p=t.memoizedState),a===r&&d===p&&!uc()&&!Fd())return"function"==typeof o.componentDidUpdate&&(a===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=To)),"function"==typeof o.getSnapshotBeforeUpdate&&(a===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=Mo)),!1;"function"==typeof u&&(Tp(t,n,u,r),p=t.memoizedState);var h=Fd()||xp(t,n,a,r,d,p,l);return h?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||(Ku(t,"componentWillUpdate"),"function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l),Gu()),"function"==typeof o.componentDidUpdate&&(t.effectTag|=To),"function"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=Mo)):("function"==typeof o.componentDidUpdate&&(a===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=To)),"function"==typeof o.getSnapshotBeforeUpdate&&(a===e.memoizedProps&&d===e.memoizedState||(t.effectTag|=Mo)),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,h}(e,t,n,r,i),df(e,t,n,a,o,i)}function df(e,t,n,r,i,o){lf(e,t);var a=(t.effectTag&Oo)!==Eo;if(!r&&!a)return i&&vc(t,n,!1),gf(e,t,o);var s=t.stateNode;tf.current=t;var l=void 0;return!a||Ei&&"function"==typeof n.getDerivedStateFromCatch?(zr("render"),l=s.render(),(Si||Ti&&t.mode&Lc)&&s.render(),zr(null)):(l=null,Ni&&dp()),t.effectTag|=ko,null!==e&&a&&(af(e,t,null,o),t.child=null),af(e,t,l,o),function(e,t){e.memoizedState=t}(t,s.state),yf(t,s.props),i&&vc(t,n,!0),t.child}function pf(e){var t=e.stateNode;t.pendingContext?fc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fc(e,t.context,!1),np(e,t.containerInfo)}function ff(e,t,n){pf(t);var r=t.updateQueue;null===r&&l(!1,"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.");var i=t.pendingProps,o=t.memoizedState,a=null!==o?o.element:null;Id(t,r,i,null,n);var s=t.memoizedState.element;if(s===a)return ef(),gf(e,t,n);var u=t.stateNode;return(null===e||null===e.child)&&u.hydrate&&function(e){if(!mu)return!1;var t=e.stateNode.containerInfo;return Hp=gu(t),qp=e,Kp=!0,!0}(t)?(t.effectTag|=So,t.child=Vp(t,null,s,n)):(af(e,t,s,n),ef()),t.child}function hf(e,t){if(e&&e.defaultProps){var n=r({},t),i=e.defaultProps;for(var o in i)void 0===n[o]&&(n[o]=i[o]);return n}return t}function mf(e,t,n,r){null!==e&&l(!1,"An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.");var i=t.pendingProps;if("object"==typeof n&&null!==n&&"function"==typeof n.then){n=function(e){switch(e._reactStatus){case Nr:return e._reactResult;case Or:throw e._reactResult;case Pr:throw e;default:throw e._reactStatus=Pr,e.then(function(t){if(e._reactStatus===Pr){if(e._reactStatus=Nr,"object"==typeof t&&null!==t){var n=t.default;t=void 0!==n&&null!==n?n:t}else t=t;e._reactResult=t}},function(t){e._reactStatus===Pr&&(e._reactStatus=Or,e._reactResult=t)}),e}}(n);var o=t.tag=function(e,t){return"function"==typeof t?Kc(t)?Y:G:void 0!==t&&null!==t&&t.$$typeof?ae:Q}(0,n),a=hf(n,i);switch(o){case G:return uf(e,t,n,a,r);case Y:return cf(e,t,n,a,r);case ae:return sf(e,t,n,a,r);default:l(!1,"Element type is invalid. Received a promise that resolves to: %s. Promise elements must resolve to a class or function.",n)}}var s=lc(t,ac(0,n,!1));$d(t);var u;if(n.prototype&&"function"==typeof n.prototype.render){var c=Mr(n)||"Unknown";nf[c]||(O(!1,"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",c,c),nf[c]=!0)}if(t.mode&Lc&&td.recordLegacyContextWarning(t,null),tf.current=t,u=n(i,s),t.effectTag|=ko,"object"==typeof u&&null!==u&&"function"==typeof u.render&&void 0===u.$$typeof){t.tag=$;var d=!1;cc(n)?(d=!0,mc(t)):d=!1,t.memoizedState=null!==u.state&&void 0!==u.state?u.state:null;var p=n.getDerivedStateFromProps;return"function"==typeof p&&Tp(t,n,p,i),Pp(t,u),Op(t,n,i,r),df(e,t,n,!0,d,r)}if(t.tag=K,n&&n.childContextTypes&&O(!1,"%s(...): childContextTypes cannot be defined on a functional component.",n.displayName||n.name||"Component"),null!==t.ref){var f="",h=Lr();h&&(f+="\n\nCheck the render method of `"+h+"`.");var m=h||t._debugID||"",v=t._debugSource;v&&(m=v.fileName+":"+v.lineNumber),of[m]||(of[m]=!0,Vr(!1,"Stateless function components cannot be given refs. Attempts to access this ref will fail.%s",f))}if("function"==typeof n.getDerivedStateFromProps){var g=Mr(n)||"Unknown";rf[g]||(O(!1,"%s: Stateless functional components do not support getDerivedStateFromProps.",g),rf[g]=!0)}return af(e,t,u,r),yf(t,i),t.child}function vf(e,t,n){var r=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value;t.memoizedProps=o;var l=t.type.propTypes;if(l&&i(l,o,"prop","Context.Provider",jr),Kd(t,s),null!==a){var u=function(e,t,n){if(n===t&&(0!==n||1/n==1/t)||n!=n&&t!=t)return 0;var r="function"==typeof e._calculateChangedBits?e._calculateChangedBits(n,t):Ec;return(r&Ec)!==r&&Vr(!1,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",r),0|r}(r,s,a.value);if(0===u){if(a.children===o.children&&!uc())return gf(e,t,n)}else!function(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var o=void 0,a=i.firstContextDependency;if(null!==a)do{if(a.context===t&&0!=(a.observedBits&n)){if(i.tag===$||i.tag===Y){var s=Nd(r);s.tag=_d,Dd(i,s)}(i.expirationTime===kc||i.expirationTime>r)&&(i.expirationTime=r);var l=i.alternate;null!==l&&(l.expirationTime===kc||l.expirationTime>r)&&(l.expirationTime=r);for(var u=i.return;null!==u;){if(l=u.alternate,u.childExpirationTime===kc||u.childExpirationTime>r)u.childExpirationTime=r,null!==l&&(l.childExpirationTime===kc||l.childExpirationTime>r)&&(l.childExpirationTime=r);else{if(null===l||!(l.childExpirationTime===kc||l.childExpirationTime>r))break;l.childExpirationTime=r}u=u.return}}o=i.child,a=a.next}while(null!==a);else o=i.tag===ie&&i.type===e.type?null:i.child;if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}var c=o.sibling;if(null!==c){c.return=o.return,o=c;break}o=o.return}i=o}}(t,r,u,n)}return af(e,t,o.children,n),t.child}function gf(e,t,n){!function(e){if(_i){if(!bu||Lu(e))return;e._debugIsCurrentlyTiming=!1,Uu(e,null)}}(t),null!==e&&(t.firstContextDependency=e.firstContextDependency),Ni&&dp();var r=t.childExpirationTime;return r===kc||r>n?null:(function(e,t){if(null!==e&&t.child!==e.child&&l(!1,"Resuming work not yet implemented."),null!==t.child){var n=t.child,r=Gc(n,n.pendingProps,n.expirationTime);for(t.child=r,r.return=t;null!==n.sibling;)n=n.sibling,(r=r.sibling=Gc(n,n.pendingProps,n.expirationTime)).return=t;r.sibling=null}}(e,t),t.child)}function yf(e,t){e.memoizedProps=t}function bf(e,t,n){var r=t.expirationTime;if(!uc()&&(r===kc||r>n)){switch(t.tag){case X:pf(t),ef();break;case Z:op(t);break;case $:cc(t.type)&&mc(t);break;case Y:cc(Dr(t.type))&&mc(t);break;case J:np(t,t.stateNode.containerInfo);break;case ie:Kd(t,t.memoizedProps.value);break;case se:Ni&&(t.effectTag|=To)}return gf(e,t,n)}switch(t.expirationTime=kc,t.tag){case Q:return mf(e,t,t.type,n);case K:return uf(e,t,t.type,t.pendingProps,n);case G:var i=Dr(t.type),o=t.pendingProps,a=uf(e,t,i,hf(i,o),n);return t.memoizedProps=o,a;case $:return cf(e,t,t.type,t.pendingProps,n);case Y:var s=Dr(t.type),u=t.pendingProps,c=cf(e,t,s,hf(s,u),n);return t.memoizedProps=u,c;case X:return ff(e,t,n);case Z:return function(e,t,n){op(t),null===e&&Qp(t);var r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children;return ru(r,i)?a=null:null!==o&&ru(r,o)&&(t.effectTag|=Po),lf(e,t),n!==Tc&&t.mode&Fc&&i.hidden?(t.expirationTime=Tc,t.memoizedProps=i,null):(af(e,t,a,n),yf(t,i),t.child)}(e,t,n);case ee:return function(e,t){return null===e&&Qp(t),yf(t,t.pendingProps),null}(e,t);case le:return function(e,t,n){if(ki){var r=t.pendingProps,i=(t.effectTag&Oo)===Eo,o=void 0;null!==e&&null!==t.updateQueue?(t.updateQueue=null,o=!0,af(e,t,null,n),e.child=null):o=!i,(t.mode&Lc)!==Eo&&(o?t.effectTag|=To:t.stateNode=null);var a=r.children,s=void 0;return s="function"==typeof a?a(o):o?r.fallback:a,t.memoizedProps=r,t.memoizedState=o,af(e,t,s,n),t.child}return null}(e,t,n);case J:return function(e,t,n){np(t,t.stateNode.containerInfo);var r=t.pendingProps;return null===e?(t.child=zp(t,null,r,n),yf(t,r)):(af(e,t,r,n),yf(t,r)),t.child}(e,t,n);case oe:return sf(e,t,t.type,t.pendingProps,n);case ae:var d=Dr(t.type),p=t.pendingProps,f=sf(e,t,d,hf(d,p),n);return t.memoizedProps=p,f;case te:return function(e,t,n){var r=t.pendingProps;return af(e,t,r,n),yf(t,r),t.child}(e,t,n);case ne:return function(e,t,n){var r=t.pendingProps.children;return af(e,t,r,n),yf(t,r),t.child}(e,t,n);case se:return function(e,t,n){Ni&&(t.effectTag|=To);var r=t.pendingProps;return af(e,t,r.children,n),yf(t,r),t.child}(e,t,n);case ie:return vf(e,t,n);case re:return function(e,t,n){var r=t.type,i=t.pendingProps,o=i.children;"function"!=typeof o&&O(!1,"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),$d(t);var a,s=Yd(r,i.unstable_observedBits);return tf.current=t,zr("render"),a=o(s),zr(null),t.effectTag|=ko,af(e,t,a,n),t.memoizedProps=i,t.child}(e,t,n);default:l(!1,"Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.")}}function wf(e){e.effectTag|=To}function _f(e){e.effectTag|=Do}function Ef(e,t){for(var n,r,i=t.child;null!==i;){if(i.tag===Z||i.tag===ee)n=e,r=i.stateNode,n.appendChild(r);else if(i.tag===J);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)return;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}nf={},rf={},of={};var kf=void 0,Sf=void 0,Tf=void 0;if(uu)kf=function(e){},Sf=function(e,t,n,r,i){var o=e.memoizedProps;if(o!==r){var a=nu(t.stateNode,n,o,r,i,ip());t.updateQueue=a,a&&wf(t)}},Tf=function(e,t,n,r){n!==r&&wf(t)};else if(zl){kf=function(e){var t=e.stateNode;if(null===e.firstEffect);else{var n=t.containerInfo,r=ql(n);!function(e,t){for(var n=t.child;null!==n;){if(n.tag===Z||n.tag===ee)Hl(e,n.stateNode);else if(n.tag===J);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)return;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}(r,e),t.pendingChildren=r,wf(e),Kl(n,r)}},Sf=function(e,t,n,r,i){var o=e.stateNode,a=e.memoizedProps,s=null===t.firstEffect;if(s&&a===r)t.stateNode=o;else{var l=t.stateNode,u=ip(),c=null;if(a!==r&&(c=nu(l,n,a,r,i,u)),s&&null===c)t.stateNode=o;else{var d=Vl(o,c,n,a,r,t,s,l);tu(d,n,r,i)&&wf(t),t.stateNode=d,s?wf(t):Ef(d,t)}}},Tf=function(e,t,n,r){if(n!==r){var i=tp(),o=ip();t.stateNode=iu(r,i,o,t),wf(t)}}}else kf=function(e){},Sf=function(e,t,n,r,i){},Tf=function(e,t,n,r){};function Cf(e,t,n){var r=t.pendingProps;switch(t.tag){case K:case G:break;case $:cc(t.type)&&dc(t);break;case Y:cc(Dr(t.type))&&dc(t);break;case X:rp(t),pc(t);var i=t.stateNode;i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(Zp(t),t.effectTag&=~So),kf(t);break;case Z:ap(t);var o=tp(),a=t.type;if(null!==e&&null!=t.stateNode)Sf(e,t,a,r,o),e.ref!==t.ref&&_f(t);else{if(!r){null===t.stateNode&&l(!1,"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");break}var s=ip();if(Zp(t))(function(e,t,n){mu||l(!1,"Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var r=yu(e.stateNode,e.type,e.memoizedProps,t,n,e);return e.updateQueue=r,null!==r})(t,o,s)&&wf(t);else{var u=eu(a,r,o,s,t);Ef(u,t),tu(u,a,r,o)&&wf(t),t.stateNode=u}null!==t.ref&&_f(t)}break;case ee:var c=r;if(e&&null!=t.stateNode){var d=e.memoizedProps;Tf(e,t,d,c)}else{"string"!=typeof c&&null===t.stateNode&&l(!1,"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var p=tp(),f=ip();Zp(t)?Xp(t)&&wf(t):t.stateNode=iu(c,p,f,t)}break;case oe:case ae:case le:case te:case ne:case se:break;case J:rp(t),kf(t);break;case ie:Gd(t);break;case re:break;case Q:l(!1,"An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.");default:l(!1,"Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.")}return null}var xf={},Pf=null;function Nf(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=Ir(n));var i={componentName:null!==n?Mr(n.type):null,componentStack:null!==r?r:"",error:t.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};null!==e&&e.tag===$&&(i.errorBoundary=e.stateNode,i.errorBoundaryName=Mr(e.type),i.errorBoundaryFound=!0,i.willRetry=!0);try{!function(e){var t=e.error,n=e.componentName,r=e.componentStack,i=e.errorBoundaryName,o=e.errorBoundaryFound,a=e.willRetry;if(null!=t&&t._suppressLogging){if(o&&a)return;console.error(t)}var s=(n?"The above error occurred in the <"+n+"> component:":"The above error occurred in one of your React components:")+r+"\n\n"+(o&&i?a?"React will try to recreate this component tree from scratch using the error boundary you provided, "+i+".":"This error was initially handled by the error boundary "+i+".\nRecreating the tree from scratch failed so React will unmount the tree.":"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://fb.me/react-error-boundaries to learn more about error boundaries.");console.error(s)}(i)}catch(e){setTimeout(function(){throw e})}}Pf=new Set;var Of=function(e,t){Ku(e,"componentWillUnmount"),t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount(),Gu()};function Df(e){var t=e.ref;null!==t&&("function"==typeof t?(g(null,t,null,null),y()&&Mh(e,b())):t.current=null)}function Mf(e,t){switch(t.tag){case $:case Y:if(t.effectTag&Mo&&null!==e){var n=e.memoizedProps,r=e.memoizedState;Ku(t,"getSnapshotBeforeUpdate");var i=t.stateNode;i.props=t.memoizedProps,i.state=t.memoizedState;var o=i.getSnapshotBeforeUpdate(n,r),a=Pf;void 0!==o||a.has(t.type)||(a.add(t.type),O(!1,"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Mr(t.type))),i.__reactInternalSnapshotBeforeUpdate=o,Gu()}return;case X:case Z:case ee:case J:return;default:l(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Af(e,t,n,r){switch(n.tag){case $:case Y:var i=n.stateNode;if(n.effectTag&To)if(null===t)Ku(n,"componentDidMount"),i.props=n.memoizedProps,i.state=n.memoizedState,i.componentDidMount(),Gu();else{var o=t.memoizedProps,a=t.memoizedState;Ku(n,"componentDidUpdate"),i.props=n.memoizedProps,i.state=n.memoizedState,i.componentDidUpdate(o,a,i.__reactInternalSnapshotBeforeUpdate),Gu()}var s=n.updateQueue;return void(null!==s&&(i.props=n.memoizedProps,i.state=n.memoizedState,Ld(0,s,i)));case X:var u=n.updateQueue;if(null!==u){var c=null;if(null!==n.child)switch(n.child.tag){case Z:c=Jl(n.child.stateNode);break;case $:case Y:c=n.child.stateNode}Ld(0,u,c)}return;case Z:var d=n.stateNode;if(null===t&&n.effectTag&To)!function(e,t,n,r){Xl(t,n)&&e.focus()}(d,n.type,n.memoizedProps);return;case ee:case J:return;case se:if(Ni){var p=n.memoizedProps.onRender;Oi?p(n.memoizedProps.id,null===t?"mount":"update",n.actualDuration,n.treeBaseDuration,n.actualStartTime,up(),e.memoizedInteractions):p(n.memoizedProps.id,null===t?"mount":"update",n.actualDuration,n.treeBaseDuration,n.actualStartTime,up())}return;case le:if(ki)if((n.mode&Lc)===Eo)n.updateQueue=xf,jh(n,Sc);else{var f=fm();n.stateNode={timedOutAt:f}}return;default:l(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Rf(e){var t=e.ref;if(null!==t){var n=e.stateNode,r=void 0;switch(e.tag){case Z:r=Jl(n);break;default:r=n}"function"==typeof t?t(r):(t.hasOwnProperty("current")||O(!1,"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().%s",Mr(e.type),Ir(e)),t.current=r)}}function If(e){var t=e.ref;null!==t&&("function"==typeof t?t(null):t.current=null)}function Uf(e){switch("function"==typeof yc&&yc(e),e.tag){case $:case Y:Df(e);var t=e.stateNode;return void("function"==typeof t.componentWillUnmount&&function(e,t){g(null,Of,null,e,t),y()&&Mh(e,b())}(e,t));case Z:return void Df(e);case J:return void(uu?Wf(e):zl&&function(e){if(!zl)return;var t=e.stateNode.containerInfo,n=ql(t);Gl(t,n)}(e))}}function Ff(e){for(var t=e;;)if(Uf(t),null===t.child||uu&&t.tag===J){if(t===e)return;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function Lf(e){return e.tag===Z||e.tag===X||e.tag===J}function jf(e){if(uu){var t=function(e){for(var t=e.return;null!==t;){if(Lf(t))return t;t=t.return}l(!1,"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}(e),n=void 0,r=void 0;switch(t.tag){case Z:n=t.stateNode,r=!1;break;case X:case J:n=t.stateNode.containerInfo,r=!0;break;default:l(!1,"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}t.effectTag&Po&&(cu(n),t.effectTag&=~Po);for(var i,o,a,s=function(e){var t=e;e:for(;;){for(;null===t.sibling;){if(null===t.return||Lf(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==Z&&t.tag!==ee;){if(t.effectTag&So)continue e;if(null===t.child||t.tag===J)continue e;t.child.return=t,t=t.child}if(!(t.effectTag&So))return t.stateNode}}(e),u=e;;){if(u.tag===Z||u.tag===ee)s?r?(i=n,o=u.stateNode,a=s,i.nodeType===nr?i.parentNode.insertBefore(o,a):i.insertBefore(o,a)):fu(n,u.stateNode,s):r?pu(n,u.stateNode):du(n,u.stateNode);else if(u.tag===J);else if(null!==u.child){u.child.return=u,u=u.child;continue}if(u===e)return;for(;null===u.sibling;){if(null===u.return||u.return===e)return;u=u.return}u.sibling.return=u.return,u=u.sibling}}}function Wf(e){for(var t,n,r=e,i=!1,o=void 0,a=void 0;;){if(!i){var s=r.return;e:for(;;){switch(null===s&&l(!1,"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."),s.tag){case Z:o=s.stateNode,a=!1;break e;case X:case J:o=s.stateNode.containerInfo,a=!0;break e}s=s.return}i=!0}if(r.tag===Z||r.tag===ee)Ff(r),a?(t=o,n=r.stateNode,t.nodeType===nr?t.parentNode.removeChild(n):t.removeChild(n)):hu(o,r.stateNode);else if(r.tag===J){if(o=r.stateNode.containerInfo,a=!0,null!==r.child){r.child.return=r,r=r.child;continue}}else if(Uf(r),null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;(r=r.return).tag===J&&(i=!1)}r.sibling.return=r.return,r=r.sibling}}function Bf(e){uu?Wf(e):Ff(e),function(e){e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)}(e)}function zf(e,t){if(uu)switch(t.tag){case $:case Y:return;case Z:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r,o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&function(e,t,n,r,i,o){ge(e,i),xl(e,t,n,r,i)}(n,a,o,i,r)}return;case ee:null===t.stateNode&&l(!1,"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var s=t.stateNode,u=t.memoizedProps;null!==e&&e.memoizedProps;return void function(e,t,n){e.nodeValue=n}(s,0,u);case X:case se:case le:return;default:l(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}else!function(e){if(zl)switch(e.tag){case $:case Y:case Z:case ee:return;case X:case J:var t=e.stateNode,n=t.containerInfo,r=t.pendingChildren;return void Gl(n,r);default:l(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}(t)}function Vf(e){uu&&cu(e.stateNode)}function qf(){return null}function Hf(e,t,n){var r=Nd(n);r.tag=Ed,r.payload={element:null};var i=t.value;return r.callback=function(){km(i),Nf(e,t)},r}function Kf(e,t,n){var r=Nd(n);r.tag=Ed;var i=e.type.getDerivedStateFromCatch;if(Ei&&"function"==typeof i){var o=t.value;r.payload=function(){return i(o)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(r.callback=function(){var n;Ei&&"function"===i||(n=this,null===fh?fh=new Set([n]):fh.add(n));var r=t.value,o=t.stack;Nf(e,t),this.componentDidCatch(r,{componentStack:null!==o?o:""})}),r}function Gf(e,t,n,r,i){if(n.effectTag|=Io,n.firstEffect=n.lastEffect=null,ki&&null!==r&&"object"==typeof r&&"function"==typeof r.then){var o=r,a=t,s=-1,l=-1;do{if(a.tag===le){var u=a.alternate;if(null!==u&&!0===u.memoizedState&&null!==u.stateNode){l=Nc(u.stateNode.timedOutAt);break}var c=a.pendingProps.delayMs;"number"==typeof c&&(c<=0?s=0:(-1===s||c<s)&&(s=c))}a=a.return}while(null!==a);a=t;do{if(a.tag===le)if(!a.memoizedState){var d=(a.mode&Fc)===Eo?Sc:i,p=Uh.bind(null,e,a,d);if(o.then(p,p),(a.mode&Lc)===Eo){a.effectTag|=To;return af(n.alternate,n,null,i),n.effectTag&=~Io,n.tag===Q&&(n.tag=K),void(n.tag!==$&&n.tag!==Y||(n.effectTag&=~Ao,null===n.alternate&&(n.tag=K,n.type=qf)))}var f=void 0;if(-1===s)f=Ec;else{if(-1===l)l=Nc(vd(e,i))-Dc;f=l+s}return Ih(e,f,i),a.effectTag|=Uo,void(a.expirationTime=i)}a=a.return}while(null!==a);r=new Error("An update was suspended, but no placeholder UI was provided.")}ch=!0,r=Wd(r,n);var h=t;do{switch(h.tag){case X:var m=r;return h.effectTag|=Uo,h.expirationTime=i,void Md(h,Hf(h,m,i));case $:case Y:var v=r,g=h.type,y=h.stateNode;if((h.effectTag&Oo)===Eo&&("function"==typeof g.getDerivedStateFromCatch&&Ei||null!==y&&"function"==typeof y.componentDidCatch&&!Th(y)))return h.effectTag|=Uo,h.expirationTime=i,void Md(h,Kf(h,v,i))}h=h.return}while(null!==h)}function $f(e,t){switch(e.tag){case $:cc(e.type)&&dc(e);var n=e.effectTag;return n&Uo?(e.effectTag=n&~Uo|Oo,e):null;case Y:cc(e.type._reactResult)&&dc(e);var r=e.effectTag;return r&Uo?(e.effectTag=r&~Uo|Oo,e):null;case X:rp(e),pc(e);var i=e.effectTag;return(i&Oo)!==Eo&&l(!1,"The root failed to unmount after an error. This is likely a bug in React. Please file an issue."),e.effectTag=i&~Uo|Oo,e;case Z:return ap(e),null;case le:var o=e.effectTag;return o&Uo?(e.effectTag=o&~Uo|Oo,e):null;case J:return rp(e),null;case ie:return Gd(e),null;default:return null}}function Yf(e){switch(e.tag){case $:var t=e.type.childContextTypes;null!==t&&void 0!==t&&dc(e);break;case Y:var n=e.type._reactResult.childContextTypes;null!==n&&void 0!==n&&dc(e);break;case X:rp(e),pc(e);break;case Z:ap(e);break;case J:rp(e);break;case ie:Gd(e)}}var Qf={readContext:Yd},Xf=dr.ReactCurrentOwner,Jf=void 0,Zf=void 0,eh=void 0,th=void 0;Oi&&(null==a.__interactionsRef||null==a.__interactionsRef.current)&&l(!1,"It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling"),Jf=!1,Zf=!1;var nh={};eh=function(e){var t=Mr(e.type)||"ReactClass";nh[t]||(O(!1,"Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.%s",Ir(e)),nh[t]=!0)},th=function(e){switch(Fr){case"getChildContext":if(Zf)return;O(!1,"setState(...): Cannot call setState() inside getChildContext()"),Zf=!0;break;case"render":if(Jf)return;O(!1,"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Jf=!0}};var rh=0,ih=kc,oh=!1,ah=null,sh=null,lh=kc,uh=-1,ch=!1,dh=null,ph=!1,fh=null,hh=null,mh=!1,vh=void 0,gh=void 0,yh=void 0,bh=void 0,wh=void 0;function _h(){if(null!==ah)for(var e=ah.return;null!==e;)Yf(e),e=e.return;td.discardPendingWarnings(),-1!==Xu&&O(!1,"Expected an empty stack. Something was not reset properly."),sh=null,lh=kc,uh=-1,ch=!1,ah=null}function Eh(){for(;null!==dh;){Br(dh),Vu();var e=dh.effectTag;if(e&Po&&Vf(dh),e&Do){var t=dh.alternate;null!==t&&If(t)}switch(e&(So|To|xo)){case So:jf(dh),dh.effectTag&=~So;break;case Co:jf(dh),dh.effectTag&=~So,zf(dh.alternate,dh);break;case To:zf(dh.alternate,dh);break;case xo:Bf(dh)}dh=dh.nextEffect}Wr()}function kh(){for(;null!==dh;){if(Br(dh),dh.effectTag&Mo)Vu(),Mf(dh.alternate,dh);dh=dh.nextEffect}Wr()}function Sh(e,t){for(td.flushPendingUnsafeLifecycleWarnings(),xi&&td.flushPendingDeprecationWarnings(),Pi&&td.flushLegacyContextWarning();null!==dh;){var n=dh.effectTag;if(n&(To|No))Vu(),Af(e,dh.alternate,dh);n&Do&&(Vu(),Rf(dh));var r=dh.nextEffect;dh.nextEffect=null,dh=r}}function Th(e){return null!==fh&&fh.has(e)}function Ch(e,t){oh=!0,ph=!0,function(){if(_i){if(!bu)return;ku=!0,Su=!1,Nu.clear(),Du("(Committing Changes)")}}(),e.current===t&&l(!1,"Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.");var n=e.pendingCommitExpirationTime;n===kc&&l(!1,"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."),e.pendingCommitExpirationTime=kc;var r=t.expirationTime,i=t.childExpirationTime;!function(e,t){if(e.didError=!1,t===kc)return e.earliestPendingTime=kc,e.latestPendingTime=kc,e.earliestSuspendedTime=kc,e.latestSuspendedTime=kc,e.latestPingedTime=kc,void yd(kc,e);var n=e.latestPendingTime;n!==kc&&(n<t?e.earliestPendingTime=e.latestPendingTime=kc:e.earliestPendingTime<t&&(e.earliestPendingTime=e.latestPendingTime));var r=e.earliestSuspendedTime;r===kc?(hd(e,t),yd(kc,e)):t>e.latestSuspendedTime?(e.earliestSuspendedTime=kc,e.latestSuspendedTime=kc,e.latestPingedTime=kc,hd(e,t),yd(kc,e)):t<r?(hd(e,t),yd(kc,e)):yd(kc,e)}(e,r===kc||i!==kc&&i<r?i:r);var s=null,u=Oi?[]:null;Oi&&(s=a.__interactionsRef.current,a.__interactionsRef.current=e.memoizedInteractions,e.pendingInteractionMap.forEach(function(t,r){r<=n&&(u.push.apply(u,Array.from(t)),e.pendingInteractionMap.delete(r))})),Xf.current=null;var c=void 0;for(t.effectTag>ko?null!==t.lastEffect?(t.lastEffect.nextEffect=t,c=t.firstEffect):c=t:c=t.firstEffect,Zl(e.containerInfo),dh=c,function(){if(_i){if(!bu)return;xu=0,Du("(Committing Snapshot Effects)")}}();null!==dh;){var d=!1,p=void 0;g(null,kh,null),y()&&(d=!0,p=b()),d&&(null===dh&&l(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Mh(dh,p),null!==dh&&(dh=dh.nextEffect))}for(!function(){if(_i){if(!bu)return;var e=xu;xu=0,Mu("(Committing Snapshot Effects: "+e+" Total)","(Committing Snapshot Effects)",null)}}(),Ni&&Ni&&(sp=o.unstable_now()),dh=c,function(){if(_i){if(!bu)return;xu=0,Du("(Committing Host Effects)")}}();null!==dh;){var f=!1,h=void 0;g(null,Eh,null),y()&&(f=!0,h=b()),f&&(null===dh&&l(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Mh(dh,h),null!==dh&&(dh=dh.nextEffect))}for(!function(){if(_i){if(!bu)return;var e=xu;xu=0,Mu("(Committing Host Effects: "+e+" Total)","(Committing Host Effects)",null)}}(),e.containerInfo,Ra(Ql),Ql=null,ma(Yl),Yl=null,e.current=t,dh=c,function(){if(_i){if(!bu)return;xu=0,Du("(Calling Lifecycle Methods)")}}();null!==dh;){var m=!1,v=void 0;g(null,Sh,null,e,n),y()&&(m=!0,v=b()),m&&(null===dh&&l(!1,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),Mh(dh,v),null!==dh&&(dh=dh.nextEffect))}ph=!1,oh=!1,function(){if(_i){if(!bu)return;var e=xu;xu=0,Mu("(Calling Lifecycle Methods: "+e+" Total)","(Calling Lifecycle Methods)",null)}}(),function(){if(_i){if(!bu)return;var e=null;Su?e="Lifecycle hook scheduled a cascading update":Cu>0&&(e="Caused by a cascading update in earlier commit"),Su=!1,Cu++,ku=!1,Nu.clear(),Mu("(Committing Changes)","(Committing Changes)",e)}}(),function(e){"function"==typeof gc&&gc(e)}(t.stateNode),fd.debugTool&&fd.debugTool.onCommitWork(t);var w=t.expirationTime,_=t.childExpirationTime,E=w===kc||_!==kc&&_<w?_:w;if(E===kc&&(fh=null),function(e,t){e.expirationTime=t,e.finishedWork=null}(e,E),Oi){a.__interactionsRef.current=s;var k=void 0;try{if(null!==(k=a.__subscriberRef.current)&&e.memoizedInteractions.size>0){var S=Ah(n,e.interactionThreadID);k.onWorkStopped(e.memoizedInteractions,S)}}catch(p){Qh||(Qh=!0,Xh=p)}finally{mh||u.forEach(function(e){if(e.__count--,null!==k&&0===e.__count)try{k.onInteractionScheduledWorkCompleted(e)}catch(e){Qh||(Qh=!0,Xh=e)}})}}}function xh(e,t){if(t===Tc||e.childExpirationTime!==Tc){var n=kc;if(Ni&&e.mode&jc){for(var r=e.actualDuration,i=e.selfBaseDuration,o=null===e.alternate||e.child!==e.alternate.child,a=e.child;null!==a;){var s=a.expirationTime,l=a.childExpirationTime;(n===kc||s!==kc&&s<n)&&(n=s),(n===kc||l!==kc&&l<n)&&(n=l),o&&(r+=a.actualDuration),i+=a.treeBaseDuration,a=a.sibling}e.actualDuration=r,e.treeBaseDuration=i}else for(var u=e.child;null!==u;){var c=u.expirationTime,d=u.childExpirationTime;(n===kc||c!==kc&&c<n)&&(n=c),(n===kc||d!==kc&&d<n)&&(n=d),u=u.sibling}e.childExpirationTime=n}}function Ph(e){for(;;){var t=e.alternate;Br(e);var n=e.return,r=e.sibling;if((e.effectTag&Io)===Eo){Ni?(e.mode&jc&&cp(e),ah=Cf(t,e),e.mode&jc&&pp(e,!1)):ah=Cf(t,e);var i=ah;if(qu(e),xh(e,lh),Wr(),null!==i)return qu(e),fd.debugTool&&fd.debugTool.onCompleteWork(e),i;if(null!==n&&(n.effectTag&Io)===Eo)null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),e.effectTag>ko&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e);if(fd.debugTool&&fd.debugTool.onCompleteWork(e),null!==r)return r;if(null!==n){e=n;continue}return null}e.mode&jc&&pp(e,!1);var o=$f(e);if(e.effectTag&Oo?Hu(e):qu(e),Wr(),null!==o){if(qu(e),fd.debugTool&&fd.debugTool.onCompleteWork(e),Ni&&o.mode&jc){for(var a=o.actualDuration,s=o.child;null!==s;)a+=s.actualDuration,s=s.sibling;o.actualDuration=a}return o.effectTag&=Ro,o}if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=Io),fd.debugTool&&fd.debugTool.onCompleteWork(e),null!==r)return r;if(null===n)return null;e=n}return null}function Nh(e){var t=e.alternate;!function(e){if(_i){if(!bu||Lu(e))return;if(wu=e,!Iu(e,null))return;e._debugIsCurrentlyTiming=!0}}(e),Br(e),Ci&&(vh=Jc(vh,e));var n=void 0;return Ni?(e.mode&jc&&cp(e),n=bf(t,e,lh),e.mode&jc&&pp(e,!0)):n=bf(t,e,lh),Wr(),yh&&wh(),fd.debugTool&&fd.debugTool.onBeginWork(e),null===n&&(n=Ph(e)),Xf.current=null,n}function Oh(e){if(e)for(;null!==ah&&!Em();)ah=Nh(ah);else for(;null!==ah;)ah=Nh(ah)}function Dh(e,t,n){oh&&l(!1,"renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue."),oh=!0,Xf.currentDispatcher=Qf;var r=e.nextExpirationTimeToWorkOn,i=null;if(Oi&&(i=a.__interactionsRef.current,a.__interactionsRef.current=e.memoizedInteractions),(r!==lh||e!==sh||null===ah)&&(_h(),lh=r,ah=Gc((sh=e).current,null,lh),e.pendingCommitExpirationTime=kc,Oi)){var o=new Set;if(e.pendingInteractionMap.forEach(function(e,t){t<=r&&e.forEach(function(e){return o.add(e)})}),e.memoizedInteractions=o,o.size>0){var s=a.__subscriberRef.current;if(null!==s){var u=Ah(r,e.interactionThreadID);try{s.onWorkStarted(o,u)}catch(e){Qh||(Qh=!0,Xh=e)}}}}var c=!1;for(!function(e){if(_i){if(wu=e,!bu)return;Cu=0,Du("(React Tree Reconciliation)"),zu()}}(ah);;){try{Oh(t)}catch(n){if(null===ah)c=!0,km(n);else{Cd(),Ci&&gh(ah,n,t),null===ah&&l(!1,"Failed to replay rendering after an error. This is likely caused by a bug in React. Please file an issue with a reproducing case to help us find it.");var d=ah,p=d.return;if(null!==p){Gf(e,p,d,n,lh),ah=Ph(d);continue}c=!0,km(n)}}break}if(Oi&&(a.__interactionsRef.current=i),oh=!1,Xf.currentDispatcher=null,Vd=null,qd=null,Hd=null,c){return $u(hh,!1),hh=null,Xu=-1,Yu.length=0,Qu.length=0,sh=null,void function(e){e.finishedWork=null}(e)}if(null!==ah){return $u(hh,!1),hh=null,void function(e){e.finishedWork=null}(e)}$u(hh,!0);var f=e.current.alternate;if(null===f&&l(!1,"Finished root should have a work-in-progress. This error is likely caused by a bug in React. Please file an issue."),sh=null,hh=null,ch){if(function(e,t){var n=e.latestPendingTime,r=e.latestSuspendedTime,i=e.latestPingedTime;return n!==kc&&n>t||r!==kc&&r>t||i!==kc&&i>t}(e,r))return md(e,r),void pm(e,f,r,e.expirationTime,-1);if(!e.didError&&!n){e.didError=!0;var h=e.nextExpirationTimeToWorkOn=r,m=e.expirationTime=Sc;return void pm(e,f,h,m,-1)}}if(ki&&!n&&-1!==uh){var v=r;md(e,v);var g=Nc(vd(e,r));g<uh&&(uh=g);var y=Nc(fm()),b=uh-y;return b=b<0?0:b,void pm(e,f,v,e.expirationTime,b)}!function(e,t,n){e.pendingCommitExpirationTime=n,e.finishedWork=t}(e,f,r)}function Mh(e,t){return function(e,t,n){oh&&!ph&&l(!1,"dispatch: Cannot dispatch during the render phase.");for(var r=e.return;null!==r;){switch(r.tag){case $:case Y:var i=r.type,o=r.stateNode;if("function"==typeof i.getDerivedStateFromCatch||"function"==typeof o.componentDidCatch&&!Th(o))return Dd(r,Kf(r,Wd(t,e),n)),void jh(r,n);break;case X:return Dd(r,Hf(r,Wd(t,e),n)),void jh(r,n)}r=r.return}if(e.tag===X){var a=e;Dd(a,Hf(a,Wd(t,a),n)),jh(a,n)}}(e,t,Sc)}function Ah(e,t){return 1e3*e+t}function Rh(e,t){var n=void 0;return ih!==kc?n=ih:oh?n=ph?Sc:lh:t.mode&Fc?(n=tm?function(e){return Oc(e,Rc,Ic)}(e):Ac(e),null!==sh&&n===lh&&(n+=1)):n=Sc,tm&&($h===kc||n>$h)&&($h=n),n}function Ih(e,t,n){t>=0&&uh<t&&(uh=t)}function Uh(e,t,n){if(ki){var r=void 0;if(function(e,t){var n=e.earliestSuspendedTime,r=e.latestSuspendedTime;return n!==kc&&t>=n&&t<=r}(e,n))!function(e,t){e.didError=!1;var n=e.latestPingedTime;(n===kc||n<t)&&(e.latestPingedTime=t),yd(t,e)}(e,r=n);else hd(e,r=Rh(fm(),t));Fh(t,r);var i=e.expirationTime;if(i!==kc)if(Oi){var o=a.__interactionsRef.current;a.__interactionsRef.current=e.memoizedInteractions,Lh(e,i,!1),hm(e,i),a.__interactionsRef.current=o}else hm(e,i)}}function Fh(e,t){(e.expirationTime===kc||e.expirationTime>t)&&(e.expirationTime=t);var n=e.alternate;null!==n&&(n.expirationTime===kc||n.expirationTime>t)&&(n.expirationTime=t);var r=e.return;if(null===r&&e.tag===X)return e.stateNode;for(;null!==r;){if(n=r.alternate,r.childExpirationTime===kc||r.childExpirationTime>t?(r.childExpirationTime=t,null!==n&&(n.childExpirationTime===kc||n.childExpirationTime>t)&&(n.childExpirationTime=t)):null!==n&&(n.childExpirationTime===kc||n.childExpirationTime>t)&&(n.childExpirationTime=t),null===r.return&&r.tag===X)return r.stateNode;r=r.return}return null}function Lh(e,t,n){if(Oi){var r=a.__interactionsRef.current;if(r.size>0){var i=e.pendingInteractionMap.get(t);null!=i?r.forEach(function(e){n&&!i.has(e)&&e.__count++,i.add(e)}):(e.pendingInteractionMap.set(t,new Set(r)),n&&r.forEach(function(e){e.__count++}));var o=a.__subscriberRef.current;if(null!==o){var s=Ah(t,e.interactionThreadID);o.onWorkScheduled(r,s)}}}}function jh(e,t){if(_i&&(ku&&(Su=!0),null!==_u&&"componentWillMount"!==_u&&"componentWillReceiveProps"!==_u&&(Tu=!0)),e.tag===$||e.tag===Y){var n=e.stateNode;th(n)}var r=Fh(e,t);if(null!==r){if(Oi&&Lh(r,t,!0),!oh&&lh!==kc&&t<lh&&(hh=e,_h()),hd(r,t),!oh||ph||sh!==r)hm(r,r.expirationTime);sm>am&&(sm=0,l(!1,"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."))}else e.tag!==$&&e.tag!==Y||eh(e)}function Wh(e,t,n,r,i){var o=ih;ih=Sc;try{return e(t,n,r,i)}finally{ih=o}}Ci&&(vh=null,yh=!1,bh=null,gh=function(e,t,n){if(null===t||"object"!=typeof t||"function"!=typeof t.then)if(null!==vh){switch(Jc(e,vh),e.tag){case X:rp(e),pc(e);break;case Z:ap(e);break;case $:cc(e.type)&&dc(e);break;case Y:cc(Dr(e.type))&&dc(e);break;case J:rp(e);break;case ie:Gd(e)}if(yh=!0,bh=t,g(null,Oh,null,n),yh=!1,bh=null,y()){var r=b();if(null!=r&&null!=t)try{r._suppressLogging&&(t._suppressLogging=!0)}catch(e){}}else ah=e}else O(!1,"Could not replay rendering after an error. This is likely a bug in React. Please file an issue.")},wh=function(){throw bh});var Bh=null,zh=null,Vh=kc,qh=void 0,Hh=!1,Kh=null,Gh=kc,$h=kc,Yh=!1,Qh=!1,Xh=null,Jh=null,Zh=!1,em=!1,tm=!1,nm=null,rm=o.unstable_now(),im=Pc(rm),om=im,am=50,sm=0,lm=null,um=1;function cm(){var e=o.unstable_now()-rm;im=Pc(e)}function dm(e,t){if(Vh!==kc){if(t>Vh)return;null!==qh&&o.unstable_cancelScheduledWork(qh)}else _i&&bu&&!Pu&&(Pu=!0,Du("(Waiting for async callback...)"));Vh=t;var n=o.unstable_now()-rm,r=Nc(t)-n;qh=o.unstable_scheduleWork(vm,{timeout:r})}function pm(e,t,n,r,i){e.expirationTime=r,ki&&0===i&&!Em()?(e.pendingCommitExpirationTime=n,e.finishedWork=t):i>0&&(e.timeoutHandle=au(function(e,t,n){ki&&(e.pendingCommitExpirationTime=n,e.finishedWork=t,cm(),om=im,Oi?(mh=!0,bm(e,n),mh=!1):bm(e,n))}.bind(null,e,t,n),i))}function fm(){return Hh?om:(mm(),Gh===kc||Gh===Tc?(cm(),om=im):om)}function hm(e,t){!function(e,t){if(null===e.nextScheduledRoot)e.expirationTime=t,null===zh?(Bh=zh=e,e.nextScheduledRoot=e):(zh.nextScheduledRoot=e,(zh=e).nextScheduledRoot=Bh);else{var n=e.expirationTime;(n===kc||t<n)&&(e.expirationTime=t)}}(e,t),Hh||(Zh?em&&(Kh=e,Gh=Sc,wm(e,Sc,!0)):t===Sc?gm():dm(0,t))}function mm(){var e=kc,t=null;if(null!==zh)for(var n=zh,r=Bh;null!==r;){var i=r.expirationTime;if(i===kc){if((null===n||null===zh)&&l(!1,"Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue."),r===r.nextScheduledRoot){r.nextScheduledRoot=null,Bh=zh=null;break}if(r===Bh){var o=r.nextScheduledRoot;Bh=o,zh.nextScheduledRoot=o,r.nextScheduledRoot=null}else{if(r===zh){(zh=n).nextScheduledRoot=Bh,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((e===kc||i<e)&&(e=i,t=r),r===zh)break;if(e===Sc)break;n=r,r=r.nextScheduledRoot}}Kh=t,Gh=e}function vm(e){if(e.didTimeout&&null!==Bh){cm();var t=Bh;do{gd(t,im),t=t.nextScheduledRoot}while(t!==Bh)}ym(kc,e)}function gm(){ym(Sc,null)}function ym(e,t){if(Jh=t,mm(),null!==Jh){if(cm(),om=im,_i)!function(e,t){_i&&bu&&(Pu=!1,Mu("(Waiting for async callback... will force flush in "+t+" ms)","(Waiting for async callback...)",e?"React was blocked by main thread":null))}(Gh<im,Nc(Gh));for(;null!==Kh&&Gh!==kc&&(e===kc||e>=Gh)&&(!Yh||im>=Gh);)wm(Kh,Gh,im>=Gh),mm(),cm(),om=im}else for(;null!==Kh&&Gh!==kc&&(e===kc||e>=Gh);)wm(Kh,Gh,!0),mm();null!==Jh&&(Vh=kc,qh=null),Gh!==kc&&dm(0,Gh),Jh=null,Yh=!1,function(){if(sm=0,lm=null,null!==nm){var e=nm;nm=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(r){Qh||(Qh=!0,Xh=r)}}}if(Qh){var r=Xh;throw Xh=null,Qh=!1,r}}()}function bm(e,t){Hh&&l(!1,"work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method."),Kh=e,Gh=t,wm(e,t,!0),gm()}function wm(e,t,n){if(Hh&&l(!1,"performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue."),Hh=!0,null===Jh||n){var r=e.finishedWork;if(null!==r)_m(e,r,t);else{e.finishedWork=null;var i=e.timeoutHandle;ki&&i!==lu&&(e.timeoutHandle=lu,su(i));Dh(e,!1,n),null!==(r=e.finishedWork)&&_m(e,r,t)}}else{var o=e.finishedWork;if(null!==o)_m(e,o,t);else{e.finishedWork=null;var a=e.timeoutHandle;ki&&a!==lu&&(e.timeoutHandle=lu,su(a));Dh(e,!0,n),null!==(o=e.finishedWork)&&(Em()?e.finishedWork=o:_m(e,o,t))}}Hh=!1}function _m(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===nm?nm=[r]:nm.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=kc);e.finishedWork=null,e===lm?sm++:(lm=e,sm=0),Ch(e,t)}function Em(){return!!Yh||!(null===Jh||Jh.timeRemaining()>um)&&(Yh=!0,!0)}function km(e){null===Kh&&l(!1,"Should be working on a root. This error is likely caused by a bug in React. Please file an issue."),Kh.expirationTime=kc,Qh||(Qh=!0,Xh=e)}function Sm(e,t){var n=Zh;Zh=!0;try{return e(t)}finally{(Zh=n)||Hh||gm()}}function Tm(e,t){if(Zh&&!em){em=!0;try{return e(t)}finally{em=!1}}return e(t)}function Cm(e,t,n){if(tm)return e(t,n);Zh||Hh||$h===kc||(ym($h,null),$h=kc);var r=tm,i=Zh;tm=!0,Zh=!0;try{return e(t,n)}finally{tm=r,(Zh=i)||Hh||gm()}}var xm=void 0;function Pm(e){if(!e)return nc;var t=_o(e),n=function(e){(!zo(e)||e.tag!==$&&e.tag!==Y)&&l(!1,"Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case X:return t.stateNode.context;case $:if(cc(t.type))return t.stateNode.__reactInternalMemoizedMergedChildContext;break;case Y:if(cc(Dr(t.type)))return t.stateNode.__reactInternalMemoizedMergedChildContext}t=t.return}while(null!==t);l(!1,"Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}(t);if(t.tag===$){var r=t.type;if(cc(r))return hc(t,r,n)}else if(t.tag===Y){var i=Dr(t.type);if(cc(i))return hc(t,i,n)}return n}function Nm(e,t,n,r,i){var o=t.current;fd.debugTool&&(null===o.alternate?fd.debugTool.onMountContainer(t):null===e?fd.debugTool.onUnmountContainer(t):fd.debugTool.onUpdateContainer(t));var a=Pm(n);return null===t.context?t.context=a:t.pendingContext=a,function(e,t,n,r){"render"!==Fr||null===Ur||xm||(xm=!0,O(!1,"Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",Mr(Ur.type)||"Unknown"));var i=Nd(n);return i.payload={element:t},null!==(r=void 0===r?null:r)&&("function"!=typeof r&&O(!1,"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",r),i.callback=r),Dd(e,i),jh(e,n),n}(o,e,r,i)}function Om(e,t,n,r){var i=t.current;return Nm(e,t,n,Rh(fm(),i),r)}function Dm(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case Z:return Jl(t.child.stateNode);default:return t.child.stateNode}}function Mm(e){var t=function(e){var t=qo(e);if(!t)return null;for(var n=t;;){if(n.tag===Z||n.tag===ee)return n;if(n.child&&n.tag!==J)n.child.return=n,n=n.child;else{if(n===t)return null;for(;!n.sibling;){if(!n.return||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}(e);return null===t?null:t.stateNode}xm=!1;var Am,Rm=dr.ReactCurrentOwner,Im=void 0,Um=!1;function Fm(e){var t,n=((t=Ac(fm()))<=rh&&(t=rh+1),rh=t);this._expirationTime=n,this._root=e,this._next=null,this._callbacks=null,this._didComplete=!1,this._hasChildren=!1,this._children=null,this._defer=!0}function Lm(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function jm(e,t,n){var r=function(e,t,n){return Zc(e,t,n)}(e,t,n);this._internalRoot=r}function Wm(e){return!(!e||e.nodeType!==er&&e.nodeType!==rr&&e.nodeType!==ir&&(e.nodeType!==nr||" react-mount-point-unstable "!==e.nodeValue))}function Bm(e){return e?e.nodeType===rr?e.documentElement:e.firstChild:null}"function"==typeof Map&&null!=Map.prototype&&"function"==typeof Map.prototype.forEach&&"function"==typeof Set&&null!=Set.prototype&&"function"==typeof Set.prototype.clear&&"function"==typeof Set.prototype.forEach||O(!1,"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),Im=function(e){if(e._reactRootContainer&&e.nodeType!==nr){var t=Mm(e._reactRootContainer._internalRoot.current);t&&t.parentNode!==e&&O(!1,"render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,r=Bm(e);!(!r||!he(r))&&!n&&O(!1,"render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===er&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&O(!1,"render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")},Am=function(e,t){null!==e&&"function"!=typeof e&&O(!1,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)},Bn=function(e,t,n){switch(t){case"input":return void zi(e,n);case"textarea":return void function(e,t){rs(e,t)}(e,n);case"select":return void function(e,t){var n=e,r=t.value;null!=r&&Xa(n,!!t.multiple,r,!1)}(e,n)}},Fm.prototype.render=function(e){this._defer||l(!1,"batch.render: Cannot render a batch that already committed."),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new Lm;return Nm(e,t,null,n,r._onCommit),r},Fm.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Fm.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||l(!1,"batch.commit: Cannot commit a batch multiple times."),!this._hasChildren)return this._next=null,void(this._defer=!1);var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,i=t;i!==this;)r=i,i=i._next;null===r&&l(!1,"batch.commit: Cannot commit a batch multiple times."),r._next=i._next,this._next=t,t=e.firstBatch=this}this._defer=!1,bm(e,n);var o=this._next;this._next=null,null!==(t=e.firstBatch=o)&&t._hasChildren&&t.render(t._children)},Fm.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){(0,e[t])()}}},Lm.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Lm.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&l(!1,"Invalid argument passed as callback. Expected a function. Instead received: %s",n),n()}}},jm.prototype.render=function(e,t){var n=this._internalRoot,r=new Lm;return Am(t=void 0===t?null:t,"render"),null!==t&&r.then(t),Om(e,n,null,r._onCommit),r},jm.prototype.unmount=function(e){var t=this._internalRoot,n=new Lm;return Am(e=void 0===e?null:e,"render"),null!==e&&n.then(e),Om(null,t,null,n._onCommit),n},jm.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new Lm;return Am(n=void 0===n?null:n,"render"),null!==n&&i.then(n),Om(t,r,e,i._onCommit),i},jm.prototype.createBatch=function(){var e=new Fm(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(var i=null,o=r;null!==o&&o._expirationTime<=t;)i=o,o=o._next;e._next=o,null!==i&&(i._next=e)}return e},Gn=Sm,$n=Cm,Yn=function(){Hh||$h===kc||(ym($h,null),$h=kc)};var zm=!1;function Vm(e,t){var n=t||function(e){var t=Bm(e);return!(!t||t.nodeType!==er||!t.hasAttribute(Jr))}(e);if(!n)for(var r=!1,i=void 0;i=e.lastChild;)!r&&i.nodeType===er&&i.hasAttribute(Jr)&&(r=!0,O(!1,"render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup.")),e.removeChild(i);!n||t||zm||(zm=!0,ed(!1,"render(): Calling ReactDOM.render() to hydrate server-rendered markup will stop working in React v17. Replace the ReactDOM.render() call with ReactDOM.hydrate() if you want React to attach to the server HTML."));return new jm(e,!1,n)}function qm(e,t,n,r,i){Wm(n)||l(!1,"Target container is not a DOM element."),Im(n);var o=n._reactRootContainer;if(o){if("function"==typeof i){var a=i;i=function(){var e=Dm(o._internalRoot);a.call(e)}}null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)}else{if(o=n._reactRootContainer=Vm(n,r),"function"==typeof i){var s=i;i=function(){var e=Dm(o._internalRoot);s.call(e)}}Tm(function(){null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)})}return Dm(o._internalRoot)}function Hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Wm(t)||l(!1,"Target container is not a DOM element."),function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:vr,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}var Km,Gm,$m={createPortal:Hm,findDOMNode:function(e){var t=Rm.current;null!==t&&null!==t.stateNode&&(t.stateNode._warnedAboutRefsInRender||O(!1,"%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Mr(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0);return null==e?null:e.nodeType===er?e:function(e){var t=_o(e);void 0===t&&("function"==typeof e.render?l(!1,"Unable to find node on an unmounted component."):l(!1,"Argument appears to not be a ReactComponent. Keys: %s",Object.keys(e)));var n=Ho(t);return null===n?null:n.stateNode}(e)},hydrate:function(e,t,n){return qm(null,e,t,!0,n)},render:function(e,t,n){return qm(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||void 0===e._reactInternalFiber)&&l(!1,"parentComponent must be a valid React Component"),qm(e,t,n,!1,r)},unmountComponentAtNode:function(e){if(Wm(e)||l(!1,"unmountComponentAtNode(...): Target container is not a DOM element."),e._reactRootContainer){var t=Bm(e);return t&&!he(t)&&O(!1,"unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React."),Tm(function(){qm(null,null,e,!1,function(){e._reactRootContainer=null})}),!0}var n=Bm(e),r=!(!n||!he(n)),i=e.nodeType===er&&Wm(e.parentNode)&&!!e.parentNode._reactRootContainer;return r&&O(!1,"unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",i?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component."),!1},unstable_createPortal:function(){return Um||(Um=!0,ed(!1,'The ReactDOM.unstable_createPortal() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactDOM.createPortal() instead. It has the exact same API, but without the "unstable_" prefix.')),Hm.apply(void 0,arguments)},unstable_batchedUpdates:Sm,unstable_interactiveUpdates:Cm,flushSync:function(e,t){Hh&&l(!1,"flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.");var n=Zh;Zh=!0;try{return Wh(e,t)}finally{Zh=n,gm()}},unstable_flushControlled:function(e){var t=Zh;Zh=!0;try{Wh(e)}finally{(Zh=t)||Hh||gm()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[he,me,ve,z.injectEventPluginsByName,C,Se,function(e){F(e,ke)},Hn,Kn,ba,q]},unstable_createRoot:function(e,t){return Wm(e)||l(!1,"unstable_createRoot(...): Target container is not a DOM element."),new jm(e,!0,null!=t&&!0===t.hydrate)}};if(!(Gm=(Km={findFiberByHostInstance:fe,bundleType:1,version:"16.5.2",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return O(!1,"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var n=t.inject(e);gc=wc(function(e){return t.onCommitFiberRoot(n,e)}),yc=wc(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){O(!1,"React DevTools encountered an error: %s.",e)}return!0}(r({},Km,{findHostInstanceByFiber:function(e){var t=Ho(e);return null===t?null:t.stateNode},findFiberByHostInstance:function(e){return Gm?Gm(e):null}})))&&Te&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&-1===navigator.userAgent.indexOf("Edge")||navigator.userAgent.indexOf("Firefox")>-1)){var Ym=window.location.protocol;/^(https?|file):$/.test(Ym)&&console.info("%cDownload the React DevTools for a better development experience: https://fb.me/react-devtools"+("file:"===Ym?"\nYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq":""),"font-weight:bold")}var Qm=Object.freeze({default:$m}),Xm=Qm&&$m||Qm,Jm=Xm.default||Xm;t.exports=Jm}()}).call(this,e("_process"))},{_process:28,"object-assign":8,"prop-types/checkPropTypes":9,react:16,schedule:21,"schedule/tracing":22}],12:[function(e,t,n){"use strict";var r=e("react"),i=e("object-assign"),o=e("schedule");function a(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,i,o,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],u=0;(e=Error(t.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}r||a("227");var s=!1,l=null,u=!1,c=null,d={onError:function(e){s=!0,l=e}};function p(e,t,n,r,i,o,a,u,c){s=!1,l=null,function(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}.apply(d,arguments)}var f=null,h={};function m(){if(f)for(var e in h){var t=h[e],n=f.indexOf(e);if(-1<n||a("96",e),!g[n])for(var r in t.extractEvents||a("97",e),g[n]=t,n=t.eventTypes){var i=void 0,o=n[r],s=t,l=r;y.hasOwnProperty(l)&&a("99",l),y[l]=o;var u=o.phasedRegistrationNames;if(u){for(i in u)u.hasOwnProperty(i)&&v(u[i],s,l);i=!0}else o.registrationName?(v(o.registrationName,s,l),i=!0):i=!1;i||a("98",r,e)}}}function v(e,t,n){b[e]&&a("100",e),b[e]=t,w[e]=t.eventTypes[n].dependencies}var g=[],y={},b={},w={},_=null,E=null,k=null;function S(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=k(r),function(e,t,n,r,i,o,d,f,h){if(p.apply(this,arguments),s){if(s){var m=l;s=!1,l=null}else a("198"),m=void 0;u||(u=!0,c=m)}}(t,n,void 0,e),e.currentTarget=null}function T(e,t){return null==t&&a("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function C(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var x=null;function P(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)S(e,t,n[i],r[i]);else n&&S(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function N(e){return P(e,!0)}function O(e){return P(e,!1)}var D={injectEventPluginOrder:function(e){f&&a("101"),f=Array.prototype.slice.call(e),m()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];h.hasOwnProperty(t)&&h[t]===r||(h[t]&&a("102",t),h[t]=r,n=!0)}n&&m()}};function M(e,t){var n=e.stateNode;if(!n)return null;var r=_(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&a("231",t,typeof n),n)}function A(e,t){if(null!==e&&(x=T(x,e)),e=x,x=null,e&&(C(e,t?N:O),x&&a("95"),u))throw t=c,u=!1,c=null,t}var R=Math.random().toString(36).slice(2),I="__reactInternalInstance$"+R,U="__reactEventHandlers$"+R;function F(e){if(e[I])return e[I];for(;!e[I];){if(!e.parentNode)return null;e=e.parentNode}return 7===(e=e[I]).tag||8===e.tag?e:null}function L(e){return!(e=e[I])||7!==e.tag&&8!==e.tag?null:e}function j(e){if(7===e.tag||8===e.tag)return e.stateNode;a("33")}function W(e){return e[U]||null}function B(e){do{e=e.return}while(e&&7!==e.tag);return e||null}function z(e,t,n){(t=M(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=T(n._dispatchListeners,t),n._dispatchInstances=T(n._dispatchInstances,e))}function V(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=B(t);for(t=n.length;0<t--;)z(n[t],"captured",e);for(t=0;t<n.length;t++)z(n[t],"bubbled",e)}}function q(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=M(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=T(n._dispatchListeners,t),n._dispatchInstances=T(n._dispatchInstances,e))}function H(e){e&&e.dispatchConfig.registrationName&&q(e._targetInst,null,e)}function K(e){C(e,V)}var G=!("undefined"==typeof window||!window.document||!window.document.createElement);function $(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Y={animationend:$("Animation","AnimationEnd"),animationiteration:$("Animation","AnimationIteration"),animationstart:$("Animation","AnimationStart"),transitionend:$("Transition","TransitionEnd")},Q={},X={};function J(e){if(Q[e])return Q[e];if(!Y[e])return e;var t,n=Y[e];for(t in n)if(n.hasOwnProperty(t)&&t in X)return Q[e]=n[t];return e}G&&(X=document.createElement("div").style,"AnimationEvent"in window||(delete Y.animationend.animation,delete Y.animationiteration.animation,delete Y.animationstart.animation),"TransitionEvent"in window||delete Y.transitionend.transition);var Z=J("animationend"),ee=J("animationiteration"),te=J("animationstart"),ne=J("transitionend"),re="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ie=null,oe=null,ae=null;function se(){if(ae)return ae;var e,t,n=oe,r=n.length,i="value"in ie?ie.value:ie.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return ae=i.slice(e,1<t?1-t:void 0)}function le(){return!0}function ue(){return!1}function ce(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?le:ue,this.isPropagationStopped=ue,this}function de(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function pe(e){e instanceof this||a("279"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=de,e.release=pe}i(ce.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=le)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=le)},persist:function(){this.isPersistent=le},isPersistent:ue,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ue,this._dispatchInstances=this._dispatchListeners=null}}),ce.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ce.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ce);var he=ce.extend({data:null}),me=ce.extend({data:null}),ve=[9,13,27,32],ge=G&&"CompositionEvent"in window,ye=null;G&&"documentMode"in document&&(ye=document.documentMode);var be=G&&"TextEvent"in window&&!ye,we=G&&(!ge||ye&&8<ye&&11>=ye),_e=String.fromCharCode(32),Ee={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",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ke=!1;function Se(e,t){switch(e){case"keyup":return-1!==ve.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Te(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ce=!1;var xe={eventTypes:Ee,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(ge)e:{switch(e){case"compositionstart":i=Ee.compositionStart;break e;case"compositionend":i=Ee.compositionEnd;break e;case"compositionupdate":i=Ee.compositionUpdate;break e}i=void 0}else Ce?Se(e,n)&&(i=Ee.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=Ee.compositionStart);return i?(we&&"ko"!==n.locale&&(Ce||i!==Ee.compositionStart?i===Ee.compositionEnd&&Ce&&(o=se()):(oe="value"in(ie=r)?ie.value:ie.textContent,Ce=!0)),i=he.getPooled(i,t,n,r),o?i.data=o:null!==(o=Te(n))&&(i.data=o),K(i),o=i):o=null,(e=be?function(e,t){switch(e){case"compositionend":return Te(t);case"keypress":return 32!==t.which?null:(ke=!0,_e);case"textInput":return(e=t.data)===_e&&ke?null:e;default:return null}}(e,n):function(e,t){if(Ce)return"compositionend"===e||!ge&&Se(e,t)?(e=se(),ae=oe=ie=null,Ce=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return we&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=me.getPooled(Ee.beforeInput,t,n,r)).data=e,K(t)):t=null,null===o?t:null===t?o:[o,t]}},Pe=null,Ne=null,Oe=null;function De(e){if(e=E(e)){"function"!=typeof Pe&&a("280");var t=_(e.stateNode);Pe(e.stateNode,e.type,t)}}function Me(e){Ne?Oe?Oe.push(e):Oe=[e]:Ne=e}function Ae(){if(Ne){var e=Ne,t=Oe;if(Oe=Ne=null,De(e),t)for(e=0;e<t.length;e++)De(t[e])}}function Re(e,t){return e(t)}function Ie(e,t,n){return e(t,n)}function Ue(){}var Fe=!1;function Le(e,t){if(Fe)return e(t);Fe=!0;try{return Re(e,t)}finally{Fe=!1,(null!==Ne||null!==Oe)&&(Ue(),Ae())}}var je={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function We(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!je[e.type]:"textarea"===t}function Be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ze(e){if(!G)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}function Ve(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function qe(e){e._valueTracker||(e._valueTracker=function(e){var t=Ve(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function He(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ve(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var Ke=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ge=/^(.*)[\\\/]/,$e="function"==typeof Symbol&&Symbol.for,Ye=$e?Symbol.for("react.element"):60103,Qe=$e?Symbol.for("react.portal"):60106,Xe=$e?Symbol.for("react.fragment"):60107,Je=$e?Symbol.for("react.strict_mode"):60108,Ze=$e?Symbol.for("react.profiler"):60114,et=$e?Symbol.for("react.provider"):60109,tt=$e?Symbol.for("react.context"):60110,nt=$e?Symbol.for("react.async_mode"):60111,rt=$e?Symbol.for("react.forward_ref"):60112,it=$e?Symbol.for("react.placeholder"):60113,ot="function"==typeof Symbol&&Symbol.iterator;function at(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=ot&&e[ot]||e["@@iterator"])?e:null}function st(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case nt:return"AsyncMode";case Xe:return"Fragment";case Qe:return"Portal";case Ze:return"Profiler";case Je:return"StrictMode";case it:return"Placeholder"}if("object"==typeof e){switch(e.$$typeof){case tt:return"Context.Consumer";case et:return"Context.Provider";case rt:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef")}if("function"==typeof e.then&&(e=1===e._reactStatus?e._reactResult:null))return st(e)}return null}function lt(e){var t="";do{e:switch(e.tag){case 4:case 0:case 1:case 2:case 3:case 7:case 10:var n=e._debugOwner,r=e._debugSource,i=st(e.type),o=null;n&&(o=st(n.type)),n=i,i="",r?i=" (at "+r.fileName.replace(Ge,"")+":"+r.lineNumber+")":o&&(i=" (created by "+o+")"),o="\n in "+(n||"Unknown")+i;break e;default:o=""}t+=o,e=e.return}while(e);return t}var ut=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ct=Object.prototype.hasOwnProperty,dt={},pt={};function ft(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ht[e]=new ft(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ht[t]=new ft(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ht[e]=new ft(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ht[e]=new ft(e,2,!1,e,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(e){ht[e]=new ft(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ht[e]=new ft(e,3,!0,e,null)}),["capture","download"].forEach(function(e){ht[e]=new ft(e,4,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){ht[e]=new ft(e,6,!1,e,null)}),["rowSpan","start"].forEach(function(e){ht[e]=new ft(e,5,!1,e.toLowerCase(),null)});var mt=/[\-:]([a-z])/g;function vt(e){return e[1].toUpperCase()}function gt(e,t,n,r){var i=ht.hasOwnProperty(t)?ht[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||void 0===t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!ct.call(pt,e)||!ct.call(dt,e)&&(ut.test(e)?pt[e]=!0:(dt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function yt(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function bt(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function wt(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=yt(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function _t(e,t){null!=(t=t.checked)&&gt(e,"checked",t,!1)}function Et(e,t){_t(e,t);var n=yt(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?St(e,t.type,n):t.hasOwnProperty("defaultValue")&&St(e,t.type,yt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function kt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function St(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+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(e){var t=e.replace(mt,vt);ht[t]=new ft(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mt,vt);ht[t]=new ft(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mt,vt);ht[t]=new ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ht.tabIndex=new ft("tabIndex",1,!1,"tabindex",null);var Tt={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Ct(e,t,n){return(e=ce.getPooled(Tt.change,e,t,n)).type="change",Me(n),K(e),e}var xt=null,Pt=null;function Nt(e){A(e,!1)}function Ot(e){if(He(j(e)))return e}function Dt(e,t){if("change"===e)return t}var Mt=!1;function At(){xt&&(xt.detachEvent("onpropertychange",Rt),Pt=xt=null)}function Rt(e){"value"===e.propertyName&&Ot(Pt)&&Le(Nt,e=Ct(Pt,e,Be(e)))}function It(e,t,n){"focus"===e?(At(),Pt=n,(xt=t).attachEvent("onpropertychange",Rt)):"blur"===e&&At()}function Ut(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Ot(Pt)}function Ft(e,t){if("click"===e)return Ot(t)}function Lt(e,t){if("input"===e||"change"===e)return Ot(t)}G&&(Mt=ze("input")&&(!document.documentMode||9<document.documentMode));var jt={eventTypes:Tt,_isInputEventSupported:Mt,extractEvents:function(e,t,n,r){var i=t?j(t):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=Dt:We(i)?Mt?o=Lt:(o=Ut,a=It):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=Ft),o&&(o=o(e,t)))return Ct(o,n,r);a&&a(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&St(i,"number",i.value)}},Wt=ce.extend({view:null,detail:null}),Bt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Bt[e])&&!!t[e]}function Vt(){return zt}var qt=0,Ht=0,Kt=!1,Gt=!1,$t=Wt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Vt,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=qt;return qt=e.screenX,Kt?"mousemove"===e.type?e.screenX-t:0:(Kt=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ht;return Ht=e.screenY,Gt?"mousemove"===e.type?e.screenY-t:0:(Gt=!0,0)}}),Yt=$t.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Qt={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Xt={eventTypes:Qt,extractEvents:function(e,t,n,r){var i="mouseover"===e||"pointerover"===e,o="mouseout"===e||"pointerout"===e;if(i&&(n.relatedTarget||n.fromElement)||!o&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o?(o=t,t=(t=n.relatedTarget||n.toElement)?F(t):null):o=null,o===t)return null;var a=void 0,s=void 0,l=void 0,u=void 0;"mouseout"===e||"mouseover"===e?(a=$t,s=Qt.mouseLeave,l=Qt.mouseEnter,u="mouse"):"pointerout"!==e&&"pointerover"!==e||(a=Yt,s=Qt.pointerLeave,l=Qt.pointerEnter,u="pointer");var c=null==o?i:j(o);if(i=null==t?i:j(t),(e=a.getPooled(s,o,n,r)).type=u+"leave",e.target=c,e.relatedTarget=i,(n=a.getPooled(l,t,n,r)).type=u+"enter",n.target=i,n.relatedTarget=c,r=t,o&&r)e:{for(i=r,u=0,a=t=o;a;a=B(a))u++;for(a=0,l=i;l;l=B(l))a++;for(;0<u-a;)t=B(t),u--;for(;0<a-u;)i=B(i),a--;for(;u--;){if(t===i||t===i.alternate)break e;t=B(t),i=B(i)}t=null}else t=null;for(i=t,t=[];o&&o!==i&&(null===(u=o.alternate)||u!==i);)t.push(o),o=B(o);for(o=[];r&&r!==i&&(null===(u=r.alternate)||u!==i);)o.push(r),r=B(r);for(r=0;r<t.length;r++)q(t[r],"bubbled",e);for(r=o.length;0<r--;)q(o[r],"captured",n);return[e,n]}},Jt=Object.prototype.hasOwnProperty;function Zt(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function en(e,t){if(Zt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Jt.call(t,n[r])||!Zt(e[n[r]],t[n[r]]))return!1;return!0}function tn(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 5===t.tag?2:3}function nn(e){2!==tn(e)&&a("188")}function rn(e){if(!(e=function(e){var t=e.alternate;if(!t)return 3===(t=tn(e))&&a("188"),1===t?null:e;for(var n=e,r=t;;){var i=n.return,o=i?i.alternate:null;if(!i||!o)break;if(i.child===o.child){for(var s=i.child;s;){if(s===n)return nn(i),e;if(s===r)return nn(i),t;s=s.sibling}a("188")}if(n.return!==r.return)n=i,r=o;else{s=!1;for(var l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}s||a("189")}}n.alternate!==r&&a("190")}return 5!==n.tag&&a("188"),n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(7===t.tag||8===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var on=ce.extend({animationName:null,elapsedTime:null,pseudoElement:null}),an=ce.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sn=Wt.extend({relatedTarget:null});function ln(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var un={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},dn=Wt.extend({key:function(e){if(e.key){var t=un[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ln(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?cn[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Vt,charCode:function(e){return"keypress"===e.type?ln(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ln(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),pn=$t.extend({dataTransfer:null}),fn=Wt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Vt}),hn=ce.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),mn=$t.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),vn=[["abort","abort"],[Z,"animationEnd"],[ee,"animationIteration"],[te,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[ne,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],gn={},yn={};function bn(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},gn[e]=t,yn[n]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(e){bn(e,!0)}),vn.forEach(function(e){bn(e,!1)});var wn={eventTypes:gn,isInteractiveTopLevelEventType:function(e){return void 0!==(e=yn[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=yn[e];if(!i)return null;switch(e){case"keypress":if(0===ln(n))return null;case"keydown":case"keyup":e=dn;break;case"blur":case"focus":e=sn;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=$t;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=pn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=fn;break;case Z:case ee:case te:e=on;break;case ne:e=hn;break;case"scroll":e=Wt;break;case"wheel":e=mn;break;case"copy":case"cut":case"paste":e=an;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Yt;break;default:e=ce}return K(t=e.getPooled(i,t,n,r)),t}},_n=wn.isInteractiveTopLevelEventType,En=[];function kn(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r;for(r=n;r.return;)r=r.return;if(!(r=5!==r.tag?null:r.stateNode.containerInfo))break;e.ancestors.push(n),n=F(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=Be(e.nativeEvent);r=e.topLevelType;for(var o=e.nativeEvent,a=null,s=0;s<g.length;s++){var l=g[s];l&&(l=l.extractEvents(r,t,o,i))&&(a=T(a,l))}A(a,!1)}}var Sn=!0;function Tn(e,t){if(!t)return null;var n=(_n(e)?xn:Pn).bind(null,e);t.addEventListener(e,n,!1)}function Cn(e,t){if(!t)return null;var n=(_n(e)?xn:Pn).bind(null,e);t.addEventListener(e,n,!0)}function xn(e,t){Ie(Pn,e,t)}function Pn(e,t){if(Sn){var n=Be(t);if(null===(n=F(n))||"number"!=typeof n.tag||2===tn(n)||(n=null),En.length){var r=En.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Le(kn,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>En.length&&En.push(e)}}}var Nn={},On=0,Dn="_reactListenersID"+(""+Math.random()).slice(2);function Mn(e){return Object.prototype.hasOwnProperty.call(e,Dn)||(e[Dn]=On++,Nn[e[Dn]]={}),Nn[e[Dn]]}function An(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Rn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function In(e,t){var n,r=Rn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Rn(r)}}function Un(){for(var e=window,t=An();t instanceof e.HTMLIFrameElement;){try{e=t.contentDocument.defaultView}catch(e){break}t=An(e.document)}return t}function Fn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Ln=G&&"documentMode"in document&&11>=document.documentMode,jn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wn=null,Bn=null,zn=null,Vn=!1;function qn(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Vn||null==Wn||Wn!==An(n)?null:("selectionStart"in(n=Wn)&&Fn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},zn&&en(zn,n)?null:(zn=n,(e=ce.getPooled(jn.select,Bn,e,t)).type="select",e.target=Wn,K(e),e))}var Hn={eventTypes:jn,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Mn(o),i=w.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break e}}o=!0}i=!o}if(i)return null;switch(o=t?j(t):window,e){case"focus":(We(o)||"true"===o.contentEditable)&&(Wn=o,Bn=t,zn=null);break;case"blur":zn=Bn=Wn=null;break;case"mousedown":Vn=!0;break;case"contextmenu":case"mouseup":case"dragend":return Vn=!1,qn(n,r);case"selectionchange":if(Ln)break;case"keydown":case"keyup":return qn(n,r)}return null}};function Kn(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(t.children))&&(e.children=t),e}function Gn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+yt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function $n(e,t){return null!=t.dangerouslySetInnerHTML&&a("91"),i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yn(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&a("92"),Array.isArray(t)&&(1>=t.length||a("93"),t=t[0]),n=t),null==n&&(n="")),e._wrapperState={initialValue:yt(n)}}function Qn(e,t){var n=yt(t.value),r=yt(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Xn(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}D.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_=W,E=L,k=j,D.injectEventPluginsByName({SimpleEventPlugin:wn,EnterLeaveEventPlugin:Xt,ChangeEventPlugin:jt,SelectEventPlugin:Hn,BeforeInputEventPlugin:xe});var Jn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Zn(e){switch(e){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 er(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Zn(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var tr,nr=void 0,rr=(tr=function(e,t){if(e.namespaceURI!==Jn.svg||"innerHTML"in e)e.innerHTML=t;else{for((nr=nr||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=nr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return tr(e,t)})}:tr);function ir(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var or={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,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ar=["Webkit","ms","Moz","O"];function sr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=t[n];i=null==o||"boolean"==typeof o||""===o?"":r||"number"!=typeof o||0===o||or.hasOwnProperty(i)&&or[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(or).forEach(function(e){ar.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),or[t]=or[e]})});var lr=i({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});function ur(e,t){t&&(lr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&a("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&a("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||a("61")),null!=t.style&&"object"!=typeof t.style&&a("62",""))}function cr(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){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}}function dr(e,t){var n=Mn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=w[t];for(var r=0;r<t.length;r++){var i=t[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":Cn("scroll",e);break;case"focus":case"blur":Cn("focus",e),Cn("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":ze(i)&&Cn(i,e);break;case"invalid":case"submit":case"reset":break;default:-1===re.indexOf(i)&&Tn(i,e)}n[i]=!0}}}function pr(){}var fr=null,hr=null;function mr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function vr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}function gr(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function yr(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}new Set;var br=[],wr=-1;function _r(e){0>wr||(e.current=br[wr],br[wr]=null,wr--)}function Er(e,t){br[++wr]=e.current,e.current=t}var kr={},Sr={current:kr},Tr={current:!1},Cr=kr;function xr(e,t){var n=e.type.contextTypes;if(!n)return kr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Pr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Nr(e){_r(Tr),_r(Sr)}function Or(e){_r(Tr),_r(Sr)}function Dr(e,t,n){Sr.current!==kr&&a("168"),Er(Sr,t),Er(Tr,n)}function Mr(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())o in e||a("108",st(t)||"Unknown",o);return i({},n,r)}function Ar(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||kr,Cr=Sr.current,Er(Sr,t),Er(Tr,Tr.current),!0}function Rr(e,t,n){var r=e.stateNode;r||a("169"),n?(t=Mr(e,t,Cr),r.__reactInternalMemoizedMergedChildContext=t,_r(Tr),_r(Sr),Er(Sr,t)):_r(Tr),Er(Tr,n)}var Ir=null,Ur=null;function Fr(e){return function(t){try{return e(t)}catch(e){}}}function Lr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.firstContextDependency=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function jr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Wr(e,t,n){var r=e.alternate;return null===r?((r=new Lr(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childExpirationTime=e.childExpirationTime,r.expirationTime=t!==e.pendingProps?n:e.expirationTime,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.firstContextDependency=e.firstContextDependency,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Br(e,t,n){var r=e.type,i=e.key;e=e.props;var o=void 0;if("function"==typeof r)o=jr(r)?2:4;else if("string"==typeof r)o=7;else e:switch(r){case Xe:return zr(e.children,t,n,i);case nt:o=10,t|=3;break;case Je:o=10,t|=2;break;case Ze:return(r=new Lr(15,e,i,4|t)).type=Ze,r.expirationTime=n,r;case it:o=16;break;default:if("object"==typeof r&&null!==r)switch(r.$$typeof){case et:o=12;break e;case tt:o=11;break e;case rt:o=13;break e;default:if("function"==typeof r.then){o=4;break e}}a("130",null==r?r:typeof r,"")}return(t=new Lr(o,e,i,t)).type=r,t.expirationTime=n,t}function zr(e,t,n,r){return(e=new Lr(9,e,r,t)).expirationTime=n,e}function Vr(e,t,n){return(e=new Lr(8,e,null,t)).expirationTime=n,e}function qr(e,t,n){return(t=new Lr(6,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hr(e,t){e.didError=!1;var n=e.earliestPendingTime;0===n?e.earliestPendingTime=e.latestPendingTime=t:n>t?e.earliestPendingTime=t:e.latestPendingTime<t&&(e.latestPendingTime=t),Kr(t,e)}function Kr(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,i=t.earliestPendingTime,o=t.latestPingedTime;0===(i=0!==i?i:o)&&(0===e||r>e)&&(i=r),0!==(e=i)&&0!==n&&n<e&&(e=n),t.nextExpirationTimeToWorkOn=i,t.expirationTime=e}var Gr=!1;function $r(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Yr(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Qr(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Xr(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Jr(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=$r(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=$r(e.memoizedState),i=n.updateQueue=$r(n.memoizedState)):r=e.updateQueue=Yr(i):null===i&&(i=n.updateQueue=Yr(r));null===i||r===i?Xr(r,t):null===r.lastUpdate||null===i.lastUpdate?(Xr(r,t),Xr(i,t)):(Xr(r,t),i.lastUpdate=t)}function Zr(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=$r(e.memoizedState):ei(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function ei(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Yr(t)),t}function ti(e,t,n,r,o,a){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(a,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null===(o="function"==typeof(e=n.payload)?e.call(a,r,o):e)||void 0===o)break;return i({},r,o);case 2:Gr=!0}return r}function ni(e,t,n,r,i){Gr=!1;for(var o=(t=ei(e,t)).baseState,a=null,s=0,l=t.firstUpdate,u=o;null!==l;){var c=l.expirationTime;c>i?(null===a&&(a=l,o=u),(0===s||s>c)&&(s=c)):(u=ti(e,0,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(c=null,l=t.firstCapturedUpdate;null!==l;){var d=l.expirationTime;d>i?(null===c&&(c=l,null===a&&(o=u)),(0===s||s>d)&&(s=d)):(u=ti(e,0,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=u),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,e.expirationTime=s,e.memoizedState=u}function ri(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),ii(t.firstEffect,n),t.firstEffect=t.lastEffect=null,ii(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function ii(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;"function"!=typeof n&&a("191",n),n.call(r)}e=e.nextEffect}}function oi(e,t){return{value:e,source:t,stack:lt(t)}}var ai={current:null},si=null,li=null,ui=null;function ci(e,t){var n=e.type._context;Er(ai,n._currentValue),n._currentValue=t}function di(e){var t=ai.current;_r(ai),e.type._context._currentValue=t}function pi(e){si=e,ui=li=null,e.firstContextDependency=null}function fi(e,t){return ui!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(ui=e,t=1073741823),t={context:e,observedBits:t,next:null},null===li?(null===si&&a("277"),si.firstContextDependency=li=t):li=li.next=t),e._currentValue}var hi={},mi={current:hi},vi={current:hi},gi={current:hi};function yi(e){return e===hi&&a("174"),e}function bi(e,t){Er(gi,t),Er(vi,e),Er(mi,hi);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:er(null,"");break;default:t=er(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}_r(mi),Er(mi,t)}function wi(e){_r(mi),_r(vi),_r(gi)}function _i(e){yi(gi.current);var t=yi(mi.current),n=er(t,e.type);t!==n&&(Er(vi,e),Er(mi,n))}function Ei(e){vi.current===e&&(_r(mi),_r(vi))}var ki=(new r.Component).refs;function Si(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var Ti={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===tn(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=sa(),i=Qr(r=Ao(r,e));i.payload=t,void 0!==n&&null!==n&&(i.callback=n),Jr(e,i),Ro(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=sa(),i=Qr(r=Ao(r,e));i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),Jr(e,i),Ro(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=sa(),r=Qr(n=Ao(n,e));r.tag=2,void 0!==t&&null!==t&&(r.callback=t),Jr(e,r),Ro(e,n)}};function Ci(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!en(n,r)||!en(i,o))}function xi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ti.enqueueReplaceState(t,t.state,null)}function Pi(e,t,n,r){var i=e.stateNode,o=Pr(t)?Cr:Sr.current;i.props=n,i.state=e.memoizedState,i.refs=ki,i.context=xr(e,o),null!==(o=e.updateQueue)&&(ni(e,o,n,i,r),i.state=e.memoizedState),"function"==typeof(o=t.getDerivedStateFromProps)&&(Si(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Ti.enqueueReplaceState(i,i.state,null),null!==(o=e.updateQueue)&&(ni(e,o,n,i,r),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var Ni=Array.isArray;function Oi(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&3!==n.tag&&a("110"),r=n.stateNode),r||a("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ki&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&a("284"),n._owner||a("254",e)}return e}function Di(e,t){"textarea"!==e.type&&a("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function Mi(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=Wr(e,t,n)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,r){return null===t||8!==t.tag?((t=Vr(n,e.mode,r)).return=e,t):((t=i(t,n,r)).return=e,t)}function u(e,t,n,r){return null!==t&&t.type===n.type?((r=i(t,n.props,r)).ref=Oi(e,t,n),r.return=e,r):((r=Br(n,e.mode,r)).ref=Oi(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||6!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=qr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[],r)).return=e,t)}function d(e,t,n,r,o){return null===t||9!==t.tag?((t=zr(n,e.mode,r,o)).return=e,t):((t=i(t,n,r)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Vr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Ye:return(n=Br(t,e.mode,n)).ref=Oi(e,null,t),n.return=e,n;case Qe:return(t=qr(t,e.mode,n)).return=e,t}if(Ni(t)||at(t))return(t=zr(t,e.mode,n,null)).return=e,t;Di(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ye:return n.key===i?n.type===Xe?d(e,t,n.props.children,r,i):u(e,t,n,r):null;case Qe:return n.key===i?c(e,t,n,r):null}if(Ni(n)||at(n))return null!==i?null:d(e,t,n,r,null);Di(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Ye:return e=e.get(null===r.key?n:r.key)||null,r.type===Xe?d(t,e,r.props.children,i,r.key):u(t,e,r,i);case Qe:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Ni(r)||at(r))return d(t,e=e.get(n)||null,r,i,null);Di(t,r)}return null}function m(i,a,s,l){for(var u=null,c=null,d=a,m=a=0,v=null;null!==d&&m<s.length;m++){d.index>m?(v=d,d=null):v=d.sibling;var g=f(i,d,s[m],l);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(i,d),a=o(g,a,m),null===c?u=g:c.sibling=g,c=g,d=v}if(m===s.length)return n(i,d),u;if(null===d){for(;m<s.length;m++)(d=p(i,s[m],l))&&(a=o(d,a,m),null===c?u=d:c.sibling=d,c=d);return u}for(d=r(i,d);m<s.length;m++)(v=h(d,i,m,s[m],l))&&(e&&null!==v.alternate&&d.delete(null===v.key?m:v.key),a=o(v,a,m),null===c?u=v:c.sibling=v,c=v);return e&&d.forEach(function(e){return t(i,e)}),u}function v(i,s,l,u){var c=at(l);"function"!=typeof c&&a("150"),null==(l=c.call(l))&&a("151");for(var d=c=null,m=s,v=s=0,g=null,y=l.next();null!==m&&!y.done;v++,y=l.next()){m.index>v?(g=m,m=null):g=m.sibling;var b=f(i,m,y.value,u);if(null===b){m||(m=g);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,v),null===d?c=b:d.sibling=b,d=b,m=g}if(y.done)return n(i,m),c;if(null===m){for(;!y.done;v++,y=l.next())null!==(y=p(i,y.value,u))&&(s=o(y,s,v),null===d?c=y:d.sibling=y,d=y);return c}for(m=r(i,m);!y.done;v++,y=l.next())null!==(y=h(m,i,v,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),s=o(y,s,v),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(i,e)}),c}return function(e,r,o,l){var u="object"==typeof o&&null!==o&&o.type===Xe&&null===o.key;u&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case Ye:e:{for(c=o.key,u=r;null!==u;){if(u.key===c){if(9===u.tag?o.type===Xe:u.type===o.type){n(e,u.sibling),(r=i(u,o.type===Xe?o.props.children:o.props,l)).ref=Oi(e,u,o),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}o.type===Xe?((r=zr(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Br(o,e.mode,l)).ref=Oi(e,r,o),l.return=e,e=l)}return s(e);case Qe:e:{for(u=o.key;null!==r;){if(r.key===u){if(6===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=qr(o,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&8===r.tag?(n(e,r.sibling),(r=i(r,o,l)).return=e,e=r):(n(e,r),(r=Vr(o,e.mode,l)).return=e,e=r),s(e);if(Ni(o))return m(e,r,o,l);if(at(o))return v(e,r,o,l);if(c&&Di(e,o),void 0===o&&!u)switch(e.tag){case 2:case 3:case 0:a("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var Ai=Mi(!0),Ri=Mi(!1),Ii=null,Ui=null,Fi=!1;function Li(e,t){var n=new Lr(7,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ji(e,t){switch(e.tag){case 7:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 8:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wi(e){if(Fi){var t=Ui;if(t){var n=t;if(!ji(e,t)){if(!(t=gr(n))||!ji(e,t))return e.effectTag|=2,Fi=!1,void(Ii=e);Li(Ii,n)}Ii=e,Ui=yr(t)}else e.effectTag|=2,Fi=!1,Ii=e}}function Bi(e){for(e=e.return;null!==e&&7!==e.tag&&5!==e.tag;)e=e.return;Ii=e}function zi(e){if(e!==Ii)return!1;if(!Fi)return Bi(e),Fi=!0,!1;var t=e.type;if(7!==e.tag||"head"!==t&&"body"!==t&&!vr(t,e.memoizedProps))for(t=Ui;t;)Li(e,t),t=gr(t);return Bi(e),Ui=Ii?gr(e.stateNode):null,!0}function Vi(){Ui=Ii=null,Fi=!1}var qi=Ke.ReactCurrentOwner;function Hi(e,t,n,r){t.child=null===e?Ri(t,null,n,r):Ai(t,e.child,n,r)}function Ki(e,t,n,r,i){n=n.render;var o=t.ref;return Tr.current||t.memoizedProps!==r||o!==(null!==e?e.ref:null)?(Hi(e,t,n=n(r,o),i),t.memoizedProps=r,t.child):Zi(e,t,i)}function Gi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function $i(e,t,n,r,i){var o=Pr(n)?Cr:Sr.current;return o=xr(t,o),pi(t),n=n(r,o),t.effectTag|=1,Hi(e,t,n,i),t.memoizedProps=r,t.child}function Yi(e,t,n,r,i){if(Pr(n)){var o=!0;Ar(t)}else o=!1;if(pi(t),null===e)if(null===t.stateNode){var a=Pr(n)?Cr:Sr.current,s=n.contextTypes,l=null!==s&&void 0!==s,u=new n(r,s=l?xr(t,a):kr);t.memoizedState=null!==u.state&&void 0!==u.state?u.state:null,u.updater=Ti,t.stateNode=u,u._reactInternalFiber=t,l&&((l=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,l.__reactInternalMemoizedMaskedChildContext=s),Pi(t,n,r,i),r=!0}else{a=t.stateNode,s=t.memoizedProps,a.props=s;var c=a.context;l=xr(t,l=Pr(n)?Cr:Sr.current);var d=n.getDerivedStateFromProps;(u="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==l)&&xi(t,a,r,l),Gr=!1;var p=t.memoizedState;c=a.state=p;var f=t.updateQueue;null!==f&&(ni(t,f,r,a,i),c=t.memoizedState),s!==r||p!==c||Tr.current||Gr?("function"==typeof d&&(Si(t,n,d,r),c=t.memoizedState),(s=Gr||Ci(t,n,s,r,p,c,l))?(u||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=l,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,s=t.memoizedProps,a.props=s,c=a.context,l=xr(t,l=Pr(n)?Cr:Sr.current),(u="function"==typeof(d=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==l)&&xi(t,a,r,l),Gr=!1,c=t.memoizedState,p=a.state=c,null!==(f=t.updateQueue)&&(ni(t,f,r,a,i),p=t.memoizedState),s!==r||c!==p||Tr.current||Gr?("function"==typeof d&&(Si(t,n,d,r),p=t.memoizedState),(d=Gr||Ci(t,n,s,r,c,p,l))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=d):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Qi(e,t,n,r,o,i)}function Qi(e,t,n,r,i,o){Gi(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&Rr(t,n,!1),Zi(e,t,o);r=t.stateNode,qi.current=t;var s=a?null:r.render();return t.effectTag|=1,null!==e&&a&&(Hi(e,t,null,o),t.child=null),Hi(e,t,s,o),t.memoizedState=r.state,t.memoizedProps=r.props,i&&Rr(t,n,!0),t.child}function Xi(e){var t=e.stateNode;t.pendingContext?Dr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Dr(0,t.context,!1),bi(e,t.containerInfo)}function Ji(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}function Zi(e,t,n){null!==e&&(t.firstContextDependency=e.firstContextDependency);var r=t.childExpirationTime;if(0===r||r>n)return null;if(null!==e&&t.child!==e.child&&a("153"),null!==t.child){for(n=Wr(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Wr(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function eo(e,t,n){var r=t.expirationTime;if(!Tr.current&&(0===r||r>n)){switch(t.tag){case 5:Xi(t),Vi();break;case 7:_i(t);break;case 2:Pr(t.type)&&Ar(t);break;case 3:Pr(t.type._reactResult)&&Ar(t);break;case 6:bi(t,t.stateNode.containerInfo);break;case 12:ci(t,t.memoizedProps.value)}return Zi(e,t,n)}switch(t.expirationTime=0,t.tag){case 4:return function(e,t,n,r){null!==e&&a("155");var i=t.pendingProps;if("object"==typeof n&&null!==n&&"function"==typeof n.then){var o=n=function(e){switch(e._reactStatus){case 1:return e._reactResult;case 2:throw e._reactResult;case 0:throw e;default:throw e._reactStatus=0,e.then(function(t){if(0===e._reactStatus){if(e._reactStatus=1,"object"==typeof t&&null!==t){var n=t.default;t=void 0!==n&&null!==n?n:t}e._reactResult=t}},function(t){0===e._reactStatus&&(e._reactStatus=2,e._reactResult=t)}),e}}(n);o="function"==typeof o?jr(o)?3:1:void 0!==o&&null!==o&&o.$$typeof?14:4,o=t.tag=o;var s=Ji(n,i);switch(o){case 1:return $i(e,t,n,s,r);case 3:return Yi(e,t,n,s,r);case 14:return Ki(e,t,n,s,r);default:a("283",n)}}if(o=xr(t,Sr.current),pi(t),o=n(i,o),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){t.tag=2,Pr(n)?(s=!0,Ar(t)):s=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null;var l=n.getDerivedStateFromProps;return"function"==typeof l&&Si(t,n,l,i),o.updater=Ti,t.stateNode=o,o._reactInternalFiber=t,Pi(t,n,i,r),Qi(e,t,n,!0,s,r)}return t.tag=0,Hi(e,t,o,r),t.memoizedProps=i,t.child}(e,t,t.type,n);case 0:return $i(e,t,t.type,t.pendingProps,n);case 1:var i=t.type._reactResult;return e=$i(e,t,i,Ji(i,r=t.pendingProps),n),t.memoizedProps=r,e;case 2:return Yi(e,t,t.type,t.pendingProps,n);case 3:return e=Yi(e,t,i=t.type._reactResult,Ji(i,r=t.pendingProps),n),t.memoizedProps=r,e;case 5:return Xi(t),null===(r=t.updateQueue)&&a("282"),i=null!==(i=t.memoizedState)?i.element:null,ni(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i?(Vi(),t=Zi(e,t,n)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(Ui=yr(t.stateNode.containerInfo),Ii=t,i=Fi=!0),i?(t.effectTag|=2,t.child=Ri(t,null,r,n)):(Hi(e,t,r,n),Vi()),t=t.child),t;case 7:_i(t),null===e&&Wi(t),r=t.type,i=t.pendingProps;var o=null!==e?e.memoizedProps:null,s=i.children;return vr(r,i)?s=null:null!==o&&vr(r,o)&&(t.effectTag|=16),Gi(e,t),1073741823!==n&&1&t.mode&&i.hidden?(t.expirationTime=1073741823,t.memoizedProps=i,t=null):(Hi(e,t,s,n),t.memoizedProps=i,t=t.child),t;case 8:return null===e&&Wi(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 6:return bi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ai(t,null,r,n):Hi(e,t,r,n),t.memoizedProps=r,t.child;case 13:return Ki(e,t,t.type,t.pendingProps,n);case 14:return e=Ki(e,t,i=t.type._reactResult,Ji(i,r=t.pendingProps),n),t.memoizedProps=r,e;case 9:return Hi(e,t,r=t.pendingProps,n),t.memoizedProps=r,t.child;case 10:return Hi(e,t,r=t.pendingProps.children,n),t.memoizedProps=r,t.child;case 15:return Hi(e,t,(r=t.pendingProps).children,n),t.memoizedProps=r,t.child;case 12:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,t.memoizedProps=i,ci(t,o),null!==s){var l=s.value;if(0===(o=l===o&&(0!==l||1/l==1/o)||l!=l&&o!=o?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!Tr.current){t=Zi(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){if(null!==(l=s.firstContextDependency))do{if(l.context===r&&0!=(l.observedBits&o)){if(2===s.tag||3===s.tag){var u=Qr(n);u.tag=2,Jr(s,u)}(0===s.expirationTime||s.expirationTime>n)&&(s.expirationTime=n),null!==(u=s.alternate)&&(0===u.expirationTime||u.expirationTime>n)&&(u.expirationTime=n);for(var c=s.return;null!==c;){if(u=c.alternate,0===c.childExpirationTime||c.childExpirationTime>n)c.childExpirationTime=n,null!==u&&(0===u.childExpirationTime||u.childExpirationTime>n)&&(u.childExpirationTime=n);else{if(null===u||!(0===u.childExpirationTime||u.childExpirationTime>n))break;u.childExpirationTime=n}c=c.return}}u=s.child,l=l.next}while(null!==l);else u=12===s.tag&&s.type===t.type?null:s.child;if(null!==u)u.return=s;else for(u=s;null!==u;){if(u===t){u=null;break}if(null!==(s=u.sibling)){s.return=u.return,u=s;break}u=u.return}s=u}}Hi(e,t,i.children,n),t=t.child}return t;case 11:return o=t.type,i=(r=t.pendingProps).children,pi(t),i=i(o=fi(o,r.unstable_observedBits)),t.effectTag|=1,Hi(e,t,i,n),t.memoizedProps=r,t.child;default:a("156")}}function to(e){e.effectTag|=4}var no=void 0,ro=void 0,io=void 0;function oo(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=lt(n)),null!==n&&st(n.type),t=t.value,null!==e&&2===e.tag&&st(e.type);try{console.error(t)}catch(e){setTimeout(function(){throw e})}}function ao(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Mo(e,t)}else t.current=null}function so(e){switch("function"==typeof Ur&&Ur(e),e.tag){case 2:case 3:ao(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Mo(e,t)}break;case 7:ao(e);break;case 6:co(e)}}function lo(e){return 7===e.tag||5===e.tag||6===e.tag}function uo(e){e:{for(var t=e.return;null!==t;){if(lo(t)){var n=t;break e}t=t.return}a("160"),n=void 0}var r=t=void 0;switch(n.tag){case 7:t=n.stateNode,r=!1;break;case 5:case 6:t=n.stateNode.containerInfo,r=!0;break;default:a("161")}16&n.effectTag&&(ir(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||lo(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;7!==n.tag&&8!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||6===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(7===i.tag||8===i.tag)if(n)if(r){var o=t,s=i.stateNode,l=n;8===o.nodeType?o.parentNode.insertBefore(s,l):o.insertBefore(s,l)}else t.insertBefore(i.stateNode,n);else r?(o=t,s=i.stateNode,8===o.nodeType?(l=o.parentNode).insertBefore(s,o):(l=o).appendChild(s),null===l.onclick&&(l.onclick=pr)):t.appendChild(i.stateNode);else if(6!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function co(e){for(var t=e,n=!1,r=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&a("160"),n.tag){case 7:r=n.stateNode,i=!1;break e;case 5:case 6:r=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(7===t.tag||8===t.tag){e:for(var o=t,s=o;;)if(so(s),null!==s.child&&6!==s.tag)s.child.return=s,s=s.child;else{if(s===o)break;for(;null===s.sibling;){if(null===s.return||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}i?(o=r,s=t.stateNode,8===o.nodeType?o.parentNode.removeChild(s):o.removeChild(s)):r.removeChild(t.stateNode)}else if(6===t.tag?(r=t.stateNode.containerInfo,i=!0):so(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;6===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function po(e,t){switch(t.tag){case 2:case 3:break;case 7:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[U]=r,"input"===e&&"radio"===r.type&&null!=r.name&&_t(n,r),cr(e,i),t=cr(e,r),i=0;i<o.length;i+=2){var s=o[i],l=o[i+1];"style"===s?sr(n,l):"dangerouslySetInnerHTML"===s?rr(n,l):"children"===s?ir(n,l):gt(n,s,l,t)}switch(e){case"input":Et(n,r);break;case"textarea":Qn(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?Gn(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?Gn(n,!!r.multiple,r.defaultValue,!0):Gn(n,!!r.multiple,r.multiple?[]:"",!1))}}}break;case 8:null===t.stateNode&&a("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 5:case 15:case 16:break;default:a("163")}}function fo(e,t,n){(n=Qr(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ha(r),oo(e,t)},n}function ho(e,t,n){(n=Qr(n)).tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===xo?xo=new Set([this]):xo.add(this);var n=t.value,r=t.stack;oo(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function mo(e){switch(e.tag){case 2:Pr(e.type)&&Nr();var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return Pr(e.type._reactResult)&&Nr(),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return wi(),Or(),0!=(64&(t=e.effectTag))&&a("285"),e.effectTag=-1025&t|64,e;case 7:return Ei(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 6:return wi(),null;case 12:return di(e),null;default:return null}}no=function(){},ro=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s=t.stateNode;switch(yi(mi.current),e=null,n){case"input":a=bt(s,a),r=bt(s,r),e=[];break;case"option":a=Kn(s,a),r=Kn(s,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=$n(s,a),r=$n(s,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(s.onclick=pr)}ur(n,r),s=n=void 0;var l=null;for(n in a)if(!r.hasOwnProperty(n)&&a.hasOwnProperty(n)&&null!=a[n])if("style"===n){var u=a[n];for(s in u)u.hasOwnProperty(s)&&(l||(l={}),l[s]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(b.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var c=r[n];if(u=null!=a?a[n]:void 0,r.hasOwnProperty(n)&&c!==u&&(null!=c||null!=u))if("style"===n)if(u){for(s in u)!u.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(l||(l={}),l[s]="");for(s in c)c.hasOwnProperty(s)&&u[s]!==c[s]&&(l||(l={}),l[s]=c[s])}else l||(e||(e=[]),e.push(n,l)),l=c;else"dangerouslySetInnerHTML"===n?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(e=e||[]).push(n,""+c)):"children"===n?u===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(n,""+c):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(b.hasOwnProperty(n)?(null!=c&&dr(o,n),e||u===c||(e=[])):(e=e||[]).push(n,c))}l&&(e=e||[]).push("style",l),o=e,(t.updateQueue=o)&&to(t)}},io=function(e,t,n,r){n!==r&&to(t)};var vo={readContext:fi},go=Ke.ReactCurrentOwner,yo=0,bo=0,wo=!1,_o=null,Eo=null,ko=0,So=!1,To=null,Co=!1,xo=null;function Po(){if(null!==_o)for(var e=_o.return;null!==e;){var t=e;switch(t.tag){case 2:var n=t.type.childContextTypes;null!==n&&void 0!==n&&Nr();break;case 3:null!==(n=t.type._reactResult.childContextTypes)&&void 0!==n&&Nr();break;case 5:wi(),Or();break;case 7:Ei(t);break;case 6:wi();break;case 12:di(t)}e=e.return}Eo=null,ko=0,So=!1,_o=null}function No(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){var o=t,s=(t=e).pendingProps;switch(t.tag){case 0:case 1:break;case 2:Pr(t.type)&&Nr();break;case 3:Pr(t.type._reactResult)&&Nr();break;case 5:wi(),Or(),(s=t.stateNode).pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),null!==o&&null!==o.child||(zi(t),t.effectTag&=-3),no(t);break;case 7:Ei(t);var l=yi(gi.current),u=t.type;if(null!==o&&null!=t.stateNode)ro(o,t,u,s,l),o.ref!==t.ref&&(t.effectTag|=128);else if(s){var c=yi(mi.current);if(zi(t)){o=(s=t).stateNode;var d=s.type,p=s.memoizedProps,f=l;switch(o[I]=s,o[U]=p,u=void 0,l=d){case"iframe":case"object":Tn("load",o);break;case"video":case"audio":for(d=0;d<re.length;d++)Tn(re[d],o);break;case"source":Tn("error",o);break;case"img":case"image":case"link":Tn("error",o),Tn("load",o);break;case"form":Tn("reset",o),Tn("submit",o);break;case"details":Tn("toggle",o);break;case"input":wt(o,p),Tn("invalid",o),dr(f,"onChange");break;case"select":o._wrapperState={wasMultiple:!!p.multiple},Tn("invalid",o),dr(f,"onChange");break;case"textarea":Yn(o,p),Tn("invalid",o),dr(f,"onChange")}for(u in ur(l,p),d=null,p)p.hasOwnProperty(u)&&(c=p[u],"children"===u?"string"==typeof c?o.textContent!==c&&(d=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(d=["children",""+c]):b.hasOwnProperty(u)&&null!=c&&dr(f,u));switch(l){case"input":qe(o),kt(o,p,!0);break;case"textarea":qe(o),Xn(o);break;case"select":case"option":break;default:"function"==typeof p.onClick&&(o.onclick=pr)}u=d,s.updateQueue=u,(s=null!==u)&&to(t)}else{p=t,o=u,f=s,d=9===l.nodeType?l:l.ownerDocument,c===Jn.html&&(c=Zn(o)),c===Jn.html?"script"===o?((o=d.createElement("div")).innerHTML="<script><\/script>",d=o.removeChild(o.firstChild)):"string"==typeof f.is?d=d.createElement(o,{is:f.is}):(d=d.createElement(o),"select"===o&&f.multiple&&(d.multiple=!0)):d=d.createElementNS(c,o),(o=d)[I]=p,o[U]=s;e:for(p=o,f=t,d=f.child;null!==d;){if(7===d.tag||8===d.tag)p.appendChild(d.stateNode);else if(6!==d.tag&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===f)break;for(;null===d.sibling;){if(null===d.return||d.return===f)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}f=o;var h=l,m=cr(d=u,p=s);switch(d){case"iframe":case"object":Tn("load",f),l=p;break;case"video":case"audio":for(l=0;l<re.length;l++)Tn(re[l],f);l=p;break;case"source":Tn("error",f),l=p;break;case"img":case"image":case"link":Tn("error",f),Tn("load",f),l=p;break;case"form":Tn("reset",f),Tn("submit",f),l=p;break;case"details":Tn("toggle",f),l=p;break;case"input":wt(f,p),l=bt(f,p),Tn("invalid",f),dr(h,"onChange");break;case"option":l=Kn(f,p);break;case"select":f._wrapperState={wasMultiple:!!p.multiple},l=i({},p,{value:void 0}),Tn("invalid",f),dr(h,"onChange");break;case"textarea":Yn(f,p),l=$n(f,p),Tn("invalid",f),dr(h,"onChange");break;default:l=p}ur(d,l),c=void 0;var v=d,g=f,y=l;for(c in y)if(y.hasOwnProperty(c)){var w=y[c];"style"===c?sr(g,w):"dangerouslySetInnerHTML"===c?null!=(w=w?w.__html:void 0)&&rr(g,w):"children"===c?"string"==typeof w?("textarea"!==v||""!==w)&&ir(g,w):"number"==typeof w&&ir(g,""+w):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(b.hasOwnProperty(c)?null!=w&&dr(h,c):null!=w&&gt(g,c,w,m))}switch(d){case"input":qe(f),kt(f,p,!1);break;case"textarea":qe(f),Xn(f);break;case"option":null!=p.value&&f.setAttribute("value",""+yt(p.value));break;case"select":(l=f).multiple=!!p.multiple,null!=(f=p.value)?Gn(l,!!p.multiple,f,!1):null!=p.defaultValue&&Gn(l,!!p.multiple,p.defaultValue,!0);break;default:"function"==typeof l.onClick&&(f.onclick=pr)}(s=mr(u,s))&&to(t),t.stateNode=o}null!==t.ref&&(t.effectTag|=128)}else null===t.stateNode&&a("166");break;case 8:o&&null!=t.stateNode?io(o,t,o.memoizedProps,s):("string"!=typeof s&&(null===t.stateNode&&a("166")),o=yi(gi.current),yi(mi.current),zi(t)?(u=(s=t).stateNode,o=s.memoizedProps,u[I]=s,(s=u.nodeValue!==o)&&to(t)):(u=t,(s=(9===o.nodeType?o:o.ownerDocument).createTextNode(s))[I]=u,t.stateNode=s));break;case 13:case 14:case 16:case 9:case 10:case 15:break;case 6:wi(),no(t);break;case 12:di(t);break;case 11:break;case 4:a("167");default:a("156")}if(t=_o=null,s=e,1073741823===ko||1073741823!==s.childExpirationTime){for(u=0,o=s.child;null!==o;)l=o.expirationTime,p=o.childExpirationTime,(0===u||0!==l&&l<u)&&(u=l),(0===u||0!==p&&p<u)&&(u=p),o=o.sibling;s.childExpirationTime=u}if(null!==t)return t;null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e))}else{if(null!==(e=mo(e)))return e.effectTag&=511,e;null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512)}if(null!==r)return r;if(null===n)break;e=n}return null}function Oo(e){var t=eo(e.alternate,e,ko);return null===t&&(t=No(e)),go.current=null,t}function Do(e,t,n){wo&&a("243"),wo=!0,go.currentDispatcher=vo;var r=e.nextExpirationTimeToWorkOn;r===ko&&e===Eo&&null!==_o||(Po(),ko=r,_o=Wr((Eo=e).current,null,ko),e.pendingCommitExpirationTime=0);for(var i=!1;;){try{if(t)for(;null!==_o&&!fa();)_o=Oo(_o);else for(;null!==_o;)_o=Oo(_o)}catch(e){if(null===_o)i=!0,ha(e);else{null===_o&&a("271");var o=_o,s=o.return;if(null!==s){e:{var l=s,u=o,c=e;s=ko,u.effectTag|=512,u.firstEffect=u.lastEffect=null,So=!0,c=oi(c,u);do{switch(l.tag){case 5:l.effectTag|=1024,l.expirationTime=s,Zr(l,s=fo(l,c,s));break e;case 2:case 3:u=c;var d=l.stateNode;if(0==(64&l.effectTag)&&null!==d&&"function"==typeof d.componentDidCatch&&(null===xo||!xo.has(d))){l.effectTag|=1024,l.expirationTime=s,Zr(l,s=ho(l,u,s));break e}}l=l.return}while(null!==l)}_o=No(o);continue}i=!0,ha(e)}}break}if(wo=!1,ui=li=si=go.currentDispatcher=null,i)Eo=null,e.finishedWork=null;else if(null!==_o)e.finishedWork=null;else{if(null===(t=e.current.alternate)&&a("281"),Eo=null,So){if(i=e.latestPendingTime,o=e.latestSuspendedTime,s=e.latestPingedTime,0!==i&&i>r||0!==o&&o>r||0!==s&&s>r)return e.didError=!1,0!==(n=e.latestPingedTime)&&n<=r&&(e.latestPingedTime=0),n=e.earliestPendingTime,t=e.latestPendingTime,n===r?e.earliestPendingTime=t===r?e.latestPendingTime=0:t:t===r&&(e.latestPendingTime=n),n=e.earliestSuspendedTime,t=e.latestSuspendedTime,0===n?e.earliestSuspendedTime=e.latestSuspendedTime=r:n>r?e.earliestSuspendedTime=r:t<r&&(e.latestSuspendedTime=r),Kr(r,e),void(e.expirationTime=e.expirationTime);if(!e.didError&&!n)return e.didError=!0,e.nextExpirationTimeToWorkOn=r,r=e.expirationTime=1,void(e.expirationTime=r)}e.pendingCommitExpirationTime=r,e.finishedWork=t}}function Mo(e,t){var n;e:{for(wo&&!Co&&a("263"),n=e.return;null!==n;){switch(n.tag){case 2:case 3:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromCatch||"function"==typeof r.componentDidCatch&&(null===xo||!xo.has(r))){Jr(n,e=ho(n,e=oi(t,e),1)),Ro(n,1),n=void 0;break e}break;case 5:Jr(n,e=fo(n,e=oi(t,e),1)),Ro(n,1),n=void 0;break e}n=n.return}5===e.tag&&(Jr(e,n=fo(e,n=oi(t,e),1)),Ro(e,1)),n=void 0}return n}function Ao(e,t){return 0!==bo?e=bo:wo?e=Co?1:ko:1&t.mode?(e=Qo?2+10*(1+((e-2+15)/10|0)):2+25*(1+((e-2+500)/25|0)),null!==Eo&&e===ko&&(e+=1)):e=1,Qo&&(0===Vo||e>Vo)&&(Vo=e),e}function Ro(e,t){e:{(0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t);var n=e.alternate;null!==n&&(0===n.expirationTime||n.expirationTime>t)&&(n.expirationTime=t);var r=e.return;if(null===r&&5===e.tag)e=e.stateNode;else{for(;null!==r;){if(n=r.alternate,(0===r.childExpirationTime||r.childExpirationTime>t)&&(r.childExpirationTime=t),null!==n&&(0===n.childExpirationTime||n.childExpirationTime>t)&&(n.childExpirationTime=t),null===r.return&&5===r.tag){e=r.stateNode;break e}r=r.return}e=null}}null!==e&&(!wo&&0!==ko&&t<ko&&Po(),Hr(e,t),wo&&!Co&&Eo===e||(t=e,e=e.expirationTime,null===t.nextScheduledRoot?(t.expirationTime=e,null===Fo?(Uo=Fo=t,t.nextScheduledRoot=t):(Fo=Fo.nextScheduledRoot=t).nextScheduledRoot=Uo):(0===(n=t.expirationTime)||e<n)&&(t.expirationTime=e),Wo||($o?Yo&&(Bo=t,zo=1,da(t,1,!0)):1===e?ca(1,null):aa(t,e))),na>ta&&(na=0,a("185")))}function Io(e,t,n,r,i){var o=bo;bo=1;try{return e(t,n,r,i)}finally{bo=o}}var Uo=null,Fo=null,Lo=0,jo=void 0,Wo=!1,Bo=null,zo=0,Vo=0,qo=!1,Ho=!1,Ko=null,Go=null,$o=!1,Yo=!1,Qo=!1,Xo=null,Jo=o.unstable_now(),Zo=2+(Jo/10|0),ea=Zo,ta=50,na=0,ra=null,ia=1;function oa(){Zo=2+((o.unstable_now()-Jo)/10|0)}function aa(e,t){if(0!==Lo){if(t>Lo)return;null!==jo&&o.unstable_cancelScheduledWork(jo)}Lo=t,e=o.unstable_now()-Jo,jo=o.unstable_scheduleWork(ua,{timeout:10*(t-2)-e})}function sa(){return Wo?ea:(la(),0!==zo&&1073741823!==zo||(oa(),ea=Zo),ea)}function la(){var e=0,t=null;if(null!==Fo)for(var n=Fo,r=Uo;null!==r;){var i=r.expirationTime;if(0===i){if((null===n||null===Fo)&&a("244"),r===r.nextScheduledRoot){Uo=Fo=r.nextScheduledRoot=null;break}if(r===Uo)Uo=i=r.nextScheduledRoot,Fo.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===Fo){(Fo=n).nextScheduledRoot=Uo,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===e||i<e)&&(e=i,t=r),r===Fo)break;if(1===e)break;n=r,r=r.nextScheduledRoot}}Bo=t,zo=e}function ua(e){if(e.didTimeout&&null!==Uo){oa();var t=Uo;do{var n=t.expirationTime;0!==n&&Zo>=n&&(t.nextExpirationTimeToWorkOn=Zo),t=t.nextScheduledRoot}while(t!==Uo)}ca(0,e)}function ca(e,t){if(Go=t,la(),null!==Go)for(oa(),ea=Zo;null!==Bo&&0!==zo&&(0===e||e>=zo)&&(!qo||Zo>=zo);)da(Bo,zo,Zo>=zo),la(),oa(),ea=Zo;else for(;null!==Bo&&0!==zo&&(0===e||e>=zo);)da(Bo,zo,!0),la();if(null!==Go&&(Lo=0,jo=null),0!==zo&&aa(Bo,zo),Go=null,qo=!1,na=0,ra=null,null!==Xo)for(e=Xo,Xo=null,t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){Ho||(Ho=!0,Ko=e)}}if(Ho)throw e=Ko,Ko=null,Ho=!1,e}function da(e,t,n){if(Wo&&a("245"),Wo=!0,null===Go||n){var r=e.finishedWork;null!==r?pa(e,r,t):(e.finishedWork=null,Do(e,!1,n),null!==(r=e.finishedWork)&&pa(e,r,t))}else null!==(r=e.finishedWork)?pa(e,r,t):(e.finishedWork=null,Do(e,!0,n),null!==(r=e.finishedWork)&&(fa()?e.finishedWork=r:pa(e,r,t)));Wo=!1}function pa(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Xo?Xo=[r]:Xo.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===ra?na++:(ra=e,na=0),Co=wo=!0,e.current===t&&a("177"),0===(n=e.pendingCommitExpirationTime)&&a("261"),e.pendingCommitExpirationTime=0,r=t.expirationTime;var i=t.childExpirationTime;if(r=0===r||0!==i&&i<r?i:r,e.didError=!1,0===r?(e.earliestPendingTime=0,e.latestPendingTime=0,e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0):(0!==(i=e.latestPendingTime)&&(i<r?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime<r&&(e.earliestPendingTime=e.latestPendingTime)),0===(i=e.earliestSuspendedTime)?Hr(e,r):r>e.latestSuspendedTime?(e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0,Hr(e,r)):r<i&&Hr(e,r)),Kr(0,e),go.current=null,1<t.effectTag?null!==t.lastEffect?(t.lastEffect.nextEffect=t,r=t.firstEffect):r=t:r=t.firstEffect,fr=Sn,Fn(i=Un())){if("selectionStart"in i)var o={start:i.selectionStart,end:i.selectionEnd};else e:{var s=(o=(o=i.ownerDocument)&&o.defaultView||window).getSelection&&o.getSelection();if(s&&0!==s.rangeCount){o=s.anchorNode;var l=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{o.nodeType,u.nodeType}catch(e){o=null;break e}var c=0,d=-1,p=-1,f=0,h=0,m=i,v=null;t:for(;;){for(var g;m!==o||0!==l&&3!==m.nodeType||(d=c+l),m!==u||0!==s&&3!==m.nodeType||(p=c+s),3===m.nodeType&&(c+=m.nodeValue.length),null!==(g=m.firstChild);)v=m,m=g;for(;;){if(m===i)break t;if(v===o&&++f===l&&(d=c),v===u&&++h===s&&(p=c),null!==(g=m.nextSibling))break;v=(m=v).parentNode}m=g}o=-1===d||-1===p?null:{start:d,end:p}}else o=null}o=o||{start:0,end:0}}else o=null;for(hr={focusedElem:i,selectionRange:o},Sn=!1,To=r;null!==To;){i=!1,o=void 0;try{for(;null!==To;){if(256&To.effectTag){var y=To.alternate;e:switch(l=To,l.tag){case 2:case 3:if(256&l.effectTag&&null!==y){var b=y.memoizedProps,w=y.memoizedState,_=l.stateNode;_.props=l.memoizedProps,_.state=l.memoizedState;var E=_.getSnapshotBeforeUpdate(b,w);_.__reactInternalSnapshotBeforeUpdate=E}break e;case 5:case 7:case 8:case 6:break e;default:a("163")}}To=To.nextEffect}}catch(e){i=!0,o=e}i&&(null===To&&a("178"),Mo(To,o),null!==To&&(To=To.nextEffect))}for(To=r;null!==To;){y=!1,b=void 0;try{for(;null!==To;){var k=To.effectTag;if(16&k&&ir(To.stateNode,""),128&k){var S=To.alternate;if(null!==S){var T=S.ref;null!==T&&("function"==typeof T?T(null):T.current=null)}}switch(14&k){case 2:uo(To),To.effectTag&=-3;break;case 6:uo(To),To.effectTag&=-3,po(To.alternate,To);break;case 4:po(To.alternate,To);break;case 8:co(w=To),w.return=null,w.child=null,w.alternate&&(w.alternate.child=null,w.alternate.return=null)}To=To.nextEffect}}catch(e){y=!0,b=e}y&&(null===To&&a("178"),Mo(To,b),null!==To&&(To=To.nextEffect))}if(T=hr,S=Un(),k=T.focusedElem,b=T.selectionRange,S!==k&&k&&k.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(k.ownerDocument.documentElement,k)){null!==b&&Fn(k)&&(S=b.start,void 0===(T=b.end)&&(T=S),"selectionStart"in k?(k.selectionStart=S,k.selectionEnd=Math.min(T,k.value.length)):(S=((y=k.ownerDocument||document)&&y.defaultView||window).getSelection(),w=k.textContent.length,T=Math.min(b.start,w),b=void 0===b.end?T:Math.min(b.end,w),!S.extend&&T>b&&(w=b,b=T,T=w),w=In(k,T),_=In(k,b),w&&_&&(1!==S.rangeCount||S.anchorNode!==w.node||S.anchorOffset!==w.offset||S.focusNode!==_.node||S.focusOffset!==_.offset)&&((y=y.createRange()).setStart(w.node,w.offset),S.removeAllRanges(),T>b?(S.addRange(y),S.extend(_.node,_.offset)):(y.setEnd(_.node,_.offset),S.addRange(y))))),S=[];for(T=k;T=T.parentNode;)1===T.nodeType&&S.push({element:T,left:T.scrollLeft,top:T.scrollTop});for("function"==typeof k.focus&&k.focus(),k=0;k<S.length;k++)(T=S[k]).element.scrollLeft=T.left,T.element.scrollTop=T.top}for(hr=null,Sn=!!fr,fr=null,e.current=t,To=r;null!==To;){r=!1,k=void 0;try{for(S=n;null!==To;){var C=To.effectTag;if(36&C){var x=To.alternate;switch(y=S,(T=To).tag){case 2:case 3:var P=T.stateNode;if(4&T.effectTag)if(null===x)P.props=T.memoizedProps,P.state=T.memoizedState,P.componentDidMount();else{var N=x.memoizedProps,O=x.memoizedState;P.props=T.memoizedProps,P.state=T.memoizedState,P.componentDidUpdate(N,O,P.__reactInternalSnapshotBeforeUpdate)}var D=T.updateQueue;null!==D&&(P.props=T.memoizedProps,P.state=T.memoizedState,ri(0,D,P));break;case 5:var M=T.updateQueue;if(null!==M){if(b=null,null!==T.child)switch(T.child.tag){case 7:b=T.child.stateNode;break;case 2:case 3:b=T.child.stateNode}ri(0,M,b)}break;case 7:var A=T.stateNode;null===x&&4&T.effectTag&&mr(T.type,T.memoizedProps)&&A.focus();break;case 8:case 6:case 15:case 16:break;default:a("163")}}if(128&C){var R=To.ref;if(null!==R){var I=To.stateNode;switch(To.tag){case 7:var U=I;break;default:U=I}"function"==typeof R?R(U):R.current=U}}var F=To.nextEffect;To.nextEffect=null,To=F}}catch(e){r=!0,k=e}r&&(null===To&&a("178"),Mo(To,k),null!==To&&(To=To.nextEffect))}wo=Co=!1,"function"==typeof Ir&&Ir(t.stateNode),C=t.expirationTime,t=t.childExpirationTime,0===(t=0===C||0!==t&&t<C?t:C)&&(xo=null),e.expirationTime=t,e.finishedWork=null}function fa(){return!!qo||!(null===Go||Go.timeRemaining()>ia)&&(qo=!0)}function ha(e){null===Bo&&a("246"),Bo.expirationTime=0,Ho||(Ho=!0,Ko=e)}function ma(e,t){var n=$o;$o=!0;try{return e(t)}finally{($o=n)||Wo||ca(1,null)}}function va(e,t){if($o&&!Yo){Yo=!0;try{return e(t)}finally{Yo=!1}}return e(t)}function ga(e,t,n){if(Qo)return e(t,n);$o||Wo||0===Vo||(ca(Vo,null),Vo=0);var r=Qo,i=$o;$o=Qo=!0;try{return e(t,n)}finally{Qo=r,($o=i)||Wo||ca(1,null)}}function ya(e,t,n,r,i){var o=t.current;return n=function(e){if(!e)return kr;e=e._reactInternalFiber;e:{(2!==tn(e)||2!==e.tag&&3!==e.tag)&&a("170");var t=e;do{switch(t.tag){case 5:t=t.stateNode.context;break e;case 2:if(Pr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}break;case 3:if(Pr(t.type._reactResult)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);a("171"),t=void 0}if(2===e.tag){var n=e.type;if(Pr(n))return Mr(e,n,t)}else if(3===e.tag&&Pr(n=e.type._reactResult))return Mr(e,n,t);return t}(n),null===t.context?t.context=n:t.pendingContext=n,t=i,(i=Qr(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(i.callback=t),Jr(o,i),Ro(o,r),r}function ba(e,t,n,r){var i=t.current;return ya(e,t,n,i=Ao(sa(),i),r)}function wa(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 7:default:return e.child.stateNode}}function _a(e){var t=2+25*(1+((sa()-2+500)/25|0));t<=yo&&(t=yo+1),this._expirationTime=yo=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function Ea(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ka(e,t,n){e={current:t=new Lr(5,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function Sa(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ta(e,t,n,r,i){Sa(n)||a("200");var o=n._reactRootContainer;if(o){if("function"==typeof i){var s=i;i=function(){var e=wa(o._internalRoot);s.call(e)}}null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ka(e,!1,t)}(n,r),"function"==typeof i){var l=i;i=function(){var e=wa(o._internalRoot);l.call(e)}}va(function(){null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)})}return wa(o._internalRoot)}function Ca(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return Sa(t)||a("200"),function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Qe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Pe=function(e,t,n){switch(t){case"input":if(Et(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=W(r);i||a("90"),He(r),Et(r,i)}}}break;case"textarea":Qn(e,n);break;case"select":null!=(t=n.value)&&Gn(e,!!n.multiple,t,!1)}},_a.prototype.render=function(e){this._defer||a("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new Ea;return ya(e,t,null,n,r._onCommit),r},_a.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},_a.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||a("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,i=t;i!==this;)r=i,i=i._next;null===r&&a("251"),r._next=i._next,this._next=t,e.firstBatch=this}this._defer=!1,t=n,Wo&&a("253"),Bo=e,zo=t,da(e,t,!0),ca(1,null),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},_a.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},Ea.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Ea.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&a("191",n),n()}}},ka.prototype.render=function(e,t){var n=this._internalRoot,r=new Ea;return null!==(t=void 0===t?null:t)&&r.then(t),ba(e,n,null,r._onCommit),r},ka.prototype.unmount=function(e){var t=this._internalRoot,n=new Ea;return null!==(e=void 0===e?null:e)&&n.then(e),ba(null,t,null,n._onCommit),n},ka.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new Ea;return null!==(n=void 0===n?null:n)&&i.then(n),ba(t,r,e,i._onCommit),i},ka.prototype.createBatch=function(){var e=new _a(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime<=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},Re=ma,Ie=ga,Ue=function(){Wo||0===Vo||(ca(Vo,null),Vo=0)};var xa={createPortal:Ca,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?a("188"):a("268",Object.keys(e))),e=null===(e=rn(t))?null:e.stateNode},hydrate:function(e,t,n){return Ta(null,e,t,!0,n)},render:function(e,t,n){return Ta(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||void 0===e._reactInternalFiber)&&a("38"),Ta(e,t,n,!1,r)},unmountComponentAtNode:function(e){return Sa(e)||a("40"),!!e._reactRootContainer&&(va(function(){Ta(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return Ca.apply(void 0,arguments)},unstable_batchedUpdates:ma,unstable_interactiveUpdates:ga,flushSync:function(e,t){Wo&&a("187");var n=$o;$o=!0;try{return Io(e,t)}finally{$o=n,ca(1,null)}},unstable_flushControlled:function(e){var t=$o;$o=!0;try{Io(e)}finally{($o=t)||Wo||ca(1,null)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[L,j,W,D.injectEventPluginsByName,y,K,function(e){C(e,H)},Me,Ae,Pn,A]},unstable_createRoot:function(e,t){return Sa(e)||a("278"),new ka(e,!0,null!=t&&!0===t.hydrate)}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ir=Fr(function(e){return t.onCommitFiberRoot(n,e)}),Ur=Fr(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}})(i({},e,{findHostInstanceByFiber:function(e){return null===(e=rn(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:F,bundleType:0,version:"16.5.2",rendererPackageName:"react-dom"});var Pa={default:xa},Na=Pa&&xa||Pa;t.exports=Na.default||Na},{"object-assign":8,react:16,schedule:21}],13:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?(!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){if("production"!==n.env.NODE_ENV)throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),t.exports=e("./cjs/react-dom.production.min.js")):t.exports=e("./cjs/react-dom.development.js")}).call(this,e("_process"))},{"./cjs/react-dom.development.js":11,"./cjs/react-dom.production.min.js":12,_process:28}],14:[function(e,t,n){(function(n){"use strict";"production"!==n.env.NODE_ENV&&function(){var n=e("object-assign"),r=e("prop-types/checkPropTypes"),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,f=i?Symbol.for("react.forward_ref"):60112,h=i?Symbol.for("react.placeholder"):60113,m="function"==typeof Symbol&&Symbol.iterator,v="@@iterator";function g(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e[v];return"function"==typeof t?t:null}var y=function(){};function b(e,t,n,r,i,o,a,s){if(y(t),!e){var l=void 0;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}y=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")};var w=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.warn(o);try{throw new Error(o)}catch(e){}}).apply(void 0,[t].concat(r))}},_=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(void 0===t)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(r.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var o=r.map(function(e){return""+e}),a=o[0],s=o[1],l=o[2],u=o[3],c=o[4],d=o[5],p=o[6],f=o[7],h="Warning: "+t;switch(r.length){case 0:console.error(h);break;case 1:console.error(h,a);break;case 2:console.error(h,a,s);break;case 3:console.error(h,a,s,l);break;case 4:console.error(h,a,s,l,u);break;case 5:console.error(h,a,s,l,u,c);break;case 6:console.error(h,a,s,l,u,c,d);break;case 7:console.error(h,a,s,l,u,c,d,p);break;case 8:console.error(h,a,s,l,u,c,d,p,f);break;default:throw new Error("warningWithoutStack() currently supports at most 8 arguments.")}}try{var m=0,v="Warning: "+t.replace(/%s/g,function(){return r[m++]});throw new Error(v)}catch(e){}}},E={};function k(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;E[i]||(_(!1,"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),E[i]=!0)}var S={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){k(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){k(e,"replaceState")},enqueueSetState:function(e,t,n,r){k(e,"setState")}},T={};function C(e,t,n){this.props=e,this.context=t,this.refs=T,this.updater=n||S}Object.freeze(T),C.prototype.isReactComponent={},C.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&b(!1,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."),this.updater.enqueueSetState(this,e,t,"setState")},C.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var x={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},P=function(e,t){Object.defineProperty(C.prototype,e,{get:function(){w(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var N in x)x.hasOwnProperty(N)&&P(N,x[N]);function O(){}function D(e,t,n){this.props=e,this.context=t,this.refs=T,this.updater=n||S}O.prototype=C.prototype;var M=D.prototype=new O;M.constructor=D,n(M,C.prototype),M.isPureReactComponent=!0;var A={current:null,currentDispatcher:null},R=/^(.*)[\\\/]/,I=1;function U(e){if(null==e)return null;if("number"==typeof e.tag&&_(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case p:return"AsyncMode";case s:return"Fragment";case a:return"Portal";case u:return"Profiler";case l:return"StrictMode";case h:return"Placeholder"}if("object"==typeof e){switch(e.$$typeof){case d:return"Context.Consumer";case c:return"Context.Provider";case f:var t=e.render,n=t.displayName||t.name||"";return e.displayName||(""!==n?"ForwardRef("+n+")":"ForwardRef")}if("function"==typeof e.then){var r=function(e){return e._reactStatus===I?e._reactResult:null}(e);if(r)return U(r)}}return null}var F={},L=null;function j(e){L=e}F.getCurrentStack=null,F.getStackAddendum=function(){var e="";if(L){var t=U(L.type),n=L._owner;e+=function(e,t,n){var r="";if(t){var i=t.fileName,o=i.replace(R,"");if(/^index\./.test(o)){var a=i.match(R);if(a){var s=a[1];s&&(o=s.replace(R,"")+"/"+o)}}r=" (at "+o+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(t,L._source,n&&U(n.type))}var r=F.getCurrentStack;return r&&(e+=r()||""),e};var W={ReactCurrentOwner:A,assign:n};n(W,{ReactDebugCurrentFrame:F,ReactComponentTreeHook:{}});var B=function(e,t){if(!e){for(var n=W.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];_.apply(void 0,[!1,t+"%s"].concat(i,[n]))}},z=Object.prototype.hasOwnProperty,V={key:!0,ref:!0,__self:!0,__source:!0},q=void 0,H=void 0;function K(e){if(z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function G(e){if(z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}var $=function(e,t,n,r,i,a,s){var l={$$typeof:o,type:e,key:t,ref:n,props:s,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Y(e,t,n){var r=void 0,i={},o=null,a=null,s=null,l=null;if(null!=t)for(r in K(t)&&(a=t.ref),G(t)&&(o=""+t.key),s=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)z.call(t,r)&&!V.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(u>1){for(var c=Array(u),d=0;d<u;d++)c[d]=arguments[d+2];Object.freeze&&Object.freeze(c),i.children=c}if(e&&e.defaultProps){var p=e.defaultProps;for(r in p)void 0===i[r]&&(i[r]=p[r])}if(o||a){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;o&&function(e,t){var n=function(){q||(q=!0,_(!1,"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,f),a&&function(e,t){var n=function(){H||(H=!0,_(!1,"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,f)}return $(e,o,a,s,l,A.current,i)}function Q(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var X=".",J=":";var Z=!1,ee=/\/+/g;function te(e){return(""+e).replace(ee,"$&/")}var ne=10,re=[];function ie(e,t,n,r){if(re.length){var i=re.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function oe(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,re.length<ne&&re.push(e)}function ae(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case a:l=!0}}if(l)return r(i,t,""===n?X+se(t,0):n),1;var u=void 0,c=0,d=""===n?X:n+J;if(Array.isArray(t))for(var p=0;p<t.length;p++)c+=e(u=t[p],d+se(u,p),r,i);else{var f=g(t);if("function"==typeof f){f===t.entries&&(Z||B(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),Z=!0);for(var h=f.call(t),m=void 0,v=0;!(m=h.next()).done;)c+=e(u=m.value,d+se(u,v++),r,i)}else if("object"===s){var y;y=" If you meant to render a collection of children, use an array instead."+F.getStackAddendum();var w=""+t;b(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===w?"object with keys {"+Object.keys(t).join(", ")+"}":w,y)}}return c}(e,"",t,n)}function se(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function le(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function ue(e,t,n){var r,i,o=e.result,a=e.keyPrefix,s=e.func,l=e.context,u=s.call(l,t,e.count++);Array.isArray(u)?ce(u,o,n,function(e){return e}):null!=u&&(Q(u)&&(r=u,i=a+(!u.key||t&&t.key===u.key?"":te(u.key)+"/")+n,u=$(r.type,i,r.ref,r._self,r._source,r._owner,r.props)),o.push(u))}function ce(e,t,n,r,i){var o="";null!=n&&(o=te(n)+"/");var a=ie(t,o,r,i);ae(e,ue,a),oe(a)}var de=void 0;function pe(){if(A.current){var e=U(A.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}de=!1;var fe={};function he(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=pe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!fe[n]){fe[n]=!0;var r="";e&&e._owner&&e._owner!==A.current&&(r=" It was passed a child from "+U(e._owner.type)+"."),j(e),B(!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.',n,r),j(null)}}}function me(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];Q(r)&&he(r,t)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var i=g(e);if("function"==typeof i&&i!==e.entries)for(var o=i.call(e),a=void 0;!(a=o.next()).done;)Q(a.value)&&he(a.value,t)}}function ve(e){var t=e.type,n=void 0,i=void 0;if("function"==typeof t)n=t.displayName||t.name,i=t.propTypes;else{if("object"!=typeof t||null===t||t.$$typeof!==f)return;var o=t.render.displayName||t.render.name||"";n=t.displayName||(""!==o?"ForwardRef("+o+")":"ForwardRef"),i=t.propTypes}i?(j(e),r(i,e.props,"prop",n,F.getStackAddendum),j(null)):void 0===t.PropTypes||de||(de=!0,_(!1,"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"==typeof t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved||_(!1,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."))}function ge(e,t,n){var r=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===p||e===u||e===l||e===h||"object"==typeof e&&null!==e&&("function"==typeof e.then||e.$$typeof===c||e.$$typeof===d||e.$$typeof===f)}(e);if(!r){var i="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var a=function(e){if(null!==e&&void 0!==e&&void 0!==e.__source){var t=e.__source;return"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+"."}return""}(t);i+=a||pe();var m=void 0;null===e?m="null":Array.isArray(e)?m="array":void 0!==e&&e.$$typeof===o?(m="<"+(U(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,B(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,i)}var v=Y.apply(this,arguments);if(null==v)return v;if(r)for(var g=2;g<arguments.length;g++)me(arguments[g],e);return e===s?function(e){j(e);for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){B(!1,"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r);break}}null!==e.ref&&B(!1,"Invalid attribute `ref` supplied to `React.Fragment`."),j(null)}(v):ve(v),v}var ye={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return ce(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;var r=ie(null,null,t,n);ae(e,le,r),oe(r)},count:function(e){return ae(e,function(){return null},null)},toArray:function(e){var t=[];return ce(e,t,null,function(e){return e}),t},only:function(e){return Q(e)||b(!1,"React.Children.only expected to receive a single React element child."),e}},createRef:function(){var e={current:null};return Object.seal(e),e},Component:C,PureComponent:D,createContext:function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&_(!1,"createContext: Expected the optional second argument to be a function. Instead received: %s",t);var n={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null};return n.Provider={$$typeof:c,_context:n},n.Consumer=n,n.unstable_read=function(e,t){var n=A.currentDispatcher;return null===n&&b(!1,"Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps."),n.readContext(e,t)}.bind(null,n),n._currentRenderer=null,n._currentRenderer2=null,n},forwardRef:function(e){return"function"!=typeof e?_(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&_(!1,"forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null!=e.defaultProps||null!=e.propTypes)&&_(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:f,render:e}},Fragment:s,StrictMode:l,unstable_AsyncMode:p,unstable_Profiler:u,createElement:ge,cloneElement:function(e,t,r){for(var i=function(e,t,r){(null===e||void 0===e)&&b(!1,"React.cloneElement(...): The argument must be a React element, but you passed %s.",e);var i=void 0,o=n({},e.props),a=e.key,s=e.ref,l=e._self,u=e._source,c=e._owner;if(null!=t){K(t)&&(s=t.ref,c=A.current),G(t)&&(a=""+t.key);var d=void 0;for(i in e.type&&e.type.defaultProps&&(d=e.type.defaultProps),t)z.call(t,i)&&!V.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==d?o[i]=d[i]:o[i]=t[i])}var p=arguments.length-2;if(1===p)o.children=r;else if(p>1){for(var f=Array(p),h=0;h<p;h++)f[h]=arguments[h+2];o.children=f}return $(e.type,a,s,l,u,c,o)}.apply(this,arguments),o=2;o<arguments.length;o++)me(arguments[o],i.type);return ve(i),i},createFactory:function(e){var t=ge.bind(null,e);return t.type=e,Object.defineProperty(t,"type",{enumerable:!1,get:function(){return w(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},isValidElement:Q,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:W};var be=Object.freeze({default:ye}),we=be&&ye||be,_e=we.default||we;t.exports=_e}()}).call(this,e("_process"))},{_process:28,"object-assign":8,"prop-types/checkPropTypes":9}],15:[function(e,t,n){"use strict";var r=e("object-assign"),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,f=i?Symbol.for("react.forward_ref"):60112;i&&Symbol.for("react.placeholder");var h="function"==typeof Symbol&&Symbol.iterator;function m(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,i,o,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],u=0;(e=Error(t.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||v}function b(){}function w(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||v}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&m("85"),this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var _=w.prototype=new b;_.constructor=w,r(_,y.prototype),_.isPureReactComponent=!0;var E={current:null,currentDispatcher:null},k=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r=void 0,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,r)&&!S.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:E.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var x=/\/+/g,P=[];function N(e,t,n,r){if(P.length){var i=P.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function O(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case a:l=!0}}if(l)return r(i,t,""===n?"."+M(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u<t.length;u++){var c=n+M(s=t[u],u);l+=e(s,c,r,i)}else if(c=null===t||"object"!=typeof t?null:"function"==typeof(c=h&&t[h]||t["@@iterator"])?c:null,"function"==typeof c)for(t=c.call(t),u=0;!(s=t.next()).done;)l+=e(s=s.value,c=n+M(s,u++),r,i);else"object"===s&&m("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return l}(e,"",t,n)}function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function A(e,t){e.func.call(e.context,t,e.count++)}function R(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?I(e,r,n,function(e){return e}):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(x,"$&/")+"/")+n)),r.push(e))}function I(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(x,"$&/")+"/"),D(e,R,t=N(t,o,r,i)),O(t)}var U={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return I(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;D(e,A,t=N(null,null,t,n)),O(t)},count:function(e){return D(e,function(){return null},null)},toArray:function(e){var t=[];return I(e,t,null,function(e){return e}),t},only:function(e){return C(e)||m("143"),e}},createRef:function(){return{current:null}},Component:y,PureComponent:w,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:c,_context:e},e.Consumer=e,e.unstable_read=function(e,t){var n=E.currentDispatcher;return null===n&&m("277"),n.readContext(e,t)}.bind(null,e),e},forwardRef:function(e){return{$$typeof:f,render:e}},Fragment:s,StrictMode:l,unstable_AsyncMode:p,unstable_Profiler:u,createElement:T,cloneElement:function(e,t,n){(null===e||void 0===e)&&m("267",e);var i=void 0,a=r({},e.props),s=e.key,l=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,u=E.current),void 0!==t.key&&(s=""+t.key);var c=void 0;for(i in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)k.call(t,i)&&!S.hasOwnProperty(i)&&(a[i]=void 0===t[i]&&void 0!==c?c[i]:t[i])}if(1===(i=arguments.length-2))a.children=n;else if(1<i){c=Array(i);for(var d=0;d<i;d++)c[d]=arguments[d+2];a.children=c}return{$$typeof:o,type:e.type,key:s,ref:l,props:a,_owner:u}},createFactory:function(e){var t=T.bind(null,e);return t.type=e,t},isValidElement:C,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:E,assign:r}},F={default:U},L=F&&U||F;t.exports=L.default||L},{"object-assign":8}],16:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?t.exports=e("./cjs/react.production.min.js"):t.exports=e("./cjs/react.development.js")}).call(this,e("_process"))},{"./cjs/react.development.js":14,"./cjs/react.production.min.js":15,_process:28}],17:[function(e,t,n){(function(e){"use strict";"production"!==e.env.NODE_ENV&&function(){Object.defineProperty(n,"__esModule",{value:!0});var e=!0,t=0,r=0,i=0;n.__interactionsRef=null,n.__subscriberRef=null,e&&(n.__interactionsRef={current:new Set},n.__subscriberRef={current:null});var o=null;function a(e){var t=!1,n=null;if(o.forEach(function(r){try{r.onInteractionTraced(e)}catch(e){t||(t=!0,n=e)}}),t)throw n}function s(e){var t=!1,n=null;if(o.forEach(function(r){try{r.onInteractionScheduledWorkCompleted(e)}catch(e){t||(t=!0,n=e)}}),t)throw n}function l(e,t){var n=!1,r=null;if(o.forEach(function(i){try{i.onWorkScheduled(e,t)}catch(e){n||(n=!0,r=e)}}),n)throw r}function u(e,t){var n=!1,r=null;if(o.forEach(function(i){try{i.onWorkStarted(e,t)}catch(e){n||(n=!0,r=e)}}),n)throw r}function c(e,t){var n=!1,r=null;if(o.forEach(function(i){try{i.onWorkStopped(e,t)}catch(e){n||(n=!0,r=e)}}),n)throw r}function d(e,t){var n=!1,r=null;if(o.forEach(function(i){try{i.onWorkCanceled(e,t)}catch(e){n||(n=!0,r=e)}}),n)throw r}e&&(o=new Set),n.unstable_clear=function(t){if(!e)return t();var r=n.__interactionsRef.current;n.__interactionsRef.current=new Set;try{return t()}finally{n.__interactionsRef.current=r}},n.unstable_getCurrent=function(){return e?n.__interactionsRef.current:null},n.unstable_getThreadID=function(){return++i},n.unstable_trace=function(i,o,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t;if(!e)return a();var l={__count:1,id:r++,name:i,timestamp:o},u=n.__interactionsRef.current,c=new Set(u);c.add(l),n.__interactionsRef.current=c;var d=n.__subscriberRef.current,p=void 0;try{null!==d&&d.onInteractionTraced(l)}finally{try{null!==d&&d.onWorkStarted(c,s)}finally{try{p=a()}finally{n.__interactionsRef.current=u;try{null!==d&&d.onWorkStopped(c,s)}finally{l.__count--,null!==d&&0===l.__count&&d.onInteractionScheduledWorkCompleted(l)}}}}return p},n.unstable_wrap=function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(!e)return r;var o=n.__interactionsRef.current,a=n.__subscriberRef.current;null!==a&&a.onWorkScheduled(o,i),o.forEach(function(e){e.__count++});var s=!1;function l(){var e=n.__interactionsRef.current;n.__interactionsRef.current=o,a=n.__subscriberRef.current;try{var t=void 0;try{null!==a&&a.onWorkStarted(o,i)}finally{try{t=r.apply(void 0,arguments)}finally{n.__interactionsRef.current=e,null!==a&&a.onWorkStopped(o,i)}}return t}finally{s||(s=!0,o.forEach(function(e){e.__count--,null!==a&&0===e.__count&&a.onInteractionScheduledWorkCompleted(e)}))}}return l.cancel=function(){a=n.__subscriberRef.current;try{null!==a&&a.onWorkCanceled(o,i)}finally{o.forEach(function(e){e.__count--,a&&0===e.__count&&a.onInteractionScheduledWorkCompleted(e)})}},l},n.unstable_subscribe=function(t){e&&(o.add(t),1===o.size&&(n.__subscriberRef.current={onInteractionScheduledWorkCompleted:s,onInteractionTraced:a,onWorkCanceled:d,onWorkScheduled:l,onWorkStarted:u,onWorkStopped:c}))},n.unstable_unsubscribe=function(t){e&&(o.delete(t),0===o.size&&(n.__subscriberRef.current=null))}}()}).call(this,e("_process"))},{_process:28}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=0;n.__interactionsRef=null,n.__subscriberRef=null,n.unstable_clear=function(e){return e()},n.unstable_getCurrent=function(){return null},n.unstable_getThreadID=function(){return++r},n.unstable_trace=function(e,t,n){return n()},n.unstable_wrap=function(e){return e},n.unstable_subscribe=function(){},n.unstable_unsubscribe=function(){}},{}],19:[function(e,t,n){(function(e){"use strict";"production"!==e.env.NODE_ENV&&function(){Object.defineProperty(n,"__esModule",{value:!0});var e=5e3,t=null,r=!1,i=!1,o="object"==typeof performance&&"function"==typeof performance.now,a={timeRemaining:o?function(){var e=h()-performance.now();return e>0?e:0}:function(){var e=h()-Date.now();return e>0?e:0},didTimeout:!1};function s(){if(!r){var e=t.timesOutAt;i?f():i=!0,p(u,e)}}function l(e){var n=t,r=t.next;if(t===r)t=null,r=null;else{var i=t.previous;t=i.next=r,r.previous=i}n.next=n.previous=null,(0,n.callback)(a)}function u(e){r=!0,a.didTimeout=e;try{if(e)for(;null!==t;){var o=n.unstable_now();if(!(t.timesOutAt<=o))break;do{l()}while(null!==t&&t.timesOutAt<=o)}else if(null!==t)do{l()}while(null!==t&&h()-n.unstable_now()>0)}finally{r=!1,null!==t?s():i=!1}}var c,d,p,f,h,m=Date,v="function"==typeof setTimeout?setTimeout:void 0,g="function"==typeof clearTimeout?clearTimeout:void 0,y="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,b="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0,w=function(e){c=y(function(t){g(d),e(t)}),d=v(function(){b(c),e(n.unstable_now())},100)};if(o){var _=performance;n.unstable_now=function(){return _.now()}}else n.unstable_now=function(){return m.now()};if("undefined"==typeof window){var E=-1;p=function(e,t){E=setTimeout(e,0,!0)},f=function(){clearTimeout(E)},h=function(){return 0}}else if(window._schedMock){var k=window._schedMock;p=k[0],f=k[1],h=k[2]}else{"undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var S=null,T=!1,C=-1,x=!1,P=!1,N=0,O=33,D=33;h=function(){return N};var M="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===M){T=!1;var t=n.unstable_now(),r=!1;if(N-t<=0){if(!(-1!==C&&C<=t))return void(x||(x=!0,w(A)));r=!0}C=-1;var i=S;if(S=null,null!==i){P=!0;try{i(r)}finally{P=!1}}}},!1);var A=function(e){x=!1;var t=e-N+D;t<D&&O<D?(t<8&&(t=8),D=t<O?O:t):O=t,N=e+D,T||(T=!0,window.postMessage(M,"*"))};p=function(e,t){S=e,C=t,P?window.postMessage(M,"*"):x||(x=!0,w(A))},f=function(){S=null,T=!1,C=-1}}n.unstable_scheduleWork=function(r,i){var o,a=n.unstable_now(),l={callback:r,timesOutAt:o=void 0!==i&&null!==i&&null!==i.timeout&&void 0!==i.timeout?a+i.timeout:a+e,next:null,previous:null};if(null===t)t=l.next=l.previous=l,s();else{var u=null,c=t;do{if(c.timesOutAt>o){u=c;break}c=c.next}while(c!==t);null===u?u=t:u===t&&(t=l,s());var d=u.previous;d.next=u.previous=l,l.next=u,l.previous=d}return l},n.unstable_cancelScheduledWork=function(e){var n=e.next;if(null!==n){if(n===e)t=null;else{e===t&&(t=n);var r=e.previous;r.next=n,n.previous=r}e.next=e.previous=null}}}()}).call(this,e("_process"))},{_process:28}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=null,i=!1,o=!1,a="object"==typeof performance&&"function"==typeof performance.now,s={timeRemaining:a?function(){var e=m()-performance.now();return 0<e?e:0}:function(){var e=m()-Date.now();return 0<e?e:0},didTimeout:!1};function l(){if(!i){var e=r.timesOutAt;o?h():o=!0,f(c,e)}}function u(){var e=r,t=r.next;if(r===t)r=null;else{var n=r.previous;r=n.next=t,t.previous=n}e.next=e.previous=null,(e=e.callback)(s)}function c(e){i=!0,s.didTimeout=e;try{if(e)for(;null!==r;){var t=n.unstable_now();if(!(r.timesOutAt<=t))break;do{u()}while(null!==r&&r.timesOutAt<=t)}else if(null!==r)do{u()}while(null!==r&&0<m()-n.unstable_now())}finally{i=!1,null!==r?l():o=!1}}var d,p,f,h,m,v=Date,g="function"==typeof setTimeout?setTimeout:void 0,y="function"==typeof clearTimeout?clearTimeout:void 0,b="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,w="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function _(e){d=b(function(t){y(p),e(t)}),p=g(function(){w(d),e(n.unstable_now())},100)}if(a){var E=performance;n.unstable_now=function(){return E.now()}}else n.unstable_now=function(){return v.now()};if("undefined"==typeof window){var k=-1;f=function(e){k=setTimeout(e,0,!0)},h=function(){clearTimeout(k)},m=function(){return 0}}else if(window._schedMock){var S=window._schedMock;f=S[0],h=S[1],m=S[2]}else{"undefined"!=typeof console&&("function"!=typeof b&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof w&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var T=null,C=!1,x=-1,P=!1,N=!1,O=0,D=33,M=33;m=function(){return O};var A="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===A){C=!1;var t=n.unstable_now();if(e=!1,0>=O-t){if(!(-1!==x&&x<=t))return void(P||(P=!0,_(R)));e=!0}if(x=-1,t=T,T=null,null!==t){N=!0;try{t(e)}finally{N=!1}}}},!1);var R=function(e){P=!1;var t=e-O+M;t<M&&D<M?(8>t&&(t=8),M=t<D?D:t):D=t,O=e+M,C||(C=!0,window.postMessage(A,"*"))};f=function(e,t){T=e,x=t,N?window.postMessage(A,"*"):P||(P=!0,_(R))},h=function(){T=null,C=!1,x=-1}}n.unstable_scheduleWork=function(e,t){var i=n.unstable_now();if(e={callback:e,timesOutAt:t=void 0!==t&&null!==t&&null!==t.timeout&&void 0!==t.timeout?i+t.timeout:i+5e3,next:null,previous:null},null===r)r=e.next=e.previous=e,l();else{i=null;var o=r;do{if(o.timesOutAt>t){i=o;break}o=o.next}while(o!==r);null===i?i=r:i===r&&(r=e,l()),(t=i.previous).next=i.previous=e,e.next=i,e.previous=t}return e},n.unstable_cancelScheduledWork=function(e){var t=e.next;if(null!==t){if(t===e)r=null;else{e===r&&(r=t);var n=e.previous;n.next=t,t.previous=n}e.next=e.previous=null}}},{}],21:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?t.exports=e("./cjs/schedule.production.min.js"):t.exports=e("./cjs/schedule.development.js")}).call(this,e("_process"))},{"./cjs/schedule.development.js":19,"./cjs/schedule.production.min.js":20,_process:28}],22:[function(e,t,n){(function(n){"use strict";"production"===n.env.NODE_ENV?t.exports=e("./cjs/schedule-tracing.production.min.js"):t.exports=e("./cjs/schedule-tracing.development.js")}).call(this,e("_process"))},{"./cjs/schedule-tracing.development.js":17,"./cjs/schedule-tracing.production.min.js":18,_process:28}],23:[function(e,t,n){(function(r){!function(e){"object"==typeof n&&void 0!==t?t.exports=e():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).Tinode=e()}(function(){var t={exports:{}},n=[{name:"ST",start:/(?:^|\W)(\*)[^\s*]/,end:/[^\s*](\*)(?=$|\W)/},{name:"EM",start:/(?:^|[\W_])(_)[^\s_]/,end:/[^\s_](_)(?=$|[\W_])/},{name:"DL",start:/(?:^|\W)(~)[^\s~]/,end:/[^\s~](~)(?=$|\W)/},{name:"CO",start:/(?:^|\W)(`)[^`]/,end:/[^`](`)(?=$|\W)/}],i=[{name:"LN",dataName:"url",pack:function(e){return/^[a-z]+:\/\//i.test(e)||(e="http://"+e),{url:e}},re:/(?:(?:https?|ftp):\/\/|www\.|ftp\.)[-A-Z0-9+&@#\/%=~_|$?!:,.]*[A-Z0-9+&@#\/%=~_|$]/gi},{name:"MN",dataName:"val",pack:function(e){return{val:e.slice(1)}},re:/\B@(\w\w+)/g},{name:"HT",dataName:"val",pack:function(e){return{val:e.slice(1)}},re:/\B#(\w\w+)/g}],o={ST:{name:"b",isVoid:!1},EM:{name:"i",isVoid:!1},DL:{name:"del",isVoid:!1},CO:{name:"tt",isVoid:!1},BR:{name:"br",isVoid:!0},LN:{name:"a",isVoid:!1},MN:{name:"a",isVoid:!1},HT:{name:"a",isVoid:!1},IM:{name:"img",isVoid:!0}};function a(e,t){var n;try{n=atob(e)}catch(e){console.log("Drafty: failed to decode base64-encoded object",e.message),n=atob("")}for(var r=n.length,i=new ArrayBuffer(r),o=new Uint8Array(i),a=0;a<r;a++)o[a]=n.charCodeAt(a);return URL.createObjectURL(new Blob([i],{type:t}))}var s={ST:{open:function(){return"<b>"},close:function(){return"</b>"}},EM:{open:function(){return"<i>"},close:function(){return"</i>"}},DL:{open:function(){return"<del>"},close:function(){return"</del>"}},CO:{open:function(){return"<tt>"},close:function(){return"</tt>"}},BR:{open:function(){return""},close:function(){return"<br/>"}},LN:{open:function(e){return'<a href="'+e.url+'">'},close:function(e){return"</a>"},props:function(e){return{href:e.url,target:"_blank"}}},MN:{open:function(e){return'<a href="#'+e.val+'">'},close:function(e){return"</a>"},props:function(e){return{name:e.val}}},HT:{open:function(e){return'<a href="#'+e.val+'">'},close:function(e){return"</a>"},props:function(e){return{name:e.val}}},IM:{open:function(e){var t=a(e.val,e.mime),n=e.ref?e.ref:t,r=(e.name?'<a href="'+n+'" download="'+e.name+'">':"")+'<img src="'+t+'"'+(e.width?' width="'+e.width+'"':"")+(e.height?' height="'+e.height+'"':"")+' border="0" />';return console.log("open: "+r),r},close:function(e){return e.name?"</a>":""},props:function(e){return{src:a(e.val,e.mime),title:e.name,"data-width":e.width,"data-height":e.height,"data-name":e.name,"data-size":.75*e.val.length|0,"data-mime":e.mime}}}},l=function(){};l.parse=function(e){if("string"!=typeof e)return null;var t=[],r={},o=[];e.split(/\r?\n/).map(function(e){var a,s,l=[];if(n.map(function(t){l=l.concat(function(e,t,n,r){for(var i=[],o=0,a=e.slice(0);a.length>0;){var s=t.exec(a);if(null==s)break;var l=s.index+s[0].lastIndexOf(s[1]);a=a.slice(l+1),o=(l+=o)+1;var u=n?n.exec(a):null;if(null==u)break;var c=u.index+u[0].indexOf(u[1]);a=a.slice(c+1),o=(c+=o)+1,i.push({text:e.slice(l+1,c),children:[],start:l,end:c,type:r})}return i}(e,t.start,t.end,t.name))}),0==l.length)s={txt:e};else{l.sort(function(e,t){return e.start-t.start}),l=function e(t){if(0==t.length)return[];for(var n=[t[0]],r=t[0],i=1;i<t.length;i++)t[i].start>r.end?(n.push(t[i]),r=t[i]):t[i].end<r.end&&r.children.push(t[i]);for(var i in n)n[i].children=e(n[i].children);return n}(l);var u=function e(t,n){var r="",i=[];for(var o in t){var a=t[o];if(!a.text){var s=e(a.children,r.length+n);a.text=s.txt,i=i.concat(s.fmt)}a.type&&i.push({at:r.length+n,len:a.text.length,tp:a.type}),r+=a.text}return{txt:r,fmt:i}}(function e(t,n,r,i){var o=[];if(0==i.length)return[];for(var a in i){var s=i[a];s.start>n&&o.push({text:t.slice(n,s.start)});var l={type:s.type},u=e(t,s.start+1,s.end-1,s.children);u.length>0?l.children=u:l.text=s.text,o.push(l),n=s.end+1}return n<r&&o.push({text:t.slice(n,r)}),o}(e,0,e.length,l),0);s={txt:u.txt,fmt:u.fmt}}if((a=function(e){var t,n=[];if(i.map(function(r){for(;null!==(t=r.re.exec(e));)n.push({offset:t.index,len:t[0].length,unique:t[0],data:r.pack(t[0]),type:r.name})}),0==n.length)return n;n.sort(function(e,t){return e.offset-t.offset});var r=-1;return n=n.filter(function(e){var t=e.offset>r;return r=e.offset+e.len,t})}(s.txt)).length>0){var c=[];for(var d in a){var p=a[d],f=r[p.unique];f||(f=t.length,r[p.unique]=f,t.push({tp:p.type,data:p.data})),c.push({at:p.offset,len:p.len,key:f})}s.ent=c}o.push(s)});var a={txt:""};if(o.length>0){a.txt=o[0].txt,a.fmt=(o[0].fmt||[]).concat(o[0].ent||[]);for(var s=1;s<o.length;s++){var l=o[s],u=a.txt.length+1;a.fmt.push({tp:"BR",len:1,at:u-1}),a.txt+=" "+l.txt,l.fmt&&(a.fmt=a.fmt.concat(l.fmt.map(function(e){return e.at+=u,e}))),l.ent&&(a.fmt=a.fmt.concat(l.ent.map(function(e){return e.at+=u,e})))}0==a.fmt.length&&delete a.fmt,t.length>0&&(a.ent=t)}return a},l.insertImage=function(e,t,n,r,i,o,a,s,l){return(e=e||{txt:" "}).ent=e.ent||[],e.fmt=e.fmt||[],e.fmt.push({at:t,len:1,key:e.ent.length}),e.ent.push({tp:"IM",data:{mime:n,val:r,width:i,height:o,name:a,ref:l,size:0|s}}),e},l.attachFile=function(e,t,n,r,i,o){(e=e||{txt:""}).ent=e.ent||[],e.fmt=e.fmt||[],e.fmt.push({at:-1,len:0,key:e.ent.length});var a={tp:"EX",data:{mime:t,val:n,name:r,ref:o,size:0|i}};return o instanceof Promise&&(a.data.ref=o.then(function(e){a.data.ref=e},function(e){})),e.ent.push(a),e},l.UNSAFE_toHTML=function(e){var t,n,r,i=e.txt,o=e.fmt,a=e.ent,l=[];if(o)for(var u in o){var c,d=o[u],p=d.tp;if(!p){var f=a[d.key];f&&(p=f.tp,c=f.data)}s[p]&&(l.push({idx:d.at+d.len,what:s[p].close(c)}),l.push({idx:d.at,what:s[p].open(c)}))}for(var u in l.sort(function(e,t){return t.idx-e.idx}),l)l[u].what&&(t=i,n=l[u].idx,r=l[u].what,i=t.slice(0,n)+r+t.slice(n));return i},l.format=function(e,t,n){var r=e.txt,i=e.fmt,a=e.ent;if(r=r||"",!i)return[r];var s=[].concat(i);return s.map(function(e){e.at=e.at||0,e.len=e.len||0}),s.sort(function(e,t){return e.at-t.at==0?t.len-e.len:e.at-t.at}),s=s.map(function(e){var t,n=e.tp;return n||(e.key=e.key||0,t=a[e.key].data,n=a[e.key].tp),{tp:n,data:t,at:e.at,len:e.len}}),function e(t,n,r,i,a,s){for(var l=[],u=0;u<i.length;u++){var c=i[u];n<c.at&&(l.push(a.call(s,null,void 0,t.slice(n,c.at))),n=c.at);for(var d=[],p=u+1;p<i.length&&i[p].at<c.at+c.len;p++)d.push(i[p]),u=p;var f=o[c.tp]||{};l.push(a.call(s,c.tp,c.data,f.isVoid?null:e(t,n,c.at+c.len,d,a,s))),n=c.at+c.len}return n<r&&l.push(a.call(s,null,void 0,t.slice(n,r))),l}(r,0,r.length,s,t,n)},l.toPlainText=function(e){return"string"==typeof e?e:e.txt},l.isPlainText=function(e){return"string"==typeof e||!(e.fmt||e.ent)},l.hasAttachments=function(e){if(e.ent&&e.ent.length>0)for(var t in e.ent)if("EX"==e.ent[t].tp)return!0;return!1},l.attachments=function(e,t,n){if(e.ent&&e.ent.length>0)for(var r in e.ent)"EX"==e.ent[r].tp&&t.call(n,e.ent[r].data,r)},l.getDownloadUrl=function(e){var t=null;return e.val?t=a(e.val,e.mime):"string"==typeof e.ref&&(t=e.ref),t},l.isUploading=function(e){return e.ref instanceof Promise},l.getPreviewUrl=function(e){return e.val?a(e.val,e.mime):null},l.getEntitySize=function(e){return e.size?e.size:e.val?.75*e.val.length|0:0},l.getEntityMimeType=function(e){return e.mime||"text/plain"},l.tagName=function(e){return o[e]?o[e].name:void 0},l.attrValue=function(e,t){if(t&&s[e])return s[e].props(t)},l.getContentType=function(){return"text/x-drafty"},t.exports=l,t=t.exports;var u={exports:{}};return function(n){"use strict";function r(e){return(r="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)}if("function"==typeof e)var i="0.15.8";var o;"undefined"!=typeof WebSocket&&(o=WebSocket),"undefined"==typeof btoa&&(n.btoa=function(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n="",r=0,i=0,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.charAt(0|i)||(o="=",i%1);n+=o.charAt(63&r>>8-i%1*8)){if((e=t.charCodeAt(i+=.75))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|e}return n}),"undefined"==typeof atob&&(n.atob=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/=+$/,""),t="";if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r=0,i=0,o=0;n=e.charAt(o++);~n&&(i=r%4?64*i+n:n,r++%4)?t+=String.fromCharCode(255&i>>(-2*r&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return t}),"undefined"==typeof window&&(n.window={WebSocket:o,URL:{createObjectURL:function(){throw new Error("Unable to use window.URL in a non browser application")}}});var a="0",s=i||"0.15",l="tinodejs/"+s,c=503,d="Connection failed";function p(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}function f(e,t,n){if(null==t)return e;if("object"!=r(t))return t||e;if(t instanceof Date)return t;if(t instanceof E)return new E(t);if(t instanceof Array)return t.length>0?t:e;for(var i in e||(e=t.constructor()),t)!t.hasOwnProperty(i)||!t[i]&&!1!==t[i]||n&&n[i]||"_generated"==i||(e[i]=f(e[i],t[i]));return e}function h(e,t,n,r){return e[t]=f(e[t],n,r),e[t]}function m(){var e=null;if("withCredentials"in new XMLHttpRequest)e=new XMLHttpRequest;else{if("undefined"==typeof XDomainRequest)throw new Error("Browser not supported");e=new XDomainRequest}return e}function v(e,t){if("ts"===e&&"string"==typeof t&&t.length>=20&&t.length<=24){var n=new Date(t);if(n)return n}else if("acs"===e&&"object"===r(t))return new E(t);return t}function g(e,t){return"string"==typeof t&&t.length>128?"<"+t.length+", bytes: "+t.substring(0,12)+"..."+t.substring(t.length-12)+">":function(e,t){if(t instanceof Date)t=function(e){if(e&&0!=e.getTime()){var t=e.getUTCMilliseconds();return e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+(t?"."+n(t,3):"")+"Z"}function n(e,t){return"0".repeat((t=t||2)-(""+e).length)+e}}(t);else if(null==t||!1===t||Array.isArray(t)&&0==t.length||"object"==r(t)&&0==Object.keys(t).length)return;return t}(0,t)}function y(e,t,n){var r=null;return"http"!==t&&"https"!==t&&"ws"!==t&&"wss"!==t||(r=t+"://","/"!==(r+=e).charAt(r.length-1)&&(r+="/"),r+="v"+a+"/channels","http"!==t&&"https"!==t||(r+="/lp"),r+="?apikey="+n),r}var b=function(e,t,n,i,a){var s=this,l=e,u=i,p=t,f=a,h=2e3,g=10,b=.3,w=null,_=0,E=!1,k=function(e){s.logger&&s.logger(e)};function S(e){var t=null;e.connect=function(n){return t&&1===t.readyState?Promise.resolve():(n&&(l=n),new Promise(function(n,r){var i=y(l,u?"wss":"ws",p);k("Connecting to: "+i);var a=new o(i);a.onopen=function(t){E=!1,e.onOpen&&e.onOpen(),n(),f&&(clearTimeout(w),w=null,_=0)},a.onclose=function(n){t=null,e.onDisconnect&&e.onDisconnect(null),!E&&f&&function(){var e=this;clearTimeout(w);var t=h*(Math.pow(2,_)*(1+b*Math.random()));_=_>=g?_:_+1,w=setTimeout(function(){k("Reconnecting, iter="+_+", timeout="+t),E||e.connect().catch(function(){})},t)}.call(e)},a.onerror=function(e){r(e)},a.onmessage=function(t){e.onMessage&&e.onMessage(t.data)},t=a}))},e.disconnect=function(){t&&(E=!0,t.close()),t=null},e.sendText=function(e){if(!t||t.readyState!=t.OPEN)throw new Error("Websocket is not connected");t.send(e)},e.isConnected=function(){return t&&1===t.readyState},e.transport=function(){return"ws"}}function T(e){var t=null,n=null,r=null;e.connect=function(r){return n?Promise.resolve():(r&&(l=r),new Promise(function(r,i){var o=y(l,u?"https":"http",p);k("Connecting to: "+o),(n=function n(r,i,o){var a=m();return a.onreadystatechange=function(s){if(4==a.readyState)if(201==a.status){var l=JSON.parse(a.responseText,v);a.responseText,t=r+"&sid="+l.ctrl.params.sid,(a=n(t)).send(null),e.onOpen&&e.onOpen(),i&&i()}else if(200==a.status)e.onMessage&&e.onMessage(a.responseText),(a=n(t)).send(null);else if(o&&o(a.responseText),e.onMessage&&a.responseText&&e.onMessage(a.responseText),e.onDisconnect){var u=a.status||c,p=a.responseText||d;e.onDisconnect(new Error(p+"("+u+")"))}},a.open("GET",r,!0),a}(o,r,i)).send(null)}).catch(function(){}))},e.disconnect=function(){r&&(r.onreadystatechange=void 0,r.abort(),r=null),n&&(n.onreadystatechange=void 0,n.abort(),n=null),e.onDisconnect&&e.onDisconnect(null),t=null},e.sendText=function(e){var n,i;if(n=t,(i=m()).onreadystatechange=function(e){if(4==i.readyState&&i.status>=400)throw new Error("LP sender failed, "+i.status)},i.open("POST",n,!0),!(r=i)||1!=r.readyState)throw new Error("Long poller failed to connect");r.send(e)},e.isConnected=function(){return n&&!0},e.transport=function(){return"lp"}}"lp"===n?T(this):"ws"===n?S(this):"object"==("undefined"==typeof window?"undefined":r(window))&&window.WebSocket?S(this):T(this),this.onMessage=void 0,this.onDisconnect=void 0,this.onOpen=void 0,this.logger=void 0},w=function(e,t,n,i,o){var a=this;this._appName=e||"Undefined",this._apiKey=n,this._browser="",this._platform="undefined",this._humanLanguage="xx","undefined"!=typeof navigator&&(this._browser=function(e){var t,n=(e=(e||"").replace(" (KHTML, like Gecko)","")).match(/(AppleWebKit\/[.\d]+)/i);if(n){for(var r=["chrome","safari","mobile","version"],i=e.substr(n.index+n[0].length).split(" "),o=[],a=0;a<i.length;a++){var s=/([\w.]+)[\/]([\.\d]+)/.exec(i[a]);s&&o.push([s[1],s[2],r.findIndex(function(e){return e==s[1].toLowerCase()})])}o.sort(function(e,t){var n=e[2]-t[2];return 0!=n?n:t[0].length-e[0].length}),t=o.length>0?o[0][0]+"/"+o[0][1]:n[1]}else t=/trident/i.test(e)?(n=/(?:\brv[ :]+([.\d]+))|(?:\bMSIE ([.\d]+))/g.exec(e))?"MSIE/"+(n[1]||n[2]):"MSIE/?":/firefox/i.test(e)?(n=/Firefox\/([.\d]+)/g.exec(e))?"Firefox/"+n[1]:"Firefox/?":/presto/i.test(e)?(n=/Opera\/([.\d]+)/g.exec(e))?"Opera/"+n[1]:"Opera/?":(n=/([\w.]+)\/([.\d]+)/.exec(e))?n[1]+"/"+n[2]:(n=e.split(" "))[0];if((n=t.split("/")).length>1){var l=n[1].split(".");t=n[0]+"/"+l[0]+(l[1]?"."+l[1]:"")}return t}(navigator.userAgent),this._platform=navigator.platform,this._humanLanguage=navigator.language||"en-US"),this._loggingEnabled=!1,this._trimLongStrings=!1,this._myUID=null,this._authenticated=!1,this._login=null,this._authToken=null,this._inPacketCount=0,this._messageId=Math.floor(65535*Math.random()+65535),this._serverInfo=null,this._deviceToken=null,this._pendingPromises={},this._connection=new b(t,n,i,o,!0),this.logger=function(e){if(a._loggingEnabled){var t=new Date,n=("0"+t.getUTCHours()).slice(-2)+":"+("0"+t.getUTCMinutes()).slice(-2)+":"+("0"+t.getUTCSeconds()).slice(-2)+":"+("0"+t.getUTCMilliseconds()).slice(-3);console.log("["+n+"] "+e)}},this._connection.logger=this.logger,this._cache={};var u=this.cachePut=function(e,t,n){a._cache[e+":"+t]=n},p=this.cacheGet=function(e,t){return a._cache[e+":"+t]},h=this.cacheDel=function(e,t){delete a._cache[e+":"+t]},m=this.cacheMap=function(e,t){for(var n in a._cache)if(e(a._cache[n],n,t))break};this.attachCacheToTopic=function(e){e._tinode=a,e._cacheGetUser=function(e){var t=p("user",e);if(t)return{user:e,public:f({},t)}},e._cachePutUser=function(e,t){return u("user",e,f({},t.public))},e._cacheDelUser=function(e){return h("user",e)},e._cachePutSelf=function(){return u("topic",e.name,e)},e._cacheDelSelf=function(){return h("topic",e.name)}};var y=function(e,t,n,r){var i=a._pendingPromises[e];i&&(delete a._pendingPromises[e],t>=200&&t<400?i.resolve&&i.resolve(n):i.reject&&i.reject(new Error("Error: "+r+" ("+t+")")))},w=this.getNextUniqueId=function(){return 0!=a._messageId?""+a._messageId++:void 0};this.initPacket=function(e,t){switch(e){case"hi":return{hi:{id:w(),ver:s,ua:a._appName+" ("+(a._browser?a._browser+"; ":"")+a._platform+"); "+l,dev:a._deviceToken,lang:a._humanLanguage}};case"acc":return{acc:{id:w(),user:null,scheme:null,secret:null,login:!1,tags:null,desc:{},cred:{}}};case"login":return{login:{id:w(),scheme:null,secret:null}};case"sub":return{sub:{id:w(),topic:t,set:{},get:{}}};case"leave":return{leave:{id:w(),topic:t,unsub:!1}};case"pub":return{pub:{id:w(),topic:t,noecho:!1,head:null,content:{}}};case"get":return{get:{id:w(),topic:t,what:null,desc:{},sub:{},data:{}}};case"set":return{set:{id:w(),topic:t,desc:{},sub:{},tags:[]}};case"del":return{del:{id:w(),topic:t,what:null,delseq:null,user:null,hard:!1}};case"note":return{note:{topic:t,what:null,seq:void 0}};default:throw new Error("Unknown packet type requested: "+e)}},this.send=function(e,t){var n;t&&(n=function(e){var t=null;return e&&(t=new Promise(function(t,n){a._pendingPromises[e]={resolve:t,reject:n}})),t}(t)),e=function e(t){return Object.keys(t).forEach(function(n){"_"==n[0]?delete t[n]:t[n]?Array.isArray(t[n])&&0==t[n].length?delete t[n]:t[n]?"object"!=r(t[n])||t[n]instanceof Date||(e(t[n]),0==Object.getOwnPropertyNames(t[n]).length&&delete t[n]):delete t[n]:delete t[n]}),t}(e);var i=JSON.stringify(e);a.logger("out: "+(a._trimLongStrings?JSON.stringify(e,g):i));try{a._connection.sendText(i)}catch(e){if(!t)throw e;y(t,c,null,e.message)}return n},this.loginSuccessful=function(e){e.params&&e.params.user&&(a._myUID=e.params.user,a._authenticated=e&&e.code>=200&&e.code<300,e.params&&e.params.token&&e.params.expires?a._authToken={token:e.params.token,expires:new Date(e.params.expires)}:a._authToken=null,a.onLogin&&a.onLogin(e.code,e.text))},this._connection.onMessage=function(e){if(e){a._inPacketCount++,a.onRawMessage&&a.onRawMessage(e);var t=JSON.parse(e,v);if(t)if(a.logger("in: "+(a._trimLongStrings?JSON.stringify(t,g):e)),a.onMessage&&a.onMessage(t),t.ctrl)a.onCtrlMessage&&a.onCtrlMessage(t.ctrl),t.ctrl.id&&y(t.ctrl.id,t.ctrl.code,t.ctrl,t.ctrl.text),t.ctrl.params&&"data"==t.ctrl.params.what&&(n=p("topic",t.ctrl.topic))&&n._allMessagesReceived(t.ctrl.params.count);else if(t.meta)(n=p("topic",t.meta.topic))&&n._routeMeta(t.meta),a.onMetaMessage&&a.onMetaMessage(t.meta);else if(t.data)(n=p("topic",t.data.topic))&&n._routeData(t.data),a.onDataMessage&&a.onDataMessage(t.data);else if(t.pres)(n=p("topic",t.pres.topic))&&n._routePres(t.pres),a.onPresMessage&&a.onPresMessage(t.pres);else if(t.info){var n;(n=p("topic",t.info.topic))&&n._routeInfo(t.info),a.onInfoMessage&&a.onInfoMessage(t.info)}else a.logger("ERROR: Unknown packet received.");else a.logger("in: "+e),a.logger("ERROR: failed to parse data")}},this._connection.onOpen=function(){a.hello()},this._connection.onDisconnect=function(e){for(var t in a._inPacketCount=0,a._serverInfo=null,a._authenticated=!1,a._pendingPromises){var n=a._pendingPromises[t];n&&n.reject&&n.reject(new Error(d+" ("+c+")"))}a._pendingPromises={},m(function(e,t){0===t.lastIndexOf("topic:",0)&&e._resetSub()}),a.onDisconnect&&a.onDisconnect(e)}};w.credential=function(e,t,n,i){if("object"==r(e)){var o=e;t=o.val,n=o.params,i=o.resp,e=o.meth}return e&&(t||i)?[{meth:e,val:t,resp:i,params:n}]:null},w.topicType=function(e){return{me:"me",fnd:"fnd",grp:"grp",new:"grp",usr:"p2p"}["string"==typeof e?e.substring(0,3):"xxx"]},w.isNewGroupTopicName=function(e){return"string"==typeof e&&"new"==e.substring(0,3)},w.getVersion=function(){return s},w.setWebSocketProvider=function(e){o=e},w.getLibrary=function(){return l},w.MESSAGE_STATUS_NONE=0,w.MESSAGE_STATUS_QUEUED=1,w.MESSAGE_STATUS_SENDING=2,w.MESSAGE_STATUS_FAILED=3,w.MESSAGE_STATUS_SENT=4,w.MESSAGE_STATUS_RECEIVED=5,w.MESSAGE_STATUS_READ=6,w.MESSAGE_STATUS_TO_ME=7,w.DEL_CHAR="␡",w.prototype={connect:function(e){return this._connection.connect(e)},disconnect:function(){this._connection&&this._connection.disconnect()},isConnected:function(){return this._connection&&this._connection.isConnected()},isAuthenticated:function(){return this._authenticated},account:function(e,t,n,r,i){var o=this.initPacket("acc");return o.acc.user=e,o.acc.scheme=t,o.acc.secret=n,o.acc.login=r,i&&(o.acc.desc.defacs=i.defacs,o.acc.desc.public=i.public,o.acc.desc.private=i.private,o.acc.tags=i.tags,o.acc.cred=i.cred,o.acc.token=i.token),this.send(o,o.acc.id)},createAccount:function(e,t,n,r){var i=this,o=this.account("new",e,t,n,r);return n&&(o=o.then(function(e){return i.loginSuccessful(e),e})),o},createAccountBasic:function(e,t,n){return e=e||"",t=t||"",this.createAccount("basic",p(e+":"+t),!0,n)},updateAccountBasic:function(e,t,n,r){return t=t||"",n=n||"",this.account(e,"basic",p(t+":"+n),!1,r)},hello:function(){var e=this,t=this.initPacket("hi");return this.send(t,t.hi.id).then(function(t){return t.params&&(e._serverInfo=t.params),e.onConnect&&e.onConnect(),t}).catch(function(t){e.onDisconnect&&e.onDisconnect(t)})},setDeviceToken:function(e,t){var n=!1;return e&&e!=this._deviceToken&&(this._deviceToken=e,t&&this.isConnected()&&this.isAuthenticated()&&(this.send({hi:{dev:e}}),n=!0)),n},login:function(e,t,n){var r=this,i=this.initPacket("login");return i.login.scheme=e,i.login.secret=t,i.login.cred=n,this.send(i,i.login.id).then(function(e){return r.loginSuccessful(e),e})},loginBasic:function(e,t,n){var r=this;return this.login("basic",p(e+":"+t),n).then(function(t){return r._login=e,t})},loginToken:function(e,t){return this.login("token",e,t)},requestResetAuthSecret:function(e,t,n){return this.login("reset",p(e+":"+t+":"+n))},getAuthToken:function(){return this._authToken&&this._authToken.expires.getTime()>Date.now()?this._authToken:(this._authToken=null,null)},setAuthToken:function(e){this._authToken=e},subscribe:function(e,t,n){var r=this.initPacket("sub",e);return e||(e="new"),r.sub.get=t,n&&(n.sub&&(r.sub.set.sub=n.sub),w.isNewGroupTopicName(e)&&n.desc&&(r.sub.set.desc=n.desc),n.tags&&(r.sub.set.tags=n.tags)),this.send(r,r.sub.id)},leave:function(e,t){var n=this.initPacket("leave",e);return n.leave.unsub=t,this.send(n,n.leave.id)},createMessage:function(e,n,r){var i=this.initPacket("pub",e),o="string"==typeof n?t.parse(n):n;return o&&!t.isPlainText(o)&&(i.pub.head={mime:t.getContentType()},n=o),i.pub.noecho=r,i.pub.content=n,i.pub},publish:function(e,t,n){return this.publishMessage(this.createMessage(e,t,n))},publishMessage:function(e){return(e=Object.assign({},e)).seq=void 0,e.from=void 0,e.ts=void 0,this.send({pub:e},e.id)},getMeta:function(e,t){var n=this.initPacket("get",e);return n.get=f(n.get,t),this.send(n,n.get.id)},setMeta:function(e,t){var n=this.initPacket("set",e),r=[];return t&&["desc","sub","tags"].map(function(e){t.hasOwnProperty(e)&&(r.push(e),n.set[e]=t[e])}),0==r.length?Promise.reject(new Error("Invalid {set} parameters")):this.send(n,n.set.id)},delMessages:function(e,t,n){var r=this.initPacket("del",e);return r.del.what="msg",r.del.delseq=t,r.del.hard=n,this.send(r,r.del.id)},delTopic:function(e){var t=this,n=this.initPacket("del",e);return n.del.what="topic",this.send(n,n.del.id).then(function(n){return t.cacheDel("topic",e),t.ctrl})},delSubscription:function(e,t){var n=this.initPacket("del",e);return n.del.what="sub",n.del.user=t,this.send(n,n.del.id)},note:function(e,t,n){if(n<=0||n>=268435455)throw new Error("Invalid message id "+n);var r=this.initPacket("note",e);r.note.what=t,r.note.seq=n,this.send(r)},noteKeyPress:function(e){var t=this.initPacket("note",e);t.note.what="kp",this.send(t)},getTopic:function(e){var t=this.cacheGet("topic",e);return!t&&e&&(t="me"==e?new S:"fnd"==e?new T:new k(e),this.cachePut("topic",e,t),this.attachCacheToTopic(t)),t},newTopic:function(e){var t=new k("new",e);return this.attachCacheToTopic(t),t},newGroupTopicName:function(){return"new"+this.getNextUniqueId()},newTopicWith:function(e,t){var n=new k(e,t);return this.attachCacheToTopic(n),n},getMeTopic:function(){return this.getTopic("me")},getFndTopic:function(){return this.getTopic("fnd")},getLargeFileHelper:function(){return new C(this)},getCurrentUserID:function(){return this._myUID},getCurrentLogin:function(){return this._login},getServerInfo:function(){return this._serverInfo},enableLogging:function(e,t){this._loggingEnabled=e,this._trimLongStrings=e&&t},isTopicOnline:function(e){var t=this.getMeTopic(),n=t&&t.getContact(e);return n&&n.online},wantAkn:function(e){this._messageId=e?Math.floor(16777215*Math.random()+16777215):0},onWebsocketOpen:void 0,onConnect:void 0,onDisconnect:void 0,onLogin:void 0,onCtrlMessage:void 0,onDataMessage:void 0,onPresMessage:void 0,onMessage:void 0,onRawMessage:void 0};var _=function(e){this.topic=e;var t=e._tinode.getMeTopic();this.contact=t&&t.getContact(e.name),this.what={}};_.prototype={_get_ims:function(){var e=this.contact&&this.contact.updated,t=this.topic._lastDescUpdate||0;return e>t?e:t},withData:function(e,t,n){return this.what.data={since:e,before:t,limit:n},this},withLaterData:function(e){return this.withData(this.topic._maxSeq>0?this.topic._maxSeq+1:void 0,void 0,e)},withEarlierData:function(e){return this.withData(void 0,this.topic._minSeq>0?this.topic._minSeq:void 0,e)},withDesc:function(e){return this.what.desc={ims:e},this},withLaterDesc:function(){return this.withDesc(this._get_ims())},withSub:function(e,t,n){var r={ims:e,limit:t};return"me"==this.topic.getType()?r.topic=n:r.user=n,this.what.sub=r,this},withOneSub:function(e,t){return this.withSub(e,void 0,t)},withLaterOneSub:function(e){return this.withOneSub(this.topic._lastSubsUpdate,e)},withLaterSub:function(e){return this.withSub("p2p"==this.topic.getType()?this._get_ims():this.topic._lastSubsUpdate,e)},withTags:function(){return this.what.tags=!0,this},withDel:function(e,t){return(e||t)&&(this.what.del={since:e,limit:t}),this},withLaterDel:function(e){return this.withDel(this.topic._maxSeq>0?this.topic._maxDel+1:void 0,e)},build:function(){var e={},t=[],n=this;return["data","sub","desc","tags","del"].map(function(r){n.what.hasOwnProperty(r)&&(t.push(r),Object.getOwnPropertyNames(n.what[r]).length>0&&(e[r]=n.what[r]))}),t.length>0?e.what=t.join(" "):e=void 0,e}};var E=function e(t){t&&(this.given="number"==typeof t.given?t.given:e.decode(t.given),this.want="number"==typeof t.want?t.want:e.decode(t.want),this.mode=t.mode?"number"==typeof t.mode?t.mode:e.decode(t.mode):this.given&this.want)};E._NONE=0,E._JOIN=1,E._READ=2,E._WRITE=4,E._PRES=8,E._APPROVE=16,E._SHARE=32,E._DELETE=64,E._OWNER=128,E._BITMASK=E._JOIN|E._READ|E._WRITE|E._PRES|E._APPROVE|E._SHARE|E._DELETE|E._OWNER,E._INVALID=1048576,E.decode=function(e){if(!e)return null;if("number"==typeof e)return e&E._BITMASK;if("N"===e||"n"===e)return E._NONE;for(var t={J:E._JOIN,R:E._READ,W:E._WRITE,P:E._PRES,A:E._APPROVE,S:E._SHARE,D:E._DELETE,O:E._OWNER},n=E._NONE,r=0;r<e.length;r++){var i=t[e.charAt(r).toUpperCase()];i&&(n|=i)}return n},E.encode=function(e){if(null===e||e===E._INVALID)return null;if(e===E._NONE)return"N";for(var t=["J","R","W","P","A","S","D","O"],n="",r=0;r<t.length;r++)0!=(e&1<<r)&&(n+=t[r]);return n},E.update=function(e,t){if(!t||"string"!=typeof t)return e;var n=t.charAt(0);if("+"==n||"-"==n){for(var r=e,i=t.split(/([-+])/),o=1;o<i.length-1;o+=2){n=i[o];var a=E.decode(i[o+1]);if(a==E._INVALID)return e;null!=a&&("+"===n?r|=a:"-"===n&&(r&=~a))}e=r}else(r=E.decode(t))!=E._INVALID&&(e=r);return e},E.prototype={setMode:function(e){return this.mode=E.decode(e),this},updateMode:function(e){return this.mode=E.update(this.mode,e),this},getMode:function(){return E.encode(this.mode)},setGiven:function(e){return this.given=E.decode(e),this},updateGiven:function(e){return this.given=E.update(this.given,e),this},getGiven:function(){return E.encode(this.given)},setWant:function(e){return this.want=E.decode(e),this},updateWant:function(e){return this.want=E.update(this.want,e),this},getWant:function(){return E.encode(this.want)},updateAll:function(e){return e&&(this.updateGiven(e.given),this.updateWant(e.want),this.mode=this.given&this.want),this},isOwner:function(){return 0!=(this.mode&E._OWNER)},isMuted:function(){return 0==(this.mode&E._PRES)},isPresencer:function(){return 0!=(this.mode&E._PRES)},isJoiner:function(){return 0!=(this.mode&E._JOIN)},isReader:function(){return 0!=(this.mode&E._READ)},isWriter:function(){return 0!=(this.mode&E._WRITE)},isApprover:function(){return 0!=(this.mode&E._APPROVE)},isAdmin:function(){return this.isOwner()||this.isApprover()},isSharer:function(){return 0!=(this.mode&E._SHARE)},isDeleter:function(){return 0!=(this.mode&E._DELETE)}};var k=function(e,t){this._tinode=null,this.name=e,this.created=null,this.updated=null,this.touched=null,this.acs=new E(null),this.private=null,this.public=null,this._users={},this._queuedSeqId=268435455,this._maxSeq=0,this._minSeq=0,this._noEarlierMsgs=!1,this._maxDel=0,this._tags=[],this._messages=function(e){var t=[];function n(t,n,r){for(var i=0,o=n.length-1,a=0,s=0,l=!1;i<=o;)if((s=e(n[a=(i+o)/2|0],t))<0)i=a+1;else{if(!(s>0)){l=!0;break}o=a-1}return l?a:r?-1:s<0?a+1:a}function r(e,t){var r=n(e,t,!1);return t.splice(r,0,e),t}return e=e||function(e,t){return e===t?0:e<t?-1:1},{getAt:function(e){return t[e]},put:function(){var e;for(var n in e=1==arguments.length&&Array.isArray(arguments[0])?arguments[0]:arguments)r(e[n],t)},delAt:function(e){var n=t.splice(e,1);if(n&&n.length>0)return n[0]},delRange:function(e,n){return t.splice(e,n-e)},size:function(){return t.length},reset:function(e){t=[]},forEach:function(e,n,r,i){n|=0,r=r||t.length;for(var o=n;o<r;o++)e.call(i,t[o],o)},find:function(e,r){return n(e,t,!r)}}}(function(e,t){return e.seq-t.seq}),this._subscribed=!1,this._lastDescUpdate=null,this._lastSubsUpdate=null,this._new=!0,t&&(this.onData=t.onData,this.onMeta=t.onMeta,this.onPres=t.onPres,this.onInfo=t.onInfo,this.onMetaDesc=t.onMetaDesc,this.onMetaSub=t.onMetaSub,this.onSubsUpdated=t.onSubsUpdated,this.onTagsUpdated=t.onTagsUpdated,this.onDeleteTopic=t.onDeleteTopic,this.onAllMessagesReceived=t.onAllMessagesReceived)};k.prototype={isSubscribed:function(){return this._subscribed},subscribe:function(e,t){var n=this;if(this._subscribed)return Promise.resolve(this);var r=this.name;return this._tinode.subscribe(r||"new",e,t).then(function(e){if(e.code>=300)return e;if(n._subscribed=!0,n.acs=e.params&&e.params.acs?e.params.acs:n.acs,n._new){n._new=!1,n.name=e.topic,n.created=e.ts,n.updated=e.ts,n.touched=e.ts,n._cachePutSelf();var r=n._tinode.getMeTopic();r&&r._processMetaSub([{_generated:!0,topic:n.name,created:e.ts,updated:e.ts,touched:e.ts,acs:n.acs}]),t&&t.desc&&(t.desc._generated=!0,n._processMetaDesc(t.desc))}return e})},createMessage:function(e,t){return this._tinode.createMessage(this.name,e,t)},publish:function(e,t){return this.publishMessage(this.createMessage(e,t))},publishMessage:function(e){var n=this;if(!this._subscribed)return Promise.reject(new Error("Cannot publish on inactive topic"));if(t.hasAttachments(e.content)&&!e.head.attachments){var r=[];t.attachments(e.content,function(e){r.push(e.ref)}),e.head.attachments=r}return e._sending=!0,this._tinode.publishMessage(e).then(function(t){return e._sending=!1,e.seq=t.params.seq,e.ts=t.ts,n._routeData(e),t}).catch(function(t){e._sending=!1,e._failed=!0})},publishDraft:function(e,t){var n=this;if(!t&&!this._subscribed)return Promise.reject(new Error("Cannot publish on inactive topic"));var r=e.seq||this._getQueuedSeqId();return e._generated||(e._generated=!0,e.seq=r,e.ts=new Date,e.from=this._tinode.getCurrentUserID(),e.noecho=!0,this._messages.put(e),this.onData&&this.onData(e)),(t||Promise.resolve()).then(function(){return e._cancelled?{code:300,text:"cancelled"}:n.publishMessage(e)},function(t){e._sending=!1,n._messages.delAt(n._messages.find(e)),n.onData&&n.onData()})},leave:function(e){var t=this;return this._subscribed||e?this._tinode.leave(this.name,e).then(function(n){return t._resetSub(),e&&t._gone(),n}):Promise.reject(new Error("Cannot leave inactive topic"))},getMeta:function(e){return this._subscribed?this._tinode.getMeta(this.name,e):Promise.reject(new Error("Cannot query inactive topic"))},getMessagesPage:function(e,t){var n=this,r=this.startMetaQuery();t?r.withLaterData(e):r.withEarlierData(e);var i=this.getMeta(r.build());return t||(i=i.then(function(e){e&&e.params&&!e.params.count&&(n._noEarlierMsgs=!0)})),i},setMeta:function(e){var t=this;return this._subscribed?(e.tags&&(e.tags=function(e){var t=[];if(Array.isArray(e)){for(var n=0,r=e.length;n<r;n++){var i=e[n];i&&(i=i.trim().toLowerCase()).length>1&&t.push(i)}t.sort().filter(function(e,t,n){return!t||e!=n[t-1]})}return 0==t.length&&t.push(w.DEL_CHAR),t}(e.tags)),this._tinode.setMeta(this.name,e).then(function(n){return n&&n.code>=300?n:(e.sub&&(n.params&&n.params.acs&&(e.sub.acs=n.params.acs,e.sub.updated=n.ts),e.sub.user||(e.sub.user=t._tinode.getCurrentUserID(),e.desc||(e.desc={})),e.sub._generated=!0,t._processMetaSub([e.sub])),e.desc&&(n.params&&n.params.acs&&(e.desc.acs=n.params.acs,e.desc.updated=n.ts),t._processMetaDesc(e.desc)),e.tags&&t._processMetaTags(e.tags),n)})):Promise.reject(new Error("Cannot update inactive topic"))},invite:function(e,t){return this.setMeta({sub:{user:e,mode:t}})},delMessages:function(e,t){var n=this;if(!this._subscribed)return Promise.reject(new Error("Cannot delete messages in inactive topic"));e.sort(function(e,t){return e.low<t.low||e.low==t.low&&(!t.hi||e.hi>=t.hi)});var r=e.reduce(function(e,t){return t.low<268435455&&(!t.hi||t.hi<268435455?e.push(t):e.push({low:t.low,hi:n._maxSeq+1})),e},[]);return(e.length>0?this._tinode.delMessages(this.name,r,t):Promise.resolve({params:{del:0}})).then(function(t){return t.params.del>n._maxDel&&(n._maxDel=t.params.del),e.map(function(e){e.hi?n.flushMessageRange(e.low,e.hi):n.flushMessage(e.low)}),n.onData&&n.onData(),t})},delMessagesAll:function(e){return this.delMessages([{low:1,hi:this._maxSeq+1,_all:!0}],e)},delMessagesList:function(e,t){e.sort(function(e,t){return e-t});var n=e.reduce(function(e,t){if(0==e.length)e.push({low:t});else{var n=e[e.length-1];!n.hi&&t!=n.low+1||t>n.hi?e.push({low:t}):n.hi=n.hi?Math.max(n.hi,t+1):t+1}return e},[]);return this.delMessages(n,t)},delTopic:function(){var e=this;return this._tinode.delTopic(this.name).then(function(t){return e._resetSub(),e._gone(),t})},delSubscription:function(e){var t=this;return this._subscribed?this._tinode.delSubscription(this.name,e).then(function(n){return delete t._users[e],t.onSubsUpdated&&t.onSubsUpdated(Object.keys(t._users)),n}):Promise.reject(new Error("Cannot delete subscription in inactive topic"))},note:function(e,t){var n=this._users[this._tinode.getCurrentUserID()];n?((!n[e]||n[e]<t)&&(this._subscribed?this._tinode.note(this.name,e,t):this._tinode.logger("Not sending {note} on inactive topic")),n[e]=t):this._tinode.logger("note(): user not found "+this._tinode.getCurrentUserID());var r=this._tinode.getMeTopic();r&&r.setMsgReadRecv(this.name,e,t)},noteRecv:function(e){this.note("recv",e)},noteRead:function(e){this.note("read",e)},noteKeyPress:function(){this._subscribed?this._tinode.noteKeyPress(this.name):this._tinode.logger("Cannot send notification in inactive topic")},userDesc:function(e){var t=this._cacheGetUser(e);if(t)return t},subscribers:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._users)n.call(t,this._users[r],r,this._users)},tags:function(){return this._tags.slice(0)},subscriber:function(e){return this._users[e]},messages:function(e,t,n,r){var i=e||this.onData;if(i){var o="number"==typeof t?this._messages.find({seq:t}):void 0,a="number"==typeof n?this._messages.find({seq:n},!0):void 0;-1!=o&&-1!=a&&this._messages.forEach(i,o,a,r)}},queuedMessages:function(e,t){if(!e)throw new Error("Callback must be provided");this.messages(e,268435455,void 0,t)},msgReceiptCount:function(e,t){var n=0,r=this._tinode.getCurrentUserID();if(t>0)for(var i in this._users){var o=this._users[i];o.user!==r&&o[e]>=t&&n++}return n},msgReadCount:function(e){return this.msgReceiptCount("read",e)},msgRecvCount:function(e){return this.msgReceiptCount("recv",e)},msgHasMoreMessages:function(e){return e?this.seq>this._maxSeq:this._minSeq>1&&!this._noEarlierMsgs},isNewMessage:function(e){return this._maxSeq<=e},flushMessage:function(e){var t=this._messages.find({seq:e});return t>=0?this._messages.delAt(t):void 0},flushMessageRange:function(e,t){var n=this._messages.find({seq:e});return n>=0?this._messages.delRange(n,this._messages.find({seq:t},!0)):[]},cancelSend:function(e){var t=this._messages.find({seq:e});if(t>=0){var n=this._messages.getAt(t);if(1==this.msgStatus(n))return n._cancelled=!0,this._messages.delAt(t),!0}return!1},getType:function(){return w.topicType(this.name)},getAccessMode:function(){return this.acs},getDefaultAccess:function(){return this.defacs},startMetaQuery:function(){return new _(this)},msgStatus:function(e){var t=0;return e.from==this._tinode.getCurrentUserID()?e._sending?t=2:e._failed?t=3:e.seq>=268435455?t=1:this.msgReadCount(e.seq)>0?t=6:this.msgRecvCount(e.seq)>0?t=5:e.seq>0&&(t=4):t=7,t},_routeData:function(e){e.content&&((!this.touched||this.touched<e.ts)&&(this.touched=e.ts),e._generated||this._messages.put(e)),e.seq>this._maxSeq&&(this._maxSeq=e.seq),(e.seq<this._minSeq||0==this._minSeq)&&(this._minSeq=e.seq),this.onData&&this.onData(e);var t=this._tinode.getMeTopic();t&&t.setMsgReadRecv(this.name,"msg",e.seq,e.ts)},_routeMeta:function(e){e.desc&&(this._lastDescUpdate=e.ts,this._processMetaDesc(e.desc)),e.sub&&e.sub.length>0&&(this._lastSubsUpdate=e.ts,this._processMetaSub(e.sub)),e.del&&this._processDelMessages(e.del.clear,e.del.delseq),e.tags&&this._processMetaTags(e.tags),this.onMeta&&this.onMeta(e)},_routePres:function(e){var t;switch(e.what){case"del":this._processDelMessages(e.clear,e.delseq);break;case"on":case"off":(t=this._users[e.src])?t.online="on"==e.what:this._tinode.logger("Presence update for an unknown user",this.name,e.src);break;case"acs":var n="me"==e.src?this._tinode.getCurrentUserID():e.src;if(t=this._users[n])t.acs.updateAll(e.dacs),n==this._tinode.getCurrentUserID()&&this.acs.updateAll(e.dacs),t.acs&&t.acs.mode!=E._NONE||("p2p"==this.getType()&&this.leave(),this._processMetaSub([{user:n,deleted:new Date,_generated:!0}]));else{var r=(new E).updateAll(e.dacs);r&&r.mode!=E._NONE&&((t=this._cacheGetUser(n))?t.acs=r:(t={user:n,acs:r},this.getMeta(this.startMetaQuery().withOneSub(void 0,n).build())),t._generated=!0,t.updated=new Date,this._processMetaSub([t]))}break;default:this._tinode.logger("Ignored presence update",e.what)}this.onPres&&this.onPres(e)},_routeInfo:function(e){if("kp"!==e.what){var t=this._users[e.from];t&&(t[e.what]=e.seq)}this.onInfo&&this.onInfo(e)},_processMetaDesc:function(e,t){if(f(this,e),"string"==typeof this.created&&(this.created=new Date(this.created)),"string"==typeof this.updated&&(this.updated=new Date(this.updated)),"string"==typeof this.touched&&(this.touched=new Date(this.touched)),"me"!==this.name&&!t&&!e._generated){var n=this._tinode.getMeTopic();n&&n._processMetaSub([{_generated:!0,topic:this.name,updated:this.updated,touched:this.touched,acs:this.acs,public:this.public,private:this.private}])}this.onMetaDesc&&this.onMetaDesc(this)},_processMetaSub:function(e){var t=void 0;for(var n in e){var r=e[n];if(r.user){r.updated=new Date(r.updated),r.deleted=r.deleted?new Date(r.deleted):null;var i=null;r.deleted?(delete this._users[r.user],i=r):((i=this._users[r.user])||(i=this._cacheGetUser(r.user)),i=this._updateCachedUser(r.user,r,r._generated)),this.onMetaSub&&this.onMetaSub(i)}else r._generated||(t=r)}t&&this.onMetaDesc&&this.onMetaDesc(t),this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._users))},_processMetaTags:function(e){1==e.length&&e[0]==w.DEL_CHAR&&(e=[]),this._tags=e,this.onTagsUpdated&&this.onTagsUpdated(e)},_processDelMessages:function(e,t){this._maxDel=Math.max(e,this._maxDel),this.clear=Math.max(e,this.clear);var n=this,r=0;Array.isArray(t)&&t.map(function(e){if(e.hi)for(var t=e.low;t<e.hi;t++)r++,n.flushMessage(t);else r++,n.flushMessage(e.low)}),r>0&&this.onData&&this.onData()},_allMessagesReceived:function(e){this.onAllMessagesReceived&&this.onAllMessagesReceived(e)},_resetSub:function(){this._subscribed=!1},_gone:function(){this._messages.reset(),this._users={},this.acs=new E(null),this.private=null,this.public=null,this._maxSeq=0,this._minSeq=0,this._subscribed=!1;var e=this._tinode.getMeTopic();e&&e._routePres({_generated:!0,what:"gone",topic:"me",src:this.name}),this.onDeleteTopic&&this.onDeleteTopic()},_updateCachedUser:function(e,t,n){var r=this._cacheGetUser(e);return r?r=f(r,t):(n&&this.getMeta(this.startMetaQuery().withLaterOneSub(e).build()),r=f({},t)),this._cachePutUser(e,r),h(this._users,e,r)},_getQueuedSeqId:function(){return this._queuedSeqId++}};var S=function(e){k.call(this,"me",e),this._contacts={},e&&(this.onContactUpdate=e.onContactUpdate)};S.prototype=Object.create(k.prototype,{_processMetaSub:{value:function(e){var t=0;for(var n in e){var r=e[n],i=r.topic;if("fnd"!=i&&"me"!=i){r.updated=new Date(r.updated),r.touched=r.touched?new Date(r.touched):null,r.deleted=r.deleted?new Date(r.deleted):null,r.seq=0|r.seq,r.recv=0|r.recv,r.read=0|r.read,r.unread=r.seq-r.read;var o=null;if(r.deleted)o=r,delete this._contacts[i];else if(r.seen&&r.seen.when&&(r.seen.when=new Date(r.seen.when)),o=h(this._contacts,i,r),"p2p"==w.topicType(i)&&this._cachePutUser(i,o),!r._generated){var a=this._tinode.getTopic(i);a&&a._processMetaDesc(r,!0)}t++,this.onMetaSub&&this.onMetaSub(o)}}t>0&&this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._contacts))},enumerable:!0,configurable:!0,writable:!1},_routePres:{value:function(e){var t=this._contacts[e.src];if(t){switch(e.what){case"on":t.online=!0;break;case"off":t.online&&(t.online=!1,t.seen?t.seen.when=new Date:t.seen={when:new Date});break;case"msg":t.touched=new Date,t.seq=0|e.seq,t.unread=t.seq-t.read;break;case"upd":this.getMeta(this.startMetaQuery().withLaterOneSub(e.src).build());break;case"acs":t.acs?t.acs.updateAll(e.dacs):t.acs=(new E).updateAll(e.dacs);break;case"ua":t.seen={when:new Date,ua:e.ua};break;case"recv":t.recv=t.recv?Math.max(t.recv,e.seq):0|e.seq;break;case"read":t.read=t.read?Math.max(t.read,e.seq):0|e.seq,t.unread=t.seq-t.read;break;case"gone":delete this._contacts[e.src]}this.onContactUpdate&&this.onContactUpdate(e.what,t)}else if("acs"==e.what){var n=new E(e.dacs);if(!n||n.mode==E._INVALID)return void this._tinode.logger("Invalid access mode update",e.src,e.dacs);if(n.mode==E._NONE)return void this._tinode.logger("Removing non-existent subscription",e.src,e.dacs);this.getMeta(this.startMetaQuery().withOneSub(void 0,e.src).build()),this._contacts[e.src]={topic:e.src,online:!1,acs:n}}this.onPres&&this.onPres(e)},enumerable:!0,configurable:!0,writable:!1},publish:{value:function(){return Promise.reject(new Error("Publishing to 'me' is not supported"))},enumerable:!0,configurable:!0,writable:!1},contacts:{value:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._contacts)n.call(t,this._contacts[r],r,this._contacts)},enumerable:!0,configurable:!0,writable:!0},setMsgReadRecv:{value:function(e,t,n,r){var i,o=this._contacts[e],a=!1;if(o){switch(n|=0,t){case"recv":i=o.recv,o.recv=o.recv?Math.max(o.recv,n):n,a=i!=o.recv;break;case"read":i=o.read,o.read=o.read?Math.max(o.read,n):n,o.unread=o.seq-o.read,a=i!=o.read,o.recv<o.read&&(o.recv=o.read,a=!0);break;case"msg":i=o.seq,o.seq=o.seq?Math.max(o.seq,n):n,o.unread=o.seq-o.read,(!o.touched||o.touched<r)&&(o.touched=r),a=i!=o.seq}!a||o.acs&&o.acs.isMuted()||!this.onContactUpdate||this.onContactUpdate(t,o)}},enumerable:!0,configurable:!0,writable:!0},getContact:{value:function(e){return this._contacts[e]},enumerable:!0,configurable:!0,writable:!0},getAccessMode:{value:function(e){var t=this._contacts[e];return t?t.acs:null},enumerable:!0,configurable:!0,writable:!0}}),S.prototype.constructor=S;var T=function(e){k.call(this,"fnd",e),this._contacts={}};T.prototype=Object.create(k.prototype,{_processMetaSub:{value:function(e){var t=Object.getOwnPropertyNames(this._contacts).length;for(var n in this._contacts={},e){var r=e[n],i=r.topic?r.topic:r.user;r.updated=new Date(r.updated),r.seen&&r.seen.when&&(r.seen.when=new Date(r.seen.when)),r=h(this._contacts,i,r),t++,this.onMetaSub&&this.onMetaSub(r)}t>0&&this.onSubsUpdated&&this.onSubsUpdated(Object.keys(this._contacts))},enumerable:!0,configurable:!0,writable:!1},publish:{value:function(){return Promise.reject(new Error("Publishing to 'fnd' is not supported"))},enumerable:!0,configurable:!0,writable:!1},setMeta:{value:function(e){var t=this;return Object.getPrototypeOf(T.prototype).setMeta.call(this,e).then(function(){Object.keys(t._contacts).length>0&&(t._contacts={},t.onSubsUpdated&&t.onSubsUpdated([]))})},enumerable:!0,configurable:!0,writable:!1},contacts:{value:function(e,t){var n=e||this.onMetaSub;if(n)for(var r in this._contacts)n.call(t,this._contacts[r],r,this._contacts)},enumerable:!0,configurable:!0,writable:!0}}),T.prototype.constructor=T;var C=function(e){this._tinode=e,this._apiKey=e._apiKey,this._authToken=e.getAuthToken(),this._msgId=e.getNextUniqueId(),this.xhr=m(),this.toResolve=null,this.toReject=null,this.onProgress=null,this.onSuccess=null,this.onFailure=null};C.prototype={upload:function(e,t,n,r){var i=this;if(!this._authToken)throw new Error("Must authenticate first");var o=this;this.xhr.open("POST","/v"+a+"/file/u/",!0),this.xhr.setRequestHeader("X-Tinode-APIKey",this._apiKey),this.xhr.setRequestHeader("X-Tinode-Auth","Token "+this._authToken.token);var s=new Promise(function(e,t){i.toResolve=e,i.toReject=t});this.onProgress=t,this.onSuccess=n,this.onFailure=r,this.xhr.upload.onprogress=function(e){e.lengthComputable&&o.onProgress&&o.onProgress(e.loaded/e.total)},this.xhr.onload=function(){var e;try{e=JSON.parse(this.response,v)}catch(e){o._tinode.logger("Invalid server response in LargeFileHelper",this.response)}this.status>=200&&this.status<300?(o.toResolve&&o.toResolve(e.ctrl.params.url),o.onSuccess&&o.onSuccess(e.ctrl)):this.status>=400?(o.toReject&&o.toReject(new Error(e.ctrl.text+" ("+e.ctrl.code+")")),o.onFailure&&o.onFailure(e.ctrl)):o._tinode.logger("Unexpected server response status",this.status,this.response)},this.xhr.onerror=function(e){o.toReject&&o.toReject(new Error("failed")),o.onFailure&&o.onFailure(null)},this.xhr.onabort=function(e){o.toReject&&o.toReject(new Error("upload cancelled by user")),o.onFailure&&o.onFailure(null)};try{var l=new FormData;l.append("file",e),l.set("id",this._msgId),this.xhr.send(l)}catch(e){this.toReject&&this.toReject(e),this.onFailure&&this.onFailure(null)}return s},download:function(e,t,n,r){var i=this;if(/^(?:(?:[a-z]+:)?\/\/)/i.test(e))throw new Error("The URL '"+e+"' must be relative, not absolute");if(!this._authToken)throw new Error("Must authenticate first");var o=this;this.xhr.open("GET",e,!0),this.xhr.setRequestHeader("X-Tinode-APIKey",this._apiKey),this.xhr.setRequestHeader("X-Tinode-Auth","Token "+this._authToken.token),this.xhr.responseType="blob",this.onProgress=r,this.xhr.onprogress=function(e){o.onProgress&&o.onProgress(e.loaded)};var a=new Promise(function(e,t){i.toResolve=e,i.toReject=t});this.xhr.onload=function(){if(200==this.status){var e=document.createElement("a");e.href=window.URL.createObjectURL(new Blob([this.response],{type:n})),e.style.display="none",e.setAttribute("download",t),document.body.appendChild(e),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(e.href),o.toResolve&&o.toResolve()}else if(this.status>=400&&o.toReject){var r=new FileReader;r.onload=function(){try{var e=JSON.parse(this.result,v);o.toReject(new Error(e.ctrl.text+" ("+e.ctrl.code+")"))}catch(e){o._tinode.logger("Invalid server response in LargeFileHelper",this.result),o.toReject(e)}},r.readAsText(this.response)}},this.xhr.onerror=function(e){o.toReject&&o.toReject(new Error("failed"))},this.xhr.onabort=function(){o.toReject&&o.toReject(null)};try{this.xhr.send()}catch(e){this.toReject&&this.toReject(e)}return a},cancel:function(){this.xhr&&this.xhr.readyState<4&&this.xhr.abort()},getId:function(){return this._msgId}};var x=function e(t,n){this.status=e.STATUS_NONE,this.topic=t,this.content=n};x.STATUS_NONE=0,x.STATUS_QUEUED=1,x.STATUS_SENDING=2,x.STATUS_FAILED=3,x.STATUS_SENT=4,x.STATUS_RECEIVED=5,x.STATUS_READ=6,x.STATUS_TO_ME=7,(x.prototype={toJSON:function(){},fromJSON:function(e){}}).constructor=x,u.exports=w,u.exports.Drafty=t}.call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),u=u.exports})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],24:[function(e,t,n){(function(e){var n,r,i,o,a,s,l,u,c,d,p,f,h,m,v,g,y,b,w;!function(n){var r="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:{};function i(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}"object"==typeof t&&"object"==typeof t.exports?n(i(r,i(t.exports))):n(i(r))}(function(e){var t=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])};n=function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},o=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},a=function(e,t){return function(n,r){t(n,r,e)}},s=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}l((r=r.apply(e,t||[])).next())})},u=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},c=function(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])},d=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}},p=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},f=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e},h=function(e){return this instanceof h?(this.v=e,this):new h(e)},m=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=i[e](t)).value instanceof h?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(e){c(o[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}},v=function(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){e[r]&&(t[r]=function(t){return(n=!n)?{value:h(e[r](t)),done:"return"===r}:i?i(t):t})}},g=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof d?d(e):e[Symbol.iterator]()},y=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},w=function(e){return e&&e.__esModule?e:{default:e}},e("__extends",n),e("__assign",r),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",s),e("__awaiter",l),e("__generator",u),e("__exportStar",c),e("__values",d),e("__read",p),e("__spread",f),e("__await",h),e("__asyncGenerator",m),e("__asyncDelegator",v),e("__asyncValues",g),e("__makeTemplateObject",y),e("__importStar",b),e("__importDefault",w)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(e,t,n){var r=e("react"),i=e("react-dom"),o=e("./webapp.es5.js");i.render(r.createElement(o,null),document.getElementById("mountPoint"))},{"./webapp.es5.js":26,react:16,"react-dom":13}],26:[function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i="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};function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 l(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)}if("function"==typeof e){if(void 0===u)var u=e("react"),c=e("react-dom");if(void 0===d)var d=e("tinode-sdk"),p=d.Drafty;if(void 0===f){var f=e("firebase/app");e("firebase/messaging")}var h=e("../version.json").version}var m="TinodeWeb/"+(h||"0.15"),v={hosted:"api.tinode.co",local:"localhost:6060"},g=v.hosted,y=new Audio("audio/msg.mp3"),b=3e3,w=195840,_=768,E=["image/jpeg","image/gif","image/png","image/svg","image/svg+xml"],k=["jpg","gif","png","svg","svg"];function S(e){var t=window.navigator.userLanguage||window.navigator.language,n=new Date;return e.getFullYear()==n.getFullYear()?e.getMonth()==n.getMonth()&&e.getDate()==n.getDate()?e.toLocaleTimeString(t,{hour12:!1,hour:"2-digit",minute:"2-digit"}):e.toLocaleDateString(t,{hour12:!1,month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):e.toLocaleDateString(t,{hour12:!1,year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function T(e){if(!e||0==e)return"0 Bytes";var t=["Bytes","KB","MB","GB","TB","PB"],n=Math.min(0|Math.floor(Math.log2(e)/10),t.length-1),r=e/Math.pow(1024,n),i=n>0?r<3?2:r<30?1:0:0;return r.toFixed(i)+" "+t[n]}function C(e){return e&&e.type&&e.data?"data:image/"+e.type+";base64,"+e.data:null}function x(e,t,n,r,i){if(!(e&&t&&n&&r))return null;i&&(n=r=Math.min(n,r));var o=Math.min(Math.min(e,n)/e,Math.min(t,r)/t),a={dstWidth:e*o|0,dstHeight:t*o|0};return i?(a.dstWidth=a.dstHeight=Math.min(a.dstWidth,a.dstHeight),a.srcWidth=a.srcHeight=Math.min(e,t),a.xoffset=(e-a.srcWidth)/2|0,a.yoffset=(t-a.srcWidth)/2|0):(a.xoffset=a.yoffset=0,a.srcWidth=e,a.srcHeight=t),a}function P(e,t){var n=E.indexOf(t),r=k[n],i=e.lastIndexOf(".");return i>=0&&(e=e.substring(0,i)),e+"."+r}function N(e){var t=/^data:(image\/[-+a-z0-9.]+);base64/.exec(e);return t&&t.length>1?t[1]:null}function O(e){return 3*Math.floor(e/4)}function D(e,t,n,r,i,o){var a=new Image;a.crossOrigin="Anonymous",a.onerror=function(e){o("Image format unrecognized")},a.onload=function(){var a=x(this.width,this.height,t,n,r);if(a){var s=document.createElement("canvas");s.width=a.dstWidth,s.height=a.dstHeight;var l=s.getContext("2d");l.imageSmoothingEnabled=!0,l.drawImage(this,a.xoffset,a.yoffset,a.srcWidth,a.srcHeight,0,0,a.dstWidth,a.dstHeight);var u=this.width!=a.dstWidth||this.height!=a.dstHeight||E.indexOf(e.type)<0?"image/jpeg":e.type,c=s.toDataURL(u);if(u=N(c.split(",")[0])){var d=.78;if(O(c.length)>w&&(u="image/jpeg"),"image/jpeg"==u)for(;O(c.length)>w&&d>.45;)c=s.toDataURL(u,d),d*=.84;O(c.length)>w?o("The image size "+T(O(c.length))+" exceeds the "+T(w)+" limit.","err"):(s=null,i(c.split(",")[1],u,a.dstWidth,a.dstHeight,P(e.name,u)))}else o("Unsupported image format")}else o("Invalid image")},a.src=URL.createObjectURL(e)}function M(e,t,n){var r=new FileReader;r.addEventListener("load",function(){var i=r.result.split(","),o=N(i[0]);if(o){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){t(i[1],o,this.width,this.height,P(e.name,o))},a.onerror=function(e){n("Image format not recognized")},a.src=URL.createObjectURL(e)}else n("Failed to process image file")},!1),r.readAsDataURL(e)}function A(e,t,n){var r=new FileReader;r.addEventListener("load",function(){t(e.type,r.result.split(",")[1],e.name)}),r.readAsDataURL(e)}function R(e){var t=document.getElementById("shortcut-icon");if(t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("link");r.type="image/png",r.id="shortcut-icon",r.rel="shortcut icon",r.href="img/logo32x32"+(e>0?"a":"")+".png",n.removeChild(t),n.appendChild(r)}document.title=(e>0?"("+e+") ":"")+"Tinode"}function I(e){var t=e.split("?",2),n={},r=[];return t[0]&&(r=t[0].substr(1).split("/")),t[1]&&t[1].split("&").forEach(function(e){var t=e.split("=");t[0]&&(n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]))}),{path:r,params:n}}function U(e){window.location.hash=e}function F(e,t){var n=e.join("/"),r=[];for(var i in t)t.hasOwnProperty(i)&&r.push(i+"="+t[i]);return r.length>0&&(n+="?"+r.join("&")),n}function L(e,t,n){var r=I(e);return r.params[t]=n,F(r.path,r.params)}function j(e,t){var n=I(e);return delete n.params[t],F(n.path,n.params)}function W(e,t){var n=I(e);return n.path[0]=t,F(n.path,n.params)}function B(e,t){var n=I(e);return n.path[1]=t,delete n.params.info,F(n.path,n.params)}function z(){return"object"==i(window.location)&&"https:"==window.location.protocol}function V(e,t){var n=null;if((e&&e.trim()||t)&&(n={},e&&(n.fn=e.trim()),t)){var r=t.indexOf(",");n.photo={data:t.substring(r+1),type:"jpg"}}return n}function q(e,t){if(e.length!=t.length)return!1;e.sort(),t.sort();for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){var t=this.getItem(e);return t&&JSON.parse(t)},Storage.prototype.updateObject=function(e,t){var n=this.getObject(e);this.setObject(e,Object.assign(n||{},t))};var H=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handlePageClick=n.handlePageClick.bind(n),n.handleEscapeKey=n.handleEscapeKey.bind(n),n.handleClick=n.handleClick.bind(n),n.MenuItems={topic_info:{title:"Info",handler:null},messages_clear:{title:"Clear messages",handler:function(e,t){n.deleteMessages(!0,!1,e,t)}},messages_clear_hard:{title:"Clear for All",handler:function(e,t){n.deleteMessages(!0,!0,e,t)}},message_delete:{title:"Delete",handler:function(e,t){n.deleteMessages(!1,!1,e,t)}},message_delete_hard:{title:"Delete for All",handler:function(e,t){n.deleteMessages(!1,!0,e,t)}},topic_unmute:{title:"Unmute",handler:n.topicPermissionSetter.bind(n,"+P")},topic_mute:{title:"Mute",handler:n.topicPermissionSetter.bind(n,"-P")},topic_unblock:{title:"Unblock",handler:n.topicPermissionSetter.bind(n,"+J")},topic_block:{title:"Block",handler:n.topicPermissionSetter.bind(n,"-J")},topic_delete:{title:"Delete",handler:function(e,t){var r=n.props.tinode.getTopic(e.topicName);r?r.delTopic().catch(function(e){t&&t(e.message,"err")}):console.log("Topic not found: ",e.topicName)}},permissions:{title:"Edit permissions",handler:null},member_delete:{title:"Remove",handler:function(e,t){var r=n.props.tinode.getTopic(e.topicName);r&&e.user?r.delSubscription(e.user).catch(function(e){t&&t(e.message,"err")}):console.log("Topic or user not found: '"+e.topicName+"', '"+e.user+"'")}},member_mute:{title:"Mute",handler:n.topicPermissionSetter.bind(n,"-P")},member_unmute:{title:"Unmute",handler:n.topicPermissionSetter.bind(n,"+P")},member_block:{title:"Block",handler:n.topicPermissionSetter.bind(n,"-J")},member_unblock:{title:"Unblock",handler:n.topicPermissionSetter.bind(n,"+J")}},n}return l(t,u.Component),r(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.handlePageClick,!1),document.addEventListener("keyup",this.handleEscapeKey,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.handlePageClick,!1),document.removeEventListener("keyup",this.handleEscapeKey,!1)}},{key:"handlePageClick",value:function(e){c.findDOMNode(this).contains(e.target)||(e.preventDefault(),e.stopPropagation(),this.props.hide())}},{key:"handleEscapeKey",value:function(e){27===e.keyCode&&this.props.hide()}},{key:"handleClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.hide();var t=this.props.items[e.currentTarget.dataset.id];"string"==typeof t&&(t=this.MenuItems[t]),t.handler(this.props.params,this.props.onError)}},{key:"deleteMessages",value:function(e,t,n,r){var i=this.props.tinode.getTopic(n.topicName);if(i){if(i.cancelSend(n.seq))return Promise.resolve();(e?i.delMessagesAll(t):i.delMessagesList([n.seq],t)).catch(function(e){r&&r(e.message,"err")})}else console.log("Topic not found: ",n.topicName)}},{key:"topicPermissionSetter",value:function(e,t,n){var r=this.props.tinode.getTopic(t.topicName);if(r){var i,o;if(t.user){if(!(o=r.subscriber(t.user)))return void console.log("Subscriber not found",t.topicName+"["+t.user+"]");i=o.acs.updateGiven(e).getGiven()}else i=r.getAccessMode().updateWant(e).getWant();r.setMeta({sub:{user:t.user,mode:i}}).catch(function(e){n&&n(e.message,"err")})}else console.log("Topic not found",t.topicName)}},{key:"render",value:function(){var e=this,t=0,n=[];this.props.items.map(function(r){"string"==typeof r&&(r=e.MenuItems[r]),r&&r.title&&n.push("-"==r.title?u.createElement("li",{className:"separator",key:t}):u.createElement("li",{onClick:e.handleClick,"data-id":t,key:t},r.title)),t++});var r=13*(.7+2.5*n.length),i={left:(this.props.bounds.right-this.props.clickAt.x<156?this.props.clickAt.x-this.props.bounds.left-156:this.props.clickAt.x-this.props.bounds.left)+"px",top:(this.props.bounds.bottom-this.props.clickAt.y<r?this.props.clickAt.y-this.props.bounds.top-r:this.props.clickAt.y-this.props.bounds.top)+"px"};return u.createElement("ul",{className:"menu",style:i},n)}}]),t}(),K=function(e){function t(e){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){return u.createElement("a",{href:"javascript:;",onClick:this.props.onCancel},u.createElement("i",{className:"material-icons"},"close"))}}]),t}(),G=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){return this.props.show?u.createElement("div",{className:"load-spinner-box"},u.createElement("div",{className:"loader-spinner"})):null}}]),t}(),$=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={open:e.open},n.handleToggle=n.handleToggle.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleToggle",value:function(){var e=!this.state.open;this.setState({open:e}),this.props.onToggle&&this.props.onToggle(e)}},{key:"render",value:function(){return u.createElement("label",{className:"small",onClick:this.handleToggle},this.props.title,"...",this.state.open?u.createElement("i",{className:"material-icons"},"expand_more"):u.createElement("i",{className:"material-icons"},"chevron_right"))}}]),t}(),Y=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){var e=void 0;if(!0===this.props.avatar)if(this.props.topic&&this.props.title&&this.props.title.trim()){var t=this.props.title.trim().charAt(0),n="lettertile dark-color"+Math.abs(function(e){var t=0;e=""+e;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(this.props.topic))%16;e=u.createElement("div",{className:n},u.createElement("div",null,t))}else e="grp"==d.topicType(this.props.topic)?u.createElement("i",{className:"material-icons"},"group"):u.createElement("i",{className:"material-icons"},"person");else e=this.props.avatar?u.createElement("img",{className:"avatar",alt:"avatar",src:this.props.avatar}):null;return e}}]),t}(),Q=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={active:e.active,initialValue:e.value||"",value:e.value||""},n.handeTextChange=n.handeTextChange.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleStartEditing=n.handleStartEditing.bind(n),n.handleEditingFinished=n.handleEditingFinished.bind(n),n.handlePasswordFinished=n.handlePasswordFinished.bind(n),n}return l(t,u.Component),r(t,[{key:"handeTextChange",value:function(e){this.setState({value:e.target.value})}},{key:"handleKeyDown",value:function(e){27===e.keyCode?this.setState({value:this.props.value,active:!1}):13===e.keyCode&&this.handleEditingFinished()}},{key:"handleStartEditing",value:function(){this.props.readOnly||(c.findDOMNode(this).focus(),this.setState({active:!0}))}},{key:"handleEditingFinished",value:function(){this.setState({active:!1});var e=this.state.value.trim();(e||this.props.value)&&e!==this.props.value&&this.props.onFinished(e)}},{key:"handlePasswordFinished",value:function(e){this.setState({active:!1}),e&&e!==this.props.value&&this.props.onFinished(e)}},{key:"render",value:function(){if(this.state.active)var e=this.props.type||"text";else{var t="password"==this.props.type?"••••••••":this.state.value,n="in-place-edit"+(this.props.readOnly?" disabled":"");t||(t=this.props.placeholder,n+=" placeholder"),t.length>20&&(t=t.substring(0,19)+"...")}return this.state.active?"password"==e?u.createElement(X,{value:this.state.value,placeholder:this.props.placeholder,required:this.props.required?"required":"",autoComplete:this.props.autoComplete,autoFocus:!0,onFinished:this.handlePasswordFinished}):u.createElement("input",{type:e,value:this.state.value,placeholder:this.props.placeholder,required:this.props.required?"required":"",autoComplete:this.props.autoComplete,autoFocus:!0,onChange:this.handeTextChange,onKeyDown:this.handleKeyDown,onBlur:this.handleEditingFinished}):u.createElement("span",{className:n,onClick:this.handleStartEditing},u.createElement("span",{className:"content"},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.initialValue==e.value||t.active?null:{initialValue:e.value||"",value:e.value||""}}}]),t}(),X=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={value:n.props.value,visible:!1},n.handleVisibility=n.handleVisibility.bind(n),n.handeTextChange=n.handeTextChange.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleEditingFinished=n.handleEditingFinished.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handeTextChange",value:function(e){this.setState({value:e.target.value}),this.props.onChange&&this.props.onChange(e)}},{key:"handleVisibility",value:function(e){e.preventDefault(),this.setState({visible:!this.state.visible})}},{key:"handleKeyDown",value:function(e){27==e.keyCode?(this.setState({value:this.props.value,visible:!1}),this.props.onFinished&&this.props.onFinished()):13==e.keyCode&&this.handleEditingFinished()}},{key:"handleEditingFinished",value:function(e){var t=this;if(e){var n=e.currentTarget;setTimeout(function(){n.contains(document.activeElement)||t.props.onFinished&&t.props.onFinished(t.state.value)},0)}else this.props.onFinished&&this.props.onFinished(this.state.value.trim())}},{key:"render",value:function(){return u.createElement("div",{tabIndex:"-1",className:"group-focus",onBlur:this.handleEditingFinished},u.createElement("input",{className:"with-visibility",type:this.state.visible?"text":"password",value:this.state.value,placeholder:this.props.placeholder,required:this.props.required?"required":"",autoFocus:this.props.autoFocus?"autoFocus":"",autoComplete:this.props.autoComplete,onChange:this.handeTextChange,onKeyDown:this.handleKeyDown}),u.createElement("span",{onClick:this.handleVisibility},u.createElement("i",{className:"material-icons clickable light-gray"},this.state.visible?"visibility":"visibility_off")))}}]),t}(),J=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={hostName:e.serverAddress,changed:!1},n.handleHostNameChange=n.handleHostNameChange.bind(n),n.handleEditingFinished=n.handleEditingFinished.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleHostNameChange",value:function(e){this.setState({hostName:e.target.value,changed:!0})}},{key:"handleEditingFinished",value:function(){this.state.changed&&(this.setState({changed:!1}),this.props.onServerAddressChange(this.state.hostName.trim()))}},{key:"render",value:function(){var e=[];for(var t in v){var n=v[t];e.push(u.createElement("option",{key:n,value:n}))}return u.createElement("div",{className:"panel-form-row"},u.createElement("input",{type:"search",id:"host-name",placeholder:this.props.hostName,list:"known-hosts",className:"quoted",value:this.state.hostName,onChange:this.handleHostNameChange,onBlur:this.handleEditingFinished,required:!0}),u.createElement("datalist",{id:"known-hosts"},e))}}]),t}(),Z=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=n.handleChange.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleChange",value:function(){this.props.onChange(this.props.name,!this.props.checked)}},{key:"render",value:function(){return this.props.onChange?this.props.checked?u.createElement("i",{className:"material-icons blue clickable",onClick:this.handleChange},"check_box"):u.createElement("i",{className:"material-icons blue clickable",onClick:this.handleChange},"check_box_outline_blank"):this.props.checked?u.createElement("i",{className:"material-icons"},"check_box"):u.createElement("i",{className:"material-icons"},"check_box_outline_blank")}}]),t}(),ee=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={mode:(e.mode||"").replace("N","")},n.handleChange=n.handleChange.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n.handleCancel=n.handleCancel.bind(n),n}return l(t,u.Component),r(t,[{key:"handleChange",value:function(e){var t=this.state.mode;-1==t.indexOf(e)?t+=e:t=t.replace(e,""),this.setState({mode:t})}},{key:"handleSubmit",value:function(){var e=(this.state.mode||"N").split("").sort().join("");e!==(this.props.mode||"N").split("").sort().join("")?this.props.onSubmit(e):this.props.onCancel()}},{key:"handleCancel",value:function(){this.props.onCancel()}},{key:"render",value:function(){for(var e={J:"Join (J)",R:"Read (R)",W:"Write (W)",P:"Get notified (P)",A:"Approve (A)",S:"Share (S)",D:"Delete (D)",O:"Owner (O)"},t=this.props.skip||"",n=this.state.mode,r=(this.props.compare||"").replace("N",""),i=[],o=0;o<"JRWPASDO".length;o++){var a="JRWPASDO".charAt(o);t.indexOf(a)>=0&&n.indexOf(a)<0||i.push(u.createElement("tr",{key:a},u.createElement("td",null,e[a]),u.createElement("td",{className:"checkbox"},t.indexOf(a)<0?u.createElement(Z,{name:a,checked:n.indexOf(a)>=0,onChange:this.handleChange}):u.createElement(Z,{name:a,checked:n.indexOf(a)>=0})),this.props.compare?u.createElement("td",{className:"checkbox"},u.createElement(Z,{name:a,checked:r.indexOf(a)>=0})):null))}return u.createElement("div",{className:"panel-form-column"},this.props.userTitle?u.createElement("ul",{className:"contact-box"},u.createElement(ve,{item:this.props.item,title:this.props.userTitle,avatar:C(this.props.userAvatar?this.props.userAvatar:null)})):null,u.createElement("label",{className:"small"},"Permissions"),u.createElement("table",{className:"permission-editor"},this.props.compare?u.createElement("thead",null,u.createElement("tr",null,u.createElement("th",null),u.createElement("th",null,this.props.modeTitle),u.createElement("th",null,this.props.compareTitle))):null,u.createElement("tbody",null,i)),u.createElement("br",null),u.createElement("div",{className:"dialog-buttons"},u.createElement("button",{className:"blue",onClick:this.handleSubmit},"Ok"),u.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")))}}]),t}(),te=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={placeholder:e.chips?"":e.prompt,sortedChips:t.sortChips(e.chips,e.required),chipIndex:t.indexChips(e.chips),input:"",focused:!1},n.handleTextInput=n.handleTextInput.bind(n),n.removeChipAt=n.removeChipAt.bind(n),n.handleChipCancel=n.handleChipCancel.bind(n),n.handleFocusGained=n.handleFocusGained.bind(n),n.handleFocusLost=n.handleFocusLost.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n}return l(t,u.Component),r(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.setState({sortedChips:t.sortChips(e.chips,e.required),chipIndex:t.indexChips(e.chips)}),e.chips.length>this.props.chips.length&&this.setState({input:""})}},{key:"handleTextInput",value:function(e){this.setState({input:e.target.value}),this.props.filterFunc&&this.props.filterFunc(e.target.value)}},{key:"removeChipAt",value:function(e){var t=this.state.sortedChips[e];this.props.onChipRemoved(t.user,this.state.chipIndex[t.user])}},{key:"handleChipCancel",value:function(e,t){this.removeChipAt(t)}},{key:"handleFocusGained",value:function(){this.setState({focused:!0})}},{key:"handleFocusLost",value:function(){this.setState({focused:!1}),this.props.onFocusLost&&this.props.onFocusLost(this.state.input)}},{key:"handleKeyDown",value:function(e){if("Backspace"===e.key){if(0==this.state.input.length&&this.state.sortedChips.length>0){var t=this.state.sortedChips.length-1;this.state.sortedChips[t].user!==this.props.required&&this.removeChipAt(t)}}else"Enter"===e.key?this.props.onEnter&&this.props.onEnter(this.state.input):"Escape"===e.key&&this.props.onCancel&&this.props.onCancel()}},{key:"render",value:function(){var e=this,t=[],n=0;this.state.sortedChips.map(function(r){t.push(u.createElement(ne,{onCancel:e.handleChipCancel,avatar:C(r.public?r.public.photo:null),title:r.public?r.public.fn:void 0,noAvatar:e.props.avatarDisabled,topic:r.user,required:r.user===e.props.required,index:n,key:r.user})),n++});var r="chip-input"+(this.state.focused?" focused":"");return u.createElement("div",{className:r},t,u.createElement("input",{type:"text",placeholder:this.state.placeholder,onChange:this.handleTextInput,onFocus:this.handleFocusGained,onBlur:this.handleFocusLost,onKeyDown:this.handleKeyDown,value:this.state.input,autoFocus:!0}))}}],[{key:"indexChips",value:function(e){var t={},n=0;return e.map(function(e){t[e.user]=n,n++}),t}},{key:"sortChips",value:function(e,t){var n=[],r=[];return e.map(function(e){e.user===t?n.push(e):r.push(e)}),n.concat(r)}}]),t}(),ne=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleCancel=n.handleCancel.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleCancel",value:function(){this.props.onCancel(this.props.topic,this.props.index)}},{key:"render",value:function(){var e=this.props.title||this.props.topic;return u.createElement("div",{className:"chip"},this.props.noAvatar?u.createElement("span",{className:"spacer"}):u.createElement("div",{className:"avatar-box"},u.createElement(Y,{avatar:this.props.avatar||!0,topic:this.props.topic,title:this.props.title})),u.createElement("span",null,e),this.props.onCancel&&!this.props.required?u.createElement("a",{href:"javascript:;",onClick:this.handleCancel},"×"):u.createElement("span",{className:"spacer"}))}}]),t}(),re=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={onlineSubs:e.subscribers||[]},n}return l(t,u.Component),r(t,[{key:"render",value:function(){var e=[];return this.state.onlineSubs.map(function(t){e.push(u.createElement("div",{className:"avatar-box",key:t.user},u.createElement(Y,{topic:t.user,avatar:C(t.public?t.public.photo:null)||!0,title:t.public?t.public.fn:null})))}),u.createElement("div",{id:"topic-users"},e)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return{onlineSubs:e.subscribers?e.subscribers:[]}}}]),t}(),ie=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={login:e.login,password:"",hostName:e.serverAddress,saveToken:localStorage.getObject("keep-logged-in")},n.handleLoginChange=n.handleLoginChange.bind(n),n.handlePasswordChange=n.handlePasswordChange.bind(n),n.handleToggleSaveToken=n.handleToggleSaveToken.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n}return l(t,u.Component),r(t,[{key:"handleLoginChange",value:function(e){this.setState({login:e.target.value})}},{key:"handlePasswordChange",value:function(e){this.setState({password:e.target.value})}},{key:"handleToggleSaveToken",value:function(){localStorage.setObject("keep-logged-in",!this.state.saveToken),this.setState({saveToken:!this.state.saveToken})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.props.onLogin(this.state.login.trim(),this.state.password.trim())}},{key:"render",value:function(){var e="blue";return this.props.disabled&&(e+=" disabled"),u.createElement("form",{id:"login-form",onSubmit:this.handleSubmit},u.createElement("input",{type:"text",id:"inputLogin",placeholder:"Login",autoComplete:"username",value:this.state.login,onChange:this.handleLoginChange,required:!0,autoFocus:!0}),u.createElement(X,{type:"password",id:"inputPassword",placeholder:"Password",autoComplete:"current-password",value:this.state.password,onChange:this.handlePasswordChange,required:!0}),u.createElement("div",{className:"panel-form-row"},u.createElement(Z,{id:"save-token",name:"save-token",checked:this.state.saveToken,onChange:this.handleToggleSaveToken}),u.createElement("label",{htmlFor:"save-token"}," Stay logged in"),u.createElement("a",{href:"#reset"},"Forgot password?")),u.createElement("div",{className:"dialog-buttons"},u.createElement("button",{className:e,type:"submit"},"Sign in")))}}]),t}(),oe=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={login:"",password:"",email:"",fn:"",imageDataUrl:null,errorCleared:!1,saveToken:localStorage.getObject("keep-logged-in")},n.handleLoginChange=n.handleLoginChange.bind(n),n.handlePasswordChange=n.handlePasswordChange.bind(n),n.handleEmailChange=n.handleEmailChange.bind(n),n.handleFnChange=n.handleFnChange.bind(n),n.handleImageChanged=n.handleImageChanged.bind(n),n.handleToggleSaveToken=n.handleToggleSaveToken.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleLoginChange",value:function(e){this.setState({login:e.target.value})}},{key:"handlePasswordChange",value:function(e){this.setState({password:e})}},{key:"handleEmailChange",value:function(e){this.setState({email:e.target.value})}},{key:"handleFnChange",value:function(e){this.setState({fn:e.target.value})}},{key:"handleImageChanged",value:function(e){this.setState({imageDataUrl:e})}},{key:"handleToggleSaveToken",value:function(){localStorage.setObject("keep-logged-in",!this.state.saveToken),this.setState({saveToken:!this.state.saveToken})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.setState({errorCleared:!1}),this.props.onCreateAccount(this.state.login.trim(),this.state.password.trim(),V(this.state.fn,this.state.imageDataUrl),{meth:"email",val:this.state.email})}},{key:"render",value:function(){var e="blue";return this.props.disabled&&(e+=" disabled"),u.createElement("form",{className:"panel-form-column",onSubmit:this.handleSubmit},u.createElement("div",{className:"panel-form-row"},u.createElement("div",{className:"panel-form-column"},u.createElement("input",{type:"text",placeholder:"Login",autoComplete:"user-name",value:this.state.login,onChange:this.handleLoginChange,required:!0,autoFocus:!0}),u.createElement(X,{placeholder:"Password",autoComplete:"new-password",value:this.state.password,onFinished:this.handlePasswordChange,required:!0})),u.createElement(ae,{onImageChanged:this.handleImageChanged,onError:this.props.onError})),u.createElement("div",{className:"panel-form-row"},u.createElement("input",{type:"text",placeholder:"Full name, e.g. John Doe",autoComplete:"name",value:this.state.fn,onChange:this.handleFnChange,required:!0})),u.createElement("div",{className:"panel-form-row"},u.createElement("input",{type:"email",placeholder:"Email, e.g john.doe@example.com",autoComplete:"email",value:this.state.email,onChange:this.handleEmailChange,required:!0})),u.createElement("div",{className:"panel-form-row"},u.createElement(Z,{id:"save-token",name:"save-token",checked:this.state.saveToken,onChange:this.handleToggleSaveToken}),u.createElement("label",{htmlFor:"save-token"}," Stay logged in")),u.createElement("div",{className:"dialog-buttons"},u.createElement("button",{className:e,type:"submit"},"Sign up")))}}]),t}(),ae=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={dataUrl:e.avatar},n.handleFileUpload=n.handleFileUpload.bind(n),n}return l(t,u.Component),r(t,[{key:"handleFileUpload",value:function(e){var t=this;D(e.target.files[0],128,128,!0,function(e,n){var r=C({data:e,type:n});t.setState({dataUrl:r}),t.props.onImageChanged(r)},function(e){t.props.onError(e,"err")}),e.target.value=""}},{key:"render",value:function(){var e="file-input-avatar-"+(Math.random()+"").substr(2);return u.createElement("div",{className:"avatar-upload"},this.state.dataUrl?u.createElement("img",{src:this.state.dataUrl,className:"preview"}):this.props.readOnly&&this.props.uid?u.createElement("div",{className:"avatar-box"},u.createElement(Y,{avatar:!0,topic:this.props.uid,title:this.props.title})):u.createElement("div",{className:"blank"},"128×128"),this.props.readOnly?null:u.createElement("input",{type:"file",id:e,className:"inputfile hidden",accept:"image/*",onChange:this.handleFileUpload}),this.props.readOnly?null:u.createElement("label",{htmlFor:e,className:"round"},u.createElement("i",{className:"material-icons"},"file_upload")))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.dataUrl!=e.avatar?{dataUrl:e.avatar}:null}}]),t}(),se=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={email:"",password:""},n.handleSubmit=n.handleSubmit.bind(n),n.handleEmailChange=n.handleEmailChange.bind(n),n.handlePasswordChange=n.handlePasswordChange.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"componentDidMount",value:function(){var e=I(window.location.hash);this.setState({token:e.params.token,scheme:e.params.scheme})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.state.token?this.props.onReset(this.state.scheme,this.state.password.trim(),this.state.token):this.props.onRequest("email",this.state.email.trim())}},{key:"handleEmailChange",value:function(e){this.setState({email:e.target.value})}},{key:"handlePasswordChange",value:function(e){this.setState({password:e.target.value})}},{key:"render",value:function(){var e=this.state.token&&this.state.scheme;return u.createElement("form",{id:"password-reset-form",onSubmit:this.handleSubmit},e?u.createElement(X,{placeholder:"Enter new password",autoComplete:"new-password",value:this.state.password,required:!0,autoFocus:!0,onChange:this.handlePasswordChange}):u.createElement(u.Fragment,null,u.createElement("label",{htmlFor:"inputEmail"},"Send a password reset email:"),u.createElement("input",{type:"email",id:"inputEmail",placeholder:"Your registration email",autoComplete:"email",value:this.state.email,onChange:this.handleEmailChange,required:!0,autoFocus:!0})),u.createElement("div",{className:"dialog-buttons"},u.createElement("button",{className:"blue",type:"submit"},e?"Reset":"Send request")))}}]),t}(),le=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={transport:e.transport||"def",serverAddress:e.serverAddress},n.handleSubmit=n.handleSubmit.bind(n),n.handleTransportSelected=n.handleTransportSelected.bind(n),n.handleServerAddressChange=n.handleServerAddressChange.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleSubmit",value:function(e){e.preventDefault(),this.props.onUpdate({transport:this.state.transport,serverAddress:this.state.serverAddress})}},{key:"handleTransportSelected",value:function(e){this.setState({transport:e.currentTarget.value})}},{key:"handleServerAddressChange",value:function(e){this.setState({serverAddress:e}),this.props.onServerAddressChange(e)}},{key:"render",value:function(){var e={def:"default",ws:"websocket",lp:"long polling"},t=[],n=this;return["def","ws","lp"].map(function(r){var i="transport-"+r,o=e[r];t.push(u.createElement("li",{key:r},u.createElement("input",{type:"radio",id:i,name:"transport-select",value:r,checked:n.state.transport===r,onChange:n.handleTransportSelected}),u.createElement("label",{htmlFor:i},o)))}),u.createElement("form",{id:"settings-form",className:"panel-form",onSubmit:this.handleSubmit},u.createElement("div",{className:"panel-form-row"},u.createElement("label",{className:"small"},"Server to use:")),u.createElement(J,{serverAddress:this.state.serverAddress,onServerAddressChange:this.handleServerAddressChange}),u.createElement("div",{className:"panel-form-row"},u.createElement("label",{className:"small"},"Wire transport:")),u.createElement("div",{className:"panel-form-row"},u.createElement("ul",{className:"quoted"},t)),u.createElement("div",{className:"dialog-buttons"},u.createElement("button",{type:"submit",className:"blue"},"Update")))}}]),t}(),ue=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){return u.createElement("div",{id:"side-caption-panel",className:"caption-panel"},u.createElement("div",{id:"self-avatar",className:"avatar-box"},u.createElement(Y,{avatar:this.props.avatar,topic:this.props.myUserId,title:this.props.title})),u.createElement("div",{id:"sidepanel-title",className:"panel-title"},this.props.title),"login"===this.props.state?u.createElement(ce,{onSignUp:this.props.onSignUp,onSettings:this.props.onSettings}):"contacts"===this.props.state?u.createElement(de,{onNewTopic:this.props.onNewTopic,onSettings:this.props.onSettings}):null,this.props.onCancel?u.createElement(K,{onCancel:this.props.onCancel}):null)}}]),t}(),ce=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){return u.createElement("div",null,u.createElement("a",{href:"javascript:;",onClick:this.props.onSignUp},u.createElement("i",{className:"material-icons"},"person_add"))," ",u.createElement("a",{href:"javascript:;",onClick:this.props.onSettings},u.createElement("i",{className:"material-icons"},"settings")))}}]),t}(),de=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){return u.createElement("div",null,u.createElement("a",{href:"javascript:;",onClick:this.props.onNewTopic},u.createElement("i",{className:"material-icons"},"chat"))," ",u.createElement("a",{href:"javascript:;",onClick:this.props.onSettings},u.createElement("i",{className:"material-icons"},"settings")))}}]),t}(),pe=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleLoginRequested=n.handleLoginRequested.bind(n),n}return l(t,u.Component),r(t,[{key:"handleLoginRequested",value:function(e,t){this.props.onLoginRequest(e,t)}},{key:"render",value:function(){var e=null,t=!1,n=void 0,r=this.props.state||(this.props.myUserId?"contacts":"login");switch(r){case"login":e="Sign In";break;case"register":e="Create Account",n=this.props.onCancel;break;case"settings":e="Settings",n=this.props.onCancel;break;case"edit":e="Edit Account",n=this.props.onCancel;break;case"contacts":e=this.props.title,t=!this.props.avatar||this.props.avatar;break;case"newtpk":e="Start New Chat",n=this.props.onCancel;break;case"cred":e="Confirm Credentials",n=this.props.onCancel;break;case"reset":e="Reset Password",n=this.props.onCancel}return u.createElement("div",{id:"sidepanel",className:this.props.hideSelf?"nodisplay":null},u.createElement(ue,{state:r,title:e,avatar:t,myUserId:this.props.myUserId,onSignUp:this.props.onSignUp,onSettings:this.props.onSettings,onNewTopic:this.props.onNewTopic,onCancel:n}),u.createElement(fe,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}),"login"===r?u.createElement(ie,{login:this.props.login,disabled:this.props.loginDisabled,onLogin:this.handleLoginRequested}):"register"===r?u.createElement(oe,{onCreateAccount:this.props.onCreateAccount,onCancel:this.props.onCancel,onError:this.props.onError}):"settings"===r?u.createElement(le,{transport:this.props.transport,serverAddress:this.props.serverAddress,onServerAddressChange:this.props.onGlobalSettings,onCancel:this.props.onCancel,onUpdate:this.props.onGlobalSettings}):"edit"===r?u.createElement(he,{tinode:this.props.tinode,myUserId:this.props.myUserId,messageSounds:this.props.messageSounds,desktopAlerts:this.props.desktopAlerts,desktopAlertsEnabled:this.props.desktopAlertsEnabled,onUpdateAccount:this.props.onUpdateAccount,onUpdateTags:this.props.onUpdateAccountTags,onTogglePushNotifications:this.props.onTogglePushNotifications,onToggleMessageSounds:this.props.onToggleMessageSounds,onLogout:this.props.onLogout,onCancel:this.props.onCancel,onError:this.props.onError}):"contacts"===r?u.createElement(ye,{tinode:this.props.tinode,myUserId:this.props.myUserId,connected:this.props.connected,topicSelected:this.props.topicSelected,chatList:this.props.chatList,showContextMenu:this.props.showContextMenu,onTopicSelected:this.props.onTopicSelected}):"newtpk"===r?u.createElement(_e,{searchResults:this.props.searchResults,onInitFind:this.props.onInitFind,onSearchContacts:this.props.onSearchContacts,onCreateTopic:this.props.onCreateTopic,onError:this.props.onError}):"cred"===r?u.createElement(Te,{credCode:this.props.credCode,credMethod:this.props.credMethod,onSubmit:this.props.onValidateCredentials,onCancel:this.props.onCancel,onError:this.props.onError}):"reset"===r?u.createElement(se,{onRequest:this.props.onPasswordResetRequest,onReset:this.props.onResetPassword}):null)}}]),t}(),fe=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={show:!1},n.hide=n.hide.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"hide",value:function(){this.setState({show:!1}),this.props.onClearError&&this.props.onClearError()}},{key:"render",value:function(){var e="err"==this.props.level?"error":"warning";return u.createElement("div",{className:this.state.show?"err"==this.props.level?"alert-box error":"alert-box warning":"alert-box"},u.createElement("div",{className:"icon"},u.createElement("i",{className:"material-icons"},e)),this.props.text,u.createElement("div",{className:"cancel"},u.createElement(K,{onCancel:this.hide})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return{show:!!e.level}}}]),t}(),he=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=n.props.tinode.getMeTopic(),i=r.getDefaultAccess(),o=n.props.tinode.getFndTopic();return n.state={fullName:r.public?r.public.fn:void 0,avatar:C(r.public?r.public.photo:null),auth:i?i.auth:null,anon:i?i.anon:null,tags:o.tags(),showPermissionEditorFor:void 0,previousOnTags:o.onTagsUpdated},n.tnNewTags=n.tnNewTags.bind(n),n.handleFullNameUpdate=n.handleFullNameUpdate.bind(n),n.handlePasswordUpdate=n.handlePasswordUpdate.bind(n),n.handleImageChanged=n.handleImageChanged.bind(n),n.handleCheckboxClick=n.handleCheckboxClick.bind(n),n.handleLaunchPermissionsEditor=n.handleLaunchPermissionsEditor.bind(n),n.handleHidePermissionsEditor=n.handleHidePermissionsEditor.bind(n),n.handlePermissionsChanged=n.handlePermissionsChanged.bind(n),n.handleTagsUpdated=n.handleTagsUpdated.bind(n),n}return l(t,u.Component),r(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.tinode.getFndTopic();t.onTagsUpdated=this.tnNewTags,t.isSubscribed()||t.subscribe(t.startMetaQuery().withLaterDesc().withTags().build()).catch(function(t){e.props.onError(t.message,"err")})}},{key:"componentWillUnmount",value:function(){this.props.tinode.getFndTopic().onTagsUpdated=this.state.previousOnTags}},{key:"tnNewTags",value:function(e){this.setState({tags:e})}},{key:"handleFullNameUpdate",value:function(e){this.setState({fullName:e}),this.props.onUpdateAccount(void 0,V(e,this.state.avatar))}},{key:"handlePasswordUpdate",value:function(e){this.setState({password:e}),this.props.onUpdateAccount(e)}},{key:"handleImageChanged",value:function(e){this.setState({avatar:e}),this.props.onUpdateAccount(void 0,V(this.state.fullName,e))}},{key:"handleCheckboxClick",value:function(e,t){"sound"==e?this.props.onToggleMessageSounds(t):"alert"==e&&this.props.onTogglePushNotifications(t)}},{key:"handleLaunchPermissionsEditor",value:function(e){this.setState({showPermissionEditorFor:e,editedPermissions:this.state[e]})}},{key:"handleHidePermissionsEditor",value:function(){this.setState({showPermissionEditorFor:void 0})}},{key:"handlePermissionsChanged",value:function(e){var t={};t[this.state.showPermissionEditorFor]=e,this.props.onUpdateAccount(void 0,void 0,t);var n={showPermissionEditorFor:void 0};n[this.state.showPermissionEditorFor]=e,this.setState(n)}},{key:"handleTagsUpdated",value:function(e){q(this.state.tags.slice(0),e.slice(0))||this.props.onUpdateTags(e)}},{key:"render",value:function(){var e=[];return this.state.tags.map(function(t){e.push(u.createElement("span",{className:"badge",key:e.length},t))}),0==e.length&&(e=u.createElement("i",null,"No tags defined. Add some.")),u.createElement(u.Fragment,null,this.state.showPermissionEditorFor?u.createElement(ee,{mode:this.state.editedPermissions,skip:"O",onSubmit:this.handlePermissionsChanged,onCancel:this.handleHidePermissionsEditor}):u.createElement("div",{id:"edit-account",className:"scrollable-panel"},u.createElement("div",{className:"panel-form-row"},u.createElement("div",{className:"panel-form-column"},u.createElement("div",null,u.createElement("label",{className:"small"},"Your name")),u.createElement("div",null,u.createElement(Q,{placeholder:"Full name, e.g. John Doe",value:this.state.fullName,onFinished:this.handleFullNameUpdate})),u.createElement("div",null,u.createElement("label",{className:"small"},"Password")),u.createElement("div",null,u.createElement(Q,{placeholder:"Unchanged",type:"password",onFinished:this.handlePasswordUpdate}))),u.createElement(ae,{avatar:this.state.avatar,uid:this.props.myUserId,title:this.state.fullName,onImageChanged:this.handleImageChanged,onError:this.props.onError})),u.createElement("div",{className:"hr"}),u.createElement("div",{className:"panel-form-column"},u.createElement("div",{className:"panel-form-row"},u.createElement("label",null,"Address:"),u.createElement("tt",null,this.props.myUserId)),u.createElement("div",null,u.createElement("label",{className:"small"},"Default access mode:")),u.createElement("div",{className:"quoted"},u.createElement("div",null,"Auth: ",u.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"auth")},this.state.auth)),u.createElement("div",null,"Anon: ",u.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"anon")},this.state.anon)))),u.createElement("div",{className:"hr"}),u.createElement("div",{className:"panel-form-row"},u.createElement("label",{htmlFor:"message-sound"},"Message sound:"),u.createElement(Z,{name:"sound",id:"message-sound",checked:this.props.messageSounds,onChange:this.handleCheckboxClick})),u.createElement("div",{className:"panel-form-row"},u.createElement("label",{htmlFor:"desktop-alerts"},"Notification alerts",this.props.desktopAlertsEnabled?null:" (requires HTTPS)",":"),u.createElement(Z,{name:"alert",id:"desktop-alerts",checked:this.props.desktopAlerts,onChange:this.props.desktopAlertsEnabled?this.handleCheckboxClick:null})),u.createElement("div",{className:"hr"}),u.createElement(me,{title:"Tags (user discovery)",activated:!1,tags:this.state.tags,onSubmit:this.handleTagsUpdated}),u.createElement("div",{className:"hr"}),u.createElement("div",{className:"panel-form-column"},u.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.props.onLogout},u.createElement("i",{className:"material-icons"},"exit_to_app")," Logout"))))}}]),t}(),me=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={tags:n.props.tags,tagInput:"",activated:n.props.activated,noTagsMessage:"Add some tags"},n.handleShowTagManager=n.handleShowTagManager.bind(n),n.handleTagInput=n.handleTagInput.bind(n),n.handleAddTag=n.handleAddTag.bind(n),n.handleRemoveTag=n.handleRemoveTag.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n.handleCancel=n.handleCancel.bind(n),n}return l(t,u.Component),r(t,[{key:"handleShowTagManager",value:function(){this.setState({activated:!0})}},{key:"handleTagInput",value:function(e){if(this.setState({tagInput:e}),e.length>0){var t=e[e.length-1];if(","==t||" "==t||";"==t){var n=e.substr(0,e.length-1).trim();n.length>=4&&this.handleAddTag(n)}}}},{key:"handleAddTag",value:function(e){if((e=e.trim()).length>0){var t=this.state.tags.slice(0);t.push(e),this.setState({tags:t,tagInput:""}),this.props.onTagsChanged&&this.props.onTagsChanged(t)}}},{key:"handleRemoveTag",value:function(e,t){var n=this.state.tags.slice(0);n.splice(t,1),this.setState({tags:n}),this.props.onTagsChanged&&this.props.onTagsChanged(n)}},{key:"handleSubmit",value:function(){var e=this.state.tags.slice(0),t=this.state.tagInput.trim();t.length>0&&(e.push(t),this.props.onTagsChanged&&this.props.onTagsChanged(e)),this.props.onSubmit(e),this.setState({activated:!1,tagInput:"",tags:this.props.tags})}},{key:"handleCancel",value:function(){this.setState({activated:!1,tagInput:"",tags:this.props.tags}),this.props.onCancel&&this.props.onCancel()}},{key:"render",value:function(){var e=[];return this.state.activated?this.state.tags.map(function(t){e.push({user:t})}):(this.state.tags.map(function(t){e.push(u.createElement("span",{className:"badge",key:e.length},t))}),0==e.length&&(e=u.createElement("i",null,"No tags defined. Add some."))),u.createElement("div",{className:"panel-form-column"},u.createElement("div",{className:"panel-form-row"},u.createElement("label",{className:"small"},this.props.title)),this.state.activated?u.createElement("div",null,u.createElement(te,{chips:e,avatarDisabled:!0,prompt:this.state.noTagsMessage,onEnter:this.handleAddTag,onFocusLost:this.handleAddTag,onCancel:this.handleCancel,onChipRemoved:this.handleRemoveTag,filterFunc:this.handleTagInput}),this.props.onSubmit||this.props.onCancel?u.createElement("div",{id:"tag-manager-buttons",className:"panel-form-row"},u.createElement("button",{className:"blue",onClick:this.handleSubmit},"OK"),u.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")):null):u.createElement("div",null,u.createElement("a",{href:"javascript:;",className:"flat-button",onClick:this.handleShowTagManager},u.createElement("i",{className:"material-icons"},"edit")," Manage tags"),u.createElement("span",null,e)))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return q(e.tags,t.tags)||t.activated?null:{tags:e.tags}}}]),t}(),ve=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleClick=n.handleClick.bind(n),n.handleContextClick=n.handleContextClick.bind(n),n}return l(t,u.Component),r(t,[{key:"handleClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelected&&this.props.onSelected(this.props.item,this.props.index,this.props.now,this.props.acs)}},{key:"handleContextClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({topicName:this.props.item,y:e.pageY,x:e.pageX})}},{key:"render",value:function(){var e=this.props.title;e?e.length>30&&(e=e.substring(0,28)+"..."):e=u.createElement("i",null,"unknown");var t=this.props.now?"online":"offline",n=!this.props.avatar||this.props.avatar,r=[];if(this.props.badges&&this.props.badges.length>0){var i=0;this.props.badges.map(function(e){var t="badge"+(e.color?" "+e.color:"");r.push(u.createElement("span",{className:t,key:i},e.name)),i++})}return this.props.showMode&&this.props.acs&&r.push(u.createElement("span",{className:"badge",key:"mode"},this.props.acs.getMode())),u.createElement("li",{className:!this.props.showCheckmark&&this.props.selected?"selected":null,onClick:this.handleClick},u.createElement("div",{className:"avatar-box"},u.createElement(Y,{avatar:n,title:this.props.title,topic:this.props.item}),this.props.showOnline?u.createElement("span",{className:t}):this.props.showCheckmark&&this.props.selected?u.createElement("i",{className:"checkmark material-icons"},"check_circle"):null),u.createElement("div",{className:"text-box"},u.createElement("div",null,u.createElement("span",{className:"contact-title"},e),this.props.unread>0?u.createElement(ge,{count:this.props.unread}):null),this.props.comment?u.createElement("div",{className:"contact-comment"},this.props.comment):null,u.createElement("span",null,r)),this.props.showContextMenu?u.createElement("span",{className:"menuTrigger"},u.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},u.createElement("i",{className:"material-icons"},"expand_more"))):null)}}]),t}(),ge=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){var e=null;if(this.props.count>0){var t=this.props.count>9?"9+":this.props.count;e=u.createElement("span",{className:"unread"},t)}return e}}]),t}(),ye=(function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}l(t,u.PureComponent),r(t,[{key:"render",value:function(){var e=null;return this.props.badges&&this.props.badges.length>0&&(e=[],this.props.badges.map(function(t){var n="badge"+(t.color?" "+t.color:"");e.push(u.createElement("span",{className:n,key:t.name},t.name))})),e}}])}(),function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state=t.getDerivedStateFromProps(e,{}),n}return l(t,u.Component),r(t,[{key:"render",value:function(){return u.createElement(be,{connected:this.props.connected,contacts:this.state.contactList,emptyListMessage:u.createElement("span",null,"You have no chats",u.createElement("br",null),"¯\\_(ツ)_/¯"),topicSelected:this.props.topicSelected,myUserId:this.props.myUserId,showOnline:!0,showUnread:!0,onTopicSelected:this.props.onTopicSelected,showContextMenu:this.props.showContextMenu})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=[],r=0;return e.chatList.map(function(e){r+=e.unread>0?1:0,n.push(e)}),n.sort(function(e,t){return(t.touched||0)-(e.touched||0)}),R(r),{contactList:n}}}]),t}()),be=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.Component),r(t,[{key:"render",value:function(){var e=this,t=[],n=Array.isArray(this.props.topicSelected);return this.props.contacts&&this.props.contacts.length>0&&this.props.contacts.map(function(r){var i=r.topic?r.topic:r.user;if(e.props.filterFunc&&e.props.filter){var o=[i];if(r.private&&r.private.comment&&o.push((""+r.private.comment).toLowerCase()),r.public&&r.public.fn&&o.push((""+r.public.fn).toLowerCase()),!e.props.filterFunc(e.props.filter,o))return}var a=n?e.props.topicSelected.indexOf(i)>-1:e.props.topicSelected===i,s=[];e.props.showMode&&(i===e.props.myUserId&&s.push({name:"you",color:"green"}),r.acs&&r.acs.isOwner()&&s.push({name:"owner"}));var l=Array.isArray(r.private)?r.private.join(", "):r.private?r.private.comment:null;t.push(u.createElement(ve,{title:r.public?r.public.fn:null,avatar:C(r.public?r.public.photo:null),comment:l,unread:e.props.showUnread?r.unread:0,now:r.online&&e.props.connected,acs:r.acs,showMode:e.props.showMode,badges:s,showCheckmark:n,selected:a,showOnline:e.props.showOnline,onSelected:e.props.onTopicSelected,showContextMenu:e.props.showContextMenu,item:i,index:t.length,key:i}))},this),u.createElement("div",{className:this.props.noScroll?null:"scrollable-panel"},t.length>0?u.createElement("ul",{className:"contact-box"},t):u.createElement("div",{className:"center-medium-text"},this.props.emptyListMessage))}}]),t}(),we=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={members:e.members,index:t.indexMembers(e.members),contactFilter:"",noContactsMessage:"You have no contacts :-(",selectedContacts:t.selectedContacts(e.members)},n.handleContactSelected=n.handleContactSelected.bind(n),n.handleMemberRemoved=n.handleMemberRemoved.bind(n),n.handleContactFilter=n.handleContactFilter.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n.handleCancel=n.handleCancel.bind(n),n}return l(t,u.Component),r(t,[{key:"handleContactSelected",value:function(e,n){var r=this.state.index[e];if(r){if(r.present)return;r.delta+=1,r.present=!0}else r={delta:1,present:!0};var i=this.state.members.slice();i.push(this.props.contacts[n]);var o=t.selectedContacts(i),a=this.state.index;a[e]=r,this.setState({members:i,index:a,selectedContacts:o})}},{key:"handleMemberRemoved",value:function(e,n){var r=this.state.index[e];if(r&&r.present){r.present=!1,r.delta-=1;var i=this.state.members.slice();i.splice(n,1);var o=t.selectedContacts(i),a=this.state.index;a[e]=r,this.setState({members:i,index:a,selectedContacts:o})}}},{key:"handleContactFilter",value:function(e){var t=e?"No contacts match '"+e+"'":"You have no contacts :-(";this.setState({contactFilter:e,noContactsMessage:t})}},{key:"handleSubmit",value:function(){var e=this,t=[],n=[],r=[];Object.keys(this.state.index).map(function(i){e.state.index[i].present&&t.push(i),e.state.index[i].delta>0?n.push(i):e.state.index[i].delta<0&&r.push(i)}),this.props.onSubmit(t,n,r)}},{key:"handleCancel",value:function(){this.props.onCancel()}},{key:"render",value:function(){return u.createElement("div",{id:"group-manager"},u.createElement("div",{className:"panel-form-row"},u.createElement("label",{className:"small"},"Group members")),u.createElement("div",{className:"panel-form-row"},u.createElement(te,{chips:this.state.members,required:this.props.requiredMember,prompt:"add members",filterFunc:this.handleContactFilter,onChipRemoved:this.handleMemberRemoved})),u.createElement("div",{className:"panel-form-row"},u.createElement("label",{className:"small"},"All contacts")),u.createElement(be,{contacts:this.props.contacts,myUserId:this.props.myUserId,topicSelected:this.state.selectedContacts,filter:this.state.contactFilter,filterFunc:t.doContactFiltering,emptyListMessage:this.state.noContactsMessage,showOnline:!1,showUnread:!1,onTopicSelected:this.handleContactSelected}),u.createElement("div",{id:"group-manager-buttons",className:"panel-form-row"},u.createElement("button",{className:"blue",onClick:this.handleSubmit},"OK"),u.createElement("button",{className:"white",onClick:this.handleCancel},"Cancel")))}}],[{key:"indexMembers",value:function(e){var t={};return e.map(function(e){t[e.user]={delta:0,present:!0}}),t}},{key:"selectedContacts",value:function(e){var t=[];return e.map(function(e){t.push(e.user)}),t}},{key:"doContactFiltering",value:function(e,t){if(e){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return!0;return!1}return!0}}]),t}(),_e=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={tabSelected:"p2p",contactList:e.searchResults},n.handleTabClick=n.handleTabClick.bind(n),n.handleContactSelected=n.handleContactSelected.bind(n),n.handleNewGroupSubmit=n.handleNewGroupSubmit.bind(n),n.handleGroupByID=n.handleGroupByID.bind(n),n}return l(t,u.Component),r(t,[{key:"componentDidMount",value:function(){this.props.onInitFind()}},{key:"handleTabClick",value:function(e){e.preventDefault(),U(L(window.location.hash,"tab",e.currentTarget.dataset.id)),this.setState({tabSelected:e.currentTarget.dataset.id})}},{key:"handleContactSelected",value:function(e){"p2p"===this.state.tabSelected&&(U(j(window.location.hash,"tab")),this.props.onCreateTopic(e,void 0))}},{key:"handleNewGroupSubmit",value:function(e,t,n,r){U(j(window.location.hash,"tab")),this.props.onCreateTopic(void 0,V(e,t),n,r)}},{key:"handleGroupByID",value:function(e){U(j(window.location.hash,"tab")),this.props.onCreateTopic(e)}},{key:"render",value:function(){return u.createElement("div",{className:"flex-column"},u.createElement("ul",{className:"tabbar"},u.createElement("li",{className:"p2p"===this.state.tabSelected?"active":null},u.createElement("a",{href:"javascript:;","data-id":"p2p",onClick:this.handleTabClick},"find")),u.createElement("li",{className:"grp"===this.state.tabSelected?"active":null},u.createElement("a",{href:"javascript:;","data-id":"grp",onClick:this.handleTabClick},"new group")),u.createElement("li",{className:"byid"===this.state.tabSelected?"active":null},u.createElement("a",{href:"javascript:;","data-id":"byid",onClick:this.handleTabClick},"by id"))),"grp"===this.state.tabSelected?u.createElement(Ee,{onSubmit:this.handleNewGroupSubmit}):"byid"===this.state.tabSelected?u.createElement(Se,{onSubmit:this.handleGroupByID,onError:this.props.onError}):u.createElement("div",{className:"flex-column"},u.createElement(ke,{type:"p2p",onSearchContacts:this.props.onSearchContacts}),u.createElement(be,{contacts:this.state.contactList,myUserId:this.props.myUserId,emptyListMessage:"Use search to find contacts",topicSelected:this.state.selectedContact,showOnline:!1,showUnread:!1,showContextMenu:!1,onTopicSelected:this.handleContactSelected})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return{contactList:e.searchResults}}}]),t}(),Ee=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={fn:"",private:"",imageDataUrl:null,tags:[]},n.handleFnChange=n.handleFnChange.bind(n),n.handlePrivateChange=n.handlePrivateChange.bind(n),n.handleImageChanged=n.handleImageChanged.bind(n),n.handleTagsChanged=n.handleTagsChanged.bind(n),n.handleTagsChanged=n.handleTagsChanged.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleFnChange",value:function(e){this.setState({fn:e.target.value})}},{key:"handlePrivateChange",value:function(e){this.setState({private:e.target.value})}},{key:"handleImageChanged",value:function(e){this.setState({imageDataUrl:e})}},{key:"handleTagsChanged",value:function(e){this.setState({tags:e})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.state.fn&&this.state.fn.trim()&&this.props.onSubmit(this.state.fn.trim(),this.state.imageDataUrl,this.state.private.trim(),this.state.tags)}},{key:"render",value:function(){var e="blue";return this.props.disabled&&(e+=" disabled"),u.createElement("form",{className:"panel-form",onSubmit:this.handleSubmit},u.createElement("div",{className:"panel-form-row"},u.createElement("div",{className:"panel-form-column"},u.createElement("label",{className:"small",htmlFor:"new-topic-fn"},"Group name"),u.createElement("input",{type:"text",id:"new-topic-fn",placeholder:"Freeform name of the group",value:this.state.fn,onChange:this.handleFnChange,autoFocus:!0,required:!0}),u.createElement("br",null),u.createElement("label",{className:"small",htmlFor:"new-topic-priv"},"Private comment"),u.createElement("input",{type:"text",id:"new-topic-priv",placeholder:"Visible to you only",value:this.state.private,onChange:this.handlePrivateChange})),u.createElement(ae,{onError:this.props.onError,onImageChanged:this.handleImageChanged})),u.createElement(me,{tags:this.state.tags,activated:!0,onTagsChanged:this.handleTagsChanged,title:"Optional tags (search and discovery)"}),u.createElement("div",{className:"dialog-buttons"},u.createElement("button",{className:e},"Create")))}}]),t}(),ke=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={edited:!1,search:""},n.handleSearchChange=n.handleSearchChange.bind(n),n.handleSearch=n.handleSearch.bind(n),n.handleClear=n.handleClear.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"componentWillUnmount",value:function(){this.state.edited&&(this.setState({search:"",edited:!1}),this.props.onSearchContacts(d.DEL_CHAR))}},{key:"handleSearchChange",value:function(e){this.setState({search:e.target.value})}},{key:"handleSearch",value:function(e){e.preventDefault();var t=this.state.search.trim();this.setState({edited:t.length>0}),this.props.onSearchContacts(t.length>0?t:d.DEL_CHAR)}},{key:"handleClear",value:function(){this.state.edited&&this.props.onSearchContacts(d.DEL_CHAR),this.setState({search:"",edited:!1})}},{key:"handleKeyDown",value:function(e){"Enter"===e.key?this.handleSearch(e):"Escape"===e.key&&this.handleClear()}},{key:"render",value:function(){return u.createElement("div",{className:"panel-form"},u.createElement("div",{className:"panel-form-row"},u.createElement("i",{className:"material-icons search"},"search"),u.createElement("input",{className:"search",type:"text",placeholder:"List like email:alice@example.com, tel:17025550003...",value:this.state.search,onChange:this.handleSearchChange,onKeyDown:this.handleKeyDown,required:!0,autoFocus:!0}),u.createElement("a",{href:"javascript:;",onClick:this.handleClear},u.createElement("i",{className:"material-icons"},"close"))))}}]),t}(),Se=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={groupId:""},n.handleChange=n.handleChange.bind(n),n.handleKeyPress=n.handleKeyPress.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleChange",value:function(e){this.setState({groupId:e.target.value})}},{key:"handleKeyPress",value:function(e){"Enter"===e.key&&this.handleSubmit(e)}},{key:"handleSubmit",value:function(e){if(e.preventDefault(),this.state.groupId){var t=this.state.groupId.trim();t.length>3&&("usr"==t.substr(0,3)||"grp"==t.substr(0,3))?this.props.onSubmit(t):this.props.onError("Invalid ID","err")}}},{key:"render",value:function(){return u.createElement("div",{className:"panel-form"},u.createElement("div",{className:"panel-form-row"},u.createElement("input",{type:"text",placeholder:"Group or User ID",value:this.state.groupId,onChange:this.handleChange,onKeyPress:this.handleKeyPress,required:!0})),u.createElement("div",{className:"dialog-buttons"},u.createElement("button",{className:"blue",onClick:this.handleSubmit},"Subscribe")))}}]),t}(),Te=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={code:e.credCode||""},n.handleChange=n.handleChange.bind(n),n.handleKeyPress=n.handleKeyPress.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"handleChange",value:function(e){this.setState({code:e.target.value})}},{key:"handleKeyPress",value:function(e){"Enter"===e.key&&this.handleSubmit(e)}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.state.code&&this.state.code.trim()&&this.props.onSubmit(this.props.credMethod,this.state.code.trim())}},{key:"render",value:function(){var e={email:"email",tel:"phone"}[this.props.credMethod]||this.props.credMethod;return u.createElement("div",{className:"panel-form"},u.createElement("div",{className:"panel-form-row"},u.createElement("label",{className:"small",htmlFor:"enter-confirmation-code"},"Enter confirmation code sent to you by ",e,":")),u.createElement("div",{className:"panel-form-row"},u.createElement("input",{type:"text",id:"enter-confirmation-code",placeholder:"Numbers only",value:this.state.code,onChange:this.handleChange,onKeyPress:this.handleKeyPress,required:!0})),u.createElement("div",{className:"dialog-buttons"},u.createElement("button",{className:"blue",onClick:this.handleSubmit},"Confirm")))}}]),t}(),Ce=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={topic:null,owner:!1,admin:!1,sharer:!1,muted:!1,address:null,groupTopic:void 0,fullName:void 0,avatar:null,private:null,selectedContact:null,access:null,modeGiven:null,modeWant:null,modeGiven2:null,modeWant2:null,auth:null,anon:null,contactList:[],tags:[],showMemberPanel:!1,showPermissionEditorFor:void 0,moreInfoExpanded:!1,previousMetaDesc:void 0,previousSubsUpdated:void 0,previousTagsUpdated:void 0},n.resetSubs=n.resetSubs.bind(n),n.resetDesc=n.resetDesc.bind(n),n.onMetaDesc=n.onMetaDesc.bind(n),n.onSubsUpdated=n.onSubsUpdated.bind(n),n.onTagsUpdated=n.onTagsUpdated.bind(n),n.handleFullNameUpdate=n.handleFullNameUpdate.bind(n),n.handlePrivateUpdate=n.handlePrivateUpdate.bind(n),n.handleImageChanged=n.handleImageChanged.bind(n),n.handleMuted=n.handleMuted.bind(n),n.handlePermissionsChanged=n.handlePermissionsChanged.bind(n),n.handleLaunchPermissionsEditor=n.handleLaunchPermissionsEditor.bind(n),n.handleHidePermissionsEditor=n.handleHidePermissionsEditor.bind(n),n.handleShowAddMembers=n.handleShowAddMembers.bind(n),n.handleHideAddMembers=n.handleHideAddMembers.bind(n),n.handleMemberUpdateRequest=n.handleMemberUpdateRequest.bind(n),n.handleLeave=n.handleLeave.bind(n),n.handleMemberSelected=n.handleMemberSelected.bind(n),n.handleMoreInfo=n.handleMoreInfo.bind(n),n.handleTagsUpdated=n.handleTagsUpdated.bind(n),n.handleContextMenu=n.handleContextMenu.bind(n),n}return l(t,u.Component),r(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props.tinode.getTopic(e.topic);t&&(this.onMetaDesc!=t.onMetaDesc&&(this.previousMetaDesc=t.onMetaDesc,t.onMetaDesc=this.onMetaDesc,this.previousSubsUpdated=t.onSubsUpdated,t.onSubsUpdated=this.onSubsUpdated,"grp"==t.getType()?(this.previousTagsUpdated=t.onTagsUpdated,t.onTagsUpdated=this.onTagsUpdated):this.previousTagsUpdated=void 0),this.state.topic!=e.topic&&(this.setState({topic:e.topic}),this.resetDesc(t,e),this.resetSubs(t,e)))}},{key:"componentWillUnmount",value:function(){var e=this.props.tinode.getTopic(this.props.topic);e&&(this.setState({topic:null}),e.onMetaDesc=this.previousMetaDesc,e.onSubsUpdated=this.previousSubsUpdated,e.onTagsUpdated=this.previousTagsUpdated)}},{key:"resetSubs",value:function(e,t){var n={contactList:[]};if("p2p"==e.getType()){var r=e.subscriber(t.topic);r&&(n.modeGiven2=r.acs.getGiven(),n.modeWant2=r.acs.getWant())}else e.subscribers(function(e){n.contactList.push(e)},this);this.setState(n)}},{key:"resetDesc",value:function(e,t){var n=e.getDefaultAccess()||{},r=e.getAccessMode();this.setState({owner:r&&r.isOwner(),admin:r&&r.isAdmin(),sharer:r&&(r.isAdmin()||r.isSharer()),muted:r&&r.isMuted(),fullName:e.public?e.public.fn:void 0,avatar:C(e.public?e.public.photo:null),private:e.private?e.private.comment:null,address:e.name,groupTopic:"grp"==e.getType(),showMemberPanel:!1,access:r?r.getMode():void 0,modeGiven:r?r.getGiven():void 0,modeWant:r?r.getWant():void 0,auth:n.auth,anon:n.anon}),"grp"==e.getType()&&r&&r.isOwner()&&e.getMeta(e.startMetaQuery().withTags().build())}},{key:"onMetaDesc",value:function(e){var t=this.props.tinode.getTopic(this.props.topic);t&&(this.resetDesc(t,this.props),this.previousMetaDesc&&this.previousMetaDesc!=this.onMetaDesc&&this.previousMetaDesc(e))}},{key:"onSubsUpdated",value:function(){var e=this.props.tinode.getTopic(this.props.topic);e&&(this.resetSubs(e,this.props),this.previousSubsUpdated&&this.previousSubsUpdated!=this.onSubsUpdated&&this.previousSubsUpdated())}},{key:"onTagsUpdated",value:function(e){this.setState({tags:e}),this.previousTagsUpdated&&this.previousTagsUpdated!=this.onTagsUpdated&&this.previousTagsUpdated()}},{key:"handleFullNameUpdate",value:function(e){this.state.fullName!==e&&(this.setState({fullName:e}),this.props.onTopicDescUpdate(this.props.topic,V(e,this.state.avatar),null))}},{key:"handlePrivateUpdate",value:function(e){this.state.priv!==e&&(this.setState({private:e}),this.props.onTopicDescUpdate(this.props.topic,null,e))}},{key:"handleImageChanged",value:function(e){this.setState({avatar:e}),this.props.onTopicDescUpdate(this.props.topic,V(this.state.fullName,e),null)}},{key:"handleMuted",value:function(e,t){this.setState({muted:t}),this.props.onChangePermissions(this.props.topic,t?"-P":"+P")}},{key:"handlePermissionsChanged",value:function(e){switch(this.state.showPermissionEditorFor){case"auth":this.props.onTopicDescUpdate(this.props.topic,null,null,{auth:e});break;case"anon":this.props.onTopicDescUpdate(this.props.topic,null,null,{anon:e});break;case"mode":case"want":this.props.onChangePermissions(this.props.topic,e);break;case"given":this.props.onChangePermissions(this.props.topic,e,this.props.topic);break;case"user":this.props.onChangePermissions(this.props.topic,e,this.state.userPermissionsEdited)}this.setState({showPermissionEditorFor:void 0})}},{key:"handleLaunchPermissionsEditor",value:function(e,t){var n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,l=void 0;switch(e){case"mode":n=this.state.access;break;case"want":n=this.state.modeWant,r=this.state.modeGiven,i=this.state.groupTopic?"O":"ASDO",o="Requested",a="Granted";break;case"given":n=this.state.modeGiven2,r=this.state.modeWant2,i=this.state.groupTopic?this.state.owner?"":"O":"ASDO",o="Granted",a="Requested";break;case"auth":n=this.state.auth,i="O";break;case"anon":n=this.state.anon,i="O";break;case"user":var u=this.props.tinode.getTopic(this.props.topic);if(!u)return;var c=u.subscriber(t);if(!c||!c.acs)return;n=c.acs.getGiven(),r=c.acs.getWant(),i=this.state.owner?"":"O",o="Granted",a="Requested",c.public&&(s=c.public.fn,l=c.public.photo);break;default:console.log("Unknown permission editing mode '"+e+"'")}this.setState({showPermissionEditorFor:e,userPermissionsEdited:t,userPermissionsTitle:s,userPermissionsAvatar:l,editedPermissions:n,immutablePermissions:r,editedPermissionsTitle:o,immutablePermissionsTitle:a,editedPermissionsSkipped:i})}},{key:"handleHidePermissionsEditor",value:function(){this.setState({showPermissionEditorFor:void 0})}},{key:"handleShowAddMembers",value:function(){this.props.onInitFind(),this.setState({showMemberPanel:!0})}},{key:"handleHideAddMembers",value:function(){this.setState({showMemberPanel:!1})}},{key:"handleMemberUpdateRequest",value:function(e,t,n){this.props.onMemberUpdateRequest(this.props.topic,t,n),this.setState({showMemberPanel:!1})}},{key:"handleLeave",value:function(){this.props.onLeaveTopic(this.props.topic)}},{key:"handleMemberSelected",value:function(e){this.setState({selectedContact:e})}},{key:"handleMoreInfo",value:function(e){this.setState({moreInfoExpanded:e})}},{key:"handleTagsUpdated",value:function(e){q(this.state.tags.slice(0),e.slice(0))||this.props.onTopicTagsUpdate(this.props.topic,e)}},{key:"handleContextMenu",value:function(e){var t=this,n=this.props.tinode.getTopic(this.props.topic);if(n){var r=n.subscriber(e.topicName);if(r&&r.acs){var i=[{title:"Edit permissions",handler:function(){t.handleLaunchPermissionsEditor("user",e.topicName)}},"member_delete",r.acs.isMuted()?"member_unmute":"member_mute",r.acs.isJoiner()?"member_block":"member_unblock"];this.props.showContextMenu({topicName:this.props.topic,x:e.x,y:e.y,user:e.topicName},i)}}}},{key:"render",value:function(){return u.createElement("div",{id:"info-view"},u.createElement("div",{className:"caption-panel",id:"info-caption-panel"},u.createElement("div",{className:"panel-title",id:"info-title"},"Info"),u.createElement("div",null,u.createElement(K,{onCancel:this.props.onCancel}))),this.props.displayMobile?u.createElement(fe,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}):null,this.state.showMemberPanel?u.createElement(we,{members:this.state.contactList,requiredMember:this.props.myUserId,myUserId:this.props.myUserId,contacts:this.props.searchableContacts,onCancel:this.handleHideAddMembers,onSubmit:this.handleMemberUpdateRequest}):this.state.showPermissionEditorFor?u.createElement(ee,{mode:this.state.editedPermissions,compare:this.state.immutablePermissions,skip:this.state.editedPermissionsSkipped,modeTitle:this.state.editedPermissionsTitle,compareTitle:this.state.immutablePermissionsTitle,userTitle:this.state.userPermissionsTitle,item:this.state.userPermissionsEdited,userAvatar:this.state.userPermissionsAvatar,onSubmit:this.handlePermissionsChanged,onCancel:this.handleHidePermissionsEditor}):u.createElement("div",{id:"info-view-content",className:"scrollable-panel"},u.createElement("div",{className:"panel-form-row"},u.createElement("div",{className:"panel-form-column"},u.createElement("div",null,u.createElement("label",{className:"small"},"Name")),u.createElement("div",null,u.createElement(Q,{placeholder:this.state.groupTopic?"Group name":u.createElement("i",null,"Unknown"),readOnly:!this.state.owner,value:this.state.fullName,onFinished:this.handleFullNameUpdate})),u.createElement("div",null,u.createElement("label",{className:"small"},"Private comment")),u.createElement("div",null,u.createElement(Q,{placeholder:"Visible to you only",value:this.state.private,onFinished:this.handlePrivateUpdate}))),u.createElement(ae,{avatar:this.state.avatar,readOnly:!this.state.owner,uid:this.props.topic,title:this.state.fullName,onImageChanged:this.handleImageChanged,onError:this.props.onError})),u.createElement("div",{className:"hr"}),u.createElement("div",{className:"panel-form-column"},u.createElement("div",{className:"panel-form-row"},u.createElement("label",null,"Muted:"),u.createElement(Z,{name:"P",checked:this.state.muted,onChange:this.handleMuted})),u.createElement($,{title:"More",open:this.state.moreInfoExpanded,onToggle:this.handleMoreInfo}),this.state.moreInfoExpanded?u.createElement("div",{className:"panel-form-column"},u.createElement("div",{className:"panel-form-row"},u.createElement("label",null,"Address:"),u.createElement("tt",null,this.state.address)),this.state.groupTopic?u.createElement("div",{className:"panel-form-row"},u.createElement("label",null,"Your permissions:"),u.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"want")},this.state.access)):u.createElement("div",null,u.createElement("div",null,u.createElement("label",{className:"small"},"Permissions:")),u.createElement("div",{className:"quoted"},u.createElement("div",null,"Yours:  ",u.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"want")},this.state.access)),u.createElement("div",null,this.state.fullName?this.state.fullName:"Other","′s:  ",u.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"given")},this.state.modeGiven2)))),this.state.sharer&&(this.state.auth||this.state.anon)?u.createElement("div",null,u.createElement("div",null,u.createElement("label",{className:"small"},"Default access mode:")),u.createElement("div",{className:"quoted"},u.createElement("div",null,"Auth: ",this.state.admin?u.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"auth")},this.state.auth):u.createElement("tt",null,this.state.auth)),u.createElement("div",null,"Anon: ",this.state.admin?u.createElement("tt",{className:"clickable",onClick:this.handleLaunchPermissionsEditor.bind(this,"anon")},this.state.anon):u.createElement("tt",null,this.state.anon)))):null):null),u.createElement("div",{className:"hr"}),this.state.owner?u.createElement(me,{title:"Tags",tags:this.state.tags,activated:!1,onSubmit:this.handleTagsUpdated}):null,this.state.owner?u.createElement("div",{className:"hr"}):null,this.state.groupTopic?u.createElement("div",{className:"panel-form-column"},u.createElement("div",{className:"panel-form-row"},u.createElement("label",{className:"small"},"Group members:")),u.createElement("div",{className:"panel-form-row"},this.state.sharer?u.createElement("a",{href:"javascript:;",className:"flat-button",onClick:this.handleShowAddMembers},u.createElement("i",{className:"material-icons"},"person_add")," Add members"):null,this.state.owner?null:u.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.handleLeave},u.createElement("i",{className:"material-icons"},"exit_to_app")," Leave")),u.createElement(be,{contacts:this.state.contactList,myUserId:this.props.myUserId,emptyListMessage:"No members",topicSelected:this.state.selectedContact,showOnline:!1,showUnread:!1,showMode:!0,noScroll:!0,onTopicSelected:this.handleMemberSelected,showContextMenu:!!this.state.admin&&this.handleContextMenu})):u.createElement("div",{className:"panel-form-row"},u.createElement("a",{href:"javascript:;",className:"red flat-button",onClick:this.handleLeave},u.createElement("i",{className:"material-icons"},"exit_to_app")," Leave"))))}}]),t}(),xe=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={progress:0},e.uploader&&(e.uploader.onProgress=n.handleProgress.bind(n)),n.handlePreviewImage=n.handlePreviewImage.bind(n),n.handleContextClick=n.handleContextClick.bind(n),n.handleCancelUpload=n.handleCancelUpload.bind(n),n}return l(t,u.Component),r(t,[{key:"handlePreviewImage",value:function(e){e.preventDefault(),this.props.onImagePreview({url:e.target.src,filename:e.target.title,width:e.target.dataset.width,height:e.target.dataset.height,size:e.target.dataset.size,type:e.target.dataset.mime})}},{key:"handleContextClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({seq:this.props.seq,y:e.pageY,x:e.pageX})}},{key:"handleProgress",value:function(e){this.setState({progress:e})}},{key:"handleCancelUpload",value:function(){this.props.uploader.cancel()}},{key:"render",value:function(){var e=0,t=this.props.sequence+" "+(this.props.response?"left":"right"),n="single"==this.props.sequence||"last"==this.props.sequence?"bubble tip":"bubble",r=this.props.userAvatar||!0,i=this.props.userFrom&&this.props.response&&("single"==this.props.sequence||"last"==this.props.sequence),o=this.props.content,a=[];return this.props.mimeType==p.getContentType()?(p.attachments(o,function(e,t){a.push(u.createElement(Oe,{tinode:this.props.tinode,downloadUrl:p.getDownloadUrl(e),filename:e.name,uploader:p.isUploading(e),mimetype:e.mime,size:p.getEntitySize(e),progress:this.state.progress,onCancelUpload:this.handleCancelUpload,onError:this.props.onError,key:t}))},this),o=u.createElement("span",null,p.format(o,function(t,n,r){e+=1;var i=p.tagName(t);if(i){var o=p.attrValue(t,n)||{};if(o.key=e,"IM"==t){var a=x(n.width,n.height,Math.min(this.props.viewportWidth-52,468),312,!1);o.className="inline-image",o.style=a?{width:a.dstWidth+"px",height:a.dstHeight+"px"}:null,o.onClick=this.handlePreviewImage}return u.createElement(i,o,r)}return r},this))):"string"!=typeof o&&(o=u.createElement("span",null,u.createElement("i",{className:"material-icons"},"error_outline")," ",u.createElement("i",null,"invalid content"))),u.createElement("li",{className:t},this.props.userFrom&&this.props.response?u.createElement("div",{className:"avatar-box"},i?u.createElement(Y,{topic:this.props.userFrom,title:this.props.userName,avatar:r}):null):null,u.createElement("div",null,u.createElement("div",{className:n},u.createElement("div",{className:"message-content"},o,a,u.createElement(Pe,{timestamp:this.props.timestamp,received:this.props.received})),u.createElement("span",{className:"menuTrigger"},u.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},u.createElement("i",{className:"material-icons"},"expand_more")))),i?u.createElement("div",{className:"author"},this.props.userName):null))}}]),t}(),Pe=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){var e=void 0;e=this.props.received<=d.MESSAGE_STATUS_SENDING?"sending ...":this.props.received==d.MESSAGE_STATUS_FAILED?"failed":S(this.props.timestamp);var t=null;return this.props.received<=d.MESSAGE_STATUS_SENDING?t=u.createElement("i",{className:"material-icons small"},"access_time"):this.props.received==d.MESSAGE_STATUS_FAILED?t=u.createElement("i",{className:"material-icons small red"},"error_outline"):this.props.received==d.MESSAGE_STATUS_SENT?t=u.createElement("i",{className:"material-icons small"},"done"):this.props.received==d.MESSAGE_STATUS_RECEIVED?t=u.createElement("i",{className:"material-icons small"},"done_all"):this.props.received==d.MESSAGE_STATUS_READ&&(t=u.createElement("i",{className:"material-icons small blue"},"done_all")),u.createElement("span",{className:"timestamp"},e," ",t)}}]),t}(),Ne=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){return u.createElement("div",{className:"uploader"},u.createElement("div",null,u.createElement("span",{style:{width:100*this.props.progress+"%"}})),this.props.progress<.999?u.createElement("a",{href:"javascript:;",onClick:this.props.onCancel},u.createElement("i",{className:"material-icons"},"close")," cancel"):u.createElement("span",null,"finishing..."))}}]),t}(),Oe=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={downloader:null,progress:0},n.downloadFile=n.downloadFile.bind(n),n.handleCancel=n.handleCancel.bind(n),n}return l(t,u.Component),r(t,[{key:"downloadFile",value:function(e,t,n){var r=this,i=this.props.tinode.getLargeFileHelper();this.setState({downloader:i}),i.download(e,t,n,function(e){r.setState({progress:e/r.props.size})}).then(function(){r.setState({downloader:null,progress:0})}).catch(function(e){e&&r.props.onError("Error downloading file: "+e.message,"err"),r.setState({downloader:null,progress:0})})}},{key:"handleCancel",value:function(){this.props.uploader?this.props.onCancelUpload():this.state.downloader&&this.state.downloader.cancel()}},{key:"render",value:function(){var e=this,t=this.props.filename||"file_attachment";t.length>36&&(t=t.substr(0,16)+"..."+t.substr(-16));var n=this.props.size>0?u.createElement("span",{className:"small gray"},"(",T(this.props.size),")"):null,r=void 0,i=void 0;return this.props.uploader||this.state.downloader||/^(?:(?:[a-z]+:)?\/\/)/i.test(this.props.downloadUrl)?(r=this.props.downloadUrl,i=null):(r="javascript:;",i=function(t){e.downloadFile(e.props.downloadUrl,e.props.filename,e.props.mimetype)}),u.createElement("div",{className:"attachment"},u.createElement("div",null,u.createElement("i",{className:"material-icons big gray"},"insert_drive_file")),u.createElement("div",{className:"flex-column"},u.createElement("div",null,t," ",n),this.props.uploader||this.state.downloader?u.createElement(Ne,{progress:this.props.uploader?this.props.progress:this.state.progress,onCancel:this.handleCancel}):u.createElement("div",null,u.createElement("a",{href:r,download:this.props.filename,onClick:i},u.createElement("i",{className:"material-icons"},"file_download")," save"))))}}]),t}(),De=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={messages:[],onlineSubs:[],topic:"",title:"",avatar:null,scrollPosition:0,readOnly:!e.acs||!e.acs.isWriter(),writeOnly:!e.acs||!e.acs.isReader(),typingIndicator:!1,imagePreview:null},n.propsChange=n.propsChange.bind(n),n.leave=n.leave.bind(n),n.handleScrollReference=n.handleScrollReference.bind(n),n.fetchMoreMessages=n.fetchMoreMessages.bind(n),n.handleDescChange=n.handleDescChange.bind(n),n.handleSubsUpdated=n.handleSubsUpdated.bind(n),n.handleNewMessage=n.handleNewMessage.bind(n),n.handleAllMessagesReceived=n.handleAllMessagesReceived.bind(n),n.handleInfoReceipt=n.handleInfoReceipt.bind(n),n.handleImagePreview=n.handleImagePreview.bind(n),n.handleCloseImagePreview=n.handleCloseImagePreview.bind(n),n.handleContextClick=n.handleContextClick.bind(n),n.handleShowContextMenuMessage=n.handleShowContextMenuMessage.bind(n),n.handleBackNavigation=n.handleBackNavigation.bind(n),n}return l(t,u.Component),r(t,[{key:"componentDidUpdate",value:function(e,t){!this.messagesScroller||t.title==this.state.title&&t.messages.length==this.state.messages.length||(this.messagesScroller.scrollTop=this.messagesScroller.scrollHeight-this.state.scrollPosition)}},{key:"componentDidMount",value:function(){this.propsChange(this.props),this.messagesScroller&&this.messagesScroller.addEventListener("scroll",this.fetchMoreMessages)}},{key:"componentWillUnmount",value:function(){this.leave(this.state.topic),this.messagesScroller&&this.messagesScroller.removeEventListener("scroll",this.fetchMoreMessages)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.propsChange(e)}},{key:"propsChange",value:function(e){var t=this;if(e&&e.topic)if(e.connected){var n=this.props.tinode.getTopic(e.topic);if(n){var r=d.isNewGroupTopicName(e.topic),i=!this.props.connected&&e.connected;if(e.topic!=this.state.topic){var o=[],a=[];n.onData=this.handleNewMessage,n.onAllMessagesReceived=this.handleAllMessagesReceived,n.onInfo=this.handleInfoReceipt,n.onMetaDesc=this.handleDescChange,n.onSubsUpdated=this.handleSubsUpdated,n.onPres=this.handleSubsUpdated,this.leave(this.state.topic),this.handleDescChange(n),n.subscribers(function(e){e.online&&e.user!=t.props.myUserId&&a.push(e)}),n.messages(function(e){e.deleted||(o=o.concat(e))}),this.setState({messages:o,onlineSubs:a,topic:e.topic,imagePreview:null,scrollPosition:0}),i=!0,this.props.readTimerHandler(null)}if(this.setState({readOnly:!e.acs||!e.acs.isWriter(),writeOnly:!e.acs||!e.acs.isReader()}),!n.isSubscribed()&&i){var s=n.startMetaQuery().withLaterDesc().withLaterSub().withLaterData(24).withLaterDel(),l=r?e.newGroupTopicParams:void 0;this.setState({fetchingMessages:!0}),n.subscribe(s.build(),l).then(function(r){t.setState({topic:r.topic}),t.props.onNewTopicCreated(e.topic,r.topic),n.queuedMessages(function(e){!e._sending&&n.isSubscribed()&&n.publishMessage(e)})}).catch(function(e){t.props.onError(e.message,"err"),t.setState({title:"Not found",avatar:null,readOnly:!0,writeOnly:!0,fetchingMessages:!1,messages:[],onlineSubs:[],typingIndicator:!1,imagePreview:null})})}}}else this.setState({onlineSubs:[]});else{var u=this.state.topic;this.setState({messages:[],onlineSubs:[],topic:null},this.leave(u))}}},{key:"leave",value:function(e){var t=this;if(e){var n=this.props.tinode.getTopic(e);n&&n.isSubscribed()&&n.leave(!1).catch(function(){}).finally(function(){t.setState({fetchingMessages:!1}),n.onData=void 0,n.onAllMessagesReceived=void 0,n.onInfo=void 0,n.onMetaDesc=void 0,n.onSubsUpdated=void 0,n.onPres=void 0})}}},{key:"handleScrollReference",value:function(e){e&&(e.addEventListener("scroll",this.fetchMoreMessages),this.messagesScroller=e)}},{key:"fetchMoreMessages",value:function(e){var t=this;if(e.target.scrollTop<=0){var n={scrollPosition:e.target.scrollHeight-e.target.scrollTop};this.setState(function(e,r){if(!e.fetchingMessages){var i=t.props.tinode.getTopic(t.state.topic);i&&i.isSubscribed()&&i.msgHasMoreMessages()&&(n.fetchingMessages=!0,i.getMessagesPage(24).catch(function(e){t.setState({fetchingMessages:!1}),t.props.onError(e.message,"err")}))}return n})}}},{key:"handleDescChange",value:function(e){e.public?this.setState({title:e.public.fn,avatar:C(e.public.photo)}):this.setState({title:"",avatar:null}),e.acs&&this.setState({readOnly:!e.acs.isWriter(),writeOnly:!e.acs.isReader()})}},{key:"handleSubsUpdated",value:function(){var e=this;if(this.state.topic){var t=[];this.props.tinode.getTopic(this.state.topic).subscribers(function(n){n.online&&n.user!=e.props.myUserId&&t.push(n)}),this.setState({onlineSubs:t})}}},{key:"handleNewMessage",value:function(e){var t=this.props.tinode.getTopic(this.state.topic),n={messages:[]};(t.messages(function(e){e.deleted||(n.messages=n.messages.concat(e))}),e&&!e.deleted)&&(t.isNewMessage(e.seq)&&(n.scrollPosition=0),t.msgStatus(e)>=d.MESSAGE_STATUS_SENT&&this.props.readTimerHandler(function(){t.noteRead(e.seq)}),this.props.onData(e));this.setState(n)}},{key:"handleAllMessagesReceived",value:function(e){this.setState({fetchingMessages:!1})}},{key:"handleInfoReceipt",value:function(e){switch(e.what){case"kp":clearTimeout(this.keyPressTimer);var t=this;this.keyPressTimer=setTimeout(function(){t.setState({typingIndicator:!1})},b+1e3),this.state.typingIndicator||this.setState({typingIndicator:!0});break;case"read":case"recv":this.forceUpdate();break;default:console.log("Other change in topic: ",e.what)}}},{key:"handleImagePreview",value:function(e){this.setState({imagePreview:e})}},{key:"handleCloseImagePreview",value:function(){this.setState({imagePreview:null})}},{key:"handleContextClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.showContextMenu({topicName:this.state.topic,y:e.pageY,x:e.pageX})}},{key:"handleShowContextMenuMessage",value:function(e){e.topicName=this.state.topic;var t=["message_delete"],n=this.props.tinode.getTopic(e.topicName);if(n){var r=n.getAccessMode();r&&r.isDeleter()&&t.push("message_delete_hard")}this.props.showContextMenu(e,t)}},{key:"handleBackNavigation",value:function(){this.props.onHideMessagesView()}},{key:"render",value:function(){var e=null;if(this.state.topic){for(var t=[],n=this.props.tinode.getTopic(this.state.topic),r="grp"==n.getType(),i=null,o=0;o<this.state.messages.length;o++){var a=this.state.messages[o],s=null;o+1<this.state.messages.length&&(s=this.state.messages[o+1].from);var l="single";a.from==i?l=a.from==s?"middle":"last":a.from==s&&(l="first"),i=a.from;var c,p,f,h,m=!(a.from==this.props.myUserId),v=n.msgStatus(a);if(r){var g=n.userDesc(a.from);g&&g.public&&(c=g.public.fn,p=C(g.public.photo)),f=a.from,h="chat-box group"}else h="chat-box";t.push(u.createElement(xe,{tinode:this.props.tinode,content:a.content,mimeType:a.head?a.head.mime:null,timestamp:a.ts,response:m,seq:a.seq,userFrom:f,userName:c,userAvatar:p,sequence:l,received:v,uploader:a._uploader,viewportWidth:this.props.viewportWidth,showContextMenu:this.handleShowContextMenuMessage,onImagePreview:this.handleImagePreview,onError:this.props.onError,key:a.seq}))}var y=null,b=this.props.tinode.getMeTopic().getContact(this.state.topic);b&&"p2p"==d.topicType(b.topic)&&(b.online?y="online now":b.seen&&(y="Last active: "+S(b.seen.when)));var w=this.state.avatar||!0,_=this.props.online?"online"+(this.state.typingIndicator?" typing":""):"offline";e=u.createElement("div",{id:"topic-view",className:this.props.hideSelf?"nodisplay":null},u.createElement("div",{id:"topic-caption-panel",className:"caption-panel"},this.props.displayMobile?u.createElement("a",{href:"javascript:;",id:"hide-message-view",onClick:this.handleBackNavigation},u.createElement("i",{className:"material-icons"},"arrow_back")):null,u.createElement("div",{className:"avatar-box"},u.createElement(Y,{avatar:w,topic:this.state.topic,title:this.state.title}),u.createElement("span",{className:_})),u.createElement("div",{id:"topic-title-group"},u.createElement("div",{id:"topic-title",className:"panel-title"},this.state.title||u.createElement("i",null,"Unknown")),u.createElement("div",{id:"topic-last-seen"},y)),r?u.createElement(re,{subscribers:this.state.onlineSubs}):u.createElement("div",{id:"topic-users"}),u.createElement("div",null,u.createElement("a",{href:"javascript:;",onClick:this.handleContextClick},u.createElement("i",{className:"material-icons"},"more_vert")))),this.props.displayMobile?u.createElement(fe,{level:this.props.errorLevel,text:this.props.errorText,onClearError:this.props.onError}):null,u.createElement(G,{show:this.state.fetchingMessages}),u.createElement("div",{id:"messages-container"},u.createElement("div",{id:"messages-panel",ref:this.handleScrollReference},u.createElement("ul",{id:"scroller",className:h},t)),this.state.writeOnly?u.createElement("div",{id:"write-only-background"},u.createElement("div",{id:"write-only-note"},"no access to messages")):null),u.createElement(Me,{tinode:this.props.tinode,topic:this.props.topic,disabled:this.state.readOnly,sendMessage:this.props.sendMessage,onError:this.props.onError}),this.state.imagePreview?u.createElement(Re,{content:this.state.imagePreview,onClose:this.handleCloseImagePreview}):null)}else e=u.createElement(Ae,{hideSelf:this.props.hideSelf,serverVersion:this.props.serverVersion,serverAddress:this.props.serverAddress});return e}}]),t}(),Me=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={message:"",keypressTimestamp:(new Date).getTime()-b-1},n.handlePasteEvent=n.handlePasteEvent.bind(n),n.handleAttachImage=n.handleAttachImage.bind(n),n.handleAttachFile=n.handleAttachFile.bind(n),n.handleSend=n.handleSend.bind(n),n.handleKeyPress=n.handleKeyPress.bind(n),n.handleMessageTyping=n.handleMessageTyping.bind(n),n}return l(t,u.PureComponent),r(t,[{key:"componentDidMount",value:function(){this.pasteFile.addEventListener("paste",this.handlePasteEvent,!1)}},{key:"componentWillUnmount",value:function(){this.pasteFile.removeEventListener("paste",this.handlePasteEvent,!1)}},{key:"handlePasteEvent",value:function(e){var t=this;this.props.disabled||function(e,t,n,r){var i=(e.clipboardData||e.originalEvent.clipboardData||{}).items;for(var o in i){var a=i[o];if("file"===a.kind){var s=a.getAsFile();if(!s){console.log("Failed to get file object from pasted file item",a.kind,a.type);continue}return s.type&&"image"==s.type.split("/")[0]?s.size>w||E.indexOf(s.type)<0?D(s,_,_,!1,t,r):M(s,t,r):A(s,n),!0}}return!1}(e,function(e,n,r,i,o){t.props.sendMessage(p.insertImage(null,0,n,e,r,i,o))},function(e,n,r){t.props.sendMessage(p.attachFile(null,e,n,r))},this.props.onError)&&e.preventDefault()}},{key:"handleAttachImage",value:function(e){var t=this;if(e.target.files&&e.target.files.length>0){var n=e.target.files[0];n.size>w||E.indexOf(n.type)<0?D(n,_,_,!1,function(e,n,r,i,o){t.props.sendMessage(p.insertImage(null,0,n,e,r,i,o))},function(e){t.props.onError(e,"err")}):M(n,function(e,n,r,i,o){t.props.sendMessage(p.insertImage(null,0,n,e,r,i,o))},function(e){t.props.onError(e,"err")})}e.target.value=""}},{key:"handleAttachFile",value:function(e){var t=this;if(e.target.files&&e.target.files.length>0){var n=e.target.files[0];if(n.size>1<<23)this.props.onError("The file size "+T(n.size)+" exceeds the "+T(1<<23)+" limit.","err");else if(n.size>w){var r=this.props.tinode.getLargeFileHelper();if(!r)return void this.props.onError("Cannot initiate file upload.");var i=r.upload(n),o=p.attachFile(null,n.type,null,n.name,n.size,i);this.props.sendMessage(o,i,r)}else A(n,function(e,n,r){t.props.sendMessage(p.attachFile(null,e,n,r))},this.props.onError)}e.target.value=""}},{key:"handleSend",value:function(){this.state.message.trim()&&(this.props.sendMessage(this.state.message.trim()),this.setState({message:""}))}},{key:"handleKeyPress",value:function(e){"Enter"===e.key&&(e.shiftKey||(e.preventDefault(),e.stopPropagation(),this.handleSend()))}},{key:"handleMessageTyping",value:function(e){var t={message:e.target.value},n=(new Date).getTime();if(n-this.state.keypressTimestamp>b){var r=this.props.tinode.getTopic(this.props.topic);r.isSubscribed()&&r.noteKeyPress(),t.keypressTimestamp=n}this.setState(t)}},{key:"render",value:function(){var e=this.props.disabled?"Messaging disabled":"New message",t=this;return u.createElement("div",{id:"send-message-panel"},this.props.disabled?u.createElement("i",{className:"material-icons disabled"},"photo"):u.createElement("a",{href:"javascript:;",onClick:function(e){t.attachImage.click()},title:"Add image"},u.createElement("i",{className:"material-icons secondary"},"photo")),this.props.disabled?u.createElement("i",{className:"material-icons disabled"},"attach_file"):u.createElement("a",{href:"javascript:;",onClick:function(e){t.attachFile.click()},title:"Attach file"},u.createElement("i",{className:"material-icons secondary"},"attach_file")),u.createElement("textarea",{id:"sendMessage",placeholder:e,disabled:this.props.disabled,value:this.state.message,onChange:this.handleMessageTyping,onKeyPress:this.handleKeyPress,ref:function(e){t.pasteFile=e},autoFocus:!0}),this.props.disabled?u.createElement("i",{className:"material-icons disabled"},"send"):u.createElement("a",{href:"javascript:;",onClick:this.handleSend,title:"Send"},u.createElement("i",{className:"material-icons"},"send")),u.createElement("input",{type:"file",ref:function(e){t.attachFile=e},onChange:this.handleAttachFile,style:{display:"none"}}),u.createElement("input",{type:"file",ref:function(e){t.attachImage=e},accept:"image/*",onChange:this.handleAttachImage,style:{display:"none"}}))}}]),t}(),Ae=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,u.PureComponent),r(t,[{key:"render",value:function(){var e=m+" ("+d.getLibrary()+")";return u.createElement("div",{id:"dummy-view",className:this.props.hideSelf?"nodisplay":null},u.createElement("div",null,u.createElement("a",{href:"https://github.com/tinode/chat/"},u.createElement("img",{id:"logo",alt:"logo",src:"img/logo.svg"}),u.createElement("h2",null,"Tinode Web")),u.createElement("p",null,"Client: ",e),u.createElement("p",null,"Server: ",this.props.serverVersion," (",this.props.serverAddress,")")))}}]),t}(),Re=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={},n}return l(t,u.PureComponent),r(t,[{key:"componentDidMount",value:function(){this.setState({width:this.container.clientWidth,height:this.container.clientHeight})}},{key:"render",value:function(){if(!this.props.content)return null;var e=this,t=x(this.props.content.width,this.props.content.height,this.state.width,this.state.height,!1),n=t?{width:t.dstWidth+"px",height:t.dstHeight+"px"}:this.props.content.width>this.props.content.height?{width:"100%"}:{height:"100%"};n.maxWidth="100%",n.maxHeight="100%";var r=this.props.content.filename,i=this.props.content.width/13|0;return r.length>i&&(r=r.slice(0,i-2)+"..."+r.slice(2-i)),u.createElement("div",{id:"image-preview",onClick:this.props.onClose},u.createElement("div",{id:"image-preview-caption-panel"},u.createElement("a",{href:this.props.content.url,download:this.props.content.filename},u.createElement("i",{className:"material-icons"},"file_download")," download"),u.createElement("a",{href:"javascript:;",onClick:this.props.onClose},u.createElement("i",{className:"material-icons gray"},"close"))),u.createElement("div",{id:"image-preview-container",ref:function(t){e.container=t}},u.createElement("img",{src:this.props.content.url,style:n})),u.createElement("div",{id:"image-preview-footer"},u.createElement("div",null,u.createElement("div",null,u.createElement("b",null,"File name"),":"),u.createElement("div",null,u.createElement("span",{title:this.props.content.filename},r))),u.createElement("div",null,u.createElement("div",null,u.createElement("b",null,"Content type"),":"),u.createElement("div",null,this.props.content.type)),u.createElement("div",null,u.createElement("div",null,u.createElement("b",null,"Size"),":"),u.createElement("div",null,this.props.content.width," × ",this.props.content.height," px; ",T(this.props.content.size)))))}}]),t}(),Ie=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state=n.getBlankState(),n.handleResize=n.handleResize.bind(n),n.handleHashRoute=n.handleHashRoute.bind(n),n.handleOnline=n.handleOnline.bind(n),n.handleAppVisibility=n.handleAppVisibility.bind(n),n.handleReadTimer=n.handleReadTimer.bind(n),n.handleVisibilityEvent=n.handleVisibilityEvent.bind(n),n.handleError=n.handleError.bind(n),n.handleLoginRequest=n.handleLoginRequest.bind(n),n.handleConnected=n.handleConnected.bind(n),n.doLogin=n.doLogin.bind(n),n.handleCredentialsRequest=n.handleCredentialsRequest.bind(n),n.handleLoginSuccessful=n.handleLoginSuccessful.bind(n),n.handleDisconnect=n.handleDisconnect.bind(n),n.tnMeMetaDesc=n.tnMeMetaDesc.bind(n),n.tnMeContactUpdate=n.tnMeContactUpdate.bind(n),n.tnMeSubsUpdated=n.tnMeSubsUpdated.bind(n),n.resetContactList=n.resetContactList.bind(n),n.tnData=n.tnData.bind(n),n.tnInitFind=n.tnInitFind.bind(n),n.tnFndSubsUpdated=n.tnFndSubsUpdated.bind(n),n.handleSearchContacts=n.handleSearchContacts.bind(n),n.handleTopicSelected=n.handleTopicSelected.bind(n),n.handleHideMessagesView=n.handleHideMessagesView.bind(n),n.handleSendMessage=n.handleSendMessage.bind(n),n.handleNewAccount=n.handleNewAccount.bind(n),n.handleNewAccountRequest=n.handleNewAccountRequest.bind(n),n.handleUpdateAccountRequest=n.handleUpdateAccountRequest.bind(n),n.handleUpdateAccountTagsRequest=n.handleUpdateAccountTagsRequest.bind(n),n.handleSettings=n.handleSettings.bind(n),n.handleGlobalSettings=n.handleGlobalSettings.bind(n),n.handleToggleMessageSounds=n.handleToggleMessageSounds.bind(n),n.initDesktopAlerts=n.initDesktopAlerts.bind(n),n.togglePushToken=n.togglePushToken.bind(n),n.requestPushToken=n.requestPushToken.bind(n),n.handleSidepanelCancel=n.handleSidepanelCancel.bind(n),n.handleNewTopic=n.handleNewTopic.bind(n),n.handleNewTopicRequest=n.handleNewTopicRequest.bind(n),n.handleNewTopicCreated=n.handleNewTopicCreated.bind(n),n.handleTopicUpdateRequest=n.handleTopicUpdateRequest.bind(n),n.handleChangePermissions=n.handleChangePermissions.bind(n),n.handleTagsUpdated=n.handleTagsUpdated.bind(n),n.handleLogout=n.handleLogout.bind(n),n.handleLeaveUnsubRequest=n.handleLeaveUnsubRequest.bind(n),n.handleDialogCancel=n.handleDialogCancel.bind(n),n.handleShowContextMenu=n.handleShowContextMenu.bind(n),n.defaultTopicContextMenu=n.defaultTopicContextMenu.bind(n),n.handleHideContextMenu=n.handleHideContextMenu.bind(n),n.handleShowInfoView=n.handleShowInfoView.bind(n),n.handleHideInfoView=n.handleHideInfoView.bind(n),n.handleMemberUpdateRequest=n.handleMemberUpdateRequest.bind(n),n.handleValidateCredentialsRequest=n.handleValidateCredentialsRequest.bind(n),n.handlePasswordResetRequest=n.handlePasswordResetRequest.bind(n),n.handleResetPassword=n.handleResetPassword.bind(n),n}return l(t,u.Component),r(t,[{key:"getBlankState",value:function(){var e,t,n=localStorage.getObject("settings")||{};return o(e={connected:!1,transport:n.transport||null,serverAddress:n.serverAddress||(t=g,"object"==i(window.location)&&("file:"==window.location.protocol||"localhost"==window.location.hostname?t=v.local:window.location.hostname&&(t=window.location.hostname+(window.location.port?":"+window.location.port:""))),t),serverVersion:"no connection",messageSounds:!n.messageSoundsOff,desktopAlerts:n.desktopAlerts,desktopAlertsEnabled:(z()||"object"==i(window.location)&&"localhost"==window.location.hostname)&&void 0!==f&&"undefined"!=typeof navigator&&"undefined"!=typeof FIREBASE_INIT,firebaseToken:localStorage.getObject("firebase-token"),errorText:"",errorLevel:null,sidePanelSelected:"login",sidePanelTitle:null,sidePanelAvatar:null,dialogSelected:null,contextMenuVisible:!1,login:"",password:"",myUserId:null,liveConnection:navigator.onLine,topicSelected:"",topicSelectedOnline:!1,topicSelectedAcs:null,newGroupTopicParams:null,loginDisabled:!1,displayMobile:window.innerWidth<=640,showInfoPanel:!1,mobilePanel:"sidepanel"},"contextMenuVisible",!1),o(e,"contextMenuBounds",null),o(e,"contextMenuClickAt",null),o(e,"contextMenuParams",null),o(e,"contextMenuItems",[]),o(e,"chatList",[]),o(e,"searchResults",[]),o(e,"searchableContacts",[]),o(e,"credMethod",void 0),o(e,"credCode",void 0),e}},{key:"componentDidMount",value:function(){var e=this;if(window.addEventListener("resize",this.handleResize),window.addEventListener("online",function(t){e.handleOnline(!0)}),window.addEventListener("offline",function(t){e.handleOnline(!1)}),window.addEventListener("hashchange",this.handleHashRoute),document.addEventListener("visibilitychange",this.handleVisibilityEvent),this.setState({viewportWidth:document.documentElement.clientWidth}),this.tinode=t.tnSetup(this.state.serverAddress,this.state.transport),this.tinode.onConnect=this.handleConnected,this.tinode.onDisconnect=this.handleDisconnect,this.state.desktopAlertsEnabled)try{this.fbPush=f.initializeApp(FIREBASE_INIT,m).messaging(),this.fbPush.usePublicVapidKey(FIREBASE_INIT.messagingVapidKey),navigator.serviceWorker.register("/service-worker.js").then(function(t){e.fbPush.useServiceWorker(t),e.initDesktopAlerts(),e.state.desktopAlerts&&(e.state.firebaseToken?e.tinode.setDeviceToken(e.state.firebaseToken):e.togglePushToken(!0))}).catch(function(e){console.log("Failed to register service worker:",e)})}catch(e){this.handleError("Failed to initialize push notifications","err"),console.log("Failed to initialize push notifications",e),this.setState({desktopAlertsEnabled:!1})}var n=localStorage.getObject("keep-logged-in")?localStorage.getObject("auth-token"):void 0,r=I(window.location.hash);n?(n.expires=new Date(n.expires),this.tinode.setAuthToken(n),this.tinode.connect().catch(function(t){e.handleError(t.message,"err")}),delete r.params.info,delete r.params.tab,r.path[0]="",U(F(r.path,r.params))):r.params.token||U(""),this.readTimer=null,this.readTimerCallback=null,this.handleHashRoute()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize),window.removeEventListener("hashchange",this.handleHashRoute),document.removeEventListener("visibilitychange",this.handleVisibilityEvent)}},{key:"handleResize",value:function(){var e=document.documentElement.clientWidth<=640;this.setState({viewportWidth:document.documentElement.clientWidth}),this.state.displayMobile!=e&&this.setState({displayMobile:e})}},{key:"handleHashRoute",value:function(){var e=I(window.location.hash);e.path&&e.path.length>0?(["register","settings","edit","cred","reset","newtpk","contacts",""].includes(e.path[0])?this.setState({sidePanelSelected:e.path[0]}):console.log("Unknown sidepanel view",e.path[0]),e.path.length>1&&e.path[1]!=this.state.topicSelected&&this.setState({topicSelected:d.topicType(e.path[1])?e.path[1]:null})):this.setState({sidePanelSelected:""}),e.params.method&&this.setState({credMethod:e.params.method}),e.params.code&&this.setState({credCode:e.params.code}),this.setState({showInfoPanel:e.params.info,newTopicTabSelected:e.params.tab})}},{key:"handleOnline",value:function(e){e?this.handleError("",null):this.handleError("No connection","warn"),this.setState({liveConnection:e})}},{key:"handleAppVisibility",value:function(e,t){clearTimeout(this.readTimer),this.readTimerCallback=t,this.readTimer=e&&t?setTimeout(t,1e3):null}},{key:"handleReadTimer",value:function(e){this.handleAppVisibility(!document.hidden,e)}},{key:"handleVisibilityEvent",value:function(){this.handleAppVisibility(!document.hidden,this.readTimerCallback)}},{key:"handleError",value:function(e,t){this.setState({errorText:e,errorLevel:t})}},{key:"handleLoginRequest",value:function(e,t){var n=this;this.setState({loginDisabled:!0,login:e,password:t}),this.handleError("",null),this.tinode.isConnected()?this.doLogin(e,t,{meth:this.state.credMethod,resp:this.state.credCode}):this.tinode.connect().catch(function(e){n.setState({loginDisabled:!1}),n.handleError(e.message,"err")})}},{key:"handleConnected",value:function(){var e=this.tinode.getServerInfo();this.setState({serverVersion:e.ver+" "+(e.build?e.build:"none")+"; "}),this.doLogin(this.state.login,this.state.password,{meth:this.state.credMethod,resp:this.state.credCode})}},{key:"doLogin",value:function(e,t,n){var r=this;if(this.tinode.isAuthenticated())U("");else{n=d.credential(n);var i=null,o=this.tinode.getAuthToken();e&&t?(this.setState({password:null}),i=this.tinode.loginBasic(e,t,n)):o&&(i=this.tinode.loginToken(o.token,n)),i?i.then(function(e){e.code>=300&&"validate credentials"===e.text?(n&&r.handleError("Code does not match","warn"),r.handleCredentialsRequest(e.params)):r.handleLoginSuccessful()}).catch(function(e){r.setState({loginDisabled:!1,credMethod:void 0,credCode:void 0}),r.handleError(e.message,"err"),localStorage.removeItem("auth-token"),U("")}):(U(""),this.setState({loginDisabled:!1}))}}},{key:"handleCredentialsRequest",value:function(e){var t=I(window.location.hash);t.path[0]="cred",t.params.method=e.cred[0],U(F(t.path,t.params))}},{key:"handleLoginSuccessful",value:function(){var e=this;this.handleError("",null),localStorage.getObject("keep-logged-in")&&localStorage.setObject("auth-token",this.tinode.getAuthToken());var t=this.tinode.getMeTopic();t.onMetaDesc=this.tnMeMetaDesc,t.onContactUpdate=this.tnMeContactUpdate,t.onSubsUpdated=this.tnMeSubsUpdated,this.setState({connected:!0,credMethod:void 0,credCode:void 0,myUserId:this.tinode.getCurrentUserID()}),t.subscribe(t.startMetaQuery().withLaterSub().withDesc().build()).catch(function(t){localStorage.removeItem("auth-token"),e.handleError(t.message,"err"),U("")}),U(W(window.location.hash,"contacts"))}},{key:"handleDisconnect",value:function(e){this.setState({connected:!1,topicSelectedOnline:!1,dialogSelected:null,errorText:e&&e.message?e.message:"Disconnected",errorLevel:e&&e.message?"err":"warn",loginDisabled:!1,contextMenuVisible:!1,serverVersion:"no connection"})}},{key:"tnMeMetaDesc",value:function(e){e&&e.public&&this.setState({sidePanelTitle:e.public.fn,sidePanelAvatar:C(e.public.photo)})}},{key:"tnMeContactUpdate",value:function(e,t){"on"==e||"off"==e?(this.resetContactList(),this.state.topicSelected==t.topic&&this.setState({topicSelectedOnline:"on"==e})):"read"==e?this.resetContactList():"msg"==e?this.state.topicSelected!=t.topic?(this.state.messageSounds&&y.play(),this.resetContactList()):document.hidden&&this.state.messageSounds&&y.play():"recv"==e||("gone"==e||"unsub"==e?(this.state.topicSelected==t.topic&&this.handleTopicSelected(null),this.resetContactList()):"acs"==e?this.state.topicSelected==t.topic&&this.setState({topicSelectedAcs:t.acs}):"del"==e||console.log("Unsupported (yet) presence update:"+e+" in: "+t.topic))}},{key:"tnMeSubsUpdated",value:function(e){this.resetContactList()}},{key:"resetContactList",value:function(){var e=this,n={chatList:[]};this.tinode.getMeTopic().contacts(function(t){n.chatList.push(t),e.state.topicSelected==t.topic&&(n.topicSelectedOnline=t.online,n.topicSelectedAcs=t.acs)}),n.searchableContacts=t.prepareSearchableContacts(n.chatList,this.state.searchResults),this.setState(n)}},{key:"tnData",value:function(e){var t=this,n=this.tinode.getTopic(e.topic);n.msgStatus(e)>=d.MESSAGE_STATUS_SENT&&(clearTimeout(this.receivedTimer),this.receivedTimer=setTimeout(function(){t.receivedTimer=void 0,n.noteRecv(e.seq)},500))}},{key:"tnInitFind",value:function(){var e=this,t=this.tinode.getFndTopic();t.isSubscribed()?this.tnFndSubsUpdated():(t.onSubsUpdated=this.tnFndSubsUpdated,t.subscribe(t.startMetaQuery().withSub().withTags().build()).catch(function(t){e.handleError(t.message,"err")}))}},{key:"tnFndSubsUpdated",value:function(){var e=[];this.tinode.getFndTopic().contacts(function(t){e.push(t)}),this.setState({searchResults:e,searchableContacts:t.prepareSearchableContacts(this.state.chatList,e)})}},{key:"handleSearchContacts",value:function(e){var t=this,n=this.tinode.getFndTopic();n.setMeta({desc:{public:e}}).then(function(e){return n.getMeta(n.startMetaQuery().withSub().build())}).catch(function(e){t.handleError(e.message,"err")})}},{key:"handleTopicSelected",value:function(e,t,n,r){e?(this.setState({errorText:"",errorLevel:null,mobilePanel:"topic-view",showInfoPanel:!1}),this.state.topicSelected!=e&&(this.setState({topicSelectedOnline:n,topicSelectedAcs:r}),U(B("",e)))):(this.setState({errorText:"",errorLevel:null,mobilePanel:"sidepanel",topicSelectedOnline:!1,topicSelectedAcs:null,showInfoPanel:!1}),this.state.topicSelected&&U(B("",null)))}},{key:"handleHideMessagesView",value:function(){this.setState({mobilePanel:"sidepanel"}),U(B(window.location.hash,null))}},{key:"handleSendMessage",value:function(e,t,n){var r=this,i=this.tinode.getTopic(this.state.topicSelected);(e=i.createMessage(e,!1))._uploader=n,i.isSubscribed()||(t||(t=Promise.resolve()),t=t.then(function(){return i.subscribe()})),t&&(t=t.catch(function(e){r.handleError(e.message,"err")})),i.publishDraft(e,t).catch(function(e){r.handleError(e.message,"err")})}},{key:"handleNewAccount",value:function(){U(W(window.location.hash,"register"))}},{key:"handleNewAccountRequest",value:function(e,t,n,r,i){var o=this;this.tinode.connect(this.state.serverAddress).then(function(){return o.tinode.createAccountBasic(e,t,{public:n,tags:i,cred:d.credential(r)})}).then(function(e){e.code>=300&&"validate credentials"==e.text?o.handleCredentialsRequest(e.params):o.handleLoginSuccessful(o)}).catch(function(e){o.handleError(e.message,"err")})}},{key:"handleUpdateAccountRequest",value:function(e,t,n){var r=this;(t||n)&&this.tinode.getMeTopic().setMeta({desc:{public:t,defacs:n}}).catch(function(e){r.handleError(e.message,"err")}),e&&this.tinode.updateAccountBasic(null,this.tinode.getCurrentLogin(),e).catch(function(e){r.handleError(e.message,"err")})}},{key:"handleUpdateAccountTagsRequest",value:function(e){var t=this;this.tinode.getFndTopic().setMeta({tags:e}).catch(function(e){t.handleError(e.message,"err")})}},{key:"handleSettings",value:function(){U(W(window.location.hash,this.state.myUserId?"edit":"settings"))}},{key:"handleGlobalSettings",value:function(e){var n=e.serverAddress||this.state.serverAddress,r=e.transport||this.state.transport;this.tinode&&(this.tinode.onDisconnect=void 0,this.tinode.disconnect()),this.tinode=t.tnSetup(n,r),this.tinode.onConnect=this.handleConnected,this.tinode.onDisconnect=this.handleDisconnect,this.setState({serverAddress:n,transport:r}),localStorage.setObject("settings",{serverAddress:n,transport:r}),U(W(window.location.hash,""))}},{key:"initDesktopAlerts",value:function(){var e=this;this.fbPush.onTokenRefresh(function(){e.requestPushToken(!0)}),this.fbPush.onMessage(function(e){})}},{key:"togglePushToken",value:function(e){var t=this;e?this.state.firebaseToken?(this.setState({desktopAlerts:!0}),localStorage.updateObject("settings",{desktopAlerts:!0})):this.fbPush.requestPermission().then(function(){t.requestPushToken(!0)}).catch(function(e){t.handleError(e.message,"err"),t.setState({desktopAlerts:!1,firebaseToken:null}),localStorage.updateObject("settings",{desktopAlerts:!1}),console.log("Failed to get permission to notify.",e)}):this.state.firebaseToken?this.fbPush.deleteToken(this.state.firebaseToken).catch(function(e){console.log("Unable to delete token.",e)}).finally(function(){localStorage.updateObject("settings",{desktopAlerts:!1}),localStorage.removeItem("firebase-token"),t.setState({desktopAlerts:!1,firebaseToken:null})}):(this.setState({desktopAlerts:!1,firebaseToken:null}),localStorage.updateObject("settings",{desktopAlerts:!1}))}},{key:"requestPushToken",value:function(e){var t=this;this.fbPush.getToken().then(function(n){n!=t.state.firebaseToken&&(t.tinode.setDeviceToken(n,e),localStorage.setObject("firebase-token",n)),t.setState({firebaseToken:n,desktopAlerts:!0}),localStorage.updateObject("settings",{desktopAlerts:!0})}).catch(function(e){t.handleError(e.message,"err"),console.log("Failed to retrieve firebase token",e)})}},{key:"handleToggleMessageSounds",value:function(e){this.setState({messageSounds:e}),localStorage.updateObject("settings",{messageSoundsOff:!e})}},{key:"handleSidepanelCancel",value:function(){var e=I(window.location.hash);e.path[0]=this.state.myUserId?"contacts":"",e.params&&(delete e.params.code,delete e.params.method,delete e.params.tab),U(F(e.path,e.params)),this.setState({errorText:"",errorLevel:null})}},{key:"handleNewTopic",value:function(){U(W(window.location.hash,"newtpk"))}},{key:"handleNewTopicRequest",value:function(e,t,n,r){var i=this,o=e||this.tinode.newGroupTopicName();e?this.handleTopicSelected(o):this.setState({newGroupTopicParams:{desc:{public:t,private:{comment:n}},tags:r}},function(){i.handleTopicSelected(o)})}},{key:"handleNewTopicCreated",value:function(e,t){this.state.topicSelected==e&&e!=t&&this.setState({topicSelected:t},function(){U(B("",t))})}},{key:"handleTopicUpdateRequest",value:function(e,t,n,r){var i=this,o=this.tinode.getTopic(e);if(o){var a={};t&&(a.public=t),n&&(a.private={comment:n}),r&&(a.defacs=r),o.setMeta({desc:a}).catch(function(e){i.handleError(e.message,"err")})}}},{key:"handleChangePermissions",value:function(e,t,n){var r=this,i=this.tinode.getTopic(e);if(i){var o=i.getAccessMode();n?(o.updateGiven(t),t=o.getGiven()):(o.updateWant(t),t=o.getWant()),i.setMeta({sub:{user:n,mode:t}}).catch(function(e){r.handleError(e.message,"err")})}}},{key:"handleTagsUpdated",value:function(e,t){var n=this,r=this.tinode.getTopic(e);if(r){r.setMeta({tags:t}).catch(function(e){n.handleError(e.message,"err")})}}},{key:"handleLogout",value:function(){R(0),localStorage.removeItem("auth-token"),this.tinode&&(this.tinode.onDisconnect=void 0,this.tinode.disconnect()),this.setState(this.getBlankState()),this.tinode=t.tnSetup(this.state.serverAddress,this.state.transport),this.tinode.onConnect=this.handleConnected,this.tinode.onDisconnect=this.handleDisconnect,U("")}},{key:"handleLeaveUnsubRequest",value:function(e){var t=this,n=this.tinode.getTopic(e);n&&n.leave(!0).then(function(e){U(B(window.location.hash,""))}).catch(function(e){t.handleError(e.message,"err")})}},{key:"handleDialogCancel",value:function(){this.setState({dialogSelected:null})}},{key:"handleShowContextMenu",value:function(e,t){this.setState({contextMenuVisible:!0,contextMenuClickAt:{x:e.x,y:e.y},contextMenuParams:e,contextMenuItems:t||this.defaultTopicContextMenu(e.topicName),contextMenuBounds:c.findDOMNode(this).getBoundingClientRect()})}},{key:"defaultTopicContextMenu",value:function(e){var t=!1,n=!1,r=!1,i=!1,o=this.tinode.getTopic(e);if(o&&o.isSubscribed()){r=!0;var a=o.getAccessMode();t=a&&a.isMuted(),n=a&&!a.isJoiner(),i=a&&a.isDeleter()}return[r?{title:"Info",handler:this.handleShowInfoView}:null,r?"messages_clear":null,r&&i?"messages_clear_hard":null,r?t?"topic_unmute":"topic_mute":null,r?n?"topic_unblock":"topic_block":null,"topic_delete"]}},{key:"handleHideContextMenu",value:function(){this.setState({contextMenuVisible:!1,contextMenuClickAt:null,contextMenuParams:null,contextMenuBounds:null})}},{key:"handleShowInfoView",value:function(){U(L(window.location.hash,"info",!0)),this.setState({showInfoPanel:!0})}},{key:"handleHideInfoView",value:function(){U(j(window.location.hash,"info")),this.setState({showInfoPanel:!1})}},{key:"handleMemberUpdateRequest",value:function(e,t,n){var r=this;if(e){var i=this.tinode.getTopic(e);i&&(t&&t.length>0&&t.map(function(e){i.invite(e,null).catch(function(e){r.handleError(e.message,"err")})}),n&&n.length>0&&n.map(function(e){i.delSubscription(e).catch(function(e){r.handleError(e.message,"err")})}))}}},{key:"handleValidateCredentialsRequest",value:function(e,t){this.setState({credMethod:e,credCode:t}),this.doLogin(null,null,{meth:e,resp:t})}},{key:"handlePasswordResetRequest",value:function(e,t){var n=this;this.tinode.connect().then(function(){return n.tinode.requestResetAuthSecret("basic",e,t)}).catch(function(e){n.handleError(e.message,"err")})}},{key:"handleResetPassword",value:function(e,t,n){var r=this;(n=function(e){if(e){e=e.replace("-","+").replace("_","/");try{e=btoa(atob(e))}catch(t){console.log("Failed to base64 re-decode string"),e=null}}return e}(n))?this.tinode.connect().then(function(){return r.tinode.updateAccountBasic(null,null,t,{token:n})}).catch(function(e){r.handleError(e.message,"err")}):this.handleError("Invalid security token","err")}},{key:"render",value:function(){return u.createElement("div",{id:"app-container"},this.state.contextMenuVisible?u.createElement(H,{tinode:this.tinode,bounds:this.state.contextMenuBounds,clickAt:this.state.contextMenuClickAt,params:this.state.contextMenuParams,items:this.state.contextMenuItems,hide:this.handleHideContextMenu,onAction:this.handleContextMenuAction,onError:this.handleError}):null,u.createElement(pe,{tinode:this.tinode,connected:this.state.connected,displayMobile:this.state.displayMobile,hideSelf:this.state.displayMobile&&"sidepanel"!==this.state.mobilePanel,state:this.state.sidePanelSelected,title:this.state.sidePanelTitle,avatar:this.state.sidePanelAvatar,login:this.state.login,myUserId:this.state.myUserId,loginDisabled:this.state.loginDisabled,errorText:this.state.errorText,errorLevel:this.state.errorLevel,topicSelected:this.state.topicSelected,chatList:this.state.chatList,credMethod:this.state.credMethod,credCode:this.state.credCode,transport:this.state.transport,messageSounds:this.state.messageSounds,desktopAlerts:this.state.desktopAlerts,desktopAlertsEnabled:this.state.desktopAlertsEnabled,serverAddress:this.state.serverAddress,onGlobalSettings:this.handleGlobalSettings,onSignUp:this.handleNewAccount,onSettings:this.handleSettings,onLoginRequest:this.handleLoginRequest,onCreateAccount:this.handleNewAccountRequest,onUpdateAccount:this.handleUpdateAccountRequest,onUpdateAccountTags:this.handleUpdateAccountTagsRequest,onTogglePushNotifications:this.togglePushToken,onToggleMessageSounds:this.handleToggleMessageSounds,onTopicSelected:this.handleTopicSelected,onCreateTopic:this.handleNewTopicRequest,onNewTopic:this.handleNewTopic,onLogout:this.handleLogout,onCancel:this.handleSidepanelCancel,onError:this.handleError,onValidateCredentials:this.handleValidateCredentialsRequest,onPasswordResetRequest:this.handlePasswordResetRequest,onResetPassword:this.handleResetPassword,onInitFind:this.tnInitFind,searchResults:this.state.searchResults,onSearchContacts:this.handleSearchContacts,showContextMenu:this.handleShowContextMenu}),u.createElement(De,{tinode:this.tinode,connected:this.state.connected,online:this.state.topicSelectedOnline,acs:this.state.topicSelectedAcs,displayMobile:this.state.displayMobile,viewportWidth:this.state.viewportWidth,hideSelf:this.state.displayMobile&&("topic-view"!==this.state.mobilePanel||this.state.showInfoPanel),topic:this.state.topicSelected,myUserId:this.state.myUserId,serverVersion:this.state.serverVersion,serverAddress:this.state.serverAddress,errorText:this.state.errorText,errorLevel:this.state.errorLevel,newGroupTopicParams:this.state.newGroupTopicParams,onHideMessagesView:this.handleHideMessagesView,onData:this.tnData,onError:this.handleError,onNewTopicCreated:this.handleNewTopicCreated,readTimerHandler:this.handleReadTimer,showContextMenu:this.handleShowContextMenu,sendMessage:this.handleSendMessage}),this.state.showInfoPanel?u.createElement(Ce,{tinode:this.tinode,connected:this.state.connected,displayMobile:this.state.displayMobile,topic:this.state.topicSelected,searchableContacts:this.state.searchableContacts,myUserId:this.state.myUserId,errorText:this.state.errorText,errorLevel:this.state.errorLevel,onTopicDescUpdate:this.handleTopicUpdateRequest,onCancel:this.handleHideInfoView,onChangePermissions:this.handleChangePermissions,onMemberUpdateRequest:this.handleMemberUpdateRequest,onLeaveTopic:this.handleLeaveUnsubRequest,onAddMember:this.handleManageGroupMembers,onTopicTagsUpdate:this.handleTagsUpdated,onInitFind:this.tnInitFind,onError:this.handleError,showContextMenu:this.handleShowContextMenu}):null)}}],[{key:"tnSetup",value:function(e,t){var n=new d(m,e,"AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K",t,z());return n.enableLogging(!0,!0),n}},{key:"prepareSearchableContacts",value:function(e,t){var n={},r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value;"p2p"==d.topicType(l.topic)&&(n[l.topic]={user:l.topic,updated:l.updated,public:l.public,private:l.private,acs:l.acs})}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}var u=!0,c=!1,p=void 0;try{for(var f,h=t[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var m=f.value;n[m.user]||(n[m.user]=m)}}catch(e){c=!0,p=e}finally{try{!u&&h.return&&h.return()}finally{if(c)throw p}}return Object.values(n)}}]),t}();void 0!==t&&(t.exports=Ie)},{"../version.json":27,"firebase/app":6,"firebase/messaging":7,react:16,"react-dom":13,"tinode-sdk":23}],27:[function(e,t,n){t.exports={version:"0.15.8"}},{}],28:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var u,c=[],d=!1,p=-1;function f(){d&&u&&(d=!1,u.length?c=u.concat(c):p=-1,c.length&&h())}function h(){if(!d){var e=l(f);d=!0;for(var t=c.length;t;){for(u=c,c=[];++p<t;)u&&u[p].run();p=-1,t=c.length}u=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||d||l(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],29:[function(e,t,n){(function(t,r){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function u(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new u(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new u(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i(function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))}),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":28,timers:29}]},{},[25])(25)});