@socialgen_user/socialgen 2.2.0 → 2.2.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.
Files changed (29) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/69MjyYNQ.js +1 -0
  3. package/.output/public/_nuxt/{QBlLTvjN.js → CY8lB25s.js} +1 -1
  4. package/.output/public/_nuxt/{nK16jZIC.js → Dd2SfSxO.js} +1 -1
  5. package/.output/public/_nuxt/{tf8XWazX.js → DllK7aKd.js} +2 -2
  6. package/.output/public/_nuxt/builds/latest.json +1 -1
  7. package/.output/public/_nuxt/builds/meta/f31c3c51-3958-4f02-b948-c5b86f8639fe.json +1 -0
  8. package/.output/public/_nuxt/{CmR5Iggk.js → coG5Mux2.js} +1 -1
  9. package/.output/public/_nuxt/{BDNIAT8Y.js → fBE6Av56.js} +1 -1
  10. package/.output/public/_nuxt/{fuMtRmMX.js → uujB4xLH.js} +1 -1
  11. package/.output/server/chunks/_/nitro.mjs +93 -93
  12. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  13. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -1
  14. package/.output/server/chunks/build/entry-styles.CgKViqen.mjs +8 -0
  15. package/.output/server/chunks/build/entry-styles.CgKViqen.mjs.map +1 -0
  16. package/.output/server/chunks/build/{pages-CbBqCzvC.mjs → pages-9EP79wh-.mjs} +108 -25
  17. package/.output/server/chunks/build/pages-9EP79wh-.mjs.map +1 -0
  18. package/.output/server/chunks/build/server.mjs +1 -1
  19. package/.output/server/chunks/build/styles.mjs +1 -1
  20. package/.output/server/chunks/routes/api/status.get.mjs +1 -1
  21. package/.output/server/package.json +1 -1
  22. package/bin/cli.js +1 -1
  23. package/data/drafts.json +102 -1
  24. package/package.json +1 -1
  25. package/.output/public/_nuxt/CDHRWqHx.js +0 -1
  26. package/.output/public/_nuxt/builds/meta/0a887d6d-9340-488f-8265-8ecb33690a1e.json +0 -1
  27. package/.output/server/chunks/build/entry-styles.BtOU26pL.mjs +0 -8
  28. package/.output/server/chunks/build/entry-styles.BtOU26pL.mjs.map +0 -1
  29. package/.output/server/chunks/build/pages-CbBqCzvC.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "date": "2026-11-21T16:01:03.933Z",
2
+ "date": "2026-11-21T16:12:48.830Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nuxt",
@@ -0,0 +1 @@
1
+ import{h as tt,d as lt,o as Et,M as ze,A as k,B as C,l,C as i,E as A,G as F,D as N,N as B,O as Re,P as ut,Q as Ye,R as Xe,S as we,T as Se,U as oe,V as Be,W as L,X as ct,i as T,Y as Jt,m as Le,Z as qt}from"./DllK7aKd.js";import{_ as Wt}from"./fBE6Av56.js";const Kt=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var Ze={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Yt=({size:s,strokeWidth:e=2,absoluteStrokeWidth:t,color:a,iconNode:n,name:r,class:d,...u},{slots:m})=>tt("svg",{...Ze,width:s||Ze.width,height:s||Ze.height,stroke:a||Ze.stroke,"stroke-width":t?Number(e)*24/Number(s):e,class:["lucide",`lucide-${Kt(r??"icon")}`],...u},[...n.map(f=>tt(...f)),...m.default?[m.default()]:[]]);const E=(s,e)=>(t,{slots:a})=>tt(Yt,{...t,iconNode:e,name:s},a);const pt=E("BookmarkIcon",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);const Fe=E("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Xt=E("CircleAlertIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Qt=E("CircleCheckIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const ft=E("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Dt=E("CopyIcon",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const es=E("DownloadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);const ht=E("FileTextIcon",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Vt=E("FilmIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);const ts=E("FolderOpenIcon",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const ss=E("LayoutTemplateIcon",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);const Pt=E("MusicIcon",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);const as=E("PauseIcon",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);const ns=E("PenIcon",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);const Zt=E("PlayIcon",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const rs=E("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const is=E("RefreshCwIcon",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const os=E("RotateCcwIcon",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const st=E("ScissorsIcon",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);const ls=E("SettingsIcon",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const ds=E("ShieldAlertIcon",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);const mt=E("SparklesIcon",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const Qe=E("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const gt=E("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);const us=E("Volume2Icon",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);const cs=E("VolumeXIcon",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);const ps=E("WandSparklesIcon",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);const vt=E("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const fs=E("ZoomInIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);const hs=E("ZoomOutIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),ms={class:"flex flex-col gap-3 text-slate-100"},gs={key:0,class:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"},vs={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"},xs={class:"flex items-center justify-between pb-3 border-b border-slate-800"},ys={class:"text-sm font-black text-white flex items-center gap-2"},bs={class:"p-3.5 bg-slate-950 rounded-2xl border border-slate-800 flex flex-col gap-2.5"},ks={class:"font-bold text-sky-400 flex items-center justify-between"},_s={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},ws={class:"flex flex-col gap-2"},Ss={class:"text-[11px] font-bold text-slate-400 uppercase tracking-wider"},Cs={class:"flex flex-col gap-2 max-h-[220px] overflow-y-auto pr-1 custom-scrollbar"},Ts={class:"flex-1"},Os={class:"flex items-center gap-2 mb-1"},$s={class:"font-extrabold text-white text-xs"},Ns={class:"px-1.5 py-0.2 rounded text-[9px] font-bold bg-slate-800 text-slate-300 border border-slate-700"},As={class:"text-[11px] text-slate-400 leading-snug"},Is={class:"flex items-center gap-1"},Ms=["onClick"],Rs=["onClick"],js={key:1,class:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4"},Es={class:"bg-slate-900 border border-slate-700 rounded-3xl max-w-2xl w-full p-6 shadow-2xl flex flex-col gap-4 text-xs max-h-[90vh]"},Ds={class:"flex items-center justify-between pb-3 border-b border-slate-800"},Vs={class:"text-sm font-black text-white flex items-center gap-2"},Ps={class:"flex items-center gap-2 bg-slate-950 p-2.5 rounded-xl border border-slate-800 text-[11px] flex-wrap"},Zs={class:"text-white font-semibold"},Ls={class:"text-purple-400 font-bold"},zs={class:"relative flex-1 min-h-[220px]"},Bs=["value"],Fs={class:"flex items-center justify-between pt-2 border-t border-slate-800"},Us={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"},Hs={class:"text-xs font-black text-white flex items-center gap-2"},Gs={class:"flex items-center gap-1.5 flex-wrap"},Js={class:"flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 mr-1.5 shadow-inner"},qs=["value"],Ws=["disabled"],Ks={class:"relative group"},Ys={class:"absolute right-0 mt-1 hidden group-hover:flex flex-col bg-slate-900 border border-slate-800 rounded-xl shadow-2xl py-2 z-20 w-56 text-xs"},Xs={class:"px-3 py-1.5"},Qs={key:2,class:"p-3 bg-gradient-to-r from-sky-950 via-indigo-950 to-purple-950 border border-sky-500/50 rounded-2xl flex items-center gap-3 animate-pulse shadow-lg shadow-sky-500/10"},ea={class:"w-6 h-6 rounded-lg bg-sky-500/20 border border-sky-400/40 flex items-center justify-center flex-shrink-0"},ta={class:"text-[11px]"},sa={class:"font-extrabold text-white flex items-center gap-2"},aa={class:"text-[9px] px-1.5 py-0.2 rounded bg-sky-500/30 text-sky-200 border border-sky-400/30"},na={class:"flex items-center justify-between bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-semibold"},ra={class:"flex items-center gap-1"},ia={class:"flex items-center gap-1.5"},oa={key:3,class:"flex flex-col gap-1.5 p-2.5 bg-slate-900/90 border border-slate-800 rounded-2xl max-h-[300px] overflow-y-auto custom-scrollbar"},la={key:0,class:"text-center py-8 text-slate-500 text-[11px] leading-relaxed"},da=["onClick"],ua={class:"flex-1 pr-2"},ca={class:"flex items-center gap-1.5 mb-0.5"},pa={class:"px-1.5 py-0.2 rounded text-[8px] font-bold uppercase bg-amber-500/20 text-amber-300 border border-amber-500/30"},fa={class:"text-[9px] text-slate-400 font-semibold"},ha={class:"font-bold text-[11px] truncate text-slate-100"},ma=["onClick"],ga={key:4,class:"flex flex-col gap-1.5 p-2.5 bg-slate-900/90 border border-slate-800 rounded-2xl max-h-[300px] overflow-y-auto custom-scrollbar"},va={key:0,class:"text-center py-8 text-slate-500 text-[11px] leading-relaxed"},xa=["onClick"],ya={class:"flex-1 pr-2"},ba={class:"flex items-center gap-1.5 mb-0.5"},ka={class:"px-1.5 py-0.2 rounded text-[8px] font-bold uppercase bg-purple-500/20 text-purple-300 border border-purple-500/30"},_a={class:"text-[9px] text-slate-400 font-semibold"},wa={key:0,class:"text-[9px] text-slate-500 font-mono ml-auto"},Sa={class:"font-bold text-[11px] truncate text-slate-100"},Ca=["onClick"],Ta={key:5,class:"flex flex-col bg-slate-900/90 border border-slate-800 rounded-2xl overflow-hidden shadow-lg"},Oa={class:"grid grid-cols-2 gap-2 p-2.5 bg-slate-950/70 border-b border-slate-800 text-xs"},$a={class:"block text-[10px] font-bold text-slate-300 mb-1 flex items-center gap-1"},Na=["value"],Aa=["value"],Ia={class:"col-span-2 grid grid-cols-3 gap-2 pt-1 border-t border-slate-800/60 mt-1"},Ma={class:"col-span-1"},Ra=["value"],ja={class:"col-span-2"},Ea=["value"],Da={class:"flex items-center justify-between px-3 py-1.5 bg-slate-950/50 border-b border-slate-800"},Va={class:"flex items-center gap-2 text-xs"},Pa={key:0,class:"inline-flex items-center gap-0.5 px-1.5 py-0.2 rounded-full text-[9px] font-semibold bg-emerald-500/20 text-emerald-400 border border-emerald-500/30"},Za={key:1,class:"inline-flex items-center gap-0.5 px-1.5 py-0.2 rounded-full text-[9px] font-semibold bg-rose-500/20 text-rose-400 border border-rose-500/30"},La={class:"relative p-2"},za=["value"],Ba={key:0,class:"text-[10px] text-rose-400 mt-1 px-1"},Fa={class:"p-3 bg-slate-900/90 border border-slate-800 rounded-2xl flex flex-col gap-2.5 shadow-lg text-xs"},Ua={class:"flex flex-col gap-1.5"},Ha={class:"flex items-center justify-between gap-2"},Ga={class:"font-bold text-slate-300 flex items-center gap-1.5 text-[11px]"},Ja={class:"flex items-center gap-1.5"},qa=["value"],Wa=["value"],Ka=["disabled"],Ya={class:"hidden sm:inline"},Xa={class:"flex items-center justify-between pl-5 pr-1 text-[10px] text-slate-400"},Qa={class:"flex items-center gap-1 text-sky-300"},en=["value"],tn={class:"flex flex-col gap-1.5 pt-1.5 border-t border-slate-800"},sn={class:"flex items-center justify-between gap-2"},an={class:"font-bold text-slate-300 flex items-center gap-1.5 text-[11px]"},nn={class:"flex items-center gap-1.5"},rn=["value"],on=["value"],ln=["disabled"],dn={class:"hidden sm:inline"},un={class:"flex items-center justify-between pl-5 pr-1 text-[10px] text-slate-400"},cn={class:"flex items-center gap-1 text-purple-300"},pn=["value"],fn={class:"flex items-center justify-between pt-1.5 border-t border-slate-800"},hn={class:"font-bold text-slate-300 flex items-center gap-1.5 text-[11px]"},mn={class:"flex items-center gap-1.5 flex-wrap justify-end"},gn=["onClick"],vn={class:"grid grid-cols-3 gap-2 pt-1.5 border-t border-slate-800"},xn=["checked"],yn=["checked"],bn=["checked"],kn=["disabled"],_n=lt({__name:"DashboardControls",props:{modelValue:{},options:{},isValid:{type:Boolean},validationError:{},isGenerating:{type:Boolean},generateStage:{},isAutoTopicLoading:{type:Boolean},drafts:{},activeDraftIndex:{},history:{},activeHistoryIndex:{}},emits:["update:modelValue","update:options","generate","autoTopic","selectDraft","deleteDraft","saveDraft","selectHistory","deleteHistory","clearAllHistory"],setup(s,{emit:e}){const t=s,a=e,n=T(""),r=T(""),d=T(""),u=T("gemini-3.8-flash"),m=T("editor"),f=T([]),_=T("tech"),P=T(!1),D=T(null),M=T({id:"",name:"",theme:"blue-tech",description:""});async function Q(){try{const x=await $fetch("/api/niches");x?.niches&&x.niches.length>0&&(f.value=x.niches,f.value.some(o=>o.id===_.value)||(_.value=f.value[0].id))}catch(x){console.error("Failed to load niches:",x)}}function W(){D.value=null,M.value={id:"",name:"",theme:t.modelValue.theme||"blue-tech",description:""},P.value=!0}function se(x){D.value=x.id,M.value={id:x.id,name:x.name,theme:x.theme||"blue-tech",description:x.description}}async function ie(){if(!M.value.name.trim()){alert("Nama Niche wajib diisi");return}const o={id:D.value||M.value.name.toLowerCase().replace(/[^a-z0-9_-]/g,"_"),name:M.value.name.trim(),theme:M.value.theme,description:M.value.description.trim()||`Fokus pada topik ${M.value.name.trim()}`};try{const c=await $fetch("/api/niches",{method:"POST",body:o});c?.niches&&(f.value=c.niches,_.value=o.id,D.value=null,M.value={id:"",name:"",theme:"blue-tech",description:""})}catch(c){alert("Gagal menyimpan niche: "+(c.data?.statusMessage||c.message))}}async function fe(x){if(f.value.length<=1){alert("Minimal harus ada 1 niche tersisa.");return}if(confirm("Hapus niche ini?"))try{const o=await $fetch(`/api/niches?id=${x}`,{method:"DELETE"});o?.niches&&(f.value=o.niches,_.value===x&&(_.value=o.niches[0].id),D.value===x&&(D.value=null))}catch(o){alert("Gagal menghapus niche: "+(o.data?.statusMessage||o.message))}}const ae=T(!1),ne=T(""),de=T({}),_e=T(!1),G=T(!1),he=T(["cyber_blue.mp4","emerald_flow.mp4","default_bg.mp4"]),ue=T(["synthwave_pulse.mp3","lofi_chill.mp3","default_ambient.mp3"]),z=T(!1),me=T(null),Te=T(null);async function w(){try{const x=await $fetch("/api/media");x?.videos?.length&&(he.value=x.videos),x?.audio?.length&&(ue.value=x.audio)}catch(x){console.error("Failed to fetch media list:",x)}}Et(()=>{w(),Q()});async function v(x,o){const c=x.target,Y=c.files?.[0];if(Y){z.value=!0;try{const ce=new FormData;ce.append("file",Y);const Pe=await $fetch("/api/upload-media",{method:"POST",body:ce});Pe?.success&&(await w(),Pe.type==="video"?J("backgroundSource",Pe.filename):J("musicFile",Pe.filename))}catch(ce){alert("Upload gagal: "+(ce.data?.statusMessage||ce.message))}finally{z.value=!1,c.value=""}}}ze(()=>t.modelValue,x=>{try{const o=JSON.parse(n.value||"{}");JSON.stringify(o)!==JSON.stringify(x)&&(n.value=JSON.stringify(x,null,2))}catch{n.value=JSON.stringify(x,null,2)}},{immediate:!0,deep:!0});function ee(x){const o=x.target;n.value=o.value;try{const c=JSON.parse(o.value);r.value="",a("update:modelValue",c)}catch(c){r.value="Invalid JSON: "+c.message}}function H(){try{const x=JSON.parse(n.value);n.value=JSON.stringify(x,null,2),r.value="",a("update:modelValue",x)}catch{r.value="Cannot format invalid JSON"}}function X(x){const o={...t.modelValue,layoutType:x};a("update:modelValue",o)}function We(x){const o={...t.modelValue,watermark:x};a("update:modelValue",o)}function V(x){const o={...t.modelValue,title:x};a("update:modelValue",o)}function S(x){const o={...t.modelValue,theme:x};a("update:modelValue",o),a("update:options",{...t.options,theme:x})}function ge(x){const o={...t.modelValue,reelsDuration:x};a("update:modelValue",o)}function J(x,o){a("update:options",{...t.options,[x]:o})}function Ke(x,o){const c=t.options.outputs||{feed:!0,story:!0,reels:!0};a("update:options",{...t.options,outputs:{...c,[x]:o}})}function K(x,o){a("autoTopic",_.value,o||d.value||void 0,u.value)}async function Ft(){ae.value=!0,_e.value=!0;try{const x=await $fetch("/api/copy-prompt",{query:{niche:_.value,layout:t.modelValue.layoutType||"news"}});ne.value=x.prompt,de.value={topic:x.topic,pair:x.pair,niche:x.niche,usedCount:x.usedCount}}catch(x){console.error("Failed to get manual prompt:",x)}finally{_e.value=!1}}function Ut(){ne.value&&(navigator.clipboard.writeText(ne.value),G.value=!0,setTimeout(()=>{G.value=!1},2500))}function Ht(){t.history.length!==0&&confirm(`Bersihkan semua ${t.history.length} riwayat generate otomatis?`)&&a("clearAllHistory")}function Gt(x){if(!x)return"";try{return new Date(x).toLocaleDateString("id-ID",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}catch{return""}}return(x,o)=>(k(),C("div",ms,[l(P)?(k(),C("div",gs,[i("div",vs,[i("div",xs,[i("div",null,[i("h3",ys,[A(l(ls),{class:"w-4 h-4 text-sky-400"}),o[43]||(o[43]=F(" Kelola & Buat Niche Baru ",-1))]),o[44]||(o[44]=i("p",{class:"text-[11px] text-slate-400 mt-0.5"}," Simpan niche favoritmu. AI dan Prompt Generator akan otomatis menggunakannya. ",-1))]),i("button",{onClick:o[0]||(o[0]=c=>P.value=!1),class:"p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800"},[A(l(vt),{class:"w-4 h-4"})])]),i("div",bs,[i("div",ks,[i("span",null,N(l(D)?"✏️ Edit Niche":"➕ Tambah Niche Baru"),1),l(D)?(k(),C("button",{key:0,onClick:o[1]||(o[1]=c=>{D.value=null,M.value={id:"",name:"",theme:"blue-tech",description:""}}),class:"text-[10px] text-slate-400 hover:text-white"}," Batal Edit ")):B("",!0)]),i("div",_s,[i("div",null,[o[45]||(o[45]=i("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Nama Niche",-1)),Re(i("input",{"onUpdate:modelValue":o[2]||(o[2]=c=>l(M).name=c),type:"text",placeholder:"Contoh: Kuliner & Restoran, Otomotif EV",class:"w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white focus:outline-none focus:border-sky-500"},null,512),[[ut,l(M).name]])]),i("div",null,[o[47]||(o[47]=i("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Tema Default",-1)),Re(i("select",{"onUpdate:modelValue":o[3]||(o[3]=c=>l(M).theme=c),class:"w-full bg-slate-900 border border-slate-800 rounded-xl px-2.5 py-1.5 text-xs text-white focus:outline-none focus:border-sky-500"},[...o[46]||(o[46]=[Xe('<option value="blue-tech">🔵 Blue Tech</option><option value="emerald-finance">🟢 Emerald Finance</option><option value="slate-education">🟣 Slate Education</option><option value="dark-contrast">⚫ Dark Contrast</option><option value="crimson-alert">🔴 Crimson Alert</option><option value="amber-gold">🟡 Amber Gold</option><option value="cyber-violet">🟪 Cyber Violet</option><option value="sunset-orange">🟠 Sunset Orange</option><option value="nordic-frost">❄️ Nordic Frost</option><option value="monochrome-luxe">⚪ Monochrome Luxe</option>',10)])],512),[[Ye,l(M).theme]])])]),i("div",null,[o[48]||(o[48]=i("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"},"Fokus Topik & Instruksi Prompt",-1)),Re(i("textarea",{"onUpdate:modelValue":o[4]||(o[4]=c=>l(M).description=c),rows:"2",placeholder:"Jelaskan topik yang ingin disorot AI (misal: perbandingan harga kopi, biaya buka gerai, margin laba kuliner...)",class:"w-full bg-slate-900 border border-slate-800 rounded-xl p-2 text-xs text-slate-200 focus:outline-none focus:border-sky-500 resize-none leading-relaxed"},null,512),[[ut,l(M).description]])]),i("button",{onClick:ie,class:"self-end px-4 py-1.5 rounded-xl bg-sky-600 hover:bg-sky-500 text-white font-bold text-xs transition flex items-center gap-1.5 shadow"},[A(l(Fe),{class:"w-3.5 h-3.5"}),i("span",null,N(l(D)?"Perbarui Niche":"Simpan Niche"),1)])]),i("div",ws,[i("div",Ss," Daftar Niche Tersimpan ("+N(l(f).length)+") ",1),i("div",Cs,[(k(!0),C(we,null,Se(l(f),c=>(k(),C("div",{key:c.id,class:"p-2.5 rounded-xl border bg-slate-950 border-slate-800 flex items-start justify-between gap-2"},[i("div",Ts,[i("div",Os,[i("span",$s,N(c.name),1),i("span",Ns,N(c.theme||"blue-tech"),1)]),i("p",As,N(c.description),1)]),i("div",Is,[i("button",{onClick:Y=>se(c),class:"p-1.5 rounded-lg text-slate-400 hover:text-sky-300 hover:bg-slate-800 transition",title:"Edit Niche"},[A(l(ns),{class:"w-3.5 h-3.5"})],8,Ms),i("button",{onClick:Y=>fe(c.id),class:"p-1.5 rounded-lg text-slate-400 hover:text-rose-400 hover:bg-slate-800 transition",title:"Hapus Niche"},[A(l(Qe),{class:"w-3.5 h-3.5"})],8,Rs)])]))),128))])])])])):B("",!0),l(ae)?(k(),C("div",js,[i("div",Es,[i("div",Ds,[i("div",null,[i("h3",Vs,[A(l(ht),{class:"w-4 h-4 text-purple-400"}),o[49]||(o[49]=F(" Master Prompt AI (Dynamic Research & Zero-Collision) ",-1))]),o[50]||(o[50]=i("p",{class:"text-[11px] text-slate-400 mt-0.5"}," Salin prompt ini ke ChatGPT / Gemini / Claude / DeepSeek untuk mencari topik terbaru. ",-1))]),i("button",{onClick:o[5]||(o[5]=c=>ae.value=!1),class:"p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800"},[A(l(vt),{class:"w-4 h-4"})])]),i("div",Ps,[o[51]||(o[51]=i("span",{class:"font-bold text-sky-400"},"Niche Aktif:",-1)),i("span",Zs,N(l(f).find(c=>c.id===l(_))?.name||"Default"),1),o[52]||(o[52]=i("span",{class:"text-slate-500"},"•",-1)),i("span",Ls,N(l(de).usedCount||0)+" Topik Riwayat Dikecualikan",1)]),i("div",zs,[i("textarea",{value:l(ne),readonly:"",rows:"12",class:"w-full h-full bg-slate-950 text-slate-300 font-mono text-[11px] p-3 rounded-xl border border-slate-800 focus:outline-none resize-none leading-relaxed select-all"},null,8,Bs)]),i("div",Fs,[o[53]||(o[53]=i("span",{class:"text-[11px] text-slate-400"},[F(" Paste hasil JSON yang kamu buat ke kolom "),i("b",null,"RAW JSON"),F(" SocialGen. ")],-1)),i("button",{onClick:Ut,class:"px-5 py-2.5 rounded-xl font-bold bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-500 hover:to-indigo-500 text-white shadow-lg flex items-center gap-2 transition"},[l(G)?(k(),oe(l(Fe),{key:0,class:"w-4 h-4 text-emerald-400"})):(k(),oe(l(Dt),{key:1,class:"w-4 h-4"})),i("span",null,N(l(G)?"Prompt Berhasil Disalin!":"Copy Master Prompt"),1)])])])])):B("",!0),i("div",Us,[i("div",null,[i("h2",Hs,[A(l(ps),{class:"w-3.5 h-3.5 text-sky-400"}),o[54]||(o[54]=F(" Content Studio ",-1))]),o[55]||(o[55]=i("p",{class:"text-[10px] text-slate-400"},"Multi-Format Studio",-1))]),i("div",Gs,[i("div",Js,[Re(i("select",{"onUpdate:modelValue":o[6]||(o[6]=c=>Be(_)?_.value=c:null),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"},[(k(!0),C(we,null,Se(l(f),c=>(k(),C("option",{key:c.id,value:c.id,class:"bg-slate-900 text-white"},N(c.name),9,qs))),128))],512),[[Ye,l(_)]]),i("button",{onClick:W,class:"p-1 px-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-sky-400 hover:text-sky-300 border border-slate-700 text-[10px] font-bold transition flex items-center gap-1",title:"Kelola & Buat Niche Baru"},[A(l(rs),{class:"w-3 h-3"}),o[56]||(o[56]=i("span",{class:"hidden sm:inline"},"Niche",-1))])]),i("button",{onClick:Ft,title:"Buat prompt manual bebas bentrok untuk ChatGPT / Gemini Web",class:"inline-flex items-center gap-1 px-2.5 py-1.5 text-[11px] font-bold text-purple-300 bg-purple-950/40 hover:bg-purple-900/50 border border-purple-500/30 rounded-xl transition shadow-sm"},[A(l(ht),{class:"w-3 h-3"}),o[57]||(o[57]=i("span",{class:"hidden sm:inline"},"Prompt Manual",-1))]),i("button",{onClick:o[7]||(o[7]=c=>K()),disabled:s.isGenerating||s.isAutoTopicLoading,class:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold text-white bg-gradient-to-r from-sky-500 via-indigo-600 to-purple-600 hover:from-sky-400 hover:to-indigo-500 rounded-xl shadow-md transition disabled:opacity-50"},[A(l(mt),{class:L(["w-3.5 h-3.5",{"animate-spin":s.isAutoTopicLoading}])},null,8,["class"]),i("span",null,N(s.isAutoTopicLoading?"Meriset Data...":"✨ Auto-Topic"),1)],8,Ws),i("div",Ks,[o[62]||(o[62]=i("button",{class:"px-2 py-1.5 text-xs font-bold text-slate-300 bg-slate-800 hover:bg-slate-700 border border-slate-700 rounded-xl"}," ▾ ",-1)),i("div",Ys,[o[59]||(o[59]=i("div",{class:"px-3 py-1 text-[10px] font-bold text-slate-500 uppercase"},"Model AI Engine",-1)),i("div",Xs,[Re(i("select",{"onUpdate:modelValue":o[8]||(o[8]=c=>Be(u)?u.value=c:null),class:"w-full bg-slate-950 border border-slate-700 rounded-lg p-1.5 text-xs text-sky-300 focus:outline-none"},[...o[58]||(o[58]=[i("option",{value:"gemini-3.8-flash"},"⚡ Gemini 3.8 Flash",-1),i("option",{value:"gemini-3.5-flash"},"⚡ Gemini 3.5 Flash",-1),i("option",{value:"gemini-2.5-pro"},"💎 Gemini 2.5 Pro",-1),i("option",{value:"gemini-1.5-pro"},"💎 Gemini 1.5 Pro",-1)])],512),[[Ye,l(u)]])]),o[60]||(o[60]=i("div",{class:"border-t border-slate-800 my-1"},null,-1)),o[61]||(o[61]=i("div",{class:"px-3 py-1 text-[10px] font-bold text-slate-500 uppercase"},"Pilih Format Khusus",-1)),i("button",{onClick:o[9]||(o[9]=c=>K(void 0,"table")),class:"px-3 py-1.5 text-left text-sky-300 hover:bg-slate-800"}," 📊 Classic Comparison Table "),i("button",{onClick:o[10]||(o[10]=c=>K(void 0,"versus")),class:"px-3 py-1.5 text-left text-orange-300 hover:bg-slate-800"}," ⚔️ Versus Showdown Arena "),i("button",{onClick:o[11]||(o[11]=c=>K(void 0,"receipt")),class:"px-3 py-1.5 text-left text-teal-300 hover:bg-slate-800"}," 🧾 Monthly Living Invoice "),i("button",{onClick:o[12]||(o[12]=c=>K(void 0,"news")),class:"px-3 py-1.5 text-left text-rose-300 hover:bg-slate-800"}," 📰 Breaking News / Pamphlet "),i("button",{onClick:o[13]||(o[13]=c=>K(void 0,"stat")),class:"px-3 py-1.5 text-left text-amber-300 hover:bg-slate-800"}," 🎯 Big Shocking Number "),i("button",{onClick:o[14]||(o[14]=c=>K(void 0,"timeline")),class:"px-3 py-1.5 text-left text-yellow-300 hover:bg-slate-800"}," ⏳ 10-Year Shift (Then vs Now) "),i("button",{onClick:o[15]||(o[15]=c=>K(void 0,"barchart")),class:"px-3 py-1.5 text-left text-cyan-300 hover:bg-slate-800"}," 📈 Income Allocation Bars "),i("button",{onClick:o[16]||(o[16]=c=>K(void 0,"list")),class:"px-3 py-1.5 text-left text-emerald-300 hover:bg-slate-800"}," 🏆 Top 5 Ranked Countdown "),i("button",{onClick:o[17]||(o[17]=c=>K(void 0,"quote")),class:"px-3 py-1.5 text-left text-purple-300 hover:bg-slate-800"}," 💬 Hot Take / Quote Debate "),i("button",{onClick:o[18]||(o[18]=c=>K(void 0,"leaderboard")),class:"px-3 py-1.5 text-left text-yellow-400 hover:bg-slate-800 font-bold"}," 🥇 Multi-Country Leaderboard (Top 10) "),i("button",{onClick:o[19]||(o[19]=c=>K(void 0,"editorial")),class:"px-3 py-1.5 text-left text-sky-400 hover:bg-slate-800 font-bold"}," 📰 Editorial Storytelling Deep Dive "),i("button",{onClick:o[20]||(o[20]=c=>K(void 0,"matrix")),class:"px-3 py-1.5 text-left text-teal-300 hover:bg-slate-800 font-bold"}," 📊 Multi-Column Matrix (3-4 Negara) "),i("button",{onClick:o[21]||(o[21]=c=>K(void 0,"debate")),class:"px-3 py-1.5 text-left text-rose-400 hover:bg-slate-800 font-bold"}," ⚡ Debate Arena (Pro vs Kontra) "),i("button",{onClick:o[22]||(o[22]=c=>K(void 0,"tierlist")),class:"px-3 py-1.5 text-left text-amber-300 hover:bg-slate-800 font-bold"}," 🎖️ Tier List Ranking (S, A, B, C) ")])])])]),s.isAutoTopicLoading?(k(),C("div",Qs,[i("div",ea,[A(l(mt),{class:"w-3.5 h-3.5 text-sky-400 animate-spin"})]),i("div",ta,[i("div",sa,[o[63]||(o[63]=i("span",null,"AI Research Engine Sedang Bekerja...",-1)),i("span",aa,N(l(u)),1)]),o[64]||(o[64]=i("p",{class:"text-[10px] text-slate-300 mt-0.5"},"Menganalisis angka perbandingan 2026 & meracik copywriting viral.",-1))])])):B("",!0),i("div",na,[i("div",ra,[i("button",{onClick:o[23]||(o[23]=c=>m.value="editor"),class:L(["px-2.5 py-1 rounded-lg transition text-[11px]",l(m)==="editor"?"bg-slate-800 text-sky-400 shadow font-bold":"text-slate-400 hover:text-white"])}," JSON Editor ",2),i("button",{onClick:o[24]||(o[24]=c=>m.value="drafts"),class:L(["px-2.5 py-1 rounded-lg transition flex items-center gap-1 text-[11px]",l(m)==="drafts"?"bg-slate-800 text-amber-400 shadow font-bold":"text-slate-400 hover:text-white"]),title:"Draft yang kamu simpan manual untuk dipakai nanti"},[A(l(pt),{class:"w-3 h-3"}),i("span",null,"Drafts ("+N(s.drafts.length)+")",1)],2),i("button",{onClick:o[25]||(o[25]=c=>m.value="history"),class:L(["px-2.5 py-1 rounded-lg transition flex items-center gap-1 text-[11px]",l(m)==="history"?"bg-slate-800 text-purple-400 shadow font-bold":"text-slate-400 hover:text-white"]),title:"Riwayat otomatis setiap kali generate"},[A(l(ft),{class:"w-3 h-3"}),i("span",null,"Riwayat ("+N(s.history.length)+")",1)],2)]),i("div",ia,[l(m)==="history"&&s.history.length>0?(k(),C("button",{key:0,onClick:Ht,class:"text-[10px] text-rose-400 hover:text-rose-300 transition font-bold pr-1",title:"Bersihkan semua riwayat generate"}," Bersihkan Riwayat ")):B("",!0),i("button",{onClick:o[26]||(o[26]=c=>a("saveDraft")),class:"text-[10px] text-amber-400 hover:text-amber-300 transition pr-2 font-bold flex items-center gap-1",title:"Simpan data saat ini ke Drafts untuk digunakan nanti"},[A(l(pt),{class:"w-3 h-3"}),o[65]||(o[65]=i("span",null,"+ Simpan ke Draft",-1))])])]),l(m)==="drafts"?(k(),C("div",oa,[s.drafts.length===0?(k(),C("div",la,[...o[66]||(o[66]=[F(" Belum ada draft tersimpan.",-1),i("br",null,null,-1),F(" Klik ",-1),i("b",{class:"text-amber-400"},"+ Simpan ke Draft",-1),F(" di atas untuk menyimpan konten ini agar bisa diedit/digenerate nanti! ",-1)])])):B("",!0),(k(!0),C(we,null,Se(s.drafts,(c,Y)=>(k(),C("div",{key:Y,onClick:ce=>a("selectDraft",Y),class:L(["p-2 rounded-xl border cursor-pointer transition flex items-center justify-between text-xs group",s.activeDraftIndex===Y?"bg-amber-500/15 border-amber-500/50 text-white":"bg-slate-950/60 border-slate-800 text-slate-300 hover:border-slate-700"])},[i("div",ua,[i("div",ca,[i("span",pa,N(c.layoutType||"table"),1),i("span",fa,N(c.category),1)]),i("div",ha,N(c.title),1)]),i("button",{onClick:ct(ce=>a("deleteDraft",Y),["stop"]),class:"opacity-0 group-hover:opacity-100 p-1 text-slate-400 hover:text-rose-400 transition rounded",title:"Hapus draft ini"},[A(l(Qe),{class:"w-3.5 h-3.5"})],8,ma)],10,da))),128))])):l(m)==="history"?(k(),C("div",ga,[s.history.length===0?(k(),C("div",va,[...o[67]||(o[67]=[F(" Belum ada riwayat pembuatan.",-1),i("br",null,null,-1),F(" Setiap kali kamu klik ",-1),i("b",{class:"text-sky-400"},"GENERATE CONTENT",-1),F(", hasil pembuatan akan otomatis tercatat di sini! ",-1)])])):B("",!0),(k(!0),C(we,null,Se(s.history,(c,Y)=>(k(),C("div",{key:Y,onClick:ce=>a("selectHistory",Y),class:L(["p-2 rounded-xl border cursor-pointer transition flex items-center justify-between text-xs group",s.activeHistoryIndex===Y?"bg-purple-500/15 border-purple-500/50 text-white":"bg-slate-950/60 border-slate-800 text-slate-300 hover:border-slate-700"])},[i("div",ya,[i("div",ba,[i("span",ka,N(c.layoutType||"reels"),1),i("span",_a,N(c.category),1),c.generatedAt?(k(),C("span",wa,N(Gt(c.generatedAt)),1)):B("",!0)]),i("div",Sa,N(c.title),1)]),i("button",{onClick:ct(ce=>a("deleteHistory",Y),["stop"]),class:"opacity-0 group-hover:opacity-100 p-1 text-slate-400 hover:text-rose-400 transition rounded",title:"Hapus riwayat ini"},[A(l(Qe),{class:"w-3.5 h-3.5"})],8,Ca)],10,xa))),128))])):(k(),C("div",Ta,[i("div",Oa,[i("div",null,[i("label",$a,[A(l(ss),{class:"w-3 h-3 text-sky-400"}),o[68]||(o[68]=F(" Format Template ",-1))]),i("select",{value:s.modelValue.layoutType||"table",onChange:o[27]||(o[27]=c=>X(c.target.value)),class:"w-full bg-slate-900 border border-slate-800 rounded-lg p-1.5 text-slate-200 focus:outline-none focus:border-sky-500 font-semibold text-[11px]"},[...o[69]||(o[69]=[Xe('<option value="table">📊 Comparison Table</option><option value="versus">⚔️ Versus Showdown Arena</option><option value="receipt">🧾 Monthly Living Invoice</option><option value="news">📰 Special Report Pamphlet</option><option value="stat">🎯 Big Shocking Number</option><option value="timeline">⏳ 10-Year Shift (Then vs Now)</option><option value="barchart">📈 Income Allocation Bars</option><option value="list">🏆 Top 5 Ranked List</option><option value="quote">💬 Hot Take / Quote Debate</option><option value="leaderboard">🥇 Multi-Country Leaderboard (Top 10)</option><option value="editorial">📰 Editorial Storytelling Deep Dive</option><option value="matrix">📊 Multi-Column Matrix (3-4 Negara)</option><option value="debate">⚡ Debate Arena (Pro vs Kontra)</option><option value="tierlist">🎖️ Tier List Ranking (S, A, B, C)</option>',14)])],40,Na)]),i("div",null,[o[71]||(o[71]=i("label",{class:"block text-[10px] font-bold text-slate-300 mb-1"}," Theme Color (10 Pilihan) ",-1)),i("select",{value:s.modelValue.theme||"blue-tech",onChange:o[28]||(o[28]=c=>S(c.target.value)),class:"w-full bg-slate-900 border border-slate-800 rounded-lg p-1.5 text-slate-200 focus:outline-none focus:border-sky-500 font-semibold text-[11px]"},[...o[70]||(o[70]=[Xe('<option value="blue-tech">🔵 Blue Tech (AI &amp; Software)</option><option value="emerald-finance">🟢 Emerald Finance (Salaries &amp; Living)</option><option value="slate-education">🟣 Slate Education (Education &amp; Career)</option><option value="dark-contrast">⚫ Dark Contrast (Universal Bold)</option><option value="crimson-alert">🔴 Crimson Alert (Breaking Shock)</option><option value="amber-gold">🟡 Amber Gold (Luxury &amp; Executive)</option><option value="cyber-violet">🟪 Cyber Violet (Synthwave &amp; Neon)</option><option value="sunset-orange">🟠 Sunset Orange (Warm Energy)</option><option value="nordic-frost">❄️ Nordic Frost (Polar Cyan Clean)</option><option value="monochrome-luxe">⚪ Monochrome Luxe (Minimalist)</option>',10)])],40,Aa)]),i("div",Ia,[i("div",Ma,[o[72]||(o[72]=i("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"}," Watermark Handle ",-1)),i("input",{type:"text",value:s.modelValue.watermark||"@SocialGen",onInput:o[29]||(o[29]=c=>We(c.target.value)),placeholder:"@NamaAkun",class:"w-full bg-slate-900 border border-slate-800 rounded-lg px-2.5 py-1.5 text-sky-400 font-semibold text-[11px] focus:outline-none focus:border-sky-500 transition"},null,40,Ra)]),i("div",ja,[o[73]||(o[73]=i("label",{class:"block text-[10px] font-bold text-slate-400 mb-1"}," Judul Konten (Title) ",-1)),i("input",{type:"text",value:s.modelValue.title,onInput:o[30]||(o[30]=c=>V(c.target.value)),placeholder:"Judul Utama Konten...",class:"w-full bg-slate-900 border border-slate-800 rounded-lg px-2.5 py-1.5 text-slate-100 font-semibold text-[11px] focus:outline-none focus:border-sky-500 transition"},null,40,Ea)])])]),i("div",Da,[i("div",Va,[o[76]||(o[76]=i("span",{class:"font-bold text-slate-300 text-[10px]"},"RAW JSON SocialGen",-1)),s.isValid&&!l(r)?(k(),C("span",Pa,[A(l(Qt),{class:"w-2.5 h-2.5"}),o[74]||(o[74]=F(" Valid ",-1))])):(k(),C("span",Za,[A(l(Xt),{class:"w-2.5 h-2.5"}),o[75]||(o[75]=F(" Invalid ",-1))]))]),i("button",{onClick:H,class:"text-[10px] text-slate-400 hover:text-sky-400 transition"}," Format JSON ")]),i("div",La,[i("textarea",{value:l(n),onInput:ee,rows:"7",spellcheck:"false",class:"w-full bg-slate-950 text-sky-200 text-[11px] font-mono p-2.5 rounded-xl border border-slate-800 focus:outline-none focus:border-sky-500/50 resize-y leading-relaxed",placeholder:"Paste Content JSON here..."},null,40,za),l(r)||s.validationError?(k(),C("p",Ba," ⚠️ "+N(l(r)||s.validationError),1)):B("",!0)])])),i("input",{type:"file",ref_key:"videoInputRef",ref:me,accept:"video/mp4,video/webm",class:"hidden",onChange:o[31]||(o[31]=c=>v(c))},null,544),i("input",{type:"file",ref_key:"audioInputRef",ref:Te,accept:"audio/mp3,audio/mpeg,audio/wav",class:"hidden",onChange:o[32]||(o[32]=c=>v(c))},null,544),i("div",Fa,[i("div",Ua,[i("div",Ha,[i("label",Ga,[A(l(Vt),{class:"w-3.5 h-3.5 text-sky-400"}),o[77]||(o[77]=i("span",null,"Background",-1))]),i("div",Ja,[i("select",{value:s.options.backgroundSource||"random",onChange:o[33]||(o[33]=c=>J("backgroundSource",c.target.value)),class:"bg-slate-950 border border-slate-800 rounded-lg px-2 py-1 text-slate-300 text-[11px] focus:outline-none max-w-[170px]"},[o[78]||(o[78]=i("option",{value:"random"},"🔀 Acak Video",-1)),(k(!0),C(we,null,Se(l(he),c=>(k(),C("option",{key:c,value:c},N(c.replace(".mp4","").replace(/_/g," ")),9,Wa))),128)),o[79]||(o[79]=i("option",{value:"pexels"},"🌐 Pexels API (Auto HD)",-1))],40,qa),i("button",{onClick:o[34]||(o[34]=c=>l(me)?.click()),disabled:l(z),title:"Upload Video MP4 Sendiri",class:"p-1 px-2 rounded-lg border border-sky-500/30 text-sky-300 bg-sky-950/40 hover:bg-sky-900/60 text-[10px] flex items-center gap-1 font-bold transition disabled:opacity-50"},[A(l(gt),{class:"w-3 h-3"}),i("span",Ya,N(l(z)?"...":"Upload"),1)],8,Ka)])]),i("div",Xa,[i("span",Qa,[A(l(st),{class:"w-2.5 h-2.5"}),F(" Mulai Video: "+N(s.options.videoStartOffset||0)+"s ",1)]),i("input",{type:"range",min:"0",max:"60",step:"1",value:s.options.videoStartOffset||0,onInput:o[35]||(o[35]=c=>J("videoStartOffset",Number(c.target.value))),class:"w-32 h-1 bg-slate-950 rounded appearance-none cursor-pointer accent-sky-400"},null,40,en)])]),i("div",tn,[i("div",sn,[i("label",an,[A(l(Pt),{class:"w-3.5 h-3.5 text-purple-400"}),o[80]||(o[80]=i("span",null,"Musik Reels",-1))]),i("div",nn,[i("select",{value:s.options.musicFile||"random",onChange:o[36]||(o[36]=c=>J("musicFile",c.target.value)),class:"bg-slate-950 border border-slate-800 rounded-lg px-2 py-1 text-slate-300 text-[11px] focus:outline-none max-w-[170px]"},[o[81]||(o[81]=i("option",{value:"random"},"🔀 Acak Musik",-1)),(k(!0),C(we,null,Se(l(ue),c=>(k(),C("option",{key:c,value:c},N(c.replace(".mp3","").replace(/_/g," ")),9,on))),128))],40,rn),i("button",{onClick:o[37]||(o[37]=c=>l(Te)?.click()),disabled:l(z),title:"Upload Musik MP3 Sendiri",class:"p-1 px-2 rounded-lg border border-purple-500/30 text-purple-300 bg-purple-950/40 hover:bg-purple-900/60 text-[10px] flex items-center gap-1 font-bold transition disabled:opacity-50"},[A(l(gt),{class:"w-3 h-3"}),i("span",dn,N(l(z)?"...":"Upload"),1)],8,ln)])]),i("div",un,[i("span",cn,[A(l(st),{class:"w-2.5 h-2.5"}),F(" Mulai Musik: "+N(s.options.audioStartOffset||0)+"s ",1)]),i("input",{type:"range",min:"0",max:"120",step:"1",value:s.options.audioStartOffset||0,onInput:o[38]||(o[38]=c=>J("audioStartOffset",Number(c.target.value))),class:"w-32 h-1 bg-slate-950 rounded appearance-none cursor-pointer accent-purple-400"},null,40,pn)])]),i("div",fn,[i("label",hn,[A(l(ft),{class:"w-3.5 h-3.5 text-emerald-400"}),o[82]||(o[82]=i("span",null,"Durasi Reels:",-1))]),i("div",mn,[(k(),C(we,null,Se([7,10,15,30,60],c=>i("button",{key:c,onClick:Y=>ge(c),class:L(["px-2 py-0.5 text-[10px] font-bold rounded-lg border transition",(s.modelValue.reelsDuration||30)===c?"bg-emerald-500/20 border-emerald-500/60 text-emerald-300":"bg-slate-950 border-slate-800 text-slate-400 hover:text-white"])},N(c===60?"1m":c+"s"),11,gn)),64))])]),i("div",vn,[i("label",{class:L(["flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none",s.options.outputs?.feed!==!1?"bg-sky-500/10 border-sky-500/40 text-sky-200":"bg-slate-950/50 border-slate-800 text-slate-500"])},[i("input",{type:"checkbox",checked:s.options.outputs?.feed!==!1,onChange:o[39]||(o[39]=c=>Ke("feed",c.target.checked)),class:"rounded text-sky-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"},null,40,xn),o[83]||(o[83]=i("span",{class:"font-bold"},"Feed 4:5",-1))],2),i("label",{class:L(["flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none",s.options.outputs?.story!==!1?"bg-indigo-500/10 border-indigo-500/40 text-indigo-200":"bg-slate-950/50 border-slate-800 text-slate-500"])},[i("input",{type:"checkbox",checked:s.options.outputs?.story!==!1,onChange:o[40]||(o[40]=c=>Ke("story",c.target.checked)),class:"rounded text-indigo-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"},null,40,yn),o[84]||(o[84]=i("span",{class:"font-bold"},"Story 9:16",-1))],2),i("label",{class:L(["flex items-center gap-1.5 p-1.5 rounded-xl border text-[11px] cursor-pointer transition select-none",s.options.outputs?.reels!==!1?"bg-emerald-500/10 border-emerald-500/40 text-emerald-200":"bg-slate-950/50 border-slate-800 text-slate-500"])},[i("input",{type:"checkbox",checked:s.options.outputs?.reels!==!1,onChange:o[41]||(o[41]=c=>Ke("reels",c.target.checked)),class:"rounded text-emerald-500 focus:ring-0 bg-slate-900 border-slate-700 w-3 h-3"},null,40,bn),o[85]||(o[85]=i("span",{class:"font-bold"},"Reels MP4",-1))],2)])]),i("button",{onClick:o[42]||(o[42]=c=>a("generate")),disabled:!s.isValid||s.isGenerating||!!l(r),class:L(["w-full py-3 px-4 rounded-xl font-black text-xs tracking-wide shadow-xl transition flex items-center justify-center gap-2",[!s.isValid||s.isGenerating||l(r)?"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]"]])},[s.isGenerating?(k(),oe(l(is),{key:0,class:"w-3.5 h-3.5 animate-spin"})):(k(),oe(l(Zt),{key:1,class:"w-3.5 h-3.5 fill-current"})),i("span",null,N(s.isGenerating?s.generateStage||"Rendering Content...":"GENERATE CONTENT"),1)],10,kn)]))}}),wn={class:"flex flex-col gap-2.5 h-full text-slate-100 min-h-0 justify-between"},Sn={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"},Cn={class:"flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-bold"},Tn={key:0,class:"w-1.5 h-1.5 rounded-full bg-white animate-pulse"},On={class:"flex items-center gap-2 text-xs"},$n={class:"flex items-center gap-1 bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs shadow-inner"},Nn={key:0,class:"relative shadow-2xl rounded-2xl overflow-hidden border border-slate-700/80 flex-shrink-0",style:{width:"360px",height:"450px"}},An={style:{width:"1080px",height:"1350px",transform:"scale(0.333333)","transform-origin":"top left"}},In={key:1,class:"relative shadow-2xl rounded-2xl overflow-hidden border border-slate-700/80 flex-shrink-0",style:{width:"300px",height:"533.33px"}},Mn={key:0,class:"absolute inset-0 z-0 bg-slate-950 overflow-hidden"},Rn=["src"],jn=["src","muted"],En={class:"relative z-10 pointer-events-none",style:{width:"1080px",height:"1920px",transform:"scale(0.277778)","transform-origin":"top left"}},Dn={key:1,class:"absolute inset-0 z-20 pointer-events-none flex flex-col justify-between"},Vn={class:"flex-1 flex justify-end p-2"},Pn={key:0,class:"w-10 bg-red-500/20 border-l border-dashed border-red-500/60 rounded flex flex-col items-center justify-center gap-3 text-[8px] text-red-200 py-3 text-center px-0.5 font-bold"},Zn={key:0,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"},Ln={class:"flex items-center justify-between gap-3"},zn=["title"],Bn={class:"text-[11px] hidden sm:inline"},Fn={class:"flex-1 flex items-center gap-2"},Un=["max","value"],Hn={class:"font-mono text-[11px] font-bold text-slate-300 min-w-[75px] text-right"},Gn=["title"],Jn={class:"text-[10px] font-bold hidden sm:inline"},qn={key:0,class:"grid grid-cols-1 sm:grid-cols-2 gap-3 p-2.5 bg-slate-950/80 rounded-xl border border-slate-800/80 animate-fadeIn"},Wn={class:"flex flex-col gap-1.5"},Kn={class:"flex items-center justify-between text-[11px]"},Yn={class:"font-bold text-sky-300 flex items-center gap-1"},Xn=["value"],Qn={class:"flex flex-col gap-1.5"},er={class:"flex items-center justify-between text-[11px]"},tr={class:"font-bold text-purple-300 flex items-center gap-1"},sr=["value"],ar={class:"flex flex-col bg-slate-900/90 border border-slate-800 rounded-2xl p-2.5 gap-1.5 shadow-lg flex-shrink-0"},nr={class:"flex items-center justify-between text-xs"},rr=["value"],ir={key:1,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"},or={class:"flex items-center gap-2 text-xs font-black text-emerald-300"},lr={class:"text-[11px] text-slate-400 font-mono mt-0.5"},dr={class:"flex items-center gap-2"},ur=["href"],cr=["disabled"],pr=lt({__name:"LivePreview",props:{data:{},selectedVideo:{},selectedMusic:{},videoStartOffset:{default:0},audioStartOffset:{default:0},generatedResult:{}},emits:["update:videoStartOffset","update:audioStartOffset"],setup(s,{emit:e}){const t=s,a=e,n=Le(()=>t.selectedVideo&&t.selectedVideo!=="pexels"&&t.selectedVideo!=="random"?`/videos/${t.selectedVideo}`:"/videos/default_bg.mp4"),r=Le(()=>t.selectedMusic&&t.selectedMusic!=="random"?`/musics/${t.selectedMusic}`:"/musics/synthwave_pulse.mp3"),d=T("feed"),u=T(!1),m=T(!1),f=T(!1),_=T(!1),P=T(1),D=T(null),M=T(null),Q=T(!0),W=T(!0),se=T(0),ie=Le(()=>t.data.reelsDuration||30);function fe(){P.value<2.5&&(P.value=Math.min(2.5,+(P.value+.15).toFixed(2)))}function ae(){P.value>.5&&(P.value=Math.max(.5,+(P.value-.15).toFixed(2)))}function ne(){P.value=1}function de(V){(V.ctrlKey||V.metaKey)&&(V.preventDefault(),V.deltaY<0?fe():ae())}function _e(){Q.value?he():G()}function G(){Q.value=!0,D.value&&D.value.play().catch(()=>{}),M.value&&!W.value&&M.value.play().catch(()=>{})}function he(){Q.value=!1,D.value&&D.value.pause(),M.value&&M.value.pause()}function ue(){W.value=!W.value,M.value&&(M.value.muted=W.value,!W.value&&Q.value?(M.value.currentTime=(t.audioStartOffset||0)+se.value,M.value.play().catch(()=>{})):M.value.pause())}function z(){if(!D.value)return;const V=t.videoStartOffset||0,S=Math.max(0,D.value.currentTime-V);se.value=Math.min(S,ie.value),S>=ie.value&&(me(0),Q.value&&G())}function me(V){se.value=V;const S=t.videoStartOffset||0,ge=t.audioStartOffset||0;D.value&&(D.value.currentTime=S+V),M.value&&(M.value.currentTime=ge+V)}function Te(V){const S=Number(V.target.value);me(S)}function w(V){a("update:videoStartOffset",V),D.value&&(D.value.currentTime=V+se.value)}function v(V){a("update:audioStartOffset",V),M.value&&(M.value.currentTime=V+se.value)}function ee(){if(D.value){const V=Math.floor(D.value.currentTime);w(V)}}function H(V){const S=Math.floor(V/60),ge=Math.floor(V%60);return`${S.toString().padStart(2,"0")}:${ge.toString().padStart(2,"0")}`}function X(){t.data.caption&&(navigator.clipboard.writeText(t.data.caption),f.value=!0,setTimeout(()=>{f.value=!1},2e3))}async function We(){if(t.generatedResult){_.value=!0;try{await $fetch("/api/open-folder",{method:"POST",body:{jobId:t.generatedResult.jobId,resultDir:t.generatedResult.resultDir}})}catch(V){console.error("Failed to open folder:",V)}finally{_.value=!1}}}return ze(()=>n.value,()=>{qt(()=>{me(0)})}),(V,S)=>{const ge=Wt;return k(),C("div",wn,[i("div",Sn,[i("div",Cn,[i("button",{onClick:S[0]||(S[0]=J=>d.value="feed"),class:L(["px-3 py-1.5 rounded-lg transition",l(d)==="feed"?"bg-sky-500 text-white shadow-md":"text-slate-400 hover:text-white"])}," Feed 4:5 ",2),i("button",{onClick:S[1]||(S[1]=J=>d.value="story"),class:L(["px-3 py-1.5 rounded-lg transition",l(d)==="story"?"bg-indigo-500 text-white shadow-md":"text-slate-400 hover:text-white"])}," Story 9:16 ",2),i("button",{onClick:S[2]||(S[2]=J=>d.value="reels"),class:L(["px-3 py-1.5 rounded-lg transition flex items-center gap-1.5",l(d)==="reels"?"bg-emerald-500 text-white shadow-md":"text-slate-400 hover:text-white"])},[S[8]||(S[8]=i("span",null,"Reels 9:16 (Video)",-1)),l(d)==="reels"&&l(Q)?(k(),C("span",Tn)):B("",!0)],2)]),i("div",On,[i("div",$n,[i("button",{onClick:ae,title:"Zoom Out (-15%)",class:"p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition"},[A(l(hs),{class:"w-3.5 h-3.5"})]),i("button",{onClick:ne,title:"Klik untuk Reset Zoom (100% Fit)",class:"px-2 py-0.5 rounded-lg text-[11px] font-bold text-sky-400 hover:bg-slate-800 hover:text-sky-300 transition font-mono min-w-[42px] text-center"},N(Math.round(l(P)*100))+"% ",1),i("button",{onClick:fe,title:"Zoom In (+15%)",class:"p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition"},[A(l(fs),{class:"w-3.5 h-3.5"})]),l(P)!==1?(k(),C("button",{key:0,onClick:ne,title:"Reset ke Ukuran Pas",class:"p-1.5 rounded-lg text-amber-400 hover:bg-slate-800 transition"},[A(l(os),{class:"w-3.5 h-3.5"})])):B("",!0)]),l(d)!=="feed"?(k(),C("button",{key:0,onClick:S[3]||(S[3]=J=>u.value=!l(u)),class:L(["inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border text-xs font-bold transition",l(u)?"bg-amber-500/20 text-amber-300 border-amber-500/50":"bg-slate-950 text-slate-400 border-slate-800"])},[A(l(ds),{class:"w-3.5 h-3.5"}),S[9]||(S[9]=i("span",{class:"hidden sm:inline"},"Safe Zones",-1))],2)):B("",!0)])]),i("div",{onWheel:de,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"},[i("div",{class:"transition-transform duration-200 ease-out origin-center flex-shrink-0",style:Jt({transform:`scale(${l(P)})`})},[l(d)==="feed"?(k(),C("div",Nn,[i("div",An,[A(ge,{data:s.data,mode:"feed","is-render":!0},null,8,["data"])])])):(k(),C("div",In,[l(d)==="reels"?(k(),C("div",Mn,[(k(),C("video",{ref_key:"videoElement",ref:D,key:l(n),autoplay:"",loop:"",muted:"",playsinline:"",class:"w-full h-full object-cover brightness-90 contrast-105",src:l(n),onTimeupdate:z},null,40,Rn)),S[10]||(S[10]=i("div",{class:"absolute inset-0 bg-slate-950/30 backdrop-blur-[0.5px]"},null,-1)),(k(),C("audio",{ref_key:"audioElement",ref:M,key:l(r),src:l(r),muted:l(W),loop:""},null,8,jn))])):B("",!0),i("div",En,[A(ge,{data:s.data,mode:l(d)==="reels"?"overlay":"story","is-render":!0},null,8,["data","mode"])]),l(u)?(k(),C("div",Dn,[S[12]||(S[12]=i("div",{class:"h-14 bg-red-500/20 border-b border-dashed border-red-500/60 flex items-center justify-center text-[9px] text-red-200 font-bold tracking-wider"}," TOP SAFE ZONE (Profile & Status) ",-1)),i("div",Vn,[l(d)==="reels"?(k(),C("div",Pn,[...S[11]||(S[11]=[i("span",null,"❤️ Like",-1),i("span",null,"💬 Comm",-1),i("span",null,"↗️ Share",-1)])])):B("",!0)]),S[13]||(S[13]=i("div",{class:"h-20 bg-red-500/20 border-t border-dashed border-red-500/60 flex items-center justify-center text-[9px] text-red-200 font-bold tracking-wider"}," BOTTOM SAFE ZONE (Caption & Audio) ",-1))])):B("",!0)]))],4)],32),l(d)==="reels"?(k(),C("div",Zn,[i("div",Ln,[i("button",{onClick:_e,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",title:l(Q)?"Pause Preview":"Putar Preview"},[l(Q)?(k(),oe(l(as),{key:0,class:"w-3.5 h-3.5 fill-current"})):(k(),oe(l(Zt),{key:1,class:"w-3.5 h-3.5 fill-current"})),i("span",Bn,N(l(Q)?"Pause":"Play"),1)],8,zn),i("div",Fn,[i("input",{type:"range",min:"0",max:l(ie),step:"0.1",value:l(se),onInput:Te,class:"flex-1 h-1.5 bg-slate-950 rounded-lg appearance-none cursor-pointer accent-emerald-500 hover:accent-emerald-400"},null,40,Un),i("span",Hn,N(H(l(se)))+" / "+N(H(l(ie))),1)]),i("button",{onClick:ue,class:L(["p-2 rounded-xl border transition flex items-center gap-1",l(W)?"bg-slate-950 text-slate-400 border-slate-800 hover:text-white":"bg-purple-600/30 text-purple-300 border-purple-500/50"]),title:l(W)?"Aktifkan Suara Musik":"Mute Musik"},[l(W)?(k(),oe(l(cs),{key:1,class:"w-3.5 h-3.5"})):(k(),oe(l(us),{key:0,class:"w-3.5 h-3.5 text-purple-400"})),i("span",Jn,N(l(W)?"Muted":"Audio ON"),1)],10,Gn),i("button",{onClick:S[4]||(S[4]=J=>m.value=!l(m)),class:L(["px-2.5 py-2 rounded-xl border text-[11px] font-bold flex items-center gap-1.5 transition",l(m)?"bg-sky-500/20 text-sky-300 border-sky-500/50":"bg-slate-950 text-slate-400 border-slate-800 hover:text-white"]),title:"Atur Detik Awal Video & Musik"},[A(l(st),{class:"w-3.5 h-3.5 text-sky-400"}),S[14]||(S[14]=i("span",{class:"hidden sm:inline"},"Trim Offset",-1))],2)]),l(m)?(k(),C("div",qn,[i("div",Wn,[i("div",Kn,[i("span",Yn,[A(l(Vt),{class:"w-3 h-3"}),F(" Start Video: "+N(s.videoStartOffset||0)+"s ",1)]),i("button",{onClick:ee,class:"text-[9px] px-1.5 py-0.5 rounded bg-slate-800 hover:bg-slate-700 text-sky-300 border border-slate-700 transition",title:"Gunakan posisi video saat ini sebagai detik mulai"}," Set Detik Ini ")]),i("input",{type:"range",min:"0",max:"60",step:"1",value:s.videoStartOffset||0,onInput:S[5]||(S[5]=J=>w(Number(J.target.value))),class:"w-full h-1 bg-slate-900 rounded appearance-none cursor-pointer accent-sky-400"},null,40,Xn)]),i("div",Qn,[i("div",er,[i("span",tr,[A(l(Pt),{class:"w-3 h-3"}),F(" Start Musik: "+N(s.audioStartOffset||0)+"s ",1)]),S[15]||(S[15]=i("span",{class:"text-[10px] text-slate-500 font-mono"}," (Skip intro ke beat) ",-1))]),i("input",{type:"range",min:"0",max:"120",step:"1",value:s.audioStartOffset||0,onInput:S[6]||(S[6]=J=>v(Number(J.target.value))),class:"w-full h-1 bg-slate-900 rounded appearance-none cursor-pointer accent-purple-400"},null,40,sr)])])):B("",!0)])):B("",!0),i("div",ar,[i("div",nr,[S[16]||(S[16]=i("span",{class:"font-extrabold text-slate-300 text-[11px]"},"VIRAL CAPTION & HASHTAGS",-1)),i("button",{onClick:X,class:"inline-flex items-center gap-1.5 px-3 py-1 bg-slate-800 hover:bg-slate-700 text-sky-300 border border-slate-700 rounded-lg transition text-[11px] font-bold"},[l(f)?(k(),oe(l(Fe),{key:0,class:"w-3.5 h-3.5 text-emerald-400"})):(k(),oe(l(Dt),{key:1,class:"w-3.5 h-3.5"})),i("span",null,N(l(f)?"Tersalin!":"Copy Caption"),1)])]),i("textarea",{value:s.data.caption,onInput:S[7]||(S[7]=J=>s.data.caption=J.target.value),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..."},null,40,rr)]),s.generatedResult?(k(),C("div",ir,[i("div",null,[i("div",or,[A(l(Fe),{class:"w-4 h-4 text-emerald-400"}),F(" Render Selesai ("+N((s.generatedResult.durationMs/1e3).toFixed(1))+"s) ",1)]),i("div",lr,N(s.generatedResult.jobId),1)]),i("div",dr,[i("a",{href:`/api/download?jobId=${s.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"},[A(l(es),{class:"w-3.5 h-3.5"}),S[17]||(S[17]=i("span",null,"Download ZIP",-1))],8,ur),i("button",{onClick:We,disabled:l(_),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"},[A(l(ts),{class:"w-3.5 h-3.5 text-amber-400"}),S[18]||(S[18]=i("span",null,"Open Folder",-1))],8,cr)])])):B("",!0)])}}});var j;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const r={};for(const d of n)r[d]=d;return r},s.getValidEnumValues=n=>{const r=s.objectKeys(n).filter(u=>typeof n[n[u]]!="number"),d={};for(const u of r)d[u]=n[u];return s.objectValues(d)},s.objectValues=n=>s.objectKeys(n).map(function(r){return n[r]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const r=[];for(const d in n)Object.prototype.hasOwnProperty.call(n,d)&&r.push(d);return r},s.find=(n,r)=>{for(const d of n)if(r(d))return d},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,r=" | "){return n.map(d=>typeof d=="string"?`'${d}'`:d).join(r)}s.joinValues=a,s.jsonStringifyReplacer=(n,r)=>typeof r=="bigint"?r.toString():r})(j||(j={}));var xt;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(xt||(xt={}));const y=j.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ve=s=>{switch(typeof s){case"undefined":return y.undefined;case"string":return y.string;case"number":return Number.isNaN(s)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(s)?y.array:s===null?y.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?y.promise:typeof Map<"u"&&s instanceof Map?y.map:typeof Set<"u"&&s instanceof Set?y.set:typeof Date<"u"&&s instanceof Date?y.date:y.object;default:return y.unknown}},p=j.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class pe extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(r){return r.message},a={_errors:[]},n=r=>{for(const d of r.issues)if(d.code==="invalid_union")d.unionErrors.map(n);else if(d.code==="invalid_return_type")n(d.returnTypeError);else if(d.code==="invalid_arguments")n(d.argumentsError);else if(d.path.length===0)a._errors.push(t(d));else{let u=a,m=0;for(;m<d.path.length;){const f=d.path[m];m===d.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(t(d))):u[f]=u[f]||{_errors:[]},u=u[f],m++}}};return n(this),a}static assert(e){if(!(e instanceof pe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,j.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)if(n.path.length>0){const r=n.path[0];t[r]=t[r]||[],t[r].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}pe.create=s=>new pe(s);const at=(s,e)=>{let t;switch(s.code){case p.invalid_type:s.received===y.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case p.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,j.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:t=`Unrecognized key(s) in object: ${j.joinValues(s.keys,", ")}`;break;case p.invalid_union:t="Invalid input";break;case p.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${j.joinValues(s.options)}`;break;case p.invalid_enum_value:t=`Invalid enum value. Expected ${j.joinValues(s.options)}, received '${s.received}'`;break;case p.invalid_arguments:t="Invalid function arguments";break;case p.invalid_return_type:t="Invalid function return type";break;case p.invalid_date:t="Invalid date";break;case p.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:j.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case p.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case p.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case p.custom:t="Invalid input";break;case p.invalid_intersection_types:t="Intersection results could not be merged";break;case p.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case p.not_finite:t="Number must be finite";break;default:t=e.defaultError,j.assertNever(s)}return{message:t}};let fr=at;function hr(){return fr}const mr=s=>{const{data:e,path:t,errorMaps:a,issueData:n}=s,r=[...t,...n.path||[]],d={...n,path:r};if(n.message!==void 0)return{...n,path:r,message:n.message};let u="";const m=a.filter(f=>!!f).slice().reverse();for(const f of m)u=f(d,{data:e,defaultError:u}).message;return{...n,path:r,message:u}};function g(s,e){const t=hr(),a=mr({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===at?void 0:at].filter(n=>!!n)});s.common.issues.push(a)}class te{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return O;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const r=await n.key,d=await n.value;a.push({key:r,value:d})}return te.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:r,value:d}=n;if(r.status==="aborted"||d.status==="aborted")return O;r.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),r.value!=="__proto__"&&(typeof d.value<"u"||n.alwaysSet)&&(a[r.value]=d.value)}return{status:e.value,value:a}}}const O=Object.freeze({status:"aborted"}),Ee=s=>({status:"dirty",value:s}),re=s=>({status:"valid",value:s}),yt=s=>s.status==="aborted",bt=s=>s.status==="dirty",$e=s=>s.status==="valid",Ue=s=>typeof Promise<"u"&&s instanceof Promise;var b;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e?.message})(b||(b={}));class be{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const kt=(s,e)=>{if($e(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new pe(s.common.issues);return this._error=t,this._error}}};function I(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=s;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(d,u)=>{const{message:m}=s;return d.code==="invalid_enum_value"?{message:m??u.defaultError}:typeof u.data>"u"?{message:m??a??u.defaultError}:d.code!=="invalid_type"?{message:u.defaultError}:{message:m??t??u.defaultError}},description:n}}class R{get description(){return this._def.description}_getType(e){return ve(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ve(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new te,ctx:{common:e.parent.common,data:e.data,parsedType:ve(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Ue(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ve(e)},n=this._parseSync({data:e,path:a.path,parent:a});return kt(a,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ve(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return $e(a)?{value:a.value}:{issues:t.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>$e(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ve(e)},n=this._parse({data:e,path:a.path,parent:a}),r=await(Ue(n)?n:Promise.resolve(n));return kt(a,r)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,r)=>{const d=e(n),u=()=>r.addIssue({code:p.custom,...a(n)});return typeof Promise<"u"&&d instanceof Promise?d.then(m=>m?!0:(u(),!1)):d?!0:(u(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new Ie({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ye.create(this,this._def)}nullable(){return Me.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return le.create(this)}promise(){return qe.create(this,this._def)}or(e){return Ge.create([this,e],this._def)}and(e){return Je.create(this,e,this._def)}transform(e){return new Ie({...I(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new rt({...I(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new Pr({typeName:$.ZodBranded,type:this,...I(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new it({...I(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return dt.create(this,e)}readonly(){return ot.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const gr=/^c[^\s-]{8,}$/i,vr=/^[0-9a-z]+$/,xr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,yr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,br=/^[a-z0-9_-]{21}$/i,kr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_r=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Sr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let et;const Cr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Tr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Or=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,$r=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Nr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ar=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Lt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ir=new RegExp(`^${Lt}$`);function zt(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Mr(s){return new RegExp(`^${zt(s)}$`)}function Rr(s){let e=`${Lt}T${zt(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function jr(s,e){return!!((e==="v4"||!e)&&Cr.test(s)||(e==="v6"||!e)&&Or.test(s))}function Er(s,e){if(!kr.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Dr(s,e){return!!((e==="v4"||!e)&&Tr.test(s)||(e==="v6"||!e)&&$r.test(s))}class xe extends R{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){const r=this._getOrReturnCtx(e);return g(r,{code:p.invalid_type,expected:y.string,received:r.parsedType}),O}const a=new te;let n;for(const r of this._def.checks)if(r.kind==="min")e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),a.dirty());else if(r.kind==="max")e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),a.dirty());else if(r.kind==="length"){const d=e.data.length>r.value,u=e.data.length<r.value;(d||u)&&(n=this._getOrReturnCtx(e,n),d?g(n,{code:p.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):u&&g(n,{code:p.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),a.dirty())}else if(r.kind==="email")wr.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"email",code:p.invalid_string,message:r.message}),a.dirty());else if(r.kind==="emoji")et||(et=new RegExp(Sr,"u")),et.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"emoji",code:p.invalid_string,message:r.message}),a.dirty());else if(r.kind==="uuid")yr.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"uuid",code:p.invalid_string,message:r.message}),a.dirty());else if(r.kind==="nanoid")br.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"nanoid",code:p.invalid_string,message:r.message}),a.dirty());else if(r.kind==="cuid")gr.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cuid",code:p.invalid_string,message:r.message}),a.dirty());else if(r.kind==="cuid2")vr.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cuid2",code:p.invalid_string,message:r.message}),a.dirty());else if(r.kind==="ulid")xr.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"ulid",code:p.invalid_string,message:r.message}),a.dirty());else if(r.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),g(n,{validation:"url",code:p.invalid_string,message:r.message}),a.dirty()}else r.kind==="regex"?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"regex",code:p.invalid_string,message:r.message}),a.dirty())):r.kind==="trim"?e.data=e.data.trim():r.kind==="includes"?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),a.dirty()):r.kind==="toLowerCase"?e.data=e.data.toLowerCase():r.kind==="toUpperCase"?e.data=e.data.toUpperCase():r.kind==="startsWith"?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.invalid_string,validation:{startsWith:r.value},message:r.message}),a.dirty()):r.kind==="endsWith"?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.invalid_string,validation:{endsWith:r.value},message:r.message}),a.dirty()):r.kind==="datetime"?Rr(r).test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.invalid_string,validation:"datetime",message:r.message}),a.dirty()):r.kind==="date"?Ir.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.invalid_string,validation:"date",message:r.message}),a.dirty()):r.kind==="time"?Mr(r).test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.invalid_string,validation:"time",message:r.message}),a.dirty()):r.kind==="duration"?_r.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"duration",code:p.invalid_string,message:r.message}),a.dirty()):r.kind==="ip"?jr(e.data,r.version)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"ip",code:p.invalid_string,message:r.message}),a.dirty()):r.kind==="jwt"?Er(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"jwt",code:p.invalid_string,message:r.message}),a.dirty()):r.kind==="cidr"?Dr(e.data,r.version)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"cidr",code:p.invalid_string,message:r.message}),a.dirty()):r.kind==="base64"?Nr.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"base64",code:p.invalid_string,message:r.message}),a.dirty()):r.kind==="base64url"?Ar.test(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{validation:"base64url",code:p.invalid_string,message:r.message}),a.dirty()):j.assertNever(r);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:p.invalid_string,...b.errToObj(a)})}_addCheck(e){return new xe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...b.errToObj(e)})}url(e){return this._addCheck({kind:"url",...b.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...b.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...b.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...b.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...b.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...b.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...b.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...b.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...b.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...b.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...b.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...b.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...b.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...b.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...b.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...b.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...b.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...b.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...b.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...b.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...b.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...b.errToObj(t)})}nonempty(e){return this.min(1,b.errToObj(e))}trim(){return new xe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new xe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new xe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}xe.create=s=>new xe({checks:[],typeName:$.ZodString,coerce:s?.coerce??!1,...I(s)});function Vr(s,e){const t=(s.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,r=Number.parseInt(s.toFixed(n).replace(".","")),d=Number.parseInt(e.toFixed(n).replace(".",""));return r%d/10**n}class Ne extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){const r=this._getOrReturnCtx(e);return g(r,{code:p.invalid_type,expected:y.number,received:r.parsedType}),O}let a;const n=new te;for(const r of this._def.checks)r.kind==="int"?j.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:p.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):r.kind==="min"?(r.inclusive?e.data<r.value:e.data<=r.value)&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind==="max"?(r.inclusive?e.data>r.value:e.data>=r.value)&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind==="multipleOf"?Vr(e.data,r.value)!==0&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:p.not_finite,message:r.message}),n.dirty()):j.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,a,n){return new Ne({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:b.toString(n)}]})}_addCheck(e){return new Ne({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:b.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:b.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&j.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Ne.create=s=>new Ne({checks:[],typeName:$.ZodNumber,coerce:s?.coerce||!1,...I(s)});class De extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==y.bigint)return this._getInvalidInput(e);let a;const n=new te;for(const r of this._def.checks)r.kind==="min"?(r.inclusive?e.data<r.value:e.data<=r.value)&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind==="max"?(r.inclusive?e.data>r.value:e.data>=r.value)&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind==="multipleOf"?e.data%r.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):j.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:y.bigint,received:t.parsedType}),O}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,a,n){return new De({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:b.toString(n)}]})}_addCheck(e){return new De({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}De.create=s=>new De({checks:[],typeName:$.ZodBigInt,coerce:s?.coerce??!1,...I(s)});class _t extends R{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){const a=this._getOrReturnCtx(e);return g(a,{code:p.invalid_type,expected:y.boolean,received:a.parsedType}),O}return re(e.data)}}_t.create=s=>new _t({typeName:$.ZodBoolean,coerce:s?.coerce||!1,...I(s)});class He extends R{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){const r=this._getOrReturnCtx(e);return g(r,{code:p.invalid_type,expected:y.date,received:r.parsedType}),O}if(Number.isNaN(e.data.getTime())){const r=this._getOrReturnCtx(e);return g(r,{code:p.invalid_date}),O}const a=new te;let n;for(const r of this._def.checks)r.kind==="min"?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),a.dirty()):r.kind==="max"?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),a.dirty()):j.assertNever(r);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new He({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:b.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:b.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}He.create=s=>new He({checks:[],coerce:s?.coerce||!1,typeName:$.ZodDate,...I(s)});class wt extends R{_parse(e){if(this._getType(e)!==y.symbol){const a=this._getOrReturnCtx(e);return g(a,{code:p.invalid_type,expected:y.symbol,received:a.parsedType}),O}return re(e.data)}}wt.create=s=>new wt({typeName:$.ZodSymbol,...I(s)});class St extends R{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return g(a,{code:p.invalid_type,expected:y.undefined,received:a.parsedType}),O}return re(e.data)}}St.create=s=>new St({typeName:$.ZodUndefined,...I(s)});class Ct extends R{_parse(e){if(this._getType(e)!==y.null){const a=this._getOrReturnCtx(e);return g(a,{code:p.invalid_type,expected:y.null,received:a.parsedType}),O}return re(e.data)}}Ct.create=s=>new Ct({typeName:$.ZodNull,...I(s)});class Tt extends R{constructor(){super(...arguments),this._any=!0}_parse(e){return re(e.data)}}Tt.create=s=>new Tt({typeName:$.ZodAny,...I(s)});class Ot extends R{constructor(){super(...arguments),this._unknown=!0}_parse(e){return re(e.data)}}Ot.create=s=>new Ot({typeName:$.ZodUnknown,...I(s)});class ke extends R{_parse(e){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:y.never,received:t.parsedType}),O}}ke.create=s=>new ke({typeName:$.ZodNever,...I(s)});class $t extends R{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return g(a,{code:p.invalid_type,expected:y.void,received:a.parsedType}),O}return re(e.data)}}$t.create=s=>new $t({typeName:$.ZodVoid,...I(s)});class le extends R{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==y.array)return g(t,{code:p.invalid_type,expected:y.array,received:t.parsedType}),O;if(n.exactLength!==null){const d=t.data.length>n.exactLength.value,u=t.data.length<n.exactLength.value;(d||u)&&(g(t,{code:d?p.too_big:p.too_small,minimum:u?n.exactLength.value:void 0,maximum:d?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(g(t,{code:p.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(g(t,{code:p.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((d,u)=>n.type._parseAsync(new be(t,d,t.path,u)))).then(d=>te.mergeArray(a,d));const r=[...t.data].map((d,u)=>n.type._parseSync(new be(t,d,t.path,u)));return te.mergeArray(a,r)}get element(){return this._def.type}min(e,t){return new le({...this._def,minLength:{value:e,message:b.toString(t)}})}max(e,t){return new le({...this._def,maxLength:{value:e,message:b.toString(t)}})}length(e,t){return new le({...this._def,exactLength:{value:e,message:b.toString(t)}})}nonempty(e){return this.min(1,e)}}le.create=(s,e)=>new le({type:s,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...I(e)});function Oe(s){if(s instanceof U){const e={};for(const t in s.shape){const a=s.shape[t];e[t]=ye.create(Oe(a))}return new U({...s._def,shape:()=>e})}else return s instanceof le?new le({...s._def,type:Oe(s.element)}):s instanceof ye?ye.create(Oe(s.unwrap())):s instanceof Me?Me.create(Oe(s.unwrap())):s instanceof Ce?Ce.create(s.items.map(e=>Oe(e))):s}class U extends R{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=j.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==y.object){const f=this._getOrReturnCtx(e);return g(f,{code:p.invalid_type,expected:y.object,received:f.parsedType}),O}const{status:a,ctx:n}=this._processInputParams(e),{shape:r,keys:d}=this._getCached(),u=[];if(!(this._def.catchall instanceof ke&&this._def.unknownKeys==="strip"))for(const f in n.data)d.includes(f)||u.push(f);const m=[];for(const f of d){const _=r[f],P=n.data[f];m.push({key:{status:"valid",value:f},value:_._parse(new be(n,P,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof ke){const f=this._def.unknownKeys;if(f==="passthrough")for(const _ of u)m.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(f==="strict")u.length>0&&(g(n,{code:p.unrecognized_keys,keys:u}),a.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const _ of u){const P=n.data[_];m.push({key:{status:"valid",value:_},value:f._parse(new be(n,P,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const f=[];for(const _ of m){const P=await _.key,D=await _.value;f.push({key:P,value:D,alwaysSet:_.alwaysSet})}return f}).then(f=>te.mergeObjectSync(a,f)):te.mergeObjectSync(a,m)}get shape(){return this._def.shape()}strict(e){return b.errToObj,new U({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{const n=this._def.errorMap?.(t,a).message??a.defaultError;return t.code==="unrecognized_keys"?{message:b.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new U({...this._def,unknownKeys:"strip"})}passthrough(){return new U({...this._def,unknownKeys:"passthrough"})}extend(e){return new U({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new U({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new U({...this._def,catchall:e})}pick(e){const t={};for(const a of j.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new U({...this._def,shape:()=>t})}omit(e){const t={};for(const a of j.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new U({...this._def,shape:()=>t})}deepPartial(){return Oe(this)}partial(e){const t={};for(const a of j.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new U({...this._def,shape:()=>t})}required(e){const t={};for(const a of j.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let r=this.shape[a];for(;r instanceof ye;)r=r._def.innerType;t[a]=r}return new U({...this._def,shape:()=>t})}keyof(){return Bt(j.objectKeys(this.shape))}}U.create=(s,e)=>new U({shape:()=>s,unknownKeys:"strip",catchall:ke.create(),typeName:$.ZodObject,...I(e)});U.strictCreate=(s,e)=>new U({shape:()=>s,unknownKeys:"strict",catchall:ke.create(),typeName:$.ZodObject,...I(e)});U.lazycreate=(s,e)=>new U({shape:s,unknownKeys:"strip",catchall:ke.create(),typeName:$.ZodObject,...I(e)});class Ge extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(r){for(const u of r)if(u.result.status==="valid")return u.result;for(const u of r)if(u.result.status==="dirty")return t.common.issues.push(...u.ctx.common.issues),u.result;const d=r.map(u=>new pe(u.ctx.common.issues));return g(t,{code:p.invalid_union,unionErrors:d}),O}if(t.common.async)return Promise.all(a.map(async r=>{const d={...t,common:{...t.common,issues:[]},parent:null};return{result:await r._parseAsync({data:t.data,path:t.path,parent:d}),ctx:d}})).then(n);{let r;const d=[];for(const m of a){const f={...t,common:{...t.common,issues:[]},parent:null},_=m._parseSync({data:t.data,path:t.path,parent:f});if(_.status==="valid")return _;_.status==="dirty"&&!r&&(r={result:_,ctx:f}),f.common.issues.length&&d.push(f.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;const u=d.map(m=>new pe(m));return g(t,{code:p.invalid_union,unionErrors:u}),O}}get options(){return this._def.options}}Ge.create=(s,e)=>new Ge({options:s,typeName:$.ZodUnion,...I(e)});function nt(s,e){const t=ve(s),a=ve(e);if(s===e)return{valid:!0,data:s};if(t===y.object&&a===y.object){const n=j.objectKeys(e),r=j.objectKeys(s).filter(u=>n.indexOf(u)!==-1),d={...s,...e};for(const u of r){const m=nt(s[u],e[u]);if(!m.valid)return{valid:!1};d[u]=m.data}return{valid:!0,data:d}}else if(t===y.array&&a===y.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let r=0;r<s.length;r++){const d=s[r],u=e[r],m=nt(d,u);if(!m.valid)return{valid:!1};n.push(m.data)}return{valid:!0,data:n}}else return t===y.date&&a===y.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class Je extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(r,d)=>{if(yt(r)||yt(d))return O;const u=nt(r.value,d.value);return u.valid?((bt(r)||bt(d))&&t.dirty(),{status:t.value,value:u.data}):(g(a,{code:p.invalid_intersection_types}),O)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([r,d])=>n(r,d)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Je.create=(s,e,t)=>new Je({left:s,right:e,typeName:$.ZodIntersection,...I(t)});class Ce extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.array)return g(a,{code:p.invalid_type,expected:y.array,received:a.parsedType}),O;if(a.data.length<this._def.items.length)return g(a,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),O;!this._def.rest&&a.data.length>this._def.items.length&&(g(a,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...a.data].map((d,u)=>{const m=this._def.items[u]||this._def.rest;return m?m._parse(new be(a,d,a.path,u)):null}).filter(d=>!!d);return a.common.async?Promise.all(r).then(d=>te.mergeArray(t,d)):te.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Ce({...this._def,rest:e})}}Ce.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ce({items:s,typeName:$.ZodTuple,rest:null,...I(e)})};class Nt extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.map)return g(a,{code:p.invalid_type,expected:y.map,received:a.parsedType}),O;const n=this._def.keyType,r=this._def.valueType,d=[...a.data.entries()].map(([u,m],f)=>({key:n._parse(new be(a,u,a.path,[f,"key"])),value:r._parse(new be(a,m,a.path,[f,"value"]))}));if(a.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const m of d){const f=await m.key,_=await m.value;if(f.status==="aborted"||_.status==="aborted")return O;(f.status==="dirty"||_.status==="dirty")&&t.dirty(),u.set(f.value,_.value)}return{status:t.value,value:u}})}else{const u=new Map;for(const m of d){const f=m.key,_=m.value;if(f.status==="aborted"||_.status==="aborted")return O;(f.status==="dirty"||_.status==="dirty")&&t.dirty(),u.set(f.value,_.value)}return{status:t.value,value:u}}}}Nt.create=(s,e,t)=>new Nt({valueType:e,keyType:s,typeName:$.ZodMap,...I(t)});class Ve extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.set)return g(a,{code:p.invalid_type,expected:y.set,received:a.parsedType}),O;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(g(a,{code:p.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(g(a,{code:p.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const r=this._def.valueType;function d(m){const f=new Set;for(const _ of m){if(_.status==="aborted")return O;_.status==="dirty"&&t.dirty(),f.add(_.value)}return{status:t.value,value:f}}const u=[...a.data.values()].map((m,f)=>r._parse(new be(a,m,a.path,f)));return a.common.async?Promise.all(u).then(m=>d(m)):d(u)}min(e,t){return new Ve({...this._def,minSize:{value:e,message:b.toString(t)}})}max(e,t){return new Ve({...this._def,maxSize:{value:e,message:b.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ve.create=(s,e)=>new Ve({valueType:s,minSize:null,maxSize:null,typeName:$.ZodSet,...I(e)});class At extends R{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}At.create=(s,e)=>new At({getter:s,typeName:$.ZodLazy,...I(e)});class It extends R{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return g(t,{received:t.data,code:p.invalid_literal,expected:this._def.value}),O}return{status:"valid",value:e.data}}get value(){return this._def.value}}It.create=(s,e)=>new It({value:s,typeName:$.ZodLiteral,...I(e)});function Bt(s,e){return new Ae({values:s,typeName:$.ZodEnum,...I(e)})}class Ae extends R{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return g(t,{expected:j.joinValues(a),received:t.parsedType,code:p.invalid_type}),O}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return g(t,{received:t.data,code:p.invalid_enum_value,options:a}),O}return re(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ae.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ae.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}Ae.create=Bt;class Mt extends R{_parse(e){const t=j.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==y.string&&a.parsedType!==y.number){const n=j.objectValues(t);return g(a,{expected:j.joinValues(n),received:a.parsedType,code:p.invalid_type}),O}if(this._cache||(this._cache=new Set(j.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=j.objectValues(t);return g(a,{received:a.data,code:p.invalid_enum_value,options:n}),O}return re(e.data)}get enum(){return this._def.values}}Mt.create=(s,e)=>new Mt({values:s,typeName:$.ZodNativeEnum,...I(e)});class qe extends R{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.promise&&t.common.async===!1)return g(t,{code:p.invalid_type,expected:y.promise,received:t.parsedType}),O;const a=t.parsedType===y.promise?t.data:Promise.resolve(t.data);return re(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}qe.create=(s,e)=>new qe({type:s,typeName:$.ZodPromise,...I(e)});class Ie extends R{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,r={addIssue:d=>{g(a,d),d.fatal?t.abort():t.dirty()},get path(){return a.path}};if(r.addIssue=r.addIssue.bind(r),n.type==="preprocess"){const d=n.transform(a.data,r);if(a.common.async)return Promise.resolve(d).then(async u=>{if(t.value==="aborted")return O;const m=await this._def.schema._parseAsync({data:u,path:a.path,parent:a});return m.status==="aborted"?O:m.status==="dirty"||t.value==="dirty"?Ee(m.value):m});{if(t.value==="aborted")return O;const u=this._def.schema._parseSync({data:d,path:a.path,parent:a});return u.status==="aborted"?O:u.status==="dirty"||t.value==="dirty"?Ee(u.value):u}}if(n.type==="refinement"){const d=u=>{const m=n.refinement(u,r);if(a.common.async)return Promise.resolve(m);if(m instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return u.status==="aborted"?O:(u.status==="dirty"&&t.dirty(),d(u.value),{status:t.value,value:u.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>u.status==="aborted"?O:(u.status==="dirty"&&t.dirty(),d(u.value).then(()=>({status:t.value,value:u.value}))))}if(n.type==="transform")if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!$e(d))return O;const u=n.transform(d.value,r);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:u}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>$e(d)?Promise.resolve(n.transform(d.value,r)).then(u=>({status:t.value,value:u})):O);j.assertNever(n)}}Ie.create=(s,e,t)=>new Ie({schema:s,typeName:$.ZodEffects,effect:e,...I(t)});Ie.createWithPreprocess=(s,e,t)=>new Ie({schema:e,effect:{type:"preprocess",transform:s},typeName:$.ZodEffects,...I(t)});class ye extends R{_parse(e){return this._getType(e)===y.undefined?re(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ye.create=(s,e)=>new ye({innerType:s,typeName:$.ZodOptional,...I(e)});class Me extends R{_parse(e){return this._getType(e)===y.null?re(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Me.create=(s,e)=>new Me({innerType:s,typeName:$.ZodNullable,...I(e)});class rt extends R{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===y.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}rt.create=(s,e)=>new rt({innerType:s,typeName:$.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...I(e)});class it extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Ue(n)?n.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new pe(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new pe(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}it.create=(s,e)=>new it({innerType:s,typeName:$.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...I(e)});class Rt extends R{_parse(e){if(this._getType(e)!==y.nan){const a=this._getOrReturnCtx(e);return g(a,{code:p.invalid_type,expected:y.nan,received:a.parsedType}),O}return{status:"valid",value:e.data}}}Rt.create=s=>new Rt({typeName:$.ZodNaN,...I(s)});class Pr extends R{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class dt extends R{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const r=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return r.status==="aborted"?O:r.status==="dirty"?(t.dirty(),Ee(r.value)):this._def.out._parseAsync({data:r.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?O:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new dt({in:e,out:t,typeName:$.ZodPipeline})}}class ot extends R{_parse(e){const t=this._def.innerType._parse(e),a=n=>($e(n)&&(n.value=Object.freeze(n.value)),n);return Ue(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}ot.create=(s,e)=>new ot({innerType:s,typeName:$.ZodReadonly,...I(e)});var $;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})($||($={}));const h=xe.create,je=Ne.create;ke.create;const q=le.create,Z=U.create;Ge.create;Je.create;Ce.create;const jt=Ae.create;qe.create;ye.create;Me.create;const Zr=Z({label:h().min(1).max(40),left:h().min(1).max(35),right:h().min(1).max(35)}),Lr=Z({id:h().min(1),category:h().optional().default("TECH"),theme:jt(["blue-tech","emerald-finance","slate-education","dark-contrast","crimson-alert","amber-gold","cyber-violet","sunset-orange","nordic-frost","monochrome-luxe"]).default("blue-tech"),layoutType:jt(["table","news","stat","list","quote","versus","receipt","timeline","barchart","leaderboard","editorial","matrix","debate","tierlist"]).default("table"),title:h().min(1).max(120),subtitle:h().min(1).max(250),leftHeader:h().optional().default("USA 🇺🇸"),rightHeader:h().optional().default("UK 🇬🇧"),rows:q(Zr).optional().default([]),bullets:q(Z({highlight:h().optional().default(""),text:h().min(1)})).optional().default([]),bigStat:Z({number:h().default("$165,000"),label:h().default("Average Compensation"),subtext:h().optional().default(""),secondaryNumber:h().optional().default(""),secondaryLabel:h().optional().default("")}).optional(),listItems:q(Z({rank:je(),title:h(),value:h(),tag:h().optional().default("")})).optional().default([]),quoteData:Z({quote:h(),highlight:h().optional().default(""),source:h().default("Industry Insider")}).optional(),versusData:Z({leftEntity:h().optional(),leftStats:q(Z({label:h(),value:h()})).optional(),leftPerk:h().optional(),rightEntity:h().optional(),rightStats:q(Z({label:h(),value:h()})).optional(),rightPerk:h().optional(),verdict:h().optional()}).optional(),receiptData:Z({grossMonthly:h().optional(),items:q(Z({label:h(),amount:h(),note:h().optional()})).optional(),totalDeductions:h().optional(),netRemaining:h().optional()}).optional(),timelineData:Z({pastYear:h().optional().default("2016"),presentYear:h().optional().default("2026"),items:q(Z({label:h(),pastValue:h(),presentValue:h(),changeBadge:h().optional()})).optional(),bottomInsight:h().optional()}).optional(),barchartData:q(Z({label:h(),percentage:je().min(0).max(100),amount:h().optional(),tag:h().optional()})).optional().default([]),leaderboardData:Z({calloutNote:h().optional().default("*Asumsi kurs : Rp15.500/US$"),items:q(Z({rank:je(),name:h(),flag:h().optional().default("🌐"),value:h(),percentage:je().min(0).max(100).optional()})).optional()}).optional(),editorialData:Z({badge:h().optional().default("INVESTIGASI KHUSUS"),highlightPhrase:h().optional(),cards:q(Z({step:h().optional(),title:h(),text:h(),stat:h().optional()})).optional(),keyTakeaway:h().optional()}).optional(),matrixData:Z({headers:q(h()).optional().default(["Indikator","🇮🇩 IDN","🇲🇾 MYS","🇸🇬 SGP"]),rows:q(Z({label:h(),values:q(h())})).optional()}).optional(),debateData:Z({proTitle:h().optional().default("SISI PRO / BENEFIT"),proScore:h().optional().default("65%"),proPoints:q(h()).optional(),conTitle:h().optional().default("SISI KONTRA / RISIKO"),conScore:h().optional().default("35%"),conPoints:q(h()).optional(),callToAction:h().optional().default("Kalian di tim mana? Tulis pendapatmu di bawah! 👇")}).optional(),tierlistData:q(Z({tier:h(),tierColor:h().optional(),items:q(Z({name:h(),badge:h().optional(),desc:h().optional()}))})).optional().default([]),footerNote:h().optional().default("Industry Benchmark 2026"),watermark:h().optional().default("@SocialGen"),bgKeyword:h().optional().default("modern office coding night"),reelsDuration:je().min(5).max(90).default(30),caption:h().optional().default("Bagikan pendapat Anda di kolom komentar! #infografis #edukasi")}),zr={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"},Br={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"},Fr={class:"flex items-center gap-2.5 sm:gap-3"},Ur={class:"text-sm font-extrabold tracking-tight text-white flex items-center gap-1.5 sm:gap-2"},Hr={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"},Gr={class:"flex items-center gap-2 sm:gap-3 text-xs"},Jr={key:0,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]"},qr={key:1,class:"px-2.5 py-0.5 sm:py-1 rounded-full bg-slate-800 text-slate-400 border border-slate-700 font-semibold text-[10px] sm:text-[11px]"},Wr={class:"lg:hidden flex items-center justify-center px-3 py-2 bg-slate-900/90 border-b border-slate-800 flex-shrink-0"},Kr={class:"grid grid-cols-2 w-full max-w-sm bg-slate-950 p-1 rounded-xl border border-slate-800 text-xs font-bold shadow-inner"},Yr={key:0,class:"w-2 h-2 rounded-full bg-emerald-400 animate-ping"},Xr={class:"flex-1 w-full max-w-[1720px] mx-auto p-2 sm:p-4 grid grid-cols-1 lg:grid-cols-12 gap-4 overflow-hidden min-h-0"},ti=lt({__name:"index",setup(s){const e=T({id:"news-us-germany-salary-divide-2026",category:"TECH REPORT",theme:"blue-tech",layoutType:"news",title:"THE $90,000 TRANSATLANTIC TECH DIVIDE",subtitle:"United States 🇺🇸 vs Germany 🇩🇪 (2026 Real Purchasing Power)",leftHeader:"USA 🇺🇸",rightHeader:"Germany 🇩🇪",rows:[{label:"Junior Dev",left:"$88,000/yr",right:"$52,000/yr"},{label:"Mid-Level",left:"$135,000/yr",right:"$75,000/yr"},{label:"Senior Lead",left:"$180,000/yr",right:"$98,000/yr"},{label:"Effective Tax",left:"24%",right:"42%"},{label:"Paid Vacation",left:"15 Days",right:"30 Days"}],bullets:[{highlight:"Gross Salary Lead",text:"American engineers take home up to 84% higher base compensation."},{highlight:"Work-Life Balance",text:"German labor laws guarantee 30 paid days off with zero expectation of after-hours Slack."},{highlight:"Healthcare Drag",text:"US health insurance deductibles and out-of-pocket costs eat up to $14,000/yr per family."}],bigStat:{number:"$180,000",label:"Senior Tech Base in California",secondaryNumber:"$98,000",secondaryLabel:"Munich Hub",subtext:"The gap widens at senior level, but so does cost of childcare and housing inflation."},listItems:[{rank:1,title:"Switzerland 🇨🇭",value:"$145,000/yr",tag:"Top Net Pay"},{rank:2,title:"United States 🇺🇸",value:"$135,000/yr",tag:"Fast Growth"},{rank:3,title:"Australia 🇦🇺",value:"$98,000/yr",tag:"High Super"},{rank:4,title:"Germany 🇩🇪",value:"$84,000/yr",tag:"Pension Safety"},{rank:5,title:"United Kingdom 🇬🇧",value:"$72,000/yr",tag:"Flexible"}],quoteData:{quote:"Chasing the American gross salary without calculating healthcare deductibles and 50-hour workweeks is the most common financial illusion in global tech.",highlight:"most common financial illusion",source:"Principal Tech Recruiter"},footerNote:"Source: Verified Industry Compensation Survey 2026",watermark:"@SocialGen",bgKeyword:"modern office coding night technology",reelsDuration:30,caption:"Higher gross salary in the US or guaranteed 30 days off in Germany? Which lifestyle would you choose? Drop your vote below! 👇 #techcareers #salary #softwareengineer #worklife"}),t=T({theme:"blue-tech",backgroundSource:"pexels",musicFile:"random",videoStartOffset:0,audioStartOffset:0,outputs:{feed:!0,story:!0,reels:!0}}),a=T([]),n=T(-1);function r(){try{localStorage.setItem("sg_drafts",JSON.stringify(a.value))}catch{}$fetch("/api/drafts",{method:"POST",body:{drafts:a.value}}).catch(()=>{})}function d(){a.value.unshift(JSON.parse(JSON.stringify(e.value))),n.value=0,_.value=-1,r(),z("Draft berhasil disimpan!")}function u(w){a.value[w]&&(e.value=JSON.parse(JSON.stringify(a.value[w])),t.value.theme=e.value.theme,n.value=w,_.value=-1,z(`Memuat draft #${w+1}`))}function m(w){a.value.splice(w,1),n.value===w&&(n.value=-1),r(),z("Draft dihapus")}const f=T([]),_=T(-1);function P(){try{localStorage.setItem("sg_gen_history",JSON.stringify(f.value))}catch{}$fetch("/api/generation-history",{method:"POST",body:{history:f.value}}).catch(()=>{})}function D(w){const v=f.value[w];v&&(e.value=JSON.parse(JSON.stringify(v.contentData||v)),v.options&&(t.value={...t.value,...v.options}),_.value=w,n.value=-1,z(`Memuat riwayat: "${v.title.slice(0,24)}..."`))}function M(w){f.value.splice(w,1),_.value===w&&(_.value=-1),P(),z("Item riwayat dihapus")}function Q(){f.value=[],_.value=-1,P(),z("Seluruh riwayat generate berhasil dibersihkan!")}let W=null;function se(){try{localStorage.setItem("sg_active_content",JSON.stringify(e.value)),localStorage.setItem("sg_active_options",JSON.stringify(t.value))}catch{}clearTimeout(W),W=setTimeout(()=>{$fetch("/api/last-session",{method:"POST",body:{content:e.value,options:t.value}}).catch(()=>{})},1e3)}ze(()=>e.value,se,{deep:!0}),ze(()=>t.value,se,{deep:!0});const ie=T(!1),fe=T(!1),ae=T(""),ne=T(null),de=T(""),_e=T("success"),G=T("editor"),he=T(null);Et(async()=>{try{const w=localStorage.getItem("sg_active_content");if(w){const v=JSON.parse(w);v&&v.title&&(e.value=v)}else{const v=await $fetch("/api/last-session");v?.session?.content&&(e.value=v.session.content,v.session.options&&(t.value={...t.value,...v.session.options}))}}catch{}try{const w=localStorage.getItem("sg_active_options");if(w){const v=JSON.parse(w);v&&(t.value={...t.value,...v})}}catch{}try{const w=await $fetch("/api/drafts");if(w?.drafts&&Array.isArray(w.drafts)&&w.drafts.length>0)a.value=w.drafts;else{const v=localStorage.getItem("sg_drafts");if(v){const ee=JSON.parse(v);Array.isArray(ee)&&ee.length>0&&(a.value=ee,$fetch("/api/drafts",{method:"POST",body:{drafts:ee}}).catch(()=>{}))}}}catch{const w=localStorage.getItem("sg_drafts");if(w)try{a.value=JSON.parse(w)}catch{}}try{const w=await $fetch("/api/generation-history");if(w?.history&&Array.isArray(w.history)&&w.history.length>0)f.value=w.history;else{const v=localStorage.getItem("sg_gen_history");v&&(f.value=JSON.parse(v))}}catch{}try{const w=await $fetch("/api/status");he.value=w}catch{}});const ue=Le(()=>{const w=Lr.safeParse(e.value);if(w.success)return{isValid:!0,error:""};{const v=w.error.errors[0];return{isValid:!1,error:`${v.path.join(".")}: ${v.message}`}}});function z(w,v="success"){de.value=w,_e.value=v,setTimeout(()=>{de.value=""},4e3)}async function me(w,v,ee){fe.value=!0,ae.value=`AI Research (${ee||"Gemini"})...`;try{const H=await $fetch("/api/auto-topic",{method:"POST",body:{niche:w,layoutType:v,model:ee}});H?.dataset&&(e.value=H.dataset,t.value.theme=H.dataset.theme,a.value.unshift(H.dataset),n.value=0,r(),H.source==="gemini"?z(`✨ [${H.modelUsed||"Gemini"}] Berhasil meriset: "${H.dataset.title.slice(0,32)}..."`,"success"):z(`ℹ️ [Curated Data] Topik siap: "${H.dataset.title.slice(0,32)}..."`,"success"))}catch(H){z("Gagal auto-topic: "+(H.data?.statusMessage||H.message),"error")}finally{fe.value=!1,ae.value=""}}async function Te(){if(!ue.value.isValid){z("Data tidak valid: "+ue.value.error,"error");return}ie.value=!0,ae.value="Rendering Images & Reels...",ne.value=null;const w={id:e.value.id||String(Date.now()),title:e.value.title||"Untitled Creation",layoutType:e.value.layoutType||"table",category:e.value.category||"GENERAL",theme:e.value.theme||"blue-tech",generatedAt:new Date().toISOString(),contentData:JSON.parse(JSON.stringify(e.value)),options:JSON.parse(JSON.stringify(t.value))};f.value.unshift(w),_.value=0,P(),G.value="preview";try{const v=await $fetch("/api/generate",{method:"POST",body:{data:e.value,options:t.value}});v?.success&&(ne.value=v,z(`Sukses dirender dalam ${(v.durationMs/1e3).toFixed(1)} detik!`))}catch(v){z("Gagal render: "+(v.data?.statusMessage||v.message),"error")}finally{ie.value=!1,ae.value=""}}return(w,v)=>{const ee=_n,H=pr;return k(),C("div",zr,[i("header",Br,[i("div",Fr,[v[8]||(v[8]=i("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 ",-1)),i("div",null,[i("h1",Ur,[v[7]||(v[7]=F(" SocialGen ",-1)),i("span",Hr," v"+N(l(he)?.version||"2.1.1"),1)])])]),i("div",Gr,[l(he)?.geminiActive?(k(),C("span",Jr," ● AI Connected ")):(k(),C("span",qr," ● Local Engine "))])]),i("div",Wr,[i("div",Kr,[i("button",{onClick:v[0]||(v[0]=X=>G.value="editor"),class:L(["py-1.5 px-3 rounded-lg transition flex items-center justify-center gap-1.5",l(G)==="editor"?"bg-sky-500 text-white shadow-md font-black":"text-slate-400 hover:text-slate-200"])},[...v[9]||(v[9]=[i("span",null,"⚙️ Studio & Editor",-1)])],2),i("button",{onClick:v[1]||(v[1]=X=>G.value="preview"),class:L(["py-1.5 px-3 rounded-lg transition flex items-center justify-center gap-1.5",l(G)==="preview"?"bg-indigo-600 text-white shadow-md font-black":"text-slate-400 hover:text-slate-200"])},[v[10]||(v[10]=i("span",null,"👁️ Live Preview",-1)),l(ne)?(k(),C("span",Yr)):B("",!0)],2)])]),l(de)?(k(),C("div",{key:0,class:L(["fixed bottom-6 right-6 z-50 flex items-center gap-2 px-4 py-3 rounded-2xl shadow-2xl text-xs font-bold border transition-all animate-bounce",l(_e)==="success"?"bg-emerald-950 text-emerald-200 border-emerald-500/50":"bg-rose-950 text-rose-200 border-rose-500/50"])},[i("span",null,N(l(de)),1)],2)):B("",!0),i("main",Xr,[i("section",{class:L(["lg:col-span-5 h-full overflow-y-auto pr-1 flex-col gap-3 custom-scrollbar",l(G)==="editor"?"flex":"hidden lg:flex"])},[A(ee,{modelValue:l(e),"onUpdate:modelValue":v[2]||(v[2]=X=>Be(e)?e.value=X:null),options:l(t),"onUpdate:options":v[3]||(v[3]=X=>Be(t)?t.value=X:null),"is-valid":l(ue).isValid,"validation-error":l(ue).error,"is-generating":l(ie),"generate-stage":l(ae),"is-auto-topic-loading":l(fe),drafts:l(a),"active-draft-index":l(n),history:l(f),"active-history-index":l(_),onGenerate:Te,onAutoTopic:me,onSelectDraft:u,onDeleteDraft:m,onSaveDraft:d,onSelectHistory:D,onDeleteHistory:M,onClearAllHistory:Q},null,8,["modelValue","options","is-valid","validation-error","is-generating","generate-stage","is-auto-topic-loading","drafts","active-draft-index","history","active-history-index"])],2),i("section",{class:L(["lg:col-span-7 h-full flex-col gap-3 overflow-hidden justify-between min-h-0",l(G)==="preview"?"flex":"hidden lg:flex"])},[A(H,{data:l(e),"selected-video":l(t).backgroundSource,"selected-music":l(t).musicFile,"video-start-offset":l(t).videoStartOffset,"onUpdate:videoStartOffset":v[4]||(v[4]=X=>l(t).videoStartOffset=X),"audio-start-offset":l(t).audioStartOffset,"onUpdate:audioStartOffset":v[5]||(v[5]=X=>l(t).audioStartOffset=X),"generated-result":l(ne)},null,8,["data","selected-video","selected-music","video-start-offset","audio-start-offset","generated-result"])],2)]),l(G)==="editor"?(k(),C("button",{key:1,onClick:v[6]||(v[6]=X=>G.value="preview"),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"},[...v[11]||(v[11]=[i("span",null,"👁️ Lihat Preview Canvas",-1)])])):B("",!0)])}}});export{ti as default};
@@ -1 +1 @@
1
- import{_ as m}from"./BDNIAT8Y.js";import{d as u,$ as y,o as f,B as s,l as o,D as p,E as b,N as g,W as v,A as n,m as _,i}from"./tf8XWazX.js";const h={key:0,class:"p-8 text-red-400 font-bold text-center"},S={key:1,id:"render-target",class:"inline-block"},C=u({__name:"[mode]",setup($){const l=y(),d=_(()=>{const e=l.params.mode;return e==="feed"||e==="story"||e==="overlay"?e:"feed"}),r=i(null),a=i("");return f(async()=>{const e=l.query;if(e.payload)try{const t=decodeURIComponent(atob(e.payload));r.value=JSON.parse(t);return}catch(t){console.error("Failed to parse query payload:",t)}if(e.jobId)try{const t=await $fetch(`/api/render-data?jobId=${e.jobId}`);r.value=t;return}catch(t){a.value="Failed to load render job data",console.error(t)}r.value={id:"demo-render",category:"TECH",theme:"blue-tech",title:"SOFTWARE SALARY 2026",subtitle:"USA vs UK (Annual Gross)",leftHeader:"USA 🇺🇸",rightHeader:"UK 🇬🇧",rows:[{label:"Junior Dev",left:"$85,000/yr",right:"$45,000/yr"},{label:"Mid-Level",left:"$125,000/yr",right:"$68,000/yr"},{label:"Senior Dev",left:"$165,000/yr",right:"$90,000/yr"},{label:"Avg Tax",left:"24%",right:"40%"},{label:"Paid Leave",left:"15 Days",right:"28 Days"}],footerNote:"Source: Industry Salary Survey 2026",watermark:"@FBProCreator",bgKeyword:"modern office coding night",reelsDuration:10,caption:"Demo caption"}}),(e,t)=>{const c=m;return n(),s("div",{class:v(["m-0 p-0 overflow-hidden",o(d)==="overlay"?"bg-transparent":"bg-slate-950"]),style:{"font-family":"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Color Emoji', sans-serif"}},[o(a)?(n(),s("div",h,p(o(a)),1)):o(r)?(n(),s("div",S,[b(c,{data:o(r),mode:o(d),"is-render":!0},null,8,["data","mode"])])):g("",!0)],2)}}});export{C as default};
1
+ import{_ as m}from"./fBE6Av56.js";import{d as u,$ as y,o as f,B as s,l as o,D as p,E as b,N as g,W as v,A as n,m as _,i}from"./DllK7aKd.js";const h={key:0,class:"p-8 text-red-400 font-bold text-center"},S={key:1,id:"render-target",class:"inline-block"},C=u({__name:"[mode]",setup($){const l=y(),d=_(()=>{const e=l.params.mode;return e==="feed"||e==="story"||e==="overlay"?e:"feed"}),r=i(null),a=i("");return f(async()=>{const e=l.query;if(e.payload)try{const t=decodeURIComponent(atob(e.payload));r.value=JSON.parse(t);return}catch(t){console.error("Failed to parse query payload:",t)}if(e.jobId)try{const t=await $fetch(`/api/render-data?jobId=${e.jobId}`);r.value=t;return}catch(t){a.value="Failed to load render job data",console.error(t)}r.value={id:"demo-render",category:"TECH",theme:"blue-tech",title:"SOFTWARE SALARY 2026",subtitle:"USA vs UK (Annual Gross)",leftHeader:"USA 🇺🇸",rightHeader:"UK 🇬🇧",rows:[{label:"Junior Dev",left:"$85,000/yr",right:"$45,000/yr"},{label:"Mid-Level",left:"$125,000/yr",right:"$68,000/yr"},{label:"Senior Dev",left:"$165,000/yr",right:"$90,000/yr"},{label:"Avg Tax",left:"24%",right:"40%"},{label:"Paid Leave",left:"15 Days",right:"28 Days"}],footerNote:"Source: Industry Salary Survey 2026",watermark:"@FBProCreator",bgKeyword:"modern office coding night",reelsDuration:10,caption:"Demo caption"}}),(e,t)=>{const c=m;return n(),s("div",{class:v(["m-0 p-0 overflow-hidden",o(d)==="overlay"?"bg-transparent":"bg-slate-950"]),style:{"font-family":"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Color Emoji', sans-serif"}},[o(a)?(n(),s("div",h,p(o(a)),1)):o(r)?(n(),s("div",S,[b(c,{data:o(r),mode:o(d),"is-render":!0},null,8,["data","mode"])])):g("",!0)],2)}}});export{C as default};
@@ -1 +1 @@
1
- import{H as a,I as s,J as r,K as u,L as o}from"./tf8XWazX.js";function i(e){const t=e||s();return t?.ssrContext?.head||t?.runWithContext(()=>{if(r())return u(o)})}function x(e,t={}){const n=i(t.nuxt);if(n)return a(e,{head:n,...t})}export{x as u};
1
+ import{H as a,I as s,J as r,K as u,L as o}from"./DllK7aKd.js";function i(e){const t=e||s();return t?.ssrContext?.head||t?.runWithContext(()=>{if(r())return u(o)})}function x(e,t={}){const n=i(t.nuxt);if(n)return a(e,{head:n,...t})}export{x as u};