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