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

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