@titaui/pc 1.15.46 → 1.15.47-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/button/icon-btn/index.css +19 -1
- package/lib/components/button/icon-btn/index.js +4 -2
- package/lib/components/change-okr-modal/index.js +1 -1
- package/lib/components/common-share/publishMblog.js +1 -1
- package/lib/components/create-okr-modal/fields/okr-type-detail.js +1 -1
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +1 -1
- package/lib/components/create-okr-modal/fields/okr-visibility.js +0 -3
- package/lib/components/create-okr-modal/index.js +1 -1
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/create-okr-modal/utils/helper.js +1 -1
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/dialog-confirm/index.css +8 -0
- package/lib/components/dialog-confirm/index.js +26 -16
- package/lib/components/dialog-qq-docs/index.js +1 -1
- package/lib/components/dialog-qq-docs/utils.js +1 -1
- package/lib/components/dialog-upload/index.js +1 -1
- package/lib/components/drawer-manager/drawerWrapper.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +1 -1
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/firework/index.js +1 -1
- package/lib/components/form/form-fields/dropdown/index.css +9 -0
- package/lib/components/form/form-fields/dropdown/index.js +8 -3
- package/lib/components/form/form-fields/input/index.js +4 -1
- package/lib/components/form/form-fields/input-verification-code/index.js +1 -1
- package/lib/components/grid-layout/util/network.js +1 -1
- package/lib/components/import-modal/tree/okr-tree/index.js +1 -1
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/menus/export-modules/survey-menu/index.css +9 -0
- package/lib/components/menus/export-modules/survey-menu/index.js +120 -0
- package/lib/components/menus/export-modules/survey-menu/menu-highlight.js +52 -0
- package/lib/components/menus/export-modules/survey-menu/menus.js +87 -0
- package/lib/components/{okr-excel/type.js → menus/export-modules/survey-menu/request-api.js} +0 -0
- package/lib/components/menus/export-modules/survey-menu/survey-front-menus.js +155 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/nav-top/components/app-center/index.js +17 -33
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -1
- package/lib/components/okr-detail/components/ao-nice/index.js +1 -1
- package/lib/components/okr-detail/components/header/edit-name.js +1 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +1 -1
- package/lib/components/okr-detail/components/header/o-classify.js +1 -1
- package/lib/components/okr-detail/components/o-classify.js +1 -1
- package/lib/components/okr-detail/components/o-progress-update/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +1 -1
- package/lib/components/okr-detail/detail-footer/index.js +1 -1
- package/lib/components/okr-detail/detail-header/index.js +1 -1
- package/lib/components/okr-detail/okr-list/index.js +1 -1
- package/lib/components/okr-detail/request-apis.js +1 -1
- package/lib/components/okr-filter-drawer/filter-form.js +2 -6
- package/lib/components/okr-flow/child-node/fields/creator.js +6 -5
- package/lib/components/okr-flow/child-node/work-node.js +1 -1
- package/lib/components/okr-flow/export-modal/index.js +40 -1
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +1 -1
- package/lib/components/okr-flow/request-apis.js +1 -1
- package/lib/components/okr-flow/root-node/index.js +1 -1
- package/lib/components/okr-guide/index.js +4 -0
- package/lib/components/okr-progress/components/o-progress-update/index.js +1 -1
- package/lib/components/okr-progress-modal/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/okr-share/common-painter/darwAvatar.js +1 -1
- package/lib/components/okr-share/common-painter/openDataPainter.js +1 -1
- package/lib/components/okr-share/common-painter/utils.js +1 -1
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +1 -1
- package/lib/components/okr-share/pink-card/drawKrs.js +1 -1
- package/lib/components/okr-share/pink-card/drawQuote.js +1 -1
- package/lib/components/okr-share/pink-card/drawUserName.js +1 -1
- package/lib/components/okr-share/pink-card/index.js +1 -1
- package/lib/components/okr-share/publishMblog.js +1 -1
- package/lib/components/okr-share/shareCardSelector.js +1 -1
- package/lib/components/okrcase-library/index.js +1 -2
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +3 -1
- package/lib/components/okrcase-library/server/network.js +1 -1
- package/lib/components/open-data-painter/index.js +1 -1
- package/lib/components/period-selector/helper/index.js +1 -1
- package/lib/components/quick-entrance/index.js +0 -17
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/select/Option.js +3 -3
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +1 -1
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +1 -1
- package/lib/components/survey-model/request-api.js +1 -1
- package/lib/components/task-relation-modal/index.js +1 -1
- package/lib/components/task-relation-modal/tree/category-tree/index.js +1 -1
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +1 -1
- package/lib/components/task-relation-modal/tree/work-tree/index.js +1 -1
- package/lib/components/task-relation-modal/work-relation/index.js +1 -1
- package/lib/components/task-tree/task-item-node/e-project.js +1 -1
- package/lib/components/task-tree/task-item-node/e-task.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components/toast/index.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/index2.js +1 -1
- package/lib/components/upvote/index.js +1 -1
- package/lib/components/user-selector/request-apis.js +6 -3
- package/lib/components/version-change-modal/index.js +1 -1
- package/lib/components/version-change-modal/request-api.js +1 -1
- package/lib/components/wechat-btn/index.js +0 -8
- package/lib/components/weekly-report/card.js +11 -1
- package/lib/components/weekly-report/common-painter/darwAvatar.js +1 -1
- package/lib/components/weekly-report/common-painter/drawName.js +1 -1
- package/lib/components/weekly-report/common-painter/openDataPainter.js +1 -1
- package/lib/components/weekly-report/index.js +1 -1
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/index.js +0 -16
- package/lib/pages/group-management/groupInterface.js +1 -1
- package/lib/pages/new-okr-list/header/index.css +1 -42
- package/lib/pages/new-okr-list/header/index.js +16 -129
- package/lib/pages/new-okr-list/index.css +0 -5
- package/lib/pages/new-okr-list/index.js +17 -76
- package/lib/pages/new-okr-list/list/index.js +1 -4
- package/lib/pages/new-okr-list/loading.js +3 -2
- package/lib/pages/new-okr-list/request-api.js +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +1 -1
- package/lib/pages/okr-map/request-apis.js +1 -1
- package/lib/utils/helpers.js +1 -1
- package/lib/utils/hooks.js +0 -58
- package/lib/utils/open-data.js +66 -17
- package/lib/utils/request-v1.js +1 -1
- package/lib/utils/request.js +1 -1
- package/package.json +2 -8
- package/lib/components/okr-excel/hooks.js +0 -311
- package/lib/components/okr-excel/index.css +0 -127
- package/lib/components/okr-excel/index.js +0 -192
- package/lib/components/okr-excel/renders.js +0 -339
- package/lib/components/okr-excel/setting.js +0 -21
- package/lib/components/okr-type-icon/assets/okr-classify-nuo-copy.svg +0 -71
- package/lib/components/okr-type-icon/assets/okr-classify-yuan-copy.svg +0 -71
- package/lib/components/okr-type-icon/index.css +0 -10
- package/lib/components/okr-type-icon/index.js +0 -44
- package/lib/components/popup-select/index.css +0 -63
- package/lib/components/popup-select/index.js +0 -144
- package/lib/components/progress/okr-progress/index.css +0 -28
- package/lib/components/progress/okr-progress/index.js +0 -36
- package/lib/components/table-excel/index.css +0 -62
- package/lib/components/table-excel/index.js +0 -37
- package/lib/components/tag/index.css +0 -14
- package/lib/components/tag/index.js +0 -52
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
.tita-okr-list-v2__view-tyoe-list-item {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.tita-okr-list-v2__view-tyoe-list-item > * + * {
|
|
7
|
-
margin-left: 5px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.tita-okr-list-v2__table-tip {
|
|
11
|
-
color: #fff;
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
line-height: 22px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
1
|
.tita-okr-list-v2__header {
|
|
17
2
|
display: flex;
|
|
18
3
|
margin-bottom: 16px;
|
|
@@ -40,7 +25,7 @@
|
|
|
40
25
|
align-items: center;
|
|
41
26
|
background: #fff;
|
|
42
27
|
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
43
|
-
|
|
28
|
+
width: 36px;
|
|
44
29
|
height: 36px;
|
|
45
30
|
border-radius: 18px;
|
|
46
31
|
font-size: 20px;
|
|
@@ -51,32 +36,6 @@
|
|
|
51
36
|
color: #2879ff;
|
|
52
37
|
}
|
|
53
38
|
|
|
54
|
-
.tita-okr-list-v2__header-icon--view-type {
|
|
55
|
-
padding: 0 14px;
|
|
56
|
-
display: flex;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
align-items: center;
|
|
60
|
-
background: #fff;
|
|
61
|
-
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
62
|
-
min-width: 36px;
|
|
63
|
-
height: 36px;
|
|
64
|
-
border-radius: 18px;
|
|
65
|
-
font-size: 20px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.tita-okr-list-v2__header-icon--view-type:hover {
|
|
69
|
-
cursor: pointer;
|
|
70
|
-
color: #2879ff;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.tita-okr-list-v2__header-down-icon {
|
|
74
|
-
font-size: 16px;
|
|
75
|
-
transform: scale(0.5);
|
|
76
|
-
margin-left: 4px;
|
|
77
|
-
color: #6f7886;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
39
|
.tita-okr-list-v2__header-record {
|
|
81
40
|
display: flex;
|
|
82
41
|
box-sizing: border-box;
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -37,10 +37,6 @@ var _requestApi = require("../request-api");
|
|
|
37
37
|
|
|
38
38
|
var _getLocale = require("../../../utils/getLocale");
|
|
39
39
|
|
|
40
|
-
var _popupSelect = _interopRequireDefault(require("../../../components/popup-select"));
|
|
41
|
-
|
|
42
|
-
var _guideTip = _interopRequireDefault(require("../../../components/guide-tip"));
|
|
43
|
-
|
|
44
40
|
require("./index.css");
|
|
45
41
|
|
|
46
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -61,66 +57,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
61
57
|
|
|
62
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
63
59
|
|
|
64
|
-
var ViewType;
|
|
65
|
-
exports.ViewType = ViewType;
|
|
66
|
-
|
|
67
|
-
(function (ViewType) {
|
|
68
|
-
ViewType["Card"] = "card";
|
|
69
|
-
ViewType["Table"] = "table";
|
|
70
|
-
ViewType["Map"] = "map";
|
|
71
|
-
})(ViewType || (exports.ViewType = ViewType = {}));
|
|
72
|
-
|
|
73
|
-
var viewConfig = function viewConfig() {
|
|
74
|
-
return {
|
|
75
|
-
table: {
|
|
76
|
-
icon: 'tu-icon-pc-table-s',
|
|
77
|
-
title: (0, _getLocale.getLocale)('OKR_MyO_KRP_Table')
|
|
78
|
-
},
|
|
79
|
-
card: {
|
|
80
|
-
icon: 'tu-icon-pc-card-s',
|
|
81
|
-
title: (0, _getLocale.getLocale)('Pro_Butt_Card')
|
|
82
|
-
},
|
|
83
|
-
map: {
|
|
84
|
-
icon: 'tu-icon-yangshi-ditu',
|
|
85
|
-
title: (0, _getLocale.getLocale)('OKR_MyO_Text_Alignment')
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
var getTableTip = function getTableTip() {
|
|
91
|
-
return !localStorage.getItem("OkrTableTypeTip_".concat(window.BSGlobal.loginUserInfo.Id));
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
var setTableTip = function setTableTip() {
|
|
95
|
-
localStorage.setItem("OkrTableTypeTip_".concat(window.BSGlobal.loginUserInfo.Id), 'true');
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
var getViewTypeMenuData = function getViewTypeMenuData(relationShip) {
|
|
99
|
-
return [{
|
|
100
|
-
label: /*#__PURE__*/_react["default"].createElement("p", {
|
|
101
|
-
className: "".concat(_precls.precls, "__view-tyoe-list-item")
|
|
102
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
103
|
-
className: "tu-icon-pc-card-s"
|
|
104
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('Pro_Butt_Card'))),
|
|
105
|
-
value: 'card'
|
|
106
|
-
}, {
|
|
107
|
-
label: /*#__PURE__*/_react["default"].createElement("p", {
|
|
108
|
-
className: "".concat(_precls.precls, "__view-tyoe-list-item")
|
|
109
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
110
|
-
className: "tu-icon-pc-table-s"
|
|
111
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_KRP_Table'))),
|
|
112
|
-
value: 'table'
|
|
113
|
-
}, {
|
|
114
|
-
label: /*#__PURE__*/_react["default"].createElement("p", {
|
|
115
|
-
className: "".concat(_precls.precls, "__view-tyoe-list-item")
|
|
116
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
117
|
-
className: "tu-icon-yangshi-ditu"
|
|
118
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Text_Alignment'))),
|
|
119
|
-
value: 'map',
|
|
120
|
-
visible: relationShip === 1
|
|
121
|
-
}];
|
|
122
|
-
};
|
|
123
|
-
|
|
124
60
|
function Header(props, ref) {
|
|
125
61
|
var _useContext = (0, _react.useContext)(_context.Context),
|
|
126
62
|
departmentName = _useContext.departmentName,
|
|
@@ -133,44 +69,23 @@ function Header(props, ref) {
|
|
|
133
69
|
|
|
134
70
|
var relationShip = parseInt(relation, 10);
|
|
135
71
|
var onSearch = props.onSearch,
|
|
136
|
-
onFrontAddOKR = props.onFrontAddOKR
|
|
137
|
-
_props$viewType = props.viewType,
|
|
138
|
-
defaultViewType = _props$viewType === void 0 ? ViewType.Card : _props$viewType,
|
|
139
|
-
onChangeViewType = props.onChangeViewType;
|
|
72
|
+
onFrontAddOKR = props.onFrontAddOKR;
|
|
140
73
|
|
|
141
74
|
var _useState = (0, _react.useState)(false),
|
|
142
75
|
_useState2 = _slicedToArray(_useState, 2),
|
|
143
76
|
onlyThisDept = _useState2[0],
|
|
144
77
|
setOnlyThisDept = _useState2[1];
|
|
145
78
|
|
|
146
|
-
var _useState3 = (0, _react.useState)(
|
|
79
|
+
var _useState3 = (0, _react.useState)(false),
|
|
147
80
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
148
|
-
|
|
149
|
-
|
|
81
|
+
init = _useState4[0],
|
|
82
|
+
setInit = _useState4[1];
|
|
150
83
|
|
|
151
|
-
var _useState5 = (0, _react.useState)(
|
|
84
|
+
var _useState5 = (0, _react.useState)(),
|
|
152
85
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var _useState7 = (0, _react.useState)(false),
|
|
157
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
158
|
-
init = _useState8[0],
|
|
159
|
-
setInit = _useState8[1];
|
|
160
|
-
|
|
161
|
-
var _useState9 = (0, _react.useState)(getTableTip()),
|
|
162
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
163
|
-
showTableTip = _useState10[0],
|
|
164
|
-
setShowTableTip = _useState10[1];
|
|
86
|
+
userInfo = _useState6[0],
|
|
87
|
+
setUserInfo = _useState6[1];
|
|
165
88
|
|
|
166
|
-
var _useState11 = (0, _react.useState)(),
|
|
167
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
168
|
-
userInfo = _useState12[0],
|
|
169
|
-
setUserInfo = _useState12[1];
|
|
170
|
-
|
|
171
|
-
(0, _react.useEffect)(function () {
|
|
172
|
-
setViewTypeMenuData(getViewTypeMenuData(relationShip));
|
|
173
|
-
}, [relationShip]);
|
|
174
89
|
(0, _react.useEffect)(function () {
|
|
175
90
|
if (toUserId !== undefined || relationShip === 1) {
|
|
176
91
|
var userId = toUserId;
|
|
@@ -282,20 +197,6 @@ function Header(props, ref) {
|
|
|
282
197
|
return null;
|
|
283
198
|
};
|
|
284
199
|
|
|
285
|
-
var onChangeViewTypeHandler = (0, _react.useCallback)(function (type) {
|
|
286
|
-
if (type === ViewType.Map) {
|
|
287
|
-
gotoOkrMap();
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
setViewType(type);
|
|
292
|
-
if (onChangeViewType) onChangeViewType(type);
|
|
293
|
-
}, [onChangeViewType]);
|
|
294
|
-
var viewInfo = viewConfig()[viewType];
|
|
295
|
-
var onHideTableTip = (0, _react.useCallback)(function () {
|
|
296
|
-
setTableTip();
|
|
297
|
-
setShowTableTip(false);
|
|
298
|
-
}, []);
|
|
299
200
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
300
201
|
className: "".concat(_precls.precls, "__header")
|
|
301
202
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -308,39 +209,25 @@ function Header(props, ref) {
|
|
|
308
209
|
className: "".concat(_precls.precls, "__header-item")
|
|
309
210
|
}, /*#__PURE__*/_react["default"].createElement(_keywordSearch["default"], {
|
|
310
211
|
onSearch: onSearch
|
|
311
|
-
})),
|
|
212
|
+
})), relationShip !== 2 && relationShip !== 3 &&
|
|
312
213
|
/*#__PURE__*/
|
|
313
214
|
// 我关注的 我参与的 没有创建按钮
|
|
314
|
-
_react["default"].createElement("div", {
|
|
215
|
+
_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
315
216
|
className: "".concat(_precls.precls, "__header-item")
|
|
316
217
|
}, /*#__PURE__*/_react["default"].createElement(_createOkr["default"], {
|
|
317
218
|
ref: createOkrRef,
|
|
318
219
|
onFrontAddOKR: onFrontAddOKR
|
|
319
220
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
320
|
-
className: "".concat(_precls.precls, "__header-item")
|
|
321
|
-
|
|
322
|
-
visible: showTableTip,
|
|
323
|
-
content: /*#__PURE__*/_react["default"].createElement("div", {
|
|
324
|
-
className: "".concat(_precls.precls, "__table-tip")
|
|
325
|
-
}, "\u65B0\u589E OKR \u8868\u683C\u67E5\u770B\u6A21\u5F0F\uFF0C\u67E5\u770B\u66F4\u4FBF\u6377\uFF0C\u5207\u6362\u4F53\u9A8C\u4E00\u4E0B"),
|
|
326
|
-
onClickClose: setTableTip,
|
|
327
|
-
popupPlacement: "bottom"
|
|
328
|
-
}, /*#__PURE__*/_react["default"].createElement(_popupSelect["default"], {
|
|
329
|
-
menuData: viewTypeMenuData,
|
|
330
|
-
popupPlacement: "bottom",
|
|
331
|
-
action: "click",
|
|
332
|
-
onChange: onChangeViewTypeHandler,
|
|
333
|
-
onVisableChange: onHideTableTip
|
|
221
|
+
className: "".concat(_precls.precls, "__header-item"),
|
|
222
|
+
onClick: gotoOkrMap
|
|
334
223
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
335
|
-
overlay:
|
|
224
|
+
overlay: (0, _getLocale.getLocale)('OKR_MyO_Text_Alignment'),
|
|
336
225
|
placement: "top"
|
|
337
226
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
338
|
-
className: "".concat(_precls.precls, "__header-icon
|
|
227
|
+
className: "".concat(_precls.precls, "__header-icon")
|
|
339
228
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
340
|
-
className:
|
|
341
|
-
}), /*#__PURE__*/_react["default"].createElement("
|
|
342
|
-
className: "tu-icon-caret-down ".concat(_precls.precls, "__header-down-icon")
|
|
343
|
-
})))))), /*#__PURE__*/_react["default"].createElement(_comments["default"], {
|
|
229
|
+
className: "tu-icon-yangshi-ditu"
|
|
230
|
+
}))))), /*#__PURE__*/_react["default"].createElement(_comments["default"], {
|
|
344
231
|
toUserId: toUserId,
|
|
345
232
|
relation: relationShip,
|
|
346
233
|
userInfo: userInfo
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.tita-okr-list-v2 {
|
|
2
|
-
position: relative;
|
|
3
2
|
height: calc(100% - 20px);
|
|
4
3
|
overflow-y: scroll;
|
|
5
4
|
margin-right: -16px;
|
|
@@ -11,15 +10,11 @@
|
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
.tita-okr-list-v2__loading {
|
|
14
|
-
position: absolute;
|
|
15
|
-
left: 50%;
|
|
16
|
-
transform: translateX(-50%);
|
|
17
13
|
height: 32px;
|
|
18
14
|
width: 80px;
|
|
19
15
|
background: url("./img/loading.gif") no-repeat;
|
|
20
16
|
background-size: contain;
|
|
21
17
|
margin: 200px auto;
|
|
22
|
-
z-index: 3;
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
.tita-okr-list-v2 .okr-list__empty-tip > img {
|
|
@@ -19,11 +19,9 @@ var _pagination = _interopRequireDefault(require("../../components/pagination"))
|
|
|
19
19
|
|
|
20
20
|
var _dialog = _interopRequireDefault(require("../../components/dialog"));
|
|
21
21
|
|
|
22
|
-
var _okrExcel = _interopRequireDefault(require("../../components/okr-excel"));
|
|
23
|
-
|
|
24
22
|
var _errorBoundary = _interopRequireDefault(require("../../components/error-boundary"));
|
|
25
23
|
|
|
26
|
-
var _header =
|
|
24
|
+
var _header = _interopRequireDefault(require("./header"));
|
|
27
25
|
|
|
28
26
|
var _list = _interopRequireDefault(require("./list"));
|
|
29
27
|
|
|
@@ -63,6 +61,12 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
|
63
61
|
|
|
64
62
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
65
63
|
|
|
64
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
65
|
+
|
|
66
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
67
|
+
|
|
68
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
69
|
+
|
|
66
70
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
67
71
|
|
|
68
72
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -75,40 +79,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
75
79
|
|
|
76
80
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
77
81
|
|
|
78
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
79
|
-
|
|
80
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
81
|
-
|
|
82
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
83
|
-
|
|
84
|
-
var cacheViewType = localStorage.getItem('cacheViewType');
|
|
85
|
-
|
|
86
|
-
function getOkrExcelData(okrData) {
|
|
87
|
-
var okrExcelData = [];
|
|
88
|
-
okrData.forEach(function (okrInfo) {
|
|
89
|
-
if (!okrInfo.Krs || !okrInfo.Krs.length) {
|
|
90
|
-
okrExcelData.push(_objectSpread({}, okrInfo));
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
okrInfo.Krs.forEach(function (kr, i) {
|
|
95
|
-
// 过滤目标下的其他执行(默认分组)
|
|
96
|
-
if (kr.mileStoneId === 0) return;
|
|
97
|
-
|
|
98
|
-
var data = _objectSpread(_objectSpread({}, i === 0 ? okrInfo : {}), {}, {
|
|
99
|
-
feedId: okrInfo.feedId,
|
|
100
|
-
Kr: _objectSpread(_objectSpread({}, kr), {}, {
|
|
101
|
-
index: i
|
|
102
|
-
})
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
if (i === 0) data.rowSpan = okrInfo.Krs.length;
|
|
106
|
-
okrExcelData.push(data);
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
return okrExcelData;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
82
|
var NewOkrList = function NewOkrList(props) {
|
|
113
83
|
var OkrListCmp = props.OkrListCmp,
|
|
114
84
|
OkrCommunicationPush = props.OkrCommunicationPush,
|
|
@@ -119,10 +89,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
119
89
|
var formFieldValues = useLocalStorage.getItem("okr-filter-values") || {
|
|
120
90
|
targetType: "",
|
|
121
91
|
targetCategory: "",
|
|
122
|
-
targetSort: ""
|
|
123
|
-
okrType: "",
|
|
124
|
-
okrClassify: "",
|
|
125
|
-
orderType: 0
|
|
92
|
+
targetSort: ""
|
|
126
93
|
};
|
|
127
94
|
|
|
128
95
|
var filterCycle = function () {
|
|
@@ -194,17 +161,12 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
194
161
|
isInit = _useState14[0],
|
|
195
162
|
setIsInit = _useState14[1];
|
|
196
163
|
|
|
197
|
-
var _useState15 = (0, _react.useState)(cacheViewType || _header.ViewType.Card),
|
|
198
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
199
|
-
viewType = _useState16[0],
|
|
200
|
-
setViewType = _useState16[1];
|
|
201
|
-
|
|
202
164
|
var headerRef = (0, _react.useRef)();
|
|
203
165
|
|
|
204
|
-
var
|
|
205
|
-
|
|
206
|
-
casesVisible =
|
|
207
|
-
setCasesVisible =
|
|
166
|
+
var _useState15 = (0, _react.useState)(false),
|
|
167
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
168
|
+
casesVisible = _useState16[0],
|
|
169
|
+
setCasesVisible = _useState16[1];
|
|
208
170
|
|
|
209
171
|
var routerData = (0, _tools.getQueryString)();
|
|
210
172
|
var departmentName = routerData.departmentName,
|
|
@@ -271,8 +233,8 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
271
233
|
setLoading(true);
|
|
272
234
|
recordVisitUser();
|
|
273
235
|
(0, _requestApi.okrSearch)(params).then(function (res) {
|
|
274
|
-
setOkrs(res
|
|
275
|
-
setTotal(res
|
|
236
|
+
setOkrs(res.works || []);
|
|
237
|
+
setTotal(res.total);
|
|
276
238
|
setLoading(false);
|
|
277
239
|
});
|
|
278
240
|
};
|
|
@@ -350,13 +312,6 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
350
312
|
(0, _react.useEffect)(function () {
|
|
351
313
|
getOkrs();
|
|
352
314
|
}, [pageNum, pageSize, query]);
|
|
353
|
-
var onChangeViewTypeHandler = (0, _react.useCallback)(function (type) {
|
|
354
|
-
localStorage.setItem('cacheViewType', type);
|
|
355
|
-
setViewType(type);
|
|
356
|
-
}, []);
|
|
357
|
-
var okrExcelData = (0, _react.useMemo)(function () {
|
|
358
|
-
return getOkrExcelData(okrs);
|
|
359
|
-
}, [okrs]);
|
|
360
315
|
return /*#__PURE__*/_react["default"].createElement(_context.Context.Provider, {
|
|
361
316
|
value: _objectSpread({
|
|
362
317
|
OkrCommunicationPush: OkrCommunicationPush,
|
|
@@ -371,12 +326,10 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
371
326
|
}, /*#__PURE__*/_react["default"].createElement(_header["default"], {
|
|
372
327
|
onSearch: handleOnSearch,
|
|
373
328
|
ref: headerRef,
|
|
374
|
-
onFrontAddOKR: onFrontAddOKR
|
|
375
|
-
onChangeViewType: onChangeViewTypeHandler,
|
|
376
|
-
viewType: viewType
|
|
329
|
+
onFrontAddOKR: onFrontAddOKR
|
|
377
330
|
}), /*#__PURE__*/_react["default"].createElement(_loading["default"], {
|
|
378
331
|
loading: loading
|
|
379
|
-
}, okrs.length > 0 &&
|
|
332
|
+
}, okrs.length > 0 && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_list["default"], {
|
|
380
333
|
OkrListCmp: OkrListCmp,
|
|
381
334
|
okrs: okrs,
|
|
382
335
|
setOkrs: setOkrs,
|
|
@@ -396,19 +349,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
396
349
|
pageSize: pageSize,
|
|
397
350
|
current: pageNum,
|
|
398
351
|
size: "sm"
|
|
399
|
-
}))), okrs.length
|
|
400
|
-
showCycle: query.cycleType === '-1',
|
|
401
|
-
data: okrExcelData,
|
|
402
|
-
onRefresh: getOkrs
|
|
403
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
404
|
-
className: "".concat(_precls.precls, "__pagination")
|
|
405
|
-
}, /*#__PURE__*/_react["default"].createElement(_pagination["default"], {
|
|
406
|
-
total: total,
|
|
407
|
-
onChange: handlePageChange,
|
|
408
|
-
pageSize: pageSize,
|
|
409
|
-
current: pageNum,
|
|
410
|
-
size: "sm"
|
|
411
|
-
}))), !loading && okrs.length === 0 && /*#__PURE__*/_react["default"].createElement(Empty, {
|
|
352
|
+
}))), okrs.length === 0 && /*#__PURE__*/_react["default"].createElement(Empty, {
|
|
412
353
|
openCreate: function openCreate() {
|
|
413
354
|
return openCreateModal();
|
|
414
355
|
},
|
|
@@ -41,13 +41,10 @@ function List(props) {
|
|
|
41
41
|
var _useContext = (0, _react.useContext)(_context.Context),
|
|
42
42
|
annualNum = _useContext.annualNum,
|
|
43
43
|
cycleType = _useContext.cycleType,
|
|
44
|
-
yqmNum = _useContext.yqmNum
|
|
45
|
-
orderType = _useContext.orderType;
|
|
44
|
+
yqmNum = _useContext.yqmNum;
|
|
46
45
|
|
|
47
46
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(OkrListCmp, {
|
|
48
|
-
orderType: orderType,
|
|
49
47
|
okrData: okrs,
|
|
50
|
-
setData: setOkrs,
|
|
51
48
|
cycle: {
|
|
52
49
|
annualNum: annualNum,
|
|
53
50
|
cycleType: cycleType,
|
|
@@ -16,9 +16,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
16
16
|
function Loading(_ref) {
|
|
17
17
|
var children = _ref.children,
|
|
18
18
|
loading = _ref.loading;
|
|
19
|
-
|
|
19
|
+
if (!loading) return children;
|
|
20
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
20
21
|
className: "".concat(_precls.precls, "__loading")
|
|
21
|
-
})
|
|
22
|
+
});
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
var _default = Loading;
|
|
@@ -9,7 +9,7 @@ exports.visitOkrCyclePag = exports.okrSearch = exports.okrList = exports.okrCrow
|
|
|
9
9
|
|
|
10
10
|
var _request = require("../../utils/request");
|
|
11
11
|
|
|
12
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
12
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
13
13
|
|
|
14
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
15
|
|
|
@@ -45,7 +45,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
45
45
|
|
|
46
46
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
47
47
|
|
|
48
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
48
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
49
49
|
|
|
50
50
|
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); } }
|
|
51
51
|
|