gz-ui-web 1.0.0 → 1.0.2-beta.0

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.
Files changed (23) hide show
  1. package/gz-ui-web-lib/ValuationLogDataChart-BRjP3HQm.js +4042 -0
  2. package/gz-ui-web-lib/ValuationLogDataChart-IclpIk4j.cjs +49 -0
  3. package/gz-ui-web-lib/business-components/pcs/index.cjs +1 -1
  4. package/gz-ui-web-lib/business-components/pcs/index.js +1 -1
  5. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/IndicativePricingforSelectedContracts.d.ts +3 -2
  6. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/MultipleResultGrid.d.ts +2 -1
  7. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/PricingContextForm.d.ts +3 -2
  8. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/PricingFooter.d.ts +4 -2
  9. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/grid-shared.d.ts +2 -2
  10. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/grid-utils.d.ts +2 -2
  11. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/constants.d.ts +34 -0
  12. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/hooks/useIndicativePricingController.d.ts +3 -15
  13. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/index.d.ts +1 -1
  14. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/reducer.d.ts +1 -1
  15. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/types.d.ts +36 -7
  16. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/utils/formatter.d.ts +1 -1
  17. package/gz-ui-web-lib/gz-ui-web.css +1 -1
  18. package/gz-ui-web-lib/index.cjs +1 -1
  19. package/gz-ui-web-lib/index.d.ts +1 -1
  20. package/gz-ui-web-lib/index.js +2 -2
  21. package/package.json +1 -1
  22. package/gz-ui-web-lib/ValuationLogDataChart-BqcetrGP.cjs +0 -39
  23. package/gz-ui-web-lib/ValuationLogDataChart-UvUtEgAU.js +0 -3913
@@ -1,3913 +0,0 @@
1
- import { jsx as g, jsxs as ve } from "react/jsx-runtime";
2
- import Ru, { forwardRef as ue, createContext as Mt, useRef as ee, useContext as ku, useMemo as Se, useCallback as pe, useEffect as Ee, useState as we, useReducer as _t, useLayoutEffect as fu } from "react";
3
- import { Alert as Iu, App as Pu, Button as $t, Empty as ru, Spin as Lu, theme as Nu, Tag as nu, Tooltip as Rt, DatePicker as Ae, Form as De, Select as ou, Radio as au } from "antd";
4
- import Re from "big.js";
5
- import { AllEnterpriseModule as kt } from "ag-grid-enterprise";
6
- import { AgGridProvider as It, AgGridReact as Pt } from "ag-grid-react";
7
- import { themeQuartz as Lt, createPart as zu } from "ag-grid-community";
8
- import { g as Nt, a as zt } from "./goldLightAgGridTokens-DdscbP4x.js";
9
- import * as Ou from "echarts/core";
10
- import { LineChart as Ot } from "echarts/charts";
11
- import { GridComponent as Vt, TooltipComponent as Yt } from "echarts/components";
12
- import { CanvasRenderer as Gt } from "echarts/renderers";
13
- function Vu(t) {
14
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
15
- }
16
- var Pe = { exports: {} }, qe = {};
17
- var gu;
18
- function Ut() {
19
- if (gu) return qe;
20
- gu = 1;
21
- var t = Ru.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
22
- return qe.c = function(e) {
23
- return t.H.useMemoCache(e);
24
- }, qe;
25
- }
26
- var Ze = {};
27
- var pu;
28
- function Wt() {
29
- return pu || (pu = 1, process.env.NODE_ENV !== "production" && (function() {
30
- var t = Ru.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
31
- Ze.c = function(e) {
32
- var u = t.H;
33
- return u === null && console.error(
34
- `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
35
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
36
- 2. You might be breaking the Rules of Hooks
37
- 3. You might have more than one copy of React in the same app
38
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
39
- ), u.useMemoCache(e);
40
- };
41
- })()), Ze;
42
- }
43
- var vu;
44
- function Ht() {
45
- return vu || (vu = 1, process.env.NODE_ENV === "production" ? Pe.exports = Ut() : Pe.exports = Wt()), Pe.exports;
46
- }
47
- var Y = Ht();
48
- function Yu(t) {
49
- var e, u, r = "";
50
- if (typeof t == "string" || typeof t == "number") r += t;
51
- else if (typeof t == "object") if (Array.isArray(t)) {
52
- var n = t.length;
53
- for (e = 0; e < n; e++) t[e] && (u = Yu(t[e])) && (r && (r += " "), r += u);
54
- } else for (u in t) t[u] && (r && (r += " "), r += u);
55
- return r;
56
- }
57
- function iu() {
58
- for (var t, e, u = 0, r = "", n = arguments.length; u < n; u++) (t = arguments[u]) && (e = Yu(t)) && (r && (r += " "), r += e);
59
- return r;
60
- }
61
- const Gu = ue((t, e) => {
62
- const u = Y.c(3);
63
- let r;
64
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Iu, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
65
- });
66
- Gu.displayName = "GZAlert";
67
- const qt = Iu.ErrorBoundary, Uu = (t) => {
68
- const e = Y.c(2);
69
- let u;
70
- return e[0] !== t ? (u = /* @__PURE__ */ g(qt, { ...t }), e[0] = t, e[1] = u) : u = e[1], u;
71
- };
72
- Uu.displayName = "GZAlertErrorBoundary";
73
- const $e = Gu;
74
- $e.ErrorBoundary = Uu;
75
- const Wu = ue((t, e) => {
76
- const u = Y.c(3);
77
- let r;
78
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Pu, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
79
- });
80
- Wu.displayName = "GZApp";
81
- const lu = Wu;
82
- Object.assign(lu, Pu);
83
- const Te = ue((t, e) => {
84
- const u = Y.c(9);
85
- let r, n, o;
86
- u[0] !== t ? ({
87
- children: r,
88
- type: o,
89
- ...n
90
- } = t, u[0] = t, u[1] = r, u[2] = n, u[3] = o) : (r = u[1], n = u[2], o = u[3]);
91
- const a = o === void 0 ? "default" : o;
92
- let s;
93
- return u[4] !== r || u[5] !== e || u[6] !== n || u[7] !== a ? (s = /* @__PURE__ */ g($t, { ref: e, type: a, ...n, children: r }), u[4] = r, u[5] = e, u[6] = n, u[7] = a, u[8] = s) : s = u[8], s;
94
- });
95
- Te.displayName = "GZButton";
96
- const Hu = (t) => {
97
- const e = Y.c(2);
98
- let u;
99
- return e[0] !== t ? (u = /* @__PURE__ */ g(ru, { ...t }), e[0] = t, e[1] = u) : u = e[1], u;
100
- };
101
- Hu.displayName = "GZEmpty";
102
- const Me = Hu;
103
- Me.PRESENTED_IMAGE_DEFAULT = ru.PRESENTED_IMAGE_DEFAULT;
104
- Me.PRESENTED_IMAGE_SIMPLE = ru.PRESENTED_IMAGE_SIMPLE;
105
- const qu = (t) => {
106
- const e = Y.c(2);
107
- let u;
108
- return e[0] !== t ? (u = /* @__PURE__ */ g(Lu, { ...t }), e[0] = t, e[1] = u) : u = e[1], u;
109
- };
110
- qu.displayName = "GZSpin";
111
- const su = qu;
112
- Object.assign(su, Lu);
113
- const Zt = 1e3, Je = 3, ae = "-", Zu = {
114
- pricingEnvironment: null,
115
- carbonForwardCurve: null,
116
- discountCurve: null,
117
- valuationDate: null
118
- }, hu = {
119
- pricingEnvironment: "请选择定价环境",
120
- carbonForwardCurve: "请选择碳金融远期价格曲线",
121
- discountCurve: "请选择无风险利率曲线",
122
- valuationDate: "请选择估值日"
123
- }, Ke = [{
124
- key: "instrumentCode",
125
- label: "成交编号",
126
- kind: "contract"
127
- }, {
128
- key: "scrtyCode",
129
- label: "标的代码",
130
- kind: "contract"
131
- }, {
132
- key: "fwdMaturityDate",
133
- label: "远期到期日",
134
- kind: "contract"
135
- }, {
136
- key: "settleDate",
137
- label: "结算支付日",
138
- kind: "contract"
139
- }, {
140
- key: "physicalDelivery",
141
- label: "交割方式",
142
- kind: "contract"
143
- }, {
144
- key: "direction",
145
- label: "买入/卖出",
146
- kind: "contract"
147
- }, {
148
- key: "fwdDlvPrice",
149
- label: "远期交割价格",
150
- kind: "contract"
151
- }, {
152
- key: "npv",
153
- label: "净现值NPV(估值日)",
154
- kind: "result"
155
- }, {
156
- key: "forwardPrice",
157
- label: "远期价格(远期到期日)",
158
- kind: "result"
159
- }, {
160
- key: "discountFactor",
161
- label: "支付日贴现因子",
162
- kind: "result"
163
- }], ju = Mt({});
164
- var jt = {
165
- // Set Filter
166
- selectAll: "(全选)",
167
- selectAllSearchResults: "(全选搜索结果)",
168
- addCurrentSelectionToFilter: "将当前选择添加到筛选器",
169
- searchOoo: "搜索...",
170
- blanks: "(空白)",
171
- noMatches: "无匹配项",
172
- typeToSearchOoo: "输入内容进行搜索...",
173
- // Number Filter & Text Filter
174
- filterOoo: "过滤...",
175
- equals: "等于",
176
- notEqual: "不等于",
177
- blank: "空白",
178
- notBlank: "非空",
179
- empty: "选择一个",
180
- // Number Filter
181
- lessThan: "小于",
182
- greaterThan: "大于",
183
- lessThanOrEqual: "小于等于",
184
- greaterThanOrEqual: "大于等于",
185
- inRange: "介于",
186
- inRangeStart: "从",
187
- inRangeEnd: "到",
188
- // Text Filter
189
- contains: "包含",
190
- notContains: "不包含",
191
- startsWith: "开始于",
192
- endsWith: "结束于",
193
- // Date Filter
194
- dateFormatOoo: "yyyy-mm-dd",
195
- before: "之前",
196
- after: "之后",
197
- yesterday: "昨天",
198
- today: "今天",
199
- tomorrow: "明天",
200
- last7Days: "最近7天",
201
- lastWeek: "上周",
202
- thisWeek: "本周",
203
- nextWeek: "下周",
204
- last30Days: "最近30天",
205
- lastMonth: "上个月",
206
- thisMonth: "这个月",
207
- nextMonth: "下个月",
208
- last90Days: "最近90天",
209
- lastQuarter: "上个季度",
210
- thisQuarter: "这个季度",
211
- nextQuarter: "下个季度",
212
- lastYear: "去年",
213
- thisYear: "今年",
214
- yearToDate: "年初至今",
215
- nextYear: "明年",
216
- last6Months: "最近6个月",
217
- last12Months: "最近12个月",
218
- last24Months: "最近24个月",
219
- // Filter Conditions
220
- andCondition: "和",
221
- orCondition: "或",
222
- // Filter Buttons
223
- applyFilter: "应用",
224
- applyColumnToolPanel: "应用",
225
- resetFilter: "重置",
226
- clearFilter: "清除",
227
- cancelFilter: "取消",
228
- cancelColumnToolPanel: "取消",
229
- // Filter Titles
230
- textFilter: "文本过滤器",
231
- numberFilter: "数字过滤器",
232
- dateFilter: "日期过滤器",
233
- setFilter: "集合过滤器",
234
- // Group Column Filter
235
- groupFilterSelect: "选择字段:",
236
- // New Filter Tool Panel
237
- filterSummaryInactive: "是(全部)",
238
- filterSummaryContains: "包含",
239
- filterSummaryNotContains: "不包含",
240
- filterSummaryTextEquals: "等于",
241
- filterSummaryTextNotEqual: "不等于",
242
- filterSummaryStartsWith: "开始于",
243
- filterSummaryEndsWith: "结束于",
244
- filterSummaryBlank: "为空",
245
- filterSummaryNotBlank: "不为空",
246
- filterSummaryEquals: "=",
247
- filterSummaryNotEqual: "!=",
248
- filterSummaryGreaterThan: ">",
249
- filterSummaryGreaterThanOrEqual: ">=",
250
- filterSummaryLessThan: "<",
251
- filterSummaryLessThanOrEqual: "<=",
252
- filterSummaryInRange: "介于",
253
- filterSummaryInRangeValues: "(${variable}, ${variable})",
254
- filterSummaryTextQuote: ' "${variable}"',
255
- filterSummaryListInactive: "是(全部)",
256
- filterSummaryListSeparator: ", ",
257
- filterSummaryListShort: "是(${variable})",
258
- filterSummaryListLong: "是(${variable})和${variable}更多",
259
- addFilterCard: "添加过滤器",
260
- agTextColumnFilterDisplayName: "简单过滤器",
261
- agNumberColumnFilterDisplayName: "简单过滤器",
262
- agDateColumnFilterDisplayName: "简单过滤器",
263
- agSetColumnFilterDisplayName: "选择过滤器",
264
- agMultiColumnFilterDisplayName: "组合过滤器",
265
- addFilterPlaceholder: "搜索列...",
266
- // Advanced Filter
267
- advancedFilterContains: "包含",
268
- advancedFilterNotContains: "不包含",
269
- advancedFilterTextEquals: "等于",
270
- advancedFilterTextNotEqual: "不等于",
271
- advancedFilterStartsWith: "开始于",
272
- advancedFilterEndsWith: "结束于",
273
- advancedFilterBlank: "为空",
274
- advancedFilterNotBlank: "不为空",
275
- advancedFilterEquals: "=",
276
- advancedFilterNotEqual: "!=",
277
- advancedFilterGreaterThan: ">",
278
- advancedFilterGreaterThanOrEqual: ">=",
279
- advancedFilterLessThan: "<",
280
- advancedFilterLessThanOrEqual: "<=",
281
- advancedFilterTrue: "为真",
282
- advancedFilterFalse: "为假",
283
- advancedFilterAnd: "且",
284
- advancedFilterOr: "或",
285
- advancedFilterApply: "应用",
286
- advancedFilterReset: "重置",
287
- advancedFilterCancel: "取消",
288
- advancedFilterClear: "清除",
289
- advancedFilterBuilder: "构建器",
290
- advancedFilterValidationMissingColumn: "缺少列",
291
- advancedFilterValidationMissingOption: "缺少选项",
292
- advancedFilterValidationMissingValue: "缺少值",
293
- advancedFilterValidationInvalidColumn: "找不到列",
294
- advancedFilterValidationInvalidOption: "找不到选项",
295
- advancedFilterValidationMissingQuote: "值缺少结束引号",
296
- advancedFilterValidationNotANumber: "值不是一个数字",
297
- advancedFilterValidationInvalidDate: "值不是一个有效日期",
298
- advancedFilterValidationMissingCondition: "缺少条件",
299
- advancedFilterValidationJoinOperatorMismatch: "一个条件内的连接操作符必须相同",
300
- advancedFilterValidationInvalidJoinOperator: "找不到连接操作符",
301
- advancedFilterValidationMissingEndBracket: "缺少结束括号",
302
- advancedFilterValidationExtraEndBracket: "结束括号过多",
303
- advancedFilterValidationMessage: "表达式有错误。${variable} - ${variable}。",
304
- advancedFilterValidationMessageAtEnd: "表达式有错误。表达式末尾的${variable}。",
305
- advancedFilterBuilderTitle: "高级筛选",
306
- advancedFilterBuilderApply: "应用",
307
- advancedFilterBuilderClear: "清除",
308
- advancedFilterBuilderReset: "重置",
309
- advancedFilterBuilderCancel: "取消",
310
- advancedFilterBuilderAddButtonTooltip: "添加筛选或组",
311
- advancedFilterBuilderRemoveButtonTooltip: "移除",
312
- advancedFilterBuilderMoveUpButtonTooltip: "上移",
313
- advancedFilterBuilderMoveDownButtonTooltip: "下移",
314
- advancedFilterBuilderAddJoin: "添加组",
315
- advancedFilterBuilderAddCondition: "添加筛选",
316
- advancedFilterBuilderSelectColumn: "选择一个列",
317
- advancedFilterBuilderSelectOption: "选择一个选项",
318
- advancedFilterBuilderEnterValue: "输入一个值...",
319
- advancedFilterBuilderValidationAlreadyApplied: "当前筛选已应用。",
320
- advancedFilterBuilderValidationIncomplete: "并非所有条件都已完成。",
321
- advancedFilterBuilderValidationSelectColumn: "必须选择一个列。",
322
- advancedFilterBuilderValidationSelectOption: "必须选择一个选项。",
323
- advancedFilterBuilderValidationEnterValue: "必须输入一个值。",
324
- // Editor Validation Errors
325
- minDateValidation: "日期必须在 ${variable} 之后",
326
- maxDateValidation: "日期必须在 ${variable} 之前",
327
- maxLengthValidation: "必须少于或等于 ${variable} 个字符",
328
- minValueValidation: "必须大于或等于 ${variable}",
329
- maxValueValidation: "必须小于或等于${variable}",
330
- strictMinValueValidation: "必须大于${variable}",
331
- strictMaxValueValidation: "必须小于${variable}",
332
- invalidSelectionValidation: "无效的选择",
333
- // Formulas
334
- invalidFormulaValidation: "无效公式。",
335
- formulaParseInvalidCellReference: "无效的单元格引用:${variable}。",
336
- formulaParseInvalidRangeEndReference: "无效的范围结束引用。",
337
- formulaParseUnterminatedString: "未终止的字符串。",
338
- formulaParseUnexpectedCharacter: "意外字符:${variable}。",
339
- formulaParseOperatorStackUnderflow: "运算符栈下溢。",
340
- formulaParseMissingOperand: "缺少 '${variable}' 的操作数。",
341
- formulaParseInternalUnexpectedFrameDuringReduction: "内部错误:归约期间出现意外帧。",
342
- formulaParseInternalUnexpectedFrameBeforeOpenParen: "内部错误:'(' 前出现意外帧。",
343
- formulaParseMisplacedComma: "逗号位置错误。",
344
- formulaParseCommaOutsideFunctionCall: "函数调用外出现逗号。",
345
- formulaParseInternalUnexpectedFrameBeforeCloseParen: "内部错误:')' 前出现意外帧。",
346
- formulaParseMismatchedParentheses: "括号不匹配。",
347
- formulaParseUnsupportedOperand: "不支持的操作数:${variable}。",
348
- formulaParseMismatchedParenthesesOrUnfinishedFunctionCall: "括号不匹配或函数调用未完成。",
349
- formulaParseInvalidExpression: "无效表达式。",
350
- formulaParseFormulasMustBeginWithEquals: "公式必须以 = 开头。",
351
- formulaSerializeStringContainsQuote: '字符串包含引号 ("),分词器不支持。',
352
- formulaSerializeCannotProduceAbsoluteColumnLabelFromId: "无法从 ID '${variable}' 生成绝对列标签。",
353
- formulaSerializeCannotProduceAbsoluteRowIndexFromId: "无法从 ID '${variable}' 生成绝对行索引。",
354
- formulaSerializeCannotProduceRowIndexFromId: "无法从 ID '${variable}' 生成行索引。",
355
- formulaSerializeCannotMapColumnIdToA1Label: "无法将列 ID '${variable}' 映射为 A1 标签。",
356
- formulaSerializeCannotParseAbsoluteRowIndex: "无法解析绝对行索引 '${variable}'。",
357
- formulaSerializeCannotMapRowIdToA1Index: "无法将行 ID '${variable}' 映射为 A1 索引。",
358
- formulaEvalRangeNotAllowedInScalarContext: "标量上下文中不允许范围。",
359
- formulaEvalUnknownReferenceToCell: "未知的单元格引用。",
360
- formulaEvalUnsupportedOperation: "不支持的操作:${variable}。",
361
- formulaEvalInvalidAbsoluteRow: "无效的绝对行。",
362
- formulaEvalUnrecognisedRowId: "无法识别的行 ID。",
363
- formulaEvalInvalidAbsoluteColumn: "无效的绝对列。",
364
- formulaEvalUnrecognisedColumnId: "无法识别的列 ID。",
365
- formulaEvalUnrecognisedRowInRange: "范围中存在无法识别的行。",
366
- formulaEvalUnrecognisedReferenceToCell: "无法识别的单元格引用。",
367
- formulaEvalIncompleteRangeReference: "不完整的范围引用。",
368
- formulaFunctionExpectedExactlyArguments: "${variable}: 需要恰好 ${variable} 个参数。",
369
- formulaFunctionExpectedAtMostArguments: "${variable}: 最多需要 ${variable} 个参数。",
370
- formulaFunctionExpectedAtLeastArguments: "${variable}: 至少需要 ${variable} 个参数。",
371
- formulaFunctionInvalidCriteriaWildcardsWithComparator: "无效条件:比较运算符不能与通配符同时使用。",
372
- formulaFunctionNonNumericArgument: "${variable}: 参数必须为数值。",
373
- formulaFunctionDivisionByZero: "${variable}: 除数不能为 0。",
374
- formulaFunctionCannotCombineDatesWithBigInt: "${variable}: 不能将日期与 BigInt 混合。",
375
- formulaFunctionRequiresAtLeastOneNumericValue: "${variable}: 至少需要一个数值。",
376
- formulaFunctionRequiresAtLeastOneValue: "${variable}: 至少需要一个值。",
377
- formulaFunctionAllValuesMustBeNumbers: "${variable}: 所有值都必须是数字。",
378
- formulaFunctionArgumentMustBeRange: "${variable}: 第 ${variable} 个参数必须是范围。",
379
- formulaFunctionArgumentMustBeValue: "${variable}: 第 ${variable} 个参数必须是值。",
380
- formulaFunctionRangesHaveDifferentSizes: "${variable}: 范围大小不一致。",
381
- formulaFunctionValuesMustBeNumeric: "${variable}: 值必须为数值。",
382
- formulaFunctionValuesMustBeIntegers: "${variable}: 值必须为整数。",
383
- formulaFunctionUnsupportedValueType: "${variable}: 不支持的值类型。",
384
- formulaFunctionDivNonNumericArgument: "DIV:参数必须为数值。",
385
- formulaFunctionDivDivisionByZero: "DIV:除数不能为 0。",
386
- formulaFunctionSumCannotCombineDatesWithBigInt: "SUM:不能将日期与 BigInt 混合。",
387
- formulaFunctionSumRequiresAtLeastOneNumericValue: "SUM:至少需要一个数值。",
388
- formulaFunctionAvgRequiresAtLeastOneValue: "AVG:至少需要一个值。",
389
- formulaFunctionMedianAllValuesMustBeNumbers: "MEDIAN:所有值都必须是数字。",
390
- formulaFunctionMedianRequiresAtLeastOneValue: "MEDIAN:至少需要一个值。",
391
- formulaFunctionSumifFirstArgumentMustBeRange: "SUMIF:第一个参数必须是范围。",
392
- formulaFunctionSumifSecondArgumentMustBeValue: "SUMIF:第二个参数必须是值(criteria)。",
393
- formulaFunctionSumifThirdArgumentMustBeRange: "SUMIF:第三个参数必须是范围(sum_range)。",
394
- formulaFunctionSumifRangesHaveDifferentSizes: "SUMIF:范围大小不一致。",
395
- formulaFunctionCountifFirstArgumentMustBeRange: "COUNTIF:第一个参数必须是范围。",
396
- formulaFunctionCountifSecondArgumentMustBeValue: "COUNTIF:第二个参数必须是值(criteria)。",
397
- formulaFunctionConcatUnsupportedValueType: "CONCAT:不支持的值类型。",
398
- formulaFunctionMinRequiresAtLeastOneValue: "MIN:至少需要一个值。",
399
- formulaFunctionMaxRequiresAtLeastOneValue: "MAX:至少需要一个值。",
400
- formulaFunctionPercentNonNumericArgument: "PERCENT:参数必须为数值。",
401
- formulaFunctionPowerNonNumericArgument: "POWER:参数必须为数值。",
402
- formulaServiceCircularReference: "循环引用。",
403
- formulaServiceExpectedParsableFormula: "期望可解析的公式。",
404
- formulaServiceInternalSchedulingError: "内部调度错误。",
405
- tooltipValidationErrorSeparator: "。",
406
- // Side Bar
407
- columns: "列",
408
- filters: "过滤器",
409
- // columns tool panel
410
- pivotMode: "透视模式",
411
- groups: "行组",
412
- rowGroupColumnsEmptyMessage: "拖动到此处设置行组",
413
- values: "值",
414
- valueColumnsEmptyMessage: "拖动到此处聚合",
415
- pivots: "列标签",
416
- pivotColumnsEmptyMessage: "拖动到此处设置列标签",
417
- // Header of the Default Group Column
418
- group: "组",
419
- // Row Drag
420
- rowDragRow: "行",
421
- rowDragRows: "行",
422
- // Other
423
- loadingOoo: "加载中...",
424
- loadingError: "错误",
425
- noRowsToShow: "无显示行",
426
- noMatchingRows: "无匹配行",
427
- exportingOoo: "正在导出...",
428
- fileInputOverlay: "拖放文件以导入数据",
429
- fileInputOverlayBrowse: "浏览文件",
430
- fileInputProcessing: "正在处理 ${variable}",
431
- fileInputProcessingFailed: "处理 ${variable} 时出错",
432
- enabled: "启用",
433
- // Menu
434
- pinColumn: "固定列",
435
- pinLeft: "固定在左侧",
436
- pinRight: "固定在右侧",
437
- noPin: "取消固定",
438
- pinRow: "锁定行",
439
- pinTop: "固定到顶部",
440
- pinBottom: "固定到底部",
441
- unpinRow: "取消锁定行",
442
- valueAggregation: "值汇总",
443
- noAggregation: "无",
444
- showValuesAs: "值显示方式",
445
- showValuesAsNone: "无",
446
- percentOfGrandTotal: "占总计的百分比",
447
- percentOfColumnTotal: "占列总计的百分比",
448
- percentOfRowTotal: "占行总计的百分比",
449
- percentOfParentRowTotal: "占父行总计的百分比",
450
- percentOfParentColumnTotal: "占父列总计的百分比",
451
- percentOfGrandTotalDescription: "每个值占该列总计的百分比。",
452
- percentOfColumnTotalDescription: "每个值占其列总计的百分比——每列合计为 100%。",
453
- percentOfRowTotalDescription: "每个值占透视列中该行总计的百分比。",
454
- percentOfParentRowTotalDescription: "每个值占其父分组的百分比。",
455
- percentOfParentColumnTotalDescription: "每个值占其父透视列的百分比。",
456
- autosizeThisColumn: "自动调整该列",
457
- autosizeAllColumns: "自动调整所有列",
458
- groupBy: "按${variable}分组",
459
- ungroupBy: "取消按${variable}分组",
460
- ungroupAll: "取消全部分组",
461
- addToValues: "将${variable}添加到值",
462
- removeFromValues: "将${variable}从值中移除",
463
- addToLabels: "将${variable}添加到标签",
464
- removeFromLabels: "将${variable}从标签中移除",
465
- resetColumns: "重置列",
466
- expandAll: "展开所有行组",
467
- collapseAll: "关闭所有行组",
468
- copy: "复制",
469
- ctrlC: "Ctrl+C",
470
- ctrlX: "Ctrl+X",
471
- copyWithHeaders: "复制包含标题",
472
- copyWithGroupHeaders: "复制包含组标题",
473
- cut: "剪切",
474
- paste: "粘贴",
475
- ctrlV: "Ctrl+V",
476
- export: "导出",
477
- csvExport: "导出为CSV",
478
- excelExport: "导出为Excel",
479
- columnFilter: "列过滤",
480
- columnChooser: "选择列",
481
- chooseColumns: "选择列",
482
- sortAscending: "升序排列",
483
- sortDescending: "降序排列",
484
- sortAbsoluteAscending: "绝对升序排序",
485
- sortAbsoluteDescending: "绝对降序排序",
486
- sortUnSort: "清除排序",
487
- shiftF2: "Shift+F2",
488
- toolbarFind: "查找",
489
- toolbarFindPreviousMatch: "上一个匹配",
490
- toolbarFindNextMatch: "下一个匹配",
491
- toolbarQuickFilter: "筛选",
492
- toolbarMenu: "菜单",
493
- // Enterprise Menu Aggregation and Status Bar
494
- sum: "总和",
495
- first: "第一个",
496
- last: "最后一个",
497
- min: "最小值",
498
- max: "最大值",
499
- none: "无",
500
- count: "计数",
501
- avg: "平均",
502
- filteredRows: "已筛选",
503
- selectedRows: "已选中",
504
- totalRows: "总行数",
505
- totalAndFilteredRows: "行",
506
- more: "更多",
507
- to: "至",
508
- of: "的",
509
- page: "页",
510
- pageLastRowUnknown: "?",
511
- nextPage: "下一页",
512
- lastPage: "最后一页",
513
- firstPage: "第一页",
514
- previousPage: "上一页",
515
- pageSizeSelectorLabel: "每页大小:",
516
- footerTotal: "合计",
517
- statusBarLastRowUnknown: "?",
518
- scrollColumnIntoView: "滚动${variable}到视图内",
519
- // Pivoting
520
- pivotColumnGroupTotals: "总计",
521
- // Enterprise Menu (Charts)
522
- pivotChartAndPivotMode: "数据透视图和数据透视模式",
523
- pivotChart: "数据透视图",
524
- chartRange: "图表范围",
525
- columnChart: "柱状图",
526
- groupedColumn: "分组",
527
- stackedColumn: "堆积",
528
- normalizedColumn: "100% 堆积",
529
- barChart: "条形图",
530
- groupedBar: "分组",
531
- stackedBar: "堆积",
532
- normalizedBar: "100% 堆积",
533
- pieChart: "饼图",
534
- pie: "饼图",
535
- donut: "环形图",
536
- lineChart: "折线图",
537
- stackedLine: "堆叠",
538
- normalizedLine: "100% 堆叠",
539
- xyChart: "X Y (散点图)",
540
- scatter: "散点图",
541
- bubble: "气泡图",
542
- areaChart: "面积图",
543
- area: "面积",
544
- stackedArea: "堆积",
545
- normalizedArea: "100% 堆积",
546
- histogramChart: "直方图",
547
- polarChart: "极地图",
548
- radarLine: "雷达线",
549
- radarArea: "雷达面积",
550
- nightingale: "夜莺图",
551
- radialColumn: "径向柱状图",
552
- radialBar: "径向条形图",
553
- statisticalChart: "统计图",
554
- boxPlot: "箱线图",
555
- rangeBar: "区间条形图",
556
- rangeArea: "区间面积图",
557
- hierarchicalChart: "层次图",
558
- treemap: "树图",
559
- sunburst: "旭日图",
560
- specializedChart: "专项图",
561
- waterfall: "瀑布图",
562
- heatmap: "热力图",
563
- combinationChart: "组合图",
564
- columnLineCombo: "柱状图和折线图组合",
565
- AreaColumnCombo: "面积图和柱状图组合",
566
- // Charts
567
- pivotChartTitle: "数据透视图",
568
- rangeChartTitle: "范围图",
569
- settings: "图表",
570
- data: "设置",
571
- format: "自定义",
572
- categories: "类别",
573
- defaultCategory: "(无)",
574
- series: "系列",
575
- switchCategorySeries: "切换类别 / 系列",
576
- categoryValues: "类别值",
577
- seriesLabels: "系列标签",
578
- aggregate: "汇总",
579
- xyValues: "XY 值",
580
- paired: "配对模式",
581
- axis: "轴",
582
- xAxis: "水平轴",
583
- yAxis: "垂直轴",
584
- polarAxis: "极坐标轴",
585
- radiusAxis: "半径轴",
586
- navigator: "导航器",
587
- zoom: "缩放",
588
- animation: "动画",
589
- crosshair: "准星",
590
- color: "颜色",
591
- thickness: "厚度",
592
- preferredLength: "首选长度",
593
- xType: "X 类型",
594
- axisType: "轴类型",
595
- automatic: "自动",
596
- category: "类别",
597
- number: "数值",
598
- time: "时间",
599
- timeFormat: "时间格式",
600
- autoRotate: "自动旋转",
601
- labelRotation: "旋转",
602
- circle: "圆形",
603
- polygon: "多边形",
604
- square: "方形",
605
- cross: "十字符",
606
- diamond: "菱形",
607
- plus: "加号",
608
- triangle: "三角形",
609
- heart: "爱心",
610
- orientation: "方向",
611
- fixed: "固定",
612
- parallel: "平行",
613
- perpendicular: "垂直",
614
- radiusAxisPosition: "位置",
615
- ticks: "刻度",
616
- gridLines: "网格线",
617
- width: "宽度",
618
- height: "高度",
619
- length: "长度",
620
- padding: "内边距",
621
- spacing: "间距",
622
- chartStyle: "图表样式",
623
- title: "标题",
624
- chartTitles: "标题",
625
- chartTitle: "图表标题",
626
- chartSubtitle: "副标题",
627
- horizontalAxisTitle: "水平轴标题",
628
- verticalAxisTitle: "垂直轴标题",
629
- polarAxisTitle: "极坐标轴标题",
630
- titlePlaceholder: "图表标题",
631
- background: "背景",
632
- font: "字体",
633
- weight: "粗细",
634
- top: "顶部",
635
- right: "右边",
636
- bottom: "底部",
637
- left: "左边",
638
- labels: "标签",
639
- calloutLabels: "标注标签",
640
- sectorLabels: "扇区标签",
641
- positionRatio: "位置比例",
642
- size: "大小",
643
- shape: "形状",
644
- minSize: "最小大小",
645
- maxSize: "最大大小",
646
- legend: "图例",
647
- position: "位置",
648
- markerSize: "标记大小",
649
- markerStroke: "标记描边",
650
- markerPadding: "标记内边距",
651
- itemSpacing: "项目间距",
652
- itemPaddingX: "项目内边距 X",
653
- itemPaddingY: "项目内边距 Y",
654
- layoutHorizontalSpacing: "横向间距",
655
- layoutVerticalSpacing: "纵向间距",
656
- strokeWidth: "描边宽度",
657
- offset: "偏移",
658
- offsets: "偏移",
659
- tooltips: "工具提示",
660
- callout: "标注",
661
- markers: "标记",
662
- shadow: "阴影",
663
- blur: "模糊",
664
- xOffset: "X 偏移",
665
- yOffset: "Y 偏移",
666
- lineWidth: "线宽",
667
- lineDash: "线条虚线",
668
- lineDashOffset: "虚线偏移",
669
- scrollingZoom: "滚动",
670
- scrollingStep: "滚动步骤",
671
- selectingZoom: "选择",
672
- durationMillis: "持续时间 (毫秒)",
673
- crosshairLabel: "标签",
674
- crosshairSnap: "对节点对齐",
675
- normal: "常规",
676
- bold: "加粗",
677
- italic: "斜体",
678
- boldItalic: "加粗斜体",
679
- predefined: "预定义",
680
- fillOpacity: "填充不透明度",
681
- strokeColor: "线条颜色",
682
- strokeOpacity: "线条不透明度",
683
- miniChart: "迷你图表",
684
- histogramBinCount: "箱数",
685
- connectorLine: "连接线",
686
- seriesItems: "系列项目",
687
- seriesItemType: "项目类型",
688
- seriesItemPositive: "正面",
689
- seriesItemNegative: "负面",
690
- seriesItemLabels: "项目标签",
691
- columnGroup: "柱形图",
692
- barGroup: "条形图",
693
- pieGroup: "饼图",
694
- lineGroup: "折线图",
695
- scatterGroup: "散点图",
696
- areaGroup: "面积图",
697
- polarGroup: "极坐标图",
698
- statisticalGroup: "统计图",
699
- hierarchicalGroup: "层次图",
700
- specializedGroup: "专用图",
701
- combinationGroup: "组合图",
702
- groupedColumnTooltip: "分组",
703
- stackedColumnTooltip: "堆积",
704
- normalizedColumnTooltip: "100% 堆积",
705
- groupedBarTooltip: "分组",
706
- stackedBarTooltip: "堆积",
707
- normalizedBarTooltip: "100% 堆积",
708
- pieTooltip: "饼图",
709
- donutTooltip: "环形图",
710
- lineTooltip: "折线图",
711
- stackedLineTooltip: "堆叠",
712
- normalizedLineTooltip: "百分比堆叠",
713
- groupedAreaTooltip: "面积图",
714
- stackedAreaTooltip: "堆积",
715
- normalizedAreaTooltip: "100% 堆积",
716
- scatterTooltip: "散点图",
717
- bubbleTooltip: "气泡图",
718
- histogramTooltip: "直方图",
719
- radialColumnTooltip: "径向柱图",
720
- radialBarTooltip: "径向条图",
721
- radarLineTooltip: "雷达线图",
722
- radarAreaTooltip: "雷达面积图",
723
- nightingaleTooltip: "玫瑰图",
724
- rangeBarTooltip: "范围条图",
725
- rangeAreaTooltip: "范围面积图",
726
- boxPlotTooltip: "箱线图",
727
- treemapTooltip: "树状图",
728
- sunburstTooltip: "旭日图",
729
- waterfallTooltip: "瀑布图",
730
- heatmapTooltip: "热力图",
731
- columnLineComboTooltip: "柱图与折线图",
732
- areaColumnComboTooltip: "面积图与柱图",
733
- customComboTooltip: "自定义组合",
734
- innerRadius: "内半径",
735
- startAngle: "起始角度",
736
- endAngle: "终止角度",
737
- reverseDirection: "反向",
738
- groupPadding: "组间距",
739
- seriesPadding: "系列间距",
740
- tile: "瓦片",
741
- whisker: "须",
742
- cap: "顶部",
743
- capLengthRatio: "顶部长度比",
744
- labelPlacement: "标签位置",
745
- inside: "内部",
746
- outside: "外部",
747
- noDataToChart: "无可绘制的数据。",
748
- pivotChartRequiresPivotMode: "数据透视图需要启用数据透视模式。",
749
- chartSettingsToolbarTooltip: "菜单",
750
- chartLinkToolbarTooltip: "链接到网格",
751
- chartUnlinkToolbarTooltip: "从网格中取消链接",
752
- chartDownloadToolbarTooltip: "下载图表",
753
- chartMenuToolbarTooltip: "菜单",
754
- chartEdit: "编辑图表",
755
- chartAdvancedSettings: "高级设置",
756
- chartLink: "链接到网格",
757
- chartUnlink: "从网格中取消链接",
758
- chartDownload: "下载图表",
759
- histogramFrequency: "频率",
760
- seriesChartType: "系列图表类型",
761
- seriesType: "系列类型",
762
- secondaryAxis: "次轴",
763
- seriesAdd: "添加系列",
764
- categoryAdd: "添加类别",
765
- bar: "条形图",
766
- column: "柱形图",
767
- histogram: "直方图",
768
- advancedSettings: "高级设置",
769
- direction: "方向",
770
- horizontal: "水平",
771
- vertical: "垂直",
772
- seriesGroupType: "分组类型",
773
- groupedSeriesGroupType: "分组",
774
- stackedSeriesGroupType: "堆积",
775
- normalizedSeriesGroupType: "100% 堆积",
776
- legendEnabled: "启用",
777
- invalidColor: "无效的颜色值",
778
- groupedColumnFull: "分组柱形图",
779
- stackedColumnFull: "堆积柱形图",
780
- normalizedColumnFull: "100% 堆积柱形图",
781
- groupedBarFull: "分组条形图",
782
- stackedBarFull: "堆积条形图",
783
- normalizedBarFull: "100% 堆积条形图",
784
- stackedAreaFull: "堆积面积图",
785
- normalizedAreaFull: "100% 堆积面积图",
786
- customCombo: "自定义组合",
787
- funnel: "漏斗",
788
- coneFunnel: "圆锥漏斗",
789
- pyramid: "金字塔",
790
- funnelGroup: "漏斗",
791
- funnelTooltip: "漏斗",
792
- coneFunnelTooltip: "圆锥漏斗",
793
- pyramidTooltip: "金字塔",
794
- dropOff: "流失",
795
- stageLabels: "阶段标签",
796
- reverse: "反向",
797
- tooltipMode: "工具提示模式",
798
- tooltipModeSingle: "单个",
799
- tooltipModeShared: "多个",
800
- tooltipModeCompact: "紧凑",
801
- // ARIA
802
- ariaAdvancedFilterBuilderItem: "${variable}. 级别 ${variable}. 按 ENTER 进行编辑。",
803
- ariaAdvancedFilterBuilderItemValidation: "${variable}. 级别 ${variable}. ${variable} 按 ENTER 进行编辑。",
804
- ariaAdvancedFilterBuilderList: "高级过滤器构建器列表",
805
- ariaAdvancedFilterBuilderFilterItem: "过滤条件",
806
- ariaAdvancedFilterBuilderGroupItem: "过滤组",
807
- ariaAdvancedFilterBuilderColumn: "列",
808
- ariaAdvancedFilterBuilderOption: "选项",
809
- ariaAdvancedFilterBuilderValueP: "值",
810
- ariaAdvancedFilterBuilderJoinOperator: "连接运算符",
811
- ariaAdvancedFilterInput: "高级过滤器输入",
812
- ariaChecked: "已选中",
813
- ariaColumn: "列",
814
- ariaColumnGroup: "列组",
815
- ariaFilterActive: "筛选已激活",
816
- ariaColumnFiltered: "列已过滤",
817
- ariaCalculatedColumn: "计算列",
818
- ariaColumnShowValuesAs: "正在以此方式显示值",
819
- ariaColumnSelectAll: "切换所有列的可见性",
820
- ariaDateFilterInput: "日期过滤器输入",
821
- ariaDefaultListName: "列表",
822
- ariaFilterColumnsInput: "过滤列输入",
823
- ariaFilterFromValue: "过滤从值",
824
- ariaFilterInput: "过滤器输入",
825
- ariaFilterList: "过滤器列表",
826
- ariaFilterToValue: "过滤至值",
827
- ariaFilterValue: "过滤值",
828
- ariaFilterMenuOpen: "打开过滤器菜单",
829
- ariaFilteringOperator: "过滤运算符",
830
- ariaHidden: "隐藏",
831
- ariaIndeterminate: "不确定",
832
- ariaInputEditor: "输入编辑器",
833
- ariaMenuColumn: "按 ALT 向下 打开列菜单",
834
- ariaFilterColumn: "按 CTRL ENTER 打开过滤器",
835
- ariaRowDeselect: "按 SPACE 取消选择此行",
836
- ariaHeaderSelection: "具有标题选择的列",
837
- ariaSelectAllCells: "按空格键或回车键选择所有单元格",
838
- ariaSelectAllRowCells: "按 Enter 键选择此行中的所有单元格",
839
- ariaColumnCellSelection: "按 Enter 键切换此列中所有可见单元格的选择",
840
- ariaColumnGroupCellSelection: "按 Enter 键切换此列组中所有可见单元格的选择",
841
- ariaColumnGroupExpansion: "按 ENTER 键展开或折叠此列组",
842
- ariaColumnGroupCellSelectionAndExpansion: "按 Enter 键切换此列组中所有可见单元格的选择. 按 ALT ENTER 键展开或折叠此列组",
843
- ariaRowSelectAll: "按 Space 切换所有行选择",
844
- ariaRowToggleSelection: "按 Space 切换行选择",
845
- ariaRowSelect: "按 SPACE 选择此行",
846
- ariaRowSelectionDisabled: "此行的行选择功能被禁用",
847
- ariaSearch: "搜索",
848
- ariaSortableColumn: "按 ENTER 排序",
849
- ariaSortableColumnWithCellSelection: "按 ALT ENTER 排序",
850
- ariaToggleVisibility: "按 Space 切换可见性",
851
- ariaToggleCellValue: "按 Space 切换单元格值",
852
- ariaUnchecked: "未选中",
853
- ariaVisible: "可见",
854
- ariaSearchFilterValues: "搜索过滤值",
855
- ariaPageSizeSelectorLabel: "页面大小",
856
- ariaChartMenuClose: "关闭图表编辑菜单",
857
- ariaChartSelected: "已选择",
858
- ariaSparklineChartDescription: "迷你图 - ${chartType} 显示 ${count} 个值,范围在 ${min} 到 ${max} 之间。起始于 ${start},结束于 ${end}。",
859
- ariaSparklineChartDescriptionSingleValue: "迷你图 - ${chartType} 显示 1 个值:${value}。",
860
- ariaSparklineChartDescriptionEmpty: "迷你图 - ${chartType},无值。",
861
- ariaSkeletonCellLoadingFailed: "行加载失败",
862
- ariaSkeletonCellLoading: "行数据加载中",
863
- ariaDeferSkeletonCellLoading: "单元格正在加载",
864
- // ARIA for Batch Edit
865
- ariaPendingChange: "待处理的变更",
866
- // ARIA Labels for Drop Zones
867
- ariaRowGroupDropZonePanelLabel: "行分组",
868
- ariaValuesDropZonePanelLabel: "值",
869
- ariaPivotDropZonePanelLabel: "列标签",
870
- ariaDropZoneColumnComponentDescription: "按 DELETE 键移除",
871
- ariaDropZoneColumnValueItemDescription: "按 ENTER 键更改聚合类型",
872
- ariaDropZoneColumnGroupItemDescription: "按 ENTER 键排序",
873
- // used for aggregate drop zone, format: {aggregation}{ariaDropZoneColumnComponentAggFuncSeparator}{column name}
874
- ariaDropZoneColumnComponentAggFuncSeparator: " 的 ",
875
- ariaDropZoneColumnComponentSortAscending: "升序",
876
- ariaDropZoneColumnComponentSortDescending: "降序",
877
- ariaDropZoneColumnComponentSortAbsoluteAscending: "绝对升序",
878
- ariaDropZoneColumnComponentSortAbsoluteDescending: "绝对降序",
879
- ariaLabelDialog: "对话框",
880
- ariaLabelColumnMenu: "列菜单",
881
- ariaLabelColumnFilter: "列过滤器",
882
- ariaLabelSelectField: "选择字段",
883
- // Cell Editor
884
- ariaValidationErrorPrefix: "单元格编辑器验证",
885
- ariaLabelLoadingContextMenu: "正在加载上下文菜单",
886
- // aria labels for rich select
887
- ariaLabelRichSelectField: "丰富选择字段",
888
- ariaLabelRichSelectToggleSelection: "按下空格键以切换选择",
889
- ariaLabelRichSelectDeselectAllItems: "按下删除键来取消选择所有项目",
890
- ariaLabelRichSelectDeleteSelection: "按下删除键来取消选择项目",
891
- ariaLabelTooltip: "工具提示",
892
- ariaLabelContextMenu: "上下文菜单",
893
- ariaLabelSubMenu: "子菜单",
894
- ariaLabelAggregationFunction: "聚合函数",
895
- ariaLabelAdvancedFilterAutocomplete: "高级筛选自动完成",
896
- ariaLabelAdvancedFilterBuilderAddField: "高级筛选生成器添加字段",
897
- ariaLabelAdvancedFilterBuilderColumnSelectField: "高级筛选生成器列选择字段",
898
- ariaLabelAdvancedFilterBuilderOptionSelectField: "高级筛选生成器选项选择字段",
899
- ariaLabelAdvancedFilterBuilderJoinSelectField: "高级筛选生成器连接操作符选择字段",
900
- // ARIA Labels for the Side Bar
901
- ariaColumnPanelList: "列列表",
902
- ariaFilterPanelList: "过滤列表",
903
- // ARIA labels for new Filters Tool Panel
904
- ariaLabelAddFilterField: "添加过滤字段",
905
- ariaLabelFilterCardDelete: "删除过滤器",
906
- ariaLabelFilterCardHasEdits: "有编辑",
907
- ariaHasNote: "此单元格有备注。",
908
- // Number Format (Status Bar, Pagination Panel)
909
- thousandSeparator: ",",
910
- decimalSeparator: ".",
911
- // Data types
912
- dataTypeText: "文本",
913
- dataTypeNumber: "数字",
914
- dataTypeBigInt: "BigInt",
915
- dataTypeBoolean: "布尔值",
916
- dataTypeDate: "日期",
917
- dataTypeDateString: "日期字符串",
918
- dataTypeDateTime: "日期时间",
919
- dataTypeDateTimeString: "日期时间字符串",
920
- dataTypeObject: "对象",
921
- true: "真",
922
- false: "假",
923
- invalidDate: "无效日期",
924
- invalidNumber: "无效数字",
925
- invalidBigInt: "无效BigInt",
926
- january: "一月",
927
- february: "二月",
928
- march: "三月",
929
- april: "四月",
930
- may: "五月",
931
- june: "六月",
932
- july: "七月",
933
- august: "八月",
934
- september: "九月",
935
- october: "十月",
936
- november: "十一月",
937
- december: "十二月",
938
- // Date-time parts
939
- year: "年",
940
- quarter: "季度",
941
- month: "月",
942
- day: "日",
943
- hour: "小时",
944
- minute: "分钟",
945
- second: "秒",
946
- // Time formats
947
- timeFormatSlashesDDMMYYYY: "DD/MM/YYYY",
948
- timeFormatSlashesMMDDYYYY: "MM/DD/YYYY",
949
- timeFormatSlashesDDMMYY: "DD/MM/YY",
950
- timeFormatSlashesMMDDYY: "MM/DD/YY",
951
- timeFormatDotsDDMYY: "DD.M.YY",
952
- timeFormatDotsMDDYY: "M.DD.YY",
953
- timeFormatDashesYYYYMMDD: "YYYY-MM-DD",
954
- timeFormatSpacesDDMMMMYYYY: "DD MMMM YYYY",
955
- timeFormatHHMMSS: "HH:MM:SS",
956
- timeFormatHHMMSSAmPm: "HH:MM:SS 上午/下午",
957
- // Calculated Columns
958
- calculatedColumn: "计算列",
959
- calculatedColumnAdd: "添加计算列",
960
- calculatedColumnEdit: "编辑计算列",
961
- calculatedColumnRemove: "删除计算列",
962
- calculatedColumnTitle: "标题",
963
- calculatedColumnType: "类型",
964
- calculatedColumnExpression: "表达式",
965
- calculatedColumnExpressionPlaceholder: "在此输入",
966
- calculatedColumnExpressionToolsLabel: "插入",
967
- calculatedColumnColumns: "列",
968
- calculatedColumnFunctions: "函数",
969
- calculatedColumnOperators: "运算符",
970
- calculatedColumnSuggestions: "计算列建议",
971
- calculatedColumnDefaultTitle: "未命名",
972
- calculatedColumnExpressionAmbiguousReference: '列引用不明确 "${variable}"。请使用“列”列表或更具体的分组路径。',
973
- calculatedColumnExpressionUnknownReference: '未知的列引用 "${variable}"。',
974
- calculatedColumnExpressionEmpty: "请输入表达式",
975
- calculatedColumnTitleEmpty: "请输入标题",
976
- calculatedColumnApply: "应用",
977
- calculatedColumnCancel: "取消",
978
- // Notes
979
- note: "单元格备注",
980
- addNote: "添加备注",
981
- viewNote: "查看备注",
982
- editNote: "编辑备注",
983
- deleteNote: "删除备注",
984
- notePlaceholder: "添加备注..."
985
- };
986
- const Xt = (t) => {
987
- const e = Y.c(2), {
988
- text: u
989
- } = t, r = u === void 0 ? "暂无符合条件的数据" : u;
990
- let n;
991
- return e[0] !== r ? (n = /* @__PURE__ */ g("div", { className: "gz-table-no-rows-overlay", role: "status", children: r }), e[0] = r, e[1] = n) : n = e[1], n;
992
- }, Qt = zu({
993
- feature: "gzTableDisabledCheckboxCursor",
994
- css: `
995
- .ag-checkbox-input:disabled,
996
- .ag-checkbox-input-wrapper.ag-disabled,
997
- .ag-selection-checkbox .ag-checkbox-input-wrapper.ag-disabled::before {
998
- cursor: not-allowed;
999
- }
1000
- `
1001
- }), Jt = zu({
1002
- feature: "gzTablePaginationPickerWidth",
1003
- css: `
1004
- /* 覆盖分页器选择框的宽度,以及补充缺失的边框 */
1005
- .ag-paging-panel .ag-picker-field-wrapper {
1006
- min-width: 48px !important;
1007
- min-height: 24px !important;
1008
- border: 1px solid var(--gz-color-border) !important;
1009
- cursor: pointer;
1010
- transition: border-color 0.3s ease-in-out;
1011
-
1012
- &:hover {
1013
- border-color: var(--gz-color-primary-hover) !important;
1014
- }
1015
- }
1016
-
1017
- /* 覆盖分页器输入框的宽度,以及补充缺失的边框 */
1018
- .ag-number-field-input-wrapper .ag-input-field-input.ag-number-field-input {
1019
- border: 1px solid var(--gz-color-border) !important;
1020
- cursor: pointer;
1021
- transition: border-color 0.3s ease-in-out;
1022
-
1023
- &:hover {
1024
- border-color: var(--gz-color-primary-hover) !important;
1025
- }
1026
- }
1027
-
1028
- .ag-paging-panel-content{
1029
- padding: 0 !important;
1030
- }
1031
- `
1032
- }), cu = Lt.withPart(Qt).withPart(Jt).withParams({
1033
- fontFamily: "var(--gz-font-family)",
1034
- fontSize: "calc(var(--gz-font-size) * 1px)",
1035
- fontWeight: "var(--gz-font-weight-normal)",
1036
- iconSize: "calc(var(--gz-checkbox-size) * 1px)",
1037
- focusShadow: {
1038
- spread: "0px"
1039
- },
1040
- cellFontSize: "calc(var(--gz-font-size) * 1px)",
1041
- cellFontWeight: "var(--gz-font-weight-normal)",
1042
- cellHorizontalPadding: "calc(var(--gz-padding-xs) * 1px)",
1043
- headerFontSize: "calc(var(--gz-font-size) * 1px)",
1044
- headerFontWeight: "var(--gz-font-weight-normal)",
1045
- headerHeight: 31,
1046
- rowHeight: 28,
1047
- headerBackgroundColor: "var(--gz-components-table-header-bg, var(--gz-color-border))",
1048
- headerTextColor: "var(--gz-components-table-header-text-color, var(--gz-color-text-secondary))",
1049
- headerColumnBorder: {
1050
- style: "solid",
1051
- width: 2,
1052
- color: "var(--gz-color-split)"
1053
- },
1054
- headerColumnBorderHeight: 14,
1055
- pinnedColumnBorder: {
1056
- style: "solid",
1057
- width: 1,
1058
- color: "var(--gz-color-split)"
1059
- },
1060
- checkboxBorderRadius: "calc(var(--gz-border-radius-sm) * 1px)",
1061
- checkboxBorderWidth: 1,
1062
- checkboxUncheckedBackgroundColor: "var(--gz-color-bg-container)",
1063
- checkboxUncheckedBorderColor: "var(--gz-color-border-secondary)",
1064
- checkboxCheckedBackgroundColor: "var(--gz-color-primary)",
1065
- checkboxCheckedBorderColor: "var(--gz-color-primary)",
1066
- checkboxCheckedShapeColor: "var(--gz-color-text-on-light)",
1067
- checkboxIndeterminateBackgroundColor: "var(--gz-color-primary)",
1068
- checkboxIndeterminateBorderColor: "var(--gz-color-primary)",
1069
- checkboxIndeterminateShapeColor: "var(--gz-color-text-on-light)",
1070
- borderColor: "var(--gz-components-table-border-color, var(--gz-color-border))",
1071
- oddRowBackgroundColor: "var(--gz-color-bg-container)",
1072
- backgroundColor: "var(--gz-color-bg-container)",
1073
- dataBackgroundColor: "var(--gz-color-bg-container)",
1074
- foregroundColor: "var(--gz-color-text)",
1075
- cellTextColor: "var(--gz-color-text)",
1076
- rowHoverColor: "color-mix(in srgb, transparent, var(--gz-color-primary) 15%)",
1077
- selectedRowBackgroundColor: "color-mix(in srgb, transparent, var(--gz-color-primary) 12%)",
1078
- paginationPanelHeight: 40
1079
- }), Kt = cu.withParams(Nt), er = cu.withParams(zt), ur = "AgGridLicense66fwc79n[NORMAL][v0102]_NDA3MDk2NjQwMDAwMA==80908dd5fb71b58d3ce28b2ed320216d", je = {
1080
- theme: cu,
1081
- // 允许鼠标划选并复制单元格里的文本(AG Grid 默认是 false,防止和拖拽冲突,但业务通常需要复制)
1082
- enableCellTextSelection: !0,
1083
- // 自定义空状态组件:当 rowData 为空时,展示我们自己写的 NoRowsOverlay 组件
1084
- noRowsOverlayComponent: Xt,
1085
- // 注入官方的纯中文语言包,并覆盖部分默认文案以符合业务习惯
1086
- localeText: {
1087
- ...jt,
1088
- pageSizeSelectorLabel: "每页条数",
1089
- page: "第",
1090
- of: "页/共",
1091
- collapseAll: "收起所有行组"
1092
- },
1093
- // 默认表头高度和行高
1094
- headerHeight: 31,
1095
- rowHeight: 28,
1096
- // 禁用原生的右键菜单(界面更干净,如有需要业务侧可自行开启)
1097
- suppressContextMenu: !1,
1098
- // 拖动列交换位置时,关闭动画(可能为了性能或视觉统一)
1099
- suppressColumnMoveAnimation: !0,
1100
- // 禁用单元格的焦点框(点击单元格时不会出现蓝色边框,类似普通网页体验)
1101
- suppressCellFocus: !0,
1102
- // 把列拖出表格范围时,不隐藏该列
1103
- suppressDragLeaveHidesColumns: !0,
1104
- // 滚动条宽度(10px)
1105
- scrollbarWidth: 10,
1106
- // 默认关闭分页。如果要开启,使用者必须显式传 pagination: true
1107
- pagination: !1
1108
- }, tr = {
1109
- sortable: !0,
1110
- resizable: !0,
1111
- // 根据基线产品需求:开启按列聚合功能,并限制只能使用以下 5 种汇总方式(原生的 first/last 等被剔除)
1112
- enableValue: !0,
1113
- // 限制只能使用以下 5 种汇总方式(原生的 first/last 等被剔除)
1114
- allowedAggFuncs: ["sum", "avg", "max", "min", "count"]
1115
- }, rr = [kt], nr = ["rowSummary", "pageSize", "pageSummary"], du = ue((t, e) => {
1116
- const u = ee(null), {
1117
- themeMode: r
1118
- } = ku(ju), {
1119
- gridOptions: n
1120
- } = t, o = t.pagination ?? n?.pagination ?? je.pagination, a = t.paginationPanels ?? n?.paginationPanels, s = o && a === void 0, p = s ? nr : a, F = r === "gold-dark" ? Kt : r === "gold-light" ? er : void 0, y = t.theme ?? n?.theme ?? F, m = Se(() => ({
1121
- ...je,
1122
- ...n,
1123
- paginationPanels: p
1124
- }), [n, p]), D = Se(() => ({
1125
- ...je.localeText,
1126
- ...n?.localeText,
1127
- ...t.localeText
1128
- }), [n?.localeText, t.localeText]), M = ["gz-table", o ? "gz-table-pagination" : void 0, s ? "gz-table-default-pagination-layout" : void 0, r === "gold-dark" ? "gz-table-gold-dark" : void 0, r === "gold-light" ? "gz-table-gold-light" : void 0, t.className].filter(Boolean).join(" "), k = Se(() => ({
1129
- ...tr,
1130
- ...n?.defaultColDef,
1131
- ...t.defaultColDef
1132
- }), [n?.defaultColDef, t.defaultColDef]), L = pe((h) => {
1133
- const I = u.current;
1134
- if (!I || !h) return;
1135
- const d = I.querySelector(".ag-body-horizontal-scroll-viewport");
1136
- if (d) {
1137
- const {
1138
- scrollLeft: $,
1139
- clientWidth: w,
1140
- scrollWidth: P
1141
- } = d, O = $ > 0, l = Math.ceil($ + w) < P - 1;
1142
- I.classList.toggle("gz-table-ping-left", O), I.classList.toggle("gz-table-ping-right", l);
1143
- } else
1144
- I.classList.remove("gz-table-ping-left", "gz-table-ping-right");
1145
- }, []), v = pe((h) => {
1146
- h.direction === "horizontal" && L(h.api), t.onBodyScroll && t.onBodyScroll(h), n?.onBodyScroll && n.onBodyScroll(h);
1147
- }, [L, t.onBodyScroll, n?.onBodyScroll]), T = pe((h) => {
1148
- L(h.api), t.onGridReady && t.onGridReady(h), n?.onGridReady && n.onGridReady(h);
1149
- }, [L, t.onGridReady, n?.onGridReady]), f = pe((h) => {
1150
- L(h.api), t.onGridSizeChanged && t.onGridSizeChanged(h), n?.onGridSizeChanged && n.onGridSizeChanged(h);
1151
- }, [L, t.onGridSizeChanged, n?.onGridSizeChanged]), B = pe((h) => {
1152
- L(h.api), t.onModelUpdated && t.onModelUpdated(h), n?.onModelUpdated && n.onModelUpdated(h);
1153
- }, [L, t.onModelUpdated, n?.onModelUpdated]), S = pe((h) => {
1154
- L(h.api), t.onDisplayedColumnsChanged && t.onDisplayedColumnsChanged(h), n?.onDisplayedColumnsChanged && n.onDisplayedColumnsChanged(h);
1155
- }, [L, t.onDisplayedColumnsChanged, n?.onDisplayedColumnsChanged]), R = t.getContextMenuItems ?? n?.getContextMenuItems, b = pe((h) => {
1156
- const I = {
1157
- name: "复制整行数据",
1158
- icon: '<span class="ag-icon ag-icon-copy" unselectable="on" role="presentation"></span>',
1159
- action: () => {
1160
- const P = h.node;
1161
- if (!P || !P.data) return;
1162
- const l = (h.api.getAllDisplayedColumns() || []).map((i) => {
1163
- const c = i.getColId(), C = P.data[c];
1164
- return typeof C == "object" ? JSON.stringify(C) : String(C ?? "");
1165
- }).join(" ");
1166
- if (navigator.clipboard && window.isSecureContext)
1167
- navigator.clipboard.writeText(l).catch((i) => {
1168
- console.error("复制整行数据失败: ", i);
1169
- });
1170
- else {
1171
- const i = document.createElement("textarea");
1172
- i.value = l, i.style.position = "fixed", i.style.left = "-999999px", i.style.top = "-999999px", document.body.appendChild(i), i.focus(), i.select();
1173
- try {
1174
- document.execCommand("copy");
1175
- } catch (c) {
1176
- console.error("降级复制失败", c);
1177
- }
1178
- i.remove();
1179
- }
1180
- }
1181
- };
1182
- let d = h.defaultItems || [];
1183
- const $ = d.indexOf("copy");
1184
- return $ !== -1 && (d[$] = I), h.api.getRowGroupColumns().length > 0 && (d = [
1185
- ...d,
1186
- "separator",
1187
- "expandAll",
1188
- "contractAll"
1189
- // AG Grid 中“收起全部”对应的内部指令是 contractAll
1190
- ]), R ? R({
1191
- ...h,
1192
- defaultItems: d
1193
- }) : d;
1194
- }, [R]);
1195
- return /* @__PURE__ */ g("div", { ref: u, className: "gz-table-wrapper", style: {
1196
- height: "100%",
1197
- width: "100%",
1198
- display: "flex",
1199
- flexDirection: "column"
1200
- }, children: /* @__PURE__ */ g(It, { modules: rr, licenseKey: ur, children: /* @__PURE__ */ g(Pt, { ref: e, ...t, gridOptions: m, ...y === void 0 ? {} : {
1201
- theme: y
1202
- }, className: M || void 0, defaultColDef: k, localeText: D, getContextMenuItems: b, onBodyScroll: v, onGridReady: T, onGridSizeChanged: f, onModelUpdated: B, onDisplayedColumnsChanged: S }) }) });
1203
- }), or = "_root_fdyzl_1", ar = "_section_fdyzl_16", ir = "_sectionTitle_fdyzl_22", lr = "_contextForm_fdyzl_29", sr = "_fixedSingle_fdyzl_35", cr = "_multiple_fdyzl_40", dr = "_contextFormItem_fdyzl_45", mr = "_contextFormLabel_fdyzl_54", Er = "_contextFormLabelText_fdyzl_67", Fr = "_contextFormContent_fdyzl_73", Cr = "_selectPopup_fdyzl_77", fr = "_selectPopupListItem_fdyzl_80", gr = "_resourceIssues_fdyzl_96", pr = "_limitAlert_fdyzl_100", vr = "_fixedGrid_fdyzl_103", hr = "_multipleGrid_fdyzl_104", Dr = "_fieldCell_fdyzl_148", Br = "_negativeValue_fdyzl_153", yr = "_gridErrorAlert_fdyzl_156", br = "_gridErrorIcon_fdyzl_168", Ar = "_gridErrorSection_fdyzl_171", Sr = "_gridErrorMessage_fdyzl_175", Tr = "_mergedErrorGridCell_fdyzl_182", xr = "_mergedErrorCell_fdyzl_190", wr = "_mergedErrorText_fdyzl_205", Mr = "_emptyState_fdyzl_211", _r = "_footer_fdyzl_219", H = {
1204
- root: or,
1205
- section: ar,
1206
- sectionTitle: ir,
1207
- contextForm: lr,
1208
- fixedSingle: sr,
1209
- multiple: cr,
1210
- contextFormItem: dr,
1211
- contextFormLabel: mr,
1212
- contextFormLabelText: Er,
1213
- contextFormContent: Fr,
1214
- selectPopup: Cr,
1215
- selectPopupListItem: fr,
1216
- resourceIssues: gr,
1217
- limitAlert: pr,
1218
- fixedGrid: vr,
1219
- multipleGrid: hr,
1220
- "ag-body-vertical-scroll": "_ag-body-vertical-scroll_fdyzl_131",
1221
- fieldCell: Dr,
1222
- negativeValue: Br,
1223
- gridErrorAlert: yr,
1224
- gridErrorIcon: br,
1225
- gridErrorSection: Ar,
1226
- gridErrorMessage: Sr,
1227
- mergedErrorGridCell: Tr,
1228
- mergedErrorCell: xr,
1229
- mergedErrorText: wr,
1230
- emptyState: Mr,
1231
- footer: _r
1232
- }, Xu = {
1233
- red: ["red1", "red3", "red6", "red7"],
1234
- volcano: ["volcano1", "volcano3", "volcano6", "volcano7"],
1235
- orange: ["orange1", "orange3", "orange6", "orange7"],
1236
- gold: ["guotai gold1", "guotai gold3", "guotai gold6", "guotai gold7"],
1237
- yellow: ["yellow1", "yellow3", "yellow6", "yellow7"],
1238
- // Figma 中 lime outlined 使用 lime4,其余预设色使用色板第 3 阶作为边框色。
1239
- lime: ["lime1", "lime4", "lime6", "lime7"],
1240
- green: ["green1", "green3", "green6", "green7"],
1241
- cyan: ["cyan1", "cyan3", "cyan6", "cyan7"],
1242
- geekblue: ["galaxy blue1", "galaxy blue3", "galaxy blue6", "galaxy blue7"],
1243
- purple: ["purple1", "purple3", "purple6", "purple7"],
1244
- magenta: ["magenta1", "magenta3", "magenta6", "magenta7"]
1245
- }, me = (t, e) => {
1246
- const u = t[e];
1247
- return typeof u == "string" ? u : void 0;
1248
- }, $r = (t) => Object.prototype.hasOwnProperty.call(Xu, t), Rr = (t, e, u) => {
1249
- if (t === "default" || t === void 0) {
1250
- if (e !== "solid") return;
1251
- const p = me(u, "colorBgSolid");
1252
- return {
1253
- color: me(u, "colorTextOnLight"),
1254
- backgroundColor: p,
1255
- borderColor: p
1256
- };
1257
- }
1258
- if (t === "primary") {
1259
- const p = me(u, "colorPrimary");
1260
- return {
1261
- // primary 三种 variant 都使用浅色背景和 on-light 文字色。
1262
- color: me(u, "colorTextOnLight"),
1263
- backgroundColor: p,
1264
- // outlined 使用设计描边色;solid 的边框与背景保持一致;filled 不额外设置边框。
1265
- ...e === "outlined" ? {
1266
- borderColor: me(u, "colorPrimaryBorder")
1267
- } : e === "solid" ? {
1268
- borderColor: p
1269
- } : void 0
1270
- };
1271
- }
1272
- if (!$r(t)) return;
1273
- const r = Xu[t], [n, o, a, s] = r;
1274
- if (e === "solid") {
1275
- const p = me(u, a);
1276
- return {
1277
- color: me(u, "colorTextLightSolid"),
1278
- backgroundColor: p,
1279
- borderColor: p
1280
- };
1281
- }
1282
- return {
1283
- color: me(u, s),
1284
- backgroundColor: me(u, n),
1285
- ...e === "outlined" ? {
1286
- borderColor: me(u, o)
1287
- } : void 0
1288
- };
1289
- }, kr = (t, e) => {
1290
- if (t === "primary")
1291
- return {
1292
- color: me(e, "colorTextOnLight"),
1293
- backgroundColor: me(e, "colorPrimary"),
1294
- borderColor: "transparent"
1295
- };
1296
- }, Qu = ue((t, e) => {
1297
- const u = Y.c(33);
1298
- let r, n, o, a, s;
1299
- u[0] !== t ? ({
1300
- color: r,
1301
- style: o,
1302
- styles: a,
1303
- variant: s,
1304
- ...n
1305
- } = t, u[0] = t, u[1] = r, u[2] = n, u[3] = o, u[4] = a, u[5] = s) : (r = u[1], n = u[2], o = u[3], a = u[4], s = u[5]);
1306
- const p = s === void 0 ? "solid" : s, {
1307
- themeMode: F
1308
- } = ku(ju), {
1309
- token: y
1310
- } = Nu.useToken(), m = y;
1311
- let D;
1312
- u[6] !== r || u[7] !== m || u[8] !== F || u[9] !== p ? (D = F === "gold-dark" ? Rr(r, p, m) : F === "gold-light" ? kr(r, m) : void 0, u[6] = r, u[7] = m, u[8] = F, u[9] = p, u[10] = D) : D = u[10];
1313
- const M = D;
1314
- let k;
1315
- u[11] !== r || u[12] !== m || u[13] !== F || u[14] !== p ? (k = F === "gold-dark" && p === "solid" && (r === "primary" || r === "default" || r === void 0) ? {
1316
- color: me(m, "colorTextOnLight")
1317
- } : void 0, u[11] = r, u[12] = m, u[13] = F, u[14] = p, u[15] = k) : k = u[15];
1318
- const L = k;
1319
- let v;
1320
- u[16] !== r || u[17] !== m || u[18] !== F ? (v = F === "gold-light" && r === "primary" ? {
1321
- color: me(m, "colorTextOnLight")
1322
- } : void 0, u[16] = r, u[17] = m, u[18] = F, u[19] = v) : v = u[19];
1323
- const f = L ?? v;
1324
- let B;
1325
- u[20] !== M || u[21] !== o ? (B = M ? {
1326
- ...M,
1327
- ...o
1328
- } : o, u[20] = M, u[21] = o, u[22] = B) : B = u[22];
1329
- const S = B;
1330
- let R;
1331
- u[23] !== f || u[24] !== a ? (R = f ? typeof a == "function" ? (d) => {
1332
- const $ = a(d);
1333
- return {
1334
- ...$,
1335
- close: {
1336
- ...f,
1337
- ...$?.close
1338
- }
1339
- };
1340
- } : {
1341
- ...a,
1342
- close: {
1343
- ...f,
1344
- ...a?.close
1345
- }
1346
- } : a, u[23] = f, u[24] = a, u[25] = R) : R = u[25];
1347
- const b = R, h = F === "gold-dark" && r === "default" ? void 0 : r;
1348
- let I;
1349
- return u[26] !== h || u[27] !== S || u[28] !== b || u[29] !== e || u[30] !== n || u[31] !== p ? (I = /* @__PURE__ */ g(nu, { ref: e, color: h, variant: p, style: S, styles: b, ...n }), u[26] = h, u[27] = S, u[28] = b, u[29] = e, u[30] = n, u[31] = p, u[32] = I) : I = u[32], I;
1350
- });
1351
- Qu.displayName = "GZTag";
1352
- const Ju = ue((t, e) => {
1353
- const u = Y.c(3);
1354
- let r;
1355
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(nu.CheckableTag, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
1356
- });
1357
- Ju.displayName = "GZCheckableTag";
1358
- const Ku = ue((t, e) => {
1359
- const u = Y.c(3);
1360
- let r;
1361
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(nu.CheckableTagGroup, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
1362
- });
1363
- Ku.displayName = "GZCheckableTagGroup";
1364
- const mu = Qu;
1365
- mu.CheckableTag = Ju;
1366
- mu.CheckableTagGroup = Ku;
1367
- function et(t, e) {
1368
- if (t == null || t === "") return ae;
1369
- try {
1370
- return new Re(t).toFixed(e);
1371
- } catch {
1372
- return ae;
1373
- }
1374
- }
1375
- function ut(t, e) {
1376
- const u = et(t, e);
1377
- if (u === ae) return u;
1378
- const [r, n] = u.split("."), o = r.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
1379
- return n == null ? o : `${o}.${n}`;
1380
- }
1381
- function Du(t, e, u = 2) {
1382
- const r = et(t, u);
1383
- if (r === ae) return r;
1384
- const n = r.startsWith("-") ? r.slice(1) : r, o = ut(n, u);
1385
- try {
1386
- const s = new Intl.NumberFormat("zh-CN", {
1387
- style: "currency",
1388
- currency: e,
1389
- currencyDisplay: "symbol",
1390
- minimumFractionDigits: u,
1391
- maximumFractionDigits: u
1392
- }).formatToParts(0).find((p) => p.type === "currency")?.value ?? e;
1393
- return `${r.startsWith("-") ? "-" : ""}${s}${o}`;
1394
- } catch {
1395
- return `${e} ${r}`.trim();
1396
- }
1397
- }
1398
- function Ir(t) {
1399
- try {
1400
- return t != null && new Re(t).lt(0);
1401
- } catch {
1402
- return !1;
1403
- }
1404
- }
1405
- function tt(t) {
1406
- const e = Y.c(3), u = Ir(t.rawValue) ? H.negativeValue : void 0;
1407
- let r;
1408
- return e[0] !== t.value || e[1] !== u ? (r = /* @__PURE__ */ g("span", { className: u, children: t.value }), e[0] = t.value, e[1] = u, e[2] = r) : r = e[2], r;
1409
- }
1410
- function rt(t) {
1411
- const e = Y.c(4);
1412
- if (t.field === "direction") {
1413
- let r;
1414
- return e[0] !== t.value ? (r = t.value ? /* @__PURE__ */ g(mu, { variant: "outlined", color: t.value === "买入" ? "gold" : "green", children: t.value }) : "-", e[0] = t.value, e[1] = r) : r = e[1], r;
1415
- }
1416
- let u;
1417
- return e[2] !== t.value ? (u = /* @__PURE__ */ g("span", { children: t.value }), e[2] = t.value, e[3] = u) : u = e[3], u;
1418
- }
1419
- var Oe = { exports: {} }, Pr = Oe.exports, Bu;
1420
- function Lr() {
1421
- return Bu || (Bu = 1, (function(t, e) {
1422
- (function(u, r) {
1423
- t.exports = r();
1424
- })(Pr, (function() {
1425
- var u = 1e3, r = 6e4, n = 36e5, o = "millisecond", a = "second", s = "minute", p = "hour", F = "day", y = "week", m = "month", D = "quarter", M = "year", k = "date", L = "Invalid Date", v = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, f = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(l) {
1426
- var i = ["th", "st", "nd", "rd"], c = l % 100;
1427
- return "[" + l + (i[(c - 20) % 10] || i[c] || i[0]) + "]";
1428
- } }, B = function(l, i, c) {
1429
- var C = String(l);
1430
- return !C || C.length >= i ? l : "" + Array(i + 1 - C.length).join(c) + l;
1431
- }, S = { s: B, z: function(l) {
1432
- var i = -l.utcOffset(), c = Math.abs(i), C = Math.floor(c / 60), E = c % 60;
1433
- return (i <= 0 ? "+" : "-") + B(C, 2, "0") + ":" + B(E, 2, "0");
1434
- }, m: function l(i, c) {
1435
- if (i.date() < c.date()) return -l(c, i);
1436
- var C = 12 * (c.year() - i.year()) + (c.month() - i.month()), E = i.clone().add(C, m), x = c - E < 0, A = i.clone().add(C + (x ? -1 : 1), m);
1437
- return +(-(C + (c - E) / (x ? E - A : A - E)) || 0);
1438
- }, a: function(l) {
1439
- return l < 0 ? Math.ceil(l) || 0 : Math.floor(l);
1440
- }, p: function(l) {
1441
- return { M: m, y: M, w: y, d: F, D: k, h: p, m: s, s: a, ms: o, Q: D }[l] || String(l || "").toLowerCase().replace(/s$/, "");
1442
- }, u: function(l) {
1443
- return l === void 0;
1444
- } }, R = "en", b = {};
1445
- b[R] = f;
1446
- var h = "$isDayjsObject", I = function(l) {
1447
- return l instanceof P || !(!l || !l[h]);
1448
- }, d = function l(i, c, C) {
1449
- var E;
1450
- if (!i) return R;
1451
- if (typeof i == "string") {
1452
- var x = i.toLowerCase();
1453
- b[x] && (E = x), c && (b[x] = c, E = x);
1454
- var A = i.split("-");
1455
- if (!E && A.length > 1) return l(A[0]);
1456
- } else {
1457
- var _ = i.name;
1458
- b[_] = i, E = _;
1459
- }
1460
- return !C && E && (R = E), E || !C && R;
1461
- }, $ = function(l, i) {
1462
- if (I(l)) return l.clone();
1463
- var c = typeof i == "object" ? i : {};
1464
- return c.date = l, c.args = arguments, new P(c);
1465
- }, w = S;
1466
- w.l = d, w.i = I, w.w = function(l, i) {
1467
- return $(l, { locale: i.$L, utc: i.$u, x: i.$x, $offset: i.$offset });
1468
- };
1469
- var P = (function() {
1470
- function l(c) {
1471
- this.$L = d(c.locale, null, !0), this.parse(c), this.$x = this.$x || c.x || {}, this[h] = !0;
1472
- }
1473
- var i = l.prototype;
1474
- return i.parse = function(c) {
1475
- this.$d = (function(C) {
1476
- var E = C.date, x = C.utc;
1477
- if (E === null) return /* @__PURE__ */ new Date(NaN);
1478
- if (w.u(E)) return /* @__PURE__ */ new Date();
1479
- if (E instanceof Date) return new Date(E);
1480
- if (typeof E == "string" && !/Z$/i.test(E)) {
1481
- var A = E.match(v);
1482
- if (A) {
1483
- var _ = A[2] - 1 || 0, N = (A[7] || "0").substring(0, 3);
1484
- return x ? new Date(Date.UTC(A[1], _, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, N)) : new Date(A[1], _, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, N);
1485
- }
1486
- }
1487
- return new Date(E);
1488
- })(c), this.init();
1489
- }, i.init = function() {
1490
- var c = this.$d;
1491
- this.$y = c.getFullYear(), this.$M = c.getMonth(), this.$D = c.getDate(), this.$W = c.getDay(), this.$H = c.getHours(), this.$m = c.getMinutes(), this.$s = c.getSeconds(), this.$ms = c.getMilliseconds();
1492
- }, i.$utils = function() {
1493
- return w;
1494
- }, i.isValid = function() {
1495
- return this.$d.toString() !== L;
1496
- }, i.isSame = function(c, C) {
1497
- var E = $(c);
1498
- return this.startOf(C) <= E && E <= this.endOf(C);
1499
- }, i.isAfter = function(c, C) {
1500
- return $(c) < this.startOf(C);
1501
- }, i.isBefore = function(c, C) {
1502
- return this.endOf(C) < $(c);
1503
- }, i.$g = function(c, C, E) {
1504
- return w.u(c) ? this[C] : this.set(E, c);
1505
- }, i.unix = function() {
1506
- return Math.floor(this.valueOf() / 1e3);
1507
- }, i.valueOf = function() {
1508
- return this.$d.getTime();
1509
- }, i.startOf = function(c, C) {
1510
- var E = this, x = !!w.u(C) || C, A = w.p(c), _ = function(q, G) {
1511
- var U = w.w(E.$u ? Date.UTC(E.$y, G, q) : new Date(E.$y, G, q), E);
1512
- return x ? U : U.endOf(F);
1513
- }, N = function(q, G) {
1514
- return w.w(E.toDate()[q].apply(E.toDate("s"), (x ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(G)), E);
1515
- }, z = this.$W, V = this.$M, W = this.$D, Z = "set" + (this.$u ? "UTC" : "");
1516
- switch (A) {
1517
- case M:
1518
- return x ? _(1, 0) : _(31, 11);
1519
- case m:
1520
- return x ? _(1, V) : _(0, V + 1);
1521
- case y:
1522
- var X = this.$locale().weekStart || 0, j = (z < X ? z + 7 : z) - X;
1523
- return _(x ? W - j : W + (6 - j), V);
1524
- case F:
1525
- case k:
1526
- return N(Z + "Hours", 0);
1527
- case p:
1528
- return N(Z + "Minutes", 1);
1529
- case s:
1530
- return N(Z + "Seconds", 2);
1531
- case a:
1532
- return N(Z + "Milliseconds", 3);
1533
- default:
1534
- return this.clone();
1535
- }
1536
- }, i.endOf = function(c) {
1537
- return this.startOf(c, !1);
1538
- }, i.$set = function(c, C) {
1539
- var E, x = w.p(c), A = "set" + (this.$u ? "UTC" : ""), _ = (E = {}, E[F] = A + "Date", E[k] = A + "Date", E[m] = A + "Month", E[M] = A + "FullYear", E[p] = A + "Hours", E[s] = A + "Minutes", E[a] = A + "Seconds", E[o] = A + "Milliseconds", E)[x], N = x === F ? this.$D + (C - this.$W) : C;
1540
- if (x === m || x === M) {
1541
- var z = this.clone().set(k, 1);
1542
- z.$d[_](N), z.init(), this.$d = z.set(k, Math.min(this.$D, z.daysInMonth())).$d;
1543
- } else _ && this.$d[_](N);
1544
- return this.init(), this;
1545
- }, i.set = function(c, C) {
1546
- return this.clone().$set(c, C);
1547
- }, i.get = function(c) {
1548
- return this[w.p(c)]();
1549
- }, i.add = function(c, C) {
1550
- var E, x = this;
1551
- c = Number(c);
1552
- var A = w.p(C), _ = function(V) {
1553
- var W = $(x);
1554
- return w.w(W.date(W.date() + Math.round(V * c)), x);
1555
- };
1556
- if (A === m) return this.set(m, this.$M + c);
1557
- if (A === M) return this.set(M, this.$y + c);
1558
- if (A === F) return _(1);
1559
- if (A === y) return _(7);
1560
- var N = (E = {}, E[s] = r, E[p] = n, E[a] = u, E)[A] || 1, z = this.$d.getTime() + c * N;
1561
- return w.w(z, this);
1562
- }, i.subtract = function(c, C) {
1563
- return this.add(-1 * c, C);
1564
- }, i.format = function(c) {
1565
- var C = this, E = this.$locale();
1566
- if (!this.isValid()) return E.invalidDate || L;
1567
- var x = c || "YYYY-MM-DDTHH:mm:ssZ", A = w.z(this), _ = this.$H, N = this.$m, z = this.$M, V = E.weekdays, W = E.months, Z = E.meridiem, X = function(G, U, K, J) {
1568
- return G && (G[U] || G(C, x)) || K[U].slice(0, J);
1569
- }, j = function(G) {
1570
- return w.s(_ % 12 || 12, G, "0");
1571
- }, q = Z || function(G, U, K) {
1572
- var J = G < 12 ? "AM" : "PM";
1573
- return K ? J.toLowerCase() : J;
1574
- };
1575
- return x.replace(T, (function(G, U) {
1576
- return U || (function(K) {
1577
- switch (K) {
1578
- case "YY":
1579
- return String(C.$y).slice(-2);
1580
- case "YYYY":
1581
- return w.s(C.$y, 4, "0");
1582
- case "M":
1583
- return z + 1;
1584
- case "MM":
1585
- return w.s(z + 1, 2, "0");
1586
- case "MMM":
1587
- return X(E.monthsShort, z, W, 3);
1588
- case "MMMM":
1589
- return X(W, z);
1590
- case "D":
1591
- return C.$D;
1592
- case "DD":
1593
- return w.s(C.$D, 2, "0");
1594
- case "d":
1595
- return String(C.$W);
1596
- case "dd":
1597
- return X(E.weekdaysMin, C.$W, V, 2);
1598
- case "ddd":
1599
- return X(E.weekdaysShort, C.$W, V, 3);
1600
- case "dddd":
1601
- return V[C.$W];
1602
- case "H":
1603
- return String(_);
1604
- case "HH":
1605
- return w.s(_, 2, "0");
1606
- case "h":
1607
- return j(1);
1608
- case "hh":
1609
- return j(2);
1610
- case "a":
1611
- return q(_, N, !0);
1612
- case "A":
1613
- return q(_, N, !1);
1614
- case "m":
1615
- return String(N);
1616
- case "mm":
1617
- return w.s(N, 2, "0");
1618
- case "s":
1619
- return String(C.$s);
1620
- case "ss":
1621
- return w.s(C.$s, 2, "0");
1622
- case "SSS":
1623
- return w.s(C.$ms, 3, "0");
1624
- case "Z":
1625
- return A;
1626
- }
1627
- return null;
1628
- })(G) || A.replace(":", "");
1629
- }));
1630
- }, i.utcOffset = function() {
1631
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1632
- }, i.diff = function(c, C, E) {
1633
- var x, A = this, _ = w.p(C), N = $(c), z = (N.utcOffset() - this.utcOffset()) * r, V = this - N, W = function() {
1634
- return w.m(A, N);
1635
- };
1636
- switch (_) {
1637
- case M:
1638
- x = W() / 12;
1639
- break;
1640
- case m:
1641
- x = W();
1642
- break;
1643
- case D:
1644
- x = W() / 3;
1645
- break;
1646
- case y:
1647
- x = (V - z) / 6048e5;
1648
- break;
1649
- case F:
1650
- x = (V - z) / 864e5;
1651
- break;
1652
- case p:
1653
- x = V / n;
1654
- break;
1655
- case s:
1656
- x = V / r;
1657
- break;
1658
- case a:
1659
- x = V / u;
1660
- break;
1661
- default:
1662
- x = V;
1663
- }
1664
- return E ? x : w.a(x);
1665
- }, i.daysInMonth = function() {
1666
- return this.endOf(m).$D;
1667
- }, i.$locale = function() {
1668
- return b[this.$L];
1669
- }, i.locale = function(c, C) {
1670
- if (!c) return this.$L;
1671
- var E = this.clone(), x = d(c, C, !0);
1672
- return x && (E.$L = x), E;
1673
- }, i.clone = function() {
1674
- return w.w(this.$d, this);
1675
- }, i.toDate = function() {
1676
- return new Date(this.valueOf());
1677
- }, i.toJSON = function() {
1678
- return this.isValid() ? this.toISOString() : null;
1679
- }, i.toISOString = function() {
1680
- return this.$d.toISOString();
1681
- }, i.toString = function() {
1682
- return this.$d.toUTCString();
1683
- }, l;
1684
- })(), O = P.prototype;
1685
- return $.prototype = O, [["$ms", o], ["$s", a], ["$m", s], ["$H", p], ["$W", F], ["$M", m], ["$y", M], ["$D", k]].forEach((function(l) {
1686
- O[l[1]] = function(i) {
1687
- return this.$g(i, l[0], l[1]);
1688
- };
1689
- })), $.extend = function(l, i) {
1690
- return l.$i || (l(i, P, $), l.$i = !0), $;
1691
- }, $.locale = d, $.isDayjs = I, $.unix = function(l) {
1692
- return $(1e3 * l);
1693
- }, $.en = b[R], $.Ls = b, $.p = {}, $;
1694
- }));
1695
- })(Oe)), Oe.exports;
1696
- }
1697
- var Nr = Lr();
1698
- const ke = /* @__PURE__ */ Vu(Nr);
1699
- var Ve = { exports: {} }, zr = Ve.exports, yu;
1700
- function Or() {
1701
- return yu || (yu = 1, (function(t, e) {
1702
- (function(u, r) {
1703
- t.exports = r();
1704
- })(zr, (function() {
1705
- var u = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, o = /\d\d/, a = /\d\d?/, s = /\d*[^-_:/,()\s\d]+/, p = {}, F = function(v) {
1706
- return (v = +v) + (v > 68 ? 1900 : 2e3);
1707
- }, y = function(v) {
1708
- return function(T) {
1709
- this[v] = +T;
1710
- };
1711
- }, m = [/[+-]\d\d:?(\d\d)?|Z/, function(v) {
1712
- (this.zone || (this.zone = {})).offset = (function(T) {
1713
- if (!T || T === "Z") return 0;
1714
- var f = T.match(/([+-]|\d\d)/g), B = 60 * f[1] + (+f[2] || 0);
1715
- return B === 0 ? 0 : f[0] === "+" ? -B : B;
1716
- })(v);
1717
- }], D = function(v) {
1718
- var T = p[v];
1719
- return T && (T.indexOf ? T : T.s.concat(T.f));
1720
- }, M = function(v, T) {
1721
- var f, B = p.meridiem;
1722
- if (B) {
1723
- for (var S = 1; S <= 24; S += 1) if (v.indexOf(B(S, 0, T)) > -1) {
1724
- f = S > 12;
1725
- break;
1726
- }
1727
- } else f = v === (T ? "pm" : "PM");
1728
- return f;
1729
- }, k = { A: [s, function(v) {
1730
- this.afternoon = M(v, !1);
1731
- }], a: [s, function(v) {
1732
- this.afternoon = M(v, !0);
1733
- }], Q: [n, function(v) {
1734
- this.month = 3 * (v - 1) + 1;
1735
- }], S: [n, function(v) {
1736
- this.milliseconds = 100 * +v;
1737
- }], SS: [o, function(v) {
1738
- this.milliseconds = 10 * +v;
1739
- }], SSS: [/\d{3}/, function(v) {
1740
- this.milliseconds = +v;
1741
- }], s: [a, y("seconds")], ss: [a, y("seconds")], m: [a, y("minutes")], mm: [a, y("minutes")], H: [a, y("hours")], h: [a, y("hours")], HH: [a, y("hours")], hh: [a, y("hours")], D: [a, y("day")], DD: [o, y("day")], Do: [s, function(v) {
1742
- var T = p.ordinal, f = v.match(/\d+/);
1743
- if (this.day = f[0], T) for (var B = 1; B <= 31; B += 1) T(B).replace(/\[|\]/g, "") === v && (this.day = B);
1744
- }], w: [a, y("week")], ww: [o, y("week")], M: [a, y("month")], MM: [o, y("month")], MMM: [s, function(v) {
1745
- var T = D("months"), f = (D("monthsShort") || T.map((function(B) {
1746
- return B.slice(0, 3);
1747
- }))).indexOf(v) + 1;
1748
- if (f < 1) throw new Error();
1749
- this.month = f % 12 || f;
1750
- }], MMMM: [s, function(v) {
1751
- var T = D("months").indexOf(v) + 1;
1752
- if (T < 1) throw new Error();
1753
- this.month = T % 12 || T;
1754
- }], Y: [/[+-]?\d+/, y("year")], YY: [o, function(v) {
1755
- this.year = F(v);
1756
- }], YYYY: [/\d{4}/, y("year")], Z: m, ZZ: m };
1757
- function L(v) {
1758
- var T, f;
1759
- T = v, f = p && p.formats;
1760
- for (var B = (v = T.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function($, w, P) {
1761
- var O = P && P.toUpperCase();
1762
- return w || f[P] || u[P] || f[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(l, i, c) {
1763
- return i || c.slice(1);
1764
- }));
1765
- }))).match(r), S = B.length, R = 0; R < S; R += 1) {
1766
- var b = B[R], h = k[b], I = h && h[0], d = h && h[1];
1767
- B[R] = d ? { regex: I, parser: d } : b.replace(/^\[|\]$/g, "");
1768
- }
1769
- return function($) {
1770
- for (var w = {}, P = 0, O = 0; P < S; P += 1) {
1771
- var l = B[P];
1772
- if (typeof l == "string") O += l.length;
1773
- else {
1774
- var i = l.regex, c = l.parser, C = $.slice(O), E = i.exec(C)[0];
1775
- c.call(w, E), $ = $.replace(E, "");
1776
- }
1777
- }
1778
- return (function(x) {
1779
- var A = x.afternoon;
1780
- if (A !== void 0) {
1781
- var _ = x.hours;
1782
- A ? _ < 12 && (x.hours += 12) : _ === 12 && (x.hours = 0), delete x.afternoon;
1783
- }
1784
- })(w), w;
1785
- };
1786
- }
1787
- return function(v, T, f) {
1788
- f.p.customParseFormat = !0, v && v.parseTwoDigitYear && (F = v.parseTwoDigitYear);
1789
- var B = T.prototype, S = B.parse;
1790
- B.parse = function(R) {
1791
- var b = R.date, h = R.utc, I = R.args;
1792
- this.$u = h;
1793
- var d = I[1];
1794
- if (typeof d == "string") {
1795
- var $ = I[2] === !0, w = I[3] === !0, P = $ || w, O = I[2];
1796
- w && (O = I[2]), p = this.$locale(), !$ && O && (p = f.Ls[O]), this.$d = (function(C, E, x, A) {
1797
- try {
1798
- if (["x", "X"].indexOf(E) > -1) return new Date((E === "X" ? 1e3 : 1) * C);
1799
- var _ = L(E)(C), N = _.year, z = _.month, V = _.day, W = _.hours, Z = _.minutes, X = _.seconds, j = _.milliseconds, q = _.zone, G = _.week, U = /* @__PURE__ */ new Date(), K = V || (N || z ? 1 : U.getDate()), J = N || U.getFullYear(), te = 0;
1800
- N && !z || (te = z > 0 ? z - 1 : U.getMonth());
1801
- var re, ne = W || 0, se = Z || 0, ce = X || 0, oe = j || 0;
1802
- return q ? new Date(Date.UTC(J, te, K, ne, se, ce, oe + 60 * q.offset * 1e3)) : x ? new Date(Date.UTC(J, te, K, ne, se, ce, oe)) : (re = new Date(J, te, K, ne, se, ce, oe), G && (re = A(re).week(G).toDate()), re);
1803
- } catch {
1804
- return /* @__PURE__ */ new Date("");
1805
- }
1806
- })(b, d, h, f), this.init(), O && O !== !0 && (this.$L = this.locale(O).$L), P && b != this.format(d) && (this.$d = /* @__PURE__ */ new Date("")), p = {};
1807
- } else if (d instanceof Array) for (var l = d.length, i = 1; i <= l; i += 1) {
1808
- I[1] = d[i - 1];
1809
- var c = f.apply(this, I);
1810
- if (c.isValid()) {
1811
- this.$d = c.$d, this.$L = c.$L, this.init();
1812
- break;
1813
- }
1814
- i === l && (this.$d = /* @__PURE__ */ new Date(""));
1815
- }
1816
- else S.call(this, R);
1817
- };
1818
- };
1819
- }));
1820
- })(Ve)), Ve.exports;
1821
- }
1822
- var Vr = Or();
1823
- const Yr = /* @__PURE__ */ Vu(Vr);
1824
- ke.extend(Yr);
1825
- function nt(t) {
1826
- return !!(t && ke(t, "YYYY-MM-DD", !0).isValid());
1827
- }
1828
- function Eu(t) {
1829
- return !!(t && ke(t, "YYYYMMDD", !0).isValid());
1830
- }
1831
- function ot(t) {
1832
- return t.replaceAll("-", "");
1833
- }
1834
- function eu(t) {
1835
- return Eu(t) ? ke(t, "YYYYMMDD", !0).format("YYYY-MM-DD") : t;
1836
- }
1837
- function Fu(t) {
1838
- const e = t.trim(), u = e.slice(0, 8);
1839
- return Eu(u) ? eu(u) : e.slice(0, 10);
1840
- }
1841
- function at(t, e) {
1842
- switch (e) {
1843
- case "instrumentCode":
1844
- return t.instrumentCode || ae;
1845
- case "scrtyCode":
1846
- return t.scrtyCode || ae;
1847
- case "fwdMaturityDate":
1848
- return t.fwdMaturityDate ? eu(t.fwdMaturityDate) : ae;
1849
- case "settleDate":
1850
- return t.settleDate ? eu(t.settleDate) : ae;
1851
- case "physicalDelivery":
1852
- return t.physicalDelivery === "1" ? "实物交割" : t.physicalDelivery === "2" ? "现金交割" : ae;
1853
- case "direction":
1854
- return t.direction === "L" ? "买入" : t.direction === "S" ? "卖出" : "";
1855
- case "fwdDlvPrice":
1856
- return t.fwdDlvPrice || ae;
1857
- default:
1858
- return ae;
1859
- }
1860
- }
1861
- function it(t, e, u) {
1862
- return e === "npv" ? Du(t?.npv, u) : e === "forwardPrice" ? Du(t?.forwardPrice, u, 8) : ut(t?.discountFactor, 4);
1863
- }
1864
- const Gr = ["npv", "forwardPrice", "discountFactor"], Ur = {
1865
- type: "fitCellContents",
1866
- skipHeader: !1,
1867
- scaleUpToFitGridWidth: !0,
1868
- defaultMinWidth: 112,
1869
- defaultMaxWidth: 240,
1870
- columnLimits: [{
1871
- colId: "npv",
1872
- minWidth: 190,
1873
- maxWidth: 220
1874
- }, {
1875
- colId: "forwardPrice",
1876
- minWidth: 220,
1877
- maxWidth: 260
1878
- }, {
1879
- colId: "discountFactor",
1880
- minWidth: 150,
1881
- maxWidth: 190
1882
- }]
1883
- }, Wr = ({
1884
- rowNode: t
1885
- }) => t.data?.kind === "error";
1886
- function Hr(t) {
1887
- const e = Y.c(3), {
1888
- data: u
1889
- } = t, r = String(u?.instrumentCode ?? "定价计算失败");
1890
- let n;
1891
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = {
1892
- icon: H.gridErrorIcon,
1893
- section: H.gridErrorSection
1894
- }, e[0] = n) : n = e[0];
1895
- let o;
1896
- return e[1] !== r ? (o = /* @__PURE__ */ g($e, { className: H.gridErrorAlert, classNames: n, type: "error", showIcon: !0, title: /* @__PURE__ */ ve("span", { className: H.gridErrorMessage, title: r, children: [
1897
- "计算失败,失败原因:",
1898
- r
1899
- ] }) }), e[1] = r, e[2] = o) : o = e[2], o;
1900
- }
1901
- function qr(t) {
1902
- const e = Y.c(15), {
1903
- contract: u,
1904
- calculation: r,
1905
- loading: n
1906
- } = t, o = ee(null), a = ee(null);
1907
- let s;
1908
- e[0] !== u ? (s = [{
1909
- id: "contract",
1910
- kind: "contract",
1911
- ...Object.fromEntries(Ke.map((f) => [f.key, f.kind === "contract" ? at(u, f.key) : ae]))
1912
- }], e[0] = u, e[1] = s) : s = e[1];
1913
- const p = s;
1914
- let F;
1915
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = Ke.map(Xr), e[2] = F) : F = e[2];
1916
- const y = F;
1917
- let m;
1918
- e[3] !== r || e[4] !== u.currency ? (m = (f) => {
1919
- const B = f.getRowNode("contract"), S = B?.data ? {
1920
- ...B.data
1921
- } : null;
1922
- if (Gr.forEach((R) => {
1923
- const b = r?.status === "success" ? it(r.result, R, u.currency) : ae;
1924
- B?.setDataValue(R, b), S && (S[R] = b);
1925
- }), B && S && B.setData(S), a.current && (f.applyTransaction({
1926
- remove: [a.current]
1927
- }), a.current = null), r?.status === "error") {
1928
- const R = {
1929
- id: "error",
1930
- kind: "error",
1931
- instrumentCode: r.message ?? "定价计算失败"
1932
- };
1933
- f.applyTransaction({
1934
- add: [R]
1935
- }), a.current = R;
1936
- }
1937
- f.resetRowHeights();
1938
- }, e[3] = r, e[4] = u.currency, e[5] = m) : m = e[5];
1939
- const D = m;
1940
- let M, k;
1941
- e[6] !== D ? (M = () => {
1942
- o.current && D(o.current);
1943
- }, k = [D], e[6] = D, e[7] = M, e[8] = k) : (M = e[7], k = e[8]), Ee(M, k);
1944
- let L;
1945
- e[9] !== D ? (L = (f) => {
1946
- o.current = f.api, D(f.api);
1947
- }, e[9] = D, e[10] = L) : L = e[10];
1948
- const v = L;
1949
- let T;
1950
- return e[11] !== n || e[12] !== v || e[13] !== p ? (T = /* @__PURE__ */ g("div", { className: H.fixedGrid, "aria-label": "单笔合约定价结果", children: /* @__PURE__ */ g(du, { rowData: p, columnDefs: y, onGridReady: v, getRowId: jr, isFullWidthRow: Wr, fullWidthCellRenderer: Hr, getRowHeight: Zr, headerHeight: 32, rowHeight: 32, autoSizeStrategy: Ur, autoSizePadding: 16, suppressColumnVirtualisation: !0, tooltipShowMode: "whenTruncated", tooltipShowDelay: 0, domLayout: "autoHeight", pagination: !1, loading: n, suppressCellFocus: !0, suppressDragLeaveHidesColumns: !0 }) }), e[11] = n, e[12] = v, e[13] = p, e[14] = T) : T = e[14], T;
1951
- }
1952
- function Zr(t) {
1953
- return t.data?.kind === "error" ? 28 : 32;
1954
- }
1955
- function jr(t) {
1956
- return t.data.id;
1957
- }
1958
- function Xr(t) {
1959
- return {
1960
- field: t.key,
1961
- colId: t.key,
1962
- headerName: t.label,
1963
- headerTooltip: t.label,
1964
- width: t.kind === "result" ? 148 : 128,
1965
- minWidth: t.kind === "result" ? 148 : 112,
1966
- sortable: !1,
1967
- resizable: !1,
1968
- suppressMovable: !0,
1969
- cellRenderer: (e) => t.kind === "result" ? /* @__PURE__ */ g(tt, { value: String(e.value ?? ae) }) : /* @__PURE__ */ g(rt, { field: t.key, value: String(e.value ?? ae) })
1970
- };
1971
- }
1972
- const Cu = ue((t, e) => {
1973
- const u = Y.c(3);
1974
- let r;
1975
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Rt, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
1976
- });
1977
- Cu.displayName = "GZTooltip";
1978
- const Qr = ["npv", "forwardPrice", "discountFactor"], bu = {
1979
- kind: "empty",
1980
- display: ae
1981
- };
1982
- function Ge(t) {
1983
- return !!(t && typeof t == "object" && "kind" in t);
1984
- }
1985
- function Jr(t) {
1986
- const e = Y.c(18), {
1987
- contracts: u,
1988
- results: r,
1989
- loading: n
1990
- } = t, o = ee(null);
1991
- let a;
1992
- e[0] !== u ? (a = Ke.map((f) => ({
1993
- id: f.key,
1994
- label: f.label,
1995
- kind: f.kind,
1996
- ...Object.fromEntries(u.map((B) => [B.contractId, f.kind === "contract" ? at(B, f.key) : bu]))
1997
- })), e[0] = u, e[1] = a) : a = e[1];
1998
- const s = a;
1999
- let p;
2000
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = {
2001
- field: "label",
2002
- colId: "field",
2003
- headerName: "字段",
2004
- pinned: "left",
2005
- lockPinned: !0,
2006
- width: 180,
2007
- minWidth: 180,
2008
- sortable: !1,
2009
- resizable: !1,
2010
- suppressMovable: !0,
2011
- cellClass: H.fieldCell
2012
- }, e[2] = p) : p = e[2];
2013
- let F;
2014
- e[3] !== u ? (F = [p, ...u.map(en)], e[3] = u, e[4] = F) : F = e[4];
2015
- const y = F;
2016
- let m;
2017
- e[5] !== u || e[6] !== r ? (m = (f) => {
2018
- Qr.forEach((B) => {
2019
- const S = f.getRowNode(B);
2020
- if (!S?.data)
2021
- return;
2022
- const R = {
2023
- ...S.data
2024
- };
2025
- u.forEach((b) => {
2026
- const h = r[b.contractId];
2027
- let I = bu;
2028
- h?.status === "success" ? I = {
2029
- kind: "value",
2030
- display: it(h.result, B, b.currency),
2031
- rawValue: h.result?.[B]
2032
- } : h?.status === "error" && (I = {
2033
- kind: "error",
2034
- display: h.message ?? "定价计算失败"
2035
- }), S.setDataValue(b.contractId, I), R[b.contractId] = I;
2036
- }), S.setData(R);
2037
- }), f.refreshCells({
2038
- force: !0
2039
- }), f.resetRowHeights();
2040
- }, e[5] = u, e[6] = r, e[7] = m) : m = e[7];
2041
- const D = m;
2042
- let M, k;
2043
- e[8] !== D ? (M = () => {
2044
- o.current && D(o.current);
2045
- }, k = [D], e[8] = D, e[9] = M, e[10] = k) : (M = e[9], k = e[10]), Ee(M, k);
2046
- let L;
2047
- e[11] !== D ? (L = (f) => {
2048
- o.current = f.api, D(f.api);
2049
- }, e[11] = D, e[12] = L) : L = e[12];
2050
- const v = L;
2051
- let T;
2052
- return e[13] !== y || e[14] !== n || e[15] !== v || e[16] !== s ? (T = /* @__PURE__ */ g("div", { className: H.multipleGrid, "aria-label": "多笔合约定价结果", children: /* @__PURE__ */ g(du, { rowData: s, columnDefs: y, onGridReady: v, getRowId: Kr, headerHeight: 32, rowHeight: 28, domLayout: "autoHeight", pagination: !1, loading: n, enableCellSpan: !0, suppressCellFocus: !0, suppressDragLeaveHidesColumns: !0 }) }), e[13] = y, e[14] = n, e[15] = v, e[16] = s, e[17] = T) : T = e[17], T;
2053
- }
2054
- function Kr(t) {
2055
- return t.data.id;
2056
- }
2057
- function en(t, e) {
2058
- return {
2059
- field: t.contractId,
2060
- colId: t.contractId,
2061
- headerName: String(e + 1).padStart(3, "0"),
2062
- flex: 1,
2063
- width: 180,
2064
- minWidth: 180,
2065
- sortable: !1,
2066
- resizable: !1,
2067
- suppressMovable: !0,
2068
- spanRows: rn,
2069
- cellClass: tn,
2070
- cellRenderer: un
2071
- };
2072
- }
2073
- function un(t) {
2074
- const e = t.data?.id, u = t.value;
2075
- if (Ge(u)) {
2076
- if (u.kind === "error") {
2077
- const r = `计算失败,失败原因:${u.display}`;
2078
- return /* @__PURE__ */ g(Cu, { title: r, children: /* @__PURE__ */ g("div", { className: H.mergedErrorCell, children: /* @__PURE__ */ g("span", { className: H.mergedErrorText, children: r }) }) });
2079
- }
2080
- return /* @__PURE__ */ g(tt, { value: u.display, rawValue: u.rawValue });
2081
- }
2082
- return e ? /* @__PURE__ */ g(rt, { field: e, value: String(u ?? ae) }) : null;
2083
- }
2084
- function tn(t) {
2085
- return Ge(t.value) && t.value.kind === "error" ? H.mergedErrorGridCell : void 0;
2086
- }
2087
- function rn(t) {
2088
- const e = t.valueA, u = t.valueB;
2089
- return Ge(e) && Ge(u) && e.kind === "error" && u.kind === "error" && e.display === u.display;
2090
- }
2091
- const lt = ue((t, e) => {
2092
- const u = Y.c(3);
2093
- let r;
2094
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Ae.MonthPicker, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
2095
- });
2096
- lt.displayName = "GZMonthPicker";
2097
- const st = ue((t, e) => {
2098
- const u = Y.c(3);
2099
- let r;
2100
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Ae.QuarterPicker, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
2101
- });
2102
- st.displayName = "GZQuarterPicker";
2103
- const ct = ue((t, e) => {
2104
- const u = Y.c(7);
2105
- let r, n;
2106
- u[0] !== t ? ({
2107
- children: r,
2108
- ...n
2109
- } = t, u[0] = t, u[1] = r, u[2] = n) : (r = u[1], n = u[2]);
2110
- let o;
2111
- return u[3] !== r || u[4] !== e || u[5] !== n ? (o = /* @__PURE__ */ g(Ae.RangePicker, { ref: e, ...n, children: r }), u[3] = r, u[4] = e, u[5] = n, u[6] = o) : o = u[6], o;
2112
- });
2113
- ct.displayName = "GZRangePicker";
2114
- const dt = ue((t, e) => {
2115
- const u = Y.c(3);
2116
- let r;
2117
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Ae.TimePicker, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
2118
- });
2119
- dt.displayName = "GZTimePicker";
2120
- const mt = ue((t, e) => {
2121
- const u = Y.c(3);
2122
- let r;
2123
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Ae.WeekPicker, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
2124
- });
2125
- mt.displayName = "GZWeekPicker";
2126
- const Et = ue((t, e) => {
2127
- const u = Y.c(3);
2128
- let r;
2129
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Ae.YearPicker, { ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
2130
- });
2131
- Et.displayName = "GZYearPicker";
2132
- const nn = ue((t, e) => {
2133
- const u = Y.c(3);
2134
- let r;
2135
- return u[0] !== t || u[1] !== e ? (r = /* @__PURE__ */ g(Ae, { format: "YYYY-MM-DD", ref: e, ...t }), u[0] = t, u[1] = e, u[2] = r) : r = u[2], r;
2136
- }), Be = nn;
2137
- Be.RangePicker = ct;
2138
- Be.WeekPicker = mt;
2139
- Be.MonthPicker = lt;
2140
- Be.YearPicker = Et;
2141
- Be.QuarterPicker = st;
2142
- Be.TimePicker = dt;
2143
- Be.displayName = "GZDatePicker";
2144
- const Ft = ue((t, e) => {
2145
- const u = Y.c(7);
2146
- let r, n;
2147
- u[0] !== t ? ({
2148
- children: r,
2149
- ...n
2150
- } = t, u[0] = t, u[1] = r, u[2] = n) : (r = u[1], n = u[2]);
2151
- const o = n;
2152
- let a;
2153
- return u[3] !== r || u[4] !== e || u[5] !== o ? (a = /* @__PURE__ */ g(De, { ref: e, ...o, children: r }), u[3] = r, u[4] = e, u[5] = o, u[6] = a) : a = u[6], a;
2154
- });
2155
- Ft.displayName = "GZForm";
2156
- const Ct = (t) => {
2157
- const e = Y.c(6);
2158
- let u, r;
2159
- e[0] !== t ? ({
2160
- children: u,
2161
- ...r
2162
- } = t, e[0] = t, e[1] = u, e[2] = r) : (u = e[1], r = e[2]);
2163
- const n = r;
2164
- let o;
2165
- return e[3] !== u || e[4] !== n ? (o = /* @__PURE__ */ g(De.Item, { ...n, children: u }), e[3] = u, e[4] = n, e[5] = o) : o = e[5], o;
2166
- };
2167
- Ct.displayName = "GZFormItem";
2168
- const ft = (t) => {
2169
- const e = Y.c(2);
2170
- let u;
2171
- return e[0] !== t ? (u = /* @__PURE__ */ g(De.List, { ...t }), e[0] = t, e[1] = u) : u = e[1], u;
2172
- };
2173
- ft.displayName = "GZFormList";
2174
- const gt = (t) => {
2175
- const e = Y.c(2);
2176
- let u;
2177
- return e[0] !== t ? (u = /* @__PURE__ */ g(De.ErrorList, { ...t }), e[0] = t, e[1] = u) : u = e[1], u;
2178
- };
2179
- gt.displayName = "GZErrorList";
2180
- const pt = (t) => {
2181
- const e = Y.c(2);
2182
- let u;
2183
- return e[0] !== t ? (u = /* @__PURE__ */ g(De.Provider, { ...t }), e[0] = t, e[1] = u) : u = e[1], u;
2184
- };
2185
- pt.displayName = "GZFormProvider";
2186
- const Ce = Ft;
2187
- Ce.Item = Ct;
2188
- Ce.List = ft;
2189
- Ce.ErrorList = gt;
2190
- Ce.Provider = pt;
2191
- Ce.useForm = De.useForm;
2192
- Ce.useFormInstance = De.useFormInstance;
2193
- Ce.useWatch = De.useWatch;
2194
- const vt = ue((t, e) => {
2195
- const u = Y.c(7);
2196
- let r, n;
2197
- u[0] !== t ? ({
2198
- children: r,
2199
- ...n
2200
- } = t, u[0] = t, u[1] = r, u[2] = n) : (r = u[1], n = u[2]);
2201
- const o = e;
2202
- let a;
2203
- return u[3] !== r || u[4] !== n || u[5] !== o ? (a = /* @__PURE__ */ g(ou.Option, { ref: o, ...n, children: r }), u[3] = r, u[4] = n, u[5] = o, u[6] = a) : a = u[6], a;
2204
- });
2205
- vt.displayName = "GZSelectOption";
2206
- const ht = ue((t, e) => {
2207
- const u = Y.c(7);
2208
- let r, n;
2209
- u[0] !== t ? ({
2210
- children: r,
2211
- ...n
2212
- } = t, u[0] = t, u[1] = r, u[2] = n) : (r = u[1], n = u[2]);
2213
- const o = e;
2214
- let a;
2215
- return u[3] !== r || u[4] !== n || u[5] !== o ? (a = /* @__PURE__ */ g(ou.OptGroup, { ref: o, ...n, children: r }), u[3] = r, u[4] = n, u[5] = o, u[6] = a) : a = u[6], a;
2216
- });
2217
- ht.displayName = "GZSelectOptGroup";
2218
- const on = ue((t, e) => {
2219
- const u = Y.c(3), r = e;
2220
- let n;
2221
- return u[0] !== t || u[1] !== r ? (n = /* @__PURE__ */ g(ou, { ref: r, ...t }), u[0] = t, u[1] = r, u[2] = n) : n = u[2], n;
2222
- }), xe = on;
2223
- xe.Option = vt;
2224
- xe.OptGroup = ht;
2225
- xe.displayName = "GZSelect";
2226
- function Au(t, e) {
2227
- if (t?.source !== "custom" || !e) return;
2228
- const u = t.executeDay ? Fu(t.executeDay) : void 0;
2229
- return !u || u !== e ? "曲线日与估值日非同一日" : void 0;
2230
- }
2231
- function an(t) {
2232
- const e = {};
2233
- return Object.keys(hu).forEach((u) => {
2234
- t[u] || (e[u] = [hu[u]]);
2235
- }), t.valuationDate && !nt(t.valuationDate) && (e.valuationDate = ["估值日格式必须为 YYYY-MM-DD"]), e;
2236
- }
2237
- function ln(t, e) {
2238
- if (!t || !nt(t) || e.length === 0)
2239
- return {
2240
- latestSettlementDate: null,
2241
- valid: !0,
2242
- message: null
2243
- };
2244
- const u = e.map((o) => o.settleDate);
2245
- if (u.some((o) => !Eu(o)))
2246
- return {
2247
- latestSettlementDate: null,
2248
- valid: !0,
2249
- message: null
2250
- };
2251
- const r = u.reduce((o, a) => a > o ? a : o), n = ot(t) <= r;
2252
- return {
2253
- latestSettlementDate: r,
2254
- valid: n,
2255
- message: n ? null : "估值日必须小于或等于所选合约最久的结算支付日"
2256
- };
2257
- }
2258
- function Le(t) {
2259
- return {
2260
- validateStatus: t?.length ? "error" : void 0,
2261
- help: t?.join(";")
2262
- };
2263
- }
2264
- function Dt(t, e, u = "") {
2265
- return t && e ? `${t}(${e})` : t || e || u;
2266
- }
2267
- function uu(t) {
2268
- if (!t) return "";
2269
- const e = Dt(t.name, t.code, t.label);
2270
- return t.source === "custom" && t.executeDay ? `${e}-${Fu(t.executeDay)}` : e;
2271
- }
2272
- function Ne(t) {
2273
- const e = Y.c(7), {
2274
- text: u
2275
- } = t, r = ee(null), [n, o] = we(!1);
2276
- let a;
2277
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (F) => {
2278
- const y = r.current, m = !!(y && y.scrollWidth > y.clientWidth);
2279
- o(F && m);
2280
- }, e[0] = a) : a = e[0];
2281
- let s;
2282
- e[1] !== u ? (s = /* @__PURE__ */ g("span", { ref: r, className: H.contextFormLabelText, children: u }), e[1] = u, e[2] = s) : s = e[2];
2283
- let p;
2284
- return e[3] !== s || e[4] !== u || e[5] !== n ? (p = /* @__PURE__ */ g(Cu, { title: u, open: n, onOpenChange: a, children: s }), e[3] = s, e[4] = u, e[5] = n, e[6] = p) : p = e[6], p;
2285
- }
2286
- function sn(t) {
2287
- const e = Y.c(107), {
2288
- mode: u,
2289
- value: r,
2290
- errors: n,
2291
- environments: o,
2292
- discountCurves: a,
2293
- carbonForwardCurves: s,
2294
- environmentsLoading: p,
2295
- curvesLoading: F,
2296
- curvesDisabled: y,
2297
- disabled: m,
2298
- onChange: D
2299
- } = t;
2300
- let M;
2301
- e[0] !== o ? (M = o.map(mn), e[0] = o, e[1] = M) : M = e[1];
2302
- const k = M, L = cn;
2303
- let v;
2304
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = {
2305
- popup: {
2306
- root: H.selectPopup,
2307
- listItem: H.selectPopupListItem
2308
- }
2309
- }, e[2] = v) : v = e[2];
2310
- const T = u === "fixedSingle" ? 420 : 432;
2311
- let f;
2312
- e[3] !== T ? (f = {
2313
- popupMatchSelectWidth: !1,
2314
- classNames: v,
2315
- styles: {
2316
- popup: {
2317
- root: {
2318
- maxWidth: T
2319
- }
2320
- }
2321
- }
2322
- }, e[3] = T, e[4] = f) : f = e[4];
2323
- const B = f;
2324
- let S, R;
2325
- e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
2326
- flex: "0 0 var(--pricing-form-label-width)"
2327
- }, R = {
2328
- flex: "0 0 var(--pricing-form-control-width)"
2329
- }, e[5] = S, e[6] = R) : (S = e[5], R = e[6]);
2330
- const b = `${H.contextForm} ${H[u]}`;
2331
- let h;
2332
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = {
2333
- label: H.contextFormLabel,
2334
- content: H.contextFormContent
2335
- }, e[7] = h) : h = e[7];
2336
- let I;
2337
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ g(Ne, { text: "定价环境" }), e[8] = I) : I = e[8];
2338
- let d;
2339
- e[9] !== n.pricingEnvironment ? (d = Le(n.pricingEnvironment), e[9] = n.pricingEnvironment, e[10] = d) : d = e[10];
2340
- const $ = r.pricingEnvironment?.id;
2341
- let w;
2342
- e[11] !== r.pricingEnvironment?.code || e[12] !== r.pricingEnvironment?.name ? (w = () => Dt(r.pricingEnvironment?.name, r.pricingEnvironment?.code), e[11] = r.pricingEnvironment?.code, e[12] = r.pricingEnvironment?.name, e[13] = w) : w = e[13];
2343
- let P;
2344
- e[14] !== o || e[15] !== D ? (P = (Q) => D("pricingEnvironment", o.find((ge) => ge.id === Q) ?? null), e[14] = o, e[15] = D, e[16] = P) : P = e[16];
2345
- let O;
2346
- e[17] !== D ? (O = () => D("pricingEnvironment", null), e[17] = D, e[18] = O) : O = e[18];
2347
- let l;
2348
- e[19] !== m || e[20] !== k || e[21] !== p || e[22] !== B || e[23] !== $ || e[24] !== w || e[25] !== P || e[26] !== O ? (l = /* @__PURE__ */ g(xe, { ...B, "aria-label": "定价环境", allowClear: !0, showSearch: !0, optionFilterProp: "label", loading: p, disabled: m, placeholder: "请选择定价环境", options: k, value: $, labelRender: w, onChange: P, onClear: O }), e[19] = m, e[20] = k, e[21] = p, e[22] = B, e[23] = $, e[24] = w, e[25] = P, e[26] = O, e[27] = l) : l = e[27];
2349
- let i;
2350
- e[28] !== l || e[29] !== d ? (i = /* @__PURE__ */ g(Ce.Item, { className: H.contextFormItem, label: I, required: !0, ...d, children: l }), e[28] = l, e[29] = d, e[30] = i) : i = e[30];
2351
- let c;
2352
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ g(Ne, { text: "碳金融远期价格曲线" }), e[31] = c) : c = e[31];
2353
- let C;
2354
- e[32] !== r.carbonForwardCurve || e[33] !== r.valuationDate ? (C = Au(r.carbonForwardCurve, r.valuationDate), e[32] = r.carbonForwardCurve, e[33] = r.valuationDate, e[34] = C) : C = e[34];
2355
- let E;
2356
- e[35] !== n.carbonForwardCurve ? (E = Le(n.carbonForwardCurve), e[35] = n.carbonForwardCurve, e[36] = E) : E = e[36];
2357
- const x = m || y;
2358
- let A;
2359
- e[37] !== s ? (A = L(s), e[37] = s, e[38] = A) : A = e[38];
2360
- const _ = r.carbonForwardCurve?.key;
2361
- let N;
2362
- e[39] !== r.carbonForwardCurve ? (N = () => uu(r.carbonForwardCurve), e[39] = r.carbonForwardCurve, e[40] = N) : N = e[40];
2363
- let z;
2364
- e[41] !== s || e[42] !== D ? (z = (Q) => D("carbonForwardCurve", s.find((ge) => ge.key === Q) ?? null), e[41] = s, e[42] = D, e[43] = z) : z = e[43];
2365
- let V;
2366
- e[44] !== D ? (V = () => D("carbonForwardCurve", null), e[44] = D, e[45] = V) : V = e[45];
2367
- let W;
2368
- e[46] !== F || e[47] !== B || e[48] !== x || e[49] !== A || e[50] !== _ || e[51] !== N || e[52] !== z || e[53] !== V ? (W = /* @__PURE__ */ g(xe, { ...B, "aria-label": "碳金融远期价格曲线", allowClear: !0, showSearch: !0, optionFilterProp: "label", loading: F, disabled: x, placeholder: "请选择碳金融远期价格曲线", options: A, value: _, labelRender: N, onChange: z, onClear: V }), e[46] = F, e[47] = B, e[48] = x, e[49] = A, e[50] = _, e[51] = N, e[52] = z, e[53] = V, e[54] = W) : W = e[54];
2369
- let Z;
2370
- e[55] !== C || e[56] !== E || e[57] !== W ? (Z = /* @__PURE__ */ g(Ce.Item, { className: H.contextFormItem, label: c, required: !0, extra: C, ...E, children: W }), e[55] = C, e[56] = E, e[57] = W, e[58] = Z) : Z = e[58];
2371
- let X;
2372
- e[59] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = /* @__PURE__ */ g(Ne, { text: "无风险利率曲线" }), e[59] = X) : X = e[59];
2373
- let j;
2374
- e[60] !== r.discountCurve || e[61] !== r.valuationDate ? (j = Au(r.discountCurve, r.valuationDate), e[60] = r.discountCurve, e[61] = r.valuationDate, e[62] = j) : j = e[62];
2375
- let q;
2376
- e[63] !== n.discountCurve ? (q = Le(n.discountCurve), e[63] = n.discountCurve, e[64] = q) : q = e[64];
2377
- const G = m || y;
2378
- let U;
2379
- e[65] !== a ? (U = L(a), e[65] = a, e[66] = U) : U = e[66];
2380
- const K = r.discountCurve?.key;
2381
- let J;
2382
- e[67] !== r.discountCurve ? (J = () => uu(r.discountCurve), e[67] = r.discountCurve, e[68] = J) : J = e[68];
2383
- let te;
2384
- e[69] !== a || e[70] !== D ? (te = (Q) => D("discountCurve", a.find((ge) => ge.key === Q) ?? null), e[69] = a, e[70] = D, e[71] = te) : te = e[71];
2385
- let re;
2386
- e[72] !== D ? (re = () => D("discountCurve", null), e[72] = D, e[73] = re) : re = e[73];
2387
- let ne;
2388
- e[74] !== F || e[75] !== B || e[76] !== G || e[77] !== U || e[78] !== K || e[79] !== J || e[80] !== te || e[81] !== re ? (ne = /* @__PURE__ */ g(xe, { ...B, "aria-label": "无风险利率曲线", allowClear: !0, showSearch: !0, optionFilterProp: "label", loading: F, disabled: G, placeholder: "请选择无风险利率曲线利率曲线", options: U, value: K, labelRender: J, onChange: te, onClear: re }), e[74] = F, e[75] = B, e[76] = G, e[77] = U, e[78] = K, e[79] = J, e[80] = te, e[81] = re, e[82] = ne) : ne = e[82];
2389
- let se;
2390
- e[83] !== j || e[84] !== q || e[85] !== ne ? (se = /* @__PURE__ */ g(Ce.Item, { className: H.contextFormItem, label: X, required: !0, extra: j, ...q, children: ne }), e[83] = j, e[84] = q, e[85] = ne, e[86] = se) : se = e[86];
2391
- let ce;
2392
- e[87] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = /* @__PURE__ */ g(Ne, { text: "估值日" }), e[87] = ce) : ce = e[87];
2393
- let oe;
2394
- e[88] !== n.valuationDate ? (oe = Le(n.valuationDate), e[88] = n.valuationDate, e[89] = oe) : oe = e[89];
2395
- let de;
2396
- e[90] !== r.valuationDate ? (de = r.valuationDate ? ke(r.valuationDate) : null, e[90] = r.valuationDate, e[91] = de) : de = e[91];
2397
- let Fe;
2398
- e[92] !== D ? (Fe = (Q) => {
2399
- const ge = Array.isArray(Q) ? Q[0] : Q;
2400
- D("valuationDate", ge?.format("YYYY-MM-DD") ?? null);
2401
- }, e[92] = D, e[93] = Fe) : Fe = e[93];
2402
- let fe;
2403
- e[94] !== m || e[95] !== de || e[96] !== Fe ? (fe = /* @__PURE__ */ g(Be, { "aria-label": "估值日", allowClear: !0, disabled: m, value: de, onChange: Fe }), e[94] = m, e[95] = de, e[96] = Fe, e[97] = fe) : fe = e[97];
2404
- let ie;
2405
- e[98] !== oe || e[99] !== fe ? (ie = /* @__PURE__ */ g(Ce.Item, { className: H.contextFormItem, label: ce, required: !0, ...oe, children: fe }), e[98] = oe, e[99] = fe, e[100] = ie) : ie = e[100];
2406
- let he;
2407
- return e[101] !== i || e[102] !== Z || e[103] !== se || e[104] !== ie || e[105] !== b ? (he = /* @__PURE__ */ ve(Ce, { component: "div", layout: "horizontal", labelAlign: "right", labelCol: S, wrapperCol: R, colon: !1, requiredMark: !0, className: b, classNames: h, children: [
2408
- i,
2409
- Z,
2410
- se,
2411
- ie
2412
- ] }), e[101] = i, e[102] = Z, e[103] = se, e[104] = ie, e[105] = b, e[106] = he) : he = e[106], he;
2413
- }
2414
- function cn(t) {
2415
- return t.map(dn);
2416
- }
2417
- function dn(t) {
2418
- return {
2419
- label: uu(t),
2420
- value: t.key
2421
- };
2422
- }
2423
- function mn(t) {
2424
- return {
2425
- label: `${t.name}(${t.code})`,
2426
- value: t.id
2427
- };
2428
- }
2429
- function En(t) {
2430
- const e = Y.c(16), {
2431
- mode: u,
2432
- allDisabled: r,
2433
- calculateDisabled: n,
2434
- submitting: o,
2435
- onReset: a,
2436
- onNavigateToPricingPage: s,
2437
- onCalculate: p
2438
- } = t, F = r || o;
2439
- let y;
2440
- e[0] !== a || e[1] !== F ? (y = /* @__PURE__ */ g(Te, { disabled: F, onClick: a, children: "重置" }), e[0] = a, e[1] = F, e[2] = y) : y = e[2];
2441
- let m;
2442
- e[3] !== r || e[4] !== u || e[5] !== s || e[6] !== o ? (m = u === "fixedSingle" ? /* @__PURE__ */ g(Te, { disabled: r || o || !s, onClick: s, children: "转定价界面" }) : null, e[3] = r, e[4] = u, e[5] = s, e[6] = o, e[7] = m) : m = e[7];
2443
- const D = r || n;
2444
- let M;
2445
- e[8] !== p || e[9] !== o || e[10] !== D ? (M = /* @__PURE__ */ g(Te, { type: "primary", loading: o, disabled: D, onClick: p, children: "计算" }), e[8] = p, e[9] = o, e[10] = D, e[11] = M) : M = e[11];
2446
- let k;
2447
- return e[12] !== y || e[13] !== m || e[14] !== M ? (k = /* @__PURE__ */ ve("div", { className: H.footer, children: [
2448
- y,
2449
- m,
2450
- M
2451
- ] }), e[12] = y, e[13] = m, e[14] = M, e[15] = k) : k = e[15], k;
2452
- }
2453
- const Fn = {
2454
- environments: "定价环境",
2455
- discountDefinitions: "无风险利率曲线定义",
2456
- customDiscountCurves: "自定义无风险利率曲线",
2457
- carbonDefinitions: "碳金融远期价格曲线定义",
2458
- customCarbonCurves: "自定义碳金融远期价格曲线"
2459
- };
2460
- function Cn(t) {
2461
- const e = Y.c(9), {
2462
- resources: u,
2463
- onRetry: r
2464
- } = t;
2465
- let n;
2466
- e[0] !== u ? (n = Object.keys(u), e[0] = u, e[1] = n) : n = e[1];
2467
- const o = n;
2468
- let a;
2469
- e[2] !== u || e[3] !== o ? (a = o.filter((F) => u[F].status === "error"), e[2] = u, e[3] = o, e[4] = a) : a = e[4];
2470
- const s = a;
2471
- if (s.length === 0)
2472
- return null;
2473
- let p;
2474
- return e[5] !== s || e[6] !== r || e[7] !== u ? (p = /* @__PURE__ */ g("div", { className: H.resourceIssues, "aria-label": "资源加载异常", children: s.map((F) => {
2475
- const y = u[F], m = y.attempts >= Je;
2476
- return /* @__PURE__ */ g($e, { type: "error", showIcon: !0, title: `${Fn[F]}加载失败`, description: m ? `${y.error ?? "未知错误"}(已达到 3 次尝试上限)` : y.error, action: /* @__PURE__ */ g(Te, { size: "small", disabled: m, onClick: () => r(F), children: "重试" }) }, F);
2477
- }) }), e[5] = s, e[6] = r, e[7] = u, e[8] = p) : p = e[8], p;
2478
- }
2479
- function _e(t) {
2480
- return {
2481
- status: "idle",
2482
- data: t,
2483
- error: null,
2484
- attempts: 0
2485
- };
2486
- }
2487
- function fn(t, e = {}) {
2488
- return {
2489
- context: {
2490
- ...Zu,
2491
- ...e
2492
- },
2493
- contextErrors: {},
2494
- resources: {
2495
- environments: _e([]),
2496
- discountDefinitions: _e([]),
2497
- customDiscountCurves: _e([]),
2498
- carbonDefinitions: _e([]),
2499
- customCarbonCurves: _e([])
2500
- },
2501
- environmentCurvesStatus: "idle",
2502
- environmentCurvesError: null,
2503
- environmentCurvesAttempts: 0,
2504
- resultByContractId: Object.fromEntries(t.map((u) => [u, {
2505
- contractId: u,
2506
- status: "idle",
2507
- result: null,
2508
- message: null,
2509
- resultInputVersion: null
2510
- }])),
2511
- inputVersion: 0,
2512
- submitting: !1
2513
- };
2514
- }
2515
- function Su(t) {
2516
- return Object.fromEntries(Object.keys(t.resultByContractId).map((e) => [e, {
2517
- contractId: e,
2518
- status: "idle",
2519
- result: null,
2520
- message: null,
2521
- resultInputVersion: null
2522
- }]));
2523
- }
2524
- function gn(t, e) {
2525
- switch (e.type) {
2526
- case "resource/loading": {
2527
- const u = t.resources[e.key];
2528
- return {
2529
- ...t,
2530
- resources: {
2531
- ...t.resources,
2532
- [e.key]: {
2533
- ...u,
2534
- status: "loading",
2535
- error: null,
2536
- attempts: u.attempts + 1
2537
- }
2538
- }
2539
- };
2540
- }
2541
- case "resource/success":
2542
- return {
2543
- ...t,
2544
- resources: {
2545
- ...t.resources,
2546
- [e.key]: {
2547
- ...t.resources[e.key],
2548
- status: e.data.length === 0 ? "empty" : "success",
2549
- data: e.data,
2550
- error: null
2551
- }
2552
- }
2553
- };
2554
- case "resource/error":
2555
- return {
2556
- ...t,
2557
- resources: {
2558
- ...t.resources,
2559
- [e.key]: {
2560
- ...t.resources[e.key],
2561
- status: "error",
2562
- error: e.error
2563
- }
2564
- }
2565
- };
2566
- case "context/set": {
2567
- const u = e.field === "pricingEnvironment", r = {
2568
- ...t.context,
2569
- [e.field]: e.value,
2570
- ...u ? {
2571
- discountCurve: null,
2572
- carbonForwardCurve: null
2573
- } : void 0
2574
- }, n = {
2575
- ...t.contextErrors
2576
- };
2577
- return delete n[e.field], u && (delete n.discountCurve, delete n.carbonForwardCurve), {
2578
- ...t,
2579
- context: r,
2580
- contextErrors: n,
2581
- environmentCurvesStatus: u ? "idle" : t.environmentCurvesStatus,
2582
- environmentCurvesError: u ? null : t.environmentCurvesError,
2583
- environmentCurvesAttempts: u ? 0 : t.environmentCurvesAttempts,
2584
- resultByContractId: Su(t),
2585
- inputVersion: t.inputVersion + 1,
2586
- submitting: !1
2587
- };
2588
- }
2589
- case "context/errors":
2590
- return {
2591
- ...t,
2592
- contextErrors: e.errors
2593
- };
2594
- case "environment-curves/loading":
2595
- return {
2596
- ...t,
2597
- environmentCurvesStatus: "loading",
2598
- environmentCurvesError: null,
2599
- environmentCurvesAttempts: t.environmentCurvesAttempts + 1
2600
- };
2601
- case "environment-curves/error":
2602
- return {
2603
- ...t,
2604
- environmentCurvesStatus: "error",
2605
- environmentCurvesError: e.error
2606
- };
2607
- case "environment-curves/success":
2608
- return {
2609
- ...t,
2610
- context: {
2611
- ...t.context,
2612
- discountCurve: e.discountCurve,
2613
- carbonForwardCurve: e.carbonForwardCurve
2614
- },
2615
- environmentCurvesStatus: e.discountCurve && e.carbonForwardCurve ? "success" : "empty",
2616
- environmentCurvesError: null,
2617
- environmentCurvesAttempts: 0
2618
- };
2619
- case "calculation/submitting":
2620
- return {
2621
- ...t,
2622
- submitting: !0,
2623
- resultByContractId: Object.fromEntries(e.contractIds.map((u) => [u, {
2624
- contractId: u,
2625
- status: "submitting",
2626
- result: null,
2627
- message: null,
2628
- resultInputVersion: null
2629
- }]))
2630
- };
2631
- case "calculation/settled":
2632
- return {
2633
- ...t,
2634
- submitting: !1,
2635
- resultByContractId: e.results
2636
- };
2637
- case "reset":
2638
- return {
2639
- ...t,
2640
- context: {
2641
- ...Zu
2642
- },
2643
- contextErrors: {},
2644
- environmentCurvesStatus: "idle",
2645
- environmentCurvesError: null,
2646
- environmentCurvesAttempts: 0,
2647
- resultByContractId: Su(t),
2648
- inputVersion: t.inputVersion + 1,
2649
- submitting: !1
2650
- };
2651
- }
2652
- }
2653
- const pn = "3", vn = "11";
2654
- function be(t) {
2655
- return typeof t == "object" && t !== null;
2656
- }
2657
- function hn(t) {
2658
- return be(t) && typeof t.key == "string" && typeof t.id == "string" && typeof t.label == "string" && (t.kind === "discount" || t.kind === "carbonForward") && (t.source === "definition" || t.source === "custom") && be(t.requestMapping);
2659
- }
2660
- function Dn(t) {
2661
- return !Array.isArray(t) && be(t) && be(t.discountCurve) && be(t.carbonForwardCurve);
2662
- }
2663
- function Bt(t, e, u) {
2664
- const r = t && e ? `${e}(${t})` : e || t;
2665
- return u ? `${r}-${Fu(u)}` : r;
2666
- }
2667
- function Ue(t, e) {
2668
- return Array.isArray(t) ? t.flatMap((u) => {
2669
- if (hn(u)) return [u];
2670
- if (!be(u)) return [];
2671
- const r = u[e.idField];
2672
- if (r == null || r === "") return [];
2673
- const n = String(r), o = String(u.code ?? ""), a = String(u.name ?? ""), s = String(u.currency ?? ""), p = e.source === "custom" && typeof u.createDate == "string" ? u.createDate : void 0, F = e.source === "custom" && typeof u.executeDay == "string" ? u.executeDay : void 0, y = {
2674
- [e.idField]: n
2675
- };
2676
- return [{
2677
- key: `${e.kind}:${e.source}:${n}`,
2678
- id: n,
2679
- label: Bt(o, a, F),
2680
- code: o,
2681
- name: a,
2682
- kind: e.kind,
2683
- source: e.source,
2684
- currency: s,
2685
- createDate: p,
2686
- executeDay: F,
2687
- requestMapping: y
2688
- }];
2689
- }) : [];
2690
- }
2691
- function Bn(t) {
2692
- return Array.isArray(t) ? t.flatMap((e) => {
2693
- if (!be(e)) return [];
2694
- const u = e, r = u.id ?? ("pricingEnvId" in u ? u.pricingEnvId : "");
2695
- return r === "" || r === null || r === void 0 ? [] : [{
2696
- ...u,
2697
- // 真实接口使用 pricingEnvId,组件内部统一使用字符串 id 维护 Select 值和联动请求。
2698
- id: String(r)
2699
- }];
2700
- }) : [];
2701
- }
2702
- function yn(t) {
2703
- return Ue(t, {
2704
- idField: "disCurveDefId",
2705
- kind: "discount",
2706
- source: "definition"
2707
- });
2708
- }
2709
- function bn(t) {
2710
- return Ue(t, {
2711
- idField: "disCurveId",
2712
- kind: "discount",
2713
- source: "custom"
2714
- });
2715
- }
2716
- function An(t) {
2717
- return Ue(t, {
2718
- idField: "comCurveDefId",
2719
- kind: "carbonForward",
2720
- source: "definition"
2721
- });
2722
- }
2723
- function Sn(t) {
2724
- return Ue(t, {
2725
- idField: "comCurveId",
2726
- kind: "carbonForward",
2727
- source: "custom"
2728
- });
2729
- }
2730
- function Tu(t, e) {
2731
- const u = String(t.curveId);
2732
- return {
2733
- id: u,
2734
- label: Bt(String(t.curveCode ?? ""), String(t.curveName ?? "")),
2735
- code: String(t.curveCode ?? ""),
2736
- name: String(t.curveName ?? ""),
2737
- kind: e.kind,
2738
- source: "definition",
2739
- requestMapping: e.requestMapping(u)
2740
- };
2741
- }
2742
- function Tn(t) {
2743
- if (t === null) return null;
2744
- if (Dn(t)) return t;
2745
- if (!Array.isArray(t)) return null;
2746
- const e = t.find((r) => String(r.curveType) === pn), u = t.find((r) => String(r.curveType) === vn);
2747
- return !e?.curveId || !u?.curveId ? null : {
2748
- discountCurve: Tu(e, {
2749
- kind: "discount",
2750
- requestMapping: (r) => ({
2751
- disCurveDefId: r
2752
- })
2753
- }),
2754
- carbonForwardCurve: Tu(u, {
2755
- kind: "carbonForward",
2756
- requestMapping: (r) => ({
2757
- comCurveDefId: r
2758
- })
2759
- })
2760
- };
2761
- }
2762
- function xu(t) {
2763
- return {
2764
- disCurveDefId: "disCurveDefId" in t ? t.disCurveDefId : "",
2765
- disCurveId: "disCurveId" in t ? t.disCurveId : "",
2766
- comCurveDefId: "comCurveDefId" in t ? t.comCurveDefId : "",
2767
- comCurveId: "comCurveId" in t ? t.comCurveId : ""
2768
- };
2769
- }
2770
- function xn(t, e) {
2771
- const {
2772
- pricingEnvironment: u,
2773
- discountCurve: r,
2774
- carbonForwardCurve: n,
2775
- valuationDate: o
2776
- } = e;
2777
- if (!u || !r || !n || !o)
2778
- return [];
2779
- const a = xu(r.requestMapping), s = xu(n.requestMapping), p = {
2780
- valDate: ot(o),
2781
- disCurveDefId: a.disCurveDefId,
2782
- disCurveId: a.disCurveId,
2783
- comCurveDefId: s.comCurveDefId,
2784
- comCurveId: s.comCurveId
2785
- };
2786
- return t.map((F) => ({
2787
- astType: "",
2788
- targtAllVarCodeSum: F.targtAllVarCodeSum,
2789
- scrtyCode: F.scrtyCode,
2790
- currency: F.currency,
2791
- fwdMaturityDate: F.fwdMaturityDate,
2792
- settleDate: F.settleDate,
2793
- physicalDelivery: F.physicalDelivery,
2794
- direction: F.direction,
2795
- fwdDlvPrice: F.fwdDlvPrice,
2796
- targtVol: F.targtVol,
2797
- ...F.productType ? {
2798
- productType: F.productType
2799
- } : {},
2800
- ...F.instrumentId ? {
2801
- instrumentId: F.instrumentId
2802
- } : {},
2803
- ...F.instrumentCode ? {
2804
- instrumentCode: F.instrumentCode
2805
- } : {},
2806
- ...F.instrumentName ? {
2807
- instrumentName: F.instrumentName
2808
- } : {},
2809
- ...F.tradeContpId ? {
2810
- tradeContpId: F.tradeContpId
2811
- } : {},
2812
- ...p
2813
- }));
2814
- }
2815
- function ze(t) {
2816
- return t == null || t === "" ? null : String(t);
2817
- }
2818
- function wn(t, e, u) {
2819
- if (!e || typeof e != "object")
2820
- return {
2821
- contractId: t,
2822
- status: "error",
2823
- result: null,
2824
- message: "未返回计算结果",
2825
- resultInputVersion: u
2826
- };
2827
- const r = e.code, n = r == null || r === 0 || r === 200 || r === "0" || r === "200", o = [e.npv, e.forwardPrice, e.discountFactor, e.maturityTime].some((a) => a != null && a !== "");
2828
- return !n || !o ? {
2829
- contractId: t,
2830
- status: "error",
2831
- result: null,
2832
- message: e.msg ?? "定价计算失败",
2833
- resultInputVersion: u
2834
- } : {
2835
- contractId: t,
2836
- status: "success",
2837
- result: {
2838
- npv: ze(e.npv),
2839
- forwardPrice: ze(e.forwardPrice),
2840
- discountFactor: ze(e.discountFactor),
2841
- maturityTime: ze(e.maturityTime)
2842
- },
2843
- message: e.msg ?? null,
2844
- resultInputVersion: u
2845
- };
2846
- }
2847
- function Mn(t, e, u) {
2848
- return Object.fromEntries(t.map((r, n) => [r, wn(r, e[n], u)]));
2849
- }
2850
- const wu = {
2851
- environments: "定价环境加载失败",
2852
- discountDefinitions: "无风险利率曲线定义加载失败",
2853
- customDiscountCurves: "自定义无风险利率曲线加载失败",
2854
- carbonDefinitions: "碳金融远期价格曲线定义加载失败",
2855
- customCarbonCurves: "自定义碳金融远期价格曲线加载失败"
2856
- };
2857
- function _n(t) {
2858
- if (t && typeof t == "object" && "response" in t) {
2859
- const e = t.response;
2860
- if (e && typeof e == "object" && "data" in e) {
2861
- const u = e.data;
2862
- if (u && typeof u == "object" && "msg" in u && typeof u.msg == "string" && u.msg.trim())
2863
- return u.msg;
2864
- }
2865
- }
2866
- return t instanceof Error && t.message ? t.message : "定价服务请求失败";
2867
- }
2868
- function ye(t, e) {
2869
- return console.log(`[IndicativePricingforSelectedContracts] dataSource.${t} response:`, e), e;
2870
- }
2871
- function $n(t) {
2872
- const {
2873
- contracts: e,
2874
- productType: u,
2875
- dataSource: r,
2876
- initialContext: n
2877
- } = t, [o, a] = _t(gn, void 0, () => fn(e.map((l) => l.contractId), n)), s = ee(!0), p = ee(0), F = ee(0), y = ee(null), m = ee(null), D = ee(/* @__PURE__ */ new Map()), [M, k] = we(0), L = ee(/* @__PURE__ */ new Map());
2878
- Ee(() => () => {
2879
- s.current = !1, y.current?.abort(), m.current?.abort(), D.current.forEach((l) => l.abort());
2880
- }, []);
2881
- const v = pe(async (l) => {
2882
- if (o.resources[l].attempts >= Je) return;
2883
- a({
2884
- type: "resource/loading",
2885
- key: l
2886
- }), D.current.get(l)?.abort();
2887
- const i = new AbortController();
2888
- D.current.set(l, i);
2889
- try {
2890
- let c;
2891
- switch (l) {
2892
- case "environments": {
2893
- const C = await r.listPricingEnvironments({
2894
- status: !0
2895
- }, {
2896
- signal: i.signal
2897
- });
2898
- c = Bn(ye("listPricingEnvironments", C));
2899
- break;
2900
- }
2901
- case "discountDefinitions": {
2902
- const C = await r.listDiscountCurveDefinitions({
2903
- type: "3",
2904
- status: !0
2905
- }, {
2906
- signal: i.signal
2907
- });
2908
- c = yn(ye("listDiscountCurveDefinitions", C));
2909
- break;
2910
- }
2911
- case "customDiscountCurves": {
2912
- const C = await r.listCustomDiscountCurves({
2913
- type: "3",
2914
- isCustom: !0
2915
- }, {
2916
- signal: i.signal
2917
- });
2918
- c = bn(ye("listCustomDiscountCurves", C));
2919
- break;
2920
- }
2921
- case "carbonDefinitions": {
2922
- const C = await r.listCarbonForwardCurveDefinitions({
2923
- type: "11",
2924
- status: !0
2925
- }, {
2926
- signal: i.signal
2927
- });
2928
- c = An(ye("listCarbonForwardCurveDefinitions", C));
2929
- break;
2930
- }
2931
- case "customCarbonCurves": {
2932
- const C = await r.listCustomCarbonForwardCurves({
2933
- type: "11",
2934
- isCustom: !0
2935
- }, {
2936
- signal: i.signal
2937
- });
2938
- c = Sn(ye("listCustomCarbonForwardCurves", C));
2939
- break;
2940
- }
2941
- }
2942
- s.current && a({
2943
- type: "resource/success",
2944
- key: l,
2945
- data: c
2946
- });
2947
- } catch (c) {
2948
- s.current && !i.signal.aborted && a({
2949
- type: "resource/error",
2950
- key: l,
2951
- error: c instanceof Error ? c.message : wu[l]
2952
- });
2953
- }
2954
- }, [r, o.resources]), T = ee(!1);
2955
- Ee(() => {
2956
- T.current || (T.current = !0, Promise.allSettled(Object.keys(wu).map((l) => v(l))));
2957
- }, [v]);
2958
- const f = Se(() => [...o.resources.discountDefinitions.data, ...o.resources.customDiscountCurves.data, ...o.resources.carbonDefinitions.data, ...o.resources.customCarbonCurves.data], [o.resources]), B = Se(() => f.filter((l) => l.kind === "discount"), [f]), S = Se(() => f.filter((l) => l.kind === "carbonForward"), [f]), R = ee(f);
2959
- Ee(() => {
2960
- R.current = f;
2961
- }, [f]);
2962
- const b = pe((l, i) => R.current.find((c) => c.kind === l.kind && (c.id === l.id || c.key === l.id)) ?? {
2963
- ...l,
2964
- key: `${l.kind}:${l.source}:${l.id}`,
2965
- currency: i
2966
- }, []), h = o.context.pricingEnvironment;
2967
- Ee(() => {
2968
- if (!h || !u) return;
2969
- m.current?.abort();
2970
- const l = new AbortController();
2971
- m.current = l;
2972
- const i = ++p.current, c = JSON.stringify([h.id, u]);
2973
- a({
2974
- type: "environment-curves/loading"
2975
- });
2976
- let C = L.current.get(c);
2977
- return C || (console.info("511: selectedEnvironment.id", h.id), console.info("511: productType", u), C = r.getEnvironmentCurveSelection({
2978
- pricingEnvId: h.id,
2979
- productType: u
2980
- }, {
2981
- signal: l.signal
2982
- }).then((E) => Tn(ye("getEnvironmentCurveSelection", E))), L.current.set(c, C)), C.then((E) => {
2983
- !s.current || i !== p.current || a({
2984
- type: "environment-curves/success",
2985
- discountCurve: E ? b(E.discountCurve, h.currency) : null,
2986
- carbonForwardCurve: E ? b(E.carbonForwardCurve, h.currency) : null
2987
- });
2988
- }).catch((E) => {
2989
- L.current.delete(c), !l.signal.aborted && (!s.current || i !== p.current || a({
2990
- type: "environment-curves/error",
2991
- error: E instanceof Error ? E.message : "环境关联曲线加载失败"
2992
- }));
2993
- }), () => l.abort();
2994
- }, [r, M, u, b, h]);
2995
- const I = ee(u);
2996
- Ee(() => {
2997
- I.current !== u && (I.current = u, o.context.pricingEnvironment && a({
2998
- type: "context/set",
2999
- field: "pricingEnvironment",
3000
- value: o.context.pricingEnvironment
3001
- }));
3002
- }, [u, o.context.pricingEnvironment]);
3003
- const d = ee(o.context);
3004
- Ee(() => {
3005
- d.current = o.context;
3006
- }, [o.context]);
3007
- const $ = pe((l, i) => {
3008
- const c = d.current[l];
3009
- c === i || c != null && i != null && typeof c == "object" && typeof i == "object" && ("key" in c && "key" in i && c.key === i.key || "id" in c && "id" in i && c.id === i.id) || (l === "pricingEnvironment" && i && console.log("[IndicativePricingforSelectedContracts] selected pricing environment id:", i.id), d.current = {
3010
- ...d.current,
3011
- [l]: i
3012
- }, F.current += 1, y.current?.abort(), a({
3013
- type: "context/set",
3014
- field: l,
3015
- value: i
3016
- }));
3017
- }, []), w = ee(!1);
3018
- Ee(() => {
3019
- const l = o.resources.environments;
3020
- if (w.current || l.status !== "success" && l.status !== "empty" || (w.current = !0, o.context.pricingEnvironment)) return;
3021
- const i = l.data.find((c) => c.isDefaultForSelf === !0);
3022
- i && $("pricingEnvironment", i);
3023
- }, [$, o.context.pricingEnvironment, o.resources.environments]);
3024
- const P = pe(async () => {
3025
- if (e.length === 0) return {
3026
- kind: "empty"
3027
- };
3028
- const l = d.current;
3029
- console.info("511: 计算--表单要素", l);
3030
- const i = an(l);
3031
- console.info("511: contextErrors", i);
3032
- const c = ln(l.valuationDate, e);
3033
- if (!c.valid && c.message && (i.valuationDate = [c.message]), a({
3034
- type: "context/errors",
3035
- errors: i
3036
- }), Object.keys(i).length > 0)
3037
- return {
3038
- kind: "invalid"
3039
- };
3040
- const C = xn(e, l);
3041
- console.info("511: 计算--请求参数", C);
3042
- const E = o.inputVersion, x = ++F.current;
3043
- y.current?.abort();
3044
- const A = new AbortController();
3045
- y.current = A, a({
3046
- type: "calculation/submitting",
3047
- contractIds: e.map((_) => _.contractId)
3048
- });
3049
- try {
3050
- const _ = ye("calculate", await r.calculate(C, {
3051
- signal: A.signal
3052
- }));
3053
- if (!s.current || x !== F.current)
3054
- return {
3055
- kind: "requestError"
3056
- };
3057
- const N = Array.isArray(_) ? _ : [], z = Mn(e.map((V) => V.contractId), N, E);
3058
- return a({
3059
- type: "calculation/settled",
3060
- results: z
3061
- }), {
3062
- kind: "success",
3063
- hasErrors: Object.values(z).some((V) => V.status === "error"),
3064
- hasExtraItems: N.length > e.length
3065
- };
3066
- } catch (_) {
3067
- if (!s.current || x !== F.current)
3068
- return {
3069
- kind: "requestError"
3070
- };
3071
- const N = _n(_), z = Object.fromEntries(e.map((V) => [V.contractId, {
3072
- contractId: V.contractId,
3073
- status: "error",
3074
- result: null,
3075
- message: N,
3076
- resultInputVersion: E
3077
- }]));
3078
- return a({
3079
- type: "calculation/settled",
3080
- results: z
3081
- }), {
3082
- kind: "requestError"
3083
- };
3084
- }
3085
- }, [e, r, o.inputVersion]), O = Object.keys(o.resources).every((l) => o.resources[l].status !== "idle" && o.resources[l].status !== "loading");
3086
- return {
3087
- state: o,
3088
- initialized: O,
3089
- discountCurves: B,
3090
- carbonForwardCurves: S,
3091
- setContext: $,
3092
- retryResource: v,
3093
- retryEnvironmentCurves: () => {
3094
- if (!h || o.environmentCurvesAttempts >= Je)
3095
- return;
3096
- const l = JSON.stringify([h.id, u]);
3097
- L.current.delete(l), k((i) => i + 1);
3098
- },
3099
- calculate: P,
3100
- reset: () => {
3101
- F.current += 1, y.current?.abort(), p.current += 1, m.current?.abort(), a({
3102
- type: "reset"
3103
- });
3104
- }
3105
- };
3106
- }
3107
- function $o(t) {
3108
- const e = Y.c(98), {
3109
- mode: u,
3110
- productType: r,
3111
- contractData: n,
3112
- dataSource: o,
3113
- initialContext: a,
3114
- autoCalculate: s,
3115
- onNavigateToPricingPage: p,
3116
- className: F,
3117
- style: y
3118
- } = t, m = u === void 0 ? "multiple" : u, D = s === void 0 ? !1 : s, {
3119
- message: M
3120
- } = lu.useApp();
3121
- console.info("511: contractData", n);
3122
- let k;
3123
- e[0] !== n || e[1] !== m ? (k = () => Object.freeze((m === "fixedSingle" ? n.slice(0, 1) : [...n]).map(In)), e[0] = n, e[1] = m, e[2] = k) : k = e[2];
3124
- const [L] = we(k);
3125
- let v;
3126
- e[3] !== n.length ? (v = () => n.length, e[3] = n.length, e[4] = v) : v = e[4];
3127
- const [T] = we(v), f = m === "multiple" && T > Zt;
3128
- let B;
3129
- e[5] !== L || e[6] !== f ? (B = f ? [] : L, e[5] = L, e[6] = f, e[7] = B) : B = e[7];
3130
- const S = B;
3131
- let R;
3132
- e[8] !== S || e[9] !== o || e[10] !== a || e[11] !== r ? (R = {
3133
- contracts: S,
3134
- productType: r,
3135
- dataSource: o,
3136
- initialContext: a
3137
- }, e[8] = S, e[9] = o, e[10] = a, e[11] = r, e[12] = R) : R = e[12];
3138
- const b = $n(R), {
3139
- calculate: h,
3140
- initialized: I,
3141
- state: d
3142
- } = b, $ = ee(!1), w = ee(!1);
3143
- let P, O;
3144
- e[13] !== S.length || e[14] !== M || e[15] !== f ? (P = () => {
3145
- S.length === 0 && !f && !$.current && ($.current = !0, M.warning("请先选择一笔合约"));
3146
- }, O = [S.length, M, f], e[13] = S.length, e[14] = M, e[15] = f, e[16] = P, e[17] = O) : (P = e[16], O = e[17]), Ee(P, O);
3147
- const l = S.length === 0 || f, i = !b.initialized || d.submitting || d.environmentCurvesStatus === "loading", c = [d.resources.discountDefinitions.status, d.resources.customDiscountCurves.status, d.resources.carbonDefinitions.status, d.resources.customCarbonCurves.status].some(kn), C = d.environmentCurvesStatus === "loading";
3148
- let E, x;
3149
- e[18] !== D || e[19] !== h || e[20] !== S.length || e[21] !== I || e[22] !== f || e[23] !== d.context || e[24] !== d.environmentCurvesStatus || e[25] !== d.submitting ? (E = () => {
3150
- !D || w.current || S.length === 0 || f || !I || d.environmentCurvesStatus === "loading" || d.submitting || Object.values(d.context).some(Rn) || (w.current = !0, h());
3151
- }, x = [D, h, S.length, I, f, d.context, d.environmentCurvesStatus, d.submitting], e[18] = D, e[19] = h, e[20] = S.length, e[21] = I, e[22] = f, e[23] = d.context, e[24] = d.environmentCurvesStatus, e[25] = d.submitting, e[26] = E, e[27] = x) : (E = e[26], x = e[27]), Ee(E, x);
3152
- let A;
3153
- e[28] !== h || e[29] !== M ? (A = async () => {
3154
- const ie = await h();
3155
- ie.kind === "invalid" ? M.error("请完成所有定价要素配置") : ie.kind === "success" && ie.hasExtraItems && M.warning("定价服务返回了多余结果,已按请求顺序忽略");
3156
- }, e[28] = h, e[29] = M, e[30] = A) : A = e[30];
3157
- const _ = A;
3158
- let N;
3159
- e: {
3160
- if (f) {
3161
- let Q;
3162
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Q = /* @__PURE__ */ g("div", { className: H.emptyState, children: /* @__PURE__ */ g(Me, { description: "合约数量超出支持范围" }) }), e[31] = Q) : Q = e[31], N = Q;
3163
- break e;
3164
- }
3165
- if (S.length === 0) {
3166
- let Q;
3167
- e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Q = /* @__PURE__ */ g("div", { className: H.emptyState, children: /* @__PURE__ */ g(Me, { description: "请先选择一笔合约" }) }), e[32] = Q) : Q = e[32], N = Q;
3168
- break e;
3169
- }
3170
- if (m === "fixedSingle") {
3171
- const Q = S[0], ge = d.resultByContractId[Q.contractId], He = !b.initialized || d.submitting;
3172
- let Ie;
3173
- e[33] !== Q || e[34] !== ge || e[35] !== He ? (Ie = /* @__PURE__ */ g(qr, { contract: Q, calculation: ge, loading: He }), e[33] = Q, e[34] = ge, e[35] = He, e[36] = Ie) : Ie = e[36], N = Ie;
3174
- break e;
3175
- }
3176
- const ie = !b.initialized || d.submitting;
3177
- let he;
3178
- e[37] !== S || e[38] !== d.resultByContractId || e[39] !== ie ? (he = /* @__PURE__ */ g(Jr, { contracts: S, results: d.resultByContractId, loading: ie }), e[37] = S, e[38] = d.resultByContractId, e[39] = ie, e[40] = he) : he = e[40], N = he;
3179
- }
3180
- const z = N, V = H[m];
3181
- let W;
3182
- e[41] !== F || e[42] !== V ? (W = iu(H.root, V, F), e[41] = F, e[42] = V, e[43] = W) : W = e[43];
3183
- const Z = d.submitting ? "submitting" : b.initialized ? "ready" : "loading", X = !b.initialized;
3184
- let j;
3185
- e[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j = /* @__PURE__ */ g("h3", { className: H.sectionTitle, children: "定价要素" }), e[44] = j) : j = e[44];
3186
- let q;
3187
- e[45] !== f || e[46] !== T ? (q = f ? /* @__PURE__ */ g($e, { className: H.limitAlert, type: "error", showIcon: !0, title: `最多支持1000笔,当前${T}笔,请返回重新选择` }) : null, e[45] = f, e[46] = T, e[47] = q) : q = e[47];
3188
- let G;
3189
- e[48] !== b ? (G = (ie) => {
3190
- b.retryResource(ie);
3191
- }, e[48] = b, e[49] = G) : G = e[49];
3192
- let U;
3193
- e[50] !== d.resources || e[51] !== G ? (U = /* @__PURE__ */ g(Cn, { resources: d.resources, onRetry: G }), e[50] = d.resources, e[51] = G, e[52] = U) : U = e[52];
3194
- let K;
3195
- e[53] !== b.retryEnvironmentCurves || e[54] !== d.environmentCurvesAttempts || e[55] !== d.environmentCurvesError || e[56] !== d.environmentCurvesStatus ? (K = d.environmentCurvesStatus === "error" ? /* @__PURE__ */ g($e, { type: "error", showIcon: !0, title: "环境关联曲线加载失败", description: d.environmentCurvesError, action: /* @__PURE__ */ g(Te, { size: "small", disabled: d.environmentCurvesAttempts >= 3, onClick: b.retryEnvironmentCurves, children: "重试" }) }) : null, e[53] = b.retryEnvironmentCurves, e[54] = d.environmentCurvesAttempts, e[55] = d.environmentCurvesError, e[56] = d.environmentCurvesStatus, e[57] = K) : K = e[57];
3196
- const J = d.resources.environments.status === "loading", te = c || C;
3197
- let re;
3198
- e[58] !== b.carbonForwardCurves || e[59] !== b.discountCurves || e[60] !== b.setContext || e[61] !== C || e[62] !== m || e[63] !== d.context || e[64] !== d.contextErrors || e[65] !== d.resources.environments.data || e[66] !== d.submitting || e[67] !== J || e[68] !== te ? (re = /* @__PURE__ */ g(sn, { mode: m, value: d.context, errors: d.contextErrors, environments: d.resources.environments.data, discountCurves: b.discountCurves, carbonForwardCurves: b.carbonForwardCurves, environmentsLoading: J, curvesLoading: te, curvesDisabled: C, disabled: d.submitting, onChange: b.setContext }), e[58] = b.carbonForwardCurves, e[59] = b.discountCurves, e[60] = b.setContext, e[61] = C, e[62] = m, e[63] = d.context, e[64] = d.contextErrors, e[65] = d.resources.environments.data, e[66] = d.submitting, e[67] = J, e[68] = te, e[69] = re) : re = e[69];
3199
- let ne;
3200
- e[70] !== q || e[71] !== U || e[72] !== K || e[73] !== re ? (ne = /* @__PURE__ */ ve("div", { className: H.section, children: [
3201
- j,
3202
- q,
3203
- U,
3204
- K,
3205
- re
3206
- ] }), e[70] = q, e[71] = U, e[72] = K, e[73] = re, e[74] = ne) : ne = e[74];
3207
- let se;
3208
- e[75] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (se = /* @__PURE__ */ g("h3", { className: H.sectionTitle, children: "定价结果" }), e[75] = se) : se = e[75];
3209
- let ce;
3210
- e[76] !== z ? (ce = /* @__PURE__ */ ve("div", { className: H.section, children: [
3211
- se,
3212
- z
3213
- ] }), e[76] = z, e[77] = ce) : ce = e[77];
3214
- let oe;
3215
- e[78] !== _ ? (oe = () => {
3216
- _();
3217
- }, e[78] = _, e[79] = oe) : oe = e[79];
3218
- let de;
3219
- e[80] !== l || e[81] !== i || e[82] !== b.reset || e[83] !== m || e[84] !== p || e[85] !== d.submitting || e[86] !== oe ? (de = /* @__PURE__ */ g(En, { mode: m, allDisabled: l, calculateDisabled: i, submitting: d.submitting, onReset: b.reset, onNavigateToPricingPage: p, onCalculate: oe }), e[80] = l, e[81] = i, e[82] = b.reset, e[83] = m, e[84] = p, e[85] = d.submitting, e[86] = oe, e[87] = de) : de = e[87];
3220
- let Fe;
3221
- e[88] !== X || e[89] !== ne || e[90] !== ce || e[91] !== de ? (Fe = /* @__PURE__ */ ve(su, { spinning: X, description: "定价资源加载中", children: [
3222
- ne,
3223
- ce,
3224
- de
3225
- ] }), e[88] = X, e[89] = ne, e[90] = ce, e[91] = de, e[92] = Fe) : Fe = e[92];
3226
- let fe;
3227
- return e[93] !== y || e[94] !== W || e[95] !== Z || e[96] !== Fe ? (fe = /* @__PURE__ */ g("section", { className: W, style: y, "aria-label": "交易合约试定价", "data-status": Z, children: Fe }), e[93] = y, e[94] = W, e[95] = Z, e[96] = Fe, e[97] = fe) : fe = e[97], fe;
3228
- }
3229
- function Rn(t) {
3230
- return t == null;
3231
- }
3232
- function kn(t) {
3233
- return t === "loading";
3234
- }
3235
- function In(t, e) {
3236
- return Object.freeze({
3237
- ...t,
3238
- contractId: `contract-${String(e + 1).padStart(3, "0")}`
3239
- });
3240
- }
3241
- const yt = ue((t, e) => {
3242
- const u = Y.c(7);
3243
- let r, n;
3244
- u[0] !== t ? ({
3245
- children: r,
3246
- ...n
3247
- } = t, u[0] = t, u[1] = r, u[2] = n) : (r = u[1], n = u[2]);
3248
- let o;
3249
- return u[3] !== r || u[4] !== e || u[5] !== n ? (o = /* @__PURE__ */ g(au.Group, { ref: e, ...n, children: r }), u[3] = r, u[4] = e, u[5] = n, u[6] = o) : o = u[6], o;
3250
- });
3251
- yt.displayName = "GZRadioGroup";
3252
- const bt = ue((t, e) => {
3253
- const u = Y.c(7);
3254
- let r, n;
3255
- u[0] !== t ? ({
3256
- children: r,
3257
- ...n
3258
- } = t, u[0] = t, u[1] = r, u[2] = n) : (r = u[1], n = u[2]);
3259
- const o = e;
3260
- let a;
3261
- return u[3] !== r || u[4] !== n || u[5] !== o ? (a = /* @__PURE__ */ g(au.Button, { ref: o, ...n, children: r }), u[3] = r, u[4] = n, u[5] = o, u[6] = a) : a = u[6], a;
3262
- });
3263
- bt.displayName = "GZRadioButton";
3264
- const Pn = ue((t, e) => {
3265
- const u = Y.c(7);
3266
- let r, n;
3267
- u[0] !== t ? ({
3268
- children: r,
3269
- ...n
3270
- } = t, u[0] = t, u[1] = r, u[2] = n) : (r = u[1], n = u[2]);
3271
- const o = e;
3272
- let a;
3273
- return u[3] !== r || u[4] !== n || u[5] !== o ? (a = /* @__PURE__ */ g(au, { ref: o, ...n, children: r }), u[3] = r, u[4] = n, u[5] = o, u[6] = a) : a = u[6], a;
3274
- }), We = Pn;
3275
- We.Group = yt;
3276
- We.Button = bt;
3277
- We.displayName = "GZRadio";
3278
- const Mu = "-";
3279
- function Ln(t, e) {
3280
- const u = Date.parse(t), r = Date.parse(e);
3281
- return Number.isFinite(u) && Number.isFinite(r) ? u - r : t.localeCompare(e);
3282
- }
3283
- function Nn(t) {
3284
- return t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3");
3285
- }
3286
- function zn(t) {
3287
- const e = new Date(t);
3288
- e.setDate(e.getDate() - 1);
3289
- const u = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
3290
- return `${u}${r}${n}`;
3291
- }
3292
- function On(t) {
3293
- return t.map(({
3294
- busnsDate: e,
3295
- valtnPrice: u,
3296
- mval: r,
3297
- tradeCrrc: n
3298
- }) => ({
3299
- date: Nn(e),
3300
- price: u,
3301
- npv: r,
3302
- currency: n
3303
- }));
3304
- }
3305
- function At(t, e) {
3306
- const u = e === "ascending" ? 1 : -1;
3307
- return [...t].sort((r, n) => u * Ln(r.date, n.date));
3308
- }
3309
- function Vn(t) {
3310
- if (t == null || typeof t == "string" && t.trim() === "")
3311
- return 0;
3312
- try {
3313
- const e = new Re(t).toNumber();
3314
- return Number.isFinite(e) ? e : null;
3315
- } catch {
3316
- return null;
3317
- }
3318
- }
3319
- function St(t) {
3320
- try {
3321
- return t != null && new Re(t).lt(0);
3322
- } catch {
3323
- return !1;
3324
- }
3325
- }
3326
- function tu(t, e, u) {
3327
- if (t == null || t === "") return Mu;
3328
- let r;
3329
- try {
3330
- r = new Re(t).toFixed(2);
3331
- } catch {
3332
- return Mu;
3333
- }
3334
- const n = r.startsWith("-"), [o, a] = (n ? r.slice(1) : r).split("."), s = o.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
3335
- try {
3336
- const p = new Intl.NumberFormat(u, {
3337
- style: "currency",
3338
- currency: e,
3339
- currencyDisplay: "narrowSymbol"
3340
- }).formatToParts(0).find((F) => F.type === "currency")?.value;
3341
- return `${n ? "-" : ""}${p ?? e}${s}.${a}`;
3342
- } catch {
3343
- return `${n ? "-" : ""}${e} ${s}.${a}`;
3344
- }
3345
- }
3346
- function Yn(t) {
3347
- const e = /^(\d{4})-(\d{2})-(\d{2})/.exec(t);
3348
- return e ? `${e[1].slice(2)}-${e[2]}-${e[3]}` : t;
3349
- }
3350
- const _u = 0.05, Tt = 7, Gn = [8, 8];
3351
- function xt(t) {
3352
- return t.filter((e) => typeof e == "number" && Number.isFinite(e));
3353
- }
3354
- function Un(t) {
3355
- const e = xt(t);
3356
- if (e.length === 0) return {};
3357
- const u = Math.min(...e), r = Math.max(...e), n = r - u, o = n > 0 ? n * _u : r !== 0 ? Math.abs(r) * _u : 1, a = u - o, s = r + o;
3358
- return u >= 0 ? {
3359
- min: Math.max(0, a),
3360
- max: s
3361
- } : r <= 0 ? {
3362
- min: a,
3363
- max: Math.min(0, s)
3364
- } : {
3365
- min: a,
3366
- max: s
3367
- };
3368
- }
3369
- function Wn(t) {
3370
- const e = xt(t);
3371
- if (e.length === 0)
3372
- return {
3373
- position: "bottom",
3374
- onZero: !1
3375
- };
3376
- const u = Math.min(...e), r = Math.max(...e), n = r <= 0 && u < 0 ? "top" : "bottom", o = u <= 0 && r >= 0;
3377
- return {
3378
- position: n,
3379
- onZero: o
3380
- };
3381
- }
3382
- function Ye(t, e) {
3383
- return Number(t.toFixed(Math.min(Math.max(e, 0), 20)));
3384
- }
3385
- function Hn(t, e) {
3386
- const u = (e - t) / Tt, r = Math.floor(Math.log10(u)), n = 10 ** r, o = u / n, a = o < 1.5 ? 1 : o < 2.5 ? 2 : o < 4 ? 3 : o < 7 ? 5 : 10;
3387
- return Ye(a * n, -r);
3388
- }
3389
- function qn({
3390
- min: t,
3391
- max: e
3392
- }) {
3393
- if (t == null || e == null || t >= e) return;
3394
- const u = Hn(t, e), r = Math.max(0, -Math.floor(Math.log10(u))) + 2, n = Ye(Math.ceil(t / u) * u, r), o = Ye(Math.floor(e / u) * u, r), a = t < n ? [t] : [];
3395
- for (let s = n; s <= o; s = Ye(s + u, r))
3396
- a.push(s);
3397
- return e > o && a.push(e), t < 0 && e > 0 ? a.filter((s) => s !== 0) : a;
3398
- }
3399
- function Zn({
3400
- data: t,
3401
- metric: e,
3402
- currency: u,
3403
- locale: r,
3404
- theme: n
3405
- }) {
3406
- const o = At(t, "ascending"), a = e === "price" ? "价格" : "NPV", s = o.map((D) => Vn(D[e])), p = Un(s), F = Wn(s), y = qn(p), m = o.map(({
3407
- date: D
3408
- }) => Yn(D));
3409
- return {
3410
- // 数据或指标切换时使用 300ms 过渡动画。
3411
- animationDuration: 300,
3412
- // 透出宿主面板背景,避免图表画布覆盖组件主题色。
3413
- backgroundColor: "transparent",
3414
- // 统一图表内文字的主题颜色、字体和字号。
3415
- textStyle: {
3416
- // 默认文字使用主题主文字色。
3417
- color: n.text,
3418
- // 字体与当前 gz-ui-web 主题保持一致。
3419
- fontFamily: n.fontFamily,
3420
- // 字号与当前 gz-ui-web 主题保持一致。
3421
- fontSize: n.fontSize
3422
- },
3423
- // 通过四周留白为坐标轴标签和旋转后的日期文本预留空间。
3424
- grid: {
3425
- // 顶部为纵轴最大刻度和折线预留空间。
3426
- top: 16,
3427
- // 右侧避免最后一个数据点贴近画布边缘。
3428
- right: 24,
3429
- // 底部容纳旋转 45 度后的日期标签。
3430
- bottom: 58,
3431
- // 左侧为纵轴刻度标签预留显示空间。
3432
- left: 64
3433
- },
3434
- // 鼠标悬停时展示当前日期对应的指标金额。
3435
- tooltip: {
3436
- // 按横轴类目触发,指向日期时展示该日期的数据。
3437
- trigger: "axis",
3438
- // 将浮层限制在图表区域内,避免被外层滚动容器裁切。
3439
- confine: !0,
3440
- // 对齐 gz-ui-web 浮层背景,避免 ECharts 默认的白色 Tooltip。
3441
- backgroundColor: n.backgroundElevated,
3442
- // Figma 浮层没有描边,关闭 ECharts 默认边框。
3443
- borderWidth: 0,
3444
- borderRadius: 4,
3445
- padding: 12,
3446
- textStyle: {
3447
- color: n.text,
3448
- fontFamily: n.fontFamily,
3449
- fontSize: n.fontSize
3450
- },
3451
- // 按当前币种和区域格式化提示框中的金额。
3452
- valueFormatter: (D) => tu(typeof D == "number" || typeof D == "string" ? D : null, u, r)
3453
- },
3454
- // 日期标签轴与符号基准线分离,避免全负数据把日期标签一起移动到顶部。
3455
- xAxis: [{
3456
- // 日期是离散类目,而非连续时间刻度。
3457
- type: "category",
3458
- position: "bottom",
3459
- // 在首尾类目两侧保留半个类目间距,防止端点贴边。
3460
- boundaryGap: !0,
3461
- // 将日期转换为 YY-MM-DD 后写入横轴。
3462
- data: m,
3463
- // 横轴仅保留标签,不显示刻度短线。
3464
- axisTick: {
3465
- // 隐藏每个日期下方的刻度短线。
3466
- show: !1
3467
- },
3468
- // 标签轴不绘制实线,也不参与零点吸附。
3469
- axisLine: {
3470
- show: !1,
3471
- onZero: !1
3472
- },
3473
- // 配置横轴日期标签的颜色、密度、角度和间距。
3474
- axisLabel: {
3475
- // 日期标签使用主题次级文字色。
3476
- color: n.textSecondary,
3477
- // 强制展示每一个日期标签,不让 ECharts 自动抽稀。
3478
- interval: 0,
3479
- // 日期旋转 45 度以降低相邻标签重叠概率。
3480
- rotate: 45,
3481
- // 标签与绘图区底边保持 12px 间距。
3482
- margin: 12
3483
- }
3484
- }, {
3485
- type: "category",
3486
- position: F.position,
3487
- boundaryGap: !0,
3488
- data: m,
3489
- axisTick: {
3490
- show: !1
3491
- },
3492
- axisLabel: {
3493
- show: !1
3494
- },
3495
- // 实线仅表达符号方向:全负在顶部、全正在底部、跨零时吸附 0。
3496
- axisLine: {
3497
- show: !0,
3498
- onZero: F.onZero,
3499
- lineStyle: {
3500
- color: n.baseline,
3501
- type: "solid"
3502
- }
3503
- }
3504
- }],
3505
- // 纵轴以连续数值刻度展示当前价格或 NPV。
3506
- yAxis: {
3507
- // 使用连续数值轴,支持正数、负数和小数。
3508
- type: "value",
3509
- // 应用根据绘图值及 5% 留白计算出的固定上下限。
3510
- ...p,
3511
- // 期望约分为 7 段,实际刻度数和间隔仍由 ECharts 取易读值。
3512
- splitNumber: Tt,
3513
- // 纵轴通过网格线表达刻度,不额外显示刻度短线。
3514
- axisTick: {
3515
- // 隐藏纵轴刻度短线。
3516
- show: !1,
3517
- customValues: y
3518
- },
3519
- // 隐藏纵轴自身的竖直轴线,减少视觉干扰。
3520
- axisLine: {
3521
- // 不绘制纵轴轴线。
3522
- show: !1
3523
- },
3524
- // 配置纵轴刻度标签的主题颜色和数值精度。
3525
- axisLabel: {
3526
- // 纵轴标签使用主题次级文字色。
3527
- color: n.textSecondary,
3528
- // 刻度最多展示两位小数,并按当前区域添加数字分组格式。
3529
- formatter: (D) => new Intl.NumberFormat(r, {
3530
- maximumFractionDigits: 2
3531
- }).format(D)
3532
- },
3533
- // 为每个纵轴主刻度绘制水平辅助线。
3534
- splitLine: {
3535
- // 边界只保留符号基准线,避免最大、最小端点虚线与实线重叠。
3536
- showMinLine: !1,
3537
- showMaxLine: !1,
3538
- // 网格线使用主题分割色和自定义虚线节奏。
3539
- lineStyle: {
3540
- // 颜色读取当前 gz-ui-web 主题的分割线 Token。
3541
- color: n.split,
3542
- // 使用统一的线段与间隔长度绘制虚线。
3543
- type: Gn
3544
- }
3545
- }
3546
- },
3547
- // 当前图表只绘制一个价格或 NPV 折线系列。
3548
- series: [{
3549
- // 系列名称随当前选中的指标切换。
3550
- name: a,
3551
- // 数据系列使用第一个横轴;第二个横轴只负责绘制符号基准线。
3552
- xAxisIndex: 0,
3553
- // 使用折线图连接相邻日期的数据点。
3554
- type: "line",
3555
- // 传入已转换的数值、0 或空点序列。
3556
- data: s,
3557
- // 每个有效数据点使用圆形标记。
3558
- symbol: "circle",
3559
- // 数据点直径固定为 5px。
3560
- symbolSize: 5,
3561
- // 常态下始终展示数据点标记。
3562
- showSymbol: !0,
3563
- // 遇到无法转换的空点时断开折线,不跨点连接。
3564
- connectNulls: !1,
3565
- // 配置折线本身的主题颜色和宽度。
3566
- lineStyle: {
3567
- // 折线颜色使用当前主题主色。
3568
- color: n.primary,
3569
- // 折线宽度固定为 2px。
3570
- width: 2
3571
- },
3572
- // 配置数据点标记的填充色。
3573
- itemStyle: {
3574
- // 数据点与折线统一使用主题主色。
3575
- color: n.primary
3576
- },
3577
- // 鼠标悬停数据点时提供轻微放大反馈。
3578
- emphasis: {
3579
- // 高亮数据点放大到默认尺寸的 1.3 倍。
3580
- scale: 1.3
3581
- }
3582
- }]
3583
- };
3584
- }
3585
- const jn = "_root_1svoy_1", Xn = "_title_1svoy_12", Qn = "_loading_1svoy_19", Jn = "_content_1svoy_26", Kn = "_tablePanel_1svoy_32", eo = "_chartPanel_1svoy_33", uo = "_table_1svoy_32", to = "_negativeValue_1svoy_68", ro = "_chartHeader_1svoy_75", no = "_chartTitle_1svoy_84", oo = "_chart_1svoy_33", ao = "_chartEmpty_1svoy_92", io = "_chartScrollable_1svoy_100", lo = "_chartCanvas_1svoy_140", le = {
3586
- root: jn,
3587
- title: Xn,
3588
- loading: Qn,
3589
- content: Jn,
3590
- tablePanel: Kn,
3591
- chartPanel: eo,
3592
- table: uo,
3593
- negativeValue: to,
3594
- chartHeader: ro,
3595
- chartTitle: no,
3596
- chart: oo,
3597
- chartEmpty: ao,
3598
- chartScrollable: io,
3599
- chartCanvas: lo
3600
- };
3601
- Ou.use([Ot, Vt, Yt, Gt]);
3602
- const $u = 10, so = 800;
3603
- function co(t) {
3604
- const e = Y.c(29), {
3605
- data: u,
3606
- metric: r,
3607
- currency: n,
3608
- locale: o,
3609
- theme: a,
3610
- className: s
3611
- } = t, p = ee(null), F = ee(null), y = ee(null), m = u.length > $u, D = `${Math.max(u.length / $u, 1) * 100}%`;
3612
- let M;
3613
- e[0] !== n || e[1] !== u || e[2] !== o || e[3] !== r || e[4] !== a ? (M = Zn({
3614
- data: u,
3615
- metric: r,
3616
- currency: n,
3617
- locale: o,
3618
- theme: a
3619
- }), e[0] = n, e[1] = u, e[2] = o, e[3] = r, e[4] = a, e[5] = M) : M = e[5];
3620
- const k = M;
3621
- let L, v;
3622
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => {
3623
- const P = F.current;
3624
- if (!P)
3625
- return;
3626
- const O = Ou.init(P, void 0, {
3627
- renderer: "canvas"
3628
- });
3629
- y.current = O;
3630
- const l = () => O.resize(), i = typeof ResizeObserver > "u" ? null : new ResizeObserver(l);
3631
- return i ? i.observe(P) : window.addEventListener("resize", l), () => {
3632
- i?.disconnect(), window.removeEventListener("resize", l), O.dispose(), y.current = null;
3633
- };
3634
- }, v = [], e[6] = L, e[7] = v) : (L = e[6], v = e[7]), fu(L, v);
3635
- let T, f;
3636
- e[8] !== k ? (T = () => {
3637
- y.current?.setOption(k, {
3638
- notMerge: !0
3639
- });
3640
- }, f = [k], e[8] = k, e[9] = T, e[10] = f) : (T = e[9], f = e[10]), Ee(T, f);
3641
- let B, S;
3642
- e[11] !== m ? (B = () => {
3643
- const P = p.current;
3644
- if (!P || !m)
3645
- return;
3646
- let O;
3647
- const l = () => {
3648
- P.dataset.scrolling = "true", window.clearTimeout(O), O = window.setTimeout(() => {
3649
- delete P.dataset.scrolling;
3650
- }, so);
3651
- };
3652
- return P.addEventListener("scroll", l, {
3653
- passive: !0
3654
- }), () => {
3655
- P.removeEventListener("scroll", l), window.clearTimeout(O), delete P.dataset.scrolling;
3656
- };
3657
- }, S = [m], e[11] = m, e[12] = B, e[13] = S) : (B = e[12], S = e[13]), Ee(B, S);
3658
- let R;
3659
- e[14] !== m ? (R = () => {
3660
- const P = p.current;
3661
- !P || !m || (P.scrollLeft = P.scrollWidth - P.clientWidth);
3662
- }, e[14] = m, e[15] = R) : R = e[15];
3663
- let b;
3664
- e[16] !== u || e[17] !== m ? (b = [u, m], e[16] = u, e[17] = m, e[18] = b) : b = e[18], fu(R, b);
3665
- const h = r === "price" ? "价格" : "NPV";
3666
- let I;
3667
- e[19] !== s || e[20] !== m ? (I = iu(s, {
3668
- [le.chartScrollable]: m
3669
- }), e[19] = s, e[20] = m, e[21] = I) : I = e[21];
3670
- const d = `按日期展示的${h}折线图`;
3671
- let $;
3672
- e[22] !== D ? ($ = /* @__PURE__ */ g("div", { ref: F, className: le.chartCanvas, style: {
3673
- width: D
3674
- } }), e[22] = D, e[23] = $) : $ = e[23];
3675
- let w;
3676
- return e[24] !== m || e[25] !== I || e[26] !== d || e[27] !== $ ? (w = /* @__PURE__ */ g("div", { ref: p, className: I, role: "img", "aria-label": d, "data-scrollable": m, children: $ }), e[24] = m, e[25] = I, e[26] = d, e[27] = $, e[28] = w) : w = e[28], w;
3677
- }
3678
- const mo = "数据加载失败,请稍后重试", Xe = [], Eo = "CNY", Qe = "zh-CN", Fo = {
3679
- root: {
3680
- margin: 0
3681
- },
3682
- image: {
3683
- width: 56,
3684
- height: 35,
3685
- marginBottom: 8
3686
- }
3687
- };
3688
- function wt(t) {
3689
- const e = Y.c(4), {
3690
- ariaLabel: u,
3691
- className: r
3692
- } = t;
3693
- let n;
3694
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ g(Me, { image: Me.PRESENTED_IMAGE_SIMPLE, description: "暂无数据", styles: Fo }), e[0] = n) : n = e[0];
3695
- let o;
3696
- return e[1] !== u || e[2] !== r ? (o = /* @__PURE__ */ g("div", { className: r, role: "status", "aria-label": u, children: n }), e[1] = u, e[2] = r, e[3] = o) : o = e[3], o;
3697
- }
3698
- function Co() {
3699
- const t = Y.c(1);
3700
- let e;
3701
- return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ g(wt, { ariaLabel: "暂无估值日志数据" }), t[0] = e) : e = t[0], e;
3702
- }
3703
- function fo(t) {
3704
- return t instanceof DOMException && t.name === "AbortError";
3705
- }
3706
- function Ro(t) {
3707
- const e = Y.c(63), {
3708
- adapter: u,
3709
- allVarCodeSnum: r,
3710
- className: n,
3711
- style: o
3712
- } = t, {
3713
- message: a
3714
- } = lu.useApp(), {
3715
- token: s
3716
- } = Nu.useToken();
3717
- let p;
3718
- e[0] !== u || e[1] !== r ? (p = () => ({
3719
- adapter: u,
3720
- allVarCodeSnum: r,
3721
- status: "loading",
3722
- data: Xe
3723
- }), e[0] = u, e[1] = r, e[2] = p) : p = e[2];
3724
- const [F, y] = we(p), [m, D] = we("price"), M = F.adapter === u && F.allVarCodeSnum === r, k = M ? F.status : "loading", L = M ? F.data : Xe;
3725
- let v, T;
3726
- e[3] !== u || e[4] !== r || e[5] !== a ? (v = () => {
3727
- const G = new AbortController();
3728
- let U = !0;
3729
- const K = {
3730
- allVarCodeSnum: r,
3731
- endTime: zn(/* @__PURE__ */ new Date()),
3732
- size: "30"
3733
- };
3734
- return u.getValuationLogs(K, {
3735
- signal: G.signal
3736
- }).then((J) => {
3737
- if (!U)
3738
- return;
3739
- const te = On(J);
3740
- y({
3741
- adapter: u,
3742
- allVarCodeSnum: r,
3743
- status: te.length === 0 ? "empty" : "success",
3744
- data: te
3745
- });
3746
- }).catch((J) => {
3747
- !U || G.signal.aborted || fo(J) || (y({
3748
- adapter: u,
3749
- allVarCodeSnum: r,
3750
- status: "error",
3751
- data: Xe
3752
- }), a.error(mo));
3753
- }), () => {
3754
- U = !1, G.abort();
3755
- };
3756
- }, T = [u, r, a], e[3] = u, e[4] = r, e[5] = a, e[6] = v, e[7] = T) : (v = e[6], T = e[7]), Ee(v, T);
3757
- let f;
3758
- e[8] !== L ? (f = At(L, "descending").map(ho), e[8] = L, e[9] = f) : f = e[9];
3759
- const B = f, S = L[0]?.currency || Eo;
3760
- let R;
3761
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = {
3762
- headerName: "日期",
3763
- field: "date",
3764
- width: 120,
3765
- minWidth: 120,
3766
- sortable: !1
3767
- }, e[10] = R) : R = e[10];
3768
- let b;
3769
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
3770
- [le.negativeValue]: vo
3771
- }, e[11] = b) : b = e[11];
3772
- let h;
3773
- e[12] !== S ? (h = {
3774
- headerName: "价格",
3775
- field: "price",
3776
- flex: 1,
3777
- minWidth: 140,
3778
- sortable: !1,
3779
- type: "rightAligned",
3780
- cellClassRules: b,
3781
- valueFormatter: (G) => {
3782
- const {
3783
- value: U
3784
- } = G;
3785
- return tu(U, S, Qe);
3786
- }
3787
- }, e[12] = S, e[13] = h) : h = e[13];
3788
- let I;
3789
- e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
3790
- [le.negativeValue]: po
3791
- }, e[14] = I) : I = e[14];
3792
- let d;
3793
- e[15] !== S ? (d = {
3794
- headerName: "NPV",
3795
- field: "npv",
3796
- flex: 1,
3797
- minWidth: 140,
3798
- sortable: !1,
3799
- type: "rightAligned",
3800
- cellClassRules: I,
3801
- valueFormatter: (G) => {
3802
- const {
3803
- value: U
3804
- } = G;
3805
- return tu(U, S, Qe);
3806
- }
3807
- }, e[15] = S, e[16] = d) : d = e[16];
3808
- let $;
3809
- e[17] !== h || e[18] !== d ? ($ = [R, h, d], e[17] = h, e[18] = d, e[19] = $) : $ = e[19];
3810
- const w = $;
3811
- let P;
3812
- e[20] !== s.colorBgElevated || e[21] !== s.colorBorder || e[22] !== s.colorPrimary || e[23] !== s.colorSplit || e[24] !== s.colorText || e[25] !== s.colorTextSecondary || e[26] !== s.fontFamily || e[27] !== s.fontSize ? (P = {
3813
- primary: s.colorPrimary,
3814
- baseline: s.colorBorder,
3815
- backgroundElevated: s.colorBgElevated,
3816
- text: s.colorText,
3817
- textSecondary: s.colorTextSecondary,
3818
- split: s.colorSplit,
3819
- fontFamily: s.fontFamily,
3820
- fontSize: s.fontSize
3821
- }, e[20] = s.colorBgElevated, e[21] = s.colorBorder, e[22] = s.colorPrimary, e[23] = s.colorSplit, e[24] = s.colorText, e[25] = s.colorTextSecondary, e[26] = s.fontFamily, e[27] = s.fontSize, e[28] = P) : P = e[28];
3822
- const O = P, l = k === "success";
3823
- let i;
3824
- e[29] !== n ? (i = iu(le.root, n), e[29] = n, e[30] = i) : i = e[30];
3825
- const c = k === "loading";
3826
- let C;
3827
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ g("h2", { className: le.title, children: "估值日志(最大展示30条日志数据)" }), e[31] = C) : C = e[31];
3828
- const E = k === "loading", x = B.length > 10;
3829
- let A;
3830
- e[32] !== w || e[33] !== x || e[34] !== B ? (A = /* @__PURE__ */ g("div", { className: le.tablePanel, "aria-label": "估值日志表格", children: /* @__PURE__ */ g(du, { className: le.table, rowData: B, columnDefs: w, getRowId: go, headerHeight: 32, rowHeight: 28, pagination: !1, noRowsOverlayComponent: Co, suppressMovableColumns: !0, suppressCellFocus: !0, suppressContextMenu: !0, alwaysShowVerticalScroll: x }) }), e[32] = w, e[33] = x, e[34] = B, e[35] = A) : A = e[35];
3831
- let _;
3832
- e[36] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ g("h3", { className: le.chartTitle, children: "结果图形展示" }), e[36] = _) : _ = e[36];
3833
- let N, z;
3834
- e[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = [{
3835
- label: "价格",
3836
- value: "price"
3837
- }, {
3838
- label: "NPV",
3839
- value: "npv"
3840
- }], z = (G) => {
3841
- const {
3842
- target: U
3843
- } = G;
3844
- return D(U.value);
3845
- }, e[37] = N, e[38] = z) : (N = e[37], z = e[38]);
3846
- let V;
3847
- e[39] !== m ? (V = /* @__PURE__ */ ve("div", { className: le.chartHeader, children: [
3848
- _,
3849
- /* @__PURE__ */ g(We.Group, { size: "small", optionType: "button", buttonStyle: "solid", "aria-label": "估值指标", value: m, options: N, onChange: z })
3850
- ] }), e[39] = m, e[40] = V) : V = e[40];
3851
- let W;
3852
- e[41] !== O || e[42] !== L || e[43] !== m || e[44] !== S || e[45] !== l || e[46] !== k ? (W = l ? /* @__PURE__ */ g(co, { className: le.chart, data: L, metric: m, currency: S, locale: Qe, theme: O }) : k === "empty" ? /* @__PURE__ */ g(wt, { className: le.chartEmpty, ariaLabel: "暂无估值曲线数据" }) : /* @__PURE__ */ g("div", { className: le.chartEmpty, "aria-label": "暂无估值曲线数据" }), e[41] = O, e[42] = L, e[43] = m, e[44] = S, e[45] = l, e[46] = k, e[47] = W) : W = e[47];
3853
- let Z;
3854
- e[48] !== V || e[49] !== W ? (Z = /* @__PURE__ */ ve("section", { className: le.chartPanel, "aria-label": "估值日志图形展示", children: [
3855
- V,
3856
- W
3857
- ] }), e[48] = V, e[49] = W, e[50] = Z) : Z = e[50];
3858
- let X;
3859
- e[51] !== A || e[52] !== Z ? (X = /* @__PURE__ */ ve("div", { className: le.content, children: [
3860
- A,
3861
- Z
3862
- ] }), e[51] = A, e[52] = Z, e[53] = X) : X = e[53];
3863
- let j;
3864
- e[54] !== E || e[55] !== X ? (j = /* @__PURE__ */ g(su, { className: le.loading, spinning: E, description: "估值日志加载中", children: X }), e[54] = E, e[55] = X, e[56] = j) : j = e[56];
3865
- let q;
3866
- return e[57] !== k || e[58] !== o || e[59] !== i || e[60] !== c || e[61] !== j ? (q = /* @__PURE__ */ ve("section", { className: i, style: o, "aria-label": "估值日志数据图表", "aria-busy": c, "data-status": k, children: [
3867
- C,
3868
- j
3869
- ] }), e[57] = k, e[58] = o, e[59] = i, e[60] = c, e[61] = j, e[62] = q) : q = e[62], q;
3870
- }
3871
- function go(t) {
3872
- const {
3873
- data: e
3874
- } = t;
3875
- return e.rowId;
3876
- }
3877
- function po(t) {
3878
- const {
3879
- value: e
3880
- } = t;
3881
- return St(e);
3882
- }
3883
- function vo(t) {
3884
- const {
3885
- value: e
3886
- } = t;
3887
- return St(e);
3888
- }
3889
- function ho(t, e) {
3890
- return {
3891
- ...t,
3892
- rowId: `${t.date}-${e}`
3893
- };
3894
- }
3895
- export {
3896
- Te as B,
3897
- ju as G,
3898
- $o as I,
3899
- $e as T,
3900
- Ro as V,
3901
- lu as a,
3902
- Be as b,
3903
- Y as c,
3904
- Me as d,
3905
- Ce as e,
3906
- We as f,
3907
- Vu as g,
3908
- xe as h,
3909
- su as i,
3910
- du as j,
3911
- mu as k,
3912
- Cu as l
3913
- };