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