1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,158588,e=>{"use strict";var t=e.i(316584),l=e.i(733209),r=e.i(456904),a=e.i(161924),i=e.i(866547),s=e.i(152887),n=e.i(409953),o=e.i(416275),c=e.i(559847);function d(e,l,r,a){return l?(0,t.jsx)(c.ModelScrollReveal,{className:a,children:r},e):(0,t.jsx)("div",{className:a,children:r},e)}e.s(["ModelFeatureRows",0,function({copy:e,media:c,ctaHref:u,ctaLabel:m,tone:p="dark",id:f,reveal:v=!0,beforeLabel:g,afterLabel:x,beforeAfterAriaLabel:b}){let h="light"===p;return(0,t.jsxs)(i.Section,{id:f,background:h?"bandLight":"page",frame:!1,padY:!1,className:"py-16 md:py-24 lg:py-30",children:[d("heading",v,(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(n.Typography,{variant:"h2",className:h?"text-[var(--text-on-light)]":"text-[var(--text-primary)]",children:e.heading}),e.intro?(0,t.jsx)("p",{className:(0,l.cn)("mx-auto mt-4 max-w-[640px] text-title leading-7",h?"text-[var(--text-on-light-secondary)]":"text-[var(--text-secondary)]"),children:e.intro}):null]}),"mb-14 md:mb-18"),(0,t.jsx)("div",{className:"flex flex-col gap-20 md:gap-30 lg:gap-40",children:e.blocks.map((e,i)=>d(e.title,v,(0,t.jsxs)("div",{className:(0,l.cn)("flex flex-col items-center gap-8 md:flex-row md:gap-16",i%2==1&&"md:flex-row-reverse"),children:[(0,t.jsx)("div",{className:"w-full flex-1",children:(0,t.jsx)(o.ModelMediaFrame,{media:(0,s.atIndex)(c,i),alt:e.title,beforeLabel:g,afterLabel:x,beforeAfterAriaLabel:b})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(n.Typography,{variant:"h3",className:h?"text-[var(--text-on-light)]":"text-[var(--text-primary)]",children:e.title}),(0,t.jsx)("p",{className:(0,l.cn)("mt-4 text-title leading-7",h?"text-[var(--text-on-light-secondary)]":"text-[var(--text-secondary)]"),children:e.description}),(0,t.jsx)(r.Link,{href:u,prefetch:!1,onClick:a.scrollToTop,className:(0,l.cn)("mt-6 inline-flex items-center rounded-btn px-7 py-2 text-copy font-semibold transition-colors",h?"bg-[var(--bg-page)] text-[var(--text-primary)] hover:bg-[var(--bg-elevated)]":"bg-[var(--text-primary)] text-[var(--bg-page)] hover:bg-[var(--tint-80)]"),children:m})]})]})))})]})}])},416275,e=>{"use strict";var t=e.i(316584),l=e.i(733209),r=e.i(700292),a=e.i(136091),i=e.i(362182),s=e.i(209234);e.s(["ModelMediaFrame",0,function({media:e,alt:n,sizes:o="(max-width: 768px) 100vw, 50vw",className:c,aspectClass:d="aspect-video",priority:u=!1,armed:m=!1,beforeLabel:p,afterLabel:f,beforeAfterAriaLabel:v}){return(0,t.jsxs)("div",{className:(0,l.cn)("relative w-full overflow-hidden rounded-card bg-[var(--bg-elevated)]",c),children:[(0,t.jsx)("div",{"aria-hidden":!0,className:(0,l.cn)("w-full",d)}),(0,t.jsx)("div",{className:"absolute inset-0",children:(0,s.isBeforeAfter)(e)?p&&f&&v?(0,t.jsx)(a.BeforeAfterSlider,{beforeSrc:e.before,afterSrc:e.after,beforeAlt:n,afterAlt:n,beforeLabel:p,afterLabel:f,ariaLabel:v,priority:u,className:"absolute inset-0 size-full rounded-[inherit]"}):(0,t.jsx)(i.ResponsiveMediaImage,{src:e.after,alt:n,sizes:o,priority:u,armed:m,className:"object-cover object-center"}):(0,s.isClip)(e)?(0,t.jsx)(r.LazyVideo,{src:e.src,poster:e.poster,posterAlt:n,posterSizes:o,posterPriority:u,armed:m,className:"size-full object-cover object-center"}):(0,t.jsx)(i.ResponsiveMediaImage,{src:e,alt:n,sizes:o,priority:u,armed:m,className:"object-cover object-center"})})]})}])},944637,e=>{"use strict";var t=e.i(316584),l=e.i(603901),r=e.i(319634),a=e.i(531883),i=e.i(600778),s=e.i(178059),n=e.i(600423),o=e.i(472639),c=e.i(871244),d=e.i(366247),u=e.i(879228),m=e.i(384476),p=e.i(210518);e.s(["ModelRunWorkspace",0,function({model:e,activeRun:f,activeRunPending:v,isAuthenticated:g,activeTab:x,onTabChange:b,onRecreateTemplate:h,onRetryRun:y,onAdoptRun:_,retryingRunId:w,promo:j,className:C,primaryTab:L="templates",primaryLabel:T,primaryContent:S,tabsAriaLabel:N,historyEmpty:R,historyLoginPrompt:P,emptyTitle:M,emptyHint:k,signedInHint:A=!1,showTabs:I=!0,historyExporting:E,keepPrimaryMounted:z=!0,adoptModels:G,activeRunToolKey:B,resolveImageDownload:F,resolveVideoDownload:H,resolveModelLabel:V,resolveImageOverlay:$,resolveVideoOverlay:D}){let O=(0,l.useTranslations)("pages.templates.page"),{openAuthModal:U}=(0,s.useAuthModal)(),{user:K,isLoading:W}=(0,a.useSession)(),Z=g&&"history"===x,{pollingId:q,snapshot:Y}=(0,n.resolveRunHandoff)(f,v,i.isModelRunSettled),{runs:J,hasMore:Q,loading:X,error:ee,loadMore:et,refresh:el}=(0,d.useInfiniteGenerationHistory)(Z,q,"all","all",K?.id??null),er=(0,r.useRef)(null),ea=(0,r.useRef)(null);(0,r.useEffect)(()=>
1{if(!f)return;if(f.id!==er.current){er.current=f.id,ea.current=null,el();return}if(!(0,i.isModelRunSettled)(f))return;let e=`${f.status}:${f.error_code}`;ea.current!==e&&(ea.current=e,el())},[f,el]);let ei=(0,r.useRef)(!1),es=(0,r.useMemo)(()=>new Set(G&&G.length>0?G:[e]),[G,e]);(0,r.useEffect)(()=>{if(f||ei.current)return;let e=J.find(e=>"model"===e.source&&void 0!==e.model_run&&es.has(e.model_run.model)&&"loading"===(0,c.runCardState)(e.model_run.status));e?.model_run&&(ei.current=!0,_(e.model_run))},[f,J,es,_]);let[en,eo]=(0,r.useState)(null),[ec,ed]=(0,r.useState)(()=>new Set),eu=(0,r.useCallback)(e=>{eo(e)},[]),em=(0,r.useMemo)(()=>{if(!Y)return null;let e=J.find(e=>e.id===Y.id);return(0,u.historyItemFromModelRun)(Y,e?.tool_key??B)},[Y,J,B]),ep=(0,r.useMemo)(()=>(0,c.mergeRuns)(J,em).filter(e=>!ec.has(e.id)),[em,J,ec]),ef=(0,r.useCallback)(async e=>{ed(t=>new Set(t).add(e.id));try{await (0,u.deleteHistoryItem)(e)}catch{ed(t=>{let l=new Set(t);return l.delete(e.id),l})}},[]),ev=T??O("howto"===L?"detail.tabs.howto":"detail.tabs.templates"),eg=S??(0,t.jsx)(m.DetailTemplateGallery,{loadingLabel:O("detail.gallery.loading"),emptyLabel:O("detail.gallery.empty"),errorLabel:O("detail.gallery.error"),recreateLabel:O("detail.gallery.recreate"),modelInspiration:e,promo:j,onRecreate:h});return(0,t.jsx)(p.GeneratorWorkspace,{activeTab:x,onTabChange:b,primaryTab:L,tabsAriaLabel:N??O("detail.tabs.ariaLabel"),primaryLabel:ev,historyLabel:O("detail.tabs.history"),className:C,keepPrimaryMounted:z,showTabs:I,primary:eg,history:(0,t.jsx)("div",{ref:eu,className:"scrollbar-none flex min-h-0 flex-1 flex-col overflow-y-auto",children:(0,t.jsx)(o.GenerationHistoryList,{items:ep,loading:W&&(!M||A)||Z&&X&&0===ep.length,isAuthenticated:g,hasMore:Q,loadingMore:X&&ep.length>0,error:ee,errorLabel:O("detail.gallery.error"),scrollRoot:en,onLogin:()=>U("login"),onRetryModelRun:y,retryingRunId:w,onDeleteItem:ef,resolveImageDownload:F,resolveVideoDownload:H,resolveModelLabel:V,resolveImageOverlay:$,resolveVideoOverlay:D,onLoadMore:et,emptyTitle:M,emptyHint:k,labels:(0,c.runHistoryLabels)(O,{empty:R??O("detail.history.empty"),loginPrompt:P??O("detail.history.loginPrompt"),exporting:E})})})})}])},681672,e=>{"use strict";var t=e.i(316584),l=e.i(700292),r=e.i(919428),a=e.i(58178),i=e.i(362182);e.s(["TemplateCardMedia",0,function({template:e,sizes:s,className:n,visibilityRoot:o,active:c}){let d=(0,r.cardVideoUrl)(e);return d?(0,t.jsx)(l.LazyVideo,{src:d,poster:e.cover_url,posterAlt:e.name,posterSizes:s,className:n,visibilityRoot:o,active:c}):e.cover_url?(0,t.jsx)(i.ResponsiveMediaImage,{src:e.cover_url,alt:e.name,sizes:s,draggable:!1,className:n}):(0,t.jsx)(a.MediaPending,{})}])},384476,e=>{"use strict";let t;var l=e.i(316584),r=e.i(603901),a=e.i(319634),i=e.i(62770),s=e.i(456904),n=e.i(536298),o=e.i(647009),c=e.i(125302),d=e.i(644597),u=e.i(708092),m=e.i(180266),p=e.i(681672),f=e.i(722340),v=e.i(14734),g=e.i(920238),x=e.i(619647),b=e.i(744238),h=e.i(438984);function y({template:e,recreateLabel:t,header:r,active:a,scrollRoot:i,onOpenPreview:s,onRecreate:n}){return(0,l.jsxs)("div",{className:h.detailGalleryCardClass,style:{aspectRatio:(0,x.templateAspectRatio)(e.default_aspect)},children:[(0,l.jsx)(p.TemplateCardMedia,{template:e,sizes:h.DETAIL_GALLERY_CARD_SIZES,className:"size-full object-cover",visibilityRoot:i,active:a}),(0,l.jsx)("button",{type:"button","aria-label":e.name,onClick:()=>s(e),className:"absolute inset-0 z-10 cursor-pointer rounded-[inherit] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--tint-50)]"}),(0,l.jsx)("div",{className:(0,b.directThisMaskClass)()}),r,(0,l.jsx)("div",{className:(0,b.directThisScrimClass)()}),(0,l.jsx)("span",{className:b.directThisRevealClass,children:(0,l.jsx)(b.DirectThisButton,{label:t,onClick:t=>{t.stopPropagation(),n(e)}})})]})}function _({active:e,columnCount:t,loadingLabel:r,emptyLabel:a,errorLabel:i,recreateLabel:s,infinite:n,scrollRoot:o,renderHeader:c,onOpenPreview:d,onRecreate:m}){let{templates:p,hasMore:v,loading:b,error:h,loadMore:w}=n,j=(0,f.useInfiniteScrollSentinel)({hasMore:v,loadMore:w,active:e,scrollRoot:o,loadedCount:p.length}),C=0===p.length&&!b&&!v,L=(0,x.cappedColumnCount)(t,p.length),T=L>0?(0,x.distributeToColumns)(p,L,e=>(0,x.templateAspectRatio)(e.default_aspect)):[],S=0===p.length;return(0,l.jsxs)("div",{className:S?"flex min-h-0 flex-1 flex-col":void 0,children:[(0,l.jsx)("div",{className:g.masonryColumnsClass,children:p.length&&t>0?T.map((t,r)=>(0,l.jsx)("div",{className:g.masonryColumnClass,children:t.map(t=>(0,l.jsx)(y,{template:t,recreateLabel:s,header:c?.(t),active:e,scrollRoot:o,onOpenPreview:d,onRecreate:m},t.id))},r)):null}),C?(0,l.jsx)("p",{className:"flex flex-1 items-center justify-center py-12 text-center text-caption text-[var(--text-tertiary)]",children:a}
1):null,v?(0,l.jsx)("div",{ref:j,"aria-hidden":!0,className:"h-px w-full"}):null,b?(0,l.jsx)("p",{"aria-live":"polite",className:S?"flex flex-1 items-center justify-center text-center text-caption text-[var(--text-tertiary)]":"py-4 text-center text-caption text-[var(--text-tertiary)]",children:r}):null,h&&!b?S?(0,l.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,l.jsx)("button",{type:"button",onClick:w,className:u.listRetryButtonClass,children:i})}):(0,l.jsx)("button",{type:"button",onClick:w,className:u.listRetryButtonClass,children:i}):null]})}let w=(0,a.memo)(function({category:e,active:t,columnCount:r,loadingLabel:a,emptyLabel:i,errorLabel:s,recreateLabel:n,templates:o,scrollRoot:c,onOpenPreview:d,onRecreate:u}){let p=(0,m.useInfiniteTemplates)(e,void 0!==o?{templates:[...o],total:o.length}:void 0);return(0,l.jsx)(_,{active:t,columnCount:r,loadingLabel:a,emptyLabel:i,errorLabel:s,recreateLabel:n,infinite:p,scrollRoot:c,onOpenPreview:d,onRecreate:u})}),j=(0,a.memo)(function({model:e,active:t,columnCount:r,loadingLabel:a,emptyLabel:i,errorLabel:s,recreateLabel:n,scrollRoot:o,onOpenPreview:c,onRecreate:d}){let u=(0,v.useInfiniteModelTemplates)(e);return(0,l.jsx)(_,{active:t,columnCount:r,loadingLabel:a,emptyLabel:i,errorLabel:s,recreateLabel:n,infinite:u,scrollRoot:o,onOpenPreview:c,onRecreate:d})}),C="__all__",L=(t=null,{get:()=>t,set:e=>{t=e}});e.s(["DetailTemplateGallery",0,function({loadingLabel:e,emptyLabel:t,errorLabel:u,recreateLabel:m,initialCategory:p,allLabel:f,onRecreate:v,templates:g,modelInspiration:x,promo:b}){let y=(0,s.useRouter)(),_=(0,r.useTranslations)("pages.templates.page"),T=(0,n.useTemplateCategoryLinks)(),S=void 0!==g,N=S?[{slug:C,label:f??_("seeAll")}]:f?[{slug:C,label:f},...T]:T,[R,P]=(0,a.useState)(()=>{if(S||f||x)return C;let e=L.get();return e||(p??null)}),[M,k]=(0,a.useState)(null),[A,I]=(0,a.useState)(null),[E,z]=(0,d.useResponsiveColumnCount)(),G=(0,a.useCallback)(e=>{I(e),z(e)},[z]),B=null!=R&&N.some(e=>e.slug===R)?R:N[0]?.slug??null,F=(0,a.useCallback)(e=>{(k(null),v)?v(e):y.replace(i.paths.templates.detail(e.slug))},[v,y]);return x?(0,l.jsxs)("section",{className:h.detailGalleryClass,children:[(0,l.jsxs)("div",{ref:G,className:h.detailGalleryScrollClass,children:[b?(0,l.jsx)("div",{className:"mb-3 shrink-0",children:b}):null,(0,l.jsx)(j,{model:x,active:!0,columnCount:E,loadingLabel:e,emptyLabel:t,errorLabel:u,recreateLabel:m,scrollRoot:A,onOpenPreview:k,onRecreate:F})]}),(0,l.jsx)(c.TemplatePreviewModal,{template:M,onClose:()=>k(null),onRecreate:F})]}):N.length&&B?(0,l.jsxs)("section",{className:h.detailGalleryClass,children:[S?null:(0,l.jsx)("div",{className:h.detailGalleryPillsClass,children:N.map(e=>(0,l.jsx)("button",{type:"button","aria-pressed":B===e.slug,onClick:()=>{var t;(t=e.slug)!==B&&(f||L.set(t),P(t),A?.scrollTo({top:0}))},className:(0,o.categoryPillClass)(B===e.slug),children:e.label},e.slug))}),(0,l.jsxs)("div",{ref:G,className:h.detailGalleryScrollClass,children:[b?(0,l.jsx)("div",{className:"mb-3 shrink-0",children:b}):null,N.map(r=>{let a=B===r.slug;return(0,l.jsx)("div",{className:a?h.detailGalleryCategoryActiveClass:h.detailGalleryCategoryInactiveClass,"aria-hidden":!a,children:(0,l.jsx)(w,{category:r.slug===C?void 0:r.slug,active:a,columnCount:E,loadingLabel:e,emptyLabel:t,errorLabel:u,recreateLabel:m,templates:r.slug===C?g:void 0,scrollRoot:A,onOpenPreview:k,onRecreate:F})},r.slug)})]}),(0,l.jsx)(c.TemplatePreviewModal,{template:M,onClose:()=>k(null),onRecreate:F})]}):null}],384476)},189264,509471,e=>{"use strict";var t=e.i(316584),l=e.i(319634),r=e.i(733209);let a="relative flex w-full gap-0 rounded-full border border-[var(--border-subtle)] bg-[var(--bg-hover)] p-1";function i(e){return(0,r.cn)("relative z-10 flex flex-1 cursor-pointer items-center justify-center gap-0 overflow-hidden rounded-full transition-[color,text-shadow] duration-200",e?"text-[var(--text-primary)]":"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]")}let s="pointer-events-none absolute z-0 overflow-hidden rounded-full mobile-view-tab-glow mobile-view-tab-slide",n="pointer-events-none absolute inset-0 rounded-[inherit] mobile-view-tab-ring",o="relative flex h-8 min-w-0 items-center justify-center gap-1.5 rounded-full px-4 font-normal text-caption",c="min-w-0 truncate";e.s(["formErrorAlertClass",0,"mb-3 rounded-tile border border-[var(--color-error-border)] bg-[var(--color-error-surface)] px-3 py-2 text-copy text-[var(--color-error-strong)]","formPollStatusClass",0,"mb-3 rounded-tile border border-[var(--color-warning-border)] bg-[var(--color-warning-surface)] px-3 py-2 text-copy text-[var(--color-warning)]","generatorFormScrollClass",0,"scrollbar-none min-h-0 flex-1 space-y-4 lg:
1overscroll-contain","materialsSectionLabelClass",0,"text-caption font-medium text-[var(--color-font-secondary)]","mobileViewTabClassName",0,i,"mobileViewTabGlowClass",0,s,"mobileViewTabLabelClass",0,o,"mobileViewTabRingClass",0,n,"mobileViewTabTextClass",0,c,"mobileViewTrackClass",0,a,"qualityHintCtaClass",0,"ml-1 font-semibold text-[var(--brand-pink-text)] underline-offset-2 hover:underline","qualityHintMobileClass",0,"text-caption leading-5 text-[var(--text-tertiary)]","qualityHintTooltipBodyClass",0,"font-sans text-copy font-normal leading-5 text-[var(--text-secondary)]","qualityInfoTriggerClass",0,"size-4 shrink-0 text-[var(--text-primary)] data-[hovered]:bg-[var(--tint-10)]","watermarkCtaClass",0,"cursor-pointer font-semibold text-[var(--brand-pink-text)] underline-offset-2 transition-colors hover:underline","watermarkNoteClass",0,"mt-3 text-center text-caption leading-5 text-[var(--text-tertiary)]"],509471),e.s(["MobileViewTabs",0,function({value:e,createLabel:r,historyLabel:d,onChange:u}){let m=[["create",r],["history",d]],p=(0,l.useRef)(null),f=(0,l.useRef)({}),[v,g]=(0,l.useState)(null);return(0,l.useLayoutEffect)(()=>{let t=p.current,l=f.current[e];if(!t||!l)return;let r=()=>{g({x:l.offsetLeft,y:l.offsetTop,w:l.offsetWidth,h:l.offsetHeight})};r();let a=new ResizeObserver(r);return a.observe(t),a.observe(l),()=>a.disconnect()},[e,r,d]),(0,t.jsx)("div",{className:"mb-3 lg:hidden",children:(0,t.jsxs)("div",{ref:p,className:a,children:[v?(0,t.jsx)("span",{"aria-hidden":!0,className:s,style:{width:v.w,height:v.h,transform:`translate(${v.x}px, ${v.y}px)`},children:(0,t.jsx)("span",{className:n})}):null,m.map(([l,r])=>{let a=e===l;return(0,t.jsx)("button",{ref:e=>{f.current[l]=e},type:"button","aria-pressed":a,onClick:()=>u(l),className:i(a),children:(0,t.jsx)("span",{className:o,children:(0,t.jsx)("span",{className:c,children:r})})},l)})]})})}],189264)},125302,e=>{"use strict";var t=e.i(316584),l=e.i(319634),r=e.i(603901),a=e.i(303893),i=e.i(418847),s=e.i(58178),n=e.i(331344),o=e.i(111177),c=e.i(619647),d=e.i(804918),u=e.i(821260);e.i(800785);var m=e.i(96472),p=e.i(740457),f=e.i(574930),v=e.i(441816);e.s(["TemplatePreviewModal",0,function({template:e,onClose:g,onRecreate:x}){let b=(0,r.useTranslations)("pages.templates.page"),h=(0,r.useTranslations)("features.composer.songSegment"),y=(0,r.useTranslations)("a11y"),_=(0,a.useToast)(),w=e&&(0,u.isModelInspirationTemplate)(e)?e:null,[j,C]=(0,l.useState)(null),L=(0,o.useSoundToggle)({defaultOn:!0,resetKey:e?.id??null,persist:!0}),T=w||!e?"":e.sample_music_url?.trim()||"",S=(0,i.useAudioPeaks)(T||null,p.SELECTED_AUDIO_WAVE_BARS);if(!e)return null;let N=j?.templateId===e.id?j.ratio:(0,c.templateAspectRatio)(e.default_aspect),R=(e.identity_image_urls??[]).filter(Boolean).length?(e.identity_image_urls??[]).filter(Boolean):e.reference_image_url?[e.reference_image_url]:[],P=e.seo_content?.generator?.intro||e.seo_content?.hero?.tagline||e.tagline,M=w?.tagline?.trim()||"",k=w?[(0,n.modelLabelForId)(w.model_id),"number"==typeof w.duration_sec&&w.duration_sec>0?`${w.duration_sec}s`:null,w.default_aspect||null].filter(e=>!!e):[];return(0,t.jsxs)(f.PreviewModalShell,{ariaLabel:w?b("detail.preview.inspirationTitle"):e.name,onClose:g,children:[(0,t.jsx)(f.PreviewStage,{ratio:N,children:e.example_video_url?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.PreviewVideo,{src:e.example_video_url,poster:e.cover_url,mediaKey:e.id,mediaRef:L.mediaRef,muted:!L.unmuted,onRatio:t=>C({templateId:e.id,ratio:t})}),(0,t.jsx)(d.MediaMuteButton,{unmuted:L.unmuted,onToggle:L.toggle,muteLabel:y("mute"),unmuteLabel:y("unmute"),placement:"controls-safe"})]}):e.cover_url?(0,t.jsx)("img",{src:e.cover_url,alt:e.name,className:"absolute inset-0 block size-full object-contain lg:rounded-panel"}):(0,t.jsx)(s.MediaPending,{})}),(0,t.jsx)(f.PreviewPanel,{title:w?b("detail.preview.inspirationTitle"):e.name,subtitle:w?b("detail.preview.inspirationSubtitle"):void 0,footer:(0,t.jsx)("div",{className:v.previewPanelFooterClass,children:(0,t.jsx)(m.ToolButton,{onClick:()=>x(e),"data-testid":"template-preview-recreate",children:b("detail.gallery.recreate")})}),children:w?(0,t.jsxs)(t.Fragment,{children:[M?(0,t.jsx)(f.PreviewPromptBlock,{prompt:M,onCopied:()=>_.success(b("detail.preview.copied")),labels:{promptLabel:b("detail.preview.promptLabel"),seeMoreLabel:b("detail.preview.seeMore"),seeLessLabel:b("detail.preview.seeLess"),copyLabel:b("detail.preview.copyPrompt"),copiedLabel:b("detail.preview.copied")}},e.id):null,R.length?(0,t.jsx)(f.PreviewSection,{label:b("detail.preview.referencesLabel"),children:(0,t.jsx)(f.PreviewThumbs,{urls:R,altPrefix:y("referenceImage"),thumbClassName:v.previewInspirationThumbClass})}):null,k.length?(0,t.jsx)(f.PreviewSection,{label:b("detail.preview.settingsLabel"),children:(0,t.jsx)(f.PreviewSettingsChips,{chips:k})}):null]}):(0,t.jsxs)(t.Fragment,{children:[P?(0,t.jsx)(f.PreviewSection,{label:b("detail.preview.descriptionLabel"),children:(0,t.jsx)("p",{className:"text-copy leading-relaxed text-[var(--text-secondary)]",children:P})}):null,R.length?(0,t.jsx)(f.PreviewSection,{label:b("detail.preview.referenceLabel"),children:(0,t.jsx)(f.PreviewThumbs,{urls:R,altPrefix:y("referenceImage"),thumbClassName:"size-20 overflow-hidden rounded-tile border border-[var(--border-subtle)] bg-[var(--bg-elevated)]"})}):null,T?(0,t.jsx)(f.PreviewSection,{label:b("detail.preview.musicLabel"),children:(0,t.jsx)(p.SelectedAudio,{source:T,name:e.name,peaks:S,playLabel:h("play"),pauseL
1abel:h("pause")})}):null]})})]})}],125302)},644597,438984,e=>{"use strict";var t=e.i(319634),l=e.i(619647);e.s(["useResponsiveColumnCount",0,function(e=3){let[r,a]=(0,t.useState)(0),i=(0,t.useRef)(null),s=(0,t.useCallback)(t=>{if(i.current?.disconnect(),!t){i.current=null;return}let r=t=>{t<=0||a(r=>{let a=(0,l.columnCountForWidth)(t,e);return r===a?r:a})};r(t.clientWidth);let s=new ResizeObserver(e=>{r(e[0]?.contentRect.width??t.clientWidth)});s.observe(t),i.current=s},[e]);return(0,t.useEffect)(()=>()=>i.current?.disconnect(),[]),[r,s]}],644597);var r=e.i(733209),a=e.i(647009);let i=(0,r.cn)(a.categoryPillsBarClass,"shrink-0 pb-1 lg:flex-wrap lg:overflow-visible"),s=(0,r.cn)("@container/tile group relative w-full min-w-0 cursor-pointer overflow-hidden rounded-tile","bg-[var(--bg-elevated)] transition-transform duration-150","hover:scale-[1.01] active:scale-[0.99]");e.s(["DETAIL_GALLERY_CARD_SIZES",0,"(max-width: 768px) 50vw, 33vw","detailGalleryCardClass",0,s,"detailGalleryCategoryActiveClass",0,"flex min-h-0 flex-1 flex-col","detailGalleryCategoryInactiveClass",0,"pointer-events-none invisible absolute inset-0 overflow-hidden","detailGalleryClass",0,"flex min-h-0 flex-1 flex-col gap-3","detailGalleryPillsClass",0,i,"detailGalleryScrollClass",0,"relative scrollbar-none flex min-h-0 flex-1 flex-col overflow-y-auto pb-20"],438984)},802533,e=>{"use strict";var t=e.i(316584),l=e.i(733209);let r={soft:"bg-[var(--bg-muted)] text-[var(--text-body)]",solid:"bg-[var(--brand-pink)] text-[var(--brand-on-fill)]",overlay:"bg-[var(--scrim-45)] text-[var(--text-primary)] backdrop-blur-[2px]","brand-soft":"bg-[var(--brand-pink-soft)] text-[var(--brand-pink-text)]"},a={xs:"gap-1 px-1.5 py-0.5 text-micro font-semibold leading-[12px]",sm:"h-6 gap-1.5 px-2.5 text-caption",md:"gap-2 px-4 py-1.5 text-footnote"},i={pill:"rounded-full",rounded:"rounded-btn",tag:"rounded-xs"};function s({variant:e="soft",size:n="md",shape:o="pill",dot:c=!1,dotClassName:d,className:u,children:m}){return(0,t.jsxs)("span",{className:(0,l.cn)("inline-flex items-center justify-center font-medium leading-none",r[e],a[n],i[o],u),children:[c&&(0,t.jsx)("span",{className:(0,l.cn)("h-2 w-2 rounded-full bg-[var(--text-primary)]",d)}),m]})}e.i(254379);var n=e.i(899587);e.s(["ProBadge",0,function({className:e,placement:r="inline"}){return(0,t.jsxs)(s,{variant:"brand-soft",size:"xs",shape:"tag",className:(0,l.cn)("uppercase","corner"===r&&"pointer-events-none absolute right-1 top-1 z-10 shadow-sm",e),children:[(0,t.jsx)(n.LockIcon,{className:"size-3 shrink-0"}),"Pro"]})}],802533)},821260,e=>{"use strict";function t(e){switch(e){case"start_frame":return"first_frame";case"end_frame":return"last_frame";default:return e}}function l(e){return Array.isArray(e.inspiration_input_images)||!!e.generation_mode||(e.tags?.includes("inspiration")??!1)}e.s(["inspirationPrefill",0,function(e){let r=l(e)?e:null,a=(r?.inspiration_input_images??[]).map(e=>({...e,role:t(e.role)}));return{prompt:e.tagline?.trim()??"",aspect:e.default_aspect,seconds:"number"==typeof e.duration_sec?e.duration_sec:void 0,mode:r?.generation_mode,firstFrameUrl:a.find(e=>"first_frame"===e.role)?.url,lastFrameUrl:a.find(e=>"last_frame"===e.role)?.url,referenceImageUrls:a.filter(e=>"reference"===e.role).map(e=>e.url).filter(Boolean)}},"isModelInspirationTemplate",0,l,"normalizeInputImageRole",0,t])},145517,e=>{"use strict";e.s(["submitBodyFromModelRun",0,function(e,t){let l={model:e.model,mode:e.mode,prompt:e.prompt||void 0,resolution:e.resolution||void 0};return t?.sourceToolKey&&(l.source_tool_key=t.sourceToolKey,l.retry_of_run_id=e.id),!e.first_frame_url&&e.aspect&&(l.aspect=e.aspect),e.seconds>0&&(l.seconds=e.seconds),e.first_frame_url&&(l.first_frame_url=e.first_frame_url),e.last_frame_url&&(l.last_frame_url=e.last_frame_url),e.reference_image_urls?.length&&(l.reference_image_urls=e.reference_image_urls),"video_edit"===e.mode&&e.reference_video_url?l.reference_video_url=e.reference_video_url:e.reference_video_urls?.length?l.reference_video_urls=e.reference_video_urls:e.reference_video_url&&(l.reference_video_urls=[e.reference_video_url]),e.reference_audio_urls?.length&&(l.reference_audio_urls=e.reference_audio_urls),e.generate_audio&&(l.generate_audio=!0),l}])},14734,e=>{"use strict";var t=e.i(319634),l=e.i(715760),r=e.i(135591),a=e.i(919428),i=e.i(8212
160);let s={"minimax-h3":"seedance-2-0","wan-3-0":"seedance-2-0","gpt-image-2-5":"gpt-image-2","gpt-image-2-5-flare":"gpt-image-2","gpt-image-2-5-sunburst":"gpt-image-2"},n="2026-07-29T00:00:00.000Z";function o(e){let t="video"===e.output_kind,l=e.output_urls?.[0],r=(e.input_images??[]).filter(e=>e.url).map(e=>({...e,role:(0,i.normalizeInputImageRole)(e.role)})),a=r.map(e=>e.url),s=t?"720p":"2k";return{id:e.id,slug:e.id,status:"published",name:function(e){let t=e.split("-").filter(Boolean);if(t.length>=2&&/^\d+$/.test(t[t.length-1]??"")){let e=t[t.length-1],l=t.slice(0,-1).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return`${l} ${e}`}return e}(e.id),tagline:e.prompt,cover_url:e.cover_url||(t?void 0:l),example_video_url:t?l:void 0,example_video_preview_url:t?e.output_preview_url:void 0,reference_image_url:a[0],identity_image_urls:a,default_aspect:e.aspect||"16:9",allowed_aspects:e.aspect?[e.aspect]:["16:9"],default_resolution:s,allowed_resolutions:[s],image_usage:r.length>0?"reference":"optional",tags:["inspiration",e.model,String(e.mode)],model_id:e.model,duration_sec:e.seconds,user_json:e.user_json,current_version:1,created_at:n,updated_at:n,generation_mode:e.mode,inspiration_input_images:r}}async function c(e,t,r=a.TEMPLATES_BATCH_SIZE){var i;let n,d=new URLSearchParams({model:s[e]??e,page:String(t),limit:String(r)});return i=await (0,l.apiGet)(`/api/model-templates?${d.toString()}`),n=function(e){if(e&&"object"==typeof e){if("templates"in e&&Array.isArray(e.templates))return e;if("data"in e&&e.data&&"object"==typeof e.data&&Array.isArray(e.data.templates))return e.data}}(i),{templates:(n?.templates??[]).map(o),total:n?.total??0,page:n?.page??t,totalPages:n?.total_pages??0}}e.s(["useInfiniteModelTemplates",0,function(e,i=!0){let s=(0,t.useCallback)(async t=>{let l=await c(e,t);return{items:l.templates,total:l.total,totalPages:l.totalPages}},[e]),n=(0,l.currentClientLocale)(),o=(0,r.useInfinitePagedList)({cacheKey:e?`models:${n}:${e}`:"",enabled:i&&!!e,batchSize:a.TEMPLATES_BATCH_SIZE,fetchBatch:s});return{templates:o.items,hasMore:o.hasMore,loading:o.loading,error:o.error,loadMore:o.loadMore}}],14734)},161924,e=>{"use strict";var t=e.i(824593);e.s(["scrollToTop",0,function(e){e?.preventDefault();let l=(0,t.queryAppScrollColumn)();l?l.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"})}])},180266,e=>{"use strict";var t=e.i(319634),l=e.i(715760),r=e.i(135591),a=e.i(919428);async function i(e,t){let r=new URLSearchParams({page:String(t),limit:String(a.TEMPLATES_BATCH_SIZE)});e&&r.set("category",e);let i=await (0,l.apiGet)(`/api/templates?${r.toString()}`),s=i?.data;return{items:s?.templates??[],total:s?.total??0,totalPages:s?.total_pages??0}}e.s(["useInfiniteTemplates",0,function(e,s){let n=(0,l.currentClientLocale)(),o=(0,t.useCallback)(t=>i(e,t),[e]),c=(0,r.useInfinitePagedList)({cacheKey:`templates:${n}:${e??"__all__"}`,batchSize:a.TEMPLATES_BATCH_SIZE,ttlMs:3e5,initial:s?{items:s.templates,total:s.total}:void 0,fetchBatch:o});return{templates:c.items,hasMore:c.hasMore,loading:c.loading,error:c.error,loadMore:c.loadMore}}])}]);
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.