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