@socialgen_user/socialgen 2.3.6 → 2.3.7

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.
Files changed (35) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BnHqhu28.js → 1ESij7sf.js} +1 -1
  3. package/.output/public/_nuxt/{Yv0VQg56.js → 8t3Wih-_.js} +2 -2
  4. package/.output/public/_nuxt/{WNF4vvWg.js → CpvOZWox.js} +1 -1
  5. package/.output/public/_nuxt/{C5k0IulZ.js → DO1pBuIJ.js} +1 -1
  6. package/.output/public/_nuxt/{ztWrJaao.js → DR2NdyVN.js} +1 -1
  7. package/.output/public/_nuxt/JDUjn-YJ.js +91 -0
  8. package/.output/public/_nuxt/builds/latest.json +1 -1
  9. package/.output/public/_nuxt/builds/meta/dd531369-b462-4ab9-9c49-be9d1a58097d.json +1 -0
  10. package/.output/public/_nuxt/{BkcabsD-.js → wZeFhB0j.js} +1 -1
  11. package/.output/public/mobile-demo.html +788 -0
  12. package/.output/server/chunks/_/nitro.mjs +125 -118
  13. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  14. package/.output/server/chunks/build/entry-styles.BcjSvkjT.mjs +8 -0
  15. package/.output/server/chunks/build/entry-styles.BcjSvkjT.mjs.map +1 -0
  16. package/.output/server/chunks/build/{pages-BsPKZpHw.mjs → pages-DAxeAK3-.mjs} +350 -45
  17. package/.output/server/chunks/build/pages-DAxeAK3-.mjs.map +1 -0
  18. package/.output/server/chunks/build/server.mjs +1 -1
  19. package/.output/server/chunks/build/styles.mjs +4 -4
  20. package/.output/server/chunks/build/styles.mjs.map +1 -1
  21. package/.output/server/chunks/routes/api/files/_...path_.get.mjs +1 -0
  22. package/.output/server/chunks/routes/api/files/_...path_.get.mjs.map +1 -1
  23. package/.output/server/chunks/routes/api/media.get.mjs +80 -50
  24. package/.output/server/chunks/routes/api/media.get.mjs.map +1 -1
  25. package/.output/server/package.json +1 -1
  26. package/data/history.json +23 -8
  27. package/data/history_generations.json +171 -0
  28. package/data/templates.json +40 -0
  29. package/package.json +1 -1
  30. package/public/mobile-demo.html +788 -0
  31. package/.output/public/_nuxt/CDdFfo0w.js +0 -91
  32. package/.output/public/_nuxt/builds/meta/4b90bf55-5441-4724-8537-3192f91ec217.json +0 -1
  33. package/.output/server/chunks/build/entry-styles.BPr_nTP3.mjs +0 -8
  34. package/.output/server/chunks/build/entry-styles.BPr_nTP3.mjs.map +0 -1
  35. package/.output/server/chunks/build/pages-BsPKZpHw.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, watch, computed, mergeProps, unref, isRef, nextTick, useSSRContext } from 'vue';
2
- import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderComponent, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
3
- import { Settings, X, Check, Edit2, Trash2, FileText, Copy, LayoutTemplate, Plus, Code, Wand2, Globe, Sparkles, Bookmark, Clock, CheckCircle2, AlertCircle, RotateCcw, Film, Upload, Scissors, Music, RefreshCw, Play, ZoomOut, ZoomIn, ShieldAlert, Pause, Volume2, VolumeX, Download, FolderOpen } from 'lucide-vue-next';
2
+ import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderComponent, ssrIncludeBooleanAttr, ssrRenderAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
3
+ import { Settings, X, Check, Edit2, Trash2, FileText, Copy, LayoutTemplate, Plus, Code, AlertCircle, RefreshCw, Film, Upload, Music, Clock, Sparkles, Eye, Bookmark, Wand2, Globe, CheckCircle2, RotateCcw, Scissors, Play, ZoomOut, ZoomIn, ShieldAlert, Pause, Volume2, VolumeX } from 'lucide-vue-next';
4
4
  import { _ as _sfc_main$3 } from './TableCard-0mU9UOj0.mjs';
5
5
  import { z } from 'zod';
6
6
 
@@ -210,21 +210,31 @@ Keluarkan HANYA 1 objek JSON valid tanpa markdown formatting (\`\`\`json) agar b
210
210
  });
211
211
  watch(
212
212
  () => props.options.backgroundSource,
213
- () => {
214
- const max = activeVideoMaxOffset.value;
215
- if ((props.options.videoStartOffset || 0) > max) {
216
- updateOption("videoStartOffset", max);
213
+ (newVal, oldVal) => {
214
+ if (oldVal !== void 0 && newVal !== oldVal) {
215
+ updateOption("videoStartOffset", 0);
216
+ } else {
217
+ const max = activeVideoMaxOffset.value;
218
+ if ((props.options.videoStartOffset || 0) > max) {
219
+ updateOption("videoStartOffset", max);
220
+ }
217
221
  }
218
- }
222
+ },
223
+ { immediate: true }
219
224
  );
220
225
  watch(
221
226
  () => props.options.musicFile,
222
- () => {
223
- const max = activeAudioMaxOffset.value;
224
- if ((props.options.audioStartOffset || 0) > max) {
225
- updateOption("audioStartOffset", max);
227
+ (newVal, oldVal) => {
228
+ if (oldVal !== void 0 && newVal !== oldVal) {
229
+ updateOption("audioStartOffset", 0);
230
+ } else {
231
+ const max = activeAudioMaxOffset.value;
232
+ if ((props.options.audioStartOffset || 0) > max) {
233
+ updateOption("audioStartOffset", max);
234
+ }
226
235
  }
227
- }
236
+ },
237
+ { immediate: true }
228
238
  );
229
239
  const isUploading = ref(false);
230
240
  ref(null);
@@ -334,9 +344,41 @@ Keluarkan HANYA 1 objek JSON valid tanpa markdown formatting (\`\`\`json) agar b
334
344
  }
335
345
  }
336
346
  );
347
+ const mobileSubTab = ref("content");
348
+ const showMobileJsonSheet = ref(false);
349
+ const THEME_SWATCHES = [
350
+ { id: "blue-tech", name: "Blue Tech", color: "#0284c7" },
351
+ { id: "emerald-finance", name: "Emerald Finance", color: "#059669" },
352
+ { id: "slate-education", name: "Slate Education", color: "#64748b" },
353
+ { id: "dark-contrast", name: "Dark Contrast", color: "#1e293b" },
354
+ { id: "crimson-alert", name: "Crimson Alert", color: "#e11d48" },
355
+ { id: "amber-gold", name: "Amber Gold", color: "#d97706" },
356
+ { id: "cyber-violet", name: "Cyber Violet", color: "#7c3aed" },
357
+ { id: "sunset-orange", name: "Sunset Orange", color: "#ea580c" },
358
+ { id: "nordic-frost", name: "Nordic Frost", color: "#0891b2" },
359
+ { id: "monochrome-luxe", name: "Monochrome Luxe", color: "#475569" }
360
+ ];
361
+ function getTemplateIcon(layoutType, id) {
362
+ const key = (id || layoutType || "").toLowerCase();
363
+ if (key.includes("orange") || key.includes("news")) return "\u{1F4F0}";
364
+ if (key.includes("edu") || key.includes("infografis")) return "\u{1F4DC}";
365
+ if (key.includes("breaking") || key.includes("alert")) return "\u{1F6A8}";
366
+ if (key.includes("stat")) return "\u{1F3AF}";
367
+ if (key.includes("table") || key.includes("matrix")) return "\u{1F4CA}";
368
+ if (key.includes("versus") || key.includes("debate")) return "\u2694\uFE0F";
369
+ if (key.includes("receipt")) return "\u{1F9FE}";
370
+ if (key.includes("tierlist")) return "\u{1F396}\uFE0F";
371
+ if (key.includes("leaderboard") || key.includes("list")) return "\u{1F3C6}";
372
+ if (key.includes("quote")) return "\u{1F4AC}";
373
+ if (key.includes("timeline")) return "\u23F3";
374
+ if (key.includes("barchart")) return "\u{1F4C8}";
375
+ return "\u{1F3A8}";
376
+ }
337
377
  function updateOption(key, val) {
338
378
  emit("update:options", { ...props.options, [key]: val });
339
379
  }
380
+ const isCopyingManualTopic = ref(false);
381
+ const copiedManualTopic = ref(false);
340
382
  function formatDate(isoStr) {
341
383
  if (!isoStr) return "";
342
384
  try {
@@ -347,7 +389,7 @@ Keluarkan HANYA 1 objek JSON valid tanpa markdown formatting (\`\`\`json) agar b
347
389
  }
348
390
  }
349
391
  return (_ctx, _push, _parent, _attrs) => {
350
- var _a2, _b2, _c, _d, _e, _f, _g, _h;
392
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
351
393
  _push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-3 text-slate-100" }, _attrs))}>`);
352
394
  if (unref(showNicheModal)) {
353
395
  _push(`<div class="fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"><div class="bg-slate-900 border border-slate-700 rounded-3xl max-w-xl w-full p-5 shadow-2xl flex flex-col gap-4 text-xs max-h-[90vh] overflow-y-auto custom-scrollbar"><div class="flex items-center justify-between pb-3 border-b border-slate-800"><div><h3 class="text-sm font-black text-white flex items-center gap-2">`);
@@ -490,7 +532,190 @@ Keluarkan HANYA 1 objek JSON valid tanpa markdown formatting (\`\`\`json) agar b
490
532
  } else {
491
533
  _push(`<!---->`);
492
534
  }
493
- _push(`<div class="flex flex-wrap items-center justify-between gap-2.5 p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl shadow-lg"><div><h2 class="text-xs font-black text-white flex items-center gap-2">`);
535
+ _push(`<div class="flex lg:hidden flex-col gap-3 pb-24"><div class="flex items-center justify-between gap-1 p-1 bg-slate-900/95 border border-slate-800 rounded-2xl shadow-lg sticky top-0 z-20 backdrop-blur-md"><div class="flex items-center gap-1 overflow-x-auto no-scrollbar flex-1 py-0.5"><button type="button" class="${ssrRenderClass([unref(mobileSubTab) === "content" ? "bg-sky-500 text-white shadow font-black" : "text-slate-400 hover:text-white", "px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition"])}"><span>\u{1F4DD} Konten</span></button><button type="button" class="${ssrRenderClass([unref(mobileSubTab) === "design" ? "bg-sky-500 text-white shadow font-black" : "text-slate-400 hover:text-white", "px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition"])}"><span>\u{1F3A8} Template</span></button><button type="button" class="${ssrRenderClass([unref(mobileSubTab) === "media" ? "bg-sky-500 text-white shadow font-black" : "text-slate-400 hover:text-white", "px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition"])}"><span>\u{1F3AC} Media</span></button><button type="button" class="${ssrRenderClass([unref(mobileSubTab) === "ai" ? "bg-sky-500 text-white shadow font-black" : "text-slate-400 hover:text-white", "px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition"])}"><span>\u26A1 AI Topic</span></button><button type="button" class="${ssrRenderClass([unref(mobileSubTab) === "history" ? "bg-sky-500 text-white shadow font-black" : "text-slate-400 hover:text-white", "px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1 shrink-0 transition"])}"><span>\u{1F4BE} Draft</span></button></div><button type="button" class="px-2 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-[10px] font-mono font-bold text-sky-300 border border-slate-700 flex items-center gap-0.5 shrink-0 ml-1" title="Buka RAW JSON Editor"><span>&lt;/&gt; JSON</span></button></div>`);
536
+ if (unref(mobileSubTab) === "content") {
537
+ _push(`<div class="flex flex-col gap-3">`);
538
+ if (unref(jsonFormatError) || __props.validationError || unref(mismatchState)) {
539
+ _push(`<div class="${ssrRenderClass([unref(jsonFormatError) || __props.validationError ? "bg-rose-950/80 border-rose-500/60 text-rose-200" : "bg-amber-950/80 border-amber-500/60 text-amber-200", "p-3.5 rounded-2xl border text-xs shadow-lg space-y-2.5 animate-in fade-in"])}"><div class="flex items-start gap-2.5">`);
540
+ _push(ssrRenderComponent(unref(AlertCircle), {
541
+ class: ["w-4 h-4 shrink-0 mt-0.5", unref(jsonFormatError) || __props.validationError ? "text-rose-400" : "text-amber-400"]
542
+ }, null, _parent));
543
+ _push(`<div class="min-w-0 flex-1"><div class="font-black text-white text-xs">${ssrInterpolate(unref(jsonFormatError) ? "Sintaks JSON Tidak Valid" : unref(mismatchState) ? "Perbedaan Format Template" : "Data Belum Sesuai Template")}</div><p class="text-[11px] mt-0.5 leading-relaxed opacity-90">`);
544
+ if (unref(jsonFormatError)) {
545
+ _push(`<span>${ssrInterpolate(unref(jsonFormatError))}</span>`);
546
+ } else if (unref(mismatchState)) {
547
+ _push(`<span> Data JSON saat ini dibuat untuk template <b class="underline text-white">${ssrInterpolate(((_b2 = unref(mismatchState).matchedTarget) == null ? void 0 : _b2.name) || unref(mismatchState).jsonTemplateId)}</b>, sedangkan template aktif saat ini adalah <b class="underline text-white">${ssrInterpolate(unref(activeTemplate).name)}</b>. </span>`);
548
+ } else {
549
+ _push(`<span>${ssrInterpolate(__props.validationError)}</span>`);
550
+ }
551
+ _push(`</p></div></div><div class="flex items-center gap-2 pt-1 border-t border-white/10 flex-wrap"><button type="button" class="px-3 py-1.5 rounded-xl bg-white text-slate-950 text-xs font-black shadow transition active:scale-95 flex items-center gap-1.5">`);
552
+ _push(ssrRenderComponent(unref(RefreshCw), { class: "w-3.5 h-3.5" }, null, _parent));
553
+ _push(`<span>Pakai Sampel ${ssrInterpolate(unref(activeTemplate).name)}</span></button>`);
554
+ if (((_c = unref(mismatchState)) == null ? void 0 : _c.isKnown) && unref(mismatchState).matchedTarget) {
555
+ _push(`<button type="button" class="px-2.5 py-1.5 rounded-xl bg-amber-500/20 hover:bg-amber-500/40 text-amber-300 border border-amber-500/40 text-xs font-bold transition flex items-center gap-1 active:scale-95"><span>Beralih ke ${ssrInterpolate(unref(mismatchState).matchedTarget.name)}</span></button>`);
556
+ } else {
557
+ _push(`<!---->`);
558
+ }
559
+ _push(`<button type="button" class="px-2.5 py-1.5 rounded-xl bg-slate-800 text-slate-200 text-xs font-bold border border-slate-700 transition ml-auto active:scale-95"><span>&lt;/&gt; Buka JSON</span></button></div></div>`);
560
+ } else {
561
+ _push(`<div class="p-2.5 rounded-xl bg-slate-900/60 border border-slate-800 flex items-center justify-between text-[11px] shadow-sm"><div class="flex items-center gap-2 text-slate-300 truncate"><span class="w-2 h-2 rounded-full bg-emerald-400 shrink-0"></span><span class="text-slate-400">Template Aktif:</span><span class="font-extrabold text-white truncate">${ssrInterpolate(unref(activeTemplate).name)}</span></div><button type="button" class="text-[10px] text-sky-400 hover:text-sky-300 font-bold shrink-0 ml-2 transition" title="Muat ulang sampel data template aktif"> Reset ke Sampel </button></div>`);
562
+ }
563
+ _push(`<div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1.5 shadow-md"><div class="flex items-center justify-between"><label class="text-xs font-extrabold text-white flex items-center gap-1.5"><span>Judul Utama (Title)</span></label><span class="text-[9px] text-sky-400 font-bold uppercase tracking-wider">Wajib</span></div><input type="text"${ssrRenderAttr("value", __props.modelValue.title)} placeholder="Judul Utama Konten..." class="w-full bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-xs text-white font-bold focus:outline-none focus:border-sky-500 transition"></div><div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1.5 shadow-md"><label class="text-xs font-bold text-slate-300">Subtitle / Penjelasan Ringkas</label><textarea rows="2" placeholder="Ringkasan atau penjelas judul..." class="w-full bg-slate-950 border border-slate-800 rounded-xl p-2.5 text-xs text-slate-200 focus:outline-none focus:border-sky-500 transition resize-none leading-relaxed">${ssrInterpolate(__props.modelValue.subtitle || "")}</textarea></div><div class="grid grid-cols-1 sm:grid-cols-2 gap-2.5"><div class="p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1 shadow-md"><label class="text-[11px] font-bold text-slate-400">Watermark Handle</label><input type="text"${ssrRenderAttr("value", __props.modelValue.watermark || "@SocialGen")} placeholder="@NamaAkun" class="w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-sky-400 font-bold text-xs focus:outline-none focus:border-sky-500"></div><div class="p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1 shadow-md"><label class="text-[11px] font-bold text-slate-400">Sumber (Footer Note)</label><input type="text"${ssrRenderAttr("value", __props.modelValue.footerNote || "")} placeholder="Source: Data Wire 2026..." class="w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-1.5 text-slate-300 text-xs focus:outline-none focus:border-sky-500"></div></div><div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2 shadow-md"><div class="flex items-center justify-between"><span class="text-xs font-bold text-slate-300">Viral Caption &amp; Hashtags</span><button type="button" class="text-[11px] font-bold text-sky-400 hover:text-sky-300 flex items-center gap-1 active:scale-95 transition">`);
564
+ _push(ssrRenderComponent(unref(Copy), { class: "w-3 h-3" }, null, _parent));
565
+ _push(`<span>Salin Caption</span></button></div><textarea rows="3" placeholder="Tulis caption reels / post di sini..." class="w-full bg-slate-950 border border-slate-800 rounded-xl p-2.5 text-xs text-slate-200 focus:outline-none focus:border-sky-500 leading-relaxed resize-none">${ssrInterpolate(__props.modelValue.caption || "")}</textarea></div></div>`);
566
+ } else if (unref(mobileSubTab) === "design") {
567
+ _push(`<div class="flex flex-col gap-3"><div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2.5 shadow-md"><div class="flex items-center justify-between"><div><span class="text-xs font-extrabold text-white">Pilih Format Template (${ssrInterpolate(unref(templatesList).length)})</span><p class="text-[10px] text-slate-400">Geser ke kanan untuk melihat semua format</p></div><button type="button" class="text-[10px] font-bold text-sky-400 hover:text-sky-300 flex items-center gap-1 bg-slate-800 px-2 py-1 rounded-lg border border-slate-700">`);
568
+ _push(ssrRenderComponent(unref(Settings), { class: "w-3 h-3" }, null, _parent));
569
+ _push(`<span>Kelola</span></button></div>`);
570
+ if (unref(mismatchState) || __props.validationError || unref(jsonFormatError)) {
571
+ _push(`<div class="p-2.5 rounded-xl bg-amber-950/70 border border-amber-500/40 text-amber-200 text-xs flex items-center justify-between shadow"><div class="flex items-center gap-1.5 truncate"><span class="text-sm">\u26A0\uFE0F</span><span class="text-[11px] truncate">`);
572
+ if (unref(mismatchState)) {
573
+ _push(`<span>Format JSON milik: <b>${ssrInterpolate(((_d = unref(mismatchState).matchedTarget) == null ? void 0 : _d.name) || unref(mismatchState).jsonTemplateId)}</b></span>`);
574
+ } else if (unref(jsonFormatError)) {
575
+ _push(`<span>Sintaks JSON tidak valid</span>`);
576
+ } else {
577
+ _push(`<span>${ssrInterpolate(__props.validationError)}</span>`);
578
+ }
579
+ _push(`</span></div><button type="button" class="px-2.5 py-1 rounded-lg bg-amber-500 text-slate-950 font-black text-[10px] shrink-0 active:scale-95 shadow ml-2"> Pakai Sampel </button></div>`);
580
+ } else {
581
+ _push(`<!---->`);
582
+ }
583
+ _push(`<div class="flex gap-2 overflow-x-auto no-scrollbar py-1"><!--[-->`);
584
+ ssrRenderList(unref(templatesList), (t) => {
585
+ _push(`<button type="button" class="${ssrRenderClass([unref(selectedTemplateId) === t.id ? "bg-slate-950 border-sky-500 shadow-lg shadow-sky-500/20" : "bg-slate-950/70 border-slate-800 hover:border-slate-700", "shrink-0 w-28 p-2.5 rounded-2xl border text-center flex flex-col items-center gap-1.5 transition active:scale-95"])}"><div class="w-8 h-8 rounded-xl bg-slate-800 flex items-center justify-center text-sm shadow">${ssrInterpolate(getTemplateIcon(t.layoutType, t.id))}</div><span class="text-[10px] font-black text-white leading-tight truncate w-full">${ssrInterpolate(t.name)}</span><span class="${ssrRenderClass([t.isBuiltin ? "bg-slate-800 text-slate-400" : "bg-purple-950 text-purple-300 border border-purple-800", "text-[8px] font-bold px-1.5 py-0.2 rounded uppercase tracking-wider"])}">${ssrInterpolate(t.isBuiltin ? t.category : "\u2B50 Kustom")}</span></button>`);
586
+ });
587
+ _push(`<!--]--></div></div><div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2.5 shadow-md"><div class="flex items-center justify-between"><span class="text-xs font-extrabold text-white">Tema Warna (Visual Swatches)</span><span class="text-[10px] text-sky-400 font-bold">${ssrInterpolate(__props.modelValue.theme || "blue-tech")}</span></div><div class="grid grid-cols-5 gap-2.5 py-1"><!--[-->`);
588
+ ssrRenderList(THEME_SWATCHES, (swatch) => {
589
+ _push(`<button type="button" class="flex flex-col items-center gap-1 p-1 rounded-xl transition"${ssrRenderAttr("title", swatch.name)}><div class="${ssrRenderClass([__props.modelValue.theme === swatch.id ? "ring-2 ring-white ring-offset-2 ring-offset-slate-950 scale-105" : "border-white/10 hover:border-white/40", "w-8 h-8 rounded-full border-2 transition transform active:scale-90"])}" style="${ssrRenderStyle({ backgroundColor: swatch.color })}"></div><span class="text-[8px] text-slate-400 truncate w-full text-center">${ssrInterpolate(swatch.name.split(" ")[0])}</span></button>`);
590
+ });
591
+ _push(`<!--]--></div></div><div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl flex flex-col gap-3 shadow-md"><div class="flex items-center justify-between"><div class="flex flex-col"><span class="text-xs font-bold text-white">Buat Template Kustom</span><span class="text-[10px] text-slate-400">Punya referensi kartu baru? Tambahkan ke sistem.</span></div><button type="button" class="px-3 py-1.5 rounded-xl bg-gradient-to-r from-sky-600 to-indigo-600 hover:from-sky-500 text-white text-xs font-bold shadow flex items-center gap-1.5 active:scale-95 transition">`);
592
+ _push(ssrRenderComponent(unref(Plus), { class: "w-3.5 h-3.5" }, null, _parent));
593
+ _push(`<span>+ Buat Template</span></button></div><div class="pt-2.5 border-t border-slate-800/80 flex items-center justify-between gap-2"><span class="text-[10px] text-slate-400 flex items-center gap-1"><span>\u{1F916} Prompt AI Buat Template</span></span><div class="flex items-center gap-1.5"><button type="button" class="px-2.5 py-1 rounded-lg bg-sky-600/20 hover:bg-sky-600/40 text-sky-300 text-[10px] font-bold border border-sky-500/30 flex items-center gap-1 transition active:scale-95">`);
594
+ _push(ssrRenderComponent(unref(Copy), { class: "w-3 h-3" }, null, _parent));
595
+ _push(`<span>${ssrInterpolate(unref(copiedAiPrompt) ? "\u2713 Tersalin" : "Salin Prompt")}</span></button><button type="button" class="px-2 py-1 rounded-lg bg-slate-800 text-slate-300 text-[10px] font-bold border border-slate-700"><span>${ssrInterpolate(unref(showAiPromptView) ? "Tutup" : "Lihat")}</span></button></div></div>`);
596
+ if (unref(showAiPromptView)) {
597
+ _push(`<div class="p-2 rounded-xl bg-slate-950 border border-sky-500/40"><p class="text-[9px] text-slate-400 mb-1">Kirim prompt ini bersama screenshot kartu ke ChatGPT / Gemini / Claude untuk menghasilkan HTML &amp; CSS template:</p><textarea readonly rows="5" class="w-full bg-slate-900 border border-slate-700 rounded-lg p-2 text-[10px] text-sky-200 font-mono select-all focus:outline-none custom-scrollbar">${ssrInterpolate(unref(masterVisionPromptText))}</textarea></div>`);
598
+ } else {
599
+ _push(`<!---->`);
600
+ }
601
+ _push(`</div></div>`);
602
+ } else if (unref(mobileSubTab) === "media") {
603
+ _push(`<div class="flex flex-col gap-3"><div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2.5 shadow-md"><div class="flex items-center justify-between"><label class="text-xs font-extrabold text-sky-400 flex items-center gap-1.5">`);
604
+ _push(ssrRenderComponent(unref(Film), { class: "w-4 h-4" }, null, _parent));
605
+ _push(`<span>Background Video</span></label><button${ssrIncludeBooleanAttr(unref(isUploading)) ? " disabled" : ""} type="button" class="px-2.5 py-1 rounded-xl bg-sky-950/60 border border-sky-500/40 text-sky-300 text-[10px] font-bold flex items-center gap-1">`);
606
+ _push(ssrRenderComponent(unref(Upload), { class: "w-3 h-3" }, null, _parent));
607
+ _push(`<span>Upload MP4</span></button></div><select${ssrRenderAttr("value", __props.options.backgroundSource || "random")} class="w-full bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-slate-200 text-xs font-semibold focus:outline-none focus:border-sky-500"><option value="random">\u{1F500} Acak Video</option><!--[-->`);
608
+ ssrRenderList(unref(availableVideos), (v) => {
609
+ _push(`<option${ssrRenderAttr("value", v)}>${ssrInterpolate(v.replace(".mp4", "").replace(/_/g, " "))}</option>`);
610
+ });
611
+ _push(`<!--]--><option value="pexels">\u{1F310} Pexels API (Auto HD)</option></select><div class="pt-1 space-y-1"><div class="flex items-center justify-between text-[11px]"><span class="text-slate-400 font-mono"> \u2702\uFE0F Mulai Detik: <strong class="text-sky-300 font-bold">${ssrInterpolate(Math.min(__props.options.videoStartOffset || 0, unref(activeVideoMaxOffset)))}s</strong> / ${ssrInterpolate(unref(activeVideoDuration))}s </span><button type="button" class="text-[10px] text-sky-400 hover:text-white"> Reset 0s </button></div><input type="range" min="0"${ssrRenderAttr("max", unref(activeVideoMaxOffset))} step="1"${ssrRenderAttr("value", Math.min(__props.options.videoStartOffset || 0, unref(activeVideoMaxOffset)))} class="w-full h-1.5 bg-slate-950 rounded appearance-none cursor-pointer accent-sky-400"></div></div><div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2.5 shadow-md"><div class="flex items-center justify-between"><label class="text-xs font-extrabold text-purple-400 flex items-center gap-1.5">`);
612
+ _push(ssrRenderComponent(unref(Music), { class: "w-4 h-4" }, null, _parent));
613
+ _push(`<span>Musik Reels</span></label><button${ssrIncludeBooleanAttr(unref(isUploading)) ? " disabled" : ""} type="button" class="px-2.5 py-1 rounded-xl bg-purple-950/60 border border-purple-500/40 text-purple-300 text-[10px] font-bold flex items-center gap-1">`);
614
+ _push(ssrRenderComponent(unref(Upload), { class: "w-3 h-3" }, null, _parent));
615
+ _push(`<span>Upload MP3</span></button></div><select${ssrRenderAttr("value", __props.options.musicFile || "random")} class="w-full bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-slate-200 text-xs font-semibold focus:outline-none focus:border-purple-500"><option value="random">\u{1F500} Acak Musik</option><!--[-->`);
616
+ ssrRenderList(unref(availableAudio), (a) => {
617
+ _push(`<option${ssrRenderAttr("value", a)}>${ssrInterpolate(a.replace(".mp3", "").replace(/_/g, " "))}</option>`);
618
+ });
619
+ _push(`<!--]--></select><div class="pt-1 space-y-1"><div class="flex items-center justify-between text-[11px]"><span class="text-slate-400 font-mono"> \u2702\uFE0F Mulai Intro: <strong class="text-purple-300 font-bold">${ssrInterpolate(Math.min(__props.options.audioStartOffset || 0, unref(activeAudioMaxOffset)))}s</strong> / ${ssrInterpolate(unref(activeAudioDuration))}s </span><button type="button" class="text-[10px] text-purple-400 hover:text-white"> Reset 0s </button></div><input type="range" min="0"${ssrRenderAttr("max", unref(activeAudioMaxOffset))} step="1"${ssrRenderAttr("value", Math.min(__props.options.audioStartOffset || 0, unref(activeAudioMaxOffset)))} class="w-full h-1.5 bg-slate-950 rounded appearance-none cursor-pointer accent-purple-400"></div></div><div class="p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl flex items-center justify-between shadow-md"><label class="text-xs font-bold text-slate-300 flex items-center gap-1.5">`);
620
+ _push(ssrRenderComponent(unref(Clock), { class: "w-3.5 h-3.5 text-emerald-400" }, null, _parent));
621
+ _push(`<span>Durasi Reels:</span></label><div class="flex items-center gap-1.5"><!--[-->`);
622
+ ssrRenderList([7, 10, 15, 30, 60], (d) => {
623
+ _push(`<button type="button" class="${ssrRenderClass([__props.modelValue.reelsDuration === d ? "bg-emerald-500 text-white shadow" : "bg-slate-950 text-slate-400 border border-slate-800", "px-2.5 py-1 rounded-xl text-xs font-bold transition"])}">${ssrInterpolate(d)}s </button>`);
624
+ });
625
+ _push(`<!--]--></div></div><div class="p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1.5 shadow-md"><span class="text-[11px] font-bold text-slate-400 uppercase tracking-wider block">Format Output Aktif</span><div class="grid grid-cols-3 gap-2"><label class="${ssrRenderClass([((_e = __props.options.outputs) == null ? void 0 : _e.feed) !== false ? "bg-sky-500/10 border-sky-500/40 text-sky-200" : "bg-slate-950 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-2 rounded-xl border text-xs cursor-pointer select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_f = __props.options.outputs) == null ? void 0 : _f.feed) !== false) ? " checked" : ""} class="rounded text-sky-500"><span class="font-bold">Feed 4:5</span></label><label class="${ssrRenderClass([((_g = __props.options.outputs) == null ? void 0 : _g.story) !== false ? "bg-indigo-500/10 border-indigo-500/40 text-indigo-200" : "bg-slate-950 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-2 rounded-xl border text-xs cursor-pointer select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_h = __props.options.outputs) == null ? void 0 : _h.story) !== false) ? " checked" : ""} class="rounded text-indigo-500"><span class="font-bold">Story 9:16</span></label><label class="${ssrRenderClass([((_i = __props.options.outputs) == null ? void 0 : _i.reels) !== false ? "bg-emerald-500/10 border-emerald-500/40 text-emerald-200" : "bg-slate-950 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-2 rounded-xl border text-xs cursor-pointer select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_j = __props.options.outputs) == null ? void 0 : _j.reels) !== false) ? " checked" : ""} class="rounded text-emerald-500"><span class="font-bold">Reels MP4</span></label></div></div></div>`);
626
+ } else if (unref(mobileSubTab) === "ai") {
627
+ _push(`<div class="flex flex-col gap-3"><div class="p-4 rounded-3xl bg-gradient-to-br from-indigo-950/80 via-slate-900 to-sky-950/80 border border-sky-500/30 space-y-3 shadow-xl"><div class="flex items-center justify-between"><span class="text-xs font-black text-sky-300 uppercase tracking-wider flex items-center gap-1.5">`);
628
+ _push(ssrRenderComponent(unref(Sparkles), { class: "w-4 h-4 text-sky-400" }, null, _parent));
629
+ _push(` Auto-Topic AI Generator </span><span class="text-[9px] px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400 font-bold border border-emerald-500/30">${ssrInterpolate(unref(selectedModel))}</span></div><div class="grid grid-cols-2 gap-2"><div class="space-y-1"><label class="text-[10px] font-bold text-slate-400">Pilih Niche</label><select class="w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-2 text-xs text-white font-bold focus:outline-none"><!--[-->`);
630
+ ssrRenderList(unref(nichesList), (n) => {
631
+ _push(`<option${ssrRenderAttr("value", n.id)}${ssrIncludeBooleanAttr(Array.isArray(unref(selectedNicheId)) ? ssrLooseContain(unref(selectedNicheId), n.id) : ssrLooseEqual(unref(selectedNicheId), n.id)) ? " selected" : ""}>${ssrInterpolate(n.name)}</option>`);
632
+ });
633
+ _push(`<!--]--></select></div><div class="space-y-1"><label class="text-[10px] font-bold text-slate-400">Bahasa Konten</label><select class="w-full bg-slate-950 border border-slate-800 rounded-xl px-2.5 py-2 text-xs text-emerald-300 font-bold focus:outline-none"><option value="id"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedLanguage)) ? ssrLooseContain(unref(selectedLanguage), "id") : ssrLooseEqual(unref(selectedLanguage), "id")) ? " selected" : ""}>\u{1F1EE}\u{1F1E9} Indonesia</option><option value="en"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedLanguage)) ? ssrLooseContain(unref(selectedLanguage), "en") : ssrLooseEqual(unref(selectedLanguage), "en")) ? " selected" : ""}>\u{1F1FA}\u{1F1F8} English</option><option value="es"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedLanguage)) ? ssrLooseContain(unref(selectedLanguage), "es") : ssrLooseEqual(unref(selectedLanguage), "es")) ? " selected" : ""}>\u{1F1EA}\u{1F1F8} Espa\xF1ol</option><option value="ja"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedLanguage)) ? ssrLooseContain(unref(selectedLanguage), "ja") : ssrLooseEqual(unref(selectedLanguage), "ja")) ? " selected" : ""}>\u{1F1EF}\u{1F1F5} \u65E5\u672C\u8A9E</option><option value="de"${ssrIncludeBooleanAttr(Array.isArray(unref(selectedLanguage)) ? ssrLooseContain(unref(selectedLanguage), "de") : ssrLooseEqual(unref(selectedLanguage), "de")) ? " selected" : ""}>\u{1F1E9}\u{1F1EA} Deutsch</option></select></div></div><button${ssrIncludeBooleanAttr(__props.isGenerating || __props.isAutoTopicLoading) ? " disabled" : ""} type="button" class="w-full py-3 rounded-2xl bg-gradient-to-r from-sky-500 via-indigo-600 to-purple-600 text-white font-black text-xs shadow-xl shadow-sky-500/25 flex items-center justify-center gap-2 active:scale-98 transition disabled:opacity-50">`);
634
+ _push(ssrRenderComponent(unref(Sparkles), {
635
+ class: ["w-4 h-4", { "animate-spin": __props.isAutoTopicLoading }]
636
+ }, null, _parent));
637
+ _push(`<span>${ssrInterpolate(__props.isAutoTopicLoading ? "Meriset Data Viral..." : "\u2728 Auto-Topic Viral Baru")}</span></button></div><div class="p-3.5 bg-slate-900/90 border border-purple-500/30 rounded-2xl space-y-2.5 shadow-md"><div class="flex items-center justify-between"><div class="flex items-center gap-1.5">`);
638
+ _push(ssrRenderComponent(unref(FileText), { class: "w-4 h-4 text-purple-400" }, null, _parent));
639
+ _push(`<span class="text-xs font-black text-white">Master Prompt Riset Topik AI</span></div><button type="button" class="px-2 py-0.5 rounded-lg bg-purple-950/60 border border-purple-500/40 text-purple-300 text-[10px] font-bold flex items-center gap-1 hover:text-white">`);
640
+ _push(ssrRenderComponent(unref(Eye), { class: "w-3 h-3" }, null, _parent));
641
+ _push(`<span>Buka Detail</span></button></div><p class="text-[11px] text-slate-400 leading-relaxed"> Salin prompt riset cerdas ini ke <b>ChatGPT / Gemini / Claude</b> untuk riset topik konten viral terbaru sesuai niche &amp; template yang aktif (bebas bentrok riwayat): </p><div class="flex items-center gap-2"><button${ssrIncludeBooleanAttr(unref(isCopyingManualTopic)) ? " disabled" : ""} type="button" class="flex-1 px-3 py-2.5 rounded-xl bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-500 text-white text-xs font-bold shadow-lg transition flex items-center justify-center gap-1.5 active:scale-95 disabled:opacity-50">`);
642
+ if (unref(copiedManualTopic)) {
643
+ _push(ssrRenderComponent(unref(Check), { class: "w-3.5 h-3.5 text-emerald-300" }, null, _parent));
644
+ } else {
645
+ _push(ssrRenderComponent(unref(Copy), { class: "w-3.5 h-3.5" }, null, _parent));
646
+ }
647
+ _push(`<span>${ssrInterpolate(unref(isCopyingManualTopic) ? "Menyiapkan Prompt..." : unref(copiedManualTopic) ? "\u2713 Master Prompt Tersalin!" : "Salin Master Prompt Topik")}</span></button><button type="button" title="Lihat teks prompt manual lengkap" class="px-3 py-2.5 rounded-xl bg-slate-800 text-slate-300 text-xs font-bold border border-slate-700 hover:bg-slate-700 transition">`);
648
+ _push(ssrRenderComponent(unref(Eye), { class: "w-3.5 h-3.5" }, null, _parent));
649
+ _push(`</button></div></div></div>`);
650
+ } else if (unref(mobileSubTab) === "history") {
651
+ _push(`<div class="flex flex-col gap-3"><div class="flex items-center justify-between bg-slate-900/90 p-1 rounded-2xl border border-slate-800 text-xs font-bold shadow-md"><button type="button" class="${ssrRenderClass([unref(activeTab) === "drafts" ? "bg-amber-500 text-slate-950 font-black shadow" : "text-slate-400 hover:text-white", "flex-1 py-1.5 px-3 rounded-xl transition text-center"])}"><span>Drafts (${ssrInterpolate(__props.drafts.length)})</span></button><button type="button" class="${ssrRenderClass([unref(activeTab) === "history" ? "bg-purple-600 text-white font-black shadow" : "text-slate-400 hover:text-white", "flex-1 py-1.5 px-3 rounded-xl transition text-center"])}"><span>Riwayat (${ssrInterpolate(__props.history.length)})</span></button></div>`);
652
+ if (unref(activeTab) === "drafts") {
653
+ _push(`<div class="flex flex-col gap-2"><div class="flex items-center justify-between px-1"><span class="text-[11px] font-bold text-slate-400 uppercase tracking-wider">Daftar Draft Tersimpan</span><button type="button" class="text-[11px] font-bold text-amber-400 hover:text-amber-300 flex items-center gap-1">`);
654
+ _push(ssrRenderComponent(unref(Bookmark), { class: "w-3 h-3" }, null, _parent));
655
+ _push(`<span>+ Simpan Draft</span></button></div>`);
656
+ if (__props.drafts.length === 0) {
657
+ _push(`<div class="text-center py-10 text-slate-500 text-xs bg-slate-900/50 rounded-2xl border border-slate-800"> Belum ada draft tersimpan. </div>`);
658
+ } else {
659
+ _push(`<!---->`);
660
+ }
661
+ _push(`<!--[-->`);
662
+ ssrRenderList(__props.drafts, (draft, dIdx) => {
663
+ _push(`<div class="p-3 rounded-2xl border bg-slate-900/80 border-slate-800 hover:border-amber-500/40 flex items-center justify-between cursor-pointer active:scale-98 transition shadow"><div class="flex-1 pr-2 truncate"><div class="font-extrabold text-xs text-white truncate">${ssrInterpolate(draft.title || "Tanpa Judul")}</div><div class="text-[10px] text-slate-400 font-mono">${ssrInterpolate(draft.category || "Draft")}</div></div><button type="button" class="p-1.5 text-slate-400 hover:text-rose-400 rounded-lg transition">`);
664
+ _push(ssrRenderComponent(unref(Trash2), { class: "w-3.5 h-3.5" }, null, _parent));
665
+ _push(`</button></div>`);
666
+ });
667
+ _push(`<!--]--></div>`);
668
+ } else {
669
+ _push(`<div class="flex flex-col gap-2"><div class="flex items-center justify-between px-1"><span class="text-[11px] font-bold text-slate-400 uppercase tracking-wider">Riwayat Generasi Terakhir</span>`);
670
+ if (__props.history.length > 0) {
671
+ _push(`<button type="button" class="text-[10px] font-bold text-rose-400 hover:text-rose-300"> Hapus Semua </button>`);
672
+ } else {
673
+ _push(`<!---->`);
674
+ }
675
+ _push(`</div>`);
676
+ if (__props.history.length === 0) {
677
+ _push(`<div class="text-center py-10 text-slate-500 text-xs bg-slate-900/50 rounded-2xl border border-slate-800"> Belum ada riwayat pembuatan. </div>`);
678
+ } else {
679
+ _push(`<!---->`);
680
+ }
681
+ _push(`<!--[-->`);
682
+ ssrRenderList(__props.history, (item, hIdx) => {
683
+ _push(`<div class="p-3 rounded-2xl border bg-slate-900/80 border-slate-800 hover:border-purple-500/40 flex items-center justify-between cursor-pointer active:scale-98 transition shadow"><div class="flex-1 pr-2 truncate"><div class="font-extrabold text-xs text-white truncate">${ssrInterpolate(item.title)}</div><div class="text-[10px] text-slate-400 font-mono">${ssrInterpolate(item.category)} \u2022 ${ssrInterpolate(formatDate(item.generatedAt))}</div></div><button type="button" class="p-1.5 text-slate-400 hover:text-rose-400 rounded-lg transition">`);
684
+ _push(ssrRenderComponent(unref(Trash2), { class: "w-3.5 h-3.5" }, null, _parent));
685
+ _push(`</button></div>`);
686
+ });
687
+ _push(`<!--]--></div>`);
688
+ }
689
+ _push(`</div>`);
690
+ } else {
691
+ _push(`<!---->`);
692
+ }
693
+ if (unref(showMobileJsonSheet)) {
694
+ _push(`<div class="fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex flex-col justify-end"><div class="w-full max-h-[80vh] bg-slate-900 border-t border-slate-700 rounded-t-3xl p-4 flex flex-col gap-3 shadow-2xl animate-in slide-in-from-bottom"><div class="flex items-center justify-between pb-2 border-b border-slate-800"><div class="flex items-center gap-2"><span class="text-xs font-bold text-white font-mono">&lt;/&gt; RAW JSON SocialGen</span><span class="text-[9px] px-1.5 py-0.2 rounded-full bg-sky-500/20 text-sky-300 font-mono">Format V2</span></div><button type="button" class="w-7 h-7 rounded-full bg-slate-800 flex items-center justify-center text-xs text-slate-400 hover:text-white"> \u2715 </button></div>`);
695
+ if (unref(mismatchState) || unref(jsonFormatError) || __props.validationError) {
696
+ _push(`<div class="${ssrRenderClass([unref(jsonFormatError) || __props.validationError ? "bg-rose-950/80 border-rose-500/50 text-rose-200" : "bg-amber-950/80 border-amber-500/50 text-amber-200", "p-2.5 rounded-xl border text-[11px] flex items-center justify-between gap-2 shadow"])}"><div class="flex items-center gap-1.5 truncate"><span>\u26A0\uFE0F</span><span class="truncate">`);
697
+ if (unref(jsonFormatError)) {
698
+ _push(`<span>${ssrInterpolate(unref(jsonFormatError))}</span>`);
699
+ } else if (unref(mismatchState)) {
700
+ _push(`<span>JSON untuk template: <b>${ssrInterpolate(((_k = unref(mismatchState).matchedTarget) == null ? void 0 : _k.name) || unref(mismatchState).jsonTemplateId)}</b></span>`);
701
+ } else {
702
+ _push(`<span>${ssrInterpolate(__props.validationError)}</span>`);
703
+ }
704
+ _push(`</span></div>`);
705
+ if (((_l = unref(mismatchState)) == null ? void 0 : _l.isKnown) && unref(mismatchState).matchedTarget) {
706
+ _push(`<button type="button" class="px-2 py-0.5 rounded-lg bg-amber-500 text-slate-950 font-bold text-[10px] shrink-0 active:scale-95 shadow"> Ganti Template </button>`);
707
+ } else {
708
+ _push(`<!---->`);
709
+ }
710
+ _push(`</div>`);
711
+ } else {
712
+ _push(`<!---->`);
713
+ }
714
+ _push(`<textarea rows="8" spellcheck="false" class="w-full bg-slate-950 text-sky-200 text-xs font-mono p-3 rounded-xl border border-slate-800 focus:outline-none focus:border-sky-500/50 resize-y leading-relaxed" placeholder="Paste Content JSON here...">${ssrInterpolate(unref(rawJsonInput))}</textarea><div class="flex items-center justify-between gap-2"><button type="button" class="px-3 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-amber-400"> Pakai Sample </button><button type="button" class="px-3 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-sky-400"> Format JSON </button><button type="button" class="px-4 py-2 rounded-xl bg-sky-500 hover:bg-sky-400 text-xs font-bold text-white shadow-lg"> Selesai </button></div></div></div>`);
715
+ } else {
716
+ _push(`<!---->`);
717
+ }
718
+ _push(`</div><div class="hidden lg:flex flex-col gap-3"><div class="flex flex-wrap items-center justify-between gap-2.5 p-3.5 bg-slate-900/90 border border-slate-800 rounded-2xl shadow-lg"><div><h2 class="text-xs font-black text-white flex items-center gap-2">`);
494
719
  _push(ssrRenderComponent(unref(Wand2), { class: "w-3.5 h-3.5 text-sky-400" }, null, _parent));
495
720
  _push(` Content Studio </h2><p class="text-[10px] text-slate-400">Multi-Format Studio</p></div><div class="flex items-center gap-1.5 flex-wrap"><div class="flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 mr-1.5 shadow-inner"><select class="bg-transparent text-[11px] font-bold text-sky-300 focus:outline-none px-2 py-0.5 cursor-pointer max-w-[130px] truncate" title="Pilih Niche Konten"><!--[-->`);
496
721
  ssrRenderList(unref(nichesList), (n) => {
@@ -611,7 +836,7 @@ Keluarkan HANYA 1 objek JSON valid tanpa markdown formatting (\`\`\`json) agar b
611
836
  if (unref(mismatchState)) {
612
837
  _push(`<div class="${ssrRenderClass([unref(mismatchState).isKnown ? "bg-amber-500/10 border-amber-500/30" : "bg-rose-500/10 border-rose-500/30", "mx-2.5 mt-2.5 p-2 rounded-xl border text-xs transition-all shadow-md flex flex-col sm:flex-row sm:items-center justify-between gap-2"])}"><div class="${ssrRenderClass([unref(mismatchState).isKnown ? "text-amber-300" : "text-rose-300", "flex items-center gap-1.5 text-[11px]"])}"><span class="text-sm">\u26A0\uFE0F</span>`);
613
838
  if (unref(mismatchState).isKnown) {
614
- _push(`<span> JSON ini dibuat untuk template <b class="underline">${ssrInterpolate((_b2 = unref(mismatchState).matchedTarget) == null ? void 0 : _b2.name)}</b> (<span class="font-mono text-[10px]">${ssrInterpolate(unref(mismatchState).jsonTemplateId)}</span>) </span>`);
839
+ _push(`<span> JSON ini dibuat untuk template <b class="underline">${ssrInterpolate((_m = unref(mismatchState).matchedTarget) == null ? void 0 : _m.name)}</b> (<span class="font-mono text-[10px]">${ssrInterpolate(unref(mismatchState).jsonTemplateId)}</span>) </span>`);
615
840
  } else {
616
841
  _push(`<span> Template dengan ID &quot;<span class="font-mono text-[10px]">${ssrInterpolate(unref(mismatchState).jsonTemplateId)}</span>&quot; tidak ditemukan di sistem. </span>`);
617
842
  }
@@ -659,7 +884,7 @@ Keluarkan HANYA 1 objek JSON valid tanpa markdown formatting (\`\`\`json) agar b
659
884
  ssrRenderList([7, 10, 15, 30, 60], (d) => {
660
885
  _push(`<button class="${ssrRenderClass([(__props.modelValue.reelsDuration || 30) === d ? "bg-emerald-500/20 border-emerald-500/60 text-emerald-300" : "bg-slate-950 border-slate-800 text-slate-400 hover:text-white", "px-2 py-0.5 text-[10px] font-bold rounded-lg border transition"])}">${ssrInterpolate(d === 60 ? "1m" : d + "s")}</button>`);
661
886
  });
662
- _push(`<!--]--></div></div><div class="grid grid-cols-3 gap-2 pt-1.5 border-t border-slate-800"><label class="${ssrRenderClass([((_c = __props.options.outputs) == null ? void 0 : _c.feed) !== false ? "bg-sky-500/10 border-sky-500/40 text-sky-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_d = __props.options.outputs) == null ? void 0 : _d.feed) !== false) ? " checked" : ""} class="rounded text-sky-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Feed 4:5</span></label><label class="${ssrRenderClass([((_e = __props.options.outputs) == null ? void 0 : _e.story) !== false ? "bg-indigo-500/10 border-indigo-500/40 text-indigo-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_f = __props.options.outputs) == null ? void 0 : _f.story) !== false) ? " checked" : ""} class="rounded text-indigo-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Story 9:16</span></label><label class="${ssrRenderClass([((_g = __props.options.outputs) == null ? void 0 : _g.reels) !== false ? "bg-emerald-500/10 border-emerald-500/40 text-emerald-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_h = __props.options.outputs) == null ? void 0 : _h.reels) !== false) ? " checked" : ""} class="rounded text-emerald-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Reels MP4</span></label></div></div><button${ssrIncludeBooleanAttr(!__props.isValid || __props.isGenerating || !!unref(jsonFormatError)) ? " disabled" : ""} class="${ssrRenderClass([[
887
+ _push(`<!--]--></div></div><div class="grid grid-cols-3 gap-2 pt-1.5 border-t border-slate-800"><label class="${ssrRenderClass([((_n = __props.options.outputs) == null ? void 0 : _n.feed) !== false ? "bg-sky-500/10 border-sky-500/40 text-sky-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_o = __props.options.outputs) == null ? void 0 : _o.feed) !== false) ? " checked" : ""} class="rounded text-sky-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Feed 4:5</span></label><label class="${ssrRenderClass([((_p = __props.options.outputs) == null ? void 0 : _p.story) !== false ? "bg-indigo-500/10 border-indigo-500/40 text-indigo-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_q = __props.options.outputs) == null ? void 0 : _q.story) !== false) ? " checked" : ""} class="rounded text-indigo-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Story 9:16</span></label><label class="${ssrRenderClass([((_r = __props.options.outputs) == null ? void 0 : _r.reels) !== false ? "bg-emerald-500/10 border-emerald-500/40 text-emerald-200" : "bg-slate-950/50 border-slate-800 text-slate-500", "flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none"])}"><input type="checkbox"${ssrIncludeBooleanAttr(((_s = __props.options.outputs) == null ? void 0 : _s.reels) !== false) ? " checked" : ""} class="rounded text-emerald-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"><span class="font-bold">Reels MP4</span></label></div></div><button${ssrIncludeBooleanAttr(!__props.isValid || __props.isGenerating || !!unref(jsonFormatError)) ? " disabled" : ""} class="${ssrRenderClass([[
663
888
  !__props.isValid || __props.isGenerating || !!unref(jsonFormatError) ? "bg-slate-800 text-slate-500 cursor-not-allowed border border-slate-700" : "bg-gradient-to-r from-sky-500 via-blue-600 to-indigo-600 text-white hover:from-sky-400 hover:to-indigo-500 shadow-sky-500/25 active:scale-[0.99]"
664
889
  ], "w-full py-3 px-4 rounded-xl font-black text-xs tracking-wide shadow-xl transition flex items-center justify-center gap-2"])}">`);
665
890
  if (__props.isGenerating) {
@@ -667,7 +892,7 @@ Keluarkan HANYA 1 objek JSON valid tanpa markdown formatting (\`\`\`json) agar b
667
892
  } else {
668
893
  _push(ssrRenderComponent(unref(Play), { class: "w-3.5 h-3.5 fill-current" }, null, _parent));
669
894
  }
670
- _push(`<span>${ssrInterpolate(__props.isGenerating ? __props.generateStage || "Rendering Content..." : "GENERATE CONTENT")}</span></button></div>`);
895
+ _push(`<span>${ssrInterpolate(__props.isGenerating ? __props.generateStage || "Rendering Content..." : "GENERATE CONTENT")}</span></button></div></div>`);
671
896
  };
672
897
  }
673
898
  });
@@ -686,11 +911,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
686
911
  selectedMusic: {},
687
912
  videoStartOffset: { default: 0 },
688
913
  audioStartOffset: { default: 0 },
914
+ isGenerating: { type: Boolean, default: false },
915
+ generateStage: { default: "" },
689
916
  generatedResult: {}
690
917
  },
691
918
  emits: ["update:videoStartOffset", "update:audioStartOffset"],
692
919
  setup(__props, { emit: __emit }) {
693
920
  const props = __props;
921
+ const emit = __emit;
694
922
  const KNOWN_DURATIONS = {
695
923
  "neon_cyber_grid.mp4": 8,
696
924
  "financial_pulse_flow.mp4": 8,
@@ -725,8 +953,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
725
953
  const showSafeZones = ref(false);
726
954
  const showOffsetEditor = ref(false);
727
955
  const copied = ref(false);
728
- const isOpeningFolder = ref(false);
956
+ ref(false);
729
957
  const zoomScale = ref(1);
958
+ const baseCanvasWidth = computed(() => activeTab.value === "feed" ? 360 : 300);
959
+ const baseCanvasHeight = computed(() => activeTab.value === "feed" ? 450 : 533.33);
730
960
  const videoElement = ref(null);
731
961
  const audioElement = ref(null);
732
962
  const isPlaying = ref(true);
@@ -758,6 +988,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
758
988
  lastTimestamp = timestamp;
759
989
  rafId = requestAnimationFrame(updatePlaybackTimeline);
760
990
  }
991
+ const dynamicDurations = ref({});
761
992
  watch(totalDuration, (newDur) => {
762
993
  if (currentTime.value > newDur) {
763
994
  currentTime.value = 0;
@@ -794,6 +1025,29 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
794
1025
  audioElement.value.currentTime = Math.min(targetA, audioFileDuration.value - 0.1);
795
1026
  }
796
1027
  }
1028
+ watch(
1029
+ () => props.selectedVideo,
1030
+ (newVal, oldVal) => {
1031
+ if (oldVal !== void 0 && newVal !== oldVal) {
1032
+ emit("update:videoStartOffset", 0);
1033
+ currentTime.value = 0;
1034
+ if (videoElement.value) {
1035
+ videoElement.value.currentTime = 0;
1036
+ }
1037
+ }
1038
+ }
1039
+ );
1040
+ watch(
1041
+ () => props.selectedMusic,
1042
+ (newVal, oldVal) => {
1043
+ if (oldVal !== void 0 && newVal !== oldVal) {
1044
+ emit("update:audioStartOffset", 0);
1045
+ if (audioElement.value) {
1046
+ audioElement.value.currentTime = 0;
1047
+ }
1048
+ }
1049
+ }
1050
+ );
797
1051
  watch(
798
1052
  () => props.videoStartOffset,
799
1053
  (newVal) => {
@@ -821,8 +1075,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
821
1075
  () => activeVideoSrc.value,
822
1076
  () => {
823
1077
  const filename = props.selectedVideo || "";
824
- if (KNOWN_DURATIONS[filename]) {
825
- videoFileDuration.value = KNOWN_DURATIONS[filename];
1078
+ if (dynamicDurations.value[filename] || KNOWN_DURATIONS[filename]) {
1079
+ videoFileDuration.value = dynamicDurations.value[filename] || KNOWN_DURATIONS[filename];
826
1080
  }
827
1081
  nextTick(() => {
828
1082
  seekToRelative(0);
@@ -833,8 +1087,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
833
1087
  () => activeAudioSrc.value,
834
1088
  () => {
835
1089
  const filename = props.selectedMusic || "";
836
- if (KNOWN_DURATIONS[filename]) {
837
- audioFileDuration.value = KNOWN_DURATIONS[filename];
1090
+ if (dynamicDurations.value[filename] || KNOWN_DURATIONS[filename]) {
1091
+ audioFileDuration.value = dynamicDurations.value[filename] || KNOWN_DURATIONS[filename];
838
1092
  }
839
1093
  }
840
1094
  );
@@ -856,7 +1110,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
856
1110
  );
857
1111
  return (_ctx, _push, _parent, _attrs) => {
858
1112
  const _component_TableCard = _sfc_main$3;
859
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-2.5 h-full text-slate-100 min-h-0 justify-between" }, _attrs))}><div class="flex flex-wrap items-center justify-between gap-2 p-2.5 bg-slate-900/90 border border-slate-800 rounded-2xl shadow-lg flex-shrink-0"><div class="flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-bold"><button class="${ssrRenderClass([unref(activeTab) === "feed" ? "bg-sky-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition"])}"> Feed 4:5 </button><button class="${ssrRenderClass([unref(activeTab) === "story" ? "bg-indigo-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition"])}"> Story 9:16 </button><button class="${ssrRenderClass([unref(activeTab) === "reels" ? "bg-emerald-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition flex items-center gap-1.5"])}"><span>Reels 9:16 (Video)</span>`);
1113
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-2.5 h-full text-slate-100 min-h-0 justify-between relative" }, _attrs))}>`);
1114
+ if (__props.isGenerating) {
1115
+ _push(`<div class="absolute inset-0 z-50 bg-slate-950/85 backdrop-blur-md rounded-2xl flex flex-col items-center justify-center p-6 text-center animate-in fade-in duration-200"><div class="relative flex items-center justify-center mb-5"><div class="w-20 h-20 rounded-full border-4 border-sky-500/20 border-t-sky-400 border-r-indigo-500 animate-spin"></div><div class="absolute inset-0 flex items-center justify-center">`);
1116
+ _push(ssrRenderComponent(unref(Sparkles), { class: "w-8 h-8 text-sky-400 animate-pulse" }, null, _parent));
1117
+ _push(`</div></div><h3 class="text-base font-black text-white tracking-wide mb-1.5"> Sedang Men-generate Konten... </h3><p class="text-xs text-sky-300 font-bold mb-4 flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-sky-400 animate-ping"></span><span>${ssrInterpolate(__props.generateStage || "Merender Gambar & Video Reels...")}</span></p><div class="w-64 max-w-full bg-slate-900 border border-slate-800 rounded-full h-2.5 overflow-hidden shadow-inner mb-3"><div class="h-full bg-gradient-to-r from-sky-500 via-indigo-500 to-purple-500 rounded-full animate-pulse w-full"></div></div><span class="text-[10px] text-slate-400 font-mono tracking-wider uppercase"> Multi-Format Studio Engine \u2022 Mohon Tunggu Sebentar </span></div>`);
1118
+ } else {
1119
+ _push(`<!---->`);
1120
+ }
1121
+ _push(`<div class="flex flex-wrap items-center justify-between gap-2 p-2.5 bg-slate-900/90 border border-slate-800 rounded-2xl shadow-lg flex-shrink-0"><div class="flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-bold"><button class="${ssrRenderClass([unref(activeTab) === "feed" ? "bg-sky-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition"])}"> Feed 4:5 </button><button class="${ssrRenderClass([unref(activeTab) === "story" ? "bg-indigo-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition"])}"> Story 9:16 </button><button class="${ssrRenderClass([unref(activeTab) === "reels" ? "bg-emerald-500 text-white shadow-md" : "text-slate-400 hover:text-white", "px-3 py-1.5 rounded-lg transition flex items-center gap-1.5"])}"><span>Reels 9:16 (Video)</span>`);
860
1122
  if (unref(activeTab) === "reels" && unref(isPlaying)) {
861
1123
  _push(`<span class="w-1.5 h-1.5 rounded-full bg-white animate-pulse"></span>`);
862
1124
  } else {
@@ -882,7 +1144,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
882
1144
  } else {
883
1145
  _push(`<!---->`);
884
1146
  }
885
- _push(`</div></div><div class="relative flex-1 min-h-0 bg-slate-950/80 border border-slate-800/80 rounded-2xl flex items-center justify-center p-3 overflow-auto shadow-inner custom-scrollbar"><div class="transition-transform duration-200 ease-out origin-center flex-shrink-0" style="${ssrRenderStyle({ transform: `scale(${unref(zoomScale)})` })}">`);
1147
+ _push(`</div></div><div class="relative flex-1 min-h-0 bg-slate-950/80 border border-slate-800/80 rounded-2xl flex p-4 overflow-auto shadow-inner custom-scrollbar"><div class="m-auto flex-shrink-0 relative transition-all duration-200 ease-out" style="${ssrRenderStyle({
1148
+ width: `${Math.round(unref(baseCanvasWidth) * unref(zoomScale))}px`,
1149
+ height: `${Math.round(unref(baseCanvasHeight) * unref(zoomScale))}px`
1150
+ })}"><div class="origin-top-left transition-transform duration-200 ease-out absolute top-0 left-0" style="${ssrRenderStyle({
1151
+ width: `${unref(baseCanvasWidth)}px`,
1152
+ height: `${unref(baseCanvasHeight)}px`,
1153
+ transform: `scale(${unref(zoomScale)})`
1154
+ })}">`);
886
1155
  if (unref(activeTab) === "feed") {
887
1156
  _push(`<div class="relative shadow-2xl rounded-2xl overflow-hidden border border-slate-700/80 flex-shrink-0" style="width:360px;height:450px;"><div style="width:1080px;height:1350px;transform:scale(0.333333);transform-origin:top left;">`);
888
1157
  _push(ssrRenderComponent(_component_TableCard, {
@@ -918,7 +1187,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
918
1187
  }
919
1188
  _push(`</div>`);
920
1189
  }
921
- _push(`</div></div>`);
1190
+ _push(`</div></div></div>`);
922
1191
  if (unref(activeTab) === "reels") {
923
1192
  _push(`<div class="flex flex-col bg-slate-900/95 border border-slate-800 rounded-2xl p-2.5 gap-2 shadow-xl flex-shrink-0 text-xs"><div class="flex items-center justify-between gap-3"><button class="p-2 rounded-xl bg-emerald-600 hover:bg-emerald-500 text-white font-bold transition flex items-center gap-1.5 shadow-md"${ssrRenderAttr("title", unref(isPlaying) ? "Pause Preview" : "Putar Preview")}>`);
924
1193
  if (unref(isPlaying)) {
@@ -954,19 +1223,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
954
1223
  } else {
955
1224
  _push(ssrRenderComponent(unref(Copy), { class: "w-3.5 h-3.5" }, null, _parent));
956
1225
  }
957
- _push(`<span>${ssrInterpolate(unref(copied) ? "Tersalin!" : "Copy Caption")}</span></button></div><textarea rows="2" class="w-full bg-slate-950 text-slate-200 text-xs p-2 rounded-xl border border-slate-800 focus:outline-none focus:border-sky-500/50 resize-none leading-relaxed font-sans" placeholder="Caption will appear here...">${ssrInterpolate(__props.data.caption)}</textarea></div>`);
958
- if (__props.generatedResult) {
959
- _push(`<div class="flex flex-wrap items-center justify-between gap-2 p-3 bg-emerald-950/40 border border-emerald-500/40 rounded-2xl shadow-xl flex-shrink-0"><div><div class="flex items-center gap-2 text-xs font-black text-emerald-300">`);
960
- _push(ssrRenderComponent(unref(Check), { class: "w-4 h-4 text-emerald-400" }, null, _parent));
961
- _push(` Render Selesai (${ssrInterpolate((__props.generatedResult.durationMs / 1e3).toFixed(1))}s) </div><div class="text-[11px] text-slate-400 font-mono mt-0.5">${ssrInterpolate(__props.generatedResult.jobId)}</div></div><div class="flex items-center gap-2"><a${ssrRenderAttr("href", `/api/download?jobId=${__props.generatedResult.jobId}`)} download class="inline-flex items-center gap-1.5 px-4 py-2 bg-emerald-600 hover:bg-emerald-500 text-white rounded-xl text-xs font-black shadow-lg transition">`);
962
- _push(ssrRenderComponent(unref(Download), { class: "w-3.5 h-3.5" }, null, _parent));
963
- _push(`<span>Download ZIP</span></a><button${ssrIncludeBooleanAttr(unref(isOpeningFolder)) ? " disabled" : ""} class="inline-flex items-center gap-1.5 px-4 py-2 bg-slate-800 hover:bg-slate-700 text-slate-200 border border-slate-700 rounded-xl text-xs font-bold transition">`);
964
- _push(ssrRenderComponent(unref(FolderOpen), { class: "w-3.5 h-3.5 text-amber-400" }, null, _parent));
965
- _push(`<span>Open Folder</span></button></div></div>`);
966
- } else {
967
- _push(`<!---->`);
968
- }
969
- _push(`</div>`);
1226
+ _push(`<span>${ssrInterpolate(unref(copied) ? "Tersalin!" : "Copy Caption")}</span></button></div><textarea rows="2" class="w-full bg-slate-950 text-slate-200 text-xs p-2 rounded-xl border border-slate-800 focus:outline-none focus:border-sky-500/50 resize-none leading-relaxed font-sans" placeholder="Caption will appear here...">${ssrInterpolate(__props.data.caption)}</textarea></div></div>`);
970
1227
  };
971
1228
  }
972
1229
  });
@@ -1354,6 +1611,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1354
1611
  const toastMessage = ref("");
1355
1612
  const toastType = ref("success");
1356
1613
  const mobileTab = ref("editor");
1614
+ const showMobileCanvasModal = ref(false);
1357
1615
  const systemStatus = ref(null);
1358
1616
  const validationState = computed(() => {
1359
1617
  const res = ContentDataSchema.safeParse(contentData.value);
@@ -1450,7 +1708,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1450
1708
  });
1451
1709
  if (res == null ? void 0 : res.success) {
1452
1710
  generatedResult.value = res;
1453
- showToast(`Sukses dirender dalam ${(res.durationMs / 1e3).toFixed(1)} detik!`);
1711
+ showToast(`\u2705 Generate selesai! Berhasil dirender dalam ${(res.durationMs / 1e3).toFixed(1)} detik.`, "success");
1454
1712
  }
1455
1713
  } catch (err) {
1456
1714
  showToast("Gagal render: " + (((_a = err.data) == null ? void 0 : _a.statusMessage) || err.message), "error");
@@ -1460,10 +1718,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1460
1718
  }
1461
1719
  }
1462
1720
  return (_ctx, _push, _parent, _attrs) => {
1463
- var _a, _b;
1721
+ var _a, _b, _c, _d, _e, _f;
1464
1722
  const _component_DashboardControls = _sfc_main$2;
1465
1723
  const _component_LivePreview = _sfc_main$1;
1466
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "h-screen w-screen bg-slate-950 text-slate-100 flex flex-col font-sans selection:bg-sky-500 selection:text-white overflow-hidden" }, _attrs))}><header class="h-14 flex-shrink-0 border-b border-slate-800/80 bg-slate-900/60 backdrop-blur sticky top-0 z-30 px-3 sm:px-6 flex items-center justify-between"><div class="flex items-center gap-2.5 sm:gap-3"><div class="w-8 h-8 rounded-xl bg-gradient-to-tr from-sky-500 via-indigo-600 to-purple-600 flex items-center justify-center font-black text-white shadow-md shadow-sky-500/20 text-xs"> SG </div><div><h1 class="text-sm font-extrabold tracking-tight text-white flex items-center gap-1.5 sm:gap-2"> SocialGen <span class="text-[9px] sm:text-[10px] font-bold px-2 py-0.5 rounded-full bg-slate-800 text-slate-300 border border-slate-700"> v${ssrInterpolate(((_a = unref(systemStatus)) == null ? void 0 : _a.version) || "2.3.6")}</span></h1></div></div><div class="flex items-center gap-2 sm:gap-3 text-xs">`);
1724
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "h-screen w-screen bg-slate-950 text-slate-100 flex flex-col font-sans selection:bg-sky-500 selection:text-white overflow-hidden" }, _attrs))}><header class="h-14 flex-shrink-0 border-b border-slate-800/80 bg-slate-900/60 backdrop-blur sticky top-0 z-30 px-3 sm:px-6 flex items-center justify-between"><div class="flex items-center gap-2.5 sm:gap-3"><div class="w-8 h-8 rounded-xl bg-gradient-to-tr from-sky-500 via-indigo-600 to-purple-600 flex items-center justify-center font-black text-white shadow-md shadow-sky-500/20 text-xs"> SG </div><div><h1 class="text-sm font-extrabold tracking-tight text-white flex items-center gap-1.5 sm:gap-2"> SocialGen <span class="text-[9px] sm:text-[10px] font-bold px-2 py-0.5 rounded-full bg-slate-800 text-slate-300 border border-slate-700"> v${ssrInterpolate(((_a = unref(systemStatus)) == null ? void 0 : _a.version) || "2.3.7")}</span></h1></div></div><div class="flex items-center gap-2 sm:gap-3 text-xs">`);
1467
1725
  if ((_b = unref(systemStatus)) == null ? void 0 : _b.geminiActive) {
1468
1726
  _push(`<span class="px-2.5 py-0.5 sm:py-1 rounded-full bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 font-semibold text-[10px] sm:text-[11px]"> \u25CF AI Connected </span>`);
1469
1727
  } else {
@@ -1477,9 +1735,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1477
1735
  }
1478
1736
  _push(`</button></div></div>`);
1479
1737
  if (unref(toastMessage)) {
1480
- _push(`<div class="${ssrRenderClass([unref(toastType) === "success" ? "bg-slate-900 text-slate-100 border-sky-500/50 shadow-sky-950/50" : "bg-rose-950 text-rose-200 border-rose-500/50", "fixed bottom-6 right-6 z-50 flex items-center gap-3 px-4 py-3 rounded-2xl shadow-2xl text-xs font-bold border transition-all"])}"><div class="flex items-center gap-2">`);
1738
+ _push(`<div class="${ssrRenderClass([unref(toastType) === "success" ? "bg-slate-900 text-slate-100 border-sky-500/50 shadow-sky-950/50" : unref(toastType) === "info" ? "bg-slate-900 text-sky-200 border-indigo-500/50 shadow-indigo-950/50" : "bg-rose-950 text-rose-200 border-rose-500/50", "fixed bottom-20 lg:bottom-6 right-4 lg:right-6 z-50 flex items-center gap-3 px-4 py-3 rounded-2xl shadow-2xl text-xs font-bold border transition-all max-w-[90vw]"])}"><div class="flex items-center gap-2">`);
1481
1739
  if (unref(toastType) === "success") {
1482
1740
  _push(`<span class="text-emerald-400">\u25CF</span>`);
1741
+ } else if (unref(toastType) === "info") {
1742
+ _push(`<span class="text-sky-400">\u2139\uFE0F</span>`);
1483
1743
  } else {
1484
1744
  _push(`<span class="text-rose-400">\u26A0\uFE0F</span>`);
1485
1745
  }
@@ -1530,11 +1790,56 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1530
1790
  "onUpdate:videoStartOffset": ($event) => unref(options).videoStartOffset = $event,
1531
1791
  "audio-start-offset": unref(options).audioStartOffset,
1532
1792
  "onUpdate:audioStartOffset": ($event) => unref(options).audioStartOffset = $event,
1533
- "generated-result": unref(generatedResult)
1793
+ "is-generating": unref(isGenerating),
1794
+ "generate-stage": unref(generateStage)
1534
1795
  }, null, _parent));
1535
1796
  _push(`</section></main>`);
1536
1797
  if (unref(mobileTab) === "editor") {
1537
- _push(`<button class="lg:hidden fixed bottom-5 left-1/2 -translate-x-1/2 z-40 px-5 py-2.5 rounded-full bg-gradient-to-r from-sky-500 to-indigo-600 text-white font-extrabold text-xs shadow-2xl border border-sky-400/40 flex items-center gap-2 hover:opacity-95"><span>\u{1F441}\uFE0F Lihat Preview Canvas</span></button>`);
1798
+ _push(`<button type="button" class="lg:hidden fixed bottom-20 right-4 z-40 px-4 py-2.5 rounded-full bg-gradient-to-r from-sky-500 to-indigo-600 hover:from-sky-400 hover:to-indigo-500 text-white font-black text-xs shadow-2xl border border-sky-400/40 flex items-center gap-1.5 active:scale-95 transition"><span class="text-sm">\u{1F441}\uFE0F</span><span>Intip Canvas</span></button>`);
1799
+ } else {
1800
+ _push(`<!---->`);
1801
+ }
1802
+ if (unref(mobileTab) === "editor") {
1803
+ _push(`<div class="lg:hidden fixed bottom-0 left-0 right-0 z-30 h-16 px-4 bg-slate-900/95 backdrop-blur-lg border-t border-slate-800 flex items-center justify-between gap-3 shadow-2xl"><div class="flex flex-col"><span class="text-[9px] font-bold text-slate-400 uppercase tracking-wider">Output</span><div class="flex items-center gap-1 text-[10px] font-bold text-sky-400">`);
1804
+ if (((_c = unref(options).outputs) == null ? void 0 : _c.feed) !== false) {
1805
+ _push(`<span>Feed</span>`);
1806
+ } else {
1807
+ _push(`<!---->`);
1808
+ }
1809
+ if (((_d = unref(options).outputs) == null ? void 0 : _d.feed) !== false && ((_e = unref(options).outputs) == null ? void 0 : _e.reels) !== false) {
1810
+ _push(`<span>\u2022</span>`);
1811
+ } else {
1812
+ _push(`<!---->`);
1813
+ }
1814
+ if (((_f = unref(options).outputs) == null ? void 0 : _f.reels) !== false) {
1815
+ _push(`<span>Reels</span>`);
1816
+ } else {
1817
+ _push(`<!---->`);
1818
+ }
1819
+ _push(`</div></div><button${ssrIncludeBooleanAttr(unref(isGenerating) || !unref(validationState).isValid) ? " disabled" : ""} type="button" class="flex-1 py-3 px-4 rounded-2xl bg-gradient-to-r from-sky-500 to-indigo-600 hover:from-sky-400 hover:to-indigo-500 text-white font-black text-xs tracking-wide shadow-xl shadow-sky-500/25 flex items-center justify-center gap-2 active:scale-95 transition disabled:opacity-50">`);
1820
+ if (unref(isGenerating)) {
1821
+ _push(`<span class="animate-spin">\u{1F504}</span>`);
1822
+ } else {
1823
+ _push(`<span>\u{1F680}</span>`);
1824
+ }
1825
+ _push(`<span>${ssrInterpolate(unref(isGenerating) ? unref(generateStage) || "Rendering Content..." : "GENERATE SEKARANG")}</span></button></div>`);
1826
+ } else {
1827
+ _push(`<!---->`);
1828
+ }
1829
+ if (unref(showMobileCanvasModal)) {
1830
+ _push(`<div class="lg:hidden fixed inset-0 z-50 bg-slate-950 flex flex-col justify-between overflow-hidden animate-in slide-in-from-bottom"><div class="h-14 px-4 bg-slate-900/95 border-b border-slate-800 flex items-center justify-between shrink-0 shadow-md"><div class="flex items-center gap-2"><span class="w-2 h-2 rounded-full bg-emerald-400 animate-ping"></span><span class="text-xs font-black text-white">Preview Canvas Penuh</span></div><button type="button" class="px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-slate-200 border border-slate-700 flex items-center gap-1 active:scale-95 transition"><span>\u2715 Tutup Preview</span></button></div><div class="flex-1 overflow-hidden p-2 flex flex-col min-h-0">`);
1831
+ _push(ssrRenderComponent(_component_LivePreview, {
1832
+ data: unref(contentData),
1833
+ "selected-video": unref(options).backgroundSource,
1834
+ "selected-music": unref(options).musicFile,
1835
+ "video-start-offset": unref(options).videoStartOffset,
1836
+ "onUpdate:videoStartOffset": ($event) => unref(options).videoStartOffset = $event,
1837
+ "audio-start-offset": unref(options).audioStartOffset,
1838
+ "onUpdate:audioStartOffset": ($event) => unref(options).audioStartOffset = $event,
1839
+ "is-generating": unref(isGenerating),
1840
+ "generate-stage": unref(generateStage)
1841
+ }, null, _parent));
1842
+ _push(`</div><div class="h-16 px-4 bg-slate-900/95 border-t border-slate-800 flex items-center justify-between gap-2 shrink-0"><button type="button" class="flex-1 py-2.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-slate-200 active:scale-95 transition"> \u270F\uFE0F Lanjut Edit Form </button><button${ssrIncludeBooleanAttr(unref(isGenerating) || !unref(validationState).isValid) ? " disabled" : ""} type="button" class="flex-1 py-2.5 rounded-xl bg-gradient-to-r from-sky-500 to-indigo-600 text-xs font-bold text-white shadow-lg active:scale-95 transition disabled:opacity-50"> \u{1F680} Langsung Render </button></div></div>`);
1538
1843
  } else {
1539
1844
  _push(`<!---->`);
1540
1845
  }
@@ -1550,4 +1855,4 @@ _sfc_main.setup = (props, ctx) => {
1550
1855
  };
1551
1856
 
1552
1857
  export { _sfc_main as default };
1553
- //# sourceMappingURL=pages-BsPKZpHw.mjs.map
1858
+ //# sourceMappingURL=pages-DAxeAK3-.mjs.map