PageSourceSearch

https://pvppcoe-va-official.vercel.app/assets/Hero-BCqhPndV.js

js pvppcoe-va-official.vercel.app collected 2026-10-03 07:33:35 UTC 7,719 bytes, 1 lines download raw bytes

1import{ag as p,ah as g,ai as _,aw as E,av as $,ax as T,aj as z,j as t,r as m,b as N,ay as S}from"./index-CZ63uMbh.js";import{B as O}from"./button-DV0NliWQ.js";import{E as B}from"./external-link-DCna_xF2.js";const F="/assets/herocampus1--ojwzFHN.webp";_({image_url:z().url("Must be a valid image URL"),order_index:T().default(0),is_active:$().default(!0),text_content:E().optional()});const J=p({method:"GET"}).handler(g("50cd448500804040f0aa5fdfc9075b27ed678129b444eda8420b042529419adc")),q=p({method:"POST"}).handler(g("a78127df1d6b240894941be4157232c5901f2756c12fa76d7af0ff347e1c97a9")),L=p({method:"POST"}).handler(g("2f3b5c8ecb0ee935007be133983bed27f48af168a4ff001e8992c2dabe02fade")),D=p({method:"POST"}).handler(g("351e6bed067c9b206944de3030c231b75e19cf4888fec017c24b3f72414d3b25")),R=p({method:"POST"}).handler(g("63a4325fb8ccb2e29133c5bb348095cdfa006013c29170f0cbd8c63ab9da39f7"));function M({bulletins:i}){return!i||i.length===0?null:t.jsx("div",{className:"absolute bottom-0 left-0 right-0 z-30 bg-primary/95 text-white backdrop-blur-md border-t border-white/10 flex items-center h-12 overflow-hidden shadow-xl",children:t.jsx("div",{className:"flex-1 overflow-hidden relative h-full flex items-center",children:t.jsx("div",{className:"flex whitespace-nowrap animate-marquee-left hover:[animation-play-state:paused]",children:[...i,...i,...i].map((n,s)=>t.jsxs("div",{className:"flex items-center mx-8",children:[t.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-accent/80 mr-4 shrink-0"}),t.jsx("span",{className:"text-sm md:text-base font-medium mr-4",children:n.text}),n.link&&t.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",children:t.jsxs(O,{variant:"secondary",size:"sm",className:"h-7 px-4 rounded-full text-xs font-bold bg-white hover:bg-gray-100 text-primary border-0 transition-colors shadow-sm",children:[n.link_text||"Register Now"," ",t.jsx(B,{className:"ml-1.5 h-3.5 w-3.5"})]})})]},s))})})})}const Z=[F,"https://images.unsplash.com/photo-1541339907198-e08756dedf3f?q=80&w=1920&auto=format&fit=crop","https://images.unsplash.com/photo-1523050854058-8df90110c9f1?q=80&w=1920&auto=format&fit=crop","https://images.unsplash.com/photo-1562774053-701939374585?q=80&w=1920&auto=format&fit=crop"];function k(i){if(!i)return{isVideo:!1,src:""};let n=/\.(mp4|webm|mov|mkv|ogg)($|\?)/i.test(i),s=i;if(s.includes("/storage/v1/")){const c=s.split("/storage/v1/");c.length>1&&(s=`https://vppcoe-edge-api.shreealasande.workers.dev//storage/v1/${c[1]}`)}if(i.includes("drive.google.com")){n=!0;const c=i.match(/\/file\/d\/([a-zA-Z0-9_-]+)/)||i.match(/id=([a-zA-Z0-9_-]+)/);c&&c[1]&&(s=`https://drive.google.com/uc?export=download&confirm=t&id=${c[1]}`)}return!n&&s.includes("res.cloudinary.com")&&!s.includes("f_auto")&&(s=s.replace("/upload/","/upload/f_auto,q_auto/")),!n&&s.includes("images.unsplash.com")&&(s=`${s}&fm=webp&q=auto`),{isVideo:n,src:s}}function H({src:i,isActive:n,isOnlySlide:s,onEnded:c,className:y,style:l}){const u=m.useRef(null);return m.useEffect(()=>{const a=u.current;a&&(n?(a.currentTime=0,a.play().catch(e=>console.log("Autoplay blocked:",e))):a.pause())},[n]),t.jsx("video",{ref:u,src:i,className:y,style:l,muted:!0,loop:s,playsInline:!0,onEnded:c,onError:c})}function P({data:i}){const[n,s]=m.useState(0),{data:c=[]}=N({queryKey:["heroSlides"],queryFn:async()=>{try{const a="https://vppcoe-edge-api.shreealasande.workers.dev/",e="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZlbGZ3b3dzZWNtc2V2cW5oam1vIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODE0MjM3MjcsImV4cCI6MjA5Njk5OTcyN30.LSNJQ7tpt138dfyQl51mIL3HROlBooy0nBizsfGfYkk",o=await fetch(`${a}/rest/v1/hero_slides?select=*&order=order_index.asc`,{headers:{apikey:e,Authorization:`Bearer ${e}`}});if(!o.ok)throw new Error("Edge fetch failed");return await o.json()}catch(a){return console.error("Hero edge cache fetch failed, fallback to serverFn",a),J()}}}),{data:y}=N({queryKey:["heroBulletins"],queryFn:async()=>{try{const a="https://vppcoe-edge-api.shreealasande.workers.dev/",e="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZlbGZ3b3dzZWNtc2V2cW5oam1vIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODE0MjM3MjcsImV4cCI6MjA5Njk5OTcyN30.LSNJQ7tpt138dfyQl51mIL3HROlBooy0nBizsfGfYkk",o=await fetch(`${a}/rest/v1/site_settings?key=eq.hero_bulletins&select=value`,{headers:{apikey:e,Authorization:`Bearer ${e}`}});if(!o.ok)throw new Error("Edge fetch failed");const r=await o.json();return r&&r.length>0?r[0].value:S()}
1catch(a){return console.error("Bulletins edge cache fetch failed, fallback to serverFn",a),S()}}}),l=m.useMemo(()=>c.length>0?c:Z.map(a=>({image_url:a,text_content:{}})),[c]),u=m.useCallback(()=>{l.length>1&&s(a=>(a+1)%l.length)},[l.length]);return m.useEffect(()=>{if(l.length<=1)return;const e=l[n]?.image_url;if(!e)return;const{isVideo:o}=k(e);if(o)return;const r=setTimeout(u,5e3);return()=>clearTimeout(r)},[n,l.length,l]),t.jsx("div",{className:"px-2 md:px-4 lg:px-6 pt-[7.5rem] md:pt-[8.5rem]",children:t.jsxs("section",{className:"relative isolate min-h-[calc(100svh-2rem)] overflow-hidden rounded-[1.5rem] md:rounded-[2.5rem] bg-primary text-white shadow-2xl",children:[t.jsxs("div",{className:"absolute inset-0 bg-primary",children:[l.map((a,e)=>{const{isVideo:o,src:r}=k(a.image_url),d=e===n,h=`absolute inset-0 h-full w-full object-cover transition-opacity duration-1000 ease-in-out ${d?"opacity-100":"opacity-0"}`,f={transform:d?"scale(1.05)":"scale(1)",transition:"opacity 1.5s ease-in-out, transform 10s ease-out"},x={transform:"translateZ(0)",transition:"opacity 1.5s ease-in-out"};return o?t.jsx(H,{src:r,isActive:d,isOnlySlide:l.length<=1,onEnded:u,className:h,style:x},`${r}-${e}`):t.jsx("img",{src:r,alt:`Campus slide ${e+1}`,className:h,decoding:"async",style:f,fetchPriority:e===0?"high":"auto",loading:e===0?"eager":"lazy"},`${r}-${e}`)}),t.jsx("div",{className:"absolute inset-0 bg-primary/30 backdrop-brightness-[0.8]"})]}),l.map((a,e)=>{const o=e===n,r=a.text_content||{},d=r.eyebrow??(e===0?"VPPCOE-VA Institute":""),h=r.title_start??(e===0?"Where Engineering Meets ":""),f=r.title_highlight??(e===0?"Imagination.":""),x=r.title_end??"",v=r.description??(e===0?"A premier institution dedicated to rigorous academics, creative innovation, and building the leaders of tomorrow.":""),j=r.button_text??(e===0?"Explore Programs":""),w=r.button_link??(e===0?"#departments":""),b=d||h||f||x||v,I=j&&w;return!b&&!I?null:t.jsxs("div",{className:`absolute inset-0 z-10 container-academic flex flex-col items-center text-center pb-20 pt-32 transition-opacity duration-1000 ease-in-out pointer-events-none ${o?"opacity-100":"opacity-0"} ${b?"justify-center":"justify-end pb-28"}`,children:[b?t.jsxs(t.Fragment,{children:[d&&t.jsx("p",{className:`eyebrow !text-accent ${o?"animate-fade-up":""}`,children:d}),t.jsxs("h1",{className:`mt-6 max-w-4xl font-display text-5xl font-semibold leading-tight text-balance sm:text-6xl lg:text-7xl ${o?"animate-fade-up delay-1":""}`,children:[h," ",f&&t.jsx("span",{className:"text-accent italic font-medium",children:f})," ",x]}),v&&t.jsx("p",{className:`mt-8 max-w-2xl text-lg leading-relaxed text-white/90 font-light ${o?"animate-fade-up delay-2":""}`,children:v})]}):null,I?t.jsx("div",{className:`mt-10 flex justify-center ${o?b?"animate-fade-up delay-3":"animate-fade-up":""}`,children:t.jsxs("a",{href:w,className:`inline-flex items-center gap-3 rounded-full bg-accent px-8 py-4 text-sm font-semibold text-accent-foreground transition-all hover:-translate-y-1 hover:shadow-elegant ${o?"pointer-events-auto":"pointer-events-none"}`,children:[j," ",t.jsx("span",{"aria-hidden":!0,children:"→"})]})}):null]},`text-${e}`)}),t.jsx(M,{bulletins:y?.bulletins})]})})}export{P as H,R as a,q as c,D as d,J as g,L as u};

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.