PageSourceSearch

https://aimusicmaker.ai/_nuxt/0zZ0cgl9.js

js aimusicmaker.ai collected 2026-10-05 11:48:14 UTC 13,368 bytes, 1 lines download raw bytes

1import{H as O,r as C,x as j,I as W,w as Y,c as p,o as m,a as r,g as f,h as I,t as D,A as Q,l as B,i as l,F as R,m as $,a2 as X,d as A,u as Z,v as ee,B as U,C as P,L as te,$ as ae}from"./BSJFzukh.js";import{i as le,a as se,b as oe}from"./shwpW3iw.js";import{u as re}from"./E4Ugchr-.js";import{u as ne}from"./oRbayznc.js";import{B as N,a as H}from"./CjkeNEID.js";const ie={class:"flex cursor-pointer items-center justify-between p-[12px] transition-colors"},ue={class:"flex items-center gap-2"},de={key:0,class:"tag-options h-[240px] overflow-y-scroll"},ce={class:"flex items-center gap-2"},pe={class:"text-xs font-normal text-[#A5A5A5]"},me={class:"mt-[12px] flex flex-wrap gap-[10px]"},ge=["onClick"],Be={__name:"FormStyleTags",props:O({label:{type:String,default:"Style Tags"},tagCategoriesIsGender:{type:Boolean,default:!0},customStyles:{type:{rootStyles:String,labelTagsStyles:String,tagButtonStyles:{default:String,active:String}},default:()=>({rootStyles:"mt-[-12px] rounded-lg border border-[#393B42] bg-[#26262D]",labelTagsStyles:"text-white-200",tagButtonStyles:{default:"border-[#393B42] text-[#C8C8C8] hover:bg-[#32323A]",active:"border-[#FF2478] text-[#FF2478]"}})}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(x){const S=x,g=C(!0);C("");const k=[{category:"Gender",key:"gender",tags:["male vocal","female vocal","male and female duet"],multi:!1},{category:"Genre",key:"genre",tags:["pop","indie pop","rock","classic rock","jazz","cool jazz","electronic","hip-hop","folk","traditional folk","neo folk","bluegrass","country","r&b","soul","funk","blues","reggae","alternative","ambient"],multi:!0},{category:"Moods",key:"moods",tags:["upbeat","melancholic","energetic","calm","romantic","dramatic","nostalgic","inspiring","dark","mysterious"],multi:!0},{category:"Tempo",key:"tempo",tags:["70bpm","90bpm","120bpm","140bpm"],multi:!1},{category:"Instruments",key:"instruments",tags:["acoustic guitar","electric guitar","piano","synthesizer","drums","bass","violin","saxophone","trumpet","flute","harmonica","accordion","banjo","cello","organ","keyboard"],multi:!0},{category:"Voices",key:"voices",tags:["male lead","female lead","rap","falsetto","harmony","vocal chop","vocoder","child voice","spoken word"],multi:!0}],e=S.tagCategoriesIsGender?k:k.slice(1),b=j({});e.forEach(o=>{b[o.key]=[]});const _=W(x,"modelValue"),y=C([]),G=()=>{e.forEach(o=>{b[o.key]=[]}),y.value.forEach(o=>{e.forEach(a=>{a.tags.includes(o)&&(a.multi||b[a.key].length===0)&&b[a.key].push(o)})})};Y(_,o=>{y.value=o?o.split(",").map(a=>a.trim().toLowerCase()).filter(a=>a.length>0):[],G()},{immediate:!0});const M=(o,a)=>{const u=e.find(V=>V.key===o),n=b[o],h=n.indexOf(a);h===-1?(u.multi||n.splice(0,n.length),n.push(a),w()):(n.splice(h,1),w())},w=()=>{y.value=[],e.forEach(o=>{y.value.push(...b[o.key])}),_.value=y.value.join(", ")},F=(o,a)=>y.value.includes(a);return(o,a)=>(m(),p("div",{class:I(`w-full ${S.customStyles.rootStyles}`)},[r("div",ie,[r("div",ue,[r("span",{class:I(`${S.customStyles.labelTagsStyles} font-weight-400 text-sm font-normal`)},D(x.label),3)])]),f(X,{"enter-active-class":"transition-all duration-300 ease-out","leave-active-class":"transition-all duration-300 ease-in","enter-from-class":"max-h-0 overflow-hidden","enter-to-class":"max-h-96 overflow-hidden","leave-from-class":"max-h-96 overflow-hidden","leave-to-class":"max-h-0 overflow-hidden"},{default:Q(()=>[l(g)?(m(),p("div",de,[(m(!0),p(R,null,$(l(e),(u,n)=>(m(),p("div",{key:u.key,class:I(["p-[12px]",n===0?"pt-[4px]":"pt-[0px]"])},[r("div",ce,[r("span",pe,D(u.category),1)]),r("div",me,[(m(!0),p(R,null,$(u.tags,h=>(m(),p("button",{key:h,class:I(["text-white-300 flex h-[24px] items-center justify-center rounded-[4px] border px-[8px] py-[4px] text-xs capitalize transition-colors",F(u.key,h)?x.customStyles.tagButtonStyles.active:x.customStyles.tagButtonStyles.default]),onClick:V=>M(u.key,h)},D(h),11,ge))),128))])],2))),128))])):B("",!0)]),_:1})],2))}},be={class:"relative h-[500px] w-full"},he={key:0,class:"space-y-[24px]"},ve={class:"grid grid-cols-2 gap-4"},ye={key:1,class:"space-y-[24px]"},fe={class:"space-y-2"},xe={class:"space-y-2"},ke={class:"grid grid-cols-2 gap-4"},we={class:"grid grid-cols-2 gap-4"}
1,Ce={class:"absolute right-[0px] bottom-[10px] flex justify-end gap-3"},Se={key:0,class:"loading loading-spinner mr-2 h-4 w-4"},Ge={__name:"FormModalAIChat",props:{modelValue:{type:String,default:""},modelModifiers:{}},emits:O(["closeModal"],["update:modelValue"]),setup(x,{emit:S}){W(x,"modelValue");const g=C("Custom"),k=j({ideaInput:""}),e=j({theme:"",keywords:"",style:"",structure:"intro-verse-chorus-verse-chorus-bridge-chorus-outro",language:"English",model:"gemini"}),b=[{value:"English",label:"English"},{value:"Deutsch",label:"Deutsch"},{value:"Türkçe",label:"Türkçe"},{value:"Italiano",label:"Italiano"},{value:"Español",label:"Español"},{value:"Français",label:"Français"},{value:"Português",label:"Português"},{value:"Nynorsk",label:"Nynorsk"},{value:"العربية",label:"العربية"},{value:"日本語",label:"日本語"},{value:"한국어",label:"한국어"},{value:"简体中文",label:"简体中文"},{value:"Russian",label:"Russian"},{value:"Hindi",label:"Hindi"},{value:"Dutch",label:"Dutch"}],_=[{value:"gemini",label:"Gemini 2.5 Pro"},{value:"chatgpt",label:"ChatGPT 4.1"},{value:"deepseek",label:"DeepSeek V3"}],y=[{value:"",label:"Auto"},{value:"pop",label:"Pop"},{value:"hip-hop",label:"Hip-Hop"},{value:"rap",label:"Rap"},{value:"rock",label:"Rock"},{value:"rnb",label:"R&B"},{value:"ballad",label:"Ballad"},{value:"trap",label:"Trap"},{value:"jazz",label:"Jazz"},{value:"country",label:"Country"},{value:"disco",label:"Disco"},{value:"funk",label:"Funk"},{value:"soul",label:"Soul"},{value:"blues",label:"Blues"},{value:"indie",label:"Indie"},{value:"kpop",label:"K-Pop"},{value:"metal",label:"Metal"},{value:"heavy-metal",label:"Heavy Metal"},{value:"summer",label:"Summer"},{value:"heartbreak",label:"Heartbreak"},{value:"drill",label:"Drill"},{value:"reggae",label:"Reggae"},{value:"gospel",label:"Gospel"},{value:"lo-fi",label:"Lo-Fi"},{value:"drake-style",label:"Drake Style"},{value:"christmas",label:"Christmas"},{value:"emo",label:"Emo"},{value:"punk",label:"Punk"},{value:"rhyming",label:"Rhyming"},{value:"gothic",label:"Gothic"},{value:"dark",label:"Dark"}],G=A(()=>[{value:"intro-verse-chorus-verse-chorus-bridge-chorus-outro",label:a("lyricsGenerator.options.structures.intro-verse-chorus-verse-chorus-bridge-chorus-outro")},{value:"binary-form",label:a("lyricsGenerator.options.structures.binary-form")},{value:"ternary-form",label:a("lyricsGenerator.options.structures.ternary-form")},{value:"progressive",label:a("lyricsGenerator.options.structures.progressive")},{value:"ballad-form",label:a("lyricsGenerator.options.structures.ballad-form")},{value:"theme-variations",label:a("lyricsGenerator.options.structures.theme-variations")},{value:"pre-chorus",label:a("lyricsGenerator.options.structures.pre-chorus")},{value:"post-chorus",label:a("lyricsGenerator.options.structures.post-chorus")},{value:"extended-bridge",label:a("lyricsGenerator.options.structures.extended-bridge")}]),M=A(()=>g.value==="Simple"?k.ideaInput.trim().length===0:!1),w=S,{locale:F,locales:o,t:a}=Z(),u=re(),n=C(!1),h=()=>{w("closeModal")},V=C(F.value),K=A(()=>o.value.find(i=>i.code===V.value)?.label),q=async()=>{if(!M.value)try{n.value=!0;let i;g.value==="Simple"?i={extraPrompt:k.ideaInput,lang:K.value,instrument:!1}:i={prompt:e.theme,keywords:e.keywords,style:e.style,structure:e.structure,lang:e.language,model:e.model,instrument:!1};const t=g.value==="Simple"?"text-to-lyrics-simple":"text-to-lyrics-custom",T=ne(t),d=await T.submitTask({params:i});if(g.value==="Custom"&&d.requestId){await J(T,d.requestId);return}const s=d?.output?.chat_response;if(!s)throw new Error("AI 响应中缺少 chat_response 数据");H.emit({lyrics:s}),w("closeModal")}catch(i){u.error(i.message||"AI生成失败,请重试"),n.value=!1}finally{g.value!=="Custom"&&(n.value=!1)}},J=async(i,t)=>{let s=0;const L=async()=>{try{await i.fetchRecords({page:1});const c=i.records.find(v=>v.task_id===t);if(c&&c.complete_at){try{let v=null;if(c.output_meta?.chat_response?v=c.output_meta.chat_response:c.output?.chat_response?v=c.output.chat_response:c.chat_response&&(v=c.chat_response),!v)throw new Error("任务完成但未找到结果数据");const E=ae(v);if(!E?.songs||!Array.isArray(E.songs)||E.songs.length===0)throw new Error("任务结果中缺少歌曲数据");H.emit(E.songs[0]),w("closeModal")}catch(v){u.error("处理结果失败:"+v.message)}finally{n.value=!1}return}s++,s<30?setTimeout(L,3e3):(u.error("任务超时,请稍后重试"),n.value=!1)}catch(c){u.error("检查任务状态失败:"+c.message),n.value=!1}};setTimeout(L,3e3)},z=i=>{V.value=i.lang};return N.on(z),ee(()=>{N.off(z)}),(i,t)=>{const T=se,d=oe;return m(),p("div",be,[l(g)==="Simple"?(m(),p("div",he,[f(T,{modelValue:l(k).ideaInput,"onUpdate:modelValue":t[0]||(t[0]=s=>l(k).ideaInput=s),textareaMaxLength:1e3,label:"Idea Input",placeholder:"Describe the lyrics you want",ideas:l(le),"ideas-text":"Ideas",buttonTextClass:"text-sm"},null,8,["modelValue","ideas"]),r("div",ve,[f(d,{modelValue:l(e).language,"onUpdate:modelValue":t[1]||(t[1]=s=>l(e).language=s),label:"Language",options:b,"disable-teleport":""},null,8,["modelValue"]),f(d,{modelValue:l(e).model,"onUpdate:modelValue":t[2]||(t[2]=s=>l(e).model=s),label:"Model",options:_,"disable-teleport":""},null,8,["modelValue"])])])):B("",!0),l(g)==="Custom"?(m(),p("div",ye,[r("div",fe,[t[9]||(t[9]=r("label",{class:"block text-sm text-[#ECECEC]"},"Theme",-1)),U(r("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>l(e).theme=s),type:"text",class:"input w-full rounded-lg border border-[#393B42] bg-[#26262D] text-sm text-[#c8c8c8] placeholder:text-[#818181] focus:border-[#ff5c87] focu
1s:outline-none",placeholder:"e.g., Love, Adventure, Dreams..."},null,512),[[P,l(e).theme]])]),r("div",xe,[t[10]||(t[10]=r("label",{class:"block text-sm text-[#ECECEC]"},"Keywords",-1)),U(r("input",{"onUpdate:modelValue":t[4]||(t[4]=s=>l(e).keywords=s),type:"text",class:"input w-full rounded-lg border border-[#393B42] bg-[#26262D] text-sm text-[#c8c8c8] placeholder:text-[#818181] focus:border-[#ff5c87] focus:outline-none",placeholder:"e.g., Love, Adventure, Dreams..."},null,512),[[P,l(e).keywords]])]),r("div",ke,[f(d,{modelValue:l(e).style,"onUpdate:modelValue":t[5]||(t[5]=s=>l(e).style=s),label:"Style",options:y,"disable-teleport":""},null,8,["modelValue"]),f(d,{modelValue:l(e).structure,"onUpdate:modelValue":t[6]||(t[6]=s=>l(e).structure=s),label:"Structure",options:l(G),"disable-teleport":""},null,8,["modelValue","options"])]),r("div",we,[f(d,{modelValue:l(e).language,"onUpdate:modelValue":t[7]||(t[7]=s=>l(e).language=s),label:"Language",options:b,"disable-teleport":""},null,8,["modelValue"]),f(d,{modelValue:l(e).model,"onUpdate:modelValue":t[8]||(t[8]=s=>l(e).model=s),label:"Model",options:_,"disable-teleport":""},null,8,["modelValue"])])])):B("",!0),r("div",Ce,[r("button",{class:"btn w-[120px] rounded-lg border border-[#ECECEC] bg-transparent text-[#ECECEC] hover:border-[#393B42] hover:bg-[#393B42]",onClick:h}," Cancel "),r("button",{class:"btn btn-primary w-[120px] rounded-lg border-none text-white",onClick:q},[l(n)?(m(),p("span",Se)):B("",!0),t[11]||(t[11]=te(" Generate ",-1))])])])}}},Me=[{id:"a8f3d2b1",album:"/example/hero/1.jpg",title:"World On Fire",audio:"/example/hero/1.mp3",plays:156700,rating:4.7,tags:"heavy guitars, distorted male vocals, rock",duration:"04:02"},{id:"c7e2f9a4",album:"/example/hero/2.jpg",title:"Forever in Your Eyes",audio:"/example/hero/2.mp3",plays:189200,rating:4.6,tags:"emotional, pop ballad, piano-driven with strings swelling in the chorus",duration:"04:02"},{id:"b5d1c6e8",album:"/example/hero/3.jpg",title:"Moonlit Waltz",audio:"/example/hero/3.mp3",plays:142800,rating:4.5,tags:"classical, romantic atmosphere, orchestral, piano-driven with sweeping strings and delicate woodwinds creating a dreamy",duration:"04:02"},{id:"e3a7b9c2",album:"/example/hero/4.jpg",title:"Moonlight Misbehaves",audio:"/example/hero/4.mp3",plays:173500,rating:4.8,tags:"swing, upright bass, brushed snare, jazz, muted trumpet, sultry, and smoky piano chords",duration:"04:02"},{id:"f2c8d1e7",album:"/example/hero/5.jpg",title:"Moonlight Drip",audio:"/example/hero/5.mp3",plays:198600,rating:4.6,tags:"with lush harmonies and a groovy bassline, warm electric piano and subtle finger snaps set the mood, sultry, r&b, smooth",duration:"04:02"},{id:"d6b3e1a9",album:"/example/hero/6.jpg",title:"Electric Dreams",audio:"/example/hero/6.mp3",plays:134200,rating:4.7,tags:"electronic, electronic pop shimmering synth pads driving beat female vocals",duration:"04:02"},{id:"a4e9c7b2",album:"/example/hero/7.jpg",title:"Backroads and Barbed Wire",audio:"/example/hero/7.mp3",plays:167800,rating:4.5,tags:"and gentle percussion to evoke a heartfelt and reflective mood, steady upright bass, country, acoustic, fingerpicked guitar leads with soft fiddle accents, melodic",duration:"04:02"},{id:"c1b8d5e3",album:"/example/hero/8.jpg",title:"The Wind Knows My Name",audio:"/example/hero/8.mp3",plays:185400,rating:4.6,tags:"folk, acoustic with fingerpicked guitar and subtle harmonica accents, melancholic",duration:"04:02"}];export{Ge as _,Be as a,Me as h};

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.