1import{j as e}from"./vendor-core.6lta8LCj.js";import{B as n,R as c,dR as k,k as f,j as v,J as w,S as y,cC as b,as as u,au as x,at as g,L as E,aO as j,H as _,dM as N,bc as O}from"./bootstrap.Yl9dpo2n.js";import{C as T}from"./CustomVoiceCapacityBanner.C3oJVB8X.js";import{c as V}from"./voices.4R5uC5ue.js";import{x as C,y as s,s as D}from"./vendor-mui-x.CmnfcHjQ.js";import{m as P}from"./vendor-framer-motion.CZgi-nAu.js";import{L as A}from"./App.DVmysEmP.js";import"./vendor-firebase.dbYXL2Q0.js";import"./capacityBannerUtils.hd491eqT.js";import"./useQueries.AyQcqfc2.js";const R=D(P.button)(({theme:o,disabled:t})=>({width:"100%",maxWidth:"100%",[o.breakpoints.up("sm")]:{maxWidth:"22rem"},minWidth:0,minHeight:"12.375rem",display:"flex",borderRadius:c.md,flexDirection:"column",alignItems:"stretch",overflow:"hidden",padding:0,textAlign:"left",cursor:t?"not-allowed":"pointer",backgroundColor:o.palette.background.surface.main,border:"none",transition:"background-color 0.5s ease",...k(o,!0),...t?{}:{"&:hover .selection-card-title":{backgroundColor:o.palette.background.surface.light}}})),h=({onClick:o,title:t,description:l,tag:i,backgroundImage:r,imagePosition:d,imageOverlay:p,accentColor:m,delay:I=0,disabled:a=!1,disabledTooltip:S})=>e.jsxs(R,{onClick:a?void 0:o,disabled:a,"aria-disabled":a,title:a?S:void 0,initial:{opacity:0,y:"2rem"},animate:{opacity:a?.45:1,y:0},transition:{duration:.3,delay:I},children:[r&&e.jsx(n,{component:"div","aria-hidden":!0,sx:{mt:"0.75rem",mx:"0.75rem",height:"2.5rem",borderRadius:c.md,backgroundImage:p?`${p}, url(${r})`:`url(${r})`,backgroundSize:"cover",backgroundPosition:d!=null?d:"center",boxShadow:p?L=>`inset 0 0 0 1px ${C(m!=null?m:L.palette.text.accent,.33)}`:void 0,flexShrink:0}}),e.jsxs(n,{component:"div",sx:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"flex-start",padding:"1.5rem"},children:[e.jsxs(s,{variant:"display3",component:"h4",className:"selection-card-title",sx:{display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.375rem 0.5rem",margin:"-0.375rem -0.5rem",borderRadius:c.md,transition:"background-color 0.1s ease"},children:[t,i&&e.jsx(s,{variant:"badge",component:"span",sx:{color:"text.disabled",padding:"0.25rem 0.5rem",borderRadius:c.sm,border:"1px solid",borderColor:"divider"},children:i})]}),e.jsx(s,{variant:"body2",align:"left",sx:{marginTop:"auto",color:"text.secondary"},children:l})]})]}),G="https://static.inworld.ai/0addc7b7/images/product-bg-design.jpg",B="https://static.inworld.ai/0addc7b7/images/product-bg-clone.jpg",W="https://static.inworld.ai/0addc7b7/images/product-bg-clone.jpg",F=b.violet,H=b.green,$=b.blue,M=`linear-gradient(90deg, ${C(j.blue[700],.46)}, ${C(j.blue[900],.34)})`,U=()=>typeof window!="undefined"&&window.location.hostname==="localhost"&&window.localStorage.getItem("studio.force-pvc-voice-cloning")==="true",z=({workspace:o})=>{const t=f(v.STUDIO_TVD_V1),l=f(v.STUDIO_PVC_VOICE_CLONING)||U(),i=w(),{atOrOverLimit:r}=V(o);return e.jsx(n,{component:"div",sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",px:{xs:0,sm:3}},children:e.jsxs(y,{direction:"column",spacing:"2rem",sx:{mb:"10%",width:"100%",maxWidth:"68rem"},children:[e.jsxs(y,{direction:{xs:"column",lg:"row"},spacing:"1rem",sx:{justifyContent:"center",alignItems:{xs:"center",lg:"stretch"}},children:[t&&e.jsx(h,{onClick:()=>{u(g.SELECTED_DESIGN,x.TextVoiceDesign),i("./design-voice")},title:"Voice Design",description:"Describe the voice you want in a short text prompt. Best for creative use cases.",backgroundImage:G,accentColor:F,disabled:r,disabledTooltip:"Voice capacity reached. Please upgrade your plan to create more voices."}),e.jsx(h,{onClick:()=>{u(g.SELECTED_CLONE_WITH_AUDIO,x.InstantVoiceClone),i("./clone-voice")},title:"Instant Voice Clone",description:"Create a voice from a short audio clip. Best for everyday use cases.",backgroundImage:B,accentColor:H,delay:t?.1:0,disabled:r,disabledTooltip:"Voice capacity reached. Please upgrade your plan to create more voices."}),l&&e.jsx(h,{onClick:()=>{u(g.SELECTED_PROFESSIONAL_CLONE,x.ProfessionalVoiceClone),i("./pvc-voice")},title:"Professional Voice Clone",tag:"Beta",description:"Create a voice from 10+ minutes of audio. Best for production use cases.",backgroundImage:W,imageOverlay:M,imagePosition:"center 60%",accentColor:$,delay:t?.2:.1,disabled:r,disabledTooltip:"Voice capacity reached. Please upgrade your plan to create more voices."})]}),e.jsxs(s,{variant:"body2",sx:{color:"text.secondary",textAlign:"center"},children:["Learn more about"," ",t&&e.jsxs(e.Fragment,{children:[e.jsx(E,{href:"https://docs.inworld.ai/tts/voice-design",target:"_blank",rel:"noopener noreferrer","aria-label":"Learn more about voice design",children:"voice design"})," ","and"," "]}),e.jsx(E,{href:"https://docs.inworld.ai/tts/voice-cloning",target:"_blank",rel:"noopener noreferrer","aria-label":"Learn more about voice cloning",children:"voice cloning"}
1)," ","in our docs."]})]})})},J=()=>{const{workspace:o}=_();return e.jsx(A,{EnhancedPageHeaderProps:{sx:{"& .page-header-column:first-child":{width:"unset"},[O.breakpoints.only("sm")]:{"& > div":{flexDirection:"row"},"& .page-header-column:last-child":{justifyContent:"flex-end"}},[O.breakpoints.only("xs")]:{"& > div":{flexDirection:"row","& .page-header-column:first-child":{justifyContent:"flex-start"},"& .page-header-column:last-child":{justifyContent:"flex-end"}}}},breadcrumbs:[{label:"Voices",href:`/workspaces/${o}/voice-library`},{label:"Create Voice"}]},disablePadding:!0,customWrapperSX:{paddingTop:0},children:e.jsxs(n,{component:"div",sx:{maxWidth:N.page,mx:"auto",width:"100%",minWidth:0,pt:2,px:2},children:[e.jsx(n,{sx:{mb:2},children:e.jsx(T,{workspace:o})}),e.jsx(z,{workspace:o})]})})},ie=()=>{const{workspace:o}=_();return e.jsx(e.Fragment,{children:o?e.jsx(J,{},o):e.jsx(n,{component:"div",sx:{p:4},children:e.jsx(s,{variant:"body1",sx:{color:"text.secondary"},children:"Please select a workspace to continue"})})})};export{ie as VoiceCreatePage};
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.