trade-safety 1.1.2 → 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.
Files changed (37) hide show
  1. package/README.md +1 -1
  2. package/dist/components/DetailedResult/AnalysisCard.d.ts +9 -0
  3. package/dist/components/DetailedResult/AnalysisCard.d.ts.map +1 -0
  4. package/dist/components/DetailedResult/PriceAnalysisSection.d.ts.map +1 -1
  5. package/dist/components/DetailedResult/RecommendationSection.d.ts +2 -3
  6. package/dist/components/DetailedResult/RecommendationSection.d.ts.map +1 -1
  7. package/dist/components/DetailedResult/SafetyChecklistSection.d.ts.map +1 -1
  8. package/dist/components/DetailedResult/SignalsSection.d.ts +8 -0
  9. package/dist/components/DetailedResult/SignalsSection.d.ts.map +1 -0
  10. package/dist/components/DetailedResult/TranslationSection.d.ts +1 -1
  11. package/dist/components/DetailedResult/TranslationSection.d.ts.map +1 -1
  12. package/dist/components/DetailedResult/index.d.ts +1 -4
  13. package/dist/components/DetailedResult/index.d.ts.map +1 -1
  14. package/dist/index.d.ts +1 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +229 -659
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/repositories/TradeSafetyRepository.d.ts +24 -24
  21. package/package.json +1 -1
  22. package/dist/components/DetailedResult/CautionsSection.d.ts +0 -7
  23. package/dist/components/DetailedResult/CautionsSection.d.ts.map +0 -1
  24. package/dist/components/DetailedResult/CompanionCtaSection.d.ts +0 -2
  25. package/dist/components/DetailedResult/CompanionCtaSection.d.ts.map +0 -1
  26. package/dist/components/DetailedResult/ExpertAdviceSection.d.ts +0 -6
  27. package/dist/components/DetailedResult/ExpertAdviceSection.d.ts.map +0 -1
  28. package/dist/components/DetailedResult/RiskScoreHero.d.ts +0 -6
  29. package/dist/components/DetailedResult/RiskScoreHero.d.ts.map +0 -1
  30. package/dist/components/DetailedResult/RiskSignalsSection.d.ts +0 -7
  31. package/dist/components/DetailedResult/RiskSignalsSection.d.ts.map +0 -1
  32. package/dist/components/DetailedResult/SafeIndicatorsSection.d.ts +0 -7
  33. package/dist/components/DetailedResult/SafeIndicatorsSection.d.ts.map +0 -1
  34. package/dist/components/QuickResultTeaser.d.ts +0 -8
  35. package/dist/components/QuickResultTeaser.d.ts.map +0 -1
  36. package/dist/components/RiskSignalCard.d.ts +0 -8
  37. package/dist/components/RiskSignalCard.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,733 +1,305 @@
1
- import { jsx as t, jsxs as i } from "react/jsx-runtime";
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 ke } from "./locale.mjs";
8
- import * as l from "react";
9
- import v from "next/link";
10
- import { BaseCrudRepository as w } from "@aioia/core";
11
- import { z as c } from "zod";
12
- function N({
13
- title: e,
14
- titleId: r,
15
- ...a
16
- }, n) {
17
- return /* @__PURE__ */ l.createElement("svg", Object.assign({
18
- xmlns: "http://www.w3.org/2000/svg",
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
- const y = /* @__PURE__ */ l.forwardRef(N);
34
- function R({
35
- title: e,
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 _ = /* @__PURE__ */ l.forwardRef(R);
56
- function E({
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
- titleId: r,
59
- ...a
60
- }, n) {
61
- return /* @__PURE__ */ l.createElement("svg", Object.assign({
62
- xmlns: "http://www.w3.org/2000/svg",
63
- viewBox: "0 0 24 24",
64
- fill: "currentColor",
65
- "aria-hidden": "true",
66
- "data-slot": "icon",
67
- ref: n,
68
- "aria-labelledby": r
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
- const k = /* @__PURE__ */ l.forwardRef(E);
78
- function C({
79
- title: e,
80
- titleId: r,
81
- ...a
82
- }, n) {
83
- return /* @__PURE__ */ l.createElement("svg", Object.assign({
84
- xmlns: "http://www.w3.org/2000/svg",
85
- viewBox: "0 0 24 24",
86
- fill: "currentColor",
87
- "aria-hidden": "true",
88
- "data-slot": "icon",
89
- ref: n,
90
- "aria-labelledby": r
91
- }, a), e ? /* @__PURE__ */ l.createElement("title", {
92
- id: r
93
- }, e) : null, /* @__PURE__ */ l.createElement("path", {
94
- fillRule: "evenodd",
95
- d: "M7.502 6h7.128A3.375 3.375 0 0 1 18 9.375v9.375a3 3 0 0 0 3-3V6.108c0-1.505-1.125-2.811-2.664-2.94a48.972 48.972 0 0 0-.673-.05A3 3 0 0 0 15 1.5h-1.5a3 3 0 0 0-2.663 1.618c-.225.015-.45.032-.673.05C8.662 3.295 7.554 4.542 7.502 6ZM13.5 3A1.5 1.5 0 0 0 12 4.5h4.5A1.5 1.5 0 0 0 15 3h-1.5Z",
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
- const S = /* @__PURE__ */ l.forwardRef(C);
104
- function Z({
105
- title: e,
106
- titleId: r,
107
- ...a
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
- const M = /* @__PURE__ */ l.forwardRef(Z);
128
- function A({
70
+ function w({
129
71
  title: e,
130
- titleId: r,
131
- ...a
132
- }, n) {
133
- return /* @__PURE__ */ l.createElement("svg", Object.assign({
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: n,
140
- "aria-labelledby": r
141
- }, a), e ? /* @__PURE__ */ l.createElement("title", {
142
- id: r
143
- }, e) : null, /* @__PURE__ */ l.createElement("path", {
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: "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 12ZM12 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",
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 j = /* @__PURE__ */ l.forwardRef(A);
150
- function $({
91
+ const y = /* @__PURE__ */ c.forwardRef(w);
92
+ function N({
151
93
  title: e,
152
- titleId: r,
153
- ...a
154
- }, n) {
155
- return /* @__PURE__ */ l.createElement("svg", Object.assign({
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: n,
162
- "aria-labelledby": r
163
- }, a), e ? /* @__PURE__ */ l.createElement("title", {
164
- id: r
165
- }, e) : null, /* @__PURE__ */ l.createElement("path", {
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 g = /* @__PURE__ */ l.forwardRef($);
172
- function B({
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: r,
239
- ...a
240
- }, n) {
241
- return /* @__PURE__ */ l.createElement("svg", Object.assign({
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: n,
248
- "aria-labelledby": r
249
- }, a), e ? /* @__PURE__ */ l.createElement("title", {
250
- id: r
251
- }, e) : null, /* @__PURE__ */ l.createElement("path", {
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: "M9.013 19.9a.75.75 0 0 1 .877-.597 11.319 11.319 0 0 0 4.22 0 .75.75 0 1 1 .28 1.473 12.819 12.819 0 0 1-4.78 0 .75.75 0 0 1-.597-.876ZM9.754 22.344a.75.75 0 0 1 .824-.668 13.682 13.682 0 0 0 2.844 0 .75.75 0 1 1 .156 1.492 15.156 15.156 0 0 1-3.156 0 .75.75 0 0 1-.668-.824Z",
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 L = /* @__PURE__ */ l.forwardRef(H);
260
- function D({
135
+ const k = /* @__PURE__ */ c.forwardRef(R);
136
+ function E({
261
137
  title: e,
262
- titleId: r,
263
- ...a
264
- }, n) {
265
- return /* @__PURE__ */ l.createElement("svg", Object.assign({
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: n,
272
- "aria-labelledby": r
273
- }, a), e ? /* @__PURE__ */ l.createElement("title", {
274
- id: r
275
- }, e) : null, /* @__PURE__ */ l.createElement("path", {
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 x = /* @__PURE__ */ l.forwardRef(D);
282
- function V({
283
- title: e,
284
- titleId: r,
285
- ...a
286
- }, n) {
287
- return /* @__PURE__ */ l.createElement("svg", Object.assign({
288
- xmlns: "http://www.w3.org/2000/svg",
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 h() {
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("div", { className: h("card border-2 backdrop-blur-sm", q[r]), children: /* @__PURE__ */ t("div", { className: "card-body", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-4", children: [
336
- /* @__PURE__ */ t(n, { className: h("mt-1 size-8 shrink-0", P[r]) }),
337
- /* @__PURE__ */ i("div", { className: "flex-1", children: [
338
- /* @__PURE__ */ t("h4", { className: "card-title text-xl", children: e.title }),
339
- /* @__PURE__ */ t("p", { className: "mt-2 text-neutral-content", children: e.description }),
340
- /* @__PURE__ */ i("div", { className: "mt-4 rounded-lg bg-base-100/50 p-4", children: [
341
- /* @__PURE__ */ i("p", { className: "mb-2 text-sm font-semibold", children: [
342
- "💡 ",
343
- a("result.whatToDo")
344
- ] }),
345
- /* @__PURE__ */ t("p", { className: "text-sm", children: e.what_to_do })
346
- ] })
347
- ] })
348
- ] }) }) });
349
- }
350
- function Q({ cautions: e }) {
351
- const { t: r } = o(d);
352
- return e.length === 0 ? null : /* @__PURE__ */ i("section", { children: [
353
- /* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
354
- /* @__PURE__ */ t(g, { className: "size-10 text-warning" }),
355
- 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" })
356
165
  ] }),
357
- /* @__PURE__ */ t("div", { className: "space-y-4", children: e.map((a, n) => /* @__PURE__ */ t(
358
- s.div,
359
- {
360
- initial: { x: -50, opacity: 0 },
361
- animate: { x: 0, opacity: 1 },
362
- transition: { delay: n * 0.1 },
363
- whileHover: { scale: 1.02, x: 10 },
364
- children: /* @__PURE__ */ t(p, { signal: a, variant: "warning" })
365
- },
366
- n
367
- )) })
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)) })
368
176
  ] });
369
177
  }
370
- function W() {
371
- const { t: e, i18n: r } = o(d), a = r.language;
372
- return /* @__PURE__ */ t("section", { className: "hero min-h-[30vh] rounded-3xl bg-primary text-primary-content", children: /* @__PURE__ */ t("div", { className: "hero-content text-center", children: /* @__PURE__ */ i("div", { children: [
373
- /* @__PURE__ */ t(y, { className: "mx-auto mb-6 size-20" }),
374
- /* @__PURE__ */ t("h3", { className: "mb-4 text-4xl font-bold", children: e("result.companionCta.title") }),
375
- /* @__PURE__ */ t("p", { className: "mb-8 max-w-2xl text-xl", children: e("result.companionCta.description") }),
376
- /* @__PURE__ */ t(v, { href: `/${a}/companions`, children: /* @__PURE__ */ t(
377
- s.button,
378
- {
379
- whileHover: { scale: 1.1 },
380
- whileTap: { scale: 0.95 },
381
- className: "btn btn-lg bg-base-100 text-primary hover:bg-base-200",
382
- children: e("result.companionCta.button")
383
- }
384
- ) })
385
- ] }) }) });
386
- }
387
- function Y({ advice: e }) {
388
- const { t: r } = o(d);
389
- return /* @__PURE__ */ t(
390
- s.section,
391
- {
392
- whileHover: { scale: 1.02 },
393
- className: "card bg-secondary text-secondary-content shadow-xl",
394
- children: /* @__PURE__ */ i("div", { className: "card-body", children: [
395
- /* @__PURE__ */ i("div", { className: "mb-6 flex items-center gap-4", children: [
396
- /* @__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" }) }) }),
397
- /* @__PURE__ */ i("div", { children: [
398
- /* @__PURE__ */ t("h3", { className: "text-2xl font-bold", children: r("result.expertAdvice") }),
399
- /* @__PURE__ */ t("p", { className: "opacity-80", children: r("result.expertName") })
400
- ] })
401
- ] }),
402
- /* @__PURE__ */ t("div", { className: "prose max-w-none", children: /* @__PURE__ */ t("p", { className: "whitespace-pre-wrap text-lg", children: e }) })
403
- ] })
404
- }
405
- );
406
- }
407
- function G({ data: e }) {
408
- const { t: r, i18n: a } = o(d);
409
- return e ? /* @__PURE__ */ i("section", { children: [
410
- /* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
411
- /* @__PURE__ */ t(M, { className: "size-10 text-secondary" }),
412
- 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" })
413
199
  ] }),
414
- /* @__PURE__ */ t("div", { className: "card bg-base-200 shadow-xl", children: /* @__PURE__ */ i("div", { className: "card-body", children: [
415
- /* @__PURE__ */ i("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [
416
- e.market_price_range && /* @__PURE__ */ i("div", { children: [
417
- /* @__PURE__ */ t("h4", { className: "mb-2 text-lg font-semibold", children: r("result.marketPrice") }),
418
- /* @__PURE__ */ t("p", { className: "text-2xl font-bold", children: e.market_price_range })
419
- ] }),
420
- e.offered_price && /* @__PURE__ */ i("div", { children: [
421
- /* @__PURE__ */ t("h4", { className: "mb-2 text-lg font-semibold", children: r("result.offeredPrice") }),
422
- /* @__PURE__ */ t("p", { className: "text-2xl font-bold text-primary", children: new Intl.NumberFormat(a.language, {
423
- style: "currency",
424
- currency: e.currency || "USD"
425
- }).format(e.offered_price) })
426
- ] })
427
- ] }),
428
- /* @__PURE__ */ i("div", { className: "mt-6 rounded-lg bg-base-100 p-4", children: [
429
- /* @__PURE__ */ t("h4", { className: "mb-2 text-lg font-semibold", children: r("result.priceAssessment") }),
430
- /* @__PURE__ */ t("p", { className: "text-neutral-content", children: e.price_assessment })
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 })
431
204
  ] }),
432
- e.warnings.length > 0 && /* @__PURE__ */ i("div", { className: "mt-4", children: [
433
- /* @__PURE__ */ i("h4", { className: "mb-2 flex items-center gap-2 text-lg font-semibold text-warning", children: [
434
- /* @__PURE__ */ t(g, { className: "size-6" }),
435
- r("result.priceWarnings")
436
- ] }),
437
- /* @__PURE__ */ t("ul", { className: "list-inside list-disc space-y-1", children: e.warnings.map((n, m) => /* @__PURE__ */ t("li", { className: "text-neutral-content", 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 })
438
208
  ] })
439
- ] }) })
440
- ] }) : null;
441
- }
442
- function J({
443
- recommendation: e,
444
- emotionalSupport: r
445
- }) {
446
- const { t: a } = o(d);
447
- return /* @__PURE__ */ i("section", { children: [
448
- /* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
449
- /* @__PURE__ */ t(L, { className: "size-10 text-warning" }),
450
- a("result.recommendation")
451
- ] }),
452
- /* @__PURE__ */ t("div", { className: "card bg-base-200 shadow-xl", children: /* @__PURE__ */ i("div", { className: "card-body", children: [
453
- /* @__PURE__ */ t("div", { className: "prose max-w-none", children: /* @__PURE__ */ t("p", { className: "whitespace-pre-wrap text-lg text-neutral-content", children: e }) }),
454
- /* @__PURE__ */ t("div", { className: "divider" }),
455
- /* @__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: [
456
- /* @__PURE__ */ t(O, { className: "size-6 text-info" }),
457
- " ",
458
- r
459
- ] }) })
460
- ] }) })
209
+ ] }) }, g)) })
461
210
  ] });
462
211
  }
463
- function X(e) {
464
- return e >= 70 ? { level: "high", color: "error", Icon: x } : e >= 40 ? { level: "medium", color: "warning", Icon: g } : { level: "low", color: "success", Icon: _ };
465
- }
466
- function ee({ score: e }) {
467
- const { t: r } = o(d), a = X(e), { Icon: n } = a, m = {
468
- error: "text-error",
469
- warning: "text-warning",
470
- success: "text-success"
471
- };
472
- 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: [
473
- /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(n, { className: h("size-32", m[a.color]) }) }),
474
- /* @__PURE__ */ t("h2", { className: "mb-4 text-5xl font-bold", children: r(`result.riskLevel.${a.level}.title`) }),
475
- /* @__PURE__ */ t("div", { className: "mx-auto w-64", children: /* @__PURE__ */ t(
476
- "div",
477
- {
478
- className: h("radial-progress", m[a.color]),
479
- style: {
480
- "--value": e,
481
- "--size": "12rem",
482
- "--thickness": "1rem"
483
- },
484
- role: "progressbar",
485
- children: /* @__PURE__ */ t("span", { className: "text-5xl font-bold", children: e })
486
- }
487
- ) }),
488
- /* @__PURE__ */ t("p", { className: "mt-6 max-w-lg text-xl text-neutral-content", children: r(`result.riskLevel.${a.level}.message`) })
489
- ] }) }) });
490
- }
491
- function te({ signals: e }) {
492
- const { t: r } = o(d);
493
- return e.length === 0 ? null : /* @__PURE__ */ i("section", { children: [
494
- /* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
495
- /* @__PURE__ */ t(x, { className: "size-10 text-error" }),
496
- r("result.riskSignals")
497
- ] }),
498
- /* @__PURE__ */ t("div", { className: "space-y-4", children: e.map((a, n) => /* @__PURE__ */ t(
499
- s.div,
500
- {
501
- initial: { x: -50, opacity: 0 },
502
- animate: { x: 0, opacity: 1 },
503
- transition: { delay: n * 0.1 },
504
- whileHover: { scale: 1.02, x: 10 },
505
- children: /* @__PURE__ */ t(p, { signal: a, variant: "error" })
506
- },
507
- n
508
- )) })
509
- ] });
510
- }
511
- function re({
512
- indicators: e
513
- }) {
514
- const { t: r } = o(d);
515
- return e.length === 0 ? null : /* @__PURE__ */ i("section", { children: [
516
- /* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
517
- /* @__PURE__ */ t(k, { className: "size-10 text-success" }),
518
- r("result.safeIndicators")
519
- ] }),
520
- /* @__PURE__ */ t("div", { className: "space-y-4", children: e.map((a, n) => /* @__PURE__ */ t(
521
- s.div,
522
- {
523
- initial: { x: -50, opacity: 0 },
524
- animate: { x: 0, opacity: 1 },
525
- transition: { delay: n * 0.1 },
526
- whileHover: { scale: 1.02, x: 10 },
527
- children: /* @__PURE__ */ t(p, { signal: a, variant: "success" })
528
- },
529
- n
530
- )) })
531
- ] });
532
- }
533
- function ae({ items: e }) {
534
- const { t: r } = o(d);
535
- return e.length === 0 ? null : /* @__PURE__ */ i("section", { children: [
536
- /* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
537
- /* @__PURE__ */ t(S, { className: "size-10 text-primary" }),
538
- r("result.safetyChecklist")
539
- ] }),
540
- /* @__PURE__ */ t("div", { className: "card border-2 border-primary/30 bg-base-200", children: /* @__PURE__ */ i("div", { className: "card-body", children: [
541
- /* @__PURE__ */ t("p", { className: "mb-6 text-lg text-neutral-content", children: r("result.checklistDescription") }),
542
- /* @__PURE__ */ t("div", { className: "space-y-3", children: e.map((a, n) => /* @__PURE__ */ i(
543
- s.label,
544
- {
545
- initial: { x: -20, opacity: 0 },
546
- animate: { x: 0, opacity: 1 },
547
- transition: { delay: n * 0.08 },
548
- className: "flex cursor-pointer items-start gap-3 rounded-lg p-3 hover:bg-base-100/30",
549
- children: [
550
- /* @__PURE__ */ t(
551
- "input",
552
- {
553
- type: "checkbox",
554
- className: "checkbox-primary checkbox mt-1"
555
- }
556
- ),
557
- /* @__PURE__ */ t("span", { className: "text-lg", children: a })
558
- ]
559
- },
560
- n
561
- )) })
562
- ] }) })
563
- ] });
564
- }
565
- function ne({
212
+ function Z({
566
213
  translation: e,
567
- nuance: r
214
+ nuance: t
568
215
  }) {
569
- const { t: a } = o(d);
570
- return !e && !r ? null : /* @__PURE__ */ i("section", { children: [
571
- /* @__PURE__ */ i("h3", { className: "mb-6 flex items-center gap-3 text-3xl font-bold", children: [
572
- /* @__PURE__ */ t(T, { className: "size-10 text-primary" }),
573
- a("result.translation")
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 })
574
221
  ] }),
575
- /* @__PURE__ */ t("div", { className: "card bg-base-200 shadow-xl", children: /* @__PURE__ */ i("div", { className: "card-body", children: [
576
- e && /* @__PURE__ */ i("div", { className: "mb-4", children: [
577
- /* @__PURE__ */ t("h4", { className: "mb-2 text-lg font-semibold", children: a("result.translationTitle") }),
578
- /* @__PURE__ */ t("p", { className: "whitespace-pre-wrap text-neutral-content", children: e })
579
- ] }),
580
- r && /* @__PURE__ */ i("div", { children: [
581
- /* @__PURE__ */ t("h4", { className: "mb-2 text-lg font-semibold", children: a("result.nuanceTitle") }),
582
- /* @__PURE__ */ t("p", { className: "whitespace-pre-wrap text-neutral-content", children: r })
583
- ] })
584
- ] }) })
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
+ ] })
585
226
  ] });
586
227
  }
587
- const u = {
588
- initial: { y: 40, opacity: 0 },
589
- animate: {
590
- y: 0,
591
- opacity: 1,
592
- transition: { duration: 0.6 }
593
- }
594
- }, le = {
595
- animate: {
596
- transition: {
597
- staggerChildren: 0.15
598
- }
599
- }
600
- };
601
- function we({
602
- analysis: e,
603
- expertAdvice: r,
604
- showCompanionCta: a = !1
605
- }) {
606
- return /* @__PURE__ */ i(
607
- s.div,
608
- {
609
- variants: le,
610
- initial: "initial",
611
- animate: "animate",
612
- className: "mx-auto max-w-5xl space-y-12",
613
- children: [
614
- /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(ee, { score: e.risk_score }) }),
615
- (e.translation || e.nuance_explanation) && /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(
616
- ne,
617
- {
618
- translation: e.translation,
619
- nuance: e.nuance_explanation
620
- }
621
- ) }),
622
- e.risk_signals.length > 0 && /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(te, { signals: e.risk_signals }) }),
623
- e.cautions.length > 0 && /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(Q, { cautions: e.cautions }) }),
624
- e.safe_indicators.length > 0 && /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(re, { indicators: e.safe_indicators }) }),
625
- e.price_analysis && /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(G, { data: e.price_analysis }) }),
626
- e.safety_checklist.length > 0 && /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(ae, { items: e.safety_checklist }) }),
627
- r && /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(Y, { advice: r }) }),
628
- /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(
629
- J,
630
- {
631
- recommendation: e.recommendation,
632
- emotionalSupport: e.emotional_support
633
- }
634
- ) }),
635
- a && /* @__PURE__ */ t(s.div, { variants: u, children: /* @__PURE__ */ t(W, {}) })
636
- ]
637
- }
638
- );
639
- }
640
- function Ne({
641
- summary: e,
642
- checkId: r
643
- }) {
644
- const { t: a, i18n: n } = o(d), m = n.language;
645
- return /* @__PURE__ */ i("div", { className: "mx-auto max-w-2xl", children: [
646
- /* @__PURE__ */ t("h1", { className: "mb-8 text-center text-3xl font-bold", children: a("result.title") }),
647
- /* @__PURE__ */ i("div", { className: "mb-8 grid grid-cols-1 gap-4 md:grid-cols-3", children: [
648
- /* @__PURE__ */ t("div", { className: "card bg-error/10", children: /* @__PURE__ */ i("div", { className: "card-body items-center text-center", children: [
649
- /* @__PURE__ */ t("h3", { className: "text-4xl font-bold text-error", children: e.risk_signals_count }),
650
- /* @__PURE__ */ t("p", { className: "text-sm", children: a("result.riskSignals") })
651
- ] }) }),
652
- /* @__PURE__ */ t("div", { className: "card bg-warning/10", children: /* @__PURE__ */ i("div", { className: "card-body items-center text-center", children: [
653
- /* @__PURE__ */ t("h3", { className: "text-4xl font-bold text-warning", children: e.cautions_count }),
654
- /* @__PURE__ */ t("p", { className: "text-sm", children: a("result.cautions") })
655
- ] }) }),
656
- /* @__PURE__ */ t("div", { className: "card bg-success/10", children: /* @__PURE__ */ i("div", { className: "card-body items-center text-center", children: [
657
- /* @__PURE__ */ t("h3", { className: "text-4xl font-bold text-success", children: e.safe_indicators_count }),
658
- /* @__PURE__ */ t("p", { className: "text-sm", children: a("result.safeIndicators") })
659
- ] }) })
660
- ] }),
661
- /* @__PURE__ */ t("div", { className: "card bg-base-200 shadow-xl", children: /* @__PURE__ */ i("div", { className: "card-body items-center text-center", children: [
662
- /* @__PURE__ */ t("h2", { className: "card-title text-2xl", children: a("result.signupRequired") }),
663
- /* @__PURE__ */ t("p", { className: "mb-4 text-neutral-content", children: a("result.signupMessage") }),
664
- /* @__PURE__ */ t(
665
- 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,
666
233
  {
667
- href: `/${m}/login?callbackUrl=${encodeURIComponent(`/${m}/trade-safety/result/${r}`)}`,
668
- className: "btn btn-primary",
669
- children: a("login")
234
+ translation: e.translation,
235
+ nuance: e.nuance_explanation
670
236
  }
671
- )
672
- ] }) })
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 })
673
245
  ] });
674
246
  }
675
- const f = c.object({
676
- category: c.enum(["payment", "seller", "platform", "price", "content"]),
677
- severity: c.enum(["high", "medium", "low"]),
678
- title: c.string(),
679
- description: c.string(),
680
- what_to_do: c.string()
681
- }), ie = c.object({
682
- market_price_range: c.string().nullish(),
683
- offered_price: c.number().nullish(),
684
- currency: c.string().nullish(),
685
- price_assessment: c.string(),
686
- warnings: c.array(c.string())
687
- }), ce = c.object({
688
- translation: c.string().nullish(),
689
- nuance_explanation: c.string().nullish(),
690
- risk_signals: c.array(f),
691
- cautions: c.array(f),
692
- safe_indicators: c.array(f),
693
- price_analysis: ie,
694
- safety_checklist: c.array(c.string()),
695
- risk_score: c.number(),
696
- recommendation: c.string(),
697
- emotional_support: c.string()
698
- }), se = c.object({
699
- risk_signals_count: c.number(),
700
- cautions_count: c.number(),
701
- safe_indicators_count: c.number()
702
- }), oe = c.object({
703
- id: c.string(),
704
- user_id: c.string().nullish(),
705
- input_text: c.string(),
706
- llm_analysis: ce,
707
- risk_score: c.number(),
708
- expert_advice: c.string().nullish(),
709
- expert_reviewed: c.boolean(),
710
- expert_reviewed_at: c.string().nullish(),
711
- expert_reviewed_by: c.string().nullish(),
712
- created_at: c.string(),
713
- updated_at: c.string()
714
- }), de = c.union([
715
- oe,
716
- c.object({
717
- id: c.string(),
718
- quick_summary: se,
719
- signup_required: c.literal(!0)
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)
720
292
  })
721
293
  ]);
722
- class ye extends w {
294
+ class K extends p {
723
295
  constructor() {
724
296
  super(...arguments), this.resource = "trade-safety";
725
297
  }
726
298
  getDataSchema() {
727
- return de;
299
+ return O;
728
300
  }
729
301
  }
730
- const Re = {
302
+ const U = {
731
303
  high: 70,
732
304
  // >= 70: High risk (red)
733
305
  medium: 40
@@ -735,12 +307,10 @@ const Re = {
735
307
  // < 40: Low risk (green)
736
308
  };
737
309
  export {
738
- we as DetailedResult,
739
- Ne as QuickResultTeaser,
740
- Re as RISK_SCORE_THRESHOLDS,
741
- p as RiskSignalCard,
310
+ V as DetailedResult,
311
+ U as RISK_SCORE_THRESHOLDS,
742
312
  d as TRADE_SAFETY_NS,
743
- ye as TradeSafetyRepository,
744
- ke as tradeSafetyTranslations
313
+ K as TradeSafetyRepository,
314
+ J as tradeSafetyTranslations
745
315
  };
746
316
  //# sourceMappingURL=index.mjs.map