trade-safety 1.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DetailedResult/AnalysisCard.d.ts +9 -0
- package/dist/components/DetailedResult/AnalysisCard.d.ts.map +1 -0
- package/dist/components/DetailedResult/PriceAnalysisSection.d.ts.map +1 -1
- package/dist/components/DetailedResult/RecommendationSection.d.ts +2 -3
- package/dist/components/DetailedResult/RecommendationSection.d.ts.map +1 -1
- package/dist/components/DetailedResult/SafetyChecklistSection.d.ts.map +1 -1
- package/dist/components/DetailedResult/SignalsSection.d.ts +8 -0
- package/dist/components/DetailedResult/SignalsSection.d.ts.map +1 -0
- package/dist/components/DetailedResult/TranslationSection.d.ts +1 -1
- package/dist/components/DetailedResult/TranslationSection.d.ts.map +1 -1
- package/dist/components/DetailedResult/index.d.ts +1 -4
- package/dist/components/DetailedResult/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +229 -665
- package/dist/index.mjs.map +1 -1
- package/dist/repositories/TradeSafetyRepository.d.ts +24 -24
- package/package.json +1 -1
- package/dist/components/DetailedResult/CautionsSection.d.ts +0 -7
- package/dist/components/DetailedResult/CautionsSection.d.ts.map +0 -1
- package/dist/components/DetailedResult/CompanionCtaSection.d.ts +0 -2
- package/dist/components/DetailedResult/CompanionCtaSection.d.ts.map +0 -1
- package/dist/components/DetailedResult/ExpertAdviceSection.d.ts +0 -6
- package/dist/components/DetailedResult/ExpertAdviceSection.d.ts.map +0 -1
- package/dist/components/DetailedResult/RiskScoreHero.d.ts +0 -6
- package/dist/components/DetailedResult/RiskScoreHero.d.ts.map +0 -1
- package/dist/components/DetailedResult/RiskSignalsSection.d.ts +0 -7
- package/dist/components/DetailedResult/RiskSignalsSection.d.ts.map +0 -1
- package/dist/components/DetailedResult/SafeIndicatorsSection.d.ts +0 -7
- package/dist/components/DetailedResult/SafeIndicatorsSection.d.ts.map +0 -1
- package/dist/components/QuickResultTeaser.d.ts +0 -8
- package/dist/components/QuickResultTeaser.d.ts.map +0 -1
- package/dist/components/RiskSignalCard.d.ts +0 -8
- package/dist/components/RiskSignalCard.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,739 +1,305 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { motion as s } from "framer-motion";
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
3
2
|
import { useTranslation as o } from "react-i18next";
|
|
4
3
|
import "i18next";
|
|
5
4
|
import "i18next-resources-to-backend";
|
|
6
5
|
import { TRADE_SAFETY_NS as d } from "./locale.mjs";
|
|
7
|
-
import { tradeSafetyTranslations as
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
viewBox: "0 0 24 24",
|
|
20
|
-
fill: "currentColor",
|
|
21
|
-
"aria-hidden": "true",
|
|
22
|
-
"data-slot": "icon",
|
|
23
|
-
ref: n,
|
|
24
|
-
"aria-labelledby": r
|
|
25
|
-
}, a), e ? /* @__PURE__ */ l.createElement("title", {
|
|
26
|
-
id: r
|
|
27
|
-
}, e) : null, /* @__PURE__ */ l.createElement("path", {
|
|
28
|
-
fillRule: "evenodd",
|
|
29
|
-
d: "M4.804 21.644A6.707 6.707 0 0 0 6 21.75a6.721 6.721 0 0 0 3.583-1.029c.774.182 1.584.279 2.417.279 5.322 0 9.75-3.97 9.75-9 0-5.03-4.428-9-9.75-9s-9.75 3.97-9.75 9c0 2.409 1.025 4.587 2.674 6.192.232.226.277.428.254.543a3.73 3.73 0 0 1-.814 1.686.75.75 0 0 0 .44 1.223ZM8.25 10.875a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25ZM10.875 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875-1.125a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z",
|
|
30
|
-
clipRule: "evenodd"
|
|
31
|
-
}));
|
|
6
|
+
import { tradeSafetyTranslations as J } from "./locale.mjs";
|
|
7
|
+
import * as c from "react";
|
|
8
|
+
import { BaseCrudRepository as p } from "@aioia/core";
|
|
9
|
+
import { z as r } from "zod";
|
|
10
|
+
function f(e) {
|
|
11
|
+
var t, n, a = "";
|
|
12
|
+
if (typeof e == "string" || typeof e == "number") a += e;
|
|
13
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
14
|
+
var l = e.length;
|
|
15
|
+
for (t = 0; t < l; t++) e[t] && (n = f(e[t])) && (a && (a += " "), a += n);
|
|
16
|
+
} else for (n in e) e[n] && (a && (a += " "), a += n);
|
|
17
|
+
return a;
|
|
32
18
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
titleId: r,
|
|
37
|
-
...a
|
|
38
|
-
}, n) {
|
|
39
|
-
return /* @__PURE__ */ l.createElement("svg", Object.assign({
|
|
40
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
-
viewBox: "0 0 24 24",
|
|
42
|
-
fill: "currentColor",
|
|
43
|
-
"aria-hidden": "true",
|
|
44
|
-
"data-slot": "icon",
|
|
45
|
-
ref: n,
|
|
46
|
-
"aria-labelledby": r
|
|
47
|
-
}, a), e ? /* @__PURE__ */ l.createElement("title", {
|
|
48
|
-
id: r
|
|
49
|
-
}, e) : null, /* @__PURE__ */ l.createElement("path", {
|
|
50
|
-
fillRule: "evenodd",
|
|
51
|
-
d: "M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
|
|
52
|
-
clipRule: "evenodd"
|
|
53
|
-
}));
|
|
19
|
+
function b() {
|
|
20
|
+
for (var e, t, n = 0, a = "", l = arguments.length; n < l; n++) (e = arguments[n]) && (t = f(e)) && (a && (a += " "), a += t);
|
|
21
|
+
return a;
|
|
54
22
|
}
|
|
55
|
-
const _ =
|
|
56
|
-
|
|
23
|
+
const _ = {
|
|
24
|
+
default: "border-base-300",
|
|
25
|
+
error: "border-error bg-error/10",
|
|
26
|
+
warning: "border-warning bg-warning/10",
|
|
27
|
+
success: "border-success bg-success/10",
|
|
28
|
+
info: "border-info bg-info/10"
|
|
29
|
+
};
|
|
30
|
+
function u({
|
|
57
31
|
title: e,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, a), e ? /* @__PURE__ */ l.createElement("title", {
|
|
70
|
-
id: r
|
|
71
|
-
}, e) : null, /* @__PURE__ */ l.createElement("path", {
|
|
72
|
-
fillRule: "evenodd",
|
|
73
|
-
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
|
|
74
|
-
clipRule: "evenodd"
|
|
75
|
-
}));
|
|
32
|
+
icon: t,
|
|
33
|
+
variant: n = "default",
|
|
34
|
+
children: a
|
|
35
|
+
}) {
|
|
36
|
+
return a ? /* @__PURE__ */ i("div", { className: b("rounded-lg border p-6", _[n]), children: [
|
|
37
|
+
e && /* @__PURE__ */ i("h2", { className: "mb-2 flex items-center gap-2 font-bold", children: [
|
|
38
|
+
e,
|
|
39
|
+
t
|
|
40
|
+
] }),
|
|
41
|
+
a
|
|
42
|
+
] }) : null;
|
|
76
43
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
title:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
clipRule: "evenodd"
|
|
97
|
-
}), /* @__PURE__ */ l.createElement("path", {
|
|
98
|
-
fillRule: "evenodd",
|
|
99
|
-
d: "M3 9.375C3 8.339 3.84 7.5 4.875 7.5h9.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625V9.375Zm9.586 4.594a.75.75 0 0 0-1.172-.938l-2.476 3.096-.908-.907a.75.75 0 0 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.116-.062l3-3.75Z",
|
|
100
|
-
clipRule: "evenodd"
|
|
101
|
-
}));
|
|
44
|
+
function x({ data: e }) {
|
|
45
|
+
const { t, i18n: n } = o(d);
|
|
46
|
+
return e ? /* @__PURE__ */ i(u, { title: t("result.priceAnalysis"), children: [
|
|
47
|
+
e.market_price_range && /* @__PURE__ */ i("div", { className: "mb-2", children: [
|
|
48
|
+
/* @__PURE__ */ s("h3", { className: "text-sm font-bold", children: t("result.marketPrice") }),
|
|
49
|
+
/* @__PURE__ */ s("p", { className: "text-xs", children: e.market_price_range })
|
|
50
|
+
] }),
|
|
51
|
+
e.offered_price && /* @__PURE__ */ i("div", { className: "mb-2", children: [
|
|
52
|
+
/* @__PURE__ */ s("h3", { className: "text-sm font-bold", children: t("result.offeredPrice") }),
|
|
53
|
+
/* @__PURE__ */ s("p", { className: "text-xs", children: new Intl.NumberFormat(n.language, {
|
|
54
|
+
style: "currency",
|
|
55
|
+
currency: e.currency || "USD"
|
|
56
|
+
}).format(e.offered_price) })
|
|
57
|
+
] }),
|
|
58
|
+
e.price_assessment && /* @__PURE__ */ i("div", { children: [
|
|
59
|
+
/* @__PURE__ */ s("h3", { className: "text-sm font-bold", children: t("result.priceAssessment") }),
|
|
60
|
+
/* @__PURE__ */ s("p", { className: "text-xs", children: e.price_assessment })
|
|
61
|
+
] })
|
|
62
|
+
] }) : null;
|
|
102
63
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}, n) {
|
|
109
|
-
return /* @__PURE__ */ l.createElement("svg", Object.assign({
|
|
110
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
111
|
-
viewBox: "0 0 24 24",
|
|
112
|
-
fill: "currentColor",
|
|
113
|
-
"aria-hidden": "true",
|
|
114
|
-
"data-slot": "icon",
|
|
115
|
-
ref: n,
|
|
116
|
-
"aria-labelledby": r
|
|
117
|
-
}, a), e ? /* @__PURE__ */ l.createElement("title", {
|
|
118
|
-
id: r
|
|
119
|
-
}, e) : null, /* @__PURE__ */ l.createElement("path", {
|
|
120
|
-
d: "M10.464 8.746c.227-.18.497-.311.786-.394v2.795a2.252 2.252 0 0 1-.786-.393c-.394-.313-.546-.681-.546-1.004 0-.323.152-.691.546-1.004ZM12.75 15.662v-2.824c.347.085.664.228.921.421.427.32.579.686.579.991 0 .305-.152.671-.579.991a2.534 2.534 0 0 1-.921.42Z"
|
|
121
|
-
}), /* @__PURE__ */ l.createElement("path", {
|
|
122
|
-
fillRule: "evenodd",
|
|
123
|
-
d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v.816a3.836 3.836 0 0 0-1.72.756c-.712.566-1.112 1.35-1.112 2.178 0 .829.4 1.612 1.113 2.178.502.4 1.102.647 1.719.756v2.978a2.536 2.536 0 0 1-.921-.421l-.879-.66a.75.75 0 0 0-.9 1.2l.879.66c.533.4 1.169.645 1.821.75V18a.75.75 0 0 0 1.5 0v-.81a4.124 4.124 0 0 0 1.821-.749c.745-.559 1.179-1.344 1.179-2.191 0-.847-.434-1.632-1.179-2.191a4.122 4.122 0 0 0-1.821-.75V8.354c.29.082.559.213.786.393l.415.33a.75.75 0 0 0 .933-1.175l-.415-.33a3.836 3.836 0 0 0-1.719-.755V6Z",
|
|
124
|
-
clipRule: "evenodd"
|
|
125
|
-
}));
|
|
64
|
+
function v({
|
|
65
|
+
recommendation: e
|
|
66
|
+
}) {
|
|
67
|
+
const { t } = o(d);
|
|
68
|
+
return e ? /* @__PURE__ */ s(u, { title: t("result.recommendation"), children: /* @__PURE__ */ s("p", { className: "text-xs", children: e }) }) : null;
|
|
126
69
|
}
|
|
127
|
-
|
|
128
|
-
function A({
|
|
70
|
+
function w({
|
|
129
71
|
title: e,
|
|
130
|
-
titleId:
|
|
131
|
-
...
|
|
132
|
-
},
|
|
133
|
-
return /* @__PURE__ */
|
|
72
|
+
titleId: t,
|
|
73
|
+
...n
|
|
74
|
+
}, a) {
|
|
75
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
134
76
|
xmlns: "http://www.w3.org/2000/svg",
|
|
135
77
|
viewBox: "0 0 24 24",
|
|
136
78
|
fill: "currentColor",
|
|
137
79
|
"aria-hidden": "true",
|
|
138
80
|
"data-slot": "icon",
|
|
139
|
-
ref:
|
|
140
|
-
"aria-labelledby":
|
|
141
|
-
},
|
|
142
|
-
id:
|
|
143
|
-
}, e) : null, /* @__PURE__ */
|
|
81
|
+
ref: a,
|
|
82
|
+
"aria-labelledby": t
|
|
83
|
+
}, n), e ? /* @__PURE__ */ c.createElement("title", {
|
|
84
|
+
id: t
|
|
85
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
144
86
|
fillRule: "evenodd",
|
|
145
|
-
d: "
|
|
87
|
+
d: "M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
|
|
146
88
|
clipRule: "evenodd"
|
|
147
89
|
}));
|
|
148
90
|
}
|
|
149
|
-
const
|
|
150
|
-
function
|
|
91
|
+
const y = /* @__PURE__ */ c.forwardRef(w);
|
|
92
|
+
function N({
|
|
151
93
|
title: e,
|
|
152
|
-
titleId:
|
|
153
|
-
...
|
|
154
|
-
},
|
|
155
|
-
return /* @__PURE__ */
|
|
94
|
+
titleId: t,
|
|
95
|
+
...n
|
|
96
|
+
}, a) {
|
|
97
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
156
98
|
xmlns: "http://www.w3.org/2000/svg",
|
|
157
99
|
viewBox: "0 0 24 24",
|
|
158
100
|
fill: "currentColor",
|
|
159
101
|
"aria-hidden": "true",
|
|
160
102
|
"data-slot": "icon",
|
|
161
|
-
ref:
|
|
162
|
-
"aria-labelledby":
|
|
163
|
-
},
|
|
164
|
-
id:
|
|
165
|
-
}, e) : null, /* @__PURE__ */
|
|
103
|
+
ref: a,
|
|
104
|
+
"aria-labelledby": t
|
|
105
|
+
}, n), e ? /* @__PURE__ */ c.createElement("title", {
|
|
106
|
+
id: t
|
|
107
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
166
108
|
fillRule: "evenodd",
|
|
167
109
|
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",
|
|
168
110
|
clipRule: "evenodd"
|
|
169
111
|
}));
|
|
170
112
|
}
|
|
171
|
-
const
|
|
172
|
-
function
|
|
173
|
-
title: e,
|
|
174
|
-
titleId: r,
|
|
175
|
-
...a
|
|
176
|
-
}, n) {
|
|
177
|
-
return /* @__PURE__ */ l.createElement("svg", Object.assign({
|
|
178
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
179
|
-
viewBox: "0 0 24 24",
|
|
180
|
-
fill: "currentColor",
|
|
181
|
-
"aria-hidden": "true",
|
|
182
|
-
"data-slot": "icon",
|
|
183
|
-
ref: n,
|
|
184
|
-
"aria-labelledby": r
|
|
185
|
-
}, a), e ? /* @__PURE__ */ l.createElement("title", {
|
|
186
|
-
id: r
|
|
187
|
-
}, e) : null, /* @__PURE__ */ l.createElement("path", {
|
|
188
|
-
d: "m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z"
|
|
189
|
-
}));
|
|
190
|
-
}
|
|
191
|
-
const O = /* @__PURE__ */ l.forwardRef(B);
|
|
192
|
-
function z({
|
|
193
|
-
title: e,
|
|
194
|
-
titleId: r,
|
|
195
|
-
...a
|
|
196
|
-
}, n) {
|
|
197
|
-
return /* @__PURE__ */ l.createElement("svg", Object.assign({
|
|
198
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
199
|
-
viewBox: "0 0 24 24",
|
|
200
|
-
fill: "currentColor",
|
|
201
|
-
"aria-hidden": "true",
|
|
202
|
-
"data-slot": "icon",
|
|
203
|
-
ref: n,
|
|
204
|
-
"aria-labelledby": r
|
|
205
|
-
}, a), e ? /* @__PURE__ */ l.createElement("title", {
|
|
206
|
-
id: r
|
|
207
|
-
}, e) : null, /* @__PURE__ */ l.createElement("path", {
|
|
208
|
-
fillRule: "evenodd",
|
|
209
|
-
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",
|
|
210
|
-
clipRule: "evenodd"
|
|
211
|
-
}));
|
|
212
|
-
}
|
|
213
|
-
const F = /* @__PURE__ */ l.forwardRef(z);
|
|
214
|
-
function I({
|
|
215
|
-
title: e,
|
|
216
|
-
titleId: r,
|
|
217
|
-
...a
|
|
218
|
-
}, n) {
|
|
219
|
-
return /* @__PURE__ */ l.createElement("svg", Object.assign({
|
|
220
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
221
|
-
viewBox: "0 0 24 24",
|
|
222
|
-
fill: "currentColor",
|
|
223
|
-
"aria-hidden": "true",
|
|
224
|
-
"data-slot": "icon",
|
|
225
|
-
ref: n,
|
|
226
|
-
"aria-labelledby": r
|
|
227
|
-
}, a), e ? /* @__PURE__ */ l.createElement("title", {
|
|
228
|
-
id: r
|
|
229
|
-
}, e) : null, /* @__PURE__ */ l.createElement("path", {
|
|
230
|
-
fillRule: "evenodd",
|
|
231
|
-
d: "M9 2.25a.75.75 0 0 1 .75.75v1.506a49.384 49.384 0 0 1 5.343.371.75.75 0 1 1-.186 1.489c-.66-.083-1.323-.151-1.99-.206a18.67 18.67 0 0 1-2.97 6.323c.318.384.65.753 1 1.107a.75.75 0 0 1-1.07 1.052A18.902 18.902 0 0 1 9 13.687a18.823 18.823 0 0 1-5.656 4.482.75.75 0 0 1-.688-1.333 17.323 17.323 0 0 0 5.396-4.353A18.72 18.72 0 0 1 5.89 8.598a.75.75 0 0 1 1.388-.568A17.21 17.21 0 0 0 9 11.224a17.168 17.168 0 0 0 2.391-5.165 48.04 48.04 0 0 0-8.298.307.75.75 0 0 1-.186-1.489 49.159 49.159 0 0 1 5.343-.371V3A.75.75 0 0 1 9 2.25ZM15.75 9a.75.75 0 0 1 .68.433l5.25 11.25a.75.75 0 1 1-1.36.634l-1.198-2.567h-6.744l-1.198 2.567a.75.75 0 0 1-1.36-.634l5.25-11.25A.75.75 0 0 1 15.75 9Zm-2.672 8.25h5.344l-2.672-5.726-2.672 5.726Z",
|
|
232
|
-
clipRule: "evenodd"
|
|
233
|
-
}));
|
|
234
|
-
}
|
|
235
|
-
const T = /* @__PURE__ */ l.forwardRef(I);
|
|
236
|
-
function H({
|
|
113
|
+
const S = /* @__PURE__ */ c.forwardRef(N);
|
|
114
|
+
function R({
|
|
237
115
|
title: e,
|
|
238
|
-
titleId:
|
|
239
|
-
...
|
|
240
|
-
},
|
|
241
|
-
return /* @__PURE__ */
|
|
116
|
+
titleId: t,
|
|
117
|
+
...n
|
|
118
|
+
}, a) {
|
|
119
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
242
120
|
xmlns: "http://www.w3.org/2000/svg",
|
|
243
121
|
viewBox: "0 0 24 24",
|
|
244
122
|
fill: "currentColor",
|
|
245
123
|
"aria-hidden": "true",
|
|
246
124
|
"data-slot": "icon",
|
|
247
|
-
ref:
|
|
248
|
-
"aria-labelledby":
|
|
249
|
-
},
|
|
250
|
-
id:
|
|
251
|
-
}, e) : null, /* @__PURE__ */
|
|
252
|
-
d: "M12 .75a8.25 8.25 0 0 0-4.135 15.39c.686.398 1.115 1.008 1.134 1.623a.75.75 0 0 0 .577.706c.352.083.71.148 1.074.195.323.041.6-.218.6-.544v-4.661a6.714 6.714 0 0 1-.937-.171.75.75 0 1 1 .374-1.453 5.261 5.261 0 0 0 2.626 0 .75.75 0 1 1 .374 1.452 6.712 6.712 0 0 1-.937.172v4.66c0 .327.277.586.6.545.364-.047.722-.112 1.074-.195a.75.75 0 0 0 .577-.706c.02-.615.448-1.225 1.134-1.623A8.25 8.25 0 0 0 12 .75Z"
|
|
253
|
-
}), /* @__PURE__ */ l.createElement("path", {
|
|
125
|
+
ref: a,
|
|
126
|
+
"aria-labelledby": t
|
|
127
|
+
}, n), e ? /* @__PURE__ */ c.createElement("title", {
|
|
128
|
+
id: t
|
|
129
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
254
130
|
fillRule: "evenodd",
|
|
255
|
-
d: "
|
|
131
|
+
d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-2.625 6c-.54 0-.828.419-.936.634a1.96 1.96 0 0 0-.189.866c0 .298.059.605.189.866.108.215.395.634.936.634.54 0 .828-.419.936-.634.13-.26.189-.568.189-.866 0-.298-.059-.605-.189-.866-.108-.215-.395-.634-.936-.634Zm4.314.634c.108-.215.395-.634.936-.634.54 0 .828.419.936.634.13.26.189.568.189.866 0 .298-.059.605-.189.866-.108.215-.395.634-.936.634-.54 0-.828-.419-.936-.634a1.96 1.96 0 0 1-.189-.866c0-.298.059-.605.189-.866Zm-4.34 7.964a.75.75 0 0 1-1.061-1.06 5.236 5.236 0 0 1 3.73-1.538 5.236 5.236 0 0 1 3.695 1.538.75.75 0 1 1-1.061 1.06 3.736 3.736 0 0 0-2.639-1.098 3.736 3.736 0 0 0-2.664 1.098Z",
|
|
256
132
|
clipRule: "evenodd"
|
|
257
133
|
}));
|
|
258
134
|
}
|
|
259
|
-
const
|
|
260
|
-
function
|
|
135
|
+
const k = /* @__PURE__ */ c.forwardRef(R);
|
|
136
|
+
function E({
|
|
261
137
|
title: e,
|
|
262
|
-
titleId:
|
|
263
|
-
...
|
|
264
|
-
},
|
|
265
|
-
return /* @__PURE__ */
|
|
138
|
+
titleId: t,
|
|
139
|
+
...n
|
|
140
|
+
}, a) {
|
|
141
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
266
142
|
xmlns: "http://www.w3.org/2000/svg",
|
|
267
143
|
viewBox: "0 0 24 24",
|
|
268
144
|
fill: "currentColor",
|
|
269
145
|
"aria-hidden": "true",
|
|
270
146
|
"data-slot": "icon",
|
|
271
|
-
ref:
|
|
272
|
-
"aria-labelledby":
|
|
273
|
-
},
|
|
274
|
-
id:
|
|
275
|
-
}, e) : null, /* @__PURE__ */
|
|
147
|
+
ref: a,
|
|
148
|
+
"aria-labelledby": t
|
|
149
|
+
}, n), e ? /* @__PURE__ */ c.createElement("title", {
|
|
150
|
+
id: t
|
|
151
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
276
152
|
fillRule: "evenodd",
|
|
277
153
|
d: "M11.484 2.17a.75.75 0 0 1 1.032 0 11.209 11.209 0 0 0 7.877 3.08.75.75 0 0 1 .722.515 12.74 12.74 0 0 1 .635 3.985c0 5.942-4.064 10.933-9.563 12.348a.749.749 0 0 1-.374 0C6.314 20.683 2.25 15.692 2.25 9.75c0-1.39.223-2.73.635-3.985a.75.75 0 0 1 .722-.516l.143.001c2.996 0 5.718-1.17 7.734-3.08ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75ZM12 15a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75v-.008a.75.75 0 0 0-.75-.75H12Z",
|
|
278
154
|
clipRule: "evenodd"
|
|
279
155
|
}));
|
|
280
156
|
}
|
|
281
|
-
const
|
|
282
|
-
function
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
viewBox: "0 0 24 24",
|
|
290
|
-
fill: "currentColor",
|
|
291
|
-
"aria-hidden": "true",
|
|
292
|
-
"data-slot": "icon",
|
|
293
|
-
ref: n,
|
|
294
|
-
"aria-labelledby": r
|
|
295
|
-
}, a), e ? /* @__PURE__ */ l.createElement("title", {
|
|
296
|
-
id: r
|
|
297
|
-
}, e) : null, /* @__PURE__ */ l.createElement("path", {
|
|
298
|
-
fillRule: "evenodd",
|
|
299
|
-
d: "M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z",
|
|
300
|
-
clipRule: "evenodd"
|
|
301
|
-
}));
|
|
302
|
-
}
|
|
303
|
-
const U = /* @__PURE__ */ l.forwardRef(V);
|
|
304
|
-
function b(e) {
|
|
305
|
-
var r, a, n = "";
|
|
306
|
-
if (typeof e == "string" || typeof e == "number") n += e;
|
|
307
|
-
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
308
|
-
var m = e.length;
|
|
309
|
-
for (r = 0; r < m; r++) e[r] && (a = b(e[r])) && (n && (n += " "), n += a);
|
|
310
|
-
} else for (a in e) e[a] && (n && (n += " "), n += a);
|
|
311
|
-
return n;
|
|
312
|
-
}
|
|
313
|
-
function u() {
|
|
314
|
-
for (var e, r, a = 0, n = "", m = arguments.length; a < m; a++) (e = arguments[a]) && (r = b(e)) && (n && (n += " "), n += r);
|
|
315
|
-
return n;
|
|
316
|
-
}
|
|
317
|
-
const q = {
|
|
318
|
-
error: "bg-error/10 border-error/30",
|
|
319
|
-
warning: "bg-warning/10 border-warning/30",
|
|
320
|
-
success: "bg-success/10 border-success/30"
|
|
321
|
-
}, P = {
|
|
322
|
-
error: "text-error",
|
|
323
|
-
warning: "text-warning",
|
|
324
|
-
success: "text-success"
|
|
325
|
-
}, K = {
|
|
326
|
-
high: j,
|
|
327
|
-
medium: g,
|
|
328
|
-
low: F
|
|
329
|
-
};
|
|
330
|
-
function p({
|
|
331
|
-
signal: e,
|
|
332
|
-
variant: r = "error"
|
|
333
|
-
}) {
|
|
334
|
-
const { t: a } = o(d), n = K[e.severity];
|
|
335
|
-
return /* @__PURE__ */ t(
|
|
336
|
-
"div",
|
|
337
|
-
{
|
|
338
|
-
className: u("card border-2 backdrop-blur-sm", q[r]),
|
|
339
|
-
children: /* @__PURE__ */ t("div", { className: "card-body", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-4", children: [
|
|
340
|
-
/* @__PURE__ */ t(n, { className: u("mt-1 size-8 shrink-0", P[r]) }),
|
|
341
|
-
/* @__PURE__ */ i("div", { className: "flex-1", children: [
|
|
342
|
-
/* @__PURE__ */ t("h4", { className: "card-title text-xl", children: e.title }),
|
|
343
|
-
/* @__PURE__ */ t("p", { className: "mt-2 text-base-content/70", children: e.description }),
|
|
344
|
-
/* @__PURE__ */ i("div", { className: "mt-4 rounded-lg bg-base-100/50 p-4", children: [
|
|
345
|
-
/* @__PURE__ */ i("p", { className: "mb-2 text-sm font-semibold", children: [
|
|
346
|
-
"💡 ",
|
|
347
|
-
a("result.whatToDo")
|
|
348
|
-
] }),
|
|
349
|
-
/* @__PURE__ */ t("p", { className: "text-sm", children: e.what_to_do })
|
|
350
|
-
] })
|
|
351
|
-
] })
|
|
352
|
-
] }) })
|
|
353
|
-
}
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
function Q({ cautions: e }) {
|
|
357
|
-
const { t: r } = o(d);
|
|
358
|
-
return e.length === 0 ? null : /* @__PURE__ */ i("section", { children: [
|
|
359
|
-
/* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
|
|
360
|
-
/* @__PURE__ */ t(g, { className: "size-10 text-warning" }),
|
|
361
|
-
r("result.cautions")
|
|
157
|
+
const A = /* @__PURE__ */ c.forwardRef(E);
|
|
158
|
+
function j({ items: e }) {
|
|
159
|
+
const { t } = o(d);
|
|
160
|
+
return e.length === 0 ? null : /* @__PURE__ */ i("div", { className: "mb-4", children: [
|
|
161
|
+
/* @__PURE__ */ i("h2", { className: "flex items-center gap-1 py-4 font-bold", children: [
|
|
162
|
+
t("result.safetyChecklist"),
|
|
163
|
+
" ",
|
|
164
|
+
/* @__PURE__ */ s(y, { className: "size-6" })
|
|
362
165
|
] }),
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
s
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
)) })
|
|
166
|
+
/* @__PURE__ */ s(u, { variant: "info", children: e.map((n, a) => /* @__PURE__ */ i("label", { className: "label w-fit cursor-pointer gap-2", children: [
|
|
167
|
+
/* @__PURE__ */ s(
|
|
168
|
+
"input",
|
|
169
|
+
{
|
|
170
|
+
type: "checkbox",
|
|
171
|
+
className: "checkbox rounded-full [--chkbg:theme(colors.neutral)] [--chkfg:theme(colors.neutral-content)]"
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
/* @__PURE__ */ s("span", { className: "label-text", children: n })
|
|
175
|
+
] }, a)) })
|
|
374
176
|
] });
|
|
375
177
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
{
|
|
398
|
-
whileHover: { scale: 1.02 },
|
|
399
|
-
className: "card bg-secondary text-secondary-content shadow-xl",
|
|
400
|
-
children: /* @__PURE__ */ i("div", { className: "card-body", children: [
|
|
401
|
-
/* @__PURE__ */ i("div", { className: "mb-6 flex items-center gap-4", children: [
|
|
402
|
-
/* @__PURE__ */ t("div", { className: "avatar placeholder", children: /* @__PURE__ */ t("div", { className: "w-16 rounded-full bg-primary text-primary-content", children: /* @__PURE__ */ t(U, { className: "size-8" }) }) }),
|
|
403
|
-
/* @__PURE__ */ i("div", { children: [
|
|
404
|
-
/* @__PURE__ */ t("h3", { className: "text-2xl font-bold", children: r("result.expertAdvice") }),
|
|
405
|
-
/* @__PURE__ */ t("p", { className: "opacity-80", children: r("result.expertName") })
|
|
406
|
-
] })
|
|
407
|
-
] }),
|
|
408
|
-
/* @__PURE__ */ t("div", { className: "prose max-w-none", children: /* @__PURE__ */ t("p", { className: "whitespace-pre-wrap text-lg", children: e }) })
|
|
409
|
-
] })
|
|
410
|
-
}
|
|
411
|
-
);
|
|
412
|
-
}
|
|
413
|
-
function G({ data: e }) {
|
|
414
|
-
const { t: r, i18n: a } = o(d);
|
|
415
|
-
return e ? /* @__PURE__ */ i("section", { children: [
|
|
416
|
-
/* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
|
|
417
|
-
/* @__PURE__ */ t(M, { className: "size-10 text-secondary" }),
|
|
418
|
-
r("result.priceAnalysis")
|
|
178
|
+
const C = {
|
|
179
|
+
error: k,
|
|
180
|
+
warning: S,
|
|
181
|
+
success: A
|
|
182
|
+
}, T = {
|
|
183
|
+
error: "result.riskSignals",
|
|
184
|
+
warning: "result.cautions",
|
|
185
|
+
success: "result.safeIndicators"
|
|
186
|
+
};
|
|
187
|
+
function m({
|
|
188
|
+
signals: e,
|
|
189
|
+
variant: t = "error"
|
|
190
|
+
}) {
|
|
191
|
+
const { t: n } = o(d);
|
|
192
|
+
if (e.length === 0) return null;
|
|
193
|
+
const a = C[t];
|
|
194
|
+
return /* @__PURE__ */ i("div", { className: "mb-4", children: [
|
|
195
|
+
/* @__PURE__ */ i("h2", { className: "flex items-center gap-1 py-4 font-bold", children: [
|
|
196
|
+
n(T[t]),
|
|
197
|
+
" ",
|
|
198
|
+
/* @__PURE__ */ s(a, { className: "size-6" })
|
|
419
199
|
] }),
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */ i("div", {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
/* @__PURE__ */ t("p", { className: "text-2xl font-bold", children: e.market_price_range })
|
|
425
|
-
] }),
|
|
426
|
-
e.offered_price && /* @__PURE__ */ i("div", { children: [
|
|
427
|
-
/* @__PURE__ */ t("h4", { className: "mb-2 text-lg font-semibold", children: r("result.offeredPrice") }),
|
|
428
|
-
/* @__PURE__ */ t("p", { className: "text-2xl font-bold text-primary", children: new Intl.NumberFormat(a.language, {
|
|
429
|
-
style: "currency",
|
|
430
|
-
currency: e.currency || "USD"
|
|
431
|
-
}).format(e.offered_price) })
|
|
432
|
-
] })
|
|
200
|
+
/* @__PURE__ */ s("div", { className: "space-y-3", children: e.map((l, g) => /* @__PURE__ */ s(u, { variant: t, children: /* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
201
|
+
/* @__PURE__ */ i("div", { children: [
|
|
202
|
+
/* @__PURE__ */ s("h3", { className: "text-sm font-bold", children: l.title }),
|
|
203
|
+
/* @__PURE__ */ s("p", { className: "text-xs", children: l.description })
|
|
433
204
|
] }),
|
|
434
|
-
/* @__PURE__ */ i("div", {
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
] }),
|
|
438
|
-
e.warnings.length > 0 && /* @__PURE__ */ i("div", { className: "mt-4", children: [
|
|
439
|
-
/* @__PURE__ */ i("h4", { className: "mb-2 flex items-center gap-2 text-lg font-semibold text-warning", children: [
|
|
440
|
-
/* @__PURE__ */ t(g, { className: "size-6" }),
|
|
441
|
-
r("result.priceWarnings")
|
|
442
|
-
] }),
|
|
443
|
-
/* @__PURE__ */ t("ul", { className: "list-inside list-disc space-y-1", children: e.warnings.map((n, m) => /* @__PURE__ */ t("li", { className: "text-base-content/70", children: n }, m)) })
|
|
205
|
+
/* @__PURE__ */ i("div", { children: [
|
|
206
|
+
/* @__PURE__ */ s("h3", { className: "text-sm font-bold", children: n("result.whatToDo") }),
|
|
207
|
+
/* @__PURE__ */ s("p", { className: "text-xs", children: l.what_to_do })
|
|
444
208
|
] })
|
|
445
|
-
] }) })
|
|
446
|
-
] }) : null;
|
|
447
|
-
}
|
|
448
|
-
function J({
|
|
449
|
-
recommendation: e,
|
|
450
|
-
emotionalSupport: r
|
|
451
|
-
}) {
|
|
452
|
-
const { t: a } = o(d);
|
|
453
|
-
return /* @__PURE__ */ i("section", { children: [
|
|
454
|
-
/* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
|
|
455
|
-
/* @__PURE__ */ t(L, { className: "size-10 text-warning" }),
|
|
456
|
-
a("result.recommendation")
|
|
457
|
-
] }),
|
|
458
|
-
/* @__PURE__ */ t("div", { className: "card bg-base-200 shadow-xl", children: /* @__PURE__ */ i("div", { className: "card-body", children: [
|
|
459
|
-
/* @__PURE__ */ t("div", { className: "prose max-w-none", children: /* @__PURE__ */ t("p", { className: "whitespace-pre-wrap text-lg text-base-content/70", children: e }) }),
|
|
460
|
-
/* @__PURE__ */ t("div", { className: "divider" }),
|
|
461
|
-
/* @__PURE__ */ t("div", { className: "rounded-lg bg-base-100 p-4", children: /* @__PURE__ */ i("p", { className: "flex items-center gap-2 text-lg font-medium", children: [
|
|
462
|
-
/* @__PURE__ */ t(O, { className: "size-6 text-info" }),
|
|
463
|
-
" ",
|
|
464
|
-
r
|
|
465
|
-
] }) })
|
|
466
|
-
] }) })
|
|
467
|
-
] });
|
|
468
|
-
}
|
|
469
|
-
function X(e) {
|
|
470
|
-
return e >= 70 ? { level: "high", color: "error", Icon: x } : e >= 40 ? { level: "medium", color: "warning", Icon: g } : { level: "low", color: "success", Icon: _ };
|
|
471
|
-
}
|
|
472
|
-
function ee({ score: e }) {
|
|
473
|
-
const { t: r } = o(d), a = X(e), { Icon: n } = a, m = {
|
|
474
|
-
error: "text-error",
|
|
475
|
-
warning: "text-warning",
|
|
476
|
-
success: "text-success"
|
|
477
|
-
};
|
|
478
|
-
return /* @__PURE__ */ t("div", { className: "hero min-h-[40vh] rounded-3xl bg-base-200", children: /* @__PURE__ */ t("div", { className: "hero-content text-center", children: /* @__PURE__ */ i("div", { children: [
|
|
479
|
-
/* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(n, { className: u("size-32", m[a.color]) }) }),
|
|
480
|
-
/* @__PURE__ */ t("h2", { className: "mb-4 text-5xl font-bold", children: r(`result.riskLevel.${a.level}.title`) }),
|
|
481
|
-
/* @__PURE__ */ t("div", { className: "mx-auto w-64", children: /* @__PURE__ */ t(
|
|
482
|
-
"div",
|
|
483
|
-
{
|
|
484
|
-
className: u("radial-progress", m[a.color]),
|
|
485
|
-
style: {
|
|
486
|
-
"--value": e,
|
|
487
|
-
"--size": "12rem",
|
|
488
|
-
"--thickness": "1rem"
|
|
489
|
-
},
|
|
490
|
-
role: "progressbar",
|
|
491
|
-
children: /* @__PURE__ */ t("span", { className: "text-5xl font-bold", children: e })
|
|
492
|
-
}
|
|
493
|
-
) }),
|
|
494
|
-
/* @__PURE__ */ t("p", { className: "mt-6 max-w-lg text-xl text-base-content/70", children: r(`result.riskLevel.${a.level}.message`) })
|
|
495
|
-
] }) }) });
|
|
496
|
-
}
|
|
497
|
-
function te({ signals: e }) {
|
|
498
|
-
const { t: r } = o(d);
|
|
499
|
-
return e.length === 0 ? null : /* @__PURE__ */ i("section", { children: [
|
|
500
|
-
/* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
|
|
501
|
-
/* @__PURE__ */ t(x, { className: "size-10 text-error" }),
|
|
502
|
-
r("result.riskSignals")
|
|
503
|
-
] }),
|
|
504
|
-
/* @__PURE__ */ t("div", { className: "space-y-4", children: e.map((a, n) => /* @__PURE__ */ t(
|
|
505
|
-
s.div,
|
|
506
|
-
{
|
|
507
|
-
initial: { x: -50, opacity: 0 },
|
|
508
|
-
animate: { x: 0, opacity: 1 },
|
|
509
|
-
transition: { delay: n * 0.1 },
|
|
510
|
-
whileHover: { scale: 1.02, x: 10 },
|
|
511
|
-
children: /* @__PURE__ */ t(p, { signal: a, variant: "error" })
|
|
512
|
-
},
|
|
513
|
-
n
|
|
514
|
-
)) })
|
|
515
|
-
] });
|
|
516
|
-
}
|
|
517
|
-
function re({
|
|
518
|
-
indicators: e
|
|
519
|
-
}) {
|
|
520
|
-
const { t: r } = o(d);
|
|
521
|
-
return e.length === 0 ? null : /* @__PURE__ */ i("section", { children: [
|
|
522
|
-
/* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
|
|
523
|
-
/* @__PURE__ */ t(k, { className: "size-10 text-success" }),
|
|
524
|
-
r("result.safeIndicators")
|
|
525
|
-
] }),
|
|
526
|
-
/* @__PURE__ */ t("div", { className: "space-y-4", children: e.map((a, n) => /* @__PURE__ */ t(
|
|
527
|
-
s.div,
|
|
528
|
-
{
|
|
529
|
-
initial: { x: -50, opacity: 0 },
|
|
530
|
-
animate: { x: 0, opacity: 1 },
|
|
531
|
-
transition: { delay: n * 0.1 },
|
|
532
|
-
whileHover: { scale: 1.02, x: 10 },
|
|
533
|
-
children: /* @__PURE__ */ t(p, { signal: a, variant: "success" })
|
|
534
|
-
},
|
|
535
|
-
n
|
|
536
|
-
)) })
|
|
209
|
+
] }) }, g)) })
|
|
537
210
|
] });
|
|
538
211
|
}
|
|
539
|
-
function
|
|
540
|
-
const { t: r } = o(d);
|
|
541
|
-
return e.length === 0 ? null : /* @__PURE__ */ i("section", { children: [
|
|
542
|
-
/* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
|
|
543
|
-
/* @__PURE__ */ t(S, { className: "size-10 text-primary" }),
|
|
544
|
-
r("result.safetyChecklist")
|
|
545
|
-
] }),
|
|
546
|
-
/* @__PURE__ */ t("div", { className: "card border-2 border-primary/30 bg-base-200", children: /* @__PURE__ */ i("div", { className: "card-body", children: [
|
|
547
|
-
/* @__PURE__ */ t("p", { className: "mb-6 text-lg text-base-content/70", children: r("result.checklistDescription") }),
|
|
548
|
-
/* @__PURE__ */ t("div", { className: "space-y-3", children: e.map((a, n) => /* @__PURE__ */ i(
|
|
549
|
-
s.label,
|
|
550
|
-
{
|
|
551
|
-
initial: { x: -20, opacity: 0 },
|
|
552
|
-
animate: { x: 0, opacity: 1 },
|
|
553
|
-
transition: { delay: n * 0.08 },
|
|
554
|
-
className: "flex cursor-pointer items-start gap-3 rounded-lg p-3 hover:bg-base-100/30",
|
|
555
|
-
children: [
|
|
556
|
-
/* @__PURE__ */ t(
|
|
557
|
-
"input",
|
|
558
|
-
{
|
|
559
|
-
type: "checkbox",
|
|
560
|
-
className: "checkbox-primary checkbox mt-1"
|
|
561
|
-
}
|
|
562
|
-
),
|
|
563
|
-
/* @__PURE__ */ t("span", { className: "text-lg", children: a })
|
|
564
|
-
]
|
|
565
|
-
},
|
|
566
|
-
n
|
|
567
|
-
)) })
|
|
568
|
-
] }) })
|
|
569
|
-
] });
|
|
570
|
-
}
|
|
571
|
-
function ne({
|
|
212
|
+
function Z({
|
|
572
213
|
translation: e,
|
|
573
|
-
nuance:
|
|
214
|
+
nuance: t
|
|
574
215
|
}) {
|
|
575
|
-
const { t:
|
|
576
|
-
return
|
|
577
|
-
/* @__PURE__ */ i("
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
|
|
216
|
+
const { t: n } = o(d);
|
|
217
|
+
return /* @__PURE__ */ i(u, { title: n("result.translation"), children: [
|
|
218
|
+
e && /* @__PURE__ */ i("div", { className: "mb-2", children: [
|
|
219
|
+
/* @__PURE__ */ s("h3", { className: "text-sm font-bold", children: n("result.translationTitle") }),
|
|
220
|
+
/* @__PURE__ */ s("p", { className: "text-xs", children: e })
|
|
580
221
|
] }),
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
] }),
|
|
586
|
-
r && /* @__PURE__ */ i("div", { children: [
|
|
587
|
-
/* @__PURE__ */ t("h4", { className: "mb-2 text-lg font-semibold", children: a("result.nuanceTitle") }),
|
|
588
|
-
/* @__PURE__ */ t("p", { className: "whitespace-pre-wrap text-base-content/70", children: r })
|
|
589
|
-
] })
|
|
590
|
-
] }) })
|
|
222
|
+
t && /* @__PURE__ */ i("div", { children: [
|
|
223
|
+
/* @__PURE__ */ s("h3", { className: "text-sm font-bold", children: n("result.nuanceTitle") }),
|
|
224
|
+
/* @__PURE__ */ s("p", { className: "text-xs", children: t })
|
|
225
|
+
] })
|
|
591
226
|
] });
|
|
592
227
|
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
transition: { duration: 0.6 }
|
|
599
|
-
}
|
|
600
|
-
}, le = {
|
|
601
|
-
animate: {
|
|
602
|
-
transition: {
|
|
603
|
-
staggerChildren: 0.15
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
};
|
|
607
|
-
function we({
|
|
608
|
-
analysis: e,
|
|
609
|
-
expertAdvice: r,
|
|
610
|
-
showCompanionCta: a = !1
|
|
611
|
-
}) {
|
|
612
|
-
return /* @__PURE__ */ i(
|
|
613
|
-
s.div,
|
|
614
|
-
{
|
|
615
|
-
variants: le,
|
|
616
|
-
initial: "initial",
|
|
617
|
-
animate: "animate",
|
|
618
|
-
className: "mx-auto max-w-5xl space-y-12",
|
|
619
|
-
children: [
|
|
620
|
-
/* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(ee, { score: e.risk_score }) }),
|
|
621
|
-
(e.translation || e.nuance_explanation) && /* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(
|
|
622
|
-
ne,
|
|
623
|
-
{
|
|
624
|
-
translation: e.translation,
|
|
625
|
-
nuance: e.nuance_explanation
|
|
626
|
-
}
|
|
627
|
-
) }),
|
|
628
|
-
e.risk_signals.length > 0 && /* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(te, { signals: e.risk_signals }) }),
|
|
629
|
-
e.cautions.length > 0 && /* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(Q, { cautions: e.cautions }) }),
|
|
630
|
-
e.safe_indicators.length > 0 && /* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(re, { indicators: e.safe_indicators }) }),
|
|
631
|
-
e.price_analysis && /* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(G, { data: e.price_analysis }) }),
|
|
632
|
-
e.safety_checklist.length > 0 && /* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(ae, { items: e.safety_checklist }) }),
|
|
633
|
-
r && /* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(Y, { advice: r }) }),
|
|
634
|
-
/* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(
|
|
635
|
-
J,
|
|
636
|
-
{
|
|
637
|
-
recommendation: e.recommendation,
|
|
638
|
-
emotionalSupport: e.emotional_support
|
|
639
|
-
}
|
|
640
|
-
) }),
|
|
641
|
-
a && /* @__PURE__ */ t(s.div, { variants: h, children: /* @__PURE__ */ t(W, {}) })
|
|
642
|
-
]
|
|
643
|
-
}
|
|
644
|
-
);
|
|
645
|
-
}
|
|
646
|
-
function Ne({
|
|
647
|
-
summary: e,
|
|
648
|
-
checkId: r
|
|
649
|
-
}) {
|
|
650
|
-
const { t: a, i18n: n } = o(d), m = n.language;
|
|
651
|
-
return /* @__PURE__ */ i("div", { className: "mx-auto max-w-2xl", children: [
|
|
652
|
-
/* @__PURE__ */ t("h1", { className: "mb-8 text-center text-3xl font-bold", children: a("result.title") }),
|
|
653
|
-
/* @__PURE__ */ i("div", { className: "mb-8 grid grid-cols-1 gap-4 md:grid-cols-3", children: [
|
|
654
|
-
/* @__PURE__ */ t("div", { className: "card bg-error/10", children: /* @__PURE__ */ i("div", { className: "card-body items-center text-center", children: [
|
|
655
|
-
/* @__PURE__ */ t("h3", { className: "text-4xl font-bold text-error", children: e.risk_signals_count }),
|
|
656
|
-
/* @__PURE__ */ t("p", { className: "text-sm", children: a("result.riskSignals") })
|
|
657
|
-
] }) }),
|
|
658
|
-
/* @__PURE__ */ t("div", { className: "card bg-warning/10", children: /* @__PURE__ */ i("div", { className: "card-body items-center text-center", children: [
|
|
659
|
-
/* @__PURE__ */ t("h3", { className: "text-4xl font-bold text-warning", children: e.cautions_count }),
|
|
660
|
-
/* @__PURE__ */ t("p", { className: "text-sm", children: a("result.cautions") })
|
|
661
|
-
] }) }),
|
|
662
|
-
/* @__PURE__ */ t("div", { className: "card bg-success/10", children: /* @__PURE__ */ i("div", { className: "card-body items-center text-center", children: [
|
|
663
|
-
/* @__PURE__ */ t("h3", { className: "text-4xl font-bold text-success", children: e.safe_indicators_count }),
|
|
664
|
-
/* @__PURE__ */ t("p", { className: "text-sm", children: a("result.safeIndicators") })
|
|
665
|
-
] }) })
|
|
666
|
-
] }),
|
|
667
|
-
/* @__PURE__ */ t("div", { className: "card bg-base-200 shadow-xl", children: /* @__PURE__ */ i("div", { className: "card-body items-center text-center", children: [
|
|
668
|
-
/* @__PURE__ */ t("h2", { className: "card-title text-2xl", children: a("result.signupRequired") }),
|
|
669
|
-
/* @__PURE__ */ t("p", { className: "mb-4 text-base-content/70", children: a("result.signupMessage") }),
|
|
670
|
-
/* @__PURE__ */ t(
|
|
671
|
-
v,
|
|
228
|
+
function V({ analysis: e }) {
|
|
229
|
+
return /* @__PURE__ */ i("div", { children: [
|
|
230
|
+
/* @__PURE__ */ i("div", { className: "mb-4 flex flex-col gap-4", children: [
|
|
231
|
+
(e.translation || e.nuance_explanation) && /* @__PURE__ */ s(
|
|
232
|
+
Z,
|
|
672
233
|
{
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
children: a("login")
|
|
234
|
+
translation: e.translation,
|
|
235
|
+
nuance: e.nuance_explanation
|
|
676
236
|
}
|
|
677
|
-
)
|
|
678
|
-
|
|
237
|
+
),
|
|
238
|
+
e.price_analysis && /* @__PURE__ */ s(x, { data: e.price_analysis }),
|
|
239
|
+
e.recommendation && /* @__PURE__ */ s(v, { recommendation: e.recommendation })
|
|
240
|
+
] }),
|
|
241
|
+
e.risk_signals.length > 0 && /* @__PURE__ */ s(m, { signals: e.risk_signals, variant: "error" }),
|
|
242
|
+
e.cautions.length > 0 && /* @__PURE__ */ s(m, { signals: e.cautions, variant: "warning" }),
|
|
243
|
+
e.safe_indicators.length > 0 && /* @__PURE__ */ s(m, { signals: e.safe_indicators, variant: "success" }),
|
|
244
|
+
e.safety_checklist.length > 0 && /* @__PURE__ */ s(j, { items: e.safety_checklist })
|
|
679
245
|
] });
|
|
680
246
|
}
|
|
681
|
-
const
|
|
682
|
-
category:
|
|
683
|
-
severity:
|
|
684
|
-
title:
|
|
685
|
-
description:
|
|
686
|
-
what_to_do:
|
|
687
|
-
}),
|
|
688
|
-
market_price_range:
|
|
689
|
-
offered_price:
|
|
690
|
-
currency:
|
|
691
|
-
price_assessment:
|
|
692
|
-
warnings:
|
|
693
|
-
}),
|
|
694
|
-
translation:
|
|
695
|
-
nuance_explanation:
|
|
696
|
-
risk_signals:
|
|
697
|
-
cautions:
|
|
698
|
-
safe_indicators:
|
|
699
|
-
price_analysis:
|
|
700
|
-
safety_checklist:
|
|
701
|
-
risk_score:
|
|
702
|
-
recommendation:
|
|
703
|
-
emotional_support:
|
|
704
|
-
}),
|
|
705
|
-
risk_signals_count:
|
|
706
|
-
cautions_count:
|
|
707
|
-
safe_indicators_count:
|
|
708
|
-
}),
|
|
709
|
-
id:
|
|
710
|
-
user_id:
|
|
711
|
-
input_text:
|
|
712
|
-
llm_analysis:
|
|
713
|
-
risk_score:
|
|
714
|
-
expert_advice:
|
|
715
|
-
expert_reviewed:
|
|
716
|
-
expert_reviewed_at:
|
|
717
|
-
expert_reviewed_by:
|
|
718
|
-
created_at:
|
|
719
|
-
updated_at:
|
|
720
|
-
}),
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
id:
|
|
724
|
-
quick_summary:
|
|
725
|
-
signup_required:
|
|
247
|
+
const h = r.object({
|
|
248
|
+
category: r.enum(["payment", "seller", "platform", "price", "content"]),
|
|
249
|
+
severity: r.enum(["high", "medium", "low"]),
|
|
250
|
+
title: r.string(),
|
|
251
|
+
description: r.string(),
|
|
252
|
+
what_to_do: r.string()
|
|
253
|
+
}), F = r.object({
|
|
254
|
+
market_price_range: r.string().nullish(),
|
|
255
|
+
offered_price: r.number().nullish(),
|
|
256
|
+
currency: r.string().nullish(),
|
|
257
|
+
price_assessment: r.string(),
|
|
258
|
+
warnings: r.array(r.string())
|
|
259
|
+
}), M = r.object({
|
|
260
|
+
translation: r.string().nullish(),
|
|
261
|
+
nuance_explanation: r.string().nullish(),
|
|
262
|
+
risk_signals: r.array(h),
|
|
263
|
+
cautions: r.array(h),
|
|
264
|
+
safe_indicators: r.array(h),
|
|
265
|
+
price_analysis: F,
|
|
266
|
+
safety_checklist: r.array(r.string()),
|
|
267
|
+
risk_score: r.number(),
|
|
268
|
+
recommendation: r.string(),
|
|
269
|
+
emotional_support: r.string()
|
|
270
|
+
}), B = r.object({
|
|
271
|
+
risk_signals_count: r.number(),
|
|
272
|
+
cautions_count: r.number(),
|
|
273
|
+
safe_indicators_count: r.number()
|
|
274
|
+
}), D = r.object({
|
|
275
|
+
id: r.string(),
|
|
276
|
+
user_id: r.string().nullish(),
|
|
277
|
+
input_text: r.string(),
|
|
278
|
+
llm_analysis: M,
|
|
279
|
+
risk_score: r.number(),
|
|
280
|
+
expert_advice: r.string().nullish(),
|
|
281
|
+
expert_reviewed: r.boolean(),
|
|
282
|
+
expert_reviewed_at: r.string().nullish(),
|
|
283
|
+
expert_reviewed_by: r.string().nullish(),
|
|
284
|
+
created_at: r.string(),
|
|
285
|
+
updated_at: r.string()
|
|
286
|
+
}), O = r.union([
|
|
287
|
+
D,
|
|
288
|
+
r.object({
|
|
289
|
+
id: r.string(),
|
|
290
|
+
quick_summary: B,
|
|
291
|
+
signup_required: r.literal(!0)
|
|
726
292
|
})
|
|
727
293
|
]);
|
|
728
|
-
class
|
|
294
|
+
class K extends p {
|
|
729
295
|
constructor() {
|
|
730
296
|
super(...arguments), this.resource = "trade-safety";
|
|
731
297
|
}
|
|
732
298
|
getDataSchema() {
|
|
733
|
-
return
|
|
299
|
+
return O;
|
|
734
300
|
}
|
|
735
301
|
}
|
|
736
|
-
const
|
|
302
|
+
const U = {
|
|
737
303
|
high: 70,
|
|
738
304
|
// >= 70: High risk (red)
|
|
739
305
|
medium: 40
|
|
@@ -741,12 +307,10 @@ const Re = {
|
|
|
741
307
|
// < 40: Low risk (green)
|
|
742
308
|
};
|
|
743
309
|
export {
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
Re as RISK_SCORE_THRESHOLDS,
|
|
747
|
-
p as RiskSignalCard,
|
|
310
|
+
V as DetailedResult,
|
|
311
|
+
U as RISK_SCORE_THRESHOLDS,
|
|
748
312
|
d as TRADE_SAFETY_NS,
|
|
749
|
-
|
|
750
|
-
|
|
313
|
+
K as TradeSafetyRepository,
|
|
314
|
+
J as tradeSafetyTranslations
|
|
751
315
|
};
|
|
752
316
|
//# sourceMappingURL=index.mjs.map
|