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