From 0866d0d4678fef21a7b3cbdeb0273e9aaabcb1ca Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Tue, 17 Sep 2019 10:35:51 -0700 Subject: [PATCH 01/14] Allows logs to individually refresh on clicking 'try it now' --- packages/api-explorer/__tests__/Doc.test.jsx | 18 ++++++++++++++++ packages/api-explorer/src/Doc.jsx | 10 +++++++++ packages/api-logs/__tests__/index.test.jsx | 18 ++++++++++++++++ packages/api-logs/index.jsx | 22 +++++++++++++++++++- 4 files changed, 67 insertions(+), 1 deletion(-) diff --git a/packages/api-explorer/__tests__/Doc.test.jsx b/packages/api-explorer/__tests__/Doc.test.jsx index 7a38882cc..ee5c52f23 100644 --- a/packages/api-explorer/__tests__/Doc.test.jsx +++ b/packages/api-explorer/__tests__/Doc.test.jsx @@ -341,6 +341,24 @@ describe('Response Schema', () => { }); }); +describe('RenderLogs', () => { + test('should return a log component', () => { + const doc = mount(); + doc.setProps({ Logs: {} }); + const res = doc.instance().renderLogs(); + expect(res).toBeTruthy(); + }); + + test('should set state when resetTryItRequest callback fires', () => { + const doc = mount(); + doc.setState({ tryItRequestFired: true }); + doc.setProps({ Logs: {} }); + doc.instance().resetTryItRequest(false); + + expect(doc.instance().state.tryItRequestFired).toBe(false); + }); +}); + describe('themes', () => { test('should output code samples and responses in the right column', () => { const doc = mount(); diff --git a/packages/api-explorer/src/Doc.jsx b/packages/api-explorer/src/Doc.jsx index cb57eb713..24b08c803 100644 --- a/packages/api-explorer/src/Doc.jsx +++ b/packages/api-explorer/src/Doc.jsx @@ -34,6 +34,7 @@ class Doc extends React.Component { needsAuth: false, result: null, showEndpoint: false, + tryItRequestFired: false, }; this.onChange = this.onChange.bind(this); this.oas = new Oas(this.props.oas, this.props.user); @@ -76,6 +77,7 @@ class Doc extends React.Component { this.setState({ loading: false, result: await parseResponse(har, res), + tryItRequestFired: true, }); }); } @@ -178,6 +180,12 @@ class Doc extends React.Component { ); } + resetTryItRequest(e) { + this.setState({ + tryItRequestFired: e, + }); + } + renderCodeSample() { let examples; try { @@ -256,6 +264,8 @@ class Doc extends React.Component { url, method, }} + tryItRequestFired={this.state.tryItRequestFired} + onReset={this.resetTryItRequest()} /> ); } diff --git a/packages/api-logs/__tests__/index.test.jsx b/packages/api-logs/__tests__/index.test.jsx index 31ad7cbd1..d80c65e28 100644 --- a/packages/api-logs/__tests__/index.test.jsx +++ b/packages/api-logs/__tests__/index.test.jsx @@ -33,6 +33,8 @@ describe('Logs', () => { id: 'someid', }, baseUrl, + onReset: jest.fn(), + tryItRequestFired: false, }; test('should not render if user_data does not have id or keys.id', () => { @@ -63,6 +65,22 @@ describe('Logs', () => { expect(comp.find('.loading-container').length).toBe(1); }); + test('should invoke callback', () => { + const comp = shallow(); + comp.instance().resetTryItRequest(); + expect(comp.instance().props.onReset).toHaveBeenCalledWith(false); + }); + + test('should call refresh and set state when props are updated via Doc parent', done => { + const comp = shallow(); + comp.instance().refresh = jest.fn(); + comp.setProps({ tryItRequestFired: true }); + + expect(comp.instance().refresh).toHaveBeenCalledTimes(1); + expect(comp.instance().state.initialLoad).toBe(false); + done(); + }); + test('should fetch based on query with page/limit', async () => { const comp = shallow(); diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index 7dba2926b..891a709a8 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -56,6 +56,7 @@ class Logs extends React.Component { constructor(props) { super(props); this.state = { + initialLoad: true, loading: false, stale: false, logs: [], @@ -77,6 +78,17 @@ class Logs extends React.Component { this.refresh(group); } + componentDidUpdate(prevProp) { + if ( + this.props.tryItRequestFired && + this.props.tryItRequestFired !== prevProp.tryItRequestFired + ) { + const { group } = this.state; + this.refresh(group); + this.state.initialLoad = false; + } + } + componentWillUnmount() { emitter.removeListener('changeGroup', this.changeGroup); } @@ -136,6 +148,10 @@ class Logs extends React.Component { }); } + resetTryItRequest() { + this.props.onReset(false); + } + visitLogItem(log) { const { baseUrl } = this.props; window.open(`${baseUrl}logs/${log._id}`); @@ -183,7 +199,7 @@ class Logs extends React.Component { renderTable() { const { loading, logs } = this.state; - if (loading) { + if (this.state.initialLoad && loading) { return (
{React.createElement(LoadingSvg, { className: 'normal' })} @@ -251,10 +267,14 @@ Logs.propTypes = { keys: PropTypes.array, id: PropTypes.string, }), + tryItRequestFired: PropTypes.bool, + onReset: PropTypes.func, }; Logs.defaultProps = { user: {}, + tryItRequestFired: false, + onReset: () => {}, }; module.exports = Logs; From 108b186f2208ee5bcdbc146aaac73971f8699417 Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Tue, 17 Sep 2019 15:06:39 -0700 Subject: [PATCH 02/14] set state manually to not trigger lifecycle methods --- packages/api-explorer/src/Doc.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/api-explorer/src/Doc.jsx b/packages/api-explorer/src/Doc.jsx index 24b08c803..dd4914970 100644 --- a/packages/api-explorer/src/Doc.jsx +++ b/packages/api-explorer/src/Doc.jsx @@ -181,9 +181,7 @@ class Doc extends React.Component { } resetTryItRequest(e) { - this.setState({ - tryItRequestFired: e, - }); + this.state.tryItRequestFired = e; } renderCodeSample() { From d157f3b541a524f6f787d22cee0ebbaf2c4b3e5d Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Tue, 17 Sep 2019 15:11:00 -0700 Subject: [PATCH 03/14] removed invokation --- packages/api-explorer/src/Doc.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api-explorer/src/Doc.jsx b/packages/api-explorer/src/Doc.jsx index dd4914970..cab029e62 100644 --- a/packages/api-explorer/src/Doc.jsx +++ b/packages/api-explorer/src/Doc.jsx @@ -263,7 +263,7 @@ class Doc extends React.Component { method, }} tryItRequestFired={this.state.tryItRequestFired} - onReset={this.resetTryItRequest()} + onReset={this.resetTryItRequest} /> ); } From 50c62520ae6a3c6581d9db558e53b3a87fcdce37 Mon Sep 17 00:00:00 2001 From: Dom Harrington Date: Tue, 17 Sep 2019 18:42:18 -0700 Subject: [PATCH 04/14] Simplified the prop passing for the api-logs component - Removed the EventEmitter class and passed down `group`, `groups` and `changeGroup` from the top level - Removed concept of `stale` and always rerender - Removed visibility-sensor and just reload when we know we're going to be stale - Removed initialLoad and utilize the length of the `state.logs` array instead - this seems to be the same? --- packages/api-explorer/src/Doc.jsx | 22 +++-- packages/api-explorer/src/index.jsx | 24 +++++ packages/api-logs/index.jsx | 130 +++++++++------------------- 3 files changed, 79 insertions(+), 97 deletions(-) diff --git a/packages/api-explorer/src/Doc.jsx b/packages/api-explorer/src/Doc.jsx index cab029e62..f39f9545b 100644 --- a/packages/api-explorer/src/Doc.jsx +++ b/packages/api-explorer/src/Doc.jsx @@ -34,7 +34,6 @@ class Doc extends React.Component { needsAuth: false, result: null, showEndpoint: false, - tryItRequestFired: false, }; this.onChange = this.onChange.bind(this); this.oas = new Oas(this.props.oas, this.props.user); @@ -77,7 +76,6 @@ class Doc extends React.Component { this.setState({ loading: false, result: await parseResponse(har, res), - tryItRequestFired: true, }); }); } @@ -180,10 +178,6 @@ class Doc extends React.Component { ); } - resetTryItRequest(e) { - this.state.tryItRequestFired = e; - } - renderCodeSample() { let examples; try { @@ -262,8 +256,10 @@ class Doc extends React.Component { url, method, }} - tryItRequestFired={this.state.tryItRequestFired} - onReset={this.resetTryItRequest} + result={this.state.result} + group={this.props.group} + groups={this.props.groups} + changeGroup={this.props.changeGroup} /> ); } @@ -406,6 +402,12 @@ Doc.propTypes = { tryItMetrics: PropTypes.func.isRequired, onAuthChange: PropTypes.func.isRequired, lazy: PropTypes.bool.isRequired, + group: PropTypes.string, + groups: PropTypes.arrayOf(PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string, + })), + changeGroup: PropTypes.func.isRequired, }; Doc.defaultProps = { @@ -419,6 +421,8 @@ Doc.defaultProps = { splitReferenceDocs: false, }, Logs: undefined, - user: undefined, + user: {}, baseUrl: '/', + group: '', + groups: [], }; diff --git a/packages/api-explorer/src/index.jsx b/packages/api-explorer/src/index.jsx index ad0429ad6..9f85275b0 100644 --- a/packages/api-explorer/src/index.jsx +++ b/packages/api-explorer/src/index.jsx @@ -29,8 +29,12 @@ class ApiExplorer extends React.Component { changeSelected: this.changeSelected, }, auth: getAuth(this.props.variables.user, this.props.oasFiles), + group: this.getGroup(), }; + this.changeGroup = this.changeGroup.bind(this); + this.groups = this.props.variables.user.keys && this.props.variables.user.keys.map(key => ({ id: key.id, name: key.name })); + this.lazyHash = this.buildLazyHash(); } @@ -42,6 +46,18 @@ class ApiExplorer extends React.Component { }); } + getGroup() { + if (this.props.variables.user.keys && this.props.variables.user.keys[0].id) { + return this.props.variables.user.keys[0].id; + } + + if (this.props.variables.user.id) { + return this.props.variables.user.id; + } + + return undefined; + } + setLanguage(language) { this.setState({ language }); Cookie.set('readme_language', language); @@ -70,6 +86,10 @@ class ApiExplorer extends React.Component { return this.props.oasFiles[apiSetting]; } + changeGroup(group) { + this.setState({ group }); + } + isLazy(index) { if (this.props.dontLazyLoad) return false; return this.lazyHash[index]; @@ -147,6 +167,9 @@ class ApiExplorer extends React.Component { setLanguage={this.setLanguage} flags={this.props.flags} user={this.props.variables.user} + group={this.state.group} + groups={this.groups} + changeGroup={this.changeGroup} Logs={this.props.Logs} baseUrl={this.props.baseUrl.replace(/\/$/, '')} appearance={this.props.appearance} @@ -188,6 +211,7 @@ ApiExplorer.propTypes = { variables: PropTypes.shape({ user: PropTypes.shape({ keys: PropTypes.array, + id: PropTypes.string, }).isRequired, defaults: PropTypes.arrayOf( PropTypes.shape({ name: PropTypes.string.isRequired, default: PropTypes.string.isRequired }), diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index 891a709a8..f4a52d015 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -2,7 +2,6 @@ const React = require('react'); const PropTypes = require('prop-types'); const querystring = require('querystring'); const VisibilitySensor = require('react-visibility-sensor'); -const EventsEmitter = require('events'); const LoadingSvg = props => ( ({ id: key.id, name: key.name })), }; this.renderSelect = this.renderSelect.bind(this); @@ -69,45 +49,33 @@ class Logs extends React.Component { this.renderTable = this.renderTable.bind(this); this.visitLogItem = this.visitLogItem.bind(this); this.changeGroup = this.changeGroup.bind(this); - this.onVisible = this.onVisible.bind(this); } componentDidMount() { - const { group } = this.state; - emitter.on('changeGroup', this.changeGroup); - this.refresh(group); + this.refresh(); } - componentDidUpdate(prevProp) { - if ( - this.props.tryItRequestFired && - this.props.tryItRequestFired !== prevProp.tryItRequestFired - ) { - const { group } = this.state; - this.refresh(group); - this.state.initialLoad = false; + componentDidUpdate(prevProps) { + // Refresh if the group has changed + if (this.props.group !== prevProps.group) { + // Setting logs to [] means we show the loading icon + // eslint-disable-next-line react/no-did-update-set-state + this.setState({ logs: [] }) + this.refresh(); } - } - componentWillUnmount() { - emitter.removeListener('changeGroup', this.changeGroup); + // Refresh if the result has changed (this means has "try it now" been called?) + if (this.props.result !== prevProps.result) { + this.refresh(); + } } onSelect(event) { - emitter.emit('changeGroup', event.target.value); - // this.changeGroup(event.target.value); - this.refresh(event.target.value); - } - - onVisible() { - const { stale, group } = this.state; - if (stale) { - this.refresh(group); - } + this.changeGroup(event.target.value); } - getData(group) { - const { query, baseUrl } = this.props; + getData() { + const { query, baseUrl, group } = this.props; this.setState({ loading: true }); const reqUrl = `${baseUrl}/api/logs?${querystring.stringify( @@ -128,18 +96,11 @@ class Logs extends React.Component { } changeGroup(group) { - selectedGroup = group; - this.setState({ - group, - stale: true, - }); + this.props.changeGroup(group) } - refresh(group) { - this.setState({ - stale: false, - }); - this.getData(group) + refresh() { + this.getData() .then(logs => { this.setState({ logs }); }) @@ -148,10 +109,6 @@ class Logs extends React.Component { }); } - resetTryItRequest() { - this.props.onReset(false); - } - visitLogItem(log) { const { baseUrl } = this.props; window.open(`${baseUrl}logs/${log._id}`); @@ -185,7 +142,7 @@ class Logs extends React.Component { } renderSelect() { - const { groups, group } = this.state; + const { groups, group } = this.props; if (groups && groups.length > 1) { return ( @@ -199,10 +156,10 @@ class Logs extends React.Component { renderTable() { const { loading, logs } = this.state; - if (this.state.initialLoad && loading) { + if (loading && logs.length === 0) { return (
- {React.createElement(LoadingSvg, { className: 'normal' })} +
); } @@ -233,29 +190,26 @@ class Logs extends React.Component { } render() { - const { group } = this.state; - const { query, baseUrl } = this.props; + const { query, baseUrl, group } = this.props; if (!group) return null; const url = `${baseUrl}/logs?${querystring.stringify(Object.assign({}, query, { id: group }))}`; return ( - -
-
-

Logs

-
-
- - View More - - {this.renderSelect()} -
+
+
+

Logs

+
+
+ + View More + + {this.renderSelect()}
-
{this.renderTable()}
- +
{this.renderTable()}
+
); } } @@ -263,20 +217,20 @@ class Logs extends React.Component { Logs.propTypes = { query: PropTypes.shape({}).isRequired, baseUrl: PropTypes.string.isRequired, - user: PropTypes.shape({ - keys: PropTypes.array, + group: PropTypes.string, + groups: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string, - }), - tryItRequestFired: PropTypes.bool, - onReset: PropTypes.func, + name: PropTypes.string, + })), + changeGroup: PropTypes.func.isRequired, + result: PropTypes.shape({}), }; Logs.defaultProps = { - user: {}, - tryItRequestFired: false, - onReset: () => {}, + group: '', + groups: [], + result: null, }; module.exports = Logs; module.exports.Logs = Logs; -module.exports.LogsEmitter = emitter; From 00c339d2e4b7b1a31fb8fe681cab18f8eb6fa479 Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Thu, 19 Sep 2019 16:46:40 -0700 Subject: [PATCH 05/14] module removal + test fixes --- packages/api-explorer/__tests__/Doc.test.jsx | 9 --- packages/api-explorer/src/Doc.jsx | 10 ++- packages/api-explorer/src/index.jsx | 4 +- packages/api-logs/__tests__/index.test.jsx | 81 +++++++------------- packages/api-logs/index.jsx | 15 ++-- 5 files changed, 43 insertions(+), 76 deletions(-) diff --git a/packages/api-explorer/__tests__/Doc.test.jsx b/packages/api-explorer/__tests__/Doc.test.jsx index ee5c52f23..9f6a5f913 100644 --- a/packages/api-explorer/__tests__/Doc.test.jsx +++ b/packages/api-explorer/__tests__/Doc.test.jsx @@ -348,15 +348,6 @@ describe('RenderLogs', () => { const res = doc.instance().renderLogs(); expect(res).toBeTruthy(); }); - - test('should set state when resetTryItRequest callback fires', () => { - const doc = mount(); - doc.setState({ tryItRequestFired: true }); - doc.setProps({ Logs: {} }); - doc.instance().resetTryItRequest(false); - - expect(doc.instance().state.tryItRequestFired).toBe(false); - }); }); describe('themes', () => { diff --git a/packages/api-explorer/src/Doc.jsx b/packages/api-explorer/src/Doc.jsx index f39f9545b..c708e12ec 100644 --- a/packages/api-explorer/src/Doc.jsx +++ b/packages/api-explorer/src/Doc.jsx @@ -403,10 +403,12 @@ Doc.propTypes = { onAuthChange: PropTypes.func.isRequired, lazy: PropTypes.bool.isRequired, group: PropTypes.string, - groups: PropTypes.arrayOf(PropTypes.shape({ - id: PropTypes.string, - name: PropTypes.string, - })), + groups: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string, + }), + ), changeGroup: PropTypes.func.isRequired, }; diff --git a/packages/api-explorer/src/index.jsx b/packages/api-explorer/src/index.jsx index 9f85275b0..24d36beb9 100644 --- a/packages/api-explorer/src/index.jsx +++ b/packages/api-explorer/src/index.jsx @@ -33,7 +33,9 @@ class ApiExplorer extends React.Component { }; this.changeGroup = this.changeGroup.bind(this); - this.groups = this.props.variables.user.keys && this.props.variables.user.keys.map(key => ({ id: key.id, name: key.name })); + this.groups = + this.props.variables.user.keys && + this.props.variables.user.keys.map(key => ({ id: key.id, name: key.name })); this.lazyHash = this.buildLazyHash(); } diff --git a/packages/api-logs/__tests__/index.test.jsx b/packages/api-logs/__tests__/index.test.jsx index d80c65e28..a25a1ea20 100644 --- a/packages/api-logs/__tests__/index.test.jsx +++ b/packages/api-logs/__tests__/index.test.jsx @@ -4,7 +4,7 @@ const React = require('react'); const { shallow } = require('enzyme'); const nock = require('nock'); -const { Logs, LogsEmitter } = require('../index.jsx'); +const { Logs } = require('../index.jsx'); const requestmodel = require('./fixtures/requestmodel.json'); const oas = require('./fixtures/oas.json'); const operation = require('./fixtures/operation.json'); @@ -26,18 +26,23 @@ describe('Logs', () => { url: `${oas.servers[0].url}${operation.path}`, method: operation.method, }, - user: { - name: 'Gilfoyle', - email: 'gilfoyle@piedpiper.com', - isAdmin: true, - id: 'someid', - }, baseUrl, - onReset: jest.fn(), - tryItRequestFired: false, + group: 'someid', + groups: [ + { + id: '1', + name: 'someid', + }, + { + id: '2', + name: 'anotherId', + }, + ], + changeGroup: jest.fn(), + result: {}, }; - test('should not render if user_data does not have id or keys.id', () => { + test('should not render if groups are not populated', () => { const noUser = { baseUrl, query: {} }; const comp = shallow(); @@ -65,20 +70,20 @@ describe('Logs', () => { expect(comp.find('.loading-container').length).toBe(1); }); - test('should invoke callback', () => { + test('should call refresh and set state when group props are updated via parent', done => { const comp = shallow(); - comp.instance().resetTryItRequest(); - expect(comp.instance().props.onReset).toHaveBeenCalledWith(false); + comp.instance().refresh = jest.fn(); + comp.setProps({ group: 'testnew' }); + expect(comp.instance().refresh).toHaveBeenCalledTimes(1); + expect(comp.instance().state.logs).toMatchObject([]); + done(); }); - test('should call refresh and set state when props are updated via Doc parent', done => { + test('should call refresh when result props are updated via parent', () => { const comp = shallow(); comp.instance().refresh = jest.fn(); - comp.setProps({ tryItRequestFired: true }); - + comp.setProps({ result: { newResult: true } }); expect(comp.instance().refresh).toHaveBeenCalledTimes(1); - expect(comp.instance().state.initialLoad).toBe(false); - done(); }); test('should fetch based on query with page/limit', async () => { @@ -88,7 +93,7 @@ describe('Logs', () => { .get('/api/logs') .query({ url: 'https%3A%2F%2Fdash.readme.io%2Fapi%2Fv1%2Fdocs%2F%7Bslug%7D', - id: null, + id: 'someid', method: 'delete', limit: 5, page: 0, @@ -130,24 +135,7 @@ describe('Logs', () => { const comp = shallow(); comp.setState({ logs: [requestmodel] }); - expect(comp.instance().state.group).toBe('someid'); - expect(comp.find('table').length).toBe(1); - }); - - test('should render with key', () => { - const userData = { - name: 'Gilfoyle', - email: 'gilfoyle@piedpiper.com', - isAdmin: true, - keys: [{ id: 'one', name: 'one' }, { id: 'two', name: 'two' }], - }; - props.user = userData; - - const comp = shallow(); - comp.setState({ logs: [requestmodel] }); - - expect(comp.instance().state.group).toBe('one'); - expect(comp.instance().state.groups.length).toBe(2); + expect(comp.instance().props.group).toBe('someid'); expect(comp.find('table').length).toBe(1); }); @@ -182,7 +170,7 @@ describe('Logs', () => { value: '1230', }, }); - expect(instance.state.group).toBe('1230'); + expect(instance.props.changeGroup).toHaveBeenCalledWith('1230'); }); test('open window on log visit', () => { @@ -193,23 +181,6 @@ describe('Logs', () => { expect(global.open).toBeCalled(); }); - test('on stale call refresh', () => { - const comp = shallow(); - comp.setState({ stale: true }); - const instance = comp.instance(); - jest.spyOn(instance, 'refresh'); - instance.onVisible(); - expect(instance.refresh).toHaveBeenCalledWith('1230'); - }); - - test('remove listener on component unmount', () => { - const comp = shallow(); - comp.setState({ stale: true }); - const instance = comp.instance(); - instance.componentWillUnmount(); - expect(LogsEmitter.listeners().length).toBe(0); - }); - test('when parsed agent is not Other', () => { const comp = shallow(); requestmodel.request.log.entries[0].request.headers[0].value = 'IE4.0'; diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index f4a52d015..f495e6ca6 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -1,7 +1,6 @@ const React = require('react'); const PropTypes = require('prop-types'); const querystring = require('querystring'); -const VisibilitySensor = require('react-visibility-sensor'); const LoadingSvg = props => ( Date: Thu, 26 Sep 2019 12:06:38 -0700 Subject: [PATCH 06/14] added retry package for log reqs --- packages/api-logs/dist/index.js | 5266 ++++++++++++++++++++++++++++++- packages/api-logs/index.jsx | 19 +- packages/api-logs/package.json | 1 + 3 files changed, 5264 insertions(+), 22 deletions(-) diff --git a/packages/api-logs/dist/index.js b/packages/api-logs/dist/index.js index 6291fb357..6ca188d8b 100644 --- a/packages/api-logs/dist/index.js +++ b/packages/api-logs/dist/index.js @@ -1,14 +1,1452 @@ -module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";e.exports=n(7)},function(e,t,n){"use strict"; +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 5); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} + +function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); +} + +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +})(); + +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } // if setTimeout wasn't available but was latter defined + + + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } +} + +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } // if clearTimeout wasn't available but was latter defined + + + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } +} + +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + + draining = false; + + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + + while (len) { + currentQueue = queue; + queue = []; + + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + + queueIndex = -1; + len = queue.length; + } + + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + + queue.push(new Item(fun, args)); + + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; // v8 likes predictible objects + + +function Item(fun, array) { + this.fun = fun; + this.array = array; +} + +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues + +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { + return []; +}; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { + return '/'; +}; + +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; + +process.umask = function () { + return 0; +}; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; /* object-assign (c) Sindre Sorhus @license MIT -*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=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,l,a=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-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function s(e){this.map={},e instanceof s?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function d(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&function(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||i(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function b(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new s(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},h.call(y.prototype),h.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var g=[301,302,303,307,308];b.redirect=function(e,t){if(-1===g.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})};var w=self.DOMException;try{new w}catch(e){(w=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),w.prototype.constructor=w}function k(e,t){return new Promise(function(n,o){var i=new y(e,t);if(i.signal&&i.signal.aborted)return o(new w("Aborted","AbortError"));var l=new XMLHttpRequest;function a(){l.abort()}l.onload=function(){var e={status:l.status,statusText:l.statusText,headers:function(e){var t=new s;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}(l.getAllResponseHeaders()||"")};e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var t="response"in l?l.response:l.responseText;n(new b(t,e))},l.onerror=function(){o(new TypeError("Network request failed"))},l.ontimeout=function(){o(new TypeError("Network request failed"))},l.onabort=function(){o(new w("Aborted","AbortError"))},l.open(i.method,i.url,!0),"include"===i.credentials?l.withCredentials=!0:"omit"===i.credentials&&(l.withCredentials=!1),"responseType"in l&&r.blob&&(l.responseType="blob"),i.headers.forEach(function(e,t){l.setRequestHeader(t,e)}),i.signal&&(i.signal.addEventListener("abort",a),l.onreadystatechange=function(){4===l.readyState&&i.signal.removeEventListener("abort",a)}),l.send(void 0===i._bodyInit?null:i._bodyInit)})}k.polyfill=!0,self.fetch||(self.fetch=k,self.Headers=s,self.Request=y,self.Response=b)},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n1?s.createElement("select",{value:r,onChange:this.onSelect},n.map(t.renderOption)):null}},{key:"renderTable",value:function(){var e=this.state,t=e.loading,n=e.logs;return t?s.createElement("div",{className:"loading-container"},s.createElement(p,{className:"normal"})):n.length?s.createElement("table",{className:"table"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",{className:"method"},"Method"),s.createElement("th",{className:"status"},"Status"),s.createElement("th",{className:"url"},"URL"),s.createElement("th",{className:"group"},"Project"),s.createElement("th",{className:"useragent"},"User Agent"),s.createElement("th",{className:"time"},"Time"))),s.createElement("tbody",null,this.renderLogs())):s.createElement("div",{className:"logs-empty"},s.createElement("p",null,"No Logs"))}},{key:"render",value:function(){var e=this.state.group,t=this.props,n=t.query,r=t.baseUrl;if(!e)return null;var o="".concat(r,"/logs?").concat(f.stringify(Object.assign({},n,{id:e})));return s.createElement(d,{onChange:this.onVisible},s.createElement("div",{className:"logs"},s.createElement("div",{className:"log-header"},s.createElement("h3",null,"Logs"),s.createElement("div",{className:"select-container"},s.createElement("div",null,s.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer"},"View More"),this.renderSelect()))),s.createElement("div",{className:"logs-list"},this.renderTable())))}}],[{key:"renderOption",value:function(e){return s.createElement("option",{key:e.id,value:e.id},e.name)}}]),t}();y.propTypes={query:c.shape({}).isRequired,baseUrl:c.string.isRequired,user:c.shape({keys:c.array,id:c.string})},y.defaultProps={user:{}},e.exports=y,e.exports.Logs=y,e.exports.LogsEmitter=m},function(e,t,n){"use strict"; +*/ + +/* eslint-disable no-unused-vars */ + +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } // Detect buggy property enumeration order in older V8 versions. + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + + + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + + test1[5] = 'de'; + + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + + + var test2 = {}; + + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + + if (order2.join('') !== '0123456789') { + return false; + } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + + + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; +module.exports = ReactPropTypesSecret; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var printWarning = function printWarning() {}; + +if (process.env.NODE_ENV !== 'production') { + var ReactPropTypesSecret = __webpack_require__(2); + + var loggedTypeFailures = {}; + var has = Function.call.bind(Object.prototype.hasOwnProperty); + + printWarning = function printWarning(text) { + var message = 'Warning: ' + text; + + if (typeof console !== 'undefined') { + console.error(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; +} +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + + +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (process.env.NODE_ENV !== 'production') { + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error; // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + _typeof(typeSpecs[typeSpecName]) + '`.'); + err.name = 'Invariant Violation'; + throw err; + } + + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + + if (error && !(error instanceof Error)) { + printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).'); + } + + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + var stack = getStack ? getStack() : ''; + printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')); + } + } + } + } +} +/** + * Resets warning cache when testing. + * + * @private + */ + + +checkPropTypes.resetWarningCache = function () { + if (process.env.NODE_ENV !== 'production') { + loggedTypeFailures = {}; + } +}; + +module.exports = checkPropTypes; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +if (process.env.NODE_ENV === 'production') { + module.exports = __webpack_require__(12); +} else { + module.exports = __webpack_require__(13); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(6); +module.exports = __webpack_require__(7); + + +/***/ }), +/* 6 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (immutable) */ __webpack_exports__["Headers"] = Headers; +/* harmony export (immutable) */ __webpack_exports__["Request"] = Request; +/* harmony export (immutable) */ __webpack_exports__["Response"] = Response; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOMException", function() { return DOMException; }); +/* harmony export (immutable) */ __webpack_exports__["fetch"] = fetch; +var support = { + searchParams: 'URLSearchParams' in self, + iterable: 'Symbol' in self && 'iterator' in Symbol, + blob: 'FileReader' in self && 'Blob' in self && function () { + try { + new Blob(); + return true; + } catch (e) { + return false; + } + }(), + formData: 'FormData' in self, + arrayBuffer: 'ArrayBuffer' in self +}; + +function isDataView(obj) { + return obj && DataView.prototype.isPrototypeOf(obj); +} + +if (support.arrayBuffer) { + var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]']; + + var isArrayBufferView = ArrayBuffer.isView || function (obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1; + }; +} + +function normalizeName(name) { + if (typeof name !== 'string') { + name = String(name); + } + + if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { + throw new TypeError('Invalid character in header field name'); + } + + return name.toLowerCase(); +} + +function normalizeValue(value) { + if (typeof value !== 'string') { + value = String(value); + } + + return value; +} // Build a destructive iterator for the value list + + +function iteratorFor(items) { + var iterator = { + next: function next() { + var value = items.shift(); + return { + done: value === undefined, + value: value + }; + } + }; + + if (support.iterable) { + iterator[Symbol.iterator] = function () { + return iterator; + }; + } + + return iterator; +} + +function Headers(headers) { + this.map = {}; + + if (headers instanceof Headers) { + headers.forEach(function (value, name) { + this.append(name, value); + }, this); + } else if (Array.isArray(headers)) { + headers.forEach(function (header) { + this.append(header[0], header[1]); + }, this); + } else if (headers) { + Object.getOwnPropertyNames(headers).forEach(function (name) { + this.append(name, headers[name]); + }, this); + } +} + +Headers.prototype.append = function (name, value) { + name = normalizeName(name); + value = normalizeValue(value); + var oldValue = this.map[name]; + this.map[name] = oldValue ? oldValue + ', ' + value : value; +}; + +Headers.prototype['delete'] = function (name) { + delete this.map[normalizeName(name)]; +}; + +Headers.prototype.get = function (name) { + name = normalizeName(name); + return this.has(name) ? this.map[name] : null; +}; + +Headers.prototype.has = function (name) { + return this.map.hasOwnProperty(normalizeName(name)); +}; + +Headers.prototype.set = function (name, value) { + this.map[normalizeName(name)] = normalizeValue(value); +}; + +Headers.prototype.forEach = function (callback, thisArg) { + for (var name in this.map) { + if (this.map.hasOwnProperty(name)) { + callback.call(thisArg, this.map[name], name, this); + } + } +}; + +Headers.prototype.keys = function () { + var items = []; + this.forEach(function (value, name) { + items.push(name); + }); + return iteratorFor(items); +}; + +Headers.prototype.values = function () { + var items = []; + this.forEach(function (value) { + items.push(value); + }); + return iteratorFor(items); +}; + +Headers.prototype.entries = function () { + var items = []; + this.forEach(function (value, name) { + items.push([name, value]); + }); + return iteratorFor(items); +}; + +if (support.iterable) { + Headers.prototype[Symbol.iterator] = Headers.prototype.entries; +} + +function consumed(body) { + if (body.bodyUsed) { + return Promise.reject(new TypeError('Already read')); + } + + body.bodyUsed = true; +} + +function fileReaderReady(reader) { + return new Promise(function (resolve, reject) { + reader.onload = function () { + resolve(reader.result); + }; + + reader.onerror = function () { + reject(reader.error); + }; + }); +} + +function readBlobAsArrayBuffer(blob) { + var reader = new FileReader(); + var promise = fileReaderReady(reader); + reader.readAsArrayBuffer(blob); + return promise; +} + +function readBlobAsText(blob) { + var reader = new FileReader(); + var promise = fileReaderReady(reader); + reader.readAsText(blob); + return promise; +} + +function readArrayBufferAsText(buf) { + var view = new Uint8Array(buf); + var chars = new Array(view.length); + + for (var i = 0; i < view.length; i++) { + chars[i] = String.fromCharCode(view[i]); + } + + return chars.join(''); +} + +function bufferClone(buf) { + if (buf.slice) { + return buf.slice(0); + } else { + var view = new Uint8Array(buf.byteLength); + view.set(new Uint8Array(buf)); + return view.buffer; + } +} + +function Body() { + this.bodyUsed = false; + + this._initBody = function (body) { + this._bodyInit = body; + + if (!body) { + this._bodyText = ''; + } else if (typeof body === 'string') { + this._bodyText = body; + } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { + this._bodyBlob = body; + } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { + this._bodyFormData = body; + } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { + this._bodyText = body.toString(); + } else if (support.arrayBuffer && support.blob && isDataView(body)) { + this._bodyArrayBuffer = bufferClone(body.buffer); // IE 10-11 can't handle a DataView body. + + this._bodyInit = new Blob([this._bodyArrayBuffer]); + } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { + this._bodyArrayBuffer = bufferClone(body); + } else { + this._bodyText = body = Object.prototype.toString.call(body); + } + + if (!this.headers.get('content-type')) { + if (typeof body === 'string') { + this.headers.set('content-type', 'text/plain;charset=UTF-8'); + } else if (this._bodyBlob && this._bodyBlob.type) { + this.headers.set('content-type', this._bodyBlob.type); + } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { + this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); + } + } + }; + + if (support.blob) { + this.blob = function () { + var rejected = consumed(this); + + if (rejected) { + return rejected; + } + + if (this._bodyBlob) { + return Promise.resolve(this._bodyBlob); + } else if (this._bodyArrayBuffer) { + return Promise.resolve(new Blob([this._bodyArrayBuffer])); + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as blob'); + } else { + return Promise.resolve(new Blob([this._bodyText])); + } + }; + + this.arrayBuffer = function () { + if (this._bodyArrayBuffer) { + return consumed(this) || Promise.resolve(this._bodyArrayBuffer); + } else { + return this.blob().then(readBlobAsArrayBuffer); + } + }; + } + + this.text = function () { + var rejected = consumed(this); + + if (rejected) { + return rejected; + } + + if (this._bodyBlob) { + return readBlobAsText(this._bodyBlob); + } else if (this._bodyArrayBuffer) { + return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)); + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as text'); + } else { + return Promise.resolve(this._bodyText); + } + }; + + if (support.formData) { + this.formData = function () { + return this.text().then(decode); + }; + } + + this.json = function () { + return this.text().then(JSON.parse); + }; + + return this; +} // HTTP methods whose capitalization should be normalized + + +var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']; + +function normalizeMethod(method) { + var upcased = method.toUpperCase(); + return methods.indexOf(upcased) > -1 ? upcased : method; +} + +function Request(input, options) { + options = options || {}; + var body = options.body; + + if (input instanceof Request) { + if (input.bodyUsed) { + throw new TypeError('Already read'); + } + + this.url = input.url; + this.credentials = input.credentials; + + if (!options.headers) { + this.headers = new Headers(input.headers); + } + + this.method = input.method; + this.mode = input.mode; + this.signal = input.signal; + + if (!body && input._bodyInit != null) { + body = input._bodyInit; + input.bodyUsed = true; + } + } else { + this.url = String(input); + } + + this.credentials = options.credentials || this.credentials || 'same-origin'; + + if (options.headers || !this.headers) { + this.headers = new Headers(options.headers); + } + + this.method = normalizeMethod(options.method || this.method || 'GET'); + this.mode = options.mode || this.mode || null; + this.signal = options.signal || this.signal; + this.referrer = null; + + if ((this.method === 'GET' || this.method === 'HEAD') && body) { + throw new TypeError('Body not allowed for GET or HEAD requests'); + } + + this._initBody(body); +} + +Request.prototype.clone = function () { + return new Request(this, { + body: this._bodyInit + }); +}; + +function decode(body) { + var form = new FormData(); + body.trim().split('&').forEach(function (bytes) { + if (bytes) { + var split = bytes.split('='); + var name = split.shift().replace(/\+/g, ' '); + var value = split.join('=').replace(/\+/g, ' '); + form.append(decodeURIComponent(name), decodeURIComponent(value)); + } + }); + return form; +} + +function parseHeaders(rawHeaders) { + var headers = new Headers(); // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space + // https://tools.ietf.org/html/rfc7230#section-3.2 + + var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); + preProcessedHeaders.split(/\r?\n/).forEach(function (line) { + var parts = line.split(':'); + var key = parts.shift().trim(); + + if (key) { + var value = parts.join(':').trim(); + headers.append(key, value); + } + }); + return headers; +} + +Body.call(Request.prototype); +function Response(bodyInit, options) { + if (!options) { + options = {}; + } + + this.type = 'default'; + this.status = options.status === undefined ? 200 : options.status; + this.ok = this.status >= 200 && this.status < 300; + this.statusText = 'statusText' in options ? options.statusText : 'OK'; + this.headers = new Headers(options.headers); + this.url = options.url || ''; + + this._initBody(bodyInit); +} +Body.call(Response.prototype); + +Response.prototype.clone = function () { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }); +}; + +Response.error = function () { + var response = new Response(null, { + status: 0, + statusText: '' + }); + response.type = 'error'; + return response; +}; + +var redirectStatuses = [301, 302, 303, 307, 308]; + +Response.redirect = function (url, status) { + if (redirectStatuses.indexOf(status) === -1) { + throw new RangeError('Invalid status code'); + } + + return new Response(null, { + status: status, + headers: { + location: url + } + }); +}; + +var DOMException = self.DOMException; + +try { + new DOMException(); +} catch (err) { + DOMException = function DOMException(message, name) { + this.message = message; + this.name = name; + var error = Error(message); + this.stack = error.stack; + }; + + DOMException.prototype = Object.create(Error.prototype); + DOMException.prototype.constructor = DOMException; +} + +function fetch(input, init) { + return new Promise(function (resolve, reject) { + var request = new Request(input, init); + + if (request.signal && request.signal.aborted) { + return reject(new DOMException('Aborted', 'AbortError')); + } + + var xhr = new XMLHttpRequest(); + + function abortXhr() { + xhr.abort(); + } + + xhr.onload = function () { + var options = { + status: xhr.status, + statusText: xhr.statusText, + headers: parseHeaders(xhr.getAllResponseHeaders() || '') + }; + options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL'); + var body = 'response' in xhr ? xhr.response : xhr.responseText; + resolve(new Response(body, options)); + }; + + xhr.onerror = function () { + reject(new TypeError('Network request failed')); + }; + + xhr.ontimeout = function () { + reject(new TypeError('Network request failed')); + }; + + xhr.onabort = function () { + reject(new DOMException('Aborted', 'AbortError')); + }; + + xhr.open(request.method, request.url, true); + + if (request.credentials === 'include') { + xhr.withCredentials = true; + } else if (request.credentials === 'omit') { + xhr.withCredentials = false; + } + + if ('responseType' in xhr && support.blob) { + xhr.responseType = 'blob'; + } + + request.headers.forEach(function (value, name) { + xhr.setRequestHeader(name, value); + }); + + if (request.signal) { + request.signal.addEventListener('abort', abortXhr); + + xhr.onreadystatechange = function () { + // DONE (success or failure) + if (xhr.readyState === 4) { + request.signal.removeEventListener('abort', abortXhr); + } + }; + } + + xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit); + }); +} +fetch.polyfill = true; + +if (!self.fetch) { + self.fetch = fetch; + self.Headers = Headers; + self.Request = Request; + self.Response = Response; +} + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +var React = __webpack_require__(8); + +var PropTypes = __webpack_require__(11); + +var querystring = __webpack_require__(16); + +var retry = __webpack_require__(19); + +var LoadingSvg = function LoadingSvg(props) { + return React.createElement("svg", _extends({ + width: "38", + height: "38", + viewBox: "0 0 38 38", + xmlns: "http://www.w3.org/2000/svg", + stroke: "#2283c9" + }, props), React.createElement("g", { + transform: "translate(1 1)", + strokeWidth: "2", + fill: "none", + fillRule: "evenodd" + }, React.createElement("circle", { + strokeOpacity: "0.5", + cx: "18", + cy: "18", + r: "18" + }), React.createElement("path", { + d: "M36 18c0-9.94-8.06-18-18-18" + }, React.createElement("animateTransform", { + attributeName: "transform", + type: "rotate", + from: "0 18 18", + to: "360 18 18", + dur: "1s", + repeatCount: "indefinite" + })))); +}; + +function getLanguage(log) { + var header = log.request.log.entries[0].request.headers.find(function (e) { + return e.name.toLowerCase() === 'user-agent'; + }); + if (header) return header.value; + return '-'; +} + +function checkFreshness(existingLogs, incomingLogs) { + if (existingLogs.length && existingLogs[0]._id !== incomingLogs[0]._id || !existingLogs.length) { + return incomingLogs; + } + + throw new Error('Requested logs are not up-to-date.'); +} + +var Logs = +/*#__PURE__*/ +function (_React$Component) { + _inherits(Logs, _React$Component); + + function Logs(props) { + var _this; + + _classCallCheck(this, Logs); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Logs).call(this, props)); + _this.state = { + loading: false, + logs: [] + }; + _this.renderSelect = _this.renderSelect.bind(_assertThisInitialized(_this)); + _this.onSelect = _this.onSelect.bind(_assertThisInitialized(_this)); + _this.renderTable = _this.renderTable.bind(_assertThisInitialized(_this)); + _this.visitLogItem = _this.visitLogItem.bind(_assertThisInitialized(_this)); + _this.changeGroup = _this.changeGroup.bind(_assertThisInitialized(_this)); + return _this; + } + + _createClass(Logs, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.refresh(); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + // Refresh if the group has changed + if (this.props.group !== prevProps.group) { + // Setting logs to [] means we show the loading icon + // eslint-disable-next-line react/no-did-update-set-state + this.setState({ + logs: [] + }); + this.refresh(); + } // Refresh if the result has changed (this means has "try it now" been called?) + + + if (this.props.result !== prevProps.result) { + this.refresh(); + } + } + }, { + key: "onSelect", + value: function onSelect(event) { + this.changeGroup(event.target.value); + } + }, { + key: "getData", + value: function getData() { + var _this2 = this; + + var _this$props = this.props, + query = _this$props.query, + baseUrl = _this$props.baseUrl, + group = _this$props.group; + this.setState({ + loading: true + }); + var reqUrl = "".concat(baseUrl, "/api/logs?").concat(querystring.stringify(Object.assign({}, query, { + id: group || null, + limit: 5, + page: 0 + }))); + return retry( + /*#__PURE__*/ + _asyncToGenerator( + /*#__PURE__*/ + regeneratorRuntime.mark(function _callee() { + var res, parsedLogs; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return fetch(reqUrl); + + case 2: + res = _context.sent; + _context.next = 5; + return _this2.handleData(res); + + case 5: + parsedLogs = _context.sent; + return _context.abrupt("return", checkFreshness(_this2.state.logs, parsedLogs)); + + case 7: + case "end": + return _context.stop(); + } + } + }, _callee); + })), { + minTimeout: 50 + }); + } + }, { + key: "handleData", + value: function () { + var _handleData = _asyncToGenerator( + /*#__PURE__*/ + regeneratorRuntime.mark(function _callee2(res) { + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + this.setState({ + loading: false + }); + + if (!(res.status === 200)) { + _context2.next = 3; + break; + } + + return _context2.abrupt("return", res.json()); + + case 3: + throw new Error("Failed to fetch logs"); + + case 4: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function handleData(_x) { + return _handleData.apply(this, arguments); + } + + return handleData; + }() + }, { + key: "changeGroup", + value: function changeGroup(group) { + this.props.changeGroup(group); + } + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + + this.getData().then(function (logs) { + _this3.setState({ + logs: logs + }); + }).catch(function () {// TODO HANDLE ERROR + }); + } + }, { + key: "visitLogItem", + value: function visitLogItem(log) { + var baseUrl = this.props.baseUrl; + window.open("".concat(baseUrl, "logs/").concat(log._id)); + } + }, { + key: "renderLogs", + value: function renderLogs() { + var _this4 = this; + + var logs = this.state.logs; + return logs.map(function (log) { + var entry = log.request.log.entries[0]; + /* eslint-disable react/jsx-no-bind */ + + return React.createElement("tr", { + onClick: _this4.visitLogItem.bind(_this4, log), + key: log._id + }, React.createElement("td", null, entry.request.method), React.createElement("td", null, entry.response.status), React.createElement("td", null, entry.request.url), React.createElement("td", null, log.group.label), React.createElement("td", null, getLanguage(log)), React.createElement("td", null, new Date(log.createdAt).toLocaleString())); + }); + } + }, { + key: "renderSelect", + value: function renderSelect() { + var _this$props2 = this.props, + groups = _this$props2.groups, + group = _this$props2.group; + + if (groups && groups.length > 1) { + return React.createElement("select", { + value: group, + onChange: this.onSelect + }, groups.map(Logs.renderOption)); + } + + return null; + } + }, { + key: "renderTable", + value: function renderTable() { + var _this$state = this.state, + loading = _this$state.loading, + logs = _this$state.logs; + + if (loading && logs.length === 0) { + return React.createElement("div", { + className: "loading-container" + }, React.createElement(LoadingSvg, { + className: "normal" + })); + } + + if (!logs.length) { + return React.createElement("div", { + className: "logs-empty" + }, React.createElement("p", null, "No Logs")); + } + + return React.createElement("table", { + className: "table" + }, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", { + className: "method" + }, "Method"), React.createElement("th", { + className: "status" + }, "Status"), React.createElement("th", { + className: "url" + }, "URL"), React.createElement("th", { + className: "group" + }, "Project"), React.createElement("th", { + className: "useragent" + }, "User Agent"), React.createElement("th", { + className: "time" + }, "Time"))), React.createElement("tbody", null, this.renderLogs())); + } + }, { + key: "render", + value: function render() { + var _this$props3 = this.props, + query = _this$props3.query, + baseUrl = _this$props3.baseUrl, + group = _this$props3.group; + if (!group) return null; + var url = "".concat(baseUrl, "/logs?").concat(querystring.stringify(Object.assign({}, query, { + id: group + }))); + return React.createElement("div", { + className: "logs" + }, React.createElement("div", { + className: "log-header" + }, React.createElement("h3", null, "Logs"), React.createElement("div", { + className: "select-container" + }, React.createElement("div", null, React.createElement("a", { + href: url, + target: "_blank", + rel: "noopener noreferrer" + }, "View More"), this.renderSelect()))), React.createElement("div", { + className: "logs-list" + }, this.renderTable())); + } + }], [{ + key: "renderOption", + value: function renderOption(item) { + return React.createElement("option", { + key: item.id, + value: item.id + }, item.name); + } + }]); + + return Logs; +}(React.Component); + +Logs.propTypes = { + query: PropTypes.shape({}).isRequired, + baseUrl: PropTypes.string.isRequired, + group: PropTypes.string, + groups: PropTypes.arrayOf(PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string + })), + changeGroup: PropTypes.func.isRequired, + result: PropTypes.shape({}) +}; +Logs.defaultProps = { + group: '', + groups: [], + result: null +}; +module.exports = Logs; +module.exports.Logs = Logs; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +if (process.env.NODE_ENV === 'production') { + module.exports = __webpack_require__(9); +} else { + module.exports = __webpack_require__(10); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; /** @license React v16.5.1 * react.production.min.js * @@ -16,29 +1454,3821 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(1),i="function"==typeof Symbol&&Symbol.for,l=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,u=i?Symbol.for("react.fragment"):60107,s=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,f=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.forward_ref"):60112;i&&Symbol.for("react.placeholder");var m="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rN.length&&N.push(e)}function D(e,t,n){return null==e?0:function e(t,n,o,i){var u=r(t);"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case l:case a:s=!0}}if(s)return o(i,t,""===n?"."+I(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c0&&s>u&&(s=u);for(var c=0;c=0?(f=m.substr(0,y),d=m.substr(y+1)):(f=m,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),r(l,p)?o(l[p])?l[p].push(h):l[p]=[l[p],h]:l[p]=h}return l};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(e){switch(r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,u){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===r(e)?l(a(e),function(r){var a=encodeURIComponent(o(r))+n;return i(e[r])?l(e[r],function(e){return a+encodeURIComponent(o(e))}).join(t):a+encodeURIComponent(o(e[r]))}).join(t):u?encodeURIComponent(o(u))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function l(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r-1?function(){o||(o=setTimeout(i,r||0))}:function(){clearTimeout(o),o=setTimeout(i,n||0)},getLastTimeout:function(){return o}};e.addEventListener(t,l.fn),this.debounceCheck[t]=l},startWatching:function(){this.debounceCheck||this.interval||(this.props.intervalCheck&&(this.interval=setInterval(this.check,this.props.intervalDelay)),this.props.scrollCheck&&this.addEventListener(this.getContainer(),"scroll",this.props.scrollDelay,this.props.scrollThrottle),this.props.resizeCheck&&this.addEventListener(window,"resize",this.props.resizeDelay,this.props.resizeThrottle),!this.props.delayedCall&&this.check())},stopWatching:function(){if(this.debounceCheck)for(var e in this.debounceCheck)if(this.debounceCheck.hasOwnProperty(e)){var t=this.debounceCheck[e];clearTimeout(t.getLastTimeout()),t.target.removeEventListener(e,t.fn),this.debounceCheck[e]=null}this.debounceCheck=null,this.interval&&(this.interval=clearInterval(this.interval))},roundRectDown:function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}},check:function(){var e,t,n=this.node;if(!n)return this.state;if(e=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e}(this.roundRectDown(n.getBoundingClientRect())),this.props.containment){var o=this.props.containment.getBoundingClientRect();t={top:o.top,left:o.left,bottom:o.bottom,right:o.right}}else t={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var i=this.props.offset||{};"object"===r(i)&&(t.top+=i.top||0,t.left+=i.left||0,t.bottom-=i.bottom||0,t.right-=i.right||0);var l={top:e.top>=t.top,left:e.left>=t.left,bottom:e.bottom<=t.bottom,right:e.right<=t.right},a=e.height>0&&e.width>0,s=a&&l.top&&l.left&&l.bottom&&l.right;if(a&&this.props.partialVisibility){var c=e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left;"string"==typeof this.props.partialVisibility&&(c=l[this.props.partialVisibility]),s=this.props.minTopValue?c&&e.top<=t.bottom-this.props.minTopValue:c}"string"==typeof i.direction&&"number"==typeof i.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",i.direction,i.value),s=u(i,e,t));var f=this.state;return this.state.isVisible!==s&&(f={isVisible:s,visibilityRect:l},this.setState(f),this.props.onChange&&this.props.onChange(s,l)),f},render:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):o.Children.only(this.props.children)}})},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(15)},function(e,t,n){"use strict"; -/** @license React v16.8.6 - * react-dom.production.min.js + */ + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var m = __webpack_require__(1), + n = "function" === typeof Symbol && Symbol.for, + p = n ? Symbol.for("react.element") : 60103, + q = n ? Symbol.for("react.portal") : 60106, + r = n ? Symbol.for("react.fragment") : 60107, + t = n ? Symbol.for("react.strict_mode") : 60108, + u = n ? Symbol.for("react.profiler") : 60114, + v = n ? Symbol.for("react.provider") : 60109, + w = n ? Symbol.for("react.context") : 60110, + x = n ? Symbol.for("react.async_mode") : 60111, + y = n ? Symbol.for("react.forward_ref") : 60112; + +n && Symbol.for("react.placeholder"); +var z = "function" === typeof Symbol && Symbol.iterator; + +function A(a, b, d, c, e, g, h, f) { + if (!a) { + a = void 0; + if (void 0 === b) a = Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else { + var k = [d, c, e, g, h, f], + l = 0; + a = Error(b.replace(/%s/g, function () { + return k[l++]; + })); + a.name = "Invariant Violation"; + } + a.framesToPop = 1; + throw a; + } +} + +function B(a) { + for (var b = arguments.length - 1, d = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 0; c < b; c++) { + d += "&args[]=" + encodeURIComponent(arguments[c + 1]); + } + + A(!1, "Minified React error #" + a + "; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ", d); +} + +var C = { + isMounted: function isMounted() { + return !1; + }, + enqueueForceUpdate: function enqueueForceUpdate() {}, + enqueueReplaceState: function enqueueReplaceState() {}, + enqueueSetState: function enqueueSetState() {} +}, + D = {}; + +function E(a, b, d) { + this.props = a; + this.context = b; + this.refs = D; + this.updater = d || C; +} + +E.prototype.isReactComponent = {}; + +E.prototype.setState = function (a, b) { + "object" !== _typeof(a) && "function" !== typeof a && null != a ? B("85") : void 0; + this.updater.enqueueSetState(this, a, b, "setState"); +}; + +E.prototype.forceUpdate = function (a) { + this.updater.enqueueForceUpdate(this, a, "forceUpdate"); +}; + +function F() {} + +F.prototype = E.prototype; + +function G(a, b, d) { + this.props = a; + this.context = b; + this.refs = D; + this.updater = d || C; +} + +var H = G.prototype = new F(); +H.constructor = G; +m(H, E.prototype); +H.isPureReactComponent = !0; +var I = { + current: null, + currentDispatcher: null +}, + J = Object.prototype.hasOwnProperty, + K = { + key: !0, + ref: !0, + __self: !0, + __source: !0 +}; + +function L(a, b, d) { + var c = void 0, + e = {}, + g = null, + h = null; + if (null != b) for (c in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (g = "" + b.key), b) { + J.call(b, c) && !K.hasOwnProperty(c) && (e[c] = b[c]); + } + var f = arguments.length - 2; + if (1 === f) e.children = d;else if (1 < f) { + for (var k = Array(f), l = 0; l < f; l++) { + k[l] = arguments[l + 2]; + } + + e.children = k; + } + if (a && a.defaultProps) for (c in f = a.defaultProps, f) { + void 0 === e[c] && (e[c] = f[c]); + } + return { + $$typeof: p, + type: a, + key: g, + ref: h, + props: e, + _owner: I.current + }; +} + +function M(a, b) { + return { + $$typeof: p, + type: a.type, + key: b, + ref: a.ref, + props: a.props, + _owner: a._owner + }; +} + +function N(a) { + return "object" === _typeof(a) && null !== a && a.$$typeof === p; +} + +function escape(a) { + var b = { + "=": "=0", + ":": "=2" + }; + return "$" + ("" + a).replace(/[=:]/g, function (a) { + return b[a]; + }); +} + +var O = /\/+/g, + P = []; + +function Q(a, b, d, c) { + if (P.length) { + var e = P.pop(); + e.result = a; + e.keyPrefix = b; + e.func = d; + e.context = c; + e.count = 0; + return e; + } + + return { + result: a, + keyPrefix: b, + func: d, + context: c, + count: 0 + }; +} + +function R(a) { + a.result = null; + a.keyPrefix = null; + a.func = null; + a.context = null; + a.count = 0; + 10 > P.length && P.push(a); +} + +function S(a, b, d, c) { + var e = _typeof(a); + + if ("undefined" === e || "boolean" === e) a = null; + var g = !1; + if (null === a) g = !0;else switch (e) { + case "string": + case "number": + g = !0; + break; + + case "object": + switch (a.$$typeof) { + case p: + case q: + g = !0; + } + + } + if (g) return d(c, a, "" === b ? "." + T(a, 0) : b), 1; + g = 0; + b = "" === b ? "." : b + ":"; + if (Array.isArray(a)) for (var h = 0; h < a.length; h++) { + e = a[h]; + var f = b + T(e, h); + g += S(e, f, d, c); + } else if (null === a || "object" !== _typeof(a) ? f = null : (f = z && a[z] || a["@@iterator"], f = "function" === typeof f ? f : null), "function" === typeof f) for (a = f.call(a), h = 0; !(e = a.next()).done;) { + e = e.value, f = b + T(e, h++), g += S(e, f, d, c); + } else "object" === e && (d = "" + a, B("31", "[object Object]" === d ? "object with keys {" + Object.keys(a).join(", ") + "}" : d, "")); + return g; +} + +function U(a, b, d) { + return null == a ? 0 : S(a, "", b, d); +} + +function T(a, b) { + return "object" === _typeof(a) && null !== a && null != a.key ? escape(a.key) : b.toString(36); +} + +function V(a, b) { + a.func.call(a.context, b, a.count++); +} + +function aa(a, b, d) { + var c = a.result, + e = a.keyPrefix; + a = a.func.call(a.context, b, a.count++); + Array.isArray(a) ? W(a, c, d, function (a) { + return a; + }) : null != a && (N(a) && (a = M(a, e + (!a.key || b && b.key === a.key ? "" : ("" + a.key).replace(O, "$&/") + "/") + d)), c.push(a)); +} + +function W(a, b, d, c, e) { + var g = ""; + null != d && (g = ("" + d).replace(O, "$&/") + "/"); + b = Q(b, g, c, e); + U(a, aa, b); + R(b); +} + +function ba(a, b) { + var d = I.currentDispatcher; + null === d ? B("277") : void 0; + return d.readContext(a, b); +} + +var X = { + Children: { + map: function map(a, b, d) { + if (null == a) return a; + var c = []; + W(a, c, null, b, d); + return c; + }, + forEach: function forEach(a, b, d) { + if (null == a) return a; + b = Q(null, null, b, d); + U(a, V, b); + R(b); + }, + count: function count(a) { + return U(a, function () { + return null; + }, null); + }, + toArray: function toArray(a) { + var b = []; + W(a, b, null, function (a) { + return a; + }); + return b; + }, + only: function only(a) { + N(a) ? void 0 : B("143"); + return a; + } + }, + createRef: function createRef() { + return { + current: null + }; + }, + Component: E, + PureComponent: G, + createContext: function createContext(a, b) { + void 0 === b && (b = null); + a = { + $$typeof: w, + _calculateChangedBits: b, + _currentValue: a, + _currentValue2: a, + Provider: null, + Consumer: null, + unstable_read: null + }; + a.Provider = { + $$typeof: v, + _context: a + }; + a.Consumer = a; + a.unstable_read = ba.bind(null, a); + return a; + }, + forwardRef: function forwardRef(a) { + return { + $$typeof: y, + render: a + }; + }, + Fragment: r, + StrictMode: t, + unstable_AsyncMode: x, + unstable_Profiler: u, + createElement: L, + cloneElement: function cloneElement(a, b, d) { + null === a || void 0 === a ? B("267", a) : void 0; + var c = void 0, + e = m({}, a.props), + g = a.key, + h = a.ref, + f = a._owner; + + if (null != b) { + void 0 !== b.ref && (h = b.ref, f = I.current); + void 0 !== b.key && (g = "" + b.key); + var k = void 0; + a.type && a.type.defaultProps && (k = a.type.defaultProps); + + for (c in b) { + J.call(b, c) && !K.hasOwnProperty(c) && (e[c] = void 0 === b[c] && void 0 !== k ? k[c] : b[c]); + } + } + + c = arguments.length - 2; + if (1 === c) e.children = d;else if (1 < c) { + k = Array(c); + + for (var l = 0; l < c; l++) { + k[l] = arguments[l + 2]; + } + + e.children = k; + } + return { + $$typeof: p, + type: a.type, + key: g, + ref: h, + props: e, + _owner: f + }; + }, + createFactory: function createFactory(a) { + var b = L.bind(null, a); + b.type = a; + return b; + }, + isValidElement: N, + version: "16.5.1", + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { + ReactCurrentOwner: I, + assign: m + } +}, + Y = { + default: X +}, + Z = Y && X || Y; +module.exports = Z.default || Z; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.5.1 + * react.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(16),i=n(3),l=n(21);function a(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rthis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=ce,e.release=fe}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=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:ue,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ue,this._dispatchInstances=this._dispatchListeners=null}}),se.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},se.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,de(n),n},de(se);var pe=se.extend({data:null}),he=se.extend({data:null}),me=[9,13,27,32],ye=q&&"CompositionEvent"in window,ve=null;q&&"documentMode"in document&&(ve=document.documentMode);var be=q&&"TextEvent"in window&&!ve,ge=q&&(!ye||ve&&8=ve),we=String.fromCharCode(32),ke={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function _e(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ee(e){return"object"===r(e=e.detail)&&"data"in e?e.data:null}var Te=!1;var Se={eventTypes:ke,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(ye)e:{switch(e){case"compositionstart":o=ke.compositionStart;break e;case"compositionend":o=ke.compositionEnd;break e;case"compositionupdate":o=ke.compositionUpdate;break e}o=void 0}else Te?_e(e,n)&&(o=ke.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=ke.compositionStart);return o?(ge&&"ko"!==n.locale&&(Te||o!==ke.compositionStart?o===ke.compositionEnd&&Te&&(i=le()):(oe="value"in(re=r)?re.value:re.textContent,Te=!0)),o=pe.getPooled(o,t,n,r),i?o.data=i:null!==(i=Ee(n))&&(o.data=i),H(o),i=o):i=null,(e=be?function(e,t){switch(e){case"compositionend":return Ee(t);case"keypress":return 32!==t.which?null:(xe=!0,we);case"textInput":return(e=t.data)===we&&xe?null:e;default:return null}}(e,n):function(e,t){if(Te)return"compositionend"===e||!ye&&_e(e,t)?(e=le(),ie=oe=re=null,Te=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function mt(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}var yt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){yt[e]=new mt(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];yt[t]=new mt(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){yt[e]=new mt(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){yt[e]=new mt(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){yt[e]=new mt(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){yt[e]=new mt(e,3,!0,e,null)}),["capture","download"].forEach(function(e){yt[e]=new mt(e,4,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){yt[e]=new mt(e,6,!1,e,null)}),["rowSpan","start"].forEach(function(e){yt[e]=new mt(e,5,!1,e.toLowerCase(),null)});var vt=/[\-:]([a-z])/g;function bt(e){return e[1].toUpperCase()}function gt(e,t,n,r){var o=yt.hasOwnProperty(t)?yt[t]:null;(null!==o?0===o.type:!r&&(2En.length&&En.push(e)}}}var Rn={},Dn=0,In="_reactListenersID"+(""+Math.random()).slice(2);function An(e){return Object.prototype.hasOwnProperty.call(e,In)||(e[In]=Dn++,Rn[e[In]]={}),Rn[e[In]]}function Mn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Un(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fn(e,t){var n,r=Un(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=Un(r)}}function Ln(){for(var e=window,t=Mn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Mn((e=t.contentWindow).document)}return t}function jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function zn(e){var t=Ln(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(n.ownerDocument.documentElement,n)){if(null!==r&&jn(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Fn(n,i);var l=Fn(n,r);o&&l&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n=document.documentMode,Wn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vn=null,$n=null,Hn=null,qn=!1;function Yn(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qn||null==Vn||Vn!==Mn(n)?null:("selectionStart"in(n=Vn)&&jn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Hn&&nn(Hn,n)?null:(Hn=n,(e=se.getPooled(Wn.select,$n,e,t)).type="select",e.target=Vn,H(e),e))}var Qn={eventTypes:Wn,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=An(i),o=k.onSelect;for(var l=0;l=t.length||a("93"),t=t[0]),n=t),null==n&&(n="")),e._wrapperState={initialValue:wt(n)}}function Jn(e,t){var n=wt(t.value),r=wt(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function er(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}O.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),x=j,_=F,E=L,O.injectEventPluginsByName({SimpleEventPlugin:xn,EnterLeaveEventPlugin:Jt,ChangeEventPlugin:Bt,SelectEventPlugin:Qn,BeforeInputEventPlugin:Se});var tr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function nr(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 rr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?nr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var or=void 0,ir=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!==tr.svg||"innerHTML"in e)e.innerHTML=t;else{for((or=or||document.createElement("div")).innerHTML=""+t+"",t=or.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function lr(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 ar={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ur=["Webkit","ms","Moz","O"];function sr(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ar.hasOwnProperty(e)&&ar[e]?(""+t).trim():t+"px"}function cr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=sr(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ar).forEach(function(e){ur.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ar[t]=ar[e]})});var fr=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 dr(e,t){t&&(fr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&a("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&a("60"),"object"===r(t.dangerouslySetInnerHTML)&&"__html"in t.dangerouslySetInnerHTML||a("61")),null!=t.style&&"object"!==r(t.style)&&a("62",""))}function pr(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function hr(e,t){var n=An(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=k[t];for(var r=0;rCr||(e.current=Sr[Cr],Sr[Cr]=null,Cr--)}function Nr(e,t){Sr[++Cr]=e.current,e.current=t}var Or={},Rr={current:Or},Dr={current:!1},Ir=Or;function Ar(e,t){var n=e.type.contextTypes;if(!n)return Or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ur(e){Pr(Dr),Pr(Rr)}function Fr(e){Pr(Dr),Pr(Rr)}function Lr(e,t,n){Rr.current!==Or&&a("168"),Nr(Rr,t),Nr(Dr,n)}function jr(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())o in e||a("108",ut(t)||"Unknown",o);return i({},n,r)}function zr(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Or,Ir=Rr.current,Nr(Rr,t),Nr(Dr,Dr.current),!0}function Br(e,t,n){var r=e.stateNode;r||a("169"),n?(t=jr(e,t,Ir),r.__reactInternalMemoizedMergedChildContext=t,Pr(Dr),Pr(Rr),Nr(Rr,t)):Pr(Dr),Nr(Dr,n)}var Wr=null,Vr=null;function $r(e){return function(t){try{return e(t)}catch(e){}}}function Hr(e,t,n,r){return new function(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}(e,t,n,r)}function qr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Yr(e,t){var n=e.alternate;return null===n?((n=Hr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.contextDependencies=e.contextDependencies,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qr(e,t,n,o,i,l){var u=2;if(o=e,"function"==typeof e)qr(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case Ge:return Kr(n.children,i,l,t);case tt:return Gr(n,3|i,l,t);case Xe:return Gr(n,2|i,l,t);case Ze:return(e=Hr(12,n,t,4|i)).elementType=Ze,e.type=Ze,e.expirationTime=l,e;case rt:return(e=Hr(13,n,t,i)).elementType=rt,e.type=rt,e.expirationTime=l,e;default:if("object"===r(e)&&null!==e)switch(e.$$typeof){case Je:u=10;break e;case et:u=9;break e;case nt:u=11;break e;case ot:u=14;break e;case it:u=16,o=null;break e}a("130",null==e?e:r(e),"")}return(t=Hr(u,n,t,i)).elementType=e,t.type=o,t.expirationTime=l,t}function Kr(e,t,n,r){return(e=Hr(7,e,r,t)).expirationTime=n,e}function Gr(e,t,n,r){return e=Hr(8,e,r,t),t=0==(1&t)?Xe:tt,e.elementType=t,e.type=t,e.expirationTime=n,e}function Xr(e,t,n){return(e=Hr(6,e,null,t)).expirationTime=n,e}function Zr(e,t,n){return(t=Hr(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jr(e,t){e.didError=!1;var n=e.earliestPendingTime;0===n?e.earliestPendingTime=e.latestPendingTime=t:nt&&(e.latestPendingTime=t),no(t,e)}function eo(e,t){e.didError=!1,e.latestPingedTime>=t&&(e.latestPingedTime=0);var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=0:r:r===t&&(e.latestPendingTime=n),n=e.earliestSuspendedTime,r=e.latestSuspendedTime,0===n?e.earliestSuspendedTime=e.latestSuspendedTime=t:nt&&(e.latestSuspendedTime=t),no(t,e)}function to(e,t){var n=e.earliestPendingTime;return e=e.earliestSuspendedTime,n>t&&(t=n),e>t&&(t=e),t}function no(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,o=t.earliestPendingTime,i=t.latestPingedTime;0===(o=0!==o?o:i)&&(0===e||re&&(e=n),t.nextExpirationTimeToWorkOn=o,t.expirationTime=e}function ro(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var oo=(new o.Component).refs;function io(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var lo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===rn(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=xa(),o=Gi(r=Kl(r,e));o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Vl(),Zi(e,o),Zl(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=xa(),o=Gi(r=Kl(r,e));o.tag=$i,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Vl(),Zi(e,o),Zl(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=xa(),r=Gi(n=Kl(n,e));r.tag=Hi,void 0!==t&&null!==t&&(r.callback=t),Vl(),Zi(e,r),Zl(e,n)}};function ao(e,t,n,r,o,i,l){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,l):!t.prototype||!t.prototype.isPureReactComponent||(!nn(n,r)||!nn(o,i))}function uo(e,t,n){var o=!1,i=Or,l=t.contextType;return"object"===r(l)&&null!==l?l=Wi(l):(i=Mr(t)?Ir:Rr.current,l=(o=null!==(o=t.contextTypes)&&void 0!==o)?Ar(e,i):Or),t=new t(n,l),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=lo,e.stateNode=t,t._reactInternalFiber=e,o&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function so(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&&lo.enqueueReplaceState(t,t.state,null)}function co(e,t,n,o){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=oo;var l=t.contextType;"object"===r(l)&&null!==l?i.context=Wi(l):(l=Mr(t)?Ir:Rr.current,i.context=Ar(e,l)),null!==(l=e.updateQueue)&&(nl(e,l,n,i,o),i.state=e.memoizedState),"function"==typeof(l=t.getDerivedStateFromProps)&&(io(e,t,l,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&lo.enqueueReplaceState(i,i.state,null),null!==(l=e.updateQueue)&&(nl(e,l,n,i,o),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var fo=Array.isArray;function po(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!==r(e)){if(n._owner){var o=void 0;(n=n._owner)&&(1!==n.tag&&a("309"),o=n.stateNode),o||a("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;t===oo&&(t=o.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&a("284"),n._owner||a("290",e)}return e}function ho(e,t){"textarea"!==e.type&&a("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function mo(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=Yr(e,t)).index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)d?(y=f,f=null):y=f.sibling;var v=h(r,f,a[d],u);if(null===v){null===f&&(f=y);break}e&&f&&null===v.alternate&&t(r,f),i=l(v,i,d),null===c?s=v:c.sibling=v,c=v,f=y}if(d===a.length)return n(r,f),s;if(null===f){for(;dy?(v=d,d=null):v=d.sibling;var g=h(r,d,b.value,s);if(null===g){d||(d=v);break}e&&d&&null===g.alternate&&t(r,d),i=l(g,i,y),null===f?c=g:f.sibling=g,f=g,d=v}if(b.done)return n(r,d),c;if(null===d){for(;!b.done;y++,b=u.next())null!==(b=p(r,b.value,s))&&(i=l(b,i,y),null===f?c=b:f.sibling=b,f=b);return c}for(d=o(r,d);!b.done;y++,b=u.next())null!==(b=m(d,r,y,b.value,s))&&(e&&null!==b.alternate&&d.delete(null===b.key?y:b.key),i=l(b,i,y),null===f?c=b:f.sibling=b,f=b);return e&&d.forEach(function(e){return t(r,e)}),c}return function(e,o,l,s){var c="object"===r(l)&&null!==l&&l.type===Ge&&null===l.key;c&&(l=l.props.children);var f="object"===r(l)&&null!==l;if(f)switch(l.$$typeof){case Qe:e:{for(f=l.key,c=o;null!==c;){if(c.key===f){if(7===c.tag?l.type===Ge:c.elementType===l.type){n(e,c.sibling),(o=i(c,l.type===Ge?l.props.children:l.props)).ref=po(e,c,l),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}l.type===Ge?((o=Kr(l.props.children,e.mode,s,l.key)).return=e,e=o):((s=Qr(l.type,l.key,l.props,null,e.mode,s)).ref=po(e,o,l),s.return=e,e=s)}return u(e);case Ke:e:{for(c=l.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===l.containerInfo&&o.stateNode.implementation===l.implementation){n(e,o.sibling),(o=i(o,l.children||[])).return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}(o=Zr(l,e.mode,s)).return=e,e=o}return u(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==o&&6===o.tag?(n(e,o.sibling),(o=i(o,l)).return=e,e=o):(n(e,o),(o=Xr(l,e.mode,s)).return=e,e=o),u(e);if(fo(l))return y(e,o,l,s);if(at(l))return v(e,o,l,s);if(f&&ho(e,l),void 0===l&&!c)switch(e.tag){case 1:case 0:a("152",(s=e.type).displayName||s.name||"Component")}return n(e,o)}}var yo=mo(!0),vo=mo(!1),bo={},go={current:bo},wo={current:bo},ko={current:bo};function xo(e){return e===bo&&a("174"),e}function _o(e,t){Nr(ko,t),Nr(wo,e),Nr(go,bo);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:rr(null,"");break;default:t=rr(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}Pr(go),Nr(go,t)}function Eo(e){Pr(go),Pr(wo),Pr(ko)}function To(e){xo(ko.current);var t=xo(go.current),n=rr(t,e.type);t!==n&&(Nr(wo,e),Nr(go,n))}function So(e){wo.current===e&&(Pr(go),Pr(wo))}var Co=0,Po=2,No=4,Oo=8,Ro=16,Do=32,Io=64,Ao=128,Mo=He.ReactCurrentDispatcher,Uo=0,Fo=null,Lo=null,jo=null,zo=null,Bo=null,Wo=null,Vo=0,$o=null,Ho=0,qo=!1,Yo=null,Qo=0;function Ko(){a("321")}function Go(e,t){if(null===t)return!1;for(var n=0;nVo&&(Vo=f)):i=s.eagerReducer===e?s.eagerState:e(i,s.action),l=s,s=s.next}while(null!==s&&s!==r);c||(u=l,o=i),en(i,t.memoizedState)||(xi=!0),t.memoizedState=i,t.baseUpdate=u,t.baseState=o,n.lastRenderedState=i}return[t.memoizedState,n.dispatch]}function ri(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===$o?($o={lastEffect:null}).lastEffect=e.next=e:null===(t=$o.lastEffect)?$o.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,$o.lastEffect=e),e}function oi(e,t,n,r){var o=Jo();Ho|=e,o.memoizedState=ri(t,n,void 0,void 0===r?null:r)}function ii(e,t,n,r){var o=ei();r=void 0===r?null:r;var i=void 0;if(null!==Lo){var l=Lo.memoizedState;if(i=l.destroy,null!==r&&Go(r,l.deps))return void ri(Co,n,i,r)}Ho|=e,o.memoizedState=ri(t,n,i,r)}function li(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ai(){}function ui(e,t,n){25>Qo||a("301");var r=e.alternate;if(e===Fo||null!==r&&r===Fo)if(qo=!0,e={expirationTime:Uo,action:n,eagerReducer:null,eagerState:null,next:null},null===Yo&&(Yo=new Map),void 0===(n=Yo.get(t)))Yo.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{Vl();var o=xa(),i={expirationTime:o=Kl(o,e),action:n,eagerReducer:null,eagerState:null,next:null},l=t.last;if(null===l)i.next=i;else{var u=l.next;null!==u&&(i.next=u),l.next=i}if(t.last=i,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var s=t.lastRenderedState,c=r(s,n);if(i.eagerReducer=r,i.eagerState=c,en(c,s))return}catch(e){}Zl(e,o)}}var si={readContext:Wi,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko},ci={readContext:Wi,useCallback:function(e,t){return Jo().memoizedState=[e,void 0===t?null:t],e},useContext:Wi,useEffect:function(e,t){return oi(516,Ao|Io,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,oi(4,No|Do,li.bind(null,t,e),n)},useLayoutEffect:function(e,t){return oi(4,No|Do,e,t)},useMemo:function(e,t){var n=Jo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ui.bind(null,Fo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Jo().memoizedState=e},useState:function(e){var t=Jo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:ti,lastRenderedState:e}).dispatch=ui.bind(null,Fo,e),[t.memoizedState,e]},useDebugValue:ai},fi={readContext:Wi,useCallback:function(e,t){var n=ei();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:Wi,useEffect:function(e,t){return ii(516,Ao|Io,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ii(4,No|Do,li.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ii(4,No|Do,e,t)},useMemo:function(e,t){var n=ei();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Go(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:ni,useRef:function(){return ei().memoizedState},useState:function(e){return ni(ti)},useDebugValue:ai},di=null,pi=null,hi=!1;function mi(e,t){var n=Hr(5,null,null,0);n.elementType="DELETED",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 yi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function vi(e){if(hi){var t=pi;if(t){var n=t;if(!yi(e,t)){if(!(t=Er(n))||!yi(e,t))return e.effectTag|=2,hi=!1,void(di=e);mi(di,n)}di=e,pi=Tr(t)}else e.effectTag|=2,hi=!1,di=e}}function bi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;di=e}function gi(e){if(e!==di)return!1;if(!hi)return bi(e),hi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!gr(t,e.memoizedProps))for(t=pi;t;)mi(e,t),t=Er(t);return bi(e),pi=di?Er(e.stateNode):null,!0}function wi(){pi=di=null,hi=!1}var ki=He.ReactCurrentOwner,xi=!1;function _i(e,t,n,r){t.child=null===e?vo(t,null,n,r):yo(t,e.child,n,r)}function Ei(e,t,n,r,o){n=n.render;var i=t.ref;return Bi(t,o),r=Xo(e,t,n,r,i,o),null===e||xi?(t.effectTag|=1,_i(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ii(e,t,o))}function Ti(e,t,n,r,o,i){if(null===e){var l=n.type;return"function"!=typeof l||qr(l)||void 0!==l.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Qr(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=l,Si(e,t,l,r,o,i))}return l=e.child,o=n?Di(e,t,n):null!==(t=Ii(e,t,n))?t.sibling:null}return Ii(e,t,n)}}else xi=!1;switch(t.expirationTime=0,t.tag){case 2:o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps;var i=Ar(t,Rr.current);if(Bi(t,n),i=Xo(null,t,o,e,i,n),t.effectTag|=1,"object"===r(i)&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,Zo(),Mr(o)){var l=!0;zr(t)}else l=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var u=o.getDerivedStateFromProps;"function"==typeof u&&io(t,o,u,e),i.updater=lo,t.stateNode=i,i._reactInternalFiber=t,co(t,o,e,n),t=Oi(null,t,o,!0,l,n)}else t.tag=0,_i(null,t,i,n),t=t.child;return t;case 16:switch(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),l=t.pendingProps,e=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)}),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(i),t.type=e,i=t.tag=function(e){if("function"==typeof e)return qr(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===nt)return 11;if(e===ot)return 14}return 2}(e),l=ro(e,l),u=void 0,i){case 0:u=Pi(null,t,e,l,n);break;case 1:u=Ni(null,t,e,l,n);break;case 11:u=Ei(null,t,e,l,n);break;case 14:u=Ti(null,t,e,ro(e.type,l),o,n);break;default:a("306",e,"")}return u;case 0:return o=t.type,i=t.pendingProps,Pi(e,t,o,i=t.elementType===o?i:ro(o,i),n);case 1:return o=t.type,i=t.pendingProps,Ni(e,t,o,i=t.elementType===o?i:ro(o,i),n);case 3:return Ri(t),null===(o=t.updateQueue)&&a("282"),i=null!==(i=t.memoizedState)?i.element:null,nl(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===i?(wi(),t=Ii(e,t,n)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(pi=Tr(t.stateNode.containerInfo),di=t,i=hi=!0),i?(t.effectTag|=2,t.child=vo(t,null,o,n)):(_i(e,t,o,n),wi()),t=t.child),t;case 5:return To(t),null===e&&vi(t),o=t.type,i=t.pendingProps,l=null!==e?e.memoizedProps:null,u=i.children,gr(o,i)?u=null:null!==l&&gr(o,l)&&(t.effectTag|=16),Ci(e,t),1!==n&&1&t.mode&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(_i(e,t,u,n),t=t.child),t;case 6:return null===e&&vi(t),null;case 13:return Di(e,t,n);case 4:return _o(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=yo(t,null,o,n):_i(e,t,o,n),t.child;case 11:return o=t.type,i=t.pendingProps,Ei(e,t,o,i=t.elementType===o?i:ro(o,i),n);case 7:return _i(e,t,t.pendingProps,n),t.child;case 8:case 12:return _i(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,i=t.pendingProps,u=t.memoizedProps,ji(t,l=i.value),null!==u){var s=u.value;if(0===(l=en(s,l)?0:0|("function"==typeof o._calculateChangedBits?o._calculateChangedBits(s,l):1073741823))){if(u.children===i.children&&!Dr.current){t=Ii(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.contextDependencies;if(null!==c){u=s.child;for(var f=c.first;null!==f;){if(f.context===o&&0!=(f.observedBits&l)){1===s.tag&&((f=Gi(n)).tag=Hi,Zi(s,f)),s.expirationTime=t&&(xi=!0),e.contextDependencies=null}function Wi(e,t){return Li!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(Li=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Fi?(null===Ui&&a("308"),Fi=t,Ui.contextDependencies={first:t,expirationTime:0}):Fi=Fi.next=t),e._currentValue}var Vi=0,$i=1,Hi=2,qi=3,Yi=!1;function Qi(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ki(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Gi(e){return{expirationTime:e,tag:Vi,payload:null,callback:null,next:null,nextEffect:null}}function Xi(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Zi(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,o=null;null===r&&(r=e.updateQueue=Qi(e.memoizedState))}else r=e.updateQueue,o=n.updateQueue,null===r?null===o?(r=e.updateQueue=Qi(e.memoizedState),o=n.updateQueue=Qi(n.memoizedState)):r=e.updateQueue=Ki(o):null===o&&(o=n.updateQueue=Ki(r));null===o||r===o?Xi(r,t):null===r.lastUpdate||null===o.lastUpdate?(Xi(r,t),Xi(o,t)):(Xi(r,t),o.lastUpdate=t)}function Ji(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=Qi(e.memoizedState):el(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function el(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Ki(t)),t}function tl(e,t,n,r,o,l){switch(n.tag){case $i:return"function"==typeof(e=n.payload)?e.call(l,r,o):e;case qi:e.effectTag=-2049&e.effectTag|64;case Vi:if(null===(o="function"==typeof(e=n.payload)?e.call(l,r,o):e)||void 0===o)break;return i({},r,o);case Hi:Yi=!0}return r}function nl(e,t,n,r,o){Yi=!1;for(var i=(t=el(e,t)).baseState,l=null,a=0,u=t.firstUpdate,s=i;null!==u;){var c=u.expirationTime;ct?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime>t&&(e.earliestPendingTime=e.latestPendingTime)),0===(n=e.earliestSuspendedTime)?Jr(e,t):tn&&Jr(e,t)}no(0,e)}(e,o>r?o:r),Tl.current=null,r=void 0,1n?t:n)&&(Ll=null),function(e,t){e.expirationTime=t,e.finishedWork=null}(e,t)}function Hl(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(1024&e.effectTag)){Pl=e;e:{var o=t,l=Ol,u=(t=e).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:Mr(t.type)&&Ur();break;case 3:Eo(),Fr(),(u=t.stateNode).pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),null!==o&&null!==o.child||(gi(t),t.effectTag&=-3),ul(t);break;case 5:So(t);var s=xo(ko.current);if(l=t.type,null!==o&&null!=t.stateNode)sl(o,t,l,u,s),o.ref!==t.ref&&(t.effectTag|=128);else if(u){var c=xo(go.current);if(gi(t)){o=(u=t).stateNode;var f=u.type,d=u.memoizedProps,p=s;switch(o[A]=u,o[M]=d,l=void 0,s=f){case"iframe":case"object":Cn("load",o);break;case"video":case"audio":for(f=0;f<\/script>",f=o.removeChild(o.firstChild)):"string"==typeof o.is?f=f.createElement(p,{is:o.is}):(f=f.createElement(p),"select"===p&&(p=f,o.multiple?p.multiple=!0:o.size&&(p.size=o.size))):f=f.createElementNS(c,p),(o=f)[A]=d,o[M]=u,al(o,t,!1,!1),p=o;var h=s,m=pr(f=l,d=u);switch(f){case"iframe":case"object":Cn("load",p),s=d;break;case"video":case"audio":for(s=0;su&&(u=o),s>u&&(u=s),l=l.sibling;t.childExpirationTime=u}if(null!==Pl)return Pl;null!==n&&0==(1024&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1=y?h=0:(-1===h||y component higher in the tree to provide a loading indicator or placeholder to display."+st(f))}Dl=!0,d=il(d,f),s=c;do{switch(s.tag){case 3:s.effectTag|=2048,s.expirationTime=u,Ji(s,u=kl(s,d,u));break e;case 1:if(h=d,m=s.type,f=s.stateNode,0==(64&s.effectTag)&&("function"==typeof m.getDerivedStateFromError||null!==f&&"function"==typeof f.componentDidCatch&&(null===Ll||!Ll.has(f)))){s.effectTag|=2048,s.expirationTime=u,Ji(s,u=xl(s,h,u));break e}}s=s.return}while(null!==s)}Pl=Hl(l);continue}i=!0,Da(t)}}break}if(Cl=!1,El.current=n,Li=Fi=Ui=null,Zo(),i)Nl=null,e.finishedWork=null;else if(null!==Pl)e.finishedWork=null;else{if(null===(n=e.current.alternate)&&a("281"),Nl=null,Dl){if(i=e.latestPendingTime,l=e.latestSuspendedTime,u=e.latestPingedTime,0!==i&&it?0:t)):(e.pendingCommitExpirationTime=o,e.finishedWork=n)}}function Ql(e,t){for(var n=e.return;null!==n;){switch(n.tag){case 1:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ll||!Ll.has(r)))return Zi(n,e=xl(n,e=il(t,e),1073741823)),void Zl(n,1073741823);break;case 3:return Zi(n,e=kl(n,e=il(t,e),1073741823)),void Zl(n,1073741823)}n=n.return}3===e.tag&&(Zi(e,n=kl(e,n=il(t,e),1073741823)),Zl(e,1073741823))}function Kl(e,t){var n=l.unstable_getCurrentPriorityLevel(),r=void 0;if(0==(1&t.mode))r=1073741823;else if(Cl&&!Al)r=Ol;else{switch(n){case l.unstable_ImmediatePriority:r=1073741823;break;case l.unstable_UserBlockingPriority:r=1073741822-10*(1+((1073741822-e+15)/10|0));break;case l.unstable_NormalPriority:r=1073741822-25*(1+((1073741822-e+500)/25|0));break;case l.unstable_LowPriority:case l.unstable_IdlePriority:r=1;break;default:a("313")}null!==Nl&&r===Ol&&--r}return n===l.unstable_UserBlockingPriority&&(0===aa||r=r&&(e.didError=!1,(0===(t=e.latestPingedTime)||t>n)&&(e.latestPingedTime=n),no(n,e),0!==(n=e.expirationTime)&&_a(e,n)))}function Xl(e,t){e.expirationTimeOl&&jl(),Jr(e,t),Cl&&!Al&&Nl===e||_a(e,e.expirationTime),va>ya&&(va=0,a("185")))}function Jl(e,t,n,r,o){return l.unstable_runWithPriority(l.unstable_ImmediatePriority,function(){return e(t,n,r,o)})}var ea=null,ta=null,na=0,ra=void 0,oa=!1,ia=null,la=0,aa=0,ua=!1,sa=null,ca=!1,fa=!1,da=null,pa=l.unstable_now(),ha=1073741822-(pa/10|0),ma=ha,ya=50,va=0,ba=null;function ga(){ha=1073741822-((l.unstable_now()-pa)/10|0)}function wa(e,t){if(0!==na){if(te.expirationTime&&(e.expirationTime=t),oa||(ca?fa&&(ia=e,la=1073741823,Oa(e,1073741823,!1)):1073741823===t?Pa(1073741823,!1):wa(e,t))}function Ea(){var e=0,t=null;if(null!==ta)for(var n=ta,r=ea;null!==r;){var o=r.expirationTime;if(0===o){if((null===n||null===ta)&&a("244"),r===r.nextScheduledRoot){ea=ta=r.nextScheduledRoot=null;break}if(r===ea)ea=o=r.nextScheduledRoot,ta.nextScheduledRoot=o,r.nextScheduledRoot=null;else{if(r===ta){(ta=n).nextScheduledRoot=ea,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if(o>e&&(e=o,t=r),r===ta)break;if(1073741823===e)break;n=r,r=r.nextScheduledRoot}}ia=t,la=e}var Ta=!1;function Sa(){return!!Ta||!!l.unstable_shouldYield()&&(Ta=!0)}function Ca(){try{if(!Sa()&&null!==ea){ga();var e=ea;do{var t=e.expirationTime;0!==t&&ha<=t&&(e.nextExpirationTimeToWorkOn=ha),e=e.nextScheduledRoot}while(e!==ea)}Pa(0,!0)}finally{Ta=!1}}function Pa(e,t){if(Ea(),t)for(ga(),ma=ha;null!==ia&&0!==la&&e<=la&&!(Ta&&ha>la);)Oa(ia,la,ha>la),Ea(),ga(),ma=ha;else for(;null!==ia&&0!==la&&e<=la;)Oa(ia,la,!1),Ea();if(t&&(na=0,ra=null),0!==la&&wa(ia,la),va=0,ba=null,null!==da)for(e=da,da=null,t=0;t=n&&(null===da?da=[r]:da.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===ba?va++:(ba=e,va=0),l.unstable_runWithPriority(l.unstable_ImmediatePriority,function(){$l(e,t)})}function Da(e){null===ia&&a("246"),ia.expirationTime=0,ua||(ua=!0,sa=e)}function Ia(e,t){var n=ca;ca=!0;try{return e(t)}finally{(ca=n)||oa||Pa(1073741823,!1)}}function Aa(e,t){if(ca&&!fa){fa=!0;try{return e(t)}finally{fa=!1}}return e(t)}function Ma(e,t,n){ca||oa||0===aa||(Pa(aa,!1),aa=0);var r=ca;ca=!0;try{return l.unstable_runWithPriority(l.unstable_UserBlockingPriority,function(){return e(t,n)})}finally{(ca=r)||oa||Pa(1073741823,!1)}}function Ua(e,t,n,r,o){var i=t.current;e:if(n){n=n._reactInternalFiber;t:{2===rn(n)&&1===n.tag||a("170");var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(Mr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);a("171"),l=void 0}if(1===n.tag){var u=n.type;if(Mr(u)){n=jr(n,u,l);break e}}n=l}else n=Or;return null===t.context?t.context=n:t.pendingContext=n,t=o,(o=Gi(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(o.callback=t),Vl(),Zi(i,o),Zl(i,r),r}function Fa(e,t,n,r){var o=t.current;return Ua(e,t,n,o=Kl(xa(),o),r)}function La(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function ja(e){var t=1073741822-25*(1+((1073741822-xa()+500)/25|0));t>=Sl&&(t=Sl-1),this._expirationTime=Sl=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function za(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function Ba(e,t,n){e={current:t=Hr(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function Wa(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Va(e,t,n,r,o){var i=n._reactRootContainer;if(i){if("function"==typeof o){var l=o;o=function(){var e=La(i._internalRoot);l.call(e)}}null!=e?i.legacy_renderSubtreeIntoContainer(e,t,o):i.render(t,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Ba(e,!1,t)}(n,r),"function"==typeof o){var a=o;o=function(){var e=La(i._internalRoot);a.call(e)}}Aa(function(){null!=e?i.legacy_renderSubtreeIntoContainer(e,t,o):i.render(t,o)})}return La(i._internalRoot)}function $a(e,t){var n=2=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},Ie=Ia,Ae=Ma,Me=function(){oa||0===aa||(Pa(aa,!1),aa=0)};var Ha={createPortal:$a,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?a("188"):a("268",Object.keys(e))),e=null===(e=ln(t))?null:e.stateNode},hydrate:function(e,t,n){return Wa(t)||a("200"),Va(null,e,t,!0,n)},render:function(e,t,n){return Wa(t)||a("200"),Va(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return Wa(n)||a("200"),(null==e||void 0===e._reactInternalFiber)&&a("38"),Va(e,t,n,!1,r)},unmountComponentAtNode:function(e){return Wa(e)||a("40"),!!e._reactRootContainer&&(Aa(function(){Va(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return $a.apply(void 0,arguments)},unstable_batchedUpdates:Ia,unstable_interactiveUpdates:Ma,flushSync:function(e,t){oa&&a("187");var n=ca;ca=!0;try{return Jl(e,t)}finally{ca=n,Pa(1073741823,!1)}},unstable_createRoot:function(e,t){return Wa(e)||a("299","unstable_createRoot"),new Ba(e,!0,null!=t&&!0===t.hydrate)},unstable_flushControlled:function(e){var t=ca;ca=!0;try{Jl(e)}finally{(ca=t)||oa||Pa(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[F,L,j,O.injectEventPluginsByName,g,H,function(e){C(e,$)},Re,De,On,D]}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Wr=$r(function(e){return t.onCommitFiberRoot(n,e)}),Vr=$r(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}})(i({},e,{overrideProps:null,currentDispatcherRef:He.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ln(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:U,bundleType:0,version:"16.8.6",rendererPackageName:"react-dom"});var qa={default:Ha},Ya=qa&&Ha||qa;e.exports=Ya.default||Ya},function(e,t,n){"use strict";e.exports=n(17)},function(e,t,n){"use strict"; -/** @license React v16.4.2 - * react.production.min.js - * + */ + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +if (process.env.NODE_ENV !== "production") { + (function () { + 'use strict'; + + var _assign = __webpack_require__(1); + + var checkPropTypes = __webpack_require__(3); // TODO: this is special because it gets imported during build. + + + var ReactVersion = '16.5.1'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || _typeof(maybeIterable) !== 'object') { + return null; + } + + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } // Exports ReactDOM.createRoot + // Experimental error-boundary API that can recover from errors within a single + // render phase + // Suspense + + + var enableSuspense = false; // Helps identify side effects in begin-phase lifecycle hooks and setState reducers: + // In some cases, StrictMode should also double-render lifecycles. + // This can be confusing for tests though, + // And it can be bad for performance in production. + // This feature flag can be used to control the behavior: + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + // Warn about legacy context API + // Gather advanced timing metrics for Profiler subtrees. + // Track which interactions trigger each commit. + // Only used in www builds. + // Only used in www builds. + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat() {}; + + { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error = void 0; + + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + + throw error; + } + } // Relying on the `invariant()` implementation lets us + // preserve the format and params in the www builds. + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + + var lowPriorityWarning = function lowPriorityWarning() {}; + + { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarning = function lowPriorityWarning(condition, format) { + if (format === undefined) { + throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + } + var lowPriorityWarning$1 = lowPriorityWarning; + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warningWithoutStack = function warningWithoutStack() {}; + + { + warningWithoutStack = function warningWithoutStack(condition, format) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var _args$map = args.map(function (item) { + return '' + item; + }), + a = _args$map[0], + b = _args$map[1], + c = _args$map[2], + d = _args$map[3], + e = _args$map[4], + f = _args$map[5], + g = _args$map[6], + h = _args$map[7]; + + var message = 'Warning: ' + format; // We intentionally don't use spread (or .apply) because it breaks IE9: + // https://github.com/facebook/react/issues/13610 + + switch (args.length) { + case 0: + console.error(message); + break; + + case 1: + console.error(message, a); + break; + + case 2: + console.error(message, a, b); + break; + + case 3: + console.error(message, a, b, c); + break; + + case 4: + console.error(message, a, b, c, d); + break; + + case 5: + console.error(message, a, b, c, d, e); + break; + + case 6: + console.error(message, a, b, c, d, e, f); + break; + + case 7: + console.error(message, a, b, c, d, e, f, g); + break; + + case 8: + console.error(message, a, b, c, d, e, f, g, h); + break; + + default: + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + + var _message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + throw new Error(_message); + } catch (x) {} + }; + } + var warningWithoutStack$1 = warningWithoutStack; + var didWarnStateUpdateForUnmountedComponent = {}; + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + + warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + /** + * This is the abstract API for an update queue. + */ + + + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function isMounted(publicInstance) { + return false; + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueForceUpdate: function enqueueForceUpdate(publicInstance, callback, callerName) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @param {?function} callback Called after component is updated. + * @param {?string} Name of the calling function in the public API. + * @internal + */ + enqueueSetState: function enqueueSetState(publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, 'setState'); + } + }; + var emptyObject = {}; + { + Object.freeze(emptyObject); + } + /** + * Base class helpers for the updating state of a component. + */ + + function Component(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the + // renderer. + + this.updater = updater || ReactNoopUpdateQueue; + } + + Component.prototype.isReactComponent = {}; + /** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ + + Component.prototype.setState = function (partialState, callback) { + !(_typeof(partialState) === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0; + this.updater.enqueueSetState(this, partialState, callback, 'setState'); + }; + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ + + + Component.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); + }; + /** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ + + + { + var deprecatedAPIs = { + isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], + replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] + }; + + var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function get() { + lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); + return undefined; + } + }); + }; + + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + + function ComponentDummy() {} + + ComponentDummy.prototype = Component.prototype; + /** + * Convenience component with default shallow equality check for sCU. + */ + + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + + var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); + pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. + + _assign(pureComponentPrototype, Component.prototype); + + pureComponentPrototype.isPureReactComponent = true; // an immutable object with a single mutable value + + function createRef() { + var refObject = { + current: null + }; + { + Object.seal(refObject); + } + return refObject; + } + /** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ + + + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + currentDispatcher: null + }; + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + + var describeComponentFrame = function describeComponentFrame(name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + var Resolved = 1; + + function refineResolvedThenable(thenable) { + return thenable._reactStatus === Resolved ? thenable._reactResult : null; + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + return 'AsyncMode'; + + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_PLACEHOLDER_TYPE: + return 'Placeholder'; + } + + if (_typeof(type) === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + var renderFn = type.render; + var functionName = renderFn.displayName || renderFn.name || ''; + return type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef'); + } + + if (typeof type.then === 'function') { + var thenable = type; + var resolvedThenable = refineResolvedThenable(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = {}; + var currentlyValidatingElement = null; + + function setCurrentlyValidatingElement(element) { + { + currentlyValidatingElement = element; + } + } + + { + // Stack implementation injected by the current renderer. + ReactDebugCurrentFrame.getCurrentStack = null; + + ReactDebugCurrentFrame.getStackAddendum = function () { + var stack = ''; // Add an extra top frame while an element is being validated + + if (currentlyValidatingElement) { + var name = getComponentName(currentlyValidatingElement.type); + var owner = currentlyValidatingElement._owner; + stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type)); + } // Delegate to the injected renderer-specific implementation + + + var impl = ReactDebugCurrentFrame.getCurrentStack; + + if (impl) { + stack += impl() || ''; + } + + return stack; + }; + } + var ReactSharedInternals = { + ReactCurrentOwner: ReactCurrentOwner, + // Used by renderers to avoid bundling object-assign twice in UMD bundles: + assign: _assign + }; + { + _assign(ReactSharedInternals, { + // These should not be included in production. + ReactDebugCurrentFrame: ReactDebugCurrentFrame, + // Shim for React DOM 16.0.0 which still destructured (but not used) this. + // TODO: remove in React 17.0. + ReactComponentTreeHook: {} + }); + } + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + { + warning = function warning(condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack])); + }; + } + var warning$1 = warning; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown = void 0; + var specialPropRefWarningShown = void 0; + + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; + } + + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; + } + + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function warnAboutAccessingKey() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); + } + }; + + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true + }); + } + + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function warnAboutAccessingRef() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); + } + }; + + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); + } + /** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, no instanceof check + * will work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} key + * @param {string|object} ref + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @param {*} owner + * @param {*} props + * @internal + */ + + + var ReactElement = function ReactElement(type, key, ref, self, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false + }); // self and source are DEV only properties. + + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + return element; + }; + /** + * Create and return a new ReactElement of the given type. + * See https://reactjs.org/docs/react-api.html#createelement + */ + + + function createElement(type, config, children) { + var propName = void 0; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } // Resolve default props + + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + { + if (key || ref) { + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Return a function that produces ReactElements of a given type. + * See https://reactjs.org/docs/react-api.html#createfactory + */ + + + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + return newElement; + } + /** + * Clone and return a new ReactElement using element as the starting point. + * See https://reactjs.org/docs/react-api.html#cloneelement + */ + + + function cloneElement(element, config, children) { + !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0; + var propName = void 0; // Original props are copied + + var props = _assign({}, element.props); // Reserved names are extracted + + + var key = element.key; + var ref = element.ref; // Self is preserved since the owner is preserved. + + var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + + var source = element._source; // Owner will be preserved, unless ref is overridden + + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } // Remaining properties override existing props + + + var defaultProps = void 0; + + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); + } + /** + * Verifies the object is a ReactElement. + * See https://reactjs.org/docs/react-api.html#isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a ReactElement. + * @final + */ + + + function isValidElement(object) { + return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + return '$' + escapedString; + } + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + + function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); + } + + var POOL_SIZE = 10; + var traverseContextPool = []; + + function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { + if (traverseContextPool.length) { + var traverseContext = traverseContextPool.pop(); + traverseContext.result = mapResult; + traverseContext.keyPrefix = keyPrefix; + traverseContext.func = mapFunction; + traverseContext.context = mapContext; + traverseContext.count = 0; + return traverseContext; + } else { + return { + result: mapResult, + keyPrefix: keyPrefix, + func: mapFunction, + context: mapContext, + count: 0 + }; + } + } + + function releaseTraverseContext(traverseContext) { + traverseContext.result = null; + traverseContext.keyPrefix = null; + traverseContext.func = null; + traverseContext.context = null; + traverseContext.count = 0; + + if (traverseContextPool.length < POOL_SIZE) { + traverseContextPool.push(traverseContext); + } + } + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + + + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = _typeof(children); + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + var invokeCallback = false; + + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case 'string': + case 'number': + invokeCallback = true; + break; + + case 'object': + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + + } + } + + if (invokeCallback) { + callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child = void 0; + var nextName = void 0; + var subtreeCount = 0; // Count of children found in the current subtree. + + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + { + // Warn about using Maps as children + if (iteratorFn === children.entries) { + !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0; + didWarnAboutMaps = true; + } + } + var iterator = iteratorFn.call(children); + var step = void 0; + var ii = 0; + + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else if (type === 'object') { + var addendum = ''; + { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum(); + } + var childrenString = '' + children; + invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum); + } + } + + return subtreeCount; + } + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + + + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + + + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (_typeof(component) === 'object' && component !== null && component.key != null) { + // Explicit key + return escape(component.key); + } // Implicit key determined by the index in the set + + + return index.toString(36); + } + + function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + func.call(context, child, bookKeeping.count++); + } + /** + * Iterates through children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenforeach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ + + + function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + + var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + releaseTraverseContext(traverseContext); + } + + function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + var mappedChild = func.call(context, child, bookKeeping.count++); + + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); + } + + result.push(mappedChild); + } + } + + function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + + var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + releaseTraverseContext(traverseContext); + } + /** + * Maps children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenmap + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ + + + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; + } + /** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrencount + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ + + + function countChildren(children) { + return traverseAllChildren(children, function () { + return null; + }, null); + } + /** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://reactjs.org/docs/react-api.html#reactchildrentoarray + */ + + + function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, function (child) { + return child; + }); + return result; + } + /** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenonly + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ + + + function onlyChild(children) { + !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0; + return children; + } + + function readContext(context, observedBits) { + var dispatcher = ReactCurrentOwner.currentDispatcher; + !(dispatcher !== null) ? invariant(false, 'Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.') : void 0; + return dispatcher.readContext(context, observedBits); + } + + function createContext(defaultValue, calculateChangedBits) { + if (calculateChangedBits === undefined) { + calculateChangedBits = null; + } else { + { + !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0; + } + } + + var context = { + $$typeof: REACT_CONTEXT_TYPE, + _calculateChangedBits: calculateChangedBits, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. + _currentValue: defaultValue, + _currentValue2: defaultValue, + // These are circular + Provider: null, + Consumer: null, + unstable_read: null + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + context.Consumer = context; + context.unstable_read = readContext.bind(null, context); + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + return context; + } + + function lazy(ctor) { + var thenable = null; + return { + then: function then(resolve, reject) { + if (thenable === null) { + // Lazily create thenable by wrapping in an extra thenable. + thenable = ctor(); + ctor = null; + } + + return thenable.then(resolve, reject); + }, + // React uses these fields to store the result. + _reactStatus: -1, + _reactResult: null + }; + } + + function forwardRef(render) { + { + if (typeof render !== 'function') { + warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : _typeof(render)); + } else { + !( // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object + render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0; + } + + if (render != null) { + !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0; + } + } + return { + $$typeof: REACT_FORWARD_REF_TYPE, + render: render + }; + } + + function isValidElementType(type) { + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_PLACEHOLDER_TYPE || _typeof(type) === 'object' && type !== null && (typeof type.then === 'function' || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); + } + /** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + + + var propTypesMisspellWarningShown = void 0; + { + propTypesMisspellWarningShown = false; + } + + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current.type); + + if (name) { + return '\n\nCheck the render method of `' + name + '`.'; + } + } + + return ''; + } + + function getSourceInfoErrorAddendum(elementProps) { + if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) { + var source = elementProps.__source; + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; + } + + return ''; + } + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + + var ownerHasKeyUseWarning = {}; + + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + + if (parentName) { + info = '\n\nCheck the top-level render call using <' + parentName + '>.'; + } + } + + return info; + } + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + + + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + + var childOwner = ''; + + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.'; + } + + setCurrentlyValidatingElement(element); + { + warning$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner); + } + setCurrentlyValidatingElement(null); + } + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + + + function validateChildKeys(node, parentType) { + if (_typeof(node) !== 'object') { + return; + } + + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + + if (typeof iteratorFn === 'function') { + // Entry iterators used to provide implicit keys, + // but now we print a separate warning for them later. + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step = void 0; + + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + + + function validatePropTypes(element) { + var type = element.type; + var name = void 0, + propTypes = void 0; + + if (typeof type === 'function') { + // Class or functional component + name = type.displayName || type.name; + propTypes = type.propTypes; + } else if (_typeof(type) === 'object' && type !== null && type.$$typeof === REACT_FORWARD_REF_TYPE) { + // ForwardRef + var functionName = type.render.displayName || type.render.name || ''; + name = type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef'); + propTypes = type.propTypes; + } else { + return; + } + + if (propTypes) { + setCurrentlyValidatingElement(element); + checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); + setCurrentlyValidatingElement(null); + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown'); + } + + if (typeof type.getDefaultProps === 'function') { + !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; + } + } + /** + * Given a fragment, validate that it can only be provided with fragment props + * @param {ReactElement} fragment + */ + + + function validateFragmentProps(fragment) { + setCurrentlyValidatingElement(fragment); + var keys = Object.keys(fragment.props); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + + if (key !== 'children' && key !== 'key') { + warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); + break; + } + } + + if (fragment.ref !== null) { + warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.'); + } + + setCurrentlyValidatingElement(null); + } + + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if (type === undefined || _typeof(type) === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendum(props); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString = void 0; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = _typeof(type); + } + + warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); + } + + var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } + + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; // Legacy hook: remove it + + { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function get() { + lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); + Object.defineProperty(this, 'type', { + value: type + }); + return type; + } + }); + } + return validatedFactory; + } + + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + + validatePropTypes(newElement); + return newElement; + } + + var React = { + Children: { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray: toArray, + only: onlyChild + }, + createRef: createRef, + Component: Component, + PureComponent: PureComponent, + createContext: createContext, + forwardRef: forwardRef, + Fragment: REACT_FRAGMENT_TYPE, + StrictMode: REACT_STRICT_MODE_TYPE, + unstable_AsyncMode: REACT_ASYNC_MODE_TYPE, + unstable_Profiler: REACT_PROFILER_TYPE, + createElement: createElementWithValidation, + cloneElement: cloneElementWithValidation, + createFactory: createFactoryWithValidation, + isValidElement: isValidElement, + version: ReactVersion, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals + }; + + if (enableSuspense) { + React.Placeholder = REACT_PLACEHOLDER_TYPE; + React.lazy = lazy; + } + + var React$2 = Object.freeze({ + default: React + }); + var React$3 = React$2 && React || React$2; // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var react = React$3.default || React$3; + module.exports = react; + })(); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(3),i=n(18),l=n(19),a=n(20),u="function"==typeof Symbol&&Symbol.for,s=u?Symbol.for("react.element"):60103,c=u?Symbol.for("react.portal"):60106,f=u?Symbol.for("react.fragment"):60107,d=u?Symbol.for("react.strict_mode"):60108,p=u?Symbol.for("react.profiler"):60114,h=u?Symbol.for("react.provider"):60109,m=u?Symbol.for("react.context"):60110,y=u?Symbol.for("react.async_mode"):60111,v=u?Symbol.for("react.forward_ref"):60112;u&&Symbol.for("react.timeout");var b="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rR.length&&R.push(e)}function A(e,t,n,o){var i=r(e);"undefined"!==i&&"boolean"!==i||(e=null);var l=!1;if(null===e)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case s:case c:l=!0}}if(l)return n(o,e,""===t?"."+M(e,0):t),1;if(l=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;a=t){n=e;break}e=e.next}while(e!==r);null===n?n=r:n===r&&(r=u,c()),(t=n.previous).next=n.previous=u,u.next=n,u.previous=t}}function d(){if(-1===l&&null!==r&&1===r.priorityLevel){u=!0;try{do{f()}while(null!==r&&1===r.priorityLevel)}finally{u=!1,null!==r?c():s=!1}}}function p(e){u=!0;var n=o;o=e;try{if(e)for(;null!==r;){var i=t.unstable_now();if(!(r.expirationTime<=i))break;do{f()}while(null!==r&&r.expirationTime<=i)}else if(null!==r)do{f()}while(null!==r&&!T())}finally{u=!1,o=n,null!==r?c():s=!1,d()}}var h,m,y=Date,v="function"==typeof setTimeout?setTimeout:void 0,b="function"==typeof clearTimeout?clearTimeout:void 0,g="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,w="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function k(e){h=g(function(t){b(m),e(t)}),m=v(function(){w(h),e(t.unstable_now())},100)}if("object"===("undefined"==typeof performance?"undefined":n(performance))&&"function"==typeof performance.now){var x=performance;t.unstable_now=function(){return x.now()}}else t.unstable_now=function(){return y.now()};var _,E,T,S=null;if("undefined"!=typeof window?S=window:void 0!==e&&(S=e),S&&S._schedMock){var C=S._schedMock;_=C[0],E=C[1],T=C[2],t.unstable_now=C[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var P=null,N=function(e){if(null!==P)try{P(e)}finally{P=null}};_=function(e){null!==P?setTimeout(_,0,e):(P=e,setTimeout(N,0,!1))},E=function(){P=null},T=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof g&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof w&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var O=null,R=!1,D=-1,I=!1,A=!1,M=0,U=33,F=33;T=function(){return M<=t.unstable_now()};var L=new MessageChannel,j=L.port2;L.port1.onmessage=function(){R=!1;var e=O,n=D;O=null,D=-1;var r=t.unstable_now(),o=!1;if(0>=M-r){if(!(-1!==n&&n<=r))return I||(I=!0,k(z)),O=e,void(D=n);o=!0}if(null!==e){A=!0;try{e(o)}finally{A=!1}}};var z=function e(t){if(null!==O){k(e);var n=t-M+F;nn&&(n=8),F=nt?j.postMessage(void 0):I||(I=!0,k(z))},E=function(){O=null,R=!1,D=-1}}t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=i,o=l;i=e,l=t.unstable_now();try{return n()}finally{i=r,l=o,d()}},t.unstable_next=function(e){switch(i){case 1:case 2:case 3:var n=3;break;default:n=i}var r=i,o=l;i=n,l=t.unstable_now();try{return e()}finally{i=r,l=o,d()}},t.unstable_scheduleCallback=function(e,o){var a=-1!==l?l:t.unstable_now();if("object"===n(o)&&null!==o&&"number"==typeof o.timeout)o=a+o.timeout;else switch(i){case 1:o=a+-1;break;case 2:o=a+250;break;case 5:o=a+1073741823;break;case 4:o=a+1e4;break;default:o=a+5e3}if(e={callback:e,priorityLevel:i,expirationTime:o,next:null,previous:null},null===r)r=e.next=e.previous=e,c();else{a=null;var u=r;do{if(u.expirationTime>o){a=u;break}u=u.next}while(u!==r);null===a?a=r:a===r&&(r=e,c()),(o=a.previous).next=a.previous=e,e.next=a,e.previous=o}return e},t.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(t===e)r=null;else{e===r&&(r=t);var n=e.previous;n.next=t,t.previous=n}e.next=e.previous=null}},t.unstable_wrapCallback=function(e){var n=i;return function(){var r=i,o=l;i=n,l=t.unstable_now();try{return e.apply(this,arguments)}finally{i=r,l=o,d()}}},t.unstable_getCurrentPriorityLevel=function(){return i},t.unstable_shouldYield=function(){return!o&&(null!==r&&r.expirationTimet.bottom&&n.leftt.right;case"left":return n.left+ot.bottom&&n.topt.right;case"bottom":return n.bottom-o>t.bottom&&n.leftt.right&&n.topt.right&&n.leftt.bottom}}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"object"===n(e)&&null!==e}function l(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,u,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(l(n=this._events[e]))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),r=(s=n.slice()).length,u=0;u0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!o(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,l,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(l=(n=this._events[e]).length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(a=l;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(o(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}}]); \ No newline at end of file + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +if (process.env.NODE_ENV !== "production") { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + + function isValidElementType(type) { + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || _typeof(type) === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); + } + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + + var lowPriorityWarning = function lowPriorityWarning() {}; + + { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarning = function lowPriorityWarning(condition, format) { + if (format === undefined) { + throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + } + var lowPriorityWarning$1 = lowPriorityWarning; + + function typeOf(object) { + if (_typeof(object) === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + + } + + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; + } // AsyncMode is deprecated along with isAsyncMode + + + var AsyncMode = REACT_ASYNC_MODE_TYPE; + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; + var ContextConsumer = REACT_CONTEXT_TYPE; + var ContextProvider = REACT_PROVIDER_TYPE; + var Element = REACT_ELEMENT_TYPE; + var ForwardRef = REACT_FORWARD_REF_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; + var Lazy = REACT_LAZY_TYPE; + var Memo = REACT_MEMO_TYPE; + var Portal = REACT_PORTAL_TYPE; + var Profiler = REACT_PROFILER_TYPE; + var StrictMode = REACT_STRICT_MODE_TYPE; + var Suspense = REACT_SUSPENSE_TYPE; + var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + + function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; + lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); + } + } + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; + } + + function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; + } + + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + + function isElement(object) { + return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + + exports.typeOf = typeOf; + exports.AsyncMode = AsyncMode; + exports.ConcurrentMode = ConcurrentMode; + exports.ContextConsumer = ContextConsumer; + exports.ContextProvider = ContextProvider; + exports.Element = Element; + exports.ForwardRef = ForwardRef; + exports.Fragment = Fragment; + exports.Lazy = Lazy; + exports.Memo = Memo; + exports.Portal = Portal; + exports.Profiler = Profiler; + exports.StrictMode = StrictMode; + exports.Suspense = Suspense; + exports.isValidElementType = isValidElementType; + exports.isAsyncMode = isAsyncMode; + exports.isConcurrentMode = isConcurrentMode; + exports.isContextConsumer = isContextConsumer; + exports.isContextProvider = isContextProvider; + exports.isElement = isElement; + exports.isForwardRef = isForwardRef; + exports.isFragment = isFragment; + exports.isLazy = isLazy; + exports.isMemo = isMemo; + exports.isPortal = isPortal; + exports.isProfiler = isProfiler; + exports.isStrictMode = isStrictMode; + exports.isSuspense = isSuspense; + })(); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var ReactIs = __webpack_require__(4); + +var assign = __webpack_require__(1); + +var ReactPropTypesSecret = __webpack_require__(2); + +var checkPropTypes = __webpack_require__(3); + +var has = Function.call.bind(Object.prototype.hasOwnProperty); + +var printWarning = function printWarning() {}; + +if (process.env.NODE_ENV !== 'production') { + printWarning = function printWarning(text) { + var message = 'Warning: ' + text; + + if (typeof console !== 'undefined') { + console.error(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; +} + +function emptyFunctionThatReturnsNull() { + return null; +} + +module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + + var ANONYMOUS = '<>'; // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + elementType: createElementTypeTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + exact: createStrictShapeTypeChecker + }; + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + + /*eslint-disable no-self-compare*/ + + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + + + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } // Make `instanceof Error` still work for returned errors. + + + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (process.env.NODE_ENV !== 'production') { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); + err.name = 'Invariant Violation'; + throw err; + } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + + if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3) { + printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunctionThatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + + var propValue = props[propName]; + + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + + if (error instanceof Error) { + return error; + } + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function createElementTypeTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + + if (!ReactIs.isValidElementType(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + if (process.env.NODE_ENV !== 'production') { + if (arguments.length > 1) { + printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'); + } else { + printWarning('Invalid argument supplied to oneOf, expected an array.'); + } + } + + return emptyFunctionThatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { + var type = getPreciseType(value); + + if (type === 'symbol') { + return String(value); + } + + return value; + }); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + + var propValue = props[propName]; + var propType = getPropType(propValue); + + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + + for (var key in propValue) { + if (has(propValue, key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + + if (error instanceof Error) { + return error; + } + } + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; + return emptyFunctionThatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + + if (typeof checker !== 'function') { + printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'); + return emptyFunctionThatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; + } + } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + + if (!checker) { + continue; + } + + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + + if (error) { + return error; + } + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function createStrictShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } // We need to check all keys in case some are required but missing from + // props. + + + var allKeys = assign({}, props[propName], shapeTypes); + + for (var key in allKeys) { + var checker = shapeTypes[key]; + + if (!checker) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')); + } + + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + + if (error) { + return error; + } + } + + return null; + } + + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (_typeof(propValue)) { + case 'number': + case 'string': + case 'undefined': + return true; + + case 'boolean': + return !propValue; + + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } // falsy value can't be a Symbol + + + if (!propValue) { + return false; + } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + + + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } // Fallback for non-spec compliant Symbols which are polyfilled. + + + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } // Equivalent of `typeof` but with special handling for array and regexp. + + + function getPropType(propValue) { + var propType = _typeof(propValue); + + if (Array.isArray(propValue)) { + return 'array'; + } + + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + + return propType; + } // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + + + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + + var propType = getPropType(propValue); + + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + + return propType; + } // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + + + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + + default: + return type; + } + } // Returns class name of the object, if any. + + + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; + ReactPropTypes.PropTypes = ReactPropTypes; + return ReactPropTypes; +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + +var ReactPropTypesSecret = __webpack_require__(2); + +function emptyFunction() {} + +function emptyFunctionWithReset() {} + +emptyFunctionWithReset.resetWarningCache = emptyFunction; + +module.exports = function () { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + + var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); + err.name = 'Invariant Violation'; + throw err; + } + + ; + shim.isRequired = shim; + + function getShim() { + return shim; + } + + ; // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + ReactPropTypes.PropTypes = ReactPropTypes; + return ReactPropTypes; +}; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.decode = exports.parse = __webpack_require__(17); +exports.encode = exports.stringify = __webpack_require__(18); + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + // If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +module.exports = function (qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + var maxKeys = 1000; + + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; // maxKeys <= 0 means that we should not limit keys count + + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, + vstr, + k, + v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var stringifyPrimitive = function stringifyPrimitive(v) { + switch (_typeof(v)) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +}; + +module.exports = function (obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + + if (obj === null) { + obj = undefined; + } + + if (_typeof(obj) === 'object') { + return map(objectKeys(obj), function (k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + + if (isArray(obj[k])) { + return map(obj[k], function (v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +function map(xs, f) { + if (xs.map) return xs.map(f); + var res = []; + + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + + return res; +}; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +// Packages +var retrier = __webpack_require__(20); + +function retry(fn, opts) { + function run(resolve, reject) { + var options = opts || {}; + var op = retrier.operation(options); // We allow the user to abort retrying + // this makes sense in the cases where + // knowledge is obtained that retrying + // would be futile (e.g.: auth errors) + + function bail(err) { + reject(err || new Error('Aborted')); + } + + function onError(err, num) { + if (err.bail) { + bail(err); + return; + } + + if (!op.retry(err)) { + reject(op.mainError()); + } else if (options.onRetry) { + options.onRetry(err, num); + } + } + + function runAttempt(num) { + var val; + + try { + val = fn(bail, num); + } catch (err) { + onError(err, num); + return; + } + + Promise.resolve(val).then(resolve).catch(function catchIt(err) { + onError(err, num); + }); + } + + op.attempt(runAttempt); + } + + return new Promise(run); +} + +module.exports = retry; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(21); + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +var RetryOperation = __webpack_require__(22); + +exports.operation = function (options) { + var timeouts = exports.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && options.forever, + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); +}; + +exports.timeouts = function (options) { + if (options instanceof Array) { + return [].concat(options); + } + + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1000, + maxTimeout: Infinity, + randomize: false + }; + + for (var key in options) { + opts[key] = options[key]; + } + + if (opts.minTimeout > opts.maxTimeout) { + throw new Error('minTimeout is greater than maxTimeout'); + } + + var timeouts = []; + + for (var i = 0; i < opts.retries; i++) { + timeouts.push(this.createTimeout(i, opts)); + } + + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i, opts)); + } // sort the array numerically ascending + + + timeouts.sort(function (a, b) { + return a - b; + }); + return timeouts; +}; + +exports.createTimeout = function (attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; +}; + +exports.wrap = function (obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + + if (!methods) { + methods = []; + + for (var key in obj) { + if (typeof obj[key] === 'function') { + methods.push(key); + } + } + } + + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + var original = obj[method]; + + obj[method] = function retryWrapper(original) { + var op = exports.operation(options); + var args = Array.prototype.slice.call(arguments, 1); + var callback = args.pop(); + args.push(function (err) { + if (op.retry(err)) { + return; + } + + if (err) { + arguments[0] = op.mainError(); + } + + callback.apply(this, arguments); + }); + op.attempt(function () { + original.apply(obj, args); + }); + }.bind(obj, original); + + obj[method].options = options; + } +}; + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +function RetryOperation(timeouts, options) { + // Compatibility for the old (timeouts, retryForever) signature + if (typeof options === 'boolean') { + options = { + forever: options + }; + } + + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } +} + +module.exports = RetryOperation; + +RetryOperation.prototype.reset = function () { + this._attempts = 1; + this._timeouts = this._originalTimeouts; +}; + +RetryOperation.prototype.stop = function () { + if (this._timeout) { + clearTimeout(this._timeout); + } + + this._timeouts = []; + this._cachedTimeouts = null; +}; + +RetryOperation.prototype.retry = function (err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + + if (!err) { + return false; + } + + var currentTime = new Date().getTime(); + + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error('RetryOperation timeout occurred')); + + return false; + } + + this._errors.push(err); + + var timeout = this._timeouts.shift(); + + if (timeout === undefined) { + if (this._cachedTimeouts) { + // retry forever, only keep last error + this._errors.splice(this._errors.length - 1, this._errors.length); + + this._timeouts = this._cachedTimeouts.slice(0); + timeout = this._timeouts.shift(); + } else { + return false; + } + } + + var self = this; + var timer = setTimeout(function () { + self._attempts++; + + if (self._operationTimeoutCb) { + self._timeout = setTimeout(function () { + self._operationTimeoutCb(self._attempts); + }, self._operationTimeout); + + if (self._options.unref) { + self._timeout.unref(); + } + } + + self._fn(self._attempts); + }, timeout); + + if (this._options.unref) { + timer.unref(); + } + + return true; +}; + +RetryOperation.prototype.attempt = function (fn, timeoutOps) { + this._fn = fn; + + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; + } + + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + + var self = this; + + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function () { + self._operationTimeoutCb(); + }, self._operationTimeout); + } + + this._operationStart = new Date().getTime(); + + this._fn(this._attempts); +}; + +RetryOperation.prototype.try = function (fn) { + console.log('Using RetryOperation.try() is deprecated'); + this.attempt(fn); +}; + +RetryOperation.prototype.start = function (fn) { + console.log('Using RetryOperation.start() is deprecated'); + this.attempt(fn); +}; + +RetryOperation.prototype.start = RetryOperation.prototype.try; + +RetryOperation.prototype.errors = function () { + return this._errors; +}; + +RetryOperation.prototype.attempts = function () { + return this._attempts; +}; + +RetryOperation.prototype.mainError = function () { + if (this._errors.length === 0) { + return null; + } + + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + + for (var i = 0; i < this._errors.length; i++) { + var error = this._errors[i]; + var message = error.message; + var count = (counts[message] || 0) + 1; + counts[message] = count; + + if (count >= mainErrorCount) { + mainError = error; + mainErrorCount = count; + } + } + + return mainError; +}; + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index f495e6ca6..571a29d46 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -1,6 +1,7 @@ const React = require('react'); const PropTypes = require('prop-types'); const querystring = require('querystring'); +const retry = require('async-retry'); const LoadingSvg = props => ( { - return this.handleData(res); - }); + return retry(async () => { + const res = await fetch(reqUrl); + const parsedLogs = await this.handleData(res); + return checkFreshness(this.state.logs, parsedLogs); + }, { minTimeout: 50 }); } - handleData(res) { + async handleData(res) { this.setState({ loading: false }); if (res.status === 200) { return res.json(); diff --git a/packages/api-logs/package.json b/packages/api-logs/package.json index 27de15ef7..e0340532c 100644 --- a/packages/api-logs/package.json +++ b/packages/api-logs/package.json @@ -4,6 +4,7 @@ "version": "4.8.3", "main": "dist/index.js", "dependencies": { + "async-retry": "^1.2.3", "prop-types": "^15.7.2", "react": "^16.4.2", "react-visibility-sensor": "^4.1.3" From 1190d5573cab9675e28f194a54bcb255f41c1517 Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Thu, 26 Sep 2019 12:08:08 -0700 Subject: [PATCH 07/14] prettier --- packages/api-logs/index.jsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index 571a29d46..8c019a285 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -37,8 +37,10 @@ function getLanguage(log) { } function checkFreshness(existingLogs, incomingLogs) { - if (existingLogs.length && existingLogs[0]._id !== incomingLogs[0]._id - || !existingLogs.length) { + if ( + (existingLogs.length && existingLogs[0]._id !== incomingLogs[0]._id) || + !existingLogs.length + ) { return incomingLogs; } throw new Error('Requested logs are not up-to-date.'); @@ -90,11 +92,14 @@ class Logs extends React.Component { Object.assign({}, query, { id: group || null, limit: 5, page: 0 }), )}`; - return retry(async () => { - const res = await fetch(reqUrl); - const parsedLogs = await this.handleData(res); - return checkFreshness(this.state.logs, parsedLogs); - }, { minTimeout: 50 }); + return retry( + async () => { + const res = await fetch(reqUrl); + const parsedLogs = await this.handleData(res); + return checkFreshness(this.state.logs, parsedLogs); + }, + { minTimeout: 50 }, + ); } async handleData(res) { From b2224872e4cdec96b16f26068fda96d0800cb57e Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Thu, 26 Sep 2019 13:03:56 -0700 Subject: [PATCH 08/14] removing dist from commit --- packages/api-logs/dist/index.js | 5274 ------------------------------- 1 file changed, 5274 deletions(-) delete mode 100644 packages/api-logs/dist/index.js diff --git a/packages/api-logs/dist/index.js b/packages/api-logs/dist/index.js deleted file mode 100644 index 6ca188d8b..000000000 --- a/packages/api-logs/dist/index.js +++ /dev/null @@ -1,5274 +0,0 @@ -module.exports = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 5); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} - -function defaultClearTimeout() { - throw new Error('clearTimeout has not been defined'); -} - -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -})(); - -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } // if setTimeout wasn't available but was latter defined - - - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } -} - -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } // if clearTimeout wasn't available but was latter defined - - - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } -} - -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - - draining = false; - - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - - while (len) { - currentQueue = queue; - queue = []; - - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - - queueIndex = -1; - len = queue.length; - } - - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - - queue.push(new Item(fun, args)); - - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; // v8 likes predictible objects - - -function Item(fun, array) { - this.fun = fun; - this.array = array; -} - -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; - -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues - -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { - return []; -}; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { - return '/'; -}; - -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; - -process.umask = function () { - return 0; -}; - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ - -/* eslint-disable no-unused-vars */ - -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } // Detect buggy property enumeration order in older V8 versions. - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - - - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - - test1[5] = 'de'; - - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - - - var test2 = {}; - - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - - if (order2.join('') !== '0123456789') { - return false; - } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - - - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - - if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -module.exports = ReactPropTypesSecret; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var printWarning = function printWarning() {}; - -if (process.env.NODE_ENV !== 'production') { - var ReactPropTypesSecret = __webpack_require__(2); - - var loggedTypeFailures = {}; - var has = Function.call.bind(Object.prototype.hasOwnProperty); - - printWarning = function printWarning(text) { - var message = 'Warning: ' + text; - - if (typeof console !== 'undefined') { - console.error(message); - } - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; -} -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?Function} getStack Returns the component stack. - * @private - */ - - -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - if (process.env.NODE_ENV !== 'production') { - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error; // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - if (typeof typeSpecs[typeSpecName] !== 'function') { - var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + _typeof(typeSpecs[typeSpecName]) + '`.'); - err.name = 'Invariant Violation'; - throw err; - } - - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - - if (error && !(error instanceof Error)) { - printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).'); - } - - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; - var stack = getStack ? getStack() : ''; - printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')); - } - } - } - } -} -/** - * Resets warning cache when testing. - * - * @private - */ - - -checkPropTypes.resetWarningCache = function () { - if (process.env.NODE_ENV !== 'production') { - loggedTypeFailures = {}; - } -}; - -module.exports = checkPropTypes; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(12); -} else { - module.exports = __webpack_require__(13); -} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(6); -module.exports = __webpack_require__(7); - - -/***/ }), -/* 6 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony export (immutable) */ __webpack_exports__["Headers"] = Headers; -/* harmony export (immutable) */ __webpack_exports__["Request"] = Request; -/* harmony export (immutable) */ __webpack_exports__["Response"] = Response; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOMException", function() { return DOMException; }); -/* harmony export (immutable) */ __webpack_exports__["fetch"] = fetch; -var support = { - searchParams: 'URLSearchParams' in self, - iterable: 'Symbol' in self && 'iterator' in Symbol, - blob: 'FileReader' in self && 'Blob' in self && function () { - try { - new Blob(); - return true; - } catch (e) { - return false; - } - }(), - formData: 'FormData' in self, - arrayBuffer: 'ArrayBuffer' in self -}; - -function isDataView(obj) { - return obj && DataView.prototype.isPrototypeOf(obj); -} - -if (support.arrayBuffer) { - var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]']; - - var isArrayBufferView = ArrayBuffer.isView || function (obj) { - return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1; - }; -} - -function normalizeName(name) { - if (typeof name !== 'string') { - name = String(name); - } - - if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { - throw new TypeError('Invalid character in header field name'); - } - - return name.toLowerCase(); -} - -function normalizeValue(value) { - if (typeof value !== 'string') { - value = String(value); - } - - return value; -} // Build a destructive iterator for the value list - - -function iteratorFor(items) { - var iterator = { - next: function next() { - var value = items.shift(); - return { - done: value === undefined, - value: value - }; - } - }; - - if (support.iterable) { - iterator[Symbol.iterator] = function () { - return iterator; - }; - } - - return iterator; -} - -function Headers(headers) { - this.map = {}; - - if (headers instanceof Headers) { - headers.forEach(function (value, name) { - this.append(name, value); - }, this); - } else if (Array.isArray(headers)) { - headers.forEach(function (header) { - this.append(header[0], header[1]); - }, this); - } else if (headers) { - Object.getOwnPropertyNames(headers).forEach(function (name) { - this.append(name, headers[name]); - }, this); - } -} - -Headers.prototype.append = function (name, value) { - name = normalizeName(name); - value = normalizeValue(value); - var oldValue = this.map[name]; - this.map[name] = oldValue ? oldValue + ', ' + value : value; -}; - -Headers.prototype['delete'] = function (name) { - delete this.map[normalizeName(name)]; -}; - -Headers.prototype.get = function (name) { - name = normalizeName(name); - return this.has(name) ? this.map[name] : null; -}; - -Headers.prototype.has = function (name) { - return this.map.hasOwnProperty(normalizeName(name)); -}; - -Headers.prototype.set = function (name, value) { - this.map[normalizeName(name)] = normalizeValue(value); -}; - -Headers.prototype.forEach = function (callback, thisArg) { - for (var name in this.map) { - if (this.map.hasOwnProperty(name)) { - callback.call(thisArg, this.map[name], name, this); - } - } -}; - -Headers.prototype.keys = function () { - var items = []; - this.forEach(function (value, name) { - items.push(name); - }); - return iteratorFor(items); -}; - -Headers.prototype.values = function () { - var items = []; - this.forEach(function (value) { - items.push(value); - }); - return iteratorFor(items); -}; - -Headers.prototype.entries = function () { - var items = []; - this.forEach(function (value, name) { - items.push([name, value]); - }); - return iteratorFor(items); -}; - -if (support.iterable) { - Headers.prototype[Symbol.iterator] = Headers.prototype.entries; -} - -function consumed(body) { - if (body.bodyUsed) { - return Promise.reject(new TypeError('Already read')); - } - - body.bodyUsed = true; -} - -function fileReaderReady(reader) { - return new Promise(function (resolve, reject) { - reader.onload = function () { - resolve(reader.result); - }; - - reader.onerror = function () { - reject(reader.error); - }; - }); -} - -function readBlobAsArrayBuffer(blob) { - var reader = new FileReader(); - var promise = fileReaderReady(reader); - reader.readAsArrayBuffer(blob); - return promise; -} - -function readBlobAsText(blob) { - var reader = new FileReader(); - var promise = fileReaderReady(reader); - reader.readAsText(blob); - return promise; -} - -function readArrayBufferAsText(buf) { - var view = new Uint8Array(buf); - var chars = new Array(view.length); - - for (var i = 0; i < view.length; i++) { - chars[i] = String.fromCharCode(view[i]); - } - - return chars.join(''); -} - -function bufferClone(buf) { - if (buf.slice) { - return buf.slice(0); - } else { - var view = new Uint8Array(buf.byteLength); - view.set(new Uint8Array(buf)); - return view.buffer; - } -} - -function Body() { - this.bodyUsed = false; - - this._initBody = function (body) { - this._bodyInit = body; - - if (!body) { - this._bodyText = ''; - } else if (typeof body === 'string') { - this._bodyText = body; - } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { - this._bodyBlob = body; - } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { - this._bodyFormData = body; - } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { - this._bodyText = body.toString(); - } else if (support.arrayBuffer && support.blob && isDataView(body)) { - this._bodyArrayBuffer = bufferClone(body.buffer); // IE 10-11 can't handle a DataView body. - - this._bodyInit = new Blob([this._bodyArrayBuffer]); - } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { - this._bodyArrayBuffer = bufferClone(body); - } else { - this._bodyText = body = Object.prototype.toString.call(body); - } - - if (!this.headers.get('content-type')) { - if (typeof body === 'string') { - this.headers.set('content-type', 'text/plain;charset=UTF-8'); - } else if (this._bodyBlob && this._bodyBlob.type) { - this.headers.set('content-type', this._bodyBlob.type); - } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { - this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - } - }; - - if (support.blob) { - this.blob = function () { - var rejected = consumed(this); - - if (rejected) { - return rejected; - } - - if (this._bodyBlob) { - return Promise.resolve(this._bodyBlob); - } else if (this._bodyArrayBuffer) { - return Promise.resolve(new Blob([this._bodyArrayBuffer])); - } else if (this._bodyFormData) { - throw new Error('could not read FormData body as blob'); - } else { - return Promise.resolve(new Blob([this._bodyText])); - } - }; - - this.arrayBuffer = function () { - if (this._bodyArrayBuffer) { - return consumed(this) || Promise.resolve(this._bodyArrayBuffer); - } else { - return this.blob().then(readBlobAsArrayBuffer); - } - }; - } - - this.text = function () { - var rejected = consumed(this); - - if (rejected) { - return rejected; - } - - if (this._bodyBlob) { - return readBlobAsText(this._bodyBlob); - } else if (this._bodyArrayBuffer) { - return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)); - } else if (this._bodyFormData) { - throw new Error('could not read FormData body as text'); - } else { - return Promise.resolve(this._bodyText); - } - }; - - if (support.formData) { - this.formData = function () { - return this.text().then(decode); - }; - } - - this.json = function () { - return this.text().then(JSON.parse); - }; - - return this; -} // HTTP methods whose capitalization should be normalized - - -var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']; - -function normalizeMethod(method) { - var upcased = method.toUpperCase(); - return methods.indexOf(upcased) > -1 ? upcased : method; -} - -function Request(input, options) { - options = options || {}; - var body = options.body; - - if (input instanceof Request) { - if (input.bodyUsed) { - throw new TypeError('Already read'); - } - - this.url = input.url; - this.credentials = input.credentials; - - if (!options.headers) { - this.headers = new Headers(input.headers); - } - - this.method = input.method; - this.mode = input.mode; - this.signal = input.signal; - - if (!body && input._bodyInit != null) { - body = input._bodyInit; - input.bodyUsed = true; - } - } else { - this.url = String(input); - } - - this.credentials = options.credentials || this.credentials || 'same-origin'; - - if (options.headers || !this.headers) { - this.headers = new Headers(options.headers); - } - - this.method = normalizeMethod(options.method || this.method || 'GET'); - this.mode = options.mode || this.mode || null; - this.signal = options.signal || this.signal; - this.referrer = null; - - if ((this.method === 'GET' || this.method === 'HEAD') && body) { - throw new TypeError('Body not allowed for GET or HEAD requests'); - } - - this._initBody(body); -} - -Request.prototype.clone = function () { - return new Request(this, { - body: this._bodyInit - }); -}; - -function decode(body) { - var form = new FormData(); - body.trim().split('&').forEach(function (bytes) { - if (bytes) { - var split = bytes.split('='); - var name = split.shift().replace(/\+/g, ' '); - var value = split.join('=').replace(/\+/g, ' '); - form.append(decodeURIComponent(name), decodeURIComponent(value)); - } - }); - return form; -} - -function parseHeaders(rawHeaders) { - var headers = new Headers(); // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space - // https://tools.ietf.org/html/rfc7230#section-3.2 - - var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); - preProcessedHeaders.split(/\r?\n/).forEach(function (line) { - var parts = line.split(':'); - var key = parts.shift().trim(); - - if (key) { - var value = parts.join(':').trim(); - headers.append(key, value); - } - }); - return headers; -} - -Body.call(Request.prototype); -function Response(bodyInit, options) { - if (!options) { - options = {}; - } - - this.type = 'default'; - this.status = options.status === undefined ? 200 : options.status; - this.ok = this.status >= 200 && this.status < 300; - this.statusText = 'statusText' in options ? options.statusText : 'OK'; - this.headers = new Headers(options.headers); - this.url = options.url || ''; - - this._initBody(bodyInit); -} -Body.call(Response.prototype); - -Response.prototype.clone = function () { - return new Response(this._bodyInit, { - status: this.status, - statusText: this.statusText, - headers: new Headers(this.headers), - url: this.url - }); -}; - -Response.error = function () { - var response = new Response(null, { - status: 0, - statusText: '' - }); - response.type = 'error'; - return response; -}; - -var redirectStatuses = [301, 302, 303, 307, 308]; - -Response.redirect = function (url, status) { - if (redirectStatuses.indexOf(status) === -1) { - throw new RangeError('Invalid status code'); - } - - return new Response(null, { - status: status, - headers: { - location: url - } - }); -}; - -var DOMException = self.DOMException; - -try { - new DOMException(); -} catch (err) { - DOMException = function DOMException(message, name) { - this.message = message; - this.name = name; - var error = Error(message); - this.stack = error.stack; - }; - - DOMException.prototype = Object.create(Error.prototype); - DOMException.prototype.constructor = DOMException; -} - -function fetch(input, init) { - return new Promise(function (resolve, reject) { - var request = new Request(input, init); - - if (request.signal && request.signal.aborted) { - return reject(new DOMException('Aborted', 'AbortError')); - } - - var xhr = new XMLHttpRequest(); - - function abortXhr() { - xhr.abort(); - } - - xhr.onload = function () { - var options = { - status: xhr.status, - statusText: xhr.statusText, - headers: parseHeaders(xhr.getAllResponseHeaders() || '') - }; - options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL'); - var body = 'response' in xhr ? xhr.response : xhr.responseText; - resolve(new Response(body, options)); - }; - - xhr.onerror = function () { - reject(new TypeError('Network request failed')); - }; - - xhr.ontimeout = function () { - reject(new TypeError('Network request failed')); - }; - - xhr.onabort = function () { - reject(new DOMException('Aborted', 'AbortError')); - }; - - xhr.open(request.method, request.url, true); - - if (request.credentials === 'include') { - xhr.withCredentials = true; - } else if (request.credentials === 'omit') { - xhr.withCredentials = false; - } - - if ('responseType' in xhr && support.blob) { - xhr.responseType = 'blob'; - } - - request.headers.forEach(function (value, name) { - xhr.setRequestHeader(name, value); - }); - - if (request.signal) { - request.signal.addEventListener('abort', abortXhr); - - xhr.onreadystatechange = function () { - // DONE (success or failure) - if (xhr.readyState === 4) { - request.signal.removeEventListener('abort', abortXhr); - } - }; - } - - xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit); - }); -} -fetch.polyfill = true; - -if (!self.fetch) { - self.fetch = fetch; - self.Headers = Headers; - self.Request = Request; - self.Response = Response; -} - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - -var React = __webpack_require__(8); - -var PropTypes = __webpack_require__(11); - -var querystring = __webpack_require__(16); - -var retry = __webpack_require__(19); - -var LoadingSvg = function LoadingSvg(props) { - return React.createElement("svg", _extends({ - width: "38", - height: "38", - viewBox: "0 0 38 38", - xmlns: "http://www.w3.org/2000/svg", - stroke: "#2283c9" - }, props), React.createElement("g", { - transform: "translate(1 1)", - strokeWidth: "2", - fill: "none", - fillRule: "evenodd" - }, React.createElement("circle", { - strokeOpacity: "0.5", - cx: "18", - cy: "18", - r: "18" - }), React.createElement("path", { - d: "M36 18c0-9.94-8.06-18-18-18" - }, React.createElement("animateTransform", { - attributeName: "transform", - type: "rotate", - from: "0 18 18", - to: "360 18 18", - dur: "1s", - repeatCount: "indefinite" - })))); -}; - -function getLanguage(log) { - var header = log.request.log.entries[0].request.headers.find(function (e) { - return e.name.toLowerCase() === 'user-agent'; - }); - if (header) return header.value; - return '-'; -} - -function checkFreshness(existingLogs, incomingLogs) { - if (existingLogs.length && existingLogs[0]._id !== incomingLogs[0]._id || !existingLogs.length) { - return incomingLogs; - } - - throw new Error('Requested logs are not up-to-date.'); -} - -var Logs = -/*#__PURE__*/ -function (_React$Component) { - _inherits(Logs, _React$Component); - - function Logs(props) { - var _this; - - _classCallCheck(this, Logs); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(Logs).call(this, props)); - _this.state = { - loading: false, - logs: [] - }; - _this.renderSelect = _this.renderSelect.bind(_assertThisInitialized(_this)); - _this.onSelect = _this.onSelect.bind(_assertThisInitialized(_this)); - _this.renderTable = _this.renderTable.bind(_assertThisInitialized(_this)); - _this.visitLogItem = _this.visitLogItem.bind(_assertThisInitialized(_this)); - _this.changeGroup = _this.changeGroup.bind(_assertThisInitialized(_this)); - return _this; - } - - _createClass(Logs, [{ - key: "componentDidMount", - value: function componentDidMount() { - this.refresh(); - } - }, { - key: "componentDidUpdate", - value: function componentDidUpdate(prevProps) { - // Refresh if the group has changed - if (this.props.group !== prevProps.group) { - // Setting logs to [] means we show the loading icon - // eslint-disable-next-line react/no-did-update-set-state - this.setState({ - logs: [] - }); - this.refresh(); - } // Refresh if the result has changed (this means has "try it now" been called?) - - - if (this.props.result !== prevProps.result) { - this.refresh(); - } - } - }, { - key: "onSelect", - value: function onSelect(event) { - this.changeGroup(event.target.value); - } - }, { - key: "getData", - value: function getData() { - var _this2 = this; - - var _this$props = this.props, - query = _this$props.query, - baseUrl = _this$props.baseUrl, - group = _this$props.group; - this.setState({ - loading: true - }); - var reqUrl = "".concat(baseUrl, "/api/logs?").concat(querystring.stringify(Object.assign({}, query, { - id: group || null, - limit: 5, - page: 0 - }))); - return retry( - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee() { - var res, parsedLogs; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return fetch(reqUrl); - - case 2: - res = _context.sent; - _context.next = 5; - return _this2.handleData(res); - - case 5: - parsedLogs = _context.sent; - return _context.abrupt("return", checkFreshness(_this2.state.logs, parsedLogs)); - - case 7: - case "end": - return _context.stop(); - } - } - }, _callee); - })), { - minTimeout: 50 - }); - } - }, { - key: "handleData", - value: function () { - var _handleData = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(res) { - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - this.setState({ - loading: false - }); - - if (!(res.status === 200)) { - _context2.next = 3; - break; - } - - return _context2.abrupt("return", res.json()); - - case 3: - throw new Error("Failed to fetch logs"); - - case 4: - case "end": - return _context2.stop(); - } - } - }, _callee2, this); - })); - - function handleData(_x) { - return _handleData.apply(this, arguments); - } - - return handleData; - }() - }, { - key: "changeGroup", - value: function changeGroup(group) { - this.props.changeGroup(group); - } - }, { - key: "refresh", - value: function refresh() { - var _this3 = this; - - this.getData().then(function (logs) { - _this3.setState({ - logs: logs - }); - }).catch(function () {// TODO HANDLE ERROR - }); - } - }, { - key: "visitLogItem", - value: function visitLogItem(log) { - var baseUrl = this.props.baseUrl; - window.open("".concat(baseUrl, "logs/").concat(log._id)); - } - }, { - key: "renderLogs", - value: function renderLogs() { - var _this4 = this; - - var logs = this.state.logs; - return logs.map(function (log) { - var entry = log.request.log.entries[0]; - /* eslint-disable react/jsx-no-bind */ - - return React.createElement("tr", { - onClick: _this4.visitLogItem.bind(_this4, log), - key: log._id - }, React.createElement("td", null, entry.request.method), React.createElement("td", null, entry.response.status), React.createElement("td", null, entry.request.url), React.createElement("td", null, log.group.label), React.createElement("td", null, getLanguage(log)), React.createElement("td", null, new Date(log.createdAt).toLocaleString())); - }); - } - }, { - key: "renderSelect", - value: function renderSelect() { - var _this$props2 = this.props, - groups = _this$props2.groups, - group = _this$props2.group; - - if (groups && groups.length > 1) { - return React.createElement("select", { - value: group, - onChange: this.onSelect - }, groups.map(Logs.renderOption)); - } - - return null; - } - }, { - key: "renderTable", - value: function renderTable() { - var _this$state = this.state, - loading = _this$state.loading, - logs = _this$state.logs; - - if (loading && logs.length === 0) { - return React.createElement("div", { - className: "loading-container" - }, React.createElement(LoadingSvg, { - className: "normal" - })); - } - - if (!logs.length) { - return React.createElement("div", { - className: "logs-empty" - }, React.createElement("p", null, "No Logs")); - } - - return React.createElement("table", { - className: "table" - }, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", { - className: "method" - }, "Method"), React.createElement("th", { - className: "status" - }, "Status"), React.createElement("th", { - className: "url" - }, "URL"), React.createElement("th", { - className: "group" - }, "Project"), React.createElement("th", { - className: "useragent" - }, "User Agent"), React.createElement("th", { - className: "time" - }, "Time"))), React.createElement("tbody", null, this.renderLogs())); - } - }, { - key: "render", - value: function render() { - var _this$props3 = this.props, - query = _this$props3.query, - baseUrl = _this$props3.baseUrl, - group = _this$props3.group; - if (!group) return null; - var url = "".concat(baseUrl, "/logs?").concat(querystring.stringify(Object.assign({}, query, { - id: group - }))); - return React.createElement("div", { - className: "logs" - }, React.createElement("div", { - className: "log-header" - }, React.createElement("h3", null, "Logs"), React.createElement("div", { - className: "select-container" - }, React.createElement("div", null, React.createElement("a", { - href: url, - target: "_blank", - rel: "noopener noreferrer" - }, "View More"), this.renderSelect()))), React.createElement("div", { - className: "logs-list" - }, this.renderTable())); - } - }], [{ - key: "renderOption", - value: function renderOption(item) { - return React.createElement("option", { - key: item.id, - value: item.id - }, item.name); - } - }]); - - return Logs; -}(React.Component); - -Logs.propTypes = { - query: PropTypes.shape({}).isRequired, - baseUrl: PropTypes.string.isRequired, - group: PropTypes.string, - groups: PropTypes.arrayOf(PropTypes.shape({ - id: PropTypes.string, - name: PropTypes.string - })), - changeGroup: PropTypes.func.isRequired, - result: PropTypes.shape({}) -}; -Logs.defaultProps = { - group: '', - groups: [], - result: null -}; -module.exports = Logs; -module.exports.Logs = Logs; - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(9); -} else { - module.exports = __webpack_require__(10); -} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** @license React v16.5.1 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var m = __webpack_require__(1), - n = "function" === typeof Symbol && Symbol.for, - p = n ? Symbol.for("react.element") : 60103, - q = n ? Symbol.for("react.portal") : 60106, - r = n ? Symbol.for("react.fragment") : 60107, - t = n ? Symbol.for("react.strict_mode") : 60108, - u = n ? Symbol.for("react.profiler") : 60114, - v = n ? Symbol.for("react.provider") : 60109, - w = n ? Symbol.for("react.context") : 60110, - x = n ? Symbol.for("react.async_mode") : 60111, - y = n ? Symbol.for("react.forward_ref") : 60112; - -n && Symbol.for("react.placeholder"); -var z = "function" === typeof Symbol && Symbol.iterator; - -function A(a, b, d, c, e, g, h, f) { - if (!a) { - a = void 0; - if (void 0 === b) a = Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else { - var k = [d, c, e, g, h, f], - l = 0; - a = Error(b.replace(/%s/g, function () { - return k[l++]; - })); - a.name = "Invariant Violation"; - } - a.framesToPop = 1; - throw a; - } -} - -function B(a) { - for (var b = arguments.length - 1, d = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 0; c < b; c++) { - d += "&args[]=" + encodeURIComponent(arguments[c + 1]); - } - - A(!1, "Minified React error #" + a + "; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ", d); -} - -var C = { - isMounted: function isMounted() { - return !1; - }, - enqueueForceUpdate: function enqueueForceUpdate() {}, - enqueueReplaceState: function enqueueReplaceState() {}, - enqueueSetState: function enqueueSetState() {} -}, - D = {}; - -function E(a, b, d) { - this.props = a; - this.context = b; - this.refs = D; - this.updater = d || C; -} - -E.prototype.isReactComponent = {}; - -E.prototype.setState = function (a, b) { - "object" !== _typeof(a) && "function" !== typeof a && null != a ? B("85") : void 0; - this.updater.enqueueSetState(this, a, b, "setState"); -}; - -E.prototype.forceUpdate = function (a) { - this.updater.enqueueForceUpdate(this, a, "forceUpdate"); -}; - -function F() {} - -F.prototype = E.prototype; - -function G(a, b, d) { - this.props = a; - this.context = b; - this.refs = D; - this.updater = d || C; -} - -var H = G.prototype = new F(); -H.constructor = G; -m(H, E.prototype); -H.isPureReactComponent = !0; -var I = { - current: null, - currentDispatcher: null -}, - J = Object.prototype.hasOwnProperty, - K = { - key: !0, - ref: !0, - __self: !0, - __source: !0 -}; - -function L(a, b, d) { - var c = void 0, - e = {}, - g = null, - h = null; - if (null != b) for (c in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (g = "" + b.key), b) { - J.call(b, c) && !K.hasOwnProperty(c) && (e[c] = b[c]); - } - var f = arguments.length - 2; - if (1 === f) e.children = d;else if (1 < f) { - for (var k = Array(f), l = 0; l < f; l++) { - k[l] = arguments[l + 2]; - } - - e.children = k; - } - if (a && a.defaultProps) for (c in f = a.defaultProps, f) { - void 0 === e[c] && (e[c] = f[c]); - } - return { - $$typeof: p, - type: a, - key: g, - ref: h, - props: e, - _owner: I.current - }; -} - -function M(a, b) { - return { - $$typeof: p, - type: a.type, - key: b, - ref: a.ref, - props: a.props, - _owner: a._owner - }; -} - -function N(a) { - return "object" === _typeof(a) && null !== a && a.$$typeof === p; -} - -function escape(a) { - var b = { - "=": "=0", - ":": "=2" - }; - return "$" + ("" + a).replace(/[=:]/g, function (a) { - return b[a]; - }); -} - -var O = /\/+/g, - P = []; - -function Q(a, b, d, c) { - if (P.length) { - var e = P.pop(); - e.result = a; - e.keyPrefix = b; - e.func = d; - e.context = c; - e.count = 0; - return e; - } - - return { - result: a, - keyPrefix: b, - func: d, - context: c, - count: 0 - }; -} - -function R(a) { - a.result = null; - a.keyPrefix = null; - a.func = null; - a.context = null; - a.count = 0; - 10 > P.length && P.push(a); -} - -function S(a, b, d, c) { - var e = _typeof(a); - - if ("undefined" === e || "boolean" === e) a = null; - var g = !1; - if (null === a) g = !0;else switch (e) { - case "string": - case "number": - g = !0; - break; - - case "object": - switch (a.$$typeof) { - case p: - case q: - g = !0; - } - - } - if (g) return d(c, a, "" === b ? "." + T(a, 0) : b), 1; - g = 0; - b = "" === b ? "." : b + ":"; - if (Array.isArray(a)) for (var h = 0; h < a.length; h++) { - e = a[h]; - var f = b + T(e, h); - g += S(e, f, d, c); - } else if (null === a || "object" !== _typeof(a) ? f = null : (f = z && a[z] || a["@@iterator"], f = "function" === typeof f ? f : null), "function" === typeof f) for (a = f.call(a), h = 0; !(e = a.next()).done;) { - e = e.value, f = b + T(e, h++), g += S(e, f, d, c); - } else "object" === e && (d = "" + a, B("31", "[object Object]" === d ? "object with keys {" + Object.keys(a).join(", ") + "}" : d, "")); - return g; -} - -function U(a, b, d) { - return null == a ? 0 : S(a, "", b, d); -} - -function T(a, b) { - return "object" === _typeof(a) && null !== a && null != a.key ? escape(a.key) : b.toString(36); -} - -function V(a, b) { - a.func.call(a.context, b, a.count++); -} - -function aa(a, b, d) { - var c = a.result, - e = a.keyPrefix; - a = a.func.call(a.context, b, a.count++); - Array.isArray(a) ? W(a, c, d, function (a) { - return a; - }) : null != a && (N(a) && (a = M(a, e + (!a.key || b && b.key === a.key ? "" : ("" + a.key).replace(O, "$&/") + "/") + d)), c.push(a)); -} - -function W(a, b, d, c, e) { - var g = ""; - null != d && (g = ("" + d).replace(O, "$&/") + "/"); - b = Q(b, g, c, e); - U(a, aa, b); - R(b); -} - -function ba(a, b) { - var d = I.currentDispatcher; - null === d ? B("277") : void 0; - return d.readContext(a, b); -} - -var X = { - Children: { - map: function map(a, b, d) { - if (null == a) return a; - var c = []; - W(a, c, null, b, d); - return c; - }, - forEach: function forEach(a, b, d) { - if (null == a) return a; - b = Q(null, null, b, d); - U(a, V, b); - R(b); - }, - count: function count(a) { - return U(a, function () { - return null; - }, null); - }, - toArray: function toArray(a) { - var b = []; - W(a, b, null, function (a) { - return a; - }); - return b; - }, - only: function only(a) { - N(a) ? void 0 : B("143"); - return a; - } - }, - createRef: function createRef() { - return { - current: null - }; - }, - Component: E, - PureComponent: G, - createContext: function createContext(a, b) { - void 0 === b && (b = null); - a = { - $$typeof: w, - _calculateChangedBits: b, - _currentValue: a, - _currentValue2: a, - Provider: null, - Consumer: null, - unstable_read: null - }; - a.Provider = { - $$typeof: v, - _context: a - }; - a.Consumer = a; - a.unstable_read = ba.bind(null, a); - return a; - }, - forwardRef: function forwardRef(a) { - return { - $$typeof: y, - render: a - }; - }, - Fragment: r, - StrictMode: t, - unstable_AsyncMode: x, - unstable_Profiler: u, - createElement: L, - cloneElement: function cloneElement(a, b, d) { - null === a || void 0 === a ? B("267", a) : void 0; - var c = void 0, - e = m({}, a.props), - g = a.key, - h = a.ref, - f = a._owner; - - if (null != b) { - void 0 !== b.ref && (h = b.ref, f = I.current); - void 0 !== b.key && (g = "" + b.key); - var k = void 0; - a.type && a.type.defaultProps && (k = a.type.defaultProps); - - for (c in b) { - J.call(b, c) && !K.hasOwnProperty(c) && (e[c] = void 0 === b[c] && void 0 !== k ? k[c] : b[c]); - } - } - - c = arguments.length - 2; - if (1 === c) e.children = d;else if (1 < c) { - k = Array(c); - - for (var l = 0; l < c; l++) { - k[l] = arguments[l + 2]; - } - - e.children = k; - } - return { - $$typeof: p, - type: a.type, - key: g, - ref: h, - props: e, - _owner: f - }; - }, - createFactory: function createFactory(a) { - var b = L.bind(null, a); - b.type = a; - return b; - }, - isValidElement: N, - version: "16.5.1", - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { - ReactCurrentOwner: I, - assign: m - } -}, - Y = { - default: X -}, - Z = Y && X || Y; -module.exports = Z.default || Z; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.5.1 - * react.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -if (process.env.NODE_ENV !== "production") { - (function () { - 'use strict'; - - var _assign = __webpack_require__(1); - - var checkPropTypes = __webpack_require__(3); // TODO: this is special because it gets imported during build. - - - var ReactVersion = '16.5.1'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol - // nor polyfill, then a plain number is used for performance. - - var hasSymbol = typeof Symbol === 'function' && Symbol.for; - var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; - var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; - var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; - var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; - var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; - var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; - var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; - var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; - var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; - var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1; - var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; - - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || _typeof(maybeIterable) !== 'object') { - return null; - } - - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - - if (typeof maybeIterator === 'function') { - return maybeIterator; - } - - return null; - } // Exports ReactDOM.createRoot - // Experimental error-boundary API that can recover from errors within a single - // render phase - // Suspense - - - var enableSuspense = false; // Helps identify side effects in begin-phase lifecycle hooks and setState reducers: - // In some cases, StrictMode should also double-render lifecycles. - // This can be confusing for tests though, - // And it can be bad for performance in production. - // This feature flag can be used to control the behavior: - // To preserve the "Pause on caught exceptions" behavior of the debugger, we - // replay the begin phase of a failed component inside invokeGuardedCallback. - // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: - // Warn about legacy context API - // Gather advanced timing metrics for Profiler subtrees. - // Track which interactions trigger each commit. - // Only used in www builds. - // Only used in www builds. - // React Fire: prevent the value and checked attributes from syncing - // with their related DOM properties - - /** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - - var validateFormat = function validateFormat() {}; - - { - validateFormat = function validateFormat(format) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - }; - } - - function invariant(condition, format, a, b, c, d, e, f) { - validateFormat(format); - - if (!condition) { - var error = void 0; - - if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error(format.replace(/%s/g, function () { - return args[argIndex++]; - })); - error.name = 'Invariant Violation'; - } - - error.framesToPop = 1; // we don't care about invariant's own frame - - throw error; - } - } // Relying on the `invariant()` implementation lets us - // preserve the format and params in the www builds. - - /** - * Forked from fbjs/warning: - * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js - * - * Only change is we use console.warn instead of console.error, - * and do nothing when 'console' is not supported. - * This really simplifies the code. - * --- - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - - - var lowPriorityWarning = function lowPriorityWarning() {}; - - { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - - if (typeof console !== 'undefined') { - console.warn(message); - } - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; - - lowPriorityWarning = function lowPriorityWarning(condition, format) { - if (format === undefined) { - throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; - } - var lowPriorityWarning$1 = lowPriorityWarning; - /** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - - var warningWithoutStack = function warningWithoutStack() {}; - - { - warningWithoutStack = function warningWithoutStack(condition, format) { - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } - - if (format === undefined) { - throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument'); - } - - if (args.length > 8) { - // Check before the condition to catch violations early. - throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); - } - - if (condition) { - return; - } - - if (typeof console !== 'undefined') { - var _args$map = args.map(function (item) { - return '' + item; - }), - a = _args$map[0], - b = _args$map[1], - c = _args$map[2], - d = _args$map[3], - e = _args$map[4], - f = _args$map[5], - g = _args$map[6], - h = _args$map[7]; - - var message = 'Warning: ' + format; // We intentionally don't use spread (or .apply) because it breaks IE9: - // https://github.com/facebook/react/issues/13610 - - switch (args.length) { - case 0: - console.error(message); - break; - - case 1: - console.error(message, a); - break; - - case 2: - console.error(message, a, b); - break; - - case 3: - console.error(message, a, b, c); - break; - - case 4: - console.error(message, a, b, c, d); - break; - - case 5: - console.error(message, a, b, c, d, e); - break; - - case 6: - console.error(message, a, b, c, d, e, f); - break; - - case 7: - console.error(message, a, b, c, d, e, f, g); - break; - - case 8: - console.error(message, a, b, c, d, e, f, g, h); - break; - - default: - throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); - } - } - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - var argIndex = 0; - - var _message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - - throw new Error(_message); - } catch (x) {} - }; - } - var warningWithoutStack$1 = warningWithoutStack; - var didWarnStateUpdateForUnmountedComponent = {}; - - function warnNoop(publicInstance, callerName) { - { - var _constructor = publicInstance.constructor; - var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; - var warningKey = componentName + '.' + callerName; - - if (didWarnStateUpdateForUnmountedComponent[warningKey]) { - return; - } - - warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); - didWarnStateUpdateForUnmountedComponent[warningKey] = true; - } - } - /** - * This is the abstract API for an update queue. - */ - - - var ReactNoopUpdateQueue = { - /** - * Checks whether or not this composite component is mounted. - * @param {ReactClass} publicInstance The instance we want to test. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function isMounted(publicInstance) { - return false; - }, - - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {?function} callback Called after component is updated. - * @param {?string} callerName name of the calling function in the public API. - * @internal - */ - enqueueForceUpdate: function enqueueForceUpdate(publicInstance, callback, callerName) { - warnNoop(publicInstance, 'forceUpdate'); - }, - - /** - * Replaces all of the state. Always use this or `setState` to mutate state. - * You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} completeState Next state. - * @param {?function} callback Called after component is updated. - * @param {?string} callerName name of the calling function in the public API. - * @internal - */ - enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState, callback, callerName) { - warnNoop(publicInstance, 'replaceState'); - }, - - /** - * Sets a subset of the state. This only exists because _pendingState is - * internal. This provides a merging strategy that is not available to deep - * properties which is confusing. TODO: Expose pendingState or don't use it - * during the merge. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} partialState Next partial state to be merged with state. - * @param {?function} callback Called after component is updated. - * @param {?string} Name of the calling function in the public API. - * @internal - */ - enqueueSetState: function enqueueSetState(publicInstance, partialState, callback, callerName) { - warnNoop(publicInstance, 'setState'); - } - }; - var emptyObject = {}; - { - Object.freeze(emptyObject); - } - /** - * Base class helpers for the updating state of a component. - */ - - function Component(props, context, updater) { - this.props = props; - this.context = context; // If a component has string refs, we will assign a different object later. - - this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the - // renderer. - - this.updater = updater || ReactNoopUpdateQueue; - } - - Component.prototype.isReactComponent = {}; - /** - * Sets a subset of the state. Always use this to mutate - * state. You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * There is no guarantee that calls to `setState` will run synchronously, - * as they may eventually be batched together. You can provide an optional - * callback that will be executed when the call to setState is actually - * completed. - * - * When a function is provided to setState, it will be called at some point in - * the future (not synchronously). It will be called with the up to date - * component arguments (state, props, context). These values can be different - * from this.* because your function may be called after receiveProps but before - * shouldComponentUpdate, and this new state, props, and context will not yet be - * assigned to this. - * - * @param {object|function} partialState Next partial state or function to - * produce next partial state to be merged with current state. - * @param {?function} callback Called after state is updated. - * @final - * @protected - */ - - Component.prototype.setState = function (partialState, callback) { - !(_typeof(partialState) === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0; - this.updater.enqueueSetState(this, partialState, callback, 'setState'); - }; - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {?function} callback Called after update is complete. - * @final - * @protected - */ - - - Component.prototype.forceUpdate = function (callback) { - this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); - }; - /** - * Deprecated APIs. These APIs used to exist on classic React classes but since - * we would like to deprecate them, we're not going to move them over to this - * modern base class. Instead, we define a getter that warns if it's accessed. - */ - - - { - var deprecatedAPIs = { - isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] - }; - - var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) { - Object.defineProperty(Component.prototype, methodName, { - get: function get() { - lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); - return undefined; - } - }); - }; - - for (var fnName in deprecatedAPIs) { - if (deprecatedAPIs.hasOwnProperty(fnName)) { - defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - } - } - } - - function ComponentDummy() {} - - ComponentDummy.prototype = Component.prototype; - /** - * Convenience component with default shallow equality check for sCU. - */ - - function PureComponent(props, context, updater) { - this.props = props; - this.context = context; // If a component has string refs, we will assign a different object later. - - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - - var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); - pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. - - _assign(pureComponentPrototype, Component.prototype); - - pureComponentPrototype.isPureReactComponent = true; // an immutable object with a single mutable value - - function createRef() { - var refObject = { - current: null - }; - { - Object.seal(refObject); - } - return refObject; - } - /** - * Keeps track of the current owner. - * - * The current owner is the component who should own any components that are - * currently being constructed. - */ - - - var ReactCurrentOwner = { - /** - * @internal - * @type {ReactComponent} - */ - current: null, - currentDispatcher: null - }; - var BEFORE_SLASH_RE = /^(.*)[\\\/]/; - - var describeComponentFrame = function describeComponentFrame(name, source, ownerName) { - var sourceInfo = ''; - - if (source) { - var path = source.fileName; - var fileName = path.replace(BEFORE_SLASH_RE, ''); - { - // In DEV, include code for a common special case: - // prefer "folder/index.js" instead of just "index.js". - if (/^index\./.test(fileName)) { - var match = path.match(BEFORE_SLASH_RE); - - if (match) { - var pathBeforeSlash = match[1]; - - if (pathBeforeSlash) { - var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); - fileName = folderName + '/' + fileName; - } - } - } - } - sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; - } else if (ownerName) { - sourceInfo = ' (created by ' + ownerName + ')'; - } - - return '\n in ' + (name || 'Unknown') + sourceInfo; - }; - - var Resolved = 1; - - function refineResolvedThenable(thenable) { - return thenable._reactStatus === Resolved ? thenable._reactResult : null; - } - - function getComponentName(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - - { - if (typeof type.tag === 'number') { - warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - - if (typeof type === 'string') { - return type; - } - - switch (type) { - case REACT_ASYNC_MODE_TYPE: - return 'AsyncMode'; - - case REACT_FRAGMENT_TYPE: - return 'Fragment'; - - case REACT_PORTAL_TYPE: - return 'Portal'; - - case REACT_PROFILER_TYPE: - return 'Profiler'; - - case REACT_STRICT_MODE_TYPE: - return 'StrictMode'; - - case REACT_PLACEHOLDER_TYPE: - return 'Placeholder'; - } - - if (_typeof(type) === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - return 'Context.Consumer'; - - case REACT_PROVIDER_TYPE: - return 'Context.Provider'; - - case REACT_FORWARD_REF_TYPE: - var renderFn = type.render; - var functionName = renderFn.displayName || renderFn.name || ''; - return type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef'); - } - - if (typeof type.then === 'function') { - var thenable = type; - var resolvedThenable = refineResolvedThenable(thenable); - - if (resolvedThenable) { - return getComponentName(resolvedThenable); - } - } - } - - return null; - } - - var ReactDebugCurrentFrame = {}; - var currentlyValidatingElement = null; - - function setCurrentlyValidatingElement(element) { - { - currentlyValidatingElement = element; - } - } - - { - // Stack implementation injected by the current renderer. - ReactDebugCurrentFrame.getCurrentStack = null; - - ReactDebugCurrentFrame.getStackAddendum = function () { - var stack = ''; // Add an extra top frame while an element is being validated - - if (currentlyValidatingElement) { - var name = getComponentName(currentlyValidatingElement.type); - var owner = currentlyValidatingElement._owner; - stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type)); - } // Delegate to the injected renderer-specific implementation - - - var impl = ReactDebugCurrentFrame.getCurrentStack; - - if (impl) { - stack += impl() || ''; - } - - return stack; - }; - } - var ReactSharedInternals = { - ReactCurrentOwner: ReactCurrentOwner, - // Used by renderers to avoid bundling object-assign twice in UMD bundles: - assign: _assign - }; - { - _assign(ReactSharedInternals, { - // These should not be included in production. - ReactDebugCurrentFrame: ReactDebugCurrentFrame, - // Shim for React DOM 16.0.0 which still destructured (but not used) this. - // TODO: remove in React 17.0. - ReactComponentTreeHook: {} - }); - } - /** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - - var warning = warningWithoutStack$1; - { - warning = function warning(condition, format) { - if (condition) { - return; - } - - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args - - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } - - warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack])); - }; - } - var warning$1 = warning; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown = void 0; - var specialPropRefWarningShown = void 0; - - function hasValidRef(config) { - { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - return config.ref !== undefined; - } - - function hasValidKey(config) { - { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - return config.key !== undefined; - } - - function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function warnAboutAccessingKey() { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); - } - }; - - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); - } - - function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function warnAboutAccessingRef() { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); - } - }; - - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); - } - /** - * Factory method to create a new React element. This no longer adheres to - * the class pattern, so do not use new to call it. Also, no instanceof check - * will work. Instead test $$typeof field against Symbol.for('react.element') to check - * if something is a React Element. - * - * @param {*} type - * @param {*} key - * @param {string|object} ref - * @param {*} self A *temporary* helper to detect places where `this` is - * different from the `owner` when React.createElement is called, so that we - * can warn. We want to get rid of owner and replace string `ref`s with arrow - * functions, and as long as `this` and owner are the same, there will be no - * change in behavior. - * @param {*} source An annotation object (added by a transpiler or otherwise) - * indicating filename, line number, and/or other information. - * @param {*} owner - * @param {*} props - * @internal - */ - - - var ReactElement = function ReactElement(type, key, ref, self, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, - // Record the component responsible for creating this element. - _owner: owner - }; - { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); // self and source are DEV only properties. - - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. - - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } - return element; - }; - /** - * Create and return a new ReactElement of the given type. - * See https://reactjs.org/docs/react-api.html#createelement - */ - - - function createElement(type, config, children) { - var propName = void 0; // Reserved names are extracted - - var props = {}; - var key = null; - var ref = null; - var self = null; - var source = null; - - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - } - - if (hasValidKey(config)) { - key = '' + config.key; - } - - self = config.__self === undefined ? null : config.__self; - source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object - - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - - - var childrenLength = arguments.length - 2; - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - - { - if (Object.freeze) { - Object.freeze(childArray); - } - } - props.children = childArray; - } // Resolve default props - - - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - - { - if (key || ref) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - } - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); - } - /** - * Return a function that produces ReactElements of a given type. - * See https://reactjs.org/docs/react-api.html#createfactory - */ - - - function cloneAndReplaceKey(oldElement, newKey) { - var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); - return newElement; - } - /** - * Clone and return a new ReactElement using element as the starting point. - * See https://reactjs.org/docs/react-api.html#cloneelement - */ - - - function cloneElement(element, config, children) { - !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0; - var propName = void 0; // Original props are copied - - var props = _assign({}, element.props); // Reserved names are extracted - - - var key = element.key; - var ref = element.ref; // Self is preserved since the owner is preserved. - - var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a - // transpiler, and the original source is probably a better indicator of the - // true owner. - - var source = element._source; // Owner will be preserved, unless ref is overridden - - var owner = element._owner; - - if (config != null) { - if (hasValidRef(config)) { - // Silently steal the ref from the parent. - ref = config.ref; - owner = ReactCurrentOwner.current; - } - - if (hasValidKey(config)) { - key = '' + config.key; - } // Remaining properties override existing props - - - var defaultProps = void 0; - - if (element.type && element.type.defaultProps) { - defaultProps = element.type.defaultProps; - } - - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - if (config[propName] === undefined && defaultProps !== undefined) { - // Resolve default props - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; - } - } - } - } // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - - - var childrenLength = arguments.length - 2; - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - - props.children = childArray; - } - - return ReactElement(element.type, key, ref, self, source, owner, props); - } - /** - * Verifies the object is a ReactElement. - * See https://reactjs.org/docs/react-api.html#isvalidelement - * @param {?object} object - * @return {boolean} True if `object` is a ReactElement. - * @final - */ - - - function isValidElement(object) { - return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } - - var SEPARATOR = '.'; - var SUBSEPARATOR = ':'; - /** - * Escape and wrap key so it is safe to use as a reactid - * - * @param {string} key to be escaped. - * @return {string} the escaped key. - */ - - function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' - }; - var escapedString = ('' + key).replace(escapeRegex, function (match) { - return escaperLookup[match]; - }); - return '$' + escapedString; - } - /** - * TODO: Test that a single child and an array with one item have the same key - * pattern. - */ - - - var didWarnAboutMaps = false; - var userProvidedKeyEscapeRegex = /\/+/g; - - function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); - } - - var POOL_SIZE = 10; - var traverseContextPool = []; - - function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { - if (traverseContextPool.length) { - var traverseContext = traverseContextPool.pop(); - traverseContext.result = mapResult; - traverseContext.keyPrefix = keyPrefix; - traverseContext.func = mapFunction; - traverseContext.context = mapContext; - traverseContext.count = 0; - return traverseContext; - } else { - return { - result: mapResult, - keyPrefix: keyPrefix, - func: mapFunction, - context: mapContext, - count: 0 - }; - } - } - - function releaseTraverseContext(traverseContext) { - traverseContext.result = null; - traverseContext.keyPrefix = null; - traverseContext.func = null; - traverseContext.context = null; - traverseContext.count = 0; - - if (traverseContextPool.length < POOL_SIZE) { - traverseContextPool.push(traverseContext); - } - } - /** - * @param {?*} children Children tree container. - * @param {!string} nameSoFar Name of the key path so far. - * @param {!function} callback Callback to invoke with each child found. - * @param {?*} traverseContext Used to pass information throughout the traversal - * process. - * @return {!number} The number of children in this subtree. - */ - - - function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { - var type = _typeof(children); - - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; - } - - var invokeCallback = false; - - if (children === null) { - invokeCallback = true; - } else { - switch (type) { - case 'string': - case 'number': - invokeCallback = true; - break; - - case 'object': - switch (children.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - invokeCallback = true; - } - - } - } - - if (invokeCallback) { - callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); - return 1; - } - - var child = void 0; - var nextName = void 0; - var subtreeCount = 0; // Count of children found in the current subtree. - - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; - - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getComponentKey(child, i); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else { - var iteratorFn = getIteratorFn(children); - - if (typeof iteratorFn === 'function') { - { - // Warn about using Maps as children - if (iteratorFn === children.entries) { - !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0; - didWarnAboutMaps = true; - } - } - var iterator = iteratorFn.call(children); - var step = void 0; - var ii = 0; - - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getComponentKey(child, ii++); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else if (type === 'object') { - var addendum = ''; - { - addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum(); - } - var childrenString = '' + children; - invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum); - } - } - - return subtreeCount; - } - /** - * Traverses children that are typically specified as `props.children`, but - * might also be specified through attributes: - * - * - `traverseAllChildren(this.props.children, ...)` - * - `traverseAllChildren(this.props.leftPanelChildren, ...)` - * - * The `traverseContext` is an optional argument that is passed through the - * entire traversal. It can be used to store accumulations or anything else that - * the callback might find relevant. - * - * @param {?*} children Children tree object. - * @param {!function} callback To invoke upon traversing each child. - * @param {?*} traverseContext Context for traversal. - * @return {!number} The number of children in this subtree. - */ - - - function traverseAllChildren(children, callback, traverseContext) { - if (children == null) { - return 0; - } - - return traverseAllChildrenImpl(children, '', callback, traverseContext); - } - /** - * Generate a key string that identifies a component within a set. - * - * @param {*} component A component that could contain a manual key. - * @param {number} index Index that is used if a manual key is not provided. - * @return {string} - */ - - - function getComponentKey(component, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (_typeof(component) === 'object' && component !== null && component.key != null) { - // Explicit key - return escape(component.key); - } // Implicit key determined by the index in the set - - - return index.toString(36); - } - - function forEachSingleChild(bookKeeping, child, name) { - var func = bookKeeping.func, - context = bookKeeping.context; - func.call(context, child, bookKeeping.count++); - } - /** - * Iterates through children that are typically specified as `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenforeach - * - * The provided forEachFunc(child, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} forEachFunc - * @param {*} forEachContext Context for forEachContext. - */ - - - function forEachChildren(children, forEachFunc, forEachContext) { - if (children == null) { - return children; - } - - var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); - traverseAllChildren(children, forEachSingleChild, traverseContext); - releaseTraverseContext(traverseContext); - } - - function mapSingleChildIntoContext(bookKeeping, child, childKey) { - var result = bookKeeping.result, - keyPrefix = bookKeeping.keyPrefix, - func = bookKeeping.func, - context = bookKeeping.context; - var mappedChild = func.call(context, child, bookKeeping.count++); - - if (Array.isArray(mappedChild)) { - mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { - return c; - }); - } else if (mappedChild != null) { - if (isValidElement(mappedChild)) { - mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); - } - - result.push(mappedChild); - } - } - - function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { - var escapedPrefix = ''; - - if (prefix != null) { - escapedPrefix = escapeUserProvidedKey(prefix) + '/'; - } - - var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); - traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); - releaseTraverseContext(traverseContext); - } - /** - * Maps children that are typically specified as `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenmap - * - * The provided mapFunction(child, key, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} func The map function. - * @param {*} context Context for mapFunction. - * @return {object} Object containing the ordered map of results. - */ - - - function mapChildren(children, func, context) { - if (children == null) { - return children; - } - - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, func, context); - return result; - } - /** - * Count the number of children that are typically specified as - * `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrencount - * - * @param {?*} children Children tree container. - * @return {number} The number of children. - */ - - - function countChildren(children) { - return traverseAllChildren(children, function () { - return null; - }, null); - } - /** - * Flatten a children object (typically specified as `props.children`) and - * return an array with appropriately re-keyed children. - * - * See https://reactjs.org/docs/react-api.html#reactchildrentoarray - */ - - - function toArray(children) { - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, function (child) { - return child; - }); - return result; - } - /** - * Returns the first child in a collection of children and verifies that there - * is only one child in the collection. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenonly - * - * The current implementation of this function assumes that a single child gets - * passed without a wrapper, but the purpose of this helper function is to - * abstract away the particular structure of children. - * - * @param {?object} children Child collection structure. - * @return {ReactElement} The first and only `ReactElement` contained in the - * structure. - */ - - - function onlyChild(children) { - !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0; - return children; - } - - function readContext(context, observedBits) { - var dispatcher = ReactCurrentOwner.currentDispatcher; - !(dispatcher !== null) ? invariant(false, 'Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.') : void 0; - return dispatcher.readContext(context, observedBits); - } - - function createContext(defaultValue, calculateChangedBits) { - if (calculateChangedBits === undefined) { - calculateChangedBits = null; - } else { - { - !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0; - } - } - - var context = { - $$typeof: REACT_CONTEXT_TYPE, - _calculateChangedBits: calculateChangedBits, - // As a workaround to support multiple concurrent renderers, we categorize - // some renderers as primary and others as secondary. We only expect - // there to be two concurrent renderers at most: React Native (primary) and - // Fabric (secondary); React DOM (primary) and React ART (secondary). - // Secondary renderers store their context values on separate fields. - _currentValue: defaultValue, - _currentValue2: defaultValue, - // These are circular - Provider: null, - Consumer: null, - unstable_read: null - }; - context.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: context - }; - context.Consumer = context; - context.unstable_read = readContext.bind(null, context); - { - context._currentRenderer = null; - context._currentRenderer2 = null; - } - return context; - } - - function lazy(ctor) { - var thenable = null; - return { - then: function then(resolve, reject) { - if (thenable === null) { - // Lazily create thenable by wrapping in an extra thenable. - thenable = ctor(); - ctor = null; - } - - return thenable.then(resolve, reject); - }, - // React uses these fields to store the result. - _reactStatus: -1, - _reactResult: null - }; - } - - function forwardRef(render) { - { - if (typeof render !== 'function') { - warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : _typeof(render)); - } else { - !( // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object - render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0; - } - - if (render != null) { - !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0; - } - } - return { - $$typeof: REACT_FORWARD_REF_TYPE, - render: render - }; - } - - function isValidElementType(type) { - return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_PLACEHOLDER_TYPE || _typeof(type) === 'object' && type !== null && (typeof type.then === 'function' || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); - } - /** - * ReactElementValidator provides a wrapper around a element factory - * which validates the props passed to the element. This is intended to be - * used only in DEV and could be replaced by a static type checker for languages - * that support it. - */ - - - var propTypesMisspellWarningShown = void 0; - { - propTypesMisspellWarningShown = false; - } - - function getDeclarationErrorAddendum() { - if (ReactCurrentOwner.current) { - var name = getComponentName(ReactCurrentOwner.current.type); - - if (name) { - return '\n\nCheck the render method of `' + name + '`.'; - } - } - - return ''; - } - - function getSourceInfoErrorAddendum(elementProps) { - if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) { - var source = elementProps.__source; - var fileName = source.fileName.replace(/^.*[\\\/]/, ''); - var lineNumber = source.lineNumber; - return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; - } - - return ''; - } - /** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ - - - var ownerHasKeyUseWarning = {}; - - function getCurrentComponentErrorInfo(parentType) { - var info = getDeclarationErrorAddendum(); - - if (!info) { - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; - - if (parentName) { - info = '\n\nCheck the top-level render call using <' + parentName + '>.'; - } - } - - return info; - } - /** - * Warn if the element doesn't have an explicit key assigned to it. - * This element is in an array. The array could grow and shrink or be - * reordered. All children that haven't already been validated are required to - * have a "key" property assigned to it. Error statuses are cached so a warning - * will only be shown once. - * - * @internal - * @param {ReactElement} element Element that requires a key. - * @param {*} parentType element's parent's type. - */ - - - function validateExplicitKey(element, parentType) { - if (!element._store || element._store.validated || element.key != null) { - return; - } - - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a - // property, it may be the creator of the child that's responsible for - // assigning it a key. - - var childOwner = ''; - - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { - // Give the component that originally created this child. - childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.'; - } - - setCurrentlyValidatingElement(element); - { - warning$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner); - } - setCurrentlyValidatingElement(null); - } - /** - * Ensure that every element either is passed in a static location, in an - * array with an explicit keys property defined, or in an object literal - * with valid key property. - * - * @internal - * @param {ReactNode} node Statically passed child of any type. - * @param {*} parentType node's parent's type. - */ - - - function validateChildKeys(node, parentType) { - if (_typeof(node) !== 'object') { - return; - } - - if (Array.isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement(node)) { - // This element was passed in a valid location. - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - - if (typeof iteratorFn === 'function') { - // Entry iterators used to provide implicit keys, - // but now we print a separate warning for them later. - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step = void 0; - - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } - } - } - } - } - } - /** - * Given an element, validate that its props follow the propTypes definition, - * provided by the type. - * - * @param {ReactElement} element - */ - - - function validatePropTypes(element) { - var type = element.type; - var name = void 0, - propTypes = void 0; - - if (typeof type === 'function') { - // Class or functional component - name = type.displayName || type.name; - propTypes = type.propTypes; - } else if (_typeof(type) === 'object' && type !== null && type.$$typeof === REACT_FORWARD_REF_TYPE) { - // ForwardRef - var functionName = type.render.displayName || type.render.name || ''; - name = type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef'); - propTypes = type.propTypes; - } else { - return; - } - - if (propTypes) { - setCurrentlyValidatingElement(element); - checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); - setCurrentlyValidatingElement(null); - } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; - warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown'); - } - - if (typeof type.getDefaultProps === 'function') { - !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; - } - } - /** - * Given a fragment, validate that it can only be provided with fragment props - * @param {ReactElement} fragment - */ - - - function validateFragmentProps(fragment) { - setCurrentlyValidatingElement(fragment); - var keys = Object.keys(fragment.props); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - - if (key !== 'children' && key !== 'key') { - warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); - break; - } - } - - if (fragment.ref !== null) { - warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.'); - } - - setCurrentlyValidatingElement(null); - } - - function createElementWithValidation(type, props, children) { - var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. - - if (!validType) { - var info = ''; - - if (type === undefined || _typeof(type) === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; - } - - var sourceInfo = getSourceInfoErrorAddendum(props); - - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - - var typeString = void 0; - - if (type === null) { - typeString = 'null'; - } else if (Array.isArray(type)) { - typeString = 'array'; - } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; - info = ' Did you accidentally export a JSX literal instead of a component?'; - } else { - typeString = _typeof(type); - } - - warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); - } - - var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. - - if (element == null) { - return element; - } // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) - - - if (validType) { - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); - } - } - - if (type === REACT_FRAGMENT_TYPE) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - - return element; - } - - function createFactoryWithValidation(type) { - var validatedFactory = createElementWithValidation.bind(null, type); - validatedFactory.type = type; // Legacy hook: remove it - - { - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function get() { - lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); - Object.defineProperty(this, 'type', { - value: type - }); - return type; - } - }); - } - return validatedFactory; - } - - function cloneElementWithValidation(element, props, children) { - var newElement = cloneElement.apply(this, arguments); - - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], newElement.type); - } - - validatePropTypes(newElement); - return newElement; - } - - var React = { - Children: { - map: mapChildren, - forEach: forEachChildren, - count: countChildren, - toArray: toArray, - only: onlyChild - }, - createRef: createRef, - Component: Component, - PureComponent: PureComponent, - createContext: createContext, - forwardRef: forwardRef, - Fragment: REACT_FRAGMENT_TYPE, - StrictMode: REACT_STRICT_MODE_TYPE, - unstable_AsyncMode: REACT_ASYNC_MODE_TYPE, - unstable_Profiler: REACT_PROFILER_TYPE, - createElement: createElementWithValidation, - cloneElement: cloneElementWithValidation, - createFactory: createFactoryWithValidation, - isValidElement: isValidElement, - version: ReactVersion, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals - }; - - if (enableSuspense) { - React.Placeholder = REACT_PLACEHOLDER_TYPE; - React.lazy = lazy; - } - - var React$2 = Object.freeze({ - default: React - }); - var React$3 = React$2 && React || React$2; // TODO: decide on the top-level export form. - // This is hacky but makes it work with both Rollup and Jest. - - var react = React$3.default || React$3; - module.exports = react; - })(); -} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -if (process.env.NODE_ENV !== 'production') { - var ReactIs = __webpack_require__(4); // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - - - var throwOnDirectAccess = true; - module.exports = __webpack_require__(14)(ReactIs.isElement, throwOnDirectAccess); -} else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(15)(); -} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** @license React v16.8.6 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -Object.defineProperty(exports, "__esModule", { - value: !0 -}); -var b = "function" === typeof Symbol && Symbol.for, - c = b ? Symbol.for("react.element") : 60103, - d = b ? Symbol.for("react.portal") : 60106, - e = b ? Symbol.for("react.fragment") : 60107, - f = b ? Symbol.for("react.strict_mode") : 60108, - g = b ? Symbol.for("react.profiler") : 60114, - h = b ? Symbol.for("react.provider") : 60109, - k = b ? Symbol.for("react.context") : 60110, - l = b ? Symbol.for("react.async_mode") : 60111, - m = b ? Symbol.for("react.concurrent_mode") : 60111, - n = b ? Symbol.for("react.forward_ref") : 60112, - p = b ? Symbol.for("react.suspense") : 60113, - q = b ? Symbol.for("react.memo") : 60115, - r = b ? Symbol.for("react.lazy") : 60116; - -function t(a) { - if ("object" === _typeof(a) && null !== a) { - var u = a.$$typeof; - - switch (u) { - case c: - switch (a = a.type, a) { - case l: - case m: - case e: - case g: - case f: - case p: - return a; - - default: - switch (a = a && a.$$typeof, a) { - case k: - case n: - case h: - return a; - - default: - return u; - } - - } - - case r: - case q: - case d: - return u; - } - } -} - -function v(a) { - return t(a) === m; -} - -exports.typeOf = t; -exports.AsyncMode = l; -exports.ConcurrentMode = m; -exports.ContextConsumer = k; -exports.ContextProvider = h; -exports.Element = c; -exports.ForwardRef = n; -exports.Fragment = e; -exports.Lazy = r; -exports.Memo = q; -exports.Portal = d; -exports.Profiler = g; -exports.StrictMode = f; -exports.Suspense = p; - -exports.isValidElementType = function (a) { - return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || "object" === _typeof(a) && null !== a && (a.$$typeof === r || a.$$typeof === q || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n); -}; - -exports.isAsyncMode = function (a) { - return v(a) || t(a) === l; -}; - -exports.isConcurrentMode = v; - -exports.isContextConsumer = function (a) { - return t(a) === k; -}; - -exports.isContextProvider = function (a) { - return t(a) === h; -}; - -exports.isElement = function (a) { - return "object" === _typeof(a) && null !== a && a.$$typeof === c; -}; - -exports.isForwardRef = function (a) { - return t(a) === n; -}; - -exports.isFragment = function (a) { - return t(a) === e; -}; - -exports.isLazy = function (a) { - return t(a) === r; -}; - -exports.isMemo = function (a) { - return t(a) === q; -}; - -exports.isPortal = function (a) { - return t(a) === d; -}; - -exports.isProfiler = function (a) { - return t(a) === g; -}; - -exports.isStrictMode = function (a) { - return t(a) === f; -}; - -exports.isSuspense = function (a) { - return t(a) === p; -}; - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.8.6 - * react-is.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -if (process.env.NODE_ENV !== "production") { - (function () { - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); // The Symbol used to tag the ReactElement-like types. If there is no native Symbol - // nor polyfill, then a plain number is used for performance. - - var hasSymbol = typeof Symbol === 'function' && Symbol.for; - var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; - var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; - var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; - var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; - var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; - var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; - var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; - var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; - var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; - var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; - var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; - var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; - var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; - - function isValidElementType(type) { - return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || _typeof(type) === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); - } - /** - * Forked from fbjs/warning: - * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js - * - * Only change is we use console.warn instead of console.error, - * and do nothing when 'console' is not supported. - * This really simplifies the code. - * --- - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - - - var lowPriorityWarning = function lowPriorityWarning() {}; - - { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - - if (typeof console !== 'undefined') { - console.warn(message); - } - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; - - lowPriorityWarning = function lowPriorityWarning(condition, format) { - if (format === undefined) { - throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; - } - var lowPriorityWarning$1 = lowPriorityWarning; - - function typeOf(object) { - if (_typeof(object) === 'object' && object !== null) { - var $$typeof = object.$$typeof; - - switch ($$typeof) { - case REACT_ELEMENT_TYPE: - var type = object.type; - - switch (type) { - case REACT_ASYNC_MODE_TYPE: - case REACT_CONCURRENT_MODE_TYPE: - case REACT_FRAGMENT_TYPE: - case REACT_PROFILER_TYPE: - case REACT_STRICT_MODE_TYPE: - case REACT_SUSPENSE_TYPE: - return type; - - default: - var $$typeofType = type && type.$$typeof; - - switch ($$typeofType) { - case REACT_CONTEXT_TYPE: - case REACT_FORWARD_REF_TYPE: - case REACT_PROVIDER_TYPE: - return $$typeofType; - - default: - return $$typeof; - } - - } - - case REACT_LAZY_TYPE: - case REACT_MEMO_TYPE: - case REACT_PORTAL_TYPE: - return $$typeof; - } - } - - return undefined; - } // AsyncMode is deprecated along with isAsyncMode - - - var AsyncMode = REACT_ASYNC_MODE_TYPE; - var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; - var ContextConsumer = REACT_CONTEXT_TYPE; - var ContextProvider = REACT_PROVIDER_TYPE; - var Element = REACT_ELEMENT_TYPE; - var ForwardRef = REACT_FORWARD_REF_TYPE; - var Fragment = REACT_FRAGMENT_TYPE; - var Lazy = REACT_LAZY_TYPE; - var Memo = REACT_MEMO_TYPE; - var Portal = REACT_PORTAL_TYPE; - var Profiler = REACT_PROFILER_TYPE; - var StrictMode = REACT_STRICT_MODE_TYPE; - var Suspense = REACT_SUSPENSE_TYPE; - var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated - - function isAsyncMode(object) { - { - if (!hasWarnedAboutDeprecatedIsAsyncMode) { - hasWarnedAboutDeprecatedIsAsyncMode = true; - lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); - } - } - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; - } - - function isConcurrentMode(object) { - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; - } - - function isContextConsumer(object) { - return typeOf(object) === REACT_CONTEXT_TYPE; - } - - function isContextProvider(object) { - return typeOf(object) === REACT_PROVIDER_TYPE; - } - - function isElement(object) { - return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } - - function isForwardRef(object) { - return typeOf(object) === REACT_FORWARD_REF_TYPE; - } - - function isFragment(object) { - return typeOf(object) === REACT_FRAGMENT_TYPE; - } - - function isLazy(object) { - return typeOf(object) === REACT_LAZY_TYPE; - } - - function isMemo(object) { - return typeOf(object) === REACT_MEMO_TYPE; - } - - function isPortal(object) { - return typeOf(object) === REACT_PORTAL_TYPE; - } - - function isProfiler(object) { - return typeOf(object) === REACT_PROFILER_TYPE; - } - - function isStrictMode(object) { - return typeOf(object) === REACT_STRICT_MODE_TYPE; - } - - function isSuspense(object) { - return typeOf(object) === REACT_SUSPENSE_TYPE; - } - - exports.typeOf = typeOf; - exports.AsyncMode = AsyncMode; - exports.ConcurrentMode = ConcurrentMode; - exports.ContextConsumer = ContextConsumer; - exports.ContextProvider = ContextProvider; - exports.Element = Element; - exports.ForwardRef = ForwardRef; - exports.Fragment = Fragment; - exports.Lazy = Lazy; - exports.Memo = Memo; - exports.Portal = Portal; - exports.Profiler = Profiler; - exports.StrictMode = StrictMode; - exports.Suspense = Suspense; - exports.isValidElementType = isValidElementType; - exports.isAsyncMode = isAsyncMode; - exports.isConcurrentMode = isConcurrentMode; - exports.isContextConsumer = isContextConsumer; - exports.isContextProvider = isContextProvider; - exports.isElement = isElement; - exports.isForwardRef = isForwardRef; - exports.isFragment = isFragment; - exports.isLazy = isLazy; - exports.isMemo = isMemo; - exports.isPortal = isPortal; - exports.isProfiler = isProfiler; - exports.isStrictMode = isStrictMode; - exports.isSuspense = isSuspense; - })(); -} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var ReactIs = __webpack_require__(4); - -var assign = __webpack_require__(1); - -var ReactPropTypesSecret = __webpack_require__(2); - -var checkPropTypes = __webpack_require__(3); - -var has = Function.call.bind(Object.prototype.hasOwnProperty); - -var printWarning = function printWarning() {}; - -if (process.env.NODE_ENV !== 'production') { - printWarning = function printWarning(text) { - var message = 'Warning: ' + text; - - if (typeof console !== 'undefined') { - console.error(message); - } - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; -} - -function emptyFunctionThatReturnsNull() { - return null; -} - -module.exports = function (isValidElement, throwOnDirectAccess) { - /* global Symbol */ - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. - - /** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} - */ - - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - - if (typeof iteratorFn === 'function') { - return iteratorFn; - } - } - /** - * Collection of methods that allow declaration and validation of props that are - * supplied to React components. Example usage: - * - * var Props = require('ReactPropTypes'); - * var MyArticle = React.createClass({ - * propTypes: { - * // An optional string prop named "description". - * description: Props.string, - * - * // A required enum prop named "category". - * category: Props.oneOf(['News','Photos']).isRequired, - * - * // A prop named "dialog" that requires an instance of Dialog. - * dialog: Props.instanceOf(Dialog).isRequired - * }, - * render: function() { ... } - * }); - * - * A more formal specification of how these methods are used: - * - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) - * decl := ReactPropTypes.{type}(.isRequired)? - * - * Each and every declaration produces a function with the same signature. This - * allows the creation of custom validation functions. For example: - * - * var MyLink = React.createClass({ - * propTypes: { - * // An optional string or URI prop named "href". - * href: function(props, propName, componentName) { - * var propValue = props[propName]; - * if (propValue != null && typeof propValue !== 'string' && - * !(propValue instanceof URI)) { - * return new Error( - * 'Expected a string or an URI for ' + propName + ' in ' + - * componentName - * ); - * } - * } - * }, - * render: function() {...} - * }); - * - * @internal - */ - - - var ANONYMOUS = '<>'; // Important! - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. - - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - elementType: createElementTypeTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker, - exact: createStrictShapeTypeChecker - }; - /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ - - /*eslint-disable no-self-compare*/ - - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - } - /*eslint-enable no-self-compare*/ - - /** - * We use an Error-like object for backward compatibility as people may call - * PropTypes directly and inspect their output. However, we don't use real - * Errors anymore. We don't inspect their stack anyway, and creating them - * is prohibitively expensive if they are created too often, such as what - * happens in oneOfType() for any type before the one that matched. - */ - - - function PropTypeError(message) { - this.message = message; - this.stack = ''; - } // Make `instanceof Error` still work for returned errors. - - - PropTypeError.prototype = Error.prototype; - - function createChainableTypeChecker(validate) { - if (process.env.NODE_ENV !== 'production') { - var manualPropTypeCallCache = {}; - var manualPropTypeWarningCount = 0; - } - - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; - - if (secret !== ReactPropTypesSecret) { - if (throwOnDirectAccess) { - // New behavior only for users of `prop-types` package - var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); - err.name = 'Invariant Violation'; - throw err; - } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { - // Old behavior for people using React.PropTypes - var cacheKey = componentName + ':' + propName; - - if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3) { - printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'); - manualPropTypeCallCache[cacheKey] = true; - manualPropTypeWarningCount++; - } - } - } - - if (props[propName] == null) { - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - - return null; - } else { - return validate(props, propName, componentName, location, propFullName); - } - } - - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); - return chainedCheckType; - } - - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - - if (propType !== expectedType) { - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunctionThatReturnsNull); - } - - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); - } - - var propValue = props[propName]; - - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); - } - - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); - - if (error instanceof Error) { - return error; - } - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createElementTypeTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - - if (!ReactIs.isValidElementType(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - if (process.env.NODE_ENV !== 'production') { - if (arguments.length > 1) { - printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'); - } else { - printWarning('Invalid argument supplied to oneOf, expected an array.'); - } - } - - return emptyFunctionThatReturnsNull; - } - - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; - } - } - - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { - var type = getPreciseType(value); - - if (type === 'symbol') { - return String(value); - } - - return value; - }); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); - } - - return createChainableTypeChecker(validate); - } - - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); - } - - var propValue = props[propName]; - var propType = getPropType(propValue); - - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); - } - - for (var key in propValue) { - if (has(propValue, key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - - if (error instanceof Error) { - return error; - } - } - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; - return emptyFunctionThatReturnsNull; - } - - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - - if (typeof checker !== 'function') { - printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'); - return emptyFunctionThatReturnsNull; - } - } - - function validate(props, propName, componentName, location, propFullName) { - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - - if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { - return null; - } - } - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); - } - - return createChainableTypeChecker(validate); - } - - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - - if (!checker) { - continue; - } - - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - - if (error) { - return error; - } - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createStrictShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } // We need to check all keys in case some are required but missing from - // props. - - - var allKeys = assign({}, props[propName], shapeTypes); - - for (var key in allKeys) { - var checker = shapeTypes[key]; - - if (!checker) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')); - } - - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - - if (error) { - return error; - } - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function isNode(propValue) { - switch (_typeof(propValue)) { - case 'number': - case 'string': - case 'undefined': - return true; - - case 'boolean': - return !propValue; - - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - - if (propValue === null || isValidElement(propValue)) { - return true; - } - - var iteratorFn = getIteratorFn(propValue); - - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - - if (entry) { - if (!isNode(entry[1])) { - return false; - } - } - } - } - } else { - return false; - } - - return true; - - default: - return false; - } - } - - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; - } // falsy value can't be a Symbol - - - if (!propValue) { - return false; - } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - - - if (propValue['@@toStringTag'] === 'Symbol') { - return true; - } // Fallback for non-spec compliant Symbols which are polyfilled. - - - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; - } - - return false; - } // Equivalent of `typeof` but with special handling for array and regexp. - - - function getPropType(propValue) { - var propType = _typeof(propValue); - - if (Array.isArray(propValue)) { - return 'array'; - } - - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - - if (isSymbol(propType, propValue)) { - return 'symbol'; - } - - return propType; - } // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - - - function getPreciseType(propValue) { - if (typeof propValue === 'undefined' || propValue === null) { - return '' + propValue; - } - - var propType = getPropType(propValue); - - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } - } - - return propType; - } // Returns a string that is postfixed to a warning about an invalid type. - // For example, "undefined" or "of type array" - - - function getPostfixForTypeWarning(value) { - var type = getPreciseType(value); - - switch (type) { - case 'array': - case 'object': - return 'an ' + type; - - case 'boolean': - case 'date': - case 'regexp': - return 'a ' + type; - - default: - return type; - } - } // Returns class name of the object, if any. - - - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; - } - - return propValue.constructor.name; - } - - ReactPropTypes.checkPropTypes = checkPropTypes; - ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; - ReactPropTypes.PropTypes = ReactPropTypes; - return ReactPropTypes; -}; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -var ReactPropTypesSecret = __webpack_require__(2); - -function emptyFunction() {} - -function emptyFunctionWithReset() {} - -emptyFunctionWithReset.resetWarningCache = emptyFunction; - -module.exports = function () { - function shim(props, propName, componentName, location, propFullName, secret) { - if (secret === ReactPropTypesSecret) { - // It is still safe when called from React. - return; - } - - var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); - err.name = 'Invariant Violation'; - throw err; - } - - ; - shim.isRequired = shim; - - function getShim() { - return shim; - } - - ; // Important! - // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. - - var ReactPropTypes = { - array: shim, - bool: shim, - func: shim, - number: shim, - object: shim, - string: shim, - symbol: shim, - any: shim, - arrayOf: getShim, - element: shim, - elementType: shim, - instanceOf: getShim, - node: shim, - objectOf: getShim, - oneOf: getShim, - oneOfType: getShim, - shape: getShim, - exact: getShim, - checkPropTypes: emptyFunctionWithReset, - resetWarningCache: emptyFunction - }; - ReactPropTypes.PropTypes = ReactPropTypes; - return ReactPropTypes; -}; - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.decode = exports.parse = __webpack_require__(17); -exports.encode = exports.stringify = __webpack_require__(18); - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - // If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = function (qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - var maxKeys = 1000; - - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; // maxKeys <= 0 means that we should not limit keys count - - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, - vstr, - k, - v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var stringifyPrimitive = function stringifyPrimitive(v) { - switch (_typeof(v)) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -}; - -module.exports = function (obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - - if (obj === null) { - obj = undefined; - } - - if (_typeof(obj) === 'object') { - return map(objectKeys(obj), function (k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - - if (isArray(obj[k])) { - return map(obj[k], function (v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -function map(xs, f) { - if (xs.map) return xs.map(f); - var res = []; - - for (var i = 0; i < xs.length; i++) { - res.push(f(xs[i], i)); - } - - return res; -} - -var objectKeys = Object.keys || function (obj) { - var res = []; - - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); - } - - return res; -}; - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -// Packages -var retrier = __webpack_require__(20); - -function retry(fn, opts) { - function run(resolve, reject) { - var options = opts || {}; - var op = retrier.operation(options); // We allow the user to abort retrying - // this makes sense in the cases where - // knowledge is obtained that retrying - // would be futile (e.g.: auth errors) - - function bail(err) { - reject(err || new Error('Aborted')); - } - - function onError(err, num) { - if (err.bail) { - bail(err); - return; - } - - if (!op.retry(err)) { - reject(op.mainError()); - } else if (options.onRetry) { - options.onRetry(err, num); - } - } - - function runAttempt(num) { - var val; - - try { - val = fn(bail, num); - } catch (err) { - onError(err, num); - return; - } - - Promise.resolve(val).then(resolve).catch(function catchIt(err) { - onError(err, num); - }); - } - - op.attempt(runAttempt); - } - - return new Promise(run); -} - -module.exports = retry; - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(21); - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -var RetryOperation = __webpack_require__(22); - -exports.operation = function (options) { - var timeouts = exports.timeouts(options); - return new RetryOperation(timeouts, { - forever: options && options.forever, - unref: options && options.unref, - maxRetryTime: options && options.maxRetryTime - }); -}; - -exports.timeouts = function (options) { - if (options instanceof Array) { - return [].concat(options); - } - - var opts = { - retries: 10, - factor: 2, - minTimeout: 1 * 1000, - maxTimeout: Infinity, - randomize: false - }; - - for (var key in options) { - opts[key] = options[key]; - } - - if (opts.minTimeout > opts.maxTimeout) { - throw new Error('minTimeout is greater than maxTimeout'); - } - - var timeouts = []; - - for (var i = 0; i < opts.retries; i++) { - timeouts.push(this.createTimeout(i, opts)); - } - - if (options && options.forever && !timeouts.length) { - timeouts.push(this.createTimeout(i, opts)); - } // sort the array numerically ascending - - - timeouts.sort(function (a, b) { - return a - b; - }); - return timeouts; -}; - -exports.createTimeout = function (attempt, opts) { - var random = opts.randomize ? Math.random() + 1 : 1; - var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); - timeout = Math.min(timeout, opts.maxTimeout); - return timeout; -}; - -exports.wrap = function (obj, options, methods) { - if (options instanceof Array) { - methods = options; - options = null; - } - - if (!methods) { - methods = []; - - for (var key in obj) { - if (typeof obj[key] === 'function') { - methods.push(key); - } - } - } - - for (var i = 0; i < methods.length; i++) { - var method = methods[i]; - var original = obj[method]; - - obj[method] = function retryWrapper(original) { - var op = exports.operation(options); - var args = Array.prototype.slice.call(arguments, 1); - var callback = args.pop(); - args.push(function (err) { - if (op.retry(err)) { - return; - } - - if (err) { - arguments[0] = op.mainError(); - } - - callback.apply(this, arguments); - }); - op.attempt(function () { - original.apply(obj, args); - }); - }.bind(obj, original); - - obj[method].options = options; - } -}; - -/***/ }), -/* 22 */ -/***/ (function(module, exports) { - -function RetryOperation(timeouts, options) { - // Compatibility for the old (timeouts, retryForever) signature - if (typeof options === 'boolean') { - options = { - forever: options - }; - } - - this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); - this._timeouts = timeouts; - this._options = options || {}; - this._maxRetryTime = options && options.maxRetryTime || Infinity; - this._fn = null; - this._errors = []; - this._attempts = 1; - this._operationTimeout = null; - this._operationTimeoutCb = null; - this._timeout = null; - this._operationStart = null; - - if (this._options.forever) { - this._cachedTimeouts = this._timeouts.slice(0); - } -} - -module.exports = RetryOperation; - -RetryOperation.prototype.reset = function () { - this._attempts = 1; - this._timeouts = this._originalTimeouts; -}; - -RetryOperation.prototype.stop = function () { - if (this._timeout) { - clearTimeout(this._timeout); - } - - this._timeouts = []; - this._cachedTimeouts = null; -}; - -RetryOperation.prototype.retry = function (err) { - if (this._timeout) { - clearTimeout(this._timeout); - } - - if (!err) { - return false; - } - - var currentTime = new Date().getTime(); - - if (err && currentTime - this._operationStart >= this._maxRetryTime) { - this._errors.unshift(new Error('RetryOperation timeout occurred')); - - return false; - } - - this._errors.push(err); - - var timeout = this._timeouts.shift(); - - if (timeout === undefined) { - if (this._cachedTimeouts) { - // retry forever, only keep last error - this._errors.splice(this._errors.length - 1, this._errors.length); - - this._timeouts = this._cachedTimeouts.slice(0); - timeout = this._timeouts.shift(); - } else { - return false; - } - } - - var self = this; - var timer = setTimeout(function () { - self._attempts++; - - if (self._operationTimeoutCb) { - self._timeout = setTimeout(function () { - self._operationTimeoutCb(self._attempts); - }, self._operationTimeout); - - if (self._options.unref) { - self._timeout.unref(); - } - } - - self._fn(self._attempts); - }, timeout); - - if (this._options.unref) { - timer.unref(); - } - - return true; -}; - -RetryOperation.prototype.attempt = function (fn, timeoutOps) { - this._fn = fn; - - if (timeoutOps) { - if (timeoutOps.timeout) { - this._operationTimeout = timeoutOps.timeout; - } - - if (timeoutOps.cb) { - this._operationTimeoutCb = timeoutOps.cb; - } - } - - var self = this; - - if (this._operationTimeoutCb) { - this._timeout = setTimeout(function () { - self._operationTimeoutCb(); - }, self._operationTimeout); - } - - this._operationStart = new Date().getTime(); - - this._fn(this._attempts); -}; - -RetryOperation.prototype.try = function (fn) { - console.log('Using RetryOperation.try() is deprecated'); - this.attempt(fn); -}; - -RetryOperation.prototype.start = function (fn) { - console.log('Using RetryOperation.start() is deprecated'); - this.attempt(fn); -}; - -RetryOperation.prototype.start = RetryOperation.prototype.try; - -RetryOperation.prototype.errors = function () { - return this._errors; -}; - -RetryOperation.prototype.attempts = function () { - return this._attempts; -}; - -RetryOperation.prototype.mainError = function () { - if (this._errors.length === 0) { - return null; - } - - var counts = {}; - var mainError = null; - var mainErrorCount = 0; - - for (var i = 0; i < this._errors.length; i++) { - var error = this._errors[i]; - var message = error.message; - var count = (counts[message] || 0) + 1; - counts[message] = count; - - if (count >= mainErrorCount) { - mainError = error; - mainErrorCount = count; - } - } - - return mainError; -}; - -/***/ }) -/******/ ]); \ No newline at end of file From 2bd1c27e736822729a5f35ad1f302364d20479cf Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Mon, 30 Sep 2019 11:07:08 -0700 Subject: [PATCH 09/14] Added retry logic and test coverage --- packages/api-logs/__tests__/index.test.jsx | 38 +++++++++++++++++++++- packages/api-logs/index.jsx | 2 +- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/api-logs/__tests__/index.test.jsx b/packages/api-logs/__tests__/index.test.jsx index a25a1ea20..506643916 100644 --- a/packages/api-logs/__tests__/index.test.jsx +++ b/packages/api-logs/__tests__/index.test.jsx @@ -43,7 +43,7 @@ describe('Logs', () => { }; test('should not render if groups are not populated', () => { - const noUser = { baseUrl, query: {} }; + const noUser = { baseUrl, query: {}, changeGroup: () => {} }; const comp = shallow(); expect(comp.html()).toBe(null); @@ -79,6 +79,42 @@ describe('Logs', () => { done(); }); + test('should make multiple requests for logs if conditional check fails', async () => { + const comp = shallow(); + comp.setState({ + logs: [requestmodel], + }); + + const mock = nock('https://docs.readme.com:443', { encodedQueryParams: true }) + .get('/api/logs') + .query({ + url: 'https%3A%2F%2Fdash.readme.io%2Fapi%2Fv1%2Fdocs%2F%7Bslug%7D', + id: 'someid', + method: 'delete', + limit: 5, + page: 0, + }) + .reply(200, [requestmodel]) + .get('/api/logs') + .query({ + url: 'https%3A%2F%2Fdash.readme.io%2Fapi%2Fv1%2Fdocs%2F%7Bslug%7D', + id: 'someid', + method: 'delete', + limit: 5, + page: 0, + }) + .reply(200, [ + { + ...requestmodel, + _id: '2', + }, + ]); + + const res = await comp.instance().getData(); + expect(res[0]._id).toBe('2'); + mock.done(); + }); + test('should call refresh when result props are updated via parent', () => { const comp = shallow(); comp.instance().refresh = jest.fn(); diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index 8c019a285..5059e1bf8 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -102,7 +102,7 @@ class Logs extends React.Component { ); } - async handleData(res) { + handleData(res) { this.setState({ loading: false }); if (res.status === 200) { return res.json(); From 3751e6981b9764c9a87d29e8282f5681ad3f7359 Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Mon, 30 Sep 2019 11:32:52 -0700 Subject: [PATCH 10/14] adding dist back in --- packages/api-logs/dist/index.js | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 packages/api-logs/dist/index.js diff --git a/packages/api-logs/dist/index.js b/packages/api-logs/dist/index.js new file mode 100644 index 000000000..6291fb357 --- /dev/null +++ b/packages/api-logs/dist/index.js @@ -0,0 +1,44 @@ +module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";e.exports=n(7)},function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=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,l,a=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-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function s(e){this.map={},e instanceof s?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function d(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&function(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||i(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function b(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new s(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},h.call(y.prototype),h.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var g=[301,302,303,307,308];b.redirect=function(e,t){if(-1===g.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})};var w=self.DOMException;try{new w}catch(e){(w=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),w.prototype.constructor=w}function k(e,t){return new Promise(function(n,o){var i=new y(e,t);if(i.signal&&i.signal.aborted)return o(new w("Aborted","AbortError"));var l=new XMLHttpRequest;function a(){l.abort()}l.onload=function(){var e={status:l.status,statusText:l.statusText,headers:function(e){var t=new s;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}(l.getAllResponseHeaders()||"")};e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var t="response"in l?l.response:l.responseText;n(new b(t,e))},l.onerror=function(){o(new TypeError("Network request failed"))},l.ontimeout=function(){o(new TypeError("Network request failed"))},l.onabort=function(){o(new w("Aborted","AbortError"))},l.open(i.method,i.url,!0),"include"===i.credentials?l.withCredentials=!0:"omit"===i.credentials&&(l.withCredentials=!1),"responseType"in l&&r.blob&&(l.responseType="blob"),i.headers.forEach(function(e,t){l.setRequestHeader(t,e)}),i.signal&&(i.signal.addEventListener("abort",a),l.onreadystatechange=function(){4===l.readyState&&i.signal.removeEventListener("abort",a)}),l.send(void 0===i._bodyInit?null:i._bodyInit)})}k.polyfill=!0,self.fetch||(self.fetch=k,self.Headers=s,self.Request=y,self.Response=b)},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n1?s.createElement("select",{value:r,onChange:this.onSelect},n.map(t.renderOption)):null}},{key:"renderTable",value:function(){var e=this.state,t=e.loading,n=e.logs;return t?s.createElement("div",{className:"loading-container"},s.createElement(p,{className:"normal"})):n.length?s.createElement("table",{className:"table"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",{className:"method"},"Method"),s.createElement("th",{className:"status"},"Status"),s.createElement("th",{className:"url"},"URL"),s.createElement("th",{className:"group"},"Project"),s.createElement("th",{className:"useragent"},"User Agent"),s.createElement("th",{className:"time"},"Time"))),s.createElement("tbody",null,this.renderLogs())):s.createElement("div",{className:"logs-empty"},s.createElement("p",null,"No Logs"))}},{key:"render",value:function(){var e=this.state.group,t=this.props,n=t.query,r=t.baseUrl;if(!e)return null;var o="".concat(r,"/logs?").concat(f.stringify(Object.assign({},n,{id:e})));return s.createElement(d,{onChange:this.onVisible},s.createElement("div",{className:"logs"},s.createElement("div",{className:"log-header"},s.createElement("h3",null,"Logs"),s.createElement("div",{className:"select-container"},s.createElement("div",null,s.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer"},"View More"),this.renderSelect()))),s.createElement("div",{className:"logs-list"},this.renderTable())))}}],[{key:"renderOption",value:function(e){return s.createElement("option",{key:e.id,value:e.id},e.name)}}]),t}();y.propTypes={query:c.shape({}).isRequired,baseUrl:c.string.isRequired,user:c.shape({keys:c.array,id:c.string})},y.defaultProps={user:{}},e.exports=y,e.exports.Logs=y,e.exports.LogsEmitter=m},function(e,t,n){"use strict"; +/** @license React v16.5.1 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(1),i="function"==typeof Symbol&&Symbol.for,l=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,u=i?Symbol.for("react.fragment"):60107,s=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,f=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.forward_ref"):60112;i&&Symbol.for("react.placeholder");var m="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rN.length&&N.push(e)}function D(e,t,n){return null==e?0:function e(t,n,o,i){var u=r(t);"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case l:case a:s=!0}}if(s)return o(i,t,""===n?"."+I(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c0&&s>u&&(s=u);for(var c=0;c=0?(f=m.substr(0,y),d=m.substr(y+1)):(f=m,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),r(l,p)?o(l[p])?l[p].push(h):l[p]=[l[p],h]:l[p]=h}return l};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(e){switch(r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,u){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===r(e)?l(a(e),function(r){var a=encodeURIComponent(o(r))+n;return i(e[r])?l(e[r],function(e){return a+encodeURIComponent(o(e))}).join(t):a+encodeURIComponent(o(e[r]))}).join(t):u?encodeURIComponent(o(u))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function l(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r-1?function(){o||(o=setTimeout(i,r||0))}:function(){clearTimeout(o),o=setTimeout(i,n||0)},getLastTimeout:function(){return o}};e.addEventListener(t,l.fn),this.debounceCheck[t]=l},startWatching:function(){this.debounceCheck||this.interval||(this.props.intervalCheck&&(this.interval=setInterval(this.check,this.props.intervalDelay)),this.props.scrollCheck&&this.addEventListener(this.getContainer(),"scroll",this.props.scrollDelay,this.props.scrollThrottle),this.props.resizeCheck&&this.addEventListener(window,"resize",this.props.resizeDelay,this.props.resizeThrottle),!this.props.delayedCall&&this.check())},stopWatching:function(){if(this.debounceCheck)for(var e in this.debounceCheck)if(this.debounceCheck.hasOwnProperty(e)){var t=this.debounceCheck[e];clearTimeout(t.getLastTimeout()),t.target.removeEventListener(e,t.fn),this.debounceCheck[e]=null}this.debounceCheck=null,this.interval&&(this.interval=clearInterval(this.interval))},roundRectDown:function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}},check:function(){var e,t,n=this.node;if(!n)return this.state;if(e=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e}(this.roundRectDown(n.getBoundingClientRect())),this.props.containment){var o=this.props.containment.getBoundingClientRect();t={top:o.top,left:o.left,bottom:o.bottom,right:o.right}}else t={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var i=this.props.offset||{};"object"===r(i)&&(t.top+=i.top||0,t.left+=i.left||0,t.bottom-=i.bottom||0,t.right-=i.right||0);var l={top:e.top>=t.top,left:e.left>=t.left,bottom:e.bottom<=t.bottom,right:e.right<=t.right},a=e.height>0&&e.width>0,s=a&&l.top&&l.left&&l.bottom&&l.right;if(a&&this.props.partialVisibility){var c=e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left;"string"==typeof this.props.partialVisibility&&(c=l[this.props.partialVisibility]),s=this.props.minTopValue?c&&e.top<=t.bottom-this.props.minTopValue:c}"string"==typeof i.direction&&"number"==typeof i.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",i.direction,i.value),s=u(i,e,t));var f=this.state;return this.state.isVisible!==s&&(f={isVisible:s,visibilityRect:l},this.setState(f),this.props.onChange&&this.props.onChange(s,l)),f},render:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):o.Children.only(this.props.children)}})},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(15)},function(e,t,n){"use strict"; +/** @license React v16.8.6 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(16),i=n(3),l=n(21);function a(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rthis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=ce,e.release=fe}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=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:ue,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ue,this._dispatchInstances=this._dispatchListeners=null}}),se.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},se.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,de(n),n},de(se);var pe=se.extend({data:null}),he=se.extend({data:null}),me=[9,13,27,32],ye=q&&"CompositionEvent"in window,ve=null;q&&"documentMode"in document&&(ve=document.documentMode);var be=q&&"TextEvent"in window&&!ve,ge=q&&(!ye||ve&&8=ve),we=String.fromCharCode(32),ke={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function _e(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ee(e){return"object"===r(e=e.detail)&&"data"in e?e.data:null}var Te=!1;var Se={eventTypes:ke,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(ye)e:{switch(e){case"compositionstart":o=ke.compositionStart;break e;case"compositionend":o=ke.compositionEnd;break e;case"compositionupdate":o=ke.compositionUpdate;break e}o=void 0}else Te?_e(e,n)&&(o=ke.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=ke.compositionStart);return o?(ge&&"ko"!==n.locale&&(Te||o!==ke.compositionStart?o===ke.compositionEnd&&Te&&(i=le()):(oe="value"in(re=r)?re.value:re.textContent,Te=!0)),o=pe.getPooled(o,t,n,r),i?o.data=i:null!==(i=Ee(n))&&(o.data=i),H(o),i=o):i=null,(e=be?function(e,t){switch(e){case"compositionend":return Ee(t);case"keypress":return 32!==t.which?null:(xe=!0,we);case"textInput":return(e=t.data)===we&&xe?null:e;default:return null}}(e,n):function(e,t){if(Te)return"compositionend"===e||!ye&&_e(e,t)?(e=le(),ie=oe=re=null,Te=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function mt(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}var yt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){yt[e]=new mt(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];yt[t]=new mt(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){yt[e]=new mt(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){yt[e]=new mt(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){yt[e]=new mt(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){yt[e]=new mt(e,3,!0,e,null)}),["capture","download"].forEach(function(e){yt[e]=new mt(e,4,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){yt[e]=new mt(e,6,!1,e,null)}),["rowSpan","start"].forEach(function(e){yt[e]=new mt(e,5,!1,e.toLowerCase(),null)});var vt=/[\-:]([a-z])/g;function bt(e){return e[1].toUpperCase()}function gt(e,t,n,r){var o=yt.hasOwnProperty(t)?yt[t]:null;(null!==o?0===o.type:!r&&(2En.length&&En.push(e)}}}var Rn={},Dn=0,In="_reactListenersID"+(""+Math.random()).slice(2);function An(e){return Object.prototype.hasOwnProperty.call(e,In)||(e[In]=Dn++,Rn[e[In]]={}),Rn[e[In]]}function Mn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Un(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fn(e,t){var n,r=Un(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=Un(r)}}function Ln(){for(var e=window,t=Mn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Mn((e=t.contentWindow).document)}return t}function jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function zn(e){var t=Ln(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(n.ownerDocument.documentElement,n)){if(null!==r&&jn(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Fn(n,i);var l=Fn(n,r);o&&l&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n=document.documentMode,Wn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vn=null,$n=null,Hn=null,qn=!1;function Yn(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qn||null==Vn||Vn!==Mn(n)?null:("selectionStart"in(n=Vn)&&jn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Hn&&nn(Hn,n)?null:(Hn=n,(e=se.getPooled(Wn.select,$n,e,t)).type="select",e.target=Vn,H(e),e))}var Qn={eventTypes:Wn,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=An(i),o=k.onSelect;for(var l=0;l=t.length||a("93"),t=t[0]),n=t),null==n&&(n="")),e._wrapperState={initialValue:wt(n)}}function Jn(e,t){var n=wt(t.value),r=wt(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function er(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}O.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),x=j,_=F,E=L,O.injectEventPluginsByName({SimpleEventPlugin:xn,EnterLeaveEventPlugin:Jt,ChangeEventPlugin:Bt,SelectEventPlugin:Qn,BeforeInputEventPlugin:Se});var tr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function nr(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 rr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?nr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var or=void 0,ir=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!==tr.svg||"innerHTML"in e)e.innerHTML=t;else{for((or=or||document.createElement("div")).innerHTML=""+t+"",t=or.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function lr(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 ar={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ur=["Webkit","ms","Moz","O"];function sr(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ar.hasOwnProperty(e)&&ar[e]?(""+t).trim():t+"px"}function cr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=sr(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ar).forEach(function(e){ur.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ar[t]=ar[e]})});var fr=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 dr(e,t){t&&(fr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&a("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&a("60"),"object"===r(t.dangerouslySetInnerHTML)&&"__html"in t.dangerouslySetInnerHTML||a("61")),null!=t.style&&"object"!==r(t.style)&&a("62",""))}function pr(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function hr(e,t){var n=An(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=k[t];for(var r=0;rCr||(e.current=Sr[Cr],Sr[Cr]=null,Cr--)}function Nr(e,t){Sr[++Cr]=e.current,e.current=t}var Or={},Rr={current:Or},Dr={current:!1},Ir=Or;function Ar(e,t){var n=e.type.contextTypes;if(!n)return Or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ur(e){Pr(Dr),Pr(Rr)}function Fr(e){Pr(Dr),Pr(Rr)}function Lr(e,t,n){Rr.current!==Or&&a("168"),Nr(Rr,t),Nr(Dr,n)}function jr(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())o in e||a("108",ut(t)||"Unknown",o);return i({},n,r)}function zr(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Or,Ir=Rr.current,Nr(Rr,t),Nr(Dr,Dr.current),!0}function Br(e,t,n){var r=e.stateNode;r||a("169"),n?(t=jr(e,t,Ir),r.__reactInternalMemoizedMergedChildContext=t,Pr(Dr),Pr(Rr),Nr(Rr,t)):Pr(Dr),Nr(Dr,n)}var Wr=null,Vr=null;function $r(e){return function(t){try{return e(t)}catch(e){}}}function Hr(e,t,n,r){return new function(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}(e,t,n,r)}function qr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Yr(e,t){var n=e.alternate;return null===n?((n=Hr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.contextDependencies=e.contextDependencies,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qr(e,t,n,o,i,l){var u=2;if(o=e,"function"==typeof e)qr(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case Ge:return Kr(n.children,i,l,t);case tt:return Gr(n,3|i,l,t);case Xe:return Gr(n,2|i,l,t);case Ze:return(e=Hr(12,n,t,4|i)).elementType=Ze,e.type=Ze,e.expirationTime=l,e;case rt:return(e=Hr(13,n,t,i)).elementType=rt,e.type=rt,e.expirationTime=l,e;default:if("object"===r(e)&&null!==e)switch(e.$$typeof){case Je:u=10;break e;case et:u=9;break e;case nt:u=11;break e;case ot:u=14;break e;case it:u=16,o=null;break e}a("130",null==e?e:r(e),"")}return(t=Hr(u,n,t,i)).elementType=e,t.type=o,t.expirationTime=l,t}function Kr(e,t,n,r){return(e=Hr(7,e,r,t)).expirationTime=n,e}function Gr(e,t,n,r){return e=Hr(8,e,r,t),t=0==(1&t)?Xe:tt,e.elementType=t,e.type=t,e.expirationTime=n,e}function Xr(e,t,n){return(e=Hr(6,e,null,t)).expirationTime=n,e}function Zr(e,t,n){return(t=Hr(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jr(e,t){e.didError=!1;var n=e.earliestPendingTime;0===n?e.earliestPendingTime=e.latestPendingTime=t:nt&&(e.latestPendingTime=t),no(t,e)}function eo(e,t){e.didError=!1,e.latestPingedTime>=t&&(e.latestPingedTime=0);var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=0:r:r===t&&(e.latestPendingTime=n),n=e.earliestSuspendedTime,r=e.latestSuspendedTime,0===n?e.earliestSuspendedTime=e.latestSuspendedTime=t:nt&&(e.latestSuspendedTime=t),no(t,e)}function to(e,t){var n=e.earliestPendingTime;return e=e.earliestSuspendedTime,n>t&&(t=n),e>t&&(t=e),t}function no(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,o=t.earliestPendingTime,i=t.latestPingedTime;0===(o=0!==o?o:i)&&(0===e||re&&(e=n),t.nextExpirationTimeToWorkOn=o,t.expirationTime=e}function ro(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var oo=(new o.Component).refs;function io(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var lo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===rn(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=xa(),o=Gi(r=Kl(r,e));o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Vl(),Zi(e,o),Zl(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=xa(),o=Gi(r=Kl(r,e));o.tag=$i,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Vl(),Zi(e,o),Zl(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=xa(),r=Gi(n=Kl(n,e));r.tag=Hi,void 0!==t&&null!==t&&(r.callback=t),Vl(),Zi(e,r),Zl(e,n)}};function ao(e,t,n,r,o,i,l){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,l):!t.prototype||!t.prototype.isPureReactComponent||(!nn(n,r)||!nn(o,i))}function uo(e,t,n){var o=!1,i=Or,l=t.contextType;return"object"===r(l)&&null!==l?l=Wi(l):(i=Mr(t)?Ir:Rr.current,l=(o=null!==(o=t.contextTypes)&&void 0!==o)?Ar(e,i):Or),t=new t(n,l),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=lo,e.stateNode=t,t._reactInternalFiber=e,o&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function so(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&&lo.enqueueReplaceState(t,t.state,null)}function co(e,t,n,o){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=oo;var l=t.contextType;"object"===r(l)&&null!==l?i.context=Wi(l):(l=Mr(t)?Ir:Rr.current,i.context=Ar(e,l)),null!==(l=e.updateQueue)&&(nl(e,l,n,i,o),i.state=e.memoizedState),"function"==typeof(l=t.getDerivedStateFromProps)&&(io(e,t,l,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&lo.enqueueReplaceState(i,i.state,null),null!==(l=e.updateQueue)&&(nl(e,l,n,i,o),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var fo=Array.isArray;function po(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!==r(e)){if(n._owner){var o=void 0;(n=n._owner)&&(1!==n.tag&&a("309"),o=n.stateNode),o||a("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;t===oo&&(t=o.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&a("284"),n._owner||a("290",e)}return e}function ho(e,t){"textarea"!==e.type&&a("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function mo(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=Yr(e,t)).index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)d?(y=f,f=null):y=f.sibling;var v=h(r,f,a[d],u);if(null===v){null===f&&(f=y);break}e&&f&&null===v.alternate&&t(r,f),i=l(v,i,d),null===c?s=v:c.sibling=v,c=v,f=y}if(d===a.length)return n(r,f),s;if(null===f){for(;dy?(v=d,d=null):v=d.sibling;var g=h(r,d,b.value,s);if(null===g){d||(d=v);break}e&&d&&null===g.alternate&&t(r,d),i=l(g,i,y),null===f?c=g:f.sibling=g,f=g,d=v}if(b.done)return n(r,d),c;if(null===d){for(;!b.done;y++,b=u.next())null!==(b=p(r,b.value,s))&&(i=l(b,i,y),null===f?c=b:f.sibling=b,f=b);return c}for(d=o(r,d);!b.done;y++,b=u.next())null!==(b=m(d,r,y,b.value,s))&&(e&&null!==b.alternate&&d.delete(null===b.key?y:b.key),i=l(b,i,y),null===f?c=b:f.sibling=b,f=b);return e&&d.forEach(function(e){return t(r,e)}),c}return function(e,o,l,s){var c="object"===r(l)&&null!==l&&l.type===Ge&&null===l.key;c&&(l=l.props.children);var f="object"===r(l)&&null!==l;if(f)switch(l.$$typeof){case Qe:e:{for(f=l.key,c=o;null!==c;){if(c.key===f){if(7===c.tag?l.type===Ge:c.elementType===l.type){n(e,c.sibling),(o=i(c,l.type===Ge?l.props.children:l.props)).ref=po(e,c,l),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}l.type===Ge?((o=Kr(l.props.children,e.mode,s,l.key)).return=e,e=o):((s=Qr(l.type,l.key,l.props,null,e.mode,s)).ref=po(e,o,l),s.return=e,e=s)}return u(e);case Ke:e:{for(c=l.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===l.containerInfo&&o.stateNode.implementation===l.implementation){n(e,o.sibling),(o=i(o,l.children||[])).return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}(o=Zr(l,e.mode,s)).return=e,e=o}return u(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==o&&6===o.tag?(n(e,o.sibling),(o=i(o,l)).return=e,e=o):(n(e,o),(o=Xr(l,e.mode,s)).return=e,e=o),u(e);if(fo(l))return y(e,o,l,s);if(at(l))return v(e,o,l,s);if(f&&ho(e,l),void 0===l&&!c)switch(e.tag){case 1:case 0:a("152",(s=e.type).displayName||s.name||"Component")}return n(e,o)}}var yo=mo(!0),vo=mo(!1),bo={},go={current:bo},wo={current:bo},ko={current:bo};function xo(e){return e===bo&&a("174"),e}function _o(e,t){Nr(ko,t),Nr(wo,e),Nr(go,bo);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:rr(null,"");break;default:t=rr(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}Pr(go),Nr(go,t)}function Eo(e){Pr(go),Pr(wo),Pr(ko)}function To(e){xo(ko.current);var t=xo(go.current),n=rr(t,e.type);t!==n&&(Nr(wo,e),Nr(go,n))}function So(e){wo.current===e&&(Pr(go),Pr(wo))}var Co=0,Po=2,No=4,Oo=8,Ro=16,Do=32,Io=64,Ao=128,Mo=He.ReactCurrentDispatcher,Uo=0,Fo=null,Lo=null,jo=null,zo=null,Bo=null,Wo=null,Vo=0,$o=null,Ho=0,qo=!1,Yo=null,Qo=0;function Ko(){a("321")}function Go(e,t){if(null===t)return!1;for(var n=0;nVo&&(Vo=f)):i=s.eagerReducer===e?s.eagerState:e(i,s.action),l=s,s=s.next}while(null!==s&&s!==r);c||(u=l,o=i),en(i,t.memoizedState)||(xi=!0),t.memoizedState=i,t.baseUpdate=u,t.baseState=o,n.lastRenderedState=i}return[t.memoizedState,n.dispatch]}function ri(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===$o?($o={lastEffect:null}).lastEffect=e.next=e:null===(t=$o.lastEffect)?$o.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,$o.lastEffect=e),e}function oi(e,t,n,r){var o=Jo();Ho|=e,o.memoizedState=ri(t,n,void 0,void 0===r?null:r)}function ii(e,t,n,r){var o=ei();r=void 0===r?null:r;var i=void 0;if(null!==Lo){var l=Lo.memoizedState;if(i=l.destroy,null!==r&&Go(r,l.deps))return void ri(Co,n,i,r)}Ho|=e,o.memoizedState=ri(t,n,i,r)}function li(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ai(){}function ui(e,t,n){25>Qo||a("301");var r=e.alternate;if(e===Fo||null!==r&&r===Fo)if(qo=!0,e={expirationTime:Uo,action:n,eagerReducer:null,eagerState:null,next:null},null===Yo&&(Yo=new Map),void 0===(n=Yo.get(t)))Yo.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{Vl();var o=xa(),i={expirationTime:o=Kl(o,e),action:n,eagerReducer:null,eagerState:null,next:null},l=t.last;if(null===l)i.next=i;else{var u=l.next;null!==u&&(i.next=u),l.next=i}if(t.last=i,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var s=t.lastRenderedState,c=r(s,n);if(i.eagerReducer=r,i.eagerState=c,en(c,s))return}catch(e){}Zl(e,o)}}var si={readContext:Wi,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko},ci={readContext:Wi,useCallback:function(e,t){return Jo().memoizedState=[e,void 0===t?null:t],e},useContext:Wi,useEffect:function(e,t){return oi(516,Ao|Io,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,oi(4,No|Do,li.bind(null,t,e),n)},useLayoutEffect:function(e,t){return oi(4,No|Do,e,t)},useMemo:function(e,t){var n=Jo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ui.bind(null,Fo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Jo().memoizedState=e},useState:function(e){var t=Jo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:ti,lastRenderedState:e}).dispatch=ui.bind(null,Fo,e),[t.memoizedState,e]},useDebugValue:ai},fi={readContext:Wi,useCallback:function(e,t){var n=ei();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:Wi,useEffect:function(e,t){return ii(516,Ao|Io,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ii(4,No|Do,li.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ii(4,No|Do,e,t)},useMemo:function(e,t){var n=ei();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Go(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:ni,useRef:function(){return ei().memoizedState},useState:function(e){return ni(ti)},useDebugValue:ai},di=null,pi=null,hi=!1;function mi(e,t){var n=Hr(5,null,null,0);n.elementType="DELETED",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 yi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function vi(e){if(hi){var t=pi;if(t){var n=t;if(!yi(e,t)){if(!(t=Er(n))||!yi(e,t))return e.effectTag|=2,hi=!1,void(di=e);mi(di,n)}di=e,pi=Tr(t)}else e.effectTag|=2,hi=!1,di=e}}function bi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;di=e}function gi(e){if(e!==di)return!1;if(!hi)return bi(e),hi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!gr(t,e.memoizedProps))for(t=pi;t;)mi(e,t),t=Er(t);return bi(e),pi=di?Er(e.stateNode):null,!0}function wi(){pi=di=null,hi=!1}var ki=He.ReactCurrentOwner,xi=!1;function _i(e,t,n,r){t.child=null===e?vo(t,null,n,r):yo(t,e.child,n,r)}function Ei(e,t,n,r,o){n=n.render;var i=t.ref;return Bi(t,o),r=Xo(e,t,n,r,i,o),null===e||xi?(t.effectTag|=1,_i(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ii(e,t,o))}function Ti(e,t,n,r,o,i){if(null===e){var l=n.type;return"function"!=typeof l||qr(l)||void 0!==l.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Qr(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=l,Si(e,t,l,r,o,i))}return l=e.child,o=n?Di(e,t,n):null!==(t=Ii(e,t,n))?t.sibling:null}return Ii(e,t,n)}}else xi=!1;switch(t.expirationTime=0,t.tag){case 2:o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps;var i=Ar(t,Rr.current);if(Bi(t,n),i=Xo(null,t,o,e,i,n),t.effectTag|=1,"object"===r(i)&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,Zo(),Mr(o)){var l=!0;zr(t)}else l=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var u=o.getDerivedStateFromProps;"function"==typeof u&&io(t,o,u,e),i.updater=lo,t.stateNode=i,i._reactInternalFiber=t,co(t,o,e,n),t=Oi(null,t,o,!0,l,n)}else t.tag=0,_i(null,t,i,n),t=t.child;return t;case 16:switch(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),l=t.pendingProps,e=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)}),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(i),t.type=e,i=t.tag=function(e){if("function"==typeof e)return qr(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===nt)return 11;if(e===ot)return 14}return 2}(e),l=ro(e,l),u=void 0,i){case 0:u=Pi(null,t,e,l,n);break;case 1:u=Ni(null,t,e,l,n);break;case 11:u=Ei(null,t,e,l,n);break;case 14:u=Ti(null,t,e,ro(e.type,l),o,n);break;default:a("306",e,"")}return u;case 0:return o=t.type,i=t.pendingProps,Pi(e,t,o,i=t.elementType===o?i:ro(o,i),n);case 1:return o=t.type,i=t.pendingProps,Ni(e,t,o,i=t.elementType===o?i:ro(o,i),n);case 3:return Ri(t),null===(o=t.updateQueue)&&a("282"),i=null!==(i=t.memoizedState)?i.element:null,nl(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===i?(wi(),t=Ii(e,t,n)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(pi=Tr(t.stateNode.containerInfo),di=t,i=hi=!0),i?(t.effectTag|=2,t.child=vo(t,null,o,n)):(_i(e,t,o,n),wi()),t=t.child),t;case 5:return To(t),null===e&&vi(t),o=t.type,i=t.pendingProps,l=null!==e?e.memoizedProps:null,u=i.children,gr(o,i)?u=null:null!==l&&gr(o,l)&&(t.effectTag|=16),Ci(e,t),1!==n&&1&t.mode&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(_i(e,t,u,n),t=t.child),t;case 6:return null===e&&vi(t),null;case 13:return Di(e,t,n);case 4:return _o(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=yo(t,null,o,n):_i(e,t,o,n),t.child;case 11:return o=t.type,i=t.pendingProps,Ei(e,t,o,i=t.elementType===o?i:ro(o,i),n);case 7:return _i(e,t,t.pendingProps,n),t.child;case 8:case 12:return _i(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,i=t.pendingProps,u=t.memoizedProps,ji(t,l=i.value),null!==u){var s=u.value;if(0===(l=en(s,l)?0:0|("function"==typeof o._calculateChangedBits?o._calculateChangedBits(s,l):1073741823))){if(u.children===i.children&&!Dr.current){t=Ii(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.contextDependencies;if(null!==c){u=s.child;for(var f=c.first;null!==f;){if(f.context===o&&0!=(f.observedBits&l)){1===s.tag&&((f=Gi(n)).tag=Hi,Zi(s,f)),s.expirationTime=t&&(xi=!0),e.contextDependencies=null}function Wi(e,t){return Li!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(Li=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Fi?(null===Ui&&a("308"),Fi=t,Ui.contextDependencies={first:t,expirationTime:0}):Fi=Fi.next=t),e._currentValue}var Vi=0,$i=1,Hi=2,qi=3,Yi=!1;function Qi(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ki(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Gi(e){return{expirationTime:e,tag:Vi,payload:null,callback:null,next:null,nextEffect:null}}function Xi(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Zi(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,o=null;null===r&&(r=e.updateQueue=Qi(e.memoizedState))}else r=e.updateQueue,o=n.updateQueue,null===r?null===o?(r=e.updateQueue=Qi(e.memoizedState),o=n.updateQueue=Qi(n.memoizedState)):r=e.updateQueue=Ki(o):null===o&&(o=n.updateQueue=Ki(r));null===o||r===o?Xi(r,t):null===r.lastUpdate||null===o.lastUpdate?(Xi(r,t),Xi(o,t)):(Xi(r,t),o.lastUpdate=t)}function Ji(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=Qi(e.memoizedState):el(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function el(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Ki(t)),t}function tl(e,t,n,r,o,l){switch(n.tag){case $i:return"function"==typeof(e=n.payload)?e.call(l,r,o):e;case qi:e.effectTag=-2049&e.effectTag|64;case Vi:if(null===(o="function"==typeof(e=n.payload)?e.call(l,r,o):e)||void 0===o)break;return i({},r,o);case Hi:Yi=!0}return r}function nl(e,t,n,r,o){Yi=!1;for(var i=(t=el(e,t)).baseState,l=null,a=0,u=t.firstUpdate,s=i;null!==u;){var c=u.expirationTime;ct?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime>t&&(e.earliestPendingTime=e.latestPendingTime)),0===(n=e.earliestSuspendedTime)?Jr(e,t):tn&&Jr(e,t)}no(0,e)}(e,o>r?o:r),Tl.current=null,r=void 0,1n?t:n)&&(Ll=null),function(e,t){e.expirationTime=t,e.finishedWork=null}(e,t)}function Hl(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(1024&e.effectTag)){Pl=e;e:{var o=t,l=Ol,u=(t=e).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:Mr(t.type)&&Ur();break;case 3:Eo(),Fr(),(u=t.stateNode).pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),null!==o&&null!==o.child||(gi(t),t.effectTag&=-3),ul(t);break;case 5:So(t);var s=xo(ko.current);if(l=t.type,null!==o&&null!=t.stateNode)sl(o,t,l,u,s),o.ref!==t.ref&&(t.effectTag|=128);else if(u){var c=xo(go.current);if(gi(t)){o=(u=t).stateNode;var f=u.type,d=u.memoizedProps,p=s;switch(o[A]=u,o[M]=d,l=void 0,s=f){case"iframe":case"object":Cn("load",o);break;case"video":case"audio":for(f=0;f<\/script>",f=o.removeChild(o.firstChild)):"string"==typeof o.is?f=f.createElement(p,{is:o.is}):(f=f.createElement(p),"select"===p&&(p=f,o.multiple?p.multiple=!0:o.size&&(p.size=o.size))):f=f.createElementNS(c,p),(o=f)[A]=d,o[M]=u,al(o,t,!1,!1),p=o;var h=s,m=pr(f=l,d=u);switch(f){case"iframe":case"object":Cn("load",p),s=d;break;case"video":case"audio":for(s=0;su&&(u=o),s>u&&(u=s),l=l.sibling;t.childExpirationTime=u}if(null!==Pl)return Pl;null!==n&&0==(1024&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1=y?h=0:(-1===h||y component higher in the tree to provide a loading indicator or placeholder to display."+st(f))}Dl=!0,d=il(d,f),s=c;do{switch(s.tag){case 3:s.effectTag|=2048,s.expirationTime=u,Ji(s,u=kl(s,d,u));break e;case 1:if(h=d,m=s.type,f=s.stateNode,0==(64&s.effectTag)&&("function"==typeof m.getDerivedStateFromError||null!==f&&"function"==typeof f.componentDidCatch&&(null===Ll||!Ll.has(f)))){s.effectTag|=2048,s.expirationTime=u,Ji(s,u=xl(s,h,u));break e}}s=s.return}while(null!==s)}Pl=Hl(l);continue}i=!0,Da(t)}}break}if(Cl=!1,El.current=n,Li=Fi=Ui=null,Zo(),i)Nl=null,e.finishedWork=null;else if(null!==Pl)e.finishedWork=null;else{if(null===(n=e.current.alternate)&&a("281"),Nl=null,Dl){if(i=e.latestPendingTime,l=e.latestSuspendedTime,u=e.latestPingedTime,0!==i&&it?0:t)):(e.pendingCommitExpirationTime=o,e.finishedWork=n)}}function Ql(e,t){for(var n=e.return;null!==n;){switch(n.tag){case 1:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ll||!Ll.has(r)))return Zi(n,e=xl(n,e=il(t,e),1073741823)),void Zl(n,1073741823);break;case 3:return Zi(n,e=kl(n,e=il(t,e),1073741823)),void Zl(n,1073741823)}n=n.return}3===e.tag&&(Zi(e,n=kl(e,n=il(t,e),1073741823)),Zl(e,1073741823))}function Kl(e,t){var n=l.unstable_getCurrentPriorityLevel(),r=void 0;if(0==(1&t.mode))r=1073741823;else if(Cl&&!Al)r=Ol;else{switch(n){case l.unstable_ImmediatePriority:r=1073741823;break;case l.unstable_UserBlockingPriority:r=1073741822-10*(1+((1073741822-e+15)/10|0));break;case l.unstable_NormalPriority:r=1073741822-25*(1+((1073741822-e+500)/25|0));break;case l.unstable_LowPriority:case l.unstable_IdlePriority:r=1;break;default:a("313")}null!==Nl&&r===Ol&&--r}return n===l.unstable_UserBlockingPriority&&(0===aa||r=r&&(e.didError=!1,(0===(t=e.latestPingedTime)||t>n)&&(e.latestPingedTime=n),no(n,e),0!==(n=e.expirationTime)&&_a(e,n)))}function Xl(e,t){e.expirationTimeOl&&jl(),Jr(e,t),Cl&&!Al&&Nl===e||_a(e,e.expirationTime),va>ya&&(va=0,a("185")))}function Jl(e,t,n,r,o){return l.unstable_runWithPriority(l.unstable_ImmediatePriority,function(){return e(t,n,r,o)})}var ea=null,ta=null,na=0,ra=void 0,oa=!1,ia=null,la=0,aa=0,ua=!1,sa=null,ca=!1,fa=!1,da=null,pa=l.unstable_now(),ha=1073741822-(pa/10|0),ma=ha,ya=50,va=0,ba=null;function ga(){ha=1073741822-((l.unstable_now()-pa)/10|0)}function wa(e,t){if(0!==na){if(te.expirationTime&&(e.expirationTime=t),oa||(ca?fa&&(ia=e,la=1073741823,Oa(e,1073741823,!1)):1073741823===t?Pa(1073741823,!1):wa(e,t))}function Ea(){var e=0,t=null;if(null!==ta)for(var n=ta,r=ea;null!==r;){var o=r.expirationTime;if(0===o){if((null===n||null===ta)&&a("244"),r===r.nextScheduledRoot){ea=ta=r.nextScheduledRoot=null;break}if(r===ea)ea=o=r.nextScheduledRoot,ta.nextScheduledRoot=o,r.nextScheduledRoot=null;else{if(r===ta){(ta=n).nextScheduledRoot=ea,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if(o>e&&(e=o,t=r),r===ta)break;if(1073741823===e)break;n=r,r=r.nextScheduledRoot}}ia=t,la=e}var Ta=!1;function Sa(){return!!Ta||!!l.unstable_shouldYield()&&(Ta=!0)}function Ca(){try{if(!Sa()&&null!==ea){ga();var e=ea;do{var t=e.expirationTime;0!==t&&ha<=t&&(e.nextExpirationTimeToWorkOn=ha),e=e.nextScheduledRoot}while(e!==ea)}Pa(0,!0)}finally{Ta=!1}}function Pa(e,t){if(Ea(),t)for(ga(),ma=ha;null!==ia&&0!==la&&e<=la&&!(Ta&&ha>la);)Oa(ia,la,ha>la),Ea(),ga(),ma=ha;else for(;null!==ia&&0!==la&&e<=la;)Oa(ia,la,!1),Ea();if(t&&(na=0,ra=null),0!==la&&wa(ia,la),va=0,ba=null,null!==da)for(e=da,da=null,t=0;t=n&&(null===da?da=[r]:da.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===ba?va++:(ba=e,va=0),l.unstable_runWithPriority(l.unstable_ImmediatePriority,function(){$l(e,t)})}function Da(e){null===ia&&a("246"),ia.expirationTime=0,ua||(ua=!0,sa=e)}function Ia(e,t){var n=ca;ca=!0;try{return e(t)}finally{(ca=n)||oa||Pa(1073741823,!1)}}function Aa(e,t){if(ca&&!fa){fa=!0;try{return e(t)}finally{fa=!1}}return e(t)}function Ma(e,t,n){ca||oa||0===aa||(Pa(aa,!1),aa=0);var r=ca;ca=!0;try{return l.unstable_runWithPriority(l.unstable_UserBlockingPriority,function(){return e(t,n)})}finally{(ca=r)||oa||Pa(1073741823,!1)}}function Ua(e,t,n,r,o){var i=t.current;e:if(n){n=n._reactInternalFiber;t:{2===rn(n)&&1===n.tag||a("170");var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(Mr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);a("171"),l=void 0}if(1===n.tag){var u=n.type;if(Mr(u)){n=jr(n,u,l);break e}}n=l}else n=Or;return null===t.context?t.context=n:t.pendingContext=n,t=o,(o=Gi(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(o.callback=t),Vl(),Zi(i,o),Zl(i,r),r}function Fa(e,t,n,r){var o=t.current;return Ua(e,t,n,o=Kl(xa(),o),r)}function La(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function ja(e){var t=1073741822-25*(1+((1073741822-xa()+500)/25|0));t>=Sl&&(t=Sl-1),this._expirationTime=Sl=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function za(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function Ba(e,t,n){e={current:t=Hr(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function Wa(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Va(e,t,n,r,o){var i=n._reactRootContainer;if(i){if("function"==typeof o){var l=o;o=function(){var e=La(i._internalRoot);l.call(e)}}null!=e?i.legacy_renderSubtreeIntoContainer(e,t,o):i.render(t,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Ba(e,!1,t)}(n,r),"function"==typeof o){var a=o;o=function(){var e=La(i._internalRoot);a.call(e)}}Aa(function(){null!=e?i.legacy_renderSubtreeIntoContainer(e,t,o):i.render(t,o)})}return La(i._internalRoot)}function $a(e,t){var n=2=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},Ie=Ia,Ae=Ma,Me=function(){oa||0===aa||(Pa(aa,!1),aa=0)};var Ha={createPortal:$a,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?a("188"):a("268",Object.keys(e))),e=null===(e=ln(t))?null:e.stateNode},hydrate:function(e,t,n){return Wa(t)||a("200"),Va(null,e,t,!0,n)},render:function(e,t,n){return Wa(t)||a("200"),Va(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return Wa(n)||a("200"),(null==e||void 0===e._reactInternalFiber)&&a("38"),Va(e,t,n,!1,r)},unmountComponentAtNode:function(e){return Wa(e)||a("40"),!!e._reactRootContainer&&(Aa(function(){Va(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return $a.apply(void 0,arguments)},unstable_batchedUpdates:Ia,unstable_interactiveUpdates:Ma,flushSync:function(e,t){oa&&a("187");var n=ca;ca=!0;try{return Jl(e,t)}finally{ca=n,Pa(1073741823,!1)}},unstable_createRoot:function(e,t){return Wa(e)||a("299","unstable_createRoot"),new Ba(e,!0,null!=t&&!0===t.hydrate)},unstable_flushControlled:function(e){var t=ca;ca=!0;try{Jl(e)}finally{(ca=t)||oa||Pa(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[F,L,j,O.injectEventPluginsByName,g,H,function(e){C(e,$)},Re,De,On,D]}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Wr=$r(function(e){return t.onCommitFiberRoot(n,e)}),Vr=$r(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}})(i({},e,{overrideProps:null,currentDispatcherRef:He.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ln(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:U,bundleType:0,version:"16.8.6",rendererPackageName:"react-dom"});var qa={default:Ha},Ya=qa&&Ha||qa;e.exports=Ya.default||Ya},function(e,t,n){"use strict";e.exports=n(17)},function(e,t,n){"use strict"; +/** @license React v16.4.2 + * react.production.min.js + * + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(3),i=n(18),l=n(19),a=n(20),u="function"==typeof Symbol&&Symbol.for,s=u?Symbol.for("react.element"):60103,c=u?Symbol.for("react.portal"):60106,f=u?Symbol.for("react.fragment"):60107,d=u?Symbol.for("react.strict_mode"):60108,p=u?Symbol.for("react.profiler"):60114,h=u?Symbol.for("react.provider"):60109,m=u?Symbol.for("react.context"):60110,y=u?Symbol.for("react.async_mode"):60111,v=u?Symbol.for("react.forward_ref"):60112;u&&Symbol.for("react.timeout");var b="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rR.length&&R.push(e)}function A(e,t,n,o){var i=r(e);"undefined"!==i&&"boolean"!==i||(e=null);var l=!1;if(null===e)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case s:case c:l=!0}}if(l)return n(o,e,""===t?"."+M(e,0):t),1;if(l=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;a=t){n=e;break}e=e.next}while(e!==r);null===n?n=r:n===r&&(r=u,c()),(t=n.previous).next=n.previous=u,u.next=n,u.previous=t}}function d(){if(-1===l&&null!==r&&1===r.priorityLevel){u=!0;try{do{f()}while(null!==r&&1===r.priorityLevel)}finally{u=!1,null!==r?c():s=!1}}}function p(e){u=!0;var n=o;o=e;try{if(e)for(;null!==r;){var i=t.unstable_now();if(!(r.expirationTime<=i))break;do{f()}while(null!==r&&r.expirationTime<=i)}else if(null!==r)do{f()}while(null!==r&&!T())}finally{u=!1,o=n,null!==r?c():s=!1,d()}}var h,m,y=Date,v="function"==typeof setTimeout?setTimeout:void 0,b="function"==typeof clearTimeout?clearTimeout:void 0,g="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,w="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function k(e){h=g(function(t){b(m),e(t)}),m=v(function(){w(h),e(t.unstable_now())},100)}if("object"===("undefined"==typeof performance?"undefined":n(performance))&&"function"==typeof performance.now){var x=performance;t.unstable_now=function(){return x.now()}}else t.unstable_now=function(){return y.now()};var _,E,T,S=null;if("undefined"!=typeof window?S=window:void 0!==e&&(S=e),S&&S._schedMock){var C=S._schedMock;_=C[0],E=C[1],T=C[2],t.unstable_now=C[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var P=null,N=function(e){if(null!==P)try{P(e)}finally{P=null}};_=function(e){null!==P?setTimeout(_,0,e):(P=e,setTimeout(N,0,!1))},E=function(){P=null},T=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof g&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof w&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var O=null,R=!1,D=-1,I=!1,A=!1,M=0,U=33,F=33;T=function(){return M<=t.unstable_now()};var L=new MessageChannel,j=L.port2;L.port1.onmessage=function(){R=!1;var e=O,n=D;O=null,D=-1;var r=t.unstable_now(),o=!1;if(0>=M-r){if(!(-1!==n&&n<=r))return I||(I=!0,k(z)),O=e,void(D=n);o=!0}if(null!==e){A=!0;try{e(o)}finally{A=!1}}};var z=function e(t){if(null!==O){k(e);var n=t-M+F;nn&&(n=8),F=nt?j.postMessage(void 0):I||(I=!0,k(z))},E=function(){O=null,R=!1,D=-1}}t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=i,o=l;i=e,l=t.unstable_now();try{return n()}finally{i=r,l=o,d()}},t.unstable_next=function(e){switch(i){case 1:case 2:case 3:var n=3;break;default:n=i}var r=i,o=l;i=n,l=t.unstable_now();try{return e()}finally{i=r,l=o,d()}},t.unstable_scheduleCallback=function(e,o){var a=-1!==l?l:t.unstable_now();if("object"===n(o)&&null!==o&&"number"==typeof o.timeout)o=a+o.timeout;else switch(i){case 1:o=a+-1;break;case 2:o=a+250;break;case 5:o=a+1073741823;break;case 4:o=a+1e4;break;default:o=a+5e3}if(e={callback:e,priorityLevel:i,expirationTime:o,next:null,previous:null},null===r)r=e.next=e.previous=e,c();else{a=null;var u=r;do{if(u.expirationTime>o){a=u;break}u=u.next}while(u!==r);null===a?a=r:a===r&&(r=e,c()),(o=a.previous).next=a.previous=e,e.next=a,e.previous=o}return e},t.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(t===e)r=null;else{e===r&&(r=t);var n=e.previous;n.next=t,t.previous=n}e.next=e.previous=null}},t.unstable_wrapCallback=function(e){var n=i;return function(){var r=i,o=l;i=n,l=t.unstable_now();try{return e.apply(this,arguments)}finally{i=r,l=o,d()}}},t.unstable_getCurrentPriorityLevel=function(){return i},t.unstable_shouldYield=function(){return!o&&(null!==r&&r.expirationTimet.bottom&&n.leftt.right;case"left":return n.left+ot.bottom&&n.topt.right;case"bottom":return n.bottom-o>t.bottom&&n.leftt.right&&n.topt.right&&n.leftt.bottom}}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"object"===n(e)&&null!==e}function l(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,u,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(l(n=this._events[e]))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),r=(s=n.slice()).length,u=0;u0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!o(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,l,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(l=(n=this._events[e]).length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(a=l;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(o(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}}]); \ No newline at end of file From a0fe3226c801f6e6a32c8d170116f4c070f670b3 Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Mon, 30 Sep 2019 14:30:41 -0700 Subject: [PATCH 11/14] Covered edge case where new logs were not populated --- packages/api-logs/__tests__/index.test.jsx | 32 +++++++++++++++++++++- packages/api-logs/index.jsx | 5 ++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/packages/api-logs/__tests__/index.test.jsx b/packages/api-logs/__tests__/index.test.jsx index 506643916..0106ea0ab 100644 --- a/packages/api-logs/__tests__/index.test.jsx +++ b/packages/api-logs/__tests__/index.test.jsx @@ -4,7 +4,7 @@ const React = require('react'); const { shallow } = require('enzyme'); const nock = require('nock'); -const { Logs } = require('../index.jsx'); +const { Logs, checkFreshness } = require('../index.jsx'); const requestmodel = require('./fixtures/requestmodel.json'); const oas = require('./fixtures/oas.json'); const operation = require('./fixtures/operation.json'); @@ -244,3 +244,33 @@ describe('Logs', () => { mock.done(); }); }); + +describe('checkFreshness()', () => { + test('should throw error if existing and new logs are unpopulated after request', () => { + expect(() => { + checkFreshness([], []); + }).toThrow(); + }); + + test('should throw error if new logs are unpopulated after request', () => { + expect(() => { + checkFreshness([{ _id: 1 }], []); + }).toThrow(); + }); + + test('should throw error if logs are not unique', () => { + expect(() => { + checkFreshness([{ _id: 1 }], [{ _id: 1 }]); + }).toThrow(); + }); + + test('should return incoming logs if no existing logs, and incoming logs are populated', () => { + const res = checkFreshness([], [{ _id: 1 }]); + expect(res[0]._id).toBe(1); + }); + + test('should return incoming logs if both args are populated and ids are unique to each other', () => { + const res = checkFreshness([{ _id: 1 }], [{ _id: 2 }]); + expect(res[0]._id).toBe(2); + }); +}); diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index 5059e1bf8..d6efe3e4d 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -38,8 +38,8 @@ function getLanguage(log) { function checkFreshness(existingLogs, incomingLogs) { if ( - (existingLogs.length && existingLogs[0]._id !== incomingLogs[0]._id) || - !existingLogs.length + (existingLogs.length && incomingLogs.length && existingLogs[0]._id !== incomingLogs[0]._id) || + (!existingLogs.length && incomingLogs.length) ) { return incomingLogs; } @@ -251,3 +251,4 @@ Logs.defaultProps = { module.exports = Logs; module.exports.Logs = Logs; +module.exports.checkFreshness = checkFreshness; From 86795e00cb9abbd21c937d6cea1c94e6a22d9d5f Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Tue, 1 Oct 2019 10:48:17 -0700 Subject: [PATCH 12/14] Reworked function calls for getting logs and updated conditional for retry throws --- packages/api-logs/__tests__/index.test.jsx | 27 +++++------ packages/api-logs/index.jsx | 54 +++++++++++++--------- 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/packages/api-logs/__tests__/index.test.jsx b/packages/api-logs/__tests__/index.test.jsx index 0106ea0ab..e9104e88c 100644 --- a/packages/api-logs/__tests__/index.test.jsx +++ b/packages/api-logs/__tests__/index.test.jsx @@ -72,9 +72,9 @@ describe('Logs', () => { test('should call refresh and set state when group props are updated via parent', done => { const comp = shallow(); - comp.instance().refresh = jest.fn(); + comp.instance().getLogs = jest.fn(); comp.setProps({ group: 'testnew' }); - expect(comp.instance().refresh).toHaveBeenCalledTimes(1); + expect(comp.instance().getLogs).toHaveBeenCalledTimes(1); expect(comp.instance().state.logs).toMatchObject([]); done(); }); @@ -110,16 +110,16 @@ describe('Logs', () => { }, ]); - const res = await comp.instance().getData(); - expect(res[0]._id).toBe('2'); + await comp.instance().iterativeGetLogs(); + expect(comp.instance().state.logs[0]._id).toBe('2'); mock.done(); }); test('should call refresh when result props are updated via parent', () => { const comp = shallow(); - comp.instance().refresh = jest.fn(); + comp.instance().iterativeGetLogs = jest.fn(); comp.setProps({ result: { newResult: true } }); - expect(comp.instance().refresh).toHaveBeenCalledTimes(1); + expect(comp.instance().iterativeGetLogs).toHaveBeenCalledTimes(1); }); test('should fetch based on query with page/limit', async () => { @@ -136,7 +136,7 @@ describe('Logs', () => { }) .reply(200, [requestmodel]); - await comp.instance().getData(); + await comp.instance().getLogs(); mock.done(); }); @@ -155,7 +155,7 @@ describe('Logs', () => { }) .reply(200, [requestmodel]); - await comp.instance().getData('someid'); + await comp.instance().getLogs('someid'); mock.done(); }); @@ -175,17 +175,12 @@ describe('Logs', () => { expect(comp.find('table').length).toBe(1); }); - test('should throw for invalid fetch', () => { - const comp = shallow(); - expect(comp.instance().getData).toThrow(); - }); - test('should throw when response is 500', () => { const comp = shallow(); const response = { status: 500, }; - expect(comp.instance().handleData.bind(comp.instance(), response)).toThrow(); + expect(comp.instance().handleResponse.bind(comp.instance(), response)).toThrow(); }); test('should set logs when response is 200', () => { @@ -194,7 +189,7 @@ describe('Logs', () => { status: 200, json: () => [requestmodel], }; - const result = comp.instance().handleData(response); + const result = comp.instance().handleResponse(response); expect(result.length).toBe(1); }); @@ -239,7 +234,7 @@ describe('Logs', () => { }) .reply(200, [requestmodel]); - await comp.instance().getData('someid'); + await comp.instance().getLogs('someid'); mock.done(); }); diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index d6efe3e4d..3d86b5475 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -38,8 +38,8 @@ function getLanguage(log) { function checkFreshness(existingLogs, incomingLogs) { if ( - (existingLogs.length && incomingLogs.length && existingLogs[0]._id !== incomingLogs[0]._id) || - (!existingLogs.length && incomingLogs.length) + (!existingLogs.length && incomingLogs.length) || + (existingLogs.length && incomingLogs.length && existingLogs[0]._id !== incomingLogs[0]._id) ) { return incomingLogs; } @@ -62,7 +62,7 @@ class Logs extends React.Component { } componentDidMount() { - this.refresh(); + this.getLogs(); } componentDidUpdate(prevProps) { @@ -71,12 +71,12 @@ class Logs extends React.Component { // Setting logs to [] means we show the loading icon // eslint-disable-next-line react/no-did-update-set-state this.setState({ logs: [] }); - this.refresh(); + this.getLogs(); } // Refresh if the result has changed (this means has "try it now" been called?) if (this.props.result !== prevProps.result) { - this.refresh(); + this.iterativeGetLogs(); } } @@ -84,46 +84,56 @@ class Logs extends React.Component { this.changeGroup(event.target.value); } - getData() { + async getLogs(iterative) { + let logs; + + try { + const reqUrl = this.buildLogRequest(); + const res = await fetch(reqUrl); + logs = await this.handleResponse(res); + } catch (e) { + // TODO Many Errors! Handle it! + } + + if (!iterative && logs && logs.length) { + this.setState({ logs }); + } + return logs; + } + + buildLogRequest() { const { query, baseUrl, group } = this.props; this.setState({ loading: true }); - const reqUrl = `${baseUrl}/api/logs?${querystring.stringify( + return `${baseUrl}/api/logs?${querystring.stringify( Object.assign({}, query, { id: group || null, limit: 5, page: 0 }), )}`; + } - return retry( + async iterativeGetLogs() { + const logs = await retry( async () => { - const res = await fetch(reqUrl); - const parsedLogs = await this.handleData(res); + const parsedLogs = await this.getLogs(true); return checkFreshness(this.state.logs, parsedLogs); }, { minTimeout: 50 }, ); + + this.setState({ logs }); } - handleData(res) { + handleResponse(res) { this.setState({ loading: false }); if (res.status === 200) { return res.json(); } - throw new Error(`Failed to fetch logs`); + throw new Error('Failed to fetch logs'); } changeGroup(group) { this.props.changeGroup(group); } - refresh() { - this.getData() - .then(logs => { - this.setState({ logs }); - }) - .catch(() => { - // TODO HANDLE ERROR - }); - } - visitLogItem(log) { const { baseUrl } = this.props; window.open(`${baseUrl}logs/${log._id}`); From de09ee41b261c37dfc89d11b26048f4d53e7c7ab Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Tue, 1 Oct 2019 13:04:44 -0700 Subject: [PATCH 13/14] Modified state updates for cleaner ux, error handling for async-retry edge case --- packages/api-logs/__tests__/index.test.jsx | 37 ++++++++++--------- packages/api-logs/index.jsx | 41 +++++++++++++--------- 2 files changed, 43 insertions(+), 35 deletions(-) diff --git a/packages/api-logs/__tests__/index.test.jsx b/packages/api-logs/__tests__/index.test.jsx index e9104e88c..f3b86941c 100644 --- a/packages/api-logs/__tests__/index.test.jsx +++ b/packages/api-logs/__tests__/index.test.jsx @@ -4,7 +4,7 @@ const React = require('react'); const { shallow } = require('enzyme'); const nock = require('nock'); -const { Logs, checkFreshness } = require('../index.jsx'); +const { Logs, checkFreshness, handleResponse } = require('../index.jsx'); const requestmodel = require('./fixtures/requestmodel.json'); const oas = require('./fixtures/oas.json'); const operation = require('./fixtures/operation.json'); @@ -175,24 +175,6 @@ describe('Logs', () => { expect(comp.find('table').length).toBe(1); }); - test('should throw when response is 500', () => { - const comp = shallow(); - const response = { - status: 500, - }; - expect(comp.instance().handleResponse.bind(comp.instance(), response)).toThrow(); - }); - - test('should set logs when response is 200', () => { - const comp = shallow(); - const response = { - status: 200, - json: () => [requestmodel], - }; - const result = comp.instance().handleResponse(response); - expect(result.length).toBe(1); - }); - test('on select change', () => { const comp = shallow(); const instance = comp.instance(); @@ -240,6 +222,23 @@ describe('Logs', () => { }); }); +describe('handleResponse()', () => { + test('should throw when response is 500', () => { + expect(() => { + handleResponse({ status: 500 }); + }).toThrow(); + }); + + test('should set logs when response is 200', () => { + const response = { + status: 200, + json: () => [requestmodel], + }; + const result = handleResponse(response); + expect(result.length).toBe(1); + }); +}); + describe('checkFreshness()', () => { test('should throw error if existing and new logs are unpopulated after request', () => { expect(() => { diff --git a/packages/api-logs/index.jsx b/packages/api-logs/index.jsx index 3d86b5475..77da36a17 100644 --- a/packages/api-logs/index.jsx +++ b/packages/api-logs/index.jsx @@ -46,6 +46,13 @@ function checkFreshness(existingLogs, incomingLogs) { throw new Error('Requested logs are not up-to-date.'); } +function handleResponse(res) { + if (res.status === 200) { + return res.json(); + } + throw new Error('Failed to fetch logs'); +} + class Logs extends React.Component { constructor(props) { super(props); @@ -90,11 +97,15 @@ class Logs extends React.Component { try { const reqUrl = this.buildLogRequest(); const res = await fetch(reqUrl); - logs = await this.handleResponse(res); + logs = await handleResponse(res); } catch (e) { // TODO Many Errors! Handle it! } + if (!iterative) { + this.setState({ loading: false }); + } + if (!iterative && logs && logs.length) { this.setState({ logs }); } @@ -111,23 +122,20 @@ class Logs extends React.Component { } async iterativeGetLogs() { - const logs = await retry( - async () => { - const parsedLogs = await this.getLogs(true); - return checkFreshness(this.state.logs, parsedLogs); - }, - { minTimeout: 50 }, - ); - - this.setState({ logs }); - } + try { + const logs = await retry( + async () => { + const parsedLogs = await this.getLogs(true); + return checkFreshness(this.state.logs, parsedLogs); + }, + { retries: 6, minTimeout: 50 }, + ); + this.setState({ logs }); + } catch (e) { + // TODO Many Errors! Handle it! + } - handleResponse(res) { this.setState({ loading: false }); - if (res.status === 200) { - return res.json(); - } - throw new Error('Failed to fetch logs'); } changeGroup(group) { @@ -262,3 +270,4 @@ Logs.defaultProps = { module.exports = Logs; module.exports.Logs = Logs; module.exports.checkFreshness = checkFreshness; +module.exports.handleResponse = handleResponse; From a8e056be983a89a94b6349bc8c63642955f78ae0 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Wed, 2 Oct 2019 10:00:19 -0700 Subject: [PATCH 14/14] Removing react-visibility-sensor as it's no longer used. --- packages/api-logs/package-lock.json | 87 +++++++++-------------------- packages/api-logs/package.json | 3 +- 2 files changed, 26 insertions(+), 64 deletions(-) diff --git a/packages/api-logs/package-lock.json b/packages/api-logs/package-lock.json index 364726a69..9e7878ce7 100644 --- a/packages/api-logs/package-lock.json +++ b/packages/api-logs/package-lock.json @@ -1053,11 +1053,6 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -1155,6 +1150,14 @@ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", "dev": true }, + "async-retry": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz", + "integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==", + "requires": { + "retry": "0.12.0" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2234,16 +2237,6 @@ "sha.js": "^2.4.8" } }, - "create-react-class": { - "version": "15.6.3", - "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.3.tgz", - "integrity": "sha512-M+/3Q6E6DLO6Yx3OwrWjwHBnvfXXYA7W+dFjt/ZDBemHO1DDZhsalX/NUtnTYclN6GfnBDRh4qRHjcDHmlJBJg==", - "requires": { - "fbjs": "^0.8.9", - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" - } - }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -2577,6 +2570,7 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, "requires": { "iconv-lite": "~0.4.13" } @@ -3289,27 +3283,6 @@ "bser": "^2.0.0" } }, - "fbjs": { - "version": "0.8.17", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", - "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", - "requires": { - "core-js": "^1.0.0", - "isomorphic-fetch": "^2.1.1", - "loose-envify": "^1.0.0", - "object-assign": "^4.1.0", - "promise": "^7.1.1", - "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.18" - }, - "dependencies": { - "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" - } - } - }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -4330,6 +4303,7 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -4643,7 +4617,8 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "is-symbol": { "version": "1.0.1", @@ -4691,6 +4666,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "dev": true, "requires": { "node-fetch": "^1.0.1", "whatwg-fetch": ">=0.10.0" @@ -6026,6 +6002,7 @@ "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, "requires": { "encoding": "^0.1.11", "is-stream": "^1.0.1" @@ -6578,14 +6555,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "requires": { - "asap": "~2.0.3" - } - }, "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -6730,15 +6699,6 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==" }, - "react-visibility-sensor": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/react-visibility-sensor/-/react-visibility-sensor-4.1.3.tgz", - "integrity": "sha512-X+xKuZc0muwR72/jtWerZbrmBo3F3VQwwm6Aqt+9QCILqOng9JzEnYSOqzrOVA5HZenHm5vAr6yRtO2KKRt9yA==", - "requires": { - "create-react-class": "^15.6.3", - "prop-types": "^15.6.2" - } - }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -7267,6 +7227,11 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -7352,7 +7317,8 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "sane": { "version": "4.1.0", @@ -7526,7 +7492,8 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true }, "sha.js": { "version": "2.4.11", @@ -8342,11 +8309,6 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, - "ua-parser-js": { - "version": "0.7.18", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", - "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" - }, "uglify-es": { "version": "3.3.9", "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", @@ -8932,7 +8894,8 @@ "whatwg-fetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", - "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" + "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==", + "dev": true }, "whatwg-mimetype": { "version": "2.3.0", diff --git a/packages/api-logs/package.json b/packages/api-logs/package.json index e0340532c..05a5839dc 100644 --- a/packages/api-logs/package.json +++ b/packages/api-logs/package.json @@ -6,8 +6,7 @@ "dependencies": { "async-retry": "^1.2.3", "prop-types": "^15.7.2", - "react": "^16.4.2", - "react-visibility-sensor": "^4.1.3" + "react": "^16.4.2" }, "scripts": { "lint": "eslint -f unix . --ext .jsx --ext .js",