PageSourceSearch

https://static.cf.vidu.com/2.18.146-sg/_next/static/chunks/02mkiwm46ewfd.js

js vidu.com collected 2026-09-24 08:53:14 UTC 34,592 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="8e51dabf-2a4e-f978-4f74-29c65cb8777e")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22246,e=>{"use strict";var t=e.i(639741),i=e.i(193867),s=e.i(356583),o=e.i(249886),r=e.i(325812),n=e.i(197564),l=e.i(847172),a=e.i(970890),h=e.i(375250),c=e.i(157640),d=e.i(196432),p=e.i(163791),u=e.i(533930),m=e.i(290189);e.i(758908);var v=e.i(457316);e.i(862634);var f=e.i(902238),g=e.i(104650),x=e.i(647534),w=e.i(895842);let S={url:w.HOME_MEDIA.s11.videoSrc,poster:w.HOME_MEDIA.s11.poster},b={url:w.HOME_MEDIA.q41.videoSrc,poster:w.HOME_MEDIA.q41.poster},y=[{name:"hero2",china:S,global:S},{name:"heroQ3",china:b,global:b,modelVersion:u.MODEL_VERSION.Q3,settings:{movement_amplitude:"large"}}].map(e=>{var t;let{china:i,global:s,...o}=e;return{...o,...{url:encodeURI((t="china"===x.SITE?i:s).url),poster:encodeURI(t.poster),...t.mobileVideoSrc?{mobileVideoSrc:encodeURI(t.mobileVideoSrc)}:{},...t.mobilePoster?{mobilePoster:encodeURI(t.mobilePoster)}:{}}}});var N=e.i(688109);let E=e=>{let{keys:i,activeIndex:s,onSelect:o,className:r}=e;return(0,t.jsx)("div",{className:(0,N.cn)("flex items-center gap-3",r),children:i.map((e,i)=>{let r=i===s;return(0,t.jsx)("button",{type:"button","aria-label":`switch to slide ${i+1}`,"aria-current":r,onClick:()=>o(i),className:"group flex h-4 cursor-pointer items-center",children:(0,t.jsx)("span",{className:(0,N.cn)("block h-[2px] rounded-full transition-all duration-300 ease-out",r?"w-12 bg-white":"w-8 bg-white/30 group-hover:bg-white/60")})},e)})})};var j=e.i(104671),T=e.i(521204),_=e.i(553436);let R=e=>{let{placeholder:s,bgImg:o,buttonText:r,tagText:n,variant:h="solid",onSubmit:c}=e,d=(0,l.useTranslations)(),p=(0,a.useRef)(null),[u,m]=(0,a.useState)(""),v=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=p.current?.value||""||s;c?.(t),m("")},[s,c]);return(0,t.jsxs)("form",{onSubmit:v,className:(0,N.cn)("relative mx-auto flex h-full w-full items-center justify-center overflow-hidden transition duration-200","outline"===h?"rounded-full border border-white/40 bg-transparent":"rounded-full border-system-white36 bg-system-white24 shadow-[0px_2px_3px_-1px_rgba(0,0,0,0.1),_0px_1px_0px_0px_rgba(25,28,33,0.02),_0px_0px_0px_1px_rgba(25,28,33,0.08)] backdrop-blur-[20px]"),children:[o?(0,t.jsxs)("div",{className:"ml-6 flex items-center",children:[(0,t.jsx)(_.default,{className:"size-7 rounded-8 object-cover object-center",src:o,alt:"banner-img",width:28,height:28,loading:"lazy",decoding:"async"}),(0,t.jsx)("span",{className:"mx-4 inline-block h-6 w-2 text-center text-base text-white",children:"|"})]}):null,(0,t.jsx)("input",{onKeyDown:e=>{"Enter"===e.key&&v(e)},onClick:v,ref:p,value:u,readOnly:!0,type:"text",className:(0,N.cn)("relative z-50 h-full flex-1 cursor-pointer rounded-full border-none bg-transparent pr-32 font-normal text-base text-white focus:outline-none focus:ring-0","outline"===h?"pl-6":"pl-1")}),(0,t.jsx)("button",{type:"button",className:"-translate-y-1/2 peer absolute top-1/2 right-2 z-50 flex h-12 cursor-pointer items-center justify-center whitespace-nowrap rounded-full bg-white/80 px-6 text-black text-sm backdrop-blur-[20px] transition duration-200 disabled:bg-[rgba(0,0,0,.8)]",onClick:v,children:r??d("home3.heroSection.createButton")}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center rounded-full",children:(0,t.jsx)(T.AnimatePresence,{mode:"wait",children:!u&&(0,t.jsxs)(i.motion.p,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},exit:{y:-15,opacity:0},transition:{duration:.3,ease:"linear"},className:(0,N.cn)("flex w-[calc(100%-8rem)] items-center gap-2 truncate text-left font-normal text-base text-white","outline"===h?"pl-6":"pl-24 sm:pl-12"),children:[n?(0,t.jsx)("span",{className:"shrink-0 whitespace-nowrap rounded-10 bg-white/12 px-3 py-1 font-medium text-[13px] text-white backdrop-blur-[10px]",children:n}):null,(0,t.jsx)("span",{className:"truncate",children:s})]},`current-placeholder-${s}`)})})]})};var M=e.i(255689),z=e.i(30808);let L=(0,a.memo)(e=>{let{resources:i,currentIndex:s,enabled:o,onEnded:r}=e,n=(0,a.useRef)([]),h=(0,l.useTranslations)();(0,a.useEffect)(()=>{o&&n.current.forEach((e,t)=>{e&&(t===s?(e.currentTime=0,(0,z.playMediaSafely)(e)):e.pause())})},[s,o]);let c=1===i.length;return(0,t.jsx)(t.Fragment,{children:i.map((e,i)=>{let l=h(`home3.heroSection.prompts.${e.name}`),a=i===s,d=`(max-width: ${M.BREAKPOINTS.SM_MAX}px)`,p=e.mobileVideoSrc?`(min-width: ${M.BREAKPOINTS.MD_MIN}px)`:void 0;return(0,t.jsxs)("div",{className:(0,N.cn)("-z-20 absolute top-0 left-0 h-full w-full transition-opacity duration-150 ease-in-out",a?"opacity-100":"opacity-0"),children:[(0,t.jsxs)("picture",{children:[e.mobilePoster?(0,t.jsx)("source",{media:d,srcSet:e.mobilePoster}):null,(0,t.jsx)("img",{src:e.poster,alt:l,decoding:"async",loading:0===i?"eager":"lazy",fetchPriority:0===i?"high":"auto",className:"absolute inset-0 h-full w-full object-cover object-center"})]}),o&&(0,t.jsxs)("video",{ref:e=>{n.current[i]=e},className:"absolute inset-0 h-full w-full object-cover object-center",autoPlay:!0,muted:!0,playsInl
2ine:!0,loop:c,preload:a?"auto":"none","webkit-playsinline":"true","x5-playsinline":"true","x5-video-player-type":"h5-page","x5-video-player-fullscreen":"false","t7-video-player-type":"inline",disablePictureInPicture:!0,disableRemotePlayback:!0,controlsList:"nodownload nofullscreen noremoteplayback noplaybackrate",onEnded:a&&!c?r:void 0,children:[e.mobileVideoSrc?(0,t.jsx)("source",{media:d,src:e.mobileVideoSrc,type:"video/mp4"}):null,(0,t.jsx)("source",{media:p,src:e.url,type:"video/mp4"})]})]},`hero-seq-${e.url}`)})})});L.displayName="SequentialVideoCarousel";let k={heroQ3:"q3",hero:"q3",hero2:"s1"},C={heroQ3:"taglineQ3",hero:"taglineQ3",hero2:"taglineS1"},I=e=>["text-[16px] text-white/80 leading-[30px] md:text-[10px] md:leading-[22px]","zh"===e?"tracking-[0.5em] md:tracking-[0.4em]":""].filter(Boolean).join(" ");e.s(["HeroSection",0,()=>{let[e,x]=(0,a.useState)(0),[w,S]=(0,a.useState)(!1),[b,N]=(0,a.useState)(!0),T=(0,a.useRef)(null),_=(0,s.useReducedMotion)(),M=(0,g.useRouter)(),z=(0,n.useLocale)(),{updateFormParams:O,updateModelVersion:P,setPendingClawInput:H}=(0,m.useStore)(e=>({updateFormParams:e.updateFormParams,updateModelVersion:e.updateModelVersion,setPendingClawInput:e.setPendingClawInput})),W=(0,l.useTranslations)(),{scrollYProgress:D}=(0,o.useScroll)({target:T,offset:["start start","end start"]}),A=(0,r.useTransform)(D,[0,1],["0%","35%"]),V=(0,r.useTransform)(D,[0,1],["0%","12%"]);return(0,a.useEffect)(()=>{let e=navigator.connection;if(e?.saveData)return;let t=!1,i=requestAnimationFrame(()=>{t||S(!0)});return()=>{t=!0,cancelAnimationFrame(i)}},[]),(0,a.useEffect)(()=>{if(!T.current)return;let e=new IntersectionObserver(e=>{N(e[0].isIntersecting)},{threshold:.05});return e.observe(T.current),()=>{T.current&&e.unobserve(T.current)}},[]),(0,t.jsxs)("div",{ref:T,className:"relative z-10 flex h-[100svh] min-h-[660px] flex-col items-center justify-center sm:justify-end md:justify-end",children:[(0,t.jsxs)(i.motion.div,{className:"absolute inset-0 h-full w-full overflow-hidden",style:_?void 0:{y:A,scale:1.12},children:[(0,t.jsx)(L,{resources:y,currentIndex:e,enabled:w&&b,onEnded:()=>{x(e=>(e+1)%y.length)}}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-black/[0.12]"}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-[30%] bg-gradient-to-b from-transparent to-black/40"})]}),(0,t.jsxs)(i.motion.div,{className:"absolute inset-0 flex flex-col items-center justify-end px-6 pb-[128px] text-center md:pb-[104px]",style:_?void 0:{y:V},children:[(0,t.jsx)(j.HeroWordmark,{variant:k[y[e].name]??"q3",className:"h-[80px] sm:h-[32px] md:h-[38px] lg:h-[50px]"},e),(0,t.jsx)("p",{className:I(z),children:W(`home3.heroSection.${C[y[e].name]??"taglineQ3"}`)}),"hero2"===y[e].name?(0,t.jsx)(d.ClientLink,{href:"/vidu-stream",className:"mt-8 box-border flex h-[60px] w-[200px] cursor-pointer items-center justify-center rounded-full border border-white/40 bg-transparent font-semibold text-[16px] text-white transition hover:bg-white/10 md:hidden","aria-label":"trynow",onClick:()=>{(0,v.reportEvent)("element_click",{element_name:"landing - trynow",case_name:y[e].name,case_index:e})},children:W("home3.heroSection.navHome")}):(0,t.jsx)("div",{className:"mt-8 h-[60px] w-[640px] md:hidden lg:w-[560px]",children:(0,t.jsx)(R,{variant:"outline",placeholder:W(`home3.heroSection.prompts.${y[e].name}`),buttonText:W("home3.heroSection.createButton"),onSubmit:t=>{let i=t?.trim();i&&f.safeStorage.setItem(p.VIDU_WELCOME_STORAGE_KEY,i);let s=y[e];if((0,v.reportEvent)("element_click",{element_name:"landing - create",case_name:s.name,case_index:e}),s.isClaw){H({prompt:i||W(`home3.heroSection.prompts.${s.name}`)||"",referenceImageUrl:s.clawWithReferenceImage?s.poster:void 0}),M.push("/claw");return}(t=>{let i=y[e],{modelVersion:s,settings:o,poster:r}=i;O("img2video","textPrompt",t||W(`home3.heroSection.prompts.${i.name}`)),O("img2video","imagePrompts",[{id:(0,h.v4)(),status:"done",prompt:{sourceImage:r,sourceImagePreview:r,selectedImage:r,selectedImagePreview:r}}]),s&&(O("img2video",u.MODEL_VERSION_SETTINGS_MAP[s],o),P("img2video",s))})(i),M.push("/create/img2video")}})})]}),y.length>1&&(0,t.jsx)("div",{className:"absolute right-0 bottom-0 flex justify-end px-[88px] pb-[88px] md:px-16 md:pb-16",children:(0,t.jsx)(E,{keys:y.map(e=>e.name),activeIndex:e,onSelect:e=>{x(e)}})}),(0,t.jsx)("div",{className:"-translate-x-1/2 pointer-events-none absolute bottom-6 left-1/2 flex flex-col items-center text-white/70 md:bottom-4",children:(0,t.jsx)(c.BaseLineDown,{className:"size-6 animate-scroll-down-hint"})})]})},"getTaglineClassName",0,I],22246)},949793,e=>{"use strict";var t=e.i(639741),i=e.i(970890),s=e.i(154450),o=e.i(196432),r=e.i(404542),n=e.i(480282),l=e.i(163791),a=e.i(439234),h=e.i(647534);let c=e=>"china"===e?"flex flex-col items-center gap-3 text-center":"flex flex-wrap items-center justify-between gap-4";e.s(["HomeFooter",0,e=>{let{className:d}=e;if(a.isEnterpriseDistribution)return null;let p=(0,n.getSocialLinks)(),u=(0,n.getFooterConfig)(),m=(0,n.getTermsAndPrivacy)(),v=(0,n.getRegistrationConfig)(),f=(e,s,r)=>(0,t.jsxs)(i.Fragment,{children:[e.href?(0,t.jsxs)(o.ClientLink,{href:e.href,target:e.target,rel:e.rel,className:"flex items-center text-white/40 transition-colors hover:cursor-pointer hover:text-white/70",children:[e.icon&&(0,t.jsx)("img",{src:e.icon,alt:e.alt,className:"mr-1 h-4 w-4"}),e.text]}):(0,t.jsx)("span",{className:"text-white/40",children:e.text}),s<r-1&&(0,t.jsx)("span",{className:"text-white/[0.16]",children:"|"})]},e.id);return(0,t.jsx)("footer",{"data-google-interstitial":"false",className:d,children:(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[1600px] px-20 pt-24 pb-10 sm:px-4 md:px-6 md:pt-16",children:[(0,t.jsxs)("div",{className:"flex justify-between gap-16 md:flex-col md:gap-12",children:[(0,t.jsxs)("div",{className:"shrink-0",children:[(0,t.jsx)(s.LoginWhite,{className:"text-3xl text-white"}),(0,t.jsx)("div",{className:"mt-10 flex flex-wrap gap-4 md:mt-8",children:p.map(e=>{let{icon:i,href:s,label:n}=e;return(0,t.jsx)(r.ReportEvent,{eventName:"element_click",params:{element_name:n},children:(0,t.jsx)(o.ClientLink,{href:s,target:"_blank",title:n,rel:"noopener noreferrer",className:"flex size-8 items-center justify-center text-white/70 transition-colors hover:text-white",children:(0,t.jsx)(i,{className:"size-6"})})},`social_${n}`)})})]}),(0,t.jsx)("div",{className:"flex gap-20 md:flex-wrap md:gap-x-12 md:gap-y-10 lg:gap-12",children:u.map(e=>{let{title:i,children:s,id:n}=e;return(0,t.jsxs)("div",{className:"flex flex-col gap-3 text-[14px] leading-6",children:[(0,t.jsx)("div",{className:"mb-1 font-medium text-[15px] text-white",children:i}),s.map(e=>{let{href:i,text:s,rel:n,target:l,reportElement:a}
2=e,h=(0,t.jsx)(o.ClientLink,{href:i,target:l,rel:n,className:"text-white/50 transition-colors hover:cursor-pointer hover:text-white",children:s},i);return a?(0,t.jsx)(r.ReportEvent,{eventName:a.eventName,params:a.params,children:h},a.key):h})]},n)})})]}),(0,t.jsx)("div",{className:"mt-20 border-white/[0.08] border-t pt-8 text-[13px] md:mt-12",children:"china"===h.SITE?(0,t.jsxs)("div",{className:c(h.SITE),children:[(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-2",children:m.filter(e=>e.href).map((e,t,i)=>f(e,t,i.length))}),(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-2",children:v.map((e,t)=>f(e,t,v.length))}),(0,t.jsx)("span",{className:"text-white/40",children:l.COPY_RIGHT})]}):(0,t.jsxs)("div",{className:c(h.SITE),children:[(0,t.jsx)("span",{className:"text-white/40",children:l.COPY_RIGHT}),(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2",children:m.filter(e=>!!e.href).map(e=>{let{href:i,text:s,target:r,rel:n,id:l}=e;return(0,t.jsx)(o.ClientLink,{href:i,target:r,rel:n,className:"text-white/40 transition-colors hover:cursor-pointer hover:text-white/70",children:s},l)})})]})})]})})},"getLegalSectionClassName",0,c])},834095,e=>{"use strict";var t=e.i(639741),i=e.i(193867),s=e.i(356583);e.s(["RevealSection",0,e=>{let{children:o,className:r,y:n=40,duration:l=1,amount:a=.15}=e;return(0,s.useReducedMotion)()?(0,t.jsx)("div",{className:r,children:o}):(0,t.jsx)(i.motion.div,{className:r,initial:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:a},transition:{duration:l,ease:[.22,1,.36,1]},children:o})}])},756885,e=>{"use strict";var t=e.i(639741),i="1.3.26";function s(e,t,i){return Math.max(e,Math.min(t,i))}var o=class{isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(e){if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;let i=s(0,this.currentTime/this.duration,1),o=(t=i>=1)?1:this.easing(i);this.value=this.from+(this.to-this.from)*o}else if(this.lerp){var i,o,r,n;this.value=(i=this.value,o=this.to,r=60*this.lerp,(1-(n=1-Math.exp(-r*e)))*i+n*o),Math.round(this.value)===Math.round(this.to)&&(this.value=this.to,t=!0)}else this.value=this.to,t=!0;t&&this.stop(),this.onUpdate?.(this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,i){let{lerp:s,duration:o,easing:r,onStart:n,onUpdate:l}=i;this.from=this.value=e,this.to=t,this.lerp=s,this.duration=o,this.easing=r,this.currentTime=0,this.isRunning=!0,n?.(),this.onUpdate=l}},r=class{width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;constructor(e,t,{autoResize:i=!0,debounce:s=250}={}){this.wrapper=e,this.content=t,i&&(this.debouncedResize=function(e,t){let i;return function(){for(var s=arguments.length,o=Array(s),r=0;r<s;r++)o[r]=arguments[r];clearTimeout(i),i=setTimeout(()=>{i=void 0,e.apply(this,o)},t)}}(this.resize,s),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize)}resize=()=>{this.onWrapperResize(),this.onContentResize()};onWrapperResize=()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)};onContentResize=()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)};get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},n=class{events={};emit(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];let o=this.events[e]||[];for(let e=0,t=o.length;e<t;e++)o[e]?.(...i)}on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}off(e,t){this.events[e]=this.events[e]?.filter(e=>t!==e)}destroy(){this.events={}}};let l=100/6,a={passive:!1};function h(e,t){return 1===e?l:2===e?t:1}var c=class{touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new n;constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,a),this.element.addEventListener("touchstart",this.onTouchStart,a),this.element.addEventListener("touchmove",this.onTouchMove,a),this.element.addEventListener("touchend",this.onTouchEnd,a)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize),this.element.removeEventListener("wheel",this.onWheel,a),this.element.removeEventListener("touchstart",this.onTouchStart,a),this.element.removeEventListener("touchmove",this.onTouchMove,a),this.element.removeEventListener("touchend",this.onTouchEnd,a)}onTouchStart=e=>{let{clientX:t,clientY:i}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=i,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})};onTouchMove=e=>{let{clientX:t,clientY:i}=e.targetTouches?e.targetTouches[0]:e,s=-(t-this.touchStart.x)*this.options.touchMultiplier,o=-(i-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=i,this.lastDelta={x:s,y:o},this.emitter.emit("scroll",{deltaX:s,deltaY:o,event:e})};onTouchEnd=e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})};onWheel=e=>{let{deltaX:t,deltaY:i,deltaMode:s}=e,o=h(s,this.window.width),r=h(s,this.window.height);t*=o,i*=r,t*=this.options.wheelMultiplier,i*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:i,event:e})};onWindowResize=()=>{this.window={width:window.innerWidth,height:window.innerHeight}}};let d=e=>Math.min(1,1.001-2**(-10*e));var p=class{_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;_rafId=null;_isDraggingSelection=!1;reducedMotionMediaQuery=window.matchMedia("(prefers-reduced-motion: reduce)");
2isTouching;isIos;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new o;emitter=new n;dimensions;virtualScroll;constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:s=e,smoothWheel:o=!0,syncTouch:n=!1,syncTouchLerp:l=.075,touchInertiaExponent:a=1.7,duration:h,easing:p,lerp:u=.1,infinite:m=!1,orientation:v="vertical",gestureOrientation:f="horizontal"===v?"both":"vertical",touchMultiplier:g=1,wheelMultiplier:x=1,autoResize:w=!0,prevent:S,virtualScroll:b,overscroll:y=!0,autoRaf:N=!1,anchors:E=!1,autoToggle:j=!1,allowNestedScroll:T=!1,__experimental__naiveDimensions:_=!1,naiveDimensions:R=_,stopInertiaOnNavigate:M=!1,respectReducedMotion:z=!0}={}){window.lenisVersion=i,window.lenis||(window.lenis={}),window.lenis.version=i,"horizontal"===v&&(window.lenis.horizontal=!0),!0===n&&(window.lenis.touch=!0),this.isIos=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),e&&e!==document.documentElement||(e=window),"number"==typeof h&&"function"!=typeof p?p=d:"function"==typeof p&&"number"!=typeof h&&(h=1),this.options={wrapper:e,content:t,eventsTarget:s,smoothWheel:o,syncTouch:n,syncTouchLerp:l,touchInertiaExponent:a,duration:h,easing:p,lerp:u,infinite:m,gestureOrientation:f,orientation:v,touchMultiplier:g,wheelMultiplier:x,autoResize:w,prevent:S,virtualScroll:b,overscroll:y,autoRaf:N,anchors:E,autoToggle:j,allowNestedScroll:T,naiveDimensions:R,stopInertiaOnNavigate:M,respectReducedMotion:z},this.dimensions=new r(e,t,{autoResize:w}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown),this.virtualScroll=new c(s,{touchMultiplier:g,wheelMultiplier:x}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd)),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}onScrollEnd=e=>{e instanceof CustomEvent||"smooth"!==this.isScrolling&&!1!==this.isScrolling||e.stopPropagation()};dispatchScrollendEvent=()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))};get overflow(){let e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}onTransitionEnd=e=>{e.propertyName?.includes("overflow")&&e.target===this.rootElement&&this.checkOverflow()};setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}onClick=e=>{let t=e.composedPath().filter(e=>e instanceof HTMLAnchorElement&&e.href).map(e=>new URL(e.href)),i=new URL(window.location.href);if(this.options.anchors){let e=t.find(e=>i.host===e.host&&i.pathname===e.pathname&&e.hash);if(e){let t="object"==typeof this.options.anchors&&this.options.anchors?this.options.anchors:void 0,i=decodeURIComponent(e.hash);this.scrollTo(i,t);return}}if(this.options.stopInertiaOnNavigate&&t.some(e=>i.host===e.host&&i.pathname!==e.pathname))return void this.reset()};onPointerDown=e=>{1===e.button&&this.reset()};isTouchOnSelectionHandle(e){let t=window.getSelection();if(!t||t.isCollapsed||0===t.rangeCount)return!1;let i=e.targetTouches[0]??e.changedTouches[0];if(!i)return!1;let s=t.getRangeAt(0).getClientRects();if(0===s.length)return!1;let o=s[0],r=s[s.length-1],n=40>=Math.hypot(i.clientX-o.left,i.clientY-o.top),l=40>=Math.hypot(i.clientX-r.right,i.clientY-r.bottom);return n||l}onVirtualScroll=e=>{if("function"==typeof this.options.virtualScroll&&!1===this.options.virtualScroll(e))return;let{deltaX:t,deltaY:i,event:s}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:i,event:s}),s.ctrlKey||s.lenisStopPropagation)return;let o=s.type.includes("touch"),r=s.type.includes("wheel");if(o&&this.isIos&&("touchstart"===s.type&&(this._isDraggingSelection=this.isTouchOnSelectionHandle(s)),this._isDraggingSelection)){"touchend"===s.type&&(this._isDraggingSelection=!1);return}this.isTouching="touchstart"===s.type||"touchmove"===s.type;let n=0===t&&0===i;if(this.options.syncTouch&&o&&"touchstart"===s.type&&n&&!this.isStopped&&!this.isLocked)return void this.reset();let l="vertical"===this.options.gestureOrientation&&0===i||"horizontal"===this.options.gestureOrientation&&0===t;if(n||l)return;let a=s.composedPath();a=a.slice(0,a.indexOf(this.rootElement));let h=this.options.prevent,c=Math.abs(t)>=Math.abs(i)?"horizontal":"vertical";if(a.find(e=>e instanceof HTMLElement&&("function"==typeof h&&h?.(e)||e.hasAttribute?.("data-lenis-prevent")||"vertical"===c&&e.hasAttribute?.("data-lenis-prevent-vertical")||"horizontal"===c&&e.hasAttribute?.("data-lenis-prevent-horizontal")||o&&e.hasAttribute?.("data-lenis-prevent-touch")||r&&e.hasAttribute?.("data-lenis-prevent-wheel")||this.options.allowNestedScroll&&this.hasNestedScroll(e,{deltaX:t,deltaY:i}
2))))return;if(this.isStopped||this.isLocked){s.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&o||this.options.smoothWheel&&r)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let d=i;"both"===this.options.gestureOrientation?d=Math.abs(i)>Math.abs(t)?i:t:"horizontal"===this.options.gestureOrientation&&(d=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||0===this.animatedScroll&&i>0||this.animatedScroll===this.limit&&i<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();let p=o&&this.options.syncTouch,u=o&&"touchend"===s.type;u&&(d=Math.sign(d)*Math.abs(this.velocity)**this.options.touchInertiaExponent),this.scrollTo(this.targetScroll+d,{programmatic:!1,...p?{lerp:u?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})};resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}onNativeScroll=()=>{if(null!==this._resetVelocityTimeout&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(!1===this.isScrolling||"native"===this.isScrolling){let e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),0!==this.velocity&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}};reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle)return void this.rootElement.style.removeProperty("overflow");this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle)return void this.rootElement.style.setProperty("overflow","clip");this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}raf=e=>{let t=e-(this.time||e);this.time=e,this.animate.advance(.001*t),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))};scrollTo(e){let{offset:t=0,immediate:i=!1,lock:o=!1,programmatic:r=!0,lerp:n=r?this.options.lerp:void 0,duration:l=r?this.options.duration:void 0,easing:a=r?this.options.easing:void 0,onStart:h,onComplete:c,force:p=!1,userData:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.prefersReducedMotion&&(r?i=!0:(n=1,l=void 0,a=void 0)),(this.isStopped||this.isLocked)&&!p)return;let m=e,v=t;if("string"==typeof m&&["top","left","start","#"].includes(m))m=0;else if("string"==typeof m&&["bottom","right","end"].includes(m))m=this.limit;else{let e=null;if("string"==typeof m?(e=m.startsWith("#")?document.getElementById(m.slice(1)):document.querySelector(m))||("#top"===m?m=0:console.warn("Lenis: Target not found",m)):m instanceof HTMLElement&&m?.nodeType&&(e=m),e){if(this.options.wrapper!==window){let e=this.rootElement.getBoundingClientRect();v-=this.isHorizontal?e.left:e.top}let t=e.getBoundingClientRect(),i=getComputedStyle(e),s=this.isHorizontal?Number.parseFloat(i.scrollMarginLeft):Number.parseFloat(i.scrollMarginTop),o=getComputedStyle(this.rootElement),r=this.isHorizontal?Number.parseFloat(o.scrollPaddingLeft):Number.parseFloat(o.scrollPaddingTop);m=(this.isHorizontal?t.left:t.top)+this.animatedScroll-(Number.isNaN(s)?0:s)-(Number.isNaN(r)?0:r)}}if("number"==typeof m){if(m+=v,this.options.infinite){if(r){this.targetScroll=this.animatedScroll=this.scroll;let e=m-this.animatedScroll;e>this.limit/2?m-=this.limit:e<-this.limit/2&&(m+=this.limit)}}else m=s(0,m,this.limit);if(m===this.targetScroll){h?.(this),c?.(this);return}if(this.userData=u??{},i){this.animatedScroll=this.targetScroll=m,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit
2(),c?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=m),"number"==typeof l&&"function"!=typeof a?a=d:"function"==typeof a&&"number"!=typeof l&&(l=1),this.animate.fromTo(this.animatedScroll,m,{duration:l,easing:a,lerp:n,onStart:()=>{o&&(this.isLocked=!0),this.isScrolling="smooth",h?.(this)},onUpdate:(e,t)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=e-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=e,this.setScroll(this.scroll),r&&(this.targetScroll=e),t||this.emit(),t&&(this.reset(),this.emit(),c?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}hasNestedScroll(e,t){let i,s,o,r,n,l,a,h,c,d,p,u,m,v,f,g,{deltaX:x,deltaY:w}=t,S=Date.now();e._lenis||(e._lenis={});let b=e._lenis;if(S-(b.time??0)>2e3){b.time=Date.now();let t=window.getComputedStyle(e);if(b.computedStyle=t,i=["auto","overlay","scroll"].includes(t.overflowX),s=["auto","overlay","scroll"].includes(t.overflowY),n=["auto"].includes(t.overscrollBehaviorX),l=["auto"].includes(t.overscrollBehaviorY),b.hasOverflowX=i,b.hasOverflowY=s,!(i||s))return!1;a=e.scrollWidth,h=e.scrollHeight,c=e.clientWidth,d=e.clientHeight,o=a>c,r=h>d,b.isScrollableX=o,b.isScrollableY=r,b.scrollWidth=a,b.scrollHeight=h,b.clientWidth=c,b.clientHeight=d,b.hasOverscrollBehaviorX=n,b.hasOverscrollBehaviorY=l}else o=b.isScrollableX,r=b.isScrollableY,i=b.hasOverflowX,s=b.hasOverflowY,a=b.scrollWidth,h=b.scrollHeight,c=b.clientWidth,d=b.clientHeight,n=b.hasOverscrollBehaviorX,l=b.hasOverscrollBehaviorY;if(!(i&&o||s&&r))return!1;let y=Math.abs(x)>=Math.abs(w)?"horizontal":"vertical";if("horizontal"===y)p=Math.round(e.scrollLeft),u=a-c,m=x,v=i,f=o,g=n;else{if("vertical"!==y)return!1;p=Math.round(e.scrollTop),u=h-d,m=w,v=s,f=r,g=l}return!g&&(p>=u||p<=0)||(m>0?p<u:p>0)&&v&&f}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return"horizontal"===this.options.orientation}get actualScroll(){let e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){var e;return this.options.infinite?(this.animatedScroll%(e=this.limit)+e)%e:this.animatedScroll}get progress(){return 0===this.limit?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return"smooth"===this.isScrolling}get prefersReducedMotion(){return this.options.respectReducedMotion&&this.reducedMotionMediaQuery.matches}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),"smooth"===this.isScrolling&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.className.split(" ").forEach(e=>{this.rootElement.classList.add(e)})}cleanUpClassName(){for(let e of Array.from(this.rootElement.classList))("lenis"===e||e.startsWith("lenis-"))&&this.rootElement.classList.remove(e)}},u=e.i(970890);let m=(0,u.createContext)(null),v=new class{listeners=[];constructor(e){this.state=e}set(e){for(let t of(this.state=e,this.listeners))t(this.state)}subscribe(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(t=>t!==e)}}get(){return this.state}}(null),f=(0,u.forwardRef)((e,i)=>{let{children:s,root:o=!1,options:r={},autoRaf:n=!0,className:l="",...a}=e,h=(0,u.useRef)(null),c=(0,u.useRef)(null),[d,f]=(0,u.useState)(void 0);(0,u.useImperativeHandle)(i,()=>({wrapper:h.current,content:c.current,lenis:d}),[d]),(0,u.useEffect)(()=>{let e=new p({...r,...h.current&&c.current&&{wrapper:h.current,content:c.current},autoRaf:r?.autoRaf??n});return f(e),()=>{e.destroy(),f(void 0)}},[n,JSON.stringify({...r,wrapper:null,content:null})]);let g=(0,u.useRef)([]),x=(0,u.useCallback)((e,t)=>{g.current.push({callback:e,priority:t}),g.current.sort((e,t)=>
2e.priority-t.priority)},[]),w=(0,u.useCallback)(e=>{g.current=g.current.filter(t=>t.callback!==e)},[]);return((0,u.useEffect)(()=>{if(o&&d)return v.set({lenis:d,addCallback:x,removeCallback:w}),()=>v.set(null)},[o,d,x,w]),(0,u.useEffect)(()=>{if(!d)return;let e=e=>{for(let{callback:t}of g.current)t(e)};return d.on("scroll",e),()=>{d.off("scroll",e)}},[d]),s)?(0,t.jsx)(m.Provider,{value:{lenis:d,addCallback:x,removeCallback:w},children:o&&"asChild"!==o?s:(0,t.jsx)("div",{ref:h,className:`${l} ${d?.className??""}`.trim(),...a,children:(0,t.jsx)("div",{ref:c,children:s})})}):null});e.s(["SmoothScrollProvider",0,e=>{let{children:i}=e,[s,o]=(0,u.useState)(!1);return((0,u.useEffect)(()=>{let e=window.matchMedia("(prefers-reduced-motion: reduce)").matches,t=window.matchMedia("(pointer: coarse)").matches;o(!e&&!t)},[]),s)?(0,t.jsx)(f,{root:!0,options:{duration:1.1,easing:e=>Math.min(1,1.001-2**(-10*e)),smoothWheel:!0,wheelMultiplier:1,touchMultiplier:1.5},children:i}):(0,t.jsx)(t.Fragment,{children:i})}],756885)}]);
3
4//# debugId=8e51dabf-2a4e-f978-4f74-29c65cb8777e
5//# sourceMappingURL=0d-2xz-n1jvqw.js.map

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.