-
+
Create a new knowledge base
@@ -302,13 +285,13 @@ export class ConnectedServicePicker extends Component
-
+
Learn more about using Dispatch apps
Signed in as { this.props.authenticatedUser }. You can link apps from a different LUIS
account to this Azure account by adding yourself as a collaborator.
- Learn more about collaborating.
+ Learn more about collaborating.
>
);
diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePickerContainer.ts b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePickerContainer.ts
index fb8f65315..f21512992 100644
--- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePickerContainer.ts
+++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/connectedServicePicker/connectedServicePickerContainer.ts
@@ -35,8 +35,6 @@ import { ServiceTypes } from 'botframework-config/lib/schema';
import { RootState } from '../../../../../data/store';
import { DialogService } from '../../../../dialogs/service';
import { ConnectedServicePicker } from './connectedServicePicker';
-import { CommandServiceImpl } from '../../../../../platform/commands/commandServiceImpl';
-import { SharedConstants } from '@bfemulator/app-shared';
const mapStateToProps = (state: RootState, ownProps: { [propName: string]: any }) => {
const { services } = state.bot.activeBot;
@@ -51,9 +49,6 @@ const mapDispatchToProps = (_dispatch: () => void) => {
launchServiceEditor: () => DialogService.hideDialog(1),
connectServices: servicesToConnect => DialogService.hideDialog(servicesToConnect),
cancel: () => DialogService.hideDialog(0),
- onAnchorClick: (url) => {
- CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url).catch();
- }
};
};
diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.spec.tsx b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.spec.tsx
index 6016b5b7c..f893b357d 100644
--- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.spec.tsx
+++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.spec.tsx
@@ -1,4 +1,3 @@
-import { SharedConstants } from '@bfemulator/app-shared';
import { LuisService } from 'botframework-config/lib/models';
import { mount } from 'enzyme';
import * as React from 'react';
@@ -13,7 +12,6 @@ import {
} from '../../../../data/action/connectedServiceActions';
import { bot } from '../../../../data/reducer/bot';
import { explorer } from '../../../../data/reducer/explorer';
-import { CommandServiceImpl } from '../../../../platform/commands/commandServiceImpl';
import {
AzureLoginFailedDialogContainer,
AzureLoginSuccessDialogContainer,
@@ -106,13 +104,6 @@ describe('The ServicesExplorer component should', () => {
}));
});
- it('should dispatch a request to open a link when an anchor is clicked', () => {
- const instance = node.instance();
- const remoteCallSpy = jest.spyOn(CommandServiceImpl, 'remoteCall');
- instance.onAnchorClick({ currentTarget: { dataset: { href: 'http://someurl' } } });
- expect(remoteCallSpy).toHaveBeenCalledWith(SharedConstants.Commands.Electron.OpenExternal, 'http://someurl');
- });
-
it('should dispatch to the store when a request to open the sort context menu is made', () => {
const instance = node.instance();
instance.onSortClick();
diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.tsx b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.tsx
index 3eca160d3..7c49bfab8 100644
--- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.tsx
+++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorer.tsx
@@ -33,7 +33,7 @@
import { IConnectedService } from 'botframework-config/lib/schema';
import * as React from 'react';
-import { MouseEvent, MouseEventHandler, SyntheticEvent } from 'react';
+import { MouseEventHandler, SyntheticEvent } from 'react';
import { ServicePane, ServicePaneProps } from '../servicePane/servicePane';
import { ConnectedServiceEditorContainer } from './connectedServiceEditor';
import { ConnectedServicePickerPayload } from '../../../../data/action/connectedServiceActions';
@@ -51,7 +51,6 @@ import { serviceTypeLabels } from '../../../../utils/serviceTypeLables';
export interface ServicesExplorerProps extends ServicePaneProps {
services?: IConnectedService[];
toAnimate?: { [serviceId: string]: boolean };
- onAnchorClick: (url: string) => void;
openAddServiceContextMenu: (payload: ConnectedServicePickerPayload) => void;
openSortContextMenu: () => void;
openServiceDeepLink: (service: IConnectedService) => void;
@@ -97,31 +96,12 @@ export class ServicesExplorer extends ServicePane {
);
@@ -191,8 +171,4 @@ export class ServicesExplorer extends ServicePane {
progressIndicatorComponent: ProgressIndicatorContainer
});
}
-
- private onAnchorClick = (event: MouseEvent): void => {
- this.props.onAnchorClick(event.currentTarget.dataset.href);
- }
}
diff --git a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorerContainer.ts b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorerContainer.ts
index 77d520d71..9f1220129 100644
--- a/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorerContainer.ts
+++ b/packages/app/client/src/ui/shell/explorer/servicesExplorer/servicesExplorerContainer.ts
@@ -31,7 +31,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-import { SharedConstants } from '@bfemulator/app-shared';
import { IConnectedService, ServiceTypes } from 'botframework-config/lib/schema';
import { ComponentClass } from 'react';
import { connect } from 'react-redux';
@@ -44,7 +43,6 @@ import {
} from '../../../../data/action/connectedServiceActions';
import { CONNECTED_SERVICES_PANEL_ID } from '../../../../data/action/explorerActions';
import { RootState } from '../../../../data/store';
-import { CommandServiceImpl } from '../../../../platform/commands/commandServiceImpl';
import { ConnectedServiceEditor } from './connectedServiceEditor/connectedServiceEditor';
import { ServicesExplorer, ServicesExplorerProps } from './servicesExplorer';
@@ -63,9 +61,6 @@ const mapStateToProps = (state: RootState): Partial => {
const mapDispatchToProps = (dispatch): Partial => {
return {
- onAnchorClick: (url) => {
- return CommandServiceImpl.remoteCall(SharedConstants.Commands.Electron.OpenExternal, url);
- },
openAddServiceContextMenu: (payload: ConnectedServicePickerPayload) =>
dispatch(openAddServiceContextMenu(payload)),
diff --git a/packages/app/main/src/appMenuBuilder.ts b/packages/app/main/src/appMenuBuilder.ts
index e51f23eca..231d778fb 100644
--- a/packages/app/main/src/appMenuBuilder.ts
+++ b/packages/app/main/src/appMenuBuilder.ts
@@ -415,33 +415,25 @@ export const AppMenuBuilder = new class AppMenuBuilderImpl implements AppMenuBui
{ type: 'separator' },
{
label: 'Privacy',
- click: () => mainWindow.commandService.remoteCall(
- SharedConstants.Commands.Electron.OpenExternal,
- 'https://go.microsoft.com/fwlink/?LinkId=512132'
- )
+ click: () =>
+ Electron.shell.openExternal('https://go.microsoft.com/fwlink/?LinkId=512132', { activate: true })
},
{
// TODO: Proper link for the license instead of third party credits
label: 'License',
- click: () => mainWindow.commandService.remoteCall(
- SharedConstants.Commands.Electron.OpenExternal,
- 'https://aka.ms/O10ww2'
- )
+ click: () =>
+ Electron.shell.openExternal('https://aka.ms/O10ww2', { activate: true })
},
{
label: 'Credits',
- click: () => mainWindow.commandService.remoteCall(
- SharedConstants.Commands.Electron.OpenExternal,
- 'https://aka.ms/Ud5ga6'
- )
+ click: () =>
+ Electron.shell.openExternal('https://aka.ms/Ud5ga6', { activate: true })
},
{ type: 'separator' },
{
label: 'Report an issue',
- click: () => mainWindow.commandService.remoteCall(
- SharedConstants.Commands.Electron.OpenExternal,
- 'https://aka.ms/cy106f'
- )
+ click: () =>
+ Electron.shell.openExternal('https://aka.ms/cy106f', { activate: true })
},
{ type: 'separator' },
this.getUpdateMenuItem(),
diff --git a/packages/app/main/src/commands/botCommands.spec.ts b/packages/app/main/src/commands/botCommands.spec.ts
index d637fda60..f8299e80b 100644
--- a/packages/app/main/src/commands/botCommands.spec.ts
+++ b/packages/app/main/src/commands/botCommands.spec.ts
@@ -56,7 +56,7 @@ jest.mock('../emulator', () => ({
}));
const mockCommandRegistry = new CommandRegistryImpl();
const mockBot = BotConfigWithPathImpl.fromJSON({
- 'path': 'some/path.bot',
+ 'path': path.normalize('some/path.bot'),
'name': 'AuthBot',
'description': '',
'padlock': '',
@@ -98,11 +98,11 @@ describe('The botCommands', () => {
const saveBotSpy = jest.spyOn((helpers as any).default, 'saveBot');
const mockBotInfo = {
- path: botToSave.path,
+ path: path.normalize(botToSave.path),
displayName: 'AuthBot',
secret: 'secret',
- chatsPath: 'some/dialogs',
- transcriptsPath: 'some/transcripts'
+ chatsPath: path.normalize('some/dialogs'),
+ transcriptsPath: path.normalize('some/transcripts')
};
const command = mockCommandRegistry.getCommand(Bot.Create);
const result = await command.handler(botToSave, 'secret');
@@ -234,7 +234,7 @@ describe('The botCommands', () => {
it('should patch the bots list and watch for chat and transcript changes', async () => {
const mockBotInfo = {
- path: 'this/is/my.json',
+ path: path.normalize('this/is/my.json'),
displayName: 'AuthBot',
secret: 'secret'
};
@@ -243,8 +243,8 @@ describe('The botCommands', () => {
const { handler } = mockCommandRegistry.getCommand(SharedConstants.Commands.Bot.PatchBotList);
await handler(mockBotInfo.path, mockBotInfo);
- expect(transcriptWatchSpy).toHaveBeenCalledWith('this/is/transcripts');
- expect(chatWatcherSpy).toHaveBeenCalledWith('this/is/dialogs');
+ expect(transcriptWatchSpy).toHaveBeenCalledWith(path.normalize('this/is/transcripts'));
+ expect(chatWatcherSpy).toHaveBeenCalledWith(path.normalize('this/is/dialogs'));
});
it('should remove a bot from the list', async () => {
diff --git a/packages/app/main/src/commands/clientInitCommands.ts b/packages/app/main/src/commands/clientInitCommands.ts
index 06e917803..be8b7de43 100644
--- a/packages/app/main/src/commands/clientInitCommands.ts
+++ b/packages/app/main/src/commands/clientInitCommands.ts
@@ -77,7 +77,7 @@ export function registerCommands(commandRegistry: CommandRegistryImpl) {
const settingsStore: Store = getSettingsStore();
const settingsState = settingsStore.getState();
await mainWindow.commandService.remoteCall(Commands.Settings.ReceiveGlobalSettings, {
- serverUrl: (emulator.framework.serverUrl || '').replace('[::]', '127.0.0.1'),
+ serverUrl: (emulator.framework.serverUrl || '').replace('[::]', 'localhost'),
cwd: (__dirname || '').replace(/\\/g, '/'),
users: settingsState.users,
locale: settingsState.framework.locale
diff --git a/packages/extensions/debug/client/public/qna.js b/packages/extensions/debug/client/public/qna.js
index b8d0188b8..d8ce17d06 100644
--- a/packages/extensions/debug/client/public/qna.js
+++ b/packages/extensions/debug/client/public/qna.js
@@ -3,7 +3,7 @@
object-assign
(c) Sindre Sorhus
@license MIT
-*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.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,i,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u=0&&u.splice(t,1)}function h(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=l++;n=i||(i=h(t)),r=v.bind(null,n,u,!1),o=v.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=c(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return s(n,t),function(e){for(var o=[],a=0;a=0&&u.splice(t,1)}function h(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=l++;n=i||(i=h(t)),r=v.bind(null,n,u,!1),o=v.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=c(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return s(n,t),function(e){for(var o=[],a=0;aI.length&&I.push(e)}function j(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case c:a=!0}}if(a)return n(r,e,""===t?"."+D(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;iL.length&&L.push(e)}function _(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case c:a=!0}}if(a)return n(r,e,""===t?"."+P(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;ithis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=fe,e.release=pe}i(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=l.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=l.thatReturnsTrue)},persist:function(){this.isPersistent=l.thatReturnsTrue},isPersistent:l.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=ve),xe=String.fromCharCode(32),Te={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Me=!1;function we(e,t){switch(e){case"topKeyUp":return-1!==ge.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Se=!1;var Ee={eventTypes:Te,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(ye)e:{switch(e){case"topCompositionStart":o=Te.compositionStart;break e;case"topCompositionEnd":o=Te.compositionEnd;break e;case"topCompositionUpdate":o=Te.compositionUpdate;break e}o=void 0}else Se?we(e,n)&&(o=Te.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(o=Te.compositionStart);return o?(Ce&&(Se||o!==Te.compositionStart?o===Te.compositionEnd&&Se&&(a=ie()):(ae._root=r,ae._startText=le(),Se=!0)),o=he.getPooled(o,t,n,r),a?o.data=a:null!==(a=ke(n))&&(o.data=a),ee(o),a=o):a=null,(e=be?function(e,t){switch(e){case"topCompositionEnd":return ke(t);case"topKeyPress":return 32!==t.which?null:(Me=!0,xe);case"topTextInput":return(e=t.data)===xe&&Me?null:e;default:return null}}(e,n):function(e,t){if(Se)return"topCompositionEnd"===e||!ye&&we(e,t)?(e=ie(),ae._root=null,ae._startText=null,ae._fallbackText=null,Se=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!dt.hasOwnProperty(e)||!pt.hasOwnProperty(e)&&(ft.test(e)?dt[e]=!0:(pt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}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 Ct(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=kt(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 xt(e,t){null!=(t=t.checked)&&vt(e,"checked",t,!1)}function Tt(e,t){xt(e,t);var n=kt(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?wt(e,t.type,n):t.hasOwnProperty("defaultValue")&&wt(e,t.type,kt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Mt(e,t){(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue"))&&(""===e.value&&(e.value=""+e._wrapperState.initialValue),e.defaultValue=""+e._wrapperState.initialValue),""!==(t=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function wt(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function kt(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".split(" ").forEach(function(e){var t=e.replace(gt,yt);mt[t]=new ht(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(gt,yt);mt[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(gt,yt);mt[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),mt.tabIndex=new ht("tabIndex",1,!1,"tabindex",null);var St={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}};function Et(e,t,n){return(e=se.getPooled(St.change,e,t,n)).type="change",De(n),ee(e),e}var Nt=null,It=null;function Lt(e){U(e,!1)}function _t(e){if($e(B(e)))return e}function jt(e,t){if("topChange"===e)return t}var Dt=!1;function Ot(){Nt&&(Nt.detachEvent("onpropertychange",Pt),It=Nt=null)}function Pt(e){"value"===e.propertyName&&_t(It)&&He(Lt,e=Et(It,e,Be(e)))}function At(e,t,n){"topFocus"===e?(Ot(),It=n,(Nt=t).attachEvent("onpropertychange",Pt)):"topBlur"===e&&Ot()}function Ut(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return _t(It)}function zt(e,t){if("topClick"===e)return _t(t)}function Rt(e,t){if("topInput"===e||"topChange"===e)return _t(t)}a.canUseDOM&&(Dt=We("input")&&(!document.documentMode||9gn.length&&gn.push(e)}}}var wn=Object.freeze({get _enabled(){return vn},setEnabled:bn,isEnabled:function(){return vn},trapBubbledEvent:Cn,trapCapturedEvent:xn,dispatchEvent:Mn});function kn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var Sn={animationend:kn("Animation","AnimationEnd"),animationiteration:kn("Animation","AnimationIteration"),animationstart:kn("Animation","AnimationStart"),transitionend:kn("Transition","TransitionEnd")},En={},Nn={};function In(e){if(En[e])return En[e];if(!Sn[e])return e;var t,n=Sn[e];for(t in n)if(n.hasOwnProperty(t)&&t in Nn)return En[e]=n[t];return e}a.canUseDOM&&(Nn=document.createElement("div").style,"AnimationEvent"in window||(delete Sn.animationend.animation,delete Sn.animationiteration.animation,delete Sn.animationstart.animation),"TransitionEvent"in window||delete Sn.transitionend.transition);var Ln={topAnimationEnd:In("animationend"),topAnimationIteration:In("animationiteration"),topAnimationStart:In("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:In("transitionend"),topWheel:"wheel"},_n={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},jn={},Dn=0,On="_reactListenersID"+(""+Math.random()).slice(2);function Pn(e){return Object.prototype.hasOwnProperty.call(e,On)||(e[On]=Dn++,jn[e[On]]={}),jn[e[On]]}function An(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Un(e,t){var n,r=An(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=An(r)}}function zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}var Rn=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Fn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},Hn=null,Qn=null,Vn=null,Bn=!1;function Wn(e,t){if(Bn||null==Hn||Hn!==u())return null;var n=Hn;return"selectionStart"in n&&zn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Vn&&c(Vn,n)?null:(Vn=n,(e=se.getPooled(Fn.select,Qn,e,t)).type="select",e.target=Hn,ee(e),e)}var Yn={eventTypes:Fn,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=Pn(a),o=x.onSelect;for(var i=0;it.expirationTime)&&(e.expirationTime=t.expirationTime)}new Set;var ir=void 0,lr=void 0;function ur(e){ir=lr=null;var t=e.alternate,n=e.updateQueue;null===n&&(n=e.updateQueue=or(null)),null!==t?null===(e=t.updateQueue)&&(e=t.updateQueue=or(null)):e=null,ir=n,lr=e!==n?e:null}function cr(e,t){ur(e),e=ir;var n=lr;null===n?ar(e,t):null===e.last||null===n.last?(ar(e,t),ar(n,t)):(ar(e,t),n.last=t)}function sr(e,t,n,r){return"function"==typeof(e=e.partialState)?e.call(t,n,r):e}function fr(e,t,n,r,o,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,capturedValues:n.capturedValues,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var l=!0,u=n.first,c=!1;null!==u;){var s=u.expirationTime;if(s>a){var f=n.expirationTime;(0===f||f>s)&&(n.expirationTime=s),c||(c=!0,n.baseState=e)}else c||(n.first=u.next,null===n.first&&(n.last=null)),u.isReplace?(e=sr(u,r,e,o),l=!0):(s=sr(u,r,e,o))&&(e=l?i({},e,s):i(e,s),l=!1),u.isForced&&(n.hasForceUpdate=!0),null!==u.callback&&(null===(s=n.callbackList)&&(s=n.callbackList=[]),s.push(u)),null!==u.capturedValue&&(null===(s=n.capturedValues)?n.capturedValues=[u.capturedValue]:s.push(u.capturedValue));u=u.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||null!==n.capturedValues||(t.updateQueue=null),c||(n.baseState=e),e}function pr(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;em?(g=p,p=null):g=p.sibling;var y=d(o,p,l[m],u);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(o,p),i=a(y,i,m),null===s?c=y:s.sibling=y,s=y,p=g}if(m===l.length)return n(o,p),c;if(null===p){for(;mg?(y=m,m=null):y=m.sibling;var b=d(o,m,v.value,u);if(null===b){m||(m=y);break}e&&m&&null===b.alternate&&t(o,m),i=a(b,i,g),null===s?c=b:s.sibling=b,s=b,m=y}if(v.done)return n(o,m),c;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(o,v.value,u))&&(i=a(v,i,g),null===s?c=v:s.sibling=v,s=v);return c}for(m=r(o,m);!v.done;g++,v=l.next())null!==(v=h(m,o,g,v.value,u))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),i=a(v,i,g),null===s?c=v:s.sibling=v,s=v);return e&&m.forEach(function(e){return t(o,e)}),c}return function(e,r,a,l){"object"==typeof a&&null!==a&&a.type===tt&&null===a.key&&(a=a.props.children);var u="object"==typeof a&&null!==a;if(u)switch(a.$$typeof){case Xe:e:{var c=a.key;for(u=r;null!==u;){if(u.key===c){if(10===u.tag?a.type===tt:u.type===a.type){n(e,u.sibling),(r=o(u,a.type===tt?a.props.children:a.props,l)).ref=hr(e,u,a),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===tt?((r=Gn(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=qn(a,e.mode,l)).ref=hr(e,r,a),l.return=e,e=l)}return i(e);case et:e:{for(u=a.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=o(r,a.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Zn(a,e.mode,l)).return=e,e=r}return i(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,a,l)).return=e,e=r):(n(e,r),(r=Xn(a,e.mode,l)).return=e,e=r),i(e);if(dr(a))return m(e,r,a,l);if(ut(a))return g(e,r,a,l);if(u&&mr(e,a),void 0===a)switch(e.tag){case 2:case 1:p("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var yr=gr(!0),vr=gr(!1);function br(e,t,n,r,o,a,l){function u(e,t,n){s(e,t,n,t.expirationTime)}function s(e,t,n,r){t.child=null===e?vr(t,null,n,r):yr(t,e.child,n,r)}function d(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function h(e,t,n,r,o,a){if(d(e,t),!n&&!o)return r&&N(t,!1),y(e,t);n=t.stateNode,qe.current=t;var i=o?null:n.render();return t.effectTag|=1,o&&(s(e,t,null,a),t.child=null),s(e,t,i,a),t.memoizedState=n.state,t.memoizedProps=n.props,r&&N(t,!0),t.child}function m(e){var t=e.stateNode;t.pendingContext?E(e,t.pendingContext,t.pendingContext!==t.context):t.context&&E(e,t.context,!1),x(e,t.containerInfo)}function g(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var a=0|o.stateNode;if(o.type===t&&0!=(a&n)){for(a=o;null!==a;){var i=a.alternate;if(0===a.expirationTime||a.expirationTime>r)a.expirationTime=r,null!==i&&(0===i.expirationTime||i.expirationTime>r)&&(i.expirationTime=r);else{if(null===i||!(0===i.expirationTime||i.expirationTime>r))break;i.expirationTime=r}a=a.return}a=null}else a=o.child;break;case 13:a=o.type===e.type?null:o.child;break;default:a=o.child}if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){a=o;break}a=a.return}o=a}}function y(e,t){if(null!==e&&t.child!==e.child&&p("153"),null!==t.child){var n=$n(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$n(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}var v=e.shouldSetTextContent,b=e.shouldDeprioritizeSubtree,C=t.pushHostContext,x=t.pushHostContainer,T=r.pushProvider,M=n.getMaskedContext,w=n.getUnmaskedContext,k=n.hasContextChanged,S=n.pushContextProvider,E=n.pushTopLevelContextObject,N=n.invalidateContextProvider,I=o.enterHydrationState,L=o.resetHydrationState,_=o.tryToClaimNextHydratableInstance,j=(e=function(e,t,n,r,o){function a(e,t,n,r,o,a){if(null===t||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)return!0;var i=e.stateNode;return e=e.type,"function"==typeof i.shouldComponentUpdate?i.shouldComponentUpdate(n,o,a):!(e.prototype&&e.prototype.isPureReactComponent&&c(t,n)&&c(r,o))}function l(e,t){t.updater=y,e.stateNode=t,t._reactInternalFiber=e}function u(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&&y.enqueueReplaceState(t,t.state,null)}function s(e,t,n,r){if("function"==typeof(e=e.type).getDerivedStateFromProps)return e.getDerivedStateFromProps.call(null,n,r)}var p=e.cacheContext,d=e.getMaskedContext,h=e.getUnmaskedContext,m=e.isContextConsumer,g=e.hasContextChanged,y={isMounted:qt,enqueueSetState:function(e,r,o){e=e._reactInternalFiber,o=void 0===o?null:o;var a=n(e);cr(e,{expirationTime:a,partialState:r,callback:o,isReplace:!1,isForced:!1,capturedValue:null,next:null}),t(e,a)},enqueueReplaceState:function(e,r,o){e=e._reactInternalFiber,o=void 0===o?null:o;var a=n(e);cr(e,{expirationTime:a,partialState:r,callback:o,isReplace:!0,isForced:!1,capturedValue:null,next:null}),t(e,a)},enqueueForceUpdate:function(e,r){e=e._reactInternalFiber,r=void 0===r?null:r;var o=n(e);cr(e,{expirationTime:o,partialState:null,callback:r,isReplace:!1,isForced:!0,capturedValue:null,next:null}),t(e,o)}};return{adoptClassInstance:l,callGetDerivedStateFromProps:s,constructClassInstance:function(e,t){var n=e.type,r=h(e),o=m(e),a=o?d(e,r):f,u=null!==(n=new n(t,a)).state&&void 0!==n.state?n.state:null;return l(e,n),e.memoizedState=u,null!==(t=s(e,0,t,u))&&void 0!==t&&(e.memoizedState=i({},e.memoizedState,t)),o&&p(e,r,a),n},mountClassInstance:function(e,t){var n=e.type,r=e.alternate,o=e.stateNode,a=e.pendingProps,i=h(e);o.props=a,o.state=e.memoizedState,o.refs=f,o.context=d(e,i),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(n=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),n!==o.state&&y.enqueueReplaceState(o,o.state,null),null!==(n=e.updateQueue)&&(o.state=fr(r,e,n,o,a,t))),"function"==typeof o.componentDidMount&&(e.effectTag|=4)},resumeMountClassInstance:function(e,t){var n=e.type,l=e.stateNode;l.props=e.memoizedProps,l.state=e.memoizedState;var c=e.memoizedProps,f=e.pendingProps,p=l.context,m=h(e);m=d(e,m),(n="function"==typeof n.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate)||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(c!==f||p!==m)&&u(e,l,f,m),p=e.memoizedState,t=null!==e.updateQueue?fr(null,e,e.updateQueue,l,f,t):p;var y=void 0;if(c!==f&&(y=s(e,0,f,t)),null!==y&&void 0!==y){t=null===t||void 0===t?y:i({},t,y);var v=e.updateQueue;null!==v&&(v.baseState=i({},v.baseState,y))}return c!==f||p!==t||g()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate?((c=a(e,c,f,p,t,m))?(n||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||("function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount()),"function"==typeof l.componentDidMount&&(e.effectTag|=4)):("function"==typeof l.componentDidMount&&(e.effectTag|=4),r(e,f),o(e,t)),l.props=f,l.state=t,l.context=m,c):("function"==typeof l.componentDidMount&&(e.effectTag|=4),!1)},updateClassInstance:function(e,t,n){var l=t.type,c=t.stateNode;c.props=t.memoizedProps,c.state=t.memoizedState;var f=t.memoizedProps,p=t.pendingProps,m=c.context,y=h(t);y=d(t,y),(l="function"==typeof l.getDerivedStateFromProps||"function"==typeof c.getSnapshotBeforeUpdate)||"function"!=typeof c.UNSAFE_componentWillReceiveProps&&"function"!=typeof c.componentWillReceiveProps||(f!==p||m!==y)&&u(t,c,p,y),m=t.memoizedState,n=null!==t.updateQueue?fr(e,t,t.updateQueue,c,p,n):m;var v=void 0;if(f!==p&&(v=s(t,0,p,n)),null!==v&&void 0!==v){n=null===n||void 0===n?v:i({},n,v);var b=t.updateQueue;null!==b&&(b.baseState=i({},b.baseState,v))}return f!==p||m!==n||g()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate?((v=a(t,f,p,m,n,y))?(l||"function"!=typeof c.UNSAFE_componentWillUpdate&&"function"!=typeof c.componentWillUpdate||("function"==typeof c.componentWillUpdate&&c.componentWillUpdate(p,n,y),"function"==typeof c.UNSAFE_componentWillUpdate&&c.UNSAFE_componentWillUpdate(p,n,y)),"function"==typeof c.componentDidUpdate&&(t.effectTag|=4),"function"==typeof c.getSnapshotBeforeUpdate&&(t.effectTag|=2048)):("function"!=typeof c.componentDidUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),r(t,p),o(t,n)),c.props=p,c.state=n,c.context=y,v):("function"!=typeof c.componentDidUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),!1)}}}(n,a,l,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t})).adoptClassInstance,D=e.callGetDerivedStateFromProps,O=e.constructClassInstance,P=e.mountClassInstance,A=e.resumeMountClassInstance,U=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:m(t);break;case 2:S(t);break;case 4:x(t,t.stateNode.containerInfo);break;case 13:T(t)}return null}switch(t.tag){case 0:null!==e&&p("155");var r=t.type,o=t.pendingProps,a=w(t);return r=r(o,a=M(t,a)),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof a.getDerivedStateFromProps&&(null!==(o=D(t,r,o,t.memoizedState))&&void 0!==o&&(t.memoizedState=i({},t.memoizedState,o))),o=S(t),j(t,r),P(t,n),e=h(e,t,!0,o,!1,n)):(t.tag=1,u(e,t,r),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,k()||t.memoizedProps!==n?(r=w(t),o=o(n,r=M(t,r)),t.effectTag|=1,u(e,t,o),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 2:o=S(t),null===e?null===t.stateNode?(O(t,t.pendingProps),P(t,n),r=!0):r=A(t,n):r=U(e,t,n),a=!1;var l=t.updateQueue;return null!==l&&null!==l.capturedValues&&(a=r=!0),h(e,t,r,o,a,n);case 3:e:if(m(t),r=t.updateQueue,null!==r){if(a=t.memoizedState,o=fr(e,t,r,null,null,n),t.memoizedState=o,null!==(r=t.updateQueue)&&null!==r.capturedValues)r=null;else{if(a===o){L(),e=y(e,t);break e}r=o.element}a=t.stateNode,(null===e||null===e.child)&&a.hydrate&&I(t)?(t.effectTag|=2,t.child=vr(t,null,r,n)):(L(),u(e,t,r)),t.memoizedState=o,e=t.child}else L(),e=y(e,t);return e;case 5:return C(t),null===e&&_(t),o=t.type,l=t.memoizedProps,r=t.pendingProps,a=null!==e?e.memoizedProps:null,k()||l!==r||((l=1&t.mode&&b(o,r))&&(t.expirationTime=1073741823),l&&1073741823===n)?(l=r.children,v(o,r)?l=null:a&&v(o,a)&&(t.effectTag|=16),d(e,t),1073741823!==n&&1&t.mode&&b(o,r)?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(u(e,t,l),t.memoizedProps=r,e=t.child)):e=y(e,t),e;case 6:return null===e&&_(t),t.memoizedProps=t.pendingProps,null;case 8:t.tag=7;case 7:return o=t.pendingProps,k()||t.memoizedProps!==o||(o=t.memoizedProps),r=o.children,t.stateNode=null===e?vr(t,t.stateNode,r,n):yr(t,e.stateNode,r,n),t.memoizedProps=o,t.stateNode;case 9:return null;case 4:return x(t,t.stateNode.containerInfo),o=t.pendingProps,k()||t.memoizedProps!==o?(null===e?t.child=yr(t,null,o,n):u(e,t,o),t.memoizedProps=o,e=t.child):e=y(e,t),e;case 14:return u(e,t,n=(n=t.type.render)(t.pendingProps,t.ref)),t.memoizedProps=n,t.child;case 10:return n=t.pendingProps,k()||t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 11:return n=t.pendingProps.children,k()||null!==n&&t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,a=t.memoizedProps;if(!k()&&a===o)return t.stateNode=0,T(t),y(e,t);var i=o.value;if(t.memoizedProps=o,null===a)i=1073741823;else if(a.value===o.value){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t);i=0}else{var l=a.value;if(l===i&&(0!==l||1/l==1/i)||l!=l&&i!=i){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t);i=0}else if(i="function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823,0==(i|=0)){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t)}else g(t,r,i,n)}return t.stateNode=i,T(t),u(e,t,o.children),t.child}(e,t,n);case 12:e:{r=t.type,a=t.pendingProps,l=t.memoizedProps,o=r._currentValue;var c=r._changedBits;if(k()||0!==c||l!==a){t.memoizedProps=a;var s=a.unstable_observedBits;if(void 0!==s&&null!==s||(s=1073741823),t.stateNode=s,0!=(c&s))g(t,r,c,n);else if(l===a){e=y(e,t);break e}u(e,t,n=(n=a.children)(o)),e=t.child}else e=y(e,t)}return e;default:p("156")}}}}function Cr(e,t){var n=t.source;null===t.stack&&st(n),null!==n&&ct(n),t=t.value,null!==e&&2===e.tag&&ct(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}var xr={};function Tr(e){function t(){if(null!==ee)for(var e=ee.return;null!==e;)O(e),e=e.return;te=null,ne=0,ee=null,ae=!1}function n(e){return null!==ie&&ie.has(e)}function r(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=_(t,e,ne);var o=e;if(1073741823===ne||1073741823!==o.expirationTime){e:switch(o.tag){case 3:case 2:var a=o.updateQueue;a=null===a?0:a.expirationTime;break e;default:a=0}for(var i=o.child;null!==i;)0!==i.expirationTime&&(0===a||a>i.expirationTime)&&(a=i.expirationTime),i=i.sibling;o.expirationTime=a}if(null!==t)return t;if(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),1he)&&(he=e),e}function s(e,n){e:{for(;null!==e;){if((0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>n)&&(e.alternate.expirationTime=n),null===e.return){if(3!==e.tag){n=void 0;break e}var r=e.stateNode;!J&&0!==ne&&nMe&&p("185")}e=e.return}n=void 0}return n}function d(){return G=B()-q,2+(G/10|0)}function h(e,t,n,r,o){var a=Z;Z=1;try{return e(t,n,r,o)}finally{Z=a}}function m(e){if(0!==ce){if(e>ce)return;Y(se)}var t=B()-q;ce=e,se=W(v,{timeout:10*(e-2)-t})}function g(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ue?(le=ue=e,e.nextScheduledRoot=e):(ue=ue.nextScheduledRoot=e).nextScheduledRoot=le;else{var n=e.remainingExpirationTime;(0===n||t=de)&&(!me||d()>=de);)T(pe,de,!me),y();else for(;null!==pe&&0!==de&&(0===e||e>=de);)T(pe,de,!1),y();null!==ve&&(ce=0,se=-1),0!==de&&m(de),ve=null,me=!1,x()}function x(){if(we=0,null!==Te){var e=Te;Te=null;for(var t=0;tke)&&(me=!0)}function k(e){null===pe&&p("246"),pe.remainingExpirationTime=0,ge||(ge=!0,ye=e)}var S=function(){var e=[],t=-1;return{createCursor:function(e){return{current:e}},isEmpty:function(){return-1===t},pop:function(n){0>t||(n.current=e[t],e[t]=null,t--)},push:function(n,r){e[++t]=n.current,n.current=r},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}}(),E=function(e,t){function n(e){return e===xr&&p("174"),e}var r=e.getChildHostContext,o=e.getRootHostContext;e=t.createCursor;var a=t.push,i=t.pop,l=e(xr),u=e(xr),c=e(xr);return{getHostContext:function(){return n(l.current)},getRootHostContainer:function(){return n(c.current)},popHostContainer:function(e){i(l,e),i(u,e),i(c,e)},popHostContext:function(e){u.current===e&&(i(l,e),i(u,e))},pushHostContainer:function(e,t){a(c,t,e),a(u,e,e),a(l,xr,e),t=o(t),i(l,e),a(l,t,e)},pushHostContext:function(e){var t=n(c.current),o=n(l.current);o!==(t=r(o,e.type,t))&&(a(u,e,e),a(l,t,e))}}}(e,S),N=function(e){function t(e,t,n){(e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function n(e){return 2===e.tag&&null!=e.type.childContextTypes}function r(e,t){var n=e.stateNode,r=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var o in n=n.getChildContext())o in r||p("108",ct(e)||"Unknown",o);return i({},t,n)}var o=e.createCursor,a=e.push,l=e.pop,u=o(f),c=o(!1),s=f;return{getUnmaskedContext:function(e){return n(e)?s:u.current},cacheContext:t,getMaskedContext:function(e,n){var r=e.type.contextTypes;if(!r)return f;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var a,i={};for(a in r)i[a]=n[a];return o&&t(e,n,i),i},hasContextChanged:function(){return c.current},isContextConsumer:function(e){return 2===e.tag&&null!=e.type.contextTypes},isContextProvider:n,popContextProvider:function(e){n(e)&&(l(c,e),l(u,e))},popTopLevelContextObject:function(e){l(c,e),l(u,e)},pushTopLevelContextObject:function(e,t,n){null!=u.cursor&&p("168"),a(u,t,e),a(c,n,e)},processChildContext:r,pushContextProvider:function(e){if(!n(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||f,s=u.current,a(u,t,e),a(c,c.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||p("169"),t){var o=r(e,s);n.__reactInternalMemoizedMergedChildContext=o,l(c,e),l(u,e),a(u,o,e)}else l(c,e);a(c,t,e)},findCurrentUnmaskedContext:function(e){for((2!==$t(e)||2!==e.tag)&&p("170");3!==e.tag;){if(n(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||p("171")}return e.stateNode.context}}}(S);S=function(e){var t=e.createCursor,n=e.push,r=e.pop,o=t(null),a=t(null),i=t(0);return{pushProvider:function(e){var t=e.type._context;n(i,t._changedBits,e),n(a,t._currentValue,e),n(o,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode},popProvider:function(e){var t=i.current,n=a.current;r(o,e),r(a,e),r(i,e),(e=e.type._context)._currentValue=n,e._changedBits=t}}}(S);var I=function(e){function t(e,t){var n=new Kn(5,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 n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=i(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function r(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;f=e}var o=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){p("175")},prepareToHydrateHostTextInstance:function(){p("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,i=e.canHydrateTextInstance,l=e.getNextHydratableSibling,u=e.getFirstHydratableChild,c=e.hydrateInstance,s=e.hydrateTextInstance,f=null,d=null,h=!1;return{enterHydrationState:function(e){return d=u(e.stateNode.containerInfo),f=e,h=!0},resetHydrationState:function(){d=f=null,h=!1},tryToClaimNextHydratableInstance:function(e){if(h){var r=d;if(r){if(!n(e,r)){if(!(r=l(r))||!n(e,r))return e.effectTag|=2,h=!1,void(f=e);t(f,d)}f=e,d=u(r)}else e.effectTag|=2,h=!1,f=e}},prepareToHydrateHostInstance:function(e,t,n){return t=c(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return s(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==f)return!1;if(!h)return r(e),h=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!o(n,e.memoizedProps))for(n=d;n;)t(e,n),n=l(n);return r(e),d=f?l(e.stateNode):null,!0}}}(e),L=br(e,E,N,S,I,s,c).beginWork,_=function(e,t,n,r,o){function a(e){e.effectTag|=4}var i=e.createInstance,l=e.createTextInstance,u=e.appendInitialChild,c=e.finalizeInitialChildren,s=e.prepareUpdate,f=e.persistence,d=t.getRootHostContainer,h=t.popHostContext,m=t.getHostContext,g=t.popHostContainer,y=n.popContextProvider,v=n.popTopLevelContextObject,b=r.popProvider,C=o.prepareToHydrateHostInstance,x=o.prepareToHydrateHostTextInstance,T=o.popHydrationState,M=void 0,w=void 0,k=void 0;return e.mutation?(M=function(){},w=function(e,t,n){(t.updateQueue=n)&&a(t)},k=function(e,t,n,r){n!==r&&a(t)}):p(f?"235":"236"),{completeWork:function(e,t,n){var r=t.pendingProps;switch(t.tag){case 1:return null;case 2:return y(t),e=t.stateNode,null!==(r=t.updateQueue)&&null!==r.capturedValues&&(t.effectTag&=-65,"function"==typeof e.componentDidCatch?t.effectTag|=256:r.capturedValues=null),null;case 3:return g(t),v(t),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(T(t),t.effectTag&=-3),M(t),null!==(e=t.updateQueue)&&null!==e.capturedValues&&(t.effectTag|=256),null;case 5:h(t),n=d();var o=t.type;if(null!==e&&null!=t.stateNode){var f=e.memoizedProps,S=t.stateNode,E=m();S=s(S,o,f,r,n,E),w(e,t,S,o,f,r,n,E),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!r)return null===t.stateNode&&p("166"),null;if(e=m(),T(t))C(t,n,e)&&a(t);else{f=i(o,r,n,e,t);e:for(E=t.child;null!==E;){if(5===E.tag||6===E.tag)u(f,E.stateNode);else if(4!==E.tag&&null!==E.child){E.child.return=E,E=E.child;continue}if(E===t)break;for(;null===E.sibling;){if(null===E.return||E.return===t)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}c(f,o,r,n,e)&&a(t),t.stateNode=f}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)k(e,t,e.memoizedProps,r);else{if("string"!=typeof r)return null===t.stateNode&&p("166"),null;e=d(),n=m(),T(t)?x(t)&&a(t):t.stateNode=l(r,e,n,t)}return null;case 7:(r=t.memoizedProps)||p("165"),t.tag=8,o=[];e:for((f=t.stateNode)&&(f.return=t);null!==f;){if(5===f.tag||6===f.tag||4===f.tag)p("247");else if(9===f.tag)o.push(f.pendingProps.value);else if(null!==f.child){f.child.return=f,f=f.child;continue}for(;null===f.sibling;){if(null===f.return||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}return r=(f=r.handler)(r.props,o),t.child=yr(t,null!==e?e.child:null,r,n),t.child;case 8:return t.tag=7,null;case 9:case 14:case 10:case 11:return null;case 4:return g(t),M(t),null;case 13:return b(t),null;case 12:return null;case 0:p("167");default:p("156")}}}}(e,E,N,S,I).completeWork,j=(E=function(e,t,n,r,o){var a=e.popHostContainer,i=e.popHostContext,l=t.popContextProvider,u=t.popTopLevelContextObject,c=n.popProvider;return{throwException:function(e,t,n){t.effectTag|=512,t.firstEffect=t.lastEffect=null,t={value:n,source:t,stack:st(t)};do{switch(e.tag){case 3:return ur(e),e.updateQueue.capturedValues=[t],void(e.effectTag|=1024);case 2:if(n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&!o(n)){ur(e);var r=(n=e.updateQueue).capturedValues;return null===r?n.capturedValues=[t]:r.push(t),void(e.effectTag|=1024)}}e=e.return}while(null!==e)},unwindWork:function(e){switch(e.tag){case 2:l(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return a(e),u(e),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return i(e),null;case 4:return a(e),null;case 13:return c(e),null;default:return null}},unwindInterruptedWork:function(e){switch(e.tag){case 2:l(e);break;case 3:a(e),u(e);break;case 5:i(e);break;case 4:a(e);break;case 13:c(e)}}}}(E,N,S,0,n)).throwException,D=E.unwindWork,O=E.unwindInterruptedWork,P=(E=function(e,t,n,r,o){function a(e){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){t(e,n)}else n.current=null}function i(e){switch(rr(e),e.tag){case 2:a(e);var n=e.stateNode;if("function"==typeof n.componentWillUnmount)try{n.props=e.memoizedProps,n.state=e.memoizedState,n.componentWillUnmount()}catch(n){t(e,n)}break;case 5:a(e);break;case 7:l(e.stateNode);break;case 4:f&&c(e)}}function l(e){for(var t=e;;)if(i(t),null===t.child||f&&4===t.tag){if(t===e)break;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 u(e){return 5===e.tag||3===e.tag||4===e.tag}function c(e){for(var t=e,n=!1,r=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&p("160"),n.tag){case 5:r=n.stateNode,o=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)l(t),o?T(r,t.stateNode):x(r,t.stateNode);else if(4===t.tag?r=t.stateNode.containerInfo:i(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;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var s=e.getPublicInstance,f=e.mutation;e=e.persistence,f||p(e?"235":"236");var d=f.commitMount,h=f.commitUpdate,m=f.resetTextContent,g=f.commitTextUpdate,y=f.appendChild,v=f.appendChildToContainer,b=f.insertBefore,C=f.insertInContainerBefore,x=f.removeChild,T=f.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(e,t){switch(t.tag){case 2:if(2048&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;(e=t.stateNode).props=t.memoizedProps,e.state=t.memoizedState,t=e.getSnapshotBeforeUpdate(n,r),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:break;default:p("163")}},commitResetTextContent:function(e){m(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(u(t)){var n=t;break e}t=t.return}p("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:p("161")}16&n.effectTag&&(m(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||u(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)n?r?C(t,o.stateNode,n):b(t,o.stateNode,n):r?v(t,o.stateNode):y(t,o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},commitDeletion:function(e){c(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&h(n,a,o,e,r,t)}break;case 6:null===t.stateNode&&p("162"),n=t.memoizedProps,g(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:p("163")}},commitLifeCycles:function(e,t,n){switch(n.tag){case 2:if(e=n.stateNode,4&n.effectTag)if(null===t)e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidMount();else{var r=t.memoizedProps;t=t.memoizedState,e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}null!==(n=n.updateQueue)&&pr(n,e);break;case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=s(n.child.stateNode);break;case 2:e=n.child.stateNode}pr(t,e)}break;case 5:e=n.stateNode,null===t&&4&n.effectTag&&d(e,n.type,n.memoizedProps,n);break;case 6:case 4:break;default:p("163")}},commitErrorLogging:function(e,t){switch(e.tag){case 2:var n=e.type;t=e.stateNode;var r=e.updateQueue;(null===r||null===r.capturedValues)&&p("264");var a=r.capturedValues;for(r.capturedValues=null,"function"!=typeof n.getDerivedStateFromCatch&&o(t),t.props=e.memoizedProps,t.state=e.memoizedState,n=0;n=Pr-e){if(!(-1!==Dr&&Dr<=e))return void(Or||(Or=!0,requestAnimationFrame(Fr)));zr.didTimeout=!0}else zr.didTimeout=!1;Dr=-1,e=_r,_r=null,null!==e&&e(zr)}},!1);var Fr=function(e){Or=!1;var t=e-Pr+Ur;tt&&(t=8),Ur=t=t.length||p("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Yr(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Kr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var $r={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function qr(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 Gr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?qr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Xr=void 0,Zr=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==$r.svg||"innerHTML"in e)e.innerHTML=t;else{for((Xr=Xr||document.createElement("div")).innerHTML=""+t+" ",t=Xr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jr(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 eo={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,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},to=["Webkit","ms","Moz","O"];function no(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,a=t[n];o=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||eo.hasOwnProperty(o)&&eo[o]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(eo).forEach(function(e){to.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),eo[t]=eo[e]})});var ro=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 oo(e,t,n){t&&(ro[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&p("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&p("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||p("61")),null!=t.style&&"object"!=typeof t.style&&p("62",n()))}function ao(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}}var io=l.thatReturns("");function lo(e,t){var n=Pn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=x[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function co(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function so(e,t,n,r){var o=ao(t,n);switch(t){case"iframe":case"object":Cn("topLoad","load",e);var a=n;break;case"video":case"audio":for(a in _n)_n.hasOwnProperty(a)&&Cn(a,_n[a],e);a=n;break;case"source":Cn("topError","error",e),a=n;break;case"img":case"image":case"link":Cn("topError","error",e),Cn("topLoad","load",e),a=n;break;case"form":Cn("topReset","reset",e),Cn("topSubmit","submit",e),a=n;break;case"details":Cn("topToggle","toggle",e),a=n;break;case"input":Ct(e,n),a=bt(e,n),Cn("topInvalid","invalid",e),lo(r,"onChange");break;case"option":a=Hr(e,n);break;case"select":Vr(e,n),a=i({},n,{value:void 0}),Cn("topInvalid","invalid",e),lo(r,"onChange");break;case"textarea":Wr(e,n),a=Br(e,n),Cn("topInvalid","invalid",e),lo(r,"onChange");break;default:a=n}oo(t,a,io);var u,c=a;for(u in c)if(c.hasOwnProperty(u)){var s=c[u];"style"===u?no(e,s):"dangerouslySetInnerHTML"===u?null!=(s=s?s.__html:void 0)&&Zr(e,s):"children"===u?"string"==typeof s?("textarea"!==t||""!==s)&&Jr(e,s):"number"==typeof s&&Jr(e,""+s):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(C.hasOwnProperty(u)?null!=s&&lo(r,u):null!=s&&vt(e,u,s,o))}switch(t){case"input":Ke(e),Mt(e,n);break;case"textarea":Ke(e),Kr(e);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,null!=(t=n.value)?Qr(e,!!n.multiple,t,!1):null!=n.defaultValue&&Qr(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=l)}}function fo(e,t,n,r,o){var a=null;switch(t){case"input":n=bt(e,n),r=bt(e,r),a=[];break;case"option":n=Hr(e,n),r=Hr(e,r),a=[];break;case"select":n=i({},n,{value:void 0}),r=i({},r,{value:void 0}),a=[];break;case"textarea":n=Br(e,n),r=Br(e,r),a=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=l)}oo(t,r,io),t=e=void 0;var u=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var c=n[e];for(t in c)c.hasOwnProperty(t)&&(u||(u={}),u[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(C.hasOwnProperty(e)?a||(a=[]):(a=a||[]).push(e,null));for(e in r){var s=r[e];if(c=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&s!==c&&(null!=s||null!=c))if("style"===e)if(c){for(t in c)!c.hasOwnProperty(t)||s&&s.hasOwnProperty(t)||(u||(u={}),u[t]="");for(t in s)s.hasOwnProperty(t)&&c[t]!==s[t]&&(u||(u={}),u[t]=s[t])}else u||(a||(a=[]),a.push(e,u)),u=s;else"dangerouslySetInnerHTML"===e?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(a=a||[]).push(e,""+s)):"children"===e?c===s||"string"!=typeof s&&"number"!=typeof s||(a=a||[]).push(e,""+s):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(C.hasOwnProperty(e)?(null!=s&&lo(o,e),a||c===s||(a=[])):(a=a||[]).push(e,s))}return u&&(a=a||[]).push("style",u),a}function po(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&xt(e,o),ao(n,r),r=ao(n,o);for(var a=0;ar&&(o=r,r=e,e=o),o=Un(n,e);var a=Un(n,r);if(o&&a&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)){var i=document.createRange();i.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(i),t.extend(a.node,a.offset)):(i.setEnd(a.node,a.offset),t.addRange(i))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(n.focus(),n=0;nthis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=fe,e.release=pe}i(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=l.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=l.thatReturnsTrue)},persist:function(){this.isPersistent=l.thatReturnsTrue},isPersistent:l.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=ve),xe=String.fromCharCode(32),Te={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},ke=!1;function we(e,t){switch(e){case"topKeyUp":return-1!==ge.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function Me(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ee=!1;var Se={eventTypes:Te,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(ye)e:{switch(e){case"topCompositionStart":o=Te.compositionStart;break e;case"topCompositionEnd":o=Te.compositionEnd;break e;case"topCompositionUpdate":o=Te.compositionUpdate;break e}o=void 0}else Ee?we(e,n)&&(o=Te.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(o=Te.compositionStart);return o?(Ce&&(Ee||o!==Te.compositionStart?o===Te.compositionEnd&&Ee&&(a=ie()):(ae._root=r,ae._startText=le(),Ee=!0)),o=he.getPooled(o,t,n,r),a?o.data=a:null!==(a=Me(n))&&(o.data=a),ee(o),a=o):a=null,(e=be?function(e,t){switch(e){case"topCompositionEnd":return Me(t);case"topKeyPress":return 32!==t.which?null:(ke=!0,xe);case"topTextInput":return(e=t.data)===xe&&ke?null:e;default:return null}}(e,n):function(e,t){if(Ee)return"topCompositionEnd"===e||!ye&&we(e,t)?(e=ie(),ae._root=null,ae._startText=null,ae._fallbackText=null,Ee=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!dt.hasOwnProperty(e)||!pt.hasOwnProperty(e)&&(ft.test(e)?dt[e]=!0:(pt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}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 Ct(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Mt(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 xt(e,t){null!=(t=t.checked)&&vt(e,"checked",t,!1)}function Tt(e,t){xt(e,t);var n=Mt(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?wt(e,t.type,n):t.hasOwnProperty("defaultValue")&&wt(e,t.type,Mt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function kt(e,t){(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue"))&&(""===e.value&&(e.value=""+e._wrapperState.initialValue),e.defaultValue=""+e._wrapperState.initialValue),""!==(t=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function wt(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Mt(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".split(" ").forEach(function(e){var t=e.replace(gt,yt);mt[t]=new ht(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(gt,yt);mt[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(gt,yt);mt[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),mt.tabIndex=new ht("tabIndex",1,!1,"tabindex",null);var Et={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}};function St(e,t,n){return(e=se.getPooled(Et.change,e,t,n)).type="change",Pe(n),ee(e),e}var Nt=null,Lt=null;function It(e){U(e,!1)}function jt(e){if($e(Q(e)))return e}function _t(e,t){if("topChange"===e)return t}var Pt=!1;function Ot(){Nt&&(Nt.detachEvent("onpropertychange",Dt),Lt=Nt=null)}function Dt(e){"value"===e.propertyName&&jt(Lt)&&He(It,e=St(Lt,e,Qe(e)))}function At(e,t,n){"topFocus"===e?(Ot(),Lt=n,(Nt=t).attachEvent("onpropertychange",Dt)):"topBlur"===e&&Ot()}function Ut(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return jt(Lt)}function zt(e,t){if("topClick"===e)return jt(t)}function Rt(e,t){if("topInput"===e||"topChange"===e)return jt(t)}a.canUseDOM&&(Pt=We("input")&&(!document.documentMode||9gn.length&&gn.push(e)}}}var wn=Object.freeze({get _enabled(){return vn},setEnabled:bn,isEnabled:function(){return vn},trapBubbledEvent:Cn,trapCapturedEvent:xn,dispatchEvent:kn});function Mn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var En={animationend:Mn("Animation","AnimationEnd"),animationiteration:Mn("Animation","AnimationIteration"),animationstart:Mn("Animation","AnimationStart"),transitionend:Mn("Transition","TransitionEnd")},Sn={},Nn={};function Ln(e){if(Sn[e])return Sn[e];if(!En[e])return e;var t,n=En[e];for(t in n)if(n.hasOwnProperty(t)&&t in Nn)return Sn[e]=n[t];return e}a.canUseDOM&&(Nn=document.createElement("div").style,"AnimationEvent"in window||(delete En.animationend.animation,delete En.animationiteration.animation,delete En.animationstart.animation),"TransitionEvent"in window||delete En.transitionend.transition);var In={topAnimationEnd:Ln("animationend"),topAnimationIteration:Ln("animationiteration"),topAnimationStart:Ln("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:Ln("transitionend"),topWheel:"wheel"},jn={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},_n={},Pn=0,On="_reactListenersID"+(""+Math.random()).slice(2);function Dn(e){return Object.prototype.hasOwnProperty.call(e,On)||(e[On]=Pn++,_n[e[On]]={}),_n[e[On]]}function An(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Un(e,t){var n,r=An(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=An(r)}}function zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}var Rn=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Fn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},Hn=null,Bn=null,Vn=null,Qn=!1;function Wn(e,t){if(Qn||null==Hn||Hn!==u())return null;var n=Hn;return"selectionStart"in n&&zn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Vn&&c(Vn,n)?null:(Vn=n,(e=se.getPooled(Fn.select,Bn,e,t)).type="select",e.target=Hn,ee(e),e)}var Yn={eventTypes:Fn,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=Dn(a),o=x.onSelect;for(var i=0;it.expirationTime)&&(e.expirationTime=t.expirationTime)}new Set;var ir=void 0,lr=void 0;function ur(e){ir=lr=null;var t=e.alternate,n=e.updateQueue;null===n&&(n=e.updateQueue=or(null)),null!==t?null===(e=t.updateQueue)&&(e=t.updateQueue=or(null)):e=null,ir=n,lr=e!==n?e:null}function cr(e,t){ur(e),e=ir;var n=lr;null===n?ar(e,t):null===e.last||null===n.last?(ar(e,t),ar(n,t)):(ar(e,t),n.last=t)}function sr(e,t,n,r){return"function"==typeof(e=e.partialState)?e.call(t,n,r):e}function fr(e,t,n,r,o,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,capturedValues:n.capturedValues,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var l=!0,u=n.first,c=!1;null!==u;){var s=u.expirationTime;if(s>a){var f=n.expirationTime;(0===f||f>s)&&(n.expirationTime=s),c||(c=!0,n.baseState=e)}else c||(n.first=u.next,null===n.first&&(n.last=null)),u.isReplace?(e=sr(u,r,e,o),l=!0):(s=sr(u,r,e,o))&&(e=l?i({},e,s):i(e,s),l=!1),u.isForced&&(n.hasForceUpdate=!0),null!==u.callback&&(null===(s=n.callbackList)&&(s=n.callbackList=[]),s.push(u)),null!==u.capturedValue&&(null===(s=n.capturedValues)?n.capturedValues=[u.capturedValue]:s.push(u.capturedValue));u=u.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||null!==n.capturedValues||(t.updateQueue=null),c||(n.baseState=e),e}function pr(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;em?(g=p,p=null):g=p.sibling;var y=d(o,p,l[m],u);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(o,p),i=a(y,i,m),null===s?c=y:s.sibling=y,s=y,p=g}if(m===l.length)return n(o,p),c;if(null===p){for(;mg?(y=m,m=null):y=m.sibling;var b=d(o,m,v.value,u);if(null===b){m||(m=y);break}e&&m&&null===b.alternate&&t(o,m),i=a(b,i,g),null===s?c=b:s.sibling=b,s=b,m=y}if(v.done)return n(o,m),c;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(o,v.value,u))&&(i=a(v,i,g),null===s?c=v:s.sibling=v,s=v);return c}for(m=r(o,m);!v.done;g++,v=l.next())null!==(v=h(m,o,g,v.value,u))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),i=a(v,i,g),null===s?c=v:s.sibling=v,s=v);return e&&m.forEach(function(e){return t(o,e)}),c}return function(e,r,a,l){"object"==typeof a&&null!==a&&a.type===tt&&null===a.key&&(a=a.props.children);var u="object"==typeof a&&null!==a;if(u)switch(a.$$typeof){case Xe:e:{var c=a.key;for(u=r;null!==u;){if(u.key===c){if(10===u.tag?a.type===tt:u.type===a.type){n(e,u.sibling),(r=o(u,a.type===tt?a.props.children:a.props,l)).ref=hr(e,u,a),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===tt?((r=Gn(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=qn(a,e.mode,l)).ref=hr(e,r,a),l.return=e,e=l)}return i(e);case et:e:{for(u=a.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=o(r,a.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Jn(a,e.mode,l)).return=e,e=r}return i(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,a,l)).return=e,e=r):(n(e,r),(r=Xn(a,e.mode,l)).return=e,e=r),i(e);if(dr(a))return m(e,r,a,l);if(ut(a))return g(e,r,a,l);if(u&&mr(e,a),void 0===a)switch(e.tag){case 2:case 1:p("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var yr=gr(!0),vr=gr(!1);function br(e,t,n,r,o,a,l){function u(e,t,n){s(e,t,n,t.expirationTime)}function s(e,t,n,r){t.child=null===e?vr(t,null,n,r):yr(t,e.child,n,r)}function d(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function h(e,t,n,r,o,a){if(d(e,t),!n&&!o)return r&&N(t,!1),y(e,t);n=t.stateNode,qe.current=t;var i=o?null:n.render();return t.effectTag|=1,o&&(s(e,t,null,a),t.child=null),s(e,t,i,a),t.memoizedState=n.state,t.memoizedProps=n.props,r&&N(t,!0),t.child}function m(e){var t=e.stateNode;t.pendingContext?S(e,t.pendingContext,t.pendingContext!==t.context):t.context&&S(e,t.context,!1),x(e,t.containerInfo)}function g(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var a=0|o.stateNode;if(o.type===t&&0!=(a&n)){for(a=o;null!==a;){var i=a.alternate;if(0===a.expirationTime||a.expirationTime>r)a.expirationTime=r,null!==i&&(0===i.expirationTime||i.expirationTime>r)&&(i.expirationTime=r);else{if(null===i||!(0===i.expirationTime||i.expirationTime>r))break;i.expirationTime=r}a=a.return}a=null}else a=o.child;break;case 13:a=o.type===e.type?null:o.child;break;default:a=o.child}if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){a=o;break}a=a.return}o=a}}function y(e,t){if(null!==e&&t.child!==e.child&&p("153"),null!==t.child){var n=$n(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$n(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}var v=e.shouldSetTextContent,b=e.shouldDeprioritizeSubtree,C=t.pushHostContext,x=t.pushHostContainer,T=r.pushProvider,k=n.getMaskedContext,w=n.getUnmaskedContext,M=n.hasContextChanged,E=n.pushContextProvider,S=n.pushTopLevelContextObject,N=n.invalidateContextProvider,L=o.enterHydrationState,I=o.resetHydrationState,j=o.tryToClaimNextHydratableInstance,_=(e=function(e,t,n,r,o){function a(e,t,n,r,o,a){if(null===t||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)return!0;var i=e.stateNode;return e=e.type,"function"==typeof i.shouldComponentUpdate?i.shouldComponentUpdate(n,o,a):!(e.prototype&&e.prototype.isPureReactComponent&&c(t,n)&&c(r,o))}function l(e,t){t.updater=y,e.stateNode=t,t._reactInternalFiber=e}function u(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&&y.enqueueReplaceState(t,t.state,null)}function s(e,t,n,r){if("function"==typeof(e=e.type).getDerivedStateFromProps)return e.getDerivedStateFromProps.call(null,n,r)}var p=e.cacheContext,d=e.getMaskedContext,h=e.getUnmaskedContext,m=e.isContextConsumer,g=e.hasContextChanged,y={isMounted:qt,enqueueSetState:function(e,r,o){e=e._reactInternalFiber,o=void 0===o?null:o;var a=n(e);cr(e,{expirationTime:a,partialState:r,callback:o,isReplace:!1,isForced:!1,capturedValue:null,next:null}),t(e,a)},enqueueReplaceState:function(e,r,o){e=e._reactInternalFiber,o=void 0===o?null:o;var a=n(e);cr(e,{expirationTime:a,partialState:r,callback:o,isReplace:!0,isForced:!1,capturedValue:null,next:null}),t(e,a)},enqueueForceUpdate:function(e,r){e=e._reactInternalFiber,r=void 0===r?null:r;var o=n(e);cr(e,{expirationTime:o,partialState:null,callback:r,isReplace:!1,isForced:!0,capturedValue:null,next:null}),t(e,o)}};return{adoptClassInstance:l,callGetDerivedStateFromProps:s,constructClassInstance:function(e,t){var n=e.type,r=h(e),o=m(e),a=o?d(e,r):f,u=null!==(n=new n(t,a)).state&&void 0!==n.state?n.state:null;return l(e,n),e.memoizedState=u,null!==(t=s(e,0,t,u))&&void 0!==t&&(e.memoizedState=i({},e.memoizedState,t)),o&&p(e,r,a),n},mountClassInstance:function(e,t){var n=e.type,r=e.alternate,o=e.stateNode,a=e.pendingProps,i=h(e);o.props=a,o.state=e.memoizedState,o.refs=f,o.context=d(e,i),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(n=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),n!==o.state&&y.enqueueReplaceState(o,o.state,null),null!==(n=e.updateQueue)&&(o.state=fr(r,e,n,o,a,t))),"function"==typeof o.componentDidMount&&(e.effectTag|=4)},resumeMountClassInstance:function(e,t){var n=e.type,l=e.stateNode;l.props=e.memoizedProps,l.state=e.memoizedState;var c=e.memoizedProps,f=e.pendingProps,p=l.context,m=h(e);m=d(e,m),(n="function"==typeof n.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate)||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(c!==f||p!==m)&&u(e,l,f,m),p=e.memoizedState,t=null!==e.updateQueue?fr(null,e,e.updateQueue,l,f,t):p;var y=void 0;if(c!==f&&(y=s(e,0,f,t)),null!==y&&void 0!==y){t=null===t||void 0===t?y:i({},t,y);var v=e.updateQueue;null!==v&&(v.baseState=i({},v.baseState,y))}return c!==f||p!==t||g()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate?((c=a(e,c,f,p,t,m))?(n||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||("function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount()),"function"==typeof l.componentDidMount&&(e.effectTag|=4)):("function"==typeof l.componentDidMount&&(e.effectTag|=4),r(e,f),o(e,t)),l.props=f,l.state=t,l.context=m,c):("function"==typeof l.componentDidMount&&(e.effectTag|=4),!1)},updateClassInstance:function(e,t,n){var l=t.type,c=t.stateNode;c.props=t.memoizedProps,c.state=t.memoizedState;var f=t.memoizedProps,p=t.pendingProps,m=c.context,y=h(t);y=d(t,y),(l="function"==typeof l.getDerivedStateFromProps||"function"==typeof c.getSnapshotBeforeUpdate)||"function"!=typeof c.UNSAFE_componentWillReceiveProps&&"function"!=typeof c.componentWillReceiveProps||(f!==p||m!==y)&&u(t,c,p,y),m=t.memoizedState,n=null!==t.updateQueue?fr(e,t,t.updateQueue,c,p,n):m;var v=void 0;if(f!==p&&(v=s(t,0,p,n)),null!==v&&void 0!==v){n=null===n||void 0===n?v:i({},n,v);var b=t.updateQueue;null!==b&&(b.baseState=i({},b.baseState,v))}return f!==p||m!==n||g()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate?((v=a(t,f,p,m,n,y))?(l||"function"!=typeof c.UNSAFE_componentWillUpdate&&"function"!=typeof c.componentWillUpdate||("function"==typeof c.componentWillUpdate&&c.componentWillUpdate(p,n,y),"function"==typeof c.UNSAFE_componentWillUpdate&&c.UNSAFE_componentWillUpdate(p,n,y)),"function"==typeof c.componentDidUpdate&&(t.effectTag|=4),"function"==typeof c.getSnapshotBeforeUpdate&&(t.effectTag|=2048)):("function"!=typeof c.componentDidUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),r(t,p),o(t,n)),c.props=p,c.state=n,c.context=y,v):("function"!=typeof c.componentDidUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),!1)}}}(n,a,l,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t})).adoptClassInstance,P=e.callGetDerivedStateFromProps,O=e.constructClassInstance,D=e.mountClassInstance,A=e.resumeMountClassInstance,U=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:m(t);break;case 2:E(t);break;case 4:x(t,t.stateNode.containerInfo);break;case 13:T(t)}return null}switch(t.tag){case 0:null!==e&&p("155");var r=t.type,o=t.pendingProps,a=w(t);return r=r(o,a=k(t,a)),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof a.getDerivedStateFromProps&&(null!==(o=P(t,r,o,t.memoizedState))&&void 0!==o&&(t.memoizedState=i({},t.memoizedState,o))),o=E(t),_(t,r),D(t,n),e=h(e,t,!0,o,!1,n)):(t.tag=1,u(e,t,r),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,M()||t.memoizedProps!==n?(r=w(t),o=o(n,r=k(t,r)),t.effectTag|=1,u(e,t,o),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 2:o=E(t),null===e?null===t.stateNode?(O(t,t.pendingProps),D(t,n),r=!0):r=A(t,n):r=U(e,t,n),a=!1;var l=t.updateQueue;return null!==l&&null!==l.capturedValues&&(a=r=!0),h(e,t,r,o,a,n);case 3:e:if(m(t),r=t.updateQueue,null!==r){if(a=t.memoizedState,o=fr(e,t,r,null,null,n),t.memoizedState=o,null!==(r=t.updateQueue)&&null!==r.capturedValues)r=null;else{if(a===o){I(),e=y(e,t);break e}r=o.element}a=t.stateNode,(null===e||null===e.child)&&a.hydrate&&L(t)?(t.effectTag|=2,t.child=vr(t,null,r,n)):(I(),u(e,t,r)),t.memoizedState=o,e=t.child}else I(),e=y(e,t);return e;case 5:return C(t),null===e&&j(t),o=t.type,l=t.memoizedProps,r=t.pendingProps,a=null!==e?e.memoizedProps:null,M()||l!==r||((l=1&t.mode&&b(o,r))&&(t.expirationTime=1073741823),l&&1073741823===n)?(l=r.children,v(o,r)?l=null:a&&v(o,a)&&(t.effectTag|=16),d(e,t),1073741823!==n&&1&t.mode&&b(o,r)?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(u(e,t,l),t.memoizedProps=r,e=t.child)):e=y(e,t),e;case 6:return null===e&&j(t),t.memoizedProps=t.pendingProps,null;case 8:t.tag=7;case 7:return o=t.pendingProps,M()||t.memoizedProps!==o||(o=t.memoizedProps),r=o.children,t.stateNode=null===e?vr(t,t.stateNode,r,n):yr(t,e.stateNode,r,n),t.memoizedProps=o,t.stateNode;case 9:return null;case 4:return x(t,t.stateNode.containerInfo),o=t.pendingProps,M()||t.memoizedProps!==o?(null===e?t.child=yr(t,null,o,n):u(e,t,o),t.memoizedProps=o,e=t.child):e=y(e,t),e;case 14:return u(e,t,n=(n=t.type.render)(t.pendingProps,t.ref)),t.memoizedProps=n,t.child;case 10:return n=t.pendingProps,M()||t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 11:return n=t.pendingProps.children,M()||null!==n&&t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,a=t.memoizedProps;if(!M()&&a===o)return t.stateNode=0,T(t),y(e,t);var i=o.value;if(t.memoizedProps=o,null===a)i=1073741823;else if(a.value===o.value){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t);i=0}else{var l=a.value;if(l===i&&(0!==l||1/l==1/i)||l!=l&&i!=i){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t);i=0}else if(i="function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823,0==(i|=0)){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t)}else g(t,r,i,n)}return t.stateNode=i,T(t),u(e,t,o.children),t.child}(e,t,n);case 12:e:{r=t.type,a=t.pendingProps,l=t.memoizedProps,o=r._currentValue;var c=r._changedBits;if(M()||0!==c||l!==a){t.memoizedProps=a;var s=a.unstable_observedBits;if(void 0!==s&&null!==s||(s=1073741823),t.stateNode=s,0!=(c&s))g(t,r,c,n);else if(l===a){e=y(e,t);break e}u(e,t,n=(n=a.children)(o)),e=t.child}else e=y(e,t)}return e;default:p("156")}}}}function Cr(e,t){var n=t.source;null===t.stack&&st(n),null!==n&&ct(n),t=t.value,null!==e&&2===e.tag&&ct(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}var xr={};function Tr(e){function t(){if(null!==ee)for(var e=ee.return;null!==e;)O(e),e=e.return;te=null,ne=0,ee=null,ae=!1}function n(e){return null!==ie&&ie.has(e)}function r(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=j(t,e,ne);var o=e;if(1073741823===ne||1073741823!==o.expirationTime){e:switch(o.tag){case 3:case 2:var a=o.updateQueue;a=null===a?0:a.expirationTime;break e;default:a=0}for(var i=o.child;null!==i;)0!==i.expirationTime&&(0===a||a>i.expirationTime)&&(a=i.expirationTime),i=i.sibling;o.expirationTime=a}if(null!==t)return t;if(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),1he)&&(he=e),e}function s(e,n){e:{for(;null!==e;){if((0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>n)&&(e.alternate.expirationTime=n),null===e.return){if(3!==e.tag){n=void 0;break e}var r=e.stateNode;!Z&&0!==ne&&nke&&p("185")}e=e.return}n=void 0}return n}function d(){return G=Q()-q,2+(G/10|0)}function h(e,t,n,r,o){var a=J;J=1;try{return e(t,n,r,o)}finally{J=a}}function m(e){if(0!==ce){if(e>ce)return;Y(se)}var t=Q()-q;ce=e,se=W(v,{timeout:10*(e-2)-t})}function g(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ue?(le=ue=e,e.nextScheduledRoot=e):(ue=ue.nextScheduledRoot=e).nextScheduledRoot=le;else{var n=e.remainingExpirationTime;(0===n||t=de)&&(!me||d()>=de);)T(pe,de,!me),y();else for(;null!==pe&&0!==de&&(0===e||e>=de);)T(pe,de,!1),y();null!==ve&&(ce=0,se=-1),0!==de&&m(de),ve=null,me=!1,x()}function x(){if(we=0,null!==Te){var e=Te;Te=null;for(var t=0;tMe)&&(me=!0)}function M(e){null===pe&&p("246"),pe.remainingExpirationTime=0,ge||(ge=!0,ye=e)}var E=function(){var e=[],t=-1;return{createCursor:function(e){return{current:e}},isEmpty:function(){return-1===t},pop:function(n){0>t||(n.current=e[t],e[t]=null,t--)},push:function(n,r){e[++t]=n.current,n.current=r},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}}(),S=function(e,t){function n(e){return e===xr&&p("174"),e}var r=e.getChildHostContext,o=e.getRootHostContext;e=t.createCursor;var a=t.push,i=t.pop,l=e(xr),u=e(xr),c=e(xr);return{getHostContext:function(){return n(l.current)},getRootHostContainer:function(){return n(c.current)},popHostContainer:function(e){i(l,e),i(u,e),i(c,e)},popHostContext:function(e){u.current===e&&(i(l,e),i(u,e))},pushHostContainer:function(e,t){a(c,t,e),a(u,e,e),a(l,xr,e),t=o(t),i(l,e),a(l,t,e)},pushHostContext:function(e){var t=n(c.current),o=n(l.current);o!==(t=r(o,e.type,t))&&(a(u,e,e),a(l,t,e))}}}(e,E),N=function(e){function t(e,t,n){(e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function n(e){return 2===e.tag&&null!=e.type.childContextTypes}function r(e,t){var n=e.stateNode,r=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var o in n=n.getChildContext())o in r||p("108",ct(e)||"Unknown",o);return i({},t,n)}var o=e.createCursor,a=e.push,l=e.pop,u=o(f),c=o(!1),s=f;return{getUnmaskedContext:function(e){return n(e)?s:u.current},cacheContext:t,getMaskedContext:function(e,n){var r=e.type.contextTypes;if(!r)return f;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var a,i={};for(a in r)i[a]=n[a];return o&&t(e,n,i),i},hasContextChanged:function(){return c.current},isContextConsumer:function(e){return 2===e.tag&&null!=e.type.contextTypes},isContextProvider:n,popContextProvider:function(e){n(e)&&(l(c,e),l(u,e))},popTopLevelContextObject:function(e){l(c,e),l(u,e)},pushTopLevelContextObject:function(e,t,n){null!=u.cursor&&p("168"),a(u,t,e),a(c,n,e)},processChildContext:r,pushContextProvider:function(e){if(!n(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||f,s=u.current,a(u,t,e),a(c,c.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||p("169"),t){var o=r(e,s);n.__reactInternalMemoizedMergedChildContext=o,l(c,e),l(u,e),a(u,o,e)}else l(c,e);a(c,t,e)},findCurrentUnmaskedContext:function(e){for((2!==$t(e)||2!==e.tag)&&p("170");3!==e.tag;){if(n(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||p("171")}return e.stateNode.context}}}(E);E=function(e){var t=e.createCursor,n=e.push,r=e.pop,o=t(null),a=t(null),i=t(0);return{pushProvider:function(e){var t=e.type._context;n(i,t._changedBits,e),n(a,t._currentValue,e),n(o,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode},popProvider:function(e){var t=i.current,n=a.current;r(o,e),r(a,e),r(i,e),(e=e.type._context)._currentValue=n,e._changedBits=t}}}(E);var L=function(e){function t(e,t){var n=new Kn(5,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 n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=i(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function r(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;f=e}var o=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){p("175")},prepareToHydrateHostTextInstance:function(){p("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,i=e.canHydrateTextInstance,l=e.getNextHydratableSibling,u=e.getFirstHydratableChild,c=e.hydrateInstance,s=e.hydrateTextInstance,f=null,d=null,h=!1;return{enterHydrationState:function(e){return d=u(e.stateNode.containerInfo),f=e,h=!0},resetHydrationState:function(){d=f=null,h=!1},tryToClaimNextHydratableInstance:function(e){if(h){var r=d;if(r){if(!n(e,r)){if(!(r=l(r))||!n(e,r))return e.effectTag|=2,h=!1,void(f=e);t(f,d)}f=e,d=u(r)}else e.effectTag|=2,h=!1,f=e}},prepareToHydrateHostInstance:function(e,t,n){return t=c(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return s(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==f)return!1;if(!h)return r(e),h=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!o(n,e.memoizedProps))for(n=d;n;)t(e,n),n=l(n);return r(e),d=f?l(e.stateNode):null,!0}}}(e),I=br(e,S,N,E,L,s,c).beginWork,j=function(e,t,n,r,o){function a(e){e.effectTag|=4}var i=e.createInstance,l=e.createTextInstance,u=e.appendInitialChild,c=e.finalizeInitialChildren,s=e.prepareUpdate,f=e.persistence,d=t.getRootHostContainer,h=t.popHostContext,m=t.getHostContext,g=t.popHostContainer,y=n.popContextProvider,v=n.popTopLevelContextObject,b=r.popProvider,C=o.prepareToHydrateHostInstance,x=o.prepareToHydrateHostTextInstance,T=o.popHydrationState,k=void 0,w=void 0,M=void 0;return e.mutation?(k=function(){},w=function(e,t,n){(t.updateQueue=n)&&a(t)},M=function(e,t,n,r){n!==r&&a(t)}):p(f?"235":"236"),{completeWork:function(e,t,n){var r=t.pendingProps;switch(t.tag){case 1:return null;case 2:return y(t),e=t.stateNode,null!==(r=t.updateQueue)&&null!==r.capturedValues&&(t.effectTag&=-65,"function"==typeof e.componentDidCatch?t.effectTag|=256:r.capturedValues=null),null;case 3:return g(t),v(t),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(T(t),t.effectTag&=-3),k(t),null!==(e=t.updateQueue)&&null!==e.capturedValues&&(t.effectTag|=256),null;case 5:h(t),n=d();var o=t.type;if(null!==e&&null!=t.stateNode){var f=e.memoizedProps,E=t.stateNode,S=m();E=s(E,o,f,r,n,S),w(e,t,E,o,f,r,n,S),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!r)return null===t.stateNode&&p("166"),null;if(e=m(),T(t))C(t,n,e)&&a(t);else{f=i(o,r,n,e,t);e:for(S=t.child;null!==S;){if(5===S.tag||6===S.tag)u(f,S.stateNode);else if(4!==S.tag&&null!==S.child){S.child.return=S,S=S.child;continue}if(S===t)break;for(;null===S.sibling;){if(null===S.return||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}c(f,o,r,n,e)&&a(t),t.stateNode=f}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)M(e,t,e.memoizedProps,r);else{if("string"!=typeof r)return null===t.stateNode&&p("166"),null;e=d(),n=m(),T(t)?x(t)&&a(t):t.stateNode=l(r,e,n,t)}return null;case 7:(r=t.memoizedProps)||p("165"),t.tag=8,o=[];e:for((f=t.stateNode)&&(f.return=t);null!==f;){if(5===f.tag||6===f.tag||4===f.tag)p("247");else if(9===f.tag)o.push(f.pendingProps.value);else if(null!==f.child){f.child.return=f,f=f.child;continue}for(;null===f.sibling;){if(null===f.return||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}return r=(f=r.handler)(r.props,o),t.child=yr(t,null!==e?e.child:null,r,n),t.child;case 8:return t.tag=7,null;case 9:case 14:case 10:case 11:return null;case 4:return g(t),k(t),null;case 13:return b(t),null;case 12:return null;case 0:p("167");default:p("156")}}}}(e,S,N,E,L).completeWork,_=(S=function(e,t,n,r,o){var a=e.popHostContainer,i=e.popHostContext,l=t.popContextProvider,u=t.popTopLevelContextObject,c=n.popProvider;return{throwException:function(e,t,n){t.effectTag|=512,t.firstEffect=t.lastEffect=null,t={value:n,source:t,stack:st(t)};do{switch(e.tag){case 3:return ur(e),e.updateQueue.capturedValues=[t],void(e.effectTag|=1024);case 2:if(n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&!o(n)){ur(e);var r=(n=e.updateQueue).capturedValues;return null===r?n.capturedValues=[t]:r.push(t),void(e.effectTag|=1024)}}e=e.return}while(null!==e)},unwindWork:function(e){switch(e.tag){case 2:l(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return a(e),u(e),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return i(e),null;case 4:return a(e),null;case 13:return c(e),null;default:return null}},unwindInterruptedWork:function(e){switch(e.tag){case 2:l(e);break;case 3:a(e),u(e);break;case 5:i(e);break;case 4:a(e);break;case 13:c(e)}}}}(S,N,E,0,n)).throwException,P=S.unwindWork,O=S.unwindInterruptedWork,D=(S=function(e,t,n,r,o){function a(e){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){t(e,n)}else n.current=null}function i(e){switch(rr(e),e.tag){case 2:a(e);var n=e.stateNode;if("function"==typeof n.componentWillUnmount)try{n.props=e.memoizedProps,n.state=e.memoizedState,n.componentWillUnmount()}catch(n){t(e,n)}break;case 5:a(e);break;case 7:l(e.stateNode);break;case 4:f&&c(e)}}function l(e){for(var t=e;;)if(i(t),null===t.child||f&&4===t.tag){if(t===e)break;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 u(e){return 5===e.tag||3===e.tag||4===e.tag}function c(e){for(var t=e,n=!1,r=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&p("160"),n.tag){case 5:r=n.stateNode,o=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)l(t),o?T(r,t.stateNode):x(r,t.stateNode);else if(4===t.tag?r=t.stateNode.containerInfo:i(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;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var s=e.getPublicInstance,f=e.mutation;e=e.persistence,f||p(e?"235":"236");var d=f.commitMount,h=f.commitUpdate,m=f.resetTextContent,g=f.commitTextUpdate,y=f.appendChild,v=f.appendChildToContainer,b=f.insertBefore,C=f.insertInContainerBefore,x=f.removeChild,T=f.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(e,t){switch(t.tag){case 2:if(2048&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;(e=t.stateNode).props=t.memoizedProps,e.state=t.memoizedState,t=e.getSnapshotBeforeUpdate(n,r),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:break;default:p("163")}},commitResetTextContent:function(e){m(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(u(t)){var n=t;break e}t=t.return}p("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:p("161")}16&n.effectTag&&(m(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||u(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)n?r?C(t,o.stateNode,n):b(t,o.stateNode,n):r?v(t,o.stateNode):y(t,o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},commitDeletion:function(e){c(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&h(n,a,o,e,r,t)}break;case 6:null===t.stateNode&&p("162"),n=t.memoizedProps,g(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:p("163")}},commitLifeCycles:function(e,t,n){switch(n.tag){case 2:if(e=n.stateNode,4&n.effectTag)if(null===t)e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidMount();else{var r=t.memoizedProps;t=t.memoizedState,e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}null!==(n=n.updateQueue)&&pr(n,e);break;case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=s(n.child.stateNode);break;case 2:e=n.child.stateNode}pr(t,e)}break;case 5:e=n.stateNode,null===t&&4&n.effectTag&&d(e,n.type,n.memoizedProps,n);break;case 6:case 4:break;default:p("163")}},commitErrorLogging:function(e,t){switch(e.tag){case 2:var n=e.type;t=e.stateNode;var r=e.updateQueue;(null===r||null===r.capturedValues)&&p("264");var a=r.capturedValues;for(r.capturedValues=null,"function"!=typeof n.getDerivedStateFromCatch&&o(t),t.props=e.memoizedProps,t.state=e.memoizedState,n=0;n=Dr-e){if(!(-1!==Pr&&Pr<=e))return void(Or||(Or=!0,requestAnimationFrame(Fr)));zr.didTimeout=!0}else zr.didTimeout=!1;Pr=-1,e=jr,jr=null,null!==e&&e(zr)}},!1);var Fr=function(e){Or=!1;var t=e-Dr+Ur;tt&&(t=8),Ur=t=t.length||p("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Yr(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Kr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var $r={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function qr(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 Gr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?qr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Xr=void 0,Jr=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==$r.svg||"innerHTML"in e)e.innerHTML=t;else{for((Xr=Xr||document.createElement("div")).innerHTML=""+t+" ",t=Xr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zr(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 eo={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,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},to=["Webkit","ms","Moz","O"];function no(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,a=t[n];o=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||eo.hasOwnProperty(o)&&eo[o]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(eo).forEach(function(e){to.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),eo[t]=eo[e]})});var ro=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 oo(e,t,n){t&&(ro[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&p("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&p("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||p("61")),null!=t.style&&"object"!=typeof t.style&&p("62",n()))}function ao(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}}var io=l.thatReturns("");function lo(e,t){var n=Dn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=x[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function co(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function so(e,t,n,r){var o=ao(t,n);switch(t){case"iframe":case"object":Cn("topLoad","load",e);var a=n;break;case"video":case"audio":for(a in jn)jn.hasOwnProperty(a)&&Cn(a,jn[a],e);a=n;break;case"source":Cn("topError","error",e),a=n;break;case"img":case"image":case"link":Cn("topError","error",e),Cn("topLoad","load",e),a=n;break;case"form":Cn("topReset","reset",e),Cn("topSubmit","submit",e),a=n;break;case"details":Cn("topToggle","toggle",e),a=n;break;case"input":Ct(e,n),a=bt(e,n),Cn("topInvalid","invalid",e),lo(r,"onChange");break;case"option":a=Hr(e,n);break;case"select":Vr(e,n),a=i({},n,{value:void 0}),Cn("topInvalid","invalid",e),lo(r,"onChange");break;case"textarea":Wr(e,n),a=Qr(e,n),Cn("topInvalid","invalid",e),lo(r,"onChange");break;default:a=n}oo(t,a,io);var u,c=a;for(u in c)if(c.hasOwnProperty(u)){var s=c[u];"style"===u?no(e,s):"dangerouslySetInnerHTML"===u?null!=(s=s?s.__html:void 0)&&Jr(e,s):"children"===u?"string"==typeof s?("textarea"!==t||""!==s)&&Zr(e,s):"number"==typeof s&&Zr(e,""+s):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(C.hasOwnProperty(u)?null!=s&&lo(r,u):null!=s&&vt(e,u,s,o))}switch(t){case"input":Ke(e),kt(e,n);break;case"textarea":Ke(e),Kr(e);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,null!=(t=n.value)?Br(e,!!n.multiple,t,!1):null!=n.defaultValue&&Br(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=l)}}function fo(e,t,n,r,o){var a=null;switch(t){case"input":n=bt(e,n),r=bt(e,r),a=[];break;case"option":n=Hr(e,n),r=Hr(e,r),a=[];break;case"select":n=i({},n,{value:void 0}),r=i({},r,{value:void 0}),a=[];break;case"textarea":n=Qr(e,n),r=Qr(e,r),a=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=l)}oo(t,r,io),t=e=void 0;var u=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var c=n[e];for(t in c)c.hasOwnProperty(t)&&(u||(u={}),u[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(C.hasOwnProperty(e)?a||(a=[]):(a=a||[]).push(e,null));for(e in r){var s=r[e];if(c=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&s!==c&&(null!=s||null!=c))if("style"===e)if(c){for(t in c)!c.hasOwnProperty(t)||s&&s.hasOwnProperty(t)||(u||(u={}),u[t]="");for(t in s)s.hasOwnProperty(t)&&c[t]!==s[t]&&(u||(u={}),u[t]=s[t])}else u||(a||(a=[]),a.push(e,u)),u=s;else"dangerouslySetInnerHTML"===e?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(a=a||[]).push(e,""+s)):"children"===e?c===s||"string"!=typeof s&&"number"!=typeof s||(a=a||[]).push(e,""+s):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(C.hasOwnProperty(e)?(null!=s&&lo(o,e),a||c===s||(a=[])):(a=a||[]).push(e,s))}return u&&(a=a||[]).push("style",u),a}function po(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&xt(e,o),ao(n,r),r=ao(n,o);for(var a=0;ar&&(o=r,r=e,e=o),o=Un(n,e);var a=Un(n,r);if(o&&a&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)){var i=document.createRange();i.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(i),t.extend(a.node,a.offset)):(i.setEnd(a.node,a.offset),t.addRange(i))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(n.focus(),n=0;n
Date: Mon, 26 Nov 2018 13:25:59 -0800
Subject: [PATCH 03/11] Tab WIP.
---
.../app/client/src/ui/shell/mdi/tab/tab.scss | 5 +-
.../app/client/src/ui/shell/mdi/tab/tab.tsx | 52 +++++++++----------
.../src/ui/shell/multiTabs/tabBar/tabBar.scss | 9 ++++
.../extensions/debug/client/public/qna.js | 6 +--
4 files changed, 41 insertions(+), 31 deletions(-)
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.scss b/packages/app/client/src/ui/shell/mdi/tab/tab.scss
index da1f3557a..4b079c69b 100644
--- a/packages/app/client/src/ui/shell/mdi/tab/tab.scss
+++ b/packages/app/client/src/ui/shell/mdi/tab/tab.scss
@@ -54,9 +54,10 @@
& > .editor-tab-close {
text-decoration: none;
display: inline-block;
- height: 16px;
- width: 16px;
+ height: 17px;
+ width: 17px;
margin-left: 8px;
+ background-color: transparent;
border: 1px solid transparent;
outline: none;
opacity: 0;
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
index bb549320b..9341e793f 100644
--- a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
+++ b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
@@ -68,45 +68,45 @@ class TabComponent extends React.Component {
const activeClassName = this.props.active ? styles.activeEditorTab : '';
const draggedOverClassName = this.state.draggedOver ? styles.draggedOverEditorTab : '';
- return (
-
-
-
-
{ this.props.label }
- { this.props.dirty ?
* : null }
-
-
-
-
- );
-
// return (
//
+ //
//
//
{ this.props.label }
// { this.props.dirty ?
* : null }
- //
//
- //
+ //
//
// );
+
+ return (
+
+
+
{ this.props.label }
+ { this.props.dirty ?
* : null }
+
+
+
+
+ );
}
private onCloseButtonKeyPress = (event: any, _meow?: KeyboardEvent) => {
@@ -115,7 +115,7 @@ class TabComponent extends React.Component {
}
}
- private onCloseClick = (event: SyntheticEvent): void => {
+ private onCloseClick = (event: SyntheticEvent): void => {
event.stopPropagation();
this.props.onCloseClick(this.props.documentId);
}
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
index cae3dead2..ea19e0758 100644
--- a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
+++ b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
@@ -3,6 +3,7 @@
background-color: var(--tab-bar-bg);
color: var(--input-label-color);
min-height: 32px;
+
&.dragged-over {
background-color: var(--tab-active-tab-bg);
}
@@ -30,6 +31,7 @@
li {
> button:focus {
position: relative;
+
&::before {
content: '';
border: var(--tab-focus-border);
@@ -41,9 +43,11 @@
clip-path: var(--border-window-clip-path);
}
}
+
+ li {
position: relative;
padding-left: 1px;
+
&::after {
content: '';
position: absolute;
@@ -62,12 +66,14 @@
width: auto;
margin-left: auto;
flex-shrink: 0;
+
& > span {
display: inline-block;
cursor: pointer;
height: 16px;
margin-right: 12px;
font-size: 12px;
+
:first-of-type {
margin-left: 12px;
}
@@ -93,13 +99,16 @@
cursor: pointer;
}
}
+
.split-widget, .presentation-widget {
background: var(--tab-icon-color);
-webkit-mask-size: 22px;
+
&:hover {
background: var(--tab-icon-hover-color);
}
}
+
.split-widget {
-webkit-mask: url("../../../media/ic_split.svg") no-repeat 50% 50%;
}
diff --git a/packages/extensions/debug/client/public/qna.js b/packages/extensions/debug/client/public/qna.js
index d8ce17d06..b8d0188b8 100644
--- a/packages/extensions/debug/client/public/qna.js
+++ b/packages/extensions/debug/client/public/qna.js
@@ -3,7 +3,7 @@
object-assign
(c) Sindre Sorhus
@license MIT
-*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.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,i,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u=0&&u.splice(t,1)}function h(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=l++;n=i||(i=h(t)),r=v.bind(null,n,u,!1),o=v.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=c(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return s(n,t),function(e){for(var o=[],a=0;a=0&&u.splice(t,1)}function h(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=l++;n=i||(i=h(t)),r=v.bind(null,n,u,!1),o=v.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=c(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return s(n,t),function(e){for(var o=[],a=0;aL.length&&L.push(e)}function _(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case c:a=!0}}if(a)return n(r,e,""===t?"."+P(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;iI.length&&I.push(e)}function j(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case c:a=!0}}if(a)return n(r,e,""===t?"."+D(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;ithis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=fe,e.release=pe}i(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=l.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=l.thatReturnsTrue)},persist:function(){this.isPersistent=l.thatReturnsTrue},isPersistent:l.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=ve),xe=String.fromCharCode(32),Te={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},ke=!1;function we(e,t){switch(e){case"topKeyUp":return-1!==ge.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function Me(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ee=!1;var Se={eventTypes:Te,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(ye)e:{switch(e){case"topCompositionStart":o=Te.compositionStart;break e;case"topCompositionEnd":o=Te.compositionEnd;break e;case"topCompositionUpdate":o=Te.compositionUpdate;break e}o=void 0}else Ee?we(e,n)&&(o=Te.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(o=Te.compositionStart);return o?(Ce&&(Ee||o!==Te.compositionStart?o===Te.compositionEnd&&Ee&&(a=ie()):(ae._root=r,ae._startText=le(),Ee=!0)),o=he.getPooled(o,t,n,r),a?o.data=a:null!==(a=Me(n))&&(o.data=a),ee(o),a=o):a=null,(e=be?function(e,t){switch(e){case"topCompositionEnd":return Me(t);case"topKeyPress":return 32!==t.which?null:(ke=!0,xe);case"topTextInput":return(e=t.data)===xe&&ke?null:e;default:return null}}(e,n):function(e,t){if(Ee)return"topCompositionEnd"===e||!ye&&we(e,t)?(e=ie(),ae._root=null,ae._startText=null,ae._fallbackText=null,Ee=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!dt.hasOwnProperty(e)||!pt.hasOwnProperty(e)&&(ft.test(e)?dt[e]=!0:(pt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}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 Ct(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Mt(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 xt(e,t){null!=(t=t.checked)&&vt(e,"checked",t,!1)}function Tt(e,t){xt(e,t);var n=Mt(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?wt(e,t.type,n):t.hasOwnProperty("defaultValue")&&wt(e,t.type,Mt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function kt(e,t){(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue"))&&(""===e.value&&(e.value=""+e._wrapperState.initialValue),e.defaultValue=""+e._wrapperState.initialValue),""!==(t=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function wt(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Mt(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".split(" ").forEach(function(e){var t=e.replace(gt,yt);mt[t]=new ht(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(gt,yt);mt[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(gt,yt);mt[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),mt.tabIndex=new ht("tabIndex",1,!1,"tabindex",null);var Et={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}};function St(e,t,n){return(e=se.getPooled(Et.change,e,t,n)).type="change",Pe(n),ee(e),e}var Nt=null,Lt=null;function It(e){U(e,!1)}function jt(e){if($e(Q(e)))return e}function _t(e,t){if("topChange"===e)return t}var Pt=!1;function Ot(){Nt&&(Nt.detachEvent("onpropertychange",Dt),Lt=Nt=null)}function Dt(e){"value"===e.propertyName&&jt(Lt)&&He(It,e=St(Lt,e,Qe(e)))}function At(e,t,n){"topFocus"===e?(Ot(),Lt=n,(Nt=t).attachEvent("onpropertychange",Dt)):"topBlur"===e&&Ot()}function Ut(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return jt(Lt)}function zt(e,t){if("topClick"===e)return jt(t)}function Rt(e,t){if("topInput"===e||"topChange"===e)return jt(t)}a.canUseDOM&&(Pt=We("input")&&(!document.documentMode||9gn.length&&gn.push(e)}}}var wn=Object.freeze({get _enabled(){return vn},setEnabled:bn,isEnabled:function(){return vn},trapBubbledEvent:Cn,trapCapturedEvent:xn,dispatchEvent:kn});function Mn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var En={animationend:Mn("Animation","AnimationEnd"),animationiteration:Mn("Animation","AnimationIteration"),animationstart:Mn("Animation","AnimationStart"),transitionend:Mn("Transition","TransitionEnd")},Sn={},Nn={};function Ln(e){if(Sn[e])return Sn[e];if(!En[e])return e;var t,n=En[e];for(t in n)if(n.hasOwnProperty(t)&&t in Nn)return Sn[e]=n[t];return e}a.canUseDOM&&(Nn=document.createElement("div").style,"AnimationEvent"in window||(delete En.animationend.animation,delete En.animationiteration.animation,delete En.animationstart.animation),"TransitionEvent"in window||delete En.transitionend.transition);var In={topAnimationEnd:Ln("animationend"),topAnimationIteration:Ln("animationiteration"),topAnimationStart:Ln("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:Ln("transitionend"),topWheel:"wheel"},jn={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},_n={},Pn=0,On="_reactListenersID"+(""+Math.random()).slice(2);function Dn(e){return Object.prototype.hasOwnProperty.call(e,On)||(e[On]=Pn++,_n[e[On]]={}),_n[e[On]]}function An(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Un(e,t){var n,r=An(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=An(r)}}function zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}var Rn=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Fn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},Hn=null,Bn=null,Vn=null,Qn=!1;function Wn(e,t){if(Qn||null==Hn||Hn!==u())return null;var n=Hn;return"selectionStart"in n&&zn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Vn&&c(Vn,n)?null:(Vn=n,(e=se.getPooled(Fn.select,Bn,e,t)).type="select",e.target=Hn,ee(e),e)}var Yn={eventTypes:Fn,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=Dn(a),o=x.onSelect;for(var i=0;it.expirationTime)&&(e.expirationTime=t.expirationTime)}new Set;var ir=void 0,lr=void 0;function ur(e){ir=lr=null;var t=e.alternate,n=e.updateQueue;null===n&&(n=e.updateQueue=or(null)),null!==t?null===(e=t.updateQueue)&&(e=t.updateQueue=or(null)):e=null,ir=n,lr=e!==n?e:null}function cr(e,t){ur(e),e=ir;var n=lr;null===n?ar(e,t):null===e.last||null===n.last?(ar(e,t),ar(n,t)):(ar(e,t),n.last=t)}function sr(e,t,n,r){return"function"==typeof(e=e.partialState)?e.call(t,n,r):e}function fr(e,t,n,r,o,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,capturedValues:n.capturedValues,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var l=!0,u=n.first,c=!1;null!==u;){var s=u.expirationTime;if(s>a){var f=n.expirationTime;(0===f||f>s)&&(n.expirationTime=s),c||(c=!0,n.baseState=e)}else c||(n.first=u.next,null===n.first&&(n.last=null)),u.isReplace?(e=sr(u,r,e,o),l=!0):(s=sr(u,r,e,o))&&(e=l?i({},e,s):i(e,s),l=!1),u.isForced&&(n.hasForceUpdate=!0),null!==u.callback&&(null===(s=n.callbackList)&&(s=n.callbackList=[]),s.push(u)),null!==u.capturedValue&&(null===(s=n.capturedValues)?n.capturedValues=[u.capturedValue]:s.push(u.capturedValue));u=u.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||null!==n.capturedValues||(t.updateQueue=null),c||(n.baseState=e),e}function pr(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;em?(g=p,p=null):g=p.sibling;var y=d(o,p,l[m],u);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(o,p),i=a(y,i,m),null===s?c=y:s.sibling=y,s=y,p=g}if(m===l.length)return n(o,p),c;if(null===p){for(;mg?(y=m,m=null):y=m.sibling;var b=d(o,m,v.value,u);if(null===b){m||(m=y);break}e&&m&&null===b.alternate&&t(o,m),i=a(b,i,g),null===s?c=b:s.sibling=b,s=b,m=y}if(v.done)return n(o,m),c;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(o,v.value,u))&&(i=a(v,i,g),null===s?c=v:s.sibling=v,s=v);return c}for(m=r(o,m);!v.done;g++,v=l.next())null!==(v=h(m,o,g,v.value,u))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),i=a(v,i,g),null===s?c=v:s.sibling=v,s=v);return e&&m.forEach(function(e){return t(o,e)}),c}return function(e,r,a,l){"object"==typeof a&&null!==a&&a.type===tt&&null===a.key&&(a=a.props.children);var u="object"==typeof a&&null!==a;if(u)switch(a.$$typeof){case Xe:e:{var c=a.key;for(u=r;null!==u;){if(u.key===c){if(10===u.tag?a.type===tt:u.type===a.type){n(e,u.sibling),(r=o(u,a.type===tt?a.props.children:a.props,l)).ref=hr(e,u,a),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===tt?((r=Gn(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=qn(a,e.mode,l)).ref=hr(e,r,a),l.return=e,e=l)}return i(e);case et:e:{for(u=a.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=o(r,a.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Jn(a,e.mode,l)).return=e,e=r}return i(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,a,l)).return=e,e=r):(n(e,r),(r=Xn(a,e.mode,l)).return=e,e=r),i(e);if(dr(a))return m(e,r,a,l);if(ut(a))return g(e,r,a,l);if(u&&mr(e,a),void 0===a)switch(e.tag){case 2:case 1:p("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var yr=gr(!0),vr=gr(!1);function br(e,t,n,r,o,a,l){function u(e,t,n){s(e,t,n,t.expirationTime)}function s(e,t,n,r){t.child=null===e?vr(t,null,n,r):yr(t,e.child,n,r)}function d(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function h(e,t,n,r,o,a){if(d(e,t),!n&&!o)return r&&N(t,!1),y(e,t);n=t.stateNode,qe.current=t;var i=o?null:n.render();return t.effectTag|=1,o&&(s(e,t,null,a),t.child=null),s(e,t,i,a),t.memoizedState=n.state,t.memoizedProps=n.props,r&&N(t,!0),t.child}function m(e){var t=e.stateNode;t.pendingContext?S(e,t.pendingContext,t.pendingContext!==t.context):t.context&&S(e,t.context,!1),x(e,t.containerInfo)}function g(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var a=0|o.stateNode;if(o.type===t&&0!=(a&n)){for(a=o;null!==a;){var i=a.alternate;if(0===a.expirationTime||a.expirationTime>r)a.expirationTime=r,null!==i&&(0===i.expirationTime||i.expirationTime>r)&&(i.expirationTime=r);else{if(null===i||!(0===i.expirationTime||i.expirationTime>r))break;i.expirationTime=r}a=a.return}a=null}else a=o.child;break;case 13:a=o.type===e.type?null:o.child;break;default:a=o.child}if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){a=o;break}a=a.return}o=a}}function y(e,t){if(null!==e&&t.child!==e.child&&p("153"),null!==t.child){var n=$n(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$n(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}var v=e.shouldSetTextContent,b=e.shouldDeprioritizeSubtree,C=t.pushHostContext,x=t.pushHostContainer,T=r.pushProvider,k=n.getMaskedContext,w=n.getUnmaskedContext,M=n.hasContextChanged,E=n.pushContextProvider,S=n.pushTopLevelContextObject,N=n.invalidateContextProvider,L=o.enterHydrationState,I=o.resetHydrationState,j=o.tryToClaimNextHydratableInstance,_=(e=function(e,t,n,r,o){function a(e,t,n,r,o,a){if(null===t||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)return!0;var i=e.stateNode;return e=e.type,"function"==typeof i.shouldComponentUpdate?i.shouldComponentUpdate(n,o,a):!(e.prototype&&e.prototype.isPureReactComponent&&c(t,n)&&c(r,o))}function l(e,t){t.updater=y,e.stateNode=t,t._reactInternalFiber=e}function u(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&&y.enqueueReplaceState(t,t.state,null)}function s(e,t,n,r){if("function"==typeof(e=e.type).getDerivedStateFromProps)return e.getDerivedStateFromProps.call(null,n,r)}var p=e.cacheContext,d=e.getMaskedContext,h=e.getUnmaskedContext,m=e.isContextConsumer,g=e.hasContextChanged,y={isMounted:qt,enqueueSetState:function(e,r,o){e=e._reactInternalFiber,o=void 0===o?null:o;var a=n(e);cr(e,{expirationTime:a,partialState:r,callback:o,isReplace:!1,isForced:!1,capturedValue:null,next:null}),t(e,a)},enqueueReplaceState:function(e,r,o){e=e._reactInternalFiber,o=void 0===o?null:o;var a=n(e);cr(e,{expirationTime:a,partialState:r,callback:o,isReplace:!0,isForced:!1,capturedValue:null,next:null}),t(e,a)},enqueueForceUpdate:function(e,r){e=e._reactInternalFiber,r=void 0===r?null:r;var o=n(e);cr(e,{expirationTime:o,partialState:null,callback:r,isReplace:!1,isForced:!0,capturedValue:null,next:null}),t(e,o)}};return{adoptClassInstance:l,callGetDerivedStateFromProps:s,constructClassInstance:function(e,t){var n=e.type,r=h(e),o=m(e),a=o?d(e,r):f,u=null!==(n=new n(t,a)).state&&void 0!==n.state?n.state:null;return l(e,n),e.memoizedState=u,null!==(t=s(e,0,t,u))&&void 0!==t&&(e.memoizedState=i({},e.memoizedState,t)),o&&p(e,r,a),n},mountClassInstance:function(e,t){var n=e.type,r=e.alternate,o=e.stateNode,a=e.pendingProps,i=h(e);o.props=a,o.state=e.memoizedState,o.refs=f,o.context=d(e,i),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(n=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),n!==o.state&&y.enqueueReplaceState(o,o.state,null),null!==(n=e.updateQueue)&&(o.state=fr(r,e,n,o,a,t))),"function"==typeof o.componentDidMount&&(e.effectTag|=4)},resumeMountClassInstance:function(e,t){var n=e.type,l=e.stateNode;l.props=e.memoizedProps,l.state=e.memoizedState;var c=e.memoizedProps,f=e.pendingProps,p=l.context,m=h(e);m=d(e,m),(n="function"==typeof n.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate)||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(c!==f||p!==m)&&u(e,l,f,m),p=e.memoizedState,t=null!==e.updateQueue?fr(null,e,e.updateQueue,l,f,t):p;var y=void 0;if(c!==f&&(y=s(e,0,f,t)),null!==y&&void 0!==y){t=null===t||void 0===t?y:i({},t,y);var v=e.updateQueue;null!==v&&(v.baseState=i({},v.baseState,y))}return c!==f||p!==t||g()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate?((c=a(e,c,f,p,t,m))?(n||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||("function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount()),"function"==typeof l.componentDidMount&&(e.effectTag|=4)):("function"==typeof l.componentDidMount&&(e.effectTag|=4),r(e,f),o(e,t)),l.props=f,l.state=t,l.context=m,c):("function"==typeof l.componentDidMount&&(e.effectTag|=4),!1)},updateClassInstance:function(e,t,n){var l=t.type,c=t.stateNode;c.props=t.memoizedProps,c.state=t.memoizedState;var f=t.memoizedProps,p=t.pendingProps,m=c.context,y=h(t);y=d(t,y),(l="function"==typeof l.getDerivedStateFromProps||"function"==typeof c.getSnapshotBeforeUpdate)||"function"!=typeof c.UNSAFE_componentWillReceiveProps&&"function"!=typeof c.componentWillReceiveProps||(f!==p||m!==y)&&u(t,c,p,y),m=t.memoizedState,n=null!==t.updateQueue?fr(e,t,t.updateQueue,c,p,n):m;var v=void 0;if(f!==p&&(v=s(t,0,p,n)),null!==v&&void 0!==v){n=null===n||void 0===n?v:i({},n,v);var b=t.updateQueue;null!==b&&(b.baseState=i({},b.baseState,v))}return f!==p||m!==n||g()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate?((v=a(t,f,p,m,n,y))?(l||"function"!=typeof c.UNSAFE_componentWillUpdate&&"function"!=typeof c.componentWillUpdate||("function"==typeof c.componentWillUpdate&&c.componentWillUpdate(p,n,y),"function"==typeof c.UNSAFE_componentWillUpdate&&c.UNSAFE_componentWillUpdate(p,n,y)),"function"==typeof c.componentDidUpdate&&(t.effectTag|=4),"function"==typeof c.getSnapshotBeforeUpdate&&(t.effectTag|=2048)):("function"!=typeof c.componentDidUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),r(t,p),o(t,n)),c.props=p,c.state=n,c.context=y,v):("function"!=typeof c.componentDidUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),!1)}}}(n,a,l,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t})).adoptClassInstance,P=e.callGetDerivedStateFromProps,O=e.constructClassInstance,D=e.mountClassInstance,A=e.resumeMountClassInstance,U=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:m(t);break;case 2:E(t);break;case 4:x(t,t.stateNode.containerInfo);break;case 13:T(t)}return null}switch(t.tag){case 0:null!==e&&p("155");var r=t.type,o=t.pendingProps,a=w(t);return r=r(o,a=k(t,a)),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof a.getDerivedStateFromProps&&(null!==(o=P(t,r,o,t.memoizedState))&&void 0!==o&&(t.memoizedState=i({},t.memoizedState,o))),o=E(t),_(t,r),D(t,n),e=h(e,t,!0,o,!1,n)):(t.tag=1,u(e,t,r),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,M()||t.memoizedProps!==n?(r=w(t),o=o(n,r=k(t,r)),t.effectTag|=1,u(e,t,o),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 2:o=E(t),null===e?null===t.stateNode?(O(t,t.pendingProps),D(t,n),r=!0):r=A(t,n):r=U(e,t,n),a=!1;var l=t.updateQueue;return null!==l&&null!==l.capturedValues&&(a=r=!0),h(e,t,r,o,a,n);case 3:e:if(m(t),r=t.updateQueue,null!==r){if(a=t.memoizedState,o=fr(e,t,r,null,null,n),t.memoizedState=o,null!==(r=t.updateQueue)&&null!==r.capturedValues)r=null;else{if(a===o){I(),e=y(e,t);break e}r=o.element}a=t.stateNode,(null===e||null===e.child)&&a.hydrate&&L(t)?(t.effectTag|=2,t.child=vr(t,null,r,n)):(I(),u(e,t,r)),t.memoizedState=o,e=t.child}else I(),e=y(e,t);return e;case 5:return C(t),null===e&&j(t),o=t.type,l=t.memoizedProps,r=t.pendingProps,a=null!==e?e.memoizedProps:null,M()||l!==r||((l=1&t.mode&&b(o,r))&&(t.expirationTime=1073741823),l&&1073741823===n)?(l=r.children,v(o,r)?l=null:a&&v(o,a)&&(t.effectTag|=16),d(e,t),1073741823!==n&&1&t.mode&&b(o,r)?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(u(e,t,l),t.memoizedProps=r,e=t.child)):e=y(e,t),e;case 6:return null===e&&j(t),t.memoizedProps=t.pendingProps,null;case 8:t.tag=7;case 7:return o=t.pendingProps,M()||t.memoizedProps!==o||(o=t.memoizedProps),r=o.children,t.stateNode=null===e?vr(t,t.stateNode,r,n):yr(t,e.stateNode,r,n),t.memoizedProps=o,t.stateNode;case 9:return null;case 4:return x(t,t.stateNode.containerInfo),o=t.pendingProps,M()||t.memoizedProps!==o?(null===e?t.child=yr(t,null,o,n):u(e,t,o),t.memoizedProps=o,e=t.child):e=y(e,t),e;case 14:return u(e,t,n=(n=t.type.render)(t.pendingProps,t.ref)),t.memoizedProps=n,t.child;case 10:return n=t.pendingProps,M()||t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 11:return n=t.pendingProps.children,M()||null!==n&&t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,a=t.memoizedProps;if(!M()&&a===o)return t.stateNode=0,T(t),y(e,t);var i=o.value;if(t.memoizedProps=o,null===a)i=1073741823;else if(a.value===o.value){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t);i=0}else{var l=a.value;if(l===i&&(0!==l||1/l==1/i)||l!=l&&i!=i){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t);i=0}else if(i="function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823,0==(i|=0)){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t)}else g(t,r,i,n)}return t.stateNode=i,T(t),u(e,t,o.children),t.child}(e,t,n);case 12:e:{r=t.type,a=t.pendingProps,l=t.memoizedProps,o=r._currentValue;var c=r._changedBits;if(M()||0!==c||l!==a){t.memoizedProps=a;var s=a.unstable_observedBits;if(void 0!==s&&null!==s||(s=1073741823),t.stateNode=s,0!=(c&s))g(t,r,c,n);else if(l===a){e=y(e,t);break e}u(e,t,n=(n=a.children)(o)),e=t.child}else e=y(e,t)}return e;default:p("156")}}}}function Cr(e,t){var n=t.source;null===t.stack&&st(n),null!==n&&ct(n),t=t.value,null!==e&&2===e.tag&&ct(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}var xr={};function Tr(e){function t(){if(null!==ee)for(var e=ee.return;null!==e;)O(e),e=e.return;te=null,ne=0,ee=null,ae=!1}function n(e){return null!==ie&&ie.has(e)}function r(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=j(t,e,ne);var o=e;if(1073741823===ne||1073741823!==o.expirationTime){e:switch(o.tag){case 3:case 2:var a=o.updateQueue;a=null===a?0:a.expirationTime;break e;default:a=0}for(var i=o.child;null!==i;)0!==i.expirationTime&&(0===a||a>i.expirationTime)&&(a=i.expirationTime),i=i.sibling;o.expirationTime=a}if(null!==t)return t;if(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),1he)&&(he=e),e}function s(e,n){e:{for(;null!==e;){if((0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>n)&&(e.alternate.expirationTime=n),null===e.return){if(3!==e.tag){n=void 0;break e}var r=e.stateNode;!Z&&0!==ne&&nke&&p("185")}e=e.return}n=void 0}return n}function d(){return G=Q()-q,2+(G/10|0)}function h(e,t,n,r,o){var a=J;J=1;try{return e(t,n,r,o)}finally{J=a}}function m(e){if(0!==ce){if(e>ce)return;Y(se)}var t=Q()-q;ce=e,se=W(v,{timeout:10*(e-2)-t})}function g(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ue?(le=ue=e,e.nextScheduledRoot=e):(ue=ue.nextScheduledRoot=e).nextScheduledRoot=le;else{var n=e.remainingExpirationTime;(0===n||t=de)&&(!me||d()>=de);)T(pe,de,!me),y();else for(;null!==pe&&0!==de&&(0===e||e>=de);)T(pe,de,!1),y();null!==ve&&(ce=0,se=-1),0!==de&&m(de),ve=null,me=!1,x()}function x(){if(we=0,null!==Te){var e=Te;Te=null;for(var t=0;tMe)&&(me=!0)}function M(e){null===pe&&p("246"),pe.remainingExpirationTime=0,ge||(ge=!0,ye=e)}var E=function(){var e=[],t=-1;return{createCursor:function(e){return{current:e}},isEmpty:function(){return-1===t},pop:function(n){0>t||(n.current=e[t],e[t]=null,t--)},push:function(n,r){e[++t]=n.current,n.current=r},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}}(),S=function(e,t){function n(e){return e===xr&&p("174"),e}var r=e.getChildHostContext,o=e.getRootHostContext;e=t.createCursor;var a=t.push,i=t.pop,l=e(xr),u=e(xr),c=e(xr);return{getHostContext:function(){return n(l.current)},getRootHostContainer:function(){return n(c.current)},popHostContainer:function(e){i(l,e),i(u,e),i(c,e)},popHostContext:function(e){u.current===e&&(i(l,e),i(u,e))},pushHostContainer:function(e,t){a(c,t,e),a(u,e,e),a(l,xr,e),t=o(t),i(l,e),a(l,t,e)},pushHostContext:function(e){var t=n(c.current),o=n(l.current);o!==(t=r(o,e.type,t))&&(a(u,e,e),a(l,t,e))}}}(e,E),N=function(e){function t(e,t,n){(e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function n(e){return 2===e.tag&&null!=e.type.childContextTypes}function r(e,t){var n=e.stateNode,r=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var o in n=n.getChildContext())o in r||p("108",ct(e)||"Unknown",o);return i({},t,n)}var o=e.createCursor,a=e.push,l=e.pop,u=o(f),c=o(!1),s=f;return{getUnmaskedContext:function(e){return n(e)?s:u.current},cacheContext:t,getMaskedContext:function(e,n){var r=e.type.contextTypes;if(!r)return f;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var a,i={};for(a in r)i[a]=n[a];return o&&t(e,n,i),i},hasContextChanged:function(){return c.current},isContextConsumer:function(e){return 2===e.tag&&null!=e.type.contextTypes},isContextProvider:n,popContextProvider:function(e){n(e)&&(l(c,e),l(u,e))},popTopLevelContextObject:function(e){l(c,e),l(u,e)},pushTopLevelContextObject:function(e,t,n){null!=u.cursor&&p("168"),a(u,t,e),a(c,n,e)},processChildContext:r,pushContextProvider:function(e){if(!n(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||f,s=u.current,a(u,t,e),a(c,c.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||p("169"),t){var o=r(e,s);n.__reactInternalMemoizedMergedChildContext=o,l(c,e),l(u,e),a(u,o,e)}else l(c,e);a(c,t,e)},findCurrentUnmaskedContext:function(e){for((2!==$t(e)||2!==e.tag)&&p("170");3!==e.tag;){if(n(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||p("171")}return e.stateNode.context}}}(E);E=function(e){var t=e.createCursor,n=e.push,r=e.pop,o=t(null),a=t(null),i=t(0);return{pushProvider:function(e){var t=e.type._context;n(i,t._changedBits,e),n(a,t._currentValue,e),n(o,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode},popProvider:function(e){var t=i.current,n=a.current;r(o,e),r(a,e),r(i,e),(e=e.type._context)._currentValue=n,e._changedBits=t}}}(E);var L=function(e){function t(e,t){var n=new Kn(5,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 n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=i(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function r(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;f=e}var o=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){p("175")},prepareToHydrateHostTextInstance:function(){p("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,i=e.canHydrateTextInstance,l=e.getNextHydratableSibling,u=e.getFirstHydratableChild,c=e.hydrateInstance,s=e.hydrateTextInstance,f=null,d=null,h=!1;return{enterHydrationState:function(e){return d=u(e.stateNode.containerInfo),f=e,h=!0},resetHydrationState:function(){d=f=null,h=!1},tryToClaimNextHydratableInstance:function(e){if(h){var r=d;if(r){if(!n(e,r)){if(!(r=l(r))||!n(e,r))return e.effectTag|=2,h=!1,void(f=e);t(f,d)}f=e,d=u(r)}else e.effectTag|=2,h=!1,f=e}},prepareToHydrateHostInstance:function(e,t,n){return t=c(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return s(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==f)return!1;if(!h)return r(e),h=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!o(n,e.memoizedProps))for(n=d;n;)t(e,n),n=l(n);return r(e),d=f?l(e.stateNode):null,!0}}}(e),I=br(e,S,N,E,L,s,c).beginWork,j=function(e,t,n,r,o){function a(e){e.effectTag|=4}var i=e.createInstance,l=e.createTextInstance,u=e.appendInitialChild,c=e.finalizeInitialChildren,s=e.prepareUpdate,f=e.persistence,d=t.getRootHostContainer,h=t.popHostContext,m=t.getHostContext,g=t.popHostContainer,y=n.popContextProvider,v=n.popTopLevelContextObject,b=r.popProvider,C=o.prepareToHydrateHostInstance,x=o.prepareToHydrateHostTextInstance,T=o.popHydrationState,k=void 0,w=void 0,M=void 0;return e.mutation?(k=function(){},w=function(e,t,n){(t.updateQueue=n)&&a(t)},M=function(e,t,n,r){n!==r&&a(t)}):p(f?"235":"236"),{completeWork:function(e,t,n){var r=t.pendingProps;switch(t.tag){case 1:return null;case 2:return y(t),e=t.stateNode,null!==(r=t.updateQueue)&&null!==r.capturedValues&&(t.effectTag&=-65,"function"==typeof e.componentDidCatch?t.effectTag|=256:r.capturedValues=null),null;case 3:return g(t),v(t),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(T(t),t.effectTag&=-3),k(t),null!==(e=t.updateQueue)&&null!==e.capturedValues&&(t.effectTag|=256),null;case 5:h(t),n=d();var o=t.type;if(null!==e&&null!=t.stateNode){var f=e.memoizedProps,E=t.stateNode,S=m();E=s(E,o,f,r,n,S),w(e,t,E,o,f,r,n,S),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!r)return null===t.stateNode&&p("166"),null;if(e=m(),T(t))C(t,n,e)&&a(t);else{f=i(o,r,n,e,t);e:for(S=t.child;null!==S;){if(5===S.tag||6===S.tag)u(f,S.stateNode);else if(4!==S.tag&&null!==S.child){S.child.return=S,S=S.child;continue}if(S===t)break;for(;null===S.sibling;){if(null===S.return||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}c(f,o,r,n,e)&&a(t),t.stateNode=f}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)M(e,t,e.memoizedProps,r);else{if("string"!=typeof r)return null===t.stateNode&&p("166"),null;e=d(),n=m(),T(t)?x(t)&&a(t):t.stateNode=l(r,e,n,t)}return null;case 7:(r=t.memoizedProps)||p("165"),t.tag=8,o=[];e:for((f=t.stateNode)&&(f.return=t);null!==f;){if(5===f.tag||6===f.tag||4===f.tag)p("247");else if(9===f.tag)o.push(f.pendingProps.value);else if(null!==f.child){f.child.return=f,f=f.child;continue}for(;null===f.sibling;){if(null===f.return||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}return r=(f=r.handler)(r.props,o),t.child=yr(t,null!==e?e.child:null,r,n),t.child;case 8:return t.tag=7,null;case 9:case 14:case 10:case 11:return null;case 4:return g(t),k(t),null;case 13:return b(t),null;case 12:return null;case 0:p("167");default:p("156")}}}}(e,S,N,E,L).completeWork,_=(S=function(e,t,n,r,o){var a=e.popHostContainer,i=e.popHostContext,l=t.popContextProvider,u=t.popTopLevelContextObject,c=n.popProvider;return{throwException:function(e,t,n){t.effectTag|=512,t.firstEffect=t.lastEffect=null,t={value:n,source:t,stack:st(t)};do{switch(e.tag){case 3:return ur(e),e.updateQueue.capturedValues=[t],void(e.effectTag|=1024);case 2:if(n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&!o(n)){ur(e);var r=(n=e.updateQueue).capturedValues;return null===r?n.capturedValues=[t]:r.push(t),void(e.effectTag|=1024)}}e=e.return}while(null!==e)},unwindWork:function(e){switch(e.tag){case 2:l(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return a(e),u(e),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return i(e),null;case 4:return a(e),null;case 13:return c(e),null;default:return null}},unwindInterruptedWork:function(e){switch(e.tag){case 2:l(e);break;case 3:a(e),u(e);break;case 5:i(e);break;case 4:a(e);break;case 13:c(e)}}}}(S,N,E,0,n)).throwException,P=S.unwindWork,O=S.unwindInterruptedWork,D=(S=function(e,t,n,r,o){function a(e){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){t(e,n)}else n.current=null}function i(e){switch(rr(e),e.tag){case 2:a(e);var n=e.stateNode;if("function"==typeof n.componentWillUnmount)try{n.props=e.memoizedProps,n.state=e.memoizedState,n.componentWillUnmount()}catch(n){t(e,n)}break;case 5:a(e);break;case 7:l(e.stateNode);break;case 4:f&&c(e)}}function l(e){for(var t=e;;)if(i(t),null===t.child||f&&4===t.tag){if(t===e)break;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 u(e){return 5===e.tag||3===e.tag||4===e.tag}function c(e){for(var t=e,n=!1,r=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&p("160"),n.tag){case 5:r=n.stateNode,o=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)l(t),o?T(r,t.stateNode):x(r,t.stateNode);else if(4===t.tag?r=t.stateNode.containerInfo:i(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;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var s=e.getPublicInstance,f=e.mutation;e=e.persistence,f||p(e?"235":"236");var d=f.commitMount,h=f.commitUpdate,m=f.resetTextContent,g=f.commitTextUpdate,y=f.appendChild,v=f.appendChildToContainer,b=f.insertBefore,C=f.insertInContainerBefore,x=f.removeChild,T=f.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(e,t){switch(t.tag){case 2:if(2048&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;(e=t.stateNode).props=t.memoizedProps,e.state=t.memoizedState,t=e.getSnapshotBeforeUpdate(n,r),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:break;default:p("163")}},commitResetTextContent:function(e){m(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(u(t)){var n=t;break e}t=t.return}p("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:p("161")}16&n.effectTag&&(m(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||u(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)n?r?C(t,o.stateNode,n):b(t,o.stateNode,n):r?v(t,o.stateNode):y(t,o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},commitDeletion:function(e){c(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&h(n,a,o,e,r,t)}break;case 6:null===t.stateNode&&p("162"),n=t.memoizedProps,g(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:p("163")}},commitLifeCycles:function(e,t,n){switch(n.tag){case 2:if(e=n.stateNode,4&n.effectTag)if(null===t)e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidMount();else{var r=t.memoizedProps;t=t.memoizedState,e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}null!==(n=n.updateQueue)&&pr(n,e);break;case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=s(n.child.stateNode);break;case 2:e=n.child.stateNode}pr(t,e)}break;case 5:e=n.stateNode,null===t&&4&n.effectTag&&d(e,n.type,n.memoizedProps,n);break;case 6:case 4:break;default:p("163")}},commitErrorLogging:function(e,t){switch(e.tag){case 2:var n=e.type;t=e.stateNode;var r=e.updateQueue;(null===r||null===r.capturedValues)&&p("264");var a=r.capturedValues;for(r.capturedValues=null,"function"!=typeof n.getDerivedStateFromCatch&&o(t),t.props=e.memoizedProps,t.state=e.memoizedState,n=0;n=Dr-e){if(!(-1!==Pr&&Pr<=e))return void(Or||(Or=!0,requestAnimationFrame(Fr)));zr.didTimeout=!0}else zr.didTimeout=!1;Pr=-1,e=jr,jr=null,null!==e&&e(zr)}},!1);var Fr=function(e){Or=!1;var t=e-Dr+Ur;tt&&(t=8),Ur=t=t.length||p("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Yr(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Kr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var $r={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function qr(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 Gr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?qr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Xr=void 0,Jr=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==$r.svg||"innerHTML"in e)e.innerHTML=t;else{for((Xr=Xr||document.createElement("div")).innerHTML=""+t+" ",t=Xr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zr(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 eo={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,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},to=["Webkit","ms","Moz","O"];function no(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,a=t[n];o=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||eo.hasOwnProperty(o)&&eo[o]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(eo).forEach(function(e){to.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),eo[t]=eo[e]})});var ro=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 oo(e,t,n){t&&(ro[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&p("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&p("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||p("61")),null!=t.style&&"object"!=typeof t.style&&p("62",n()))}function ao(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}}var io=l.thatReturns("");function lo(e,t){var n=Dn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=x[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function co(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function so(e,t,n,r){var o=ao(t,n);switch(t){case"iframe":case"object":Cn("topLoad","load",e);var a=n;break;case"video":case"audio":for(a in jn)jn.hasOwnProperty(a)&&Cn(a,jn[a],e);a=n;break;case"source":Cn("topError","error",e),a=n;break;case"img":case"image":case"link":Cn("topError","error",e),Cn("topLoad","load",e),a=n;break;case"form":Cn("topReset","reset",e),Cn("topSubmit","submit",e),a=n;break;case"details":Cn("topToggle","toggle",e),a=n;break;case"input":Ct(e,n),a=bt(e,n),Cn("topInvalid","invalid",e),lo(r,"onChange");break;case"option":a=Hr(e,n);break;case"select":Vr(e,n),a=i({},n,{value:void 0}),Cn("topInvalid","invalid",e),lo(r,"onChange");break;case"textarea":Wr(e,n),a=Qr(e,n),Cn("topInvalid","invalid",e),lo(r,"onChange");break;default:a=n}oo(t,a,io);var u,c=a;for(u in c)if(c.hasOwnProperty(u)){var s=c[u];"style"===u?no(e,s):"dangerouslySetInnerHTML"===u?null!=(s=s?s.__html:void 0)&&Jr(e,s):"children"===u?"string"==typeof s?("textarea"!==t||""!==s)&&Zr(e,s):"number"==typeof s&&Zr(e,""+s):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(C.hasOwnProperty(u)?null!=s&&lo(r,u):null!=s&&vt(e,u,s,o))}switch(t){case"input":Ke(e),kt(e,n);break;case"textarea":Ke(e),Kr(e);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,null!=(t=n.value)?Br(e,!!n.multiple,t,!1):null!=n.defaultValue&&Br(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=l)}}function fo(e,t,n,r,o){var a=null;switch(t){case"input":n=bt(e,n),r=bt(e,r),a=[];break;case"option":n=Hr(e,n),r=Hr(e,r),a=[];break;case"select":n=i({},n,{value:void 0}),r=i({},r,{value:void 0}),a=[];break;case"textarea":n=Qr(e,n),r=Qr(e,r),a=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=l)}oo(t,r,io),t=e=void 0;var u=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var c=n[e];for(t in c)c.hasOwnProperty(t)&&(u||(u={}),u[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(C.hasOwnProperty(e)?a||(a=[]):(a=a||[]).push(e,null));for(e in r){var s=r[e];if(c=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&s!==c&&(null!=s||null!=c))if("style"===e)if(c){for(t in c)!c.hasOwnProperty(t)||s&&s.hasOwnProperty(t)||(u||(u={}),u[t]="");for(t in s)s.hasOwnProperty(t)&&c[t]!==s[t]&&(u||(u={}),u[t]=s[t])}else u||(a||(a=[]),a.push(e,u)),u=s;else"dangerouslySetInnerHTML"===e?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(a=a||[]).push(e,""+s)):"children"===e?c===s||"string"!=typeof s&&"number"!=typeof s||(a=a||[]).push(e,""+s):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(C.hasOwnProperty(e)?(null!=s&&lo(o,e),a||c===s||(a=[])):(a=a||[]).push(e,s))}return u&&(a=a||[]).push("style",u),a}function po(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&xt(e,o),ao(n,r),r=ao(n,o);for(var a=0;ar&&(o=r,r=e,e=o),o=Un(n,e);var a=Un(n,r);if(o&&a&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)){var i=document.createRange();i.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(i),t.extend(a.node,a.offset)):(i.setEnd(a.node,a.offset),t.addRange(i))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(n.focus(),n=0;nthis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=fe,e.release=pe}i(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=l.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=l.thatReturnsTrue)},persist:function(){this.isPersistent=l.thatReturnsTrue},isPersistent:l.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=ve),xe=String.fromCharCode(32),Te={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Me=!1;function we(e,t){switch(e){case"topKeyUp":return-1!==ge.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Se=!1;var Ee={eventTypes:Te,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(ye)e:{switch(e){case"topCompositionStart":o=Te.compositionStart;break e;case"topCompositionEnd":o=Te.compositionEnd;break e;case"topCompositionUpdate":o=Te.compositionUpdate;break e}o=void 0}else Se?we(e,n)&&(o=Te.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(o=Te.compositionStart);return o?(Ce&&(Se||o!==Te.compositionStart?o===Te.compositionEnd&&Se&&(a=ie()):(ae._root=r,ae._startText=le(),Se=!0)),o=he.getPooled(o,t,n,r),a?o.data=a:null!==(a=ke(n))&&(o.data=a),ee(o),a=o):a=null,(e=be?function(e,t){switch(e){case"topCompositionEnd":return ke(t);case"topKeyPress":return 32!==t.which?null:(Me=!0,xe);case"topTextInput":return(e=t.data)===xe&&Me?null:e;default:return null}}(e,n):function(e,t){if(Se)return"topCompositionEnd"===e||!ye&&we(e,t)?(e=ie(),ae._root=null,ae._startText=null,ae._fallbackText=null,Se=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!dt.hasOwnProperty(e)||!pt.hasOwnProperty(e)&&(ft.test(e)?dt[e]=!0:(pt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}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 Ct(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=kt(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 xt(e,t){null!=(t=t.checked)&&vt(e,"checked",t,!1)}function Tt(e,t){xt(e,t);var n=kt(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?wt(e,t.type,n):t.hasOwnProperty("defaultValue")&&wt(e,t.type,kt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Mt(e,t){(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue"))&&(""===e.value&&(e.value=""+e._wrapperState.initialValue),e.defaultValue=""+e._wrapperState.initialValue),""!==(t=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function wt(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function kt(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".split(" ").forEach(function(e){var t=e.replace(gt,yt);mt[t]=new ht(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(gt,yt);mt[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(gt,yt);mt[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),mt.tabIndex=new ht("tabIndex",1,!1,"tabindex",null);var St={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}};function Et(e,t,n){return(e=se.getPooled(St.change,e,t,n)).type="change",De(n),ee(e),e}var Nt=null,It=null;function Lt(e){U(e,!1)}function _t(e){if($e(B(e)))return e}function jt(e,t){if("topChange"===e)return t}var Dt=!1;function Ot(){Nt&&(Nt.detachEvent("onpropertychange",Pt),It=Nt=null)}function Pt(e){"value"===e.propertyName&&_t(It)&&He(Lt,e=Et(It,e,Be(e)))}function At(e,t,n){"topFocus"===e?(Ot(),It=n,(Nt=t).attachEvent("onpropertychange",Pt)):"topBlur"===e&&Ot()}function Ut(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return _t(It)}function zt(e,t){if("topClick"===e)return _t(t)}function Rt(e,t){if("topInput"===e||"topChange"===e)return _t(t)}a.canUseDOM&&(Dt=We("input")&&(!document.documentMode||9gn.length&&gn.push(e)}}}var wn=Object.freeze({get _enabled(){return vn},setEnabled:bn,isEnabled:function(){return vn},trapBubbledEvent:Cn,trapCapturedEvent:xn,dispatchEvent:Mn});function kn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var Sn={animationend:kn("Animation","AnimationEnd"),animationiteration:kn("Animation","AnimationIteration"),animationstart:kn("Animation","AnimationStart"),transitionend:kn("Transition","TransitionEnd")},En={},Nn={};function In(e){if(En[e])return En[e];if(!Sn[e])return e;var t,n=Sn[e];for(t in n)if(n.hasOwnProperty(t)&&t in Nn)return En[e]=n[t];return e}a.canUseDOM&&(Nn=document.createElement("div").style,"AnimationEvent"in window||(delete Sn.animationend.animation,delete Sn.animationiteration.animation,delete Sn.animationstart.animation),"TransitionEvent"in window||delete Sn.transitionend.transition);var Ln={topAnimationEnd:In("animationend"),topAnimationIteration:In("animationiteration"),topAnimationStart:In("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:In("transitionend"),topWheel:"wheel"},_n={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},jn={},Dn=0,On="_reactListenersID"+(""+Math.random()).slice(2);function Pn(e){return Object.prototype.hasOwnProperty.call(e,On)||(e[On]=Dn++,jn[e[On]]={}),jn[e[On]]}function An(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Un(e,t){var n,r=An(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=An(r)}}function zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}var Rn=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Fn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},Hn=null,Qn=null,Vn=null,Bn=!1;function Wn(e,t){if(Bn||null==Hn||Hn!==u())return null;var n=Hn;return"selectionStart"in n&&zn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Vn&&c(Vn,n)?null:(Vn=n,(e=se.getPooled(Fn.select,Qn,e,t)).type="select",e.target=Hn,ee(e),e)}var Yn={eventTypes:Fn,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=Pn(a),o=x.onSelect;for(var i=0;it.expirationTime)&&(e.expirationTime=t.expirationTime)}new Set;var ir=void 0,lr=void 0;function ur(e){ir=lr=null;var t=e.alternate,n=e.updateQueue;null===n&&(n=e.updateQueue=or(null)),null!==t?null===(e=t.updateQueue)&&(e=t.updateQueue=or(null)):e=null,ir=n,lr=e!==n?e:null}function cr(e,t){ur(e),e=ir;var n=lr;null===n?ar(e,t):null===e.last||null===n.last?(ar(e,t),ar(n,t)):(ar(e,t),n.last=t)}function sr(e,t,n,r){return"function"==typeof(e=e.partialState)?e.call(t,n,r):e}function fr(e,t,n,r,o,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,capturedValues:n.capturedValues,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var l=!0,u=n.first,c=!1;null!==u;){var s=u.expirationTime;if(s>a){var f=n.expirationTime;(0===f||f>s)&&(n.expirationTime=s),c||(c=!0,n.baseState=e)}else c||(n.first=u.next,null===n.first&&(n.last=null)),u.isReplace?(e=sr(u,r,e,o),l=!0):(s=sr(u,r,e,o))&&(e=l?i({},e,s):i(e,s),l=!1),u.isForced&&(n.hasForceUpdate=!0),null!==u.callback&&(null===(s=n.callbackList)&&(s=n.callbackList=[]),s.push(u)),null!==u.capturedValue&&(null===(s=n.capturedValues)?n.capturedValues=[u.capturedValue]:s.push(u.capturedValue));u=u.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||null!==n.capturedValues||(t.updateQueue=null),c||(n.baseState=e),e}function pr(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;em?(g=p,p=null):g=p.sibling;var y=d(o,p,l[m],u);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(o,p),i=a(y,i,m),null===s?c=y:s.sibling=y,s=y,p=g}if(m===l.length)return n(o,p),c;if(null===p){for(;mg?(y=m,m=null):y=m.sibling;var b=d(o,m,v.value,u);if(null===b){m||(m=y);break}e&&m&&null===b.alternate&&t(o,m),i=a(b,i,g),null===s?c=b:s.sibling=b,s=b,m=y}if(v.done)return n(o,m),c;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(o,v.value,u))&&(i=a(v,i,g),null===s?c=v:s.sibling=v,s=v);return c}for(m=r(o,m);!v.done;g++,v=l.next())null!==(v=h(m,o,g,v.value,u))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),i=a(v,i,g),null===s?c=v:s.sibling=v,s=v);return e&&m.forEach(function(e){return t(o,e)}),c}return function(e,r,a,l){"object"==typeof a&&null!==a&&a.type===tt&&null===a.key&&(a=a.props.children);var u="object"==typeof a&&null!==a;if(u)switch(a.$$typeof){case Xe:e:{var c=a.key;for(u=r;null!==u;){if(u.key===c){if(10===u.tag?a.type===tt:u.type===a.type){n(e,u.sibling),(r=o(u,a.type===tt?a.props.children:a.props,l)).ref=hr(e,u,a),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===tt?((r=Gn(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=qn(a,e.mode,l)).ref=hr(e,r,a),l.return=e,e=l)}return i(e);case et:e:{for(u=a.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=o(r,a.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Zn(a,e.mode,l)).return=e,e=r}return i(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,a,l)).return=e,e=r):(n(e,r),(r=Xn(a,e.mode,l)).return=e,e=r),i(e);if(dr(a))return m(e,r,a,l);if(ut(a))return g(e,r,a,l);if(u&&mr(e,a),void 0===a)switch(e.tag){case 2:case 1:p("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var yr=gr(!0),vr=gr(!1);function br(e,t,n,r,o,a,l){function u(e,t,n){s(e,t,n,t.expirationTime)}function s(e,t,n,r){t.child=null===e?vr(t,null,n,r):yr(t,e.child,n,r)}function d(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function h(e,t,n,r,o,a){if(d(e,t),!n&&!o)return r&&N(t,!1),y(e,t);n=t.stateNode,qe.current=t;var i=o?null:n.render();return t.effectTag|=1,o&&(s(e,t,null,a),t.child=null),s(e,t,i,a),t.memoizedState=n.state,t.memoizedProps=n.props,r&&N(t,!0),t.child}function m(e){var t=e.stateNode;t.pendingContext?E(e,t.pendingContext,t.pendingContext!==t.context):t.context&&E(e,t.context,!1),x(e,t.containerInfo)}function g(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var a=0|o.stateNode;if(o.type===t&&0!=(a&n)){for(a=o;null!==a;){var i=a.alternate;if(0===a.expirationTime||a.expirationTime>r)a.expirationTime=r,null!==i&&(0===i.expirationTime||i.expirationTime>r)&&(i.expirationTime=r);else{if(null===i||!(0===i.expirationTime||i.expirationTime>r))break;i.expirationTime=r}a=a.return}a=null}else a=o.child;break;case 13:a=o.type===e.type?null:o.child;break;default:a=o.child}if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){a=o;break}a=a.return}o=a}}function y(e,t){if(null!==e&&t.child!==e.child&&p("153"),null!==t.child){var n=$n(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$n(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}var v=e.shouldSetTextContent,b=e.shouldDeprioritizeSubtree,C=t.pushHostContext,x=t.pushHostContainer,T=r.pushProvider,M=n.getMaskedContext,w=n.getUnmaskedContext,k=n.hasContextChanged,S=n.pushContextProvider,E=n.pushTopLevelContextObject,N=n.invalidateContextProvider,I=o.enterHydrationState,L=o.resetHydrationState,_=o.tryToClaimNextHydratableInstance,j=(e=function(e,t,n,r,o){function a(e,t,n,r,o,a){if(null===t||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)return!0;var i=e.stateNode;return e=e.type,"function"==typeof i.shouldComponentUpdate?i.shouldComponentUpdate(n,o,a):!(e.prototype&&e.prototype.isPureReactComponent&&c(t,n)&&c(r,o))}function l(e,t){t.updater=y,e.stateNode=t,t._reactInternalFiber=e}function u(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&&y.enqueueReplaceState(t,t.state,null)}function s(e,t,n,r){if("function"==typeof(e=e.type).getDerivedStateFromProps)return e.getDerivedStateFromProps.call(null,n,r)}var p=e.cacheContext,d=e.getMaskedContext,h=e.getUnmaskedContext,m=e.isContextConsumer,g=e.hasContextChanged,y={isMounted:qt,enqueueSetState:function(e,r,o){e=e._reactInternalFiber,o=void 0===o?null:o;var a=n(e);cr(e,{expirationTime:a,partialState:r,callback:o,isReplace:!1,isForced:!1,capturedValue:null,next:null}),t(e,a)},enqueueReplaceState:function(e,r,o){e=e._reactInternalFiber,o=void 0===o?null:o;var a=n(e);cr(e,{expirationTime:a,partialState:r,callback:o,isReplace:!0,isForced:!1,capturedValue:null,next:null}),t(e,a)},enqueueForceUpdate:function(e,r){e=e._reactInternalFiber,r=void 0===r?null:r;var o=n(e);cr(e,{expirationTime:o,partialState:null,callback:r,isReplace:!1,isForced:!0,capturedValue:null,next:null}),t(e,o)}};return{adoptClassInstance:l,callGetDerivedStateFromProps:s,constructClassInstance:function(e,t){var n=e.type,r=h(e),o=m(e),a=o?d(e,r):f,u=null!==(n=new n(t,a)).state&&void 0!==n.state?n.state:null;return l(e,n),e.memoizedState=u,null!==(t=s(e,0,t,u))&&void 0!==t&&(e.memoizedState=i({},e.memoizedState,t)),o&&p(e,r,a),n},mountClassInstance:function(e,t){var n=e.type,r=e.alternate,o=e.stateNode,a=e.pendingProps,i=h(e);o.props=a,o.state=e.memoizedState,o.refs=f,o.context=d(e,i),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(n=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),n!==o.state&&y.enqueueReplaceState(o,o.state,null),null!==(n=e.updateQueue)&&(o.state=fr(r,e,n,o,a,t))),"function"==typeof o.componentDidMount&&(e.effectTag|=4)},resumeMountClassInstance:function(e,t){var n=e.type,l=e.stateNode;l.props=e.memoizedProps,l.state=e.memoizedState;var c=e.memoizedProps,f=e.pendingProps,p=l.context,m=h(e);m=d(e,m),(n="function"==typeof n.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate)||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(c!==f||p!==m)&&u(e,l,f,m),p=e.memoizedState,t=null!==e.updateQueue?fr(null,e,e.updateQueue,l,f,t):p;var y=void 0;if(c!==f&&(y=s(e,0,f,t)),null!==y&&void 0!==y){t=null===t||void 0===t?y:i({},t,y);var v=e.updateQueue;null!==v&&(v.baseState=i({},v.baseState,y))}return c!==f||p!==t||g()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate?((c=a(e,c,f,p,t,m))?(n||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||("function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount()),"function"==typeof l.componentDidMount&&(e.effectTag|=4)):("function"==typeof l.componentDidMount&&(e.effectTag|=4),r(e,f),o(e,t)),l.props=f,l.state=t,l.context=m,c):("function"==typeof l.componentDidMount&&(e.effectTag|=4),!1)},updateClassInstance:function(e,t,n){var l=t.type,c=t.stateNode;c.props=t.memoizedProps,c.state=t.memoizedState;var f=t.memoizedProps,p=t.pendingProps,m=c.context,y=h(t);y=d(t,y),(l="function"==typeof l.getDerivedStateFromProps||"function"==typeof c.getSnapshotBeforeUpdate)||"function"!=typeof c.UNSAFE_componentWillReceiveProps&&"function"!=typeof c.componentWillReceiveProps||(f!==p||m!==y)&&u(t,c,p,y),m=t.memoizedState,n=null!==t.updateQueue?fr(e,t,t.updateQueue,c,p,n):m;var v=void 0;if(f!==p&&(v=s(t,0,p,n)),null!==v&&void 0!==v){n=null===n||void 0===n?v:i({},n,v);var b=t.updateQueue;null!==b&&(b.baseState=i({},b.baseState,v))}return f!==p||m!==n||g()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate?((v=a(t,f,p,m,n,y))?(l||"function"!=typeof c.UNSAFE_componentWillUpdate&&"function"!=typeof c.componentWillUpdate||("function"==typeof c.componentWillUpdate&&c.componentWillUpdate(p,n,y),"function"==typeof c.UNSAFE_componentWillUpdate&&c.UNSAFE_componentWillUpdate(p,n,y)),"function"==typeof c.componentDidUpdate&&(t.effectTag|=4),"function"==typeof c.getSnapshotBeforeUpdate&&(t.effectTag|=2048)):("function"!=typeof c.componentDidUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),r(t,p),o(t,n)),c.props=p,c.state=n,c.context=y,v):("function"!=typeof c.componentDidUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),!1)}}}(n,a,l,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t})).adoptClassInstance,D=e.callGetDerivedStateFromProps,O=e.constructClassInstance,P=e.mountClassInstance,A=e.resumeMountClassInstance,U=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:m(t);break;case 2:S(t);break;case 4:x(t,t.stateNode.containerInfo);break;case 13:T(t)}return null}switch(t.tag){case 0:null!==e&&p("155");var r=t.type,o=t.pendingProps,a=w(t);return r=r(o,a=M(t,a)),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof a.getDerivedStateFromProps&&(null!==(o=D(t,r,o,t.memoizedState))&&void 0!==o&&(t.memoizedState=i({},t.memoizedState,o))),o=S(t),j(t,r),P(t,n),e=h(e,t,!0,o,!1,n)):(t.tag=1,u(e,t,r),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,k()||t.memoizedProps!==n?(r=w(t),o=o(n,r=M(t,r)),t.effectTag|=1,u(e,t,o),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 2:o=S(t),null===e?null===t.stateNode?(O(t,t.pendingProps),P(t,n),r=!0):r=A(t,n):r=U(e,t,n),a=!1;var l=t.updateQueue;return null!==l&&null!==l.capturedValues&&(a=r=!0),h(e,t,r,o,a,n);case 3:e:if(m(t),r=t.updateQueue,null!==r){if(a=t.memoizedState,o=fr(e,t,r,null,null,n),t.memoizedState=o,null!==(r=t.updateQueue)&&null!==r.capturedValues)r=null;else{if(a===o){L(),e=y(e,t);break e}r=o.element}a=t.stateNode,(null===e||null===e.child)&&a.hydrate&&I(t)?(t.effectTag|=2,t.child=vr(t,null,r,n)):(L(),u(e,t,r)),t.memoizedState=o,e=t.child}else L(),e=y(e,t);return e;case 5:return C(t),null===e&&_(t),o=t.type,l=t.memoizedProps,r=t.pendingProps,a=null!==e?e.memoizedProps:null,k()||l!==r||((l=1&t.mode&&b(o,r))&&(t.expirationTime=1073741823),l&&1073741823===n)?(l=r.children,v(o,r)?l=null:a&&v(o,a)&&(t.effectTag|=16),d(e,t),1073741823!==n&&1&t.mode&&b(o,r)?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(u(e,t,l),t.memoizedProps=r,e=t.child)):e=y(e,t),e;case 6:return null===e&&_(t),t.memoizedProps=t.pendingProps,null;case 8:t.tag=7;case 7:return o=t.pendingProps,k()||t.memoizedProps!==o||(o=t.memoizedProps),r=o.children,t.stateNode=null===e?vr(t,t.stateNode,r,n):yr(t,e.stateNode,r,n),t.memoizedProps=o,t.stateNode;case 9:return null;case 4:return x(t,t.stateNode.containerInfo),o=t.pendingProps,k()||t.memoizedProps!==o?(null===e?t.child=yr(t,null,o,n):u(e,t,o),t.memoizedProps=o,e=t.child):e=y(e,t),e;case 14:return u(e,t,n=(n=t.type.render)(t.pendingProps,t.ref)),t.memoizedProps=n,t.child;case 10:return n=t.pendingProps,k()||t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 11:return n=t.pendingProps.children,k()||null!==n&&t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,a=t.memoizedProps;if(!k()&&a===o)return t.stateNode=0,T(t),y(e,t);var i=o.value;if(t.memoizedProps=o,null===a)i=1073741823;else if(a.value===o.value){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t);i=0}else{var l=a.value;if(l===i&&(0!==l||1/l==1/i)||l!=l&&i!=i){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t);i=0}else if(i="function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823,0==(i|=0)){if(a.children===o.children)return t.stateNode=0,T(t),y(e,t)}else g(t,r,i,n)}return t.stateNode=i,T(t),u(e,t,o.children),t.child}(e,t,n);case 12:e:{r=t.type,a=t.pendingProps,l=t.memoizedProps,o=r._currentValue;var c=r._changedBits;if(k()||0!==c||l!==a){t.memoizedProps=a;var s=a.unstable_observedBits;if(void 0!==s&&null!==s||(s=1073741823),t.stateNode=s,0!=(c&s))g(t,r,c,n);else if(l===a){e=y(e,t);break e}u(e,t,n=(n=a.children)(o)),e=t.child}else e=y(e,t)}return e;default:p("156")}}}}function Cr(e,t){var n=t.source;null===t.stack&&st(n),null!==n&&ct(n),t=t.value,null!==e&&2===e.tag&&ct(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}var xr={};function Tr(e){function t(){if(null!==ee)for(var e=ee.return;null!==e;)O(e),e=e.return;te=null,ne=0,ee=null,ae=!1}function n(e){return null!==ie&&ie.has(e)}function r(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=_(t,e,ne);var o=e;if(1073741823===ne||1073741823!==o.expirationTime){e:switch(o.tag){case 3:case 2:var a=o.updateQueue;a=null===a?0:a.expirationTime;break e;default:a=0}for(var i=o.child;null!==i;)0!==i.expirationTime&&(0===a||a>i.expirationTime)&&(a=i.expirationTime),i=i.sibling;o.expirationTime=a}if(null!==t)return t;if(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),1he)&&(he=e),e}function s(e,n){e:{for(;null!==e;){if((0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>n)&&(e.alternate.expirationTime=n),null===e.return){if(3!==e.tag){n=void 0;break e}var r=e.stateNode;!J&&0!==ne&&nMe&&p("185")}e=e.return}n=void 0}return n}function d(){return G=B()-q,2+(G/10|0)}function h(e,t,n,r,o){var a=Z;Z=1;try{return e(t,n,r,o)}finally{Z=a}}function m(e){if(0!==ce){if(e>ce)return;Y(se)}var t=B()-q;ce=e,se=W(v,{timeout:10*(e-2)-t})}function g(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ue?(le=ue=e,e.nextScheduledRoot=e):(ue=ue.nextScheduledRoot=e).nextScheduledRoot=le;else{var n=e.remainingExpirationTime;(0===n||t=de)&&(!me||d()>=de);)T(pe,de,!me),y();else for(;null!==pe&&0!==de&&(0===e||e>=de);)T(pe,de,!1),y();null!==ve&&(ce=0,se=-1),0!==de&&m(de),ve=null,me=!1,x()}function x(){if(we=0,null!==Te){var e=Te;Te=null;for(var t=0;tke)&&(me=!0)}function k(e){null===pe&&p("246"),pe.remainingExpirationTime=0,ge||(ge=!0,ye=e)}var S=function(){var e=[],t=-1;return{createCursor:function(e){return{current:e}},isEmpty:function(){return-1===t},pop:function(n){0>t||(n.current=e[t],e[t]=null,t--)},push:function(n,r){e[++t]=n.current,n.current=r},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}}(),E=function(e,t){function n(e){return e===xr&&p("174"),e}var r=e.getChildHostContext,o=e.getRootHostContext;e=t.createCursor;var a=t.push,i=t.pop,l=e(xr),u=e(xr),c=e(xr);return{getHostContext:function(){return n(l.current)},getRootHostContainer:function(){return n(c.current)},popHostContainer:function(e){i(l,e),i(u,e),i(c,e)},popHostContext:function(e){u.current===e&&(i(l,e),i(u,e))},pushHostContainer:function(e,t){a(c,t,e),a(u,e,e),a(l,xr,e),t=o(t),i(l,e),a(l,t,e)},pushHostContext:function(e){var t=n(c.current),o=n(l.current);o!==(t=r(o,e.type,t))&&(a(u,e,e),a(l,t,e))}}}(e,S),N=function(e){function t(e,t,n){(e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function n(e){return 2===e.tag&&null!=e.type.childContextTypes}function r(e,t){var n=e.stateNode,r=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var o in n=n.getChildContext())o in r||p("108",ct(e)||"Unknown",o);return i({},t,n)}var o=e.createCursor,a=e.push,l=e.pop,u=o(f),c=o(!1),s=f;return{getUnmaskedContext:function(e){return n(e)?s:u.current},cacheContext:t,getMaskedContext:function(e,n){var r=e.type.contextTypes;if(!r)return f;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var a,i={};for(a in r)i[a]=n[a];return o&&t(e,n,i),i},hasContextChanged:function(){return c.current},isContextConsumer:function(e){return 2===e.tag&&null!=e.type.contextTypes},isContextProvider:n,popContextProvider:function(e){n(e)&&(l(c,e),l(u,e))},popTopLevelContextObject:function(e){l(c,e),l(u,e)},pushTopLevelContextObject:function(e,t,n){null!=u.cursor&&p("168"),a(u,t,e),a(c,n,e)},processChildContext:r,pushContextProvider:function(e){if(!n(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||f,s=u.current,a(u,t,e),a(c,c.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||p("169"),t){var o=r(e,s);n.__reactInternalMemoizedMergedChildContext=o,l(c,e),l(u,e),a(u,o,e)}else l(c,e);a(c,t,e)},findCurrentUnmaskedContext:function(e){for((2!==$t(e)||2!==e.tag)&&p("170");3!==e.tag;){if(n(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||p("171")}return e.stateNode.context}}}(S);S=function(e){var t=e.createCursor,n=e.push,r=e.pop,o=t(null),a=t(null),i=t(0);return{pushProvider:function(e){var t=e.type._context;n(i,t._changedBits,e),n(a,t._currentValue,e),n(o,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode},popProvider:function(e){var t=i.current,n=a.current;r(o,e),r(a,e),r(i,e),(e=e.type._context)._currentValue=n,e._changedBits=t}}}(S);var I=function(e){function t(e,t){var n=new Kn(5,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 n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=i(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function r(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;f=e}var o=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){p("175")},prepareToHydrateHostTextInstance:function(){p("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,i=e.canHydrateTextInstance,l=e.getNextHydratableSibling,u=e.getFirstHydratableChild,c=e.hydrateInstance,s=e.hydrateTextInstance,f=null,d=null,h=!1;return{enterHydrationState:function(e){return d=u(e.stateNode.containerInfo),f=e,h=!0},resetHydrationState:function(){d=f=null,h=!1},tryToClaimNextHydratableInstance:function(e){if(h){var r=d;if(r){if(!n(e,r)){if(!(r=l(r))||!n(e,r))return e.effectTag|=2,h=!1,void(f=e);t(f,d)}f=e,d=u(r)}else e.effectTag|=2,h=!1,f=e}},prepareToHydrateHostInstance:function(e,t,n){return t=c(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return s(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==f)return!1;if(!h)return r(e),h=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!o(n,e.memoizedProps))for(n=d;n;)t(e,n),n=l(n);return r(e),d=f?l(e.stateNode):null,!0}}}(e),L=br(e,E,N,S,I,s,c).beginWork,_=function(e,t,n,r,o){function a(e){e.effectTag|=4}var i=e.createInstance,l=e.createTextInstance,u=e.appendInitialChild,c=e.finalizeInitialChildren,s=e.prepareUpdate,f=e.persistence,d=t.getRootHostContainer,h=t.popHostContext,m=t.getHostContext,g=t.popHostContainer,y=n.popContextProvider,v=n.popTopLevelContextObject,b=r.popProvider,C=o.prepareToHydrateHostInstance,x=o.prepareToHydrateHostTextInstance,T=o.popHydrationState,M=void 0,w=void 0,k=void 0;return e.mutation?(M=function(){},w=function(e,t,n){(t.updateQueue=n)&&a(t)},k=function(e,t,n,r){n!==r&&a(t)}):p(f?"235":"236"),{completeWork:function(e,t,n){var r=t.pendingProps;switch(t.tag){case 1:return null;case 2:return y(t),e=t.stateNode,null!==(r=t.updateQueue)&&null!==r.capturedValues&&(t.effectTag&=-65,"function"==typeof e.componentDidCatch?t.effectTag|=256:r.capturedValues=null),null;case 3:return g(t),v(t),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(T(t),t.effectTag&=-3),M(t),null!==(e=t.updateQueue)&&null!==e.capturedValues&&(t.effectTag|=256),null;case 5:h(t),n=d();var o=t.type;if(null!==e&&null!=t.stateNode){var f=e.memoizedProps,S=t.stateNode,E=m();S=s(S,o,f,r,n,E),w(e,t,S,o,f,r,n,E),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!r)return null===t.stateNode&&p("166"),null;if(e=m(),T(t))C(t,n,e)&&a(t);else{f=i(o,r,n,e,t);e:for(E=t.child;null!==E;){if(5===E.tag||6===E.tag)u(f,E.stateNode);else if(4!==E.tag&&null!==E.child){E.child.return=E,E=E.child;continue}if(E===t)break;for(;null===E.sibling;){if(null===E.return||E.return===t)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}c(f,o,r,n,e)&&a(t),t.stateNode=f}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)k(e,t,e.memoizedProps,r);else{if("string"!=typeof r)return null===t.stateNode&&p("166"),null;e=d(),n=m(),T(t)?x(t)&&a(t):t.stateNode=l(r,e,n,t)}return null;case 7:(r=t.memoizedProps)||p("165"),t.tag=8,o=[];e:for((f=t.stateNode)&&(f.return=t);null!==f;){if(5===f.tag||6===f.tag||4===f.tag)p("247");else if(9===f.tag)o.push(f.pendingProps.value);else if(null!==f.child){f.child.return=f,f=f.child;continue}for(;null===f.sibling;){if(null===f.return||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}return r=(f=r.handler)(r.props,o),t.child=yr(t,null!==e?e.child:null,r,n),t.child;case 8:return t.tag=7,null;case 9:case 14:case 10:case 11:return null;case 4:return g(t),M(t),null;case 13:return b(t),null;case 12:return null;case 0:p("167");default:p("156")}}}}(e,E,N,S,I).completeWork,j=(E=function(e,t,n,r,o){var a=e.popHostContainer,i=e.popHostContext,l=t.popContextProvider,u=t.popTopLevelContextObject,c=n.popProvider;return{throwException:function(e,t,n){t.effectTag|=512,t.firstEffect=t.lastEffect=null,t={value:n,source:t,stack:st(t)};do{switch(e.tag){case 3:return ur(e),e.updateQueue.capturedValues=[t],void(e.effectTag|=1024);case 2:if(n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&!o(n)){ur(e);var r=(n=e.updateQueue).capturedValues;return null===r?n.capturedValues=[t]:r.push(t),void(e.effectTag|=1024)}}e=e.return}while(null!==e)},unwindWork:function(e){switch(e.tag){case 2:l(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return a(e),u(e),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return i(e),null;case 4:return a(e),null;case 13:return c(e),null;default:return null}},unwindInterruptedWork:function(e){switch(e.tag){case 2:l(e);break;case 3:a(e),u(e);break;case 5:i(e);break;case 4:a(e);break;case 13:c(e)}}}}(E,N,S,0,n)).throwException,D=E.unwindWork,O=E.unwindInterruptedWork,P=(E=function(e,t,n,r,o){function a(e){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){t(e,n)}else n.current=null}function i(e){switch(rr(e),e.tag){case 2:a(e);var n=e.stateNode;if("function"==typeof n.componentWillUnmount)try{n.props=e.memoizedProps,n.state=e.memoizedState,n.componentWillUnmount()}catch(n){t(e,n)}break;case 5:a(e);break;case 7:l(e.stateNode);break;case 4:f&&c(e)}}function l(e){for(var t=e;;)if(i(t),null===t.child||f&&4===t.tag){if(t===e)break;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 u(e){return 5===e.tag||3===e.tag||4===e.tag}function c(e){for(var t=e,n=!1,r=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&p("160"),n.tag){case 5:r=n.stateNode,o=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)l(t),o?T(r,t.stateNode):x(r,t.stateNode);else if(4===t.tag?r=t.stateNode.containerInfo:i(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;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var s=e.getPublicInstance,f=e.mutation;e=e.persistence,f||p(e?"235":"236");var d=f.commitMount,h=f.commitUpdate,m=f.resetTextContent,g=f.commitTextUpdate,y=f.appendChild,v=f.appendChildToContainer,b=f.insertBefore,C=f.insertInContainerBefore,x=f.removeChild,T=f.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(e,t){switch(t.tag){case 2:if(2048&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;(e=t.stateNode).props=t.memoizedProps,e.state=t.memoizedState,t=e.getSnapshotBeforeUpdate(n,r),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:break;default:p("163")}},commitResetTextContent:function(e){m(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(u(t)){var n=t;break e}t=t.return}p("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:p("161")}16&n.effectTag&&(m(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||u(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)n?r?C(t,o.stateNode,n):b(t,o.stateNode,n):r?v(t,o.stateNode):y(t,o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},commitDeletion:function(e){c(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&h(n,a,o,e,r,t)}break;case 6:null===t.stateNode&&p("162"),n=t.memoizedProps,g(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:p("163")}},commitLifeCycles:function(e,t,n){switch(n.tag){case 2:if(e=n.stateNode,4&n.effectTag)if(null===t)e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidMount();else{var r=t.memoizedProps;t=t.memoizedState,e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}null!==(n=n.updateQueue)&&pr(n,e);break;case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=s(n.child.stateNode);break;case 2:e=n.child.stateNode}pr(t,e)}break;case 5:e=n.stateNode,null===t&&4&n.effectTag&&d(e,n.type,n.memoizedProps,n);break;case 6:case 4:break;default:p("163")}},commitErrorLogging:function(e,t){switch(e.tag){case 2:var n=e.type;t=e.stateNode;var r=e.updateQueue;(null===r||null===r.capturedValues)&&p("264");var a=r.capturedValues;for(r.capturedValues=null,"function"!=typeof n.getDerivedStateFromCatch&&o(t),t.props=e.memoizedProps,t.state=e.memoizedState,n=0;n=Pr-e){if(!(-1!==Dr&&Dr<=e))return void(Or||(Or=!0,requestAnimationFrame(Fr)));zr.didTimeout=!0}else zr.didTimeout=!1;Dr=-1,e=_r,_r=null,null!==e&&e(zr)}},!1);var Fr=function(e){Or=!1;var t=e-Pr+Ur;tt&&(t=8),Ur=t=t.length||p("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Yr(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Kr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var $r={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function qr(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 Gr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?qr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Xr=void 0,Zr=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==$r.svg||"innerHTML"in e)e.innerHTML=t;else{for((Xr=Xr||document.createElement("div")).innerHTML=""+t+" ",t=Xr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jr(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 eo={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,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},to=["Webkit","ms","Moz","O"];function no(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,a=t[n];o=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||eo.hasOwnProperty(o)&&eo[o]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(eo).forEach(function(e){to.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),eo[t]=eo[e]})});var ro=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 oo(e,t,n){t&&(ro[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&p("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&p("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||p("61")),null!=t.style&&"object"!=typeof t.style&&p("62",n()))}function ao(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}}var io=l.thatReturns("");function lo(e,t){var n=Pn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=x[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function co(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function so(e,t,n,r){var o=ao(t,n);switch(t){case"iframe":case"object":Cn("topLoad","load",e);var a=n;break;case"video":case"audio":for(a in _n)_n.hasOwnProperty(a)&&Cn(a,_n[a],e);a=n;break;case"source":Cn("topError","error",e),a=n;break;case"img":case"image":case"link":Cn("topError","error",e),Cn("topLoad","load",e),a=n;break;case"form":Cn("topReset","reset",e),Cn("topSubmit","submit",e),a=n;break;case"details":Cn("topToggle","toggle",e),a=n;break;case"input":Ct(e,n),a=bt(e,n),Cn("topInvalid","invalid",e),lo(r,"onChange");break;case"option":a=Hr(e,n);break;case"select":Vr(e,n),a=i({},n,{value:void 0}),Cn("topInvalid","invalid",e),lo(r,"onChange");break;case"textarea":Wr(e,n),a=Br(e,n),Cn("topInvalid","invalid",e),lo(r,"onChange");break;default:a=n}oo(t,a,io);var u,c=a;for(u in c)if(c.hasOwnProperty(u)){var s=c[u];"style"===u?no(e,s):"dangerouslySetInnerHTML"===u?null!=(s=s?s.__html:void 0)&&Zr(e,s):"children"===u?"string"==typeof s?("textarea"!==t||""!==s)&&Jr(e,s):"number"==typeof s&&Jr(e,""+s):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(C.hasOwnProperty(u)?null!=s&&lo(r,u):null!=s&&vt(e,u,s,o))}switch(t){case"input":Ke(e),Mt(e,n);break;case"textarea":Ke(e),Kr(e);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,null!=(t=n.value)?Qr(e,!!n.multiple,t,!1):null!=n.defaultValue&&Qr(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=l)}}function fo(e,t,n,r,o){var a=null;switch(t){case"input":n=bt(e,n),r=bt(e,r),a=[];break;case"option":n=Hr(e,n),r=Hr(e,r),a=[];break;case"select":n=i({},n,{value:void 0}),r=i({},r,{value:void 0}),a=[];break;case"textarea":n=Br(e,n),r=Br(e,r),a=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=l)}oo(t,r,io),t=e=void 0;var u=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var c=n[e];for(t in c)c.hasOwnProperty(t)&&(u||(u={}),u[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(C.hasOwnProperty(e)?a||(a=[]):(a=a||[]).push(e,null));for(e in r){var s=r[e];if(c=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&s!==c&&(null!=s||null!=c))if("style"===e)if(c){for(t in c)!c.hasOwnProperty(t)||s&&s.hasOwnProperty(t)||(u||(u={}),u[t]="");for(t in s)s.hasOwnProperty(t)&&c[t]!==s[t]&&(u||(u={}),u[t]=s[t])}else u||(a||(a=[]),a.push(e,u)),u=s;else"dangerouslySetInnerHTML"===e?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(a=a||[]).push(e,""+s)):"children"===e?c===s||"string"!=typeof s&&"number"!=typeof s||(a=a||[]).push(e,""+s):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(C.hasOwnProperty(e)?(null!=s&&lo(o,e),a||c===s||(a=[])):(a=a||[]).push(e,s))}return u&&(a=a||[]).push("style",u),a}function po(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&xt(e,o),ao(n,r),r=ao(n,o);for(var a=0;ar&&(o=r,r=e,e=o),o=Un(n,e);var a=Un(n,r);if(o&&a&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)){var i=document.createRange();i.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(i),t.extend(a.node,a.offset)):(i.setEnd(a.node,a.offset),t.addRange(i))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(n.focus(),n=0;n
Date: Mon, 26 Nov 2018 14:20:09 -0800
Subject: [PATCH 04/11] Mostly finished with tab bar accessibility.
---
.../app/client/src/ui/shell/mdi/tab/tab.scss | 17 +++++-
.../client/src/ui/shell/mdi/tab/tab.scss.d.ts | 3 +-
.../app/client/src/ui/shell/mdi/tab/tab.tsx | 55 ++++++++++---------
.../src/ui/shell/multiTabs/tabBar/tabBar.scss | 39 +------------
.../shell/multiTabs/tabBar/tabBar.scss.d.ts | 1 +
.../src/ui/shell/multiTabs/tabBar/tabBar.tsx | 2 +-
.../app/client/src/ui/styles/themes/dark.css | 3 +-
.../src/ui/styles/themes/high-contrast.css | 3 +-
.../app/client/src/ui/styles/themes/light.css | 3 +-
9 files changed, 57 insertions(+), 69 deletions(-)
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.scss b/packages/app/client/src/ui/shell/mdi/tab/tab.scss
index 4b079c69b..c690da9b5 100644
--- a/packages/app/client/src/ui/shell/mdi/tab/tab.scss
+++ b/packages/app/client/src/ui/shell/mdi/tab/tab.scss
@@ -9,6 +9,7 @@
box-sizing: border-box;
white-space: nowrap;
position: relative;
+ max-width: 200px;
&::after {
content: '';
@@ -94,12 +95,26 @@
& > .editor-tab-close {
opacity: 1;
}
+
+ /** Should only be visible on high contrast */
+ &::after {
+ border: var(--tab-active-tab-inner-border);
+ }
}
-.test-tab {
+.tab-focus-target {
position: absolute;
top: 1px;
left: 1px;
right: 1px;
bottom: 1px;
}
+
+.tab-separator {
+ position: absolute;
+ width: 1px;
+ top: 0;
+ bottom: 0;
+ right: 0;
+ background-color: var(--tab-separator-bg);
+}
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.scss.d.ts b/packages/app/client/src/ui/shell/mdi/tab/tab.scss.d.ts
index 9d5b9b72a..d935c9586 100644
--- a/packages/app/client/src/ui/shell/mdi/tab/tab.scss.d.ts
+++ b/packages/app/client/src/ui/shell/mdi/tab/tab.scss.d.ts
@@ -5,4 +5,5 @@ export const editorTabClose: string;
export const truncatedTabText: string;
export const draggedOverEditorTab: string;
export const activeEditorTab: string;
-export const testTab: string;
+export const tabFocusTarget: string;
+export const tabSeparator: string;
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
index 9341e793f..9cba8412e 100644
--- a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
+++ b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
@@ -68,27 +68,6 @@ class TabComponent extends React.Component {
const activeClassName = this.props.active ? styles.activeEditorTab : '';
const draggedOverClassName = this.state.draggedOver ? styles.draggedOverEditorTab : '';
- // return (
- //
- //
- //
- //
{ this.props.label }
- // { this.props.dirty ?
* : null }
- //
- //
- //
- //
- // );
-
return (
{
{ this.props.label }
{ this.props.dirty ?
* : null }
-
+
+
-
+
);
+
+ // return (
+ //
+ //
+ //
{ this.props.label }
+ // { this.props.dirty ?
* : null }
+ //
+ //
+ //
+ //
+ // );
}
- private onCloseButtonKeyPress = (event: any, _meow?: KeyboardEvent) => {
+ private onCloseButtonKeyPress = (event: any, _meow?: KeyboardEvent) => {
if (event.key === ' ' || event.keyCode === 13) {
this.props.onCloseClick(this.props.documentId);
}
}
- private onCloseClick = (event: SyntheticEvent): void => {
+ private onCloseClick = (event: SyntheticEvent): void => {
event.stopPropagation();
this.props.onCloseClick(this.props.documentId);
}
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
index ea19e0758..f048e67f6 100644
--- a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
+++ b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
@@ -8,13 +8,11 @@
background-color: var(--tab-active-tab-bg);
}
- & > ul {
+ & > .tab-bar-tabs {
display: flex;
- background-color: var(--neutral-15);
- list-style-type: none;
- margin: 0;
- padding: 0;
+ flex-flow: row nowrap;
overflow-x: auto;
+ overflow-y: hidden;
&::-webkit-scrollbar {
height: 2px;
@@ -27,37 +25,6 @@
&::-webkit-scrollbar-track {
background: transparent;
}
-
- li {
- > button:focus {
- position: relative;
-
- &::before {
- content: '';
- border: var(--tab-focus-border);
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- clip-path: var(--border-window-clip-path);
- }
- }
-
- + li {
- position: relative;
- padding-left: 1px;
-
- &::after {
- content: '';
- position: absolute;
- height: 100%;
- width: 1px;
- left: 0;
- background: var(--tab-seperator-bg);
- }
- }
- }
}
& > div.tab-bar-widgets {
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss.d.ts b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss.d.ts
index c11dcbcc7..55d10e122 100644
--- a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss.d.ts
+++ b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss.d.ts
@@ -1,6 +1,7 @@
// This is a generated file. Changes are likely to result in being overwritten
export const tabBar: string;
export const draggedOver: string;
+export const tabBarTabs: string;
export const tabBarWidgets: string;
export const widget: string;
export const splitWidget: string;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx
index 7779a07ce..553ef6a0a 100644
--- a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx
+++ b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx
@@ -100,7 +100,7 @@ class TabBarComponent extends React.Component {
onDragOver={ this.onDragOver }
onDragLeave={ this.onDragLeave }
onDrop={ this.onDrop }>
-
+
{ this.props.children }
diff --git a/packages/app/client/src/ui/styles/themes/dark.css b/packages/app/client/src/ui/styles/themes/dark.css
index 7d5e97ced..87078649c 100644
--- a/packages/app/client/src/ui/styles/themes/dark.css
+++ b/packages/app/client/src/ui/styles/themes/dark.css
@@ -118,9 +118,10 @@ html {
--tab-bg: var(--neutral-13);
--tab-border: 1px solid transparent;
--tab-hover-border: 1px solid transparent;
+ --tab-active-tab-inner-border: 1px solid transparent;
--tab-active-tab-bg: var(--neutral-15);
--tab-focus-border: var(--p-button-border-focus);
- --tab-seperator-bg: var(--neutral-11);
+ --tab-separator-bg: var(--neutral-11);
--tab-icon-color: var(--explorer-panel-group-title-color);
--tab-icon-hover-color: var(--neutral-6);
diff --git a/packages/app/client/src/ui/styles/themes/high-contrast.css b/packages/app/client/src/ui/styles/themes/high-contrast.css
index 37a24b650..87808b55c 100644
--- a/packages/app/client/src/ui/styles/themes/high-contrast.css
+++ b/packages/app/client/src/ui/styles/themes/high-contrast.css
@@ -117,9 +117,10 @@ html {
--tab-bg: var(--neutral-16);
--tab-border: 1px solid transparent;
--tab-hover-border: var(--list-item-hover-border);
+ --tab-active-tab-inner-border: 1px solid #F38518;
--tab-active-tab-bg: var(--neutral-16);
--tab-focus-border: var(--p-button-border-focus);
- --tab-seperator-bg: #72C3DF;
+ --tab-separator-bg: #72C3DF;
--tab-icon-color: var(--explorer-panel-group-title-color);
--tab-icon-hover-color: var(--neutral-4);
diff --git a/packages/app/client/src/ui/styles/themes/light.css b/packages/app/client/src/ui/styles/themes/light.css
index 07a070e8e..27283eeab 100644
--- a/packages/app/client/src/ui/styles/themes/light.css
+++ b/packages/app/client/src/ui/styles/themes/light.css
@@ -118,9 +118,10 @@ html {
--tab-bg: var(--neutral-2);
--tab-border: 1px solid transparent;
--tab-hover-border: 1px solid transparent;
+ --tab-active-tab-inner-border: 1px solid transparent;
--tab-active-tab-bg: var(--neutral-1);
--tab-focus-border: var(--p-button-border-focus);
- --tab-seperator-bg: var(--neutral-4);
+ --tab-separator-bg: var(--neutral-4);
--tab-icon-color: var(--explorer-panel-group-title-color);
--tab-icon-hover-color: var(--neutral-15);
From 53c7038a5647d68f5b5822bd43acd4924e5e24b9 Mon Sep 17 00:00:00 2001
From: Tony Anziano
Date: Mon, 26 Nov 2018 15:39:23 -0800
Subject: [PATCH 05/11] Removed some commented out code.
---
.../app/client/src/ui/shell/mdi/tab/tab.tsx | 21 +------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
index 9cba8412e..41a642362 100644
--- a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
+++ b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
@@ -89,28 +89,9 @@ class TabComponent extends React.Component {
);
-
- // return (
- //
- //
- //
{ this.props.label }
- // { this.props.dirty ?
* : null }
- //
- //
- //
- //
- // );
}
- private onCloseButtonKeyPress = (event: any, _meow?: KeyboardEvent
) => {
+ private onCloseButtonKeyPress = (event: KeyboardEvent) => {
if (event.key === ' ' || event.keyCode === 13) {
this.props.onCloseClick(this.props.documentId);
}
From 06942e2433276792ae513218e9e4d63d2de048ba Mon Sep 17 00:00:00 2001
From: Tony Anziano
Date: Tue, 27 Nov 2018 10:58:46 -0800
Subject: [PATCH 06/11] Significant refactor of MDI / tabbedDocument.
---
.../src/ui/shell/mdi/documents/documents.tsx | 78 +++++
packages/app/client/src/ui/shell/mdi/mdi.scss | 7 +
.../app/client/src/ui/shell/mdi/mdi.scss.d.ts | 2 +
.../app/client/src/ui/shell/mdi/mdi.spec.tsx | 8 +-
packages/app/client/src/ui/shell/mdi/mdi.tsx | 82 +----
.../client/src/ui/shell/mdi/mdiContainer.ts | 32 +-
.../src/ui/shell/mdi/tabBar/tabBar.scss | 87 ++++++
.../src/ui/shell/mdi/tabBar/tabBar.scss.d.ts | 8 +
.../client/src/ui/shell/mdi/tabBar/tabBar.tsx | 291 ++++++++++++++++++
.../ui/shell/mdi/tabBar/tabBarContainer.ts | 70 +++++
.../contentOverlay/contentOverlay.scss | 6 +
.../contentOverlay/contentOverlay.scss.d.ts | 2 +
.../contentOverlay/contentOverlay.tsx | 124 ++++++++
.../contentWrapper/contentWrapper.scss | 6 +
.../contentWrapper/contentWrapper.scss.d.ts | 2 +
.../contentWrapper/contentWrapper.tsx | 121 ++++++++
.../src/ui/shell/mdi/tabbedDocument/index.ts | 38 +++
.../leftContentOverlay.scss | 6 +
.../leftContentOverlay.scss.d.ts | 2 +
.../leftContentOverlay/leftContentOverlay.tsx | 103 +++++++
.../ui/shell/mdi/tabbedDocument/overlay.scss | 13 +
.../mdi/tabbedDocument/overlay.scss.d.ts | 4 +
.../rightContentOverlay.scss | 6 +
.../rightContentOverlay.scss.d.ts | 2 +
.../rightContentOverlay.tsx | 111 +++++++
.../mdi/tabbedDocument/tabbedDocument.tsx | 69 +++++
26 files changed, 1175 insertions(+), 105 deletions(-)
create mode 100644 packages/app/client/src/ui/shell/mdi/documents/documents.tsx
create mode 100644 packages/app/client/src/ui/shell/mdi/mdi.scss
create mode 100644 packages/app/client/src/ui/shell/mdi/mdi.scss.d.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabBar/tabBar.scss
create mode 100644 packages/app/client/src/ui/shell/mdi/tabBar/tabBar.scss.d.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
create mode 100644 packages/app/client/src/ui/shell/mdi/tabBar/tabBarContainer.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.scss
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.scss.d.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.tsx
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.scss
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.scss.d.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.tsx
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/index.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.scss
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.scss.d.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.tsx
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/overlay.scss
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/overlay.scss.d.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.scss
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.scss.d.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.tsx
create mode 100644 packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
diff --git a/packages/app/client/src/ui/shell/mdi/documents/documents.tsx b/packages/app/client/src/ui/shell/mdi/documents/documents.tsx
new file mode 100644
index 000000000..bb90c0f3b
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/documents/documents.tsx
@@ -0,0 +1,78 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { connect } from 'react-redux';
+import { RootState } from '../../../../data/store';
+import { TabbedDocument } from '../tabbedDocument';
+import { EditorFactory } from '../../../editor';
+
+export interface DocumentsProps {
+ activeDocumentId?: string;
+ documents?: any; // TODO: import document shape from reducer
+ owningEditor?: string;
+ tabOrder?: string[];
+}
+
+// TODO: Factor into container / dumb comp
+export class DocumentsComp extends React.Component {
+ constructor(props: DocumentsProps) {
+ super(props);
+ }
+
+ public render(): JSX.Element[] {
+ const { activeDocumentId = '', tabOrder = [], documents = {} } = this.props;
+
+ return tabOrder.map(documentId => {
+ const isActive = activeDocumentId === documentId;
+ const document = documents[documentId];
+
+ return (
+
+
+
+ );
+ });
+ }
+}
+
+function mapStateToProps(state: RootState, ownProps: DocumentsProps): DocumentsProps {
+ return {
+ activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
+ documents: state.editor.editors[ownProps.owningEditor].documents,
+ tabOrder: state.editor.editors[ownProps.owningEditor].tabOrder,
+ ...ownProps
+ };
+}
+
+export const Documents = connect(mapStateToProps, null)(DocumentsComp);
diff --git a/packages/app/client/src/ui/shell/mdi/mdi.scss b/packages/app/client/src/ui/shell/mdi/mdi.scss
new file mode 100644
index 000000000..f940e35b9
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/mdi.scss
@@ -0,0 +1,7 @@
+.mdi {
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ height: 100%;
+ box-sizing: border-box;
+}
\ No newline at end of file
diff --git a/packages/app/client/src/ui/shell/mdi/mdi.scss.d.ts b/packages/app/client/src/ui/shell/mdi/mdi.scss.d.ts
new file mode 100644
index 000000000..6f1e3472a
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/mdi.scss.d.ts
@@ -0,0 +1,2 @@
+// This is a generated file. Changes are likely to result in being overwritten
+export const mdi: string;
diff --git a/packages/app/client/src/ui/shell/mdi/mdi.spec.tsx b/packages/app/client/src/ui/shell/mdi/mdi.spec.tsx
index dbb4f7f3d..a270cfec7 100644
--- a/packages/app/client/src/ui/shell/mdi/mdi.spec.tsx
+++ b/packages/app/client/src/ui/shell/mdi/mdi.spec.tsx
@@ -18,7 +18,7 @@ import { chat } from '../../../data/reducer/chat';
import { editor } from '../../../data/reducer/editor';
import { presentation } from '../../../data/reducer/presentation';
import { MDIComponent } from './mdi';
-import { MDI, MDIProps } from './mdiContainer';
+import { MDI } from './mdiContainer';
jest.mock('../../dialogs', () => ({
DialogService: {
@@ -95,12 +95,6 @@ describe('The ServicesExplorer component should', () => {
expect(parent.find(MDIComponent)).not.toBe(null);
});
- it('should contain the expected function in the props', () => {
- const { props }: { props: MDIProps } = node.instance();
- expect(typeof props.closeTab).toBe('function');
- expect(typeof props.setActiveTab).toBe('function');
- });
-
it('should get the expected tab label for each of the content types', () => {
const instance = node.instance();
const liveChatLabel = instance.getTabLabel({ contentType: CONTENT_TYPE_LIVE_CHAT, documentId: 'mockbot' });
diff --git a/packages/app/client/src/ui/shell/mdi/mdi.tsx b/packages/app/client/src/ui/shell/mdi/mdi.tsx
index 89389dd21..52e650e37 100644
--- a/packages/app/client/src/ui/shell/mdi/mdi.tsx
+++ b/packages/app/client/src/ui/shell/mdi/mdi.tsx
@@ -32,81 +32,23 @@
//
import * as React from 'react';
-import {
- CONTENT_TYPE_APP_SETTINGS,
- CONTENT_TYPE_LIVE_CHAT,
- CONTENT_TYPE_TRANSCRIPT,
- CONTENT_TYPE_WELCOME_PAGE
-} from '../../../constants';
-import { Document } from '../../../data/reducer/editor';
-import { EditorFactory } from '../../editor';
-import { Content as TabbedDocumentContent, MultiTabs, Tab as TabbedDocumentTab, TabbedDocument } from '../multiTabs';
import { MDIProps } from './mdiContainer';
-import { Tab } from './tab/tab';
+import { TabBarContainer } from './tabBar/tabBarContainer';
+import * as styles from './mdi.scss';
+import { Documents } from './documents/documents';
export class MDIComponent extends React.Component {
-
- render() {
- const activeIndex = this.props.tabOrder.findIndex(documentId => documentId === this.props.activeDocumentId);
- return (
-
- {
- this.props.tabOrder.map(documentId => {
- const document = this.props.documents[documentId];
- const isActive = documentId === this.props.activeDocumentId;
- return (
-
-
-
-
-
-
-
-
- );
- })
- }
-
- );
+ constructor(props: MDIProps) {
+ super(props);
}
- private handleTabChange = (tabValue) => {
- this.props.setActiveTab(this.props.tabOrder[tabValue]);
- }
-
- private getTabLabel(document: Document): string {
- switch (document.contentType) {
- case CONTENT_TYPE_APP_SETTINGS:
- return 'Emulator Settings';
-
- case CONTENT_TYPE_WELCOME_PAGE:
- return 'Welcome';
+ public render(): React.ReactNode {
- case CONTENT_TYPE_TRANSCRIPT:
- return document.fileName || 'Transcript';
-
- case CONTENT_TYPE_LIVE_CHAT:
- let label = 'Live Chat';
- const { services = [] } = this.props.activeBot || {};
- const { endpointId = null } = this.props.chats[document.documentId] || {};
- const botEndpoint = services.find(s => s.id === endpointId);
-
- if (botEndpoint) {
- label += ` (${ botEndpoint.name })`;
- }
- return label;
-
- default:
- return '';
- }
+ return (
+
+
+
+
+ );
}
}
diff --git a/packages/app/client/src/ui/shell/mdi/mdiContainer.ts b/packages/app/client/src/ui/shell/mdi/mdiContainer.ts
index b8eb53422..44d43ded3 100644
--- a/packages/app/client/src/ui/shell/mdi/mdiContainer.ts
+++ b/packages/app/client/src/ui/shell/mdi/mdiContainer.ts
@@ -1,39 +1,15 @@
-import { BotConfigWithPath } from '@bfemulator/sdk-shared';
import { connect } from 'react-redux';
-import { closeDocument } from '../../../data/action/chatActions';
-import { close, setActiveTab } from '../../../data/action/editorActions';
-import { getTabGroupForDocument } from '../../../data/editorHelpers';
-import { Document } from '../../../data/reducer/editor';
import { RootState } from '../../../data/store';
import { MDIComponent } from './mdi';
export interface MDIProps {
- activeBot?: BotConfigWithPath;
- activeDocumentId?: string;
- activeEditor?: string;
- chats?: { [chatId: string]: any };
- documents?: { [documentId: string]: Document };
- tabOrder?: string[];
owningEditor?: string;
- setActiveTab?: (tab: string) => void;
- closeTab?: (documentId: string) => void;
+ presentationModeEnabled?: boolean;
}
const mapStateToProps = (state: RootState, ownProps: MDIProps): MDIProps => ({
- activeBot: state.bot.activeBot,
- activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
- activeEditor: state.editor.activeEditor,
- chats: state.chat.chats,
- documents: state.editor.editors[ownProps.owningEditor].documents,
- tabOrder: state.editor.editors[ownProps.owningEditor].tabOrder,
+ ...ownProps,
+ presentationModeEnabled: state.presentation.enabled
});
-const mapDispatchToProps = (dispatch): MDIProps => ({
- setActiveTab: (tab: string) => dispatch(setActiveTab(tab)),
- closeTab: (documentId: string) => {
- dispatch(close(getTabGroupForDocument(documentId), documentId));
- dispatch(closeDocument(documentId));
- }
-});
-
-export const MDI = connect(mapStateToProps, mapDispatchToProps)(MDIComponent);
+export const MDI = connect(mapStateToProps, null)(MDIComponent);
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.scss b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.scss
new file mode 100644
index 000000000..f048e67f6
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.scss
@@ -0,0 +1,87 @@
+.tab-bar {
+ display: flex;
+ background-color: var(--tab-bar-bg);
+ color: var(--input-label-color);
+ min-height: 32px;
+
+ &.dragged-over {
+ background-color: var(--tab-active-tab-bg);
+ }
+
+ & > .tab-bar-tabs {
+ display: flex;
+ flex-flow: row nowrap;
+ overflow-x: auto;
+ overflow-y: hidden;
+
+ &::-webkit-scrollbar {
+ height: 2px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: var(--neutral-10);
+ }
+
+ &::-webkit-scrollbar-track {
+ background: transparent;
+ }
+ }
+
+ & > div.tab-bar-widgets {
+ display: flex;
+ align-items: center;
+ width: auto;
+ margin-left: auto;
+ flex-shrink: 0;
+
+ & > span {
+ display: inline-block;
+ cursor: pointer;
+ height: 16px;
+ margin-right: 12px;
+ font-size: 12px;
+
+ :first-of-type {
+ margin-left: 12px;
+ }
+ }
+
+ button {
+ height: 25px;
+ width: auto;
+ background-color: transparent;
+ border: 1px solid transparent;
+ }
+
+ .widget {
+ background-size: 16px;
+ border: 1px solid transparent;
+ box-sizing: border-box;
+ height: 22px;
+ padding: 5px;
+ width: 22px;
+
+ &:hover {
+ border: 1px solid transparent;
+ cursor: pointer;
+ }
+ }
+
+ .split-widget, .presentation-widget {
+ background: var(--tab-icon-color);
+ -webkit-mask-size: 22px;
+
+ &:hover {
+ background: var(--tab-icon-hover-color);
+ }
+ }
+
+ .split-widget {
+ -webkit-mask: url("../../../media/ic_split.svg") no-repeat 50% 50%;
+ }
+
+ .presentation-widget {
+ -webkit-mask: url("../../../media/ic_presentation.svg") no-repeat 50% 50%;
+ }
+ }
+}
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.scss.d.ts b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.scss.d.ts
new file mode 100644
index 000000000..55d10e122
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.scss.d.ts
@@ -0,0 +1,8 @@
+// This is a generated file. Changes are likely to result in being overwritten
+export const tabBar: string;
+export const draggedOver: string;
+export const tabBarTabs: string;
+export const tabBarWidgets: string;
+export const widget: string;
+export const splitWidget: string;
+export const presentationWidget: string;
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
new file mode 100644
index 000000000..9d9281a2d
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
@@ -0,0 +1,291 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { DragEvent } from 'react';
+import * as styles from './tabBar.scss';
+// import { connect } from 'react-redux';
+// import * as EditorActions from '../../../../data/action/editorActions';
+import * as Constants from '../../../../constants';
+import { getOtherTabGroup } from '../../../../data/editorHelpers';
+// import * as PresentationActions from '../../../../data/action/presentationActions';
+import { Document, Editor } from '../../../../data/reducer/editor';
+// import { RootState } from '../../../../data/store';
+import {
+ CONTENT_TYPE_APP_SETTINGS,
+ CONTENT_TYPE_LIVE_CHAT,
+ CONTENT_TYPE_TRANSCRIPT,
+ CONTENT_TYPE_WELCOME_PAGE
+} from '../../../../constants';
+import { BotConfigWithPath } from '@bfemulator/sdk-shared';
+import { Tab } from '../tab/tab';
+
+export interface TabBarProps {
+ editors?: { [editorKey: string]: Editor };
+ owningEditor?: string;
+ documents?: { [documentId: string]: Document };
+ activeDocumentId?: string;
+ childRefs?: HTMLElement[];
+ activeEditor?: string;
+ tabOrder?: string[];
+ chats?: { [chatId: string]: any };
+ activeBot?: BotConfigWithPath;
+ splitTab?: (contentType: string, documentId: string, srcEditorKey: string, destEditorKey: string) => void;
+ appendTab?: (srcEditorKey: string, destEditorKey: string, tabId: string) => void;
+ enablePresentationMode?: () => void;
+ setActiveTab?: (documentId: string) => void;
+ closeTab?: (documentId: string) => void;
+}
+
+export interface TabBarState {
+ draggedOver: boolean;
+}
+
+export class TabBar extends React.Component {
+ private readonly childRefs: HTMLElement[] = [];
+ private _scrollable: HTMLElement;
+ private activeIndex: number;
+
+ constructor(props: TabBarProps) {
+ super(props);
+
+ const activeIndex = props.tabOrder.findIndex(docId => docId === props.activeDocumentId);
+ this.activeIndex = activeIndex === -1 ? 0 : activeIndex;
+
+ this.state = {
+ draggedOver: false
+ };
+ }
+
+ public componentDidUpdate(prevProps: TabBarProps) {
+ let scrollable = this._scrollable;
+ const activeIndex = this.props.tabOrder.findIndex(docId => docId === this.props.activeDocumentId);
+ this.activeIndex = activeIndex === -1 ? 0 : activeIndex;
+
+ if (scrollable) {
+ if (this.props.tabOrder.length > prevProps.tabOrder.length &&
+ scrollable.scrollWidth > scrollable.clientWidth) {
+ let leftOffset = 0;
+ for (let i = 0; i <= this.activeIndex; i++) {
+ const ref = this.childRefs[i];
+ leftOffset += ref ? this.childRefs[i].offsetWidth : 0;
+ }
+ if (leftOffset >= scrollable.clientWidth) {
+ scrollable.scrollLeft = leftOffset;
+ }
+ }
+ }
+ }
+
+ public render() {
+ const tabBarClassName = this.state.draggedOver ? styles.draggedOver : '';
+ return (
+
+
+ { this.tabs }
+
+
+ { this.widgets }
+
+
+ );
+ }
+
+ private onPresentationModeClick = () => this.props.enablePresentationMode();
+
+ private get widgets(): JSX.Element[] {
+ const activeDoc = this.props.documents[this.props.activeDocumentId];
+ const presentationEnabled = activeDoc
+ && (activeDoc.contentType === Constants.CONTENT_TYPE_TRANSCRIPT ||
+ activeDoc.contentType === Constants.CONTENT_TYPE_LIVE_CHAT);
+ const splitEnabled = Object.keys(this.props.documents).length > 1;
+
+ let widgets: JSX.Element[] = [];
+
+ if (presentationEnabled) {
+ widgets.push(
+ this.onPresentationModeClick() }
+ >
+
+
+
+
+ );
+ }
+ if (splitEnabled) {
+ widgets.push(
+
+
+
+
+ );
+ }
+ return widgets;
+ }
+
+ private get tabs(): JSX.Element[] {
+ return this.props.tabOrder.map((documentId, index) => {
+ const document = this.props.documents[documentId];
+ const isActive = documentId === this.props.activeDocumentId;
+
+ return (
+ this.handleTabClick(index) }
+ onKeyDown={ ev => this.handleKeyDown(ev, index) }
+ ref={ this.setRef } role="presentation">
+
+
+ );
+ });
+ }
+
+ private handleTabClick = (tabIndex: number) => {
+ this.props.setActiveTab(this.props.tabOrder[tabIndex]);
+ }
+
+ private handleKeyDown = (event: React.KeyboardEvent, tabIndex: number): void => {
+ let { key = '' } = event;
+ key = key.toLowerCase();
+ if (key === ' ' || key === 'enter') {
+ this.handleTabClick(tabIndex);
+ }
+ }
+
+ private onSplitClick = () => {
+ const owningEditor = this.props.editors[this.props.owningEditor];
+ const docIdToSplit = owningEditor.activeDocumentId;
+ const docToSplit = owningEditor.documents[docIdToSplit];
+ const destEditorKey = getOtherTabGroup(this.props.owningEditor);
+ this.props.splitTab(docToSplit.contentType, docToSplit.documentId, this.props.owningEditor, destEditorKey);
+ }
+
+ private onDragEnter = (e: DragEvent) => {
+ e.preventDefault();
+ }
+
+ private onDragOver = (e: DragEvent) => {
+ this.setState(({ draggedOver: true }));
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ private onDragLeave = (_e: DragEvent) => {
+ this.setState(({ draggedOver: false }));
+ }
+
+ private onDrop = (e: DragEvent) => {
+ e.preventDefault();
+ e.stopPropagation();
+ this.setState(({ draggedOver: false }));
+ try {
+ const tabData = JSON.parse(e.dataTransfer.getData('application/json'));
+ const tabId = tabData.tabId;
+ this.props.appendTab(tabData.editorKey, this.props.owningEditor, tabId);
+ } catch {
+ // Do nothing
+ }
+ }
+
+ private saveScrollable = (ref) => {
+ this._scrollable = ref;
+ }
+
+ private setRef = (tabRef: HTMLElement) => {
+ this.childRefs.push(tabRef);
+ }
+
+ private getTabLabel(document: Document): string {
+ switch (document.contentType) {
+ case CONTENT_TYPE_APP_SETTINGS:
+ return 'Emulator Settings';
+
+ case CONTENT_TYPE_WELCOME_PAGE:
+ return 'Welcome';
+
+ case CONTENT_TYPE_TRANSCRIPT:
+ return document.fileName || 'Transcript';
+
+ case CONTENT_TYPE_LIVE_CHAT:
+ let label = 'Live Chat';
+ const { services = [] } = this.props.activeBot || {};
+ const { endpointId = null } = this.props.chats[document.documentId] || {};
+ const botEndpoint = services.find(s => s.id === endpointId);
+
+ if (botEndpoint) {
+ label += ` (${ botEndpoint.name })`;
+ }
+ return label;
+
+ default:
+ return '';
+ }
+ }
+}
+
+// const mapStateToProps = (state: RootState, ownProps: TabBarProps): TabBarProps => ({
+// activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
+// activeEditor: state.editor.activeEditor,
+// editors: state.editor.editors,
+// documents: state.editor.editors[ownProps.owningEditor].documents
+// });
+
+// const mapDispatchToProps = (dispatch): TabBarProps => ({
+// splitTab: (contentType: string, documentId: string, srcEditorKey: string, destEditorKey: string) =>
+// dispatch(EditorActions.splitTab(contentType, documentId, srcEditorKey, destEditorKey)),
+
+// appendTab: (srcEditorKey: string, destEditorKey: string, tabId: string) =>
+// dispatch(EditorActions.appendTab(srcEditorKey, destEditorKey, tabId)),
+
+// enablePresentationMode: () => dispatch(PresentationActions.enable())
+// });
+
+// export const TabBar = connect(mapStateToProps, mapDispatchToProps)(TabBarComponent);
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/tabBarContainer.ts b/packages/app/client/src/ui/shell/mdi/tabBar/tabBarContainer.ts
new file mode 100644
index 000000000..0ce5aaa75
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/tabBarContainer.ts
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import { connect } from 'react-redux';
+import { TabBarProps, TabBar } from './tabBar';
+import { RootState } from 'src/data/store';
+import { splitTab, appendTab, setActiveTab, close } from '../../../../data/action/editorActions';
+import { enable as enablePresentationMode } from '../../../../data/action/presentationActions';
+import { closeDocument } from '../../../../data/action/chatActions';
+import { getTabGroupForDocument } from '../../../../data/editorHelpers';
+
+const mapStateToProps = (state: RootState, ownProps: TabBarProps): TabBarProps => ({
+ ...ownProps,
+ activeBot: state.bot.activeBot,
+ activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
+ activeEditor: state.editor.activeEditor,
+ chats: state.chat.chats,
+ editors: state.editor.editors,
+ documents: state.editor.editors[ownProps.owningEditor].documents,
+ tabOrder: state.editor.editors[ownProps.owningEditor].tabOrder,
+});
+
+const mapDispatchToProps = (dispatch): TabBarProps => ({
+ splitTab: (contentType: string, documentId: string, srcEditorKey: string, destEditorKey: string) =>
+ dispatch(splitTab(contentType, documentId, srcEditorKey, destEditorKey)),
+
+ appendTab: (srcEditorKey: string, destEditorKey: string, tabId: string) =>
+ dispatch(appendTab(srcEditorKey, destEditorKey, tabId)),
+
+ enablePresentationMode: () => dispatch(enablePresentationMode()),
+
+ setActiveTab: (documentId: string) => dispatch(setActiveTab(documentId)),
+
+ closeTab: (documentId: string) => {
+ dispatch(close(getTabGroupForDocument(documentId), documentId));
+ dispatch(closeDocument(documentId));
+ }
+});
+
+export const TabBarContainer = connect(mapStateToProps, mapDispatchToProps)(TabBar);
\ No newline at end of file
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.scss b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.scss
new file mode 100644
index 000000000..6365dad57
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.scss
@@ -0,0 +1,6 @@
+.content-overlay {
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.scss.d.ts b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.scss.d.ts
new file mode 100644
index 000000000..8be5423a5
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.scss.d.ts
@@ -0,0 +1,2 @@
+// This is a generated file. Changes are likely to result in being overwritten
+export const contentOverlay: string;
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.tsx b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.tsx
new file mode 100644
index 000000000..2a72ff68e
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentOverlay/contentOverlay.tsx
@@ -0,0 +1,124 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { DragEvent } from 'react';
+import { connect } from 'react-redux';
+import * as styles from './contentOverlay.scss';
+import * as overlay from '../overlay.scss';
+
+import * as EditorActions from '../../../../../data/action/editorActions';
+import { getTabGroupForDocument } from '../../../../../data/editorHelpers';
+import { RootState } from '../../../../../data/store';
+
+interface ContentOverlayProps {
+ documentId?: string;
+ draggingTab?: boolean;
+ appendTab?: (editorKey: string, owningEditor: string, tabId: string) => void;
+}
+
+interface ContentOverlayState {
+ draggedOver: boolean;
+ owningEditor: string;
+}
+
+class ContentOverlayComponent extends React.Component {
+ constructor(props: ContentOverlayProps) {
+ super(props);
+
+ this.onDragEnter = this.onDragEnter.bind(this);
+ this.onDragLeave = this.onDragLeave.bind(this);
+ this.onDragOver = this.onDragOver.bind(this);
+ this.onDrop = this.onDrop.bind(this);
+
+ this.state = {
+ draggedOver: false,
+ owningEditor: getTabGroupForDocument(props.documentId)
+ };
+ }
+
+ componentWillReceiveProps(newProps: ContentOverlayProps) {
+ const { documentId: newDocumentId } = newProps;
+ if (this.props.documentId && this.props.documentId !== newDocumentId) {
+ this.setState({ owningEditor: getTabGroupForDocument(newDocumentId) });
+ }
+ }
+
+ onDragEnter(e: DragEvent) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ onDragLeave() {
+ this.setState(({ draggedOver: false }));
+ }
+
+ onDragOver(e: DragEvent) {
+ e.preventDefault();
+ e.stopPropagation();
+ this.setState(({ draggedOver: true }));
+ }
+
+ onDrop(e: DragEvent) {
+ const tabData = JSON.parse(e.dataTransfer.getData('application/json'));
+ if (tabData.editorKey !== this.state.owningEditor) {
+ this.props.appendTab(tabData.editorKey, this.state.owningEditor, tabData.tabId);
+ }
+
+ this.setState(({ draggedOver: false }));
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ render() {
+ let overlayClassName = this.state.draggedOver ? overlay.draggedOverOverlay : '';
+ overlayClassName += (this.props.draggingTab ? overlay.enabledForDrop : '');
+
+ return (
+
+ );
+ }
+}
+
+const mapStateToProps = (state: RootState): ContentOverlayProps => ({
+ draggingTab: state.editor.draggingTab
+});
+
+const mapDispatchToProps = (dispatch): ContentOverlayProps => ({
+ appendTab: (editorKey: string, owningEditor: string, tabId: string) =>
+ dispatch(EditorActions.appendTab(editorKey, owningEditor, tabId))
+});
+
+export const ContentOverlay = connect(mapStateToProps, mapDispatchToProps)(ContentOverlayComponent) as any;
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.scss b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.scss
new file mode 100644
index 000000000..8a16138d2
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.scss
@@ -0,0 +1,6 @@
+.content-wrapper {
+ position: relative;
+ height: 100%;
+ width: 100%;
+ overflow: auto;
+}
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.scss.d.ts b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.scss.d.ts
new file mode 100644
index 000000000..279ba31fb
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.scss.d.ts
@@ -0,0 +1,2 @@
+// This is a generated file. Changes are likely to result in being overwritten
+export const contentWrapper: string;
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.tsx b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.tsx
new file mode 100644
index 000000000..8ef2644be
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/contentWrapper/contentWrapper.tsx
@@ -0,0 +1,121 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { Component } from 'react';
+import { connect } from 'react-redux';
+import * as styles from './contentWrapper.scss';
+import * as EditorActions from '../../../../../data/action/editorActions';
+import { ContentOverlay, LeftContentOverlay, RightContentOverlay } from '../index';
+import * as Constants from '../../../../../constants';
+import { getTabGroupForDocument, tabGroupHasDocuments } from '../../../../../data/editorHelpers';
+import { Editor } from '../../../../../data/reducer/editor';
+import { RootState } from '../../../../../data/store';
+
+interface TabbedDocumentContentProps {
+ activeEditor?: string;
+ documentId?: string;
+ hidden?: boolean;
+ primaryEditor?: Editor;
+ secondaryEditor?: Editor;
+ setActiveEditor?: (editor: string) => void;
+}
+
+interface TabbedDocumentContentState {
+ owningEditor: string;
+}
+
+class TabbedDocumentContentWrapperComponent extends Component {
+ constructor(props: TabbedDocumentContentProps) {
+ super(props);
+
+ this.state = {
+ owningEditor: getTabGroupForDocument(props.documentId)
+ };
+ }
+
+ render() {
+ const onlyOneEditorActive = tabGroupHasDocuments(this.props.primaryEditor) &&
+ !tabGroupHasDocuments(this.props.secondaryEditor);
+
+ const splittingEnabled = onlyOneEditorActive &&
+ this.props.primaryEditor.documents &&
+ Object.keys(this.props.primaryEditor.documents).length > 1;
+
+ return (
+
+ { this.props.children }
+
+ {
+ splittingEnabled ?
+ <>
+
+
+ >
+ :
+ null
+ }
+
+ );
+ }
+
+ componentWillReceiveProps(newProps: TabbedDocumentContentProps) {
+ const { documentId: newDocumentId } = newProps;
+ if (this.props.documentId && this.props.documentId !== newDocumentId) {
+ this.setState({ owningEditor: getTabGroupForDocument(newDocumentId) });
+ }
+ }
+
+ private onClick = () => {
+ if (this.state.owningEditor !== this.props.activeEditor) {
+ this.props.setActiveEditor(this.state.owningEditor);
+ }
+ }
+}
+
+const mapStateToProps = (state: RootState): TabbedDocumentContentProps => ({
+ activeEditor: state.editor.activeEditor,
+ primaryEditor: state.editor.editors[Constants.EDITOR_KEY_PRIMARY],
+ secondaryEditor: state.editor.editors[Constants.EDITOR_KEY_SECONDARY]
+});
+
+const mapDispatchToProps = (dispatch): TabbedDocumentContentProps => ({
+ setActiveEditor: (editor: string) => dispatch(EditorActions.setActiveEditor(editor))
+});
+
+export const TabbedDocumentContentWrapper =
+ connect(mapStateToProps, mapDispatchToProps)(TabbedDocumentContentWrapperComponent) as any;
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/index.ts b/packages/app/client/src/ui/shell/mdi/tabbedDocument/index.ts
new file mode 100644
index 000000000..a35cf3296
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/index.ts
@@ -0,0 +1,38 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+export * from './contentOverlay/contentOverlay';
+export * from './contentWrapper/contentWrapper';
+export * from './leftContentOverlay/leftContentOverlay';
+export * from './rightContentOverlay/rightContentOverlay';
+export * from './tabbedDocument';
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.scss b/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.scss
new file mode 100644
index 000000000..0278daca2
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.scss
@@ -0,0 +1,6 @@
+.left-content-overlay {
+ top: 0;
+ left: 0;
+ right: 80%;
+ bottom: 0;
+}
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.scss.d.ts b/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.scss.d.ts
new file mode 100644
index 000000000..67cf1146a
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.scss.d.ts
@@ -0,0 +1,2 @@
+// This is a generated file. Changes are likely to result in being overwritten
+export const leftContentOverlay: string;
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.tsx b/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.tsx
new file mode 100644
index 000000000..e7824c9e3
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/leftContentOverlay/leftContentOverlay.tsx
@@ -0,0 +1,103 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { DragEvent } from 'react';
+import { connect } from 'react-redux';
+import * as styles from './leftContentOverlay.scss';
+import * as overlay from '../overlay.scss';
+import { RootState } from '../../../../../data/store';
+import * as EditorActions from '../../../../../data/action/editorActions';
+
+interface LeftContentOverlayProps {
+ documentId?: string;
+ draggingTab?: boolean;
+ handleTabDrop?: (tabId: string) => void;
+}
+
+interface LeftContentOverlayState {
+ draggedOver: boolean;
+}
+
+class LeftContentOverlayComponent extends React.Component {
+ public state = {
+ draggedOver: false
+ };
+
+ render() {
+ let overlayClassName = this.state.draggedOver ? overlay.draggedOverOverlay : '';
+ overlayClassName += (this.props.draggingTab ? overlay.enabledForDrop : '');
+
+ return (
+
+ );
+ }
+
+ private onDragEnter = (e) => {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ private onDragLeave = (_e: DragEvent) => {
+ this.setState(({ draggedOver: false }));
+ }
+
+ private onDragOver = (e: DragEvent) => {
+ e.preventDefault();
+ e.stopPropagation();
+ this.setState(({ draggedOver: true }));
+ }
+
+ private onDrop = (e: DragEvent) => {
+ const tabData = JSON.parse(e.dataTransfer.getData('application/json'));
+ const tabId = tabData.tabId;
+ this.props.handleTabDrop(tabId);
+ this.setState(({ draggedOver: false }));
+ e.preventDefault();
+ e.stopPropagation();
+ }
+}
+
+const mapStateToProps = (state: RootState): LeftContentOverlayProps => ({
+ draggingTab: state.editor.draggingTab
+});
+
+const mapDispatchToProps = (dispatch): LeftContentOverlayProps => ({
+ handleTabDrop: (tabId: string) => {
+ dispatch(EditorActions.dropTabOnLeftOverlay(tabId));
+ }
+});
+
+export const LeftContentOverlay = connect(mapStateToProps, mapDispatchToProps)(LeftContentOverlayComponent);
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/overlay.scss b/packages/app/client/src/ui/shell/mdi/tabbedDocument/overlay.scss
new file mode 100644
index 000000000..5bd807932
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/overlay.scss
@@ -0,0 +1,13 @@
+.overlay {
+ position: absolute;
+ transition: background-color 0.1s ease-in-out;
+ background-color: transparent;
+ pointer-events: none;
+ &.dragged-over-overlay {
+ background-color: var(--neutral-9);
+ }
+
+ &.enabled-for-drop {
+ pointer-events: auto;
+ }
+}
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/overlay.scss.d.ts b/packages/app/client/src/ui/shell/mdi/tabbedDocument/overlay.scss.d.ts
new file mode 100644
index 000000000..7fcdf9a3a
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/overlay.scss.d.ts
@@ -0,0 +1,4 @@
+// This is a generated file. Changes are likely to result in being overwritten
+export const overlay: string;
+export const draggedOverOverlay: string;
+export const enabledForDrop: string;
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.scss b/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.scss
new file mode 100644
index 000000000..c93619779
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.scss
@@ -0,0 +1,6 @@
+.right-content-overlay {
+ top: 0;
+ left: 80%;
+ right: 0;
+ bottom: 0;
+}
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.scss.d.ts b/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.scss.d.ts
new file mode 100644
index 000000000..5b5c79478
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.scss.d.ts
@@ -0,0 +1,2 @@
+// This is a generated file. Changes are likely to result in being overwritten
+export const rightContentOverlay: string;
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.tsx b/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.tsx
new file mode 100644
index 000000000..dad7c2781
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/rightContentOverlay/rightContentOverlay.tsx
@@ -0,0 +1,111 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { DragEvent } from 'react';
+import { connect } from 'react-redux';
+import * as Constants from '../../../../../constants';
+import * as EditorActions from '../../../../../data/action/editorActions';
+import { Editor } from '../../../../../data/reducer/editor';
+import { RootState } from '../../../../../data/store';
+import * as styles from './rightContentOverlay.scss';
+import * as overlay from '../overlay.scss';
+
+interface RightContentOverlayProps {
+ draggingTab?: boolean;
+ primaryEditor?: Editor;
+ splitTab?: (contentType: string, tabId: string) => void;
+}
+
+interface RightContentOverlayState {
+ draggedOver: boolean;
+}
+
+class RightContentOverlayComponent extends React.Component {
+ constructor(props: RightContentOverlayProps) {
+ super(props);
+
+ this.state = {
+ draggedOver: false
+ };
+ }
+
+ render() {
+ let overlayClassName = this.state.draggedOver ? overlay.draggedOverOverlay : '';
+ overlayClassName += (this.props.draggingTab ? overlay.enabledForDrop : '');
+
+ return (
+
+ );
+ }
+
+ private onDragEnter = (e) => {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ private onDragLeave = () => {
+ this.setState(({ draggedOver: false }));
+ }
+
+ private onDragOver = (e: DragEvent) => {
+ e.preventDefault();
+ e.stopPropagation();
+ this.setState(({ draggedOver: true }));
+ }
+
+ private onDrop = (e: DragEvent) => {
+ const tabData = JSON.parse(e.dataTransfer.getData('application/json'));
+ const tabId = tabData.tabId;
+ const docToSplit = this.props.primaryEditor.documents[tabId];
+ this.props.splitTab(docToSplit.contentType, tabId);
+ this.setState(({ draggedOver: false }));
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+}
+
+const mapStateToProps = (state: RootState): RightContentOverlayProps => ({
+ draggingTab: state.editor.draggingTab,
+ primaryEditor: state.editor.editors[Constants.EDITOR_KEY_PRIMARY]
+});
+
+const mapDispatchToProps = (dispatch): RightContentOverlayProps => ({
+ splitTab: (contentType: string, tabId: string) =>
+ dispatch(EditorActions.splitTab(contentType, tabId, Constants.EDITOR_KEY_PRIMARY, Constants.EDITOR_KEY_SECONDARY))
+});
+
+export const RightContentOverlay = connect(mapStateToProps, mapDispatchToProps)(RightContentOverlayComponent);
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx b/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
new file mode 100644
index 000000000..db2e743c2
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
@@ -0,0 +1,69 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+
+import { TabbedDocumentContentWrapper } from './contentWrapper/contentWrapper';
+
+export interface TabbedDocumentProps {
+ children?: any;
+ documentId?: string;
+ hidden?: boolean;
+}
+
+export class TabbedDocument extends React.Component {
+ constructor(props: TabbedDocumentProps) {
+ super(props);
+ }
+
+ render() {
+ const { children, documentId, hidden } = this.props;
+ return (
+
+ { children }
+
+ );
+ }
+}
+
+export const Tab = props => props.children;
+export const Content = props =>
+
+ { props.children }
+ ;
From c902b726a56707a1fb06c47db261f670431f9750 Mon Sep 17 00:00:00 2001
From: Tony Anziano
Date: Tue, 27 Nov 2018 12:45:31 -0800
Subject: [PATCH 07/11] Finished refactor of mdi / tabbed document
architecture.
---
.../src/ui/shell/mdi/documents/documents.tsx | 19 ++------
.../shell/mdi/documents/documentsContainer.ts | 47 +++++++++++++++++++
.../src/ui/shell/mdi/documents/index.ts | 34 ++++++++++++++
packages/app/client/src/ui/shell/mdi/index.ts | 5 +-
packages/app/client/src/ui/shell/mdi/mdi.tsx | 8 ++--
.../app/client/src/ui/shell/mdi/tab/index.ts | 34 ++++++++++++++
.../app/client/src/ui/shell/mdi/tab/tab.tsx | 23 +++------
.../src/ui/shell/mdi/tab/tabContainer.ts | 44 +++++++++++++++++
.../client/src/ui/shell/mdi/tabBar/index.ts | 34 ++++++++++++++
.../client/src/ui/shell/mdi/tabBar/tabBar.tsx | 36 +++-----------
.../mdi/tabbedDocument/tabbedDocument.tsx | 9 ----
11 files changed, 217 insertions(+), 76 deletions(-)
create mode 100644 packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/documents/index.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tab/index.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tab/tabContainer.ts
create mode 100644 packages/app/client/src/ui/shell/mdi/tabBar/index.ts
diff --git a/packages/app/client/src/ui/shell/mdi/documents/documents.tsx b/packages/app/client/src/ui/shell/mdi/documents/documents.tsx
index bb90c0f3b..ffe789397 100644
--- a/packages/app/client/src/ui/shell/mdi/documents/documents.tsx
+++ b/packages/app/client/src/ui/shell/mdi/documents/documents.tsx
@@ -32,20 +32,18 @@
//
import * as React from 'react';
-import { connect } from 'react-redux';
-import { RootState } from '../../../../data/store';
import { TabbedDocument } from '../tabbedDocument';
import { EditorFactory } from '../../../editor';
+import { Document } from '../../../../data/reducer/editor';
export interface DocumentsProps {
activeDocumentId?: string;
- documents?: any; // TODO: import document shape from reducer
+ documents?: { [documentId: string]: Document };
owningEditor?: string;
tabOrder?: string[];
}
-// TODO: Factor into container / dumb comp
-export class DocumentsComp extends React.Component {
+export class Documents extends React.Component {
constructor(props: DocumentsProps) {
super(props);
}
@@ -65,14 +63,3 @@ export class DocumentsComp extends React.Component {
});
}
}
-
-function mapStateToProps(state: RootState, ownProps: DocumentsProps): DocumentsProps {
- return {
- activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
- documents: state.editor.editors[ownProps.owningEditor].documents,
- tabOrder: state.editor.editors[ownProps.owningEditor].tabOrder,
- ...ownProps
- };
-}
-
-export const Documents = connect(mapStateToProps, null)(DocumentsComp);
diff --git a/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts b/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
new file mode 100644
index 000000000..d1ec70267
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
@@ -0,0 +1,47 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import { connect } from 'react-redux';
+import { Documents, DocumentsProps } from './documents';
+import { RootState } from '../../../../data/store';
+
+function mapStateToProps(state: RootState, ownProps: DocumentsProps): DocumentsProps {
+ return {
+ activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
+ documents: state.editor.editors[ownProps.owningEditor].documents,
+ tabOrder: state.editor.editors[ownProps.owningEditor].tabOrder,
+ ...ownProps
+ };
+}
+
+export const DocumentsContainer = connect(mapStateToProps, null)(Documents);
diff --git a/packages/app/client/src/ui/shell/mdi/documents/index.ts b/packages/app/client/src/ui/shell/mdi/documents/index.ts
new file mode 100644
index 000000000..8a51a95c7
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/documents/index.ts
@@ -0,0 +1,34 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+export * from './documentsContainer';
diff --git a/packages/app/client/src/ui/shell/mdi/index.ts b/packages/app/client/src/ui/shell/mdi/index.ts
index a85b4431c..3eb035427 100644
--- a/packages/app/client/src/ui/shell/mdi/index.ts
+++ b/packages/app/client/src/ui/shell/mdi/index.ts
@@ -32,4 +32,7 @@
//
export { MDI } from './mdiContainer';
-export * from './tab/tab';
+export * from './documents';
+export * from './tab';
+export * from './tabBar';
+export * from './tabbedDocument';
diff --git a/packages/app/client/src/ui/shell/mdi/mdi.tsx b/packages/app/client/src/ui/shell/mdi/mdi.tsx
index 52e650e37..e44bdc279 100644
--- a/packages/app/client/src/ui/shell/mdi/mdi.tsx
+++ b/packages/app/client/src/ui/shell/mdi/mdi.tsx
@@ -35,7 +35,7 @@ import * as React from 'react';
import { MDIProps } from './mdiContainer';
import { TabBarContainer } from './tabBar/tabBarContainer';
import * as styles from './mdi.scss';
-import { Documents } from './documents/documents';
+import { DocumentsContainer } from './documents/documentsContainer';
export class MDIComponent extends React.Component {
constructor(props: MDIProps) {
@@ -43,11 +43,11 @@ export class MDIComponent extends React.Component {
}
public render(): React.ReactNode {
-
+ const { presentationModeEnabled } = this.props;
return (
-
-
+ { !presentationModeEnabled && }
+
);
}
diff --git a/packages/app/client/src/ui/shell/mdi/tab/index.ts b/packages/app/client/src/ui/shell/mdi/tab/index.ts
new file mode 100644
index 000000000..3f0a91a58
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tab/index.ts
@@ -0,0 +1,34 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+export * from './tabContainer';
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
index 41a642362..2edb11ed8 100644
--- a/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
+++ b/packages/app/client/src/ui/shell/mdi/tab/tab.tsx
@@ -33,13 +33,11 @@
import * as React from 'react';
import { DragEvent, KeyboardEvent, SyntheticEvent } from 'react';
-import { connect } from 'react-redux';
import * as styles from './tab.scss';
-import * as EditorActions from '../../../../data/action/editorActions';
import { getTabGroupForDocument } from '../../../../data/editorHelpers';
import { TruncateText } from '@bfemulator/ui-react';
-interface TabProps {
+export interface TabProps {
active?: boolean;
dirty?: boolean;
documentId?: string;
@@ -49,12 +47,12 @@ interface TabProps {
swapTabs?: (editorKey: string, owningEditor: string, tabId: string) => any;
}
-interface TabState {
+export interface TabState {
draggedOver: boolean;
owningEditor: string;
}
-class TabComponent extends React.Component {
+export class Tab extends React.Component {
constructor(props: TabProps) {
super(props);
@@ -67,20 +65,21 @@ class TabComponent extends React.Component {
render() {
const activeClassName = this.props.active ? styles.activeEditorTab : '';
const draggedOverClassName = this.state.draggedOver ? styles.draggedOverEditorTab : '';
+ const { label } = this.props;
return (
-
{ this.props.label }
+
{ label }
{ this.props.dirty ?
* : null }
+ role="button" tabIndex={ 0 } aria-label={ `${label}, tab` }>
{
e.stopPropagation();
}
}
-
-const mapDispatchToProps = (dispatch, ownProps: TabProps): TabProps => ({
- toggleDraggingTab: (toggle: boolean) => dispatch(EditorActions.toggleDraggingTab(toggle)),
- swapTabs: (editorKey: string, owningEditor: string, tabId: string) =>
- dispatch(EditorActions.swapTabs(editorKey, owningEditor, tabId, ownProps.documentId))
-});
-
-export const Tab = connect(null, mapDispatchToProps)(TabComponent);
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tabContainer.ts b/packages/app/client/src/ui/shell/mdi/tab/tabContainer.ts
new file mode 100644
index 000000000..2a4000e51
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tab/tabContainer.ts
@@ -0,0 +1,44 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import { connect } from 'react-redux';
+import { Tab, TabProps } from './tab';
+import { toggleDraggingTab, swapTabs } from '../../../../data/action/editorActions';
+
+const mapDispatchToProps = (dispatch, ownProps: TabProps): TabProps => ({
+ toggleDraggingTab: (toggle: boolean) => dispatch(toggleDraggingTab(toggle)),
+ swapTabs: (editorKey: string, owningEditor: string, tabId: string) =>
+ dispatch(swapTabs(editorKey, owningEditor, tabId, ownProps.documentId))
+});
+
+export const TabContainer = connect(null, mapDispatchToProps)(Tab);
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/index.ts b/packages/app/client/src/ui/shell/mdi/tabBar/index.ts
new file mode 100644
index 000000000..422012b46
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/index.ts
@@ -0,0 +1,34 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+export * from './tabBarContainer';
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
index 9d9281a2d..88083848a 100644
--- a/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
@@ -34,13 +34,9 @@
import * as React from 'react';
import { DragEvent } from 'react';
import * as styles from './tabBar.scss';
-// import { connect } from 'react-redux';
-// import * as EditorActions from '../../../../data/action/editorActions';
import * as Constants from '../../../../constants';
import { getOtherTabGroup } from '../../../../data/editorHelpers';
-// import * as PresentationActions from '../../../../data/action/presentationActions';
import { Document, Editor } from '../../../../data/reducer/editor';
-// import { RootState } from '../../../../data/store';
import {
CONTENT_TYPE_APP_SETTINGS,
CONTENT_TYPE_LIVE_CHAT,
@@ -51,15 +47,14 @@ import { BotConfigWithPath } from '@bfemulator/sdk-shared';
import { Tab } from '../tab/tab';
export interface TabBarProps {
- editors?: { [editorKey: string]: Editor };
- owningEditor?: string;
- documents?: { [documentId: string]: Document };
+ activeBot?: BotConfigWithPath;
activeDocumentId?: string;
- childRefs?: HTMLElement[];
activeEditor?: string;
- tabOrder?: string[];
chats?: { [chatId: string]: any };
- activeBot?: BotConfigWithPath;
+ documents?: { [documentId: string]: Document };
+ editors?: { [editorKey: string]: Editor };
+ owningEditor?: string;
+ tabOrder?: string[];
splitTab?: (contentType: string, documentId: string, srcEditorKey: string, destEditorKey: string) => void;
appendTab?: (srcEditorKey: string, destEditorKey: string, tabId: string) => void;
enablePresentationMode?: () => void;
@@ -173,7 +168,7 @@ export class TabBar extends React.Component {
return (
this.handleTabClick(index) }
onKeyDown={ ev => this.handleKeyDown(ev, index) }
ref={ this.setRef } role="presentation">
@@ -270,22 +265,3 @@ export class TabBar extends React.Component
{
}
}
}
-
-// const mapStateToProps = (state: RootState, ownProps: TabBarProps): TabBarProps => ({
-// activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
-// activeEditor: state.editor.activeEditor,
-// editors: state.editor.editors,
-// documents: state.editor.editors[ownProps.owningEditor].documents
-// });
-
-// const mapDispatchToProps = (dispatch): TabBarProps => ({
-// splitTab: (contentType: string, documentId: string, srcEditorKey: string, destEditorKey: string) =>
-// dispatch(EditorActions.splitTab(contentType, documentId, srcEditorKey, destEditorKey)),
-
-// appendTab: (srcEditorKey: string, destEditorKey: string, tabId: string) =>
-// dispatch(EditorActions.appendTab(srcEditorKey, destEditorKey, tabId)),
-
-// enablePresentationMode: () => dispatch(PresentationActions.enable())
-// });
-
-// export const TabBar = connect(mapStateToProps, mapDispatchToProps)(TabBarComponent);
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx b/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
index db2e743c2..7eaf71965 100644
--- a/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
@@ -58,12 +58,3 @@ export class TabbedDocument extends React.Component {
);
}
}
-
-export const Tab = props => props.children;
-export const Content = props =>
-
- { props.children }
- ;
From ed7e61b318f7f7e238730c37446bdaec0adf9c0a Mon Sep 17 00:00:00 2001
From: Tony Anziano
Date: Tue, 27 Nov 2018 12:46:31 -0800
Subject: [PATCH 08/11] Removed old multitabs directory.
---
.../client/src/ui/shell/multiTabs/index.ts | 36 ---
.../src/ui/shell/multiTabs/multiTabs.scss | 36 ---
.../ui/shell/multiTabs/multiTabs.scss.d.ts | 3 -
.../src/ui/shell/multiTabs/multiTabs.tsx | 114 ----------
.../src/ui/shell/multiTabs/tabBar/tabBar.scss | 87 --------
.../shell/multiTabs/tabBar/tabBar.scss.d.ts | 8 -
.../src/ui/shell/multiTabs/tabBar/tabBar.tsx | 207 ------------------
.../contentOverlay/contentOverlay.scss | 6 -
.../contentOverlay/contentOverlay.scss.d.ts | 2 -
.../contentOverlay/contentOverlay.tsx | 124 -----------
.../contentWrapper/contentWrapper.scss | 6 -
.../contentWrapper/contentWrapper.scss.d.ts | 2 -
.../contentWrapper/contentWrapper.tsx | 121 ----------
.../shell/multiTabs/tabbedDocument/index.ts | 38 ----
.../leftContentOverlay.scss | 6 -
.../leftContentOverlay.scss.d.ts | 2 -
.../leftContentOverlay/leftContentOverlay.tsx | 103 ---------
.../multiTabs/tabbedDocument/overlay.scss | 13 --
.../tabbedDocument/overlay.scss.d.ts | 4 -
.../rightContentOverlay.scss | 6 -
.../rightContentOverlay.scss.d.ts | 2 -
.../rightContentOverlay.tsx | 111 ----------
.../tabbedDocument/tabbedDocument.tsx | 55 -----
23 files changed, 1092 deletions(-)
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/index.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/multiTabs.scss
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/multiTabs.scss.d.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/multiTabs.tsx
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss.d.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.scss
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.scss.d.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.tsx
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.scss
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.scss.d.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.tsx
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/index.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.scss
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.scss.d.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.tsx
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/overlay.scss
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/overlay.scss.d.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.scss
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.scss.d.ts
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.tsx
delete mode 100644 packages/app/client/src/ui/shell/multiTabs/tabbedDocument/tabbedDocument.tsx
diff --git a/packages/app/client/src/ui/shell/multiTabs/index.ts b/packages/app/client/src/ui/shell/multiTabs/index.ts
deleted file mode 100644
index ecbf75521..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/index.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-export * from './multiTabs';
-export * from './tabBar/tabBar';
-export * from './tabbedDocument';
diff --git a/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss b/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss
deleted file mode 100644
index a9a917493..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss
+++ /dev/null
@@ -1,36 +0,0 @@
-.multi-tabs {
- display: flex;
- flex: 1;
- flex-direction: column;
- height: 100%;
- box-sizing: border-box;
-
- .tab {
- background-color: var(--tab-bg);
- height: 100%;
- border: none;
- padding: 0;
- position: relative;
-
- &:active {
- border: 0;
- outline: 0;
- }
-
- &:focus {
- border: 0;
- outline: 0;
- }
-
- &:focus::after {
- content: '';
- position: absolute;
- width: calc(100% - 2px);
- height: calc(100% - 2px);
- border: var(--nav-border-focus);
- top: 0;
- left: 0;
- clip-path: var(--border-window-clip-path);
- }
- }
-}
diff --git a/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss.d.ts b/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss.d.ts
deleted file mode 100644
index d69bfe4fc..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/multiTabs.scss.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// This is a generated file. Changes are likely to result in being overwritten
-export const multiTabs: string;
-export const tab: string;
diff --git a/packages/app/client/src/ui/shell/multiTabs/multiTabs.tsx b/packages/app/client/src/ui/shell/multiTabs/multiTabs.tsx
deleted file mode 100644
index ea9b12528..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/multiTabs.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-import * as React from 'react';
-import { connect } from 'react-redux';
-import * as styles from './multiTabs.scss';
-
-import { Content as TabbedDocumentContent, Tab as TabbedDocumentTab, TabBar } from './index';
-import { filterChildren, hmrSafeNameComparison } from '@bfemulator/ui-react';
-import { RootState } from '../../../data/store';
-
-interface MultiTabsProps {
- value?: number;
- owningEditor?: string;
- children?: any;
- presentationModeEnabled?: boolean;
- onChange?: (tabValue: any) => any;
-}
-
-class MultiTabsComponent extends React.Component {
- private readonly childRefs: HTMLElement[] = [];
-
- constructor(props: MultiTabsProps) {
- super(props);
- }
-
- render() {
- return (
-
- {
- !this.props.presentationModeEnabled &&
-
- {
- React.Children.map(this.props.children, (tabbedDocument: any, index) =>
- this.handleTabClick(index) }
- onKeyDown={ ev => this.handleKeyDown(ev, index) }
- ref={ this.setRef } role="presentation">
- { filterChildren(tabbedDocument.props.children, child =>
- hmrSafeNameComparison(child.type, TabbedDocumentTab)) }
-
- )
- }
-
- }
- {
- !!this.props.children.length && React.Children.map(
- this.props.children,
- (tabbedDocument: any, index: number) =>
- filterChildren(
- tabbedDocument.props.children,
- child => hmrSafeNameComparison(child.type, TabbedDocumentContent)
- ).map(child => child && React.cloneElement(child as any, { hidden: index !== this.props.value }))
- )
- }
-
- );
- }
-
- private handleTabClick = (nextValue: any) => {
- if (this.props.onChange) {
- this.props.onChange(nextValue);
- }
- }
-
- private handleKeyDown = (event: React.KeyboardEvent, nextValue: number): void => {
- let { key = '' } = event;
- key = key.toLowerCase();
- if (key === ' ' || key === 'enter') {
- this.handleTabClick(nextValue);
- }
- }
-
- private setRef = (input) => {
- this.childRefs.push(input);
- }
-}
-
-const mapStateToProps = (state: RootState): MultiTabsProps => ({
- presentationModeEnabled: state.presentation.enabled
-});
-
-export const MultiTabs = connect(mapStateToProps)(MultiTabsComponent) as any;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
deleted file mode 100644
index f048e67f6..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss
+++ /dev/null
@@ -1,87 +0,0 @@
-.tab-bar {
- display: flex;
- background-color: var(--tab-bar-bg);
- color: var(--input-label-color);
- min-height: 32px;
-
- &.dragged-over {
- background-color: var(--tab-active-tab-bg);
- }
-
- & > .tab-bar-tabs {
- display: flex;
- flex-flow: row nowrap;
- overflow-x: auto;
- overflow-y: hidden;
-
- &::-webkit-scrollbar {
- height: 2px;
- }
-
- &::-webkit-scrollbar-thumb {
- background: var(--neutral-10);
- }
-
- &::-webkit-scrollbar-track {
- background: transparent;
- }
- }
-
- & > div.tab-bar-widgets {
- display: flex;
- align-items: center;
- width: auto;
- margin-left: auto;
- flex-shrink: 0;
-
- & > span {
- display: inline-block;
- cursor: pointer;
- height: 16px;
- margin-right: 12px;
- font-size: 12px;
-
- :first-of-type {
- margin-left: 12px;
- }
- }
-
- button {
- height: 25px;
- width: auto;
- background-color: transparent;
- border: 1px solid transparent;
- }
-
- .widget {
- background-size: 16px;
- border: 1px solid transparent;
- box-sizing: border-box;
- height: 22px;
- padding: 5px;
- width: 22px;
-
- &:hover {
- border: 1px solid transparent;
- cursor: pointer;
- }
- }
-
- .split-widget, .presentation-widget {
- background: var(--tab-icon-color);
- -webkit-mask-size: 22px;
-
- &:hover {
- background: var(--tab-icon-hover-color);
- }
- }
-
- .split-widget {
- -webkit-mask: url("../../../media/ic_split.svg") no-repeat 50% 50%;
- }
-
- .presentation-widget {
- -webkit-mask: url("../../../media/ic_presentation.svg") no-repeat 50% 50%;
- }
- }
-}
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss.d.ts b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss.d.ts
deleted file mode 100644
index 55d10e122..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.scss.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// This is a generated file. Changes are likely to result in being overwritten
-export const tabBar: string;
-export const draggedOver: string;
-export const tabBarTabs: string;
-export const tabBarWidgets: string;
-export const widget: string;
-export const splitWidget: string;
-export const presentationWidget: string;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx b/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx
deleted file mode 100644
index 553ef6a0a..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabBar/tabBar.tsx
+++ /dev/null
@@ -1,207 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-import * as React from 'react';
-import { DragEvent } from 'react';
-import * as styles from './tabBar.scss';
-import { connect } from 'react-redux';
-import * as EditorActions from '../../../../data/action/editorActions';
-import * as Constants from '../../../../constants';
-import { getOtherTabGroup } from '../../../../data/editorHelpers';
-import * as PresentationActions from '../../../../data/action/presentationActions';
-import { Document, Editor } from '../../../../data/reducer/editor';
-import { RootState } from '../../../../data/store';
-
-interface TabBarProps {
- editors?: { [editorKey: string]: Editor };
- owningEditor?: string;
- children?: any;
- documents?: { [documentId: string]: Document };
- activeIndex?: number;
- activeDocumentId?: string;
- childRefs?: HTMLElement[];
- activeEditor?: string;
- splitTab?: (contentType: string, documentId: string, srcEditorKey: string, destEditorKey: string) => void;
- appendTab?: (srcEditorKey: string, destEditorKey: string, tabId: string) => void;
- enablePresentationMode?: () => void;
-}
-
-interface TabBarState {
- draggedOver: boolean;
-}
-
-class TabBarComponent extends React.Component {
- private _scrollable: HTMLElement;
-
- constructor(props: TabBarProps) {
- super(props);
-
- this.state = {
- draggedOver: false
- };
- }
-
- componentDidUpdate(prevProps: any) {
- let scrollable = this._scrollable;
-
- if (scrollable) {
- if (this.props.children.length > prevProps.children.length &&
- scrollable.scrollWidth > scrollable.clientWidth) {
- let leftOffset = 0;
- for (let i = 0; i <= this.props.activeIndex; i++) {
- let ref = this.props.childRefs[i];
- leftOffset += ref ? this.props.childRefs[i].offsetWidth : 0;
- }
- if (leftOffset >= scrollable.clientWidth) {
- scrollable.scrollLeft = leftOffset;
- }
- }
- }
- }
-
- onPresentationModeClick = () => this.props.enablePresentationMode();
-
- render() {
- const tabBarClassName = this.state.draggedOver ? styles.draggedOver : '';
- return (
-
-
- { this.props.children }
-
-
- { this.widgets }
-
-
- );
- }
-
- private get widgets(): JSX.Element[] {
- const activeDoc = this.props.documents[this.props.activeDocumentId];
- const presentationEnabled = activeDoc
- && (activeDoc.contentType === Constants.CONTENT_TYPE_TRANSCRIPT ||
- activeDoc.contentType === Constants.CONTENT_TYPE_LIVE_CHAT);
- const splitEnabled = Object.keys(this.props.documents).length > 1;
-
- let widgets: JSX.Element[] = [];
-
- if (presentationEnabled) {
- widgets.push(
- this.onPresentationModeClick() }
- >
-
-
-
-
- );
- }
- if (splitEnabled) {
- widgets.push(
-
-
-
-
- );
- }
- return widgets;
- }
-
- private onSplitClick = () => {
- const owningEditor = this.props.editors[this.props.owningEditor];
- const docIdToSplit = owningEditor.activeDocumentId;
- const docToSplit = owningEditor.documents[docIdToSplit];
- const destEditorKey = getOtherTabGroup(this.props.owningEditor);
- this.props.splitTab(docToSplit.contentType, docToSplit.documentId, this.props.owningEditor, destEditorKey);
- }
-
- private onDragEnter = (e: DragEvent) => {
- e.preventDefault();
- }
-
- private onDragOver = (e: DragEvent) => {
- this.setState(({ draggedOver: true }));
- e.preventDefault();
- e.stopPropagation();
- }
-
- private onDragLeave = (_e: DragEvent) => {
- this.setState(({ draggedOver: false }));
- }
-
- private onDrop = (e: DragEvent) => {
- e.preventDefault();
- e.stopPropagation();
- this.setState(({ draggedOver: false }));
- try {
- const tabData = JSON.parse(e.dataTransfer.getData('application/json'));
- const tabId = tabData.tabId;
- this.props.appendTab(tabData.editorKey, this.props.owningEditor, tabId);
- } catch {
- // Do nothing
- }
- }
-
- private saveScrollable = (ref) => {
- this._scrollable = ref;
- }
-}
-
-const mapStateToProps = (state: RootState, ownProps: TabBarProps): TabBarProps => ({
- activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
- activeEditor: state.editor.activeEditor,
- editors: state.editor.editors,
- documents: state.editor.editors[ownProps.owningEditor].documents
-});
-
-const mapDispatchToProps = (dispatch): TabBarProps => ({
- splitTab: (contentType: string, documentId: string, srcEditorKey: string, destEditorKey: string) =>
- dispatch(EditorActions.splitTab(contentType, documentId, srcEditorKey, destEditorKey)),
-
- appendTab: (srcEditorKey: string, destEditorKey: string, tabId: string) =>
- dispatch(EditorActions.appendTab(srcEditorKey, destEditorKey, tabId)),
-
- enablePresentationMode: () => dispatch(PresentationActions.enable())
-});
-
-export const TabBar = connect(mapStateToProps, mapDispatchToProps)(TabBarComponent);
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.scss b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.scss
deleted file mode 100644
index 6365dad57..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.content-overlay {
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
-}
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.scss.d.ts b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.scss.d.ts
deleted file mode 100644
index 8be5423a5..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.scss.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// This is a generated file. Changes are likely to result in being overwritten
-export const contentOverlay: string;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.tsx b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.tsx
deleted file mode 100644
index 2a72ff68e..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentOverlay/contentOverlay.tsx
+++ /dev/null
@@ -1,124 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-import * as React from 'react';
-import { DragEvent } from 'react';
-import { connect } from 'react-redux';
-import * as styles from './contentOverlay.scss';
-import * as overlay from '../overlay.scss';
-
-import * as EditorActions from '../../../../../data/action/editorActions';
-import { getTabGroupForDocument } from '../../../../../data/editorHelpers';
-import { RootState } from '../../../../../data/store';
-
-interface ContentOverlayProps {
- documentId?: string;
- draggingTab?: boolean;
- appendTab?: (editorKey: string, owningEditor: string, tabId: string) => void;
-}
-
-interface ContentOverlayState {
- draggedOver: boolean;
- owningEditor: string;
-}
-
-class ContentOverlayComponent extends React.Component {
- constructor(props: ContentOverlayProps) {
- super(props);
-
- this.onDragEnter = this.onDragEnter.bind(this);
- this.onDragLeave = this.onDragLeave.bind(this);
- this.onDragOver = this.onDragOver.bind(this);
- this.onDrop = this.onDrop.bind(this);
-
- this.state = {
- draggedOver: false,
- owningEditor: getTabGroupForDocument(props.documentId)
- };
- }
-
- componentWillReceiveProps(newProps: ContentOverlayProps) {
- const { documentId: newDocumentId } = newProps;
- if (this.props.documentId && this.props.documentId !== newDocumentId) {
- this.setState({ owningEditor: getTabGroupForDocument(newDocumentId) });
- }
- }
-
- onDragEnter(e: DragEvent) {
- e.preventDefault();
- e.stopPropagation();
- }
-
- onDragLeave() {
- this.setState(({ draggedOver: false }));
- }
-
- onDragOver(e: DragEvent) {
- e.preventDefault();
- e.stopPropagation();
- this.setState(({ draggedOver: true }));
- }
-
- onDrop(e: DragEvent) {
- const tabData = JSON.parse(e.dataTransfer.getData('application/json'));
- if (tabData.editorKey !== this.state.owningEditor) {
- this.props.appendTab(tabData.editorKey, this.state.owningEditor, tabData.tabId);
- }
-
- this.setState(({ draggedOver: false }));
- e.preventDefault();
- e.stopPropagation();
- }
-
- render() {
- let overlayClassName = this.state.draggedOver ? overlay.draggedOverOverlay : '';
- overlayClassName += (this.props.draggingTab ? overlay.enabledForDrop : '');
-
- return (
-
- );
- }
-}
-
-const mapStateToProps = (state: RootState): ContentOverlayProps => ({
- draggingTab: state.editor.draggingTab
-});
-
-const mapDispatchToProps = (dispatch): ContentOverlayProps => ({
- appendTab: (editorKey: string, owningEditor: string, tabId: string) =>
- dispatch(EditorActions.appendTab(editorKey, owningEditor, tabId))
-});
-
-export const ContentOverlay = connect(mapStateToProps, mapDispatchToProps)(ContentOverlayComponent) as any;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.scss b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.scss
deleted file mode 100644
index 8a16138d2..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.content-wrapper {
- position: relative;
- height: 100%;
- width: 100%;
- overflow: auto;
-}
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.scss.d.ts b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.scss.d.ts
deleted file mode 100644
index 279ba31fb..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.scss.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// This is a generated file. Changes are likely to result in being overwritten
-export const contentWrapper: string;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.tsx b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.tsx
deleted file mode 100644
index 8ef2644be..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/contentWrapper/contentWrapper.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-import * as React from 'react';
-import { Component } from 'react';
-import { connect } from 'react-redux';
-import * as styles from './contentWrapper.scss';
-import * as EditorActions from '../../../../../data/action/editorActions';
-import { ContentOverlay, LeftContentOverlay, RightContentOverlay } from '../index';
-import * as Constants from '../../../../../constants';
-import { getTabGroupForDocument, tabGroupHasDocuments } from '../../../../../data/editorHelpers';
-import { Editor } from '../../../../../data/reducer/editor';
-import { RootState } from '../../../../../data/store';
-
-interface TabbedDocumentContentProps {
- activeEditor?: string;
- documentId?: string;
- hidden?: boolean;
- primaryEditor?: Editor;
- secondaryEditor?: Editor;
- setActiveEditor?: (editor: string) => void;
-}
-
-interface TabbedDocumentContentState {
- owningEditor: string;
-}
-
-class TabbedDocumentContentWrapperComponent extends Component {
- constructor(props: TabbedDocumentContentProps) {
- super(props);
-
- this.state = {
- owningEditor: getTabGroupForDocument(props.documentId)
- };
- }
-
- render() {
- const onlyOneEditorActive = tabGroupHasDocuments(this.props.primaryEditor) &&
- !tabGroupHasDocuments(this.props.secondaryEditor);
-
- const splittingEnabled = onlyOneEditorActive &&
- this.props.primaryEditor.documents &&
- Object.keys(this.props.primaryEditor.documents).length > 1;
-
- return (
-
- { this.props.children }
-
- {
- splittingEnabled ?
- <>
-
-
- >
- :
- null
- }
-
- );
- }
-
- componentWillReceiveProps(newProps: TabbedDocumentContentProps) {
- const { documentId: newDocumentId } = newProps;
- if (this.props.documentId && this.props.documentId !== newDocumentId) {
- this.setState({ owningEditor: getTabGroupForDocument(newDocumentId) });
- }
- }
-
- private onClick = () => {
- if (this.state.owningEditor !== this.props.activeEditor) {
- this.props.setActiveEditor(this.state.owningEditor);
- }
- }
-}
-
-const mapStateToProps = (state: RootState): TabbedDocumentContentProps => ({
- activeEditor: state.editor.activeEditor,
- primaryEditor: state.editor.editors[Constants.EDITOR_KEY_PRIMARY],
- secondaryEditor: state.editor.editors[Constants.EDITOR_KEY_SECONDARY]
-});
-
-const mapDispatchToProps = (dispatch): TabbedDocumentContentProps => ({
- setActiveEditor: (editor: string) => dispatch(EditorActions.setActiveEditor(editor))
-});
-
-export const TabbedDocumentContentWrapper =
- connect(mapStateToProps, mapDispatchToProps)(TabbedDocumentContentWrapperComponent) as any;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/index.ts b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/index.ts
deleted file mode 100644
index a35cf3296..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/index.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-export * from './contentOverlay/contentOverlay';
-export * from './contentWrapper/contentWrapper';
-export * from './leftContentOverlay/leftContentOverlay';
-export * from './rightContentOverlay/rightContentOverlay';
-export * from './tabbedDocument';
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.scss b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.scss
deleted file mode 100644
index 0278daca2..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.left-content-overlay {
- top: 0;
- left: 0;
- right: 80%;
- bottom: 0;
-}
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.scss.d.ts b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.scss.d.ts
deleted file mode 100644
index 67cf1146a..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.scss.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// This is a generated file. Changes are likely to result in being overwritten
-export const leftContentOverlay: string;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.tsx b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.tsx
deleted file mode 100644
index e7824c9e3..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/leftContentOverlay/leftContentOverlay.tsx
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-import * as React from 'react';
-import { DragEvent } from 'react';
-import { connect } from 'react-redux';
-import * as styles from './leftContentOverlay.scss';
-import * as overlay from '../overlay.scss';
-import { RootState } from '../../../../../data/store';
-import * as EditorActions from '../../../../../data/action/editorActions';
-
-interface LeftContentOverlayProps {
- documentId?: string;
- draggingTab?: boolean;
- handleTabDrop?: (tabId: string) => void;
-}
-
-interface LeftContentOverlayState {
- draggedOver: boolean;
-}
-
-class LeftContentOverlayComponent extends React.Component {
- public state = {
- draggedOver: false
- };
-
- render() {
- let overlayClassName = this.state.draggedOver ? overlay.draggedOverOverlay : '';
- overlayClassName += (this.props.draggingTab ? overlay.enabledForDrop : '');
-
- return (
-
- );
- }
-
- private onDragEnter = (e) => {
- e.preventDefault();
- e.stopPropagation();
- }
-
- private onDragLeave = (_e: DragEvent) => {
- this.setState(({ draggedOver: false }));
- }
-
- private onDragOver = (e: DragEvent) => {
- e.preventDefault();
- e.stopPropagation();
- this.setState(({ draggedOver: true }));
- }
-
- private onDrop = (e: DragEvent) => {
- const tabData = JSON.parse(e.dataTransfer.getData('application/json'));
- const tabId = tabData.tabId;
- this.props.handleTabDrop(tabId);
- this.setState(({ draggedOver: false }));
- e.preventDefault();
- e.stopPropagation();
- }
-}
-
-const mapStateToProps = (state: RootState): LeftContentOverlayProps => ({
- draggingTab: state.editor.draggingTab
-});
-
-const mapDispatchToProps = (dispatch): LeftContentOverlayProps => ({
- handleTabDrop: (tabId: string) => {
- dispatch(EditorActions.dropTabOnLeftOverlay(tabId));
- }
-});
-
-export const LeftContentOverlay = connect(mapStateToProps, mapDispatchToProps)(LeftContentOverlayComponent);
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/overlay.scss b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/overlay.scss
deleted file mode 100644
index 5bd807932..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/overlay.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-.overlay {
- position: absolute;
- transition: background-color 0.1s ease-in-out;
- background-color: transparent;
- pointer-events: none;
- &.dragged-over-overlay {
- background-color: var(--neutral-9);
- }
-
- &.enabled-for-drop {
- pointer-events: auto;
- }
-}
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/overlay.scss.d.ts b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/overlay.scss.d.ts
deleted file mode 100644
index 7fcdf9a3a..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/overlay.scss.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// This is a generated file. Changes are likely to result in being overwritten
-export const overlay: string;
-export const draggedOverOverlay: string;
-export const enabledForDrop: string;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.scss b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.scss
deleted file mode 100644
index c93619779..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.right-content-overlay {
- top: 0;
- left: 80%;
- right: 0;
- bottom: 0;
-}
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.scss.d.ts b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.scss.d.ts
deleted file mode 100644
index 5b5c79478..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.scss.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// This is a generated file. Changes are likely to result in being overwritten
-export const rightContentOverlay: string;
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.tsx b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.tsx
deleted file mode 100644
index dad7c2781..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/rightContentOverlay/rightContentOverlay.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-import * as React from 'react';
-import { DragEvent } from 'react';
-import { connect } from 'react-redux';
-import * as Constants from '../../../../../constants';
-import * as EditorActions from '../../../../../data/action/editorActions';
-import { Editor } from '../../../../../data/reducer/editor';
-import { RootState } from '../../../../../data/store';
-import * as styles from './rightContentOverlay.scss';
-import * as overlay from '../overlay.scss';
-
-interface RightContentOverlayProps {
- draggingTab?: boolean;
- primaryEditor?: Editor;
- splitTab?: (contentType: string, tabId: string) => void;
-}
-
-interface RightContentOverlayState {
- draggedOver: boolean;
-}
-
-class RightContentOverlayComponent extends React.Component {
- constructor(props: RightContentOverlayProps) {
- super(props);
-
- this.state = {
- draggedOver: false
- };
- }
-
- render() {
- let overlayClassName = this.state.draggedOver ? overlay.draggedOverOverlay : '';
- overlayClassName += (this.props.draggingTab ? overlay.enabledForDrop : '');
-
- return (
-
- );
- }
-
- private onDragEnter = (e) => {
- e.preventDefault();
- e.stopPropagation();
- }
-
- private onDragLeave = () => {
- this.setState(({ draggedOver: false }));
- }
-
- private onDragOver = (e: DragEvent) => {
- e.preventDefault();
- e.stopPropagation();
- this.setState(({ draggedOver: true }));
- }
-
- private onDrop = (e: DragEvent) => {
- const tabData = JSON.parse(e.dataTransfer.getData('application/json'));
- const tabId = tabData.tabId;
- const docToSplit = this.props.primaryEditor.documents[tabId];
- this.props.splitTab(docToSplit.contentType, tabId);
- this.setState(({ draggedOver: false }));
-
- e.preventDefault();
- e.stopPropagation();
- }
-}
-
-const mapStateToProps = (state: RootState): RightContentOverlayProps => ({
- draggingTab: state.editor.draggingTab,
- primaryEditor: state.editor.editors[Constants.EDITOR_KEY_PRIMARY]
-});
-
-const mapDispatchToProps = (dispatch): RightContentOverlayProps => ({
- splitTab: (contentType: string, tabId: string) =>
- dispatch(EditorActions.splitTab(contentType, tabId, Constants.EDITOR_KEY_PRIMARY, Constants.EDITOR_KEY_SECONDARY))
-});
-
-export const RightContentOverlay = connect(mapStateToProps, mapDispatchToProps)(RightContentOverlayComponent);
diff --git a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/tabbedDocument.tsx b/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/tabbedDocument.tsx
deleted file mode 100644
index 8bddbad1d..000000000
--- a/packages/app/client/src/ui/shell/multiTabs/tabbedDocument/tabbedDocument.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license.
-//
-// Microsoft Bot Framework: http://botframework.com
-//
-// Bot Framework Emulator Github:
-// https://github.com/Microsoft/BotFramwork-Emulator
-//
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License:
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-import * as React from 'react';
-
-import { TabbedDocumentContentWrapper } from './contentWrapper/contentWrapper';
-
-export class TabbedDocument extends React.Component<{}> {
- constructor(props: {}) {
- super(props);
- }
-
- render() {
- return false;
- }
-}
-
-export const Tab = props => props.children;
-export const Content = props =>
-
- { props.children }
- ;
From 30505ecfae8342ae16a866883bfcc9b7d00f663d Mon Sep 17 00:00:00 2001
From: Tony Anziano
Date: Wed, 28 Nov 2018 10:53:59 -0800
Subject: [PATCH 09/11] Added unit tests.
---
.../ui/shell/mdi/documents/documents.spec.tsx | 82 ++++++
.../shell/mdi/documents/documentsContainer.ts | 4 +-
.../app/client/src/ui/shell/mdi/mdi.spec.tsx | 165 ++++-------
.../client/src/ui/shell/mdi/tab/tab.spec.tsx | 185 +++++++++++++
.../src/ui/shell/mdi/tabBar/tabBar.spec.tsx | 260 ++++++++++++++++++
.../ui/shell/mdi/tabBar/tabBarContainer.ts | 6 +-
6 files changed, 585 insertions(+), 117 deletions(-)
create mode 100644 packages/app/client/src/ui/shell/mdi/documents/documents.spec.tsx
create mode 100644 packages/app/client/src/ui/shell/mdi/tab/tab.spec.tsx
create mode 100644 packages/app/client/src/ui/shell/mdi/tabBar/tabBar.spec.tsx
diff --git a/packages/app/client/src/ui/shell/mdi/documents/documents.spec.tsx b/packages/app/client/src/ui/shell/mdi/documents/documents.spec.tsx
new file mode 100644
index 000000000..a51b67efa
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/documents/documents.spec.tsx
@@ -0,0 +1,82 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { mount } from 'enzyme';
+import { createStore } from 'redux';
+import { Provider } from 'react-redux';
+import { DocumentsContainer } from './documentsContainer';
+
+const mockTabbedDocument = class Document extends React.Component {
+ public render() {
+ return
;
+ }
+};
+
+const mockEditorFactory = class Factory extends React.Component {
+ public render() {
+ return
;
+ }
+};
+
+jest.mock('../../../editor', () => ({ get EditorFactory() { return mockEditorFactory; }}));
+jest.mock('../../../../data/reducer/editor', () => ({}));
+jest.mock('../tabbedDocument', () => ({ get TabbedDocument() { return mockTabbedDocument; } }));
+
+describe('Documents', () => {
+ let mockStore;
+ let wrapper;
+
+ beforeEach(() => {
+ mockStore = createStore((_state, _action) => ({ editor: { editors: { primary: {} } } }));
+ });
+
+ it('should not render anything if there are no documentss', () => {
+ wrapper = mount(
+
+
+
+ );
+ expect(wrapper.html()).toBe(null);
+ });
+
+ it('should render a tabbedDocument if there are documents', () => {
+ mockStore = createStore((_state, _action) => ({ editor: { editors: { primary: { tabOrder: ['doc1'] } } } }));
+ wrapper = mount(
+
+
+
+ );
+ expect(wrapper.html()).not.toBe(null);
+ });
+});
diff --git a/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts b/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
index d1ec70267..76e024271 100644
--- a/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
+++ b/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
@@ -37,10 +37,10 @@ import { RootState } from '../../../../data/store';
function mapStateToProps(state: RootState, ownProps: DocumentsProps): DocumentsProps {
return {
+ ...ownProps,
activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
documents: state.editor.editors[ownProps.owningEditor].documents,
- tabOrder: state.editor.editors[ownProps.owningEditor].tabOrder,
- ...ownProps
+ tabOrder: state.editor.editors[ownProps.owningEditor].tabOrder
};
}
diff --git a/packages/app/client/src/ui/shell/mdi/mdi.spec.tsx b/packages/app/client/src/ui/shell/mdi/mdi.spec.tsx
index a270cfec7..762ddca36 100644
--- a/packages/app/client/src/ui/shell/mdi/mdi.spec.tsx
+++ b/packages/app/client/src/ui/shell/mdi/mdi.spec.tsx
@@ -1,130 +1,75 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
import { mount } from 'enzyme';
import * as React from 'react';
import { Provider } from 'react-redux';
-import { combineReducers, createStore } from 'redux';
-import * as Constants from '../../../constants';
-import {
- CONTENT_TYPE_APP_SETTINGS,
- CONTENT_TYPE_LIVE_CHAT,
- CONTENT_TYPE_TRANSCRIPT,
- CONTENT_TYPE_WELCOME_PAGE
-} from '../../../constants';
-import { load, setActive } from '../../../data/action/botActions';
-import { closeDocument, newDocument } from '../../../data/action/chatActions';
-import * as EditorActions from '../../../data/action/editorActions';
-import { setActiveTab } from '../../../data/action/editorActions';
-import { bot } from '../../../data/reducer/bot';
-import { chat } from '../../../data/reducer/chat';
-import { editor } from '../../../data/reducer/editor';
-import { presentation } from '../../../data/reducer/presentation';
-import { MDIComponent } from './mdi';
+import { createStore } from 'redux';
import { MDI } from './mdiContainer';
-jest.mock('../../dialogs', () => ({
- DialogService: {
- showDialog: () => Promise.resolve(true),
- hideDialog: () => Promise.resolve(false),
+const mockTabBarContainer = class TabBar extends React.Component {
+ public render() {
+ return
;
}
-}));
-jest.mock('../multiTabs/index', () => ({
- MultiTabs: () =>
,
- TabBar: () =>
,
- ContentOverlay: () =>
,
- TabbedDocumentContentWrapper: () =>
,
- TabbedDocument: () =>
,
- LeftContentOverlay: () =>
,
- RightContentOverlay: () =>
,
- Tab: props => props.children,
- Content: props => props.children
-}));
-jest.mock('./tab/tab', () => ({
- Tab: () =>
-}));
-jest.mock('./tab/tab.scss', () => ({}));
-jest.mock('../../editor/', () => ({
- EditorFactory: () =>
-}));
+};
+const mockDocumentsContainer = class Documents extends React.Component {
+ public render() {
+ return
;
+ }
+};
-const mockStore = createStore(combineReducers({ bot, chat, editor, presentation }), {});
+const mockStore = createStore((_state, _action) => ({ presentation: { enabled: false } }));
jest.mock('../../../data/store', () => ({
get store() {
return mockStore;
}
}));
-describe('The ServicesExplorer component should', () => {
- let parent;
- let node;
- let dispatchSpy;
+jest.mock('./tabBar/tabBarContainer', () => ({ get TabBarContainer() { return mockTabBarContainer; } }));
+jest.mock('./mdi.scss', () => ({}));
+jest.mock('./documents/documentsContainer', () => ({ get DocumentsContainer() { return mockDocumentsContainer; } }));
- beforeEach(() => {
- const mockBot = JSON.parse(`{
- "name": "TestBot",
- "description": "",
- "padlock": "",
- "services": [{
- "type": "luis",
- "name": "https://testbot.botframework.com/api/messagesv3",
- "id": "https://testbot.botframework.com/api/messagesv3",
- "appId": "51fc2648-1190-44fa-9559-87b11b1d0014",
- "appPassword": "gfdsgdfs56543gbfd564gfsdbvc",
- "endpoint": "https://testbot.botframework.com/api/messagesv3"
- }]
- }`);
+describe('MDI', () => {
+ let wrapper;
- mockStore.dispatch(load([mockBot]));
- mockStore.dispatch(setActive(mockBot));
- mockStore.dispatch(EditorActions.open({
- contentType: Constants.CONTENT_TYPE_LIVE_CHAT,
- documentId: 'mockbot',
- fileName: 'transcrpt.transcript',
- isGlobal: false
- }));
- mockStore.dispatch(newDocument('mockbot', 'livechat', {
- endpointId: 'https://testbot.botframework.com/api/messagesv3'
- }));
- dispatchSpy = jest.spyOn(mockStore, 'dispatch');
- parent = mount(
-
- );
- node = parent.find(MDIComponent);
+ beforeEach(() => {
+ wrapper = mount(
+
+
+ );
});
it('should render deeply', () => {
- expect(parent.find(MDI)).not.toBe(null);
- expect(parent.find(MDIComponent)).not.toBe(null);
- });
-
- it('should get the expected tab label for each of the content types', () => {
- const instance = node.instance();
- const liveChatLabel = instance.getTabLabel({ contentType: CONTENT_TYPE_LIVE_CHAT, documentId: 'mockbot' });
- expect(liveChatLabel).toBe('Live Chat (https://testbot.botframework.com/api/messagesv3)');
-
- const transcriptLabel = instance.getTabLabel({
- contentType: CONTENT_TYPE_TRANSCRIPT,
- documentId: 'mockbot',
- fileName: 'transcript.transcript'
- });
- expect(transcriptLabel).toBe('transcript.transcript');
-
- const welcomeLabel = instance.getTabLabel({ contentType: CONTENT_TYPE_WELCOME_PAGE });
- expect(welcomeLabel).toBe('Welcome');
-
- const appSettingsLabel = instance.getTabLabel({ contentType: CONTENT_TYPE_APP_SETTINGS });
- expect(appSettingsLabel).toBe('Emulator Settings');
- });
-
- it('should set the active tab when a tab is clicked', () => {
- const instance = node.instance();
- instance.handleTabChange(0);
-
- expect(dispatchSpy).toHaveBeenCalledWith(setActiveTab(instance.props.tabOrder[0]));
- });
-
- it('should close the tab when the close button on the tab is clicked', () => {
- const instance = node.instance();
- instance.props.closeTab('mockbot');
-
- expect(dispatchSpy).toHaveBeenLastCalledWith(closeDocument('mockbot'));
+ expect(wrapper.html()).not.toBe(null);
});
});
diff --git a/packages/app/client/src/ui/shell/mdi/tab/tab.spec.tsx b/packages/app/client/src/ui/shell/mdi/tab/tab.spec.tsx
new file mode 100644
index 000000000..641bf94cb
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tab/tab.spec.tsx
@@ -0,0 +1,185 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { mount } from 'enzyme';
+import { createStore } from 'redux';
+import { Provider } from 'react-redux';
+import { TabContainer } from './tabContainer';
+import { Tab } from './tab';
+import { toggleDraggingTab } from '../../../../data/action/editorActions';
+
+jest.mock('./tab.scss', () => ({}));
+jest.mock('../../../dialogs', () => ({}));
+
+describe('Tab', () => {
+ const mockOnCloseClick = jest.fn(() => null);
+ let mockStore;
+ let mockDispatch;
+ let wrapper;
+ let node;
+ let instance;
+
+ beforeEach(() => {
+ mockStore = createStore((_state, _action) => ({}));
+ mockDispatch = jest.spyOn(mockStore, 'dispatch');
+ wrapper = mount(
+
+
+
+ );
+ node = wrapper.find(Tab);
+ instance = node.instance();
+ });
+
+ it('should render deeply', () => {
+ expect(wrapper.find(Tab)).not.toBe(null);
+ });
+
+ it('should handle space and enter key presses to close the tab', () => {
+ const mockSpaceKeyPress = { key: ' ' };
+ const mockEnterKeyPress = { keyCode: 13 };
+ const mockSomeOtherKeyPress = { key: 'A', keyCode: 123 };
+
+ // simulate neither enter nor spacebar key press
+ instance.onCloseButtonKeyPress(mockSomeOtherKeyPress);
+ expect(mockOnCloseClick).not.toHaveBeenCalled();
+
+ // simulate enter key press
+ instance.onCloseButtonKeyPress(mockEnterKeyPress);
+ expect(mockOnCloseClick).toHaveBeenCalledTimes(1);
+
+ // simulate space key press
+ instance.onCloseButtonKeyPress(mockSpaceKeyPress);
+ expect(mockOnCloseClick).toHaveBeenCalledTimes(2);
+
+ expect(mockOnCloseClick).toHaveBeenCalledWith('someDocId');
+ });
+
+ it('should handle a mouse click to close the tab', () => {
+ const mockStopPropagation = jest.fn(() => null);
+ const mockSomeOtherKeyPress = { stopPropagation: mockStopPropagation };
+
+ // simulate neither enter nor spacebar key press
+ instance.onCloseClick(mockSomeOtherKeyPress);
+ expect(mockStopPropagation).toHaveBeenCalledTimes(1);
+ expect(mockOnCloseClick).toHaveBeenCalledWith('someDocId');
+ });
+
+ it('should handle a drag start', () => {
+ const mockSetData = jest.fn((...args) => null);
+ const mockDragEvent = {
+ dataTransfer: {
+ setData: mockSetData
+ }
+ };
+ instance.setState({ owningEditor: 'primary' });
+
+ instance.onDragStart(mockDragEvent);
+ expect(mockSetData).toHaveBeenCalledWith(
+ 'application/json',
+ JSON.stringify({ tabId: 'someDocId', editorKey: 'primary' })
+ );
+ expect(mockDispatch).toHaveBeenCalledWith(toggleDraggingTab(true));
+ });
+
+ it('should handle a drag end', () => {
+ instance.onDragEnd();
+ expect(mockDispatch).toHaveBeenCalledWith(toggleDraggingTab(false));
+ });
+
+ it('should handle a drag over', () => {
+ const mockPreventDefault = jest.fn(() => null);
+ const mockStopPropagation = jest.fn(() => null);
+ const mockDragEvent = { preventDefault: mockPreventDefault, stopPropagation: mockStopPropagation };
+ instance.setState({ draggedOver: false });
+
+ instance.onDragOver(mockDragEvent);
+
+ expect(mockPreventDefault).toHaveBeenCalled();
+ expect(mockStopPropagation).toHaveBeenCalled();
+ expect(instance.state.draggedOver).toBe(true);
+ });
+
+ it('should handle a drag enter', () => {
+ const mockPreventDefault = jest.fn(() => null);
+ const mockDragEvent = { preventDefault: mockPreventDefault };
+
+ instance.onDragEnter(mockDragEvent);
+
+ expect(mockPreventDefault).toHaveBeenCalled();
+ });
+
+ it('should handle a drag leave', () => {
+ instance.setState({ draggedOver: true });
+
+ instance.onDragLeave();
+
+ expect(instance.state.draggedOver).toBe(false);
+ });
+
+ it('should handle a drop', () => {
+ const mockPreventDefault = jest.fn(() => null);
+ const mockStopPropagation = jest.fn(() => null);
+ let mockGetData = jest.fn(() => '{ "tabId": "someDocId" }');
+ let mockDragEvent = {
+ preventDefault: mockPreventDefault,
+ stopPropagation: mockStopPropagation,
+ dataTransfer: {
+ getData: mockGetData
+ }
+ };
+ instance.setState({ draggedOver: true });
+
+ // drop tab on same tab
+ instance.onDrop(mockDragEvent);
+
+ expect(mockPreventDefault).toHaveBeenCalled();
+ expect(mockStopPropagation).toHaveBeenCalled();
+ expect(instance.state.draggedOver).toBe(false);
+ expect(mockDispatch).not.toHaveBeenCalled();
+
+ // drop tab on different tab
+ mockGetData = jest.fn(() => '{ "tabId": "someOtherDoc" }');
+ mockDragEvent = {
+ preventDefault: mockPreventDefault,
+ stopPropagation: mockStopPropagation,
+ dataTransfer: {
+ getData: mockGetData
+ }
+ };
+ instance.onDrop(mockDragEvent);
+
+ expect(mockDispatch).toHaveBeenCalled();
+ });
+});
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.spec.tsx b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.spec.tsx
new file mode 100644
index 000000000..7c20fc0c3
--- /dev/null
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.spec.tsx
@@ -0,0 +1,260 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license.
+//
+// Microsoft Bot Framework: http://botframework.com
+//
+// Bot Framework Emulator Github:
+// https://github.com/Microsoft/BotFramwork-Emulator
+//
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+//
+// MIT License:
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+import * as React from 'react';
+import { mount } from 'enzyme';
+import { Provider } from 'react-redux';
+import { createStore } from 'redux';
+import { enable } from '../../../../data/action/presentationActions';
+import { setActiveTab, appendTab, splitTab } from '../../../../data/action/editorActions';
+import { TabBarContainer } from './tabBarContainer';
+import { TabBar } from './tabBar';
+import {
+ CONTENT_TYPE_APP_SETTINGS,
+ CONTENT_TYPE_LIVE_CHAT,
+ CONTENT_TYPE_TRANSCRIPT,
+ CONTENT_TYPE_WELCOME_PAGE
+} from '../../../../constants';
+
+const mockTab = class Tab extends React.Component {
+ public render() {
+ return
;
+ }
+};
+
+jest.mock('./tabBar.scss', () => ({}));
+jest.mock('../../../../data/reducer/editor', () => ({ Document: {}, Editor: {} }));
+jest.mock('../../../../data/editorHelpers', () => ({
+ getTabGroupForDocument: () => null,
+ getOtherTabGroup: (tabGroup: string) => tabGroup === 'primary' ? 'secondary' : 'primary'
+}));
+jest.mock('../tab/tab', () => ({ get Tab() { return mockTab; } }));
+
+describe('TabBar', () => {
+ let wrapper;
+ let node;
+ let instance;
+ let mockStore;
+ let mockDispatch;
+
+ beforeEach(() => {
+ const defaultState = {
+ bot: {
+ activeBot: {
+ services: [{
+ id: 'someEndpointId',
+ name: 'myEndpoint'
+ }]
+ }
+ },
+ chat: {
+ chats: {
+ doc1: { endpointId: 'someEndpointId' }
+ }
+ },
+ editor: {
+ editors: {
+ primary: {
+ activeDocumentId: 'doc1',
+ tabOrder: ['doc1'],
+ documents: {
+ doc1: { contentType: 'transcript', documentId: 'doc1' }
+ }
+ }
+ }
+ }
+ };
+ mockStore = createStore((_state, _action) => defaultState);
+ mockDispatch = jest.spyOn(mockStore, 'dispatch');
+ wrapper = mount(
+
+
+
+ );
+ node = wrapper.find(TabBar);
+ instance = node.instance();
+ });
+
+ it('should enable presentation mode', () => {
+ instance.onPresentationModeClick();
+
+ expect(mockDispatch).toHaveBeenCalledWith(enable());
+ });
+
+ it('should load widgets', () => {
+ // no widgets
+ let dumbWrapper = mount( );
+ let dumbNode = dumbWrapper.find(TabBar);
+ let dumbInstance = dumbNode.instance() as any;
+ expect(dumbInstance.widgets).toHaveLength(0);
+
+ // split widget
+ dumbWrapper = mount( );
+ dumbNode = dumbWrapper.find(TabBar);
+ dumbInstance = dumbNode.instance() as any;
+ expect(dumbInstance.widgets).toHaveLength(1);
+
+ // split & presentation widgets
+ dumbWrapper = mount(
+
+ );
+ dumbNode = dumbWrapper.find(TabBar);
+ dumbInstance = dumbNode.instance() as any;
+ expect(dumbInstance.widgets).toHaveLength(2);
+
+ dumbWrapper = mount(
+
+ );
+ dumbNode = dumbWrapper.find(TabBar);
+ dumbInstance = dumbNode.instance() as any;
+ expect(dumbInstance.widgets).toHaveLength(2);
+ });
+
+ it('should load tabs', () => {
+ const tabs = instance.tabs;
+
+ expect(tabs).toHaveLength(1);
+ });
+
+ it('should handle a tab click', () => {
+ instance.handleTabClick(0);
+
+ expect(mockDispatch).toHaveBeenCalledWith(setActiveTab('doc1'));
+ });
+
+ it('should handle a key press', () => {
+ const mockOtherKeyPress = { key: 'a' };
+ const mockSpaceKeyPress = { key: ' ' };
+ const mockEnterKeyPress = { key: 'enter' };
+
+ // simulate neither key press
+ instance.handleKeyDown(mockOtherKeyPress, 0);
+ expect(mockDispatch).not.toHaveBeenCalled();
+
+ // simulate space key press
+ instance.handleKeyDown(mockSpaceKeyPress, 0);
+ expect(mockDispatch).toHaveBeenCalledWith(setActiveTab('doc1'));
+
+ // simulate enter key press
+ instance.handleKeyDown(mockEnterKeyPress, 0);
+ expect(mockDispatch).toHaveBeenCalledTimes(2);
+ });
+
+ it('should handle a split click', () => {
+ instance.onSplitClick();
+
+ expect(mockDispatch).toHaveBeenCalledWith(splitTab('transcript', 'doc1', 'primary', 'secondary'));
+ });
+
+ it('should handle a drag enter event', () => {
+ const mockPreventDefault = jest.fn(() => null);
+ const mockDragEvent = { preventDefault: mockPreventDefault };
+
+ instance.onDragEnter(mockDragEvent);
+ expect(mockPreventDefault).toHaveBeenCalled();
+ });
+
+ it('should handle a drag over event', () => {
+ const mockStopPropagation = jest.fn(() => null);
+ const mockPreventDefault = jest.fn(() => null);
+ const mockDragEvent = { preventDefault: mockPreventDefault, stopPropagation: mockStopPropagation };
+ instance.setState({ draggedOver: false });
+
+ instance.onDragOver(mockDragEvent);
+
+ expect(mockStopPropagation).toHaveBeenCalled();
+ expect(mockPreventDefault).toHaveBeenCalled();
+ expect(instance.state.draggedOver).toBe(true);
+ });
+
+ it('should handle a drag leave event', () => {
+ instance.setState({ draggedOver: true });
+
+ instance.onDragLeave({});
+
+ expect(instance.state.draggedOver).toBe(false);
+ });
+
+ it('should handle a drop event', () => {
+ const mockStopPropagation = jest.fn(() => null);
+ const mockPreventDefault = jest.fn(() => null);
+ const mockDragEvent = {
+ preventDefault: mockPreventDefault,
+ stopPropagation: mockStopPropagation,
+ dataTransfer: {
+ getData: () => '{ "tabId": "doc2", "editorKey": "secondary" }'
+ }
+ };
+ instance.setState({ draggedOver: true });
+
+ instance.onDrop(mockDragEvent);
+
+ expect(mockDispatch).toHaveBeenCalledWith(appendTab('secondary', 'primary', 'doc2'));
+ });
+
+ it('should save a ref to the scrollable tabs element', () => {
+ instance.saveScrollable(':)');
+
+ expect(instance._scrollable).toEqual(':)');
+ });
+
+ it('should push a tab element ref into the childRefs array', () => {
+ const mockElement = { isTabElement: 'yes!' };
+ instance.setRef(mockElement);
+
+ expect(instance.childRefs.some(elem => elem === mockElement)).toBe(true);
+ });
+
+ it('should get a tab label based on the document', () => {
+ let result = instance.getTabLabel({ contentType: CONTENT_TYPE_APP_SETTINGS });
+ expect(result).toBe('Emulator Settings');
+
+ result = instance.getTabLabel({ contentType: CONTENT_TYPE_WELCOME_PAGE });
+ expect(result).toBe('Welcome');
+
+ result = instance.getTabLabel({ contentType: CONTENT_TYPE_TRANSCRIPT });
+ expect(result).toBe('Transcript');
+ result = instance.getTabLabel({ contentType: CONTENT_TYPE_TRANSCRIPT, fileName: 'test.transcript' });
+ expect(result).toBe('test.transcript');
+
+ result = instance.getTabLabel({ contentType: CONTENT_TYPE_LIVE_CHAT, documentId: 'doc1' });
+ expect(result).toBe(`Live Chat (myEndpoint)`);
+
+ result = instance.getTabLabel({});
+ expect(result).toBe('');
+ });
+});
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/tabBarContainer.ts b/packages/app/client/src/ui/shell/mdi/tabBar/tabBarContainer.ts
index 0ce5aaa75..7a454bfed 100644
--- a/packages/app/client/src/ui/shell/mdi/tabBar/tabBarContainer.ts
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/tabBarContainer.ts
@@ -33,7 +33,7 @@
import { connect } from 'react-redux';
import { TabBarProps, TabBar } from './tabBar';
-import { RootState } from 'src/data/store';
+import { RootState } from '../../../../data/store';
import { splitTab, appendTab, setActiveTab, close } from '../../../../data/action/editorActions';
import { enable as enablePresentationMode } from '../../../../data/action/presentationActions';
import { closeDocument } from '../../../../data/action/chatActions';
@@ -53,14 +53,10 @@ const mapStateToProps = (state: RootState, ownProps: TabBarProps): TabBarProps =
const mapDispatchToProps = (dispatch): TabBarProps => ({
splitTab: (contentType: string, documentId: string, srcEditorKey: string, destEditorKey: string) =>
dispatch(splitTab(contentType, documentId, srcEditorKey, destEditorKey)),
-
appendTab: (srcEditorKey: string, destEditorKey: string, tabId: string) =>
dispatch(appendTab(srcEditorKey, destEditorKey, tabId)),
-
enablePresentationMode: () => dispatch(enablePresentationMode()),
-
setActiveTab: (documentId: string) => dispatch(setActiveTab(documentId)),
-
closeTab: (documentId: string) => {
dispatch(close(getTabGroupForDocument(documentId), documentId));
dispatch(closeDocument(documentId));
From dbd646bee5739ad56debd7b98cede7622578d225 Mon Sep 17 00:00:00 2001
From: Tony Anziano
Date: Wed, 28 Nov 2018 11:43:35 -0800
Subject: [PATCH 10/11] Changed a let to const.
---
packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
index 88083848a..0bbcd5257 100644
--- a/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
+++ b/packages/app/client/src/ui/shell/mdi/tabBar/tabBar.tsx
@@ -130,7 +130,7 @@ export class TabBar extends React.Component {
activeDoc.contentType === Constants.CONTENT_TYPE_LIVE_CHAT);
const splitEnabled = Object.keys(this.props.documents).length > 1;
- let widgets: JSX.Element[] = [];
+ const widgets: JSX.Element[] = [];
if (presentationEnabled) {
widgets.push(
From 8154e1393c41faa139203c84bb95de279e8e2354 Mon Sep 17 00:00:00 2001
From: Tony Anziano
Date: Wed, 28 Nov 2018 16:45:31 -0800
Subject: [PATCH 11/11] Assessed PR comments.
---
.../app/client/src/ui/shell/mdi/documents/documents.tsx | 4 ----
.../src/ui/shell/mdi/documents/documentsContainer.ts | 7 ++++---
packages/app/client/src/ui/shell/mdi/mdi.tsx | 4 ----
.../src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx | 6 +-----
4 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/packages/app/client/src/ui/shell/mdi/documents/documents.tsx b/packages/app/client/src/ui/shell/mdi/documents/documents.tsx
index ffe789397..12cb25a3e 100644
--- a/packages/app/client/src/ui/shell/mdi/documents/documents.tsx
+++ b/packages/app/client/src/ui/shell/mdi/documents/documents.tsx
@@ -44,10 +44,6 @@ export interface DocumentsProps {
}
export class Documents extends React.Component {
- constructor(props: DocumentsProps) {
- super(props);
- }
-
public render(): JSX.Element[] {
const { activeDocumentId = '', tabOrder = [], documents = {} } = this.props;
diff --git a/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts b/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
index 76e024271..ce6d3f56f 100644
--- a/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
+++ b/packages/app/client/src/ui/shell/mdi/documents/documentsContainer.ts
@@ -36,11 +36,12 @@ import { Documents, DocumentsProps } from './documents';
import { RootState } from '../../../../data/store';
function mapStateToProps(state: RootState, ownProps: DocumentsProps): DocumentsProps {
+ const { editors } = state.editor;
return {
...ownProps,
- activeDocumentId: state.editor.editors[ownProps.owningEditor].activeDocumentId,
- documents: state.editor.editors[ownProps.owningEditor].documents,
- tabOrder: state.editor.editors[ownProps.owningEditor].tabOrder
+ activeDocumentId: editors[ownProps.owningEditor].activeDocumentId,
+ documents: editors[ownProps.owningEditor].documents,
+ tabOrder: editors[ownProps.owningEditor].tabOrder
};
}
diff --git a/packages/app/client/src/ui/shell/mdi/mdi.tsx b/packages/app/client/src/ui/shell/mdi/mdi.tsx
index e44bdc279..123a9c359 100644
--- a/packages/app/client/src/ui/shell/mdi/mdi.tsx
+++ b/packages/app/client/src/ui/shell/mdi/mdi.tsx
@@ -38,10 +38,6 @@ import * as styles from './mdi.scss';
import { DocumentsContainer } from './documents/documentsContainer';
export class MDIComponent extends React.Component {
- constructor(props: MDIProps) {
- super(props);
- }
-
public render(): React.ReactNode {
const { presentationModeEnabled } = this.props;
return (
diff --git a/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx b/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
index 7eaf71965..346f6ffa7 100644
--- a/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
+++ b/packages/app/client/src/ui/shell/mdi/tabbedDocument/tabbedDocument.tsx
@@ -42,11 +42,7 @@ export interface TabbedDocumentProps {
}
export class TabbedDocument extends React.Component {
- constructor(props: TabbedDocumentProps) {
- super(props);
- }
-
- render() {
+ public render() {
const { children, documentId, hidden } = this.props;
return (