@burdenoff/microfe-hookmovies 2026.705.2 → 2026.706.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/hookmovies/hooks/index.js +1 -0
- package/dist/hookmovies/hooks/useFiles.js +66 -0
- package/dist/hookmovies/hooks/useFiles.js.map +1 -0
- package/dist/hookmovies/hooks/useHookMoviesApi.js +118 -32
- package/dist/hookmovies/hooks/useHookMoviesApi.js.map +1 -1
- package/dist/hookmovies/pages/HomePage.js +2 -2
- package/dist/hookmovies/pages/HomePage.js.map +1 -1
- package/dist/hookmovies/pages/auditions/AuditionDetailPage.js +100 -45
- package/dist/hookmovies/pages/auditions/AuditionDetailPage.js.map +1 -1
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js +942 -266
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js.map +1 -1
- package/dist/hookmovies/pages/catalog/TitlesPage.js +95 -74
- package/dist/hookmovies/pages/catalog/TitlesPage.js.map +1 -1
- package/dist/hookmovies/pages/distribution/RightsWindowsPage.js +1 -1
- package/dist/hookmovies/pages/distribution/RightsWindowsPage.js.map +1 -1
- package/dist/hookmovies/pages/library/EntitlementsPage.js +273 -75
- package/dist/hookmovies/pages/library/EntitlementsPage.js.map +1 -1
- package/dist/hookmovies/pages/library/ListsPage.js +186 -106
- package/dist/hookmovies/pages/library/ListsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,323 +1,999 @@
|
|
|
1
1
|
import { useHookMovies as e } from "../../context/HookMoviesContext.js";
|
|
2
2
|
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
3
|
import { StatusBadge as n } from "../../components/StatusBadge.js";
|
|
4
|
-
import { useArchiveTitle as
|
|
5
|
-
import { formatDate as
|
|
6
|
-
import { ErrorState as
|
|
7
|
-
import { RatingDisplay as
|
|
8
|
-
import { useState as
|
|
9
|
-
import { Archive as
|
|
10
|
-
import { useParams as
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import { GlassCard as
|
|
4
|
+
import { useAddCredit as ee, useArchiveTitle as te, useCheckEntitlement as ne, useCreateEpisode as re, useCreateSeason as ie, usePeople as ae, useRecordProgress as oe, useReviews as se, useStudios as ce, useTitle as le, useTransitionTitle as ue, useUpdateTitle as de } from "../../hooks/useHookMoviesApi.js";
|
|
5
|
+
import { formatDate as fe, formatEnumLabel as r } from "../../utils/formatters.js";
|
|
6
|
+
import { ErrorState as pe, LoadingState as me } from "../../components/StateViews.js";
|
|
7
|
+
import { RatingDisplay as he } from "../../components/RatingDisplay.js";
|
|
8
|
+
import { useState as i } from "react";
|
|
9
|
+
import { Archive as ge, ArrowLeft as _e, Calendar as ve, CheckCircle2 as ye, Clock as be, Globe as xe, Languages as Se, Layers as Ce, Lock as we, Pencil as Te, Play as Ee, Plus as a, ShieldCheck as De, Sparkles as Oe, Star as ke, UserPlus as Ae, Users as je, X as Me } from "lucide-react";
|
|
10
|
+
import { useParams as Ne } from "react-router-dom";
|
|
11
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
12
|
+
import { GlassCard as l } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
//#region src/hookmovies/pages/catalog/TitleDetailPage.tsx
|
|
14
|
-
var
|
|
15
|
-
DRAFT: [
|
|
16
|
-
"IN_REVIEW",
|
|
17
|
-
"SCHEDULED",
|
|
18
|
-
"PUBLISHED"
|
|
19
|
-
],
|
|
14
|
+
var u = {
|
|
15
|
+
DRAFT: ["IN_REVIEW"],
|
|
20
16
|
IN_REVIEW: [
|
|
21
|
-
"DRAFT",
|
|
22
17
|
"SCHEDULED",
|
|
23
|
-
"PUBLISHED"
|
|
18
|
+
"PUBLISHED",
|
|
19
|
+
"DRAFT"
|
|
24
20
|
],
|
|
25
|
-
SCHEDULED: ["PUBLISHED", "
|
|
21
|
+
SCHEDULED: ["PUBLISHED", "IN_REVIEW"],
|
|
26
22
|
PUBLISHED: ["UNPUBLISHED"],
|
|
27
|
-
UNPUBLISHED: ["PUBLISHED"
|
|
23
|
+
UNPUBLISHED: ["PUBLISHED"],
|
|
28
24
|
ARCHIVED: []
|
|
29
|
-
},
|
|
30
|
-
|
|
25
|
+
}, Pe = [
|
|
26
|
+
"MOVIE",
|
|
27
|
+
"SERIES",
|
|
28
|
+
"SHORT_FILM",
|
|
29
|
+
"DOCUMENTARY",
|
|
30
|
+
"ANIME",
|
|
31
|
+
"SHORT_FORM",
|
|
32
|
+
"LONG_FORM",
|
|
33
|
+
"LIVE_EVENT",
|
|
34
|
+
"TRAILER",
|
|
35
|
+
"COLLECTION",
|
|
36
|
+
"FAST_CHANNEL"
|
|
37
|
+
], Fe = [
|
|
38
|
+
"ACTOR",
|
|
39
|
+
"DIRECTOR",
|
|
40
|
+
"WRITER",
|
|
41
|
+
"PRODUCER",
|
|
42
|
+
"CINEMATOGRAPHER",
|
|
43
|
+
"EDITOR",
|
|
44
|
+
"COMPOSER",
|
|
45
|
+
"VOICE_ACTOR",
|
|
46
|
+
"CREW"
|
|
47
|
+
], d = "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)]", f = "mb-1.5 block text-xs font-medium text-text-secondary", p = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), m = (e) => e.trim() ? new Date(e).toISOString() : void 0, h = () => {
|
|
48
|
+
let { id: h } = Ne(), { navigateTo: g } = e(), { data: _, isLoading: Ie, isError: Le, refetch: Re } = le(h), v = ue(), y = te(), ze = se({ titleId: h }, {
|
|
31
49
|
limit: 10,
|
|
32
50
|
offset: 0
|
|
33
|
-
}),
|
|
34
|
-
|
|
51
|
+
}), b = de(), x = ee(), S = ie(), C = re(), w = oe(), T = ne(h), Be = ce({
|
|
52
|
+
limit: 200,
|
|
53
|
+
offset: 0
|
|
54
|
+
}), [E, D] = i(null), [O, k] = i("none"), [A, j] = i(""), [M, N] = i("MOVIE"), [P, F] = i(""), [I, L] = i(""), [R, z] = i(""), [B, V] = i(""), [Ve, He] = i(""), [H, Ue] = i(""), [U, We] = i(""), [Ge, Ke] = i(""), [qe, Je] = i(""), [Ye, Xe] = i(!1), [Ze, Qe] = i(""), [W, $e] = i(""), [et, tt] = i("ACTOR"), [nt, rt] = i(""), [G, it] = i(""), at = ae({
|
|
55
|
+
limit: 50,
|
|
56
|
+
offset: 0
|
|
57
|
+
}, Ze), [K, ot] = i(""), [st, ct] = i(""), [lt, ut] = i(""), [dt, ft] = i(""), [pt, mt] = i(""), [q, ht] = i(""), [J, gt] = i(""), [_t, vt] = i(""), [Y, yt] = i(""), [bt, xt] = i(""), [St, Ct] = i(!1);
|
|
58
|
+
if (Ie) return /* @__PURE__ */ s(t, {
|
|
35
59
|
title: "Title",
|
|
36
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ s(me, { label: "Loading title…" })
|
|
37
61
|
});
|
|
38
|
-
if (
|
|
62
|
+
if (Le || !_) return /* @__PURE__ */ s(t, {
|
|
39
63
|
title: "Title",
|
|
40
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ s(pe, {
|
|
41
65
|
title: "Title not found",
|
|
42
66
|
message: "This title may have been archived or you may not have access.",
|
|
43
|
-
onRetry: () => void
|
|
67
|
+
onRetry: () => void Re()
|
|
44
68
|
})
|
|
45
69
|
});
|
|
46
|
-
let
|
|
47
|
-
|
|
70
|
+
let X = _.type === "SERIES", Z = () => k("none"), wt = () => {
|
|
71
|
+
D(null), j(_.title), N(_.type), F(_.synopsis ?? ""), L(_.genres.join(", ")), z(_.tags.join(", ")), V(_.originalLanguage ?? ""), He(_.originCountry ?? ""), Ue(_.releaseYear ? String(_.releaseYear) : ""), We(_.runtimeMinutes ? String(_.runtimeMinutes) : ""), Ke(_.certification ?? ""), Je(_.studioId ?? ""), Xe(_.aiDisclosure), k("edit");
|
|
72
|
+
}, Tt = async (e) => {
|
|
73
|
+
D(null);
|
|
48
74
|
try {
|
|
49
|
-
await
|
|
50
|
-
id:
|
|
75
|
+
await v.mutateAsync({
|
|
76
|
+
id: _.id,
|
|
51
77
|
status: e
|
|
52
78
|
});
|
|
53
79
|
} catch (e) {
|
|
54
|
-
|
|
80
|
+
D(e instanceof Error ? e.message : "Transition failed");
|
|
81
|
+
}
|
|
82
|
+
}, Et = async () => {
|
|
83
|
+
D(null);
|
|
84
|
+
try {
|
|
85
|
+
await y.mutateAsync(_.id), g("catalog/titles");
|
|
86
|
+
} catch (e) {
|
|
87
|
+
D(e instanceof Error ? e.message : "Archive failed");
|
|
88
|
+
}
|
|
89
|
+
}, Dt = async (e) => {
|
|
90
|
+
if (e.preventDefault(), D(null), !A.trim()) {
|
|
91
|
+
D("Title is required.");
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
let t = {
|
|
95
|
+
title: A.trim(),
|
|
96
|
+
type: M,
|
|
97
|
+
synopsis: P.trim() || void 0,
|
|
98
|
+
genres: p(I),
|
|
99
|
+
tags: p(R),
|
|
100
|
+
originalLanguage: B.trim() || void 0,
|
|
101
|
+
originCountry: Ve.trim() || void 0,
|
|
102
|
+
releaseYear: H.trim() ? Number(H) : void 0,
|
|
103
|
+
runtimeMinutes: U.trim() ? Number(U) : void 0,
|
|
104
|
+
certification: Ge.trim() || void 0,
|
|
105
|
+
studioId: qe || void 0,
|
|
106
|
+
aiDisclosure: Ye
|
|
107
|
+
};
|
|
108
|
+
try {
|
|
109
|
+
await b.mutateAsync({
|
|
110
|
+
id: _.id,
|
|
111
|
+
input: t
|
|
112
|
+
}), Z();
|
|
113
|
+
} catch (e) {
|
|
114
|
+
D(e instanceof Error ? e.message : "Failed to update title");
|
|
115
|
+
}
|
|
116
|
+
}, Ot = async (e) => {
|
|
117
|
+
if (e.preventDefault(), D(null), !W) {
|
|
118
|
+
D("Select a person to credit.");
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
await x.mutateAsync({
|
|
123
|
+
personId: W,
|
|
124
|
+
titleId: _.id,
|
|
125
|
+
role: et,
|
|
126
|
+
characterName: nt.trim() || void 0,
|
|
127
|
+
billingOrder: G.trim() ? Number(G) : void 0
|
|
128
|
+
}), $e(""), rt(""), it(""), Qe(""), Z();
|
|
129
|
+
} catch (e) {
|
|
130
|
+
D(e instanceof Error ? e.message : "Failed to add credit");
|
|
131
|
+
}
|
|
132
|
+
}, kt = async (e) => {
|
|
133
|
+
if (e.preventDefault(), D(null), !K.trim()) {
|
|
134
|
+
D("Season number is required.");
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
await S.mutateAsync({
|
|
139
|
+
titleId: _.id,
|
|
140
|
+
number: Number(K),
|
|
141
|
+
name: st.trim() || void 0,
|
|
142
|
+
synopsis: lt.trim() || void 0,
|
|
143
|
+
airDate: m(dt)
|
|
144
|
+
}), ot(""), ct(""), ut(""), ft(""), Z();
|
|
145
|
+
} catch (e) {
|
|
146
|
+
D(e instanceof Error ? e.message : "Failed to add season");
|
|
147
|
+
}
|
|
148
|
+
}, At = async (e) => {
|
|
149
|
+
if (e.preventDefault(), D(null), !q.trim()) {
|
|
150
|
+
D("Episode number is required.");
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (!J.trim()) {
|
|
154
|
+
D("Episode name is required.");
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
try {
|
|
158
|
+
await C.mutateAsync({
|
|
159
|
+
titleId: _.id,
|
|
160
|
+
number: Number(q),
|
|
161
|
+
name: J.trim(),
|
|
162
|
+
seasonId: pt || void 0,
|
|
163
|
+
synopsis: _t.trim() || void 0,
|
|
164
|
+
runtimeMinutes: Y.trim() ? Number(Y) : void 0,
|
|
165
|
+
airDate: m(bt)
|
|
166
|
+
}), mt(""), ht(""), gt(""), vt(""), yt(""), xt(""), Z();
|
|
167
|
+
} catch (e) {
|
|
168
|
+
D(e instanceof Error ? e.message : "Failed to add episode");
|
|
169
|
+
}
|
|
170
|
+
}, jt = async () => {
|
|
171
|
+
if (D(null), Ct(!1), !T.data?.entitled) {
|
|
172
|
+
D("You are not entitled to watch this title.");
|
|
173
|
+
return;
|
|
55
174
|
}
|
|
56
|
-
}, H = async () => {
|
|
57
|
-
B(null);
|
|
58
175
|
try {
|
|
59
|
-
await
|
|
176
|
+
await w.mutateAsync({
|
|
177
|
+
titleId: _.id,
|
|
178
|
+
positionSeconds: (_.runtimeMinutes ?? 0) * 60,
|
|
179
|
+
completed: !0,
|
|
180
|
+
lastDevice: "web"
|
|
181
|
+
}), Ct(!0);
|
|
60
182
|
} catch (e) {
|
|
61
|
-
|
|
183
|
+
D(e instanceof Error ? e.message : "Failed to record progress");
|
|
62
184
|
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
icon:
|
|
185
|
+
}, Q = ze.data?.items ?? [], Mt = Q.length > 0 ? Q.reduce((e, t) => e + t.score, 0) / Q.length : null, $ = [];
|
|
186
|
+
_.releaseDate ? $.push({
|
|
187
|
+
icon: ve,
|
|
66
188
|
label: "Release",
|
|
67
|
-
value:
|
|
68
|
-
}) :
|
|
69
|
-
icon:
|
|
189
|
+
value: fe(_.releaseDate)
|
|
190
|
+
}) : _.releaseYear && $.push({
|
|
191
|
+
icon: ve,
|
|
70
192
|
label: "Year",
|
|
71
|
-
value: String(
|
|
72
|
-
}),
|
|
73
|
-
icon:
|
|
193
|
+
value: String(_.releaseYear)
|
|
194
|
+
}), _.runtimeMinutes && $.push({
|
|
195
|
+
icon: be,
|
|
74
196
|
label: "Runtime",
|
|
75
|
-
value: `${
|
|
76
|
-
}),
|
|
77
|
-
icon:
|
|
197
|
+
value: `${_.runtimeMinutes} min`
|
|
198
|
+
}), _.originalLanguage && $.push({
|
|
199
|
+
icon: Se,
|
|
78
200
|
label: "Language",
|
|
79
|
-
value:
|
|
80
|
-
}),
|
|
81
|
-
icon:
|
|
201
|
+
value: _.originalLanguage
|
|
202
|
+
}), _.originCountry && $.push({
|
|
203
|
+
icon: xe,
|
|
82
204
|
label: "Country",
|
|
83
|
-
value:
|
|
84
|
-
}),
|
|
85
|
-
icon:
|
|
205
|
+
value: _.originCountry
|
|
206
|
+
}), _.certification && $.push({
|
|
207
|
+
icon: De,
|
|
86
208
|
label: "Certification",
|
|
87
|
-
value:
|
|
88
|
-
})
|
|
89
|
-
|
|
209
|
+
value: _.certification
|
|
210
|
+
});
|
|
211
|
+
let Nt = at.data?.items ?? [];
|
|
212
|
+
return /* @__PURE__ */ c(t, {
|
|
213
|
+
title: /* @__PURE__ */ c("span", {
|
|
90
214
|
className: "flex items-center gap-3",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ s("button", {
|
|
92
216
|
type: "button",
|
|
93
|
-
onClick: () =>
|
|
217
|
+
onClick: () => g("catalog/titles"),
|
|
94
218
|
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
95
219
|
"aria-label": "Back to catalog",
|
|
96
|
-
children: /* @__PURE__ */
|
|
97
|
-
}),
|
|
220
|
+
children: /* @__PURE__ */ s(_e, { className: "h-5 w-5" })
|
|
221
|
+
}), _.title]
|
|
222
|
+
}),
|
|
223
|
+
description: `${r(_.type)}${_.studio ? ` · ${_.studio.name}` : ""}`,
|
|
224
|
+
actions: /* @__PURE__ */ c("div", {
|
|
225
|
+
className: "flex items-center gap-2",
|
|
226
|
+
children: [/* @__PURE__ */ c("button", {
|
|
227
|
+
type: "button",
|
|
228
|
+
onClick: wt,
|
|
229
|
+
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",
|
|
230
|
+
children: [/* @__PURE__ */ s(Te, { className: "h-3.5 w-3.5" }), "Edit"]
|
|
231
|
+
}), /* @__PURE__ */ s(n, { status: _.status })]
|
|
98
232
|
}),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
233
|
+
children: [
|
|
234
|
+
E && /* @__PURE__ */ s("div", {
|
|
235
|
+
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",
|
|
236
|
+
children: E
|
|
237
|
+
}),
|
|
238
|
+
O === "edit" && /* @__PURE__ */ c(l, {
|
|
239
|
+
treatment: "metric",
|
|
240
|
+
className: "mb-6 border-border-seam p-5",
|
|
241
|
+
children: [/* @__PURE__ */ c("div", {
|
|
242
|
+
className: "mb-4 flex items-center justify-between",
|
|
243
|
+
children: [/* @__PURE__ */ s("h2", {
|
|
244
|
+
className: "text-sm font-semibold text-text-primary",
|
|
245
|
+
children: "Edit title"
|
|
246
|
+
}), /* @__PURE__ */ s("button", {
|
|
247
|
+
type: "button",
|
|
248
|
+
onClick: Z,
|
|
249
|
+
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
250
|
+
"aria-label": "Close edit form",
|
|
251
|
+
children: /* @__PURE__ */ s(Me, { className: "h-4 w-4" })
|
|
252
|
+
})]
|
|
253
|
+
}), /* @__PURE__ */ c("form", {
|
|
254
|
+
onSubmit: Dt,
|
|
255
|
+
className: "space-y-5",
|
|
256
|
+
children: [
|
|
257
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
258
|
+
htmlFor: "edit-title",
|
|
259
|
+
className: f,
|
|
260
|
+
children: "Title *"
|
|
261
|
+
}), /* @__PURE__ */ s("input", {
|
|
262
|
+
id: "edit-title",
|
|
263
|
+
type: "text",
|
|
264
|
+
value: A,
|
|
265
|
+
onChange: (e) => j(e.target.value),
|
|
266
|
+
className: d,
|
|
267
|
+
required: !0
|
|
268
|
+
})] }),
|
|
269
|
+
/* @__PURE__ */ c("div", {
|
|
270
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
271
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
272
|
+
htmlFor: "edit-type",
|
|
273
|
+
className: f,
|
|
274
|
+
children: "Type"
|
|
275
|
+
}), /* @__PURE__ */ s("select", {
|
|
276
|
+
id: "edit-type",
|
|
277
|
+
value: M,
|
|
278
|
+
onChange: (e) => N(e.target.value),
|
|
279
|
+
className: d,
|
|
280
|
+
children: Pe.map((e) => /* @__PURE__ */ s("option", {
|
|
281
|
+
value: e,
|
|
282
|
+
children: r(e)
|
|
283
|
+
}, e))
|
|
284
|
+
})] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
285
|
+
htmlFor: "edit-studio",
|
|
286
|
+
className: f,
|
|
287
|
+
children: "Studio"
|
|
288
|
+
}), /* @__PURE__ */ c("select", {
|
|
289
|
+
id: "edit-studio",
|
|
290
|
+
value: qe,
|
|
291
|
+
onChange: (e) => Je(e.target.value),
|
|
292
|
+
className: d,
|
|
293
|
+
children: [/* @__PURE__ */ s("option", {
|
|
294
|
+
value: "",
|
|
295
|
+
children: "No studio"
|
|
296
|
+
}), (Be.data?.items ?? []).map((e) => /* @__PURE__ */ s("option", {
|
|
297
|
+
value: e.id,
|
|
298
|
+
children: e.name
|
|
299
|
+
}, e.id))]
|
|
300
|
+
})] })]
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
303
|
+
htmlFor: "edit-synopsis",
|
|
304
|
+
className: f,
|
|
114
305
|
children: "Synopsis"
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
306
|
+
}), /* @__PURE__ */ s("textarea", {
|
|
307
|
+
id: "edit-synopsis",
|
|
308
|
+
value: P,
|
|
309
|
+
onChange: (e) => F(e.target.value),
|
|
310
|
+
rows: 4,
|
|
311
|
+
className: d
|
|
312
|
+
})] }),
|
|
313
|
+
/* @__PURE__ */ c("div", {
|
|
314
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
315
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
316
|
+
htmlFor: "edit-genres",
|
|
317
|
+
className: f,
|
|
318
|
+
children: "Genres (comma-separated)"
|
|
319
|
+
}), /* @__PURE__ */ s("input", {
|
|
320
|
+
id: "edit-genres",
|
|
321
|
+
type: "text",
|
|
322
|
+
value: I,
|
|
323
|
+
onChange: (e) => L(e.target.value),
|
|
324
|
+
placeholder: "Drama, Thriller",
|
|
325
|
+
className: d
|
|
326
|
+
})] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
327
|
+
htmlFor: "edit-tags",
|
|
328
|
+
className: f,
|
|
329
|
+
children: "Tags (comma-separated)"
|
|
330
|
+
}), /* @__PURE__ */ s("input", {
|
|
331
|
+
id: "edit-tags",
|
|
332
|
+
type: "text",
|
|
333
|
+
value: R,
|
|
334
|
+
onChange: (e) => z(e.target.value),
|
|
335
|
+
placeholder: "award-winner, indie",
|
|
336
|
+
className: d
|
|
337
|
+
})] })]
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ c("div", {
|
|
340
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
125
341
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
342
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
343
|
+
htmlFor: "edit-language",
|
|
344
|
+
className: f,
|
|
345
|
+
children: "Original Language"
|
|
346
|
+
}), /* @__PURE__ */ s("input", {
|
|
347
|
+
id: "edit-language",
|
|
348
|
+
type: "text",
|
|
349
|
+
value: B,
|
|
350
|
+
onChange: (e) => V(e.target.value),
|
|
351
|
+
placeholder: "en",
|
|
352
|
+
className: d
|
|
353
|
+
})] }),
|
|
354
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
355
|
+
htmlFor: "edit-country",
|
|
356
|
+
className: f,
|
|
357
|
+
children: "Origin Country"
|
|
358
|
+
}), /* @__PURE__ */ s("input", {
|
|
359
|
+
id: "edit-country",
|
|
360
|
+
type: "text",
|
|
361
|
+
value: Ve,
|
|
362
|
+
onChange: (e) => He(e.target.value),
|
|
363
|
+
placeholder: "US",
|
|
364
|
+
className: d
|
|
365
|
+
})] }),
|
|
366
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
367
|
+
htmlFor: "edit-certification",
|
|
368
|
+
className: f,
|
|
369
|
+
children: "Certification"
|
|
370
|
+
}), /* @__PURE__ */ s("input", {
|
|
371
|
+
id: "edit-certification",
|
|
372
|
+
type: "text",
|
|
373
|
+
value: Ge,
|
|
374
|
+
onChange: (e) => Ke(e.target.value),
|
|
375
|
+
placeholder: "PG-13",
|
|
376
|
+
className: d
|
|
377
|
+
})] })
|
|
130
378
|
]
|
|
131
|
-
}),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ c("div", {
|
|
381
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
382
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
383
|
+
htmlFor: "edit-year",
|
|
384
|
+
className: f,
|
|
385
|
+
children: "Release Year"
|
|
386
|
+
}), /* @__PURE__ */ s("input", {
|
|
387
|
+
id: "edit-year",
|
|
388
|
+
type: "number",
|
|
389
|
+
value: H,
|
|
390
|
+
onChange: (e) => Ue(e.target.value),
|
|
391
|
+
placeholder: "2026",
|
|
392
|
+
className: d
|
|
393
|
+
})] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
394
|
+
htmlFor: "edit-runtime",
|
|
395
|
+
className: f,
|
|
396
|
+
children: "Runtime (minutes)"
|
|
397
|
+
}), /* @__PURE__ */ s("input", {
|
|
398
|
+
id: "edit-runtime",
|
|
399
|
+
type: "number",
|
|
400
|
+
value: U,
|
|
401
|
+
onChange: (e) => We(e.target.value),
|
|
402
|
+
placeholder: "120",
|
|
403
|
+
className: d
|
|
404
|
+
})] })]
|
|
405
|
+
}),
|
|
406
|
+
/* @__PURE__ */ c("label", {
|
|
407
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
408
|
+
children: [/* @__PURE__ */ s("input", {
|
|
409
|
+
type: "checkbox",
|
|
410
|
+
checked: Ye,
|
|
411
|
+
onChange: (e) => Xe(e.target.checked),
|
|
412
|
+
className: "h-4 w-4 rounded border-border-subtle"
|
|
413
|
+
}), "This title contains AI-generated or AI-altered content"]
|
|
414
|
+
}),
|
|
415
|
+
/* @__PURE__ */ c("div", {
|
|
416
|
+
className: "flex items-center gap-3 pt-1",
|
|
417
|
+
children: [/* @__PURE__ */ s("button", {
|
|
418
|
+
type: "submit",
|
|
419
|
+
disabled: b.isPending,
|
|
420
|
+
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",
|
|
421
|
+
children: b.isPending ? "Saving…" : "Save changes"
|
|
422
|
+
}), /* @__PURE__ */ s("button", {
|
|
423
|
+
type: "button",
|
|
424
|
+
onClick: Z,
|
|
425
|
+
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
426
|
+
children: "Cancel"
|
|
427
|
+
})]
|
|
428
|
+
})
|
|
429
|
+
]
|
|
430
|
+
})]
|
|
431
|
+
}),
|
|
432
|
+
/* @__PURE__ */ c("div", {
|
|
433
|
+
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
434
|
+
children: [/* @__PURE__ */ c("div", {
|
|
435
|
+
className: "space-y-6 lg:col-span-2",
|
|
436
|
+
children: [
|
|
437
|
+
_.synopsis && /* @__PURE__ */ c(l, {
|
|
438
|
+
treatment: "metric",
|
|
439
|
+
className: "border-border-seam p-5",
|
|
440
|
+
children: [/* @__PURE__ */ s("h2", {
|
|
441
|
+
className: "mb-2 text-sm font-semibold text-text-primary",
|
|
442
|
+
children: "Synopsis"
|
|
443
|
+
}), /* @__PURE__ */ s("p", {
|
|
444
|
+
className: "text-sm leading-relaxed text-text-secondary",
|
|
445
|
+
children: _.synopsis
|
|
446
|
+
})]
|
|
447
|
+
}),
|
|
448
|
+
/* @__PURE__ */ c(l, {
|
|
449
|
+
treatment: "metric",
|
|
450
|
+
className: "border-border-seam p-5",
|
|
159
451
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
452
|
+
/* @__PURE__ */ c("div", {
|
|
453
|
+
className: "mb-3 flex items-center justify-between gap-3",
|
|
454
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
455
|
+
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ s(je, { className: "h-4 w-4" }),
|
|
458
|
+
"Cast & Crew (",
|
|
459
|
+
_.credits.length,
|
|
460
|
+
")"
|
|
461
|
+
]
|
|
462
|
+
}), /* @__PURE__ */ c("button", {
|
|
463
|
+
type: "button",
|
|
464
|
+
onClick: () => {
|
|
465
|
+
D(null), k(O === "credit" ? "none" : "credit");
|
|
466
|
+
},
|
|
467
|
+
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",
|
|
468
|
+
children: [/* @__PURE__ */ s(Ae, { className: "h-3.5 w-3.5" }), "Add credit"]
|
|
469
|
+
})]
|
|
470
|
+
}),
|
|
471
|
+
O === "credit" && /* @__PURE__ */ c("form", {
|
|
472
|
+
onSubmit: Ot,
|
|
473
|
+
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
474
|
+
children: [
|
|
475
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
476
|
+
htmlFor: "credit-search",
|
|
477
|
+
className: f,
|
|
478
|
+
children: "Search people"
|
|
479
|
+
}), /* @__PURE__ */ s("input", {
|
|
480
|
+
id: "credit-search",
|
|
481
|
+
type: "text",
|
|
482
|
+
value: Ze,
|
|
483
|
+
onChange: (e) => Qe(e.target.value),
|
|
484
|
+
placeholder: "Type a name to filter…",
|
|
485
|
+
className: d
|
|
486
|
+
})] }),
|
|
487
|
+
/* @__PURE__ */ c("div", {
|
|
488
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
489
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
490
|
+
htmlFor: "credit-person",
|
|
491
|
+
className: f,
|
|
492
|
+
children: "Person *"
|
|
493
|
+
}), /* @__PURE__ */ c("select", {
|
|
494
|
+
id: "credit-person",
|
|
495
|
+
value: W,
|
|
496
|
+
onChange: (e) => $e(e.target.value),
|
|
497
|
+
className: d,
|
|
498
|
+
required: !0,
|
|
499
|
+
children: [/* @__PURE__ */ s("option", {
|
|
500
|
+
value: "",
|
|
501
|
+
children: at.isLoading ? "Loading people…" : Nt.length === 0 ? "No people found" : "Select a person"
|
|
502
|
+
}), Nt.map((e) => /* @__PURE__ */ c("option", {
|
|
503
|
+
value: e.id,
|
|
504
|
+
children: [e.name, e.knownFor ? ` — ${e.knownFor}` : ""]
|
|
505
|
+
}, e.id))]
|
|
506
|
+
})] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
507
|
+
htmlFor: "credit-role",
|
|
508
|
+
className: f,
|
|
509
|
+
children: "Role"
|
|
510
|
+
}), /* @__PURE__ */ s("select", {
|
|
511
|
+
id: "credit-role",
|
|
512
|
+
value: et,
|
|
513
|
+
onChange: (e) => tt(e.target.value),
|
|
514
|
+
className: d,
|
|
515
|
+
children: Fe.map((e) => /* @__PURE__ */ s("option", {
|
|
516
|
+
value: e,
|
|
517
|
+
children: r(e)
|
|
518
|
+
}, e))
|
|
519
|
+
})] })]
|
|
520
|
+
}),
|
|
521
|
+
/* @__PURE__ */ c("div", {
|
|
522
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
523
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
524
|
+
htmlFor: "credit-character",
|
|
525
|
+
className: f,
|
|
526
|
+
children: "Character name"
|
|
527
|
+
}), /* @__PURE__ */ s("input", {
|
|
528
|
+
id: "credit-character",
|
|
529
|
+
type: "text",
|
|
530
|
+
value: nt,
|
|
531
|
+
onChange: (e) => rt(e.target.value),
|
|
532
|
+
placeholder: "e.g. Captain Rao",
|
|
533
|
+
className: d
|
|
534
|
+
})] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
535
|
+
htmlFor: "credit-billing",
|
|
536
|
+
className: f,
|
|
537
|
+
children: "Billing order"
|
|
538
|
+
}), /* @__PURE__ */ s("input", {
|
|
539
|
+
id: "credit-billing",
|
|
540
|
+
type: "number",
|
|
541
|
+
value: G,
|
|
542
|
+
onChange: (e) => it(e.target.value),
|
|
543
|
+
placeholder: "1",
|
|
544
|
+
className: d
|
|
545
|
+
})] })]
|
|
546
|
+
}),
|
|
547
|
+
/* @__PURE__ */ c("div", {
|
|
548
|
+
className: "flex items-center gap-3",
|
|
549
|
+
children: [/* @__PURE__ */ c("button", {
|
|
550
|
+
type: "submit",
|
|
551
|
+
disabled: x.isPending,
|
|
552
|
+
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",
|
|
553
|
+
children: [/* @__PURE__ */ s(a, { className: "h-4 w-4" }), x.isPending ? "Adding…" : "Add credit"]
|
|
554
|
+
}), /* @__PURE__ */ s("button", {
|
|
555
|
+
type: "button",
|
|
556
|
+
onClick: Z,
|
|
557
|
+
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
558
|
+
children: "Cancel"
|
|
559
|
+
})]
|
|
560
|
+
})
|
|
561
|
+
]
|
|
562
|
+
}),
|
|
563
|
+
_.credits.length === 0 ? /* @__PURE__ */ s("p", {
|
|
564
|
+
className: "text-sm text-text-secondary",
|
|
565
|
+
children: "No credits recorded yet."
|
|
566
|
+
}) : /* @__PURE__ */ s("ul", {
|
|
567
|
+
className: "divide-y divide-border-seam",
|
|
568
|
+
children: [..._.credits].sort((e, t) => e.billingOrder - t.billingOrder).map((e) => /* @__PURE__ */ c("li", {
|
|
569
|
+
className: "flex items-center justify-between py-2",
|
|
570
|
+
children: [/* @__PURE__ */ c("div", {
|
|
571
|
+
className: "min-w-0",
|
|
572
|
+
children: [/* @__PURE__ */ s("p", {
|
|
573
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
574
|
+
children: e.person?.name ?? "Unknown person"
|
|
575
|
+
}), e.characterName && /* @__PURE__ */ c("p", {
|
|
576
|
+
className: "text-xs text-text-secondary",
|
|
577
|
+
children: ["as ", e.characterName]
|
|
578
|
+
})]
|
|
579
|
+
}), /* @__PURE__ */ s("span", {
|
|
580
|
+
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
581
|
+
children: r(e.role)
|
|
582
|
+
})]
|
|
583
|
+
}, e.id))
|
|
584
|
+
})
|
|
164
585
|
]
|
|
165
|
-
}),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
586
|
+
}),
|
|
587
|
+
/* @__PURE__ */ c(l, {
|
|
588
|
+
treatment: "metric",
|
|
589
|
+
className: "border-border-seam p-5",
|
|
590
|
+
children: [
|
|
591
|
+
/* @__PURE__ */ c("div", {
|
|
592
|
+
className: "mb-3 flex flex-wrap items-center justify-between gap-3",
|
|
593
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
594
|
+
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
173
595
|
children: [
|
|
174
|
-
|
|
175
|
-
"
|
|
176
|
-
|
|
596
|
+
/* @__PURE__ */ s(Ce, { className: "h-4 w-4" }),
|
|
597
|
+
"Episodes (",
|
|
598
|
+
_.episodes.length,
|
|
599
|
+
")"
|
|
177
600
|
]
|
|
178
|
-
}),
|
|
179
|
-
className: "
|
|
180
|
-
children:
|
|
601
|
+
}), X && /* @__PURE__ */ c("div", {
|
|
602
|
+
className: "flex items-center gap-2",
|
|
603
|
+
children: [/* @__PURE__ */ c("button", {
|
|
604
|
+
type: "button",
|
|
605
|
+
onClick: () => {
|
|
606
|
+
D(null), k(O === "season" ? "none" : "season");
|
|
607
|
+
},
|
|
608
|
+
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",
|
|
609
|
+
children: [/* @__PURE__ */ s(a, { className: "h-3.5 w-3.5" }), "Add season"]
|
|
610
|
+
}), /* @__PURE__ */ c("button", {
|
|
611
|
+
type: "button",
|
|
612
|
+
onClick: () => {
|
|
613
|
+
D(null), k(O === "episode" ? "none" : "episode");
|
|
614
|
+
},
|
|
615
|
+
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",
|
|
616
|
+
children: [/* @__PURE__ */ s(a, { className: "h-3.5 w-3.5" }), "Add episode"]
|
|
617
|
+
})]
|
|
181
618
|
})]
|
|
182
|
-
}),
|
|
183
|
-
|
|
184
|
-
|
|
619
|
+
}),
|
|
620
|
+
X && O === "season" && /* @__PURE__ */ c("form", {
|
|
621
|
+
onSubmit: kt,
|
|
622
|
+
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
623
|
+
children: [
|
|
624
|
+
/* @__PURE__ */ c("div", {
|
|
625
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
626
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
627
|
+
htmlFor: "season-number",
|
|
628
|
+
className: f,
|
|
629
|
+
children: "Season number *"
|
|
630
|
+
}), /* @__PURE__ */ s("input", {
|
|
631
|
+
id: "season-number",
|
|
632
|
+
type: "number",
|
|
633
|
+
value: K,
|
|
634
|
+
onChange: (e) => ot(e.target.value),
|
|
635
|
+
placeholder: "1",
|
|
636
|
+
className: d,
|
|
637
|
+
required: !0
|
|
638
|
+
})] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
639
|
+
htmlFor: "season-name",
|
|
640
|
+
className: f,
|
|
641
|
+
children: "Name"
|
|
642
|
+
}), /* @__PURE__ */ s("input", {
|
|
643
|
+
id: "season-name",
|
|
644
|
+
type: "text",
|
|
645
|
+
value: st,
|
|
646
|
+
onChange: (e) => ct(e.target.value),
|
|
647
|
+
placeholder: "Season 1",
|
|
648
|
+
className: d
|
|
649
|
+
})] })]
|
|
650
|
+
}),
|
|
651
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
652
|
+
htmlFor: "season-synopsis",
|
|
653
|
+
className: f,
|
|
654
|
+
children: "Synopsis"
|
|
655
|
+
}), /* @__PURE__ */ s("textarea", {
|
|
656
|
+
id: "season-synopsis",
|
|
657
|
+
value: lt,
|
|
658
|
+
onChange: (e) => ut(e.target.value),
|
|
659
|
+
rows: 3,
|
|
660
|
+
className: d
|
|
661
|
+
})] }),
|
|
662
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
663
|
+
htmlFor: "season-airdate",
|
|
664
|
+
className: f,
|
|
665
|
+
children: "Air date"
|
|
666
|
+
}), /* @__PURE__ */ s("input", {
|
|
667
|
+
id: "season-airdate",
|
|
668
|
+
type: "date",
|
|
669
|
+
value: dt,
|
|
670
|
+
onChange: (e) => ft(e.target.value),
|
|
671
|
+
className: d
|
|
672
|
+
})] }),
|
|
673
|
+
/* @__PURE__ */ c("div", {
|
|
674
|
+
className: "flex items-center gap-3",
|
|
675
|
+
children: [/* @__PURE__ */ c("button", {
|
|
676
|
+
type: "submit",
|
|
677
|
+
disabled: S.isPending,
|
|
678
|
+
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",
|
|
679
|
+
children: [/* @__PURE__ */ s(a, { className: "h-4 w-4" }), S.isPending ? "Adding…" : "Add season"]
|
|
680
|
+
}), /* @__PURE__ */ s("button", {
|
|
681
|
+
type: "button",
|
|
682
|
+
onClick: Z,
|
|
683
|
+
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
684
|
+
children: "Cancel"
|
|
685
|
+
})]
|
|
686
|
+
})
|
|
687
|
+
]
|
|
688
|
+
}),
|
|
689
|
+
X && O === "episode" && /* @__PURE__ */ c("form", {
|
|
690
|
+
onSubmit: At,
|
|
691
|
+
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
692
|
+
children: [
|
|
693
|
+
/* @__PURE__ */ c("div", {
|
|
694
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
695
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
696
|
+
htmlFor: "episode-season",
|
|
697
|
+
className: f,
|
|
698
|
+
children: "Season"
|
|
699
|
+
}), /* @__PURE__ */ c("select", {
|
|
700
|
+
id: "episode-season",
|
|
701
|
+
value: pt,
|
|
702
|
+
onChange: (e) => mt(e.target.value),
|
|
703
|
+
className: d,
|
|
704
|
+
children: [/* @__PURE__ */ s("option", {
|
|
705
|
+
value: "",
|
|
706
|
+
children: "No season"
|
|
707
|
+
}), [..._.seasons].sort((e, t) => e.number - t.number).map((e) => /* @__PURE__ */ s("option", {
|
|
708
|
+
value: e.id,
|
|
709
|
+
children: e.name ? `${e.number}. ${e.name}` : `Season ${e.number}`
|
|
710
|
+
}, e.id))]
|
|
711
|
+
})] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
712
|
+
htmlFor: "episode-number",
|
|
713
|
+
className: f,
|
|
714
|
+
children: "Episode number *"
|
|
715
|
+
}), /* @__PURE__ */ s("input", {
|
|
716
|
+
id: "episode-number",
|
|
717
|
+
type: "number",
|
|
718
|
+
value: q,
|
|
719
|
+
onChange: (e) => ht(e.target.value),
|
|
720
|
+
placeholder: "1",
|
|
721
|
+
className: d,
|
|
722
|
+
required: !0
|
|
723
|
+
})] })]
|
|
724
|
+
}),
|
|
725
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
726
|
+
htmlFor: "episode-name",
|
|
727
|
+
className: f,
|
|
728
|
+
children: "Name *"
|
|
729
|
+
}), /* @__PURE__ */ s("input", {
|
|
730
|
+
id: "episode-name",
|
|
731
|
+
type: "text",
|
|
732
|
+
value: J,
|
|
733
|
+
onChange: (e) => gt(e.target.value),
|
|
734
|
+
placeholder: "Pilot",
|
|
735
|
+
className: d,
|
|
736
|
+
required: !0
|
|
737
|
+
})] }),
|
|
738
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
739
|
+
htmlFor: "episode-synopsis",
|
|
740
|
+
className: f,
|
|
741
|
+
children: "Synopsis"
|
|
742
|
+
}), /* @__PURE__ */ s("textarea", {
|
|
743
|
+
id: "episode-synopsis",
|
|
744
|
+
value: _t,
|
|
745
|
+
onChange: (e) => vt(e.target.value),
|
|
746
|
+
rows: 3,
|
|
747
|
+
className: d
|
|
748
|
+
})] }),
|
|
749
|
+
/* @__PURE__ */ c("div", {
|
|
750
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
751
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
752
|
+
htmlFor: "episode-runtime",
|
|
753
|
+
className: f,
|
|
754
|
+
children: "Runtime (minutes)"
|
|
755
|
+
}), /* @__PURE__ */ s("input", {
|
|
756
|
+
id: "episode-runtime",
|
|
757
|
+
type: "number",
|
|
758
|
+
value: Y,
|
|
759
|
+
onChange: (e) => yt(e.target.value),
|
|
760
|
+
placeholder: "45",
|
|
761
|
+
className: d
|
|
762
|
+
})] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
|
|
763
|
+
htmlFor: "episode-airdate",
|
|
764
|
+
className: f,
|
|
765
|
+
children: "Air date"
|
|
766
|
+
}), /* @__PURE__ */ s("input", {
|
|
767
|
+
id: "episode-airdate",
|
|
768
|
+
type: "date",
|
|
769
|
+
value: bt,
|
|
770
|
+
onChange: (e) => xt(e.target.value),
|
|
771
|
+
className: d
|
|
772
|
+
})] })]
|
|
773
|
+
}),
|
|
774
|
+
/* @__PURE__ */ c("div", {
|
|
775
|
+
className: "flex items-center gap-3",
|
|
776
|
+
children: [/* @__PURE__ */ c("button", {
|
|
777
|
+
type: "submit",
|
|
778
|
+
disabled: C.isPending,
|
|
779
|
+
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",
|
|
780
|
+
children: [/* @__PURE__ */ s(a, { className: "h-4 w-4" }), C.isPending ? "Adding…" : "Add episode"]
|
|
781
|
+
}), /* @__PURE__ */ s("button", {
|
|
782
|
+
type: "button",
|
|
783
|
+
onClick: Z,
|
|
784
|
+
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
785
|
+
children: "Cancel"
|
|
786
|
+
})]
|
|
787
|
+
})
|
|
788
|
+
]
|
|
789
|
+
}),
|
|
790
|
+
_.episodes.length === 0 ? /* @__PURE__ */ s("p", {
|
|
791
|
+
className: "text-sm text-text-secondary",
|
|
792
|
+
children: X ? "No episodes yet. Add a season, then episodes, to build out this series." : "No episodes recorded for this title."
|
|
793
|
+
}) : /* @__PURE__ */ s("ul", {
|
|
794
|
+
className: "divide-y divide-border-seam",
|
|
795
|
+
children: [..._.episodes].sort((e, t) => e.number - t.number).map((e) => /* @__PURE__ */ c("li", {
|
|
796
|
+
className: "flex items-center justify-between py-2",
|
|
797
|
+
children: [/* @__PURE__ */ c("div", {
|
|
798
|
+
className: "min-w-0",
|
|
799
|
+
children: [/* @__PURE__ */ c("p", {
|
|
800
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
801
|
+
children: [
|
|
802
|
+
e.number,
|
|
803
|
+
". ",
|
|
804
|
+
e.name
|
|
805
|
+
]
|
|
806
|
+
}), e.synopsis && /* @__PURE__ */ s("p", {
|
|
807
|
+
className: "line-clamp-1 text-xs text-text-secondary",
|
|
808
|
+
children: e.synopsis
|
|
809
|
+
})]
|
|
810
|
+
}), e.runtimeMinutes && /* @__PURE__ */ c("span", {
|
|
811
|
+
className: "text-xs text-text-secondary",
|
|
812
|
+
children: [e.runtimeMinutes, " min"]
|
|
813
|
+
})]
|
|
814
|
+
}, e.id))
|
|
815
|
+
})
|
|
816
|
+
]
|
|
817
|
+
}),
|
|
818
|
+
/* @__PURE__ */ c(l, {
|
|
819
|
+
treatment: "metric",
|
|
820
|
+
className: "border-border-seam p-5",
|
|
821
|
+
children: [/* @__PURE__ */ c("div", {
|
|
822
|
+
className: "mb-3 flex items-center justify-between",
|
|
823
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
824
|
+
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
825
|
+
children: [
|
|
826
|
+
/* @__PURE__ */ s(ke, { className: "h-4 w-4" }),
|
|
827
|
+
"Reviews (",
|
|
828
|
+
Q.length,
|
|
829
|
+
")"
|
|
830
|
+
]
|
|
831
|
+
}), Mt !== null && /* @__PURE__ */ s(he, {
|
|
832
|
+
value: Mt / 2,
|
|
833
|
+
count: Q.length
|
|
185
834
|
})]
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
children: "No reviews yet."
|
|
209
|
-
}) : /* @__PURE__ */ E("ul", {
|
|
210
|
-
className: "space-y-3",
|
|
211
|
-
children: U.map((e) => /* @__PURE__ */ D("li", {
|
|
212
|
-
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
213
|
-
children: [/* @__PURE__ */ D("div", {
|
|
214
|
-
className: "flex items-center justify-between",
|
|
215
|
-
children: [/* @__PURE__ */ D("span", {
|
|
216
|
-
className: "text-sm font-semibold text-text-primary",
|
|
217
|
-
children: [e.score, "/10"]
|
|
218
|
-
}), /* @__PURE__ */ D("div", {
|
|
219
|
-
className: "flex items-center gap-2",
|
|
220
|
-
children: [e.verifiedWatch && /* @__PURE__ */ E("span", {
|
|
221
|
-
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-[10px] text-status-success-text",
|
|
222
|
-
children: "Verified"
|
|
223
|
-
}), /* @__PURE__ */ E(n, { status: e.status })]
|
|
835
|
+
}), Q.length === 0 ? /* @__PURE__ */ s("p", {
|
|
836
|
+
className: "text-sm text-text-secondary",
|
|
837
|
+
children: "No reviews yet."
|
|
838
|
+
}) : /* @__PURE__ */ s("ul", {
|
|
839
|
+
className: "space-y-3",
|
|
840
|
+
children: Q.map((e) => /* @__PURE__ */ c("li", {
|
|
841
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
842
|
+
children: [/* @__PURE__ */ c("div", {
|
|
843
|
+
className: "flex items-center justify-between",
|
|
844
|
+
children: [/* @__PURE__ */ c("span", {
|
|
845
|
+
className: "text-sm font-semibold text-text-primary",
|
|
846
|
+
children: [e.score, "/10"]
|
|
847
|
+
}), /* @__PURE__ */ c("div", {
|
|
848
|
+
className: "flex items-center gap-2",
|
|
849
|
+
children: [e.verifiedWatch && /* @__PURE__ */ s("span", {
|
|
850
|
+
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-[10px] text-status-success-text",
|
|
851
|
+
children: "Verified"
|
|
852
|
+
}), /* @__PURE__ */ s(n, { status: e.status })]
|
|
853
|
+
})]
|
|
854
|
+
}), e.body && /* @__PURE__ */ s("p", {
|
|
855
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
856
|
+
children: e.body
|
|
224
857
|
})]
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
858
|
+
}, e.id))
|
|
859
|
+
})]
|
|
860
|
+
})
|
|
861
|
+
]
|
|
862
|
+
}), /* @__PURE__ */ c("div", {
|
|
863
|
+
className: "space-y-6",
|
|
864
|
+
children: [
|
|
865
|
+
/* @__PURE__ */ c(l, {
|
|
866
|
+
treatment: "metric",
|
|
867
|
+
className: "border-border-seam p-5",
|
|
868
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
869
|
+
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
870
|
+
children: [/* @__PURE__ */ s(Ee, { className: "h-4 w-4" }), "Watch"]
|
|
871
|
+
}), T.isLoading ? /* @__PURE__ */ s("p", {
|
|
872
|
+
className: "text-sm text-text-secondary",
|
|
873
|
+
children: "Checking access…"
|
|
874
|
+
}) : T.isError ? /* @__PURE__ */ c("div", {
|
|
875
|
+
className: "space-y-2",
|
|
876
|
+
children: [/* @__PURE__ */ s("p", {
|
|
877
|
+
className: "text-sm text-status-error-text",
|
|
878
|
+
children: "Could not check entitlement."
|
|
879
|
+
}), /* @__PURE__ */ s("button", {
|
|
880
|
+
type: "button",
|
|
881
|
+
onClick: () => void T.refetch(),
|
|
882
|
+
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",
|
|
883
|
+
children: "Retry"
|
|
228
884
|
})]
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
242
|
-
children: "Publication"
|
|
243
|
-
}),
|
|
244
|
-
/* @__PURE__ */ D("div", {
|
|
245
|
-
className: "flex flex-wrap gap-2",
|
|
246
|
-
children: [k[M.status].map((e) => /* @__PURE__ */ E("button", {
|
|
885
|
+
}) : T.data?.entitled ? /* @__PURE__ */ c("div", {
|
|
886
|
+
className: "space-y-3",
|
|
887
|
+
children: [T.data.modes.length > 0 && /* @__PURE__ */ s("div", {
|
|
888
|
+
className: "flex flex-wrap gap-1.5",
|
|
889
|
+
children: T.data.modes.map((e) => /* @__PURE__ */ s("span", {
|
|
890
|
+
className: "rounded-full bg-status-success-bg-subtle px-2.5 py-0.5 text-xs text-status-success-text",
|
|
891
|
+
children: r(e)
|
|
892
|
+
}, e))
|
|
893
|
+
}), St ? /* @__PURE__ */ c("p", {
|
|
894
|
+
className: "flex items-center gap-2 text-sm text-status-success-text",
|
|
895
|
+
children: [/* @__PURE__ */ s(ye, { className: "h-4 w-4" }), "Marked as watched — see Continue Watching."]
|
|
896
|
+
}) : /* @__PURE__ */ c("button", {
|
|
247
897
|
type: "button",
|
|
248
|
-
disabled:
|
|
249
|
-
onClick: () => void
|
|
250
|
-
className: "rounded-lg bg-action-primary-bg px-3 py-
|
|
251
|
-
children:
|
|
252
|
-
}, e)), k[M.status].length === 0 && /* @__PURE__ */ E("p", {
|
|
253
|
-
className: "text-xs text-text-secondary",
|
|
254
|
-
children: "No further transitions available."
|
|
898
|
+
disabled: w.isPending,
|
|
899
|
+
onClick: () => void jt(),
|
|
900
|
+
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",
|
|
901
|
+
children: [/* @__PURE__ */ s(Ee, { className: "h-4 w-4" }), w.isPending ? "Saving…" : "Mark as watched"]
|
|
255
902
|
})]
|
|
256
|
-
}),
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
children: e.value
|
|
903
|
+
}) : /* @__PURE__ */ c("div", {
|
|
904
|
+
className: "flex items-start gap-2 rounded-lg border border-border-seam bg-bg-sunken px-3 py-2.5",
|
|
905
|
+
children: [/* @__PURE__ */ s(we, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ s("p", {
|
|
906
|
+
className: "text-sm text-text-secondary",
|
|
907
|
+
children: "You are not entitled to watch this title. Grant an entitlement or add a rights window to enable playback."
|
|
908
|
+
})]
|
|
909
|
+
})]
|
|
910
|
+
}),
|
|
911
|
+
/* @__PURE__ */ c(l, {
|
|
912
|
+
treatment: "metric",
|
|
913
|
+
className: "border-border-seam p-5",
|
|
914
|
+
children: [
|
|
915
|
+
/* @__PURE__ */ s("h2", {
|
|
916
|
+
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
917
|
+
children: "Publication"
|
|
918
|
+
}),
|
|
919
|
+
/* @__PURE__ */ c("div", {
|
|
920
|
+
className: "flex flex-wrap gap-2",
|
|
921
|
+
children: [u[_.status].map((e) => /* @__PURE__ */ s("button", {
|
|
922
|
+
type: "button",
|
|
923
|
+
disabled: v.isPending,
|
|
924
|
+
onClick: () => void Tt(e),
|
|
925
|
+
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",
|
|
926
|
+
children: r(e)
|
|
927
|
+
}, e)), u[_.status].length === 0 && /* @__PURE__ */ s("p", {
|
|
928
|
+
className: "text-xs text-text-secondary",
|
|
929
|
+
children: "No further transitions available."
|
|
284
930
|
})]
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
931
|
+
}),
|
|
932
|
+
_.status !== "ARCHIVED" && /* @__PURE__ */ c("button", {
|
|
933
|
+
type: "button",
|
|
934
|
+
disabled: y.isPending,
|
|
935
|
+
onClick: () => void Et(),
|
|
936
|
+
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",
|
|
937
|
+
children: [/* @__PURE__ */ s(ge, { className: "h-3.5 w-3.5" }), "Archive Title"]
|
|
938
|
+
})
|
|
939
|
+
]
|
|
940
|
+
}),
|
|
941
|
+
/* @__PURE__ */ c(l, {
|
|
942
|
+
treatment: "metric",
|
|
943
|
+
className: "border-border-seam p-5",
|
|
944
|
+
children: [/* @__PURE__ */ s("h2", {
|
|
945
|
+
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
946
|
+
children: "Details"
|
|
947
|
+
}), /* @__PURE__ */ c("dl", {
|
|
948
|
+
className: "space-y-2",
|
|
949
|
+
children: [$.map((e) => {
|
|
950
|
+
let t = e.icon;
|
|
951
|
+
return /* @__PURE__ */ c("div", {
|
|
952
|
+
className: "flex items-center justify-between text-sm",
|
|
953
|
+
children: [/* @__PURE__ */ c("dt", {
|
|
954
|
+
className: "flex items-center gap-2 text-text-secondary",
|
|
955
|
+
children: [/* @__PURE__ */ s(t, { className: "h-3.5 w-3.5" }), e.label]
|
|
956
|
+
}), /* @__PURE__ */ s("dd", {
|
|
957
|
+
className: "font-medium text-text-primary",
|
|
958
|
+
children: e.value
|
|
959
|
+
})]
|
|
960
|
+
}, e.label);
|
|
961
|
+
}), _.aiDisclosure && /* @__PURE__ */ c("div", {
|
|
962
|
+
className: "flex items-center gap-2 pt-1 text-sm text-text-secondary",
|
|
963
|
+
children: [/* @__PURE__ */ s(Oe, { className: "h-3.5 w-3.5" }), "Contains AI-generated content"]
|
|
964
|
+
})]
|
|
289
965
|
})]
|
|
290
|
-
})
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
})
|
|
314
|
-
|
|
315
|
-
]
|
|
316
|
-
})
|
|
317
|
-
|
|
966
|
+
}),
|
|
967
|
+
(_.genres.length > 0 || _.tags.length > 0) && /* @__PURE__ */ c(l, {
|
|
968
|
+
treatment: "metric",
|
|
969
|
+
className: "border-border-seam p-5",
|
|
970
|
+
children: [_.genres.length > 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("h3", {
|
|
971
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
972
|
+
children: "Genres"
|
|
973
|
+
}), /* @__PURE__ */ s("div", {
|
|
974
|
+
className: "mb-3 flex flex-wrap gap-1.5",
|
|
975
|
+
children: _.genres.map((e) => /* @__PURE__ */ s("span", {
|
|
976
|
+
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-primary",
|
|
977
|
+
children: e
|
|
978
|
+
}, e))
|
|
979
|
+
})] }), _.tags.length > 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("h3", {
|
|
980
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
981
|
+
children: "Tags"
|
|
982
|
+
}), /* @__PURE__ */ s("div", {
|
|
983
|
+
className: "flex flex-wrap gap-1.5",
|
|
984
|
+
children: _.tags.map((e) => /* @__PURE__ */ s("span", {
|
|
985
|
+
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
986
|
+
children: e
|
|
987
|
+
}, e))
|
|
988
|
+
})] })]
|
|
989
|
+
})
|
|
990
|
+
]
|
|
991
|
+
})]
|
|
992
|
+
})
|
|
993
|
+
]
|
|
318
994
|
});
|
|
319
995
|
};
|
|
320
996
|
//#endregion
|
|
321
|
-
export {
|
|
997
|
+
export { h as TitleDetailPage };
|
|
322
998
|
|
|
323
999
|
//# sourceMappingURL=TitleDetailPage.js.map
|