@burdenoff/microfe-hookmovies 2026.720.2 → 2026.726.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hookmovies/hooks/useHookMoviesApi.d.ts +2 -0
- package/dist/hookmovies/hooks/useHookMoviesApi.d.ts.map +1 -1
- package/dist/hookmovies/hooks/useHookMoviesApi.js +17 -3
- package/dist/hookmovies/hooks/useHookMoviesApi.js.map +1 -1
- package/dist/hookmovies/pages/catalog/TitleDetailPage.d.ts.map +1 -1
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js +561 -533
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js.map +1 -1
- package/dist/hookmovies/pages/consumer/PlayerPage.d.ts.map +1 -1
- package/dist/hookmovies/pages/consumer/PlayerPage.js +1 -1
- package/dist/hookmovies/pages/consumer/PlayerPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,12 +10,12 @@ import { ErrorState as ue, LoadingState as de } from "../../components/StateView
|
|
|
10
10
|
import { Pagination as fe } from "../../components/Pagination.js";
|
|
11
11
|
import { RatingDisplay as pe } from "../../components/RatingDisplay.js";
|
|
12
12
|
import { useRef as me, useState as h } from "react";
|
|
13
|
-
import { Archive as he, ArrowLeft as ge, Calendar as g, CheckCircle2 as _e, Clapperboard as _, Clock as ve, Film as v, Globe as ye, Image as y, Languages as be, Layers as xe, Loader2 as b, Lock as Se, Pencil as Ce, Play as we, Plus as x, ShieldCheck as Te, Sparkles as Ee, Star as De, Trash2 as
|
|
14
|
-
import { useParams as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { GlassCard as
|
|
13
|
+
import { Archive as he, ArrowLeft as ge, Calendar as g, CheckCircle2 as _e, Clapperboard as _, Clock as ve, Film as v, Globe as ye, Image as y, Languages as be, Layers as xe, Loader2 as b, Lock as Se, Pencil as Ce, Play as we, Plus as x, ShieldCheck as Te, Sparkles as Ee, Star as De, Trash2 as Oe, Upload as ke, UserPlus as Ae, Users as je, Video as Me, X as Ne } from "lucide-react";
|
|
14
|
+
import { useParams as Pe } from "react-router-dom";
|
|
15
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
16
|
+
import { GlassCard as T } from "@burdenoff/fe-libs/ui";
|
|
17
17
|
//#region src/hookmovies/pages/catalog/TitleDetailPage.tsx
|
|
18
|
-
var
|
|
18
|
+
var Fe = {
|
|
19
19
|
DRAFT: ["IN_REVIEW"],
|
|
20
20
|
IN_REVIEW: [
|
|
21
21
|
"SCHEDULED",
|
|
@@ -26,7 +26,7 @@ var Pe = {
|
|
|
26
26
|
PUBLISHED: ["UNPUBLISHED"],
|
|
27
27
|
UNPUBLISHED: ["PUBLISHED"],
|
|
28
28
|
ARCHIVED: []
|
|
29
|
-
},
|
|
29
|
+
}, Ie = [
|
|
30
30
|
"MOVIE",
|
|
31
31
|
"SERIES",
|
|
32
32
|
"SHORT_FILM",
|
|
@@ -38,7 +38,7 @@ var Pe = {
|
|
|
38
38
|
"TRAILER",
|
|
39
39
|
"COLLECTION",
|
|
40
40
|
"FAST_CHANNEL"
|
|
41
|
-
],
|
|
41
|
+
], Le = [
|
|
42
42
|
"ACTOR",
|
|
43
43
|
"DIRECTOR",
|
|
44
44
|
"WRITER",
|
|
@@ -48,7 +48,7 @@ var Pe = {
|
|
|
48
48
|
"COMPOSER",
|
|
49
49
|
"VOICE_ACTOR",
|
|
50
50
|
"CREW"
|
|
51
|
-
],
|
|
51
|
+
], E = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", D = "mb-1.5 block text-xs font-medium text-text-secondary", Re = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), ze = (e) => e.trim() ? new Date(e).toISOString() : void 0, Be = (e) => `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`, Ve = [
|
|
52
52
|
{
|
|
53
53
|
field: "posterFileId",
|
|
54
54
|
label: "Poster",
|
|
@@ -85,7 +85,7 @@ var Pe = {
|
|
|
85
85
|
icon: _,
|
|
86
86
|
hint: "Full-length feature master."
|
|
87
87
|
}
|
|
88
|
-
],
|
|
88
|
+
], He = ({ titleId: e, config: n, currentFileId: r }) => {
|
|
89
89
|
let i = oe(), a = p(r), o = me(null), [s, c] = h(!1), [l, u] = h(null), d = n.icon, ee = async (t) => {
|
|
90
90
|
let r = t.target.files?.[0];
|
|
91
91
|
if (t.target.value = "", r) {
|
|
@@ -116,81 +116,81 @@ var Pe = {
|
|
|
116
116
|
c(!1);
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ w("div", {
|
|
120
120
|
className: "rounded-xl border border-border-seam bg-bg-surface p-4",
|
|
121
121
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ w("div", {
|
|
123
123
|
className: "mb-3 flex items-center justify-between gap-2",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ w("div", {
|
|
125
125
|
className: "flex items-center gap-2",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ C(d, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ C("h3", {
|
|
127
127
|
className: "text-sm font-medium text-text-primary",
|
|
128
128
|
children: n.label
|
|
129
129
|
})]
|
|
130
|
-
}), r && /* @__PURE__ */
|
|
130
|
+
}), r && /* @__PURE__ */ C("span", {
|
|
131
131
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-[10px] font-medium text-status-success-text",
|
|
132
132
|
children: "Set"
|
|
133
133
|
})]
|
|
134
134
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ C("div", {
|
|
136
136
|
className: t("relative flex items-center justify-center overflow-hidden rounded-lg border border-border-subtle bg-bg-sunken", n.kind === "image" ? "aspect-[3/4]" : "aspect-video"),
|
|
137
|
-
children: s ? /* @__PURE__ */
|
|
137
|
+
children: s ? /* @__PURE__ */ w("div", {
|
|
138
138
|
className: "flex flex-col items-center gap-2 text-text-secondary",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ C(b, { className: "h-6 w-6 animate-spin" }), /* @__PURE__ */ C("span", {
|
|
140
140
|
className: "text-xs",
|
|
141
141
|
children: "Uploading…"
|
|
142
142
|
})]
|
|
143
|
-
}) : r ? a.isLoading ? /* @__PURE__ */
|
|
143
|
+
}) : r ? a.isLoading ? /* @__PURE__ */ C(b, { className: "h-6 w-6 animate-spin text-text-secondary" }) : a.data ? n.kind === "image" ? /* @__PURE__ */ C("img", {
|
|
144
144
|
src: a.data,
|
|
145
145
|
alt: `${n.label} artwork`,
|
|
146
146
|
className: "h-full w-full object-cover"
|
|
147
|
-
}) : /* @__PURE__ */
|
|
147
|
+
}) : /* @__PURE__ */ C("video", {
|
|
148
148
|
src: a.data,
|
|
149
149
|
controls: !0,
|
|
150
150
|
preload: "metadata",
|
|
151
151
|
className: "h-full w-full bg-bg-canvas object-contain",
|
|
152
|
-
children: /* @__PURE__ */
|
|
153
|
-
}) : /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ C("track", { kind: "captions" })
|
|
153
|
+
}) : /* @__PURE__ */ w("div", {
|
|
154
154
|
className: "flex flex-col items-center gap-1 text-text-secondary",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ C(d, { className: "h-6 w-6" }), /* @__PURE__ */ C("span", {
|
|
156
156
|
className: "text-xs",
|
|
157
157
|
children: "Preview unavailable"
|
|
158
158
|
})]
|
|
159
|
-
}) : /* @__PURE__ */
|
|
159
|
+
}) : /* @__PURE__ */ w("button", {
|
|
160
160
|
type: "button",
|
|
161
161
|
onClick: () => o.current?.click(),
|
|
162
162
|
className: "flex h-full w-full flex-col items-center justify-center gap-2 text-text-secondary transition-colors hover:text-text-primary",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ C(ke, { className: "h-6 w-6" }), /* @__PURE__ */ w("span", {
|
|
164
164
|
className: "text-xs",
|
|
165
165
|
children: ["Upload ", n.label.toLowerCase()]
|
|
166
166
|
})]
|
|
167
167
|
})
|
|
168
168
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ C("p", {
|
|
170
170
|
className: "mt-2 text-[11px] text-text-secondary",
|
|
171
171
|
children: n.hint
|
|
172
172
|
}),
|
|
173
|
-
l && /* @__PURE__ */
|
|
173
|
+
l && /* @__PURE__ */ C("p", {
|
|
174
174
|
className: "mt-2 text-xs text-status-error-text",
|
|
175
175
|
children: l
|
|
176
176
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ w("div", {
|
|
178
178
|
className: "mt-3 flex items-center gap-2",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ w("button", {
|
|
180
180
|
type: "button",
|
|
181
181
|
disabled: s,
|
|
182
182
|
onClick: () => o.current?.click(),
|
|
183
183
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
185
|
-
}), r && /* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ C(ke, { className: "h-3.5 w-3.5" }), r ? "Replace" : "Upload"]
|
|
185
|
+
}), r && /* @__PURE__ */ w("button", {
|
|
186
186
|
type: "button",
|
|
187
187
|
disabled: s,
|
|
188
188
|
onClick: () => void te(),
|
|
189
189
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-status-error-border px-2.5 py-1 text-xs font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-50",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ C(Oe, { className: "h-3.5 w-3.5" }), "Remove"]
|
|
191
191
|
})]
|
|
192
192
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ C("input", {
|
|
194
194
|
ref: o,
|
|
195
195
|
type: "file",
|
|
196
196
|
accept: n.accept,
|
|
@@ -200,99 +200,99 @@ var Pe = {
|
|
|
200
200
|
})
|
|
201
201
|
]
|
|
202
202
|
});
|
|
203
|
-
},
|
|
203
|
+
}, Ue = ({ clip: e, onDelete: t, deleting: n }) => {
|
|
204
204
|
let r = p(e.posterFileId), i = p(e.posterFileId ? void 0 : e.videoFileId);
|
|
205
|
-
return /* @__PURE__ */
|
|
205
|
+
return /* @__PURE__ */ w("div", {
|
|
206
206
|
className: "flex flex-col overflow-hidden rounded-xl border border-border-seam bg-bg-surface",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ w("div", {
|
|
208
208
|
className: "relative aspect-[9/16] w-full overflow-hidden bg-bg-sunken",
|
|
209
|
-
children: [e.posterFileId ? r.isLoading ? /* @__PURE__ */
|
|
209
|
+
children: [e.posterFileId ? r.isLoading ? /* @__PURE__ */ C("div", {
|
|
210
210
|
className: "flex h-full w-full items-center justify-center",
|
|
211
|
-
children: /* @__PURE__ */
|
|
212
|
-
}) : r.data ? /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ C(b, { className: "h-5 w-5 animate-spin text-text-secondary" })
|
|
212
|
+
}) : r.data ? /* @__PURE__ */ C("img", {
|
|
213
213
|
src: r.data,
|
|
214
214
|
alt: e.caption ?? "Clip poster",
|
|
215
215
|
className: "h-full w-full object-cover"
|
|
216
|
-
}) : /* @__PURE__ */
|
|
216
|
+
}) : /* @__PURE__ */ C("div", {
|
|
217
217
|
className: "flex h-full w-full items-center justify-center text-text-secondary",
|
|
218
|
-
children: /* @__PURE__ */
|
|
219
|
-
}) : i.isLoading ? /* @__PURE__ */
|
|
218
|
+
children: /* @__PURE__ */ C(v, { className: "h-6 w-6" })
|
|
219
|
+
}) : i.isLoading ? /* @__PURE__ */ C("div", {
|
|
220
220
|
className: "flex h-full w-full items-center justify-center",
|
|
221
|
-
children: /* @__PURE__ */
|
|
222
|
-
}) : i.data ? /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ C(b, { className: "h-5 w-5 animate-spin text-text-secondary" })
|
|
222
|
+
}) : i.data ? /* @__PURE__ */ C("video", {
|
|
223
223
|
src: i.data,
|
|
224
224
|
controls: !0,
|
|
225
225
|
preload: "metadata",
|
|
226
226
|
className: "h-full w-full bg-bg-canvas object-contain",
|
|
227
|
-
children: /* @__PURE__ */
|
|
228
|
-
}) : /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ C("track", { kind: "captions" })
|
|
228
|
+
}) : /* @__PURE__ */ C("div", {
|
|
229
229
|
className: "flex h-full w-full items-center justify-center text-text-secondary",
|
|
230
|
-
children: /* @__PURE__ */
|
|
231
|
-
}), e.durationSeconds != null && /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ C(v, { className: "h-6 w-6" })
|
|
231
|
+
}), e.durationSeconds != null && /* @__PURE__ */ C("span", {
|
|
232
232
|
className: "absolute bottom-2 right-2 rounded bg-bg-canvas/80 px-1.5 py-0.5 text-[10px] font-medium text-text-primary",
|
|
233
|
-
children:
|
|
233
|
+
children: Be(e.durationSeconds)
|
|
234
234
|
})]
|
|
235
|
-
}), /* @__PURE__ */
|
|
235
|
+
}), /* @__PURE__ */ w("div", {
|
|
236
236
|
className: "flex flex-1 flex-col gap-2 p-3",
|
|
237
237
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ C("p", {
|
|
239
239
|
className: "line-clamp-2 text-sm text-text-primary",
|
|
240
240
|
children: e.caption ?? "Untitled clip"
|
|
241
241
|
}),
|
|
242
|
-
e.language && /* @__PURE__ */
|
|
242
|
+
e.language && /* @__PURE__ */ C("span", {
|
|
243
243
|
className: "w-fit rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] uppercase tracking-wide text-text-secondary",
|
|
244
244
|
children: e.language
|
|
245
245
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ w("button", {
|
|
247
247
|
type: "button",
|
|
248
248
|
disabled: n,
|
|
249
249
|
onClick: () => t(e),
|
|
250
250
|
className: "mt-auto inline-flex items-center justify-center gap-1.5 rounded-lg border border-status-error-border px-2.5 py-1 text-xs font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-50",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ C(Oe, { className: "h-3.5 w-3.5" }), n ? "Deleting…" : "Delete"]
|
|
252
252
|
})
|
|
253
253
|
]
|
|
254
254
|
})]
|
|
255
255
|
});
|
|
256
|
-
},
|
|
256
|
+
}, O = ({ icon: e, title: t, count: n, actions: r }) => /* @__PURE__ */ w("div", {
|
|
257
257
|
className: "mb-4 flex flex-wrap items-center justify-between gap-3",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
259
259
|
className: "flex items-center gap-2.5 text-sm font-semibold text-text-primary",
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ C("span", {
|
|
262
262
|
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
263
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ C(e, { className: "h-4 w-4" })
|
|
264
264
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
n !== void 0 && /* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ C("span", { children: t }),
|
|
266
|
+
n !== void 0 && /* @__PURE__ */ C("span", {
|
|
267
267
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
268
268
|
children: n
|
|
269
269
|
})
|
|
270
270
|
]
|
|
271
|
-
}), r && /* @__PURE__ */
|
|
271
|
+
}), r && /* @__PURE__ */ C("div", {
|
|
272
272
|
className: "flex flex-wrap items-center gap-2",
|
|
273
273
|
children: r
|
|
274
274
|
})]
|
|
275
|
-
}),
|
|
275
|
+
}), k = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || "?", We = ({ credit: e }) => {
|
|
276
276
|
let t = e.person?.name ?? "Unknown person";
|
|
277
|
-
return /* @__PURE__ */
|
|
277
|
+
return /* @__PURE__ */ w("div", {
|
|
278
278
|
className: "flex flex-col items-center gap-2 rounded-xl border border-border-seam bg-bg-surface p-3 text-center transition-colors hover:border-border-strong",
|
|
279
279
|
children: [
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ C("span", {
|
|
281
281
|
className: "flex h-14 w-14 items-center justify-center rounded-full bg-bg-sunken text-sm font-semibold text-text-secondary",
|
|
282
282
|
"aria-hidden": "true",
|
|
283
|
-
children:
|
|
283
|
+
children: k(t)
|
|
284
284
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ w("div", {
|
|
286
286
|
className: "w-full min-w-0",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ C("p", {
|
|
288
288
|
className: "truncate text-sm font-medium text-text-primary",
|
|
289
289
|
children: t
|
|
290
|
-
}), e.characterName && /* @__PURE__ */
|
|
290
|
+
}), e.characterName && /* @__PURE__ */ w("p", {
|
|
291
291
|
className: "truncate text-xs text-text-secondary",
|
|
292
292
|
children: ["as ", e.characterName]
|
|
293
293
|
})]
|
|
294
294
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ C("span", {
|
|
296
296
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-text-secondary",
|
|
297
297
|
children: m(e.role)
|
|
298
298
|
})
|
|
@@ -318,68 +318,68 @@ var Pe = {
|
|
|
318
318
|
}), e.certification && r.push({
|
|
319
319
|
icon: Te,
|
|
320
320
|
label: e.certification
|
|
321
|
-
}), /* @__PURE__ */ T
|
|
321
|
+
}), /* @__PURE__ */ w(T, {
|
|
322
322
|
treatment: "insight",
|
|
323
323
|
className: "mb-6 overflow-hidden border-border-seam p-0",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ w("div", {
|
|
325
325
|
className: "relative h-28 w-full overflow-hidden bg-bg-sunken sm:h-40 lg:h-48",
|
|
326
|
-
children: [t.isLoading ? /* @__PURE__ */
|
|
326
|
+
children: [t.isLoading ? /* @__PURE__ */ C("div", {
|
|
327
327
|
className: "flex h-full w-full items-center justify-center",
|
|
328
|
-
children: /* @__PURE__ */
|
|
329
|
-
}) : t.data ? /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ C(b, { className: "h-5 w-5 animate-spin text-text-secondary" })
|
|
329
|
+
}) : t.data ? /* @__PURE__ */ C("img", {
|
|
330
330
|
src: t.data,
|
|
331
331
|
alt: "",
|
|
332
332
|
className: "h-full w-full object-cover"
|
|
333
|
-
}) : /* @__PURE__ */
|
|
334
|
-
}), /* @__PURE__ */
|
|
333
|
+
}) : /* @__PURE__ */ C("div", { className: "h-full w-full bg-hero-mesh" }), /* @__PURE__ */ C("div", { className: "absolute inset-0 bg-gradient-to-t from-bg-surface via-bg-surface/70 to-transparent" })]
|
|
334
|
+
}), /* @__PURE__ */ w("div", {
|
|
335
335
|
className: "flex flex-col gap-4 px-5 pb-5 sm:flex-row sm:gap-5",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
336
|
+
children: [/* @__PURE__ */ C("div", {
|
|
337
337
|
className: "-mt-14 w-24 shrink-0 sm:-mt-24 sm:w-36",
|
|
338
|
-
children: /* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ C("div", {
|
|
339
339
|
className: "aspect-[2/3] overflow-hidden rounded-xl border border-border-seam bg-bg-sunken shadow-elevation-2",
|
|
340
|
-
children: n.isLoading ? /* @__PURE__ */
|
|
340
|
+
children: n.isLoading ? /* @__PURE__ */ C("div", {
|
|
341
341
|
className: "flex h-full w-full items-center justify-center",
|
|
342
|
-
children: /* @__PURE__ */
|
|
343
|
-
}) : n.data ? /* @__PURE__ */
|
|
342
|
+
children: /* @__PURE__ */ C(b, { className: "h-5 w-5 animate-spin text-text-secondary" })
|
|
343
|
+
}) : n.data ? /* @__PURE__ */ C("img", {
|
|
344
344
|
src: n.data,
|
|
345
345
|
alt: `${e.title} poster`,
|
|
346
346
|
className: "h-full w-full object-cover"
|
|
347
|
-
}) : /* @__PURE__ */
|
|
347
|
+
}) : /* @__PURE__ */ w("div", {
|
|
348
348
|
className: "flex h-full w-full flex-col items-center justify-center gap-1 text-text-secondary",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ C(y, { className: "h-6 w-6" }), /* @__PURE__ */ C("span", {
|
|
350
350
|
className: "text-[10px]",
|
|
351
351
|
children: "No poster"
|
|
352
352
|
})]
|
|
353
353
|
})
|
|
354
354
|
})
|
|
355
|
-
}), /* @__PURE__ */
|
|
355
|
+
}), /* @__PURE__ */ w("div", {
|
|
356
356
|
className: "min-w-0 flex-1 pt-1 sm:pt-4",
|
|
357
357
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ w("p", {
|
|
359
359
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
360
360
|
children: [m(e.type), e.studio ? ` · ${e.studio.name}` : ""]
|
|
361
361
|
}),
|
|
362
|
-
(r.length > 0 || e.aiDisclosure) && /* @__PURE__ */
|
|
362
|
+
(r.length > 0 || e.aiDisclosure) && /* @__PURE__ */ w("div", {
|
|
363
363
|
className: "mt-3 flex flex-wrap gap-2",
|
|
364
364
|
children: [r.map((e) => {
|
|
365
365
|
let t = e.icon;
|
|
366
|
-
return /* @__PURE__ */
|
|
366
|
+
return /* @__PURE__ */ w("span", {
|
|
367
367
|
className: "inline-flex items-center gap-1.5 rounded-full bg-bg-sunken px-2.5 py-1 text-xs text-text-secondary",
|
|
368
|
-
children: [/* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ C(t, { className: "h-3.5 w-3.5" }), e.label]
|
|
369
369
|
}, e.label);
|
|
370
|
-
}), e.aiDisclosure && /* @__PURE__ */
|
|
370
|
+
}), e.aiDisclosure && /* @__PURE__ */ w("span", {
|
|
371
371
|
className: "inline-flex items-center gap-1.5 rounded-full bg-status-info-bg-subtle px-2.5 py-1 text-xs text-status-info-text",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ C(Ee, { className: "h-3.5 w-3.5" }), "AI-assisted"]
|
|
373
373
|
})]
|
|
374
374
|
}),
|
|
375
|
-
e.genres.length > 0 && /* @__PURE__ */
|
|
375
|
+
e.genres.length > 0 && /* @__PURE__ */ C("div", {
|
|
376
376
|
className: "mt-3 flex flex-wrap gap-1.5",
|
|
377
|
-
children: e.genres.map((e) => /* @__PURE__ */
|
|
377
|
+
children: e.genres.map((e) => /* @__PURE__ */ C("span", {
|
|
378
378
|
className: "rounded-full border border-border-seam px-2.5 py-0.5 text-xs text-text-primary",
|
|
379
379
|
children: e
|
|
380
380
|
}, e))
|
|
381
381
|
}),
|
|
382
|
-
e.synopsis && /* @__PURE__ */
|
|
382
|
+
e.synopsis && /* @__PURE__ */ C("p", {
|
|
383
383
|
className: "mt-4 max-w-3xl text-sm leading-relaxed text-text-secondary",
|
|
384
384
|
children: e.synopsis
|
|
385
385
|
})
|
|
@@ -388,68 +388,68 @@ var Pe = {
|
|
|
388
388
|
})]
|
|
389
389
|
});
|
|
390
390
|
}, Ke = 12, qe = () => {
|
|
391
|
-
let { id: t } =
|
|
391
|
+
let { id: t } = Pe(), { navigateTo: p } = e(), { data: _, isLoading: v, isError: b, refetch: Oe } = ie(t), Be = ae(), k = a(), qe = ne({ titleId: t }, {
|
|
392
392
|
limit: 10,
|
|
393
393
|
offset: 0
|
|
394
|
-
}), A = oe(), j = i(), M = u(), N = l(),
|
|
394
|
+
}), A = oe(), j = i(), M = u(), N = l(), Je = te(), P = o(t), Ye = re({
|
|
395
395
|
limit: 200,
|
|
396
396
|
offset: 0
|
|
397
|
-
}), [
|
|
397
|
+
}), [Xe, Ze] = h(0), F = s(t, void 0, {
|
|
398
398
|
limit: Ke,
|
|
399
|
-
offset:
|
|
400
|
-
}),
|
|
399
|
+
offset: Xe * Ke
|
|
400
|
+
}), Qe = c(), $e = d(), [et, I] = h(null), [tt, L] = h(!1), [R, nt] = h(null), [rt, it] = h(""), [z, at] = h(""), [ot, st] = h(""), [ct, lt] = h(!1), [ut, B] = h(null), [dt, ft] = h(null), V = me(null), [H, U] = h("none"), [W, pt] = h(""), [mt, ht] = h("MOVIE"), [gt, _t] = h(""), [vt, yt] = h(""), [bt, xt] = h(""), [St, Ct] = h(""), [wt, Tt] = h(""), [G, Et] = h(""), [K, Dt] = h(""), [Ot, kt] = h(""), [At, jt] = h(""), [Mt, Nt] = h(!1), [Pt, Ft] = h(""), [q, It] = h(""), [Lt, Rt] = h("ACTOR"), [zt, Bt] = h(""), [J, Vt] = h(""), Ht = ee({
|
|
401
401
|
limit: 50,
|
|
402
402
|
offset: 0
|
|
403
|
-
},
|
|
404
|
-
if (v) return /* @__PURE__ */
|
|
403
|
+
}, Pt), [Ut, Wt] = h(""), [Gt, Kt] = h(""), [qt, Jt] = h(""), [Yt, Xt] = h(""), [Zt, Qt] = h(""), [$t, en] = h(""), [tn, nn] = h(""), [rn, an] = h(""), [on, sn] = h(""), [cn, ln] = h(""), [un, dn] = h(null), [fn, pn] = h(!1), [mn, hn] = h(!1);
|
|
404
|
+
if (v) return /* @__PURE__ */ C(n, {
|
|
405
405
|
title: "Title",
|
|
406
|
-
children: /* @__PURE__ */
|
|
406
|
+
children: /* @__PURE__ */ C(de, { label: "Loading title…" })
|
|
407
407
|
});
|
|
408
|
-
if (b || !_) return /* @__PURE__ */
|
|
408
|
+
if (b || !_) return /* @__PURE__ */ C(n, {
|
|
409
409
|
title: "Title",
|
|
410
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ C(ue, {
|
|
411
411
|
title: "Title not found",
|
|
412
412
|
message: "This title may have been archived or you may not have access.",
|
|
413
|
-
onRetry: () => void
|
|
413
|
+
onRetry: () => void Oe()
|
|
414
414
|
})
|
|
415
415
|
});
|
|
416
|
-
let Y = _.type === "SERIES", X = () =>
|
|
417
|
-
|
|
418
|
-
},
|
|
419
|
-
|
|
416
|
+
let Y = _.type === "SERIES", X = () => U("none"), gn = () => {
|
|
417
|
+
I(null), pt(_.title), ht(_.type), _t(_.synopsis ?? ""), yt(_.genres.join(", ")), xt(_.tags.join(", ")), Ct(_.originalLanguage ?? ""), Tt(_.originCountry ?? ""), Et(_.releaseYear ? String(_.releaseYear) : ""), Dt(_.runtimeMinutes ? String(_.runtimeMinutes) : ""), kt(_.certification ?? ""), jt(_.studioId ?? ""), Nt(_.aiDisclosure), U("edit");
|
|
418
|
+
}, _n = async (e) => {
|
|
419
|
+
I(null);
|
|
420
420
|
try {
|
|
421
|
-
await
|
|
421
|
+
await Be.mutateAsync({
|
|
422
422
|
id: _.id,
|
|
423
423
|
status: e
|
|
424
424
|
});
|
|
425
425
|
} catch (e) {
|
|
426
|
-
|
|
426
|
+
I(e instanceof Error ? e.message : "Transition failed");
|
|
427
427
|
}
|
|
428
|
-
},
|
|
429
|
-
|
|
428
|
+
}, vn = async () => {
|
|
429
|
+
I(null);
|
|
430
430
|
try {
|
|
431
|
-
await
|
|
431
|
+
await k.mutateAsync(_.id), p("catalog/titles");
|
|
432
432
|
} catch (e) {
|
|
433
|
-
|
|
433
|
+
I(e instanceof Error ? e.message : "Archive failed");
|
|
434
434
|
}
|
|
435
|
-
},
|
|
436
|
-
if (e.preventDefault(),
|
|
437
|
-
|
|
435
|
+
}, yn = async (e) => {
|
|
436
|
+
if (e.preventDefault(), I(null), !W.trim()) {
|
|
437
|
+
I("Title is required.");
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
440
|
let t = {
|
|
441
|
-
title:
|
|
442
|
-
type:
|
|
443
|
-
synopsis:
|
|
444
|
-
genres:
|
|
445
|
-
tags:
|
|
446
|
-
originalLanguage:
|
|
447
|
-
originCountry:
|
|
448
|
-
releaseYear:
|
|
449
|
-
runtimeMinutes:
|
|
450
|
-
certification:
|
|
451
|
-
studioId:
|
|
452
|
-
aiDisclosure:
|
|
441
|
+
title: W.trim(),
|
|
442
|
+
type: mt,
|
|
443
|
+
synopsis: gt.trim() || void 0,
|
|
444
|
+
genres: Re(vt),
|
|
445
|
+
tags: Re(bt),
|
|
446
|
+
originalLanguage: St.trim() || void 0,
|
|
447
|
+
originCountry: wt.trim() || void 0,
|
|
448
|
+
releaseYear: G.trim() ? Number(G) : void 0,
|
|
449
|
+
runtimeMinutes: K.trim() ? Number(K) : void 0,
|
|
450
|
+
certification: Ot.trim() || void 0,
|
|
451
|
+
studioId: At || void 0,
|
|
452
|
+
aiDisclosure: Mt
|
|
453
453
|
};
|
|
454
454
|
try {
|
|
455
455
|
await A.mutateAsync({
|
|
@@ -457,27 +457,27 @@ var Pe = {
|
|
|
457
457
|
input: t
|
|
458
458
|
}), X();
|
|
459
459
|
} catch (e) {
|
|
460
|
-
|
|
460
|
+
I(e instanceof Error ? e.message : "Failed to update title");
|
|
461
461
|
}
|
|
462
|
-
},
|
|
463
|
-
if (e.preventDefault(),
|
|
464
|
-
|
|
462
|
+
}, bn = async (e) => {
|
|
463
|
+
if (e.preventDefault(), I(null), !q) {
|
|
464
|
+
I("Select a person to credit.");
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
467
|
try {
|
|
468
468
|
await j.mutateAsync({
|
|
469
|
-
personId:
|
|
469
|
+
personId: q,
|
|
470
470
|
titleId: _.id,
|
|
471
|
-
role:
|
|
472
|
-
characterName:
|
|
473
|
-
billingOrder:
|
|
474
|
-
}),
|
|
471
|
+
role: Lt,
|
|
472
|
+
characterName: zt.trim() || void 0,
|
|
473
|
+
billingOrder: J.trim() ? Number(J) : void 0
|
|
474
|
+
}), It(""), Bt(""), Vt(""), Ft(""), X();
|
|
475
475
|
} catch (e) {
|
|
476
|
-
|
|
476
|
+
I(e instanceof Error ? e.message : "Failed to add credit");
|
|
477
477
|
}
|
|
478
|
-
},
|
|
479
|
-
if (e.preventDefault(),
|
|
480
|
-
|
|
478
|
+
}, xn = async (e) => {
|
|
479
|
+
if (e.preventDefault(), I(null), !Ut.trim()) {
|
|
480
|
+
I("Season number is required.");
|
|
481
481
|
return;
|
|
482
482
|
}
|
|
483
483
|
try {
|
|
@@ -486,21 +486,30 @@ var Pe = {
|
|
|
486
486
|
number: Number(Ut),
|
|
487
487
|
name: Gt.trim() || void 0,
|
|
488
488
|
synopsis: qt.trim() || void 0,
|
|
489
|
-
airDate:
|
|
489
|
+
airDate: ze(Yt)
|
|
490
490
|
}), Wt(""), Kt(""), Jt(""), Xt(""), X();
|
|
491
491
|
} catch (e) {
|
|
492
|
-
|
|
492
|
+
I(e instanceof Error ? e.message : "Failed to add season");
|
|
493
493
|
}
|
|
494
|
-
},
|
|
495
|
-
if (e.preventDefault(),
|
|
496
|
-
|
|
494
|
+
}, Sn = async (e) => {
|
|
495
|
+
if (e.preventDefault(), I(null), !$t.trim()) {
|
|
496
|
+
I("Episode number is required.");
|
|
497
497
|
return;
|
|
498
498
|
}
|
|
499
499
|
if (!tn.trim()) {
|
|
500
|
-
|
|
500
|
+
I("Episode name is required.");
|
|
501
501
|
return;
|
|
502
502
|
}
|
|
503
503
|
try {
|
|
504
|
+
let e;
|
|
505
|
+
if (un) {
|
|
506
|
+
pn(!0);
|
|
507
|
+
try {
|
|
508
|
+
e = (await se(un, f.episodes)).id;
|
|
509
|
+
} finally {
|
|
510
|
+
pn(!1);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
504
513
|
await N.mutateAsync({
|
|
505
514
|
titleId: _.id,
|
|
506
515
|
number: Number($t),
|
|
@@ -508,59 +517,60 @@ var Pe = {
|
|
|
508
517
|
seasonId: Zt || void 0,
|
|
509
518
|
synopsis: rn.trim() || void 0,
|
|
510
519
|
runtimeMinutes: on.trim() ? Number(on) : void 0,
|
|
511
|
-
airDate:
|
|
512
|
-
|
|
520
|
+
airDate: ze(cn),
|
|
521
|
+
fileId: e
|
|
522
|
+
}), Qt(""), en(""), nn(""), an(""), sn(""), ln(""), dn(null), X();
|
|
513
523
|
} catch (e) {
|
|
514
|
-
|
|
524
|
+
I(e instanceof Error ? e.message : "Failed to add episode");
|
|
515
525
|
}
|
|
516
|
-
},
|
|
517
|
-
if (
|
|
518
|
-
|
|
526
|
+
}, Cn = async () => {
|
|
527
|
+
if (I(null), hn(!1), !P.data?.entitled) {
|
|
528
|
+
I("You are not entitled to watch this title.");
|
|
519
529
|
return;
|
|
520
530
|
}
|
|
521
531
|
try {
|
|
522
|
-
await
|
|
532
|
+
await Je.mutateAsync({
|
|
523
533
|
titleId: _.id,
|
|
524
534
|
positionSeconds: (_.runtimeMinutes ?? 0) * 60,
|
|
525
535
|
completed: !0,
|
|
526
536
|
lastDevice: "web"
|
|
527
|
-
}),
|
|
537
|
+
}), hn(!0);
|
|
528
538
|
} catch (e) {
|
|
529
|
-
|
|
539
|
+
I(e instanceof Error ? e.message : "Failed to record progress");
|
|
530
540
|
}
|
|
531
|
-
},
|
|
532
|
-
if (e.preventDefault(),
|
|
533
|
-
|
|
541
|
+
}, wn = async (e) => {
|
|
542
|
+
if (e.preventDefault(), B(null), !R) {
|
|
543
|
+
B("Select a clip video to upload.");
|
|
534
544
|
return;
|
|
535
545
|
}
|
|
536
|
-
|
|
546
|
+
lt(!0);
|
|
537
547
|
try {
|
|
538
|
-
let e = await se(
|
|
539
|
-
await
|
|
548
|
+
let e = await se(R, f.clips);
|
|
549
|
+
await Qe.mutateAsync({
|
|
540
550
|
titleId: _.id,
|
|
541
551
|
videoFileId: e.id,
|
|
542
|
-
caption:
|
|
543
|
-
durationSeconds:
|
|
544
|
-
language:
|
|
545
|
-
}),
|
|
552
|
+
caption: rt.trim() || void 0,
|
|
553
|
+
durationSeconds: z.trim() ? Number(z) : void 0,
|
|
554
|
+
language: ot.trim() || void 0
|
|
555
|
+
}), nt(null), it(""), at(""), st(""), V.current && (V.current.value = ""), L(!1), Ze(0);
|
|
546
556
|
} catch (e) {
|
|
547
|
-
|
|
557
|
+
B(e instanceof Error ? e.message : "Failed to add clip");
|
|
548
558
|
} finally {
|
|
549
|
-
|
|
559
|
+
lt(!1);
|
|
550
560
|
}
|
|
551
|
-
},
|
|
552
|
-
|
|
561
|
+
}, Tn = async (e) => {
|
|
562
|
+
I(null), ft(e.id);
|
|
553
563
|
try {
|
|
554
|
-
await
|
|
564
|
+
await $e.mutateAsync({
|
|
555
565
|
id: e.id,
|
|
556
566
|
titleId: _.id
|
|
557
567
|
});
|
|
558
568
|
} catch (e) {
|
|
559
|
-
|
|
569
|
+
I(e instanceof Error ? e.message : "Failed to delete clip");
|
|
560
570
|
} finally {
|
|
561
|
-
|
|
571
|
+
ft(null);
|
|
562
572
|
}
|
|
563
|
-
}, Z = qe.data?.items ?? [], Q =
|
|
573
|
+
}, Z = qe.data?.items ?? [], Q = F.data?.items ?? [], En = Z.length > 0 ? Z.reduce((e, t) => e + t.score, 0) / Z.length : null, $ = [];
|
|
564
574
|
_.releaseDate ? $.push({
|
|
565
575
|
icon: g,
|
|
566
576
|
label: "Release",
|
|
@@ -586,219 +596,219 @@ var Pe = {
|
|
|
586
596
|
label: "Certification",
|
|
587
597
|
value: _.certification
|
|
588
598
|
});
|
|
589
|
-
let
|
|
590
|
-
return /* @__PURE__ */
|
|
591
|
-
title: /* @__PURE__ */
|
|
599
|
+
let Dn = Ht.data?.items ?? [];
|
|
600
|
+
return /* @__PURE__ */ w(n, {
|
|
601
|
+
title: /* @__PURE__ */ w("span", {
|
|
592
602
|
className: "flex items-center gap-3",
|
|
593
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ C("button", {
|
|
594
604
|
type: "button",
|
|
595
605
|
onClick: () => p("catalog/titles"),
|
|
596
606
|
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
597
607
|
"aria-label": "Back to catalog",
|
|
598
|
-
children: /* @__PURE__ */
|
|
608
|
+
children: /* @__PURE__ */ C(ge, { className: "h-5 w-5" })
|
|
599
609
|
}), _.title]
|
|
600
610
|
}),
|
|
601
611
|
description: `${m(_.type)}${_.studio ? ` · ${_.studio.name}` : ""}`,
|
|
602
|
-
actions: /* @__PURE__ */
|
|
612
|
+
actions: /* @__PURE__ */ w("div", {
|
|
603
613
|
className: "flex items-center gap-2",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
614
|
+
children: [/* @__PURE__ */ w("button", {
|
|
605
615
|
type: "button",
|
|
606
|
-
onClick:
|
|
616
|
+
onClick: gn,
|
|
607
617
|
className: "inline-flex items-center gap-2 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
608
|
-
children: [/* @__PURE__ */
|
|
609
|
-
}), /* @__PURE__ */
|
|
618
|
+
children: [/* @__PURE__ */ C(Ce, { className: "h-3.5 w-3.5" }), "Edit"]
|
|
619
|
+
}), /* @__PURE__ */ C(r, { status: _.status })]
|
|
610
620
|
}),
|
|
611
621
|
children: [
|
|
612
|
-
|
|
622
|
+
et && /* @__PURE__ */ C("div", {
|
|
613
623
|
className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
614
|
-
children:
|
|
624
|
+
children: et
|
|
615
625
|
}),
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
-
|
|
626
|
+
/* @__PURE__ */ C(Ge, { title: _ }),
|
|
627
|
+
H === "edit" && /* @__PURE__ */ w(T, {
|
|
618
628
|
treatment: "metric",
|
|
619
629
|
className: "mb-6 border-border-seam p-5",
|
|
620
|
-
children: [/* @__PURE__ */
|
|
630
|
+
children: [/* @__PURE__ */ w("div", {
|
|
621
631
|
className: "mb-4 flex items-center justify-between",
|
|
622
|
-
children: [/* @__PURE__ */
|
|
632
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
623
633
|
className: "text-sm font-semibold text-text-primary",
|
|
624
634
|
children: "Edit title"
|
|
625
|
-
}), /* @__PURE__ */
|
|
635
|
+
}), /* @__PURE__ */ C("button", {
|
|
626
636
|
type: "button",
|
|
627
637
|
onClick: X,
|
|
628
638
|
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
629
639
|
"aria-label": "Close edit form",
|
|
630
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ C(Ne, { className: "h-4 w-4" })
|
|
631
641
|
})]
|
|
632
|
-
}), /* @__PURE__ */
|
|
633
|
-
onSubmit:
|
|
642
|
+
}), /* @__PURE__ */ w("form", {
|
|
643
|
+
onSubmit: yn,
|
|
634
644
|
className: "space-y-5",
|
|
635
645
|
children: [
|
|
636
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
637
647
|
htmlFor: "edit-title",
|
|
638
|
-
className:
|
|
648
|
+
className: D,
|
|
639
649
|
children: "Title *"
|
|
640
|
-
}), /* @__PURE__ */
|
|
650
|
+
}), /* @__PURE__ */ C("input", {
|
|
641
651
|
id: "edit-title",
|
|
642
652
|
type: "text",
|
|
643
|
-
value:
|
|
644
|
-
onChange: (e) =>
|
|
645
|
-
className:
|
|
653
|
+
value: W,
|
|
654
|
+
onChange: (e) => pt(e.target.value),
|
|
655
|
+
className: E,
|
|
646
656
|
required: !0
|
|
647
657
|
})] }),
|
|
648
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ w("div", {
|
|
649
659
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
650
|
-
children: [/* @__PURE__ */
|
|
660
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
651
661
|
htmlFor: "edit-type",
|
|
652
|
-
className:
|
|
662
|
+
className: D,
|
|
653
663
|
children: "Type"
|
|
654
|
-
}), /* @__PURE__ */
|
|
664
|
+
}), /* @__PURE__ */ C("select", {
|
|
655
665
|
id: "edit-type",
|
|
656
|
-
value:
|
|
657
|
-
onChange: (e) =>
|
|
658
|
-
className:
|
|
659
|
-
children:
|
|
666
|
+
value: mt,
|
|
667
|
+
onChange: (e) => ht(e.target.value),
|
|
668
|
+
className: E,
|
|
669
|
+
children: Ie.map((e) => /* @__PURE__ */ C("option", {
|
|
660
670
|
value: e,
|
|
661
671
|
children: m(e)
|
|
662
672
|
}, e))
|
|
663
|
-
})] }), /* @__PURE__ */
|
|
673
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
664
674
|
htmlFor: "edit-studio",
|
|
665
|
-
className:
|
|
675
|
+
className: D,
|
|
666
676
|
children: "Studio"
|
|
667
|
-
}), /* @__PURE__ */
|
|
677
|
+
}), /* @__PURE__ */ w("select", {
|
|
668
678
|
id: "edit-studio",
|
|
669
|
-
value:
|
|
670
|
-
onChange: (e) =>
|
|
671
|
-
className:
|
|
672
|
-
children: [/* @__PURE__ */
|
|
679
|
+
value: At,
|
|
680
|
+
onChange: (e) => jt(e.target.value),
|
|
681
|
+
className: E,
|
|
682
|
+
children: [/* @__PURE__ */ C("option", {
|
|
673
683
|
value: "",
|
|
674
684
|
children: "No studio"
|
|
675
|
-
}), (
|
|
685
|
+
}), (Ye.data?.items ?? []).map((e) => /* @__PURE__ */ C("option", {
|
|
676
686
|
value: e.id,
|
|
677
687
|
children: e.name
|
|
678
688
|
}, e.id))]
|
|
679
689
|
})] })]
|
|
680
690
|
}),
|
|
681
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
682
692
|
htmlFor: "edit-synopsis",
|
|
683
|
-
className:
|
|
693
|
+
className: D,
|
|
684
694
|
children: "Synopsis"
|
|
685
|
-
}), /* @__PURE__ */
|
|
695
|
+
}), /* @__PURE__ */ C("textarea", {
|
|
686
696
|
id: "edit-synopsis",
|
|
687
|
-
value:
|
|
688
|
-
onChange: (e) =>
|
|
697
|
+
value: gt,
|
|
698
|
+
onChange: (e) => _t(e.target.value),
|
|
689
699
|
rows: 4,
|
|
690
|
-
className:
|
|
700
|
+
className: E
|
|
691
701
|
})] }),
|
|
692
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ w("div", {
|
|
693
703
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
694
|
-
children: [/* @__PURE__ */
|
|
704
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
695
705
|
htmlFor: "edit-genres",
|
|
696
|
-
className:
|
|
706
|
+
className: D,
|
|
697
707
|
children: "Genres (comma-separated)"
|
|
698
|
-
}), /* @__PURE__ */
|
|
708
|
+
}), /* @__PURE__ */ C("input", {
|
|
699
709
|
id: "edit-genres",
|
|
700
710
|
type: "text",
|
|
701
|
-
value:
|
|
702
|
-
onChange: (e) =>
|
|
711
|
+
value: vt,
|
|
712
|
+
onChange: (e) => yt(e.target.value),
|
|
703
713
|
placeholder: "Drama, Thriller",
|
|
704
|
-
className:
|
|
705
|
-
})] }), /* @__PURE__ */
|
|
714
|
+
className: E
|
|
715
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
706
716
|
htmlFor: "edit-tags",
|
|
707
|
-
className:
|
|
717
|
+
className: D,
|
|
708
718
|
children: "Tags (comma-separated)"
|
|
709
|
-
}), /* @__PURE__ */
|
|
719
|
+
}), /* @__PURE__ */ C("input", {
|
|
710
720
|
id: "edit-tags",
|
|
711
721
|
type: "text",
|
|
712
|
-
value:
|
|
713
|
-
onChange: (e) =>
|
|
722
|
+
value: bt,
|
|
723
|
+
onChange: (e) => xt(e.target.value),
|
|
714
724
|
placeholder: "award-winner, indie",
|
|
715
|
-
className:
|
|
725
|
+
className: E
|
|
716
726
|
})] })]
|
|
717
727
|
}),
|
|
718
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ w("div", {
|
|
719
729
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
720
730
|
children: [
|
|
721
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
722
732
|
htmlFor: "edit-language",
|
|
723
|
-
className:
|
|
733
|
+
className: D,
|
|
724
734
|
children: "Original Language"
|
|
725
|
-
}), /* @__PURE__ */
|
|
735
|
+
}), /* @__PURE__ */ C("input", {
|
|
726
736
|
id: "edit-language",
|
|
727
737
|
type: "text",
|
|
728
|
-
value:
|
|
729
|
-
onChange: (e) =>
|
|
738
|
+
value: St,
|
|
739
|
+
onChange: (e) => Ct(e.target.value),
|
|
730
740
|
placeholder: "en",
|
|
731
|
-
className:
|
|
741
|
+
className: E
|
|
732
742
|
})] }),
|
|
733
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
734
744
|
htmlFor: "edit-country",
|
|
735
|
-
className:
|
|
745
|
+
className: D,
|
|
736
746
|
children: "Origin Country"
|
|
737
|
-
}), /* @__PURE__ */
|
|
747
|
+
}), /* @__PURE__ */ C("input", {
|
|
738
748
|
id: "edit-country",
|
|
739
749
|
type: "text",
|
|
740
|
-
value:
|
|
741
|
-
onChange: (e) =>
|
|
750
|
+
value: wt,
|
|
751
|
+
onChange: (e) => Tt(e.target.value),
|
|
742
752
|
placeholder: "US",
|
|
743
|
-
className:
|
|
753
|
+
className: E
|
|
744
754
|
})] }),
|
|
745
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
746
756
|
htmlFor: "edit-certification",
|
|
747
|
-
className:
|
|
757
|
+
className: D,
|
|
748
758
|
children: "Certification"
|
|
749
|
-
}), /* @__PURE__ */
|
|
759
|
+
}), /* @__PURE__ */ C("input", {
|
|
750
760
|
id: "edit-certification",
|
|
751
761
|
type: "text",
|
|
752
|
-
value:
|
|
753
|
-
onChange: (e) =>
|
|
762
|
+
value: Ot,
|
|
763
|
+
onChange: (e) => kt(e.target.value),
|
|
754
764
|
placeholder: "PG-13",
|
|
755
|
-
className:
|
|
765
|
+
className: E
|
|
756
766
|
})] })
|
|
757
767
|
]
|
|
758
768
|
}),
|
|
759
|
-
/* @__PURE__ */
|
|
769
|
+
/* @__PURE__ */ w("div", {
|
|
760
770
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
761
|
-
children: [/* @__PURE__ */
|
|
771
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
762
772
|
htmlFor: "edit-year",
|
|
763
|
-
className:
|
|
773
|
+
className: D,
|
|
764
774
|
children: "Release Year"
|
|
765
|
-
}), /* @__PURE__ */
|
|
775
|
+
}), /* @__PURE__ */ C("input", {
|
|
766
776
|
id: "edit-year",
|
|
767
777
|
type: "number",
|
|
768
|
-
value:
|
|
769
|
-
onChange: (e) =>
|
|
778
|
+
value: G,
|
|
779
|
+
onChange: (e) => Et(e.target.value),
|
|
770
780
|
placeholder: "2026",
|
|
771
|
-
className:
|
|
772
|
-
})] }), /* @__PURE__ */
|
|
781
|
+
className: E
|
|
782
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
773
783
|
htmlFor: "edit-runtime",
|
|
774
|
-
className:
|
|
784
|
+
className: D,
|
|
775
785
|
children: "Runtime (minutes)"
|
|
776
|
-
}), /* @__PURE__ */
|
|
786
|
+
}), /* @__PURE__ */ C("input", {
|
|
777
787
|
id: "edit-runtime",
|
|
778
788
|
type: "number",
|
|
779
|
-
value:
|
|
780
|
-
onChange: (e) =>
|
|
789
|
+
value: K,
|
|
790
|
+
onChange: (e) => Dt(e.target.value),
|
|
781
791
|
placeholder: "120",
|
|
782
|
-
className:
|
|
792
|
+
className: E
|
|
783
793
|
})] })]
|
|
784
794
|
}),
|
|
785
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ w("label", {
|
|
786
796
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
787
|
-
children: [/* @__PURE__ */
|
|
797
|
+
children: [/* @__PURE__ */ C("input", {
|
|
788
798
|
type: "checkbox",
|
|
789
|
-
checked:
|
|
790
|
-
onChange: (e) =>
|
|
799
|
+
checked: Mt,
|
|
800
|
+
onChange: (e) => Nt(e.target.checked),
|
|
791
801
|
className: "h-4 w-4 rounded border-border-subtle"
|
|
792
802
|
}), "This title contains AI-generated or AI-altered content"]
|
|
793
803
|
}),
|
|
794
|
-
/* @__PURE__ */
|
|
804
|
+
/* @__PURE__ */ w("div", {
|
|
795
805
|
className: "flex items-center gap-3 pt-1",
|
|
796
|
-
children: [/* @__PURE__ */
|
|
806
|
+
children: [/* @__PURE__ */ C("button", {
|
|
797
807
|
type: "submit",
|
|
798
808
|
disabled: A.isPending,
|
|
799
809
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
800
810
|
children: A.isPending ? "Saving…" : "Save changes"
|
|
801
|
-
}), /* @__PURE__ */
|
|
811
|
+
}), /* @__PURE__ */ C("button", {
|
|
802
812
|
type: "button",
|
|
803
813
|
onClick: X,
|
|
804
814
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
@@ -808,26 +818,26 @@ var Pe = {
|
|
|
808
818
|
]
|
|
809
819
|
})]
|
|
810
820
|
}),
|
|
811
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ w("div", {
|
|
812
822
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
813
|
-
children: [/* @__PURE__ */
|
|
823
|
+
children: [/* @__PURE__ */ w("div", {
|
|
814
824
|
className: "space-y-6 lg:col-span-2",
|
|
815
825
|
children: [
|
|
816
|
-
/* @__PURE__ */ T
|
|
826
|
+
/* @__PURE__ */ w(T, {
|
|
817
827
|
treatment: "metric",
|
|
818
828
|
className: "border-border-seam p-5",
|
|
819
829
|
children: [
|
|
820
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ C(O, {
|
|
821
831
|
icon: y,
|
|
822
832
|
title: "Artwork & Media"
|
|
823
833
|
}),
|
|
824
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ C("p", {
|
|
825
835
|
className: "-mt-2 mb-4 text-xs text-text-secondary",
|
|
826
836
|
children: "Poster and backdrop art, plus the trailer and full-length video master. Files are stored in the workspace files service; the title keeps only a reference."
|
|
827
837
|
}),
|
|
828
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ C("div", {
|
|
829
839
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
830
|
-
children:
|
|
840
|
+
children: Ve.map((e) => /* @__PURE__ */ C(He, {
|
|
831
841
|
titleId: _.id,
|
|
832
842
|
config: e,
|
|
833
843
|
currentFileId: _[e.field]
|
|
@@ -835,107 +845,107 @@ var Pe = {
|
|
|
835
845
|
})
|
|
836
846
|
]
|
|
837
847
|
}),
|
|
838
|
-
/* @__PURE__ */ T
|
|
848
|
+
/* @__PURE__ */ w(T, {
|
|
839
849
|
treatment: "metric",
|
|
840
850
|
className: "border-border-seam p-5",
|
|
841
851
|
children: [
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
icon:
|
|
852
|
+
/* @__PURE__ */ C(O, {
|
|
853
|
+
icon: je,
|
|
844
854
|
title: "Cast & Crew",
|
|
845
855
|
count: _.credits.length,
|
|
846
|
-
actions: /* @__PURE__ */
|
|
856
|
+
actions: /* @__PURE__ */ w("button", {
|
|
847
857
|
type: "button",
|
|
848
858
|
onClick: () => {
|
|
849
|
-
|
|
859
|
+
I(null), U(H === "credit" ? "none" : "credit");
|
|
850
860
|
},
|
|
851
861
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
852
|
-
children: [/* @__PURE__ */
|
|
862
|
+
children: [/* @__PURE__ */ C(Ae, { className: "h-3.5 w-3.5" }), "Add credit"]
|
|
853
863
|
})
|
|
854
864
|
}),
|
|
855
|
-
|
|
856
|
-
onSubmit:
|
|
865
|
+
H === "credit" && /* @__PURE__ */ w("form", {
|
|
866
|
+
onSubmit: bn,
|
|
857
867
|
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
858
868
|
children: [
|
|
859
|
-
/* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
860
870
|
htmlFor: "credit-search",
|
|
861
|
-
className:
|
|
871
|
+
className: D,
|
|
862
872
|
children: "Search people"
|
|
863
|
-
}), /* @__PURE__ */
|
|
873
|
+
}), /* @__PURE__ */ C("input", {
|
|
864
874
|
id: "credit-search",
|
|
865
875
|
type: "text",
|
|
866
|
-
value:
|
|
867
|
-
onChange: (e) =>
|
|
876
|
+
value: Pt,
|
|
877
|
+
onChange: (e) => Ft(e.target.value),
|
|
868
878
|
placeholder: "Type a name to filter…",
|
|
869
|
-
className:
|
|
879
|
+
className: E
|
|
870
880
|
})] }),
|
|
871
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ w("div", {
|
|
872
882
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
873
|
-
children: [/* @__PURE__ */
|
|
883
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
874
884
|
htmlFor: "credit-person",
|
|
875
|
-
className:
|
|
885
|
+
className: D,
|
|
876
886
|
children: "Person *"
|
|
877
|
-
}), /* @__PURE__ */
|
|
887
|
+
}), /* @__PURE__ */ w("select", {
|
|
878
888
|
id: "credit-person",
|
|
879
|
-
value:
|
|
880
|
-
onChange: (e) =>
|
|
881
|
-
className:
|
|
889
|
+
value: q,
|
|
890
|
+
onChange: (e) => It(e.target.value),
|
|
891
|
+
className: E,
|
|
882
892
|
required: !0,
|
|
883
|
-
children: [/* @__PURE__ */
|
|
893
|
+
children: [/* @__PURE__ */ C("option", {
|
|
884
894
|
value: "",
|
|
885
|
-
children: Ht.isLoading ? "Loading people…" :
|
|
886
|
-
}),
|
|
895
|
+
children: Ht.isLoading ? "Loading people…" : Dn.length === 0 ? "No people found" : "Select a person"
|
|
896
|
+
}), Dn.map((e) => /* @__PURE__ */ w("option", {
|
|
887
897
|
value: e.id,
|
|
888
898
|
children: [e.name, e.knownFor ? ` — ${e.knownFor}` : ""]
|
|
889
899
|
}, e.id))]
|
|
890
|
-
})] }), /* @__PURE__ */
|
|
900
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
891
901
|
htmlFor: "credit-role",
|
|
892
|
-
className:
|
|
902
|
+
className: D,
|
|
893
903
|
children: "Role"
|
|
894
|
-
}), /* @__PURE__ */
|
|
904
|
+
}), /* @__PURE__ */ C("select", {
|
|
895
905
|
id: "credit-role",
|
|
896
|
-
value:
|
|
897
|
-
onChange: (e) =>
|
|
898
|
-
className:
|
|
899
|
-
children:
|
|
906
|
+
value: Lt,
|
|
907
|
+
onChange: (e) => Rt(e.target.value),
|
|
908
|
+
className: E,
|
|
909
|
+
children: Le.map((e) => /* @__PURE__ */ C("option", {
|
|
900
910
|
value: e,
|
|
901
911
|
children: m(e)
|
|
902
912
|
}, e))
|
|
903
913
|
})] })]
|
|
904
914
|
}),
|
|
905
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ w("div", {
|
|
906
916
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
907
|
-
children: [/* @__PURE__ */
|
|
917
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
908
918
|
htmlFor: "credit-character",
|
|
909
|
-
className:
|
|
919
|
+
className: D,
|
|
910
920
|
children: "Character name"
|
|
911
|
-
}), /* @__PURE__ */
|
|
921
|
+
}), /* @__PURE__ */ C("input", {
|
|
912
922
|
id: "credit-character",
|
|
913
923
|
type: "text",
|
|
914
|
-
value:
|
|
915
|
-
onChange: (e) =>
|
|
924
|
+
value: zt,
|
|
925
|
+
onChange: (e) => Bt(e.target.value),
|
|
916
926
|
placeholder: "e.g. Captain Rao",
|
|
917
|
-
className:
|
|
918
|
-
})] }), /* @__PURE__ */
|
|
927
|
+
className: E
|
|
928
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
919
929
|
htmlFor: "credit-billing",
|
|
920
|
-
className:
|
|
930
|
+
className: D,
|
|
921
931
|
children: "Billing order"
|
|
922
|
-
}), /* @__PURE__ */
|
|
932
|
+
}), /* @__PURE__ */ C("input", {
|
|
923
933
|
id: "credit-billing",
|
|
924
934
|
type: "number",
|
|
925
|
-
value:
|
|
935
|
+
value: J,
|
|
926
936
|
onChange: (e) => Vt(e.target.value),
|
|
927
937
|
placeholder: "1",
|
|
928
|
-
className:
|
|
938
|
+
className: E
|
|
929
939
|
})] })]
|
|
930
940
|
}),
|
|
931
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ w("div", {
|
|
932
942
|
className: "flex items-center gap-3",
|
|
933
|
-
children: [/* @__PURE__ */
|
|
943
|
+
children: [/* @__PURE__ */ w("button", {
|
|
934
944
|
type: "submit",
|
|
935
945
|
disabled: j.isPending,
|
|
936
946
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
937
|
-
children: [/* @__PURE__ */
|
|
938
|
-
}), /* @__PURE__ */
|
|
947
|
+
children: [/* @__PURE__ */ C(x, { className: "h-4 w-4" }), j.isPending ? "Adding…" : "Add credit"]
|
|
948
|
+
}), /* @__PURE__ */ C("button", {
|
|
939
949
|
type: "button",
|
|
940
950
|
onClick: X,
|
|
941
951
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
@@ -944,21 +954,21 @@ var Pe = {
|
|
|
944
954
|
})
|
|
945
955
|
]
|
|
946
956
|
}),
|
|
947
|
-
_.credits.length === 0 ? /* @__PURE__ */
|
|
957
|
+
_.credits.length === 0 ? /* @__PURE__ */ C(le, {
|
|
948
958
|
title: "No credits recorded yet",
|
|
949
959
|
description: "Add the cast and crew who worked on this title."
|
|
950
|
-
}) : /* @__PURE__ */
|
|
960
|
+
}) : /* @__PURE__ */ w("div", {
|
|
951
961
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
|
|
952
|
-
children: [[..._.credits].sort((e, t) => e.billingOrder - t.billingOrder).map((e) => /* @__PURE__ */
|
|
962
|
+
children: [[..._.credits].sort((e, t) => e.billingOrder - t.billingOrder).map((e) => /* @__PURE__ */ C(We, { credit: e }, e.id)), /* @__PURE__ */ w("button", {
|
|
953
963
|
type: "button",
|
|
954
964
|
onClick: () => {
|
|
955
|
-
|
|
965
|
+
I(null), U(H === "credit" ? "none" : "credit");
|
|
956
966
|
},
|
|
957
967
|
className: "flex min-h-[9.5rem] flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border-seam bg-bg-surface p-3 text-text-secondary transition-colors hover:border-border-strong hover:text-text-primary",
|
|
958
|
-
children: [/* @__PURE__ */
|
|
968
|
+
children: [/* @__PURE__ */ C("span", {
|
|
959
969
|
className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken",
|
|
960
|
-
children: /* @__PURE__ */
|
|
961
|
-
}), /* @__PURE__ */
|
|
970
|
+
children: /* @__PURE__ */ C(Ae, { className: "h-5 w-5" })
|
|
971
|
+
}), /* @__PURE__ */ C("span", {
|
|
962
972
|
className: "text-xs font-medium",
|
|
963
973
|
children: "Add credit"
|
|
964
974
|
})]
|
|
@@ -966,91 +976,91 @@ var Pe = {
|
|
|
966
976
|
})
|
|
967
977
|
]
|
|
968
978
|
}),
|
|
969
|
-
/* @__PURE__ */ T
|
|
979
|
+
/* @__PURE__ */ w(T, {
|
|
970
980
|
treatment: "metric",
|
|
971
981
|
className: "border-border-seam p-5",
|
|
972
982
|
children: [
|
|
973
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ C(O, {
|
|
974
984
|
icon: xe,
|
|
975
985
|
title: "Episodes",
|
|
976
986
|
count: _.episodes.length,
|
|
977
|
-
actions: Y ? /* @__PURE__ */
|
|
987
|
+
actions: Y ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("button", {
|
|
978
988
|
type: "button",
|
|
979
989
|
onClick: () => {
|
|
980
|
-
|
|
990
|
+
I(null), U(H === "season" ? "none" : "season");
|
|
981
991
|
},
|
|
982
992
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
983
|
-
children: [/* @__PURE__ */
|
|
984
|
-
}), /* @__PURE__ */
|
|
993
|
+
children: [/* @__PURE__ */ C(x, { className: "h-3.5 w-3.5" }), "Add season"]
|
|
994
|
+
}), /* @__PURE__ */ w("button", {
|
|
985
995
|
type: "button",
|
|
986
996
|
onClick: () => {
|
|
987
|
-
|
|
997
|
+
I(null), U(H === "episode" ? "none" : "episode");
|
|
988
998
|
},
|
|
989
999
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
990
|
-
children: [/* @__PURE__ */
|
|
1000
|
+
children: [/* @__PURE__ */ C(x, { className: "h-3.5 w-3.5" }), "Add episode"]
|
|
991
1001
|
})] }) : void 0
|
|
992
1002
|
}),
|
|
993
|
-
Y &&
|
|
994
|
-
onSubmit:
|
|
1003
|
+
Y && H === "season" && /* @__PURE__ */ w("form", {
|
|
1004
|
+
onSubmit: xn,
|
|
995
1005
|
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
996
1006
|
children: [
|
|
997
|
-
/* @__PURE__ */
|
|
1007
|
+
/* @__PURE__ */ w("div", {
|
|
998
1008
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
999
|
-
children: [/* @__PURE__ */
|
|
1009
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1000
1010
|
htmlFor: "season-number",
|
|
1001
|
-
className:
|
|
1011
|
+
className: D,
|
|
1002
1012
|
children: "Season number *"
|
|
1003
|
-
}), /* @__PURE__ */
|
|
1013
|
+
}), /* @__PURE__ */ C("input", {
|
|
1004
1014
|
id: "season-number",
|
|
1005
1015
|
type: "number",
|
|
1006
1016
|
value: Ut,
|
|
1007
1017
|
onChange: (e) => Wt(e.target.value),
|
|
1008
1018
|
placeholder: "1",
|
|
1009
|
-
className:
|
|
1019
|
+
className: E,
|
|
1010
1020
|
required: !0
|
|
1011
|
-
})] }), /* @__PURE__ */
|
|
1021
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1012
1022
|
htmlFor: "season-name",
|
|
1013
|
-
className:
|
|
1023
|
+
className: D,
|
|
1014
1024
|
children: "Name"
|
|
1015
|
-
}), /* @__PURE__ */
|
|
1025
|
+
}), /* @__PURE__ */ C("input", {
|
|
1016
1026
|
id: "season-name",
|
|
1017
1027
|
type: "text",
|
|
1018
1028
|
value: Gt,
|
|
1019
1029
|
onChange: (e) => Kt(e.target.value),
|
|
1020
1030
|
placeholder: "Season 1",
|
|
1021
|
-
className:
|
|
1031
|
+
className: E
|
|
1022
1032
|
})] })]
|
|
1023
1033
|
}),
|
|
1024
|
-
/* @__PURE__ */
|
|
1034
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1025
1035
|
htmlFor: "season-synopsis",
|
|
1026
|
-
className:
|
|
1036
|
+
className: D,
|
|
1027
1037
|
children: "Synopsis"
|
|
1028
|
-
}), /* @__PURE__ */
|
|
1038
|
+
}), /* @__PURE__ */ C("textarea", {
|
|
1029
1039
|
id: "season-synopsis",
|
|
1030
1040
|
value: qt,
|
|
1031
1041
|
onChange: (e) => Jt(e.target.value),
|
|
1032
1042
|
rows: 3,
|
|
1033
|
-
className:
|
|
1043
|
+
className: E
|
|
1034
1044
|
})] }),
|
|
1035
|
-
/* @__PURE__ */
|
|
1045
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1036
1046
|
htmlFor: "season-airdate",
|
|
1037
|
-
className:
|
|
1047
|
+
className: D,
|
|
1038
1048
|
children: "Air date"
|
|
1039
|
-
}), /* @__PURE__ */
|
|
1049
|
+
}), /* @__PURE__ */ C("input", {
|
|
1040
1050
|
id: "season-airdate",
|
|
1041
1051
|
type: "date",
|
|
1042
1052
|
value: Yt,
|
|
1043
1053
|
onChange: (e) => Xt(e.target.value),
|
|
1044
|
-
className:
|
|
1054
|
+
className: E
|
|
1045
1055
|
})] }),
|
|
1046
|
-
/* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ w("div", {
|
|
1047
1057
|
className: "flex items-center gap-3",
|
|
1048
|
-
children: [/* @__PURE__ */
|
|
1058
|
+
children: [/* @__PURE__ */ w("button", {
|
|
1049
1059
|
type: "submit",
|
|
1050
1060
|
disabled: M.isPending,
|
|
1051
1061
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
1052
|
-
children: [/* @__PURE__ */
|
|
1053
|
-
}), /* @__PURE__ */
|
|
1062
|
+
children: [/* @__PURE__ */ C(x, { className: "h-4 w-4" }), M.isPending ? "Adding…" : "Add season"]
|
|
1063
|
+
}), /* @__PURE__ */ C("button", {
|
|
1054
1064
|
type: "button",
|
|
1055
1065
|
onClick: X,
|
|
1056
1066
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
@@ -1059,99 +1069,117 @@ var Pe = {
|
|
|
1059
1069
|
})
|
|
1060
1070
|
]
|
|
1061
1071
|
}),
|
|
1062
|
-
Y &&
|
|
1063
|
-
onSubmit:
|
|
1072
|
+
Y && H === "episode" && /* @__PURE__ */ w("form", {
|
|
1073
|
+
onSubmit: Sn,
|
|
1064
1074
|
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
1065
1075
|
children: [
|
|
1066
|
-
/* @__PURE__ */
|
|
1076
|
+
/* @__PURE__ */ w("div", {
|
|
1067
1077
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1068
|
-
children: [/* @__PURE__ */
|
|
1078
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1069
1079
|
htmlFor: "episode-season",
|
|
1070
|
-
className:
|
|
1080
|
+
className: D,
|
|
1071
1081
|
children: "Season"
|
|
1072
|
-
}), /* @__PURE__ */
|
|
1082
|
+
}), /* @__PURE__ */ w("select", {
|
|
1073
1083
|
id: "episode-season",
|
|
1074
1084
|
value: Zt,
|
|
1075
1085
|
onChange: (e) => Qt(e.target.value),
|
|
1076
|
-
className:
|
|
1077
|
-
children: [/* @__PURE__ */
|
|
1086
|
+
className: E,
|
|
1087
|
+
children: [/* @__PURE__ */ C("option", {
|
|
1078
1088
|
value: "",
|
|
1079
1089
|
children: "No season"
|
|
1080
|
-
}), [..._.seasons].sort((e, t) => e.number - t.number).map((e) => /* @__PURE__ */
|
|
1090
|
+
}), [..._.seasons].sort((e, t) => e.number - t.number).map((e) => /* @__PURE__ */ C("option", {
|
|
1081
1091
|
value: e.id,
|
|
1082
1092
|
children: e.name ? `${e.number}. ${e.name}` : `Season ${e.number}`
|
|
1083
1093
|
}, e.id))]
|
|
1084
|
-
})] }), /* @__PURE__ */
|
|
1094
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1085
1095
|
htmlFor: "episode-number",
|
|
1086
|
-
className:
|
|
1096
|
+
className: D,
|
|
1087
1097
|
children: "Episode number *"
|
|
1088
|
-
}), /* @__PURE__ */
|
|
1098
|
+
}), /* @__PURE__ */ C("input", {
|
|
1089
1099
|
id: "episode-number",
|
|
1090
1100
|
type: "number",
|
|
1091
1101
|
value: $t,
|
|
1092
1102
|
onChange: (e) => en(e.target.value),
|
|
1093
1103
|
placeholder: "1",
|
|
1094
|
-
className:
|
|
1104
|
+
className: E,
|
|
1095
1105
|
required: !0
|
|
1096
1106
|
})] })]
|
|
1097
1107
|
}),
|
|
1098
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1099
1109
|
htmlFor: "episode-name",
|
|
1100
|
-
className:
|
|
1110
|
+
className: D,
|
|
1101
1111
|
children: "Name *"
|
|
1102
|
-
}), /* @__PURE__ */
|
|
1112
|
+
}), /* @__PURE__ */ C("input", {
|
|
1103
1113
|
id: "episode-name",
|
|
1104
1114
|
type: "text",
|
|
1105
1115
|
value: tn,
|
|
1106
1116
|
onChange: (e) => nn(e.target.value),
|
|
1107
1117
|
placeholder: "Pilot",
|
|
1108
|
-
className:
|
|
1118
|
+
className: E,
|
|
1109
1119
|
required: !0
|
|
1110
1120
|
})] }),
|
|
1111
|
-
/* @__PURE__ */
|
|
1121
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1112
1122
|
htmlFor: "episode-synopsis",
|
|
1113
|
-
className:
|
|
1123
|
+
className: D,
|
|
1114
1124
|
children: "Synopsis"
|
|
1115
|
-
}), /* @__PURE__ */
|
|
1125
|
+
}), /* @__PURE__ */ C("textarea", {
|
|
1116
1126
|
id: "episode-synopsis",
|
|
1117
1127
|
value: rn,
|
|
1118
1128
|
onChange: (e) => an(e.target.value),
|
|
1119
1129
|
rows: 3,
|
|
1120
|
-
className:
|
|
1130
|
+
className: E
|
|
1121
1131
|
})] }),
|
|
1122
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ w("div", {
|
|
1123
1133
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1124
|
-
children: [/* @__PURE__ */
|
|
1134
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1125
1135
|
htmlFor: "episode-runtime",
|
|
1126
|
-
className:
|
|
1136
|
+
className: D,
|
|
1127
1137
|
children: "Runtime (minutes)"
|
|
1128
|
-
}), /* @__PURE__ */
|
|
1138
|
+
}), /* @__PURE__ */ C("input", {
|
|
1129
1139
|
id: "episode-runtime",
|
|
1130
1140
|
type: "number",
|
|
1131
1141
|
value: on,
|
|
1132
1142
|
onChange: (e) => sn(e.target.value),
|
|
1133
1143
|
placeholder: "45",
|
|
1134
|
-
className:
|
|
1135
|
-
})] }), /* @__PURE__ */
|
|
1144
|
+
className: E
|
|
1145
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1136
1146
|
htmlFor: "episode-airdate",
|
|
1137
|
-
className:
|
|
1147
|
+
className: D,
|
|
1138
1148
|
children: "Air date"
|
|
1139
|
-
}), /* @__PURE__ */
|
|
1149
|
+
}), /* @__PURE__ */ C("input", {
|
|
1140
1150
|
id: "episode-airdate",
|
|
1141
1151
|
type: "date",
|
|
1142
1152
|
value: cn,
|
|
1143
1153
|
onChange: (e) => ln(e.target.value),
|
|
1144
|
-
className:
|
|
1154
|
+
className: E
|
|
1145
1155
|
})] })]
|
|
1146
1156
|
}),
|
|
1147
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ w("div", { children: [
|
|
1158
|
+
/* @__PURE__ */ C("label", {
|
|
1159
|
+
htmlFor: "episode-video",
|
|
1160
|
+
className: D,
|
|
1161
|
+
children: "Video (optional)"
|
|
1162
|
+
}),
|
|
1163
|
+
/* @__PURE__ */ C("input", {
|
|
1164
|
+
id: "episode-video",
|
|
1165
|
+
type: "file",
|
|
1166
|
+
accept: "video/*",
|
|
1167
|
+
onChange: (e) => dn(e.target.files?.[0] ?? null),
|
|
1168
|
+
className: E
|
|
1169
|
+
}),
|
|
1170
|
+
/* @__PURE__ */ C("p", {
|
|
1171
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
1172
|
+
children: "Uploaded to the workspace files service and attached on creation -- there is no way to attach or replace a video on an existing episode yet."
|
|
1173
|
+
})
|
|
1174
|
+
] }),
|
|
1175
|
+
/* @__PURE__ */ w("div", {
|
|
1148
1176
|
className: "flex items-center gap-3",
|
|
1149
|
-
children: [/* @__PURE__ */
|
|
1177
|
+
children: [/* @__PURE__ */ w("button", {
|
|
1150
1178
|
type: "submit",
|
|
1151
|
-
disabled: N.isPending,
|
|
1179
|
+
disabled: N.isPending || fn,
|
|
1152
1180
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
1153
|
-
children: [/* @__PURE__ */
|
|
1154
|
-
}), /* @__PURE__ */
|
|
1181
|
+
children: [/* @__PURE__ */ C(x, { className: "h-4 w-4" }), fn ? "Uploading video…" : N.isPending ? "Adding…" : "Add episode"]
|
|
1182
|
+
}), /* @__PURE__ */ C("button", {
|
|
1155
1183
|
type: "button",
|
|
1156
1184
|
onClick: X,
|
|
1157
1185
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
@@ -1160,29 +1188,29 @@ var Pe = {
|
|
|
1160
1188
|
})
|
|
1161
1189
|
]
|
|
1162
1190
|
}),
|
|
1163
|
-
_.episodes.length === 0 ? /* @__PURE__ */
|
|
1191
|
+
_.episodes.length === 0 ? /* @__PURE__ */ C("p", {
|
|
1164
1192
|
className: "text-sm text-text-secondary",
|
|
1165
1193
|
children: Y ? "No episodes yet. Add a season, then episodes, to build out this series." : "No episodes recorded for this title."
|
|
1166
|
-
}) : /* @__PURE__ */
|
|
1194
|
+
}) : /* @__PURE__ */ C("ul", {
|
|
1167
1195
|
className: "space-y-1",
|
|
1168
|
-
children: [..._.episodes].sort((e, t) => e.number - t.number).map((e) => /* @__PURE__ */
|
|
1196
|
+
children: [..._.episodes].sort((e, t) => e.number - t.number).map((e) => /* @__PURE__ */ w("li", {
|
|
1169
1197
|
className: "flex items-center gap-3 rounded-lg px-2 py-2 transition-colors hover:bg-bg-sunken",
|
|
1170
1198
|
children: [
|
|
1171
|
-
/* @__PURE__ */
|
|
1199
|
+
/* @__PURE__ */ C("span", {
|
|
1172
1200
|
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-bg-sunken text-xs font-semibold text-text-secondary",
|
|
1173
1201
|
children: e.number
|
|
1174
1202
|
}),
|
|
1175
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ w("div", {
|
|
1176
1204
|
className: "min-w-0 flex-1",
|
|
1177
|
-
children: [/* @__PURE__ */
|
|
1205
|
+
children: [/* @__PURE__ */ C("p", {
|
|
1178
1206
|
className: "truncate text-sm font-medium text-text-primary",
|
|
1179
1207
|
children: e.name
|
|
1180
|
-
}), e.synopsis && /* @__PURE__ */
|
|
1208
|
+
}), e.synopsis && /* @__PURE__ */ C("p", {
|
|
1181
1209
|
className: "line-clamp-1 text-xs text-text-secondary",
|
|
1182
1210
|
children: e.synopsis
|
|
1183
1211
|
})]
|
|
1184
1212
|
}),
|
|
1185
|
-
e.runtimeMinutes && /* @__PURE__ */
|
|
1213
|
+
e.runtimeMinutes && /* @__PURE__ */ w("span", {
|
|
1186
1214
|
className: "shrink-0 text-xs text-text-secondary",
|
|
1187
1215
|
children: [e.runtimeMinutes, " min"]
|
|
1188
1216
|
})
|
|
@@ -1191,34 +1219,34 @@ var Pe = {
|
|
|
1191
1219
|
})
|
|
1192
1220
|
]
|
|
1193
1221
|
}),
|
|
1194
|
-
/* @__PURE__ */ T
|
|
1222
|
+
/* @__PURE__ */ w(T, {
|
|
1195
1223
|
treatment: "metric",
|
|
1196
1224
|
className: "border-border-seam p-5",
|
|
1197
|
-
children: [/* @__PURE__ */
|
|
1225
|
+
children: [/* @__PURE__ */ C(O, {
|
|
1198
1226
|
icon: De,
|
|
1199
1227
|
title: "Reviews",
|
|
1200
1228
|
count: Z.length
|
|
1201
|
-
}), Z.length === 0 ? /* @__PURE__ */
|
|
1229
|
+
}), Z.length === 0 ? /* @__PURE__ */ C(le, {
|
|
1202
1230
|
title: "No reviews yet",
|
|
1203
1231
|
description: "Reviews from verified viewers will appear here."
|
|
1204
|
-
}) : /* @__PURE__ */
|
|
1232
|
+
}) : /* @__PURE__ */ w(S, { children: [En !== null && /* @__PURE__ */ w("div", {
|
|
1205
1233
|
className: "mb-4 flex items-center gap-4 rounded-xl border border-border-seam bg-bg-surface p-4",
|
|
1206
|
-
children: [/* @__PURE__ */
|
|
1234
|
+
children: [/* @__PURE__ */ w("div", {
|
|
1207
1235
|
className: "flex flex-col items-center",
|
|
1208
|
-
children: [/* @__PURE__ */
|
|
1236
|
+
children: [/* @__PURE__ */ C("span", {
|
|
1209
1237
|
className: "text-3xl font-semibold leading-none text-text-primary",
|
|
1210
|
-
children:
|
|
1211
|
-
}), /* @__PURE__ */
|
|
1238
|
+
children: En.toFixed(1)
|
|
1239
|
+
}), /* @__PURE__ */ C("span", {
|
|
1212
1240
|
className: "mt-1 text-[10px] uppercase tracking-wide text-text-secondary",
|
|
1213
1241
|
children: "/ 10"
|
|
1214
1242
|
})]
|
|
1215
|
-
}), /* @__PURE__ */
|
|
1243
|
+
}), /* @__PURE__ */ w("div", {
|
|
1216
1244
|
className: "min-w-0",
|
|
1217
|
-
children: [/* @__PURE__ */
|
|
1218
|
-
value:
|
|
1245
|
+
children: [/* @__PURE__ */ C(pe, {
|
|
1246
|
+
value: En / 2,
|
|
1219
1247
|
count: Z.length,
|
|
1220
1248
|
size: "md"
|
|
1221
|
-
}), /* @__PURE__ */
|
|
1249
|
+
}), /* @__PURE__ */ w("p", {
|
|
1222
1250
|
className: "mt-1 text-xs text-text-secondary",
|
|
1223
1251
|
children: [
|
|
1224
1252
|
"Average across ",
|
|
@@ -1228,123 +1256,123 @@ var Pe = {
|
|
|
1228
1256
|
]
|
|
1229
1257
|
})]
|
|
1230
1258
|
})]
|
|
1231
|
-
}), /* @__PURE__ */
|
|
1259
|
+
}), /* @__PURE__ */ C("ul", {
|
|
1232
1260
|
className: "space-y-3",
|
|
1233
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
1261
|
+
children: Z.map((e) => /* @__PURE__ */ w("li", {
|
|
1234
1262
|
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
1235
|
-
children: [/* @__PURE__ */
|
|
1263
|
+
children: [/* @__PURE__ */ w("div", {
|
|
1236
1264
|
className: "flex items-center justify-between",
|
|
1237
|
-
children: [/* @__PURE__ */
|
|
1265
|
+
children: [/* @__PURE__ */ w("span", {
|
|
1238
1266
|
className: "text-sm font-semibold text-text-primary",
|
|
1239
1267
|
children: [e.score, "/10"]
|
|
1240
|
-
}), /* @__PURE__ */
|
|
1268
|
+
}), /* @__PURE__ */ w("div", {
|
|
1241
1269
|
className: "flex items-center gap-2",
|
|
1242
|
-
children: [e.verifiedWatch && /* @__PURE__ */
|
|
1270
|
+
children: [e.verifiedWatch && /* @__PURE__ */ C("span", {
|
|
1243
1271
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-[10px] text-status-success-text",
|
|
1244
1272
|
children: "Verified"
|
|
1245
|
-
}), /* @__PURE__ */
|
|
1273
|
+
}), /* @__PURE__ */ C(r, { status: e.status })]
|
|
1246
1274
|
})]
|
|
1247
|
-
}), e.body && /* @__PURE__ */
|
|
1275
|
+
}), e.body && /* @__PURE__ */ C("p", {
|
|
1248
1276
|
className: "mt-1 text-sm text-text-secondary",
|
|
1249
1277
|
children: e.body
|
|
1250
1278
|
})]
|
|
1251
1279
|
}, e.id))
|
|
1252
1280
|
})] })]
|
|
1253
1281
|
}),
|
|
1254
|
-
/* @__PURE__ */ T
|
|
1282
|
+
/* @__PURE__ */ w(T, {
|
|
1255
1283
|
treatment: "metric",
|
|
1256
1284
|
className: "border-border-seam p-5",
|
|
1257
1285
|
children: [
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
icon:
|
|
1286
|
+
/* @__PURE__ */ C(O, {
|
|
1287
|
+
icon: Me,
|
|
1260
1288
|
title: "Clips",
|
|
1261
|
-
count:
|
|
1262
|
-
actions: /* @__PURE__ */
|
|
1289
|
+
count: F.data?.totalCount ?? Q.length,
|
|
1290
|
+
actions: /* @__PURE__ */ w("button", {
|
|
1263
1291
|
type: "button",
|
|
1264
1292
|
onClick: () => {
|
|
1265
|
-
|
|
1293
|
+
B(null), L((e) => !e);
|
|
1266
1294
|
},
|
|
1267
1295
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
1268
|
-
children: [/* @__PURE__ */
|
|
1296
|
+
children: [/* @__PURE__ */ C(x, { className: "h-3.5 w-3.5" }), "Add clip"]
|
|
1269
1297
|
})
|
|
1270
1298
|
}),
|
|
1271
|
-
|
|
1272
|
-
onSubmit:
|
|
1299
|
+
tt && /* @__PURE__ */ w("form", {
|
|
1300
|
+
onSubmit: wn,
|
|
1273
1301
|
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
1274
1302
|
children: [
|
|
1275
|
-
/* @__PURE__ */
|
|
1276
|
-
/* @__PURE__ */
|
|
1303
|
+
/* @__PURE__ */ w("div", { children: [
|
|
1304
|
+
/* @__PURE__ */ C("label", {
|
|
1277
1305
|
htmlFor: "clip-file",
|
|
1278
|
-
className:
|
|
1306
|
+
className: D,
|
|
1279
1307
|
children: "Clip video * (short vertical MP4)"
|
|
1280
1308
|
}),
|
|
1281
|
-
/* @__PURE__ */
|
|
1309
|
+
/* @__PURE__ */ C("input", {
|
|
1282
1310
|
id: "clip-file",
|
|
1283
|
-
ref:
|
|
1311
|
+
ref: V,
|
|
1284
1312
|
type: "file",
|
|
1285
1313
|
accept: "video/*",
|
|
1286
|
-
onChange: (e) =>
|
|
1287
|
-
className:
|
|
1314
|
+
onChange: (e) => nt(e.target.files?.[0] ?? null),
|
|
1315
|
+
className: E
|
|
1288
1316
|
}),
|
|
1289
|
-
|
|
1317
|
+
R && /* @__PURE__ */ w("p", {
|
|
1290
1318
|
className: "mt-1 truncate text-xs text-text-secondary",
|
|
1291
|
-
children: ["Selected: ",
|
|
1319
|
+
children: ["Selected: ", R.name]
|
|
1292
1320
|
})
|
|
1293
1321
|
] }),
|
|
1294
|
-
/* @__PURE__ */
|
|
1322
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1295
1323
|
htmlFor: "clip-caption",
|
|
1296
|
-
className:
|
|
1324
|
+
className: D,
|
|
1297
1325
|
children: "Caption"
|
|
1298
|
-
}), /* @__PURE__ */
|
|
1326
|
+
}), /* @__PURE__ */ C("input", {
|
|
1299
1327
|
id: "clip-caption",
|
|
1300
1328
|
type: "text",
|
|
1301
|
-
value:
|
|
1302
|
-
onChange: (e) =>
|
|
1329
|
+
value: rt,
|
|
1330
|
+
onChange: (e) => it(e.target.value),
|
|
1303
1331
|
placeholder: "e.g. Official teaser",
|
|
1304
|
-
className:
|
|
1332
|
+
className: E
|
|
1305
1333
|
})] }),
|
|
1306
|
-
/* @__PURE__ */
|
|
1334
|
+
/* @__PURE__ */ w("div", {
|
|
1307
1335
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1308
|
-
children: [/* @__PURE__ */
|
|
1336
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1309
1337
|
htmlFor: "clip-duration",
|
|
1310
|
-
className:
|
|
1338
|
+
className: D,
|
|
1311
1339
|
children: "Duration (seconds)"
|
|
1312
|
-
}), /* @__PURE__ */
|
|
1340
|
+
}), /* @__PURE__ */ C("input", {
|
|
1313
1341
|
id: "clip-duration",
|
|
1314
1342
|
type: "number",
|
|
1315
1343
|
min: 0,
|
|
1316
|
-
value:
|
|
1317
|
-
onChange: (e) =>
|
|
1344
|
+
value: z,
|
|
1345
|
+
onChange: (e) => at(e.target.value),
|
|
1318
1346
|
placeholder: "30",
|
|
1319
|
-
className:
|
|
1320
|
-
})] }), /* @__PURE__ */
|
|
1347
|
+
className: E
|
|
1348
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
1321
1349
|
htmlFor: "clip-language",
|
|
1322
|
-
className:
|
|
1350
|
+
className: D,
|
|
1323
1351
|
children: "Language"
|
|
1324
|
-
}), /* @__PURE__ */
|
|
1352
|
+
}), /* @__PURE__ */ C("input", {
|
|
1325
1353
|
id: "clip-language",
|
|
1326
1354
|
type: "text",
|
|
1327
|
-
value:
|
|
1328
|
-
onChange: (e) =>
|
|
1355
|
+
value: ot,
|
|
1356
|
+
onChange: (e) => st(e.target.value),
|
|
1329
1357
|
placeholder: "en",
|
|
1330
|
-
className:
|
|
1358
|
+
className: E
|
|
1331
1359
|
})] })]
|
|
1332
1360
|
}),
|
|
1333
|
-
|
|
1361
|
+
ut && /* @__PURE__ */ C("p", {
|
|
1334
1362
|
className: "text-xs text-status-error-text",
|
|
1335
|
-
children:
|
|
1363
|
+
children: ut
|
|
1336
1364
|
}),
|
|
1337
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ w("div", {
|
|
1338
1366
|
className: "flex items-center gap-3",
|
|
1339
|
-
children: [/* @__PURE__ */
|
|
1367
|
+
children: [/* @__PURE__ */ w("button", {
|
|
1340
1368
|
type: "submit",
|
|
1341
|
-
disabled:
|
|
1369
|
+
disabled: ct,
|
|
1342
1370
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-50",
|
|
1343
|
-
children: [/* @__PURE__ */
|
|
1344
|
-
}), /* @__PURE__ */
|
|
1371
|
+
children: [/* @__PURE__ */ C(ke, { className: "h-4 w-4" }), ct ? "Uploading…" : "Add clip"]
|
|
1372
|
+
}), /* @__PURE__ */ C("button", {
|
|
1345
1373
|
type: "button",
|
|
1346
1374
|
onClick: () => {
|
|
1347
|
-
|
|
1375
|
+
L(!1), B(null);
|
|
1348
1376
|
},
|
|
1349
1377
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
1350
1378
|
children: "Cancel"
|
|
@@ -1352,156 +1380,156 @@ var Pe = {
|
|
|
1352
1380
|
})
|
|
1353
1381
|
]
|
|
1354
1382
|
}),
|
|
1355
|
-
|
|
1383
|
+
F.isLoading ? /* @__PURE__ */ C(de, {
|
|
1356
1384
|
label: "Loading clips…",
|
|
1357
1385
|
className: "min-h-[20vh]"
|
|
1358
|
-
}) :
|
|
1386
|
+
}) : F.isError ? /* @__PURE__ */ C(ue, {
|
|
1359
1387
|
title: "Could not load clips",
|
|
1360
1388
|
message: "Something went wrong fetching this title's clips.",
|
|
1361
|
-
onRetry: () => void
|
|
1389
|
+
onRetry: () => void F.refetch(),
|
|
1362
1390
|
className: "min-h-[20vh]"
|
|
1363
|
-
}) : Q.length === 0 ? /* @__PURE__ */
|
|
1391
|
+
}) : Q.length === 0 ? /* @__PURE__ */ C(le, {
|
|
1364
1392
|
title: "No clips yet",
|
|
1365
1393
|
description: "Upload a short vertical clip to promote this title."
|
|
1366
|
-
}) : /* @__PURE__ */
|
|
1394
|
+
}) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
|
|
1367
1395
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4",
|
|
1368
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
1396
|
+
children: Q.map((e) => /* @__PURE__ */ C(Ue, {
|
|
1369
1397
|
clip: e,
|
|
1370
|
-
deleting:
|
|
1371
|
-
onDelete: (e) => void
|
|
1398
|
+
deleting: dt === e.id,
|
|
1399
|
+
onDelete: (e) => void Tn(e)
|
|
1372
1400
|
}, e.id))
|
|
1373
|
-
}), /* @__PURE__ */
|
|
1374
|
-
page:
|
|
1375
|
-
hasMore:
|
|
1401
|
+
}), /* @__PURE__ */ C(fe, {
|
|
1402
|
+
page: Xe,
|
|
1403
|
+
hasMore: F.data?.pageInfo.hasMore ?? !1,
|
|
1376
1404
|
shownCount: Q.length,
|
|
1377
|
-
onPageChange:
|
|
1405
|
+
onPageChange: Ze
|
|
1378
1406
|
})] })
|
|
1379
1407
|
]
|
|
1380
1408
|
})
|
|
1381
1409
|
]
|
|
1382
|
-
}), /* @__PURE__ */
|
|
1410
|
+
}), /* @__PURE__ */ w("div", {
|
|
1383
1411
|
className: "space-y-6",
|
|
1384
1412
|
children: [
|
|
1385
|
-
/* @__PURE__ */ T
|
|
1413
|
+
/* @__PURE__ */ w(T, {
|
|
1386
1414
|
treatment: "metric",
|
|
1387
1415
|
className: "border-border-seam p-5",
|
|
1388
|
-
children: [/* @__PURE__ */
|
|
1416
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
1389
1417
|
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
1390
|
-
children: [/* @__PURE__ */
|
|
1391
|
-
}),
|
|
1418
|
+
children: [/* @__PURE__ */ C(we, { className: "h-4 w-4" }), "Watch"]
|
|
1419
|
+
}), P.isLoading ? /* @__PURE__ */ C("p", {
|
|
1392
1420
|
className: "text-sm text-text-secondary",
|
|
1393
1421
|
children: "Checking access…"
|
|
1394
|
-
}) :
|
|
1422
|
+
}) : P.isError ? /* @__PURE__ */ w("div", {
|
|
1395
1423
|
className: "space-y-2",
|
|
1396
|
-
children: [/* @__PURE__ */
|
|
1424
|
+
children: [/* @__PURE__ */ C("p", {
|
|
1397
1425
|
className: "text-sm text-status-error-text",
|
|
1398
1426
|
children: "Could not check entitlement."
|
|
1399
|
-
}), /* @__PURE__ */
|
|
1427
|
+
}), /* @__PURE__ */ C("button", {
|
|
1400
1428
|
type: "button",
|
|
1401
|
-
onClick: () => void
|
|
1429
|
+
onClick: () => void P.refetch(),
|
|
1402
1430
|
className: "rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
1403
1431
|
children: "Retry"
|
|
1404
1432
|
})]
|
|
1405
|
-
}) :
|
|
1433
|
+
}) : P.data?.entitled ? /* @__PURE__ */ w("div", {
|
|
1406
1434
|
className: "space-y-3",
|
|
1407
|
-
children: [
|
|
1435
|
+
children: [P.data.modes.length > 0 && /* @__PURE__ */ C("div", {
|
|
1408
1436
|
className: "flex flex-wrap gap-1.5",
|
|
1409
|
-
children:
|
|
1437
|
+
children: P.data.modes.map((e) => /* @__PURE__ */ C("span", {
|
|
1410
1438
|
className: "rounded-full bg-status-success-bg-subtle px-2.5 py-0.5 text-xs text-status-success-text",
|
|
1411
1439
|
children: m(e)
|
|
1412
1440
|
}, e))
|
|
1413
|
-
}),
|
|
1441
|
+
}), mn ? /* @__PURE__ */ w("p", {
|
|
1414
1442
|
className: "flex items-center gap-2 text-sm text-status-success-text",
|
|
1415
|
-
children: [/* @__PURE__ */
|
|
1416
|
-
}) : /* @__PURE__ */
|
|
1443
|
+
children: [/* @__PURE__ */ C(_e, { className: "h-4 w-4" }), "Marked as watched — see Continue Watching."]
|
|
1444
|
+
}) : /* @__PURE__ */ w("button", {
|
|
1417
1445
|
type: "button",
|
|
1418
|
-
disabled:
|
|
1419
|
-
onClick: () => void
|
|
1446
|
+
disabled: Je.isPending,
|
|
1447
|
+
onClick: () => void Cn(),
|
|
1420
1448
|
className: "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
1421
|
-
children: [/* @__PURE__ */
|
|
1449
|
+
children: [/* @__PURE__ */ C(we, { className: "h-4 w-4" }), Je.isPending ? "Saving…" : "Mark as watched"]
|
|
1422
1450
|
})]
|
|
1423
|
-
}) : /* @__PURE__ */
|
|
1451
|
+
}) : /* @__PURE__ */ w("div", {
|
|
1424
1452
|
className: "flex items-start gap-2 rounded-lg border border-border-seam bg-bg-sunken px-3 py-2.5",
|
|
1425
|
-
children: [/* @__PURE__ */
|
|
1453
|
+
children: [/* @__PURE__ */ C(Se, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ C("p", {
|
|
1426
1454
|
className: "text-sm text-text-secondary",
|
|
1427
1455
|
children: "You are not entitled to watch this title. Grant an entitlement or add a rights window to enable playback."
|
|
1428
1456
|
})]
|
|
1429
1457
|
})]
|
|
1430
1458
|
}),
|
|
1431
|
-
/* @__PURE__ */ T
|
|
1459
|
+
/* @__PURE__ */ w(T, {
|
|
1432
1460
|
treatment: "metric",
|
|
1433
1461
|
className: "border-border-seam p-5",
|
|
1434
1462
|
children: [
|
|
1435
|
-
/* @__PURE__ */
|
|
1463
|
+
/* @__PURE__ */ C("h2", {
|
|
1436
1464
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
1437
1465
|
children: "Publication"
|
|
1438
1466
|
}),
|
|
1439
|
-
/* @__PURE__ */
|
|
1467
|
+
/* @__PURE__ */ w("div", {
|
|
1440
1468
|
className: "flex flex-wrap gap-2",
|
|
1441
|
-
children: [
|
|
1469
|
+
children: [Fe[_.status].map((e) => /* @__PURE__ */ C("button", {
|
|
1442
1470
|
type: "button",
|
|
1443
|
-
disabled:
|
|
1444
|
-
onClick: () => void
|
|
1471
|
+
disabled: Be.isPending,
|
|
1472
|
+
onClick: () => void _n(e),
|
|
1445
1473
|
className: "rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
1446
1474
|
children: m(e)
|
|
1447
|
-
}, e)),
|
|
1475
|
+
}, e)), Fe[_.status].length === 0 && /* @__PURE__ */ C("p", {
|
|
1448
1476
|
className: "text-xs text-text-secondary",
|
|
1449
1477
|
children: "No further transitions available."
|
|
1450
1478
|
})]
|
|
1451
1479
|
}),
|
|
1452
|
-
_.status !== "ARCHIVED" && /* @__PURE__ */
|
|
1480
|
+
_.status !== "ARCHIVED" && /* @__PURE__ */ w("button", {
|
|
1453
1481
|
type: "button",
|
|
1454
|
-
disabled:
|
|
1455
|
-
onClick: () => void
|
|
1482
|
+
disabled: k.isPending,
|
|
1483
|
+
onClick: () => void vn(),
|
|
1456
1484
|
className: "mt-3 inline-flex items-center gap-2 rounded-lg border border-status-error-border px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:opacity-50 transition-colors",
|
|
1457
|
-
children: [/* @__PURE__ */
|
|
1485
|
+
children: [/* @__PURE__ */ C(he, { className: "h-3.5 w-3.5" }), "Archive Title"]
|
|
1458
1486
|
})
|
|
1459
1487
|
]
|
|
1460
1488
|
}),
|
|
1461
|
-
/* @__PURE__ */ T
|
|
1489
|
+
/* @__PURE__ */ w(T, {
|
|
1462
1490
|
treatment: "metric",
|
|
1463
1491
|
className: "border-border-seam p-5",
|
|
1464
|
-
children: [/* @__PURE__ */
|
|
1492
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
1465
1493
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
1466
1494
|
children: "Details"
|
|
1467
|
-
}), /* @__PURE__ */
|
|
1495
|
+
}), /* @__PURE__ */ w("dl", {
|
|
1468
1496
|
className: "space-y-2",
|
|
1469
1497
|
children: [$.map((e) => {
|
|
1470
1498
|
let t = e.icon;
|
|
1471
|
-
return /* @__PURE__ */
|
|
1499
|
+
return /* @__PURE__ */ w("div", {
|
|
1472
1500
|
className: "flex items-center justify-between text-sm",
|
|
1473
|
-
children: [/* @__PURE__ */
|
|
1501
|
+
children: [/* @__PURE__ */ w("dt", {
|
|
1474
1502
|
className: "flex items-center gap-2 text-text-secondary",
|
|
1475
|
-
children: [/* @__PURE__ */
|
|
1476
|
-
}), /* @__PURE__ */
|
|
1503
|
+
children: [/* @__PURE__ */ C(t, { className: "h-3.5 w-3.5" }), e.label]
|
|
1504
|
+
}), /* @__PURE__ */ C("dd", {
|
|
1477
1505
|
className: "font-medium text-text-primary",
|
|
1478
1506
|
children: e.value
|
|
1479
1507
|
})]
|
|
1480
1508
|
}, e.label);
|
|
1481
|
-
}), _.aiDisclosure && /* @__PURE__ */
|
|
1509
|
+
}), _.aiDisclosure && /* @__PURE__ */ w("div", {
|
|
1482
1510
|
className: "flex items-center gap-2 pt-1 text-sm text-text-secondary",
|
|
1483
|
-
children: [/* @__PURE__ */
|
|
1511
|
+
children: [/* @__PURE__ */ C(Ee, { className: "h-3.5 w-3.5" }), "Contains AI-generated content"]
|
|
1484
1512
|
})]
|
|
1485
1513
|
})]
|
|
1486
1514
|
}),
|
|
1487
|
-
(_.genres.length > 0 || _.tags.length > 0) && /* @__PURE__ */ T
|
|
1515
|
+
(_.genres.length > 0 || _.tags.length > 0) && /* @__PURE__ */ w(T, {
|
|
1488
1516
|
treatment: "metric",
|
|
1489
1517
|
className: "border-border-seam p-5",
|
|
1490
|
-
children: [_.genres.length > 0 && /* @__PURE__ */
|
|
1518
|
+
children: [_.genres.length > 0 && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("h3", {
|
|
1491
1519
|
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
1492
1520
|
children: "Genres"
|
|
1493
|
-
}), /* @__PURE__ */
|
|
1521
|
+
}), /* @__PURE__ */ C("div", {
|
|
1494
1522
|
className: "mb-3 flex flex-wrap gap-1.5",
|
|
1495
|
-
children: _.genres.map((e) => /* @__PURE__ */
|
|
1523
|
+
children: _.genres.map((e) => /* @__PURE__ */ C("span", {
|
|
1496
1524
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-primary",
|
|
1497
1525
|
children: e
|
|
1498
1526
|
}, e))
|
|
1499
|
-
})] }), _.tags.length > 0 && /* @__PURE__ */
|
|
1527
|
+
})] }), _.tags.length > 0 && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("h3", {
|
|
1500
1528
|
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
1501
1529
|
children: "Tags"
|
|
1502
|
-
}), /* @__PURE__ */
|
|
1530
|
+
}), /* @__PURE__ */ C("div", {
|
|
1503
1531
|
className: "flex flex-wrap gap-1.5",
|
|
1504
|
-
children: _.tags.map((e) => /* @__PURE__ */
|
|
1532
|
+
children: _.tags.map((e) => /* @__PURE__ */ C("span", {
|
|
1505
1533
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
1506
1534
|
children: e
|
|
1507
1535
|
}, e))
|