trade-safety 1.11.0 → 1.13.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/index.mjs CHANGED
@@ -1,160 +1,200 @@
1
- import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
- import { useTranslation as u } from "react-i18next";
1
+ import { jsxs as b, jsx as o } from "react/jsx-runtime";
2
+ import { useTranslation as D, Trans as Me } from "react-i18next";
3
3
  import "i18next";
4
4
  import "i18next-resources-to-backend";
5
- import { TRADE_SAFETY_NS as d } from "./locale.mjs";
6
- import { tradeSafetyTranslations as ge } from "./locale.mjs";
7
- import * as g from "react";
8
- import m from "react";
9
- import { BaseCrudRepository as z } from "@aioia/core";
10
- import { z as i } from "zod";
11
- function j(e) {
12
- var t, r, n = "";
13
- if (typeof e == "string" || typeof e == "number") n += e;
14
- else if (typeof e == "object") if (Array.isArray(e)) {
15
- var s = e.length;
16
- for (t = 0; t < s; t++) e[t] && (r = j(e[t])) && (n && (n += " "), n += r);
17
- } else for (r in e) e[r] && (n && (n += " "), n += r);
18
- return n;
19
- }
20
- function w() {
21
- for (var e, t, r = 0, n = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = j(e)) && (n && (n += " "), n += t);
22
- return n;
23
- }
24
- const E = {
5
+ import { TRADE_SAFETY_NS as F } from "./locale.mjs";
6
+ import { tradeSafetyTranslations as Dr } from "./locale.mjs";
7
+ import * as z from "react";
8
+ import T, { memo as Ft, useRef as We, useEffect as qe, useState as ue } from "react";
9
+ import It from "next/image";
10
+ import { BaseCrudRepository as At } from "@aioia/core";
11
+ import { z as c } from "zod";
12
+ function Lt({
13
+ title: t,
14
+ titleId: r,
15
+ ...a
16
+ }, s) {
17
+ return /* @__PURE__ */ z.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: s,
24
+ "aria-labelledby": r
25
+ }, a), t ? /* @__PURE__ */ z.createElement("title", {
26
+ id: r
27
+ }, t) : null, /* @__PURE__ */ z.createElement("path", {
28
+ fillRule: "evenodd",
29
+ d: "M2.625 6.75a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875 0A.75.75 0 0 1 8.25 6h12a.75.75 0 0 1 0 1.5h-12a.75.75 0 0 1-.75-.75ZM2.625 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0ZM7.5 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5h-12A.75.75 0 0 1 7.5 12Zm-4.875 5.25a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875 0a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5h-12a.75.75 0 0 1-.75-.75Z",
30
+ clipRule: "evenodd"
31
+ }));
32
+ }
33
+ const Mt = /* @__PURE__ */ z.forwardRef(Lt);
34
+ function Wt({
35
+ title: t,
36
+ titleId: r,
37
+ ...a
38
+ }, s) {
39
+ return /* @__PURE__ */ z.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: s,
46
+ "aria-labelledby": r
47
+ }, a), t ? /* @__PURE__ */ z.createElement("title", {
48
+ id: r
49
+ }, t) : null, /* @__PURE__ */ z.createElement("path", {
50
+ fillRule: "evenodd",
51
+ d: "M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5ZM16.5 15a.75.75 0 0 1 .712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 0 1 0 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 0 1-1.422 0l-.395-1.183a1.5 1.5 0 0 0-.948-.948l-1.183-.395a.75.75 0 0 1 0-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0 1 16.5 15Z",
52
+ clipRule: "evenodd"
53
+ }));
54
+ }
55
+ const Ut = /* @__PURE__ */ z.forwardRef(Wt);
56
+ function Ve(t) {
57
+ var r, a, s = "";
58
+ if (typeof t == "string" || typeof t == "number") s += t;
59
+ else if (typeof t == "object") if (Array.isArray(t)) {
60
+ var d = t.length;
61
+ for (r = 0; r < d; r++) t[r] && (a = Ve(t[r])) && (s && (s += " "), s += a);
62
+ } else for (a in t) t[a] && (s && (s += " "), s += a);
63
+ return s;
64
+ }
65
+ function Z() {
66
+ for (var t, r, a = 0, s = "", d = arguments.length; a < d; a++) (t = arguments[a]) && (r = Ve(t)) && (s && (s += " "), s += r);
67
+ return s;
68
+ }
69
+ const Bt = {
25
70
  danger: "bg-error/10 text-error",
26
71
  caution: "bg-error/10 text-error",
27
72
  safe: "bg-neutral/10 text-neutral"
28
- }, R = {
73
+ }, Ht = {
29
74
  danger: "result.danger.badge",
30
75
  caution: "result.caution.badge",
31
76
  safe: "result.safe.badge"
32
- }, A = {
77
+ }, Yt = {
33
78
  sm: "text-xl font-bold",
34
79
  lg: "text-2xl font-bold"
35
80
  };
36
- function b({
37
- badgeVariant: e,
38
- subtitle: t,
39
- icon: r,
40
- title: n,
41
- titleSize: s = "lg",
42
- children: l
81
+ function K({
82
+ badgeVariant: t,
83
+ subtitle: r,
84
+ icon: a,
85
+ title: s,
86
+ titleSize: d = "lg",
87
+ children: x
43
88
  }) {
44
- const { t: f } = u(d);
45
- return /* @__PURE__ */ c("section", { className: "rounded-2xl bg-neutral-content p-6 shadow-sm", children: [
46
- /* @__PURE__ */ c("header", { className: "mb-4 flex flex-col items-start", children: [
47
- e && /* @__PURE__ */ a(
89
+ const { t: N } = D(F);
90
+ return /* @__PURE__ */ b("section", { className: "rounded-2xl bg-neutral-content p-6 shadow-sm", children: [
91
+ /* @__PURE__ */ b("header", { className: "mb-4 flex flex-col items-start", children: [
92
+ t && /* @__PURE__ */ o(
48
93
  "div",
49
94
  {
50
- className: w(
95
+ className: Z(
51
96
  "mb-2 rounded-full px-4 py-1 text-sm font-bold",
52
- E[e]
97
+ Bt[t]
53
98
  ),
54
- children: f(R[e])
99
+ children: N(Ht[t])
55
100
  }
56
101
  ),
57
- t && /* @__PURE__ */ a("p", { className: "mb-1 break-keep text-lg font-medium text-neutral", children: t }),
58
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-neutral", children: [
59
- r && /* @__PURE__ */ a("span", { className: "text-base", children: r }),
60
- /* @__PURE__ */ a(
102
+ r && /* @__PURE__ */ o("p", { className: "mb-1 break-keep text-lg font-medium text-neutral", children: r }),
103
+ /* @__PURE__ */ b("div", { className: "flex items-center gap-2 text-neutral", children: [
104
+ a && /* @__PURE__ */ o("span", { className: "text-base", children: a }),
105
+ /* @__PURE__ */ o(
61
106
  "h2",
62
107
  {
63
- className: w(
108
+ className: Z(
64
109
  "whitespace-pre-line break-keep sm:whitespace-normal",
65
- A[s]
110
+ Yt[d]
66
111
  ),
67
- children: n
112
+ children: s
68
113
  }
69
114
  )
70
115
  ] })
71
116
  ] }),
72
- /* @__PURE__ */ a("div", { children: l })
117
+ /* @__PURE__ */ o("div", { children: x })
73
118
  ] });
74
119
  }
75
- function T({ summary: e }) {
76
- const { t } = u(d);
77
- return /* @__PURE__ */ a(b, { title: t("result.aiSummary"), children: /* @__PURE__ */ a("p", { className: "rounded-lg bg-base-200 p-6 text-sm leading-relaxed text-base-content", children: e }) });
120
+ function Zt({ summary: t }) {
121
+ const { t: r } = D(F);
122
+ return t.length === 0 ? null : /* @__PURE__ */ o(
123
+ K,
124
+ {
125
+ title: r("result.aiSummary"),
126
+ icon: /* @__PURE__ */ o(Ut, { className: "size-6" }),
127
+ children: /* @__PURE__ */ o("div", { children: t.map((a, s) => /* @__PURE__ */ o(
128
+ "p",
129
+ {
130
+ className: Z(
131
+ "py-2 text-sm leading-relaxed text-neutral first:pt-0",
132
+ s < t.length - 1 && "border-b border-base-300"
133
+ ),
134
+ children: a
135
+ },
136
+ `${a}-${s}`
137
+ )) })
138
+ }
139
+ );
78
140
  }
79
- function h({ title: e, content: t }) {
80
- return /* @__PURE__ */ c("div", { className: "text-neutral", children: [
81
- /* @__PURE__ */ a("h3", { className: "mb-1 break-keep text-lg font-semibold", children: e }),
82
- /* @__PURE__ */ a("p", { className: "break-keep", children: t })
141
+ function L({ title: t, content: r }) {
142
+ return /* @__PURE__ */ b("div", { className: "text-neutral", children: [
143
+ /* @__PURE__ */ o("h3", { className: "mb-1 break-keep text-lg font-semibold", children: t }),
144
+ /* @__PURE__ */ o("p", { className: "break-keep", children: r })
83
145
  ] });
84
146
  }
85
- function D({ data: e }) {
86
- const { t, i18n: r } = u(d);
87
- return e ? /* @__PURE__ */ a(
88
- b,
147
+ function Kt({ data: t }) {
148
+ const { t: r, i18n: a } = D(F);
149
+ return t ? /* @__PURE__ */ o(
150
+ K,
89
151
  {
90
- subtitle: t("result.priceAnalysis.subtitle"),
91
- title: t("result.priceAnalysis.title"),
92
- children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
93
- e.market_price_range && /* @__PURE__ */ a(
94
- h,
152
+ subtitle: r("result.priceAnalysis.subtitle"),
153
+ title: r("result.priceAnalysis.title"),
154
+ children: /* @__PURE__ */ b("div", { className: "space-y-4", children: [
155
+ t.market_price_range && /* @__PURE__ */ o(
156
+ L,
95
157
  {
96
- title: t("result.marketPrice"),
97
- content: e.market_price_range
158
+ title: r("result.marketPrice"),
159
+ content: t.market_price_range
98
160
  }
99
161
  ),
100
- e.offered_price && /* @__PURE__ */ a(
101
- h,
162
+ t.offered_price && /* @__PURE__ */ o(
163
+ L,
102
164
  {
103
- title: t("result.offeredPrice"),
104
- content: new Intl.NumberFormat(r.language, {
165
+ title: r("result.offeredPrice"),
166
+ content: new Intl.NumberFormat(a.language, {
105
167
  style: "currency",
106
- currency: e.currency || "USD"
107
- }).format(e.offered_price)
168
+ currency: t.currency || "USD"
169
+ }).format(t.offered_price)
108
170
  }
109
171
  ),
110
- e.price_assessment && /* @__PURE__ */ a(
111
- h,
172
+ t.price_assessment && /* @__PURE__ */ o(
173
+ L,
112
174
  {
113
- title: t("result.priceAssessment"),
114
- content: e.price_assessment
175
+ title: r("result.priceAssessment"),
176
+ content: t.price_assessment
115
177
  }
116
178
  )
117
179
  ] })
118
180
  }
119
181
  ) : null;
120
182
  }
121
- function L({
122
- title: e,
123
- titleId: t,
124
- ...r
125
- }, n) {
126
- return /* @__PURE__ */ g.createElement("svg", Object.assign({
127
- xmlns: "http://www.w3.org/2000/svg",
128
- viewBox: "0 0 24 24",
129
- fill: "currentColor",
130
- "aria-hidden": "true",
131
- "data-slot": "icon",
132
- ref: n,
133
- "aria-labelledby": t
134
- }, r), e ? /* @__PURE__ */ g.createElement("title", {
135
- id: t
136
- }, e) : null, /* @__PURE__ */ g.createElement("path", {
137
- fillRule: "evenodd",
138
- d: "M2.625 6.75a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875 0A.75.75 0 0 1 8.25 6h12a.75.75 0 0 1 0 1.5h-12a.75.75 0 0 1-.75-.75ZM2.625 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0ZM7.5 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5h-12A.75.75 0 0 1 7.5 12Zm-4.875 5.25a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875 0a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5h-12a.75.75 0 0 1-.75-.75Z",
139
- clipRule: "evenodd"
140
- }));
141
- }
142
- const H = /* @__PURE__ */ g.forwardRef(L);
143
- function M({ items: e }) {
144
- const { t } = u(d);
145
- return e.length === 0 ? null : /* @__PURE__ */ a(
146
- b,
183
+ function Jt({ items: t }) {
184
+ const { t: r } = D(F);
185
+ return t.length === 0 ? null : /* @__PURE__ */ o(
186
+ K,
147
187
  {
148
- icon: /* @__PURE__ */ a(H, { className: "size-6" }),
149
- title: t("result.safetyChecklist"),
188
+ icon: /* @__PURE__ */ o(Mt, { className: "size-6" }),
189
+ title: r("result.safetyChecklist"),
150
190
  titleSize: "sm",
151
- children: /* @__PURE__ */ a("div", { className: "space-y-4", children: e.map((r, n) => /* @__PURE__ */ c(
191
+ children: /* @__PURE__ */ o("div", { className: "space-y-4", children: t.map((a, s) => /* @__PURE__ */ b(
152
192
  "label",
153
193
  {
154
194
  className: "label cursor-pointer gap-4 rounded-2xl bg-base-200 p-4",
155
195
  children: [
156
- /* @__PURE__ */ a("span", { className: "label-text break-keep text-neutral", children: r }),
157
- /* @__PURE__ */ a(
196
+ /* @__PURE__ */ o("span", { className: "label-text break-keep text-neutral", children: a }),
197
+ /* @__PURE__ */ o(
158
198
  "input",
159
199
  {
160
200
  type: "checkbox",
@@ -163,366 +203,1113 @@ function M({ items: e }) {
163
203
  )
164
204
  ]
165
205
  },
166
- n
206
+ s
167
207
  )) })
168
208
  }
169
209
  );
170
210
  }
171
- const B = {
211
+ const qt = {
172
212
  danger: "result.danger.title",
173
213
  caution: "result.caution.title",
174
214
  safe: "result.safe.title"
175
215
  };
176
- function y({ signals: e, variant: t }) {
177
- const { t: r } = u(d);
178
- return e.length === 0 ? null : /* @__PURE__ */ a(b, { badgeVariant: t, title: r(B[t]), children: /* @__PURE__ */ a("div", { className: "divide-y divide-base-300", children: e.map((n, s) => /* @__PURE__ */ c("div", { className: "space-y-4 py-4 first:pt-0 last:pb-0", children: [
179
- /* @__PURE__ */ a(h, { title: n.title, content: n.description }),
180
- /* @__PURE__ */ a(
181
- h,
216
+ function fe({ signals: t, variant: r }) {
217
+ const { t: a } = D(F);
218
+ return t.length === 0 ? null : /* @__PURE__ */ o(K, { badgeVariant: r, title: a(qt[r]), children: /* @__PURE__ */ o("div", { className: "divide-y divide-base-300", children: t.map((s, d) => /* @__PURE__ */ b("div", { className: "space-y-4 py-4 first:pt-0 last:pb-0", children: [
219
+ /* @__PURE__ */ o(L, { title: s.title, content: s.description }),
220
+ /* @__PURE__ */ o(
221
+ L,
182
222
  {
183
- title: r("result.whatToDo"),
184
- content: n.what_to_do
223
+ title: a("result.whatToDo"),
224
+ content: s.what_to_do
185
225
  }
186
226
  )
187
- ] }, s)) }) });
227
+ ] }, d)) }) });
188
228
  }
189
- function F({
190
- translation: e,
191
- nuance: t
229
+ function Vt({
230
+ translation: t,
231
+ nuance: r
192
232
  }) {
193
- const { t: r } = u(d);
194
- return /* @__PURE__ */ a(
195
- b,
233
+ const { t: a } = D(F);
234
+ return /* @__PURE__ */ o(
235
+ K,
196
236
  {
197
- subtitle: r("result.translation.subtitle"),
198
- title: r("result.translation.title"),
199
- children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
200
- e && /* @__PURE__ */ a(
201
- h,
237
+ subtitle: a("result.translation.subtitle"),
238
+ title: a("result.translation.title"),
239
+ children: /* @__PURE__ */ b("div", { className: "space-y-4", children: [
240
+ t && /* @__PURE__ */ o(
241
+ L,
202
242
  {
203
- title: r("result.translation.label"),
204
- content: e
243
+ title: a("result.translation.label"),
244
+ content: t
205
245
  }
206
246
  ),
207
- t && /* @__PURE__ */ a(h, { title: r("result.nuance.label"), content: t })
247
+ r && /* @__PURE__ */ o(L, { title: a("result.nuance.label"), content: r })
208
248
  ] })
209
249
  }
210
250
  );
211
251
  }
212
- function ue({ analysis: e }) {
213
- return /* @__PURE__ */ c("div", { className: "space-y-6", children: [
214
- e.ai_summary && /* @__PURE__ */ a(T, { summary: e.ai_summary }),
215
- e.risk_signals.length > 0 && /* @__PURE__ */ a(y, { signals: e.risk_signals, variant: "danger" }),
216
- e.cautions.length > 0 && /* @__PURE__ */ a(y, { signals: e.cautions, variant: "caution" }),
217
- e.safe_indicators.length > 0 && /* @__PURE__ */ a(y, { signals: e.safe_indicators, variant: "safe" }),
218
- e.safety_checklist.length > 0 && /* @__PURE__ */ a(M, { items: e.safety_checklist }),
219
- (e.translation || e.nuance_explanation) && /* @__PURE__ */ a(
220
- F,
252
+ function Er({ analysis: t }) {
253
+ return /* @__PURE__ */ b("div", { className: "space-y-6", children: [
254
+ t.ai_summary.length > 0 && /* @__PURE__ */ o(Zt, { summary: t.ai_summary }),
255
+ t.risk_signals.length > 0 && /* @__PURE__ */ o(fe, { signals: t.risk_signals, variant: "danger" }),
256
+ t.cautions.length > 0 && /* @__PURE__ */ o(fe, { signals: t.cautions, variant: "caution" }),
257
+ t.safe_indicators.length > 0 && /* @__PURE__ */ o(fe, { signals: t.safe_indicators, variant: "safe" }),
258
+ t.safety_checklist.length > 0 && /* @__PURE__ */ o(Jt, { items: t.safety_checklist }),
259
+ (t.translation || t.nuance_explanation) && /* @__PURE__ */ o(
260
+ Vt,
221
261
  {
222
- translation: e.translation,
223
- nuance: e.nuance_explanation
262
+ translation: t.translation,
263
+ nuance: t.nuance_explanation
224
264
  }
225
265
  ),
226
- e.price_analysis && /* @__PURE__ */ a(D, { data: e.price_analysis })
266
+ t.price_analysis && /* @__PURE__ */ o(Kt, { data: t.price_analysis })
227
267
  ] });
228
268
  }
229
- var k = {
269
+ var Xe = {
230
270
  color: void 0,
231
271
  size: void 0,
232
272
  className: void 0,
233
273
  style: void 0,
234
274
  attr: void 0
235
- }, N = m.createContext && /* @__PURE__ */ m.createContext(k), I = ["attr", "size", "title"];
236
- function Z(e, t) {
237
- if (e == null) return {};
238
- var r = W(e, t), n, s;
275
+ }, Ue = T.createContext && /* @__PURE__ */ T.createContext(Xe), Xt = ["attr", "size", "title"];
276
+ function Gt(t, r) {
277
+ if (t == null) return {};
278
+ var a = Qt(t, r), s, d;
239
279
  if (Object.getOwnPropertySymbols) {
240
- var l = Object.getOwnPropertySymbols(e);
241
- for (s = 0; s < l.length; s++)
242
- n = l[s], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
280
+ var x = Object.getOwnPropertySymbols(t);
281
+ for (d = 0; d < x.length; d++)
282
+ s = x[d], !(r.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(t, s) && (a[s] = t[s]);
243
283
  }
244
- return r;
245
- }
246
- function W(e, t) {
247
- if (e == null) return {};
248
- var r = {};
249
- for (var n in e)
250
- if (Object.prototype.hasOwnProperty.call(e, n)) {
251
- if (t.indexOf(n) >= 0) continue;
252
- r[n] = e[n];
253
- }
254
- return r;
255
- }
256
- function x() {
257
- return x = Object.assign ? Object.assign.bind() : function(e) {
258
- for (var t = 1; t < arguments.length; t++) {
259
- var r = arguments[t];
260
- for (var n in r)
261
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
262
- }
263
- return e;
264
- }, x.apply(this, arguments);
265
- }
266
- function S(e, t) {
267
- var r = Object.keys(e);
284
+ return a;
285
+ }
286
+ function Qt(t, r) {
287
+ if (t == null) return {};
288
+ var a = {};
289
+ for (var s in t)
290
+ if (Object.prototype.hasOwnProperty.call(t, s)) {
291
+ if (r.indexOf(s) >= 0) continue;
292
+ a[s] = t[s];
293
+ }
294
+ return a;
295
+ }
296
+ function ee() {
297
+ return ee = Object.assign ? Object.assign.bind() : function(t) {
298
+ for (var r = 1; r < arguments.length; r++) {
299
+ var a = arguments[r];
300
+ for (var s in a)
301
+ Object.prototype.hasOwnProperty.call(a, s) && (t[s] = a[s]);
302
+ }
303
+ return t;
304
+ }, ee.apply(this, arguments);
305
+ }
306
+ function Be(t, r) {
307
+ var a = Object.keys(t);
268
308
  if (Object.getOwnPropertySymbols) {
269
- var n = Object.getOwnPropertySymbols(e);
270
- t && (n = n.filter(function(s) {
271
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
272
- })), r.push.apply(r, n);
309
+ var s = Object.getOwnPropertySymbols(t);
310
+ r && (s = s.filter(function(d) {
311
+ return Object.getOwnPropertyDescriptor(t, d).enumerable;
312
+ })), a.push.apply(a, s);
273
313
  }
274
- return r;
275
- }
276
- function v(e) {
277
- for (var t = 1; t < arguments.length; t++) {
278
- var r = arguments[t] != null ? arguments[t] : {};
279
- t % 2 ? S(Object(r), !0).forEach(function(n) {
280
- $(e, n, r[n]);
281
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : S(Object(r)).forEach(function(n) {
282
- Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
314
+ return a;
315
+ }
316
+ function te(t) {
317
+ for (var r = 1; r < arguments.length; r++) {
318
+ var a = arguments[r] != null ? arguments[r] : {};
319
+ r % 2 ? Be(Object(a), !0).forEach(function(s) {
320
+ er(t, s, a[s]);
321
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : Be(Object(a)).forEach(function(s) {
322
+ Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(a, s));
283
323
  });
284
324
  }
285
- return e;
325
+ return t;
286
326
  }
287
- function $(e, t, r) {
288
- return t = K(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
327
+ function er(t, r, a) {
328
+ return r = tr(r), r in t ? Object.defineProperty(t, r, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : t[r] = a, t;
289
329
  }
290
- function K(e) {
291
- var t = U(e, "string");
292
- return typeof t == "symbol" ? t : t + "";
330
+ function tr(t) {
331
+ var r = rr(t, "string");
332
+ return typeof r == "symbol" ? r : r + "";
293
333
  }
294
- function U(e, t) {
295
- if (typeof e != "object" || !e) return e;
296
- var r = e[Symbol.toPrimitive];
297
- if (r !== void 0) {
298
- var n = r.call(e, t);
299
- if (typeof n != "object") return n;
334
+ function rr(t, r) {
335
+ if (typeof t != "object" || !t) return t;
336
+ var a = t[Symbol.toPrimitive];
337
+ if (a !== void 0) {
338
+ var s = a.call(t, r);
339
+ if (typeof s != "object") return s;
300
340
  throw new TypeError("@@toPrimitive must return a primitive value.");
301
341
  }
302
- return (t === "string" ? String : Number)(e);
342
+ return (r === "string" ? String : Number)(t);
303
343
  }
304
- function P(e) {
305
- return e && e.map((t, r) => /* @__PURE__ */ m.createElement(t.tag, v({
306
- key: r
307
- }, t.attr), P(t.child)));
344
+ function Ge(t) {
345
+ return t && t.map((r, a) => /* @__PURE__ */ T.createElement(r.tag, te({
346
+ key: a
347
+ }, r.attr), Ge(r.child)));
308
348
  }
309
- function C(e) {
310
- return (t) => /* @__PURE__ */ m.createElement(X, x({
311
- attr: v({}, e.attr)
312
- }, t), P(e.child));
349
+ function Qe(t) {
350
+ return (r) => /* @__PURE__ */ T.createElement(nr, ee({
351
+ attr: te({}, t.attr)
352
+ }, r), Ge(t.child));
313
353
  }
314
- function X(e) {
315
- var t = (r) => {
354
+ function nr(t) {
355
+ var r = (a) => {
316
356
  var {
317
- attr: n,
318
- size: s,
319
- title: l
320
- } = e, f = Z(e, I), p = s || r.size || "1em", o;
321
- return r.className && (o = r.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ m.createElement("svg", x({
357
+ attr: s,
358
+ size: d,
359
+ title: x
360
+ } = t, N = Gt(t, Xt), w = d || a.size || "1em", f;
361
+ return a.className && (f = a.className), t.className && (f = (f ? f + " " : "") + t.className), /* @__PURE__ */ T.createElement("svg", ee({
322
362
  stroke: "currentColor",
323
363
  fill: "currentColor",
324
364
  strokeWidth: "0"
325
- }, r.attr, n, f, {
326
- className: o,
327
- style: v(v({
328
- color: e.color || r.color
329
- }, r.style), e.style),
330
- height: p,
331
- width: p,
365
+ }, a.attr, s, N, {
366
+ className: f,
367
+ style: te(te({
368
+ color: t.color || a.color
369
+ }, a.style), t.style),
370
+ height: w,
371
+ width: w,
332
372
  xmlns: "http://www.w3.org/2000/svg"
333
- }), l && /* @__PURE__ */ m.createElement("title", null, l), e.children);
373
+ }), x && /* @__PURE__ */ T.createElement("title", null, x), t.children);
334
374
  };
335
- return N !== void 0 ? /* @__PURE__ */ m.createElement(N.Consumer, null, (r) => t(r)) : t(k);
375
+ return Ue !== void 0 ? /* @__PURE__ */ T.createElement(Ue.Consumer, null, (a) => r(a)) : r(Xe);
336
376
  }
337
- function Y(e) {
338
- return C({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z" }, child: [] }] })(e);
377
+ function ar(t) {
378
+ return Qe({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z" }, child: [] }] })(t);
339
379
  }
340
- function q(e) {
341
- return C({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z" }, child: [] }] })(e);
380
+ function or(t) {
381
+ return Qe({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z" }, child: [] }] })(t);
342
382
  }
343
- function de({
344
- value: e,
345
- onChange: t,
346
- onSubmit: r,
347
- isLoading: n,
348
- error: s
349
- }) {
350
- const { t: l } = u(d), f = n ? /* @__PURE__ */ a("span", { className: "loading loading-spinner loading-sm" }) : l("hero.checkSafety"), p = n || !e.trim();
351
- return /* @__PURE__ */ a("div", { className: "flex w-full flex-col items-center justify-center", children: /* @__PURE__ */ c("div", { className: "w-full lg:max-w-[720px]", children: [
352
- /* @__PURE__ */ a("h1", { className: "mb-2 text-left text-3xl font-bold text-base-content sm:mb-8 sm:text-center sm:text-4xl md:mb-8", children: l("hero.title") }),
353
- /* @__PURE__ */ a("p", { className: "mb-4 text-left text-sm text-base-content/70 sm:mb-8 sm:text-center sm:text-base md:mb-16", children: l("hero.subtitle") }),
354
- /* @__PURE__ */ c("div", { className: w("mb-4", !s && "sm:mb-8 md:mb-12"), children: [
355
- /* @__PURE__ */ c("div", { className: "relative hidden lg:block", children: [
356
- /* @__PURE__ */ a(
357
- "input",
358
- {
359
- type: "text",
360
- className: "input input-bordered h-[72px] w-full pr-36 text-sm placeholder:text-base-300 focus:outline-none",
361
- placeholder: l("hero.placeholder"),
362
- "aria-label": l("hero.placeholder"),
363
- value: e,
364
- onChange: (o) => t(o.target.value),
365
- disabled: n,
366
- onKeyDown: (o) => {
367
- o.key === "Enter" && !p && r();
368
- }
369
- }
370
- ),
371
- /* @__PURE__ */ a(
372
- "button",
383
+ function sr({ data: t }) {
384
+ const r = t.images.slice(0, 3), a = r.length > 0;
385
+ return /* @__PURE__ */ b("div", { className: "relative rounded-l-md border-l-4 border-neutral/50 bg-base-100 px-5 py-2", children: [
386
+ /* @__PURE__ */ b("div", { className: "mb-3", children: [
387
+ /* @__PURE__ */ o("h3", { className: "mb-2 text-sm font-bold text-base-content", children: t.title }),
388
+ /* @__PURE__ */ b("div", { className: "flex min-w-0 items-center gap-2 text-sm text-base-content/60", children: [
389
+ /* @__PURE__ */ o("span", { className: "truncate", children: t.author }),
390
+ t.date && /* @__PURE__ */ o("span", { className: "shrink-0 whitespace-nowrap", children: t.date })
391
+ ] })
392
+ ] }),
393
+ a && /* @__PURE__ */ o("div", { className: "flex gap-2", children: r.map((s, d) => /* @__PURE__ */ o(
394
+ "div",
395
+ {
396
+ className: "relative size-14 overflow-hidden rounded bg-base-200",
397
+ children: /* @__PURE__ */ o(
398
+ It,
373
399
  {
374
- className: "btn btn-neutral absolute right-2 top-1/2 h-[56px] min-h-0 -translate-y-1/2 !animate-none px-6 font-bold text-neutral-content",
375
- onClick: r,
376
- disabled: p,
377
- children: f
400
+ src: s,
401
+ alt: `Image ${d + 1} from post by ${t.author}`,
402
+ fill: !0,
403
+ className: "object-cover"
378
404
  }
379
405
  )
406
+ },
407
+ `${s}-${d}`
408
+ )) })
409
+ ] });
410
+ }
411
+ function ir() {
412
+ return /* @__PURE__ */ b("div", { className: "relative border-l-4 border-base-300 bg-base-100 px-5 py-2", children: [
413
+ /* @__PURE__ */ b("div", { className: "mb-3", children: [
414
+ /* @__PURE__ */ o("div", { className: "skeleton mb-2 h-4 w-3/4" }),
415
+ /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
416
+ /* @__PURE__ */ o("div", { className: "skeleton h-3 w-20" }),
417
+ /* @__PURE__ */ o("div", { className: "skeleton h-3 w-16" })
418
+ ] })
419
+ ] }),
420
+ /* @__PURE__ */ b("div", { className: "flex gap-2", children: [
421
+ /* @__PURE__ */ o("div", { className: "skeleton size-14 rounded" }),
422
+ /* @__PURE__ */ o("div", { className: "skeleton size-14 rounded" }),
423
+ /* @__PURE__ */ o("div", { className: "skeleton size-14 rounded" })
424
+ ] })
425
+ ] });
426
+ }
427
+ const lr = Ft(
428
+ ({
429
+ value: t,
430
+ onChange: r,
431
+ onSubmit: a,
432
+ isLoading: s,
433
+ error: d,
434
+ previewData: x,
435
+ isLoadingPreview: N,
436
+ previewError: w
437
+ }) => {
438
+ const { t: f } = D(F), j = We(null), _ = We(!0), g = !t && !x && !N && !w;
439
+ qe(() => {
440
+ if (_.current && !g && j.current) {
441
+ j.current.focus();
442
+ const J = j.current.value.length;
443
+ j.current.setSelectionRange(J, J);
444
+ }
445
+ _.current = g;
446
+ }, [g]);
447
+ const R = s ? /* @__PURE__ */ o("span", { className: "loading loading-spinner loading-sm" }) : f("hero.checkSafety"), C = s || !t.trim();
448
+ return /* @__PURE__ */ o("div", { className: "flex w-full flex-col items-center justify-center", children: /* @__PURE__ */ b("div", { className: "w-full lg:max-w-3xl", children: [
449
+ /* @__PURE__ */ o("h1", { className: "mb-2 text-left text-3xl font-bold text-base-content sm:mb-8 sm:text-center sm:text-4xl md:mb-8", children: f("hero.title") }),
450
+ /* @__PURE__ */ o("p", { className: "mb-4 text-left text-sm text-base-content/70 sm:mb-8 sm:text-center sm:text-base md:mb-16", children: f("hero.subtitle") }),
451
+ /* @__PURE__ */ b("div", { className: Z("mb-4", !d && "sm:mb-8 md:mb-12"), children: [
452
+ g ? /* @__PURE__ */ o("div", { className: "hidden lg:block", children: /* @__PURE__ */ b("div", { className: "relative", children: [
453
+ /* @__PURE__ */ o(
454
+ "input",
455
+ {
456
+ type: "text",
457
+ className: "input input-bordered h-20 w-full pr-36 text-sm placeholder:text-base-300 focus:outline-none",
458
+ placeholder: f("hero.placeholder"),
459
+ "aria-label": f("hero.placeholder"),
460
+ value: t,
461
+ onChange: (P) => r(P.target.value),
462
+ disabled: s,
463
+ onKeyDown: (P) => {
464
+ P.key === "Enter" && !C && a();
465
+ }
466
+ }
467
+ ),
468
+ /* @__PURE__ */ o(
469
+ "button",
470
+ {
471
+ className: "btn btn-neutral absolute right-2 top-1/2 h-14 min-h-0 -translate-y-1/2 !animate-none px-6 font-bold text-neutral-content",
472
+ onClick: a,
473
+ disabled: C,
474
+ children: R
475
+ }
476
+ )
477
+ ] }) }) : null,
478
+ /* @__PURE__ */ o("div", { className: Z(g ? "block lg:hidden" : "block"), children: /* @__PURE__ */ b("div", { className: "relative flex min-h-[400px] w-full flex-col overflow-hidden rounded-xl border border-base-300 bg-base-100", children: [
479
+ !t && /* @__PURE__ */ o(
480
+ "div",
481
+ {
482
+ className: "pointer-events-none absolute inset-0 overflow-hidden p-5 pb-24 text-base text-base-300",
483
+ "aria-hidden": "true",
484
+ children: /* @__PURE__ */ b("div", { className: "whitespace-pre-line leading-relaxed", children: [
485
+ /* @__PURE__ */ o("p", { className: "mb-4 text-base-300", children: f("hero.placeholder") }),
486
+ f("hero.placeholderExample")
487
+ ] })
488
+ }
489
+ ),
490
+ /* @__PURE__ */ b("div", { className: "flex flex-1 flex-col pb-24", children: [
491
+ /* @__PURE__ */ o(
492
+ "textarea",
493
+ {
494
+ ref: j,
495
+ className: "flex-1 resize-none overflow-auto border-none bg-transparent p-4 leading-6 text-base-content outline-none",
496
+ value: t,
497
+ "aria-label": f("hero.placeholder"),
498
+ onChange: (P) => r(P.target.value),
499
+ disabled: s,
500
+ placeholder: ""
501
+ }
502
+ ),
503
+ x && /* @__PURE__ */ o("div", { className: "px-4 pb-4", children: /* @__PURE__ */ o(sr, { data: x }) }),
504
+ N && /* @__PURE__ */ o("div", { className: "px-4 pb-4", children: /* @__PURE__ */ o(ir, {}) }),
505
+ w && /* @__PURE__ */ o("div", { className: "alert alert-error mx-4 mb-4 flex w-auto items-center text-sm", children: /* @__PURE__ */ o("span", { children: w }) })
506
+ ] }),
507
+ /* @__PURE__ */ o("div", { className: "absolute inset-x-4 bottom-4 z-10", children: /* @__PURE__ */ o(
508
+ "button",
509
+ {
510
+ className: "btn btn-neutral h-16 w-full text-base font-medium text-neutral-content",
511
+ onClick: a,
512
+ disabled: C,
513
+ children: R
514
+ }
515
+ ) })
516
+ ] }) })
380
517
  ] }),
381
- /* @__PURE__ */ a("div", { className: "block lg:hidden", children: /* @__PURE__ */ c("div", { className: "relative h-[400px] w-full overflow-hidden rounded-xl border border-base-300 bg-base-100", children: [
382
- !e && /* @__PURE__ */ a(
383
- "div",
518
+ d && /* @__PURE__ */ o("div", { className: "alert alert-error mb-6 flex items-center gap-2 text-sm", children: /* @__PURE__ */ o("span", { children: d }) }),
519
+ /* @__PURE__ */ o("p", { className: "mb-4 text-left text-xs text-base-content/60 sm:mb-8 sm:text-center md:mb-12", children: f("hero.disclaimer") }),
520
+ /* @__PURE__ */ b("div", { className: "flex items-center justify-start gap-6 sm:justify-center", children: [
521
+ /* @__PURE__ */ o(
522
+ "a",
384
523
  {
385
- className: "pointer-events-none absolute inset-0 overflow-hidden p-5 pb-24 text-base text-base-300",
386
- "aria-hidden": "true",
387
- children: /* @__PURE__ */ c("div", { className: "whitespace-pre-line leading-relaxed", children: [
388
- /* @__PURE__ */ a("p", { className: "mb-4 text-base-300", children: l("hero.placeholder") }),
389
- l("hero.placeholderExample")
390
- ] })
524
+ href: "https://x.com",
525
+ target: "_blank",
526
+ rel: "noopener noreferrer",
527
+ "aria-label": "X",
528
+ children: /* @__PURE__ */ o(or, { className: "size-6 text-base-content transition-colors hover:text-base-content/70" })
391
529
  }
392
530
  ),
393
- /* @__PURE__ */ a("div", { className: "absolute inset-0 overflow-hidden pb-24", children: /* @__PURE__ */ a(
394
- "textarea",
531
+ /* @__PURE__ */ o(
532
+ "a",
395
533
  {
396
- className: "textarea size-full resize-none overflow-auto bg-transparent p-4 leading-6 text-base-content focus:outline-none",
397
- value: e,
398
- "aria-label": l("hero.placeholder"),
399
- onChange: (o) => t(o.target.value),
400
- disabled: n,
401
- placeholder: ""
534
+ href: "https://reddit.com",
535
+ target: "_blank",
536
+ rel: "noopener noreferrer",
537
+ "aria-label": "Reddit",
538
+ children: /* @__PURE__ */ o(ar, { className: "size-6 text-base-content transition-colors hover:text-base-content/70" })
402
539
  }
403
- ) }),
404
- /* @__PURE__ */ a("div", { className: "absolute inset-x-4 bottom-4 z-10", children: /* @__PURE__ */ a(
405
- "button",
406
- {
407
- className: "btn btn-neutral h-16 w-full text-base font-medium text-neutral-content",
408
- onClick: r,
409
- disabled: p,
410
- children: f
540
+ )
541
+ ] })
542
+ ] }) });
543
+ }
544
+ );
545
+ lr.displayName = "HomeHeroSection";
546
+ var pe = { exports: {} }, Y = {}, He;
547
+ function cr() {
548
+ if (He) return Y;
549
+ He = 1;
550
+ var t = T, r = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, d = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
551
+ function N(w, f, j) {
552
+ var _, g = {}, R = null, C = null;
553
+ j !== void 0 && (R = "" + j), f.key !== void 0 && (R = "" + f.key), f.ref !== void 0 && (C = f.ref);
554
+ for (_ in f) s.call(f, _) && !x.hasOwnProperty(_) && (g[_] = f[_]);
555
+ if (w && w.defaultProps) for (_ in f = w.defaultProps, f) g[_] === void 0 && (g[_] = f[_]);
556
+ return { $$typeof: r, type: w, key: R, ref: C, props: g, _owner: d.current };
557
+ }
558
+ return Y.Fragment = a, Y.jsx = N, Y.jsxs = N, Y;
559
+ }
560
+ var Q = {}, Ye;
561
+ function ur() {
562
+ return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && (function() {
563
+ var t = T, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), N = Symbol.for("react.provider"), w = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), P = Symbol.iterator, J = "@@iterator";
564
+ function et(e) {
565
+ if (e === null || typeof e != "object")
566
+ return null;
567
+ var n = P && e[P] || e[J];
568
+ return typeof n == "function" ? n : null;
569
+ }
570
+ var M = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
571
+ function S(e) {
572
+ {
573
+ for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), l = 1; l < n; l++)
574
+ i[l - 1] = arguments[l];
575
+ tt("error", e, i);
576
+ }
577
+ }
578
+ function tt(e, n, i) {
579
+ {
580
+ var l = M.ReactDebugCurrentFrame, m = l.getStackAddendum();
581
+ m !== "" && (n += "%s", i = i.concat([m]));
582
+ var h = i.map(function(p) {
583
+ return String(p);
584
+ });
585
+ h.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, h);
586
+ }
587
+ }
588
+ var rt = !1, nt = !1, at = !1, ot = !1, st = !1, he;
589
+ he = Symbol.for("react.module.reference");
590
+ function it(e) {
591
+ return !!(typeof e == "string" || typeof e == "function" || e === s || e === x || st || e === d || e === j || e === _ || ot || e === C || rt || nt || at || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === g || e.$$typeof === N || e.$$typeof === w || e.$$typeof === f || // This needs to include all possible module reference object
592
+ // types supported by any Flight configuration anywhere since
593
+ // we don't know which Flight build this will end up being used
594
+ // with.
595
+ e.$$typeof === he || e.getModuleId !== void 0));
596
+ }
597
+ function lt(e, n, i) {
598
+ var l = e.displayName;
599
+ if (l)
600
+ return l;
601
+ var m = n.displayName || n.name || "";
602
+ return m !== "" ? i + "(" + m + ")" : i;
603
+ }
604
+ function be(e) {
605
+ return e.displayName || "Context";
606
+ }
607
+ function $(e) {
608
+ if (e == null)
609
+ return null;
610
+ if (typeof e.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
611
+ return e.displayName || e.name || null;
612
+ if (typeof e == "string")
613
+ return e;
614
+ switch (e) {
615
+ case s:
616
+ return "Fragment";
617
+ case a:
618
+ return "Portal";
619
+ case x:
620
+ return "Profiler";
621
+ case d:
622
+ return "StrictMode";
623
+ case j:
624
+ return "Suspense";
625
+ case _:
626
+ return "SuspenseList";
627
+ }
628
+ if (typeof e == "object")
629
+ switch (e.$$typeof) {
630
+ case w:
631
+ var n = e;
632
+ return be(n) + ".Consumer";
633
+ case N:
634
+ var i = e;
635
+ return be(i._context) + ".Provider";
636
+ case f:
637
+ return lt(e, e.render, "ForwardRef");
638
+ case g:
639
+ var l = e.displayName || null;
640
+ return l !== null ? l : $(e.type) || "Memo";
641
+ case R: {
642
+ var m = e, h = m._payload, p = m._init;
643
+ try {
644
+ return $(p(h));
645
+ } catch {
646
+ return null;
647
+ }
411
648
  }
412
- ) })
413
- ] }) })
414
- ] }),
415
- s && /* @__PURE__ */ a("div", { className: "alert alert-error mb-6 flex items-center gap-2 text-sm", children: /* @__PURE__ */ a("span", { children: s }) }),
416
- /* @__PURE__ */ a("p", { className: "mb-4 text-left text-xs text-base-content/60 sm:mb-8 sm:text-center md:mb-12", children: l("hero.disclaimer") }),
417
- /* @__PURE__ */ c("div", { className: "flex items-center justify-start gap-6 sm:justify-center", children: [
418
- /* @__PURE__ */ a(
419
- "a",
420
- {
421
- href: "https://x.com",
422
- target: "_blank",
423
- rel: "noopener noreferrer",
424
- "aria-label": "X",
425
- children: /* @__PURE__ */ a(q, { className: "size-6 text-base-content transition-colors hover:text-base-content/70" })
426
649
  }
427
- ),
428
- /* @__PURE__ */ a(
429
- "a",
430
- {
431
- href: "https://reddit.com",
432
- target: "_blank",
433
- rel: "noopener noreferrer",
434
- "aria-label": "Reddit",
435
- children: /* @__PURE__ */ a(Y, { className: "size-6 text-base-content transition-colors hover:text-base-content/70" })
650
+ return null;
651
+ }
652
+ var I = Object.assign, B = 0, ye, ge, ve, xe, _e, we, Ne;
653
+ function Se() {
654
+ }
655
+ Se.__reactDisabledLog = !0;
656
+ function ct() {
657
+ {
658
+ if (B === 0) {
659
+ ye = console.log, ge = console.info, ve = console.warn, xe = console.error, _e = console.group, we = console.groupCollapsed, Ne = console.groupEnd;
660
+ var e = {
661
+ configurable: !0,
662
+ enumerable: !0,
663
+ value: Se,
664
+ writable: !0
665
+ };
666
+ Object.defineProperties(console, {
667
+ info: e,
668
+ log: e,
669
+ warn: e,
670
+ error: e,
671
+ group: e,
672
+ groupCollapsed: e,
673
+ groupEnd: e
674
+ });
436
675
  }
437
- )
438
- ] })
439
- ] }) });
676
+ B++;
677
+ }
678
+ }
679
+ function ut() {
680
+ {
681
+ if (B--, B === 0) {
682
+ var e = {
683
+ configurable: !0,
684
+ enumerable: !0,
685
+ writable: !0
686
+ };
687
+ Object.defineProperties(console, {
688
+ log: I({}, e, {
689
+ value: ye
690
+ }),
691
+ info: I({}, e, {
692
+ value: ge
693
+ }),
694
+ warn: I({}, e, {
695
+ value: ve
696
+ }),
697
+ error: I({}, e, {
698
+ value: xe
699
+ }),
700
+ group: I({}, e, {
701
+ value: _e
702
+ }),
703
+ groupCollapsed: I({}, e, {
704
+ value: we
705
+ }),
706
+ groupEnd: I({}, e, {
707
+ value: Ne
708
+ })
709
+ });
710
+ }
711
+ B < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
712
+ }
713
+ }
714
+ var re = M.ReactCurrentDispatcher, ne;
715
+ function q(e, n, i) {
716
+ {
717
+ if (ne === void 0)
718
+ try {
719
+ throw Error();
720
+ } catch (m) {
721
+ var l = m.stack.trim().match(/\n( *(at )?)/);
722
+ ne = l && l[1] || "";
723
+ }
724
+ return `
725
+ ` + ne + e;
726
+ }
727
+ }
728
+ var ae = !1, V;
729
+ {
730
+ var ft = typeof WeakMap == "function" ? WeakMap : Map;
731
+ V = new ft();
732
+ }
733
+ function ke(e, n) {
734
+ if (!e || ae)
735
+ return "";
736
+ {
737
+ var i = V.get(e);
738
+ if (i !== void 0)
739
+ return i;
740
+ }
741
+ var l;
742
+ ae = !0;
743
+ var m = Error.prepareStackTrace;
744
+ Error.prepareStackTrace = void 0;
745
+ var h;
746
+ h = re.current, re.current = null, ct();
747
+ try {
748
+ if (n) {
749
+ var p = function() {
750
+ throw Error();
751
+ };
752
+ if (Object.defineProperty(p.prototype, "props", {
753
+ set: function() {
754
+ throw Error();
755
+ }
756
+ }), typeof Reflect == "object" && Reflect.construct) {
757
+ try {
758
+ Reflect.construct(p, []);
759
+ } catch (O) {
760
+ l = O;
761
+ }
762
+ Reflect.construct(e, [], p);
763
+ } else {
764
+ try {
765
+ p.call();
766
+ } catch (O) {
767
+ l = O;
768
+ }
769
+ e.call(p.prototype);
770
+ }
771
+ } else {
772
+ try {
773
+ throw Error();
774
+ } catch (O) {
775
+ l = O;
776
+ }
777
+ e();
778
+ }
779
+ } catch (O) {
780
+ if (O && l && typeof O.stack == "string") {
781
+ for (var u = O.stack.split(`
782
+ `), k = l.stack.split(`
783
+ `), y = u.length - 1, v = k.length - 1; y >= 1 && v >= 0 && u[y] !== k[v]; )
784
+ v--;
785
+ for (; y >= 1 && v >= 0; y--, v--)
786
+ if (u[y] !== k[v]) {
787
+ if (y !== 1 || v !== 1)
788
+ do
789
+ if (y--, v--, v < 0 || u[y] !== k[v]) {
790
+ var E = `
791
+ ` + u[y].replace(" at new ", " at ");
792
+ return e.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, E), E;
793
+ }
794
+ while (y >= 1 && v >= 0);
795
+ break;
796
+ }
797
+ }
798
+ } finally {
799
+ ae = !1, re.current = h, ut(), Error.prepareStackTrace = m;
800
+ }
801
+ var U = e ? e.displayName || e.name : "", A = U ? q(U) : "";
802
+ return typeof e == "function" && V.set(e, A), A;
803
+ }
804
+ function pt(e, n, i) {
805
+ return ke(e, !1);
806
+ }
807
+ function dt(e) {
808
+ var n = e.prototype;
809
+ return !!(n && n.isReactComponent);
810
+ }
811
+ function X(e, n, i) {
812
+ if (e == null)
813
+ return "";
814
+ if (typeof e == "function")
815
+ return ke(e, dt(e));
816
+ if (typeof e == "string")
817
+ return q(e);
818
+ switch (e) {
819
+ case j:
820
+ return q("Suspense");
821
+ case _:
822
+ return q("SuspenseList");
823
+ }
824
+ if (typeof e == "object")
825
+ switch (e.$$typeof) {
826
+ case f:
827
+ return pt(e.render);
828
+ case g:
829
+ return X(e.type, n, i);
830
+ case R: {
831
+ var l = e, m = l._payload, h = l._init;
832
+ try {
833
+ return X(h(m), n, i);
834
+ } catch {
835
+ }
836
+ }
837
+ }
838
+ return "";
839
+ }
840
+ var H = Object.prototype.hasOwnProperty, je = {}, Oe = M.ReactDebugCurrentFrame;
841
+ function G(e) {
842
+ if (e) {
843
+ var n = e._owner, i = X(e.type, e._source, n ? n.type : null);
844
+ Oe.setExtraStackFrame(i);
845
+ } else
846
+ Oe.setExtraStackFrame(null);
847
+ }
848
+ function mt(e, n, i, l, m) {
849
+ {
850
+ var h = Function.call.bind(H);
851
+ for (var p in e)
852
+ if (h(e, p)) {
853
+ var u = void 0;
854
+ try {
855
+ if (typeof e[p] != "function") {
856
+ var k = Error((l || "React class") + ": " + i + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
857
+ throw k.name = "Invariant Violation", k;
858
+ }
859
+ u = e[p](n, p, l, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
860
+ } catch (y) {
861
+ u = y;
862
+ }
863
+ u && !(u instanceof Error) && (G(m), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", i, p, typeof u), G(null)), u instanceof Error && !(u.message in je) && (je[u.message] = !0, G(m), S("Failed %s type: %s", i, u.message), G(null));
864
+ }
865
+ }
866
+ }
867
+ var ht = Array.isArray;
868
+ function oe(e) {
869
+ return ht(e);
870
+ }
871
+ function bt(e) {
872
+ {
873
+ var n = typeof Symbol == "function" && Symbol.toStringTag, i = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
874
+ return i;
875
+ }
876
+ }
877
+ function yt(e) {
878
+ try {
879
+ return Re(e), !1;
880
+ } catch {
881
+ return !0;
882
+ }
883
+ }
884
+ function Re(e) {
885
+ return "" + e;
886
+ }
887
+ function Ee(e) {
888
+ if (yt(e))
889
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", bt(e)), Re(e);
890
+ }
891
+ var Pe = M.ReactCurrentOwner, gt = {
892
+ key: !0,
893
+ ref: !0,
894
+ __self: !0,
895
+ __source: !0
896
+ }, Te, Ce;
897
+ function vt(e) {
898
+ if (H.call(e, "ref")) {
899
+ var n = Object.getOwnPropertyDescriptor(e, "ref").get;
900
+ if (n && n.isReactWarning)
901
+ return !1;
902
+ }
903
+ return e.ref !== void 0;
904
+ }
905
+ function xt(e) {
906
+ if (H.call(e, "key")) {
907
+ var n = Object.getOwnPropertyDescriptor(e, "key").get;
908
+ if (n && n.isReactWarning)
909
+ return !1;
910
+ }
911
+ return e.key !== void 0;
912
+ }
913
+ function _t(e, n) {
914
+ typeof e.ref == "string" && Pe.current;
915
+ }
916
+ function wt(e, n) {
917
+ {
918
+ var i = function() {
919
+ Te || (Te = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
920
+ };
921
+ i.isReactWarning = !0, Object.defineProperty(e, "key", {
922
+ get: i,
923
+ configurable: !0
924
+ });
925
+ }
926
+ }
927
+ function Nt(e, n) {
928
+ {
929
+ var i = function() {
930
+ Ce || (Ce = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
931
+ };
932
+ i.isReactWarning = !0, Object.defineProperty(e, "ref", {
933
+ get: i,
934
+ configurable: !0
935
+ });
936
+ }
937
+ }
938
+ var St = function(e, n, i, l, m, h, p) {
939
+ var u = {
940
+ // This tag allows us to uniquely identify this as a React Element
941
+ $$typeof: r,
942
+ // Built-in properties that belong on the element
943
+ type: e,
944
+ key: n,
945
+ ref: i,
946
+ props: p,
947
+ // Record the component responsible for creating this element.
948
+ _owner: h
949
+ };
950
+ return u._store = {}, Object.defineProperty(u._store, "validated", {
951
+ configurable: !1,
952
+ enumerable: !1,
953
+ writable: !0,
954
+ value: !1
955
+ }), Object.defineProperty(u, "_self", {
956
+ configurable: !1,
957
+ enumerable: !1,
958
+ writable: !1,
959
+ value: l
960
+ }), Object.defineProperty(u, "_source", {
961
+ configurable: !1,
962
+ enumerable: !1,
963
+ writable: !1,
964
+ value: m
965
+ }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
966
+ };
967
+ function kt(e, n, i, l, m) {
968
+ {
969
+ var h, p = {}, u = null, k = null;
970
+ i !== void 0 && (Ee(i), u = "" + i), xt(n) && (Ee(n.key), u = "" + n.key), vt(n) && (k = n.ref, _t(n));
971
+ for (h in n)
972
+ H.call(n, h) && !gt.hasOwnProperty(h) && (p[h] = n[h]);
973
+ if (e && e.defaultProps) {
974
+ var y = e.defaultProps;
975
+ for (h in y)
976
+ p[h] === void 0 && (p[h] = y[h]);
977
+ }
978
+ if (u || k) {
979
+ var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
980
+ u && wt(p, v), k && Nt(p, v);
981
+ }
982
+ return St(e, u, k, m, l, Pe.current, p);
983
+ }
984
+ }
985
+ var se = M.ReactCurrentOwner, $e = M.ReactDebugCurrentFrame;
986
+ function W(e) {
987
+ if (e) {
988
+ var n = e._owner, i = X(e.type, e._source, n ? n.type : null);
989
+ $e.setExtraStackFrame(i);
990
+ } else
991
+ $e.setExtraStackFrame(null);
992
+ }
993
+ var ie;
994
+ ie = !1;
995
+ function le(e) {
996
+ return typeof e == "object" && e !== null && e.$$typeof === r;
997
+ }
998
+ function ze() {
999
+ {
1000
+ if (se.current) {
1001
+ var e = $(se.current.type);
1002
+ if (e)
1003
+ return `
1004
+
1005
+ Check the render method of \`` + e + "`.";
1006
+ }
1007
+ return "";
1008
+ }
1009
+ }
1010
+ function jt(e) {
1011
+ return "";
1012
+ }
1013
+ var De = {};
1014
+ function Ot(e) {
1015
+ {
1016
+ var n = ze();
1017
+ if (!n) {
1018
+ var i = typeof e == "string" ? e : e.displayName || e.name;
1019
+ i && (n = `
1020
+
1021
+ Check the top-level render call using <` + i + ">.");
1022
+ }
1023
+ return n;
1024
+ }
1025
+ }
1026
+ function Fe(e, n) {
1027
+ {
1028
+ if (!e._store || e._store.validated || e.key != null)
1029
+ return;
1030
+ e._store.validated = !0;
1031
+ var i = Ot(n);
1032
+ if (De[i])
1033
+ return;
1034
+ De[i] = !0;
1035
+ var l = "";
1036
+ e && e._owner && e._owner !== se.current && (l = " It was passed a child from " + $(e._owner.type) + "."), W(e), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, l), W(null);
1037
+ }
1038
+ }
1039
+ function Ie(e, n) {
1040
+ {
1041
+ if (typeof e != "object")
1042
+ return;
1043
+ if (oe(e))
1044
+ for (var i = 0; i < e.length; i++) {
1045
+ var l = e[i];
1046
+ le(l) && Fe(l, n);
1047
+ }
1048
+ else if (le(e))
1049
+ e._store && (e._store.validated = !0);
1050
+ else if (e) {
1051
+ var m = et(e);
1052
+ if (typeof m == "function" && m !== e.entries)
1053
+ for (var h = m.call(e), p; !(p = h.next()).done; )
1054
+ le(p.value) && Fe(p.value, n);
1055
+ }
1056
+ }
1057
+ }
1058
+ function Rt(e) {
1059
+ {
1060
+ var n = e.type;
1061
+ if (n == null || typeof n == "string")
1062
+ return;
1063
+ var i;
1064
+ if (typeof n == "function")
1065
+ i = n.propTypes;
1066
+ else if (typeof n == "object" && (n.$$typeof === f || // Note: Memo only checks outer props here.
1067
+ // Inner props are checked in the reconciler.
1068
+ n.$$typeof === g))
1069
+ i = n.propTypes;
1070
+ else
1071
+ return;
1072
+ if (i) {
1073
+ var l = $(n);
1074
+ mt(i, e.props, "prop", l, e);
1075
+ } else if (n.PropTypes !== void 0 && !ie) {
1076
+ ie = !0;
1077
+ var m = $(n);
1078
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
1079
+ }
1080
+ typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1081
+ }
1082
+ }
1083
+ function Et(e) {
1084
+ {
1085
+ for (var n = Object.keys(e.props), i = 0; i < n.length; i++) {
1086
+ var l = n[i];
1087
+ if (l !== "children" && l !== "key") {
1088
+ W(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), W(null);
1089
+ break;
1090
+ }
1091
+ }
1092
+ e.ref !== null && (W(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
1093
+ }
1094
+ }
1095
+ var Ae = {};
1096
+ function Le(e, n, i, l, m, h) {
1097
+ {
1098
+ var p = it(e);
1099
+ if (!p) {
1100
+ var u = "";
1101
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1102
+ var k = jt();
1103
+ k ? u += k : u += ze();
1104
+ var y;
1105
+ e === null ? y = "null" : oe(e) ? y = "array" : e !== void 0 && e.$$typeof === r ? (y = "<" + ($(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : y = typeof e, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, u);
1106
+ }
1107
+ var v = kt(e, n, i, m, h);
1108
+ if (v == null)
1109
+ return v;
1110
+ if (p) {
1111
+ var E = n.children;
1112
+ if (E !== void 0)
1113
+ if (l)
1114
+ if (oe(E)) {
1115
+ for (var U = 0; U < E.length; U++)
1116
+ Ie(E[U], e);
1117
+ Object.freeze && Object.freeze(E);
1118
+ } else
1119
+ S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1120
+ else
1121
+ Ie(E, e);
1122
+ }
1123
+ if (H.call(n, "key")) {
1124
+ var A = $(e), O = Object.keys(n).filter(function(Dt) {
1125
+ return Dt !== "key";
1126
+ }), ce = O.length > 0 ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}";
1127
+ if (!Ae[A + ce]) {
1128
+ var zt = O.length > 0 ? "{" + O.join(": ..., ") + ": ...}" : "{}";
1129
+ S(`A props object containing a "key" prop is being spread into JSX:
1130
+ let props = %s;
1131
+ <%s {...props} />
1132
+ React keys must be passed directly to JSX without using spread:
1133
+ let props = %s;
1134
+ <%s key={someKey} {...props} />`, ce, A, zt, A), Ae[A + ce] = !0;
1135
+ }
1136
+ }
1137
+ return e === s ? Et(v) : Rt(v), v;
1138
+ }
1139
+ }
1140
+ function Pt(e, n, i) {
1141
+ return Le(e, n, i, !0);
1142
+ }
1143
+ function Tt(e, n, i) {
1144
+ return Le(e, n, i, !1);
1145
+ }
1146
+ var Ct = Tt, $t = Pt;
1147
+ Q.Fragment = s, Q.jsx = Ct, Q.jsxs = $t;
1148
+ })()), Q;
440
1149
  }
441
- function me({ level: e, score: t }) {
442
- const { t: r } = u(d);
443
- return /* @__PURE__ */ c("div", { className: "mb-4 rounded-lg", children: [
444
- /* @__PURE__ */ a("h1", { className: "mb-2 text-3xl font-bold", children: r(`result.safetyLevel.${e}.title`) }),
445
- /* @__PURE__ */ a("p", { className: "mt-2 text-sm text-neutral", children: r(`result.safetyLevel.${e}.description`, { score: t }) })
1150
+ var Ze;
1151
+ function fr() {
1152
+ return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? pe.exports = cr() : pe.exports = ur()), pe.exports;
1153
+ }
1154
+ var Ke = fr();
1155
+ function pr({
1156
+ src: t,
1157
+ autoplay: r,
1158
+ loop: a = !0,
1159
+ ...s
1160
+ }) {
1161
+ const [d, x] = ue(!1), [N, w] = ue(null), [f, j] = ue(!1);
1162
+ return qe(() => {
1163
+ let _ = !0;
1164
+ return x(!0), Promise.all([
1165
+ import("./lottie-react.esm-BUHy0Xb6.mjs"),
1166
+ import("./isChromatic-5i32AXac-CtZ5BKgh.mjs")
1167
+ ]).then(([{ Player: g }, { default: R }]) => {
1168
+ _ && (w(() => g), j(R()));
1169
+ }).catch((g) => {
1170
+ throw console.error("[LottiePlayer] Failed to load dependencies:", g), g;
1171
+ }), () => {
1172
+ _ = !1;
1173
+ };
1174
+ }, []), !d || !N ? /* @__PURE__ */ Ke.jsx("div", { ...s }) : /* @__PURE__ */ Ke.jsx(
1175
+ N,
1176
+ {
1177
+ src: t,
1178
+ loop: a,
1179
+ autoplay: r !== void 0 ? r : !f,
1180
+ ...s
1181
+ }
1182
+ );
1183
+ }
1184
+ const dr = {
1185
+ danger: {
1186
+ lottie: "https://fonts.gstatic.com/s/e/notoemoji/latest/1f6a8/lottie.json",
1187
+ webp: "https://fonts.gstatic.com/s/e/notoemoji/latest/1f6a8/512.webp",
1188
+ gif: "https://fonts.gstatic.com/s/e/notoemoji/latest/1f6a8/512.gif",
1189
+ alt: "🚨"
1190
+ },
1191
+ caution: {
1192
+ lottie: "https://fonts.gstatic.com/s/e/notoemoji/latest/26a0_fe0f/lottie.json",
1193
+ webp: "https://fonts.gstatic.com/s/e/notoemoji/latest/26a0_fe0f/512.webp",
1194
+ gif: "https://fonts.gstatic.com/s/e/notoemoji/latest/26a0_fe0f/512.gif",
1195
+ alt: "⚠️"
1196
+ },
1197
+ safe: {
1198
+ lottie: "https://fonts.gstatic.com/s/e/notoemoji/latest/2705/lottie.json",
1199
+ webp: "https://fonts.gstatic.com/s/e/notoemoji/latest/2705/512.webp",
1200
+ gif: "https://fonts.gstatic.com/s/e/notoemoji/latest/2705/512.gif",
1201
+ alt: "✅"
1202
+ }
1203
+ }, de = {
1204
+ danger: "font-bold text-error",
1205
+ caution: "font-bold text-warning",
1206
+ safe: "font-bold text-success"
1207
+ };
1208
+ function Pr({ level: t, score: r }) {
1209
+ const { t: a } = D(F), s = dr[t];
1210
+ return /* @__PURE__ */ b("div", { className: "mb-8 flex flex-col items-center text-center", children: [
1211
+ /* @__PURE__ */ o("div", { className: "mb-5 rounded-full bg-neutral/75 px-4 py-1.5", children: /* @__PURE__ */ o("span", { className: "text-sm font-medium text-neutral-content", children: a(`result.safetyLevel.${t}.badge`) }) }),
1212
+ /* @__PURE__ */ o("h1", { className: "mb-9 break-keep text-4xl font-bold leading-tight text-base-content", children: /* @__PURE__ */ o(
1213
+ Me,
1214
+ {
1215
+ t: a,
1216
+ i18nKey: `result.safetyLevel.${t}.title`,
1217
+ components: [/* @__PURE__ */ o("strong", { className: de[t] }, "0")]
1218
+ }
1219
+ ) }),
1220
+ /* @__PURE__ */ o("div", { className: "mb-9 flex size-32 items-center justify-center", children: /* @__PURE__ */ o(pr, { src: s.lottie, autoplay: !0, loop: !0, className: "size-full" }) }),
1221
+ /* @__PURE__ */ o("p", { className: "max-w-md break-keep text-xl leading-relaxed text-base-content", children: /* @__PURE__ */ o(
1222
+ Me,
1223
+ {
1224
+ t: a,
1225
+ i18nKey: `result.safetyLevel.${t}.description`,
1226
+ values: { score: r },
1227
+ components: [
1228
+ /* @__PURE__ */ o("strong", { className: de[t] }, "0"),
1229
+ /* @__PURE__ */ o("strong", { className: de[t] }, "1")
1230
+ ]
1231
+ }
1232
+ ) })
446
1233
  ] });
447
1234
  }
448
- const O = {
1235
+ const Je = {
449
1236
  safe: 70,
450
1237
  caution: 40
451
- }, he = (e) => e >= O.safe ? "safe" : e >= O.caution ? "caution" : "danger", _ = i.object({
452
- category: i.enum(["payment", "seller", "platform", "price", "content"]),
453
- severity: i.enum(["high", "medium", "low"]),
454
- title: i.string(),
455
- description: i.string(),
456
- what_to_do: i.string()
457
- }), G = i.object({
458
- market_price_range: i.string().nullish(),
459
- offered_price: i.number().nullish(),
460
- currency: i.string().nullish(),
461
- price_assessment: i.string(),
462
- warnings: i.array(i.string())
463
- }), J = i.object({
464
- ai_summary: i.string(),
465
- translation: i.string().nullish(),
466
- nuance_explanation: i.string().nullish(),
467
- risk_signals: i.array(_),
468
- cautions: i.array(_),
469
- safe_indicators: i.array(_),
470
- price_analysis: G,
471
- safety_checklist: i.array(i.string()),
472
- safe_score: i.number(),
473
- recommendation: i.string(),
474
- emotional_support: i.string()
475
- }), Q = i.object({
476
- id: i.string(),
477
- user_id: i.string().nullish(),
478
- input_text: i.string(),
479
- llm_analysis: J,
480
- safe_score: i.number(),
481
- expert_advice: i.string().nullish(),
482
- expert_reviewed: i.boolean(),
483
- expert_reviewed_at: i.string().nullish(),
484
- expert_reviewed_by: i.string().nullish(),
485
- created_at: i.string(),
486
- updated_at: i.string()
487
- }), V = i.enum(["twitter"]), ee = i.object({
488
- platform: V,
489
- author: i.string(),
490
- created_at: i.string().nullish(),
491
- text: i.string(),
492
- text_preview: i.string(),
493
- images: i.array(i.string())
494
- }), te = i.object({
495
- data: ee
1238
+ }, Tr = (t) => t >= Je.safe ? "safe" : t >= Je.caution ? "caution" : "danger", me = c.object({
1239
+ category: c.enum(["payment", "seller", "platform", "price", "content"]),
1240
+ severity: c.enum(["high", "medium", "low"]),
1241
+ title: c.string(),
1242
+ description: c.string(),
1243
+ what_to_do: c.string()
1244
+ }), mr = c.object({
1245
+ market_price_range: c.string().nullish(),
1246
+ offered_price: c.number().nullish(),
1247
+ currency: c.string().nullish(),
1248
+ price_assessment: c.string(),
1249
+ warnings: c.array(c.string())
1250
+ }), hr = c.object({
1251
+ ai_summary: c.array(c.string()),
1252
+ translation: c.string().nullish(),
1253
+ nuance_explanation: c.string().nullish(),
1254
+ risk_signals: c.array(me),
1255
+ cautions: c.array(me),
1256
+ safe_indicators: c.array(me),
1257
+ price_analysis: mr,
1258
+ safety_checklist: c.array(c.string()),
1259
+ safe_score: c.number(),
1260
+ recommendation: c.string(),
1261
+ emotional_support: c.string()
1262
+ }), br = c.object({
1263
+ id: c.string(),
1264
+ user_id: c.string().nullish(),
1265
+ input_text: c.string(),
1266
+ llm_analysis: hr,
1267
+ safe_score: c.number(),
1268
+ expert_advice: c.string().nullish(),
1269
+ expert_reviewed: c.boolean(),
1270
+ expert_reviewed_at: c.string().nullish(),
1271
+ expert_reviewed_by: c.string().nullish(),
1272
+ created_at: c.string(),
1273
+ updated_at: c.string()
1274
+ }), yr = c.enum(["twitter", "reddit"]), gr = c.object({
1275
+ platform: yr,
1276
+ author: c.string(),
1277
+ created_at: c.string().nullish(),
1278
+ text: c.string(),
1279
+ text_preview: c.string(),
1280
+ images: c.array(c.string())
1281
+ }), vr = c.object({
1282
+ data: gr
496
1283
  });
497
- class fe extends z {
1284
+ class Cr extends At {
498
1285
  constructor() {
499
1286
  super(...arguments), this.resource = "trade-safety";
500
1287
  }
501
1288
  getDataSchema() {
502
- return Q;
1289
+ return br;
503
1290
  }
504
1291
  /**
505
1292
  * Fetch post preview metadata from a social media URL
506
1293
  * POST /trade-safety/preview
507
1294
  */
508
- async fetchPreview(t, r) {
509
- const n = `${this.apiService.buildUrl(this.resource)}/preview`, s = await this.apiService.request(n, {
510
- ...r,
1295
+ async fetchPreview(r, a) {
1296
+ const s = `${this.apiService.buildUrl(this.resource)}/preview`, d = await this.apiService.request(s, {
1297
+ ...a,
511
1298
  method: "POST",
512
1299
  headers: { "Content-Type": "application/json" },
513
- body: JSON.stringify({ url: t })
1300
+ body: JSON.stringify({ url: r })
514
1301
  });
515
- return this.validateResponse(s, te).data;
1302
+ return this.validateResponse(d, vr).data;
516
1303
  }
517
1304
  }
518
1305
  export {
519
- ue as DetailedResult,
520
- de as HomeHeroSection,
521
- me as PageHeader,
522
- O as SAFETY_SCORE_THRESHOLDS,
523
- d as TRADE_SAFETY_NS,
524
- fe as TradeSafetyRepository,
525
- he as getSafetyLevel,
526
- ge as tradeSafetyTranslations
1306
+ Er as DetailedResult,
1307
+ lr as HomeHeroSection,
1308
+ Pr as PageHeader,
1309
+ Je as SAFETY_SCORE_THRESHOLDS,
1310
+ F as TRADE_SAFETY_NS,
1311
+ Cr as TradeSafetyRepository,
1312
+ Tr as getSafetyLevel,
1313
+ Dr as tradeSafetyTranslations
527
1314
  };
528
1315
  //# sourceMappingURL=index.mjs.map