@acedatacloud/nexior 3.95.0 → 3.96.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.
Files changed (249) hide show
  1. package/dist/assets/{Auth-BgIh9F9m.js → Auth-B7IOCPhU.js} +1 -1
  2. package/dist/assets/{BotPlaceholder-BX_Fmo6M.js → BotPlaceholder-BMTR5POQ.js} +1 -1
  3. package/dist/assets/{Callback-_LdtnIGf.js → Callback-yrxnHCeQ.js} +1 -1
  4. package/dist/assets/{Console-CVxiWU4b.js → Console-Be161fK4.js} +1 -1
  5. package/dist/assets/{Consumption-68quGGMc.js → Consumption-CFmPsSrx.js} +1 -1
  6. package/dist/assets/{Conversation-Dxzz0Dh3.js → Conversation-C5qF2hGQ.js} +1 -1
  7. package/dist/assets/{CopyToClipboard-D807fmaU.js → CopyToClipboard-D0Vl9ymy.js} +1 -1
  8. package/dist/assets/{Detail-BkD6Kyuj.js → Detail-Ir9oOP70.js} +2 -2
  9. package/dist/assets/{EditArray-4hk3mZ5J.js → EditArray-Cnra7T1U.js} +1 -1
  10. package/dist/assets/{Extra-BlFFT5CH.js → Extra-ChhX71PL.js} +1 -1
  11. package/dist/assets/{FilePreview-UdiZxxV6.js → FilePreview-N9b0LvMw.js} +1 -1
  12. package/dist/assets/{History-DMwQhjZW.js → History-BMGB2SKd.js} +1 -1
  13. package/dist/assets/{IconPark.vue_vue_type_script_setup_true_lang-DabOooqH.js → IconPark.vue_vue_type_script_setup_true_lang-CTt87WbC.js} +1 -1
  14. package/dist/assets/{ImagePreview-DoZQydMi.js → ImagePreview-BTpzcINr.js} +1 -1
  15. package/dist/assets/{ImageWrapper-DhuFURl2.js → ImageWrapper-bkyN3mp2.js} +1 -1
  16. package/dist/assets/{Index-DWVvPHP0.js → Index-07MWbBQ-.js} +1 -1
  17. package/dist/assets/{Index-ByHef25f.js → Index-4U-JbuYi.js} +1 -1
  18. package/dist/assets/{Index-BJjGZkkX.js → Index-B8FUKM6R.js} +1 -1
  19. package/dist/assets/{Index-cZyPurSv.js → Index-BNVfBSUK.js} +1 -1
  20. package/dist/assets/{Index-7bF86pFO.js → Index-BNvH3_Iw.js} +1 -1
  21. package/dist/assets/{Index-DFctE27S.js → Index-BirFJPGF.js} +1 -1
  22. package/dist/assets/{Index-DwIGbbY8.js → Index-C2g5drlS.js} +1 -1
  23. package/dist/assets/Index-CIO4rSTG.css +1 -0
  24. package/dist/assets/{Index-DSSKrwom.js → Index-CJtlzgIy.js} +1 -1
  25. package/dist/assets/{Index-D1mdYXQt.js → Index-CK6Vpboc.js} +1 -1
  26. package/dist/assets/{Index-pf_FYXW8.js → Index-CL3ARR0o.js} +1 -1
  27. package/dist/assets/{Index-CkfzEQvo.js → Index-CSmk-5fO.js} +1 -1
  28. package/dist/assets/{Index-0VB-8ytN.js → Index-CT1eWJP0.js} +1 -1
  29. package/dist/assets/{Index-DQVkPTzA.js → Index-C_TTd3b5.js} +1 -1
  30. package/dist/assets/{Index-CKZ-ZiDm.js → Index-CsenSGio.js} +1 -1
  31. package/dist/assets/{Index-JLlRI-ux.js → Index-D76U2Plq.js} +1 -1
  32. package/dist/assets/{Index-DWo8Mkwj.js → Index-D7F5hKD0.js} +1 -1
  33. package/dist/assets/{Index-slbAaLV7.js → Index-DCSOzXNJ.js} +1 -1
  34. package/dist/assets/{Index-CXiXZE0C.js → Index-DkR4KmWi.js} +1 -1
  35. package/dist/assets/{Index-DA1OIj7T.js → Index-DmCvgDIR.js} +1 -1
  36. package/dist/assets/{Index-BWPAspLc.js → Index-EKeU2mw9.js} +1 -1
  37. package/dist/assets/{Index-B_PSIIAr.js → Index-HGLy_umw.js} +1 -1
  38. package/dist/assets/Index-POCmeZvr.js +1 -0
  39. package/dist/assets/{Index-CwKDURED.js → Index-TWHcVTxZ.js} +1 -1
  40. package/dist/assets/{Index-DNmbpXD6.js → Index-iWIhnqcd.js} +1 -1
  41. package/dist/assets/{Index-BPLPzYGI.js → Index-s4cHIwir.js} +1 -1
  42. package/dist/assets/{Invitees-D6zII_wb.js → Invitees-CzVCmzws.js} +1 -1
  43. package/dist/assets/{List-wwh29NAt.js → List-BQz5yzUS.js} +1 -1
  44. package/dist/assets/{List-B5arLE3b.js → List-BTWP7mUL.js} +1 -1
  45. package/dist/assets/{List-BYYk8ih5.js → List-C2prW6v7.js} +1 -1
  46. package/dist/assets/{Main-KOYAxH93.js → Main-DiM6AMOS.js} +1 -1
  47. package/dist/assets/{Navigator-BrkgUgO8.js → Navigator-CO7xCBxO.js} +1 -1
  48. package/dist/assets/{NoTasks-BmUPIZrI.js → NoTasks-C2byzBat.js} +1 -1
  49. package/dist/assets/{NotFound-zZFUawEr.js → NotFound-Brilc-zM.js} +1 -1
  50. package/dist/assets/{OAuthCallback-CZ9gN6l8.js → OAuthCallback-DgAVgoUm.js} +1 -1
  51. package/dist/assets/{Pagination-Cs4Wz0Ql.js → Pagination-EtsMQbu5.js} +1 -1
  52. package/dist/assets/{ScrollList-D4NQF_dR.js → ScrollList-Bd_whHIM.js} +1 -1
  53. package/dist/assets/{Status-CvBAnCs1.js → Status-DEz5GZM-.js} +1 -1
  54. package/dist/assets/{Subscribe-DPDSLpTs.js → Subscribe-CfjPP55_.js} +1 -1
  55. package/dist/assets/{TransportWebHID-jGN9SC6O.js → TransportWebHID-CRqdY-EP.js} +1 -1
  56. package/dist/assets/{VideoPlayer-C9bugZE5.js → VideoPlayer-F7ThnjH_.js} +1 -1
  57. package/dist/assets/{_Uint8Array-CB9YoPj6.js → _Uint8Array-DujiT55f.js} +1 -1
  58. package/dist/assets/{_baseClone-CVl2OEHX.js → _baseClone-geOLU9hT.js} +1 -1
  59. package/dist/assets/{_baseIteratee-Cm1UCWOc.js → _baseIteratee-CXHXeeg4.js} +1 -1
  60. package/dist/assets/{_initCloneObject-DbWmMQIz.js → _initCloneObject-D64QzBW_.js} +1 -1
  61. package/dist/assets/{add-D7K5xZ4R.js → add-Cb7KRQkI.js} +1 -1
  62. package/dist/assets/{all-wallets-1WoBxpnS.js → all-wallets-J5SzBoD4.js} +1 -1
  63. package/dist/assets/{app-store-DR11Wi1T.js → app-store-D_wlMW12.js} +1 -1
  64. package/dist/assets/{apple-DrsqO_se.js → apple-Bg0AsyBP.js} +1 -1
  65. package/dist/assets/{arrow-bottom-Jc_6TXTJ.js → arrow-bottom-CJn9c_CQ.js} +1 -1
  66. package/dist/assets/{arrow-bottom-circle-DlcMNOyL.js → arrow-bottom-circle-DoIQ4Sz0.js} +1 -1
  67. package/dist/assets/{arrow-left-D70F2lsS.js → arrow-left-dnEMOO2A.js} +1 -1
  68. package/dist/assets/{arrow-right-DdAeWDE_.js → arrow-right-Cg_xhThh.js} +1 -1
  69. package/dist/assets/{arrow-top-B4C1hW_s.js → arrow-top-B1nz_Wky.js} +1 -1
  70. package/dist/assets/{avatar-W1x95-cJ.js → avatar-9vaNi6dk.js} +1 -1
  71. package/dist/assets/{bank-C1OreOrd.js → bank-D56CQZeR.js} +1 -1
  72. package/dist/assets/{basic-B0V9UmyG.js → basic-4IXEohkS.js} +1 -1
  73. package/dist/assets/{browser-D4WhszQk.js → browser-DN7hGArZ.js} +1 -1
  74. package/dist/assets/{byokCredential-CYK_M8di.js → byokCredential-DK5nlfA0.js} +1 -1
  75. package/dist/assets/{card-b3s_7rRb.js → card-D8cRohcd.js} +1 -1
  76. package/dist/assets/{castArray-BRo9Wy18.js → castArray-bn2-PUXx.js} +1 -1
  77. package/dist/assets/{chat-Btxan4xK.js → chat-I0l4Vuze.js} +1 -1
  78. package/dist/assets/{checkmark-mfxJC35t.js → checkmark-CBRFVR3_.js} +1 -1
  79. package/dist/assets/{checkmark-bold-DqPgj_kh.js → checkmark-bold-DArQ9Ucp.js} +1 -1
  80. package/dist/assets/{chevron-bottom-BxR8sPqv.js → chevron-bottom-n4YMsdE2.js} +1 -1
  81. package/dist/assets/{chevron-left-C5-le4SA.js → chevron-left-CNsTOume.js} +1 -1
  82. package/dist/assets/{chevron-right-BzRps8oq.js → chevron-right-DSAoj_Zt.js} +1 -1
  83. package/dist/assets/{chevron-top-BsTzDpEZ.js → chevron-top-CT8w_utV.js} +1 -1
  84. package/dist/assets/{chrome-store-DA0WtUin.js → chrome-store-Dk3G6USX.js} +1 -1
  85. package/dist/assets/{clock-DhqhLlO8.js → clock-Bc54oUpM.js} +1 -1
  86. package/dist/assets/{close-ODdJ9lZk.js → close-D_a-exjq.js} +1 -1
  87. package/dist/assets/{coinPlaceholder-BhOsCQXz.js → coinPlaceholder-Di6Q9fHU.js} +1 -1
  88. package/dist/assets/{compass-TY77lO1t.js → compass-DpC2Dcnv.js} +1 -1
  89. package/dist/assets/{copy-DyT2ZDjk.js → copy-DgjOOUad.js} +1 -1
  90. package/dist/assets/{cursor-D2zmeb6B.js → cursor-pKDntign.js} +1 -1
  91. package/dist/assets/{cursor-transparent-D_6ZK2b_.js → cursor-transparent-CtoYQZAC.js} +1 -1
  92. package/dist/assets/{debounce-oh-nVV1M.js → debounce-CEYGSL3j.js} +1 -1
  93. package/dist/assets/{desktop-CBGjWmvv.js → desktop-B0bIIjLn.js} +1 -1
  94. package/dist/assets/{disconnect-CWEUpvlu.js → disconnect-DRAmpHq3.js} +1 -1
  95. package/dist/assets/{discord-DkrFCFVe.js → discord-Cp5x9xSa.js} +1 -1
  96. package/dist/assets/{distribution-_HSM042l.js → distribution-CBpHQei2.js} +1 -1
  97. package/dist/assets/{dropdown-BhPFK6ly.js → dropdown-4I2okC6N.js} +1 -1
  98. package/dist/assets/{etherscan-CVoinSI2.js → etherscan-DaJ40ve7.js} +1 -1
  99. package/dist/assets/{exclamation-triangle-C9DViEhs.js → exclamation-triangle-MzJXxuS9.js} +1 -1
  100. package/dist/assets/{extension-CQ0ADQg9.js → extension-DOoLtYZS.js} +1 -1
  101. package/dist/assets/{external-link-Cl_vzj67.js → external-link-rMeMuu9n.js} +1 -1
  102. package/dist/assets/{facebook-CgbjAw04.js → facebook-DGlomSiO.js} +1 -1
  103. package/dist/assets/{farcaster-CYUSivg3.js → farcaster-zZzqhBV2.js} +1 -1
  104. package/dist/assets/{filters-hghg4Djx.js → filters-DDQX_yYE.js} +1 -1
  105. package/dist/assets/{flux-CSpubsyp.js → flux-DcEotTkx.js} +1 -1
  106. package/dist/assets/{github-D149y49u.js → github-CONClJ0r.js} +1 -1
  107. package/dist/assets/{google-d9IFeU3k.js → google-DioOiSzO.js} +1 -1
  108. package/dist/assets/{hailuo-DY5AnM1a.js → hailuo-CoWzDb6F.js} +1 -1
  109. package/dist/assets/{headshots-BAnUDGdt.js → headshots-CqRGNdHQ.js} +1 -1
  110. package/dist/assets/{help-circle-CEwJ-L0X.js → help-circle-DNap-sgc.js} +1 -1
  111. package/dist/assets/{id-C5EHa13o.js → id-C7gGo7oI.js} +1 -1
  112. package/dist/assets/{image-B7KbYTy6.js → image-h4cZOhzb.js} +1 -1
  113. package/dist/assets/{index-DMwebEVO.js → index-0scbvCFJ.js} +1 -1
  114. package/dist/assets/{index--WZdvO2W.js → index-2TCFMqGF.js} +1 -1
  115. package/dist/assets/{index-C8usv7Oj.js → index-7k7qNkjT.js} +1 -1
  116. package/dist/assets/{index-VBauFRDi.js → index-B31mUCQw.js} +1 -1
  117. package/dist/assets/{index-BQ8dSrtD.js → index-B8IfXNhX.js} +1 -1
  118. package/dist/assets/{index-DbTV4KJl.js → index-BGzNCBTi.js} +1 -1
  119. package/dist/assets/{index-D72NhnP1.js → index-BIsP0mLd.js} +1 -1
  120. package/dist/assets/{index-CZ5QHZOW.js → index-BJzeDxnc.js} +1 -1
  121. package/dist/assets/{index-uok_8BDA.js → index-BL-LYkbS.js} +1 -1
  122. package/dist/assets/{index-C5xVpW2q.js → index-BMtkvCMm.js} +1 -1
  123. package/dist/assets/{index-CMol6_E0.js → index-BTQRVdeP.js} +1 -1
  124. package/dist/assets/{index-DvVC4lZz.js → index-Bb-FlhbS.js} +1 -1
  125. package/dist/assets/{index-D50_SFx2.js → index-BeZopvCY.js} +1 -1
  126. package/dist/assets/{index-1K17hCGu.js → index-Bf-WShQI.js} +1 -1
  127. package/dist/assets/{index-CTAIkWSP.js → index-Bh7JfIdu.js} +1 -1
  128. package/dist/assets/{index-DXsCTLvl.js → index-Bm--fKhG.js} +1 -1
  129. package/dist/assets/{index-MAe5s8Z3.js → index-BqF92jGG.js} +1 -1
  130. package/dist/assets/{index-BvJobMk4.js → index-Bthz5CSk.js} +1 -1
  131. package/dist/assets/{index-DNfZVwwY.js → index-CHiGCqdo.js} +1 -1
  132. package/dist/assets/{index-CFukWpb7.js → index-CMy0YFza.js} +6 -6
  133. package/dist/assets/{index-CZzjgvO_.js → index-CO0CMurV.js} +1 -1
  134. package/dist/assets/{index-B6hXTw7_.js → index-Cdyu259y.js} +1 -1
  135. package/dist/assets/{index-C_LYFrIS.js → index-Cg4fPpjQ.js} +1 -1
  136. package/dist/assets/{index-C6HZaOi9.js → index-ChvBuD6w.js} +1 -1
  137. package/dist/assets/{index-hTblgAko.js → index-Ci-ViIN4.js} +1 -1
  138. package/dist/assets/{index-Di0hkIGy.js → index-CqUbUQVX.js} +1 -1
  139. package/dist/assets/{index-D3RSF2SU.js → index-CrxfAbfT.js} +1 -1
  140. package/dist/assets/{index-B-2xeT4c.js → index-Cvahlpuq.js} +1 -1
  141. package/dist/assets/{index-B8IWtTUu.js → index-CwnkvnQz.js} +1 -1
  142. package/dist/assets/{index-CUnV_GqJ.js → index-CyoIUj9o.js} +4 -4
  143. package/dist/assets/{index-j5ekG7sA.js → index-CzJHTgdJ.js} +1 -1
  144. package/dist/assets/{index-DqnXf8po.js → index-D-3uMZw6.js} +1 -1
  145. package/dist/assets/{index-CRbBVmOJ.js → index-D1AfIppA.js} +1 -1
  146. package/dist/assets/{index-wQedw0D_.js → index-D3n7t1sr.js} +1 -1
  147. package/dist/assets/{index-JUpGYKxP.js → index-D7ieEjJt.js} +1 -1
  148. package/dist/assets/{index-8YJcSPIm.js → index-D9qobuQa.js} +3 -3
  149. package/dist/assets/{index-BlPrWL6I.js → index-DAH5YmHq.js} +1 -1
  150. package/dist/assets/{index-C4_vIqFG.js → index-DBAMWhz_.js} +1 -1
  151. package/dist/assets/{index-BC1HHenz.js → index-DGuU4Ekx.js} +1 -1
  152. package/dist/assets/{index-D8p4EnQb.js → index-DHeluTw-.js} +1 -1
  153. package/dist/assets/{index-CH6leJlL.js → index-DKYYyuO0.js} +1 -1
  154. package/dist/assets/{index-DMkixEBN.js → index-DTAGERd6.js} +1 -1
  155. package/dist/assets/{index-BSR19vF5.js → index-DZvxjfcd.js} +1 -1
  156. package/dist/assets/{index-Cj8Omeqq.js → index-DkVQY3ew.js} +1 -1
  157. package/dist/assets/{index-Cku62gIv.js → index-DloEz0X2.js} +1 -1
  158. package/dist/assets/{index-Drknw37_.js → index-DnqeVnC2.js} +1 -1
  159. package/dist/assets/{index-XdFznrtI.js → index-DwUkKFb1.js} +1 -1
  160. package/dist/assets/{index-4d8tPrVH.js → index-DxQSuBCJ.js} +1 -1
  161. package/dist/assets/{index-Dbwl_5tA.js → index-DyboeIeY.js} +1 -1
  162. package/dist/assets/{index-BZqelu2R.js → index-I_EGcjQO.js} +1 -1
  163. package/dist/assets/{index-WoD6zGd3.js → index-L7wFFlJR.js} +1 -1
  164. package/dist/assets/{index-DVuT10gr.js → index-MoiDefkl.js} +1 -1
  165. package/dist/assets/{index-DW23aMQJ.js → index-PFjLKeU1.js} +1 -1
  166. package/dist/assets/{index-BYLfKs5t.js → index-VWtlTAlD.js} +1 -1
  167. package/dist/assets/{index-CMJ6GucN.js → index-WZv1AnBX.js} +1 -1
  168. package/dist/assets/{index-tL04ibfL.js → index-_pdNRY-z.js} +1 -1
  169. package/dist/assets/{index-8Ckha2zO.js → index-cmW6UCjk.js} +1 -1
  170. package/dist/assets/{index-DjKpZzc8.js → index-ruR6OH3F.js} +1 -1
  171. package/dist/assets/{index-DyBWErjx.js → index-vtgn1qE5.js} +1 -1
  172. package/dist/assets/{index-CNlfh3wF.js → index-w4wDQphH.js} +1 -1
  173. package/dist/assets/{index-BWOfC5qd.js → index-zg8T53Xe.js} +1 -1
  174. package/dist/assets/{index.browser.esm-XKx2qGvK.js → index.browser.esm-B4WC6Ivw.js} +1 -1
  175. package/dist/assets/{index.es-B5zr1Qur.js → index.es-CcBUl4Ve.js} +1 -1
  176. package/dist/assets/{info-eTkql8kb.js → info-BwfrcTcP.js} +1 -1
  177. package/dist/assets/{info-circle-DARMwkzM.js → info-circle-CQyro9WR.js} +1 -1
  178. package/dist/assets/{isEqual-C3bUZSmi.js → isEqual-CCZvVGcc.js} +1 -1
  179. package/dist/assets/{isPlainObject-D103rbs9.js → isPlainObject-B3JketaP.js} +1 -1
  180. package/dist/assets/kling-B-UgDIIM.js +1 -0
  181. package/dist/assets/{kling-5Oh2BSyS.js → kling-C8FCWSsn.js} +1 -1
  182. package/dist/assets/kling-CO424gOW.js +1 -0
  183. package/dist/assets/{lightbulb-CWOGdXQT.js → lightbulb-u-YBI2_e.js} +1 -1
  184. package/dist/assets/{luma-BFsbquWX.js → luma-BPpgQbTG.js} +1 -1
  185. package/dist/assets/{mail-ChsGxhk9.js → mail-DtTpxo_f.js} +1 -1
  186. package/dist/assets/{midjourney-D3t0GRuc.js → midjourney-CXoaSu_t.js} +1 -1
  187. package/dist/assets/{mobile-fLf7q2B-.js → mobile-Crohzlzs.js} +1 -1
  188. package/dist/assets/{more-DifjDwF-.js → more-O7dMAEAC.js} +1 -1
  189. package/dist/assets/{nanobanana-DItiTilb.js → nanobanana-oP5mSzl9.js} +1 -1
  190. package/dist/assets/{network-placeholder-CF8z7fei.js → network-placeholder-DKtyYa5J.js} +1 -1
  191. package/dist/assets/{nftPlaceholder-CdO1mB_9.js → nftPlaceholder-Di2fuG26.js} +1 -1
  192. package/dist/assets/{off-C2FlUbM_.js → off-DHcD_IzO.js} +1 -1
  193. package/dist/assets/{openaiimage-kfCB3JN1.js → openaiimage-BopXrS3e.js} +1 -1
  194. package/dist/assets/{order-BUN95EUC.js → order-CFZvaNRJ.js} +1 -1
  195. package/dist/assets/{pika-DPrfngEi.js → pika-qAoMsbIf.js} +1 -1
  196. package/dist/assets/{pixverse-OmE9g4eq.js → pixverse-BPjrpQcR.js} +1 -1
  197. package/dist/assets/{play-store-B3YAezeH.js → play-store-YuVQFPEo.js} +1 -1
  198. package/dist/assets/{plus-tW3K_w-p.js → plus-DAJeFCb1.js} +1 -1
  199. package/dist/assets/{price-DnZ4NEW9.js → price-BZipbZ8r.js} +1 -1
  200. package/dist/assets/{producer-D25A2Z-9.js → producer-Cpl9HiWT.js} +1 -1
  201. package/dist/assets/{qr-code-C1IShTP-.js → qr-code-BKJkZg3g.js} +1 -1
  202. package/dist/assets/{qrart-bsK6qvw2.js → qrart-CvJm7ePt.js} +1 -1
  203. package/dist/assets/{recycle-horizontal-CwI_W7WP.js → recycle-horizontal-Bv0qhl_L.js} +1 -1
  204. package/dist/assets/{refresh-Bmg0G-7W.js → refresh-SB_rex4y.js} +1 -1
  205. package/dist/assets/{reown-logo-D8rpfdrW.js → reown-logo-C62v74uy.js} +1 -1
  206. package/dist/assets/{search-CHWBG4OD.js → search-DKeGlMkb.js} +1 -1
  207. package/dist/assets/{secp256k1-LM2ZK7md.js → secp256k1-C9-Uo9DA.js} +1 -1
  208. package/dist/assets/{secp256k1-CsCIZQXh.js → secp256k1-XDpIL-cE.js} +1 -1
  209. package/dist/assets/{seedance-CQ37pHBZ.js → seedance-DBV9uz9J.js} +1 -1
  210. package/dist/assets/{seedream-WwcWSUJr.js → seedream-BC8LS4Fj.js} +1 -1
  211. package/dist/assets/{send-iwe0Joum.js → send-BTBpTj_3.js} +1 -1
  212. package/dist/assets/{service-MQM_EskI.js → service-BaneDn1b.js} +1 -1
  213. package/dist/assets/{solana-wallets-CZKOlYg8.js → solana-wallets-DJgeNo0q.js} +2 -2
  214. package/dist/assets/{solana-wallets-vue-B_JorjMK.js → solana-wallets-vue-CAZtDdU5.js} +1 -1
  215. package/dist/assets/{solanaEmbed.esm-Dx1-Qj8f.js → solanaEmbed.esm-DrZ8actn.js} +1 -1
  216. package/dist/assets/{sora-BzM77ayC.js → sora-DO16_LeH.js} +1 -1
  217. package/dist/assets/{string_decoder-3BWAgmJh.js → string_decoder-bDzMNe9W.js} +1 -1
  218. package/dist/assets/{suno-DoDj7vuP.js → suno-oZikzgzu.js} +1 -1
  219. package/dist/assets/{swapHorizontal-BqzyDe4L.js → swapHorizontal-Ct7bFa7W.js} +1 -1
  220. package/dist/assets/{swapHorizontalBold-C_XMuPsK.js → swapHorizontalBold-BKs8PJPt.js} +1 -1
  221. package/dist/assets/{swapHorizontalMedium-2FRqyjxo.js → swapHorizontalMedium-TKQ1_NSe.js} +1 -1
  222. package/dist/assets/{swapHorizontalRoundedBold-9H2dSbZY.js → swapHorizontalRoundedBold-DkhblOeA.js} +1 -1
  223. package/dist/assets/{swapVertical-CyLuxU6p.js → swapVertical-DJCRES5L.js} +1 -1
  224. package/dist/assets/{telegram-CRSdRDwQ.js → telegram-DnPlzS8u.js} +1 -1
  225. package/dist/assets/{three-dots-HbfMur2T.js → three-dots-saXfdF9t.js} +1 -1
  226. package/dist/assets/{twitch-BWqNk-w8.js → twitch-CCBuh-zP.js} +1 -1
  227. package/dist/assets/{twitterIcon-B5mAWypq.js → twitterIcon-CQaVqEAR.js} +1 -1
  228. package/dist/assets/{typescript-BPytxeub.js → typescript-DWaRSzS6.js} +1 -1
  229. package/dist/assets/{use-form-item-DufqZxj5.js → use-form-item-Dg0Eipdq.js} +1 -1
  230. package/dist/assets/validator-CpWOJ6dE.js +1 -0
  231. package/dist/assets/{veo-B7sTerBN.js → veo-CrkkMMRs.js} +1 -1
  232. package/dist/assets/{verify-B4eZ4lNw.js → verify-C4Qdp3PB.js} +1 -1
  233. package/dist/assets/{verify-filled-CVIbU0dk.js → verify-filled-Cy72N1JD.js} +1 -1
  234. package/dist/assets/{w3m-modal-Be9oKZtV.js → w3m-modal-xrMUQCNR.js} +1 -1
  235. package/dist/assets/{wallet-oARVtaqk.js → wallet-TXKKx7lS.js} +1 -1
  236. package/dist/assets/{wallet-placeholder-BT2V1lbF.js → wallet-placeholder-7PE4aUU7.js} +1 -1
  237. package/dist/assets/{walletconnect-CX-wMrIr.js → walletconnect-C6whwAFc.js} +1 -1
  238. package/dist/assets/{wan-0kCPOmiX.js → wan-Cv2nu3GD.js} +1 -1
  239. package/dist/assets/{warning-circle-CslfO-in.js → warning-circle-C2qWmrCi.js} +1 -1
  240. package/dist/assets/{web-CrxPVPTP.js → web-BOwNChIE.js} +1 -1
  241. package/dist/assets/{web-CB13-fjQ.js → web-Ucvp3qzM.js} +1 -1
  242. package/dist/assets/{x-3ufNmBV5.js → x-BYFPf_ut.js} +1 -1
  243. package/dist/index.html +1 -1
  244. package/package.json +1 -1
  245. package/dist/assets/Index-0F2esyJL.css +0 -1
  246. package/dist/assets/Index-D4C3cSdt.js +0 -1
  247. package/dist/assets/kling-BojhonxZ.js +0 -1
  248. package/dist/assets/kling-hb-qhPzM.js +0 -1
  249. package/dist/assets/validator-BnIavBrn.js +0 -1
@@ -1,4 +1,4 @@
1
- import{F as z}from"./index.es-B5zr1Qur.js";import{E as B}from"./index--WZdvO2W.js";import{E as ye}from"./index-B-2xeT4c.js";import{d as A,H as u,E as s,z as ne,C as o,y as a,D as l,q as n,Q as G,F as i,O as M,N as D,J as c,x as b,I as v,U as ie,G as O,K as q,M as U,u as j,c as H,w as Pe,L as Ue}from"./vendor-vue-DU0w5ewx.js";import{D as E,E as Ee,aZ as le,b0 as Ie,e2 as re,e3 as de,R as x,G as be,ao as Z,e4 as ee,e5 as Re,a6 as Le}from"./index-CUnV_GqJ.js";import{a as Me}from"./errorCode-Cqj9Td_Z.js";import{s as L}from"./suno-DoDj7vuP.js";import{b as Fe}from"./suno-DFuCGH70.js";import{E as De}from"./index-WoD6zGd3.js";import{E as ue,a as ce}from"./index-DVuT10gr.js";import{I as F,S as ze}from"./ScrollList-D4NQF_dR.js";import{E as te,a as J,b as je}from"./index-Di0hkIGy.js";import{E as ke,a as we}from"./index-Cku62gIv.js";import{E as Ge}from"./index-wQedw0D_.js";import{E as w}from"./index-B8IWtTUu.js";import{E as W}from"./index-B6hXTw7_.js";import{E as pe}from"./index-C6HZaOi9.js";import{u as X,F as Be,O as Oe,_ as fe,P as Ne,a as He,V as qe,E as We}from"./IconPark.vue_vue_type_script_setup_true_lang-DabOooqH.js";import{E as oe,a as me}from"./index-uok_8BDA.js";import{E as N}from"./index-8Ckha2zO.js";import{E as Ke,a as Qe}from"./index-DMwebEVO.js";import{E as Je,a as Ye}from"./index-CH6leJlL.js";import{E as Ce}from"./index-CNlfh3wF.js";import{C as Ze}from"./Consumption-68quGGMc.js";import{a as Xe}from"./price-DnZ4NEW9.js";import{E as xe}from"./index-D3RSF2SU.js";import{E as et}from"./index-C4_vIqFG.js";import{E as Ve,b as Se,a as Te}from"./index-j5ekG7sA.js";import{E as Ae}from"./index-DvVC4lZz.js";import{N as tt}from"./NoTasks-BmUPIZrI.js";import{a as ot,E as st}from"./index-D50_SFx2.js";import{l as nt}from"./pagination-CcnL0MdN.js";import"./use-form-item-DufqZxj5.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./validator-BnIavBrn.js";import"./index-CZzjgvO_.js";import"./index-D72NhnP1.js";import"./typescript-BPytxeub.js";import"./strings-DigWlKo9.js";import"./isEqual-C3bUZSmi.js";import"./_Uint8Array-CB9YoPj6.js";import"./castArray-BRo9Wy18.js";import"./debounce-oh-nVV1M.js";import"./_baseIteratee-Cm1UCWOc.js";import"./index-C_LYFrIS.js";import"./_baseClone-CVl2OEHX.js";import"./_initCloneObject-DbWmMQIz.js";import"./isPlainObject-D103rbs9.js";import"./index-XdFznrtI.js";import"./index-Bz0iDXPF.js";import"./index-DNfZVwwY.js";import"./dropdown-BhPFK6ly.js";const it=A({name:"LayoutSuno",components:{ElDrawer:ye,ElButton:B,FontAwesomeIcon:z},data(){return{drawer:!1,preview:!1}},computed:{}}),at={class:"main flex flex-row flex-1"},lt={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},rt={class:"result h-full flex flex-col flex-1 min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"},dt={class:"preview h-full w-[300px] flex flex-col"};function ut(e,t,d,r,m,y){const $=l("font-awesome-icon"),p=l("el-button"),f=l("el-drawer");return n(),u("div",at,[s("div",lt,[ne(e.$slots,"config",{},void 0,!0)]),s("div",rt,[ne(e.$slots,"result",{},void 0,!0)]),s("div",dt,[ne(e.$slots,"preview",{},void 0,!0)]),o(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=k=>e.drawer=!0)},{default:a(()=>[o($,{icon:"fa-solid fa-magic"})]),_:1}),o(f,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=k=>e.drawer=k),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:a(()=>[ne(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const ct=E(it,[["render",ut],["__scopeId","data-v-c6c85757"]]),pt=A({name:"TypeSelector",components:{ElSelect:ce,ElOption:ue,ElSwitch:De,ElTag:Ee},data(){return{options:[{label:"v5.5",value:"chirp-v5-5",desc:this.$t("suno.model.v55desc"),pro:!0},{label:"v5",value:"chirp-v5",desc:this.$t("suno.model.v5desc"),pro:!0},{label:"v4.5+",value:"chirp-v4-5-plus",desc:this.$t("suno.model.v45plusdesc"),pro:!0},{label:"v4.5",value:"chirp-v4-5",desc:this.$t("suno.model.v45desc"),pro:!0,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=Fe)}}),mt={class:"mode-tabs mb-3"},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,d,r,m,y){const $=l("el-tag"),p=l("el-option"),f=l("el-select"),k=l("el-switch");return n(),u("div",null,[s("div",mt,[s("button",{class:G(["mode-tab",{active:!e.custom}]),onClick:t[0]||(t[0]=g=>e.custom=!1)},i(e.$t("suno.mode.simple")),3),s("button",{class:G(["mode-tab",{active:e.custom}]),onClick:t[1]||(t[1]=g=>e.custom=!0)},i(e.$t("suno.mode.custom")),3)]),s("div",ft,[s("div",ht,[s("span",gt,i(e.$t("suno.name.model")),1)]),o(f,{modelValue:e.model,"onUpdate:modelValue":t[2]||(t[2]=g=>e.model=g),class:"w-full model-select",size:"default",placeholder:e.$t("suno.placeholder.select")},{default:a(()=>[(n(!0),u(M,null,D(e.options,g=>(n(),b(p,{key:g.value,label:g.label,value:g.value,class:G({"model-option-divider":g.dividerAfter})},{default:a(()=>[s("div",$t,[s("div",_t,[s("span",vt,i(g.label),1),g.pro?(n(),b($,{key:0,size:"small",type:"warning",effect:"plain",class:"model-option-pro"},{default:a(()=>[...t[4]||(t[4]=[v("Pro",-1)])]),_:1})):c("",!0)]),s("span",yt,i(g.desc),1)])]),_:2},1032,["label","value","class"]))),128))]),_:1},8,["modelValue","placeholder"])]),e.custom?(n(),u("div",bt,[s("span",kt,i(e.$t("suno.name.instrumental")),1),o(k,{modelValue:e.instrumental,"onUpdate:modelValue":t[3]||(t[3]=g=>e.instrumental=g)},null,8,["modelValue"])])):c("",!0)])}const Ct=E(pt,[["render",wt],["__scopeId","data-v-a6ada414"]]),Vt=A({name:"UploadAudio",components:{ElUpload:Ge,ElButton:B,ElDialog:le,ElTabs:we,ElTabPane:ke,InfoIcon:F,FontAwesomeIcon:z,ElRadioGroup:J,ElRadioButton:te},emits:["change"],data(){return{fileList:[],uploadUrl:Ie()+"/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(){w.warning(this.$t("suno.message.uploadReferencesExceed"))},onError(){w.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},d=this.credential?.token;if(!d){console.error("no token specified");return}w.info(this.$t("suno.message.startingUploadAudio"));try{const r=await L.upload(t,{token:d});console.debug("get upload music success",r.data);const m=r.data?.data.audio_id;this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,audio_id:m,action:"upload_extend"}),w.success(this.$t("suno.message.startUploadAudioSuccess"))}catch(r){w.error(r?.response?.data?.error?.message||this.$t("suno.message.startUploadAudioFailed"))}},async startRecording(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){w.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),w.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 d=await fetch(this.uploadUrl,{method:"POST",headers:{Authorization:`Bearer ${this.$store.state.token.access}`},body:e});if(!d.ok)throw new Error(`upload failed: ${d.status}`);const r=await d.json(),m=r?.file_url||r?.data?.file_url;if(!m)throw new Error("no file_url in response");this.audioPreviewUrl=m,await this.onGenerateAudioId(m),this.dialogVisible=!1,this.resetRecording()}catch(e){console.error(e),w.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)}}}),St={class:"relative"},Tt={class:"flex justify-between items-center mb-2"},At={class:"flex justify-start items-center"},Pt={class:"text-sm font-bold"},Ut={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"},Dt={class:"py-4 text-center"},zt={class:"recorder-display mb-4"},jt={key:0,class:"text-red-500 flex items-center justify-center gap-2"},Gt={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"],qt={class:"flex justify-center gap-3"};function Wt(e,t,d,r,m,y){const $=l("info-icon"),p=l("font-awesome-icon"),f=l("el-button"),k=l("el-radio-button"),g=l("el-radio-group"),T=l("el-upload"),_=l("el-tab-pane"),V=l("el-tabs"),C=l("el-dialog");return n(),u("div",St,[s("div",Tt,[s("div",At,[s("span",Pt,i(e.$t("suno.name.referenceAudios")),1),o($,{content:e.$t("suno.description.uploadAudios")},null,8,["content"])]),o(f,{round:"",type:"primary",size:"small",onClick:t[0]||(t[0]=I=>e.dialogVisible=!0)},{default:a(()=>[o(p,{icon:"fa-solid fa-plus",class:"icon mr-1"}),v(" "+i(e.$t("suno.button.addAudio")),1)]),_:1})]),e.audioPreviewUrl?(n(),u("div",Ut,[s("audio",{src:e.audioPreviewUrl,controls:"",class:"w-full"},null,8,Et)])):c("",!0),e.hasUploadedAudio?(n(),u("div",It,[o(g,{modelValue:e.uploadAction,"onUpdate:modelValue":t[1]||(t[1]=I=>e.uploadAction=I),size:"small"},{default:a(()=>[o(k,{value:"upload_extend"},{default:a(()=>[v(i(e.$t("suno.button.extend")),1)]),_:1}),o(k,{value:"upload_cover"},{default:a(()=>[v(i(e.$t("suno.button.upload_cover")),1)]),_:1})]),_:1},8,["modelValue"])])):c("",!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:a(()=>[o(V,{modelValue:e.activeTab,"onUpdate:modelValue":t[3]||(t[3]=I=>e.activeTab=I),class:"add-audio-tabs"},{default:a(()=>[o(_,{name:"browse",label:e.$t("suno.tab.browse")},{default:a(()=>[s("div",Rt,[o(T,{"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:a(()=>[s("div",Lt,[o(p,{icon:"fa-solid fa-upload",class:"text-4xl text-gray-400 mb-3"}),s("div",Mt,i(e.$t("suno.description.dropAudioHere")),1),s("div",Ft,i(e.$t("suno.description.audioFormats")),1)])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])]),_:1},8,["label"]),o(_,{name:"record",label:e.$t("suno.tab.record")},{default:a(()=>[s("div",Dt,[s("div",zt,[e.recording?(n(),u("div",jt,[t[5]||(t[5]=s("span",{class:"recording-dot"},null,-1)),s("span",Gt,i(e.formattedTime),1)])):e.recordedBlob?(n(),u("div",Bt,[o(p,{icon:"fa-solid fa-check-circle",class:"text-2xl mr-2"}),s("span",null,i(e.$t("suno.message.recordingReady"))+" ("+i(e.formattedTime)+")",1)])):(n(),u("div",Ot,"00:00"))]),e.recordedAudioUrl&&!e.recording?(n(),u("div",Nt,[s("audio",{src:e.recordedAudioUrl,controls:"",class:"w-full"},null,8,Ht)])):c("",!0),s("div",qt,[!e.recording&&!e.recordedBlob?(n(),b(f,{key:0,type:"primary",round:"",onClick:e.startRecording},{default:a(()=>[o(p,{icon:"fa-solid fa-microphone",class:"mr-1"}),v(" "+i(e.$t("suno.button.startRecord")),1)]),_:1},8,["onClick"])):c("",!0),e.recording?(n(),b(f,{key:1,type:"danger",round:"",onClick:e.stopRecording},{default:a(()=>[o(p,{icon:"fa-solid fa-stop",class:"mr-1"}),v(" "+i(e.$t("suno.button.stopRecord")),1)]),_:1},8,["onClick"])):c("",!0),e.recordedBlob&&!e.recording?(n(),u(M,{key:2},[o(f,{round:"",onClick:e.resetRecording},{default:a(()=>[o(p,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),v(" "+i(e.$t("suno.button.reRecord")),1)]),_:1},8,["onClick"]),o(f,{type:"primary",round:"",loading:e.uploadingRecord,onClick:e.uploadRecording},{default:a(()=>[o(p,{icon:"fa-solid fa-upload",class:"mr-1"}),v(" "+i(e.$t("suno.button.useRecording")),1)]),_:1},8,["loading","onClick"])],64)):c("",!0)])])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title"])])}const Kt=E(Vt,[["render",Wt],["__scopeId","data-v-bfb6b53d"]]),Qt="",he=[{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"}],Jt=8;function ge(e){const t=[...e];for(let d=t.length-1;d>0;d--){const r=Math.floor(Math.random()*(d+1));[t[d],t[r]]=[t[r],t[d]]}return t}const Yt=A({name:"PromptInput",components:{ElInput:W,FontAwesomeIcon:z,InfoIcon:F},data(){return{shuffledTags:ge(he)}},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,Jt)}},mounted(){this.prompt||(this.prompt=Qt)},methods:{onTagClick(e){this.prompt=e.prompt},onRefreshTags(){this.shuffledTags=ge(he)}}}),Zt={class:"field"},Xt={class:"flex items-center mb-1"},xt={class:"text-sm font-bold"},eo={class:"inspo-tags"},to=["onClick"];function oo(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-input"),f=l("font-awesome-icon");return n(),u("div",Zt,[s("div",Xt,[s("span",xt,i(e.$t("suno.name.songDescription")),1),o($,{content:e.$t("suno.description.prompt")},null,8,["content"])]),o(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=k=>e.prompt=k),rows:4,type:"textarea",placeholder:e.$t("suno.placeholder.prompt")},null,8,["modelValue","placeholder"]),s("div",eo,[(n(!0),u(M,null,D(e.visibleTags,k=>(n(),u("button",{key:k.key,class:"inspo-tag",onClick:g=>e.onTagClick(k)},i(k.label),9,to))),128)),s("button",{class:"inspo-tag inspo-tag-refresh",onClick:t[1]||(t[1]=(...k)=>e.onRefreshTags&&e.onRefreshTags(...k))},[o(f,{icon:"fa-solid fa-arrows-rotate"})])])])}const so=E(Yt,[["render",oo],["__scopeId","data-v-378e4372"]]),no="",io=A({name:"LyricInput",components:{ElInput:W,ElButton:B,ElTooltip:pe,ElDialog:le,FontAwesomeIcon:z,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=no)},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,w.info(this.$t("suno.message.enhancingLyrics"));try{const t=`${this.enhancePrompt}
1
+ import{F as z}from"./index.es-CcBUl4Ve.js";import{E as B}from"./index-2TCFMqGF.js";import{E as ye}from"./index-Cvahlpuq.js";import{d as A,H as u,E as s,z as ne,C as o,y as a,D as l,q as n,Q as G,F as i,O as M,N as D,J as c,x as b,I as v,U as ie,G as O,K as q,M as U,u as j,c as H,w as Pe,L as Ue}from"./vendor-vue-DU0w5ewx.js";import{D as E,E as Ee,aZ as le,b0 as Ie,e2 as re,e3 as de,R as x,G as be,ao as Z,e4 as ee,e5 as Re,a6 as Le}from"./index-CyoIUj9o.js";import{a as Me}from"./errorCode-Cqj9Td_Z.js";import{s as L}from"./suno-oZikzgzu.js";import{b as Fe}from"./suno-DFuCGH70.js";import{E as De}from"./index-L7wFFlJR.js";import{E as ue,a as ce}from"./index-MoiDefkl.js";import{I as F,S as ze}from"./ScrollList-Bd_whHIM.js";import{E as te,a as J,b as je}from"./index-CqUbUQVX.js";import{E as ke,a as we}from"./index-DloEz0X2.js";import{E as Ge}from"./index-D3n7t1sr.js";import{E as w}from"./index-CwnkvnQz.js";import{E as W}from"./index-Cdyu259y.js";import{E as pe}from"./index-ChvBuD6w.js";import{u as X,F as Be,O as Oe,_ as fe,P as Ne,a as He,V as qe,E as We}from"./IconPark.vue_vue_type_script_setup_true_lang-CTt87WbC.js";import{E as oe,a as me}from"./index-BL-LYkbS.js";import{E as N}from"./index-cmW6UCjk.js";import{E as Ke,a as Qe}from"./index-0scbvCFJ.js";import{E as Je,a as Ye}from"./index-DKYYyuO0.js";import{E as Ce}from"./index-w4wDQphH.js";import{C as Ze}from"./Consumption-CFmPsSrx.js";import{a as Xe}from"./price-BZipbZ8r.js";import{E as xe}from"./index-CrxfAbfT.js";import{E as et}from"./index-DBAMWhz_.js";import{E as Ve,b as Se,a as Te}from"./index-CzJHTgdJ.js";import{E as Ae}from"./index-Bb-FlhbS.js";import{N as tt}from"./NoTasks-C2byzBat.js";import{a as ot,E as st}from"./index-BeZopvCY.js";import{l as nt}from"./pagination-CcnL0MdN.js";import"./use-form-item-Dg0Eipdq.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./validator-CpWOJ6dE.js";import"./index-CO0CMurV.js";import"./index-BIsP0mLd.js";import"./typescript-DWaRSzS6.js";import"./strings-DigWlKo9.js";import"./isEqual-CCZvVGcc.js";import"./_Uint8Array-DujiT55f.js";import"./castArray-bn2-PUXx.js";import"./debounce-CEYGSL3j.js";import"./_baseIteratee-CXHXeeg4.js";import"./index-Cg4fPpjQ.js";import"./_baseClone-geOLU9hT.js";import"./_initCloneObject-D64QzBW_.js";import"./isPlainObject-B3JketaP.js";import"./index-DwUkKFb1.js";import"./index-Bz0iDXPF.js";import"./index-CHiGCqdo.js";import"./dropdown-4I2okC6N.js";const it=A({name:"LayoutSuno",components:{ElDrawer:ye,ElButton:B,FontAwesomeIcon:z},data(){return{drawer:!1,preview:!1}},computed:{}}),at={class:"main flex flex-row flex-1"},lt={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},rt={class:"result h-full flex flex-col flex-1 min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"},dt={class:"preview h-full w-[300px] flex flex-col"};function ut(e,t,d,r,m,y){const $=l("font-awesome-icon"),p=l("el-button"),f=l("el-drawer");return n(),u("div",at,[s("div",lt,[ne(e.$slots,"config",{},void 0,!0)]),s("div",rt,[ne(e.$slots,"result",{},void 0,!0)]),s("div",dt,[ne(e.$slots,"preview",{},void 0,!0)]),o(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=k=>e.drawer=!0)},{default:a(()=>[o($,{icon:"fa-solid fa-magic"})]),_:1}),o(f,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=k=>e.drawer=k),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:a(()=>[ne(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const ct=E(it,[["render",ut],["__scopeId","data-v-c6c85757"]]),pt=A({name:"TypeSelector",components:{ElSelect:ce,ElOption:ue,ElSwitch:De,ElTag:Ee},data(){return{options:[{label:"v5.5",value:"chirp-v5-5",desc:this.$t("suno.model.v55desc"),pro:!0},{label:"v5",value:"chirp-v5",desc:this.$t("suno.model.v5desc"),pro:!0},{label:"v4.5+",value:"chirp-v4-5-plus",desc:this.$t("suno.model.v45plusdesc"),pro:!0},{label:"v4.5",value:"chirp-v4-5",desc:this.$t("suno.model.v45desc"),pro:!0,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=Fe)}}),mt={class:"mode-tabs mb-3"},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,d,r,m,y){const $=l("el-tag"),p=l("el-option"),f=l("el-select"),k=l("el-switch");return n(),u("div",null,[s("div",mt,[s("button",{class:G(["mode-tab",{active:!e.custom}]),onClick:t[0]||(t[0]=g=>e.custom=!1)},i(e.$t("suno.mode.simple")),3),s("button",{class:G(["mode-tab",{active:e.custom}]),onClick:t[1]||(t[1]=g=>e.custom=!0)},i(e.$t("suno.mode.custom")),3)]),s("div",ft,[s("div",ht,[s("span",gt,i(e.$t("suno.name.model")),1)]),o(f,{modelValue:e.model,"onUpdate:modelValue":t[2]||(t[2]=g=>e.model=g),class:"w-full model-select",size:"default",placeholder:e.$t("suno.placeholder.select")},{default:a(()=>[(n(!0),u(M,null,D(e.options,g=>(n(),b(p,{key:g.value,label:g.label,value:g.value,class:G({"model-option-divider":g.dividerAfter})},{default:a(()=>[s("div",$t,[s("div",_t,[s("span",vt,i(g.label),1),g.pro?(n(),b($,{key:0,size:"small",type:"warning",effect:"plain",class:"model-option-pro"},{default:a(()=>[...t[4]||(t[4]=[v("Pro",-1)])]),_:1})):c("",!0)]),s("span",yt,i(g.desc),1)])]),_:2},1032,["label","value","class"]))),128))]),_:1},8,["modelValue","placeholder"])]),e.custom?(n(),u("div",bt,[s("span",kt,i(e.$t("suno.name.instrumental")),1),o(k,{modelValue:e.instrumental,"onUpdate:modelValue":t[3]||(t[3]=g=>e.instrumental=g)},null,8,["modelValue"])])):c("",!0)])}const Ct=E(pt,[["render",wt],["__scopeId","data-v-a6ada414"]]),Vt=A({name:"UploadAudio",components:{ElUpload:Ge,ElButton:B,ElDialog:le,ElTabs:we,ElTabPane:ke,InfoIcon:F,FontAwesomeIcon:z,ElRadioGroup:J,ElRadioButton:te},emits:["change"],data(){return{fileList:[],uploadUrl:Ie()+"/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(){w.warning(this.$t("suno.message.uploadReferencesExceed"))},onError(){w.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},d=this.credential?.token;if(!d){console.error("no token specified");return}w.info(this.$t("suno.message.startingUploadAudio"));try{const r=await L.upload(t,{token:d});console.debug("get upload music success",r.data);const m=r.data?.data.audio_id;this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,audio_id:m,action:"upload_extend"}),w.success(this.$t("suno.message.startUploadAudioSuccess"))}catch(r){w.error(r?.response?.data?.error?.message||this.$t("suno.message.startUploadAudioFailed"))}},async startRecording(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){w.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),w.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 d=await fetch(this.uploadUrl,{method:"POST",headers:{Authorization:`Bearer ${this.$store.state.token.access}`},body:e});if(!d.ok)throw new Error(`upload failed: ${d.status}`);const r=await d.json(),m=r?.file_url||r?.data?.file_url;if(!m)throw new Error("no file_url in response");this.audioPreviewUrl=m,await this.onGenerateAudioId(m),this.dialogVisible=!1,this.resetRecording()}catch(e){console.error(e),w.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)}}}),St={class:"relative"},Tt={class:"flex justify-between items-center mb-2"},At={class:"flex justify-start items-center"},Pt={class:"text-sm font-bold"},Ut={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"},Dt={class:"py-4 text-center"},zt={class:"recorder-display mb-4"},jt={key:0,class:"text-red-500 flex items-center justify-center gap-2"},Gt={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"],qt={class:"flex justify-center gap-3"};function Wt(e,t,d,r,m,y){const $=l("info-icon"),p=l("font-awesome-icon"),f=l("el-button"),k=l("el-radio-button"),g=l("el-radio-group"),T=l("el-upload"),_=l("el-tab-pane"),V=l("el-tabs"),C=l("el-dialog");return n(),u("div",St,[s("div",Tt,[s("div",At,[s("span",Pt,i(e.$t("suno.name.referenceAudios")),1),o($,{content:e.$t("suno.description.uploadAudios")},null,8,["content"])]),o(f,{round:"",type:"primary",size:"small",onClick:t[0]||(t[0]=I=>e.dialogVisible=!0)},{default:a(()=>[o(p,{icon:"fa-solid fa-plus",class:"icon mr-1"}),v(" "+i(e.$t("suno.button.addAudio")),1)]),_:1})]),e.audioPreviewUrl?(n(),u("div",Ut,[s("audio",{src:e.audioPreviewUrl,controls:"",class:"w-full"},null,8,Et)])):c("",!0),e.hasUploadedAudio?(n(),u("div",It,[o(g,{modelValue:e.uploadAction,"onUpdate:modelValue":t[1]||(t[1]=I=>e.uploadAction=I),size:"small"},{default:a(()=>[o(k,{value:"upload_extend"},{default:a(()=>[v(i(e.$t("suno.button.extend")),1)]),_:1}),o(k,{value:"upload_cover"},{default:a(()=>[v(i(e.$t("suno.button.upload_cover")),1)]),_:1})]),_:1},8,["modelValue"])])):c("",!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:a(()=>[o(V,{modelValue:e.activeTab,"onUpdate:modelValue":t[3]||(t[3]=I=>e.activeTab=I),class:"add-audio-tabs"},{default:a(()=>[o(_,{name:"browse",label:e.$t("suno.tab.browse")},{default:a(()=>[s("div",Rt,[o(T,{"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:a(()=>[s("div",Lt,[o(p,{icon:"fa-solid fa-upload",class:"text-4xl text-gray-400 mb-3"}),s("div",Mt,i(e.$t("suno.description.dropAudioHere")),1),s("div",Ft,i(e.$t("suno.description.audioFormats")),1)])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])]),_:1},8,["label"]),o(_,{name:"record",label:e.$t("suno.tab.record")},{default:a(()=>[s("div",Dt,[s("div",zt,[e.recording?(n(),u("div",jt,[t[5]||(t[5]=s("span",{class:"recording-dot"},null,-1)),s("span",Gt,i(e.formattedTime),1)])):e.recordedBlob?(n(),u("div",Bt,[o(p,{icon:"fa-solid fa-check-circle",class:"text-2xl mr-2"}),s("span",null,i(e.$t("suno.message.recordingReady"))+" ("+i(e.formattedTime)+")",1)])):(n(),u("div",Ot,"00:00"))]),e.recordedAudioUrl&&!e.recording?(n(),u("div",Nt,[s("audio",{src:e.recordedAudioUrl,controls:"",class:"w-full"},null,8,Ht)])):c("",!0),s("div",qt,[!e.recording&&!e.recordedBlob?(n(),b(f,{key:0,type:"primary",round:"",onClick:e.startRecording},{default:a(()=>[o(p,{icon:"fa-solid fa-microphone",class:"mr-1"}),v(" "+i(e.$t("suno.button.startRecord")),1)]),_:1},8,["onClick"])):c("",!0),e.recording?(n(),b(f,{key:1,type:"danger",round:"",onClick:e.stopRecording},{default:a(()=>[o(p,{icon:"fa-solid fa-stop",class:"mr-1"}),v(" "+i(e.$t("suno.button.stopRecord")),1)]),_:1},8,["onClick"])):c("",!0),e.recordedBlob&&!e.recording?(n(),u(M,{key:2},[o(f,{round:"",onClick:e.resetRecording},{default:a(()=>[o(p,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),v(" "+i(e.$t("suno.button.reRecord")),1)]),_:1},8,["onClick"]),o(f,{type:"primary",round:"",loading:e.uploadingRecord,onClick:e.uploadRecording},{default:a(()=>[o(p,{icon:"fa-solid fa-upload",class:"mr-1"}),v(" "+i(e.$t("suno.button.useRecording")),1)]),_:1},8,["loading","onClick"])],64)):c("",!0)])])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title"])])}const Kt=E(Vt,[["render",Wt],["__scopeId","data-v-bfb6b53d"]]),Qt="",he=[{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"}],Jt=8;function ge(e){const t=[...e];for(let d=t.length-1;d>0;d--){const r=Math.floor(Math.random()*(d+1));[t[d],t[r]]=[t[r],t[d]]}return t}const Yt=A({name:"PromptInput",components:{ElInput:W,FontAwesomeIcon:z,InfoIcon:F},data(){return{shuffledTags:ge(he)}},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,Jt)}},mounted(){this.prompt||(this.prompt=Qt)},methods:{onTagClick(e){this.prompt=e.prompt},onRefreshTags(){this.shuffledTags=ge(he)}}}),Zt={class:"field"},Xt={class:"flex items-center mb-1"},xt={class:"text-sm font-bold"},eo={class:"inspo-tags"},to=["onClick"];function oo(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-input"),f=l("font-awesome-icon");return n(),u("div",Zt,[s("div",Xt,[s("span",xt,i(e.$t("suno.name.songDescription")),1),o($,{content:e.$t("suno.description.prompt")},null,8,["content"])]),o(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=k=>e.prompt=k),rows:4,type:"textarea",placeholder:e.$t("suno.placeholder.prompt")},null,8,["modelValue","placeholder"]),s("div",eo,[(n(!0),u(M,null,D(e.visibleTags,k=>(n(),u("button",{key:k.key,class:"inspo-tag",onClick:g=>e.onTagClick(k)},i(k.label),9,to))),128)),s("button",{class:"inspo-tag inspo-tag-refresh",onClick:t[1]||(t[1]=(...k)=>e.onRefreshTags&&e.onRefreshTags(...k))},[o(f,{icon:"fa-solid fa-arrows-rotate"})])])])}const so=E(Yt,[["render",oo],["__scopeId","data-v-378e4372"]]),no="",io=A({name:"LyricInput",components:{ElInput:W,ElButton:B,ElTooltip:pe,ElDialog:le,FontAwesomeIcon:z,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=no)},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,w.info(this.$t("suno.message.enhancingLyrics"));try{const t=`${this.enhancePrompt}
2
2
 
3
3
  Original lyrics:
4
4
  ${this.lyric}`,r=(await L.lyric({prompt:t},{token:e})).data?.data;r?.text&&(this.lyric=r.text,this.enhancePrompt="",w.success(this.$t("suno.message.enhanceLyricsSuccess")))}catch{w.error(this.$t("suno.message.enhanceLyricsFailed"))}finally{this.enhancingLyrics=!1}}},async onGenerateLyrics(){const e=this.credential?.token;if(!e)return;this.pushHistory();const t=this.config?.style||this.config?.title||"a beautiful song";this.generatingLyrics=!0,w.info(this.$t("suno.message.generatingLyrics"));try{const r=(await L.lyric({prompt:t},{token:e})).data?.data;r?.text&&(this.lyric=r.text,r?.title&&!this.config?.title&&this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric:r.text,title:r.title}),w.success(this.$t("suno.message.generateLyricsSuccess")))}catch{w.error(this.$t("suno.message.generateLyricsFailed"))}finally{this.generatingLyrics=!1}}}}),ao={class:"field"},lo={class:"flex items-center justify-between mb-1"},ro={class:"flex items-center"},uo={class:"text-sm font-bold"},co={class:"flex items-center gap-1"},po={class:"relative"},mo={class:"text-xs text-right text-[var(--el-text-color-secondary)] mt-1"},fo={key:0,class:"enhance-bar"},ho={key:0,class:"enhance-bar mt-3"},go={class:"flex items-center justify-between"},$o={class:"flex items-center gap-1"};function _o(e,t,d,r,m,y){const $=l("info-icon"),p=l("font-awesome-icon"),f=l("el-button"),k=l("el-tooltip"),g=l("el-input"),T=l("el-dialog");return n(),u("div",ao,[s("div",lo,[s("div",ro,[s("span",uo,i(e.$t("suno.name.lyrics")),1),o($,{content:e.$t("suno.description.lyrics")},null,8,["content"])]),s("div",co,[e.lyricHistory.length>0?(n(),b(k,{key:0,content:e.$t("suno.button.undo"),placement:"top"},{default:a(()=>[o(f,{size:"small",circle:"",onClick:e.onUndo},{default:a(()=>[o(p,{icon:"fa-solid fa-rotate-left"})]),_:1},8,["onClick"])]),_:1},8,["content"])):c("",!0),e.lyric?(n(),b(k,{key:1,content:e.$t("suno.button.clear_lyrics"),placement:"top"},{default:a(()=>[o(f,{size:"small",circle:"",onClick:e.onClear},{default:a(()=>[o(p,{icon:"fa-solid fa-eraser"})]),_:1},8,["onClick"])]),_:1},8,["content"])):c("",!0),o(k,{content:e.$t("suno.button.expand_lyrics"),placement:"top"},{default:a(()=>[o(f,{size:"small",circle:"",onClick:t[0]||(t[0]=_=>e.expanded=!0)},{default:a(()=>[o(p,{icon:"fa-solid fa-expand"})]),_:1})]),_:1},8,["content"]),e.config?.action!=="extend"?(n(),b(f,{key:2,size:"small",loading:e.generatingLyrics,round:"",onClick:e.onGenerateLyrics},{default:a(()=>[e.generatingLyrics?c("",!0):(n(),b(p,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),v(" "+i(e.$t("suno.button.generate_lyrics")),1)]),_:1},8,["loading","onClick"])):c("",!0)])]),s("div",po,[e.config?.action!=="extend"?(n(),b(g,{key:0,modelValue:e.lyric,"onUpdate:modelValue":t[1]||(t[1]=_=>e.lyric=_),rows:5,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.lyrics")},null,8,["modelValue","placeholder"])):(n(),b(g,{key:1,modelValue:e.lyric,"onUpdate:modelValue":t[2]||(t[2]=_=>e.lyric=_),rows:5,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.extend.lyrics")},null,8,["modelValue","placeholder"])),s("div",mo,i(e.lyric?.length||0)+"/5000",1)]),e.lyric&&e.config?.action!=="extend"?(n(),u("div",fo,[o(g,{modelValue:e.enhancePrompt,"onUpdate:modelValue":t[3]||(t[3]=_=>e.enhancePrompt=_),size:"small",placeholder:e.$t("suno.placeholder.enhanceLyrics"),class:"enhance-input",onKeyup:ie(e.onEnhanceLyrics,["enter"])},{append:a(()=>[o(f,{loading:e.enhancingLyrics,onClick:e.onEnhanceLyrics},{default:a(()=>[e.enhancingLyrics?c("",!0):(n(),b(p,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),v(" "+i(e.$t("suno.button.enhance_lyrics")),1)]),_:1},8,["loading","onClick"])]),_:1},8,["modelValue","placeholder","onKeyup"])])):c("",!0),o(T,{modelValue:e.expanded,"onUpdate:modelValue":t[7]||(t[7]=_=>e.expanded=_),title:e.$t("suno.name.lyrics"),width:"720px",top:"5vh","close-on-click-modal":!1,class:"lyrics-expand-dialog"},{footer:a(()=>[s("div",go,[s("div",$o,[e.lyricHistory.length>0?(n(),b(f,{key:0,size:"small",onClick:e.onUndo},{default:a(()=>[o(p,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),v(" "+i(e.$t("suno.button.undo")),1)]),_:1},8,["onClick"])):c("",!0),e.lyric?(n(),b(f,{key:1,size:"small",onClick:e.onClear},{default:a(()=>[o(p,{icon:"fa-solid fa-eraser",class:"mr-1"}),v(" "+i(e.$t("suno.button.clear_lyrics")),1)]),_:1},8,["onClick"])):c("",!0),e.config?.action!=="extend"?(n(),b(f,{key:2,size:"small",loading:e.generatingLyrics,onClick:e.onGenerateLyrics},{default:a(()=>[e.generatingLyrics?c("",!0):(n(),b(p,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),v(" "+i(e.$t("suno.button.generate_lyrics")),1)]),_:1},8,["loading","onClick"])):c("",!0)]),o(f,{type:"primary",onClick:t[6]||(t[6]=_=>e.expanded=!1)},{default:a(()=>[v(i(e.$t("common.button.confirm")),1)]),_:1})])]),default:a(()=>[o(g,{modelValue:e.lyric,"onUpdate:modelValue":t[4]||(t[4]=_=>e.lyric=_),type:"textarea",rows:20,class:"lyrics-expanded",placeholder:e.$t("suno.placeholder.lyrics"),autofocus:""},null,8,["modelValue","placeholder"]),e.config?.action!=="extend"?(n(),u("div",ho,[o(g,{modelValue:e.enhancePrompt,"onUpdate:modelValue":t[5]||(t[5]=_=>e.enhancePrompt=_),size:"small",placeholder:e.$t("suno.placeholder.enhanceLyrics"),class:"enhance-input",onKeyup:ie(e.onEnhanceLyrics,["enter"])},{append:a(()=>[o(f,{loading:e.enhancingLyrics,onClick:e.onEnhanceLyrics},{default:a(()=>[e.enhancingLyrics?c("",!0):(n(),b(p,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),v(" "+i(e.$t("suno.button.enhance_lyrics")),1)]),_:1},8,["loading","onClick"])]),_:1},8,["modelValue","placeholder","onKeyup"])])):c("",!0)]),_:1},8,["modelValue","title"])])}const vo=E(io,[["render",_o],["__scopeId","data-v-2b97a493"]]),$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"],yo=12;function _e(e){const t=[...e];for(let d=t.length-1;d>0;d--){const r=Math.floor(Math.random()*(d+1));[t[d],t[r]]=[t[r],t[d]]}return t}const bo=A({name:"StyleInput",components:{ElInput:W,ElButton:B,FontAwesomeIcon:z,InfoIcon:F},data(){return{optimizing:!1,shuffledTags:_e($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,yo)}},methods:{onTagClick(e){const t=this.style||"";t.toLowerCase().includes(e.toLowerCase())||(this.style=t?`${t}, ${e}`:e)},onRefreshTags(){this.shuffledTags=_e($e)},async onOptimizeStyle(){const e=this.credential?.token;if(!(!e||!this.style)){this.optimizing=!0,w.info(this.$t("suno.message.optimizingStyle"));try{const t=await L.style({prompt:this.style},{token:e}),d=t.data?.text||t.data?.data?.text;d&&(this.style=d,w.success(this.$t("suno.message.optimizeStyleSuccess")))}catch{w.error(this.$t("suno.message.optimizeStyleFailed"))}finally{this.optimizing=!1}}}}}),ko={class:"field"},wo={class:"flex items-center justify-between mb-1"},Co={class:"flex items-center"},Vo={class:"text-sm font-bold"},So={class:"relative"},To={class:"text-xs text-right text-[var(--el-text-color-secondary)] mt-1"},Ao={class:"style-tags"},Po=["onClick"];function Uo(e,t,d,r,m,y){const $=l("info-icon"),p=l("font-awesome-icon"),f=l("el-button"),k=l("el-input");return n(),u("div",ko,[s("div",wo,[s("div",Co,[s("span",Vo,i(e.$t("suno.name.style")),1),o($,{content:e.$t("suno.description.style")},null,8,["content"])]),o(f,{size:"small",loading:e.optimizing,round:"",onClick:e.onOptimizeStyle},{default:a(()=>[e.optimizing?c("",!0):(n(),b(p,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),v(" "+i(e.$t("suno.button.optimize_style")),1)]),_:1},8,["loading","onClick"])]),s("div",So,[o(k,{modelValue:e.style,"onUpdate:modelValue":t[0]||(t[0]=g=>e.style=g),rows:2,type:"textarea",placeholder:e.$t("suno.placeholder.style")},null,8,["modelValue","placeholder"]),s("div",To,i(e.style?.length||0)+"/1000",1)]),s("div",Ao,[(n(!0),u(M,null,D(e.visibleTags,g=>(n(),u("button",{key:g,class:"style-tag",onClick:T=>e.onTagClick(g)},i(g),9,Po))),128)),s("button",{class:"style-tag style-tag-refresh",onClick:t[1]||(t[1]=(...g)=>e.onRefreshTags&&e.onRefreshTags(...g))},[o(p,{icon:"fa-solid fa-arrows-rotate"})])])])}const Eo=E(bo,[["render",Uo],["__scopeId","data-v-ddebb076"]]),Io=A({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})}}}}),Ro={class:"field"},Lo={class:"flex items-center mb-1"},Mo={class:"text-sm font-bold"};function Fo(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-input");return n(),u("div",Ro,[s("div",Lo,[s("span",Mo,i(e.$t("suno.name.title")),1),o($,{content:e.$t("suno.description.title")},null,8,["content"])]),o(p,{modelValue:e.title,"onUpdate:modelValue":t[0]||(t[0]=f=>e.title=f),placeholder:e.$t("suno.placeholder.title")},null,8,["modelValue","placeholder"])])}const Do=E(Io,[["render",Fo]]),zo=A({name:"ExtendFromInput",components:{ElImage:N,ElIcon:x,ElInputNumber:oe,VideoPlay:de,VideoPause:re},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:X,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})}}}),jo={class:"field"},Go={class:"box"},Bo={class:"title font-bold"},Oo={class:"input-wrapper"},No={class:"task"},Ho={class:"left"},qo={key:2,class:"duration"},Wo={class:"info"},Ko={class:"title"},Qo={class:"style"};function Jo(e,t,d,r,m,y){const $=l("el-input-number"),p=l("el-image"),f=l("video-pause"),k=l("el-icon"),g=l("video-play"),T=q("loading");return n(),u("div",jo,[s("div",Go,[s("h2",Bo,i(e.$t("suno.name.extend")),1),s("div",Oo,[o($,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=_=>e.value=_),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",No,[e.audio?(n(),u("div",{key:0,class:"audio",onClick:t[3]||(t[3]=_=>e.onClick(e.audio))},[O((n(),u("div",Ho,[o(p,{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(),u("div",{key:0,class:"overlay",onClick:t[1]||(t[1]=_=>e.onPause(e.audio))},[o(k,null,{default:a(()=>[o(f)]),_:1})])):c("",!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(),u("div",{key:1,class:"overlay",onClick:t[2]||(t[2]=_=>e.onPlay(e.audio))},[o(k,null,{default:a(()=>[o(g)]),_:1})])):c("",!0),e.audio?.duration?(n(),u("div",qo,i(e.useFormatDuring(e.audio?.duration)),1)):c("",!0)])),[[T,!e.audio?.audio_url]]),s("div",Wo,[s("h2",Ko,i(e.audio?.title),1),s("p",Qo,i(e.audio?.style),1)])])):c("",!0)])])}const Yo=E(zo,[["render",Jo],["__scopeId","data-v-bcce4821"]]),Zo=A({name:"CoverFromInput",components:{ElImage:N,ElIcon:x,VideoPlay:de,VideoPause:re},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:X,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})}}}),Xo={class:"field"},xo={class:"box"},es={class:"title font-bold"},ts={class:"task"},os={class:"left"},ss={key:2,class:"duration"},ns={class:"info"},is={class:"title"},as={class:"style"};function ls(e,t,d,r,m,y){const $=l("el-image"),p=l("video-pause"),f=l("el-icon"),k=l("video-play"),g=q("loading");return n(),u("div",Xo,[s("div",xo,[s("h2",es,i(e.$t("suno.name.cover")),1)]),s("div",ts,[e.audio?(n(),u("div",{key:0,class:"audio",onClick:t[2]||(t[2]=T=>e.onClick(e.audio))},[O((n(),u("div",os,[o($,{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(),u("div",{key:0,class:"overlay",onClick:t[0]||(t[0]=T=>e.onPause(e.audio))},[o(f,null,{default:a(()=>[o(p)]),_:1})])):c("",!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(),u("div",{key:1,class:"overlay",onClick:t[1]||(t[1]=T=>e.onPlay(e.audio))},[o(f,null,{default:a(()=>[o(k)]),_:1})])):c("",!0),e.audio?.duration?(n(),u("div",ss,i(e.useFormatDuring(e.audio?.duration)),1)):c("",!0)])),[[g,!e.audio?.audio_url]]),s("div",ns,[s("h2",is,i(e.audio?.title),1),s("p",as,i(e.audio?.style),1)])])):c("",!0)])])}const rs=E(Zo,[["render",ls],["__scopeId","data-v-06640216"]]),ds=A({name:"VocalGenderSelector",components:{ElRadioGroup:J,ElRadioButton:te,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})}}}}),us={class:"mb-2"},cs={class:"flex items-center mb-1"},ps={class:"text-sm font-bold"};function ms(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-radio-button"),f=l("el-radio-group");return n(),u("div",us,[s("div",cs,[s("span",ps,i(e.$t("suno.name.vocalGender")),1),o($,{content:e.$t("suno.description.vocalGender")},null,8,["content"])]),o(f,{modelValue:e.vocalGender,"onUpdate:modelValue":t[0]||(t[0]=k=>e.vocalGender=k)},{default:a(()=>[o(p,{value:""},{default:a(()=>[v(i(e.$t("suno.gender.auto")),1)]),_:1}),o(p,{value:"f"},{default:a(()=>[v(i(e.$t("suno.gender.female")),1)]),_:1}),o(p,{value:"m"},{default:a(()=>[v(i(e.$t("suno.gender.male")),1)]),_:1})]),_:1},8,["modelValue"])])}const fs=E(ds,[["render",ms]]),hs=A({name:"AdvancedParams",components:{ElCollapse:Qe,ElCollapseItem:Ke,ElInput:W,ElSlider:me,ElRadioGroup:J,ElRadioButton:te},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})}}}}),gs={key:0,class:"mb-3"},$s={class:"flex items-center mb-1"},_s={class:"text-xs font-bold"},vs={key:1,class:"mb-3"},ys={class:"flex items-center mb-1"},bs={class:"text-xs font-bold"},ks={key:2,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)]"},Ss={key:3,class:"mb-3"},Ts={class:"flex items-center justify-between mb-1"},As={class:"text-xs font-bold"},Ps={class:"text-xs text-[var(--el-text-color-secondary)]"},Us={key:4,class:"mb-3"},Es={class:"flex items-center mb-1"},Is={class:"text-xs font-bold"},Rs={key:5,class:"mb-3"},Ls={class:"flex items-center justify-between mb-1"},Ms={class:"text-xs font-bold"},Fs={class:"text-xs text-[var(--el-text-color-secondary)]"},Ds={key:6,class:"mb-3"},zs={class:"flex items-center mb-1"},js={class:"text-xs font-bold"};function Gs(e,t,d,r,m,y){const $=l("el-input"),p=l("el-slider"),f=l("el-radio-button"),k=l("el-radio-group"),g=l("el-collapse-item"),T=l("el-collapse");return n(),b(T,{modelValue:e.activeNames,"onUpdate:modelValue":t[7]||(t[7]=_=>e.activeNames=_),class:"advanced-collapse"},{default:a(()=>[o(g,{title:e.$t("suno.name.advancedParams"),name:"advanced"},{default:a(()=>[e.config?.custom?(n(),u("div",gs,[s("div",$s,[s("span",_s,i(e.$t("suno.name.styleNegative")),1)]),o($,{modelValue:e.styleNegative,"onUpdate:modelValue":t[0]||(t[0]=_=>e.styleNegative=_),placeholder:e.$t("suno.placeholder.styleNegative")},null,8,["modelValue","placeholder"])])):c("",!0),e.config?.custom&&!e.config?.instrumental?(n(),u("div",vs,[s("div",ys,[s("span",bs,i(e.$t("suno.name.lyricPrompt")),1)]),o($,{modelValue:e.lyricPrompt,"onUpdate:modelValue":t[1]||(t[1]=_=>e.lyricPrompt=_),placeholder:e.$t("suno.placeholder.lyricPrompt")},null,8,["modelValue","placeholder"])])):c("",!0),e.config?.custom?(n(),u("div",ks,[s("div",ws,[s("span",Cs,i(e.$t("suno.name.weirdness")),1),s("span",Vs,i(e.weirdness??0),1)]),o(p,{modelValue:e.weirdness,"onUpdate:modelValue":t[2]||(t[2]=_=>e.weirdness=_),min:0,max:100,step:1},null,8,["modelValue"])])):c("",!0),e.config?.custom?(n(),u("div",Ss,[s("div",Ts,[s("span",As,i(e.$t("suno.name.styleInfluence")),1),s("span",Ps,i(e.styleInfluence??50),1)]),o(p,{modelValue:e.styleInfluence,"onUpdate:modelValue":t[3]||(t[3]=_=>e.styleInfluence=_),min:0,max:100,step:1},null,8,["modelValue"])])):c("",!0),e.isV5OrAbove?(n(),u("div",Us,[s("div",Es,[s("span",Is,i(e.$t("suno.name.variationCategory")),1)]),o(k,{modelValue:e.variationCategory,"onUpdate:modelValue":t[4]||(t[4]=_=>e.variationCategory=_)},{default:a(()=>[o(f,{value:""},{default:a(()=>[v(i(e.$t("suno.gender.auto")),1)]),_:1}),o(f,{value:"high"},{default:a(()=>[v(i(e.$t("suno.variation.high")),1)]),_:1}),o(f,{value:"low"},{default:a(()=>[v(i(e.$t("suno.variation.low")),1)]),_:1})]),_:1},8,["modelValue"])])):c("",!0),e.config?.action==="cover"?(n(),u("div",Rs,[s("div",Ls,[s("span",Ms,i(e.$t("suno.name.audioWeight")),1),s("span",Fs,i(e.audioWeight??50),1)]),o(p,{modelValue:e.audioWeight,"onUpdate:modelValue":t[5]||(t[5]=_=>e.audioWeight=_),min:0,max:100,step:1},null,8,["modelValue"])])):c("",!0),e.config?.custom&&!e.config?.instrumental?(n(),u("div",Ds,[s("div",zs,[s("span",js,i(e.$t("suno.name.lyricsMode")),1)]),o(k,{modelValue:e.lyricsMode,"onUpdate:modelValue":t[6]||(t[6]=_=>e.lyricsMode=_)},{default:a(()=>[o(f,{value:"manual"},{default:a(()=>[v(i(e.$t("suno.lyricsMode.manual")),1)]),_:1}),o(f,{value:"auto"},{default:a(()=>[v(i(e.$t("suno.lyricsMode.auto")),1)]),_:1})]),_:1},8,["modelValue"])])):c("",!0)]),_:1},8,["title"])]),_:1},8,["modelValue"])}const Bs=E(hs,[["render",Gs],["__scopeId","data-v-505f8fc7"]]),Os=A({name:"ReplaceSectionInput",components:{ElInputNumber:oe,ElImage:N,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"})}}}),Ns={class:"field"},Hs={class:"flex items-center mb-2"},qs={class:"text-sm font-bold m-0"},Ws={key:0,class:"task mb-2"},Ks={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},Qs={class:"info flex-1 min-w-0"},Js={class:"text-sm font-bold m-0 truncate"},Ys={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},Zs={class:"flex gap-2"};function Xs(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-image"),f=l("el-input-number"),k=q("loading");return n(),u("div",Ns,[s("div",Hs,[s("h2",qs,i(e.$t("suno.name.replaceSection")),1),o($,{content:e.$t("suno.description.replaceSection")},null,8,["content"])]),e.audio?(n(),u("div",Ws,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=g=>e.onClick(e.audio))},[O((n(),u("div",Ks,[o(p,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[k,!e.audio?.audio_url]]),s("div",Qs,[s("h2",Js,i(e.audio?.title),1),s("p",Ys,i(e.audio?.style),1)])])])):c("",!0),s("div",Zs,[o(f,{modelValue:e.replaceSectionStart,"onUpdate:modelValue":t[1]||(t[1]=g=>e.replaceSectionStart=g),class:"flex-1",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.replaceSectionStart")},null,8,["modelValue","max","placeholder"]),o(f,{modelValue:e.replaceSectionEnd,"onUpdate:modelValue":t[2]||(t[2]=g=>e.replaceSectionEnd=g),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 xs=E(Os,[["render",Xs]]),en=A({name:"OverpaintingInput",components:{ElInputNumber:oe,ElImage:N,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"})}}}),tn={class:"field"},on={class:"flex items-center mb-2"},sn={class:"text-sm font-bold m-0"},nn={key:0,class:"task mb-2"},an={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},ln={class:"info flex-1 min-w-0"},rn={class:"text-sm font-bold m-0 truncate"},dn={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},un={class:"flex gap-2"};function cn(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-image"),f=l("el-input-number"),k=q("loading");return n(),u("div",tn,[s("div",on,[s("h2",sn,i(e.$t("suno.name.overpaintingRange")),1),o($,{content:e.$t("suno.description.overpainting")},null,8,["content"])]),e.audio?(n(),u("div",nn,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=g=>e.onClick(e.audio))},[O((n(),u("div",an,[o(p,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[k,!e.audio?.audio_url]]),s("div",ln,[s("h2",rn,i(e.audio?.title),1),s("p",dn,i(e.audio?.style),1)])])])):c("",!0),s("div",un,[o(f,{modelValue:e.overpaintingStart,"onUpdate:modelValue":t[1]||(t[1]=g=>e.overpaintingStart=g),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(f,{modelValue:e.overpaintingEnd,"onUpdate:modelValue":t[2]||(t[2]=g=>e.overpaintingEnd=g),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 pn=E(en,[["render",cn]]),mn=A({name:"UnderpaintingInput",components:{ElInputNumber:oe,ElImage:N,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"})}}}),fn={class:"field"},hn={class:"flex items-center mb-2"},gn={class:"text-sm font-bold m-0"},$n={key:0,class:"task mb-2"},_n={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},vn={class:"info flex-1 min-w-0"},yn={class:"text-sm font-bold m-0 truncate"},bn={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},kn={class:"flex gap-2"};function wn(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-image"),f=l("el-input-number"),k=q("loading");return n(),u("div",fn,[s("div",hn,[s("h2",gn,i(e.$t("suno.name.underpaintingRange")),1),o($,{content:e.$t("suno.description.underpainting")},null,8,["content"])]),e.audio?(n(),u("div",$n,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=g=>e.onClick(e.audio))},[O((n(),u("div",_n,[o(p,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[k,!e.audio?.audio_url]]),s("div",vn,[s("h2",yn,i(e.audio?.title),1),s("p",bn,i(e.audio?.style),1)])])])):c("",!0),s("div",kn,[o(f,{modelValue:e.underpaintingStart,"onUpdate:modelValue":t[1]||(t[1]=g=>e.underpaintingStart=g),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(f,{modelValue:e.underpaintingEnd,"onUpdate:modelValue":t[2]||(t[2]=g=>e.underpaintingEnd=g),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 Cn=E(mn,[["render",wn]]),Vn=A({name:"SamplesInput",components:{ElInputNumber:oe,ElImage:N,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"})}}}),Sn={class:"field"},Tn={class:"flex items-center mb-2"},An={class:"text-sm font-bold m-0"},Pn={key:0,class:"task mb-2"},Un={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},En={class:"info flex-1 min-w-0"},In={class:"text-sm font-bold m-0 truncate"},Rn={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},Ln={class:"flex gap-2"};function Mn(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-image"),f=l("el-input-number"),k=q("loading");return n(),u("div",Sn,[s("div",Tn,[s("h2",An,i(e.$t("suno.name.samplesRange")),1),o($,{content:e.$t("suno.description.samples")},null,8,["content"])]),e.audio?(n(),u("div",Pn,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=g=>e.onClick(e.audio))},[O((n(),u("div",Un,[o(p,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[k,!e.audio?.audio_url]]),s("div",En,[s("h2",In,i(e.audio?.title),1),s("p",Rn,i(e.audio?.style),1)])])])):c("",!0),s("div",Ln,[o(f,{modelValue:e.samplesStart,"onUpdate:modelValue":t[1]||(t[1]=g=>e.samplesStart=g),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(f,{modelValue:e.samplesEnd,"onUpdate:modelValue":t[2]||(t[2]=g=>e.samplesEnd=g),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 Fn=E(Vn,[["render",Mn]]),Dn=[.5,.75,1,1.25,1.5,2],zn=A({name:"AdjustSpeedInput",components:{ElRadioGroup:J,ElRadioButton:te,ElImage:N,InfoIcon:F},data(){return{options:Dn}},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"})}}}),jn={class:"field"},Gn={class:"flex items-center mb-2"},Bn={class:"text-sm font-bold m-0"},On={key:0,class:"task mb-2"},Nn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},Hn={class:"info flex-1 min-w-0"},qn={class:"text-sm font-bold m-0 truncate"},Wn={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"};function Kn(e,t,d,r,m,y){const $=l("info-icon"),p=l("el-image"),f=l("el-radio-button"),k=l("el-radio-group"),g=q("loading");return n(),u("div",jn,[s("div",Gn,[s("h2",Bn,i(e.$t("suno.name.adjustSpeed")),1),o($,{content:e.$t("suno.description.adjustSpeed")},null,8,["content"])]),e.audio?(n(),u("div",On,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=T=>e.onClick(e.audio))},[O((n(),u("div",Nn,[o(p,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[g,!e.audio?.audio_url]]),s("div",Hn,[s("h2",qn,i(e.audio?.title),1),s("p",Wn,i(e.audio?.style),1)])])])):c("",!0),o(k,{modelValue:e.speed,"onUpdate:modelValue":t[1]||(t[1]=T=>e.speed=T),size:"small",class:"speed-group"},{default:a(()=>[(n(!0),u(M,null,D(e.options,T=>(n(),b(f,{key:T,value:T},{default:a(()=>[v(i(T)+"x",1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])}const Qn=E(zn,[["render",Kn],["__scopeId","data-v-ba834628"]]),Jn=A({name:"VoiceCreateDialog",components:{ElDialog:le,ElForm:Ye,ElFormItem:Je,ElInput:W,ElButton:B,ElRadioGroup:J,ElRadio:je},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}),w.success(this.$t("suno.voice.createSuccess")),this.$emit("created"),this.onClose()}catch{w.error(this.$t("suno.voice.createFailed"))}finally{this.loading=!1}}}}});function Yn(e,t,d,r,m,y){const $=l("el-input"),p=l("el-form-item"),f=l("el-radio"),k=l("el-radio-group"),g=l("el-form"),T=l("el-button"),_=l("el-dialog");return n(),b(_,{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:a(()=>[o(T,{onClick:e.onClose},{default:a(()=>[v(i(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),o(T,{type:"primary",loading:e.loading,disabled:!e.canSubmit,onClick:e.onSubmit},{default:a(()=>[v(i(e.$t("suno.voice.create")),1)]),_:1},8,["loading","disabled","onClick"])]),default:a(()=>[o(g,{"label-position":"top",class:"voice-create-form"},{default:a(()=>[o(p,{label:e.$t("suno.voice.name")},{default:a(()=>[o($,{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(p,{label:e.$t("suno.voice.description")},{default:a(()=>[o($,{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(p,{label:e.$t("suno.voice.sourceType")},{default:a(()=>[o(k,{modelValue:e.sourceType,"onUpdate:modelValue":t[2]||(t[2]=V=>e.sourceType=V),class:"w-full"},{default:a(()=>[o(f,{value:"song"},{default:a(()=>[v(i(e.$t("suno.voice.fromSong")),1)]),_:1}),o(f,{value:"upload"},{default:a(()=>[v(i(e.$t("suno.voice.fromUpload")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.sourceType==="song"?(n(),b(p,{key:0,label:e.$t("suno.voice.audioId")},{default:a(()=>[o($,{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"])):c("",!0),e.sourceType==="upload"?(n(),b(p,{key:1,label:e.$t("suno.voice.audioUrl")},{default:a(()=>[o($,{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"])):c("",!0)]),_:1})]),_:1},8,["modelValue","title","onClose"])}const Zn=E(Jn,[["render",Yn]]),Xn=A({name:"VoiceManager",components:{ElButton:B,ElIcon:x,ElTabs:we,ElTabPane:ke,ElTooltip:pe,Loading:be,FontAwesomeIcon:z,VoiceCreateDialog:Zn},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(w.success(this.$t("suno.voice.deleteSuccess")),this.selectedPersonaId===e.persona_id){const d={...this.$store.state.suno?.config,persona_id:void 0};this.$store.dispatch("suno/setConfig",d)}this.favoriteIds.includes(e.persona_id)&&this.$store.commit("suno/togglePersonaFavorite",e.persona_id)}else w.error(this.$t("suno.voice.deleteFailed"))},async onCreated(){await this.loadPersonas()}}}),xn={class:"voice-manager"},ei={class:"flex items-center justify-between mb-3"},ti={class:"text-sm font-medium"},oi={key:0,class:"text-center py-6"},si={key:1,class:"text-center py-6 text-gray-400 text-sm"},ni={key:2,class:"voice-list"},ii=["onClick"],ai={class:"flex-1 min-w-0"},li={class:"voice-name"},ri={key:0,class:"voice-desc"};function di(e,t,d,r,m,y){const $=l("font-awesome-icon"),p=l("el-button"),f=l("el-tab-pane"),k=l("el-tabs"),g=l("loading"),T=l("el-icon"),_=l("el-tooltip"),V=l("voice-create-dialog");return n(),u("div",xn,[s("div",ei,[s("span",ti,i(e.$t("suno.voice.title")),1),o(p,{type:"primary",size:"small",onClick:t[0]||(t[0]=C=>e.showCreateDialog=!0)},{default:a(()=>[o($,{icon:"fa-solid fa-plus",class:"mr-1"}),v(" "+i(e.$t("suno.voice.create")),1)]),_:1})]),o(k,{modelValue:e.activeTab,"onUpdate:modelValue":t[1]||(t[1]=C=>e.activeTab=C),class:"voice-tabs",size:"small"},{default:a(()=>[o(f,{name:"all",label:e.$t("suno.voice.tabAll")+" ("+(e.personas?.length||0)+")"},null,8,["label"]),o(f,{name:"favorites",label:e.$t("suno.voice.tabFavorites")+" ("+e.favoritePersonas.length+")"},null,8,["label"])]),_:1},8,["modelValue"]),e.loading?(n(),u("div",oi,[o(T,{class:"is-loading"},{default:a(()=>[o(g)]),_:1})])):e.visiblePersonas.length===0?(n(),u("div",si,i(e.activeTab==="favorites"?e.$t("suno.voice.emptyFavorites"):e.$t("suno.voice.empty")),1)):(n(),u("div",ni,[(n(!0),u(M,null,D(e.visiblePersonas,C=>(n(),u("div",{key:C.persona_id,class:G(["voice-item",{active:e.selectedPersonaId===C.persona_id}]),onClick:I=>e.selectPersona(C)},[s("div",ai,[s("div",li,[o($,{icon:C.source_type==="voice"?"fa-solid fa-microphone":"fa-solid fa-music",class:"mr-1.5 text-xs opacity-60"},null,8,["icon"]),v(" "+i(C.name||C.persona_id),1)]),C.description?(n(),u("div",ri,i(C.description),1)):c("",!0)]),s("div",{class:"voice-actions",onClick:t[2]||(t[2]=U(()=>{},["stop"]))},[o(_,{content:e.isFavorite(C.persona_id)?e.$t("suno.voice.unfavorite"):e.$t("suno.voice.favorite"),placement:"top"},{default:a(()=>[o(p,{size:"small",text:"",class:G({"voice-fav-active":e.isFavorite(C.persona_id)}),onClick:I=>e.onToggleFavorite(C)},{default:a(()=>[o($,{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(p,{type:"danger",size:"small",text:"",loading:e.deletingId===C.persona_id,onClick:I=>e.onDelete(C)},{default:a(()=>[o($,{icon:"fa-solid fa-trash"})]),_:1},8,["loading","onClick"])])],10,ii))),128))])),o(V,{modelValue:e.showCreateDialog,"onUpdate:modelValue":t[3]||(t[3]=C=>e.showCreateDialog=C),onCreated:e.onCreated},null,8,["modelValue","onCreated"])])}const ui=E(Xn,[["render",di],["__scopeId","data-v-8b8e36d9"]]),ci=A({name:"PersonaInput",components:{ElSelect:ce,ElOption:ue,ElButton:B,ElDrawer:ye,FontAwesomeIcon:z,InfoIcon:F,VoiceManager:ui},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||[]}}}),pi={class:"field"},mi={class:"flex items-center justify-between mb-2"},fi={class:"flex items-center"},hi={class:"text-sm font-bold m-0"},gi={class:"flex items-center justify-between w-full"},$i={key:0,class:"text-xs text-gray-400 ml-2"};function _i(e,t,d,r,m,y){const $=l("info-icon"),p=l("font-awesome-icon"),f=l("el-button"),k=l("el-option"),g=l("el-select"),T=l("voice-manager"),_=l("el-drawer");return n(),u("div",pi,[s("div",mi,[s("div",fi,[s("h2",hi,i(e.$t("suno.name.persona")),1),o($,{content:e.$t("suno.description.persona")},null,8,["content"])]),o(f,{type:"primary",size:"small",text:"",onClick:t[0]||(t[0]=V=>e.showManager=!0)},{default:a(()=>[o(p,{icon:"fa-solid fa-microphone",class:"mr-1"}),v(" "+i(e.$t("suno.voice.manage")),1)]),_:1})]),o(g,{modelValue:e.personaId,"onUpdate:modelValue":t[1]||(t[1]=V=>e.personaId=V),size:"small",placeholder:e.$t("suno.placeholder.personaId"),clearable:"",filterable:"",class:"w-full"},{default:a(()=>[(n(!0),u(M,null,D(e.personas,V=>(n(),b(k,{key:V.persona_id||"",value:V.persona_id||"",label:V.name||V.persona_id||""},{default:a(()=>[s("div",gi,[s("span",null,i(V.name||V.persona_id),1),V.source_type?(n(),u("span",$i,i(V.source_type),1)):c("",!0)])]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"]),o(_,{modelValue:e.showManager,"onUpdate:modelValue":t[2]||(t[2]=V=>e.showManager=V),title:e.$t("suno.voice.title"),size:"380px",direction:"rtl"},{default:a(()=>[o(T)]),_:1},8,["modelValue","title"])])}const vi=E(ci,[["render",_i]]),yi=A({name:"PresetPanel",components:{TypeSelector:Ct,PromptInput:so,LyricInput:vo,StyleInput:Eo,TitleInput:Do,ExtendFromInput:Yo,CoverFromInput:rs,UploadAudio:Kt,VocalGenderSelector:fs,AdvancedParams:Bs,ReplaceSectionInput:xs,OverpaintingInput:pn,UnderpaintingInput:Cn,SamplesInput:Fn,AdjustSpeedInput:Qn,PersonaInput:vi,FontAwesomeIcon:z,ElButton:B,Consumption:Ze},emits:["generate"],computed:{config(){return this.$store.state.suno?.config},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})}}}),bi={class:"flex flex-col h-full"},ki={class:"flex-1 overflow-y-auto p-5"},wi={class:"flex flex-col items-center justify-center px-5 pb-5 gap-2"},Ci={class:"flex gap-2 w-full"};function Vi(e,t,d,r,m,y){const $=l("type-selector"),p=l("upload-audio"),f=l("prompt-input"),k=l("lyric-input"),g=l("style-input"),T=l("title-input"),_=l("vocal-gender-selector"),V=l("persona-input"),C=l("extend-from-input"),I=l("cover-from-input"),P=l("replace-section-input"),K=l("overpainting-input"),Q=l("underpainting-input"),Y=l("samples-input"),h=l("adjust-speed-input"),S=l("advanced-params"),ae=l("consumption"),R=l("font-awesome-icon"),se=l("el-button");return n(),u("div",bi,[s("div",ki,[o($,{class:"mb-4"}),o(p,{class:"mb-4"}),e.config?.custom?c("",!0):(n(),b(f,{key:0,class:"mb-4"})),e.config?.custom&&!e.config.instrumental?(n(),b(k,{key:1,class:"mb-4"})):c("",!0),e.config?.custom?(n(),b(g,{key:2,class:"mb-4"})):c("",!0),e.config?.custom?(n(),b(T,{key:3,class:"mb-4"})):c("",!0),e.config?.custom&&!e.config.instrumental&&e.supportsVocalGender?(n(),b(_,{key:4,class:"mb-4"})):c("",!0),e.config?.custom&&e.supportsPersona?(n(),b(V,{key:5,class:"mb-4"})):c("",!0),e.config?.action==="extend"?(n(),b(C,{key:6,class:"mb-4"})):c("",!0),e.config?.action==="cover"?(n(),b(I,{key:7,class:"mb-4"})):c("",!0),e.config?.action==="replace_section"?(n(),b(P,{key:8,class:"mb-4"})):c("",!0),e.config?.action==="overpainting"?(n(),b(K,{key:9,class:"mb-4"})):c("",!0),e.config?.action==="underpainting"?(n(),b(Q,{key:10,class:"mb-4"})):c("",!0),e.config?.action==="samples"?(n(),b(Y,{key:11,class:"mb-4"})):c("",!0),e.config?.action==="adjust_speed"?(n(),b(h,{key:12,class:"mb-4"})):c("",!0),o(S,{class:"mb-4"})]),s("div",wi,[o(ae,{value:e.consumption,service:e.service},null,8,["value","service"]),s("div",Ci,[o(se,{class:"flex-1",onClick:e.onClearAll},{default:a(()=>[o(R,{icon:"fa-solid fa-broom",class:"mr-1"}),v(" "+i(e.$t("suno.button.clear_all")),1)]),_:1},8,["onClick"]),o(se,{type:"primary",class:"flex-1",round:"",onClick:e.onGenerate},{default:a(()=>[o(R,{icon:"fa-solid fa-magic",class:"mr-2"}),v(" "+i(e.generateButtonText),1)]),_:1},8,["onClick"])])])])}const Si=E(yi,[["render",Vi],["__scopeId","data-v-fa2936b9"]]),ve="https://webhook.acedata.cloud/suno",Ti=A({name:"TaskPreview",components:{ElImage:N,ElIcon:x,ElTooltip:pe,FontAwesomeIcon:z,VideoPlay:de,VideoPause:re,ElDropdown:Te,ElDropdownMenu:Se,ElDropdownItem:Ve,ElInput:W,ElProgress:et,ElCheckbox:xe,Loading:be},props:{modelValue:{type:Object,required:!0}},data(){return{isFetchingVideoUrl:!1,isFetchingWav:!1,isFetchingMidi:!1,editingAudioId:null,editingTitle:""}},computed:{loading(){return this.$store.state.suno?.status?.getApplications===Z.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(d=>({...d,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:X,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 r=new URL(t).pathname,m=r.substring(r.lastIndexOf("/")+1);console.log("on preview",m),fetch(t).then(y=>y.blob()).then(y=>{Be.saveAs(y,m)})},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),w.error(this.$t("suno.message.getVideoUrlFailed"))}finally{this.isFetchingVideoUrl=!1}},async fetchVideoUrlFromApi(e){return new Promise((t,d)=>{const r={audio_id:e},m=this.credential?.token;if(!m){console.error("no token specified"),d(new Error("No token specified"));return}L.mp4(r,{token:m}).then(y=>{const $=y.data?.data?.video_url;$?t($):d(new Error("Video URL not found in response"))}).catch(y=>{d(y)})})},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)){w.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}),w.success(this.$t("suno.message.reusePromptSuccess"))},async onExtractVocals(e){const t=this.credential?.token;t&&(w.info(this.$t("suno.message.extractingVocals")),L.vox({audio_id:e,callback_url:ve},{token:t}).then(()=>{w.success(this.$t("suno.message.extractVocalsSuccess"))}).catch(d=>{w.error(d?.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&&(w.info(this.$t("suno.message.fetchingTiming")),L.timing({audio_id:e},{token:t}).then(d=>{w.success(this.$t("suno.message.fetchTimingSuccess")),console.debug("timing data",d.data)}).catch(d=>{w.error(d?.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,w.info(this.$t("suno.message.fetchingWav"));const r=(await L.wav({audio_id:e.id},{token:t})).data?.data?.audio_url;r?this.onDownload(null,r):w.error(this.$t("suno.message.fetchWavFailed"))}catch{w.error(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,w.info(this.$t("suno.message.fetchingMidi"));const r=(await L.midi({audio_id:e.id},{token:t})).data?.data?.midi_url;r?this.onDownload(null,r):w.error(this.$t("suno.message.fetchMidiFailed"))}catch{w.error(this.$t("suno.message.fetchMidiFailed"))}finally{this.isFetchingMidi=!1}},async onGenerateAudioUrl(e,t){const d={action:e,audio_id:t,callback_url:ve},r=this.credential?.token;if(!r){console.error("no token specified");return}w.info(this.$t("suno.message.startingTask")),L.audio(d,{token:r}).then(()=>{w.success(this.$t("suno.message.startTaskSuccess"))}).catch(m=>{w.error(m?.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],d=t.indexOf(e.id);d!==-1?t.splice(d,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 d=this.$store.state.suno?.tasks;if(d?.items)for(const r of d.items){const y=(r?.response?.data??[]).find($=>$.id===e.id);if(y){y.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 d of t.items){const r=d?.response?.data??[],m=r.findIndex(y=>y.id===e.id);if(m!==-1){if(r.splice(m,1),r.length===0){const y=t.items.indexOf(d);y!==-1&&t.items.splice(y,1)}break}}this.$store.state?.suno?.audio?.id===e.id&&this.$store.dispatch("suno/setAudio",null),w.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})}}}),Ai={class:"task"},Pi=["onClick"],Ui=["onClick"],Ei={class:"left"},Ii=["onClick"],Ri=["onClick"],Li={key:2,class:"duration"},Mi={class:"info"},Fi={key:1,class:"title-row"},Di={class:"title"},zi={class:"style"},ji={key:2,class:"progress-row"},Gi={class:"progress-text"},Bi={class:"right"},Oi={class:"el-dropdown-link"},Ni={class:"flex items-center min-w-[120px]"},Hi={class:"flex items-center min-w-[120px]"},qi={class:"flex items-center min-w-[120px]"},Wi={class:"el-dropdown-link"};function Ki(e,t,d,r,m,y){const $=l("el-checkbox"),p=l("el-image"),f=l("video-pause"),k=l("el-icon"),g=l("video-play"),T=l("el-input"),_=l("font-awesome-icon"),V=l("el-progress"),C=l("el-tooltip"),I=l("Loading"),P=l("el-dropdown-item"),K=l("el-dropdown-menu"),Q=l("el-dropdown"),Y=q("loading");return n(),u("div",Ai,[(n(!0),u(M,null,D(e.audios,h=>(n(),u("div",{key:h.id,class:G(["audio",{"mashup-selected":e.isMashupSelected(h)}]),onClick:U(S=>e.onClick(h),["stop"])},[e.isMashupMode&&h?.audio_url?(n(),u("div",{key:0,class:"mashup-check",onClick:U(S=>e.onToggleMashup(h),["stop"])},[o($,{"model-value":e.isMashupSelected(h),onClick:t[0]||(t[0]=U(()=>{},["stop"]))},null,8,["model-value"])],8,Ui)):c("",!0),O((n(),u("div",Ei,[o(p,{src:h?.image_url,class:"cover",fit:"cover",lazy:""},null,8,["src"]),h?.audio_url&&e.$store.state?.suno?.audio?.id===h.id&&e.$store.state?.suno?.audio?.state==="playing"?(n(),u("div",{key:0,class:"overlay",onClick:U(S=>e.onPause(h),["stop"])},[o(k,null,{default:a(()=>[o(f)]),_:1})],8,Ii)):c("",!0),h?.audio_url&&(e.$store.state?.suno?.audio?.id!==h.id||e.$store.state?.suno?.audio?.id===h.id&&e.$store.state?.suno?.audio?.state==="paused")?(n(),u("div",{key:1,class:"overlay",onClick:U(S=>e.onPlay(h),["stop"])},[o(k,null,{default:a(()=>[o(g)]),_:1})],8,Ri)):c("",!0),h?.duration?(n(),u("div",Li,i(e.useFormatDuring(h?.duration)),1)):c("",!0)])),[[Y,!h?.audio_url]]),s("div",Mi,[e.editingAudioId===h.id?(n(),u("div",{key:0,class:"title-edit",onClick:t[2]||(t[2]=U(()=>{},["stop"]))},[o(T,{ref_for:!0,ref:"titleInput",modelValue:e.editingTitle,"onUpdate:modelValue":t[1]||(t[1]=S=>e.editingTitle=S),size:"small",onKeyup:[ie(S=>e.onSaveTitleEdit(h),["enter"]),ie(e.onCancelTitleEdit,["escape"])],onBlur:S=>e.onSaveTitleEdit(h)},null,8,["modelValue","onKeyup","onBlur"])])):(n(),u("div",Fi,[s("h2",Di,i(h?.title),1),h?.audio_url?(n(),b(_,{key:0,icon:"fa-solid fa-pen",class:"edit-icon",onClick:U(S=>e.onStartTitleEdit(h),["stop"])},null,8,["onClick"])):c("",!0)])),s("p",zi,i(h?.style),1),!h?.audio_url&&h?.progress!=null&&h?.progress<100?(n(),u("div",ji,[o(V,{percentage:Math.round(h.progress),"stroke-width":4,"show-text":!1,status:"warning",class:"progress-bar"},null,8,["percentage"]),s("span",Gi,i(e.$t("suno.name.generating"))+" "+i(Math.round(h.progress))+"%",1)])):c("",!0)]),s("div",Bi,[o(Q,null,{dropdown:a(()=>[o(K,null,{default:a(()=>[o(P,{disabled:e.isFetchingVideoUrl,onClick:S=>e.handleVideoDownload(h)},{default:a(()=>[s("div",Ni,[e.isFetchingVideoUrl?(n(),b(k,{key:0,class:"is-loading mr-2"},{default:a(()=>[o(I)]),_:1})):c("",!0),s("span",null,i(e.$t("suno.button.download_video")),1)])]),_:1},8,["disabled","onClick"]),h?.audio_url?(n(),b(P,{key:0,onClick:U(S=>e.onDownload(S,h?.audio_url),["stop"])},{default:a(()=>[v(i(e.$t("suno.button.download_audio")),1)]),_:1},8,["onClick"])):c("",!0),o(P,{disabled:e.isFetchingWav,onClick:S=>e.handleWavDownload(h)},{default:a(()=>[s("div",Hi,[e.isFetchingWav?(n(),b(k,{key:0,class:"is-loading mr-2"},{default:a(()=>[o(I)]),_:1})):c("",!0),s("span",null,i(e.$t("suno.button.download_wav")),1)])]),_:1},8,["disabled","onClick"]),o(P,{disabled:e.isFetchingMidi,onClick:S=>e.handleMidiDownload(h)},{default:a(()=>[s("div",qi,[e.isFetchingMidi?(n(),b(k,{key:0,class:"is-loading mr-2"},{default:a(()=>[o(I)]),_:1})):c("",!0),s("span",null,i(e.$t("suno.button.download_midi")),1)])]),_:1},8,["disabled","onClick"])]),_:2},1024)]),default:a(()=>[s("span",Oi,[o(C,{effect:"dark",content:e.$t("suno.button.download"),placement:"top"},{default:a(()=>[h?.audio_url||h?.video_url?(n(),b(_,{key:0,icon:"fa-solid fa-download",class:"icon icon-download"})):c("",!0)]),_:2},1032,["content"])])]),_:2},1024),o(Q,null,{dropdown:a(()=>[o(K,{class:"suno-action-menu"},{default:a(()=>[h?.audio_url?(n(),b(P,{key:0,onClick:U(S=>e.onExtend(S,h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-forward",class:"menu-icon"}),v(" "+i(e.$t("suno.button.extend")),1)]),_:1},8,["onClick"])):c("",!0),o(P,{onClick:U(S=>e.onCover(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-music",class:"menu-icon"}),v(" "+i(e.$t("suno.button.cover_music")),1)]),_:1},8,["onClick"]),h?.id?(n(),b(P,{key:1,onClick:U(S=>e.onMashup(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-shuffle",class:"menu-icon"}),v(" "+i(e.$t("suno.button.mashup")),1)]),_:1},8,["onClick"])):c("",!0),h?.id&&h?.action==="extend"?(n(),b(P,{key:2,onClick:U(S=>e.onConcatMusic(h?.id),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-link",class:"menu-icon"}),v(" "+i(e.$t("suno.button.concat_music")),1)]),_:1},8,["onClick"])):c("",!0),t[3]||(t[3]=s("div",{class:"menu-divider"},null,-1)),h?.id?(n(),b(P,{key:3,onClick:U(S=>e.onReplaceSection(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-scissors",class:"menu-icon"}),v(" "+i(e.$t("suno.button.replace_section")),1)]),_:1},8,["onClick"])):c("",!0),h?.id?(n(),b(P,{key:4,onClick:U(S=>e.onOverpainting(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-microphone",class:"menu-icon"}),v(" "+i(e.$t("suno.button.overpainting")),1)]),_:1},8,["onClick"])):c("",!0),h?.id?(n(),b(P,{key:5,onClick:U(S=>e.onUnderpainting(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-guitar",class:"menu-icon"}),v(" "+i(e.$t("suno.button.underpainting")),1)]),_:1},8,["onClick"])):c("",!0),h?.id?(n(),b(P,{key:6,onClick:U(S=>e.onSamples(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-drum",class:"menu-icon"}),v(" "+i(e.$t("suno.button.samples")),1)]),_:1},8,["onClick"])):c("",!0),t[4]||(t[4]=s("div",{class:"menu-divider"},null,-1)),h.id?(n(),b(P,{key:7,onClick:U(S=>e.onGetStems(h.id),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-layer-group",class:"menu-icon"}),v(" "+i(e.$t("suno.button.get_stems")),1)]),_:1},8,["onClick"])):c("",!0),h.id?(n(),b(P,{key:8,onClick:U(S=>e.onGetAllStems(h.id),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-bars-staggered",class:"menu-icon"}),v(" "+i(e.$t("suno.button.all_stems")),1)]),_:1},8,["onClick"])):c("",!0),h?.id?(n(),b(P,{key:9,onClick:U(S=>e.onRemaster(h.id),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-wand-magic-sparkles",class:"menu-icon"}),v(" "+i(e.$t("suno.button.remaster")),1)]),_:1},8,["onClick"])):c("",!0),h?.id?(n(),b(P,{key:10,onClick:U(S=>e.onExtractVocals(h.id),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-headphones",class:"menu-icon"}),v(" "+i(e.$t("suno.button.extract_vocals")),1)]),_:1},8,["onClick"])):c("",!0),h?.id?(n(),b(P,{key:11,onClick:U(S=>e.onArtistConsistency(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-palette",class:"menu-icon"}),v(" "+i(e.$t("suno.button.artist_consistency")),1)]),_:1},8,["onClick"])):c("",!0),h?.id?(n(),b(P,{key:12,onClick:U(S=>e.onAdjustSpeed(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-gauge-high",class:"menu-icon"}),v(" "+i(e.$t("suno.button.adjust_speed")),1)]),_:1},8,["onClick"])):c("",!0),t[5]||(t[5]=s("div",{class:"menu-divider"},null,-1)),o(P,{onClick:U(S=>e.onReusePrompt(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-rotate-left",class:"menu-icon"}),v(" "+i(e.$t("suno.button.reuse_prompt")),1)]),_:1},8,["onClick"]),h?.id?(n(),b(P,{key:13,onClick:U(S=>e.onGetTiming(h.id),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-clock",class:"menu-icon"}),v(" "+i(e.$t("suno.button.get_timing")),1)]),_:1},8,["onClick"])):c("",!0),t[6]||(t[6]=s("div",{class:"menu-divider"},null,-1)),h?.id?(n(),b(P,{key:14,class:"delete-item",onClick:U(S=>e.onDelete(h),["stop"])},{default:a(()=>[o(_,{icon:"fa-solid fa-trash",class:"menu-icon delete-icon"}),v(" "+i(e.$t("suno.button.delete")),1)]),_:1},8,["onClick"])):c("",!0)]),_:2},1024)]),default:a(()=>[s("span",Wi,[o(C,{effect:"dark",content:e.$t("suno.button.more"),placement:"top"},{default:a(()=>[h?.audio_url||h?.video_url?(n(),b(_,{key:0,icon:"fa-solid fa-ellipsis",class:"icon icon-ellipsis"})):c("",!0)]),_:2},1032,["content"])])]),_:2},1024)])],10,Pi))),128))])}const Qi=E(Ti,[["render",Ki]]),Ji={class:"player-slider"},Yi=A({__name:"PlayerSlider",setup(e){const t=ee(),d=H({get:()=>t.state.suno?.audio?.progress,set:$=>t.commit("suno/setAudio",{...t.state.suno.audio,progress:$})}),r=H({get:()=>t.state.suno?.audio?.duration,set:$=>t.commit("suno/setAudio",{...t.state.suno.audio,duration:$})}),m=()=>{},y=$=>t.dispatch("suno/setAudio",{...t.state.suno.audio,progress:$});return($,p)=>(n(),u("div",Ji,[o(j(me),{modelValue:d.value,"onUpdate:modelValue":p[0]||(p[0]=f=>d.value=f),"show-tooltip":!1,min:0,max:r.value,onChange:y,onInput:m},null,8,["modelValue","max"])]))}}),Zi={class:"flex player-song"},Xi=["src"],xi={class:"ml-2 text-xs flex flex-col justify-between"},ea={class:"w-52 2xl:w-96 cursor-pointer truncate"},ta={class:"flex"},oa={class:"ml-2 text-dc"},sa=A({__name:"PlayerSong",setup(e){const t=ee(),d=H({get:()=>t.state.suno.audio,set:r=>t.commit("suno/setAudio",r)});return Pe(d,(r,m)=>{if(r?.audio_url!==m?.audio_url){console.log("audio changed",r),r.object&&(console.log("111",r.object),r.object.pause(),delete r.object);const y=new Audio(r.audio_url);r.state==="playing"?y.play():y.pause(),y.addEventListener("loadedmetadata",()=>{y.currentTime=0,y.addEventListener("timeupdate",()=>{t.commit("suno/setAudio",{...t.state.suno.audio,progress:y.currentTime})})}),t.commit("suno/setAudio",{...t.state.suno.audio,object:y})}else if(r?.progress!==m?.progress&&Math.abs(r.progress-r.object.currentTime)>2){console.log("progress changed",r.progress);const y=t.state.suno.audio;y.object&&(y.object.currentTime=y.progress)}else r?.state!==m?.state&&(console.log("state changed",r.state),r.object&&(r.state==="playing"?r.object.play():r.object.pause()));r?.volume!==m?.volume&&(console.log("volume changed",r.volume),r.object&&(r.object.volume=r.volume/100))}),(r,m)=>(n(),u("div",Zi,[s("img",{alt:"",class:"w-11 h-11 rounded",src:d.value?.image_url||j(Oe)},null,8,Xi),s("div",xi,[s("div",ea,[s("div",ta,[s("span",null,i(d.value?.title||"Music"),1),s("span",oa,"- "+i(d.value?.style||"SmallRuralDog"),1)])])])]))}}),na={class:"flex justify-end items-center gap-x-2.5"},ia={class:"text-xs"},aa=A({__name:"PlayerAction",setup(e){const t=ee(),d=H({get:()=>t.state.suno?.audio?.progress,set:m=>t.commit("suno/setAudio",{...t.state.suno.audio,progress:m})}),r=H({get:()=>t.state.suno?.audio?.duration,set:m=>t.commit("suno/setAudio",{...t.state.suno.audio,duration:m})});return(m,y)=>(n(),u("div",na,[s("span",ia,i(j(X)(d.value))+" / "+i(j(X)(r.value)),1)]))}}),la={class:"player-volume flex flex-col items-center pt-2"},ra={class:"text-sm mt-3"},da=A({__name:"PlayerVolumeSlider",setup(e){const t=ee(),d=H({get:()=>t.state.suno.audio?.volume,set:y=>t.commit("suno/setAudio",{...t.state.suno.audio,volume:y})}),r=H({get:()=>t.state.suno.audio?.muted,set:y=>t.commit("suno/setAudio",{...t.state.suno.audio,muted:y})}),m=y=>t.dispatch("suno/setVolume",y);return(y,$)=>(n(),u("div",la,[o(j(me),{modelValue:d.value,"onUpdate:modelValue":$[0]||($[0]=p=>d.value=p),vertical:"",height:"100px","show-tooltip":!1,max:100,min:0,size:"small",disabled:r.value,onInput:m},null,8,["modelValue","disabled"]),s("div",ra,i(d.value),1)]))}}),ua={class:"flex items-center justify-center gap-x-3"},ca=A({__name:"PlayerController",setup(e){const t=ee(),d=()=>t.dispatch("suno/setAudio",{...t.state.suno.audio,state:t.state.suno.audio.state==="playing"?"paused":"playing"}),r=H(()=>t.state.suno.audio);return(m,y)=>(n(),u("div",ua,[o(fe,{icon:r.value?.state==="playing"?j(Ne):j(He),size:"45",theme:"filled",class:"text-[var(--el-color-primary)] cursor-pointer",onClick:d},null,8,["icon"]),o(j(Ae),{placement:"top",width:"50px",trigger:"click"},{reference:a(()=>[o(fe,{icon:j(qe),size:"20","stroke-width":2,class:"cursor-pointer"},null,8,["icon"])]),default:a(()=>[o(da)]),_:1})]))}}),pa={class:"flex flex-col items-stretch h-20"},ma={class:"flex grow px-5 items-center"},fa={class:"flex-1"},ha={class:"flex-1"},ga={class:"flex-1"},$a=A({__name:"Player",setup(e){return(t,d)=>(n(),u("div",pa,[o(Yi),s("div",ma,[s("div",fa,[o(sa)]),s("div",ha,[o(ca)]),s("div",ga,[o(aa)])])]))}}),_a=A({name:"RecentPanel",components:{ElSkeletonItem:st,ElSkeleton:ot,ElInput:W,ElButton:B,ElDropdown:Te,ElDropdownMenu:Se,ElDropdownItem:Ve,ElPopover:Ae,ElRadioGroup:J,ElRadioButton:te,ElSelect:ce,ElOption:ue,FontAwesomeIcon:z,TaskPreview:Qi,Player:$a,NoTasks:tt,ScrollList:ze},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 d of e){const r=d?.response?.data??[];for(const m of r)m.model&&t.add(m.model)}return Array.from(t).sort()},filteredTasks(){let e=this.tasks?.items||[];if(this.searchQuery){const t=this.searchQuery.toLowerCase();e=e.filter(d=>(d?.response?.data??[]).some(m=>m.title?.toLowerCase().includes(t)||m.style?.toLowerCase().includes(t)||m.prompt?.toLowerCase().includes(t)))}return this.activeFilterCount>0&&(e=e.filter(t=>{const d=t?.request??{},r=t?.response?.data??[];return this.filterType==="vocal"&&d.instrumental===!0||this.filterType==="instrumental"&&d.instrumental!==!0?!1:this.filterDuration!=="all"||this.filterVideo!=="all"||this.filterModel&&this.filterModel!=="all"?r.some(m=>!(this.filterDuration==="short"&&!(typeof m.duration=="number"&&m.duration<60)||this.filterDuration==="medium"&&!(typeof m.duration=="number"&&m.duration>=60&&m.duration<=180)||this.filterDuration==="long"&&!(typeof m.duration=="number"&&m.duration>180)||this.filterVideo==="with"&&!m.video_url||this.filterVideo==="without"&&m.video_url||this.filterModel&&this.filterModel!=="all"&&m.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?.()}}}),va={key:0,class:"tasks"},ya={class:"left w-[70px] p-[10px] flex items-center"},ba={class:"main w-[calc(100%-70px)] flex-1 p-[10px]"},ka={key:0,class:"task-toolbar"},wa={key:0,class:"filter-badge"},Ca={class:"filter-popover"},Va={class:"filter-row"},Sa={class:"filter-label"},Ta={class:"filter-row"},Aa={class:"filter-label"},Pa={class:"filter-row"},Ua={class:"filter-label"},Ea={key:0,class:"filter-row"},Ia={class:"filter-label"},Ra={class:"filter-actions"},La={key:2,class:"w-full flex-1 flex items-center justify-center"},Ma={class:"text-sm text-gray-400"},Fa={key:3,class:"w-full flex-1 flex flex-col items-center justify-center gap-2"},Da={class:"text-sm text-gray-400"},za={key:4,class:"w-full flex-1 flex items-center justify-center"},ja={class:"h-20"};function Ga(e,t,d,r,m,y){const $=l("el-skeleton-item"),p=l("el-skeleton"),f=l("font-awesome-icon"),k=l("el-input"),g=l("el-button"),T=l("el-dropdown-item"),_=l("el-dropdown-menu"),V=l("el-dropdown"),C=l("el-radio-button"),I=l("el-radio-group"),P=l("el-option"),K=l("el-select"),Q=l("el-popover"),Y=l("task-preview"),h=l("scroll-list"),S=l("no-tasks"),ae=l("player");return n(),u(M,null,[e.tasks?.items===void 0?(n(),u("div",va,[(n(),u(M,null,D(3,R=>s("div",{key:R,class:"flex"},[s("div",ya,[o(p,{animated:""},{template:a(()=>[o($,{variant:"image",class:"avatar w-[50px] h-[50px]"})]),_:1})]),s("div",ba,[o(p,{animated:""},{template:a(()=>[o($,{variant:"p",class:"w-[200px] h-[15px] mb-[5px] mt-[10px]"}),o($,{variant:"text"})]),_:1})])])),64))])):(n(),u(M,{key:1},[e.tasks?.items?.length?(n(),u("div",ka,[o(k,{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:a(()=>[o(f,{icon:"fa-solid fa-magnifying-glass",class:"text-xs"})]),_:1},8,["modelValue","placeholder"]),o(V,{trigger:"click",onCommand:e.onSortChange},{dropdown:a(()=>[o(_,null,{default:a(()=>[o(T,{command:"newest",class:G({"is-active":e.sortBy==="newest"})},{default:a(()=>[v(i(e.$t("suno.sort.newest")),1)]),_:1},8,["class"]),o(T,{command:"oldest",class:G({"is-active":e.sortBy==="oldest"})},{default:a(()=>[v(i(e.$t("suno.sort.oldest")),1)]),_:1},8,["class"])]),_:1})]),default:a(()=>[o(g,{size:"small",class:"sort-btn"},{default:a(()=>[o(f,{icon:"fa-solid fa-arrow-down-wide-short",class:"mr-1"}),v(" "+i(e.sortLabel),1)]),_:1})]),_:1},8,["onCommand"]),o(Q,{trigger:"click",placement:"bottom-end",width:260},{reference:a(()=>[o(g,{size:"small",class:G(["filter-btn",{"has-active-filter":e.activeFilterCount>0}])},{default:a(()=>[o(f,{icon:"fa-solid fa-filter",class:"mr-1"}),v(" "+i(e.$t("suno.filter.title"))+" ",1),e.activeFilterCount>0?(n(),u("span",wa,i(e.activeFilterCount),1)):c("",!0)]),_:1},8,["class"])]),default:a(()=>[s("div",Ca,[s("div",Va,[s("div",Sa,i(e.$t("suno.filter.type")),1),o(I,{modelValue:e.filterType,"onUpdate:modelValue":t[1]||(t[1]=R=>e.filterType=R),size:"small"},{default:a(()=>[o(C,{value:"all"},{default:a(()=>[v(i(e.$t("suno.filter.typeAll")),1)]),_:1}),o(C,{value:"vocal"},{default:a(()=>[v(i(e.$t("suno.filter.typeVocal")),1)]),_:1}),o(C,{value:"instrumental"},{default:a(()=>[v(i(e.$t("suno.filter.typeInstrumental")),1)]),_:1})]),_:1},8,["modelValue"])]),s("div",Ta,[s("div",Aa,i(e.$t("suno.filter.duration")),1),o(I,{modelValue:e.filterDuration,"onUpdate:modelValue":t[2]||(t[2]=R=>e.filterDuration=R),size:"small"},{default:a(()=>[o(C,{value:"all"},{default:a(()=>[v(i(e.$t("suno.filter.durationAll")),1)]),_:1}),o(C,{value:"short"},{default:a(()=>[v(i(e.$t("suno.filter.durationShort")),1)]),_:1}),o(C,{value:"medium"},{default:a(()=>[v(i(e.$t("suno.filter.durationMedium")),1)]),_:1}),o(C,{value:"long"},{default:a(()=>[v(i(e.$t("suno.filter.durationLong")),1)]),_:1})]),_:1},8,["modelValue"])]),s("div",Pa,[s("div",Ua,i(e.$t("suno.filter.video")),1),o(I,{modelValue:e.filterVideo,"onUpdate:modelValue":t[3]||(t[3]=R=>e.filterVideo=R),size:"small"},{default:a(()=>[o(C,{value:"all"},{default:a(()=>[v(i(e.$t("suno.filter.videoAll")),1)]),_:1}),o(C,{value:"with"},{default:a(()=>[v(i(e.$t("suno.filter.videoWith")),1)]),_:1}),o(C,{value:"without"},{default:a(()=>[v(i(e.$t("suno.filter.videoWithout")),1)]),_:1})]),_:1},8,["modelValue"])]),e.availableModels.length>0?(n(),u("div",Ea,[s("div",Ia,i(e.$t("suno.filter.model")),1),o(K,{modelValue:e.filterModel,"onUpdate:modelValue":t[4]||(t[4]=R=>e.filterModel=R),size:"small",placeholder:e.$t("suno.filter.modelAll"),clearable:""},{default:a(()=>[o(P,{label:e.$t("suno.filter.modelAll"),value:"all"},null,8,["label"]),(n(!0),u(M,null,D(e.availableModels,R=>(n(),b(P,{key:R,label:R,value:R},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])):c("",!0),s("div",Ra,[o(g,{size:"small",text:"",onClick:e.onResetFilters},{default:a(()=>[v(i(e.$t("suno.filter.reset")),1)]),_:1},8,["onClick"])])])]),_:1})])):c("",!0),e.filteredTasks?.length>0?(n(),b(h,{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:a(()=>[(n(!0),u(M,null,D(e.filteredTasks,(R,se)=>(n(),b(Y,{key:se,"model-value":R,class:"preview"},null,8,["model-value"]))),128))]),_:1},8,["loading"])):e.searchQuery&&e.tasks?.items?.length>0?(n(),u("div",La,[s("p",Ma,i(e.$t("suno.message.noSearchResults")),1)])):e.activeFilterCount>0&&e.tasks?.items?.length>0?(n(),u("div",Fa,[s("p",Da,i(e.$t("suno.message.noFilterResults")),1),o(g,{size:"small",text:"",onClick:e.onResetFilters},{default:a(()=>[v(i(e.$t("suno.filter.reset")),1)]),_:1},8,["onClick"])])):e.tasks?.items?.length===0?(n(),u("div",za,[o(S)])):c("",!0)],64)),O(s("div",ja,[o(ae)],512),[[Ue,!!e.$store?.state?.suno?.audio?.object]])],64)}const Ba=E(_a,[["render",Ga],["__scopeId","data-v-4ab3f8f2"]]),Oa=A({name:"TaskPreview",components:{IconPicture:Re,ElImage:N,ElAvatar:We,ElIcon:x},computed:{audio(){return this.$store.state.suno?.audio}}}),Na={key:0,class:"size-full overflow-hidden"},Ha={class:"relative h-[300px]"},qa={class:"flex items-center justify-center size-full bg-[var(--el-bg-color)]"},Wa={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"},Qa={class:"flex items-center font-bold mb-2"},Ja={class:"text-[var(--el-text-color-regular)] mb-2"},Ya={class:"text-xs text-[var(--el-text-color-regular)]"},Za={class:"mt-4 text-sm leading-[25px] whitespace-pre-wrap"},Xa={key:1,class:"w-full h-full"};function xa(e,t,d,r,m,y){const $=l("icon-picture"),p=l("el-icon"),f=l("el-image"),k=l("el-avatar");return e.audio?.object?(n(),u("div",Na,[s("div",Ha,[o(f,{src:e.audio.image_url,fit:"cover",class:"size-full"},{error:a(()=>[s("div",qa,[o(p,{class:"text-3xl"},{default:a(()=>[o($)]),_:1})])]),_:1},8,["src"]),s("h2",Wa,i(e.audio?.title),1)]),s("div",Ka,[s("div",Qa,[o(k,{size:30,src:e.audio?.image_url,class:"mr-2"},null,8,["src"]),s("span",null,i(e.audio?.title),1)]),s("p",Ja,i(e.audio?.style),1),s("p",Ya,i(e.$dayjs.format(e.audio?.created_at)),1),s("div",Za,[s("p",null,i(e.audio?.lyric),1)])])])):(n(),u("div",Xa))}const el=E(Oa,[["render",xa]]),tl="https://webhook.acedata.cloud/suno",ol=A({name:"SunoIndex",components:{Layout:ct,ConfigPanel:Si,RecentPanel:Ba,PreviewPanel:el},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.suno?.status?.getApplications===Z.Request},tasksLoading(){return this.$store.state.suno?.status?.getTasks===Z.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===Z.Request},needApply(){return this.$store.state.suno.status.getApplications===Z.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 nt({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(){Le.create({application:this.application}).then(({data:e})=>{this.application=e,w.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{e?.response?.data?.code===Me&&w.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:d,createdAtMax:r}=e||{};console.debug("limit",t,"createdAtMin",d,"createdAtMax",r),this.fetchingTasks=!0;try{await this.$store.dispatch("suno/getTasks",{limit:t,createdAtMin:d,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerateAudio(){const e={...this.config,callback_url:tl},t=this.credential?.token;if(!t){console.error("no token specified");return}w.info(this.$t("suno.message.startingTask")),L.audio(e,{token:t}).then(()=>{w.success(this.$t("suno.message.startTaskSuccess"))}).catch(d=>{w.error(d?.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?.()}}});function sl(e,t,d,r,m,y){const $=l("config-panel"),p=l("recent-panel"),f=l("preview-panel"),k=l("layout");return n(),b(k,null,{config:a(()=>[o($,{onGenerate:e.onGenerateAudio},null,8,["onGenerate"])]),result:a(()=>[o(p,{ref:"recentPanel",class:"panel recent",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),preview:a(()=>[o(f)]),_:1})}const ir=E(ol,[["render",sl],["__scopeId","data-v-d1296b1a"]]);export{ir as default};
@@ -1 +1 @@
1
- import{F as x}from"./index.es-B5zr1Qur.js";import{E as A}from"./index--WZdvO2W.js";import{E as O}from"./index-B-2xeT4c.js";import{d as h,H as o,E as r,z as E,C as d,y as k,D as i,q as t,F as a,I,J as c,O as b,N as y,x as v,P as z}from"./vendor-vue-DU0w5ewx.js";import{D as m,ao as V}from"./index-CUnV_GqJ.js";import{E as U}from"./index-B6hXTw7_.js";import{E as N,a as P}from"./index-DVuT10gr.js";import{C as L}from"./Consumption-68quGGMc.js";import{a as D}from"./price-DnZ4NEW9.js";import{E as G,a as B}from"./index-DMwebEVO.js";import{b as T}from"./errorCode-Cqj9Td_Z.js";import{E as w}from"./index-B8IWtTUu.js";import"./use-form-item-DufqZxj5.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./typescript-BPytxeub.js";import"./index-CZzjgvO_.js";import"./index-XdFznrtI.js";import"./index-C6HZaOi9.js";import"./index-D72NhnP1.js";import"./strings-DigWlKo9.js";import"./isEqual-C3bUZSmi.js";import"./_Uint8Array-CB9YoPj6.js";import"./castArray-BRo9Wy18.js";import"./debounce-oh-nVV1M.js";import"./_baseIteratee-Cm1UCWOc.js";import"./index-C_LYFrIS.js";import"./index-DNfZVwwY.js";const K=h({name:"LayoutSerp",components:{ElDrawer:O,ElButton:A,FontAwesomeIcon:x},data(){return{drawer:!1}}}),Q={class:"main flex flex-row flex-1"},H={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},J={class:"result h-full flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function M(e,n,p,_,f,g){const s=i("font-awesome-icon"),l=i("el-button"),u=i("el-drawer");return t(),o("div",Q,[r("div",H,[E(e.$slots,"config",{},void 0,!0)]),r("div",J,[E(e.$slots,"result",{},void 0,!0)]),d(l,{circle:"",class:"menu",onClick:n[0]||(n[0]=$=>e.drawer=!0)},{default:k(()=>[d(s,{icon:"fa-solid fa-search"})]),_:1}),d(u,{modelValue:e.drawer,"onUpdate:modelValue":n[1]||(n[1]=$=>e.drawer=$),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:k(()=>[E(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const W=m(K,[["render",M],["__scopeId","data-v-99dba970"]]),X=h({name:"QueryInput",components:{ElInput:U},computed:{query:{get(){return this.$store.state.serp?.config?.query},set(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,query:e})}}}}),Y={class:"field"},Z={class:"box"},ee={class:"title font-bold"};function te(e,n,p,_,f,g){const s=i("el-input");return t(),o("div",Y,[r("div",Z,[r("h2",ee,a(e.$t("serp.name.query")),1)]),d(s,{modelValue:e.query,"onUpdate:modelValue":n[0]||(n[0]=l=>e.query=l),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("serp.placeholder.query")},null,8,["modelValue","placeholder"])])}const se=m(X,[["render",te],["__scopeId","data-v-3582b195"]]),oe=h({name:"TypeSelector",components:{ElSelect:P,ElOption:N},computed:{value:{get(){return this.$store.state.serp?.config?.type},set(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,type:e})}}},mounted(){this.value||(this.value="search")}}),re={class:"field"},ae={class:"title font-bold"};function ne(e,n,p,_,f,g){const s=i("el-option"),l=i("el-select");return t(),o("div",re,[r("h2",ae,a(e.$t("serp.name.type")),1),d(l,{modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),class:"value"},{default:k(()=>[d(s,{value:"search",label:e.$t("serp.type.search")},null,8,["label"]),d(s,{value:"images",label:e.$t("serp.type.images")},null,8,["label"]),d(s,{value:"news",label:e.$t("serp.type.news")},null,8,["label"]),d(s,{value:"videos",label:e.$t("serp.type.videos")},null,8,["label"])]),_:1},8,["modelValue"])])}const le=m(oe,[["render",ne],["__scopeId","data-v-2913fb62"]]),ie=h({name:"CountryInput",components:{ElInput:U},computed:{value:{get(){return this.$store.state.serp?.config?.country},set(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,country:e})}}},mounted(){this.value||(this.value="US")}}),ce={class:"field"},de={class:"title font-bold"};function ue(e,n,p,_,f,g){const s=i("el-input");return t(),o("div",ce,[r("h2",de,a(e.$t("serp.name.country")),1),d(s,{modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),class:"value",placeholder:e.$t("serp.placeholder.country")},null,8,["modelValue","placeholder"])])}const pe=m(ie,[["render",ue],["__scopeId","data-v-f0672cc6"]]),he=h({name:"LanguageInput",components:{ElInput:U},computed:{value:{get(){return this.$store.state.serp?.config?.language},set(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,language:e})}}},mounted(){this.value||(this.value="en")}}),me={class:"field"},_e={class:"title font-bold"};function fe(e,n,p,_,f,g){const s=i("el-input");return t(),o("div",me,[r("h2",_e,a(e.$t("serp.name.language")),1),d(s,{modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),class:"value",placeholder:e.$t("serp.placeholder.language")},null,8,["modelValue","placeholder"])])}const ge=m(he,[["render",fe],["__scopeId","data-v-dc1c94b7"]]),$e=h({name:"SearchPanel",components:{ElButton:A,FontAwesomeIcon:x,QueryInput:se,TypeSelector:le,CountryInput:pe,LanguageInput:ge,Consumption:L},emits:["search"],computed:{config(){return this.$store.state.serp?.config},consumption(){return D(this.config,this.service?.cost)},service(){return this.$store.state.serp?.service},searching(){return this.$store.state.serp?.status?.search===V.Request}},methods:{onSearch(){this.$emit("search")}}}),ve={class:"flex flex-col h-full"},be={class:"flex-1 overflow-y-auto p-5"},ye={class:"flex flex-col items-center justify-center px-5 pb-5"};function ke(e,n,p,_,f,g){const s=i("query-input"),l=i("type-selector"),u=i("country-input"),$=i("language-input"),S=i("consumption"),R=i("font-awesome-icon"),q=i("el-button");return t(),o("div",ve,[r("div",be,[d(s,{class:"mb-4"}),d(l,{class:"mb-4"}),d(u,{class:"mb-4"}),d($,{class:"mb-4"})]),r("div",ye,[d(S,{value:e.consumption,service:e.service},null,8,["value","service"]),d(q,{type:"primary",class:"btn w-full",round:"",loading:e.searching,onClick:e.onSearch},{default:k(()=>[d(R,{icon:"fa-solid fa-search",class:"mr-2"}),I(" "+a(e.$t("serp.button.search")),1)]),_:1},8,["loading","onClick"])])])}const we=m($e,[["render",ke]]),xe=h({name:"KnowledgeGraph",props:{data:{type:Object,required:!0}}}),Se={class:"knowledge-graph rounded-xl border border-[var(--el-border-color-lighter)] p-5 bg-[var(--el-fill-color-blank)]"},Re={class:"flex flex-row gap-4"},qe=["src","alt"],Ce={class:"flex-1 min-w-0"},Ee={key:0,class:"text-xs text-[var(--el-text-color-disabled)] mb-1 uppercase tracking-wide"},Ve={class:"text-xl font-bold mb-1.5"},Ie={key:1,class:"text-sm text-[var(--el-text-color-regular)] mb-3 leading-relaxed"},Ue=["href"],Ae={key:2,class:"text-sm"},je={class:"text-[var(--el-text-color-disabled)] flex-none font-medium"},Fe={class:"text-[var(--el-text-color-regular)]"};function Oe(e,n,p,_,f,g){return t(),o("div",Se,[r("div",Re,[e.data.image_url?(t(),o("img",{key:0,src:e.data.image_url,alt:e.data.title,class:"w-28 h-28 rounded-lg object-cover flex-none shadow-sm"},null,8,qe)):c("",!0),r("div",Ce,[e.data.type?(t(),o("div",Ee,a(e.data.type),1)):c("",!0),r("h3",Ve,a(e.data.title),1),e.data.description?(t(),o("p",Ie,[I(a(e.data.description)+" ",1),e.data.description_link?(t(),o("a",{key:0,href:e.data.description_link,target:"_blank",rel:"noopener noreferrer",class:"text-[var(--el-color-primary)] hover:underline ml-1"},a(e.data.description_source||"Source"),9,Ue)):c("",!0)])):c("",!0),e.data.attributes&&Object.keys(e.data.attributes).length?(t(),o("div",Ae,[(t(!0),o(b,null,y(e.data.attributes,(s,l)=>(t(),o("div",{key:l,class:"flex gap-2 mb-1 py-0.5"},[r("span",je,a(l)+":",1),r("span",Fe,a(s),1)]))),128))])):c("",!0)])])])}const ze=m(xe,[["render",Oe]]),Ne=h({name:"OrganicResult",props:{data:{type:Object,required:!0}},data(){return{faviconFailed:!1}},computed:{hostname(){if(!this.data.link)return"";try{return new URL(this.data.link).hostname}catch{return""}},pathname(){if(!this.data.link)return"";try{const e=new URL(this.data.link).pathname;return e==="/"?"":e}catch{return""}},displayUrl(){return this.hostname},faviconUrl(){return this.faviconFailed||!this.hostname?"":`https://www.google.com/s2/favicons?domain=${this.hostname}&sz=32`}},methods:{onFaviconError(e){this.faviconFailed=!0,e.target.style.display="none"}}}),Pe={class:"organic-result rounded-lg p-4 transition-all duration-200 hover:bg-[var(--el-fill-color-lighter)]"},Le={key:0,class:"flex items-center gap-2 mb-1.5"},De=["src","alt"],Ge={class:"text-xs text-[var(--el-text-color-secondary)] truncate"},Be={class:"text-xs text-[var(--el-text-color-disabled)]"},Te=["href"],Ke={key:1,class:"text-xs text-[var(--el-text-color-disabled)] mt-1"},Qe={key:2,class:"text-sm text-[var(--el-text-color-regular)] mt-1.5 leading-relaxed line-clamp-3"},He={key:3,class:"mt-3 flex flex-wrap gap-x-4 gap-y-1"},Je=["href"];function Me(e,n,p,_,f,g){return t(),o("div",Pe,[e.displayUrl?(t(),o("div",Le,[r("img",{src:e.faviconUrl,alt:e.hostname,class:"w-4 h-4 rounded-sm flex-none",loading:"lazy",onError:n[0]||(n[0]=(...s)=>e.onFaviconError&&e.onFaviconError(...s))},null,40,De),r("span",Ge,a(e.hostname),1),r("span",Be,a(e.pathname),1)])):c("",!0),r("a",{href:e.data.link,target:"_blank",rel:"noopener noreferrer",class:"text-base font-semibold text-[var(--el-color-primary)] hover:underline leading-snug block"},a(e.data.title),9,Te),e.data.date?(t(),o("div",Ke,a(e.data.date),1)):c("",!0),e.data.snippet?(t(),o("p",Qe,a(e.data.snippet),1)):c("",!0),e.data.sitelinks?.length?(t(),o("div",He,[(t(!0),o(b,null,y(e.data.sitelinks,(s,l)=>(t(),o("a",{key:l,href:s.link,target:"_blank",rel:"noopener noreferrer",class:"text-xs text-[var(--el-color-primary-light-3)] hover:text-[var(--el-color-primary)] hover:underline transition-colors"},a(s.title),9,Je))),128))])):c("",!0)])}const We=m(Ne,[["render",Me]]),Xe=h({name:"ImageResults",props:{data:{type:Array,required:!0}}}),Ye={class:"rounded-xl border border-[var(--el-border-color-lighter)] p-5 bg-[var(--el-fill-color-blank)]"},Ze={class:"text-base font-bold mb-3"},et={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3"},tt=["href"],st=["src","alt"],ot={class:"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"},rt={class:"text-xs text-white line-clamp-2"};function at(e,n,p,_,f,g){return t(),o("div",Ye,[r("h3",Ze,a(e.$t("serp.name.imageResults")),1),r("div",et,[(t(!0),o(b,null,y(e.data,(s,l)=>(t(),o("a",{key:l,href:s.link,target:"_blank",rel:"noopener noreferrer",class:"group relative rounded-lg overflow-hidden bg-[var(--el-fill-color-light)] aspect-square"},[s.image_url?(t(),o("img",{key:0,src:s.image_url,alt:s.title,class:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",loading:"lazy"},null,8,st)):c("",!0),r("div",ot,[r("span",rt,a(s.title),1)])],8,tt))),128))])])}const nt=m(Xe,[["render",at]]),lt=h({name:"VideoResults",props:{data:{type:Array,required:!0}}}),it={class:"text-base font-bold mb-3"},ct={class:"space-y-4"},dt=["href"],ut={class:"relative flex-shrink-0 w-40 h-24 rounded overflow-hidden bg-gray-100 dark:bg-gray-800"},pt=["src","alt"],ht={key:1,class:"absolute bottom-1 right-1 bg-black/80 text-white text-xs px-1 rounded"},mt={class:"flex-1 min-w-0"},_t={class:"text-blue-600 group-hover:underline font-medium line-clamp-2"},ft={class:"text-xs text-gray-400 mt-1"},gt={key:0},$t={key:1},vt={key:2},bt={key:0,class:"text-sm text-gray-600 dark:text-gray-300 mt-1 line-clamp-2"};function yt(e,n,p,_,f,g){return t(),o("div",null,[r("h3",it,a(e.$t("serp.name.videoResults")),1),r("div",ct,[(t(!0),o(b,null,y(e.data,(s,l)=>(t(),o("a",{key:l,href:s.link,target:"_blank",rel:"noopener noreferrer",class:"flex gap-4 group"},[r("div",ut,[s.image_url?(t(),o("img",{key:0,src:s.image_url,alt:s.title,class:"w-full h-full object-cover",loading:"lazy"},null,8,pt)):c("",!0),s.duration?(t(),o("div",ht,a(s.duration),1)):c("",!0)]),r("div",mt,[r("div",_t,a(s.title),1),r("div",ft,[s.source?(t(),o("span",gt,a(s.source),1)):c("",!0),s.channel?(t(),o("span",$t," · "+a(s.channel),1)):c("",!0),s.date?(t(),o("span",vt," · "+a(s.date),1)):c("",!0)]),s.snippet?(t(),o("p",bt,a(s.snippet),1)):c("",!0)])],8,dt))),128))])])}const kt=m(lt,[["render",yt]]),wt=h({name:"NewsResults",props:{data:{type:Array,required:!0}}}),xt={class:"text-base font-bold mb-3"},St={class:"space-y-4"},Rt=["href"],qt={class:"flex-1 min-w-0"},Ct={class:"text-blue-600 group-hover:underline font-medium line-clamp-2"},Et={class:"text-xs text-gray-400 mt-1"},Vt={key:0},It={key:1},Ut={key:0,class:"text-sm text-gray-600 dark:text-gray-300 mt-1 line-clamp-2"},At={key:0,class:"flex-shrink-0 w-24 h-24 rounded overflow-hidden bg-gray-100 dark:bg-gray-800"},jt=["src","alt"];function Ft(e,n,p,_,f,g){return t(),o("div",null,[r("h3",xt,a(e.$t("serp.name.newsResults")),1),r("div",St,[(t(!0),o(b,null,y(e.data,(s,l)=>(t(),o("a",{key:l,href:s.link,target:"_blank",rel:"noopener noreferrer",class:"flex gap-4 group"},[r("div",qt,[r("div",Ct,a(s.title),1),r("div",Et,[s.source?(t(),o("span",Vt,a(s.source),1)):c("",!0),s.date?(t(),o("span",It," · "+a(s.date),1)):c("",!0)]),s.snippet?(t(),o("p",Ut,a(s.snippet),1)):c("",!0)]),s.image_url?(t(),o("div",At,[r("img",{src:s.image_url,alt:s.title,class:"w-full h-full object-cover",loading:"lazy"},null,8,jt)])):c("",!0)],8,Rt))),128))])])}const Ot=m(wt,[["render",Ft]]),zt=h({name:"PeopleAlsoAsk",components:{ElCollapse:B,ElCollapseItem:G},props:{data:{type:Array,required:!0}}}),Nt={class:"rounded-xl border border-[var(--el-border-color-lighter)] p-5 bg-[var(--el-fill-color-blank)]"},Pt={class:"text-base font-bold mb-3"},Lt={key:0,class:"text-sm text-[var(--el-text-color-regular)] mb-2 leading-relaxed"},Dt=["href"];function Gt(e,n,p,_,f,g){const s=i("el-collapse-item"),l=i("el-collapse");return t(),o("div",Nt,[r("h3",Pt,a(e.$t("serp.name.peopleAlsoAsk")),1),d(l,null,{default:k(()=>[(t(!0),o(b,null,y(e.data,(u,$)=>(t(),v(s,{key:$,title:u.question||u.title||""},{default:k(()=>[u.snippet?(t(),o("p",Lt,a(u.snippet),1)):c("",!0),u.link?(t(),o("a",{key:1,href:u.link,target:"_blank",rel:"noopener noreferrer",class:"text-xs text-[var(--el-color-primary)] hover:underline"},a(u.title||u.link),9,Dt)):c("",!0)]),_:2},1032,["title"]))),128))]),_:1})])}const Bt=m(zt,[["render",Gt]]),Tt=h({name:"RelatedSearches",components:{FontAwesomeIcon:x},props:{data:{type:Array,required:!0}},emits:["search"],methods:{onSearch(e){e&&this.$emit("search",e)}}}),Kt={class:"rounded-xl border border-[var(--el-border-color-lighter)] p-5 bg-[var(--el-fill-color-blank)]"},Qt={class:"text-base font-bold mb-3"},Ht={class:"flex flex-wrap gap-2"},Jt=["onClick"];function Mt(e,n,p,_,f,g){const s=i("font-awesome-icon");return t(),o("div",Kt,[r("h3",Qt,a(e.$t("serp.name.relatedSearches")),1),r("div",Ht,[(t(!0),o(b,null,y(e.data,(l,u)=>(t(),o("button",{key:u,class:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-sm bg-[var(--el-fill-color-light)] text-[var(--el-text-color-regular)] hover:bg-[var(--el-color-primary-light-9)] hover:text-[var(--el-color-primary)] transition-colors cursor-pointer border-none",onClick:$=>e.onSearch(l.query)},[d(s,{icon:"fa-solid fa-magnifying-glass",class:"text-xs opacity-50"}),I(" "+a(l.query),1)],8,Jt))),128))])])}const Wt=m(Tt,[["render",Mt]]),Xt=h({name:"ResultPanel",components:{FontAwesomeIcon:x,KnowledgeGraph:ze,OrganicResult:We,ImageResults:nt,VideoResults:kt,NewsResults:Ot,PeopleAlsoAsk:Bt,RelatedSearches:Wt},emits:["related-search"],computed:{results(){return this.$store.state.serp?.results},searching(){return this.$store.state.serp?.status?.search===V.Request},noResults(){return this.$store.state.serp?.status?.search===V.Success&&this.results&&!this.results.organic?.length&&!this.results.images?.length&&!this.results.videos?.length&&!this.results.news?.length&&!this.results.knowledge_graph?.title}},methods:{onRelatedSearch(e){this.$emit("related-search",e)}}}),Yt={class:"h-full overflow-y-auto p-6"},Zt={key:0,class:"max-w-3xl mx-auto py-8"},es={key:1,class:"flex flex-col items-center justify-center py-24 text-[var(--el-text-color-disabled)]"},ts={class:"text-base"},ss={key:2,class:"max-w-3xl mx-auto"},os={key:1,class:"mb-6"},rs={key:3,class:"flex flex-col items-center justify-center py-24 text-[var(--el-text-color-disabled)]"},as={class:"text-base"};function ns(e,n,p,_,f,g){const s=i("font-awesome-icon"),l=i("knowledge-graph"),u=i("organic-result"),$=i("image-results"),S=i("video-results"),R=i("news-results"),q=i("people-also-ask"),j=i("related-searches");return t(),o("div",Yt,[e.searching?(t(),o("div",Zt,[(t(),o(b,null,y(4,C=>r("div",{key:C,class:"mb-6 animate-pulse"},[...n[0]||(n[0]=[z('<div class="flex items-center gap-2 mb-2"><div class="w-4 h-4 rounded-sm bg-[var(--el-fill-color-darker)]"></div><div class="h-3 w-32 rounded bg-[var(--el-fill-color-darker)]"></div></div><div class="h-4 w-3/4 rounded bg-[var(--el-fill-color-dark)] mb-2"></div><div class="h-3 w-full rounded bg-[var(--el-fill-color)] mb-1"></div><div class="h-3 w-5/6 rounded bg-[var(--el-fill-color)]"></div>',4)])])),64))])):e.noResults?(t(),o("div",es,[d(s,{icon:"fa-solid fa-face-meh",class:"text-5xl mb-4 opacity-40"}),r("p",ts,a(e.$t("serp.message.noResults")),1)])):e.results?(t(),o("div",ss,[e.results.knowledge_graph?.title?(t(),v(l,{key:0,data:e.results.knowledge_graph,class:"mb-6"},null,8,["data"])):c("",!0),e.results.organic?.length?(t(),o("div",os,[(t(!0),o(b,null,y(e.results.organic,(C,F)=>(t(),v(u,{key:F,data:C,class:"mb-1"},null,8,["data"]))),128))])):c("",!0),e.results.images?.length?(t(),v($,{key:2,data:e.results.images,class:"mb-6"},null,8,["data"])):c("",!0),e.results.videos?.length?(t(),v(S,{key:3,data:e.results.videos,class:"mb-6"},null,8,["data"])):c("",!0),e.results.news?.length?(t(),v(R,{key:4,data:e.results.news,class:"mb-6"},null,8,["data"])):c("",!0),e.results.people_also_ask?.length?(t(),v(q,{key:5,data:e.results.people_also_ask,class:"mb-6"},null,8,["data"])):c("",!0),e.results.related_searches?.length?(t(),v(j,{key:6,data:e.results.related_searches,class:"mb-6",onSearch:e.onRelatedSearch},null,8,["data","onSearch"])):c("",!0)])):(t(),o("div",rs,[d(s,{icon:"fa-solid fa-globe",class:"text-5xl mb-4 opacity-30"}),r("p",as,a(e.$t("serp.description.query")),1)]))])}const ls=m(Xt,[["render",ns]]),is=h({name:"SerpIndex",components:{Layout:W,SearchPanel:we,ResultPanel:ls},inject:["initialized"],async mounted(){await this.onGetService()},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("serp/getService"),console.debug("end onGetService")},async onSearch(){if(this.$store.state.serp?.config?.query){w.info(this.$t("serp.message.searching"));try{await this.$store.dispatch("serp/search"),w.success(this.$t("serp.message.searchSuccess"))}catch(n){n?.response?.data?.error?.code===T?w.error(this.$t("serp.message.usedUp")):w.error(this.$t("serp.message.searchFailed"))}}},async onRelatedSearch(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,query:e}),await this.onSearch()}}});function cs(e,n,p,_,f,g){const s=i("search-panel"),l=i("result-panel"),u=i("layout");return t(),v(u,null,{config:k(()=>[d(s,{onSearch:e.onSearch},null,8,["onSearch"])]),result:k(()=>[d(l,{onRelatedSearch:e.onRelatedSearch},null,8,["onRelatedSearch"])]),_:1})}const Ls=m(is,[["render",cs]]);export{Ls as default};
1
+ import{F as x}from"./index.es-CcBUl4Ve.js";import{E as A}from"./index-2TCFMqGF.js";import{E as O}from"./index-Cvahlpuq.js";import{d as h,H as o,E as r,z as E,C as d,y as k,D as i,q as t,F as a,I,J as c,O as b,N as y,x as v,P as z}from"./vendor-vue-DU0w5ewx.js";import{D as m,ao as V}from"./index-CyoIUj9o.js";import{E as U}from"./index-Cdyu259y.js";import{E as N,a as P}from"./index-MoiDefkl.js";import{C as L}from"./Consumption-CFmPsSrx.js";import{a as D}from"./price-BZipbZ8r.js";import{E as G,a as B}from"./index-0scbvCFJ.js";import{b as T}from"./errorCode-Cqj9Td_Z.js";import{E as w}from"./index-CwnkvnQz.js";import"./use-form-item-Dg0Eipdq.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./typescript-DWaRSzS6.js";import"./index-CO0CMurV.js";import"./index-DwUkKFb1.js";import"./index-ChvBuD6w.js";import"./index-BIsP0mLd.js";import"./strings-DigWlKo9.js";import"./isEqual-CCZvVGcc.js";import"./_Uint8Array-DujiT55f.js";import"./castArray-bn2-PUXx.js";import"./debounce-CEYGSL3j.js";import"./_baseIteratee-CXHXeeg4.js";import"./index-Cg4fPpjQ.js";import"./index-CHiGCqdo.js";const K=h({name:"LayoutSerp",components:{ElDrawer:O,ElButton:A,FontAwesomeIcon:x},data(){return{drawer:!1}}}),Q={class:"main flex flex-row flex-1"},H={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},J={class:"result h-full flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function M(e,n,p,_,f,g){const s=i("font-awesome-icon"),l=i("el-button"),u=i("el-drawer");return t(),o("div",Q,[r("div",H,[E(e.$slots,"config",{},void 0,!0)]),r("div",J,[E(e.$slots,"result",{},void 0,!0)]),d(l,{circle:"",class:"menu",onClick:n[0]||(n[0]=$=>e.drawer=!0)},{default:k(()=>[d(s,{icon:"fa-solid fa-search"})]),_:1}),d(u,{modelValue:e.drawer,"onUpdate:modelValue":n[1]||(n[1]=$=>e.drawer=$),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:k(()=>[E(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const W=m(K,[["render",M],["__scopeId","data-v-99dba970"]]),X=h({name:"QueryInput",components:{ElInput:U},computed:{query:{get(){return this.$store.state.serp?.config?.query},set(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,query:e})}}}}),Y={class:"field"},Z={class:"box"},ee={class:"title font-bold"};function te(e,n,p,_,f,g){const s=i("el-input");return t(),o("div",Y,[r("div",Z,[r("h2",ee,a(e.$t("serp.name.query")),1)]),d(s,{modelValue:e.query,"onUpdate:modelValue":n[0]||(n[0]=l=>e.query=l),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("serp.placeholder.query")},null,8,["modelValue","placeholder"])])}const se=m(X,[["render",te],["__scopeId","data-v-3582b195"]]),oe=h({name:"TypeSelector",components:{ElSelect:P,ElOption:N},computed:{value:{get(){return this.$store.state.serp?.config?.type},set(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,type:e})}}},mounted(){this.value||(this.value="search")}}),re={class:"field"},ae={class:"title font-bold"};function ne(e,n,p,_,f,g){const s=i("el-option"),l=i("el-select");return t(),o("div",re,[r("h2",ae,a(e.$t("serp.name.type")),1),d(l,{modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),class:"value"},{default:k(()=>[d(s,{value:"search",label:e.$t("serp.type.search")},null,8,["label"]),d(s,{value:"images",label:e.$t("serp.type.images")},null,8,["label"]),d(s,{value:"news",label:e.$t("serp.type.news")},null,8,["label"]),d(s,{value:"videos",label:e.$t("serp.type.videos")},null,8,["label"])]),_:1},8,["modelValue"])])}const le=m(oe,[["render",ne],["__scopeId","data-v-2913fb62"]]),ie=h({name:"CountryInput",components:{ElInput:U},computed:{value:{get(){return this.$store.state.serp?.config?.country},set(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,country:e})}}},mounted(){this.value||(this.value="US")}}),ce={class:"field"},de={class:"title font-bold"};function ue(e,n,p,_,f,g){const s=i("el-input");return t(),o("div",ce,[r("h2",de,a(e.$t("serp.name.country")),1),d(s,{modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),class:"value",placeholder:e.$t("serp.placeholder.country")},null,8,["modelValue","placeholder"])])}const pe=m(ie,[["render",ue],["__scopeId","data-v-f0672cc6"]]),he=h({name:"LanguageInput",components:{ElInput:U},computed:{value:{get(){return this.$store.state.serp?.config?.language},set(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,language:e})}}},mounted(){this.value||(this.value="en")}}),me={class:"field"},_e={class:"title font-bold"};function fe(e,n,p,_,f,g){const s=i("el-input");return t(),o("div",me,[r("h2",_e,a(e.$t("serp.name.language")),1),d(s,{modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),class:"value",placeholder:e.$t("serp.placeholder.language")},null,8,["modelValue","placeholder"])])}const ge=m(he,[["render",fe],["__scopeId","data-v-dc1c94b7"]]),$e=h({name:"SearchPanel",components:{ElButton:A,FontAwesomeIcon:x,QueryInput:se,TypeSelector:le,CountryInput:pe,LanguageInput:ge,Consumption:L},emits:["search"],computed:{config(){return this.$store.state.serp?.config},consumption(){return D(this.config,this.service?.cost)},service(){return this.$store.state.serp?.service},searching(){return this.$store.state.serp?.status?.search===V.Request}},methods:{onSearch(){this.$emit("search")}}}),ve={class:"flex flex-col h-full"},be={class:"flex-1 overflow-y-auto p-5"},ye={class:"flex flex-col items-center justify-center px-5 pb-5"};function ke(e,n,p,_,f,g){const s=i("query-input"),l=i("type-selector"),u=i("country-input"),$=i("language-input"),S=i("consumption"),R=i("font-awesome-icon"),q=i("el-button");return t(),o("div",ve,[r("div",be,[d(s,{class:"mb-4"}),d(l,{class:"mb-4"}),d(u,{class:"mb-4"}),d($,{class:"mb-4"})]),r("div",ye,[d(S,{value:e.consumption,service:e.service},null,8,["value","service"]),d(q,{type:"primary",class:"btn w-full",round:"",loading:e.searching,onClick:e.onSearch},{default:k(()=>[d(R,{icon:"fa-solid fa-search",class:"mr-2"}),I(" "+a(e.$t("serp.button.search")),1)]),_:1},8,["loading","onClick"])])])}const we=m($e,[["render",ke]]),xe=h({name:"KnowledgeGraph",props:{data:{type:Object,required:!0}}}),Se={class:"knowledge-graph rounded-xl border border-[var(--el-border-color-lighter)] p-5 bg-[var(--el-fill-color-blank)]"},Re={class:"flex flex-row gap-4"},qe=["src","alt"],Ce={class:"flex-1 min-w-0"},Ee={key:0,class:"text-xs text-[var(--el-text-color-disabled)] mb-1 uppercase tracking-wide"},Ve={class:"text-xl font-bold mb-1.5"},Ie={key:1,class:"text-sm text-[var(--el-text-color-regular)] mb-3 leading-relaxed"},Ue=["href"],Ae={key:2,class:"text-sm"},je={class:"text-[var(--el-text-color-disabled)] flex-none font-medium"},Fe={class:"text-[var(--el-text-color-regular)]"};function Oe(e,n,p,_,f,g){return t(),o("div",Se,[r("div",Re,[e.data.image_url?(t(),o("img",{key:0,src:e.data.image_url,alt:e.data.title,class:"w-28 h-28 rounded-lg object-cover flex-none shadow-sm"},null,8,qe)):c("",!0),r("div",Ce,[e.data.type?(t(),o("div",Ee,a(e.data.type),1)):c("",!0),r("h3",Ve,a(e.data.title),1),e.data.description?(t(),o("p",Ie,[I(a(e.data.description)+" ",1),e.data.description_link?(t(),o("a",{key:0,href:e.data.description_link,target:"_blank",rel:"noopener noreferrer",class:"text-[var(--el-color-primary)] hover:underline ml-1"},a(e.data.description_source||"Source"),9,Ue)):c("",!0)])):c("",!0),e.data.attributes&&Object.keys(e.data.attributes).length?(t(),o("div",Ae,[(t(!0),o(b,null,y(e.data.attributes,(s,l)=>(t(),o("div",{key:l,class:"flex gap-2 mb-1 py-0.5"},[r("span",je,a(l)+":",1),r("span",Fe,a(s),1)]))),128))])):c("",!0)])])])}const ze=m(xe,[["render",Oe]]),Ne=h({name:"OrganicResult",props:{data:{type:Object,required:!0}},data(){return{faviconFailed:!1}},computed:{hostname(){if(!this.data.link)return"";try{return new URL(this.data.link).hostname}catch{return""}},pathname(){if(!this.data.link)return"";try{const e=new URL(this.data.link).pathname;return e==="/"?"":e}catch{return""}},displayUrl(){return this.hostname},faviconUrl(){return this.faviconFailed||!this.hostname?"":`https://www.google.com/s2/favicons?domain=${this.hostname}&sz=32`}},methods:{onFaviconError(e){this.faviconFailed=!0,e.target.style.display="none"}}}),Pe={class:"organic-result rounded-lg p-4 transition-all duration-200 hover:bg-[var(--el-fill-color-lighter)]"},Le={key:0,class:"flex items-center gap-2 mb-1.5"},De=["src","alt"],Ge={class:"text-xs text-[var(--el-text-color-secondary)] truncate"},Be={class:"text-xs text-[var(--el-text-color-disabled)]"},Te=["href"],Ke={key:1,class:"text-xs text-[var(--el-text-color-disabled)] mt-1"},Qe={key:2,class:"text-sm text-[var(--el-text-color-regular)] mt-1.5 leading-relaxed line-clamp-3"},He={key:3,class:"mt-3 flex flex-wrap gap-x-4 gap-y-1"},Je=["href"];function Me(e,n,p,_,f,g){return t(),o("div",Pe,[e.displayUrl?(t(),o("div",Le,[r("img",{src:e.faviconUrl,alt:e.hostname,class:"w-4 h-4 rounded-sm flex-none",loading:"lazy",onError:n[0]||(n[0]=(...s)=>e.onFaviconError&&e.onFaviconError(...s))},null,40,De),r("span",Ge,a(e.hostname),1),r("span",Be,a(e.pathname),1)])):c("",!0),r("a",{href:e.data.link,target:"_blank",rel:"noopener noreferrer",class:"text-base font-semibold text-[var(--el-color-primary)] hover:underline leading-snug block"},a(e.data.title),9,Te),e.data.date?(t(),o("div",Ke,a(e.data.date),1)):c("",!0),e.data.snippet?(t(),o("p",Qe,a(e.data.snippet),1)):c("",!0),e.data.sitelinks?.length?(t(),o("div",He,[(t(!0),o(b,null,y(e.data.sitelinks,(s,l)=>(t(),o("a",{key:l,href:s.link,target:"_blank",rel:"noopener noreferrer",class:"text-xs text-[var(--el-color-primary-light-3)] hover:text-[var(--el-color-primary)] hover:underline transition-colors"},a(s.title),9,Je))),128))])):c("",!0)])}const We=m(Ne,[["render",Me]]),Xe=h({name:"ImageResults",props:{data:{type:Array,required:!0}}}),Ye={class:"rounded-xl border border-[var(--el-border-color-lighter)] p-5 bg-[var(--el-fill-color-blank)]"},Ze={class:"text-base font-bold mb-3"},et={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3"},tt=["href"],st=["src","alt"],ot={class:"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"},rt={class:"text-xs text-white line-clamp-2"};function at(e,n,p,_,f,g){return t(),o("div",Ye,[r("h3",Ze,a(e.$t("serp.name.imageResults")),1),r("div",et,[(t(!0),o(b,null,y(e.data,(s,l)=>(t(),o("a",{key:l,href:s.link,target:"_blank",rel:"noopener noreferrer",class:"group relative rounded-lg overflow-hidden bg-[var(--el-fill-color-light)] aspect-square"},[s.image_url?(t(),o("img",{key:0,src:s.image_url,alt:s.title,class:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",loading:"lazy"},null,8,st)):c("",!0),r("div",ot,[r("span",rt,a(s.title),1)])],8,tt))),128))])])}const nt=m(Xe,[["render",at]]),lt=h({name:"VideoResults",props:{data:{type:Array,required:!0}}}),it={class:"text-base font-bold mb-3"},ct={class:"space-y-4"},dt=["href"],ut={class:"relative flex-shrink-0 w-40 h-24 rounded overflow-hidden bg-gray-100 dark:bg-gray-800"},pt=["src","alt"],ht={key:1,class:"absolute bottom-1 right-1 bg-black/80 text-white text-xs px-1 rounded"},mt={class:"flex-1 min-w-0"},_t={class:"text-blue-600 group-hover:underline font-medium line-clamp-2"},ft={class:"text-xs text-gray-400 mt-1"},gt={key:0},$t={key:1},vt={key:2},bt={key:0,class:"text-sm text-gray-600 dark:text-gray-300 mt-1 line-clamp-2"};function yt(e,n,p,_,f,g){return t(),o("div",null,[r("h3",it,a(e.$t("serp.name.videoResults")),1),r("div",ct,[(t(!0),o(b,null,y(e.data,(s,l)=>(t(),o("a",{key:l,href:s.link,target:"_blank",rel:"noopener noreferrer",class:"flex gap-4 group"},[r("div",ut,[s.image_url?(t(),o("img",{key:0,src:s.image_url,alt:s.title,class:"w-full h-full object-cover",loading:"lazy"},null,8,pt)):c("",!0),s.duration?(t(),o("div",ht,a(s.duration),1)):c("",!0)]),r("div",mt,[r("div",_t,a(s.title),1),r("div",ft,[s.source?(t(),o("span",gt,a(s.source),1)):c("",!0),s.channel?(t(),o("span",$t," · "+a(s.channel),1)):c("",!0),s.date?(t(),o("span",vt," · "+a(s.date),1)):c("",!0)]),s.snippet?(t(),o("p",bt,a(s.snippet),1)):c("",!0)])],8,dt))),128))])])}const kt=m(lt,[["render",yt]]),wt=h({name:"NewsResults",props:{data:{type:Array,required:!0}}}),xt={class:"text-base font-bold mb-3"},St={class:"space-y-4"},Rt=["href"],qt={class:"flex-1 min-w-0"},Ct={class:"text-blue-600 group-hover:underline font-medium line-clamp-2"},Et={class:"text-xs text-gray-400 mt-1"},Vt={key:0},It={key:1},Ut={key:0,class:"text-sm text-gray-600 dark:text-gray-300 mt-1 line-clamp-2"},At={key:0,class:"flex-shrink-0 w-24 h-24 rounded overflow-hidden bg-gray-100 dark:bg-gray-800"},jt=["src","alt"];function Ft(e,n,p,_,f,g){return t(),o("div",null,[r("h3",xt,a(e.$t("serp.name.newsResults")),1),r("div",St,[(t(!0),o(b,null,y(e.data,(s,l)=>(t(),o("a",{key:l,href:s.link,target:"_blank",rel:"noopener noreferrer",class:"flex gap-4 group"},[r("div",qt,[r("div",Ct,a(s.title),1),r("div",Et,[s.source?(t(),o("span",Vt,a(s.source),1)):c("",!0),s.date?(t(),o("span",It," · "+a(s.date),1)):c("",!0)]),s.snippet?(t(),o("p",Ut,a(s.snippet),1)):c("",!0)]),s.image_url?(t(),o("div",At,[r("img",{src:s.image_url,alt:s.title,class:"w-full h-full object-cover",loading:"lazy"},null,8,jt)])):c("",!0)],8,Rt))),128))])])}const Ot=m(wt,[["render",Ft]]),zt=h({name:"PeopleAlsoAsk",components:{ElCollapse:B,ElCollapseItem:G},props:{data:{type:Array,required:!0}}}),Nt={class:"rounded-xl border border-[var(--el-border-color-lighter)] p-5 bg-[var(--el-fill-color-blank)]"},Pt={class:"text-base font-bold mb-3"},Lt={key:0,class:"text-sm text-[var(--el-text-color-regular)] mb-2 leading-relaxed"},Dt=["href"];function Gt(e,n,p,_,f,g){const s=i("el-collapse-item"),l=i("el-collapse");return t(),o("div",Nt,[r("h3",Pt,a(e.$t("serp.name.peopleAlsoAsk")),1),d(l,null,{default:k(()=>[(t(!0),o(b,null,y(e.data,(u,$)=>(t(),v(s,{key:$,title:u.question||u.title||""},{default:k(()=>[u.snippet?(t(),o("p",Lt,a(u.snippet),1)):c("",!0),u.link?(t(),o("a",{key:1,href:u.link,target:"_blank",rel:"noopener noreferrer",class:"text-xs text-[var(--el-color-primary)] hover:underline"},a(u.title||u.link),9,Dt)):c("",!0)]),_:2},1032,["title"]))),128))]),_:1})])}const Bt=m(zt,[["render",Gt]]),Tt=h({name:"RelatedSearches",components:{FontAwesomeIcon:x},props:{data:{type:Array,required:!0}},emits:["search"],methods:{onSearch(e){e&&this.$emit("search",e)}}}),Kt={class:"rounded-xl border border-[var(--el-border-color-lighter)] p-5 bg-[var(--el-fill-color-blank)]"},Qt={class:"text-base font-bold mb-3"},Ht={class:"flex flex-wrap gap-2"},Jt=["onClick"];function Mt(e,n,p,_,f,g){const s=i("font-awesome-icon");return t(),o("div",Kt,[r("h3",Qt,a(e.$t("serp.name.relatedSearches")),1),r("div",Ht,[(t(!0),o(b,null,y(e.data,(l,u)=>(t(),o("button",{key:u,class:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-sm bg-[var(--el-fill-color-light)] text-[var(--el-text-color-regular)] hover:bg-[var(--el-color-primary-light-9)] hover:text-[var(--el-color-primary)] transition-colors cursor-pointer border-none",onClick:$=>e.onSearch(l.query)},[d(s,{icon:"fa-solid fa-magnifying-glass",class:"text-xs opacity-50"}),I(" "+a(l.query),1)],8,Jt))),128))])])}const Wt=m(Tt,[["render",Mt]]),Xt=h({name:"ResultPanel",components:{FontAwesomeIcon:x,KnowledgeGraph:ze,OrganicResult:We,ImageResults:nt,VideoResults:kt,NewsResults:Ot,PeopleAlsoAsk:Bt,RelatedSearches:Wt},emits:["related-search"],computed:{results(){return this.$store.state.serp?.results},searching(){return this.$store.state.serp?.status?.search===V.Request},noResults(){return this.$store.state.serp?.status?.search===V.Success&&this.results&&!this.results.organic?.length&&!this.results.images?.length&&!this.results.videos?.length&&!this.results.news?.length&&!this.results.knowledge_graph?.title}},methods:{onRelatedSearch(e){this.$emit("related-search",e)}}}),Yt={class:"h-full overflow-y-auto p-6"},Zt={key:0,class:"max-w-3xl mx-auto py-8"},es={key:1,class:"flex flex-col items-center justify-center py-24 text-[var(--el-text-color-disabled)]"},ts={class:"text-base"},ss={key:2,class:"max-w-3xl mx-auto"},os={key:1,class:"mb-6"},rs={key:3,class:"flex flex-col items-center justify-center py-24 text-[var(--el-text-color-disabled)]"},as={class:"text-base"};function ns(e,n,p,_,f,g){const s=i("font-awesome-icon"),l=i("knowledge-graph"),u=i("organic-result"),$=i("image-results"),S=i("video-results"),R=i("news-results"),q=i("people-also-ask"),j=i("related-searches");return t(),o("div",Yt,[e.searching?(t(),o("div",Zt,[(t(),o(b,null,y(4,C=>r("div",{key:C,class:"mb-6 animate-pulse"},[...n[0]||(n[0]=[z('<div class="flex items-center gap-2 mb-2"><div class="w-4 h-4 rounded-sm bg-[var(--el-fill-color-darker)]"></div><div class="h-3 w-32 rounded bg-[var(--el-fill-color-darker)]"></div></div><div class="h-4 w-3/4 rounded bg-[var(--el-fill-color-dark)] mb-2"></div><div class="h-3 w-full rounded bg-[var(--el-fill-color)] mb-1"></div><div class="h-3 w-5/6 rounded bg-[var(--el-fill-color)]"></div>',4)])])),64))])):e.noResults?(t(),o("div",es,[d(s,{icon:"fa-solid fa-face-meh",class:"text-5xl mb-4 opacity-40"}),r("p",ts,a(e.$t("serp.message.noResults")),1)])):e.results?(t(),o("div",ss,[e.results.knowledge_graph?.title?(t(),v(l,{key:0,data:e.results.knowledge_graph,class:"mb-6"},null,8,["data"])):c("",!0),e.results.organic?.length?(t(),o("div",os,[(t(!0),o(b,null,y(e.results.organic,(C,F)=>(t(),v(u,{key:F,data:C,class:"mb-1"},null,8,["data"]))),128))])):c("",!0),e.results.images?.length?(t(),v($,{key:2,data:e.results.images,class:"mb-6"},null,8,["data"])):c("",!0),e.results.videos?.length?(t(),v(S,{key:3,data:e.results.videos,class:"mb-6"},null,8,["data"])):c("",!0),e.results.news?.length?(t(),v(R,{key:4,data:e.results.news,class:"mb-6"},null,8,["data"])):c("",!0),e.results.people_also_ask?.length?(t(),v(q,{key:5,data:e.results.people_also_ask,class:"mb-6"},null,8,["data"])):c("",!0),e.results.related_searches?.length?(t(),v(j,{key:6,data:e.results.related_searches,class:"mb-6",onSearch:e.onRelatedSearch},null,8,["data","onSearch"])):c("",!0)])):(t(),o("div",rs,[d(s,{icon:"fa-solid fa-globe",class:"text-5xl mb-4 opacity-30"}),r("p",as,a(e.$t("serp.description.query")),1)]))])}const ls=m(Xt,[["render",ns]]),is=h({name:"SerpIndex",components:{Layout:W,SearchPanel:we,ResultPanel:ls},inject:["initialized"],async mounted(){await this.onGetService()},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("serp/getService"),console.debug("end onGetService")},async onSearch(){if(this.$store.state.serp?.config?.query){w.info(this.$t("serp.message.searching"));try{await this.$store.dispatch("serp/search"),w.success(this.$t("serp.message.searchSuccess"))}catch(n){n?.response?.data?.error?.code===T?w.error(this.$t("serp.message.usedUp")):w.error(this.$t("serp.message.searchFailed"))}}},async onRelatedSearch(e){this.$store.commit("serp/setConfig",{...this.$store.state.serp?.config,query:e}),await this.onSearch()}}});function cs(e,n,p,_,f,g){const s=i("search-panel"),l=i("result-panel"),u=i("layout");return t(),v(u,null,{config:k(()=>[d(s,{onSearch:e.onSearch},null,8,["onSearch"])]),result:k(()=>[d(l,{onRelatedSearch:e.onRelatedSearch},null,8,["onRelatedSearch"])]),_:1})}const Ls=m(is,[["render",cs]]);export{Ls as default};
@@ -1 +1 @@
1
- import{aZ as S,b5 as $,D as b,b6 as O,b1 as N,b2 as T,b3 as U,a9 as D,b7 as L,b8 as R,b9 as B,b0 as P}from"./index-CUnV_GqJ.js";import{F as v}from"./index.es-B5zr1Qur.js";import{E as A,a as F}from"./index-BlPrWL6I.js";import{E as H}from"./index-DvVC4lZz.js";import{E as k}from"./index-8Ckha2zO.js";import{d as E,x as f,y as n,C as o,I as _,F as m,J as g,E as s,D as t,q as r,H as h,R as V,O as X,N as q,Q as J}from"./vendor-vue-DU0w5ewx.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./typescript-BPytxeub.js";import"./index-DNfZVwwY.js";import"./index-C6HZaOi9.js";import"./index-CZzjgvO_.js";import"./index-BuyEbX8F.js";import"./index-C_LYFrIS.js";import"./dropdown-BhPFK6ly.js";import"./debounce-oh-nVV1M.js";import"./index-XdFznrtI.js";const M=E({name:"HelpEntry",components:{ElImage:k,ElDialog:S,ElPopover:H,ElMenu:F,ElMenuItem:A,FontAwesomeIcon:v},props:{visible:{type:Boolean,default:!0}},emits:["close"],computed:{site(){return this.$store.state.site}},methods:{onJoin(){window.open(this.$store.state.site?.features?.support?.discord?.url,"_blank")},onProfit(){this.$router.push({name:$})}}}),z={class:"flex"},j={class:"flex-1 text-center"};function G(e,i,w,I,y,x){const c=t("font-awesome-icon"),l=t("el-menu-item"),p=t("el-image"),u=t("el-popover"),a=t("el-menu"),d=t("el-dialog");return r(),f(d,{"model-value":e.visible,width:200,class:"text-center",onClose:i[0]||(i[0]=C=>e.$emit("close"))},{default:n(()=>[o(a,{collapse:!1,class:"menu"},{default:n(()=>[e.site?.features?.support?.discord?.enabled?(r(),f(l,{key:0,index:"1",onClick:e.onJoin},{title:n(()=>[_(m(e.$t("common.message.joinDiscord")),1)]),default:n(()=>[o(c,{icon:"fa-brands fa-discord",class:"mr-2"})]),_:1},8,["onClick"])):g("",!0),o(u,{width:350,trigger:"hover"},{reference:n(()=>[e.site?.features?.support?.wechat?.enabled?(r(),f(l,{key:0,index:"2"},{title:n(()=>[_(m(e.$t("common.message.addWeChat")),1)]),default:n(()=>[o(c,{icon:"fa-brands fa-weixin",class:"mr-2"})]),_:1})):g("",!0)]),default:n(()=>[s("div",z,[s("div",j,[o(p,{src:e.site?.features?.support?.wechat?.qr},null,8,["src"])])])]),_:1})]),_:1})]),_:1},8,["model-value"])}const Q=b(M,[["render",G],["__scopeId","data-v-0fce633f"]]),W=E({name:"ProfileIndex",components:{ElImage:k,HelpDialog:Q,FontAwesomeIcon:v},data(){return{operating:{locale:!1,dark:!1,help:!1}}},computed:{user(){return this.$store.getters.user},showSupport(){return this.$store?.state?.site?.features?.support?.enabled&&(this.$store?.state?.site?.features?.support?.discord?.enabled||this.$store?.state?.site?.features?.support?.wechat?.enabled)},showSite(){return this.$store?.state?.site?.admins?.includes(this.$store.getters.user?.id)},showSubsite(){return!!this.$store?.state?.site?.features?.subsite?.enabled},links(){return[{key:"profile",text:this.$t("console.menu.userProfile"),href:`${B()}/user/profile`,icon:"fa-regular fa-user"},{key:"application-list",text:this.$t("console.menu.applicationList"),name:T,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:U,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:D,icon:"fa-solid fa-rotate-left"},{key:"distribution-index",text:this.$t("console.menu.distributionIndex"),name:$,icon:"fa-solid fa-coins"},...this.showSite?[{key:"site-index",text:this.$t("common.nav.site"),name:L,icon:"fa-solid fa-gear"}]:[],...this.showSubsite?[{key:"subsite-index",text:this.$t("common.nav.subsite"),name:R,icon:"fa-solid fa-sitemap"}]:[],{key:"dark-setting",text:this.$t("common.nav.darkMode"),icon:"fa-solid fa-moon",callback:()=>{this.operating.dark=!0}},{key:"locale-setting",text:this.$t("common.nav.locale"),icon:"fa-solid fa-language",callback:()=>{this.operating.locale=!0}},{key:"developerPlatform",text:this.$t("console.menu.developerPlatform"),href:P(),icon:"fa-solid fa-laptop-code"},...this.showSupport?[{key:"support",text:this.$t("common.nav.support"),callback:()=>{this.operating.help=!0},icon:"fa-solid fa-question"}]:[],{key:"logout",text:this.$t("common.nav.logOut"),icon:"fa-solid fa-arrow-right-from-bracket",callback:async()=>{await this.$store.dispatch("logout")}}]}},methods:{onHome(){this.$router.push({name:N})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href?window.open(O(e.href),"_blank"):e.callback&&e.callback()}}}),Z={class:"profile"},K={class:"info"},Y={class:"links"},ee=["onClick"],te={class:"icon"},oe={class:"text"},se={class:"suffix"};function ae(e,i,w,I,y,x){const c=t("el-image"),l=t("font-awesome-icon"),p=t("locale-selector"),u=t("help-dialog");return r(),h("div",Z,[s("div",K,[o(c,{src:e.user.avatar,fit:"cover",class:"avatar"},null,8,["src"]),s("h2",null,m(e.user.username),1),s("div",{style:V({backgroundImage:"url("+e.user.avatar+")"}),class:"background"},null,4)]),s("div",Y,[(r(!0),h(X,null,q(e.links,(a,d)=>(r(),h("a",{key:d,class:J({link:!0,active:e.$route.name===a.name}),onClick:C=>e.onNavigate(a)},[s("span",te,[o(l,{icon:a.icon,class:"text-sm"},null,8,["icon"])]),s("span",oe,m(a.text),1),s("span",se,[o(l,{icon:"fa-solid fa-chevron-right",class:"text-sm"})])],10,ee))),128))]),o(p,{visible:e.operating.locale==!0,onClose:i[0]||(i[0]=a=>e.operating.locale=!1)},null,8,["visible"]),o(u,{visible:e.operating.help==!0,onClose:i[1]||(i[1]=a=>e.operating.help=!1)},null,8,["visible"])])}const we=b(W,[["render",ae],["__scopeId","data-v-864cff91"]]);export{we as default};
1
+ import{aZ as S,b5 as $,D as b,b6 as O,b1 as N,b2 as T,b3 as U,a9 as D,b7 as L,b8 as R,b9 as B,b0 as P}from"./index-CyoIUj9o.js";import{F as v}from"./index.es-CcBUl4Ve.js";import{E as A,a as F}from"./index-DAH5YmHq.js";import{E as H}from"./index-Bb-FlhbS.js";import{E as k}from"./index-cmW6UCjk.js";import{d as E,x as f,y as n,C as o,I as _,F as m,J as g,E as s,D as t,q as r,H as h,R as V,O as X,N as q,Q as J}from"./vendor-vue-DU0w5ewx.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./typescript-DWaRSzS6.js";import"./index-CHiGCqdo.js";import"./index-ChvBuD6w.js";import"./index-CO0CMurV.js";import"./index-BuyEbX8F.js";import"./index-Cg4fPpjQ.js";import"./dropdown-4I2okC6N.js";import"./debounce-CEYGSL3j.js";import"./index-DwUkKFb1.js";const M=E({name:"HelpEntry",components:{ElImage:k,ElDialog:S,ElPopover:H,ElMenu:F,ElMenuItem:A,FontAwesomeIcon:v},props:{visible:{type:Boolean,default:!0}},emits:["close"],computed:{site(){return this.$store.state.site}},methods:{onJoin(){window.open(this.$store.state.site?.features?.support?.discord?.url,"_blank")},onProfit(){this.$router.push({name:$})}}}),z={class:"flex"},j={class:"flex-1 text-center"};function G(e,i,w,I,y,x){const c=t("font-awesome-icon"),l=t("el-menu-item"),p=t("el-image"),u=t("el-popover"),a=t("el-menu"),d=t("el-dialog");return r(),f(d,{"model-value":e.visible,width:200,class:"text-center",onClose:i[0]||(i[0]=C=>e.$emit("close"))},{default:n(()=>[o(a,{collapse:!1,class:"menu"},{default:n(()=>[e.site?.features?.support?.discord?.enabled?(r(),f(l,{key:0,index:"1",onClick:e.onJoin},{title:n(()=>[_(m(e.$t("common.message.joinDiscord")),1)]),default:n(()=>[o(c,{icon:"fa-brands fa-discord",class:"mr-2"})]),_:1},8,["onClick"])):g("",!0),o(u,{width:350,trigger:"hover"},{reference:n(()=>[e.site?.features?.support?.wechat?.enabled?(r(),f(l,{key:0,index:"2"},{title:n(()=>[_(m(e.$t("common.message.addWeChat")),1)]),default:n(()=>[o(c,{icon:"fa-brands fa-weixin",class:"mr-2"})]),_:1})):g("",!0)]),default:n(()=>[s("div",z,[s("div",j,[o(p,{src:e.site?.features?.support?.wechat?.qr},null,8,["src"])])])]),_:1})]),_:1})]),_:1},8,["model-value"])}const Q=b(M,[["render",G],["__scopeId","data-v-0fce633f"]]),W=E({name:"ProfileIndex",components:{ElImage:k,HelpDialog:Q,FontAwesomeIcon:v},data(){return{operating:{locale:!1,dark:!1,help:!1}}},computed:{user(){return this.$store.getters.user},showSupport(){return this.$store?.state?.site?.features?.support?.enabled&&(this.$store?.state?.site?.features?.support?.discord?.enabled||this.$store?.state?.site?.features?.support?.wechat?.enabled)},showSite(){return this.$store?.state?.site?.admins?.includes(this.$store.getters.user?.id)},showSubsite(){return!!this.$store?.state?.site?.features?.subsite?.enabled},links(){return[{key:"profile",text:this.$t("console.menu.userProfile"),href:`${B()}/user/profile`,icon:"fa-regular fa-user"},{key:"application-list",text:this.$t("console.menu.applicationList"),name:T,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:U,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:D,icon:"fa-solid fa-rotate-left"},{key:"distribution-index",text:this.$t("console.menu.distributionIndex"),name:$,icon:"fa-solid fa-coins"},...this.showSite?[{key:"site-index",text:this.$t("common.nav.site"),name:L,icon:"fa-solid fa-gear"}]:[],...this.showSubsite?[{key:"subsite-index",text:this.$t("common.nav.subsite"),name:R,icon:"fa-solid fa-sitemap"}]:[],{key:"dark-setting",text:this.$t("common.nav.darkMode"),icon:"fa-solid fa-moon",callback:()=>{this.operating.dark=!0}},{key:"locale-setting",text:this.$t("common.nav.locale"),icon:"fa-solid fa-language",callback:()=>{this.operating.locale=!0}},{key:"developerPlatform",text:this.$t("console.menu.developerPlatform"),href:P(),icon:"fa-solid fa-laptop-code"},...this.showSupport?[{key:"support",text:this.$t("common.nav.support"),callback:()=>{this.operating.help=!0},icon:"fa-solid fa-question"}]:[],{key:"logout",text:this.$t("common.nav.logOut"),icon:"fa-solid fa-arrow-right-from-bracket",callback:async()=>{await this.$store.dispatch("logout")}}]}},methods:{onHome(){this.$router.push({name:N})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href?window.open(O(e.href),"_blank"):e.callback&&e.callback()}}}),Z={class:"profile"},K={class:"info"},Y={class:"links"},ee=["onClick"],te={class:"icon"},oe={class:"text"},se={class:"suffix"};function ae(e,i,w,I,y,x){const c=t("el-image"),l=t("font-awesome-icon"),p=t("locale-selector"),u=t("help-dialog");return r(),h("div",Z,[s("div",K,[o(c,{src:e.user.avatar,fit:"cover",class:"avatar"},null,8,["src"]),s("h2",null,m(e.user.username),1),s("div",{style:V({backgroundImage:"url("+e.user.avatar+")"}),class:"background"},null,4)]),s("div",Y,[(r(!0),h(X,null,q(e.links,(a,d)=>(r(),h("a",{key:d,class:J({link:!0,active:e.$route.name===a.name}),onClick:C=>e.onNavigate(a)},[s("span",te,[o(l,{icon:a.icon,class:"text-sm"},null,8,["icon"])]),s("span",oe,m(a.text),1),s("span",se,[o(l,{icon:"fa-solid fa-chevron-right",class:"text-sm"})])],10,ee))),128))]),o(p,{visible:e.operating.locale==!0,onClose:i[0]||(i[0]=a=>e.operating.locale=!1)},null,8,["visible"]),o(u,{visible:e.operating.help==!0,onClose:i[1]||(i[1]=a=>e.operating.help=!1)},null,8,["visible"])])}const we=b(W,[["render",ae],["__scopeId","data-v-864cff91"]]);export{we as default};
@@ -1 +1 @@
1
- import{aj as _,D as g}from"./index-CUnV_GqJ.js";import{E as h}from"./index--WZdvO2W.js";import{d as b,H as r,E as o,F as e,x as m,y as t,I as l,J as c,C as d,D as p,q as i}from"./vendor-vue-DU0w5ewx.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./use-form-item-DufqZxj5.js";import"./index-BuyEbX8F.js";const f="3.30.2",v="https://cdn.acedata.cloud/2f29543715.apk",$="",w="",D=b({name:"DownloadIndex",components:{ElButton:h,QrCode:_},computed:{version(){return f},androidDownloadUrl(){return v},hasAndroidDownload(){return!0},iosDownloadUrl(){return $},iosFallbackUrl(){return w},hasIosDownload(){return!1}},methods:{openSupport(){window.open("https://platform.acedata.cloud/support","_blank")}}}),A={class:"download-page"},y={class:"container"},I={class:"hero-shell"},k={class:"hero-copy"},O={class:"subtitle"},S={class:"hero-tags"},U={class:"tag"},L={class:"tag"},N={class:"tag tag--soft"},C={class:"hero-actions"},E={class:"metrics"},B={class:"metric"},R={class:"metric"},z={class:"metric"},F={class:"hero-panels"},q={class:"panel panel--android"},V={class:"panel__head"},M={class:"status status--live"},P={class:"panel__text"},H={key:0,class:"qr-frame"},T={class:"panel__footer"},W={class:"panel__meta"},j={class:"panel panel--ios"},J={class:"panel__head"},K={class:"status status--pending"},Q={class:"panel__text"},G={class:"panel__footer panel__footer--stacked"},X={key:0,class:"button-group"},Y={class:"panel__meta"},Z={class:"advantage-grid"},x={class:"advantage-card"},oo={class:"advantage-card"},so={class:"advantage-card"},eo={class:"note"};function ao(s,a,no,to,lo,io){const n=p("el-button"),u=p("qr-code");return i(),r("div",A,[a[9]||(a[9]=o("div",{class:"ambient ambient--cyan"},null,-1)),a[10]||(a[10]=o("div",{class:"ambient ambient--gold"},null,-1)),o("div",y,[o("section",I,[o("div",k,[a[2]||(a[2]=o("p",{class:"eyebrow"},"AceData App",-1)),o("h1",null,e(s.$t("common.title.mobileApp")),1),o("p",O,e(s.$t("common.message.mobileAppDescription")),1),o("div",S,[o("span",U,e(s.$t("common.message.mobileAvailableNow")),1),o("span",L,"v"+e(s.version),1),o("span",N,e(s.$t("common.message.mobileSecureDelivery")),1)]),o("div",C,[s.hasAndroidDownload?(i(),m(n,{key:0,type:"primary",round:"",size:"large",tag:"a",href:s.androidDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadAndroid")),1)]),_:1},8,["href"])):c("",!0),d(n,{round:"",size:"large",class:"secondary-action",onClick:s.openSupport},{default:t(()=>[l(e(s.$t("common.nav.support")),1)]),_:1},8,["onClick"])]),o("div",E,[o("article",B,[a[0]||(a[0]=o("strong",null,"Android",-1)),o("span",null,e(s.$t("common.message.mobileDirectInstall")),1)]),o("article",R,[o("strong",null,"v"+e(s.version),1),o("span",null,e(s.$t("common.message.mobileLatestRelease")),1)]),o("article",z,[a[1]||(a[1]=o("strong",null,"AceData",-1)),o("span",null,e(s.$t("common.message.mobileSharedAccount")),1)])])]),o("div",F,[o("article",q,[o("div",V,[a[3]||(a[3]=o("span",{class:"platform-badge"},"Android",-1)),o("span",M,e(s.$t("common.message.mobileAvailableNow")),1)]),o("h2",null,e(s.$t("common.button.downloadAndroid")),1),o("p",P,e(s.$t("common.message.mobileAndroidHint")),1),s.hasAndroidDownload?(i(),r("div",H,[d(u,{value:s.androidDownloadUrl,width:176,height:176,class:"qr",type:"image/png",color:{dark:"#07253dff",light:"#ffffffff"}},null,8,["value"])])):c("",!0),o("div",T,[s.hasAndroidDownload?(i(),m(n,{key:0,type:"primary",round:"",size:"large",tag:"a",href:s.androidDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadAndroid")),1)]),_:1},8,["href"])):c("",!0),o("span",W,e(s.$t("common.message.mobileSecureDelivery")),1)])]),o("article",j,[o("div",J,[a[4]||(a[4]=o("span",{class:"platform-badge platform-badge--ios"},"iOS",-1)),o("span",K,e(s.$t("common.message.mobileIosPending")),1)]),o("h2",null,e(s.$t("common.button.downloadIos")),1),o("p",Q,e(s.hasIosDownload?s.$t("common.message.mobileIosHint"):s.$t("common.message.mobileIosPending")),1),a[5]||(a[5]=o("div",{class:"device-ghost"},[o("div",{class:"device-ghost__screen"},[o("span",null,"iOS"),o("small",null,"Signing in progress")])],-1)),o("div",G,[s.hasIosDownload?(i(),r("div",X,[d(n,{type:"primary",round:"",size:"large",tag:"a",href:s.iosDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.installIos")),1)]),_:1},8,["href"]),d(n,{round:"",size:"large",tag:"a",href:s.iosFallbackUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadIos")),1)]),_:1},8,["href"])])):(i(),m(n,{key:1,round:"",size:"large",class:"secondary-action",onClick:s.openSupport},{default:t(()=>[l(e(s.$t("common.nav.support")),1)]),_:1},8,["onClick"])),o("span",Y,e(s.$t("common.message.mobileInstallNote")),1)])])])]),o("section",Z,[o("article",x,[a[6]||(a[6]=o("p",{class:"advantage-card__eyebrow"},"01",-1)),o("h3",null,e(s.$t("common.title.mobileFastAccess")),1),o("p",null,e(s.$t("common.message.mobileFastAccess")),1)]),o("article",oo,[a[7]||(a[7]=o("p",{class:"advantage-card__eyebrow"},"02",-1)),o("h3",null,e(s.$t("common.title.mobileTrustedRelease")),1),o("p",null,e(s.$t("common.message.mobileTrustedRelease")),1)]),o("article",so,[a[8]||(a[8]=o("p",{class:"advantage-card__eyebrow"},"03",-1)),o("h3",null,e(s.$t("common.title.mobileUnifiedExperience")),1),o("p",null,e(s.$t("common.message.mobileUnifiedExperience")),1)])]),o("section",eo,[o("p",null,e(s.$t("common.message.mobileInstallNote")),1)])])])}const bo=g(D,[["render",ao],["__scopeId","data-v-148fd365"]]);export{bo as default};
1
+ import{aj as _,D as g}from"./index-CyoIUj9o.js";import{E as h}from"./index-2TCFMqGF.js";import{d as b,H as r,E as o,F as e,x as m,y as t,I as l,J as c,C as d,D as p,q as i}from"./vendor-vue-DU0w5ewx.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./use-form-item-Dg0Eipdq.js";import"./index-BuyEbX8F.js";const f="3.30.2",v="https://cdn.acedata.cloud/2f29543715.apk",$="",w="",D=b({name:"DownloadIndex",components:{ElButton:h,QrCode:_},computed:{version(){return f},androidDownloadUrl(){return v},hasAndroidDownload(){return!0},iosDownloadUrl(){return $},iosFallbackUrl(){return w},hasIosDownload(){return!1}},methods:{openSupport(){window.open("https://platform.acedata.cloud/support","_blank")}}}),A={class:"download-page"},y={class:"container"},I={class:"hero-shell"},k={class:"hero-copy"},O={class:"subtitle"},S={class:"hero-tags"},U={class:"tag"},L={class:"tag"},N={class:"tag tag--soft"},C={class:"hero-actions"},E={class:"metrics"},B={class:"metric"},R={class:"metric"},z={class:"metric"},F={class:"hero-panels"},q={class:"panel panel--android"},V={class:"panel__head"},M={class:"status status--live"},P={class:"panel__text"},H={key:0,class:"qr-frame"},T={class:"panel__footer"},W={class:"panel__meta"},j={class:"panel panel--ios"},J={class:"panel__head"},K={class:"status status--pending"},Q={class:"panel__text"},G={class:"panel__footer panel__footer--stacked"},X={key:0,class:"button-group"},Y={class:"panel__meta"},Z={class:"advantage-grid"},x={class:"advantage-card"},oo={class:"advantage-card"},so={class:"advantage-card"},eo={class:"note"};function ao(s,a,no,to,lo,io){const n=p("el-button"),u=p("qr-code");return i(),r("div",A,[a[9]||(a[9]=o("div",{class:"ambient ambient--cyan"},null,-1)),a[10]||(a[10]=o("div",{class:"ambient ambient--gold"},null,-1)),o("div",y,[o("section",I,[o("div",k,[a[2]||(a[2]=o("p",{class:"eyebrow"},"AceData App",-1)),o("h1",null,e(s.$t("common.title.mobileApp")),1),o("p",O,e(s.$t("common.message.mobileAppDescription")),1),o("div",S,[o("span",U,e(s.$t("common.message.mobileAvailableNow")),1),o("span",L,"v"+e(s.version),1),o("span",N,e(s.$t("common.message.mobileSecureDelivery")),1)]),o("div",C,[s.hasAndroidDownload?(i(),m(n,{key:0,type:"primary",round:"",size:"large",tag:"a",href:s.androidDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadAndroid")),1)]),_:1},8,["href"])):c("",!0),d(n,{round:"",size:"large",class:"secondary-action",onClick:s.openSupport},{default:t(()=>[l(e(s.$t("common.nav.support")),1)]),_:1},8,["onClick"])]),o("div",E,[o("article",B,[a[0]||(a[0]=o("strong",null,"Android",-1)),o("span",null,e(s.$t("common.message.mobileDirectInstall")),1)]),o("article",R,[o("strong",null,"v"+e(s.version),1),o("span",null,e(s.$t("common.message.mobileLatestRelease")),1)]),o("article",z,[a[1]||(a[1]=o("strong",null,"AceData",-1)),o("span",null,e(s.$t("common.message.mobileSharedAccount")),1)])])]),o("div",F,[o("article",q,[o("div",V,[a[3]||(a[3]=o("span",{class:"platform-badge"},"Android",-1)),o("span",M,e(s.$t("common.message.mobileAvailableNow")),1)]),o("h2",null,e(s.$t("common.button.downloadAndroid")),1),o("p",P,e(s.$t("common.message.mobileAndroidHint")),1),s.hasAndroidDownload?(i(),r("div",H,[d(u,{value:s.androidDownloadUrl,width:176,height:176,class:"qr",type:"image/png",color:{dark:"#07253dff",light:"#ffffffff"}},null,8,["value"])])):c("",!0),o("div",T,[s.hasAndroidDownload?(i(),m(n,{key:0,type:"primary",round:"",size:"large",tag:"a",href:s.androidDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadAndroid")),1)]),_:1},8,["href"])):c("",!0),o("span",W,e(s.$t("common.message.mobileSecureDelivery")),1)])]),o("article",j,[o("div",J,[a[4]||(a[4]=o("span",{class:"platform-badge platform-badge--ios"},"iOS",-1)),o("span",K,e(s.$t("common.message.mobileIosPending")),1)]),o("h2",null,e(s.$t("common.button.downloadIos")),1),o("p",Q,e(s.hasIosDownload?s.$t("common.message.mobileIosHint"):s.$t("common.message.mobileIosPending")),1),a[5]||(a[5]=o("div",{class:"device-ghost"},[o("div",{class:"device-ghost__screen"},[o("span",null,"iOS"),o("small",null,"Signing in progress")])],-1)),o("div",G,[s.hasIosDownload?(i(),r("div",X,[d(n,{type:"primary",round:"",size:"large",tag:"a",href:s.iosDownloadUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.installIos")),1)]),_:1},8,["href"]),d(n,{round:"",size:"large",tag:"a",href:s.iosFallbackUrl,target:"_blank"},{default:t(()=>[l(e(s.$t("common.button.downloadIos")),1)]),_:1},8,["href"])])):(i(),m(n,{key:1,round:"",size:"large",class:"secondary-action",onClick:s.openSupport},{default:t(()=>[l(e(s.$t("common.nav.support")),1)]),_:1},8,["onClick"])),o("span",Y,e(s.$t("common.message.mobileInstallNote")),1)])])])]),o("section",Z,[o("article",x,[a[6]||(a[6]=o("p",{class:"advantage-card__eyebrow"},"01",-1)),o("h3",null,e(s.$t("common.title.mobileFastAccess")),1),o("p",null,e(s.$t("common.message.mobileFastAccess")),1)]),o("article",oo,[a[7]||(a[7]=o("p",{class:"advantage-card__eyebrow"},"02",-1)),o("h3",null,e(s.$t("common.title.mobileTrustedRelease")),1),o("p",null,e(s.$t("common.message.mobileTrustedRelease")),1)]),o("article",so,[a[8]||(a[8]=o("p",{class:"advantage-card__eyebrow"},"03",-1)),o("h3",null,e(s.$t("common.title.mobileUnifiedExperience")),1),o("p",null,e(s.$t("common.message.mobileUnifiedExperience")),1)])]),o("section",eo,[o("p",null,e(s.$t("common.message.mobileInstallNote")),1)])])])}const bo=g(D,[["render",ao],["__scopeId","data-v-148fd365"]]);export{bo as default};