1import{e as O,r,c as y,f as W,p as G,i as P,b as s,h as i,a as l,k as c,x as Y,t as p,n,q as R,v as J,F as M,l as j,A as K,E as Q,H as X,s as Z,o as a}from"./vendor-D3ahWMFY.js";import{u as ee,B as te,L as se,V as U,a as oe}from"./index-YqUjisW-.js";import{M as ae}from"./MainLayout-IssbuzrT.js";import{_ as le}from"./ComingSoonModal.vue_vue_type_script_setup_true_lang-My10zcuT.js";import{h as q,i as C,b as re,_ as ne,s as ie}from"./comingSoon-DX-PB9RS.js";import{r as z}from"./PlayIcon-Cb-jby56.js";import"./ClockIcon-CGuWz3d7.js";const ue={class:"min-h-screen bg-softGray dark:bg-gray-900"},de={class:"max-w-7xl mx-auto px-4 py-3"},ce={key:0,class:"mb-8"},pe={class:"w-full h-full bg-gradient-to-r from-black/85 via-black/70 to-transparent flex items-end"},fe={class:"p-6 md:p-8 max-w-xl"},ge={class:"text-2xl md:text-3xl font-bold mb-2"},ve={key:0,class:"text-sm md:text-base text-gray-200 line-clamp-3"},me=["onClick"],he={class:"mb-6"},ye={class:"relative max-w-md"},be={key:1,class:"flex items-center justify-center py-12"},xe={key:2},ke={class:"flex items-center justify-between mb-4"},we={class:"text-xs text-gray-500 dark:text-gray-400"},_e={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 gap-4"},Re=["onClick"],Ce={class:"relative aspect-[2/3] bg-gray-200 dark:bg-gray-700 overflow-hidden"},Se=["src","alt"],Be={key:1,class:"absolute inset-0 bg-gradient-to-br from-purple-600/80 to-[#026B63]/60 flex items-center justify-center"},Ne={key:2,class:"absolute top-2 left-2 z-10 rounded-full bg-[#026B63] px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-white"},$e=["onClick"],Ae={class:"flex w-12 h-12 items-center justify-center rounded-full bg-black/55 text-white transition-colors group-hover:bg-[#026B63]"},Ee={class:"absolute top-2 right-2 rounded-full bg-black/55 px-2 py-0.5 text-[10px] font-semibold text-white"},Le={class:"absolute bottom-2 left-2 right-2"},Te={class:"text-white font-semibold text-sm line-clamp-2"},Ve={key:3,class:"flex flex-col items-center justify-center py-12 text-center"},Oe=O({__name:"NircReelsView",setup(Ie){const F=ee(),D=Z(),b=r(null),f=r([]),v=r(!1),m=r(""),x=r(!1),S=r(null),k=r(0),w=r(!1),B=r(""),N=r("");function $(){return F.isAuthenticated?!0:(b.value&&(b.value.showSignInModal=!0),!1)}function A(e){if(!$())return;const t=ie(e);t&&(B.value=t,N.value=(e==null?void 0:e.title)||"Reel",w.value=!0)}const g=y(()=>f.value.slice(0,5)),u=y(()=>g.value[k.value]||g.value[0]||null),E=y(()=>_(u.value)||""),h=y(()=>{if(!m.value.trim())return f.value;const e=m.value.toLowerCase();return f.value.filter(t=>(t.title||"").toLowerCase().includes(e)||(t.description||"").toLowerCase().includes(e))});function _(e){const t=(e==null?void 0:e.banner_img_url)||(e==null?void 0:e.icon_img_url)||(e==null?void 0:e.profile_photo)||(e==null?void 0:e.cover_photo)||(e==null?void 0:e.image_url);if(!(!t||typeof t!="string"))return t.split(",")[0].trim()}function L(e){return Array.isArray(e==null?void 0:e.episodes)?e.episodes.length:0}function T(e){if(!e||!$())return;if(C(e)){S.value=e,x.value=!0;return}const t=e.unique_code||e.slug||e.id;t&&D.push(`/nircreels/${t}`)}async function H(){v.value=!0;try{const e=await oe.getTvShows({isReelStory:!0});e.success&&(f.value=Array.isArray(e.payload)?e.payload:[])}catch(e){console.error("Error loading nircreels:",e)}finally{v.value=!1}}return W(H),(e,t)=>(a(),G(ae,{"show-category-tabs":!1,"show-floating-actions":!1,ref_key:"layoutRef",ref:b},{default:P(()=>{var V,I;return[s("div",ue,[s("div",de,[t[13]||(t[13]=s("div",{class:"mb-4"},[s("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white mb-2"},"NircReels"),s("p",{class:"text-gray-600 dark:text-gray-400"},"Short-form drama, one episode at a time")],-1)),g.value.length>0?(a(),l("section",ce,[s("div",{class:"relative rounded-2xl overflow-hidden bg-black text-white shadow-lg cursor-pointer",onClick:t[2]||(t[2]=o=>T(u.value))},[s("div",{class:"h-56 md:h-72 bg-cover bg-center",style:Y({backgroundImage:E.value?`url(${E.value})`:"linear-gradient(135deg, #7B1FA2 0%, #026B63 100%)"})},[s("div",pe,[s("div",fe,[t[8]||(t[8]=s("p",{class:"text-[11px] uppercase tracking-wide text-gray-300 mb-1"},"NircReels",-1)),s("h2",ge,p(((V=u.value)==null?void 0:V.title)||"Reel"),1),(I=u.value)!=null&&I.description?(a(),l("p",ve,p(u.value.description),1)):c("",!0),n(q)(u.value)?(a(),l("button",{key:1,type:"button",class:"mt-4 inline-flex items-center gap-2 rounded-full bg-white px-5 py-2.5 text-sm font-bold text-gray-900 transition-colors hover:bg-gray-200",onClick:t[0]||(t[0]=R(o=>A(u.value),["stop"]))},[i(n(z),{class:"w-4 h-4"}
1),t[7]||(t[7]=J(" Watch trailer ",-1))])):c("",!0)])])],4),g.value.length>1?(a(),l("div",{key:0,class:"absolute bottom-4 right-4 flex gap-2",onClick:t[1]||(t[1]=R(()=>{},["stop"]))},[(a(!0),l(M,null,j(g.value,(o,d)=>(a(),l("button",{key:d,type:"button",class:K(["w-2.5 h-2.5 rounded-full border border-white/70",d===k.value?"bg-white":"bg-white/20"]),onClick:Me=>k.value=d},null,10,me))),128))])):c("",!0)])])):c("",!0),s("div",he,[s("div",ye,[Q(s("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>m.value=o),type:"text",placeholder:"Search nircreels...",class:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#026B63] focus:border-transparent"},null,512),[[X,m.value]]),i(n(te),{class:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"})])]),v.value&&f.value.length===0?(a(),l("div",be,[i(se,{width:80,height:80,"container-class":"mx-auto"})])):h.value.length>0?(a(),l("section",xe,[s("div",ke,[t[9]||(t[9]=s("h2",{class:"text-lg font-semibold text-gray-900 dark:text-white"},"All Reels",-1)),s("span",we,p(h.value.length)+" reel"+p(h.value.length===1?"":"s"),1)]),s("div",_e,[(a(!0),l(M,null,j(h.value,o=>(a(),l("article",{key:o.id||o.unique_code,class:"group rounded-2xl overflow-hidden bg-white dark:bg-gray-800 shadow-md hover:shadow-lg transition-shadow cursor-pointer flex flex-col",onClick:d=>T(o)},[s("div",Ce,[_(o)?(a(),l("img",{key:0,src:_(o),alt:o.title||"Reel",class:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",onError:t[4]||(t[4]=d=>d.target.style.display="none")},null,40,Se)):(a(),l("div",Be,[i(n(U),{class:"w-12 h-12 text-white/70"})])),n(C)(o)?(a(),l("span",Ne," Coming soon ")):c("",!0),t[10]||(t[10]=s("div",{class:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/10 to-transparent"},null,-1)),n(C)(o)&&n(q)(o)?(a(),l("button",{key:3,type:"button","aria-label":"Watch trailer",class:"absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2",onClick:R(d=>A(o),["stop"])},[s("span",Ae,[i(n(z),{class:"w-6 h-6"})])],8,$e)):c("",!0),s("span",Ee,p(L(o))+" ep"+p(L(o)===1?"":"s"),1),s("div",Le,[s("h3",Te,p(o.title||"Reel"),1)])])],8,Re))),128))])])):v.value?c("",!0):(a(),l("div",Ve,[i(n(U),{class:"w-16 h-16 text-gray-400 mb-4"}),t[11]||(t[11]=s("h3",{class:"text-xl font-semibold text-gray-900 dark:text-white mb-2"},"No NircReels yet",-1)),t[12]||(t[12]=s("p",{class:"text-gray-600 dark:text-gray-400"},"Check back later for short-form drama",-1))]))]),i(le,{open:x.value,"onUpdate:open":t[5]||(t[5]=o=>x.value=o),record:S.value,"content-type":n(re)},null,8,["open","record","content-type"]),i(ne,{open:w.value,"onUpdate:open":t[6]||(t[6]=o=>w.value=o),src:B.value,title:N.value},null,8,["open","src","title"])])]}),_:1},512))}});export{Oe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.