@tipp/ui 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +45 -45
- package/dist/atoms/pagination.js +2 -2
- package/dist/charts/chart.cjs +227 -0
- package/dist/charts/chart.cjs.map +1 -0
- package/dist/charts/chart.d.cts +179 -0
- package/dist/charts/chart.d.ts +179 -0
- package/dist/charts/chart.js +10 -0
- package/dist/charts/chart.js.map +1 -0
- package/dist/charts/horizontal-bar-chart.cjs +51 -0
- package/dist/charts/horizontal-bar-chart.cjs.map +1 -0
- package/dist/charts/horizontal-bar-chart.d.cts +17 -0
- package/dist/charts/horizontal-bar-chart.d.ts +17 -0
- package/dist/charts/horizontal-bar-chart.js +8 -0
- package/dist/charts/horizontal-bar-chart.js.map +1 -0
- package/dist/charts/index.cjs +254 -0
- package/dist/charts/index.cjs.map +1 -0
- package/dist/charts/index.d.cts +5 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +14 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/vertical-bar-chart.cjs +48 -0
- package/dist/charts/vertical-bar-chart.cjs.map +1 -0
- package/dist/charts/vertical-bar-chart.d.cts +17 -0
- package/dist/charts/vertical-bar-chart.d.ts +17 -0
- package/dist/charts/vertical-bar-chart.js +8 -0
- package/dist/charts/vertical-bar-chart.js.map +1 -0
- package/dist/chunk-7QVMAHXH.js +24 -0
- package/dist/chunk-7QVMAHXH.js.map +1 -0
- package/dist/chunk-EUS56L3L.js +180 -0
- package/dist/chunk-EUS56L3L.js.map +1 -0
- package/dist/chunk-GKHTWD7W.js +24 -0
- package/dist/chunk-GKHTWD7W.js.map +1 -0
- package/dist/chunk-KD2BVMEX.js +119 -0
- package/dist/chunk-KD2BVMEX.js.map +1 -0
- package/dist/chunk-QOY42XM2.js +59 -0
- package/dist/chunk-QOY42XM2.js.map +1 -0
- package/dist/chunk-R6PYUH56.js +104 -0
- package/dist/chunk-R6PYUH56.js.map +1 -0
- package/dist/chunk-SDAJ6NLJ.js +24 -0
- package/dist/chunk-SDAJ6NLJ.js.map +1 -0
- package/dist/chunk-SGMO4KBC.js +27 -0
- package/dist/chunk-SGMO4KBC.js.map +1 -0
- package/dist/chunk-TG7PURWS.js +18 -0
- package/dist/chunk-TG7PURWS.js.map +1 -0
- package/dist/index.css +27 -0
- package/dist/index.js +51 -51
- package/dist/molecules/expand-table/index.js +21 -21
- package/dist/molecules/expand-table/row.js +19 -19
- package/dist/molecules/index.js +22 -22
- package/dist/molecules/navigation.js +20 -20
- package/package.json +18 -18
- package/src/charts/horizontal-bar-chart.tsx +35 -0
- package/src/charts/index.ts +2 -0
- /package/src/{chart → charts}/chart-theme.json +0 -0
- /package/src/{chart → charts}/chart.tsx +0 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import ReactECharts from 'echarts-for-react';
|
|
3
|
+
import { EChartOption } from 'echarts';
|
|
4
|
+
|
|
5
|
+
var version = 1;
|
|
6
|
+
var themeName = "customed";
|
|
7
|
+
var theme = {
|
|
8
|
+
seriesCnt: "5",
|
|
9
|
+
backgroundColor: "rgba(0,0,0,0)",
|
|
10
|
+
titleColor: "#1c2024",
|
|
11
|
+
subtitleColor: "#8d8d8d",
|
|
12
|
+
textColorShow: false,
|
|
13
|
+
textColor: "#333",
|
|
14
|
+
markTextColor: "#ffffff",
|
|
15
|
+
color: [
|
|
16
|
+
"#ffe629",
|
|
17
|
+
"#3e63dd",
|
|
18
|
+
"#ec9455",
|
|
19
|
+
"#5bb98b",
|
|
20
|
+
"#cb1d63",
|
|
21
|
+
"#3ba272",
|
|
22
|
+
"#fc8452",
|
|
23
|
+
"#9a60b4",
|
|
24
|
+
"#ea7ccc"
|
|
25
|
+
],
|
|
26
|
+
borderColor: "#8d8d8d",
|
|
27
|
+
borderWidth: 0,
|
|
28
|
+
visualMapColor: [
|
|
29
|
+
"#bf444c",
|
|
30
|
+
"#d88273",
|
|
31
|
+
"#f6efa6"
|
|
32
|
+
],
|
|
33
|
+
legendTextColor: "#1c2024",
|
|
34
|
+
kColor: "#eb5454",
|
|
35
|
+
kColor0: "#47b262",
|
|
36
|
+
kBorderColor: "#eb5454",
|
|
37
|
+
kBorderColor0: "#47b262",
|
|
38
|
+
kBorderWidth: 1,
|
|
39
|
+
lineWidth: 2,
|
|
40
|
+
symbolSize: 4,
|
|
41
|
+
symbol: "emptyCircle",
|
|
42
|
+
symbolBorderWidth: 1,
|
|
43
|
+
lineSmooth: false,
|
|
44
|
+
graphLineWidth: 1,
|
|
45
|
+
graphLineColor: "#aaa",
|
|
46
|
+
mapLabelColor: "#000",
|
|
47
|
+
mapLabelColorE: "rgb(100,0,0)",
|
|
48
|
+
mapBorderColor: "#444",
|
|
49
|
+
mapBorderColorE: "#444",
|
|
50
|
+
mapBorderWidth: 0.5,
|
|
51
|
+
mapBorderWidthE: 1,
|
|
52
|
+
mapAreaColor: "#eee",
|
|
53
|
+
mapAreaColorE: "rgba(255,215,0,0.8)",
|
|
54
|
+
axes: [
|
|
55
|
+
{
|
|
56
|
+
type: "all",
|
|
57
|
+
name: "通用坐标轴",
|
|
58
|
+
axisLineShow: true,
|
|
59
|
+
axisLineColor: "#6E7079",
|
|
60
|
+
axisTickShow: true,
|
|
61
|
+
axisTickColor: "#6E7079",
|
|
62
|
+
axisLabelShow: true,
|
|
63
|
+
axisLabelColor: "#6E7079",
|
|
64
|
+
splitLineShow: true,
|
|
65
|
+
splitLineColor: [
|
|
66
|
+
"#E0E6F1"
|
|
67
|
+
],
|
|
68
|
+
splitAreaShow: false,
|
|
69
|
+
splitAreaColor: [
|
|
70
|
+
"rgba(250,250,250,0.2)",
|
|
71
|
+
"rgba(210,219,238,0.2)"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: "category",
|
|
76
|
+
name: "类目坐标轴",
|
|
77
|
+
axisLineShow: true,
|
|
78
|
+
axisLineColor: "#6E7079",
|
|
79
|
+
axisTickShow: true,
|
|
80
|
+
axisTickColor: "#6E7079",
|
|
81
|
+
axisLabelShow: true,
|
|
82
|
+
axisLabelColor: "#6E7079",
|
|
83
|
+
splitLineShow: false,
|
|
84
|
+
splitLineColor: [
|
|
85
|
+
"#E0E6F1"
|
|
86
|
+
],
|
|
87
|
+
splitAreaShow: false,
|
|
88
|
+
splitAreaColor: [
|
|
89
|
+
"rgba(250,250,250,0.2)",
|
|
90
|
+
"rgba(210,219,238,0.2)"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: "value",
|
|
95
|
+
name: "数值坐标轴",
|
|
96
|
+
axisLineShow: false,
|
|
97
|
+
axisLineColor: "#6E7079",
|
|
98
|
+
axisTickShow: false,
|
|
99
|
+
axisTickColor: "#6E7079",
|
|
100
|
+
axisLabelShow: true,
|
|
101
|
+
axisLabelColor: "#6E7079",
|
|
102
|
+
splitLineShow: true,
|
|
103
|
+
splitLineColor: [
|
|
104
|
+
"#E0E6F1"
|
|
105
|
+
],
|
|
106
|
+
splitAreaShow: false,
|
|
107
|
+
splitAreaColor: [
|
|
108
|
+
"rgba(250,250,250,0.2)",
|
|
109
|
+
"rgba(210,219,238,0.2)"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: "log",
|
|
114
|
+
name: "对数坐标轴",
|
|
115
|
+
axisLineShow: false,
|
|
116
|
+
axisLineColor: "#6E7079",
|
|
117
|
+
axisTickShow: false,
|
|
118
|
+
axisTickColor: "#6E7079",
|
|
119
|
+
axisLabelShow: true,
|
|
120
|
+
axisLabelColor: "#6E7079",
|
|
121
|
+
splitLineShow: true,
|
|
122
|
+
splitLineColor: [
|
|
123
|
+
"#E0E6F1"
|
|
124
|
+
],
|
|
125
|
+
splitAreaShow: false,
|
|
126
|
+
splitAreaColor: [
|
|
127
|
+
"rgba(250,250,250,0.2)",
|
|
128
|
+
"rgba(210,219,238,0.2)"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: "time",
|
|
133
|
+
name: "时间坐标轴",
|
|
134
|
+
axisLineShow: true,
|
|
135
|
+
axisLineColor: "#6E7079",
|
|
136
|
+
axisTickShow: true,
|
|
137
|
+
axisTickColor: "#6E7079",
|
|
138
|
+
axisLabelShow: true,
|
|
139
|
+
axisLabelColor: "#6E7079",
|
|
140
|
+
splitLineShow: false,
|
|
141
|
+
splitLineColor: [
|
|
142
|
+
"#E0E6F1"
|
|
143
|
+
],
|
|
144
|
+
splitAreaShow: false,
|
|
145
|
+
splitAreaColor: [
|
|
146
|
+
"rgba(250,250,250,0.2)",
|
|
147
|
+
"rgba(210,219,238,0.2)"
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
axisSeperateSetting: true,
|
|
152
|
+
toolboxColor: "#8d8d8d",
|
|
153
|
+
toolboxEmphasisColor: "#1c2024",
|
|
154
|
+
tooltipAxisColor: "#cccccc",
|
|
155
|
+
tooltipAxisWidth: 1,
|
|
156
|
+
timelineLineColor: "#dae1f5",
|
|
157
|
+
timelineLineWidth: 2,
|
|
158
|
+
timelineItemColor: "#a4b1d7",
|
|
159
|
+
timelineItemColorE: "#ffffff",
|
|
160
|
+
timelineCheckColor: "#316bf3",
|
|
161
|
+
timelineCheckBorderColor: "#ffffff",
|
|
162
|
+
timelineItemBorderWidth: 1,
|
|
163
|
+
timelineControlColor: "#a4b1d7",
|
|
164
|
+
timelineControlBorderColor: "#a4b1d7",
|
|
165
|
+
timelineControlBorderWidth: 1,
|
|
166
|
+
timelineLabelColor: "#a4b1d7"
|
|
167
|
+
};
|
|
168
|
+
var chartTheme = {
|
|
169
|
+
version: version,
|
|
170
|
+
themeName: themeName,
|
|
171
|
+
theme: theme
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
type ChartProps = Omit<React__default.ComponentProps<typeof ReactECharts>, 'option'> & {
|
|
175
|
+
option: EChartOption;
|
|
176
|
+
};
|
|
177
|
+
declare function Chart(props: ChartProps): JSX.Element;
|
|
178
|
+
|
|
179
|
+
export { Chart, type ChartProps, chartTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/charts/horizontal-bar-chart.tsx
|
|
21
|
+
var horizontal_bar_chart_exports = {};
|
|
22
|
+
__export(horizontal_bar_chart_exports, {
|
|
23
|
+
HorizontalBarChart: () => HorizontalBarChart
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(horizontal_bar_chart_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
function HorizontalBarChart(props) {
|
|
28
|
+
const { total, value, backgroundColor, barColor, height } = props;
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: "tipp_horizontal-bar-chart bar-wrapper",
|
|
33
|
+
style: { height, backgroundColor },
|
|
34
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
style: {
|
|
38
|
+
width: `${Math.round(value / total * 100)}%`,
|
|
39
|
+
height: "100%"
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bar", style: { backgroundColor: barColor } })
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
HorizontalBarChart
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=horizontal-bar-chart.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/charts/horizontal-bar-chart.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface HorizontalBarChartProps {\n /** 100% 바가 뜻하는 전체 값 */\n total: number;\n /** 화면에 채워져보이는 값 */\n value: number;\n /** 배경 색상 */\n backgroundColor?: string;\n /** 바의 색상 */\n barColor?: string;\n /** 바의 높이 */\n height?: number;\n}\n\nexport function HorizontalBarChart(\n props: HorizontalBarChartProps\n): React.ReactNode {\n const { total, value, backgroundColor, barColor, height } = props;\n return (\n <div\n className=\"tipp_horizontal-bar-chart bar-wrapper\"\n style={{ height, backgroundColor }}\n >\n <div\n style={{\n width: `${Math.round((value / total) * 100)}%`,\n height: '100%',\n }}\n >\n <div className=\"bar\" style={{ backgroundColor: barColor }} />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BQ;AAfD,SAAS,mBACd,OACiB;AACjB,QAAM,EAAE,OAAO,OAAO,iBAAiB,UAAU,OAAO,IAAI;AAC5D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,QAAQ,gBAAgB;AAAA,MAEjC;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,YACL,OAAO,GAAG,KAAK,MAAO,QAAQ,QAAS,GAAG,CAAC;AAAA,YAC3C,QAAQ;AAAA,UACV;AAAA,UAEA,sDAAC,SAAI,WAAU,OAAM,OAAO,EAAE,iBAAiB,SAAS,GAAG;AAAA;AAAA,MAC7D;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface HorizontalBarChartProps {
|
|
4
|
+
/** 100% 바가 뜻하는 전체 값 */
|
|
5
|
+
total: number;
|
|
6
|
+
/** 화면에 채워져보이는 값 */
|
|
7
|
+
value: number;
|
|
8
|
+
/** 배경 색상 */
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
/** 바의 색상 */
|
|
11
|
+
barColor?: string;
|
|
12
|
+
/** 바의 높이 */
|
|
13
|
+
height?: number;
|
|
14
|
+
}
|
|
15
|
+
declare function HorizontalBarChart(props: HorizontalBarChartProps): React__default.ReactNode;
|
|
16
|
+
|
|
17
|
+
export { HorizontalBarChart, type HorizontalBarChartProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface HorizontalBarChartProps {
|
|
4
|
+
/** 100% 바가 뜻하는 전체 값 */
|
|
5
|
+
total: number;
|
|
6
|
+
/** 화면에 채워져보이는 값 */
|
|
7
|
+
value: number;
|
|
8
|
+
/** 배경 색상 */
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
/** 바의 색상 */
|
|
11
|
+
barColor?: string;
|
|
12
|
+
/** 바의 높이 */
|
|
13
|
+
height?: number;
|
|
14
|
+
}
|
|
15
|
+
declare function HorizontalBarChart(props: HorizontalBarChartProps): React__default.ReactNode;
|
|
16
|
+
|
|
17
|
+
export { HorizontalBarChart, type HorizontalBarChartProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __export = (target, all) => {
|
|
26
|
+
for (var name in all)
|
|
27
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
+
};
|
|
29
|
+
var __copyProps = (to, from, except, desc) => {
|
|
30
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
31
|
+
for (let key of __getOwnPropNames(from))
|
|
32
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
33
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
|
+
}
|
|
35
|
+
return to;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
39
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
40
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
41
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
42
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
43
|
+
mod
|
|
44
|
+
));
|
|
45
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
|
+
|
|
47
|
+
// src/charts/index.ts
|
|
48
|
+
var charts_exports = {};
|
|
49
|
+
__export(charts_exports, {
|
|
50
|
+
Chart: () => Chart,
|
|
51
|
+
HorizontalBarChart: () => HorizontalBarChart,
|
|
52
|
+
chartTheme: () => chart_theme_default
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(charts_exports);
|
|
55
|
+
|
|
56
|
+
// src/charts/chart.tsx
|
|
57
|
+
var import_react = require("react");
|
|
58
|
+
var import_react_resize_detector = require("react-resize-detector");
|
|
59
|
+
var import_echarts_for_react = __toESM(require("echarts-for-react"), 1);
|
|
60
|
+
var import_lodash_es = require("lodash-es");
|
|
61
|
+
|
|
62
|
+
// src/charts/chart-theme.json
|
|
63
|
+
var chart_theme_default = {
|
|
64
|
+
version: 1,
|
|
65
|
+
themeName: "customed",
|
|
66
|
+
theme: {
|
|
67
|
+
seriesCnt: "5",
|
|
68
|
+
backgroundColor: "rgba(0,0,0,0)",
|
|
69
|
+
titleColor: "#1c2024",
|
|
70
|
+
subtitleColor: "#8d8d8d",
|
|
71
|
+
textColorShow: false,
|
|
72
|
+
textColor: "#333",
|
|
73
|
+
markTextColor: "#ffffff",
|
|
74
|
+
color: [
|
|
75
|
+
"#ffe629",
|
|
76
|
+
"#3e63dd",
|
|
77
|
+
"#ec9455",
|
|
78
|
+
"#5bb98b",
|
|
79
|
+
"#cb1d63",
|
|
80
|
+
"#3ba272",
|
|
81
|
+
"#fc8452",
|
|
82
|
+
"#9a60b4",
|
|
83
|
+
"#ea7ccc"
|
|
84
|
+
],
|
|
85
|
+
borderColor: "#8d8d8d",
|
|
86
|
+
borderWidth: 0,
|
|
87
|
+
visualMapColor: ["#bf444c", "#d88273", "#f6efa6"],
|
|
88
|
+
legendTextColor: "#1c2024",
|
|
89
|
+
kColor: "#eb5454",
|
|
90
|
+
kColor0: "#47b262",
|
|
91
|
+
kBorderColor: "#eb5454",
|
|
92
|
+
kBorderColor0: "#47b262",
|
|
93
|
+
kBorderWidth: 1,
|
|
94
|
+
lineWidth: 2,
|
|
95
|
+
symbolSize: 4,
|
|
96
|
+
symbol: "emptyCircle",
|
|
97
|
+
symbolBorderWidth: 1,
|
|
98
|
+
lineSmooth: false,
|
|
99
|
+
graphLineWidth: 1,
|
|
100
|
+
graphLineColor: "#aaa",
|
|
101
|
+
mapLabelColor: "#000",
|
|
102
|
+
mapLabelColorE: "rgb(100,0,0)",
|
|
103
|
+
mapBorderColor: "#444",
|
|
104
|
+
mapBorderColorE: "#444",
|
|
105
|
+
mapBorderWidth: 0.5,
|
|
106
|
+
mapBorderWidthE: 1,
|
|
107
|
+
mapAreaColor: "#eee",
|
|
108
|
+
mapAreaColorE: "rgba(255,215,0,0.8)",
|
|
109
|
+
axes: [
|
|
110
|
+
{
|
|
111
|
+
type: "all",
|
|
112
|
+
name: "\u901A\u7528\u5750\u6807\u8F74",
|
|
113
|
+
axisLineShow: true,
|
|
114
|
+
axisLineColor: "#6E7079",
|
|
115
|
+
axisTickShow: true,
|
|
116
|
+
axisTickColor: "#6E7079",
|
|
117
|
+
axisLabelShow: true,
|
|
118
|
+
axisLabelColor: "#6E7079",
|
|
119
|
+
splitLineShow: true,
|
|
120
|
+
splitLineColor: ["#E0E6F1"],
|
|
121
|
+
splitAreaShow: false,
|
|
122
|
+
splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: "category",
|
|
126
|
+
name: "\u7C7B\u76EE\u5750\u6807\u8F74",
|
|
127
|
+
axisLineShow: true,
|
|
128
|
+
axisLineColor: "#6E7079",
|
|
129
|
+
axisTickShow: true,
|
|
130
|
+
axisTickColor: "#6E7079",
|
|
131
|
+
axisLabelShow: true,
|
|
132
|
+
axisLabelColor: "#6E7079",
|
|
133
|
+
splitLineShow: false,
|
|
134
|
+
splitLineColor: ["#E0E6F1"],
|
|
135
|
+
splitAreaShow: false,
|
|
136
|
+
splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: "value",
|
|
140
|
+
name: "\u6570\u503C\u5750\u6807\u8F74",
|
|
141
|
+
axisLineShow: false,
|
|
142
|
+
axisLineColor: "#6E7079",
|
|
143
|
+
axisTickShow: false,
|
|
144
|
+
axisTickColor: "#6E7079",
|
|
145
|
+
axisLabelShow: true,
|
|
146
|
+
axisLabelColor: "#6E7079",
|
|
147
|
+
splitLineShow: true,
|
|
148
|
+
splitLineColor: ["#E0E6F1"],
|
|
149
|
+
splitAreaShow: false,
|
|
150
|
+
splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: "log",
|
|
154
|
+
name: "\u5BF9\u6570\u5750\u6807\u8F74",
|
|
155
|
+
axisLineShow: false,
|
|
156
|
+
axisLineColor: "#6E7079",
|
|
157
|
+
axisTickShow: false,
|
|
158
|
+
axisTickColor: "#6E7079",
|
|
159
|
+
axisLabelShow: true,
|
|
160
|
+
axisLabelColor: "#6E7079",
|
|
161
|
+
splitLineShow: true,
|
|
162
|
+
splitLineColor: ["#E0E6F1"],
|
|
163
|
+
splitAreaShow: false,
|
|
164
|
+
splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
type: "time",
|
|
168
|
+
name: "\u65F6\u95F4\u5750\u6807\u8F74",
|
|
169
|
+
axisLineShow: true,
|
|
170
|
+
axisLineColor: "#6E7079",
|
|
171
|
+
axisTickShow: true,
|
|
172
|
+
axisTickColor: "#6E7079",
|
|
173
|
+
axisLabelShow: true,
|
|
174
|
+
axisLabelColor: "#6E7079",
|
|
175
|
+
splitLineShow: false,
|
|
176
|
+
splitLineColor: ["#E0E6F1"],
|
|
177
|
+
splitAreaShow: false,
|
|
178
|
+
splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
axisSeperateSetting: true,
|
|
182
|
+
toolboxColor: "#8d8d8d",
|
|
183
|
+
toolboxEmphasisColor: "#1c2024",
|
|
184
|
+
tooltipAxisColor: "#cccccc",
|
|
185
|
+
tooltipAxisWidth: 1,
|
|
186
|
+
timelineLineColor: "#dae1f5",
|
|
187
|
+
timelineLineWidth: 2,
|
|
188
|
+
timelineItemColor: "#a4b1d7",
|
|
189
|
+
timelineItemColorE: "#ffffff",
|
|
190
|
+
timelineCheckColor: "#316bf3",
|
|
191
|
+
timelineCheckBorderColor: "#ffffff",
|
|
192
|
+
timelineItemBorderWidth: 1,
|
|
193
|
+
timelineControlColor: "#a4b1d7",
|
|
194
|
+
timelineControlBorderColor: "#a4b1d7",
|
|
195
|
+
timelineControlBorderWidth: 1,
|
|
196
|
+
timelineLabelColor: "#a4b1d7"
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// src/charts/chart.tsx
|
|
201
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
202
|
+
function Chart(props) {
|
|
203
|
+
const { width, height, ref } = (0, import_react_resize_detector.useResizeDetector)({
|
|
204
|
+
handleHeight: false,
|
|
205
|
+
refreshMode: "debounce",
|
|
206
|
+
refreshRate: 100
|
|
207
|
+
});
|
|
208
|
+
const option = (0, import_react.useMemo)(() => {
|
|
209
|
+
const baseOption = {
|
|
210
|
+
textStyle: { fontFamily: "Noto Sans KR" },
|
|
211
|
+
tooltip: { textStyle: { fontSize: 16 } }
|
|
212
|
+
};
|
|
213
|
+
return (0, import_lodash_es.merge)(baseOption, props.option);
|
|
214
|
+
}, [props.option]);
|
|
215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
216
|
+
import_echarts_for_react.default,
|
|
217
|
+
__spreadProps(__spreadValues({
|
|
218
|
+
style: { width, height },
|
|
219
|
+
theme: chart_theme_default
|
|
220
|
+
}, props), {
|
|
221
|
+
option
|
|
222
|
+
})
|
|
223
|
+
) });
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// src/charts/horizontal-bar-chart.tsx
|
|
227
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
228
|
+
function HorizontalBarChart(props) {
|
|
229
|
+
const { total, value, backgroundColor, barColor, height } = props;
|
|
230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
231
|
+
"div",
|
|
232
|
+
{
|
|
233
|
+
className: "tipp_horizontal-bar-chart bar-wrapper",
|
|
234
|
+
style: { height, backgroundColor },
|
|
235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
236
|
+
"div",
|
|
237
|
+
{
|
|
238
|
+
style: {
|
|
239
|
+
width: `${Math.round(value / total * 100)}%`,
|
|
240
|
+
height: "100%"
|
|
241
|
+
},
|
|
242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "bar", style: { backgroundColor: barColor } })
|
|
243
|
+
}
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
249
|
+
0 && (module.exports = {
|
|
250
|
+
Chart,
|
|
251
|
+
HorizontalBarChart,
|
|
252
|
+
chartTheme
|
|
253
|
+
});
|
|
254
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/charts/index.ts","../../src/charts/chart.tsx","../../src/charts/chart-theme.json","../../src/charts/horizontal-bar-chart.tsx"],"sourcesContent":["export * from './chart';\nexport * from './horizontal-bar-chart';\n","import React, { useMemo } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\nimport ReactECharts from 'echarts-for-react';\nimport type { EChartOption } from 'echarts';\nimport { merge } from 'lodash-es';\nimport chartTheme from './chart-theme.json';\n\nexport { chartTheme };\n\nexport type ChartProps = Omit<\n React.ComponentProps<typeof ReactECharts>,\n 'option'\n> & {\n option: EChartOption;\n};\n\nexport function Chart(props: ChartProps): JSX.Element {\n const { width, height, ref } = useResizeDetector({\n handleHeight: false,\n refreshMode: 'debounce',\n refreshRate: 100,\n });\n\n const option = useMemo(() => {\n const baseOption: EChartOption = {\n textStyle: { fontFamily: 'Noto Sans KR' },\n tooltip: { textStyle: { fontSize: 16 } },\n };\n return merge(baseOption, props.option);\n }, [props.option]);\n\n return (\n <div ref={ref} style={{ width: '100%', height: '100%' }}>\n <ReactECharts\n style={{ width, height }}\n theme={chartTheme}\n {...props}\n option={option}\n />\n </div>\n );\n}\n","{\n \"version\": 1,\n \"themeName\": \"customed\",\n \"theme\": {\n \"seriesCnt\": \"5\",\n \"backgroundColor\": \"rgba(0,0,0,0)\",\n \"titleColor\": \"#1c2024\",\n \"subtitleColor\": \"#8d8d8d\",\n \"textColorShow\": false,\n \"textColor\": \"#333\",\n \"markTextColor\": \"#ffffff\",\n \"color\": [\n \"#ffe629\",\n \"#3e63dd\",\n \"#ec9455\",\n \"#5bb98b\",\n \"#cb1d63\",\n \"#3ba272\",\n \"#fc8452\",\n \"#9a60b4\",\n \"#ea7ccc\"\n ],\n \"borderColor\": \"#8d8d8d\",\n \"borderWidth\": 0,\n \"visualMapColor\": [\"#bf444c\", \"#d88273\", \"#f6efa6\"],\n \"legendTextColor\": \"#1c2024\",\n \"kColor\": \"#eb5454\",\n \"kColor0\": \"#47b262\",\n \"kBorderColor\": \"#eb5454\",\n \"kBorderColor0\": \"#47b262\",\n \"kBorderWidth\": 1,\n \"lineWidth\": 2,\n \"symbolSize\": 4,\n \"symbol\": \"emptyCircle\",\n \"symbolBorderWidth\": 1,\n \"lineSmooth\": false,\n \"graphLineWidth\": 1,\n \"graphLineColor\": \"#aaa\",\n \"mapLabelColor\": \"#000\",\n \"mapLabelColorE\": \"rgb(100,0,0)\",\n \"mapBorderColor\": \"#444\",\n \"mapBorderColorE\": \"#444\",\n \"mapBorderWidth\": 0.5,\n \"mapBorderWidthE\": 1,\n \"mapAreaColor\": \"#eee\",\n \"mapAreaColorE\": \"rgba(255,215,0,0.8)\",\n \"axes\": [\n {\n \"type\": \"all\",\n \"name\": \"通用坐标轴\",\n \"axisLineShow\": true,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": true,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": true,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n },\n {\n \"type\": \"category\",\n \"name\": \"类目坐标轴\",\n \"axisLineShow\": true,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": true,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": false,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n },\n {\n \"type\": \"value\",\n \"name\": \"数值坐标轴\",\n \"axisLineShow\": false,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": false,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": true,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n },\n {\n \"type\": \"log\",\n \"name\": \"对数坐标轴\",\n \"axisLineShow\": false,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": false,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": true,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n },\n {\n \"type\": \"time\",\n \"name\": \"时间坐标轴\",\n \"axisLineShow\": true,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": true,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": false,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n }\n ],\n \"axisSeperateSetting\": true,\n \"toolboxColor\": \"#8d8d8d\",\n \"toolboxEmphasisColor\": \"#1c2024\",\n \"tooltipAxisColor\": \"#cccccc\",\n \"tooltipAxisWidth\": 1,\n \"timelineLineColor\": \"#dae1f5\",\n \"timelineLineWidth\": 2,\n \"timelineItemColor\": \"#a4b1d7\",\n \"timelineItemColorE\": \"#ffffff\",\n \"timelineCheckColor\": \"#316bf3\",\n \"timelineCheckBorderColor\": \"#ffffff\",\n \"timelineItemBorderWidth\": 1,\n \"timelineControlColor\": \"#a4b1d7\",\n \"timelineControlBorderColor\": \"#a4b1d7\",\n \"timelineControlBorderWidth\": 1,\n \"timelineLabelColor\": \"#a4b1d7\"\n }\n}\n","import React from 'react';\n\nexport interface HorizontalBarChartProps {\n /** 100% 바가 뜻하는 전체 값 */\n total: number;\n /** 화면에 채워져보이는 값 */\n value: number;\n /** 배경 색상 */\n backgroundColor?: string;\n /** 바의 색상 */\n barColor?: string;\n /** 바의 높이 */\n height?: number;\n}\n\nexport function HorizontalBarChart(\n props: HorizontalBarChartProps\n): React.ReactNode {\n const { total, value, backgroundColor, barColor, height } = props;\n return (\n <div\n className=\"tipp_horizontal-bar-chart bar-wrapper\"\n style={{ height, backgroundColor }}\n >\n <div\n style={{\n width: `${Math.round((value / total) * 100)}%`,\n height: '100%',\n }}\n >\n <div className=\"bar\" style={{ backgroundColor: barColor }} />\n </div>\n </div>\n );\n}\n"],"mappings":"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","names":["ReactECharts","import_jsx_runtime"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Chart,
|
|
3
|
+
chart_theme_default
|
|
4
|
+
} from "../chunk-EUS56L3L.js";
|
|
5
|
+
import {
|
|
6
|
+
HorizontalBarChart
|
|
7
|
+
} from "../chunk-SGMO4KBC.js";
|
|
8
|
+
import "../chunk-N552FDTV.js";
|
|
9
|
+
export {
|
|
10
|
+
Chart,
|
|
11
|
+
HorizontalBarChart,
|
|
12
|
+
chart_theme_default as chartTheme
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/charts/vertical-bar-chart.tsx
|
|
21
|
+
var vertical_bar_chart_exports = {};
|
|
22
|
+
__export(vertical_bar_chart_exports, {
|
|
23
|
+
VerticalBarChart: () => VerticalBarChart
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(vertical_bar_chart_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
function VerticalBarChart(props) {
|
|
28
|
+
const { total, value, backgroundColor, barColor, height } = props;
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: "tipp_vertical-bar-chart bar-wrapper",
|
|
33
|
+
style: { height, backgroundColor },
|
|
34
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { width: `${Math.round(value / total * 100)}%`, height }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
className: "tipp_vertical-bar-chart bar",
|
|
38
|
+
style: { backgroundColor: barColor }
|
|
39
|
+
}
|
|
40
|
+
) })
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {
|
|
46
|
+
VerticalBarChart
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=vertical-bar-chart.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/charts/vertical-bar-chart.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface VerticalBarChartProps {\n /** 100% 바가 뜻하는 전체 값 */\n total: number;\n /** 화면에 채워져보이는 값 */\n value: number;\n /** 배경 색상 */\n backgroundColor?: string;\n /** 바의 색상 */\n barColor?: string;\n /** 바의 높이 */\n height?: number;\n}\n\nexport function VerticalBarChart(\n props: VerticalBarChartProps\n): React.ReactNode {\n const { total, value, backgroundColor, barColor, height } = props;\n return (\n <div\n className=\"tipp_vertical-bar-chart bar-wrapper\"\n style={{ height, backgroundColor }}\n >\n <div style={{ width: `${Math.round((value / total) * 100)}%`, height }}>\n <div\n className=\"tipp_vertical-bar-chart bar\"\n style={{ backgroundColor: barColor }}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBQ;AAVD,SAAS,iBACd,OACiB;AACjB,QAAM,EAAE,OAAO,OAAO,iBAAiB,UAAU,OAAO,IAAI;AAC5D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,QAAQ,gBAAgB;AAAA,MAEjC,sDAAC,SAAI,OAAO,EAAE,OAAO,GAAG,KAAK,MAAO,QAAQ,QAAS,GAAG,CAAC,KAAK,OAAO,GACnE;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,OAAO,EAAE,iBAAiB,SAAS;AAAA;AAAA,MACrC,GACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|