@acedatacloud/nexior 3.241.0 → 3.243.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ApiCodeButton-CGjbWl-b.js → ApiCodeButton-xPe9sQ6_.js} +1 -1
- package/dist/assets/{Auth-CPaOLKG4.js → Auth-BlRye7iF.js} +1 -1
- package/dist/assets/{BotPlaceholder-bqEkUTd_.js → BotPlaceholder-CQGS2s68.js} +1 -1
- package/dist/assets/{Callback-SJb-P18L.js → Callback-D9c3x17L.js} +1 -1
- package/dist/assets/{Console-CmX-GoCu.js → Console-ex0PZBoZ.js} +1 -1
- package/dist/assets/{Consumption-DEbxMEnB.js → Consumption-DNt5VdXh.js} +1 -1
- package/dist/assets/{Conversation-K-KtZwjJ.js → Conversation-CWF9fY3g.js} +2 -2
- package/dist/assets/{Conversation-1fUmUeC1.css → Conversation-Q9xqXsnE.css} +1 -1
- package/dist/assets/{CopyToClipboard-BoQGhjoa.js → CopyToClipboard-DvaIYmoj.js} +1 -1
- package/dist/assets/Detail-BWma4PQt.js +2 -0
- package/dist/assets/{Extra-BOkzZy5G.js → Extra-C9ndg2_p.js} +1 -1
- package/dist/assets/{FilePreview-DNp-17MG.js → FilePreview-vV-orvlO.js} +1 -1
- package/dist/assets/{Hailuo-Rpx2lDPr.js → Hailuo-DpsCPLSu.js} +1 -1
- package/dist/assets/{History-C8GKhfbG.js → History-D9NtvpHf.js} +1 -1
- package/dist/assets/{ImagePreview-wmbz1ueA.js → ImagePreview-jf7e6O9J.js} +1 -1
- package/dist/assets/{ImageWrapper-C25pmU32.js → ImageWrapper-BVJhmkEN.js} +1 -1
- package/dist/assets/{Index-t4ckK4Ik.js → Index--K5WEtBM.js} +1 -1
- package/dist/assets/{Index-C5LwAHiy.js → Index-B-SWDbew.js} +1 -1
- package/dist/assets/{Index-CC4kPslT.js → Index-B33Nahhe.js} +1 -1
- package/dist/assets/{Index-CN6hk7R-.js → Index-BSL0yNIp.js} +1 -1
- package/dist/assets/{Index-BQkQtbES.js → Index-BojKkl_i.js} +1 -1
- package/dist/assets/{Index-CVCVG1_l.js → Index-BxUZ-EGu.js} +1 -1
- package/dist/assets/{Index-sGeMwUC5.js → Index-COc8b5NB.js} +1 -1
- package/dist/assets/{Index-C1damVlo.js → Index-CViPOIpT.js} +1 -1
- package/dist/assets/{Index-CuTAmaxY.js → Index-C_p6mMll.js} +1 -1
- package/dist/assets/{Index-DBW6E347.js → Index-CcXOZ-3V.js} +1 -1
- package/dist/assets/{Index-B8bgaXSj.js → Index-CjOXXF3c.js} +1 -1
- package/dist/assets/{Index-DUpZ1MSc.js → Index-CrZBNKPe.js} +1 -1
- package/dist/assets/{Index-CpkH-1ce.js → Index-D0rPOsR2.js} +1 -1
- package/dist/assets/{Index-Btv_D_Mr.js → Index-D1lIbAUu.js} +1 -1
- package/dist/assets/{Index-DIaOgSQ2.js → Index-D34Xpe9O.js} +1 -1
- package/dist/assets/{Index-B-jQYyHd.js → Index-D5CMrh35.js} +1 -1
- package/dist/assets/{Index-BOy9hnFl.js → Index-DB5ldf9Z.js} +1 -1
- package/dist/assets/{Index-BRVNUqbS.js → Index-DQhTdemD.js} +1 -1
- package/dist/assets/{Index-CLJBEWzk.js → Index-D_bH92Aq.js} +1 -1
- package/dist/assets/{Index-BfNp_ryA.js → Index-DsQNKm0Y.js} +1 -1
- package/dist/assets/{Index-zl_34dDf.js → Index-JeC_v7X8.js} +1 -1
- package/dist/assets/{Index-l__jWAvi.js → Index-MuC3TboJ.js} +1 -1
- package/dist/assets/{Index-BCJn-pdd.js → Index-kiJ_Vfo0.js} +1 -1
- package/dist/assets/{Index-Dfe-zKbG.js → Index-lhV7j9-R.js} +1 -1
- package/dist/assets/{Index-BIyIgnpb.js → Index-wmfbcaa4.js} +1 -1
- package/dist/assets/{Invitees-B2OULIE9.js → Invitees-DGRekyql.js} +1 -1
- package/dist/assets/{List-BHHD9pLG.js → List-DsqIWdNs.js} +1 -1
- package/dist/assets/{List-CxI_Zuco.js → List-qf2_TIOH.js} +1 -1
- package/dist/assets/{List-DPtWfI4k.js → List-quiKoF9p.js} +1 -1
- package/dist/assets/{Main-SHEtyzUd.js → Main-DCeKrDT_.js} +1 -1
- package/dist/assets/{Model-BPoi_vEK.js → Model-BQFCJFZG.js} +1 -1
- package/dist/assets/{Navigator-Bs3SMKEY.js → Navigator-DmAKvXN3.js} +1 -1
- package/dist/assets/{NoTasks-CG9VkLq-.js → NoTasks-CY_Pw0kw.js} +1 -1
- package/dist/assets/{NotFound-Du62bqXn.js → NotFound-CGIOBNRO.js} +1 -1
- package/dist/assets/{Pagination-9n1kOjso.js → Pagination-CHBQob_J.js} +1 -1
- package/dist/assets/{Player.vue_vue_type_script_setup_true_lang-n6hvXr3l.js → Player.vue_vue_type_script_setup_true_lang-C-bmECpI.js} +1 -1
- package/dist/assets/{Status-BdkBUuY-.js → Status-CU4YqR9u.js} +1 -1
- package/dist/assets/{Subscribe-BoxmkTzt.js → Subscribe-BD7w5Mps.js} +1 -1
- package/dist/assets/{TabSwitcher-CTlNATDs.js → TabSwitcher-DZaDiudk.js} +1 -1
- package/dist/assets/{Tts-DnpCrfW7.js → Tts-IUjpb7An.js} +1 -1
- package/dist/assets/{VideoPlayer-B0H9r21W.js → VideoPlayer-CgfwHK9Q.js} +1 -1
- package/dist/assets/{_Uint8Array-CTJeLHwc.js → _Uint8Array-DCIeAzU_.js} +1 -1
- package/dist/assets/{_baseClone-DE-uTiCw.js → _baseClone-C3-5Zuh4.js} +1 -1
- package/dist/assets/{_baseIteratee-CgZJPoqg.js → _baseIteratee-DxCypmZy.js} +1 -1
- package/dist/assets/{_initCloneObject-iHVJom-g.js → _initCloneObject-C96qwcyN.js} +1 -1
- package/dist/assets/{add-CTyMuCvD.js → add-D8NkomwR.js} +1 -1
- package/dist/assets/{all-wallets-C5AJ7ujt.js → all-wallets-Dh-f-nuX.js} +1 -1
- package/dist/assets/{app-store-CWUOnWlf.js → app-store-C2TKmIfx.js} +1 -1
- package/dist/assets/{apple-BB7INeNe.js → apple-hYhidHsz.js} +1 -1
- package/dist/assets/{arrow-bottom-CjYeU9NQ.js → arrow-bottom-C1G4jg7d.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-DES0OncL.js → arrow-bottom-circle-CxVs-7dx.js} +1 -1
- package/dist/assets/{arrow-left-kpzOZVIw.js → arrow-left-25k-MrtE.js} +1 -1
- package/dist/assets/{arrow-right-i09i-U1o.js → arrow-right-BRWqewD9.js} +1 -1
- package/dist/assets/{arrow-top-BnFBwJkO.js → arrow-top-BEaK3cM_.js} +1 -1
- package/dist/assets/{avatar-DsRT4KRI.js → avatar-BmXeFKt7.js} +1 -1
- package/dist/assets/{bank-CnfmrA0q.js → bank-DbuCGNtE.js} +1 -1
- package/dist/assets/{basic-DbBZN2kx.js → basic-DnDYXvIl.js} +1 -1
- package/dist/assets/{browser-BRaEyzxO.js → browser-BdZSbIl2.js} +1 -1
- package/dist/assets/{byokCredential-C9lwFhrz.js → byokCredential-C5X3tdz5.js} +1 -1
- package/dist/assets/{card-IHVe_TpE.js → card-D9avZMJq.js} +1 -1
- package/dist/assets/{castArray-I_a0HlON.js → castArray-CyOElqxp.js} +1 -1
- package/dist/assets/chat-BFvmXnGq.js +1 -0
- package/dist/assets/chat-BJ1O-acr.js +1 -0
- package/dist/assets/chat-BVnywm8V.js +1 -0
- package/dist/assets/chat-Bg5nzR2s.js +1 -0
- package/dist/assets/chat-Bi9bSam4.js +1 -0
- package/dist/assets/chat-BiKeApIc.js +1 -0
- package/dist/assets/chat-C6a-XWNv.js +1 -0
- package/dist/assets/{chat-DIRPa7Ss.js → chat-CA6NEkSn.js} +1 -1
- package/dist/assets/chat-CcBdBoIQ.js +1 -0
- package/dist/assets/chat-DA19T0N-.js +1 -0
- package/dist/assets/chat-DDwlXTRr.js +1 -0
- package/dist/assets/chat-D_ldAckE.js +1 -0
- package/dist/assets/chat-Dh1tEg2g.js +1 -0
- package/dist/assets/chat-DktNImx9.js +1 -0
- package/dist/assets/chat-J4Z-vAUt.js +1 -0
- package/dist/assets/chat-UZtzKTY5.js +1 -0
- package/dist/assets/chat-VonUfVbJ.js +1 -0
- package/dist/assets/chat-mrd8Uqt-.js +1 -0
- package/dist/assets/chat-n5ursQ4V.js +1 -0
- package/dist/assets/{checkmark-CTwO_XbK.js → checkmark-BVl1xYwm.js} +1 -1
- package/dist/assets/{checkmark-bold-CZS6htML.js → checkmark-bold-CsLfglnh.js} +1 -1
- package/dist/assets/{chevron-bottom-DsP8_IK7.js → chevron-bottom-DrNy2ggs.js} +1 -1
- package/dist/assets/{chevron-left-BqEL83u5.js → chevron-left-5o6_Co3z.js} +1 -1
- package/dist/assets/{chevron-right-BVyMiPa6.js → chevron-right-BX8kPArK.js} +1 -1
- package/dist/assets/{chevron-top-DWA_RdfQ.js → chevron-top-J1uejZ2K.js} +1 -1
- package/dist/assets/{chrome-store-BPCVx-ao.js → chrome-store-ieAKwTiN.js} +1 -1
- package/dist/assets/{clock-CZZYwUgO.js → clock-ksd6p7mT.js} +1 -1
- package/dist/assets/{close-CsPzt0Rj.js → close-YPzUsqee.js} +1 -1
- package/dist/assets/{coinPlaceholder-DUxE1ca1.js → coinPlaceholder-DHcYojdu.js} +1 -1
- package/dist/assets/{compass-Vbwav4s5.js → compass-DdCdrsJw.js} +1 -1
- package/dist/assets/{copy-CPLIcNg1.js → copy-Doih6GHQ.js} +1 -1
- package/dist/assets/{createTaskActions-DoXJieh6.js → createTaskActions-DiYhIoT0.js} +1 -1
- package/dist/assets/{cursor-CounnjIP.js → cursor-D1Ad8pZB.js} +1 -1
- package/dist/assets/{cursor-transparent-LeJFXMdg.js → cursor-transparent-CrtnLHjY.js} +1 -1
- package/dist/assets/{debounce-Db4m7x7K.js → debounce-DDG4OZxW.js} +1 -1
- package/dist/assets/{desktop-BZ82oj4x.js → desktop-DMkmBX06.js} +1 -1
- package/dist/assets/{disconnect-DW_1yJnq.js → disconnect-B4EHNl_m.js} +1 -1
- package/dist/assets/{discord-NN9FA6Vx.js → discord-D-z1NDGY.js} +1 -1
- package/dist/assets/{distribution-BRqKWVAE.js → distribution-DNOqejW-.js} +1 -1
- package/dist/assets/{dropdown-DUmDoGKc.js → dropdown-BBnMof7T.js} +1 -1
- package/dist/assets/{etherscan-tU3W_j9U.js → etherscan-De3MCSTq.js} +1 -1
- package/dist/assets/{exclamation-triangle-ulNSpEPj.js → exclamation-triangle-jgL2hiyv.js} +1 -1
- package/dist/assets/{extension-NfIs8GFu.js → extension-DgL6pYiU.js} +1 -1
- package/dist/assets/{external-link-kDF6a0PL.js → external-link-C1_8BRGb.js} +1 -1
- package/dist/assets/{facebook-0nFWLmhR.js → facebook-BdD6sVsO.js} +1 -1
- package/dist/assets/{farcaster-DZ_s0wu3.js → farcaster-BqtWS_9u.js} +1 -1
- package/dist/assets/{filters-BFRnZyxn.js → filters-7UoG80gW.js} +1 -1
- package/dist/assets/{github-BJ6UaPEc.js → github-BX0VYY5w.js} +1 -1
- package/dist/assets/{google-SrkP74Eb.js → google-cfByT0nV.js} +1 -1
- package/dist/assets/{help-circle-B8nDNdnL.js → help-circle-pJvZQp1y.js} +1 -1
- package/dist/assets/{highlight-CS6HeZm4.js → highlight-CTtezPrj.js} +1 -1
- package/dist/assets/{id-C-hhaQr1.js → id-BnZF6dwi.js} +1 -1
- package/dist/assets/{image-DS0UsVKJ.js → image-DjJZPf6p.js} +1 -1
- package/dist/assets/{index-BRc35PM_.js → index-515iTcCl.js} +1 -1
- package/dist/assets/{index-CCmqkN-T.js → index-92I7iRUo.js} +1 -1
- package/dist/assets/{index-QM1OhvzN.js → index-A5xh3EPQ.js} +1 -1
- package/dist/assets/{index-XcDxI8eO.js → index-B3OoZZBD.js} +1 -1
- package/dist/assets/{index-BNcs1dpV.js → index-B4IJ3U4q.js} +1 -1
- package/dist/assets/{index-DTjBj_ab.js → index-B5qgRBwP.js} +1 -1
- package/dist/assets/{index-BtBtzHL7.js → index-BAiWZyBS.js} +1 -1
- package/dist/assets/{index-KwXBYXJy.js → index-BBJUHJgv.js} +1 -1
- package/dist/assets/{index-CnrQA-8K.js → index-BFk6Zvde.js} +1 -1
- package/dist/assets/{index-DROt2w1G.js → index-BLaYFlV3.js} +1 -1
- package/dist/assets/{index-C6T-_iY6.js → index-BUPiqKOS.js} +1 -1
- package/dist/assets/{index-DpqDw4zC.js → index-BYZC3gz3.js} +1 -1
- package/dist/assets/{index-Dp-GUEtK.js → index-BZ1kxe1C.js} +1 -1
- package/dist/assets/{index-fD5nKidQ.js → index-B_Qp6NLq.js} +1 -1
- package/dist/assets/{index-Dt9FuXqK.js → index-BbyGlSZh.js} +5 -5
- package/dist/assets/{index-CUHOZgIQ.js → index-BfCqzpOM.js} +1 -1
- package/dist/assets/{index-BhnC3jbP.js → index-Bg5LfWRK.js} +1 -1
- package/dist/assets/{index-2dYS8jp-.js → index-BhUw0KP_.js} +1 -1
- package/dist/assets/{index-DVjo3anm.js → index-Bo03HCBc.js} +1 -1
- package/dist/assets/{index-B81DSuJa.js → index-BvlslfMf.js} +1 -1
- package/dist/assets/{index-CwLUtr8g.js → index-BzCNwj3t.js} +1 -1
- package/dist/assets/{index-DyhQPBR7.js → index-C-GKLzC6.js} +1 -1
- package/dist/assets/{index-CvXUwupg.js → index-CCw5vlIN.js} +1 -1
- package/dist/assets/{index-m8Filpzw.js → index-CCyKYyhn.js} +1 -1
- package/dist/assets/{index-8scm43Mz.js → index-CELMmX9c.js} +1 -1
- package/dist/assets/{index-CeXFns-J.js → index-CMuYJE8D.js} +1 -1
- package/dist/assets/{index-DDo6JEIp.js → index-CN7xYVOL.js} +1 -1
- package/dist/assets/{index-B_uGV4g5.js → index-COmMSdwV.js} +1 -1
- package/dist/assets/{index-CZihKej9.js → index-COwMFY6r.js} +1 -1
- package/dist/assets/{index-CwcmzP6J.js → index-CRO8n_ky.js} +1 -1
- package/dist/assets/{index-Cqtc6CUA.js → index-CSK1YZGj.js} +1 -1
- package/dist/assets/{index-CQShilza.js → index-CUB5gf_6.js} +1 -1
- package/dist/assets/{index-sf9hNVlB.js → index-Cjo0O6Oj.js} +1 -1
- package/dist/assets/{index-w6sYycHR.js → index-CkhZA33X.js} +1 -1
- package/dist/assets/{index-eB56nFgb.js → index-Cpe6BjFL.js} +1 -1
- package/dist/assets/{index-D5uFNi1G.js → index-CsY_kNg8.js} +1 -1
- package/dist/assets/{index-BpKqTnfx.js → index-Cx9bwmcZ.js} +1 -1
- package/dist/assets/{index-CSQnJkA0.js → index-D3PHuAnx.js} +1 -1
- package/dist/assets/{index-8XQO5o6Y.js → index-DFWVcSFE.js} +1 -1
- package/dist/assets/{index-BlAx5Ip2.js → index-DIV4xND5.js} +1 -1
- package/dist/assets/{index-LEervI39.js → index-DJkTUY7w.js} +1 -1
- package/dist/assets/{index-_dqouIdj.js → index-DOkZQDaG.js} +1 -1
- package/dist/assets/{index-03cAEkeJ.js → index-DQYSu3nX.js} +1 -1
- package/dist/assets/{index-D1q0Wc6F.js → index-DS56be3P.js} +1 -1
- package/dist/assets/{index-CEg9nIJD.js → index-DbxZlccs.js} +14 -14
- package/dist/assets/{index-CyNDImzi.js → index-DgzKgTDT.js} +3 -3
- package/dist/assets/{index-CzhEC7ej.js → index-Dk-z-UGf.js} +1 -1
- package/dist/assets/{index-CwSXwTK7.js → index-Do5zUbHZ.js} +1 -1
- package/dist/assets/{index-Dis9vZLg.js → index-Dt7z1fO4.js} +1 -1
- package/dist/assets/{index-De5ogDBA.js → index-Dv4UHiHW.js} +1 -1
- package/dist/assets/{index-B46wAo9Q.js → index-DvqOFcer.js} +1 -1
- package/dist/assets/{index-AGJLiEdY.js → index-DwDsIA4Z.js} +1 -1
- package/dist/assets/{index-CaTQ1kNQ.js → index-DywPvS4T.js} +1 -1
- package/dist/assets/{index-DBLGphcd.js → index-EXFQCm2p.js} +1 -1
- package/dist/assets/{index-eIMMo0q0.js → index-GhfiB-Sa.js} +1 -1
- package/dist/assets/{index-kSP0Myyk.js → index-IinDqaW0.js} +1 -1
- package/dist/assets/{index-DyJlwVgm.js → index-N8ik1b1-.js} +1 -1
- package/dist/assets/{index-BaVnpibs.js → index-XlC4tFRK.js} +1 -1
- package/dist/assets/{index-DY7z61UG.js → index-j_IuQHbj.js} +1 -1
- package/dist/assets/{index-DVlsiHqU.js → index-jj0mnBQV.js} +2 -2
- package/dist/assets/{index-vuuNHSjg.js → index-nFhGTDen.js} +1 -1
- package/dist/assets/{index-DQ0QASha.js → index-pdM9BYzj.js} +1 -1
- package/dist/assets/{index-CzOBt7sp.js → index-stjC615g.js} +1 -1
- package/dist/assets/{index.browser.esm-X9hknn2t.js → index.browser.esm-6iddZ8QU.js} +1 -1
- package/dist/assets/{index.es-DxzE-O7_.js → index.es-BBKIGfQ-.js} +1 -1
- package/dist/assets/{info-BfXsJPmq.js → info-B4SK8QA1.js} +1 -1
- package/dist/assets/{info-circle-GsOEd1XI.js → info-circle-SdSjWVJ_.js} +1 -1
- package/dist/assets/{isEqual-DsVnPi10.js → isEqual-BxHh0aKQ.js} +1 -1
- package/dist/assets/{isPlainObject-CmUokXqP.js → isPlainObject-BxNWDcJ0.js} +1 -1
- package/dist/assets/{lightbulb-BEzALCyx.js → lightbulb-CvOs-JqH.js} +1 -1
- package/dist/assets/{mail-ByrkhZvq.js → mail-B1H3K6Pl.js} +1 -1
- package/dist/assets/{midjourney-DrpFBm3n.js → midjourney-CJiOmukU.js} +1 -1
- package/dist/assets/{mobile-BAWtVW1e.js → mobile-C4Tb4JJX.js} +1 -1
- package/dist/assets/{more-BVZNlwzK.js → more-CTWCkTtD.js} +1 -1
- package/dist/assets/{network-placeholder-CK6EAGki.js → network-placeholder-BY8pcOEq.js} +1 -1
- package/dist/assets/{nftPlaceholder-DnoZarWj.js → nftPlaceholder-xd2ed92v.js} +1 -1
- package/dist/assets/{off-lJe5uLS4.js → off-C5qsLMbV.js} +1 -1
- package/dist/assets/{order-Lhbu0_jr.js → order-CIoFe53E.js} +1 -1
- package/dist/assets/{pagination-D11X6ET2.js → pagination-DzpL5CTe.js} +1 -1
- package/dist/assets/{play-store-CE4FB9Zs.js → play-store-oAP63mjU.js} +1 -1
- package/dist/assets/{plus-Cw0zXVcp.js → plus-CzhWRX_v.js} +1 -1
- package/dist/assets/{price-BxMLd5yD.js → price-Bu3inThn.js} +1 -1
- package/dist/assets/{producer-BWOWTmOb.js → producer-LHgbF1et.js} +1 -1
- package/dist/assets/{qr-code-DpV5OuOo.js → qr-code-DhLtNQLx.js} +1 -1
- package/dist/assets/{recycle-horizontal-CJnRfSXG.js → recycle-horizontal-CxeSzipL.js} +1 -1
- package/dist/assets/{refresh-xtYV4lpl.js → refresh-DSbq1DuK.js} +1 -1
- package/dist/assets/{reown-logo-DcCUPHgK.js → reown-logo-BXf-Q6zR.js} +1 -1
- package/dist/assets/{search-BQetycG6.js → search-CDlgYEyM.js} +1 -1
- package/dist/assets/{secp256k1-DC-o06M_.js → secp256k1-Dd00aTFR.js} +1 -1
- package/dist/assets/{secp256k1-D9X3BQVk.js → secp256k1-k25cdw7E.js} +1 -1
- package/dist/assets/{seedream-sQ_2YcWE.js → seedream-CDJMFrRg.js} +1 -1
- package/dist/assets/{send-CVhjFIdY.js → send-DHcvpro9.js} +1 -1
- package/dist/assets/{service-DPlGRsWf.js → service-C4ZYHHds.js} +1 -1
- package/dist/assets/{solana-wallets-CKNzgX7C.js → solana-wallets-C3RZhdY7.js} +2 -2
- package/dist/assets/{solana-wallets-vue-Dw6SGkl0.js → solana-wallets-vue-CCip6wqX.js} +1 -1
- package/dist/assets/{suno-D00Ow55l.js → suno-CVzQHqmi.js} +1 -1
- package/dist/assets/{swapHorizontal-CL73W0ta.js → swapHorizontal-C-o85jnF.js} +1 -1
- package/dist/assets/{swapHorizontalBold-CG4OxIqK.js → swapHorizontalBold-By_7zdRm.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-C0iFohC4.js → swapHorizontalMedium-DsgahZYf.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-Dj2jYRBE.js → swapHorizontalRoundedBold-CwNQFE31.js} +1 -1
- package/dist/assets/{swapVertical-BcD4GWr2.js → swapVertical-Dh8WW_yZ.js} +1 -1
- package/dist/assets/{telegram-R3xvxvo4.js → telegram-jQfr9mkf.js} +1 -1
- package/dist/assets/{three-dots-B8f6usPq.js → three-dots-Bufd078I.js} +1 -1
- package/dist/assets/{twitch-DbKRDWky.js → twitch-LTf5cek4.js} +1 -1
- package/dist/assets/{twitterIcon-DdA2ZE8E.js → twitterIcon-CuS6EKAU.js} +1 -1
- package/dist/assets/{typescript-Cb8fq7i3.js → typescript-BTNtQUBp.js} +1 -1
- package/dist/assets/{use-form-item-fxD7m2zh.js → use-form-item-O_0wzwKn.js} +1 -1
- package/dist/assets/validator-CTuOvdBc.js +1 -0
- package/dist/assets/{verify-pC3qOkt7.js → verify-DmB2nDvN.js} +1 -1
- package/dist/assets/{verify-filled--9UvGODi.js → verify-filled-C5-_65kw.js} +1 -1
- package/dist/assets/{w3m-modal-Ch9a8-x_.js → w3m-modal-6UjTbVxl.js} +1 -1
- package/dist/assets/{wallet-DSzzBoyr.js → wallet-CxukWEyp.js} +1 -1
- package/dist/assets/{wallet-placeholder-DVSIPOkp.js → wallet-placeholder-Ct393zAA.js} +1 -1
- package/dist/assets/{walletconnect-BORY5eRV.js → walletconnect-RQyAEn5b.js} +1 -1
- package/dist/assets/{warning-circle-C1A6uwYs.js → warning-circle-BuctYygM.js} +1 -1
- package/dist/assets/{web-Dmlt39mC.js → web-B3O5YMXB.js} +1 -1
- package/dist/assets/{web-CA5VL1zw.js → web-BPbJv0QX.js} +1 -1
- package/dist/assets/{x-CwHBvmip.js → x-BdVVgARa.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/Detail-Ty0j8XJk.js +0 -2
- package/dist/assets/chat-15L1iHYd.js +0 -1
- package/dist/assets/chat-BIGDz2U8.js +0 -1
- package/dist/assets/chat-Bzz6VpI2.js +0 -1
- package/dist/assets/chat-C1Fov3VZ.js +0 -1
- package/dist/assets/chat-CLbEuebR.js +0 -1
- package/dist/assets/chat-CMe4j38Z.js +0 -1
- package/dist/assets/chat-CPJzXDDq.js +0 -1
- package/dist/assets/chat-CRMiyNWh.js +0 -1
- package/dist/assets/chat-C_QoPV7n.js +0 -1
- package/dist/assets/chat-CzBgIVjJ.js +0 -1
- package/dist/assets/chat-DLPgIxZs.js +0 -1
- package/dist/assets/chat-Db5jHkMr.js +0 -1
- package/dist/assets/chat-DnTeHwdL.js +0 -1
- package/dist/assets/chat-GQ2lWN7D.js +0 -1
- package/dist/assets/chat-J0zL9WVN.js +0 -1
- package/dist/assets/chat-JNXCDzNu.js +0 -1
- package/dist/assets/chat-_8bK1SD2.js +0 -1
- package/dist/assets/chat-q7DMvyHC.js +0 -1
- package/dist/assets/validator-Buy9ZCgF.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as D}from"./index.es-DxzE-O7_.js";import{E as G}from"./index-CzhEC7ej.js";import{E as be}from"./index-Dp-GUEtK.js";import{d as P,H as d,E as s,z as ee,C as o,y as i,D as l,q as n,F as a,O as M,N as z,J as u,x as $,Q as H,I as g,U as te,G as j,K as O,M as U,L as Ae}from"./vendor-vue-NSDaktjZ.js";import{H as E,bq as se,bp as Ue,dJ as ne,dK as ie,X,Y as ke,S as Y,ct as we,dL as Pe,cs as Ee,o as Ie}from"./index-CEg9nIJD.js";import{a as Re}from"./errorCode-Cqj9Td_Z.js";import{u as Le,a as Me,e as Fe}from"./uploadTrackerMixin--N-yU8Tl.js";import{s as L}from"./suno-D00Ow55l.js";import{a as ze}from"./suno-B9P6-pqW.js";import{E as De}from"./index-kSP0Myyk.js";import{E as ae,a as le}from"./index-CUHOZgIQ.js";import{I as F,A as Ge,S as je,l as Be}from"./pagination-D11X6ET2.js";import{E as Z,a as K,b as Oe}from"./index-B46wAo9Q.js";import{E as re,a as de}from"./index-XcDxI8eO.js";import{E as Ne}from"./index-AGJLiEdY.js";import{E as k}from"./index-DBLGphcd.js";import{P as He,N as We}from"./NoTasks-CG9VkLq-.js";import{E as ue}from"./index-03cAEkeJ.js";import{E as W}from"./index-B_uGV4g5.js";import{E as ce}from"./index-8XQO5o6Y.js";import{u as pe,F as he,_ as qe}from"./Player.vue_vue_type_script_setup_true_lang-n6hvXr3l.js";import{E as x}from"./index-CQShilza.js";import{E as B}from"./index-CwSXwTK7.js";import{E as Ke}from"./index-DyJlwVgm.js";import{E as Je,a as Qe}from"./index-fD5nKidQ.js";import{E as Ye,a as Xe}from"./index-BtBtzHL7.js";import{C as Ze}from"./Consumption-DEbxMEnB.js";import{a as xe}from"./price-BxMLd5yD.js";import{E as et}from"./index-CnrQA-8K.js";import{E as tt}from"./index-B81DSuJa.js";import{E as Ce,b as Ve,a as Te}from"./index-CzOBt7sp.js";import{E as ot}from"./index-DY7z61UG.js";import{a as st,E as nt}from"./index-BlAx5Ip2.js";import{E as it}from"./index-2dYS8jp-.js";import"./use-form-item-fxD7m2zh.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./validator-Buy9ZCgF.js";import"./index-_dqouIdj.js";import"./index-D5uFNi1G.js";import"./typescript-Cb8fq7i3.js";import"./strings-beZM2Y-f.js";import"./isEqual-DsVnPi10.js";import"./_Uint8Array-CTJeLHwc.js";import"./castArray-I_a0HlON.js";import"./debounce-Db4m7x7K.js";import"./_baseIteratee-CgZJPoqg.js";import"./index-Dis9vZLg.js";import"./highlight-CS6HeZm4.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./_baseClone-DE-uTiCw.js";import"./_initCloneObject-iHVJom-g.js";import"./isPlainObject-CmUokXqP.js";import"./index-DVjo3anm.js";import"./index-Cu41y2Fl.js";import"./index-BNcs1dpV.js";import"./dropdown-DUmDoGKc.js";const at=P({name:"LayoutSuno",components:{ElDrawer:be,ElButton:G,FontAwesomeIcon:D},data(){return{drawer:!1,preview:!1}},computed:{}}),lt={class:"main flex flex-row flex-1"},rt={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},dt={class:"result h-full flex flex-col flex-1 min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"},ut={class:"preview h-full w-[300px] flex flex-col"};function ct(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("el-button"),p=l("el-drawer");return n(),d("div",lt,[s("div",rt,[ee(e.$slots,"config",{},void 0,!0)]),s("div",dt,[ee(e.$slots,"result",{},void 0,!0)]),s("div",ut,[ee(e.$slots,"preview",{},void 0,!0)]),o(f,{circle:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:i(()=>[o(v,{icon:"fa-solid fa-magic"})]),_:1}),o(p,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=_=>e.drawer=_),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:i(()=>[ee(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const pt=E(at,[["render",ct],["__scopeId","data-v-abe843c9"]]),mt=P({name:"TypeSelector",components:{ElSelect:le,ElOption:ae,ElSwitch:De},data(){return{options:[{label:"v5.5",value:"chirp-v5-5",desc:this.$t("suno.model.v55desc")},{label:"v5",value:"chirp-v5",desc:this.$t("suno.model.v5desc")},{label:"v4.5+",value:"chirp-v4-5-plus",desc:this.$t("suno.model.v45plusdesc")},{label:"v4.5",value:"chirp-v4-5",desc:this.$t("suno.model.v45desc"),dividerAfter:!0},{label:"v4",value:"chirp-v4",desc:this.$t("suno.model.v4desc")},{label:"v3.5",value:"chirp-v3-5",desc:this.$t("suno.model.v35desc")},{label:"v3",value:"chirp-v3-0",desc:this.$t("suno.model.v3desc")}]}},computed:{custom:{get(){return this.$store.state.suno?.config?.custom||!1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,custom:e})}},instrumental:{get(){return this.$store.state.suno?.config?.instrumental||!1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,instrumental:e})}},model:{get(){return this.$store.state.suno?.config?.model},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e})}}},mounted(){this.model||(this.model=ze)}}),ft={class:"mb-3"},ht={class:"flex items-center mb-1"},gt={class:"text-sm font-bold"},$t={class:"model-option"},_t={class:"model-option-left"},vt={class:"model-option-name"},yt={class:"model-option-desc"},bt={key:0,class:"flex items-center justify-between mb-3"},kt={class:"text-sm font-bold"};function wt(e,t,r,c,y,w){const v=l("el-option"),f=l("el-select"),p=l("el-switch");return n(),d("div",null,[s("div",ft,[s("div",ht,[s("span",gt,a(e.$t("suno.name.model")),1)]),o(f,{modelValue:e.model,"onUpdate:modelValue":t[0]||(t[0]=_=>e.model=_),class:"w-full model-select",size:"default",placeholder:e.$t("suno.placeholder.select")},{default:i(()=>[(n(!0),d(M,null,z(e.options,_=>(n(),$(v,{key:_.value,label:_.label,value:_.value,class:H({"model-option-divider":_.dividerAfter})},{default:i(()=>[s("div",$t,[s("div",_t,[s("span",vt,a(_.label),1)]),s("span",yt,a(_.desc),1)])]),_:2},1032,["label","value","class"]))),128))]),_:1},8,["modelValue","placeholder"])]),e.custom?(n(),d("div",bt,[s("span",kt,a(e.$t("suno.name.instrumental")),1),o(p,{modelValue:e.instrumental,"onUpdate:modelValue":t[1]||(t[1]=_=>e.instrumental=_)},null,8,["modelValue"])])):u("",!0)])}const Ct=E(mt,[["render",wt],["__scopeId","data-v-16e4d6fc"]]),Vt=P({name:"UploadAudio",components:{ElUpload:Ne,ElButton:G,ElDialog:se,ElTabs:de,ElTabPane:re,InfoIcon:F,FontAwesomeIcon:D,ElRadioGroup:K,ElRadioButton:Z},mixins:[Le],emits:["change"],data(){return{fileList:[],uploadUrl:Ue()+"/api/v1/files/",dialogVisible:!1,activeTab:"browse",recording:!1,recordedBlob:null,recordedAudioUrl:null,audioPreviewUrl:null,recordTimer:null,recordSeconds:0,mediaRecorder:null,mediaStream:null,recordedChunks:[],uploadingRecord:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.suno?.config?.audio_id},set(){}},hasUploadedAudio(){const e=this.$store.state.suno?.config?.action;return e==="upload_extend"||e==="upload_cover"},uploadAction:{get(){return this.$store.state.suno?.config?.action||"upload_extend"},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,action:e})}},formattedTime(){const e=Math.floor(this.recordSeconds/60).toString().padStart(2,"0"),t=(this.recordSeconds%60).toString().padStart(2,"0");return`${e}:${t}`}},watch:{urls:{handler(e){this.$emit("change",e)}}},beforeUnmount(){this.cleanupRecording()},methods:{onExceed(){k.warning(this.$t("suno.message.uploadReferencesExceed"))},onError(){k.error(this.$t("suno.message.uploadReferencesError"))},async onBrowseSuccess(){const e=this.urls?.[0];e&&(this.audioPreviewUrl=e,await this.onGenerateAudioId(e),this.dialogVisible=!1)},async onGenerateAudioId(e){const t={audio_url:e},r=this.credential?.token;if(!r){console.error("no token specified");return}k.info(this.$t("suno.message.startingUploadAudio"));try{const c=await L.upload(t,{token:r});console.debug("get upload music success",c.data);const y=c.data?.data.audio_id;this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,audio_id:y,action:"upload_extend"}),k.success(this.$t("suno.message.startUploadAudioSuccess"))}catch(c){k.error(c?.response?.data?.error?.message||this.$t("suno.message.startUploadAudioFailed"))}},async startRecording(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){k.error(this.$t("suno.message.recordingUnsupported"));return}try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:!0}),this.recordedChunks=[],this.mediaRecorder=new MediaRecorder(this.mediaStream),this.mediaRecorder.ondataavailable=e=>{e.data&&e.data.size>0&&this.recordedChunks.push(e.data)},this.mediaRecorder.onstop=()=>{const e=new Blob(this.recordedChunks,{type:"audio/webm"});this.recordedBlob=e,this.recordedAudioUrl&&URL.revokeObjectURL(this.recordedAudioUrl),this.recordedAudioUrl=URL.createObjectURL(e),this.releaseStream()},this.mediaRecorder.start(),this.recording=!0,this.recordSeconds=0,this.recordTimer=window.setInterval(()=>{this.recordSeconds+=1,this.recordSeconds>=600&&this.stopRecording()},1e3)}catch(e){console.error("record error",e),k.error(this.$t("suno.message.recordingPermissionDenied"))}},stopRecording(){this.recordTimer&&(window.clearInterval(this.recordTimer),this.recordTimer=null),this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),this.recording=!1},resetRecording(){this.recordedAudioUrl&&URL.revokeObjectURL(this.recordedAudioUrl),this.recordedBlob=null,this.recordedAudioUrl=null,this.recordSeconds=0},async uploadRecording(){if(this.recordedBlob){this.uploadingRecord=!0;try{const e=new FormData,t=`recording-${Date.now()}.webm`;e.append("file",this.recordedBlob,t);const r=await fetch(this.uploadUrl,{method:"POST",headers:{Authorization:`Bearer ${this.$store.state.token.access}`},body:e});if(!r.ok)throw new Error(`upload failed: ${r.status}`);const c=await r.json(),y=c?.file_url||c?.data?.file_url;if(!y)throw new Error("no file_url in response");this.audioPreviewUrl=y,await this.onGenerateAudioId(y),this.dialogVisible=!1,this.resetRecording()}catch(e){console.error(e),k.error(e?.message||this.$t("suno.message.uploadReferencesError"))}finally{this.uploadingRecord=!1}}},releaseStream(){this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null)},cleanupRecording(){this.recordTimer&&(window.clearInterval(this.recordTimer),this.recordTimer=null),this.releaseStream(),this.recordedAudioUrl&&(URL.revokeObjectURL(this.recordedAudioUrl),this.recordedAudioUrl=null)}}}),Tt={class:"relative"},St={class:"flex justify-between items-center mb-2"},At={class:"flex justify-start items-center"},Ut={class:"text-sm font-bold"},Pt={key:0,class:"mb-2"},Et=["src"],It={key:1,class:"mt-2"},Rt={class:"py-4"},Lt={class:"text-center py-6"},Mt={class:"text-sm"},Ft={class:"text-xs text-gray-400 mt-1"},zt={class:"py-4 text-center"},Dt={class:"recorder-display mb-4"},Gt={key:0,class:"text-red-500 flex items-center justify-center gap-2"},jt={class:"text-2xl font-mono"},Bt={key:1,class:"text-green-600"},Ot={key:2,class:"text-gray-400 text-2xl font-mono"},Nt={key:0,class:"mb-4"},Ht=["src"],Wt={class:"flex justify-center gap-3"};function qt(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-radio-button"),b=l("el-radio-group"),S=l("el-upload"),h=l("el-tab-pane"),V=l("el-tabs"),C=l("el-dialog");return n(),d("div",Tt,[s("div",St,[s("div",At,[s("span",Ut,a(e.$t("suno.name.referenceAudios")),1),o(v,{content:e.$t("suno.description.uploadAudios")},null,8,["content"])]),o(p,{round:"",type:"primary",size:"small",onClick:t[0]||(t[0]=I=>e.dialogVisible=!0)},{default:i(()=>[o(f,{icon:"fa-solid fa-plus",class:"icon mr-1"}),g(" "+a(e.$t("suno.button.addAudio")),1)]),_:1})]),e.audioPreviewUrl?(n(),d("div",Pt,[s("audio",{src:e.audioPreviewUrl,controls:"",class:"w-full"},null,8,Et)])):u("",!0),e.hasUploadedAudio?(n(),d("div",It,[o(b,{modelValue:e.uploadAction,"onUpdate:modelValue":t[1]||(t[1]=I=>e.uploadAction=I),size:"small"},{default:i(()=>[o(_,{value:"upload_extend"},{default:i(()=>[g(a(e.$t("suno.button.extend")),1)]),_:1}),o(_,{value:"upload_cover"},{default:i(()=>[g(a(e.$t("suno.button.upload_cover")),1)]),_:1})]),_:1},8,["modelValue"])])):u("",!0),o(C,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[4]||(t[4]=I=>e.dialogVisible=I),title:e.$t("suno.name.addAudio"),width:"520px","close-on-click-modal":!1,"append-to-body":""},{default:i(()=>[o(V,{modelValue:e.activeTab,"onUpdate:modelValue":t[3]||(t[3]=I=>e.activeTab=I),class:"add-audio-tabs"},{default:i(()=>[o(h,{name:"browse",label:e.$t("suno.tab.browse")},{default:i(()=>[s("div",Rt,[o(S,{"file-list":e.fileList,"onUpdate:fileList":t[2]||(t[2]=I=>e.fileList=I),name:"file",limit:1,class:"upload-wrapper",action:e.uploadUrl,accept:".mp3,.wav,.m4a,audio/*","show-file-list":!0,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onBrowseSuccess,headers:e.headers,drag:""},{default:i(()=>[s("div",Lt,[o(f,{icon:"fa-solid fa-upload",class:"text-4xl text-gray-400 mb-3"}),s("div",Mt,a(e.$t("suno.description.dropAudioHere")),1),s("div",Ft,a(e.$t("suno.description.audioFormats")),1)])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])]),_:1},8,["label"]),o(h,{name:"record",label:e.$t("suno.tab.record")},{default:i(()=>[s("div",zt,[s("div",Dt,[e.recording?(n(),d("div",Gt,[t[5]||(t[5]=s("span",{class:"recording-dot"},null,-1)),s("span",jt,a(e.formattedTime),1)])):e.recordedBlob?(n(),d("div",Bt,[o(f,{icon:"fa-solid fa-check-circle",class:"text-2xl mr-2"}),s("span",null,a(e.$t("suno.message.recordingReady"))+" ("+a(e.formattedTime)+")",1)])):(n(),d("div",Ot,"00:00"))]),e.recordedAudioUrl&&!e.recording?(n(),d("div",Nt,[s("audio",{src:e.recordedAudioUrl,controls:"",class:"w-full"},null,8,Ht)])):u("",!0),s("div",Wt,[!e.recording&&!e.recordedBlob?(n(),$(p,{key:0,type:"primary",round:"",onClick:e.startRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-microphone",class:"mr-1"}),g(" "+a(e.$t("suno.button.startRecord")),1)]),_:1},8,["onClick"])):u("",!0),e.recording?(n(),$(p,{key:1,type:"danger",round:"",onClick:e.stopRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-stop",class:"mr-1"}),g(" "+a(e.$t("suno.button.stopRecord")),1)]),_:1},8,["onClick"])):u("",!0),e.recordedBlob&&!e.recording?(n(),d(M,{key:2},[o(p,{round:"",onClick:e.resetRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),g(" "+a(e.$t("suno.button.reRecord")),1)]),_:1},8,["onClick"]),o(p,{type:"primary",round:"",loading:e.uploadingRecord,onClick:e.uploadRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-upload",class:"mr-1"}),g(" "+a(e.$t("suno.button.useRecording")),1)]),_:1},8,["loading","onClick"])],64)):u("",!0)])])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title"])])}const Kt=E(Vt,[["render",qt],["__scopeId","data-v-5f17a1f4"]]),Jt="",ge=[{key:"lofi",label:"🎧 Lo-fi Chill",prompt:"a relaxing lo-fi hip hop beat for studying"},{key:"pop-love",label:"💕 Pop Love Song",prompt:"a catchy pop love song with sweet melodies"},{key:"rock-anthem",label:"🎸 Rock Anthem",prompt:"an energetic rock anthem with electric guitars"},{key:"jazz-night",label:"🎷 Jazz Night",prompt:"a smooth late-night jazz piece with saxophone"},{key:"edm-drop",label:"⚡ EDM Drop",prompt:"an intense EDM track with a massive drop"},{key:"folk-story",label:"🪕 Folk Story",prompt:"a warm folk song telling a story about traveling"},{key:"rnb-groove",label:"🎤 R&B Groove",prompt:"a smooth R&B groove with soulful vocals"},{key:"classical",label:"🎻 Classical",prompt:"an elegant classical piece for orchestra"},{key:"hip-hop",label:"🎤 Hip Hop",prompt:"a hard-hitting hip hop beat with bass"},{key:"country",label:"🤠 Country",prompt:"an upbeat country song with acoustic guitar and banjo"},{key:"reggae",label:"🌴 Reggae",prompt:"a laid-back reggae tune with island vibes"},{key:"latin",label:"💃 Latin",prompt:"a vibrant Latin dance track with percussion"},{key:"ambient",label:"🌊 Ambient",prompt:"a dreamy ambient soundscape for relaxation"},{key:"metal",label:"🤘 Metal",prompt:"a powerful metal song with heavy riffs and double bass drums"},{key:"soul",label:"🎵 Soul",prompt:"a heartfelt soul ballad with gospel harmonies"},{key:"synthwave",label:"🌃 Synthwave",prompt:"a retro synthwave track with 80s vibes"},{key:"kpop",label:"🇰🇷 K-Pop",prompt:"a catchy K-pop dance track with hook"},{key:"lullaby",label:"🌙 Lullaby",prompt:"a gentle lullaby for bedtime with soft piano"},{key:"cinematic",label:"🎬 Cinematic",prompt:"an epic cinematic orchestral score for a movie trailer"},{key:"blues",label:"🎸 Blues",prompt:"a soulful blues song with electric guitar bends"},{key:"disco",label:"🕺 Disco",prompt:"a funky disco track with groovy bassline"},{key:"punk",label:"🔥 Punk Rock",prompt:"a fast punk rock song with raw energy"},{key:"gospel",label:"⛪ Gospel",prompt:"an uplifting gospel choir song with piano"},{key:"trap",label:"🔊 Trap",prompt:"a dark trap beat with 808s and hi-hats"},{key:"bossa",label:"☕ Bossa Nova",prompt:"a gentle bossa nova with nylon guitar"},{key:"indie",label:"🎶 Indie",prompt:"a dreamy indie track with ethereal vocals"},{key:"cpop",label:"🇨🇳 C-Pop",prompt:"a beautiful Chinese pop ballad with emotional vocals"},{key:"jpop",label:"🇯🇵 J-Pop",prompt:"a cheerful J-pop song with anime vibes"},{key:"afrobeat",label:"🥁 Afrobeat",prompt:"a groovy Afrobeat track with layered percussion"},{key:"game",label:"🎮 Game BGM",prompt:"an adventurous video game background music"}],Qt=8;function $e(e){const t=[...e];for(let r=t.length-1;r>0;r--){const c=Math.floor(Math.random()*(r+1));[t[r],t[c]]=[t[c],t[r]]}return t}const Yt=P({name:"PromptInput",components:{FontAwesomeIcon:D,PromptTextarea:He},data(){return{shuffledTags:$e(ge)}},computed:{prompt:{get(){return this.$store.state.suno?.config?.prompt},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,prompt:e})}},visibleTags(){return this.shuffledTags.slice(0,Qt)}},mounted(){this.prompt||(this.prompt=Jt)},methods:{onTagClick(e){this.prompt=e.prompt},onRefreshTags(){this.shuffledTags=$e(ge)}}}),Xt={class:"inspo-tags"},Zt=["onClick"];function xt(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("prompt-textarea");return n(),$(f,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=p=>e.prompt=p),title:e.$t("suno.name.songDescription"),info:e.$t("suno.description.prompt"),placeholder:e.$t("suno.placeholder.prompt"),"min-rows":5,"max-rows":14},{after:i(()=>[s("div",Xt,[(n(!0),d(M,null,z(e.visibleTags,p=>(n(),d("button",{key:p.key,class:"inspo-tag",onClick:_=>e.onTagClick(p)},a(p.label),9,Zt))),128)),s("button",{class:"inspo-tag inspo-tag-refresh",onClick:t[0]||(t[0]=(...p)=>e.onRefreshTags&&e.onRefreshTags(...p))},[o(v,{icon:"fa-solid fa-arrows-rotate"})])])]),_:1},8,["modelValue","title","info","placeholder"])}const eo=E(Yt,[["render",xt],["__scopeId","data-v-58ffcd38"]]),to="",oo=P({name:"LyricInput",components:{ElInput:W,ElButton:G,ElTooltip:ue,ElDialog:se,FontAwesomeIcon:D,InfoIcon:F},data(){return{generatingLyrics:!1,enhancingLyrics:!1,enhancePrompt:"",lyricHistory:[],expanded:!1}},computed:{lyric:{get(){return this.$store.state.suno?.config?.lyric},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric:e})}},config(){return this.$store.state.suno?.config},credential(){return this.$store.state.suno?.credential}},mounted(){this.lyric||(this.lyric=to)},methods:{pushHistory(){this.lyric&&(this.lyricHistory.push(this.lyric),this.lyricHistory.length>20&&this.lyricHistory.shift())},onUndo(){const e=this.lyricHistory.pop();e!==void 0&&(this.lyric=e)},onClear(){this.pushHistory(),this.lyric=""},async onEnhanceLyrics(){const e=this.credential?.token;if(!(!e||!this.lyric||!this.enhancePrompt)){this.pushHistory(),this.enhancingLyrics=!0,k.info(this.$t("suno.message.enhancingLyrics"));try{const t=`${this.enhancePrompt}
|
|
1
|
+
import{F as D}from"./index.es-BBKIGfQ-.js";import{E as G}from"./index-Dk-z-UGf.js";import{E as be}from"./index-BZ1kxe1C.js";import{d as P,H as d,E as s,z as ee,C as o,y as i,D as l,q as n,F as a,O as M,N as z,J as u,x as $,Q as H,I as g,U as te,G as j,K as O,M as U,L as Ae}from"./vendor-vue-NSDaktjZ.js";import{H as E,bq as se,bp as Ue,dJ as ne,dK as ie,X,Y as ke,S as Y,ct as we,dL as Pe,cs as Ee,o as Ie}from"./index-DbxZlccs.js";import{a as Re}from"./errorCode-Cqj9Td_Z.js";import{u as Le,a as Me,e as Fe}from"./uploadTrackerMixin--N-yU8Tl.js";import{s as L}from"./suno-CVzQHqmi.js";import{a as ze}from"./suno-B9P6-pqW.js";import{E as De}from"./index-IinDqaW0.js";import{E as ae,a as le}from"./index-BfCqzpOM.js";import{I as F,A as Ge,S as je,l as Be}from"./pagination-DzpL5CTe.js";import{E as Z,a as K,b as Oe}from"./index-DvqOFcer.js";import{E as re,a as de}from"./index-B3OoZZBD.js";import{E as Ne}from"./index-DwDsIA4Z.js";import{E as k}from"./index-EXFQCm2p.js";import{P as He,N as We}from"./NoTasks-CY_Pw0kw.js";import{E as ue}from"./index-DQYSu3nX.js";import{E as W}from"./index-COmMSdwV.js";import{E as ce}from"./index-DFWVcSFE.js";import{u as pe,F as he,_ as qe}from"./Player.vue_vue_type_script_setup_true_lang-C-bmECpI.js";import{E as x}from"./index-CUB5gf_6.js";import{E as B}from"./index-Do5zUbHZ.js";import{E as Ke}from"./index-N8ik1b1-.js";import{E as Je,a as Qe}from"./index-B_Qp6NLq.js";import{E as Ye,a as Xe}from"./index-BAiWZyBS.js";import{C as Ze}from"./Consumption-DNt5VdXh.js";import{a as xe}from"./price-Bu3inThn.js";import{E as et}from"./index-BFk6Zvde.js";import{E as tt}from"./index-BvlslfMf.js";import{E as Ce,b as Ve,a as Te}from"./index-stjC615g.js";import{E as ot}from"./index-j_IuQHbj.js";import{a as st,E as nt}from"./index-DIV4xND5.js";import{E as it}from"./index-BhUw0KP_.js";import"./use-form-item-O_0wzwKn.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./validator-CTuOvdBc.js";import"./index-DOkZQDaG.js";import"./index-CsY_kNg8.js";import"./typescript-BTNtQUBp.js";import"./strings-beZM2Y-f.js";import"./isEqual-BxHh0aKQ.js";import"./_Uint8Array-DCIeAzU_.js";import"./castArray-CyOElqxp.js";import"./debounce-DDG4OZxW.js";import"./_baseIteratee-DxCypmZy.js";import"./index-Dt7z1fO4.js";import"./highlight-CTtezPrj.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./_baseClone-C3-5Zuh4.js";import"./_initCloneObject-C96qwcyN.js";import"./isPlainObject-BxNWDcJ0.js";import"./index-Bo03HCBc.js";import"./index-Cu41y2Fl.js";import"./index-B4IJ3U4q.js";import"./dropdown-BBnMof7T.js";const at=P({name:"LayoutSuno",components:{ElDrawer:be,ElButton:G,FontAwesomeIcon:D},data(){return{drawer:!1,preview:!1}},computed:{}}),lt={class:"main flex flex-row flex-1"},rt={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},dt={class:"result h-full flex flex-col flex-1 min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"},ut={class:"preview h-full w-[300px] flex flex-col"};function ct(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("el-button"),p=l("el-drawer");return n(),d("div",lt,[s("div",rt,[ee(e.$slots,"config",{},void 0,!0)]),s("div",dt,[ee(e.$slots,"result",{},void 0,!0)]),s("div",ut,[ee(e.$slots,"preview",{},void 0,!0)]),o(f,{circle:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:i(()=>[o(v,{icon:"fa-solid fa-magic"})]),_:1}),o(p,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=_=>e.drawer=_),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:i(()=>[ee(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const pt=E(at,[["render",ct],["__scopeId","data-v-abe843c9"]]),mt=P({name:"TypeSelector",components:{ElSelect:le,ElOption:ae,ElSwitch:De},data(){return{options:[{label:"v5.5",value:"chirp-v5-5",desc:this.$t("suno.model.v55desc")},{label:"v5",value:"chirp-v5",desc:this.$t("suno.model.v5desc")},{label:"v4.5+",value:"chirp-v4-5-plus",desc:this.$t("suno.model.v45plusdesc")},{label:"v4.5",value:"chirp-v4-5",desc:this.$t("suno.model.v45desc"),dividerAfter:!0},{label:"v4",value:"chirp-v4",desc:this.$t("suno.model.v4desc")},{label:"v3.5",value:"chirp-v3-5",desc:this.$t("suno.model.v35desc")},{label:"v3",value:"chirp-v3-0",desc:this.$t("suno.model.v3desc")}]}},computed:{custom:{get(){return this.$store.state.suno?.config?.custom||!1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,custom:e})}},instrumental:{get(){return this.$store.state.suno?.config?.instrumental||!1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,instrumental:e})}},model:{get(){return this.$store.state.suno?.config?.model},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e})}}},mounted(){this.model||(this.model=ze)}}),ft={class:"mb-3"},ht={class:"flex items-center mb-1"},gt={class:"text-sm font-bold"},$t={class:"model-option"},_t={class:"model-option-left"},vt={class:"model-option-name"},yt={class:"model-option-desc"},bt={key:0,class:"flex items-center justify-between mb-3"},kt={class:"text-sm font-bold"};function wt(e,t,r,c,y,w){const v=l("el-option"),f=l("el-select"),p=l("el-switch");return n(),d("div",null,[s("div",ft,[s("div",ht,[s("span",gt,a(e.$t("suno.name.model")),1)]),o(f,{modelValue:e.model,"onUpdate:modelValue":t[0]||(t[0]=_=>e.model=_),class:"w-full model-select",size:"default",placeholder:e.$t("suno.placeholder.select")},{default:i(()=>[(n(!0),d(M,null,z(e.options,_=>(n(),$(v,{key:_.value,label:_.label,value:_.value,class:H({"model-option-divider":_.dividerAfter})},{default:i(()=>[s("div",$t,[s("div",_t,[s("span",vt,a(_.label),1)]),s("span",yt,a(_.desc),1)])]),_:2},1032,["label","value","class"]))),128))]),_:1},8,["modelValue","placeholder"])]),e.custom?(n(),d("div",bt,[s("span",kt,a(e.$t("suno.name.instrumental")),1),o(p,{modelValue:e.instrumental,"onUpdate:modelValue":t[1]||(t[1]=_=>e.instrumental=_)},null,8,["modelValue"])])):u("",!0)])}const Ct=E(mt,[["render",wt],["__scopeId","data-v-16e4d6fc"]]),Vt=P({name:"UploadAudio",components:{ElUpload:Ne,ElButton:G,ElDialog:se,ElTabs:de,ElTabPane:re,InfoIcon:F,FontAwesomeIcon:D,ElRadioGroup:K,ElRadioButton:Z},mixins:[Le],emits:["change"],data(){return{fileList:[],uploadUrl:Ue()+"/api/v1/files/",dialogVisible:!1,activeTab:"browse",recording:!1,recordedBlob:null,recordedAudioUrl:null,audioPreviewUrl:null,recordTimer:null,recordSeconds:0,mediaRecorder:null,mediaStream:null,recordedChunks:[],uploadingRecord:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.suno?.config?.audio_id},set(){}},hasUploadedAudio(){const e=this.$store.state.suno?.config?.action;return e==="upload_extend"||e==="upload_cover"},uploadAction:{get(){return this.$store.state.suno?.config?.action||"upload_extend"},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,action:e})}},formattedTime(){const e=Math.floor(this.recordSeconds/60).toString().padStart(2,"0"),t=(this.recordSeconds%60).toString().padStart(2,"0");return`${e}:${t}`}},watch:{urls:{handler(e){this.$emit("change",e)}}},beforeUnmount(){this.cleanupRecording()},methods:{onExceed(){k.warning(this.$t("suno.message.uploadReferencesExceed"))},onError(){k.error(this.$t("suno.message.uploadReferencesError"))},async onBrowseSuccess(){const e=this.urls?.[0];e&&(this.audioPreviewUrl=e,await this.onGenerateAudioId(e),this.dialogVisible=!1)},async onGenerateAudioId(e){const t={audio_url:e},r=this.credential?.token;if(!r){console.error("no token specified");return}k.info(this.$t("suno.message.startingUploadAudio"));try{const c=await L.upload(t,{token:r});console.debug("get upload music success",c.data);const y=c.data?.data.audio_id;this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,audio_id:y,action:"upload_extend"}),k.success(this.$t("suno.message.startUploadAudioSuccess"))}catch(c){k.error(c?.response?.data?.error?.message||this.$t("suno.message.startUploadAudioFailed"))}},async startRecording(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){k.error(this.$t("suno.message.recordingUnsupported"));return}try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:!0}),this.recordedChunks=[],this.mediaRecorder=new MediaRecorder(this.mediaStream),this.mediaRecorder.ondataavailable=e=>{e.data&&e.data.size>0&&this.recordedChunks.push(e.data)},this.mediaRecorder.onstop=()=>{const e=new Blob(this.recordedChunks,{type:"audio/webm"});this.recordedBlob=e,this.recordedAudioUrl&&URL.revokeObjectURL(this.recordedAudioUrl),this.recordedAudioUrl=URL.createObjectURL(e),this.releaseStream()},this.mediaRecorder.start(),this.recording=!0,this.recordSeconds=0,this.recordTimer=window.setInterval(()=>{this.recordSeconds+=1,this.recordSeconds>=600&&this.stopRecording()},1e3)}catch(e){console.error("record error",e),k.error(this.$t("suno.message.recordingPermissionDenied"))}},stopRecording(){this.recordTimer&&(window.clearInterval(this.recordTimer),this.recordTimer=null),this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),this.recording=!1},resetRecording(){this.recordedAudioUrl&&URL.revokeObjectURL(this.recordedAudioUrl),this.recordedBlob=null,this.recordedAudioUrl=null,this.recordSeconds=0},async uploadRecording(){if(this.recordedBlob){this.uploadingRecord=!0;try{const e=new FormData,t=`recording-${Date.now()}.webm`;e.append("file",this.recordedBlob,t);const r=await fetch(this.uploadUrl,{method:"POST",headers:{Authorization:`Bearer ${this.$store.state.token.access}`},body:e});if(!r.ok)throw new Error(`upload failed: ${r.status}`);const c=await r.json(),y=c?.file_url||c?.data?.file_url;if(!y)throw new Error("no file_url in response");this.audioPreviewUrl=y,await this.onGenerateAudioId(y),this.dialogVisible=!1,this.resetRecording()}catch(e){console.error(e),k.error(e?.message||this.$t("suno.message.uploadReferencesError"))}finally{this.uploadingRecord=!1}}},releaseStream(){this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null)},cleanupRecording(){this.recordTimer&&(window.clearInterval(this.recordTimer),this.recordTimer=null),this.releaseStream(),this.recordedAudioUrl&&(URL.revokeObjectURL(this.recordedAudioUrl),this.recordedAudioUrl=null)}}}),Tt={class:"relative"},St={class:"flex justify-between items-center mb-2"},At={class:"flex justify-start items-center"},Ut={class:"text-sm font-bold"},Pt={key:0,class:"mb-2"},Et=["src"],It={key:1,class:"mt-2"},Rt={class:"py-4"},Lt={class:"text-center py-6"},Mt={class:"text-sm"},Ft={class:"text-xs text-gray-400 mt-1"},zt={class:"py-4 text-center"},Dt={class:"recorder-display mb-4"},Gt={key:0,class:"text-red-500 flex items-center justify-center gap-2"},jt={class:"text-2xl font-mono"},Bt={key:1,class:"text-green-600"},Ot={key:2,class:"text-gray-400 text-2xl font-mono"},Nt={key:0,class:"mb-4"},Ht=["src"],Wt={class:"flex justify-center gap-3"};function qt(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-radio-button"),b=l("el-radio-group"),S=l("el-upload"),h=l("el-tab-pane"),V=l("el-tabs"),C=l("el-dialog");return n(),d("div",Tt,[s("div",St,[s("div",At,[s("span",Ut,a(e.$t("suno.name.referenceAudios")),1),o(v,{content:e.$t("suno.description.uploadAudios")},null,8,["content"])]),o(p,{round:"",type:"primary",size:"small",onClick:t[0]||(t[0]=I=>e.dialogVisible=!0)},{default:i(()=>[o(f,{icon:"fa-solid fa-plus",class:"icon mr-1"}),g(" "+a(e.$t("suno.button.addAudio")),1)]),_:1})]),e.audioPreviewUrl?(n(),d("div",Pt,[s("audio",{src:e.audioPreviewUrl,controls:"",class:"w-full"},null,8,Et)])):u("",!0),e.hasUploadedAudio?(n(),d("div",It,[o(b,{modelValue:e.uploadAction,"onUpdate:modelValue":t[1]||(t[1]=I=>e.uploadAction=I),size:"small"},{default:i(()=>[o(_,{value:"upload_extend"},{default:i(()=>[g(a(e.$t("suno.button.extend")),1)]),_:1}),o(_,{value:"upload_cover"},{default:i(()=>[g(a(e.$t("suno.button.upload_cover")),1)]),_:1})]),_:1},8,["modelValue"])])):u("",!0),o(C,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[4]||(t[4]=I=>e.dialogVisible=I),title:e.$t("suno.name.addAudio"),width:"520px","close-on-click-modal":!1,"append-to-body":""},{default:i(()=>[o(V,{modelValue:e.activeTab,"onUpdate:modelValue":t[3]||(t[3]=I=>e.activeTab=I),class:"add-audio-tabs"},{default:i(()=>[o(h,{name:"browse",label:e.$t("suno.tab.browse")},{default:i(()=>[s("div",Rt,[o(S,{"file-list":e.fileList,"onUpdate:fileList":t[2]||(t[2]=I=>e.fileList=I),name:"file",limit:1,class:"upload-wrapper",action:e.uploadUrl,accept:".mp3,.wav,.m4a,audio/*","show-file-list":!0,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onBrowseSuccess,headers:e.headers,drag:""},{default:i(()=>[s("div",Lt,[o(f,{icon:"fa-solid fa-upload",class:"text-4xl text-gray-400 mb-3"}),s("div",Mt,a(e.$t("suno.description.dropAudioHere")),1),s("div",Ft,a(e.$t("suno.description.audioFormats")),1)])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])]),_:1},8,["label"]),o(h,{name:"record",label:e.$t("suno.tab.record")},{default:i(()=>[s("div",zt,[s("div",Dt,[e.recording?(n(),d("div",Gt,[t[5]||(t[5]=s("span",{class:"recording-dot"},null,-1)),s("span",jt,a(e.formattedTime),1)])):e.recordedBlob?(n(),d("div",Bt,[o(f,{icon:"fa-solid fa-check-circle",class:"text-2xl mr-2"}),s("span",null,a(e.$t("suno.message.recordingReady"))+" ("+a(e.formattedTime)+")",1)])):(n(),d("div",Ot,"00:00"))]),e.recordedAudioUrl&&!e.recording?(n(),d("div",Nt,[s("audio",{src:e.recordedAudioUrl,controls:"",class:"w-full"},null,8,Ht)])):u("",!0),s("div",Wt,[!e.recording&&!e.recordedBlob?(n(),$(p,{key:0,type:"primary",round:"",onClick:e.startRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-microphone",class:"mr-1"}),g(" "+a(e.$t("suno.button.startRecord")),1)]),_:1},8,["onClick"])):u("",!0),e.recording?(n(),$(p,{key:1,type:"danger",round:"",onClick:e.stopRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-stop",class:"mr-1"}),g(" "+a(e.$t("suno.button.stopRecord")),1)]),_:1},8,["onClick"])):u("",!0),e.recordedBlob&&!e.recording?(n(),d(M,{key:2},[o(p,{round:"",onClick:e.resetRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),g(" "+a(e.$t("suno.button.reRecord")),1)]),_:1},8,["onClick"]),o(p,{type:"primary",round:"",loading:e.uploadingRecord,onClick:e.uploadRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-upload",class:"mr-1"}),g(" "+a(e.$t("suno.button.useRecording")),1)]),_:1},8,["loading","onClick"])],64)):u("",!0)])])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title"])])}const Kt=E(Vt,[["render",qt],["__scopeId","data-v-5f17a1f4"]]),Jt="",ge=[{key:"lofi",label:"🎧 Lo-fi Chill",prompt:"a relaxing lo-fi hip hop beat for studying"},{key:"pop-love",label:"💕 Pop Love Song",prompt:"a catchy pop love song with sweet melodies"},{key:"rock-anthem",label:"🎸 Rock Anthem",prompt:"an energetic rock anthem with electric guitars"},{key:"jazz-night",label:"🎷 Jazz Night",prompt:"a smooth late-night jazz piece with saxophone"},{key:"edm-drop",label:"⚡ EDM Drop",prompt:"an intense EDM track with a massive drop"},{key:"folk-story",label:"🪕 Folk Story",prompt:"a warm folk song telling a story about traveling"},{key:"rnb-groove",label:"🎤 R&B Groove",prompt:"a smooth R&B groove with soulful vocals"},{key:"classical",label:"🎻 Classical",prompt:"an elegant classical piece for orchestra"},{key:"hip-hop",label:"🎤 Hip Hop",prompt:"a hard-hitting hip hop beat with bass"},{key:"country",label:"🤠 Country",prompt:"an upbeat country song with acoustic guitar and banjo"},{key:"reggae",label:"🌴 Reggae",prompt:"a laid-back reggae tune with island vibes"},{key:"latin",label:"💃 Latin",prompt:"a vibrant Latin dance track with percussion"},{key:"ambient",label:"🌊 Ambient",prompt:"a dreamy ambient soundscape for relaxation"},{key:"metal",label:"🤘 Metal",prompt:"a powerful metal song with heavy riffs and double bass drums"},{key:"soul",label:"🎵 Soul",prompt:"a heartfelt soul ballad with gospel harmonies"},{key:"synthwave",label:"🌃 Synthwave",prompt:"a retro synthwave track with 80s vibes"},{key:"kpop",label:"🇰🇷 K-Pop",prompt:"a catchy K-pop dance track with hook"},{key:"lullaby",label:"🌙 Lullaby",prompt:"a gentle lullaby for bedtime with soft piano"},{key:"cinematic",label:"🎬 Cinematic",prompt:"an epic cinematic orchestral score for a movie trailer"},{key:"blues",label:"🎸 Blues",prompt:"a soulful blues song with electric guitar bends"},{key:"disco",label:"🕺 Disco",prompt:"a funky disco track with groovy bassline"},{key:"punk",label:"🔥 Punk Rock",prompt:"a fast punk rock song with raw energy"},{key:"gospel",label:"⛪ Gospel",prompt:"an uplifting gospel choir song with piano"},{key:"trap",label:"🔊 Trap",prompt:"a dark trap beat with 808s and hi-hats"},{key:"bossa",label:"☕ Bossa Nova",prompt:"a gentle bossa nova with nylon guitar"},{key:"indie",label:"🎶 Indie",prompt:"a dreamy indie track with ethereal vocals"},{key:"cpop",label:"🇨🇳 C-Pop",prompt:"a beautiful Chinese pop ballad with emotional vocals"},{key:"jpop",label:"🇯🇵 J-Pop",prompt:"a cheerful J-pop song with anime vibes"},{key:"afrobeat",label:"🥁 Afrobeat",prompt:"a groovy Afrobeat track with layered percussion"},{key:"game",label:"🎮 Game BGM",prompt:"an adventurous video game background music"}],Qt=8;function $e(e){const t=[...e];for(let r=t.length-1;r>0;r--){const c=Math.floor(Math.random()*(r+1));[t[r],t[c]]=[t[c],t[r]]}return t}const Yt=P({name:"PromptInput",components:{FontAwesomeIcon:D,PromptTextarea:He},data(){return{shuffledTags:$e(ge)}},computed:{prompt:{get(){return this.$store.state.suno?.config?.prompt},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,prompt:e})}},visibleTags(){return this.shuffledTags.slice(0,Qt)}},mounted(){this.prompt||(this.prompt=Jt)},methods:{onTagClick(e){this.prompt=e.prompt},onRefreshTags(){this.shuffledTags=$e(ge)}}}),Xt={class:"inspo-tags"},Zt=["onClick"];function xt(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("prompt-textarea");return n(),$(f,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=p=>e.prompt=p),title:e.$t("suno.name.songDescription"),info:e.$t("suno.description.prompt"),placeholder:e.$t("suno.placeholder.prompt"),"min-rows":5,"max-rows":14},{after:i(()=>[s("div",Xt,[(n(!0),d(M,null,z(e.visibleTags,p=>(n(),d("button",{key:p.key,class:"inspo-tag",onClick:_=>e.onTagClick(p)},a(p.label),9,Zt))),128)),s("button",{class:"inspo-tag inspo-tag-refresh",onClick:t[0]||(t[0]=(...p)=>e.onRefreshTags&&e.onRefreshTags(...p))},[o(v,{icon:"fa-solid fa-arrows-rotate"})])])]),_:1},8,["modelValue","title","info","placeholder"])}const eo=E(Yt,[["render",xt],["__scopeId","data-v-58ffcd38"]]),to="",oo=P({name:"LyricInput",components:{ElInput:W,ElButton:G,ElTooltip:ue,ElDialog:se,FontAwesomeIcon:D,InfoIcon:F},data(){return{generatingLyrics:!1,enhancingLyrics:!1,enhancePrompt:"",lyricHistory:[],expanded:!1}},computed:{lyric:{get(){return this.$store.state.suno?.config?.lyric},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric:e})}},config(){return this.$store.state.suno?.config},credential(){return this.$store.state.suno?.credential}},mounted(){this.lyric||(this.lyric=to)},methods:{pushHistory(){this.lyric&&(this.lyricHistory.push(this.lyric),this.lyricHistory.length>20&&this.lyricHistory.shift())},onUndo(){const e=this.lyricHistory.pop();e!==void 0&&(this.lyric=e)},onClear(){this.pushHistory(),this.lyric=""},async onEnhanceLyrics(){const e=this.credential?.token;if(!(!e||!this.lyric||!this.enhancePrompt)){this.pushHistory(),this.enhancingLyrics=!0,k.info(this.$t("suno.message.enhancingLyrics"));try{const t=`${this.enhancePrompt}
|
|
2
2
|
|
|
3
3
|
Original lyrics:
|
|
4
4
|
${this.lyric}`,c=(await L.lyric({prompt:t},{token:e})).data?.data;c?.text&&(this.lyric=c.text,this.enhancePrompt="",k.success(this.$t("suno.message.enhanceLyricsSuccess")))}catch{k.error(this.$t("suno.message.enhanceLyricsFailed"))}finally{this.enhancingLyrics=!1}}},async onGenerateLyrics(){const e=this.credential?.token;if(!e)return;let t;try{t=((await ce.prompt(this.$t("suno.message.lyricsThemePromptMessage"),this.$t("suno.message.lyricsThemePromptTitle"),{confirmButtonText:this.$t("common.button.confirm"),cancelButtonText:this.$t("common.button.cancel"),inputPlaceholder:this.$t("suno.placeholder.lyricsTheme"),inputValue:this.config?.title||"",inputType:"textarea",inputValidator:c=>typeof c=="string"&&c.trim().length>0||this.$t("suno.message.lyricsThemeRequired")})).value||"").trim()}catch{return}if(t){this.pushHistory(),this.generatingLyrics=!0,k.info(this.$t("suno.message.generatingLyrics"));try{const c=(await L.lyric({prompt:t},{token:e})).data?.data;c?.text&&(this.lyric=c.text,c?.title&&!this.config?.title&&this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric:c.text,title:c.title}),k.success(this.$t("suno.message.generateLyricsSuccess")))}catch{k.error(this.$t("suno.message.generateLyricsFailed"))}finally{this.generatingLyrics=!1}}}}}),so={class:"field"},no={class:"flex items-center justify-between mb-1"},io={class:"flex items-center"},ao={class:"text-sm font-bold"},lo={class:"flex items-center gap-1"},ro={class:"relative"},uo={class:"text-xs text-right text-[var(--el-text-color-secondary)] mt-1"},co={key:0,class:"enhance-bar"},po={key:0,class:"enhance-bar mt-3"},mo={class:"flex items-center justify-between"},fo={class:"flex items-center gap-1"};function ho(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-tooltip"),b=l("el-input"),S=l("el-dialog");return n(),d("div",so,[s("div",no,[s("div",io,[s("span",ao,a(e.$t("suno.name.lyrics")),1),o(v,{content:e.$t("suno.description.lyrics")},null,8,["content"])]),s("div",lo,[e.lyricHistory.length>0?(n(),$(_,{key:0,content:e.$t("suno.button.undo"),placement:"top"},{default:i(()=>[o(p,{size:"small",circle:"",onClick:e.onUndo},{default:i(()=>[o(f,{icon:"fa-solid fa-rotate-left"})]),_:1},8,["onClick"])]),_:1},8,["content"])):u("",!0),e.lyric?(n(),$(_,{key:1,content:e.$t("suno.button.clear_lyrics"),placement:"top"},{default:i(()=>[o(p,{size:"small",circle:"",onClick:e.onClear},{default:i(()=>[o(f,{icon:"fa-solid fa-eraser"})]),_:1},8,["onClick"])]),_:1},8,["content"])):u("",!0),o(_,{content:e.$t("suno.button.expand_lyrics"),placement:"top"},{default:i(()=>[o(p,{size:"small",circle:"",onClick:t[0]||(t[0]=h=>e.expanded=!0)},{default:i(()=>[o(f,{icon:"fa-solid fa-expand"})]),_:1})]),_:1},8,["content"]),e.config?.action!=="extend"?(n(),$(p,{key:2,size:"small",loading:e.generatingLyrics,round:"",onClick:e.onGenerateLyrics},{default:i(()=>[e.generatingLyrics?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.generate_lyrics")),1)]),_:1},8,["loading","onClick"])):u("",!0)])]),s("div",ro,[e.config?.action!=="extend"?(n(),$(b,{key:0,modelValue:e.lyric,"onUpdate:modelValue":t[1]||(t[1]=h=>e.lyric=h),rows:5,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.lyrics")},null,8,["modelValue","placeholder"])):(n(),$(b,{key:1,modelValue:e.lyric,"onUpdate:modelValue":t[2]||(t[2]=h=>e.lyric=h),rows:5,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.extend.lyrics")},null,8,["modelValue","placeholder"])),s("div",uo,a(e.lyric?.length||0)+"/5000",1)]),e.lyric&&e.config?.action!=="extend"?(n(),d("div",co,[o(b,{modelValue:e.enhancePrompt,"onUpdate:modelValue":t[3]||(t[3]=h=>e.enhancePrompt=h),size:"small",placeholder:e.$t("suno.placeholder.enhanceLyrics"),class:"enhance-input",onKeyup:te(e.onEnhanceLyrics,["enter"])},{append:i(()=>[o(p,{loading:e.enhancingLyrics,onClick:e.onEnhanceLyrics},{default:i(()=>[e.enhancingLyrics?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.enhance_lyrics")),1)]),_:1},8,["loading","onClick"])]),_:1},8,["modelValue","placeholder","onKeyup"])])):u("",!0),o(S,{modelValue:e.expanded,"onUpdate:modelValue":t[7]||(t[7]=h=>e.expanded=h),title:e.$t("suno.name.lyrics"),width:"720px",top:"5vh","close-on-click-modal":!1,class:"lyrics-expand-dialog"},{footer:i(()=>[s("div",mo,[s("div",fo,[e.lyricHistory.length>0?(n(),$(p,{key:0,size:"small",onClick:e.onUndo},{default:i(()=>[o(f,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),g(" "+a(e.$t("suno.button.undo")),1)]),_:1},8,["onClick"])):u("",!0),e.lyric?(n(),$(p,{key:1,size:"small",onClick:e.onClear},{default:i(()=>[o(f,{icon:"fa-solid fa-eraser",class:"mr-1"}),g(" "+a(e.$t("suno.button.clear_lyrics")),1)]),_:1},8,["onClick"])):u("",!0),e.config?.action!=="extend"?(n(),$(p,{key:2,size:"small",loading:e.generatingLyrics,onClick:e.onGenerateLyrics},{default:i(()=>[e.generatingLyrics?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.generate_lyrics")),1)]),_:1},8,["loading","onClick"])):u("",!0)]),o(p,{type:"primary",onClick:t[6]||(t[6]=h=>e.expanded=!1)},{default:i(()=>[g(a(e.$t("common.button.confirm")),1)]),_:1})])]),default:i(()=>[o(b,{modelValue:e.lyric,"onUpdate:modelValue":t[4]||(t[4]=h=>e.lyric=h),type:"textarea",rows:20,class:"lyrics-expanded",placeholder:e.$t("suno.placeholder.lyrics"),autofocus:""},null,8,["modelValue","placeholder"]),e.config?.action!=="extend"?(n(),d("div",po,[o(b,{modelValue:e.enhancePrompt,"onUpdate:modelValue":t[5]||(t[5]=h=>e.enhancePrompt=h),size:"small",placeholder:e.$t("suno.placeholder.enhanceLyrics"),class:"enhance-input",onKeyup:te(e.onEnhanceLyrics,["enter"])},{append:i(()=>[o(p,{loading:e.enhancingLyrics,onClick:e.onEnhanceLyrics},{default:i(()=>[e.enhancingLyrics?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.enhance_lyrics")),1)]),_:1},8,["loading","onClick"])]),_:1},8,["modelValue","placeholder","onKeyup"])])):u("",!0)]),_:1},8,["modelValue","title"])])}const go=E(oo,[["render",ho],["__scopeId","data-v-d7d2ec74"]]),_e=["Pop","Rock","Jazz","R&B","Hip Hop","Lo-fi","Electronic","Classical","Country","Blues","Folk","Reggae","Metal","Punk","Soul","Funk","Ambient","Indie","Latin","Acoustic","Dance","Disco","Gospel","K-Pop","J-Pop","C-Pop","Bossa Nova","Trap","Drill","House","Techno","Dubstep","Synthwave","Chill","Dreamy","Upbeat","Melancholic","Romantic","Epic","Cinematic","Orchestral","Piano","Guitar","Saxophone","Violin","Tribal","World Music","Afrobeat","Ska","Grunge"],$o=12;function ve(e){const t=[...e];for(let r=t.length-1;r>0;r--){const c=Math.floor(Math.random()*(r+1));[t[r],t[c]]=[t[c],t[r]]}return t}const _o=P({name:"StyleInput",components:{ElInput:W,ElButton:G,FontAwesomeIcon:D,InfoIcon:F},data(){return{optimizing:!1,shuffledTags:ve(_e)}},computed:{style:{get(){return this.$store.state.suno?.config?.style},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,style:e})}},credential(){return this.$store.state.suno?.credential},visibleTags(){return this.shuffledTags.slice(0,$o)}},methods:{onTagClick(e){const t=this.style||"";t.toLowerCase().includes(e.toLowerCase())||(this.style=t?`${t}, ${e}`:e)},onRefreshTags(){this.shuffledTags=ve(_e)},async onOptimizeStyle(){const e=this.credential?.token;if(!(!e||!this.style)){this.optimizing=!0,k.info(this.$t("suno.message.optimizingStyle"));try{const t=await L.style({prompt:this.style},{token:e}),r=t.data?.text||t.data?.data?.text;r&&(this.style=r,k.success(this.$t("suno.message.optimizeStyleSuccess")))}catch{k.error(this.$t("suno.message.optimizeStyleFailed"))}finally{this.optimizing=!1}}}}}),vo={class:"field"},yo={class:"flex items-center justify-between mb-1"},bo={class:"flex items-center"},ko={class:"text-sm font-bold"},wo={class:"relative"},Co={class:"text-xs text-right text-[var(--el-text-color-secondary)] mt-1"},Vo={class:"style-tags"},To=["onClick"];function So(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-input");return n(),d("div",vo,[s("div",yo,[s("div",bo,[s("span",ko,a(e.$t("suno.name.style")),1),o(v,{content:e.$t("suno.description.style")},null,8,["content"])]),o(p,{size:"small",loading:e.optimizing,round:"",onClick:e.onOptimizeStyle},{default:i(()=>[e.optimizing?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.optimize_style")),1)]),_:1},8,["loading","onClick"])]),s("div",wo,[o(_,{modelValue:e.style,"onUpdate:modelValue":t[0]||(t[0]=b=>e.style=b),rows:2,type:"textarea",placeholder:e.$t("suno.placeholder.style")},null,8,["modelValue","placeholder"]),s("div",Co,a(e.style?.length||0)+"/1000",1)]),s("div",Vo,[(n(!0),d(M,null,z(e.visibleTags,b=>(n(),d("button",{key:b,class:"style-tag",onClick:S=>e.onTagClick(b)},a(b),9,To))),128)),s("button",{class:"style-tag style-tag-refresh",onClick:t[1]||(t[1]=(...b)=>e.onRefreshTags&&e.onRefreshTags(...b))},[o(f,{icon:"fa-solid fa-arrows-rotate"})])])])}const Ao=E(_o,[["render",So],["__scopeId","data-v-ddebb076"]]),Uo=P({name:"TitleInput",components:{ElInput:W,InfoIcon:F},computed:{title:{get(){return this.$store.state.suno?.config?.title},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,title:e})}}}}),Po={class:"field"},Eo={class:"flex items-center mb-1"},Io={class:"text-sm font-bold"};function Ro(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-input");return n(),d("div",Po,[s("div",Eo,[s("span",Io,a(e.$t("suno.name.title")),1),o(v,{content:e.$t("suno.description.title")},null,8,["content"])]),o(f,{modelValue:e.title,"onUpdate:modelValue":t[0]||(t[0]=p=>e.title=p),placeholder:e.$t("suno.placeholder.title")},null,8,["modelValue","placeholder"])])}const Lo=E(Uo,[["render",Ro]]),Mo=P({name:"ExtendFromInput",components:{ElImage:B,ElIcon:X,ElInputNumber:x,VideoPlay:ie,VideoPause:ne},data(){return{}},computed:{audio(){return this.$store.state.suno?.config?.audio},value:{get(){return this.$store.state.suno?.config?.continue_at},set(e){console.debug("set continue_at",e),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,continue_at:e?parseInt(e):void 0})}}},mounted(){this.value||(this.value=void 0)},methods:{handleChange(e){if(e===void 0){this.value=void 0;return}e<0?this.value=0:e>this.audio?.duration?this.value=this.audio?.duration:this.value=e},useFormatDuring:pe,onPlay(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"}),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"paused"}),console.log("on pause")},onClick(e){this.$store.state?.suno?.audio?.id!==e.id&&this.onPlay({...e,progress:0})}}}),Fo={class:"field"},zo={class:"box"},Do={class:"title font-bold"},Go={class:"input-wrapper"},jo={class:"task"},Bo={class:"left"},Oo={key:2,class:"duration"},No={class:"info"},Ho={class:"title"},Wo={class:"style"};function qo(e,t,r,c,y,w){const v=l("el-input-number"),f=l("el-image"),p=l("video-pause"),_=l("el-icon"),b=l("video-play"),S=O("loading");return n(),d("div",Fo,[s("div",zo,[s("h2",Do,a(e.$t("suno.name.extend")),1),s("div",Go,[o(v,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=h=>e.value=h),class:"value",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.extend.continue_at"),onChange:e.handleChange},null,8,["modelValue","max","placeholder","onChange"])])]),s("div",jo,[e.audio?(n(),d("div",{key:0,class:"audio",onClick:t[3]||(t[3]=h=>e.onClick(e.audio))},[j((n(),d("div",Bo,[o(f,{src:e.audio?.image_url,class:"cover",fit:"cover"},null,8,["src"]),e.audio?.audio_url&&e.$store.state?.suno?.audio?.id===e.audio.id&&e.$store.state?.suno?.audio?.state==="playing"?(n(),d("div",{key:0,class:"overlay",onClick:t[1]||(t[1]=h=>e.onPause(e.audio))},[o(_,null,{default:i(()=>[o(p)]),_:1})])):u("",!0),e.audio?.audio_url&&(e.$store.state?.suno?.audio?.id!==e.audio.id||e.$store.state?.suno?.audio?.id===e.audio.id&&e.$store.state?.suno?.audio?.state==="paused")?(n(),d("div",{key:1,class:"overlay",onClick:t[2]||(t[2]=h=>e.onPlay(e.audio))},[o(_,null,{default:i(()=>[o(b)]),_:1})])):u("",!0),e.audio?.duration?(n(),d("div",Oo,a(e.useFormatDuring(e.audio?.duration)),1)):u("",!0)])),[[S,!e.audio?.audio_url]]),s("div",No,[s("h2",Ho,a(e.audio?.title),1),s("p",Wo,a(e.audio?.style),1)])])):u("",!0)])])}const Ko=E(Mo,[["render",qo],["__scopeId","data-v-bcce4821"]]),Jo=P({name:"CoverFromInput",components:{ElImage:B,ElIcon:X,VideoPlay:ie,VideoPause:ne},data(){return{}},computed:{audio(){return this.$store.state.suno?.config?.audio},value:{get(){return this.$store.state.suno?.config?.continue_at},set(e){console.debug("set continue_at",e),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,continue_at:e?parseInt(e):void 0})}}},mounted(){this.value||(this.value=void 0)},methods:{handleChange(e){e<0?this.value=0:e>this.audio?.duration?this.value=this.audio?.duration:this.value=e},useFormatDuring:pe,onPlay(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"}),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"paused"}),console.log("on pause")},onClick(e){this.$store.state?.suno?.audio?.id!==e.id&&this.onPlay({...e,progress:0})}}}),Qo={class:"field"},Yo={class:"box"},Xo={class:"title font-bold"},Zo={class:"task"},xo={class:"left"},es={key:2,class:"duration"},ts={class:"info"},os={class:"title"},ss={class:"style"};function ns(e,t,r,c,y,w){const v=l("el-image"),f=l("video-pause"),p=l("el-icon"),_=l("video-play"),b=O("loading");return n(),d("div",Qo,[s("div",Yo,[s("h2",Xo,a(e.$t("suno.name.cover")),1)]),s("div",Zo,[e.audio?(n(),d("div",{key:0,class:"audio",onClick:t[2]||(t[2]=S=>e.onClick(e.audio))},[j((n(),d("div",xo,[o(v,{src:e.audio?.image_url,class:"cover",fit:"cover"},null,8,["src"]),e.audio?.audio_url&&e.$store.state?.suno?.audio?.id===e.audio.id&&e.$store.state?.suno?.audio?.state==="playing"?(n(),d("div",{key:0,class:"overlay",onClick:t[0]||(t[0]=S=>e.onPause(e.audio))},[o(p,null,{default:i(()=>[o(f)]),_:1})])):u("",!0),e.audio?.audio_url&&(e.$store.state?.suno?.audio?.id!==e.audio.id||e.$store.state?.suno?.audio?.id===e.audio.id&&e.$store.state?.suno?.audio?.state==="paused")?(n(),d("div",{key:1,class:"overlay",onClick:t[1]||(t[1]=S=>e.onPlay(e.audio))},[o(p,null,{default:i(()=>[o(_)]),_:1})])):u("",!0),e.audio?.duration?(n(),d("div",es,a(e.useFormatDuring(e.audio?.duration)),1)):u("",!0)])),[[b,!e.audio?.audio_url]]),s("div",ts,[s("h2",os,a(e.audio?.title),1),s("p",ss,a(e.audio?.style),1)])])):u("",!0)])])}const is=E(Jo,[["render",ns],["__scopeId","data-v-06640216"]]),as=P({name:"VocalGenderSelector",components:{ElRadioGroup:K,ElRadioButton:Z,InfoIcon:F},computed:{vocalGender:{get(){return this.$store.state.suno?.config?.vocal_gender||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,vocal_gender:e||void 0})}}}}),ls={class:"flex items-center mb-1"},rs={class:"text-sm font-bold"};function ds(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-radio-button"),p=l("el-radio-group");return n(),d("div",null,[s("div",ls,[s("span",rs,a(e.$t("suno.name.vocalGender")),1),o(v,{content:e.$t("suno.description.vocalGender")},null,8,["content"])]),o(p,{modelValue:e.vocalGender,"onUpdate:modelValue":t[0]||(t[0]=_=>e.vocalGender=_),size:"small"},{default:i(()=>[o(f,{value:""},{default:i(()=>[g(a(e.$t("suno.gender.auto")),1)]),_:1}),o(f,{value:"f"},{default:i(()=>[g(a(e.$t("suno.gender.female")),1)]),_:1}),o(f,{value:"m"},{default:i(()=>[g(a(e.$t("suno.gender.male")),1)]),_:1})]),_:1},8,["modelValue"])])}const us=E(as,[["render",ds]]),cs=P({name:"AdvancedParams",components:{ElCollapse:Qe,ElCollapseItem:Je,ElInput:W,ElSlider:Ke,ElRadioGroup:K,ElRadioButton:Z},data(){return{activeNames:[]}},computed:{config(){return this.$store.state.suno?.config},isV5OrAbove(){const e=this.config?.model||"";return["chirp-v5","chirp-v5-5"].includes(e)},styleNegative:{get(){return this.$store.state.suno?.config?.style_negative||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,style_negative:e||void 0})}},lyricPrompt:{get(){return this.$store.state.suno?.config?.lyric_prompt||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric_prompt:e||void 0})}},weirdness:{get(){return this.$store.state.suno?.config?.weirdness??0},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,weirdness:e||void 0})}},styleInfluence:{get(){return this.$store.state.suno?.config?.style_influence??50},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,style_influence:e})}},variationCategory:{get(){return this.$store.state.suno?.config?.variation_category||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,variation_category:e||void 0})}},audioWeight:{get(){return this.$store.state.suno?.config?.audio_weight??50},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,audio_weight:e})}},lyricsMode:{get(){return this.$store.state.suno?.config?.lyrics_mode||"manual"},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyrics_mode:e})}}}}),ps={key:0,class:"mb-3"},ms={class:"flex items-center mb-1"},fs={class:"text-xs font-bold"},hs={key:1,class:"mb-3"},gs={class:"flex items-center mb-1"},$s={class:"text-xs font-bold"},_s={key:2,class:"mb-3"},vs={class:"flex items-center justify-between mb-1"},ys={class:"text-xs font-bold"},bs={class:"text-xs text-[var(--el-text-color-secondary)]"},ks={key:3,class:"mb-3"},ws={class:"flex items-center justify-between mb-1"},Cs={class:"text-xs font-bold"},Vs={class:"text-xs text-[var(--el-text-color-secondary)]"},Ts={key:4,class:"mb-3"},Ss={class:"flex items-center mb-1"},As={class:"text-xs font-bold"},Us={key:5,class:"mb-3"},Ps={class:"flex items-center justify-between mb-1"},Es={class:"text-xs font-bold"},Is={class:"text-xs text-[var(--el-text-color-secondary)]"},Rs={key:6,class:"mb-3"},Ls={class:"flex items-center mb-1"},Ms={class:"text-xs font-bold"};function Fs(e,t,r,c,y,w){const v=l("el-input"),f=l("el-slider"),p=l("el-radio-button"),_=l("el-radio-group"),b=l("el-collapse-item"),S=l("el-collapse");return n(),$(S,{modelValue:e.activeNames,"onUpdate:modelValue":t[7]||(t[7]=h=>e.activeNames=h),class:"advanced-collapse"},{default:i(()=>[o(b,{title:e.$t("suno.name.advancedParams"),name:"advanced"},{default:i(()=>[e.config?.custom?(n(),d("div",ps,[s("div",ms,[s("span",fs,a(e.$t("suno.name.styleNegative")),1)]),o(v,{modelValue:e.styleNegative,"onUpdate:modelValue":t[0]||(t[0]=h=>e.styleNegative=h),size:"small",placeholder:e.$t("suno.placeholder.styleNegative")},null,8,["modelValue","placeholder"])])):u("",!0),e.config?.custom&&!e.config?.instrumental?(n(),d("div",hs,[s("div",gs,[s("span",$s,a(e.$t("suno.name.lyricPrompt")),1)]),o(v,{modelValue:e.lyricPrompt,"onUpdate:modelValue":t[1]||(t[1]=h=>e.lyricPrompt=h),size:"small",placeholder:e.$t("suno.placeholder.lyricPrompt")},null,8,["modelValue","placeholder"])])):u("",!0),e.config?.custom?(n(),d("div",_s,[s("div",vs,[s("span",ys,a(e.$t("suno.name.weirdness")),1),s("span",bs,a(e.weirdness??0),1)]),o(f,{modelValue:e.weirdness,"onUpdate:modelValue":t[2]||(t[2]=h=>e.weirdness=h),min:0,max:100,step:1},null,8,["modelValue"])])):u("",!0),e.config?.custom?(n(),d("div",ks,[s("div",ws,[s("span",Cs,a(e.$t("suno.name.styleInfluence")),1),s("span",Vs,a(e.styleInfluence??50),1)]),o(f,{modelValue:e.styleInfluence,"onUpdate:modelValue":t[3]||(t[3]=h=>e.styleInfluence=h),min:0,max:100,step:1},null,8,["modelValue"])])):u("",!0),e.isV5OrAbove?(n(),d("div",Ts,[s("div",Ss,[s("span",As,a(e.$t("suno.name.variationCategory")),1)]),o(_,{modelValue:e.variationCategory,"onUpdate:modelValue":t[4]||(t[4]=h=>e.variationCategory=h),size:"small"},{default:i(()=>[o(p,{value:""},{default:i(()=>[g(a(e.$t("suno.gender.auto")),1)]),_:1}),o(p,{value:"high"},{default:i(()=>[g(a(e.$t("suno.variation.high")),1)]),_:1}),o(p,{value:"low"},{default:i(()=>[g(a(e.$t("suno.variation.low")),1)]),_:1})]),_:1},8,["modelValue"])])):u("",!0),e.config?.action==="cover"?(n(),d("div",Us,[s("div",Ps,[s("span",Es,a(e.$t("suno.name.audioWeight")),1),s("span",Is,a(e.audioWeight??50),1)]),o(f,{modelValue:e.audioWeight,"onUpdate:modelValue":t[5]||(t[5]=h=>e.audioWeight=h),min:0,max:100,step:1},null,8,["modelValue"])])):u("",!0),e.config?.custom&&!e.config?.instrumental?(n(),d("div",Rs,[s("div",Ls,[s("span",Ms,a(e.$t("suno.name.lyricsMode")),1)]),o(_,{modelValue:e.lyricsMode,"onUpdate:modelValue":t[6]||(t[6]=h=>e.lyricsMode=h),size:"small"},{default:i(()=>[o(p,{value:"manual"},{default:i(()=>[g(a(e.$t("suno.lyricsMode.manual")),1)]),_:1}),o(p,{value:"auto"},{default:i(()=>[g(a(e.$t("suno.lyricsMode.auto")),1)]),_:1})]),_:1},8,["modelValue"])])):u("",!0)]),_:1},8,["title"])]),_:1},8,["modelValue"])}const zs=E(cs,[["render",Fs],["__scopeId","data-v-1e19b619"]]),Ds=P({name:"ReplaceSectionInput",components:{ElInputNumber:x,ElImage:B,InfoIcon:F},computed:{audio(){return this.$store.state.suno?.config?.audio},replaceSectionStart:{get(){return this.$store.state.suno?.config?.replace_section_start},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,replace_section_start:e})}},replaceSectionEnd:{get(){return this.$store.state.suno?.config?.replace_section_end},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,replace_section_end:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),Gs={class:"field"},js={class:"flex items-center mb-2"},Bs={class:"text-sm font-bold m-0"},Os={key:0,class:"task mb-2"},Ns={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},Hs={class:"info flex-1 min-w-0"},Ws={class:"text-sm font-bold m-0 truncate"},qs={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},Ks={class:"flex gap-2"};function Js(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-input-number"),_=O("loading");return n(),d("div",Gs,[s("div",js,[s("h2",Bs,a(e.$t("suno.name.replaceSection")),1),o(v,{content:e.$t("suno.description.replaceSection")},null,8,["content"])]),e.audio?(n(),d("div",Os,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=b=>e.onClick(e.audio))},[j((n(),d("div",Ns,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[_,!e.audio?.audio_url]]),s("div",Hs,[s("h2",Ws,a(e.audio?.title),1),s("p",qs,a(e.audio?.style),1)])])])):u("",!0),s("div",Ks,[o(p,{modelValue:e.replaceSectionStart,"onUpdate:modelValue":t[1]||(t[1]=b=>e.replaceSectionStart=b),class:"flex-1",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.replaceSectionStart")},null,8,["modelValue","max","placeholder"]),o(p,{modelValue:e.replaceSectionEnd,"onUpdate:modelValue":t[2]||(t[2]=b=>e.replaceSectionEnd=b),class:"flex-1",min:e.replaceSectionStart||0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.replaceSectionEnd")},null,8,["modelValue","min","max","placeholder"])])])}const Qs=E(Ds,[["render",Js]]),Ys=P({name:"OverpaintingInput",components:{ElInputNumber:x,ElImage:B,InfoIcon:F},computed:{audio(){return this.$store.state.suno?.config?.audio},overpaintingStart:{get(){return this.$store.state.suno?.config?.overpainting_start},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,overpainting_start:e})}},overpaintingEnd:{get(){return this.$store.state.suno?.config?.overpainting_end},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,overpainting_end:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),Xs={class:"field"},Zs={class:"flex items-center mb-2"},xs={class:"text-sm font-bold m-0"},en={key:0,class:"task mb-2"},tn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},on={class:"info flex-1 min-w-0"},sn={class:"text-sm font-bold m-0 truncate"},nn={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},an={class:"flex gap-2"};function ln(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-input-number"),_=O("loading");return n(),d("div",Xs,[s("div",Zs,[s("h2",xs,a(e.$t("suno.name.overpaintingRange")),1),o(v,{content:e.$t("suno.description.overpainting")},null,8,["content"])]),e.audio?(n(),d("div",en,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=b=>e.onClick(e.audio))},[j((n(),d("div",tn,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[_,!e.audio?.audio_url]]),s("div",on,[s("h2",sn,a(e.audio?.title),1),s("p",nn,a(e.audio?.style),1)])])])):u("",!0),s("div",an,[o(p,{modelValue:e.overpaintingStart,"onUpdate:modelValue":t[1]||(t[1]=b=>e.overpaintingStart=b),class:"flex-1",size:"small",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.overpaintingStart")},null,8,["modelValue","max","placeholder"]),o(p,{modelValue:e.overpaintingEnd,"onUpdate:modelValue":t[2]||(t[2]=b=>e.overpaintingEnd=b),class:"flex-1",size:"small",min:e.overpaintingStart||0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.overpaintingEnd")},null,8,["modelValue","min","max","placeholder"])])])}const rn=E(Ys,[["render",ln]]),dn=P({name:"UnderpaintingInput",components:{ElInputNumber:x,ElImage:B,InfoIcon:F},computed:{audio(){return this.$store.state.suno?.config?.audio},underpaintingStart:{get(){return this.$store.state.suno?.config?.underpainting_start},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,underpainting_start:e})}},underpaintingEnd:{get(){return this.$store.state.suno?.config?.underpainting_end},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,underpainting_end:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),un={class:"field"},cn={class:"flex items-center mb-2"},pn={class:"text-sm font-bold m-0"},mn={key:0,class:"task mb-2"},fn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},hn={class:"info flex-1 min-w-0"},gn={class:"text-sm font-bold m-0 truncate"},$n={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},_n={class:"flex gap-2"};function vn(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-input-number"),_=O("loading");return n(),d("div",un,[s("div",cn,[s("h2",pn,a(e.$t("suno.name.underpaintingRange")),1),o(v,{content:e.$t("suno.description.underpainting")},null,8,["content"])]),e.audio?(n(),d("div",mn,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=b=>e.onClick(e.audio))},[j((n(),d("div",fn,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[_,!e.audio?.audio_url]]),s("div",hn,[s("h2",gn,a(e.audio?.title),1),s("p",$n,a(e.audio?.style),1)])])])):u("",!0),s("div",_n,[o(p,{modelValue:e.underpaintingStart,"onUpdate:modelValue":t[1]||(t[1]=b=>e.underpaintingStart=b),class:"flex-1",size:"small",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.underpaintingStart")},null,8,["modelValue","max","placeholder"]),o(p,{modelValue:e.underpaintingEnd,"onUpdate:modelValue":t[2]||(t[2]=b=>e.underpaintingEnd=b),class:"flex-1",size:"small",min:e.underpaintingStart||0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.underpaintingEnd")},null,8,["modelValue","min","max","placeholder"])])])}const yn=E(dn,[["render",vn]]),bn=P({name:"SamplesInput",components:{ElInputNumber:x,ElImage:B,InfoIcon:F},computed:{audio(){return this.$store.state.suno?.config?.audio},samplesStart:{get(){return this.$store.state.suno?.config?.samples_start},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,samples_start:e})}},samplesEnd:{get(){return this.$store.state.suno?.config?.samples_end},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,samples_end:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),kn={class:"field"},wn={class:"flex items-center mb-2"},Cn={class:"text-sm font-bold m-0"},Vn={key:0,class:"task mb-2"},Tn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},Sn={class:"info flex-1 min-w-0"},An={class:"text-sm font-bold m-0 truncate"},Un={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},Pn={class:"flex gap-2"};function En(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-input-number"),_=O("loading");return n(),d("div",kn,[s("div",wn,[s("h2",Cn,a(e.$t("suno.name.samplesRange")),1),o(v,{content:e.$t("suno.description.samples")},null,8,["content"])]),e.audio?(n(),d("div",Vn,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=b=>e.onClick(e.audio))},[j((n(),d("div",Tn,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[_,!e.audio?.audio_url]]),s("div",Sn,[s("h2",An,a(e.audio?.title),1),s("p",Un,a(e.audio?.style),1)])])])):u("",!0),s("div",Pn,[o(p,{modelValue:e.samplesStart,"onUpdate:modelValue":t[1]||(t[1]=b=>e.samplesStart=b),class:"flex-1",size:"small",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.samplesStart")},null,8,["modelValue","max","placeholder"]),o(p,{modelValue:e.samplesEnd,"onUpdate:modelValue":t[2]||(t[2]=b=>e.samplesEnd=b),class:"flex-1",size:"small",min:e.samplesStart||0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.samplesEnd")},null,8,["modelValue","min","max","placeholder"])])])}const In=E(bn,[["render",En]]),Rn=[.5,.75,1,1.25,1.5,2],Ln=P({name:"AdjustSpeedInput",components:{ElRadioGroup:K,ElRadioButton:Z,ElImage:B,InfoIcon:F},data(){return{options:Rn}},computed:{audio(){return this.$store.state.suno?.config?.audio},speed:{get(){const e=this.$store.state.suno?.config?.speed;return typeof e=="number"?e:1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,speed:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),Mn={class:"field"},Fn={class:"flex items-center mb-2"},zn={class:"text-sm font-bold m-0"},Dn={key:0,class:"task mb-2"},Gn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},jn={class:"info flex-1 min-w-0"},Bn={class:"text-sm font-bold m-0 truncate"},On={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"};function Nn(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-radio-button"),_=l("el-radio-group"),b=O("loading");return n(),d("div",Mn,[s("div",Fn,[s("h2",zn,a(e.$t("suno.name.adjustSpeed")),1),o(v,{content:e.$t("suno.description.adjustSpeed")},null,8,["content"])]),e.audio?(n(),d("div",Dn,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=S=>e.onClick(e.audio))},[j((n(),d("div",Gn,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[b,!e.audio?.audio_url]]),s("div",jn,[s("h2",Bn,a(e.audio?.title),1),s("p",On,a(e.audio?.style),1)])])])):u("",!0),o(_,{modelValue:e.speed,"onUpdate:modelValue":t[1]||(t[1]=S=>e.speed=S),size:"small",class:"speed-group"},{default:i(()=>[(n(!0),d(M,null,z(e.options,S=>(n(),$(p,{key:S,value:S},{default:i(()=>[g(a(S)+"x",1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])}const Hn=E(Ln,[["render",Nn],["__scopeId","data-v-ba834628"]]),Wn=P({name:"VoiceCreateDialog",components:{ElDialog:se,ElForm:Xe,ElFormItem:Ye,ElInput:W,ElButton:G,ElRadioGroup:K,ElRadio:Oe},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","created"],data(){return{sourceType:"song",form:{name:"",description:"",audio_id:"",audio_url:""},loading:!1}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},token(){return this.$store.state.suno?.credential?.token},canSubmit(){return!(!this.form.name||this.sourceType==="song"&&!this.form.audio_id||this.sourceType==="upload"&&!this.form.audio_url)}},methods:{onClose(){this.visible=!1,this.resetForm()},resetForm(){this.form={name:"",description:"",audio_id:"",audio_url:""},this.sourceType="song"},async onSubmit(){if(this.token){this.loading=!0;try{this.sourceType==="song"?await L.persona({audio_id:this.form.audio_id,name:this.form.name,description:this.form.description},{token:this.token}):await L.voices({audio_url:this.form.audio_url,name:this.form.name,description:this.form.description},{token:this.token}),k.success(this.$t("suno.voice.createSuccess")),this.$emit("created"),this.onClose()}catch{k.error(this.$t("suno.voice.createFailed"))}finally{this.loading=!1}}}}});function qn(e,t,r,c,y,w){const v=l("el-input"),f=l("el-form-item"),p=l("el-radio"),_=l("el-radio-group"),b=l("el-form"),S=l("el-button"),h=l("el-dialog");return n(),$(h,{modelValue:e.visible,"onUpdate:modelValue":t[5]||(t[5]=V=>e.visible=V),title:e.$t("suno.voice.createTitle"),width:"480px","close-on-click-modal":!1,onClose:e.onClose},{footer:i(()=>[o(S,{onClick:e.onClose},{default:i(()=>[g(a(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),o(S,{type:"primary",loading:e.loading,disabled:!e.canSubmit,onClick:e.onSubmit},{default:i(()=>[g(a(e.$t("suno.voice.create")),1)]),_:1},8,["loading","disabled","onClick"])]),default:i(()=>[o(b,{"label-position":"top",class:"voice-create-form"},{default:i(()=>[o(f,{label:e.$t("suno.voice.name")},{default:i(()=>[o(v,{modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=V=>e.form.name=V),placeholder:e.$t("suno.voice.namePlaceholder"),maxlength:"50"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(f,{label:e.$t("suno.voice.description")},{default:i(()=>[o(v,{modelValue:e.form.description,"onUpdate:modelValue":t[1]||(t[1]=V=>e.form.description=V),type:"textarea",rows:2,placeholder:e.$t("suno.voice.descriptionPlaceholder"),maxlength:"200"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(f,{label:e.$t("suno.voice.sourceType")},{default:i(()=>[o(_,{modelValue:e.sourceType,"onUpdate:modelValue":t[2]||(t[2]=V=>e.sourceType=V),class:"w-full"},{default:i(()=>[o(p,{value:"song"},{default:i(()=>[g(a(e.$t("suno.voice.fromSong")),1)]),_:1}),o(p,{value:"upload"},{default:i(()=>[g(a(e.$t("suno.voice.fromUpload")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.sourceType==="song"?(n(),$(f,{key:0,label:e.$t("suno.voice.audioId")},{default:i(()=>[o(v,{modelValue:e.form.audio_id,"onUpdate:modelValue":t[3]||(t[3]=V=>e.form.audio_id=V),placeholder:e.$t("suno.voice.audioIdPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):u("",!0),e.sourceType==="upload"?(n(),$(f,{key:1,label:e.$t("suno.voice.audioUrl")},{default:i(()=>[o(v,{modelValue:e.form.audio_url,"onUpdate:modelValue":t[4]||(t[4]=V=>e.form.audio_url=V),placeholder:e.$t("suno.voice.audioUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):u("",!0)]),_:1})]),_:1},8,["modelValue","title","onClose"])}const Kn=E(Wn,[["render",qn]]),Jn=P({name:"VoiceManager",components:{ElButton:G,ElIcon:X,ElTabs:de,ElTabPane:re,ElTooltip:ue,Loading:ke,FontAwesomeIcon:D,VoiceCreateDialog:Kn},data(){return{showCreateDialog:!1,loading:!1,deletingId:null,activeTab:"all"}},computed:{personas(){return this.$store.state.suno?.personas||[]},favoriteIds(){return this.$store.state.suno?.favoritePersonaIds||[]},favoritePersonas(){return this.personas.filter(e=>e.persona_id&&this.favoriteIds.includes(e.persona_id))},visiblePersonas(){return this.activeTab==="favorites"?this.favoritePersonas:this.personas},selectedPersonaId(){return this.$store.state.suno?.config?.persona_id}},watch:{"$store.state.suno.credential":{handler(){this.loadPersonas()},immediate:!0}},methods:{isFavorite(e){return!!e&&this.favoriteIds.includes(e)},onToggleFavorite(e){e.persona_id&&this.$store.commit("suno/togglePersonaFavorite",e.persona_id)},async loadPersonas(){if(this.$store.state.suno?.credential?.token){this.loading=!0;try{await this.$store.dispatch("suno/getPersonas")}finally{this.loading=!1}}},selectPersona(e){const t={...this.$store.state.suno?.config};t.persona_id===e.persona_id?t.persona_id=void 0:t.persona_id=e.persona_id,this.$store.dispatch("suno/setConfig",t)},async onDelete(e){try{await ce.confirm(this.$t("suno.voice.confirmDelete"),this.$t("suno.voice.delete"),{type:"warning",confirmButtonText:this.$t("common.button.confirm"),cancelButtonText:this.$t("common.button.cancel")})}catch{return}if(!e.persona_id)return;this.deletingId=e.persona_id;const t=await this.$store.dispatch("suno/deletePersona",e.persona_id);if(this.deletingId=null,t){if(k.success(this.$t("suno.voice.deleteSuccess")),this.selectedPersonaId===e.persona_id){const r={...this.$store.state.suno?.config,persona_id:void 0};this.$store.dispatch("suno/setConfig",r)}this.favoriteIds.includes(e.persona_id)&&this.$store.commit("suno/togglePersonaFavorite",e.persona_id)}else k.error(this.$t("suno.voice.deleteFailed"))},async onCreated(){await this.loadPersonas()}}}),Qn={class:"voice-manager"},Yn={class:"flex items-center justify-between mb-3"},Xn={class:"text-sm font-medium"},Zn={key:0,class:"text-center py-6"},xn={key:1,class:"text-center py-6 text-gray-400 text-sm"},ei={key:2,class:"voice-list"},ti=["onClick"],oi={class:"flex-1 min-w-0"},si={class:"voice-name"},ni={key:0,class:"voice-desc"};function ii(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("el-button"),p=l("el-tab-pane"),_=l("el-tabs"),b=l("loading"),S=l("el-icon"),h=l("el-tooltip"),V=l("voice-create-dialog");return n(),d("div",Qn,[s("div",Yn,[s("span",Xn,a(e.$t("suno.voice.title")),1),o(f,{type:"primary",size:"small",onClick:t[0]||(t[0]=C=>e.showCreateDialog=!0)},{default:i(()=>[o(v,{icon:"fa-solid fa-plus",class:"mr-1"}),g(" "+a(e.$t("suno.voice.create")),1)]),_:1})]),o(_,{modelValue:e.activeTab,"onUpdate:modelValue":t[1]||(t[1]=C=>e.activeTab=C),class:"voice-tabs",size:"small"},{default:i(()=>[o(p,{name:"all",label:e.$t("suno.voice.tabAll")+" ("+(e.personas?.length||0)+")"},null,8,["label"]),o(p,{name:"favorites",label:e.$t("suno.voice.tabFavorites")+" ("+e.favoritePersonas.length+")"},null,8,["label"])]),_:1},8,["modelValue"]),e.loading?(n(),d("div",Zn,[o(S,{class:"is-loading"},{default:i(()=>[o(b)]),_:1})])):e.visiblePersonas.length===0?(n(),d("div",xn,a(e.activeTab==="favorites"?e.$t("suno.voice.emptyFavorites"):e.$t("suno.voice.empty")),1)):(n(),d("div",ei,[(n(!0),d(M,null,z(e.visiblePersonas,C=>(n(),d("div",{key:C.persona_id,class:H(["voice-item",{active:e.selectedPersonaId===C.persona_id}]),onClick:I=>e.selectPersona(C)},[s("div",oi,[s("div",si,[o(v,{icon:C.source_type==="voice"?"fa-solid fa-microphone":"fa-solid fa-music",class:"mr-1.5 text-xs opacity-60"},null,8,["icon"]),g(" "+a(C.name||C.persona_id),1)]),C.description?(n(),d("div",ni,a(C.description),1)):u("",!0)]),s("div",{class:"voice-actions",onClick:t[2]||(t[2]=U(()=>{},["stop"]))},[o(h,{content:e.isFavorite(C.persona_id)?e.$t("suno.voice.unfavorite"):e.$t("suno.voice.favorite"),placement:"top"},{default:i(()=>[o(f,{size:"small",text:"",class:H({"voice-fav-active":e.isFavorite(C.persona_id)}),onClick:I=>e.onToggleFavorite(C)},{default:i(()=>[o(v,{icon:e.isFavorite(C.persona_id)?"fa-solid fa-star":"fa-regular fa-star"},null,8,["icon"])]),_:2},1032,["class","onClick"])]),_:2},1032,["content"]),o(f,{type:"danger",size:"small",text:"",loading:e.deletingId===C.persona_id,onClick:I=>e.onDelete(C)},{default:i(()=>[o(v,{icon:"fa-solid fa-trash"})]),_:1},8,["loading","onClick"])])],10,ti))),128))])),o(V,{modelValue:e.showCreateDialog,"onUpdate:modelValue":t[3]||(t[3]=C=>e.showCreateDialog=C),onCreated:e.onCreated},null,8,["modelValue","onCreated"])])}const ai=E(Jn,[["render",ii],["__scopeId","data-v-8b8e36d9"]]),li=P({name:"PersonaInput",components:{ElSelect:le,ElOption:ae,ElButton:G,ElDrawer:be,FontAwesomeIcon:D,InfoIcon:F,VoiceManager:ai},data(){return{showManager:!1}},computed:{personaId:{get(){return this.$store.state.suno?.config?.persona_id||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,persona_id:e||void 0})}},personas(){return this.$store.state.suno?.personas||[]}}}),ri={class:"field"},di={class:"flex items-center justify-between mb-2"},ui={class:"flex items-center"},ci={class:"text-sm font-bold"},pi={class:"flex items-center justify-between w-full"},mi={key:0,class:"text-xs text-gray-400 ml-2"};function fi(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-option"),b=l("el-select"),S=l("voice-manager"),h=l("el-drawer");return n(),d("div",ri,[s("div",di,[s("div",ui,[s("span",ci,a(e.$t("suno.name.persona")),1),o(v,{content:e.$t("suno.description.persona")},null,8,["content"])]),o(p,{size:"small",round:"",onClick:t[0]||(t[0]=V=>e.showManager=!0)},{default:i(()=>[o(f,{icon:"fa-solid fa-microphone",class:"mr-1"}),g(" "+a(e.$t("suno.voice.manage")),1)]),_:1})]),o(b,{modelValue:e.personaId,"onUpdate:modelValue":t[1]||(t[1]=V=>e.personaId=V),placeholder:e.$t("suno.placeholder.personaId"),clearable:"",filterable:"",class:"w-full"},{default:i(()=>[(n(!0),d(M,null,z(e.personas,V=>(n(),$(_,{key:V.persona_id||"",value:V.persona_id||"",label:V.name||V.persona_id||""},{default:i(()=>[s("div",pi,[s("span",null,a(V.name||V.persona_id),1),V.source_type?(n(),d("span",mi,a(V.source_type),1)):u("",!0)])]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"]),o(h,{modelValue:e.showManager,"onUpdate:modelValue":t[2]||(t[2]=V=>e.showManager=V),title:e.$t("suno.voice.title"),size:"380px",direction:"rtl"},{default:i(()=>[o(S)]),_:1},8,["modelValue","title"])])}const hi=E(li,[["render",fi]]),gi=P({name:"PresetPanel",components:{TypeSelector:Ct,PromptInput:eo,LyricInput:go,StyleInput:Ao,TitleInput:Lo,ExtendFromInput:Ko,CoverFromInput:is,UploadAudio:Kt,VocalGenderSelector:us,AdvancedParams:zs,ReplaceSectionInput:Qs,OverpaintingInput:rn,UnderpaintingInput:yn,SamplesInput:In,AdjustSpeedInput:Hn,PersonaInput:hi,FontAwesomeIcon:D,ElButton:G,ElTabs:de,ElTabPane:re,Consumption:Ze},emits:["generate"],computed:{config(){return this.$store.state.suno?.config},mode:{get(){return this.$store.state.suno?.config?.custom?"custom":"simple"},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,custom:e==="custom"})}},consumption(){return xe(this.config,this.service?.cost)},service(){return this.$store.state.suno?.service},supportsVocalGender(){const e=this.config?.model||"";return["chirp-v4-5-plus","chirp-v5","chirp-v5-5"].includes(e)},supportsPersona(){const e=this.config?.action;return!e||e==="generate"||e==="artist_consistency"||e==="artist_consistency_vox"},generateButtonText(){const e=this.config?.action;return e==="extend"?this.$t("suno.button.extend"):e==="cover"?this.$t("suno.button.cover_music"):e==="remaster"?this.$t("suno.button.remaster"):e==="replace_section"?this.$t("suno.button.replace_section"):e==="mashup"?this.$t("suno.button.mashup"):e==="stems"?this.$t("suno.button.get_stems"):e==="concat"?this.$t("suno.button.concat_music"):e==="upload_cover"?this.$t("suno.button.upload_cover"):e==="artist_consistency"?this.$t("suno.button.artist_consistency"):e==="artist_consistency_vox"?this.$t("suno.button.artist_consistency_vox"):e==="overpainting"?this.$t("suno.button.overpainting"):e==="underpainting"?this.$t("suno.button.underpainting"):e==="samples"?this.$t("suno.button.samples"):e==="adjust_speed"?this.$t("suno.button.adjust_speed"):this.$t("suno.button.generate")}},methods:{onGenerate(){this.$emit("generate")},onClearAll(){this.$store.commit("suno/setConfig",{custom:!1,sounds:!1,instrumental:!1,lyric:"",style:"",title:"",lyrics_mode:"manual",model:this.$store.state.suno?.config?.model})}}}),$i={class:"flex flex-col h-full"},_i={class:"flex-1 overflow-y-auto p-5"},vi={class:"pt-2 px-1"},yi={class:"pt-2 px-1"},bi={class:"flex flex-col items-center justify-center px-5 pb-5 gap-2"},ki={class:"flex gap-2 w-full"};function wi(e,t,r,c,y,w){const v=l("type-selector"),f=l("upload-audio"),p=l("prompt-input"),_=l("extend-from-input"),b=l("cover-from-input"),S=l("replace-section-input"),h=l("overpainting-input"),V=l("underpainting-input"),C=l("samples-input"),I=l("adjust-speed-input"),A=l("advanced-params"),N=l("el-tab-pane"),q=l("lyric-input"),J=l("style-input"),Q=l("title-input"),m=l("vocal-gender-selector"),T=l("persona-input"),R=l("el-tabs"),oe=l("consumption"),me=l("font-awesome-icon"),fe=l("el-button");return n(),d("div",$i,[s("div",_i,[o(R,{modelValue:e.mode,"onUpdate:modelValue":t[0]||(t[0]=Se=>e.mode=Se),class:"suno-mode-tabs",stretch:""},{default:i(()=>[o(N,{label:e.$t("suno.mode.simple"),name:"simple"},{default:i(()=>[s("div",vi,[o(v,{class:"mb-4"}),o(f,{class:"mb-4"}),o(p,{class:"mb-4"}),e.config?.action==="extend"?(n(),$(_,{key:0,class:"mb-4"})):u("",!0),e.config?.action==="cover"?(n(),$(b,{key:1,class:"mb-4"})):u("",!0),e.config?.action==="replace_section"?(n(),$(S,{key:2,class:"mb-4"})):u("",!0),e.config?.action==="overpainting"?(n(),$(h,{key:3,class:"mb-4"})):u("",!0),e.config?.action==="underpainting"?(n(),$(V,{key:4,class:"mb-4"})):u("",!0),e.config?.action==="samples"?(n(),$(C,{key:5,class:"mb-4"})):u("",!0),e.config?.action==="adjust_speed"?(n(),$(I,{key:6,class:"mb-4"})):u("",!0),o(A,{class:"mb-4"})])]),_:1},8,["label"]),o(N,{label:e.$t("suno.mode.custom"),name:"custom"},{default:i(()=>[s("div",yi,[o(v,{class:"mb-4"}),o(f,{class:"mb-4"}),e.config?.instrumental?u("",!0):(n(),$(q,{key:0,class:"mb-4"})),o(J,{class:"mb-4"}),o(Q,{class:"mb-4"}),!e.config?.instrumental&&e.supportsVocalGender?(n(),$(m,{key:1,class:"mb-4"})):u("",!0),e.supportsPersona?(n(),$(T,{key:2,class:"mb-4"})):u("",!0),e.config?.action==="extend"?(n(),$(_,{key:3,class:"mb-4"})):u("",!0),e.config?.action==="cover"?(n(),$(b,{key:4,class:"mb-4"})):u("",!0),e.config?.action==="replace_section"?(n(),$(S,{key:5,class:"mb-4"})):u("",!0),e.config?.action==="overpainting"?(n(),$(h,{key:6,class:"mb-4"})):u("",!0),e.config?.action==="underpainting"?(n(),$(V,{key:7,class:"mb-4"})):u("",!0),e.config?.action==="samples"?(n(),$(C,{key:8,class:"mb-4"})):u("",!0),e.config?.action==="adjust_speed"?(n(),$(I,{key:9,class:"mb-4"})):u("",!0),o(A,{class:"mb-4"})])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),s("div",bi,[o(oe,{value:e.consumption,service:e.service},null,8,["value","service"]),s("div",ki,[o(fe,{class:"flex-1",onClick:e.onClearAll},{default:i(()=>[o(me,{icon:"fa-solid fa-broom",class:"mr-1"}),g(" "+a(e.$t("suno.button.clear_all")),1)]),_:1},8,["onClick"]),o(fe,{type:"primary",class:"flex-1",round:"",onClick:e.onGenerate},{default:i(()=>[o(me,{icon:"fa-solid fa-magic",class:"mr-2"}),g(" "+a(e.generateButtonText),1)]),_:1},8,["onClick"])])])])}const Ci=E(gi,[["render",wi],["__scopeId","data-v-c62324e6"]]),ye=we("suno"),Vi=P({name:"TaskPreview",components:{ElImage:B,ElIcon:X,ElTooltip:ue,FontAwesomeIcon:D,VideoPlay:ie,VideoPause:ne,ElDropdown:Te,ElDropdownMenu:Ve,ElDropdownItem:Ce,ElInput:W,ElProgress:tt,ElCheckbox:et,Loading:ke,ApiCodeDialog:Ge},props:{modelValue:{type:Object,required:!0}},data(){return{isFetchingVideoUrl:!1,isFetchingWav:!1,isFetchingMidi:!1,editingAudioId:null,editingTitle:"",apiCodeVisible:!1,apiCodePath:"/suno/audios",apiCodeBody:{}}},computed:{loading(){return this.$store.state.suno?.status?.getApplications===Y.Request},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},task(){return this.$store.state.suno?.tasks},audios(){const e=this.modelValue?.response?.data??[],t=this.modelValue?.request?.action;return t?e.map(r=>({...r,action:t})):e},application(){return this.$store.state.suno?.application},active(){return this.$store.state.suno?.tasks?.active},isMashupMode(){return this.$store.state.suno?.config?.action==="mashup"},mashupAudioIds(){return this.$store.state.suno?.config?.mashup_audio_ids||[]}},methods:{useFormatDuring:pe,onViewCode(){const e=this.modelValue?.request||{},t={};Object.entries(e).forEach(([r,c])=>{r==="application_id"||r==="callback_url"||c!=null&&(typeof c=="string"&&c===""||Array.isArray(c)&&c.length===0||(t[r]=c))}),this.apiCodeBody=t,this.apiCodePath="/suno/audios",this.apiCodeVisible=!0},onPlay(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"}),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"paused"}),console.log("on pause")},onClick(e){this.$store.state?.suno?.audio?.id!==e.id&&this.onPlay({...e,progress:0})},onExtend(e,t){e.stopPropagation(),console.log("on extend"),console.debug("set config",t),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:t.model,custom:!0,instrumental:!1,style:t.style,action:"extend",audio:t,audio_id:t.id,continue_at:t.duration})},onDownload(e,t){e&&e.stopPropagation(),console.log("on download",t);const c=new URL(t).pathname,y=c.substring(c.lastIndexOf("/")+1);console.log("on preview",y),fetch(t).then(w=>w.blob()).then(w=>{he.saveAs(w,y)})},async handleVideoDownload(e){if(e.video_url){this.onDownload(null,e.video_url);return}if(!this.isFetchingVideoUrl)try{this.isFetchingVideoUrl=!0;const t=await this.fetchVideoUrlFromApi(e?.id);console.log(`get videoUrl: ${t}`),e.video_url=t,this.onDownload(null,t)}catch(t){console.error("get videoUrl failed:",t),k.error(this.$t("suno.message.getVideoUrlFailed"))}finally{this.isFetchingVideoUrl=!1}},async fetchVideoUrlFromApi(e){return new Promise((t,r)=>{const c={audio_id:e},y=this.credential?.token;if(!y){console.error("no token specified"),r(new Error("No token specified"));return}L.mp4(c,{token:y}).then(w=>{const v=w.data?.data?.video_url;v?t(v):r(new Error("Video URL not found in response"))}).catch(w=>{r(w)})})},onPreview(e,t){e.stopPropagation(),console.log("on preview",t),window.open(t,"_blank")},async onGetStems(e){await this.onGenerateAudioUrl("stems",e)},onCover(e){console.log("on cover"),console.debug("set config",e),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,instrumental:!1,style:e.style,action:"cover",audio:e,audio_id:e.id})},async onConcatMusic(e){await this.onGenerateAudioUrl("concat",e)},async onRemaster(e){await this.onGenerateAudioUrl("remaster",e)},async onGetAllStems(e){await this.onGenerateAudioUrl("all_stems",e)},onReplaceSection(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,instrumental:!1,style:e.style,action:"replace_section",audio:e,audio_id:e.id,replace_section_start:0,replace_section_end:Math.min(30,e.duration||30)})},onMashup(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"mashup",audio:e,audio_id:e.id,mashup_audio_ids:[e.id]})},onOverpainting(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"overpainting",audio:e,audio_id:e.id,overpainting_start:0,overpainting_end:Math.min(30,e.duration||30)})},onUnderpainting(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"underpainting",audio:e,audio_id:e.id,underpainting_start:0,underpainting_end:Math.min(30,e.duration||30)})},onSamples(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"samples",audio:e,audio_id:e.id,samples_start:0,samples_end:Math.min(30,e.duration||30)})},onArtistConsistency(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"artist_consistency",audio:e,audio_id:e.id})},onAdjustSpeed(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"adjust_speed",audio:e,audio_id:e.id,speed:1})},onReusePrompt(e){const t=this.modelValue?.request??{};if(!(t.prompt||t.lyric||t.style||t.title||t.lyric_prompt||t.style_negative||t.persona_id)){k.warning(this.$t("suno.message.reusePromptEmpty"));return}this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:t.model??e.model,custom:t.custom??!1,instrumental:t.instrumental??!1,prompt:t.prompt??"",lyric:t.lyric??"",lyric_prompt:t.lyric_prompt??"",lyrics_mode:t.lyrics_mode??"manual",title:t.title??"",style:t.style??"",style_negative:t.style_negative??"",vocal_gender:t.vocal_gender,weirdness:t.weirdness,style_influence:t.style_influence,variation_category:t.variation_category,audio_weight:t.audio_weight,persona_id:t.persona_id,action:void 0,audio:void 0,audio_id:void 0,mashup_audio_ids:void 0,continue_at:void 0,speed:void 0,replace_section_start:void 0,replace_section_end:void 0,overpainting_start:void 0,overpainting_end:void 0,underpainting_start:void 0,underpainting_end:void 0,samples_start:void 0,samples_end:void 0}),k.success(this.$t("suno.message.reusePromptSuccess"))},async onExtractVocals(e){const t=this.credential?.token;t&&(k.info(this.$t("suno.message.extractingVocals")),L.vox({audio_id:e,callback_url:ye},{token:t}).then(()=>{k.success(this.$t("suno.message.extractVocalsSuccess"))}).catch(r=>{k.error(r?.response?.data?.error?.message||this.$t("suno.message.extractVocalsFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()}))},async onGetTiming(e){const t=this.credential?.token;t&&(k.info(this.$t("suno.message.fetchingTiming")),L.timing({audio_id:e},{token:t}).then(r=>{k.success(this.$t("suno.message.fetchTimingSuccess")),console.debug("timing data",r.data)}).catch(r=>{k.error(r?.response?.data?.error?.message||this.$t("suno.message.fetchTimingFailed"))}))},async handleWavDownload(e){if(!e?.id||this.isFetchingWav)return;const t=this.credential?.token;if(t)try{this.isFetchingWav=!0,k.info(this.$t("suno.message.fetchingWav"));const c=(await L.wav({audio_id:e.id},{token:t})).data?.data?.[0]?.file_url;c?this.onDownload(null,c):k.error(this.$t("suno.message.fetchWavFailed"))}catch(r){const c=r?.response?.data?.error?.message;k.error(c||this.$t("suno.message.fetchWavFailed"))}finally{this.isFetchingWav=!1}},async handleMidiDownload(e){if(!e?.id||this.isFetchingMidi)return;const t=this.credential?.token;if(t)try{this.isFetchingMidi=!0,k.info(this.$t("suno.message.fetchingMidi"));const c=(await L.midi({audio_id:e.id},{token:t})).data?.data;if(!c?.length){k.error(this.$t("suno.message.fetchMidiFailed"));return}const y=(e.title||e.id||"suno").replace(/[^\w.-]+/g,"_")+".json",w=new Blob([JSON.stringify(c,null,2)],{type:"application/json"});he.saveAs(w,y)}catch(r){const c=r?.response?.data?.error?.message;k.error(c||this.$t("suno.message.fetchMidiFailed"))}finally{this.isFetchingMidi=!1}},async onGenerateAudioUrl(e,t){const r={action:e,audio_id:t,callback_url:ye},c=this.credential?.token;if(!c){console.error("no token specified");return}k.info(this.$t("suno.message.startingTask")),L.audio(r,{token:c}).then(()=>{k.success(this.$t("suno.message.startTaskSuccess"))}).catch(y=>{k.error(y?.response?.data?.error?.message||this.$t("suno.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})},isMashupSelected(e){return!!e.id&&this.mashupAudioIds.includes(e.id)},onToggleMashup(e){if(!e.id)return;const t=[...this.mashupAudioIds],r=t.indexOf(e.id);r!==-1?t.splice(r,1):t.push(e.id),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,mashup_audio_ids:t})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".tasks");e&&(e.scrollTop=e.scrollHeight)},1e3)},onStartTitleEdit(e){this.editingAudioId=e.id??null,this.editingTitle=e.title||"",this.$nextTick(()=>{this.$refs.titleInput?.focus?.()})},onSaveTitleEdit(e){if(this.editingAudioId!==e.id)return;const t=this.editingTitle.trim();if(t&&t!==e.title){const r=this.$store.state.suno?.tasks;if(r?.items)for(const c of r.items){const w=(c?.response?.data??[]).find(v=>v.id===e.id);if(w){w.title=t;break}}}this.editingAudioId=null,this.editingTitle=""},onCancelTitleEdit(){this.editingAudioId=null,this.editingTitle=""},async onDelete(e){try{await ce.confirm(this.$t("suno.message.confirmDelete"),{confirmButtonText:this.$t("suno.button.delete"),cancelButtonText:this.$t("common.button.cancel"),type:"warning"})}catch{return}const t=this.$store.state.suno?.tasks;if(t?.items)for(const r of t.items){const c=r?.response?.data??[],y=c.findIndex(w=>w.id===e.id);if(y!==-1){if(c.splice(y,1),c.length===0){const w=t.items.indexOf(r);w!==-1&&t.items.splice(w,1)}break}}this.$store.state?.suno?.audio?.id===e.id&&this.$store.dispatch("suno/setAudio",null),k.success(this.$t("suno.message.deleteSuccess"))},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("suno/getTasks",{limit:30,offset:0})}}}),Ti={class:"task"},Si=["onClick"],Ai=["onClick"],Ui={class:"left"},Pi=["onClick"],Ei=["onClick"],Ii={key:2,class:"duration"},Ri={class:"info"},Li={key:1,class:"title-row"},Mi={class:"title"},Fi={class:"style"},zi={key:2,class:"progress-row"},Di={class:"progress-text"},Gi={class:"right"},ji={class:"el-dropdown-link"},Bi={class:"flex items-center min-w-[120px]"},Oi={class:"flex items-center min-w-[120px]"},Ni={class:"flex items-center min-w-[120px]"},Hi={class:"el-dropdown-link"};function Wi(e,t,r,c,y,w){const v=l("el-checkbox"),f=l("el-image"),p=l("video-pause"),_=l("el-icon"),b=l("video-play"),S=l("el-input"),h=l("font-awesome-icon"),V=l("el-progress"),C=l("el-tooltip"),I=l("Loading"),A=l("el-dropdown-item"),N=l("el-dropdown-menu"),q=l("el-dropdown"),J=l("api-code-dialog"),Q=O("loading");return n(),d("div",Ti,[(n(!0),d(M,null,z(e.audios,m=>(n(),d("div",{key:m.id,class:H(["audio",{"mashup-selected":e.isMashupSelected(m)}]),onClick:U(T=>e.onClick(m),["stop"])},[e.isMashupMode&&m?.audio_url?(n(),d("div",{key:0,class:"mashup-check",onClick:U(T=>e.onToggleMashup(m),["stop"])},[o(v,{"model-value":e.isMashupSelected(m),onClick:t[0]||(t[0]=U(()=>{},["stop"]))},null,8,["model-value"])],8,Ai)):u("",!0),j((n(),d("div",Ui,[o(f,{src:m?.image_url,class:"cover",fit:"cover",lazy:""},null,8,["src"]),m?.audio_url&&e.$store.state?.suno?.audio?.id===m.id&&e.$store.state?.suno?.audio?.state==="playing"?(n(),d("div",{key:0,class:"overlay",onClick:U(T=>e.onPause(m),["stop"])},[o(_,null,{default:i(()=>[o(p)]),_:1})],8,Pi)):u("",!0),m?.audio_url&&(e.$store.state?.suno?.audio?.id!==m.id||e.$store.state?.suno?.audio?.id===m.id&&e.$store.state?.suno?.audio?.state==="paused")?(n(),d("div",{key:1,class:"overlay",onClick:U(T=>e.onPlay(m),["stop"])},[o(_,null,{default:i(()=>[o(b)]),_:1})],8,Ei)):u("",!0),m?.duration?(n(),d("div",Ii,a(e.useFormatDuring(m?.duration)),1)):u("",!0)])),[[Q,!m?.audio_url]]),s("div",Ri,[e.editingAudioId===m.id?(n(),d("div",{key:0,class:"title-edit",onClick:t[2]||(t[2]=U(()=>{},["stop"]))},[o(S,{ref_for:!0,ref:"titleInput",modelValue:e.editingTitle,"onUpdate:modelValue":t[1]||(t[1]=T=>e.editingTitle=T),size:"small",onKeyup:[te(T=>e.onSaveTitleEdit(m),["enter"]),te(e.onCancelTitleEdit,["escape"])],onBlur:T=>e.onSaveTitleEdit(m)},null,8,["modelValue","onKeyup","onBlur"])])):(n(),d("div",Li,[s("h2",Mi,a(m?.title),1),m?.audio_url?(n(),$(h,{key:0,icon:"fa-solid fa-pen",class:"edit-icon",onClick:U(T=>e.onStartTitleEdit(m),["stop"])},null,8,["onClick"])):u("",!0)])),s("p",Fi,a(m?.style),1),!m?.audio_url&&m?.progress!=null&&m?.progress<100?(n(),d("div",zi,[o(V,{percentage:Math.round(m.progress),"stroke-width":4,"show-text":!1,status:"warning",class:"progress-bar"},null,8,["percentage"]),s("span",Di,a(e.$t("suno.name.generating"))+" "+a(Math.round(m.progress))+"%",1)])):u("",!0)]),s("div",Gi,[o(q,null,{dropdown:i(()=>[o(N,null,{default:i(()=>[o(A,{disabled:e.isFetchingVideoUrl,onClick:T=>e.handleVideoDownload(m)},{default:i(()=>[s("div",Bi,[e.isFetchingVideoUrl?(n(),$(_,{key:0,class:"is-loading mr-2"},{default:i(()=>[o(I)]),_:1})):u("",!0),s("span",null,a(e.$t("suno.button.download_video")),1)])]),_:1},8,["disabled","onClick"]),m?.audio_url?(n(),$(A,{key:0,onClick:U(T=>e.onDownload(T,m?.audio_url),["stop"])},{default:i(()=>[g(a(e.$t("suno.button.download_audio")),1)]),_:1},8,["onClick"])):u("",!0),o(A,{disabled:e.isFetchingWav,onClick:T=>e.handleWavDownload(m)},{default:i(()=>[s("div",Oi,[e.isFetchingWav?(n(),$(_,{key:0,class:"is-loading mr-2"},{default:i(()=>[o(I)]),_:1})):u("",!0),s("span",null,a(e.$t("suno.button.download_wav")),1)])]),_:1},8,["disabled","onClick"]),o(A,{disabled:e.isFetchingMidi,onClick:T=>e.handleMidiDownload(m)},{default:i(()=>[s("div",Ni,[e.isFetchingMidi?(n(),$(_,{key:0,class:"is-loading mr-2"},{default:i(()=>[o(I)]),_:1})):u("",!0),s("span",null,a(e.$t("suno.button.download_midi")),1)])]),_:1},8,["disabled","onClick"])]),_:2},1024)]),default:i(()=>[s("span",ji,[o(C,{effect:"dark",content:e.$t("suno.button.download"),placement:"top"},{default:i(()=>[m?.audio_url||m?.video_url?(n(),$(h,{key:0,icon:"fa-solid fa-download",class:"icon icon-download"})):u("",!0)]),_:2},1032,["content"])])]),_:2},1024),o(q,null,{dropdown:i(()=>[o(N,{class:"suno-action-menu"},{default:i(()=>[m?.audio_url?(n(),$(A,{key:0,onClick:U(T=>e.onExtend(T,m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-forward",class:"menu-icon"}),g(" "+a(e.$t("suno.button.extend")),1)]),_:1},8,["onClick"])):u("",!0),o(A,{onClick:U(T=>e.onCover(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-music",class:"menu-icon"}),g(" "+a(e.$t("suno.button.cover_music")),1)]),_:1},8,["onClick"]),m?.id?(n(),$(A,{key:1,onClick:U(T=>e.onMashup(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-shuffle",class:"menu-icon"}),g(" "+a(e.$t("suno.button.mashup")),1)]),_:1},8,["onClick"])):u("",!0),m?.id&&m?.action==="extend"?(n(),$(A,{key:2,onClick:U(T=>e.onConcatMusic(m?.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-link",class:"menu-icon"}),g(" "+a(e.$t("suno.button.concat_music")),1)]),_:1},8,["onClick"])):u("",!0),t[4]||(t[4]=s("div",{class:"menu-divider"},null,-1)),m?.id?(n(),$(A,{key:3,onClick:U(T=>e.onReplaceSection(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-scissors",class:"menu-icon"}),g(" "+a(e.$t("suno.button.replace_section")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:4,onClick:U(T=>e.onOverpainting(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-microphone",class:"menu-icon"}),g(" "+a(e.$t("suno.button.overpainting")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:5,onClick:U(T=>e.onUnderpainting(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-guitar",class:"menu-icon"}),g(" "+a(e.$t("suno.button.underpainting")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:6,onClick:U(T=>e.onSamples(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-drum",class:"menu-icon"}),g(" "+a(e.$t("suno.button.samples")),1)]),_:1},8,["onClick"])):u("",!0),t[5]||(t[5]=s("div",{class:"menu-divider"},null,-1)),m.id?(n(),$(A,{key:7,onClick:U(T=>e.onGetStems(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-layer-group",class:"menu-icon"}),g(" "+a(e.$t("suno.button.get_stems")),1)]),_:1},8,["onClick"])):u("",!0),m.id?(n(),$(A,{key:8,onClick:U(T=>e.onGetAllStems(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-bars-staggered",class:"menu-icon"}),g(" "+a(e.$t("suno.button.all_stems")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:9,onClick:U(T=>e.onRemaster(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-wand-magic-sparkles",class:"menu-icon"}),g(" "+a(e.$t("suno.button.remaster")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:10,onClick:U(T=>e.onExtractVocals(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-headphones",class:"menu-icon"}),g(" "+a(e.$t("suno.button.extract_vocals")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:11,onClick:U(T=>e.onArtistConsistency(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-palette",class:"menu-icon"}),g(" "+a(e.$t("suno.button.artist_consistency")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:12,onClick:U(T=>e.onAdjustSpeed(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-gauge-high",class:"menu-icon"}),g(" "+a(e.$t("suno.button.adjust_speed")),1)]),_:1},8,["onClick"])):u("",!0),t[6]||(t[6]=s("div",{class:"menu-divider"},null,-1)),o(A,{onClick:U(T=>e.onReusePrompt(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-rotate-left",class:"menu-icon"}),g(" "+a(e.$t("suno.button.reuse_prompt")),1)]),_:1},8,["onClick"]),m?.id?(n(),$(A,{key:13,onClick:U(T=>e.onGetTiming(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-clock",class:"menu-icon"}),g(" "+a(e.$t("suno.button.get_timing")),1)]),_:1},8,["onClick"])):u("",!0),o(A,{onClick:U(e.onViewCode,["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-code",class:"menu-icon"}),g(" "+a(e.$t("common.button.viewCode")),1)]),_:1},8,["onClick"]),t[7]||(t[7]=s("div",{class:"menu-divider"},null,-1)),m?.id?(n(),$(A,{key:14,class:"delete-item",onClick:U(T=>e.onDelete(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-trash",class:"menu-icon delete-icon"}),g(" "+a(e.$t("suno.button.delete")),1)]),_:1},8,["onClick"])):u("",!0)]),_:2},1024)]),default:i(()=>[s("span",Hi,[o(C,{effect:"dark",content:e.$t("suno.button.more"),placement:"top"},{default:i(()=>[m?.audio_url||m?.video_url?(n(),$(h,{key:0,icon:"fa-solid fa-ellipsis",class:"icon icon-ellipsis"})):u("",!0)]),_:2},1032,["content"])])]),_:2},1024)])],10,Si))),128)),o(J,{visible:e.apiCodeVisible,"onUpdate:visible":t[3]||(t[3]=m=>e.apiCodeVisible=m),method:"POST",path:e.apiCodePath,body:e.apiCodeBody,token:e.$store.state.suno?.credential?.token||""},null,8,["visible","path","body","token"])])}const qi=E(Vi,[["render",Wi]]),Ki=P({name:"RecentPanel",components:{ElSkeletonItem:nt,ElSkeleton:st,ElInput:W,ElButton:G,ElDropdown:Te,ElDropdownMenu:Ve,ElDropdownItem:Ce,ElPopover:ot,ElRadioGroup:K,ElRadioButton:Z,ElSelect:le,ElOption:ae,FontAwesomeIcon:D,TaskPreview:qi,Player:qe,NoTasks:We,ScrollList:je},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0,searchQuery:"",sortBy:"newest",filterType:"all",filterDuration:"all",filterVideo:"all",filterModel:"all"}},computed:{tasks(){return{...this.$store.state.suno?.tasks,items:this.$store.state.suno?.tasks?.items?.slice()}},sortLabel(){return this.sortBy==="newest"?this.$t("suno.sort.newest"):this.$t("suno.sort.oldest")},activeFilterCount(){let e=0;return this.filterType!=="all"&&e++,this.filterDuration!=="all"&&e++,this.filterVideo!=="all"&&e++,this.filterModel&&this.filterModel!=="all"&&e++,e},availableModels(){const e=this.tasks?.items||[],t=new Set;for(const r of e){const c=r?.response?.data??[];for(const y of c)y.model&&t.add(y.model)}return Array.from(t).sort()},filteredTasks(){let e=this.tasks?.items||[];if(this.searchQuery){const t=this.searchQuery.toLowerCase();e=e.filter(r=>(r?.response?.data??[]).some(y=>y.title?.toLowerCase().includes(t)||y.style?.toLowerCase().includes(t)||y.prompt?.toLowerCase().includes(t)))}return this.activeFilterCount>0&&(e=e.filter(t=>{const r=t?.request??{},c=t?.response?.data??[];return this.filterType==="vocal"&&r.instrumental===!0||this.filterType==="instrumental"&&r.instrumental!==!0?!1:this.filterDuration!=="all"||this.filterVideo!=="all"||this.filterModel&&this.filterModel!=="all"?c.some(y=>!(this.filterDuration==="short"&&!(typeof y.duration=="number"&&y.duration<60)||this.filterDuration==="medium"&&!(typeof y.duration=="number"&&y.duration>=60&&y.duration<=180)||this.filterDuration==="long"&&!(typeof y.duration=="number"&&y.duration>180)||this.filterVideo==="with"&&!y.video_url||this.filterVideo==="without"&&y.video_url||this.filterModel&&this.filterModel!=="all"&&y.model!==this.filterModel)):!0})),this.sortBy==="oldest"&&(e=[...e].reverse()),e}},methods:{onSortChange(e){this.sortBy=e},onResetFilters(){this.filterType="all",this.filterDuration="all",this.filterVideo="all",this.filterModel="all"},getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ji={key:0,class:"tasks"},Qi={class:"left w-[70px] p-[10px] flex items-center"},Yi={class:"main w-[calc(100%-70px)] flex-1 p-[10px]"},Xi={key:0,class:"task-toolbar"},Zi={key:0,class:"filter-badge"},xi={class:"filter-popover"},ea={class:"filter-row"},ta={class:"filter-label"},oa={class:"filter-row"},sa={class:"filter-label"},na={class:"filter-row"},ia={class:"filter-label"},aa={key:0,class:"filter-row"},la={class:"filter-label"},ra={class:"filter-actions"},da={key:2,class:"w-full flex-1 flex items-center justify-center"},ua={class:"text-sm text-gray-400"},ca={key:3,class:"w-full flex-1 flex flex-col items-center justify-center gap-2"},pa={class:"text-sm text-gray-400"},ma={key:4,class:"w-full flex-1 flex items-center justify-center"},fa={class:"h-20"};function ha(e,t,r,c,y,w){const v=l("el-skeleton-item"),f=l("el-skeleton"),p=l("font-awesome-icon"),_=l("el-input"),b=l("el-button"),S=l("el-dropdown-item"),h=l("el-dropdown-menu"),V=l("el-dropdown"),C=l("el-radio-button"),I=l("el-radio-group"),A=l("el-option"),N=l("el-select"),q=l("el-popover"),J=l("task-preview"),Q=l("scroll-list"),m=l("no-tasks"),T=l("player");return n(),d(M,null,[e.tasks?.items===void 0?(n(),d("div",Ji,[(n(),d(M,null,z(3,R=>s("div",{key:R,class:"flex"},[s("div",Qi,[o(f,{animated:""},{template:i(()=>[o(v,{variant:"image",class:"avatar w-[50px] h-[50px]"})]),_:1})]),s("div",Yi,[o(f,{animated:""},{template:i(()=>[o(v,{variant:"p",class:"w-[200px] h-[15px] mb-[5px] mt-[10px]"}),o(v,{variant:"text"})]),_:1})])])),64))])):(n(),d(M,{key:1},[e.tasks?.items?.length?(n(),d("div",Xi,[o(_,{modelValue:e.searchQuery,"onUpdate:modelValue":t[0]||(t[0]=R=>e.searchQuery=R),size:"small",placeholder:e.$t("suno.placeholder.searchSongs"),clearable:"",class:"task-search"},{prefix:i(()=>[o(p,{icon:"fa-solid fa-magnifying-glass",class:"text-xs"})]),_:1},8,["modelValue","placeholder"]),o(V,{trigger:"click",onCommand:e.onSortChange},{dropdown:i(()=>[o(h,null,{default:i(()=>[o(S,{command:"newest",class:H({"is-active":e.sortBy==="newest"})},{default:i(()=>[g(a(e.$t("suno.sort.newest")),1)]),_:1},8,["class"]),o(S,{command:"oldest",class:H({"is-active":e.sortBy==="oldest"})},{default:i(()=>[g(a(e.$t("suno.sort.oldest")),1)]),_:1},8,["class"])]),_:1})]),default:i(()=>[o(b,{size:"small",class:"sort-btn"},{default:i(()=>[o(p,{icon:"fa-solid fa-arrow-down-wide-short",class:"mr-1"}),g(" "+a(e.sortLabel),1)]),_:1})]),_:1},8,["onCommand"]),o(q,{trigger:"click",placement:"bottom-end",width:260},{reference:i(()=>[o(b,{size:"small",class:H(["filter-btn",{"has-active-filter":e.activeFilterCount>0}])},{default:i(()=>[o(p,{icon:"fa-solid fa-filter",class:"mr-1"}),g(" "+a(e.$t("suno.filter.title"))+" ",1),e.activeFilterCount>0?(n(),d("span",Zi,a(e.activeFilterCount),1)):u("",!0)]),_:1},8,["class"])]),default:i(()=>[s("div",xi,[s("div",ea,[s("div",ta,a(e.$t("suno.filter.type")),1),o(I,{modelValue:e.filterType,"onUpdate:modelValue":t[1]||(t[1]=R=>e.filterType=R),size:"small"},{default:i(()=>[o(C,{value:"all"},{default:i(()=>[g(a(e.$t("suno.filter.typeAll")),1)]),_:1}),o(C,{value:"vocal"},{default:i(()=>[g(a(e.$t("suno.filter.typeVocal")),1)]),_:1}),o(C,{value:"instrumental"},{default:i(()=>[g(a(e.$t("suno.filter.typeInstrumental")),1)]),_:1})]),_:1},8,["modelValue"])]),s("div",oa,[s("div",sa,a(e.$t("suno.filter.duration")),1),o(I,{modelValue:e.filterDuration,"onUpdate:modelValue":t[2]||(t[2]=R=>e.filterDuration=R),size:"small"},{default:i(()=>[o(C,{value:"all"},{default:i(()=>[g(a(e.$t("suno.filter.durationAll")),1)]),_:1}),o(C,{value:"short"},{default:i(()=>[g(a(e.$t("suno.filter.durationShort")),1)]),_:1}),o(C,{value:"medium"},{default:i(()=>[g(a(e.$t("suno.filter.durationMedium")),1)]),_:1}),o(C,{value:"long"},{default:i(()=>[g(a(e.$t("suno.filter.durationLong")),1)]),_:1})]),_:1},8,["modelValue"])]),s("div",na,[s("div",ia,a(e.$t("suno.filter.video")),1),o(I,{modelValue:e.filterVideo,"onUpdate:modelValue":t[3]||(t[3]=R=>e.filterVideo=R),size:"small"},{default:i(()=>[o(C,{value:"all"},{default:i(()=>[g(a(e.$t("suno.filter.videoAll")),1)]),_:1}),o(C,{value:"with"},{default:i(()=>[g(a(e.$t("suno.filter.videoWith")),1)]),_:1}),o(C,{value:"without"},{default:i(()=>[g(a(e.$t("suno.filter.videoWithout")),1)]),_:1})]),_:1},8,["modelValue"])]),e.availableModels.length>0?(n(),d("div",aa,[s("div",la,a(e.$t("suno.filter.model")),1),o(N,{modelValue:e.filterModel,"onUpdate:modelValue":t[4]||(t[4]=R=>e.filterModel=R),size:"small",placeholder:e.$t("suno.filter.modelAll"),clearable:""},{default:i(()=>[o(A,{label:e.$t("suno.filter.modelAll"),value:"all"},null,8,["label"]),(n(!0),d(M,null,z(e.availableModels,R=>(n(),$(A,{key:R,label:R,value:R},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])):u("",!0),s("div",ra,[o(b,{size:"small",text:"",onClick:e.onResetFilters},{default:i(()=>[g(a(e.$t("suno.filter.reset")),1)]),_:1},8,["onClick"])])])]),_:1})])):u("",!0),e.filteredTasks?.length>0?(n(),$(Q,{key:1,ref:"scrollList",class:"flex-1 w-full overflow-y-auto tasks p-2",loading:e.loading,onReachTop:t[5]||(t[5]=R=>e.$emit("reach-top"))},{default:i(()=>[(n(!0),d(M,null,z(e.filteredTasks,(R,oe)=>(n(),$(J,{key:oe,"model-value":R,class:"preview"},null,8,["model-value"]))),128))]),_:1},8,["loading"])):e.searchQuery&&e.tasks?.items?.length>0?(n(),d("div",da,[s("p",ua,a(e.$t("suno.message.noSearchResults")),1)])):e.activeFilterCount>0&&e.tasks?.items?.length>0?(n(),d("div",ca,[s("p",pa,a(e.$t("suno.message.noFilterResults")),1),o(b,{size:"small",text:"",onClick:e.onResetFilters},{default:i(()=>[g(a(e.$t("suno.filter.reset")),1)]),_:1},8,["onClick"])])):e.tasks?.items?.length===0?(n(),d("div",ma,[o(m)])):u("",!0)],64)),j(s("div",fa,[o(T,{namespace:"suno"})],512),[[Ae,!!e.$store?.state?.suno?.audio?.object]])],64)}const ga=E(Ki,[["render",ha],["__scopeId","data-v-6ce376c9"]]),$a=P({name:"TaskPreview",components:{IconPicture:Pe,ElImage:B,ElAvatar:it,ElIcon:X},computed:{audio(){return this.$store.state.suno?.audio}}}),_a={key:0,class:"size-full overflow-hidden"},va={class:"relative h-[300px]"},ya={class:"flex items-center justify-center size-full bg-[var(--el-bg-color)]"},ba={class:"absolute bottom-0 left-0 right-0 m-0 p-4 text-white z-10 bg-gradient-to-t from-black/70 to-transparent"},ka={class:"p-4"},wa={class:"flex items-center font-bold mb-2"},Ca={class:"text-[var(--el-text-color-regular)] mb-2"},Va={class:"text-xs text-[var(--el-text-color-regular)]"},Ta={class:"mt-4 text-sm leading-[25px] whitespace-pre-wrap"},Sa={key:1,class:"w-full h-full"};function Aa(e,t,r,c,y,w){const v=l("icon-picture"),f=l("el-icon"),p=l("el-image"),_=l("el-avatar");return e.audio?.object?(n(),d("div",_a,[s("div",va,[o(p,{src:e.audio.image_url,fit:"cover",class:"size-full"},{error:i(()=>[s("div",ya,[o(f,{class:"text-3xl"},{default:i(()=>[o(v)]),_:1})])]),_:1},8,["src"]),s("h2",ba,a(e.audio?.title),1)]),s("div",ka,[s("div",wa,[o(_,{size:30,src:e.audio?.image_url,class:"mr-2"},null,8,["src"]),s("span",null,a(e.audio?.title),1)]),s("p",Ca,a(e.audio?.style),1),s("p",Va,a(e.$dayjs.format(e.audio?.created_at)),1),s("div",Ta,[s("p",null,a(e.audio?.lyric),1)])])])):(n(),d("div",Sa))}const Ua=E($a,[["render",Aa]]),Pa=we("suno"),Ea=P({name:"SunoIndex",components:{Layout:pt,ConfigPanel:Ci,RecentPanel:ga,PreviewPanel:Ua},mixins:[Me],inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.suno?.status?.getApplications===Y.Request},tasksLoading(){return this.$store.state.suno?.status?.getTasks===Y.Request||this.fetchingTasks},service(){return this.$store.state.suno.service},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},initializing(){return this.$store.state.suno.status.getApplications===Y.Request},needApply(){return this.$store.state.suno.status.getApplications===Y.Success&&!this.application},application(){return this.$store.state.suno.application},tasks(){return this.$store.state.suno.tasks},applications(){return this.$store.state.suno.applications}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Be({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("suno/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplications"),await this.$store.dispatch("suno/getApplications"),console.debug("end onGetApplications"),await this.onGetTasks()},onApply(){Ie.create({application:this.application}).then(({data:e})=>{this.application=e,k.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{e?.response?.data?.code===Re&&k.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){await this.$nextTick();const e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug("loading");return}console.debug("start onGetTasks",e);const{limit:t=5,createdAtMin:r,createdAtMax:c}=e||{};console.debug("limit",t,"createdAtMin",r,"createdAtMax",c),this.fetchingTasks=!0;try{await this.$store.dispatch("suno/getTasks",{limit:t,createdAtMin:r,createdAtMax:c})}finally{this.fetchingTasks=!1}},async onGenerateAudio(){if(!Fe(this.uploadTracker,r=>this.$t(r),r=>k.warning(r)))return;const e={...this.config,callback_url:Pa};if(!this.hasSunoInput(e)){k.error(this.$t("suno.message.promptRequired"));return}this.hasText(e.prompt)&&(e.prompt=e.prompt.trim());const t=this.credential?.token;if(!t){console.error("no token specified");return}k.info(this.$t("suno.message.startingTask")),Ee("suno",L.audio(e,{token:t})).then(()=>{k.success(this.$t("suno.message.startTaskSuccess"))}).catch(r=>{k.error(r?.response?.data?.error?.message||this.$t("suno.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},hasText(e){return typeof e=="string"&&e.trim().length>0},hasSunoInput(e){return[e.prompt,e.lyric,e.lyric_prompt,e.style,e.title].some(r=>this.hasText(r))||this.hasText(e.audio_id)||Array.isArray(e.mashup_audio_ids)&&e.mashup_audio_ids.length>0}}});function Ia(e,t,r,c,y,w){const v=l("config-panel"),f=l("recent-panel"),p=l("preview-panel"),_=l("layout");return n(),$(_,null,{config:i(()=>[o(v,{onGenerate:e.onGenerateAudio},null,8,["onGenerate"])]),result:i(()=>[o(f,{ref:"recentPanel",class:"panel recent",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),preview:i(()=>[o(p)]),_:1})}const Gl=E(Ea,[["render",Ia],["__scopeId","data-v-b9beee12"]]);export{Gl as default};
|