@burdenoff/microfe-store 2026.830.1 → 2026.830.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,23 +3,24 @@ import { useCart as t } from "../hooks/useCart.js";
3
3
  import { formatNumber as n, formatPrice as r } from "../utils/index.js";
4
4
  import { useCreateReview as i, useDeleteReview as ee, useMarkReviewHelpful as te, useStoreProductDetails as ne, useUpdateReview as re } from "../hooks/useStoreGraphQL.js";
5
5
  import { Markdown as ie } from "../node_modules/react-markdown/lib/index.js";
6
+ import { useTr as a } from "../shared/hooks/useTr.js";
6
7
  import { InstallAppModal as ae } from "../components/InstallAppModal.js";
7
8
  import { useInstallations as oe } from "../hooks/useInstallations.js";
8
9
  import { nativeConfirm as se, nativeImpact as ce, nativeNotify as le } from "../utils/nativeBridge.js";
9
- import { useCallback as a, useEffect as ue, useMemo as de, useRef as fe, useState as o } from "react";
10
+ import { useCallback as o, useEffect as ue, useMemo as de, useRef as fe, useState as s } from "react";
10
11
  import { useLocation as pe, useNavigate as me, useParams as he } from "react-router";
11
- import { AlertCircle as s, ArrowLeft as ge, Check as _e, Loader2 as ve, Package as c, ShieldCheck as l, ShoppingCart as ye, Star as u, ThumbsUp as d } from "lucide-react";
12
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
13
- import { EmphasisPanel as be, GlassCard as h, IllustratedEmptyState as xe, NextSteps as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
12
+ import { AlertCircle as c, ArrowLeft as ge, Check as _e, Loader2 as ve, Package as l, ShieldCheck as u, ShoppingCart as ye, Star as d, ThumbsUp as f } from "lucide-react";
13
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
14
+ import { EmphasisPanel as be, GlassCard as g, IllustratedEmptyState as xe, NextSteps as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
14
15
  import { useEventBus as we } from "@burdenoff/fe-libs/shared/events";
15
16
  //#region src/pages/ProductDetailPage.tsx
16
- var Te = (e, t) => ({
17
+ var Te = (e, t, n) => ({
17
18
  id: e.id,
18
19
  publisherId: t?.id || "",
19
20
  publisher: {
20
21
  id: t?.id || "",
21
- name: t?.name || e.authorName || "Unknown",
22
- displayName: t?.name || e.authorName || "Unknown",
22
+ name: t?.name || e.authorName || n?.("common.unknown", "Unknown") || "Unknown",
23
+ displayName: t?.name || e.authorName || n?.("common.unknown", "Unknown") || "Unknown",
23
24
  email: t?.email || "",
24
25
  verified: t?.isVerified || !1,
25
26
  totalProducts: 0,
@@ -88,207 +89,210 @@ var Te = (e, t) => ({
88
89
  createdAt: e.createdAt,
89
90
  updatedAt: e.updatedAt,
90
91
  publishedAt: e.publishedAt
91
- }), Ee = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ m("div", {
92
+ }), Ee = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ h("div", {
92
93
  className: "flex items-center gap-2",
93
94
  children: [
94
- /* @__PURE__ */ p("span", {
95
+ /* @__PURE__ */ m("span", {
95
96
  className: "w-3 text-xs text-text-muted",
96
97
  children: e
97
98
  }),
98
- /* @__PURE__ */ p("div", {
99
+ /* @__PURE__ */ m("div", {
99
100
  className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
100
- children: /* @__PURE__ */ p("div", {
101
+ children: /* @__PURE__ */ m("div", {
101
102
  className: "h-full rounded-full bg-status-warning-bg-subtle",
102
103
  style: { width: `${t}%` }
103
104
  })
104
105
  }),
105
- /* @__PURE__ */ p("span", {
106
+ /* @__PURE__ */ m("span", {
106
107
  className: "w-12 text-right text-xs text-text-muted",
107
108
  children: n(r)
108
109
  })
109
110
  ]
110
- }), De = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => /* @__PURE__ */ m("div", {
111
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
112
- children: [
113
- /* @__PURE__ */ p("div", {
114
- className: "mb-3 flex items-start justify-between",
115
- children: /* @__PURE__ */ m("div", {
116
- className: "flex items-center gap-3",
117
- children: [/* @__PURE__ */ p("div", {
118
- className: "flex size-10 items-center justify-center rounded-full bg-bg-sunken text-text-muted",
119
- children: /* @__PURE__ */ p(u, { className: "size-4 fill-current" })
120
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
121
- className: "font-medium text-text-primary",
122
- children: "Verified Buyer"
123
- }), /* @__PURE__ */ m("div", {
124
- className: "flex items-center gap-2",
125
- children: [/* @__PURE__ */ p("div", {
126
- className: "flex gap-0.5",
127
- children: [
128
- 1,
129
- 2,
130
- 3,
131
- 4,
132
- 5
133
- ].map((t) => /* @__PURE__ */ p(u, { className: `size-3 ${t <= e.rating ? "fill-current text-status-warning-text" : "text-text-muted"}` }, t))
134
- }), /* @__PURE__ */ p("span", {
135
- className: "text-xs text-text-muted",
136
- children: ((e) => {
137
- try {
138
- return new Date(e).toLocaleDateString("en-US", {
139
- year: "numeric",
140
- month: "short",
141
- day: "numeric"
142
- });
143
- } catch {
144
- return e;
145
- }
146
- })(e.createdAt)
147
- })]
148
- })] })]
149
- })
150
- }),
151
- e.title && /* @__PURE__ */ p("h4", {
152
- className: "mb-2 font-medium text-text-primary",
153
- children: e.title
154
- }),
155
- e.comment && /* @__PURE__ */ p("p", {
156
- className: "mb-3 text-sm text-text-muted",
157
- children: e.comment
158
- }),
159
- /* @__PURE__ */ p("div", {
160
- className: "flex items-center justify-between",
161
- children: /* @__PURE__ */ m("button", {
162
- type: "button",
163
- onClick: () => t(e.id),
164
- disabled: n,
165
- "aria-label": "Mark this review as helpful",
166
- className: "flex items-center gap-1 text-xs text-text-muted transition-colors hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-60",
167
- children: [/* @__PURE__ */ p(d, { className: "size-3.5" }), /* @__PURE__ */ p("span", { children: n ? "Updating…" : `Helpful (${e.helpful})` })]
111
+ }), De = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => {
112
+ let r = a();
113
+ return /* @__PURE__ */ h("div", {
114
+ className: "rounded-lg border border-border-seam bg-bg-surface p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
115
+ children: [
116
+ /* @__PURE__ */ m("div", {
117
+ className: "mb-3 flex items-start justify-between",
118
+ children: /* @__PURE__ */ h("div", {
119
+ className: "flex items-center gap-3",
120
+ children: [/* @__PURE__ */ m("div", {
121
+ className: "flex size-10 items-center justify-center rounded-full bg-bg-sunken text-text-muted",
122
+ children: /* @__PURE__ */ m(d, { className: "size-4 fill-current" })
123
+ }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
124
+ className: "font-medium text-text-primary",
125
+ children: r("pages.productDetail.verifiedBuyer", "Verified Buyer")
126
+ }), /* @__PURE__ */ h("div", {
127
+ className: "flex items-center gap-2",
128
+ children: [/* @__PURE__ */ m("div", {
129
+ className: "flex gap-0.5",
130
+ children: [
131
+ 1,
132
+ 2,
133
+ 3,
134
+ 4,
135
+ 5
136
+ ].map((t) => /* @__PURE__ */ m(d, { className: `size-3 ${t <= e.rating ? "fill-current text-status-warning-text" : "text-text-muted"}` }, t))
137
+ }), /* @__PURE__ */ m("span", {
138
+ className: "text-xs text-text-muted",
139
+ children: ((e) => {
140
+ try {
141
+ return new Date(e).toLocaleDateString("en-US", {
142
+ year: "numeric",
143
+ month: "short",
144
+ day: "numeric"
145
+ });
146
+ } catch {
147
+ return e;
148
+ }
149
+ })(e.createdAt)
150
+ })]
151
+ })] })]
152
+ })
153
+ }),
154
+ e.title && /* @__PURE__ */ m("h4", {
155
+ className: "mb-2 font-medium text-text-primary",
156
+ children: e.title
157
+ }),
158
+ e.comment && /* @__PURE__ */ m("p", {
159
+ className: "mb-3 text-sm text-text-muted",
160
+ children: e.comment
161
+ }),
162
+ /* @__PURE__ */ m("div", {
163
+ className: "flex items-center justify-between",
164
+ children: /* @__PURE__ */ h("button", {
165
+ type: "button",
166
+ onClick: () => t(e.id),
167
+ disabled: n,
168
+ "aria-label": r("pages.productDetail.markHelpful", "Mark this review as helpful"),
169
+ className: "flex items-center gap-1 text-xs text-text-muted transition-colors hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-60",
170
+ children: [/* @__PURE__ */ m(f, { className: "size-3.5" }), /* @__PURE__ */ m("span", { children: n ? r("pages.productDetail.updatingHelpful", "Updating…") : r("pages.productDetail.helpful", "Helpful ({{count}})", { count: e.helpful }) })]
171
+ })
168
172
  })
169
- })
170
- ]
171
- }), Oe = () => /* @__PURE__ */ m("div", {
173
+ ]
174
+ });
175
+ }, Oe = () => /* @__PURE__ */ h("div", {
172
176
  className: "h-full overflow-y-auto",
173
- children: [/* @__PURE__ */ p("div", {
177
+ children: [/* @__PURE__ */ m("div", {
174
178
  className: "sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4",
175
- children: /* @__PURE__ */ m("div", {
179
+ children: /* @__PURE__ */ h("div", {
176
180
  className: "flex items-center gap-4",
177
181
  children: [
178
- /* @__PURE__ */ p("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }),
179
- /* @__PURE__ */ p("div", { className: "h-6 w-48 flex-1 animate-pulse rounded bg-bg-sunken" }),
180
- /* @__PURE__ */ m("div", {
182
+ /* @__PURE__ */ m("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }),
183
+ /* @__PURE__ */ m("div", { className: "h-6 w-48 flex-1 animate-pulse rounded bg-bg-sunken" }),
184
+ /* @__PURE__ */ h("div", {
181
185
  className: "flex gap-2",
182
- children: [/* @__PURE__ */ p("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" })]
186
+ children: [/* @__PURE__ */ m("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" })]
183
187
  })
184
188
  ]
185
189
  })
186
- }), /* @__PURE__ */ m("div", {
190
+ }), /* @__PURE__ */ h("div", {
187
191
  className: "mx-auto max-w-6xl p-6",
188
192
  children: [
189
- /* @__PURE__ */ m("div", {
193
+ /* @__PURE__ */ h("div", {
190
194
  className: "mb-8 flex flex-col gap-6 md:flex-row",
191
- children: [/* @__PURE__ */ m("div", {
195
+ children: [/* @__PURE__ */ h("div", {
192
196
  className: "flex gap-4 md:w-1/2",
193
- children: [/* @__PURE__ */ p("div", { className: "size-28 animate-pulse rounded-2xl bg-bg-sunken" }), /* @__PURE__ */ m("div", {
197
+ children: [/* @__PURE__ */ m("div", { className: "size-28 animate-pulse rounded-2xl bg-bg-sunken" }), /* @__PURE__ */ h("div", {
194
198
  className: "flex flex-1 flex-col justify-center gap-2",
195
199
  children: [
196
- /* @__PURE__ */ p("div", { className: "h-8 w-3/4 animate-pulse rounded bg-bg-sunken" }),
197
- /* @__PURE__ */ m("div", {
200
+ /* @__PURE__ */ m("div", { className: "h-8 w-3/4 animate-pulse rounded bg-bg-sunken" }),
201
+ /* @__PURE__ */ h("div", {
198
202
  className: "flex items-center gap-2",
199
- children: [/* @__PURE__ */ p("div", { className: "h-4 w-32 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "size-4 animate-pulse rounded-full bg-bg-sunken" })]
203
+ children: [/* @__PURE__ */ m("div", { className: "h-4 w-32 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "size-4 animate-pulse rounded-full bg-bg-sunken" })]
200
204
  }),
201
- /* @__PURE__ */ m("div", {
205
+ /* @__PURE__ */ h("div", {
202
206
  className: "flex gap-3",
203
- children: [/* @__PURE__ */ p("div", { className: "h-5 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-5 w-24 animate-pulse rounded bg-bg-sunken" })]
207
+ children: [/* @__PURE__ */ m("div", { className: "h-5 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-5 w-24 animate-pulse rounded bg-bg-sunken" })]
204
208
  })
205
209
  ]
206
210
  })]
207
- }), /* @__PURE__ */ m("div", {
211
+ }), /* @__PURE__ */ h("div", {
208
212
  className: "flex flex-col gap-4 md:w-1/2 md:items-end",
209
- children: [/* @__PURE__ */ m("div", {
213
+ children: [/* @__PURE__ */ h("div", {
210
214
  className: "flex items-center gap-4",
211
215
  children: [
212
- /* @__PURE__ */ m("div", {
216
+ /* @__PURE__ */ h("div", {
213
217
  className: "text-center",
214
- children: [/* @__PURE__ */ p("div", { className: "h-10 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "mt-1 h-3 w-20 animate-pulse rounded bg-bg-sunken" })]
218
+ children: [/* @__PURE__ */ m("div", { className: "h-10 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "mt-1 h-3 w-20 animate-pulse rounded bg-bg-sunken" })]
215
219
  }),
216
- /* @__PURE__ */ p("div", { className: "h-12 w-px bg-border-default" }),
217
- /* @__PURE__ */ m("div", {
220
+ /* @__PURE__ */ m("div", { className: "h-12 w-px bg-border-default" }),
221
+ /* @__PURE__ */ h("div", {
218
222
  className: "text-center",
219
- children: [/* @__PURE__ */ p("div", { className: "h-8 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "mt-1 h-3 w-16 animate-pulse rounded bg-bg-sunken" })]
223
+ children: [/* @__PURE__ */ m("div", { className: "h-8 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "mt-1 h-3 w-16 animate-pulse rounded bg-bg-sunken" })]
220
224
  }),
221
- /* @__PURE__ */ p("div", { className: "h-12 w-px bg-border-default" }),
222
- /* @__PURE__ */ m("div", {
225
+ /* @__PURE__ */ m("div", { className: "h-12 w-px bg-border-default" }),
226
+ /* @__PURE__ */ h("div", {
223
227
  className: "text-center",
224
- children: [/* @__PURE__ */ p("div", { className: "h-8 w-20 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "mt-1 h-3 w-12 animate-pulse rounded bg-bg-sunken" })]
228
+ children: [/* @__PURE__ */ m("div", { className: "h-8 w-20 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "mt-1 h-3 w-12 animate-pulse rounded bg-bg-sunken" })]
225
229
  })
226
230
  ]
227
- }), /* @__PURE__ */ m("div", {
231
+ }), /* @__PURE__ */ h("div", {
228
232
  className: "flex gap-3",
229
- children: [/* @__PURE__ */ p("div", { className: "h-12 w-40 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "size-12 animate-pulse rounded-lg bg-bg-sunken" })]
233
+ children: [/* @__PURE__ */ m("div", { className: "h-12 w-40 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "size-12 animate-pulse rounded-lg bg-bg-sunken" })]
230
234
  })]
231
235
  })]
232
236
  }),
233
- /* @__PURE__ */ m("section", {
237
+ /* @__PURE__ */ h("section", {
234
238
  className: "mb-8",
235
- children: [/* @__PURE__ */ p("div", { className: "aspect-video animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ p("div", {
239
+ children: [/* @__PURE__ */ m("div", { className: "aspect-video animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ m("div", {
236
240
  className: "mt-4 flex gap-4",
237
241
  children: [...[
238
242
  ,
239
243
  ,
240
244
  ,
241
245
  ,
242
- ]].map((e, t) => /* @__PURE__ */ p("div", { className: "h-20 w-36 animate-pulse rounded-lg bg-bg-sunken" }, t))
246
+ ]].map((e, t) => /* @__PURE__ */ m("div", { className: "h-20 w-36 animate-pulse rounded-lg bg-bg-sunken" }, t))
243
247
  })]
244
248
  }),
245
- /* @__PURE__ */ m("section", {
249
+ /* @__PURE__ */ h("section", {
246
250
  className: "mb-8",
247
- children: [/* @__PURE__ */ m("div", {
251
+ children: [/* @__PURE__ */ h("div", {
248
252
  className: "mb-4 flex items-center gap-2",
249
- children: [/* @__PURE__ */ p("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-6 w-32 animate-pulse rounded bg-bg-sunken" })]
250
- }), /* @__PURE__ */ m("div", {
253
+ children: [/* @__PURE__ */ m("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-6 w-32 animate-pulse rounded bg-bg-sunken" })]
254
+ }), /* @__PURE__ */ h("div", {
251
255
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
252
- children: [/* @__PURE__ */ m("div", {
256
+ children: [/* @__PURE__ */ h("div", {
253
257
  className: "space-y-2",
254
258
  children: [
255
- /* @__PURE__ */ p("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
256
- /* @__PURE__ */ p("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
257
- /* @__PURE__ */ p("div", { className: "h-4 w-3/4 rounded bg-bg-sunken" }),
258
- /* @__PURE__ */ p("div", { className: "h-4 w-5/6 rounded bg-bg-sunken" })
259
+ /* @__PURE__ */ m("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
260
+ /* @__PURE__ */ m("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
261
+ /* @__PURE__ */ m("div", { className: "h-4 w-3/4 rounded bg-bg-sunken" }),
262
+ /* @__PURE__ */ m("div", { className: "h-4 w-5/6 rounded bg-bg-sunken" })
259
263
  ]
260
- }), /* @__PURE__ */ p("div", {
264
+ }), /* @__PURE__ */ m("div", {
261
265
  className: "mt-4 flex gap-2",
262
266
  children: [...[
263
267
  ,
264
268
  ,
265
269
  ,
266
270
  ,
267
- ]].map((e, t) => /* @__PURE__ */ p("div", { className: "h-6 w-16 rounded-full bg-bg-sunken" }, t))
271
+ ]].map((e, t) => /* @__PURE__ */ m("div", { className: "h-6 w-16 rounded-full bg-bg-sunken" }, t))
268
272
  })]
269
273
  })]
270
274
  }),
271
- /* @__PURE__ */ m("section", {
275
+ /* @__PURE__ */ h("section", {
272
276
  className: "mb-8",
273
277
  children: [
274
- /* @__PURE__ */ m("div", {
278
+ /* @__PURE__ */ h("div", {
275
279
  className: "mb-4 flex items-center justify-between",
276
- children: [/* @__PURE__ */ m("div", {
280
+ children: [/* @__PURE__ */ h("div", {
277
281
  className: "flex items-center gap-2",
278
- children: [/* @__PURE__ */ p("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
279
- }), /* @__PURE__ */ p("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
282
+ children: [/* @__PURE__ */ m("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
283
+ }), /* @__PURE__ */ m("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
280
284
  }),
281
- /* @__PURE__ */ m("div", {
285
+ /* @__PURE__ */ h("div", {
282
286
  className: "mb-6 flex flex-col gap-6 md:flex-row",
283
- children: [/* @__PURE__ */ p("div", {
287
+ children: [/* @__PURE__ */ m("div", {
284
288
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4 md:w-64",
285
- children: /* @__PURE__ */ m("div", {
289
+ children: /* @__PURE__ */ h("div", {
286
290
  className: "flex items-center gap-6",
287
- children: [/* @__PURE__ */ m("div", {
291
+ children: [/* @__PURE__ */ h("div", {
288
292
  className: "text-center",
289
293
  children: [
290
- /* @__PURE__ */ p("div", { className: "h-12 w-16 rounded bg-bg-sunken" }),
291
- /* @__PURE__ */ p("div", {
294
+ /* @__PURE__ */ m("div", { className: "h-12 w-16 rounded bg-bg-sunken" }),
295
+ /* @__PURE__ */ m("div", {
292
296
  className: "my-1 flex justify-center gap-0.5",
293
297
  children: [...[
294
298
  ,
@@ -296,11 +300,11 @@ var Te = (e, t) => ({
296
300
  ,
297
301
  ,
298
302
  ,
299
- ]].map((e, t) => /* @__PURE__ */ p("div", { className: "size-4 rounded bg-bg-sunken" }, t))
303
+ ]].map((e, t) => /* @__PURE__ */ m("div", { className: "size-4 rounded bg-bg-sunken" }, t))
300
304
  }),
301
- /* @__PURE__ */ p("div", { className: "h-3 w-20 rounded bg-bg-sunken" })
305
+ /* @__PURE__ */ m("div", { className: "h-3 w-20 rounded bg-bg-sunken" })
302
306
  ]
303
- }), /* @__PURE__ */ p("div", {
307
+ }), /* @__PURE__ */ m("div", {
304
308
  className: "flex-1 space-y-1",
305
309
  children: [...[
306
310
  ,
@@ -308,29 +312,29 @@ var Te = (e, t) => ({
308
312
  ,
309
313
  ,
310
314
  ,
311
- ]].map((e, t) => /* @__PURE__ */ m("div", {
315
+ ]].map((e, t) => /* @__PURE__ */ h("div", {
312
316
  className: "flex items-center gap-2",
313
317
  children: [
314
- /* @__PURE__ */ p("div", { className: "h-2 w-3 rounded bg-bg-sunken" }),
315
- /* @__PURE__ */ p("div", { className: "h-2 flex-1 rounded-full bg-bg-sunken" }),
316
- /* @__PURE__ */ p("div", { className: "h-2 w-8 rounded bg-bg-sunken" })
318
+ /* @__PURE__ */ m("div", { className: "h-2 w-3 rounded bg-bg-sunken" }),
319
+ /* @__PURE__ */ m("div", { className: "h-2 flex-1 rounded-full bg-bg-sunken" }),
320
+ /* @__PURE__ */ m("div", { className: "h-2 w-8 rounded bg-bg-sunken" })
317
321
  ]
318
322
  }, t))
319
323
  })]
320
324
  })
321
- }), /* @__PURE__ */ p("div", { className: "h-12 w-32 animate-pulse rounded-lg bg-bg-sunken" })]
325
+ }), /* @__PURE__ */ m("div", { className: "h-12 w-32 animate-pulse rounded-lg bg-bg-sunken" })]
322
326
  }),
323
- /* @__PURE__ */ p("div", {
327
+ /* @__PURE__ */ m("div", {
324
328
  className: "space-y-4",
325
- children: [...[, ,]].map((e, t) => /* @__PURE__ */ m("div", {
329
+ children: [...[, ,]].map((e, t) => /* @__PURE__ */ h("div", {
326
330
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
327
- children: [/* @__PURE__ */ m("div", {
331
+ children: [/* @__PURE__ */ h("div", {
328
332
  className: "mb-3 flex items-start gap-3",
329
- children: [/* @__PURE__ */ p("div", { className: "size-10 rounded-full bg-bg-sunken" }), /* @__PURE__ */ m("div", {
333
+ children: [/* @__PURE__ */ m("div", { className: "size-10 rounded-full bg-bg-sunken" }), /* @__PURE__ */ h("div", {
330
334
  className: "flex-1",
331
- children: [/* @__PURE__ */ p("div", { className: "h-4 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", {
335
+ children: [/* @__PURE__ */ m("div", { className: "h-4 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ h("div", {
332
336
  className: "mt-1 flex items-center gap-2",
333
- children: [/* @__PURE__ */ p("div", {
337
+ children: [/* @__PURE__ */ m("div", {
334
338
  className: "flex gap-0.5",
335
339
  children: [...[
336
340
  ,
@@ -338,26 +342,26 @@ var Te = (e, t) => ({
338
342
  ,
339
343
  ,
340
344
  ,
341
- ]].map((e, t) => /* @__PURE__ */ p("div", { className: "size-3 rounded bg-bg-sunken" }, t))
342
- }), /* @__PURE__ */ p("div", { className: "h-3 w-20 rounded bg-bg-sunken" })]
345
+ ]].map((e, t) => /* @__PURE__ */ m("div", { className: "size-3 rounded bg-bg-sunken" }, t))
346
+ }), /* @__PURE__ */ m("div", { className: "h-3 w-20 rounded bg-bg-sunken" })]
343
347
  })]
344
348
  })]
345
- }), /* @__PURE__ */ m("div", {
349
+ }), /* @__PURE__ */ h("div", {
346
350
  className: "space-y-2",
347
- children: [/* @__PURE__ */ p("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
351
+ children: [/* @__PURE__ */ m("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
348
352
  })]
349
353
  }, t))
350
354
  })
351
355
  ]
352
356
  }),
353
- /* @__PURE__ */ m("section", {
357
+ /* @__PURE__ */ h("section", {
354
358
  className: "mb-8",
355
- children: [/* @__PURE__ */ m("div", {
359
+ children: [/* @__PURE__ */ h("div", {
356
360
  className: "mb-4 flex items-center gap-2",
357
- children: [/* @__PURE__ */ p("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-6 w-48 animate-pulse rounded bg-bg-sunken" })]
358
- }), /* @__PURE__ */ p("div", {
361
+ children: [/* @__PURE__ */ m("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-6 w-48 animate-pulse rounded bg-bg-sunken" })]
362
+ }), /* @__PURE__ */ m("div", {
359
363
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
360
- children: /* @__PURE__ */ p("div", {
364
+ children: /* @__PURE__ */ m("div", {
361
365
  className: "grid gap-4 md:grid-cols-2",
362
366
  children: [...[
363
367
  ,
@@ -366,37 +370,37 @@ var Te = (e, t) => ({
366
370
  ,
367
371
  ,
368
372
  ,
369
- ]].map((e, t) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", { className: "h-3 w-16 rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "mt-1 h-5 w-24 rounded bg-bg-sunken" })] }, t))
373
+ ]].map((e, t) => /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", { className: "h-3 w-16 rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "mt-1 h-5 w-24 rounded bg-bg-sunken" })] }, t))
370
374
  })
371
375
  })]
372
376
  }),
373
- /* @__PURE__ */ m("section", {
377
+ /* @__PURE__ */ h("section", {
374
378
  className: "mb-8",
375
- children: [/* @__PURE__ */ m("div", {
379
+ children: [/* @__PURE__ */ h("div", {
376
380
  className: "mb-4 flex items-center justify-between",
377
- children: [/* @__PURE__ */ m("div", {
381
+ children: [/* @__PURE__ */ h("div", {
378
382
  className: "flex items-center gap-2",
379
- children: [/* @__PURE__ */ p("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
380
- }), /* @__PURE__ */ p("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
381
- }), /* @__PURE__ */ p("div", {
383
+ children: [/* @__PURE__ */ m("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
384
+ }), /* @__PURE__ */ m("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
385
+ }), /* @__PURE__ */ m("div", {
382
386
  className: "grid gap-4 md:grid-cols-4",
383
387
  children: [...[
384
388
  ,
385
389
  ,
386
390
  ,
387
391
  ,
388
- ]].map((e, t) => /* @__PURE__ */ p("div", {
392
+ ]].map((e, t) => /* @__PURE__ */ m("div", {
389
393
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-3",
390
- children: /* @__PURE__ */ m("div", {
394
+ children: /* @__PURE__ */ h("div", {
391
395
  className: "flex items-center gap-3",
392
- children: [/* @__PURE__ */ p("div", { className: "size-14 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ m("div", {
396
+ children: [/* @__PURE__ */ m("div", { className: "size-14 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ h("div", {
393
397
  className: "flex-1",
394
398
  children: [
395
- /* @__PURE__ */ p("div", { className: "h-4 w-24 rounded bg-bg-sunken" }),
396
- /* @__PURE__ */ p("div", { className: "mt-1 h-3 w-16 rounded bg-bg-sunken" }),
397
- /* @__PURE__ */ m("div", {
399
+ /* @__PURE__ */ m("div", { className: "h-4 w-24 rounded bg-bg-sunken" }),
400
+ /* @__PURE__ */ m("div", { className: "mt-1 h-3 w-16 rounded bg-bg-sunken" }),
401
+ /* @__PURE__ */ h("div", {
398
402
  className: "mt-1 flex items-center gap-2",
399
- children: [/* @__PURE__ */ p("div", { className: "h-3 w-8 rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-3 w-12 rounded bg-bg-sunken" })]
403
+ children: [/* @__PURE__ */ m("div", { className: "h-3 w-8 rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-3 w-12 rounded bg-bg-sunken" })]
400
404
  })
401
405
  ]
402
406
  })]
@@ -404,160 +408,166 @@ var Te = (e, t) => ({
404
408
  }, t))
405
409
  })]
406
410
  }),
407
- /* @__PURE__ */ m("section", {
411
+ /* @__PURE__ */ h("section", {
408
412
  className: "mb-8",
409
- children: [/* @__PURE__ */ p("div", { className: "mb-4 h-6 w-36 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", {
413
+ children: [/* @__PURE__ */ m("div", { className: "mb-4 h-6 w-36 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ h("div", {
410
414
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
411
- children: [/* @__PURE__ */ m("div", {
415
+ children: [/* @__PURE__ */ h("div", {
412
416
  className: "flex items-center gap-4",
413
- children: [/* @__PURE__ */ p("div", { className: "size-12 rounded-lg bg-bg-sunken" }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
417
+ children: [/* @__PURE__ */ m("div", { className: "size-12 rounded-lg bg-bg-sunken" }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("div", {
414
418
  className: "flex items-center gap-2",
415
- children: [/* @__PURE__ */ p("div", { className: "h-5 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "size-4 rounded-full bg-bg-sunken" })]
416
- }), /* @__PURE__ */ p("div", { className: "mt-1 h-4 w-40 rounded bg-bg-sunken" })] })]
417
- }), /* @__PURE__ */ m("div", {
419
+ children: [/* @__PURE__ */ m("div", { className: "h-5 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "size-4 rounded-full bg-bg-sunken" })]
420
+ }), /* @__PURE__ */ m("div", { className: "mt-1 h-4 w-40 rounded bg-bg-sunken" })] })]
421
+ }), /* @__PURE__ */ h("div", {
418
422
  className: "mt-3 space-y-2",
419
- children: [/* @__PURE__ */ p("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
423
+ children: [/* @__PURE__ */ m("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
420
424
  })]
421
425
  })]
422
426
  })
423
427
  ]
424
428
  })]
425
- }), ke = ({ error: e, onRetry: t, onBack: n }) => /* @__PURE__ */ p("div", {
426
- className: "flex h-full items-center justify-center",
427
- children: /* @__PURE__ */ m("div", {
428
- className: "text-center",
429
- children: [
430
- /* @__PURE__ */ p(s, { className: "mx-auto mb-4 size-12 text-status-error-text" }),
431
- /* @__PURE__ */ p("h2", {
432
- className: "mb-2 text-xl font-semibold text-text-primary",
433
- children: "Failed to load product"
434
- }),
435
- /* @__PURE__ */ p("p", {
436
- className: "mb-4 text-text-muted",
437
- children: e.message || "An error occurred while loading the product details."
438
- }),
439
- /* @__PURE__ */ m("div", {
440
- className: "flex justify-center gap-3",
441
- children: [/* @__PURE__ */ p("button", {
442
- type: "button",
443
- onClick: t,
444
- className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
445
- children: "Try Again"
446
- }), /* @__PURE__ */ p("button", {
447
- type: "button",
448
- onClick: n,
449
- className: "rounded-lg border border-border-default px-4 py-2 text-text-primary transition-colors hover:bg-bg-sunken",
450
- children: "Go Back"
451
- })]
452
- })
453
- ]
454
- })
455
- }), Ae = () => {
456
- let { productId: s } = he(), d = me(), Ae = pe(), { basePath: g, workspaceId: _ } = e(), { addProduct: je, cartItems: Me, addingToCart: Ne, createOrder: Pe, checkingOut: Fe } = t(), { installations: Ie, refetch: Le } = oe({
457
- filter: de(() => s && _ ? {
458
- productId: s,
459
- workspaceId: _
460
- } : void 0, [s, _]),
429
+ }), ke = ({ error: e, onRetry: t, onBack: n }) => {
430
+ let r = a();
431
+ return /* @__PURE__ */ m("div", {
432
+ className: "flex h-full items-center justify-center",
433
+ children: /* @__PURE__ */ h("div", {
434
+ className: "text-center",
435
+ children: [
436
+ /* @__PURE__ */ m(c, { className: "mx-auto mb-4 size-12 text-status-error-text" }),
437
+ /* @__PURE__ */ m("h2", {
438
+ className: "mb-2 text-xl font-semibold text-text-primary",
439
+ children: r("pages.productDetail.errorTitle", "Failed to load product")
440
+ }),
441
+ /* @__PURE__ */ m("p", {
442
+ className: "mb-4 text-text-muted",
443
+ children: e.message || r("pages.productDetail.errorDescription", "An error occurred while loading the product details.")
444
+ }),
445
+ /* @__PURE__ */ h("div", {
446
+ className: "flex justify-center gap-3",
447
+ children: [/* @__PURE__ */ m("button", {
448
+ type: "button",
449
+ onClick: t,
450
+ className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
451
+ children: r("common.tryAgain", "Try Again")
452
+ }), /* @__PURE__ */ m("button", {
453
+ type: "button",
454
+ onClick: n,
455
+ className: "rounded-lg border border-border-default px-4 py-2 text-text-primary transition-colors hover:bg-bg-sunken",
456
+ children: r("common.goBack", "Go Back")
457
+ })]
458
+ })
459
+ ]
460
+ })
461
+ });
462
+ }, Ae = () => {
463
+ let { productId: c } = he(), f = me(), Ae = pe(), { basePath: _, workspaceId: v } = e(), y = a(), { addProduct: je, cartItems: Me, addingToCart: Ne, createOrder: Pe, checkingOut: Fe } = t(), { installations: Ie, refetch: Le } = oe({
464
+ filter: de(() => c && v ? {
465
+ productId: c,
466
+ workspaceId: v
467
+ } : void 0, [c, v]),
461
468
  limit: 1
462
- }), Re = Ie.find((e) => e.productId === s && e.workspaceId === _ && e.status === "ACTIVE"), v = !!Re, y = Re?.version ?? null, { createReview: ze, loading: Be } = i(), { updateReview: Ve, loading: He } = re(), { deleteReview: Ue, loading: We } = ee(), { markHelpful: Ge, loading: Ke } = te(), b = we(), [x, qe] = o(!1), [S, Je] = o(!1), [Ye, C] = o(!1), [w, Xe] = o(1), [Ze, T] = o(null), [Qe, E] = o(null), [$e, D] = o("success"), [O, k] = o(!1), [A, j] = o(""), [M, et] = o(""), [N, P] = o(5), [tt, nt] = o(null), [rt, it] = o(!1), { data: at, loading: ot, error: st, refetch: F } = ne({
463
- id: s,
464
- slug: s,
469
+ }), Re = Ie.find((e) => e.productId === c && e.workspaceId === v && e.status === "ACTIVE"), b = !!Re, x = Re?.version ?? null, { createReview: ze, loading: Be } = i(), { updateReview: Ve, loading: He } = re(), { deleteReview: Ue, loading: We } = ee(), { markHelpful: Ge, loading: Ke } = te(), S = we(), [C, qe] = s(!1), [Je, Ye] = s(!1), [Xe, Ze] = s(!1), [w, Qe] = s(1), [$e, T] = s(null), [et, E] = s(null), [tt, D] = s("success"), [O, k] = s(!1), [A, j] = s(""), [M, N] = s(""), [P, F] = s(5), [nt, rt] = s(null), [it, at] = s(!1), { data: ot, loading: st, error: ct, refetch: I } = ne({
470
+ id: c,
471
+ slug: c,
465
472
  includeReviews: !0,
466
473
  reviewsLimit: 10,
467
474
  includeRelated: !0,
468
475
  relatedLimit: 4,
469
476
  includeVersions: !0
470
- }), I = at, L = I?.product, R = I?.publisher, z = Me.some((e) => e.productId === L?.id), ct = (e) => {
477
+ }), L = ot, R = L?.product, z = L?.publisher, B = Me.some((e) => e.productId === R?.id), lt = (e) => {
471
478
  let t = e.split(".");
472
479
  for (; t.length < 3;) t.push("0");
473
480
  return t.join(".");
474
- }, lt = L?.manifestVersion ?? null, ut = !!(v && y && lt && ct(y) !== ct(lt)), dt = a(async () => {
475
- if (L) {
476
- if (T(null), z) {
477
- d(`${g}/cart`);
481
+ }, ut = R?.manifestVersion ?? null, dt = !!(b && x && ut && lt(x) !== lt(ut)), ft = o(async () => {
482
+ if (R) {
483
+ if (T(null), B) {
484
+ f(`${_}/cart`);
478
485
  return;
479
486
  }
480
487
  try {
481
- await je(Te(L, R), void 0, w);
488
+ await je(Te(R, z, y), void 0, w);
482
489
  } catch (e) {
483
- console.error("Failed to add product to cart:", e), T("Failed to add this product to cart. Please try again.");
490
+ console.error("Failed to add product to cart:", e), T(y("pages.productDetail.addToCartError", "Failed to add this product to cart. Please try again."));
484
491
  }
485
492
  }
486
493
  }, [
487
- L,
488
494
  R,
489
- je,
490
495
  z,
491
- d,
492
- g,
493
- w
494
- ]), ft = a(async () => {
495
- if (L) {
496
- T(null), C(!0);
496
+ je,
497
+ B,
498
+ f,
499
+ _,
500
+ w,
501
+ y
502
+ ]), pt = o(async () => {
503
+ if (R) {
504
+ T(null), Ze(!0);
497
505
  try {
498
- let e = L.price || 0, t = {
499
- productId: L.id,
500
- name: L.name,
506
+ let e = R.price || 0, t = {
507
+ productId: R.id,
508
+ name: R.name,
501
509
  quantity: w,
502
510
  unitPrice: e,
503
511
  subtotal: e * w,
504
- itemType: L.nature?.toLowerCase() || "digital",
505
- pricingModel: L.pricingModel || "PAID_ONETIME"
512
+ itemType: R.nature?.toLowerCase() || "digital",
513
+ pricingModel: R.pricingModel || "PAID_ONETIME"
506
514
  }, n = await Pe({
507
515
  total: e * w,
508
516
  lineItems: [t],
509
517
  billingAccountId: ""
510
518
  });
511
- n?.id ? d(`/billing/checkout/store/${n.id}${Ae.search}`) : (console.error("Failed to create order"), T("Failed to create order. Please try again."), C(!1));
519
+ n?.id ? f(`/billing/checkout/store/${n.id}${Ae.search}`) : (console.error("Failed to create order"), T(y("pages.productDetail.createOrderError", "Failed to create order. Please try again.")), Ze(!1));
512
520
  } catch (e) {
513
- console.error("Buy Now error:", e), T(e instanceof Error ? e.message : "Failed to start checkout"), C(!1);
521
+ console.error("Buy Now error:", e), T(e instanceof Error ? e.message : y("pages.productDetail.checkoutError", "Failed to start checkout")), Ze(!1);
514
522
  }
515
523
  }
516
524
  }, [
517
- L,
525
+ R,
518
526
  w,
519
527
  Pe,
520
- d
521
- ]), B = a(() => {
522
- L && it(!0);
523
- }, [L]), pt = fe(L);
524
- pt.current = L;
525
- let mt = fe(b);
526
- mt.current = b, ue(() => {
527
- let e = pt.current;
528
- e && mt.current.emit("store.product.viewed", {
528
+ f,
529
+ Ae.search,
530
+ y
531
+ ]), V = o(() => {
532
+ R && at(!0);
533
+ }, [R]), mt = fe(R);
534
+ mt.current = R;
535
+ let ht = fe(S);
536
+ ht.current = S, ue(() => {
537
+ let e = mt.current;
538
+ e && ht.current.emit("store.product.viewed", {
529
539
  productId: e.id,
530
540
  productSlug: e.slug,
531
541
  productType: e.type,
532
542
  pricingModel: e.pricingModel
533
543
  });
534
- }, [L?.id]);
535
- let ht = a((e, t) => {
536
- L && (b.emit("store.product.installed", {
537
- productId: L.id,
544
+ }, [R?.id]);
545
+ let gt = o((e, t) => {
546
+ R && (S.emit("store.product.installed", {
547
+ productId: R.id,
538
548
  workspaceId: e
539
- }), console.log(`Successfully installed ${L.name} to workspace ${t} (${e})`), Le());
549
+ }), console.log(`Successfully installed ${R.name} to workspace ${t} (${e})`), Le());
540
550
  }, [
541
- L,
542
- b,
551
+ R,
552
+ S,
543
553
  Le
544
- ]), gt = a((e) => {
554
+ ]), _t = o((e) => {
545
555
  console.error("Installation failed:", e.message);
546
- }, []), _t = a(() => {
547
- j(I?.userReview?.title ?? ""), et(I?.userReview?.comment ?? ""), P(I?.userReview?.rating ?? 5), E(null), D("success"), k(!0);
548
- }, [I?.userReview]), vt = a(async () => {
549
- if (!L) return;
550
- if (N < 1 || N > 5) {
551
- D("error"), E("Choose a rating from 1 to 5 stars.");
556
+ }, []), vt = o(() => {
557
+ j(L?.userReview?.title ?? ""), N(L?.userReview?.comment ?? ""), F(L?.userReview?.rating ?? 5), E(null), D("success"), k(!0);
558
+ }, [L?.userReview]), yt = o(async () => {
559
+ if (!R) return;
560
+ if (P < 1 || P > 5) {
561
+ D("error"), E(y("pages.productDetail.ratingRequired", "Choose a rating from 1 to 5 stars."));
552
562
  return;
553
563
  }
554
564
  let e = {
555
- productId: L.id,
556
- rating: N,
565
+ productId: R.id,
566
+ rating: P,
557
567
  title: A.trim() || void 0,
558
568
  comment: M.trim() || void 0
559
- }, t = I?.userReview ? {
560
- data: await Ve(I.userReview.id, {
569
+ }, t = L?.userReview ? {
570
+ data: await Ve(L.userReview.id, {
561
571
  rating: e.rating,
562
572
  title: e.title,
563
573
  comment: e.comment
@@ -565,64 +575,66 @@ var Te = (e, t) => ({
565
575
  errorMessage: null
566
576
  } : await ze(e);
567
577
  if (!t?.data) {
568
- D("error"), E(t?.errorMessage ?? "We could not save your review. Please try again.");
578
+ D("error"), E(t?.errorMessage ?? y("pages.productDetail.reviewSaveError", "We could not save your review. Please try again."));
569
579
  return;
570
580
  }
571
- D("success"), E(I?.userReview ? "Your review was updated." : "Your review was submitted."), k(!1), b.emit("store.review.submitted", {
572
- productId: L.id,
573
- rating: N
574
- }), await F();
581
+ D("success"), E(L?.userReview ? y("pages.productDetail.reviewUpdated", "Your review was updated.") : y("pages.productDetail.reviewSubmitted", "Your review was submitted.")), k(!1), S.emit("store.review.submitted", {
582
+ productId: R.id,
583
+ rating: P
584
+ }), await I();
575
585
  }, [
576
- b,
586
+ S,
577
587
  ze,
578
- L,
579
- I?.userReview,
580
- F,
588
+ R,
589
+ L?.userReview,
590
+ I,
581
591
  M,
582
- N,
592
+ P,
583
593
  A,
584
- Ve
585
- ]), yt = a(async () => {
586
- if (I?.userReview && (ce("medium"), await se({
587
- title: "Delete review",
588
- message: "Are you sure you want to remove your review?",
589
- okButtonTitle: "Delete",
590
- cancelButtonTitle: "Cancel"
594
+ Ve,
595
+ y
596
+ ]), bt = o(async () => {
597
+ if (L?.userReview && (ce("medium"), await se({
598
+ title: y("pages.productDetail.deleteReviewTitle", "Delete review"),
599
+ message: y("pages.productDetail.deleteReviewMessage", "Are you sure you want to remove your review?"),
600
+ okButtonTitle: y("common.delete", "Delete"),
601
+ cancelButtonTitle: y("common.cancel", "Cancel")
591
602
  }) !== !1)) {
592
- if (!await Ue(I.userReview.id)) {
593
- D("error"), E("We could not remove your review. Please try again."), le("error");
603
+ if (!await Ue(L.userReview.id)) {
604
+ D("error"), E(y("pages.productDetail.reviewDeleteError", "We could not remove your review. Please try again.")), le("error");
594
605
  return;
595
606
  }
596
- D("success"), E("Your review was removed."), k(!1), j(""), et(""), P(5), le("success"), await F();
607
+ D("success"), E(y("pages.productDetail.reviewRemoved", "Your review was removed.")), k(!1), j(""), N(""), F(5), le("success"), await I();
597
608
  }
598
609
  }, [
599
610
  Ue,
600
- I?.userReview,
601
- F
602
- ]), bt = a(async (e) => {
603
- nt(e), await Ge(e) && await F(), nt(null);
604
- }, [Ge, F]);
605
- if (ot) return /* @__PURE__ */ p(Oe, {});
606
- if (st) return /* @__PURE__ */ p(ke, {
607
- error: st,
608
- onRetry: F,
609
- onBack: () => d(`${g}/marketplace`)
611
+ L?.userReview,
612
+ I,
613
+ y
614
+ ]), xt = o(async (e) => {
615
+ rt(e), await Ge(e) && await I(), rt(null);
616
+ }, [Ge, I]);
617
+ if (st) return /* @__PURE__ */ m(Oe, {});
618
+ if (ct) return /* @__PURE__ */ m(ke, {
619
+ error: ct,
620
+ onRetry: I,
621
+ onBack: () => f(`${_}/marketplace`)
610
622
  });
611
- if (!I?.product) return /* @__PURE__ */ p("div", {
623
+ if (!L?.product) return /* @__PURE__ */ m("div", {
612
624
  className: "flex h-full items-center justify-center p-6",
613
- children: /* @__PURE__ */ p(xe, {
625
+ children: /* @__PURE__ */ m(xe, {
614
626
  illustration: "empty-search",
615
- title: "Product not found",
616
- description: "The product you are looking for does not exist or has been removed.",
617
- action: /* @__PURE__ */ p("button", {
627
+ title: y("pages.productDetail.notFoundTitle", "Product not found"),
628
+ description: y("pages.productDetail.notFoundDetail", "The product you are looking for does not exist or has been removed."),
629
+ action: /* @__PURE__ */ m("button", {
618
630
  type: "button",
619
- onClick: () => d(`${g}/marketplace`),
631
+ onClick: () => f(`${_}/marketplace`),
620
632
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
621
- children: "Back to Marketplace"
633
+ children: y("pages.productDetail.backToMarketplace", "Back to Marketplace")
622
634
  })
623
635
  })
624
636
  });
625
- let { reviews: V, reviewsCount: xt, relatedProducts: H, ratingDistribution: U, isPurchased: W, userEntitlement: G } = I, K = L, q = U ? U.fiveStars + U.fourStars + U.threeStars + U.twoStars + U.oneStar : 0, St = U ? [
637
+ let { reviews: H, reviewsCount: St, relatedProducts: Ct, ratingDistribution: U, isPurchased: W, userEntitlement: G } = L, K = R, q = U ? U.fiveStars + U.fourStars + U.threeStars + U.twoStars + U.oneStar : 0, wt = U ? [
626
638
  {
627
639
  stars: 5,
628
640
  count: U.fiveStars,
@@ -648,178 +660,169 @@ var Te = (e, t) => ({
648
660
  count: U.oneStar,
649
661
  percentage: q > 0 ? U.oneStar / q * 100 : 0
650
662
  }
651
- ] : [], J = K.requiredPermissions || [], Ct = K.integrationDeps || [], wt = () => K.pricingModel === "FREE" ? "Free" : K.pricingModel === "SUBSCRIPTION" ? `${r(K.price, K.currency)}/mo` : r(K.price, K.currency), Y = K.pricingModel === "FREE" || K.price === 0, X = K.nature === "PHYSICAL", Z = X && K.trackInventory === !0, Q = K.stockQuantity ?? 0, $ = Z && Q <= 0;
652
- return /* @__PURE__ */ m("div", {
663
+ ] : [], J = K.requiredPermissions || [], Tt = K.integrationDeps || [], Et = () => K.pricingModel === "FREE" ? y("pages.marketplace.free", "Free") : K.pricingModel === "SUBSCRIPTION" ? y("pages.productDetail.subscriptionPrice", "{{price}}/mo", { price: r(K.price, K.currency) }) : r(K.price, K.currency), Y = K.pricingModel === "FREE" || K.price === 0, X = K.nature === "PHYSICAL", Z = X && K.trackInventory === !0, Q = K.stockQuantity ?? 0, $ = Z && Q <= 0;
664
+ return /* @__PURE__ */ h("div", {
653
665
  className: "h-full overflow-y-auto bg-bg-base",
654
666
  children: [
655
- /* @__PURE__ */ p("div", {
667
+ /* @__PURE__ */ m("div", {
656
668
  className: "bg-bg-surface",
657
- children: /* @__PURE__ */ p("div", {
669
+ children: /* @__PURE__ */ m("div", {
658
670
  className: "mx-auto max-w-7xl",
659
- children: /* @__PURE__ */ m("div", {
671
+ children: /* @__PURE__ */ h("div", {
660
672
  className: "flex flex-col lg:flex-row",
661
- children: [/* @__PURE__ */ m("div", {
673
+ children: [/* @__PURE__ */ h("div", {
662
674
  className: "flex-1 px-6 py-8 lg:max-w-xl lg:py-12",
663
675
  children: [
664
- /* @__PURE__ */ m("button", {
676
+ /* @__PURE__ */ h("button", {
665
677
  type: "button",
666
- onClick: () => d(-1),
678
+ onClick: () => f(-1),
667
679
  className: "mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary",
668
- children: [/* @__PURE__ */ p(ge, { className: "size-4" }), "Back"]
680
+ children: [/* @__PURE__ */ m(ge, { className: "size-4" }), y("common.back", "Back")]
669
681
  }),
670
- /* @__PURE__ */ p("h1", {
682
+ /* @__PURE__ */ m("h1", {
671
683
  className: "mb-3 text-4xl font-normal leading-tight text-text-primary lg:text-5xl",
672
684
  children: K.name
673
685
  }),
674
- v && /* @__PURE__ */ m("div", {
686
+ b && /* @__PURE__ */ h("div", {
675
687
  className: "mb-4 inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-3 py-1 text-sm font-medium text-status-success-text",
676
- children: [
677
- /* @__PURE__ */ p("svg", {
678
- className: "size-3.5",
679
- viewBox: "0 0 16 16",
680
- fill: "none",
681
- stroke: "currentColor",
682
- strokeWidth: "2.5",
683
- strokeLinecap: "round",
684
- strokeLinejoin: "round",
685
- "aria-hidden": "true",
686
- children: /* @__PURE__ */ p("polyline", { points: "2,8 6,12 14,4" })
687
- }),
688
- "Installed",
689
- y ? ` v${y}` : ""
690
- ]
688
+ children: [/* @__PURE__ */ m("svg", {
689
+ className: "size-3.5",
690
+ viewBox: "0 0 16 16",
691
+ fill: "none",
692
+ stroke: "currentColor",
693
+ strokeWidth: "2.5",
694
+ strokeLinecap: "round",
695
+ strokeLinejoin: "round",
696
+ "aria-hidden": "true",
697
+ children: /* @__PURE__ */ m("polyline", { points: "2,8 6,12 14,4" })
698
+ }), x ? y("pages.productDetail.installedVersion", "Installed v{{version}}", { version: x }) : y("pages.productDetail.installed", "Installed")]
691
699
  }),
692
- /* @__PURE__ */ p("div", {
700
+ /* @__PURE__ */ m("div", {
693
701
  className: "mb-2",
694
702
  children: (() => {
695
- let e = R?.developerOrganization, t = e?.name || R?.name || K.authorName || "Unknown Publisher", n = e?.logoUrl || R?.logoUrl, r = e?.isVerified || R?.isVerified, i = R?.websiteUrl;
696
- return /* @__PURE__ */ m("div", {
703
+ let e = z?.developerOrganization, t = e?.name || z?.name || K.authorName || y("common.unknownPublisher", "Unknown Publisher"), n = e?.logoUrl || z?.logoUrl, r = e?.isVerified || z?.isVerified, i = z?.websiteUrl;
704
+ return /* @__PURE__ */ h("div", {
697
705
  className: "flex items-center gap-2",
698
706
  children: [
699
- n && /* @__PURE__ */ p("img", {
707
+ n && /* @__PURE__ */ m("img", {
700
708
  src: n,
701
709
  alt: t,
702
710
  className: "size-5 rounded object-cover"
703
711
  }),
704
- i ? /* @__PURE__ */ p("a", {
712
+ i ? /* @__PURE__ */ m("a", {
705
713
  href: i,
706
714
  target: "_blank",
707
715
  rel: "noreferrer",
708
716
  className: "text-base font-medium text-text-link hover:underline",
709
717
  children: t
710
- }) : /* @__PURE__ */ p("span", {
718
+ }) : /* @__PURE__ */ m("span", {
711
719
  className: "text-base font-medium text-text-primary",
712
720
  children: t
713
721
  }),
714
- r && /* @__PURE__ */ p(l, { className: "size-4 text-status-success-text" })
722
+ r && /* @__PURE__ */ m(u, { className: "size-4 text-status-success-text" })
715
723
  ]
716
724
  });
717
725
  })()
718
726
  }),
719
- /* @__PURE__ */ m("p", {
727
+ /* @__PURE__ */ h("p", {
720
728
  className: "mb-6 text-sm text-text-muted",
721
729
  children: [
722
- K.category && /* @__PURE__ */ p("span", { children: K.category }),
730
+ K.category && /* @__PURE__ */ m("span", { children: K.category }),
723
731
  K.category && " · ",
724
- n(K.downloads),
725
- "+ downloads"
732
+ y("pages.productDetail.downloadsCount", "{{count}}+ downloads", { count: n(K.downloads) })
726
733
  ]
727
734
  }),
728
- /* @__PURE__ */ m(be, {
735
+ /* @__PURE__ */ h(be, {
729
736
  className: "mb-6 p-5",
730
737
  children: [
731
- /* @__PURE__ */ m("div", {
738
+ /* @__PURE__ */ h("div", {
732
739
  className: "mb-6 flex items-center gap-4",
733
740
  children: [
734
- /* @__PURE__ */ p("div", {
741
+ /* @__PURE__ */ m("div", {
735
742
  className: "flex size-12 items-center justify-center overflow-hidden rounded-xl bg-bg-sunken",
736
- children: K.icon ? /* @__PURE__ */ p("img", {
743
+ children: K.icon ? /* @__PURE__ */ m("img", {
737
744
  src: K.icon,
738
745
  alt: "",
739
746
  className: "size-full object-cover"
740
- }) : /* @__PURE__ */ p("span", {
747
+ }) : /* @__PURE__ */ m("span", {
741
748
  className: "text-lg font-bold text-text-muted",
742
749
  children: K.name.charAt(0)
743
750
  })
744
751
  }),
745
- /* @__PURE__ */ m("div", {
752
+ /* @__PURE__ */ h("div", {
746
753
  className: "flex items-center gap-1 border-l border-border-default pl-4",
747
754
  children: [
748
- /* @__PURE__ */ p("span", {
755
+ /* @__PURE__ */ m("span", {
749
756
  className: "text-sm font-medium text-text-primary",
750
757
  children: (K.rating || 0).toFixed(1)
751
758
  }),
752
- /* @__PURE__ */ p(u, { className: "size-4 fill-current text-status-warning-text" }),
759
+ /* @__PURE__ */ m(d, { className: "size-4 fill-current text-status-warning-text" }),
753
760
  /* @__PURE__ */ m("span", {
754
761
  className: "ml-1 text-xs text-text-muted",
755
- children: [n(xt || K.reviewCount), " reviews"]
762
+ children: y("pages.productDetail.reviews_count", "{{count}} reviews", { count: n(St || K.reviewCount) })
756
763
  })
757
764
  ]
758
765
  }),
759
- /* @__PURE__ */ m("div", {
766
+ /* @__PURE__ */ h("div", {
760
767
  className: "border-l border-border-default pl-4",
761
- children: [/* @__PURE__ */ m("span", {
768
+ children: [/* @__PURE__ */ h("span", {
762
769
  className: "text-sm font-medium text-text-primary",
763
770
  children: [n(K.downloads), "+"]
764
- }), /* @__PURE__ */ p("p", {
771
+ }), /* @__PURE__ */ m("p", {
765
772
  className: "text-xs text-text-muted",
766
- children: "Downloads"
773
+ children: y("pages.productDetail.downloadsLabel", "Downloads")
767
774
  })]
768
775
  }),
769
- /* @__PURE__ */ m("div", {
776
+ /* @__PURE__ */ h("div", {
770
777
  className: "border-l border-border-default pl-4",
771
- children: [/* @__PURE__ */ p("span", {
778
+ children: [/* @__PURE__ */ m("span", {
772
779
  className: "rounded bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary",
773
780
  children: K.type
774
- }), /* @__PURE__ */ p("p", {
781
+ }), /* @__PURE__ */ m("p", {
775
782
  className: "mt-0.5 text-xs text-text-muted",
776
- children: "Type"
783
+ children: y("pages.productDetail.typeLabel", "Type")
777
784
  })]
778
785
  })
779
786
  ]
780
787
  }),
781
- Ze && /* @__PURE__ */ p("div", {
788
+ $e && /* @__PURE__ */ m("div", {
782
789
  role: "alert",
783
790
  className: "mb-4 rounded-lg border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
784
- children: Ze
791
+ children: $e
785
792
  }),
786
- X && /* @__PURE__ */ m("div", {
793
+ X && /* @__PURE__ */ h("div", {
787
794
  className: "mb-4 flex flex-wrap items-center gap-4",
788
- children: [Z && ($ ? /* @__PURE__ */ m("span", {
795
+ children: [Z && ($ ? /* @__PURE__ */ h("span", {
789
796
  className: "inline-flex items-center gap-1.5 rounded-full bg-status-error-bg-subtle px-3 py-1 text-sm font-medium text-status-error-text",
790
- children: [/* @__PURE__ */ p(c, { className: "size-4" }), "Out of stock"]
791
- }) : /* @__PURE__ */ m("span", {
797
+ children: [/* @__PURE__ */ m(l, { className: "size-4" }), y("pages.productDetail.outOfStock", "Out of stock")]
798
+ }) : /* @__PURE__ */ h("span", {
792
799
  className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-3 py-1 text-sm font-medium text-status-success-text",
793
- children: [
794
- /* @__PURE__ */ p(c, { className: "size-4" }),
795
- n(Q),
796
- " in stock"
797
- ]
798
- })), !$ && /* @__PURE__ */ m("div", {
800
+ children: [/* @__PURE__ */ m(l, { className: "size-4" }), y("pages.productDetail.inStock", "{{count}} in stock", { count: n(Q) })]
801
+ })), !$ && /* @__PURE__ */ h("div", {
799
802
  className: "flex items-center gap-2",
800
- children: [/* @__PURE__ */ p("span", {
803
+ children: [/* @__PURE__ */ m("span", {
801
804
  className: "text-sm text-text-muted",
802
- children: "Qty"
803
- }), /* @__PURE__ */ m("div", {
805
+ children: y("pages.productDetail.quantity", "Qty")
806
+ }), /* @__PURE__ */ h("div", {
804
807
  className: "flex items-center rounded-full border border-border-default",
805
808
  children: [
806
- /* @__PURE__ */ p("button", {
809
+ /* @__PURE__ */ m("button", {
807
810
  type: "button",
808
- onClick: () => Xe((e) => Math.max(1, e - 1)),
811
+ onClick: () => Qe((e) => Math.max(1, e - 1)),
809
812
  disabled: w <= 1,
810
- "aria-label": "Decrease quantity",
813
+ "aria-label": y("pages.productDetail.decreaseQuantity", "Decrease quantity"),
811
814
  className: "cursor-pointer px-3 py-1.5 text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
812
815
  children: "−"
813
816
  }),
814
- /* @__PURE__ */ p("span", {
817
+ /* @__PURE__ */ m("span", {
815
818
  className: "min-w-8 px-2 text-center text-sm font-medium tabular-nums text-text-primary",
816
819
  children: w
817
820
  }),
818
- /* @__PURE__ */ p("button", {
821
+ /* @__PURE__ */ m("button", {
819
822
  type: "button",
820
- onClick: () => Xe((e) => Z ? Math.min(Q, e + 1) : e + 1),
823
+ onClick: () => Qe((e) => Z ? Math.min(Q, e + 1) : e + 1),
821
824
  disabled: Z && w >= Q,
822
- "aria-label": "Increase quantity",
825
+ "aria-label": y("pages.productDetail.increaseQuantity", "Increase quantity"),
823
826
  className: "cursor-pointer px-3 py-1.5 text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
824
827
  children: "+"
825
828
  })
@@ -827,13 +830,13 @@ var Te = (e, t) => ({
827
830
  })]
828
831
  })]
829
832
  }),
830
- /* @__PURE__ */ m("div", {
833
+ /* @__PURE__ */ h("div", {
831
834
  className: "mb-6 flex items-center gap-3",
832
- children: [v ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
835
+ children: [b ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("button", {
833
836
  type: "button",
834
837
  disabled: !0,
835
838
  className: "flex items-center gap-2 rounded-full bg-status-success-bg-subtle px-8 py-3 font-medium text-status-success-text cursor-default",
836
- children: [/* @__PURE__ */ p("svg", {
839
+ children: [/* @__PURE__ */ m("svg", {
837
840
  className: "size-4",
838
841
  viewBox: "0 0 16 16",
839
842
  fill: "none",
@@ -842,98 +845,93 @@ var Te = (e, t) => ({
842
845
  strokeLinecap: "round",
843
846
  strokeLinejoin: "round",
844
847
  "aria-hidden": "true",
845
- children: /* @__PURE__ */ p("polyline", { points: "2,8 6,12 14,4" })
846
- }), "Installed"]
847
- }), ut && /* @__PURE__ */ m("button", {
848
+ children: /* @__PURE__ */ m("polyline", { points: "2,8 6,12 14,4" })
849
+ }), y("pages.productDetail.installed", "Installed")]
850
+ }), dt && /* @__PURE__ */ m("button", {
848
851
  type: "button",
849
- onClick: B,
852
+ onClick: V,
850
853
  className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
851
- children: ["Update to v", K.manifestVersion]
852
- })] }) : !X && W && !Y ? /* @__PURE__ */ p("button", {
854
+ children: y("pages.productDetail.updateToVersion", "Update to v{{version}}", { version: K.manifestVersion ?? "" })
855
+ })] }) : !X && W && !Y ? /* @__PURE__ */ m("button", {
853
856
  type: "button",
854
- onClick: B,
857
+ onClick: V,
855
858
  className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
856
- children: "Install to Workspace"
857
- }) : !X && Y ? /* @__PURE__ */ p("button", {
859
+ children: y("pages.productDetail.installToWorkspace", "Install to Workspace")
860
+ }) : !X && Y ? /* @__PURE__ */ m("button", {
858
861
  type: "button",
859
- onClick: B,
862
+ onClick: V,
860
863
  className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
861
- children: "Install"
862
- }) : /* @__PURE__ */ p("button", {
864
+ children: y("pages.productDetail.install", "Install")
865
+ }) : /* @__PURE__ */ m("button", {
863
866
  type: "button",
864
- onClick: ft,
865
- disabled: Ye || Fe || $,
867
+ onClick: pt,
868
+ disabled: Xe || Fe || $,
866
869
  className: "cursor-pointer flex items-center gap-2 rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-70",
867
- children: Ye || Fe ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ve, { className: "size-4 animate-spin" }), "Processing…"] }) : $ ? "Out of stock" : `Buy ${wt()}`
868
- }), !Y && (!W || X) && /* @__PURE__ */ m("button", {
870
+ children: Xe || Fe ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(ve, { className: "size-4 animate-spin" }), y("pages.productDetail.processing", "Processing…")] }) : $ ? y("pages.productDetail.outOfStock", "Out of stock") : y("pages.productDetail.buyNow", "Buy {{price}}", { price: Et() })
871
+ }), !Y && (!W || X) && /* @__PURE__ */ h("button", {
869
872
  type: "button",
870
- onClick: dt,
873
+ onClick: ft,
871
874
  disabled: Ne || $,
872
875
  className: "cursor-pointer flex items-center gap-2 rounded-full border border-border-default px-4 py-3 text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
873
- children: [Ne ? /* @__PURE__ */ p(ve, { className: "size-4 animate-spin" }) : z ? /* @__PURE__ */ p(_e, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ p(ye, { className: "size-4" }), z ? "In Cart" : "Add to Cart"]
876
+ children: [Ne ? /* @__PURE__ */ m(ve, { className: "size-4 animate-spin" }) : B ? /* @__PURE__ */ m(_e, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ m(ye, { className: "size-4" }), B ? y("pages.productDetail.inCart", "In Cart") : y("pages.productDetail.addToCart", "Add to Cart")]
874
877
  })]
875
878
  }),
876
- X ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("p", {
879
+ X ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("p", {
877
880
  className: "flex items-center gap-2 text-xs text-text-muted",
878
- children: [/* @__PURE__ */ p(c, { className: "size-4" }), K.requiresShipping === !1 ? "Available for pickup — no shipping required" : "Ships to your delivery address"]
881
+ children: [/* @__PURE__ */ m(l, { className: "size-4" }), K.requiresShipping === !1 ? y("pages.productDetail.pickupAvailable", "Available for pickup — no shipping required") : y("pages.productDetail.shipsToAddress", "Ships to your delivery address")]
879
882
  }), !Y && /* @__PURE__ */ m("p", {
880
883
  className: "text-xs text-text-tertiary",
881
- children: [
882
- "Returns and refunds are handled by ",
883
- R?.name || "the seller",
884
- " per their store policy."
885
- ]
886
- })] }) : /* @__PURE__ */ m(f, { children: [
887
- /* @__PURE__ */ m("p", {
884
+ children: y("pages.productDetail.sellerReturnsPolicy", "Returns and refunds are handled by {{seller}} per their store policy.", { seller: z?.name || y("pages.productDetail.theSeller", "the seller") })
885
+ })] }) : /* @__PURE__ */ h(p, { children: [
886
+ /* @__PURE__ */ h("p", {
888
887
  className: "flex items-center gap-2 text-xs text-text-muted",
889
- children: [/* @__PURE__ */ p(c, { className: "size-4" }), "This app is available for your workspace"]
888
+ children: [/* @__PURE__ */ m(l, { className: "size-4" }), y("pages.productDetail.availableForWorkspace", "This app is available for your workspace")]
890
889
  }),
891
- !Y && !W && /* @__PURE__ */ p("p", {
890
+ !Y && !W && /* @__PURE__ */ m("p", {
892
891
  className: "text-xs text-text-tertiary",
893
- children: "All purchases are final. Digital app orders cannot be cancelled or refunded once completed."
892
+ children: y("pages.productDetail.purchaseFinalNotice", "All purchases are final. Digital app orders cannot be cancelled or refunded once completed.")
894
893
  }),
895
- G && /* @__PURE__ */ m("p", {
894
+ G && /* @__PURE__ */ h("p", {
896
895
  className: "mt-2 flex items-center gap-2 text-xs text-text-muted",
897
896
  children: [
898
- /* @__PURE__ */ p(l, { className: "size-4 text-status-success-text" }),
899
- "License: ",
900
- G.status,
901
- G.expiresAt && ` (Expires: ${new Date(G.expiresAt).toLocaleDateString()})`
897
+ /* @__PURE__ */ m(u, { className: "size-4 text-status-success-text" }),
898
+ y("pages.productDetail.licenseStatus", "License: {{status}}", { status: G.status }),
899
+ G.expiresAt && y("pages.productDetail.licenseExpires", " (Expires: {{date}})", { date: new Date(G.expiresAt).toLocaleDateString() })
902
900
  ]
903
901
  })
904
902
  ] })
905
903
  ]
906
904
  })
907
905
  ]
908
- }), /* @__PURE__ */ p("div", {
906
+ }), /* @__PURE__ */ m("div", {
909
907
  className: "relative flex-1 overflow-hidden bg-bg-sunken lg:min-h-[500px]",
910
- children: K.type === "WORKFLOW" ? /* @__PURE__ */ p("iframe", {
908
+ children: K.type === "WORKFLOW" ? /* @__PURE__ */ m("iframe", {
911
909
  src: `${window.location.origin}/embed/workflow?productId=${encodeURIComponent(K.id)}&cta=false&theme=${document.documentElement.classList.contains("dark") ? "dark" : "light"}`,
912
910
  title: `${K.name} workflow preview`,
913
911
  loading: "lazy",
914
912
  className: "size-full min-h-[300px] border-0 lg:min-h-[500px]"
915
- }) : K.bannerUrl ? /* @__PURE__ */ p("img", {
913
+ }) : K.bannerUrl ? /* @__PURE__ */ m("img", {
916
914
  src: K.bannerUrl,
917
915
  alt: `${K.name} banner`,
918
916
  className: "size-full object-cover"
919
- }) : K.screenshots && K.screenshots.length > 0 ? /* @__PURE__ */ p("img", {
917
+ }) : K.screenshots && K.screenshots.length > 0 ? /* @__PURE__ */ m("img", {
920
918
  src: K.screenshots[0],
921
919
  alt: `${K.name} preview`,
922
920
  className: "size-full object-cover"
923
- }) : /* @__PURE__ */ m("div", {
921
+ }) : /* @__PURE__ */ h("div", {
924
922
  className: "flex h-full min-h-[300px] flex-col items-center justify-center gap-3 p-8 text-center",
925
923
  children: [
926
- /* @__PURE__ */ p("div", {
924
+ /* @__PURE__ */ m("div", {
927
925
  className: "flex size-20 items-center justify-center rounded-2xl bg-bg-surface text-3xl font-bold text-text-muted",
928
926
  children: K.name.charAt(0)
929
927
  }),
930
- /* @__PURE__ */ p("p", {
928
+ /* @__PURE__ */ m("p", {
931
929
  className: "text-sm text-text-muted",
932
- children: "No preview available"
930
+ children: y("pages.productDetail.noPreview", "No preview available")
933
931
  }),
934
- /* @__PURE__ */ p("p", {
932
+ /* @__PURE__ */ m("p", {
935
933
  className: "max-w-[200px] text-xs text-text-muted opacity-60",
936
- children: "Upload screenshots in the Store Listing tab to show a preview here"
934
+ children: y("pages.productDetail.noPreviewHint", "Upload screenshots in the Store Listing tab to show a preview here")
937
935
  })
938
936
  ]
939
937
  })
@@ -941,17 +939,17 @@ var Te = (e, t) => ({
941
939
  })
942
940
  })
943
941
  }),
944
- K.screenshots && K.screenshots.length > 0 && /* @__PURE__ */ p("div", {
942
+ K.screenshots && K.screenshots.length > 0 && /* @__PURE__ */ m("div", {
945
943
  className: "border-y border-border-default bg-bg-base",
946
- children: /* @__PURE__ */ m("div", {
944
+ children: /* @__PURE__ */ h("div", {
947
945
  className: "px-6 py-6",
948
- children: [/* @__PURE__ */ p("h2", {
946
+ children: [/* @__PURE__ */ m("h2", {
949
947
  className: "mb-4 text-sm font-semibold uppercase tracking-wider text-text-muted",
950
- children: "Preview"
951
- }), /* @__PURE__ */ m("div", {
948
+ children: y("pages.productDetail.previewTitle", "Preview")
949
+ }), /* @__PURE__ */ h("div", {
952
950
  className: "flex gap-4 overflow-x-auto pb-2",
953
951
  style: { scrollSnapType: "x mandatory" },
954
- children: [K.screenshots.map((e, t) => /* @__PURE__ */ p("div", {
952
+ children: [K.screenshots.map((e, t) => /* @__PURE__ */ m("div", {
955
953
  className: "relative flex-shrink-0 overflow-hidden rounded-2xl shadow-lg",
956
954
  style: {
957
955
  width: "72vw",
@@ -960,117 +958,113 @@ var Te = (e, t) => ({
960
958
  aspectRatio: "16/9",
961
959
  scrollSnapAlign: "start"
962
960
  },
963
- children: /* @__PURE__ */ p("img", {
961
+ children: /* @__PURE__ */ m("img", {
964
962
  src: e,
965
963
  alt: `Screenshot ${t + 1}`,
966
964
  className: "size-full object-cover"
967
965
  })
968
- }, t)), /* @__PURE__ */ p("div", { className: "flex-shrink-0 w-2" })]
966
+ }, t)), /* @__PURE__ */ m("div", { className: "flex-shrink-0 w-2" })]
969
967
  })]
970
968
  })
971
969
  }),
972
- /* @__PURE__ */ m("main", {
970
+ /* @__PURE__ */ h("main", {
973
971
  className: "mx-auto max-w-7xl px-6 py-8",
974
972
  children: [
975
973
  /* @__PURE__ */ m(Ce, {
976
974
  className: "mb-6",
977
- children: [
978
- "Everything you need to decide whether to install ",
979
- K.name,
980
- ": what it does, screenshots, pricing, the permissions and integrations it needs, and real customer reviews. When you're ready, install it (free apps) or buy it, then add it to a workspace — and leave a review once you've used it."
981
- ]
975
+ children: y("pages.productDetail.pagePurpose", "Everything you need to decide whether to install {{name}}: what it does, screenshots, pricing, the permissions and integrations it needs, and real customer reviews. When you are ready, install it (free apps) or buy it, then add it to a workspace — and leave a review once you have used it.", { name: K.name })
982
976
  }),
983
- /* @__PURE__ */ p(Se, {
977
+ /* @__PURE__ */ m(Se, {
984
978
  className: "mb-8",
985
979
  storageKey: "store-product-detail",
986
980
  steps: [
987
981
  Y ? {
988
982
  id: "install",
989
- label: "Install this app",
990
- description: "It’s free — add it to a workspace in a couple of clicks.",
991
- onClick: B,
992
- done: v
983
+ label: y("pages.productDetail.nextStepInstallLabel", "Install this app"),
984
+ description: y("pages.productDetail.nextStepInstallDescription", "It’s free — add it to a workspace in a couple of clicks."),
985
+ onClick: V,
986
+ done: b
993
987
  } : {
994
988
  id: "buy",
995
- label: W ? "Install to a workspace" : "Buy or add to cart",
996
- description: W ? "You already own this — install it where you need it." : "Purchase now, or add it to your cart to check out later.",
997
- onClick: W ? B : ft,
998
- done: v
989
+ label: W ? y("pages.productDetail.nextStepInstallLabel", "Install to a workspace") : y("pages.productDetail.nextStepBuyLabel", "Buy or add to cart"),
990
+ description: W ? y("pages.productDetail.nextStepOwnedDescription", "You already own this — install it where you need it.") : y("pages.productDetail.nextStepBuyDescription", "Purchase now, or add it to your cart to check out later."),
991
+ onClick: W ? V : pt,
992
+ done: b
999
993
  },
1000
994
  ...J.length > 0 ? [{
1001
995
  id: "permissions",
1002
- label: "Review what it can access",
1003
- description: "Check the permissions this app requires before installing.",
996
+ label: y("pages.productDetail.nextStepPermissionsLabel", "Review what it can access"),
997
+ description: y("pages.productDetail.nextStepPermissionsDescription", "Check the permissions this app requires before installing."),
1004
998
  href: "#about-permissions"
1005
999
  }] : [],
1006
1000
  {
1007
1001
  id: "reviews",
1008
- label: "Read the reviews",
1009
- description: "See what other customers think before committing.",
1002
+ label: y("pages.productDetail.nextStepReviewsLabel", "Read the reviews"),
1003
+ description: y("pages.productDetail.nextStepReviewsDescription", "See what other customers think before committing."),
1010
1004
  href: "#ratings-reviews"
1011
1005
  }
1012
1006
  ]
1013
1007
  }),
1014
- /* @__PURE__ */ m("div", {
1008
+ /* @__PURE__ */ h("div", {
1015
1009
  className: "flex flex-col gap-8 lg:flex-row",
1016
- children: [/* @__PURE__ */ m("div", {
1010
+ children: [/* @__PURE__ */ h("div", {
1017
1011
  className: "flex-1 lg:max-w-3xl",
1018
1012
  children: [
1019
- /* @__PURE__ */ m("section", {
1013
+ /* @__PURE__ */ h("section", {
1020
1014
  className: "mb-8",
1021
1015
  children: [
1022
- /* @__PURE__ */ p("div", {
1016
+ /* @__PURE__ */ m("div", {
1023
1017
  className: "mb-4 flex items-center justify-between text-left",
1024
- children: /* @__PURE__ */ p("h2", {
1018
+ children: /* @__PURE__ */ m("h2", {
1025
1019
  className: "text-lg font-medium text-text-primary",
1026
- children: "About this app"
1020
+ children: y("pages.productDetail.aboutThisApp", "About this app")
1027
1021
  })
1028
1022
  }),
1029
- /* @__PURE__ */ m("div", {
1023
+ /* @__PURE__ */ h("div", {
1030
1024
  className: "text-sm leading-relaxed text-text-secondary",
1031
- children: [/* @__PURE__ */ p("div", {
1032
- className: x ? "" : "line-clamp-4",
1033
- children: /* @__PURE__ */ p(ie, { children: K.longDescription || K.description || "No description available." })
1034
- }), ((K.longDescription || K.description)?.length ?? 0) > 200 && /* @__PURE__ */ p("button", {
1025
+ children: [/* @__PURE__ */ m("div", {
1026
+ className: C ? "" : "line-clamp-4",
1027
+ children: /* @__PURE__ */ m(ie, { children: K.longDescription || K.description || y("pages.productDetail.noDescription", "No description available.") })
1028
+ }), ((K.longDescription || K.description)?.length ?? 0) > 200 && /* @__PURE__ */ m("button", {
1035
1029
  type: "button",
1036
- onClick: () => qe(!x),
1030
+ onClick: () => qe(!C),
1037
1031
  className: "cursor-pointer mt-3 text-sm font-medium text-text-link",
1038
- children: x ? "Show less" : "Show more"
1032
+ children: C ? y("pages.productDetail.showLess", "Show less") : y("pages.productDetail.showMore", "Show more")
1039
1033
  })]
1040
1034
  }),
1041
- K.tags && K.tags.length > 0 && /* @__PURE__ */ p("div", {
1035
+ K.tags && K.tags.length > 0 && /* @__PURE__ */ m("div", {
1042
1036
  className: "mt-4 flex flex-wrap gap-2",
1043
- children: K.tags.map((e) => /* @__PURE__ */ p("span", {
1037
+ children: K.tags.map((e) => /* @__PURE__ */ m("span", {
1044
1038
  className: "rounded-full border border-border-seam px-3 py-1.5 text-xs text-text-muted transition-colors hover:bg-bg-sunken",
1045
1039
  children: e
1046
1040
  }, e))
1047
1041
  })
1048
1042
  ]
1049
1043
  }),
1050
- /* @__PURE__ */ m("section", {
1044
+ /* @__PURE__ */ h("section", {
1051
1045
  id: "ratings-reviews",
1052
1046
  className: "mb-8 scroll-mt-6",
1053
1047
  children: [
1054
- /* @__PURE__ */ p("div", {
1048
+ /* @__PURE__ */ m("div", {
1055
1049
  className: "mb-4 flex items-center justify-between text-left",
1056
- children: /* @__PURE__ */ p("h2", {
1050
+ children: /* @__PURE__ */ m("h2", {
1057
1051
  className: "text-lg font-medium text-text-primary",
1058
- children: "Ratings & Reviews"
1052
+ children: y("pages.productDetail.ratingsAndReviews", "Ratings & Reviews")
1059
1053
  })
1060
1054
  }),
1061
- /* @__PURE__ */ m(h, {
1055
+ /* @__PURE__ */ h(g, {
1062
1056
  treatment: "insight",
1063
1057
  className: "p-5",
1064
- children: [V && V.length > 0 ? /* @__PURE__ */ m("div", {
1058
+ children: [H && H.length > 0 ? /* @__PURE__ */ h("div", {
1065
1059
  className: "flex items-start gap-8",
1066
- children: [/* @__PURE__ */ m("div", {
1060
+ children: [/* @__PURE__ */ h("div", {
1067
1061
  className: "text-center",
1068
1062
  children: [
1069
- /* @__PURE__ */ p("p", {
1063
+ /* @__PURE__ */ m("p", {
1070
1064
  className: "text-5xl font-light tabular-nums text-text-primary",
1071
1065
  children: (K.rating || 0).toFixed(1)
1072
1066
  }),
1073
- /* @__PURE__ */ p("div", {
1067
+ /* @__PURE__ */ m("div", {
1074
1068
  className: "my-2 flex justify-center gap-0.5",
1075
1069
  children: [
1076
1070
  1,
@@ -1078,21 +1072,21 @@ var Te = (e, t) => ({
1078
1072
  3,
1079
1073
  4,
1080
1074
  5
1081
- ].map((e) => /* @__PURE__ */ p(u, { className: `size-4 ${e <= Math.round(K.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
1075
+ ].map((e) => /* @__PURE__ */ m(d, { className: `size-4 ${e <= Math.round(K.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
1082
1076
  }),
1083
1077
  /* @__PURE__ */ m("p", {
1084
1078
  className: "text-sm text-text-muted",
1085
- children: [n(xt || K.reviewCount), " reviews"]
1079
+ children: y("pages.productDetail.reviews_count", "{{count}} reviews", { count: n(St || K.reviewCount) })
1086
1080
  })
1087
1081
  ]
1088
- }), St.length > 0 && /* @__PURE__ */ p("div", {
1082
+ }), wt.length > 0 && /* @__PURE__ */ m("div", {
1089
1083
  className: "flex-1 space-y-1.5",
1090
- children: St.map((e) => /* @__PURE__ */ p(Ee, { ...e }, e.stars))
1084
+ children: wt.map((e) => /* @__PURE__ */ m(Ee, { ...e }, e.stars))
1091
1085
  })]
1092
- }) : /* @__PURE__ */ m("div", {
1086
+ }) : /* @__PURE__ */ h("div", {
1093
1087
  className: "flex flex-col items-center justify-center py-6 text-center",
1094
1088
  children: [
1095
- /* @__PURE__ */ p("div", {
1089
+ /* @__PURE__ */ m("div", {
1096
1090
  className: "mb-3 flex gap-0.5",
1097
1091
  children: [
1098
1092
  1,
@@ -1100,37 +1094,37 @@ var Te = (e, t) => ({
1100
1094
  3,
1101
1095
  4,
1102
1096
  5
1103
- ].map((e) => /* @__PURE__ */ p(u, { className: "size-5 text-border-default" }, e))
1097
+ ].map((e) => /* @__PURE__ */ m(d, { className: "size-5 text-border-default" }, e))
1104
1098
  }),
1105
- /* @__PURE__ */ p("p", {
1099
+ /* @__PURE__ */ m("p", {
1106
1100
  className: "font-medium text-text-primary",
1107
- children: "No reviews yet"
1101
+ children: y("pages.productDetail.noReviews", "No reviews yet")
1108
1102
  }),
1109
- /* @__PURE__ */ p("p", {
1103
+ /* @__PURE__ */ m("p", {
1110
1104
  className: "mt-1 text-sm text-text-muted",
1111
- children: "Be the first to share your experience with this app."
1105
+ children: y("pages.productDetail.beFirstToReview", "Be the first to share your experience with this app.")
1112
1106
  })
1113
1107
  ]
1114
- }), /* @__PURE__ */ m("div", {
1108
+ }), /* @__PURE__ */ h("div", {
1115
1109
  className: "mt-6 border-t border-border-seam pt-4",
1116
- children: [Qe && /* @__PURE__ */ p("p", {
1117
- role: $e === "success" ? "status" : "alert",
1118
- className: `mb-3 rounded-lg px-3 py-2 text-sm ${$e === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
1119
- children: Qe
1120
- }), v || I?.userReview ? /* @__PURE__ */ m("div", {
1110
+ children: [et && /* @__PURE__ */ m("p", {
1111
+ role: tt === "success" ? "status" : "alert",
1112
+ className: `mb-3 rounded-lg px-3 py-2 text-sm ${tt === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
1113
+ children: et
1114
+ }), b || L?.userReview ? /* @__PURE__ */ h("div", {
1121
1115
  className: "space-y-4",
1122
- children: [/* @__PURE__ */ p("button", {
1116
+ children: [/* @__PURE__ */ m("button", {
1123
1117
  type: "button",
1124
- onClick: () => O ? k(!1) : _t(),
1118
+ onClick: () => O ? k(!1) : vt(),
1125
1119
  className: "w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link",
1126
- children: I?.userReview ? O ? "Cancel review editing" : "Edit your review" : O ? "Cancel review" : "Write a Review"
1127
- }), O && /* @__PURE__ */ m("div", {
1120
+ children: L?.userReview ? O ? y("pages.productDetail.cancelReviewEditing", "Cancel review editing") : y("pages.productDetail.editYourReview", "Edit your review") : O ? y("pages.productDetail.cancelReview", "Cancel review") : y("pages.productDetail.writeReview", "Write a Review")
1121
+ }), O && /* @__PURE__ */ h("div", {
1128
1122
  className: "rounded-xl border border-border-seam bg-bg-sunken p-4",
1129
1123
  children: [
1130
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1124
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1131
1125
  className: "text-sm font-medium text-text-primary",
1132
- children: "Your rating"
1133
- }), /* @__PURE__ */ p("div", {
1126
+ children: y("pages.productDetail.yourRatingLabel", "Your rating")
1127
+ }), /* @__PURE__ */ m("div", {
1134
1128
  className: "mt-2 flex flex-wrap gap-2",
1135
1129
  children: [
1136
1130
  1,
@@ -1138,160 +1132,160 @@ var Te = (e, t) => ({
1138
1132
  3,
1139
1133
  4,
1140
1134
  5
1141
- ].map((e) => /* @__PURE__ */ m("button", {
1135
+ ].map((e) => /* @__PURE__ */ h("button", {
1142
1136
  type: "button",
1143
- onClick: () => P(e),
1144
- className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${N === e ? "border-action-primary-border bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface"}`,
1137
+ onClick: () => F(e),
1138
+ className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${P === e ? "border-action-primary-border bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface"}`,
1145
1139
  children: [e, " ★"]
1146
1140
  }, e))
1147
1141
  })] }),
1148
- /* @__PURE__ */ m("label", {
1142
+ /* @__PURE__ */ h("label", {
1149
1143
  className: "mt-4 block text-sm font-medium text-text-primary",
1150
- children: ["Title", /* @__PURE__ */ p("input", {
1151
- "aria-label": "Review title",
1144
+ children: [y("pages.productDetail.reviewTitleLabel", "Title"), /* @__PURE__ */ m("input", {
1145
+ "aria-label": y("pages.productDetail.reviewTitleLabel", "Review title"),
1152
1146
  value: A,
1153
1147
  onChange: (e) => j(e.target.value),
1154
1148
  className: "mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border",
1155
- placeholder: "Summarize your experience"
1149
+ placeholder: y("pages.productDetail.reviewTitlePlaceholder", "Summarize your experience")
1156
1150
  })]
1157
1151
  }),
1158
- /* @__PURE__ */ m("label", {
1152
+ /* @__PURE__ */ h("label", {
1159
1153
  className: "mt-4 block text-sm font-medium text-text-primary",
1160
- children: ["Review", /* @__PURE__ */ p("textarea", {
1161
- "aria-label": "Review body",
1154
+ children: [y("pages.productDetail.reviewBodyLabel", "Review"), /* @__PURE__ */ m("textarea", {
1155
+ "aria-label": y("pages.productDetail.reviewBodyLabel", "Review body"),
1162
1156
  value: M,
1163
- onChange: (e) => et(e.target.value),
1157
+ onChange: (e) => N(e.target.value),
1164
1158
  rows: 4,
1165
1159
  required: !0,
1166
1160
  "aria-required": "true",
1167
1161
  className: "mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border",
1168
- placeholder: "What worked well? What should improve?"
1162
+ placeholder: y("pages.productDetail.reviewBodyPlaceholder", "What worked well? What should improve?")
1169
1163
  })]
1170
1164
  }),
1171
- /* @__PURE__ */ m("div", {
1165
+ /* @__PURE__ */ h("div", {
1172
1166
  className: "mt-4 flex flex-wrap gap-3",
1173
- children: [/* @__PURE__ */ p("button", {
1167
+ children: [/* @__PURE__ */ m("button", {
1174
1168
  type: "button",
1175
- onClick: vt,
1169
+ onClick: yt,
1176
1170
  disabled: Be || He,
1177
1171
  className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
1178
- children: Be || He ? "Saving..." : I?.userReview ? "Update Review" : "Submit Review"
1179
- }), I?.userReview && /* @__PURE__ */ p("button", {
1172
+ children: Be || He ? y("pages.productDetail.savingReview", "Saving...") : L?.userReview ? y("pages.productDetail.updateReview", "Update Review") : y("pages.productDetail.submitReview", "Submit Review")
1173
+ }), L?.userReview && /* @__PURE__ */ m("button", {
1180
1174
  type: "button",
1181
- onClick: yt,
1175
+ onClick: bt,
1182
1176
  disabled: We,
1183
1177
  className: "cursor-pointer rounded-lg border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-60",
1184
- children: We ? "Removing..." : "Delete Review"
1178
+ children: We ? y("pages.productDetail.removingReview", "Removing...") : y("pages.productDetail.deleteReview", "Delete Review")
1185
1179
  })]
1186
1180
  })
1187
1181
  ]
1188
1182
  })]
1189
- }) : /* @__PURE__ */ p("p", {
1183
+ }) : /* @__PURE__ */ m("p", {
1190
1184
  className: "text-center text-sm text-text-muted",
1191
- children: "Install this app to leave a review."
1185
+ children: y("pages.productDetail.installToReview", "Install this app to leave a review.")
1192
1186
  })]
1193
1187
  })]
1194
1188
  }),
1195
- V && V.length > 0 && /* @__PURE__ */ m("div", {
1189
+ H && H.length > 0 && /* @__PURE__ */ h("div", {
1196
1190
  className: "mt-4 space-y-3",
1197
- children: [/* @__PURE__ */ p("ul", {
1191
+ children: [/* @__PURE__ */ m("ul", {
1198
1192
  className: "space-y-3",
1199
- children: (S ? V : V.slice(0, 2)).map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(De, {
1193
+ children: (Je ? H : H.slice(0, 2)).map((e) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ m(De, {
1200
1194
  review: e,
1201
- onMarkHelpful: bt,
1202
- markingHelpful: Ke && tt === e.id
1195
+ onMarkHelpful: xt,
1196
+ markingHelpful: Ke && nt === e.id
1203
1197
  }) }, e.id))
1204
- }), V.length > 2 && /* @__PURE__ */ p("button", {
1198
+ }), H.length > 2 && /* @__PURE__ */ m("button", {
1205
1199
  type: "button",
1206
- onClick: () => Je(!S),
1200
+ onClick: () => Ye(!Je),
1207
1201
  className: "cursor-pointer text-sm font-medium text-text-link",
1208
- children: S ? "Show less" : `Show all ${V.length} reviews`
1202
+ children: Je ? y("pages.productDetail.showLess", "Show less") : y("pages.productDetail.showAllReviews", "Show all {{count}} reviews", { count: H.length })
1209
1203
  })]
1210
1204
  }),
1211
- (!V || V.length === 0) && /* @__PURE__ */ p("p", {
1205
+ (!H || H.length === 0) && /* @__PURE__ */ m("p", {
1212
1206
  className: "mt-4 text-sm text-text-muted",
1213
- children: "No reviews yet. Be the first to review!"
1207
+ children: y("pages.productDetail.beFirstToReviewShort", "No reviews yet. Be the first to review!")
1214
1208
  })
1215
1209
  ]
1216
1210
  }),
1217
- J.length > 0 && /* @__PURE__ */ m("section", {
1211
+ J.length > 0 && /* @__PURE__ */ h("section", {
1218
1212
  id: "about-permissions",
1219
1213
  className: "mb-8 scroll-mt-6",
1220
- children: [/* @__PURE__ */ p("h2", {
1214
+ children: [/* @__PURE__ */ m("h2", {
1221
1215
  className: "mb-4 text-lg font-medium text-text-primary",
1222
- children: "Required Permissions"
1223
- }), /* @__PURE__ */ p("div", {
1216
+ children: y("pages.productDetail.requiredPermissions", "Required Permissions")
1217
+ }), /* @__PURE__ */ m("div", {
1224
1218
  className: "space-y-2",
1225
- children: J.map((e) => /* @__PURE__ */ m("div", {
1219
+ children: J.map((e) => /* @__PURE__ */ h("div", {
1226
1220
  className: "flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3",
1227
- children: [/* @__PURE__ */ p(l, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ p("span", {
1221
+ children: [/* @__PURE__ */ m(u, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ m("span", {
1228
1222
  className: "text-sm text-text-primary",
1229
1223
  children: e
1230
1224
  })]
1231
1225
  }, e))
1232
1226
  })]
1233
1227
  }),
1234
- Ct.length > 0 && /* @__PURE__ */ m("section", {
1228
+ Tt.length > 0 && /* @__PURE__ */ h("section", {
1235
1229
  className: "mb-8",
1236
- children: [/* @__PURE__ */ p("h2", {
1230
+ children: [/* @__PURE__ */ m("h2", {
1237
1231
  className: "mb-4 text-lg font-medium text-text-primary",
1238
- children: "Integrations"
1239
- }), /* @__PURE__ */ p("div", {
1232
+ children: y("pages.productDetail.integrations", "Integrations")
1233
+ }), /* @__PURE__ */ m("div", {
1240
1234
  className: "flex flex-wrap gap-2",
1241
- children: Ct.map((e) => /* @__PURE__ */ p("span", {
1235
+ children: Tt.map((e) => /* @__PURE__ */ m("span", {
1242
1236
  className: "rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
1243
1237
  children: e
1244
1238
  }, e))
1245
1239
  })]
1246
1240
  }),
1247
- /* @__PURE__ */ m("section", {
1241
+ /* @__PURE__ */ h("section", {
1248
1242
  className: "mb-8",
1249
- children: [/* @__PURE__ */ p("h2", {
1243
+ children: [/* @__PURE__ */ m("h2", {
1250
1244
  className: "mb-4 text-lg font-medium text-text-primary",
1251
- children: "Additional Information"
1252
- }), /* @__PURE__ */ m(h, {
1245
+ children: y("pages.productDetail.additionalInformation", "Additional Information")
1246
+ }), /* @__PURE__ */ h(g, {
1253
1247
  treatment: "metric",
1254
1248
  className: "grid grid-cols-2 gap-6 p-5 md:grid-cols-3",
1255
1249
  children: [
1256
- K.manifestVersion && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1250
+ K.manifestVersion && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1257
1251
  className: "text-xs text-text-muted",
1258
- children: "Version"
1259
- }), /* @__PURE__ */ p("p", {
1252
+ children: y("pages.productDetail.versionLabel", "Version")
1253
+ }), /* @__PURE__ */ m("p", {
1260
1254
  className: "mt-1 text-sm font-medium text-text-primary",
1261
1255
  children: K.manifestVersion
1262
1256
  })] }),
1263
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1257
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1264
1258
  className: "text-xs text-text-muted",
1265
- children: "Type"
1266
- }), /* @__PURE__ */ p("p", {
1259
+ children: y("pages.productDetail.typeLabel", "Type")
1260
+ }), /* @__PURE__ */ m("p", {
1267
1261
  className: "mt-1 text-sm font-medium text-text-primary",
1268
1262
  children: K.type
1269
1263
  })] }),
1270
- K.publishedAt && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1264
+ K.publishedAt && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1271
1265
  className: "text-xs text-text-muted",
1272
- children: "Published"
1273
- }), /* @__PURE__ */ p("p", {
1266
+ children: y("pages.productDetail.publishedLabel", "Published")
1267
+ }), /* @__PURE__ */ m("p", {
1274
1268
  className: "mt-1 text-sm font-medium text-text-primary",
1275
1269
  children: new Date(K.publishedAt).toLocaleDateString()
1276
1270
  })] }),
1277
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1271
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1278
1272
  className: "text-xs text-text-muted",
1279
- children: "Updated"
1280
- }), /* @__PURE__ */ p("p", {
1273
+ children: y("pages.productDetail.updatedLabel", "Updated")
1274
+ }), /* @__PURE__ */ m("p", {
1281
1275
  className: "mt-1 text-sm font-medium text-text-primary",
1282
1276
  children: new Date(K.updatedAt).toLocaleDateString()
1283
1277
  })] }),
1284
- K.license && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1278
+ K.license && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1285
1279
  className: "text-xs text-text-muted",
1286
- children: "License"
1287
- }), /* @__PURE__ */ p("p", {
1280
+ children: y("pages.productDetail.licenseLabel", "License")
1281
+ }), /* @__PURE__ */ m("p", {
1288
1282
  className: "mt-1 text-sm font-medium text-text-primary",
1289
1283
  children: K.license
1290
1284
  })] }),
1291
- K.minPlatformVersion && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1285
+ K.minPlatformVersion && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1292
1286
  className: "text-xs text-text-muted",
1293
- children: "Min Platform Version"
1294
- }), /* @__PURE__ */ p("p", {
1287
+ children: y("pages.productDetail.minPlatformVersionLabel", "Min Platform Version")
1288
+ }), /* @__PURE__ */ m("p", {
1295
1289
  className: "mt-1 text-sm font-medium text-text-primary",
1296
1290
  children: K.minPlatformVersion
1297
1291
  })] })
@@ -1299,114 +1293,114 @@ var Te = (e, t) => ({
1299
1293
  })]
1300
1294
  })
1301
1295
  ]
1302
- }), /* @__PURE__ */ m("div", {
1296
+ }), /* @__PURE__ */ h("div", {
1303
1297
  className: "w-full lg:w-80",
1304
1298
  children: [
1305
- (K.documentationUrl || K.repositoryUrl || R?.email) && /* @__PURE__ */ m(h, {
1299
+ (K.documentationUrl || K.repositoryUrl || z?.email) && /* @__PURE__ */ h(g, {
1306
1300
  className: "mb-6 p-4",
1307
- children: [/* @__PURE__ */ p("h3", {
1301
+ children: [/* @__PURE__ */ m("h3", {
1308
1302
  className: "font-medium text-text-primary",
1309
- children: "App support"
1310
- }), /* @__PURE__ */ m("div", {
1303
+ children: y("pages.productDetail.appSupport", "App support")
1304
+ }), /* @__PURE__ */ h("div", {
1311
1305
  className: "mt-3 space-y-2 text-sm",
1312
1306
  children: [
1313
- K.documentationUrl && /* @__PURE__ */ p("a", {
1307
+ K.documentationUrl && /* @__PURE__ */ m("a", {
1314
1308
  href: K.documentationUrl,
1315
1309
  target: "_blank",
1316
1310
  rel: "noreferrer",
1317
1311
  className: "block text-text-link hover:underline",
1318
- children: "Documentation"
1312
+ children: y("pages.productDetail.documentation", "Documentation")
1319
1313
  }),
1320
- K.repositoryUrl && /* @__PURE__ */ p("a", {
1314
+ K.repositoryUrl && /* @__PURE__ */ m("a", {
1321
1315
  href: K.repositoryUrl,
1322
1316
  target: "_blank",
1323
1317
  rel: "noreferrer",
1324
1318
  className: "block text-text-link hover:underline",
1325
- children: "Source repository"
1319
+ children: y("pages.productDetail.sourceRepository", "Source repository")
1326
1320
  }),
1327
- R?.email && /* @__PURE__ */ p("a", {
1328
- href: `mailto:${R.email}`,
1321
+ z?.email && /* @__PURE__ */ m("a", {
1322
+ href: `mailto:${z.email}`,
1329
1323
  className: "block text-text-link hover:underline",
1330
- children: "Contact publisher"
1324
+ children: y("pages.productDetail.contactPublisher", "Contact publisher")
1331
1325
  })
1332
1326
  ]
1333
1327
  })]
1334
1328
  }),
1335
- R && /* @__PURE__ */ p(h, {
1329
+ z && /* @__PURE__ */ m(g, {
1336
1330
  className: "mb-6 p-4",
1337
1331
  children: (() => {
1338
- let e = R.developerOrganization, t = e?.name || R.name, n = e?.logoUrl || R.logoUrl, r = e?.description || R.bio, i = e?.isVerified || R.isVerified;
1339
- return /* @__PURE__ */ m(f, { children: [
1340
- /* @__PURE__ */ m("div", {
1332
+ let e = z.developerOrganization, t = e?.name || z.name, n = e?.logoUrl || z.logoUrl, r = e?.description || z.bio, i = e?.isVerified || z.isVerified;
1333
+ return /* @__PURE__ */ h(p, { children: [
1334
+ /* @__PURE__ */ h("div", {
1341
1335
  className: "flex items-center gap-2.5",
1342
- children: [n ? /* @__PURE__ */ p("img", {
1336
+ children: [n ? /* @__PURE__ */ m("img", {
1343
1337
  src: n,
1344
1338
  alt: t,
1345
1339
  className: "size-8 rounded-lg object-cover"
1346
- }) : /* @__PURE__ */ p("div", {
1340
+ }) : /* @__PURE__ */ m("div", {
1347
1341
  className: "flex size-8 items-center justify-center rounded-lg bg-bg-sunken text-sm font-bold text-text-muted",
1348
1342
  children: t.charAt(0)
1349
- }), /* @__PURE__ */ p("div", {
1343
+ }), /* @__PURE__ */ m("div", {
1350
1344
  className: "flex-1 min-w-0",
1351
- children: /* @__PURE__ */ m("div", {
1345
+ children: /* @__PURE__ */ h("div", {
1352
1346
  className: "flex items-center gap-1.5",
1353
- children: [/* @__PURE__ */ p("span", {
1347
+ children: [/* @__PURE__ */ m("span", {
1354
1348
  className: "font-medium text-text-primary truncate",
1355
1349
  children: t
1356
- }), i && /* @__PURE__ */ p(l, { className: "size-3.5 text-status-success-text shrink-0" })]
1350
+ }), i && /* @__PURE__ */ m(u, { className: "size-3.5 text-status-success-text shrink-0" })]
1357
1351
  })
1358
1352
  })]
1359
1353
  }),
1360
- r && /* @__PURE__ */ p("p", {
1354
+ r && /* @__PURE__ */ m("p", {
1361
1355
  className: "mt-2 text-sm text-text-muted",
1362
1356
  children: r
1363
1357
  }),
1364
- R.websiteUrl && /* @__PURE__ */ p("a", {
1365
- href: R.websiteUrl,
1358
+ z.websiteUrl && /* @__PURE__ */ m("a", {
1359
+ href: z.websiteUrl,
1366
1360
  target: "_blank",
1367
1361
  rel: "noreferrer",
1368
1362
  className: "mt-3 inline-block text-sm text-text-link hover:underline",
1369
- children: "Visit website"
1363
+ children: y("pages.productDetail.visitWebsite", "Visit website")
1370
1364
  })
1371
1365
  ] });
1372
1366
  })()
1373
1367
  }),
1374
- H && H.length > 0 && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
1368
+ Ct && Ct.length > 0 && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
1375
1369
  className: "mb-4 flex items-center justify-between text-left",
1376
- children: /* @__PURE__ */ p("span", {
1370
+ children: /* @__PURE__ */ m("span", {
1377
1371
  className: "font-medium text-text-primary",
1378
- children: "Similar apps"
1372
+ children: y("pages.productDetail.similarApps", "Similar apps")
1379
1373
  })
1380
- }), /* @__PURE__ */ p("div", {
1374
+ }), /* @__PURE__ */ m("div", {
1381
1375
  className: "space-y-3",
1382
- children: H.slice(0, 4).map((e) => /* @__PURE__ */ m("button", {
1376
+ children: Ct.slice(0, 4).map((e) => /* @__PURE__ */ h("button", {
1383
1377
  type: "button",
1384
- onClick: () => d(`${g}/marketplace/product/${e.id}`),
1378
+ onClick: () => f(`${_}/marketplace/product/${e.id}`),
1385
1379
  className: "flex w-full cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-bg-sunken",
1386
- children: [e.icon ? /* @__PURE__ */ p("img", {
1380
+ children: [e.icon ? /* @__PURE__ */ m("img", {
1387
1381
  src: e.icon,
1388
1382
  alt: e.name,
1389
1383
  className: "size-12 rounded-xl object-cover"
1390
- }) : /* @__PURE__ */ p("div", {
1384
+ }) : /* @__PURE__ */ m("div", {
1391
1385
  className: "flex size-12 items-center justify-center rounded-xl bg-bg-sunken text-lg font-bold text-text-muted",
1392
1386
  children: e.name.charAt(0)
1393
- }), /* @__PURE__ */ m("div", {
1387
+ }), /* @__PURE__ */ h("div", {
1394
1388
  className: "flex-1 overflow-hidden",
1395
1389
  children: [
1396
- /* @__PURE__ */ p("p", {
1390
+ /* @__PURE__ */ m("p", {
1397
1391
  className: "truncate text-sm font-medium text-text-primary",
1398
1392
  children: e.name
1399
1393
  }),
1400
- /* @__PURE__ */ p("p", {
1394
+ /* @__PURE__ */ m("p", {
1401
1395
  className: "text-xs text-text-muted",
1402
- children: R?.name || "Unknown"
1396
+ children: z?.name || y("common.unknown", "Unknown")
1403
1397
  }),
1404
- (e.reviewCount ?? 0) > 0 && /* @__PURE__ */ m("div", {
1398
+ (e.reviewCount ?? 0) > 0 && /* @__PURE__ */ h("div", {
1405
1399
  className: "flex items-center gap-1",
1406
- children: [/* @__PURE__ */ p("span", {
1400
+ children: [/* @__PURE__ */ m("span", {
1407
1401
  className: "text-xs text-text-muted",
1408
1402
  children: (e.rating || 0).toFixed(1)
1409
- }), /* @__PURE__ */ p(u, { className: "size-3 fill-current text-status-warning-text" })]
1403
+ }), /* @__PURE__ */ m(d, { className: "size-3 fill-current text-status-warning-text" })]
1410
1404
  })
1411
1405
  ]
1412
1406
  })]
@@ -1417,9 +1411,9 @@ var Te = (e, t) => ({
1417
1411
  })
1418
1412
  ]
1419
1413
  }),
1420
- K && /* @__PURE__ */ p(ae, {
1421
- isOpen: rt,
1422
- onClose: () => it(!1),
1414
+ K && /* @__PURE__ */ m(ae, {
1415
+ isOpen: it,
1416
+ onClose: () => at(!1),
1423
1417
  app: {
1424
1418
  id: K.id,
1425
1419
  applicationId: K.productId,
@@ -1431,8 +1425,8 @@ var Te = (e, t) => ({
1431
1425
  permissions: J.length > 0 ? J : void 0
1432
1426
  },
1433
1427
  purchaseState: W && !Y ? "purchased" : "free",
1434
- onInstallSuccess: ht,
1435
- onInstallError: gt
1428
+ onInstallSuccess: gt,
1429
+ onInstallError: _t
1436
1430
  })
1437
1431
  ]
1438
1432
  });