PageSourceSearch

https://www.rainfrog.ai/_next/static/chunks/7916.ffdb673df1e3e084.js

js rainfrog.ai collected 2026-10-05 12:27:50 UTC 11,518 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7916],{1885:(e,t,n)=>{n.d(t,{$:()=>a,r:()=>r});let r="emptyShowcasePreview";function a(e){return!!e&&"object"==typeof e&&!0===e[r]}},7916:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var r=n(1166),a=n(6702),s=n(3842),i=n(690);let l={"Fashion Shooting":"/presets/fashion-shooting.mp4","Product Still Life":"/presets/product-still-life.mp4","UGC Content":"/presets/ugc-content.mp4"};var o=n(1885),c=n(1515);function d(e){return{...e,[o.r]:!0}}function u(e){return Array.isArray(e)?e.map(e=>({id:e.id,type:e.type,x:e.x,y:e.y,data:function(e,t){let n=c.PH[e]?.initialData;switch(e){case"product":case"model":return d({selectedImageIndex:0});case"text":return d({text:""});case"image":case"style":case"environment":return d({});case"generator":return d({generatedImages:[],currentIndex:0,aspectRatio:"string"==typeof t.aspectRatio?t.aspectRatio:"1:1",resolution:"string"==typeof t.resolution?t.resolution:"1K",preset:"string"==typeof t.preset?t.preset:"generic",mode:"normal"===t.mode?"normal":"pro",_isGenerating:!1});case"cameraAngle":return d({angleX:0,angleY:0,focalLength:50,distance:1});case"fullBody":return d({viewImages:{front:[],side:[],back:[]},viewIndices:{front:0,side:0,back:0},selectedView:"front"});case"outfitSheet":return d({generatedImages:[],currentIndex:0});case"imageEdit":return d({generatedImages:[],currentIndex:0,editPrompt:"",aspectRatio:"1:1",resolution:"1K",mode:"pro",_isGenerating:!1});case"behindTheScenes":return d({generatedImages:[],currentIndex:0,aspectRatio:"1:1",resolution:"1024"});case"postProduction":default:return d(n?{...n}:{});case"videoGenerator":return d({generatedVideos:[],currentIndex:0,promptText:"",negativePrompt:"",duration:"5",generateAudio:!0});case"proVideoGenerator":return d({generatedVideos:[],currentIndex:0,promptText:"",duration:5,generateAudio:!0,multiShot:!1,shots:[]});case"note":return d({text:"",width:"number"==typeof t.width?t.width:300,height:"number"==typeof t.height?t.height:200})}}(e.type,e.data??{}),...void 0!==e.selected?{selected:e.selected}:{}})):[]}var m=n(3829);function x({src:e,reduceMotion:t}){let n=(0,a.useRef)(null);return((0,a.useEffect)(()=>{let r=n.current;r&&!t&&e&&(r.currentTime=0,r.play().catch(()=>{}))},[e,t]),t||!e)?null:(0,r.jsx)("video",{ref:n,src:e,muted:!0,loop:!0,playsInline:!0,preload:"none",className:"absolute inset-0 h-full w-full object-cover","aria-hidden":!0},e)}function p({src:e,sectionRef:t,reduceMotion:n}){let s=(0,a.useRef)(null),i=(0,a.useRef)(!1);return((0,a.useEffect)(()=>{let e=t.current,r=s.current;if(!e||!r||n)return;let a=new IntersectionObserver(e=>{let t=e[0];if(!t)return;let n=t.isIntersecting&&t.intersectionRatio>=.35;if(!t.isIntersecting||t.intersectionRatio<.12){i.current&&(r.pause(),r.currentTime=0,i.current=!1);return}n&&!i.current&&(i.current=!0,r.currentTime=0,r.play().catch(()=>{}))},{threshold:[0,.12,.35,.55]});return a.observe(e),()=>a.disconnect()},[t,n]),n)?(0,r.jsx)("div",{className:"absolute inset-0 bg-neutral-950","aria-hidden":!0}):(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center overflow-hidden","aria-hidden":!0,children:(0,r.jsx)("div",{className:"w-full origin-center max-lg:scale-[1.45] lg:absolute lg:inset-0 lg:h-full lg:w-full",style:{aspectRatio:"2212 / 1532"},children:(0,r.jsx)("video",{ref:s,src:e,muted:!0,playsInline:!0,preload:"metadata",className:"block h-full w-full object-cover"})})})}function h({templates:e}){let[t,n]=(0,a.useState)(0),[o,c]=(0,a.useState)(!1),[d,g]=(0,a.useState)(!1),v=function(){let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=window.matchMedia("(min-width: 1024px)"),n=()=>t(e.matches);return n(),e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]),e}(),b=(0,a.useRef)(null),w=(0,a.useRef)(null),y=(0,a.useRef)(null),j=(0,a.useRef)([]),N=(0,a.useRef)(null),k=(0,a.useRef)(-1),R=(0,a.useRef)(0),I=(0,a.useRef)(!1),E=e.length,M=e[t]??e[0],S=M?l[M.name]:void 0,A=(0,a.useMemo)(()=>u(M.nodes),[M.id,M.nodes]);return((0,m.$E)(()=>{let e=y.current;if(!e)return;if((0,m.Oe)())return void(0,m.vP)(e);let t=window.innerHeight||1,n=(0,m.GY)(e.getBoundingClientRect().top,.92*t,.52*t);(0,m.vx)(e,n)}),(0,a.useEffect)(()=>{let e=window.matchMedia("(prefers-reduced-motion: reduce)");c(e.matches);let t=()=>c(e.matches);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,m.$E)(()=>{let e=w.current,t=N.current;if(!e)return;let r=e.getBoundingClientRect(),a=window.innerHeight||1,s=Math.max(.35*a,1),i=Math.max(.45*a,1),l=Math.min(Math.min(1,Math.max(0,(a-r.top-.52*a)/s)),Math.min(1,Math.max(0,r.bottom/i))),c=r.top<a&&r.bottom>0;if(c!==I.current&&(I.current=c,g(c)),t){let e=o?+!!c:l,n=c&&e>.01;Math.abs(e-k.current)>.002&&(k.current=e,t.style.opacity=String(e)),t.style.visibility=n?"visible":"hidden"}if(E>1){let e=.5*a,t=R.current,r=1/0,s=!1;for(let n=0;n<E;n++){let a=j.current[n];if(!a)continue;s=!0;let i=a.getBoundingClientRect(),l=Math.abs(i.top+.5*i.height-e);l<r&&(r=l,t=n)}s&&t!==R.current&&(R.current=t,n(t))}}),(0,a.useEffect)(()=>{j.current=[],R.current=0,n(0);let e=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(e)},[v]),0===E)?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{ref:b,className:"relative isolate h-[100svh] min-h-[100svh] w-full max-w-full overflow-hidden bg-neutral-950 lg:h-[110dvh] lg:min-h-[110dvh]",children:[(0,r.jsx)(p,{src:"/presets/templatedrag.mp4",sectionRef:b,reduceMotion:o}),(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(10,10,10,0.5) 0%, transparent 20%, transparent 78%, rgba(10,10,10,0.4) 100%), radial-gradient(ellipse 90% 80% at 50% 50%, transparent 0%, transparent 52%, rgba(10,10,10,0.55) 100%)"},"aria-hidden":!0}),(0,r.jsx)("div",{className:"relative z-10 flex h-full flex-col items-center justify-start px-5 pt-20 text-center sm:px-6 sm:pt-0 md:px-10",children:(0,r.jsxs)("div",{ref:y,className:"landing-scroll-reveal-item flex max-w-3xl flex-col items-center",style:{opacity:0,transform:`translateX(-${m.zI}px)`},children:[(0,r.jsx)(i.A,{className:"mb-3",variant:"dark",children:"Templates"}),(0,r.jsx)("h2",{className:"font-landing-title text-[28px] font-bold leading-[1.08] tracking-[-0.04em] text-neutral-50 sm:text-3xl md:text-5xl lg:text-[3.25rem]",children:"Start from existing templates"}),(0,r.jsx)("p",{className:"mt-3 max-w-2xl text-[15px] leading-relaxed text-neutral-400 sm:text-base md:text-lg",children:"Drag a preset onto your canvas — empty nodes, wired and ready. Pick a workflow and fill in your libraries."})]})})]}),(0,r.jsxs)("section",{ref:w,className:"relative isolate w-full max-w-full overflow-x-clip",children:[(0,r.jsxs)("div",{ref:N,className:`marketing-viewport-h pointer-events-none z-[5] h-[100dvh] w-full max-w-full overflow-hidden ${d?"fixed inset-x-0 top-0":"absolute top-0"}
1`,style:{visibility:d?"visible":"hidden",willChange:"opacity"},"aria-hidden":!0,children:[o?(0,r.jsx)("div",{className:"absolute inset-0 bg-neutral-950"}):(0,r.jsx)(x,{src:S,reduceMotion:o}),(0,r.jsx)("div",{className:"absolute inset-0 z-[1] bg-black/40"}),(0,r.jsx)("div",{className:"absolute inset-0 z-[2] bg-gradient-to-b from-neutral-950/80 via-neutral-950/35 to-neutral-950/70 lg:bg-gradient-to-r lg:from-neutral-950/75 lg:via-neutral-950/30 lg:to-transparent"})]}),(0,r.jsx)("div",{className:"marketing-viewport-h pointer-events-none h-[100dvh] w-full max-w-full shrink-0","aria-hidden":!0}),(0,r.jsxs)("div",{className:"relative z-10 -mt-[100dvh] w-full max-w-full px-4 pb-16 pt-12 sm:px-6 sm:pb-24 sm:pt-16 lg:px-6 lg:pb-32 lg:pt-20",children:[v?null:(0,r.jsx)("div",{className:"mx-auto flex max-w-3xl flex-col",children:e.map((e,n)=>(0,r.jsx)(f,{template:e,index:n,total:E,reduceMotion:o,isActive:t===n,setSlideRef:e=>{j.current[n]=e}},e.id))}),v?(0,r.jsxs)("div",{className:"mx-auto grid max-w-7xl grid-cols-2 gap-16",children:[(0,r.jsx)("div",{className:"relative order-1 pb-24",children:e.map((e,n)=>(0,r.jsx)("div",{ref:e=>{j.current[n]=e},"data-template-index":n,className:"flex min-h-[85vh] items-center py-8",children:(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)("div",{className:`mb-4 transition-opacity duration-500 ${t===n?"opacity-100":"opacity-[0.12]"}`,children:(0,r.jsx)(i.A,{variant:"dark",children:"Template"})}),(0,r.jsx)("h3",{className:`font-landing-title text-5xl font-bold leading-[1.05] tracking-[-0.04em] transition-all duration-500 lg:text-6xl ${t===n?"text-neutral-50 opacity-100":"text-neutral-50 opacity-[0.12]"}`,children:e.name}),e.description?(0,r.jsx)("p",{className:`mt-2 max-w-md text-base leading-relaxed transition-all duration-500 md:text-lg ${t===n?"text-neutral-400 opacity-100":"text-neutral-400 opacity-0"}`,children:e.description}):null]})},e.id))}),(0,r.jsx)("div",{className:"relative order-2 min-h-[calc(85vh*3)]",children:(0,r.jsxs)("div",{className:"sticky top-0 flex h-[100dvh] flex-col justify-center py-28",children:[(0,r.jsx)("div",{className:"relative aspect-square w-full overflow-hidden rounded-2xl border border-white/10 shadow-2xl shadow-black/40 backdrop-blur-sm",children:(0,r.jsx)("div",{className:"absolute inset-0",children:(0,r.jsx)(s.A,{nodes:A,edges:M.edges,camera:M.camera,autoFit:!0,autoFitPadding:112,readOnlyDisplay:!0,syncToStore:!1,canvasBackground:"rgba(18, 18, 18, 0.42)"},M.id)})}),(0,r.jsxs)("div",{className:"mt-4 flex items-baseline justify-between gap-4",children:[(0,r.jsx)("p",{className:"font-landing-title text-sm font-semibold tracking-[-0.02em] text-neutral-50 transition-opacity duration-500 md:text-base",children:M.name}),(0,r.jsxs)("p",{className:"shrink-0 font-mono text-xs uppercase tracking-[0.2em] text-neutral-400",children:["Preset ",t+1," / ",E]})]})]})})]}):null]})]})]})}function f({template:e,index:t,total:n,reduceMotion:l,isActive:o,setSlideRef:c}){let d=(0,a.useMemo)(()=>u(e.nodes),[e.id,e.nodes]),m=(0,a.useRef)(null),[x,p]=(0,a.useState)(l);return(0,a.useEffect)(()=>{if(l)return void p(!0);let e=m.current;if(!e)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&(p(!0),t.disconnect())},{rootMargin:"120px 0px"});return t.observe(e),()=>t.disconnect()},[l]),(0,r.jsx)("div",{ref:c,"data-template-index":t,className:"flex min-h-[88vh] flex-col justify-center py-10",children:(0,r.jsxs)("div",{className:`flex flex-col gap-6 transition-opacity duration-500 ${o?"opacity-100":"opacity-90"}`,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(i.A,{variant:"dark",children:"Template"}),(0,r.jsx)("h3",{className:`font-landing-title mt-3 text-3xl font-bold leading-[1.05] tracking-[-0.04em] transition-all duration-500 sm:text-4xl ${o?"text-neutral-50":"text-neutral-50/40"}`,children:e.name}),e.description?(0,r.jsx)("p",{className:`mt-3 max-w-md text-[15px] leading-relaxed transition-all duration-500 sm:text-base ${o?"text-neutral-400":"text-neutral-400/50"}`,children:e.description}):null]}),(0,r.jsx)("div",{ref:m,className:"relative aspect-square w-full overflow-hidden rounded-2xl border border-white/10 bg-neutral-950/60 shadow-2xl shadow-black/40 backdrop-blur-sm",children:(0,r.jsx)("div",{className:"absolute inset-0",children:x?(0,r.jsx)(s.A,{nodes:d,edges:e.edges,camera:e.camera,autoFit:!0,autoFitPadding:48,readOnlyDisplay:!0,syncToStore:!1,canvasBackgroun
1d:"rgba(18, 18, 18, 0.42)"}):null})}),(0,r.jsxs)("p",{className:"font-mono text-xs uppercase tracking-[0.2em] text-neutral-400",children:["Preset ",t+1," / ",n]})]})})}}}]);

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.