@acedatacloud/nexior 3.245.0 → 3.247.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 (271) hide show
  1. package/dist/assets/{ApiCodeButton-MwCdjItj.js → ApiCodeButton-BxWrNlio.js} +1 -1
  2. package/dist/assets/{Auth-54_utD4A.js → Auth-DBgApWcC.js} +1 -1
  3. package/dist/assets/{BotPlaceholder-BQJ8N2Jf.js → BotPlaceholder-DpiZEQow.js} +1 -1
  4. package/dist/assets/{Callback-BpNGL1_Z.js → Callback-BEG7BeIC.js} +1 -1
  5. package/dist/assets/{Console-w1Gs_4mi.js → Console-BS1DHQK9.js} +1 -1
  6. package/dist/assets/{Consumption-BfyWCRgk.js → Consumption-B3cgN_uS.js} +1 -1
  7. package/dist/assets/{Conversation-sgmqi8sn.js → Conversation-HlTR345-.js} +1 -1
  8. package/dist/assets/{CopyToClipboard-DKVOdKXh.js → CopyToClipboard-g4vBpWAA.js} +1 -1
  9. package/dist/assets/{Detail-C5qcvWJz.css → Detail-6rh4qrUH.css} +1 -1
  10. package/dist/assets/Detail-BBxS4o_n.js +2 -0
  11. package/dist/assets/{Extra-BTuCzhff.js → Extra-BaFnbhmW.js} +1 -1
  12. package/dist/assets/{FilePreview-BCbVfztw.js → FilePreview-CgjWf7IZ.js} +1 -1
  13. package/dist/assets/{Hailuo-CDPCucQa.js → Hailuo-BsGaxbRH.js} +1 -1
  14. package/dist/assets/{History-jjWrXmCh.js → History-C3WsQvhF.js} +1 -1
  15. package/dist/assets/{ImagePreview-bH7j3Ud7.js → ImagePreview-D-9EFWby.js} +1 -1
  16. package/dist/assets/{ImageWrapper-DZQ2yeQU.js → ImageWrapper-B3cbnI5h.js} +1 -1
  17. package/dist/assets/{Index-QyrAUaBA.js → Index-9lvutSUo.js} +1 -1
  18. package/dist/assets/{Index-BWdFmfMn.js → Index-As22PRJ8.js} +1 -1
  19. package/dist/assets/{Index-BdP9TPzL.js → Index-B7wx6DnV.js} +1 -1
  20. package/dist/assets/{Index-De07AJRK.js → Index-BBsPsMNE.js} +1 -1
  21. package/dist/assets/{Index-BmDLR5R-.js → Index-BRvAWYnK.js} +1 -1
  22. package/dist/assets/{Index-DN-V7rvW.js → Index-Bim8xkOC.js} +1 -1
  23. package/dist/assets/{Index-ODecuHN5.js → Index-CGK17mp3.js} +1 -1
  24. package/dist/assets/{Index-wo9mJwbI.js → Index-CiZpMegP.js} +1 -1
  25. package/dist/assets/{Index-ChYm_CO9.js → Index-CtEwAjzb.js} +1 -1
  26. package/dist/assets/{Index-B_2v2e40.js → Index-D9ONlvtJ.js} +1 -1
  27. package/dist/assets/{Index-7lF-W8rz.js → Index-DH5LlwfI.js} +1 -1
  28. package/dist/assets/{Index-BA_YVWvX.js → Index-DLIiVbGX.js} +1 -1
  29. package/dist/assets/{Index-EPtrUYZT.js → Index-DRfc7-DW.js} +1 -1
  30. package/dist/assets/{Index-40zB2W0Z.js → Index-DxsapMg5.js} +1 -1
  31. package/dist/assets/{Index-CGtWKt5M.js → Index-G-eiLZof.js} +1 -1
  32. package/dist/assets/{Index-BCfsdo9g.js → Index-GfH7ORBW.js} +1 -1
  33. package/dist/assets/{Index-BIOAhG9j.js → Index-Lg4tO5s-.js} +1 -1
  34. package/dist/assets/{Index-5S_IkYa7.js → Index-PFxzES9c.js} +1 -1
  35. package/dist/assets/{Index-B-k5NoHs.js → Index-VmyhabIi.js} +1 -1
  36. package/dist/assets/{Index-BxS22eHl.js → Index-aMnEeK_G.js} +1 -1
  37. package/dist/assets/{Index-CEL2Ugf_.js → Index-bYW9icdw.js} +1 -1
  38. package/dist/assets/{Index-BtvclF0m.js → Index-oMr5qDpE.js} +1 -1
  39. package/dist/assets/{Index-DAkuVXB5.js → Index-pTthfWKC.js} +1 -1
  40. package/dist/assets/{Index-CCJQF_Ex.js → Index-wIVXmRng.js} +1 -1
  41. package/dist/assets/{Index-CkE_m684.js → Index-x4VIk-M0.js} +1 -1
  42. package/dist/assets/{Invitees-rcRLY7Be.js → Invitees-DM2PtM2B.js} +1 -1
  43. package/dist/assets/{List-BN4oTrqv.js → List-B9PWtOVg.js} +1 -1
  44. package/dist/assets/{List-CosTt0Qc.js → List-BI2uISLt.js} +1 -1
  45. package/dist/assets/{List-BMzgpu0x.js → List-CFNRyup6.js} +1 -1
  46. package/dist/assets/{Main-GBRnP-jm.js → Main-DvCFH-w5.js} +1 -1
  47. package/dist/assets/{Model-DrQ1VMP1.js → Model-BaFunQUx.js} +1 -1
  48. package/dist/assets/{Navigator-C8vNfGL2.js → Navigator-C90p8IJf.js} +1 -1
  49. package/dist/assets/{NoTasks-BW9Evuti.js → NoTasks-C9fjzpt-.js} +1 -1
  50. package/dist/assets/{NotFound-Dfko0PXv.js → NotFound-D3DVTX79.js} +1 -1
  51. package/dist/assets/{Pagination-DRdJhrb8.js → Pagination-BS1m7SpE.js} +1 -1
  52. package/dist/assets/{Player.vue_vue_type_script_setup_true_lang-tdhxLpuD.js → Player.vue_vue_type_script_setup_true_lang-VsHNDvNV.js} +1 -1
  53. package/dist/assets/{Status-CJ8rMfXf.js → Status-CUQyGBNT.js} +1 -1
  54. package/dist/assets/{Subscribe-5F1pW7gC.js → Subscribe-DX33tT74.js} +1 -1
  55. package/dist/assets/{TabSwitcher-XuoN9OvR.js → TabSwitcher-2PjIQYYE.js} +1 -1
  56. package/dist/assets/{Tts-D7JcDukQ.js → Tts-R9wDfVRw.js} +1 -1
  57. package/dist/assets/{VideoPlayer-CPQ2YAJy.js → VideoPlayer-D2Gk8iOW.js} +1 -1
  58. package/dist/assets/{_Uint8Array-DPOcqJZd.js → _Uint8Array-pk5G6DXb.js} +1 -1
  59. package/dist/assets/{_baseClone--7Km2b4u.js → _baseClone-BEl0SBVQ.js} +1 -1
  60. package/dist/assets/{_baseIteratee-DhnQF4MK.js → _baseIteratee-DKwNed0n.js} +1 -1
  61. package/dist/assets/{_initCloneObject-B0D57BXH.js → _initCloneObject-7jYqtSMb.js} +1 -1
  62. package/dist/assets/{add-uUVP7ocN.js → add-DTKL_ZFS.js} +1 -1
  63. package/dist/assets/{all-wallets-o-5uisaB.js → all-wallets-C5MLoAFb.js} +1 -1
  64. package/dist/assets/{app-store-Bl_b11O-.js → app-store-DCQDZXe0.js} +1 -1
  65. package/dist/assets/{apple-T06LTszZ.js → apple-C3iyqXrR.js} +1 -1
  66. package/dist/assets/{arrow-bottom-73nmxtgi.js → arrow-bottom-BMZap5Cj.js} +1 -1
  67. package/dist/assets/{arrow-bottom-circle-7gf_47eQ.js → arrow-bottom-circle-4MFN_8UE.js} +1 -1
  68. package/dist/assets/{arrow-left-X0_E_eaP.js → arrow-left-Bm5c9N7C.js} +1 -1
  69. package/dist/assets/{arrow-right-jp9aQ7Hx.js → arrow-right-hZ9Tp0uq.js} +1 -1
  70. package/dist/assets/{arrow-top-D4SeqSAv.js → arrow-top-BuD5nEdS.js} +1 -1
  71. package/dist/assets/{avatar-CjvjSVdE.js → avatar-jh__YkZL.js} +1 -1
  72. package/dist/assets/{bank-T2kCD9Cv.js → bank-B4h9ar-t.js} +1 -1
  73. package/dist/assets/{basic-BaAjqo_a.js → basic-DOcMcTjN.js} +1 -1
  74. package/dist/assets/{browser-_s6_-0Hk.js → browser-hlzvWCr4.js} +1 -1
  75. package/dist/assets/{byokCredential-CKcPwSHs.js → byokCredential-Co3C1RWX.js} +1 -1
  76. package/dist/assets/{card-D9bVENTy.js → card-CsqKf5wo.js} +1 -1
  77. package/dist/assets/{castArray-BxqkXJBu.js → castArray-tmh9kbwO.js} +1 -1
  78. package/dist/assets/{chat-DpZZHcr-.js → chat-CpcSRbD2.js} +1 -1
  79. package/dist/assets/{checkmark-DxUkvApa.js → checkmark-CzYmi1Yz.js} +1 -1
  80. package/dist/assets/{checkmark-bold-7KtyZWCT.js → checkmark-bold-DPgXxVBu.js} +1 -1
  81. package/dist/assets/{chevron-bottom-4vScJnUB.js → chevron-bottom-Cy--pI3I.js} +1 -1
  82. package/dist/assets/{chevron-left-BJRpEXj1.js → chevron-left-S6GJjIbX.js} +1 -1
  83. package/dist/assets/{chevron-right-imx_cBMc.js → chevron-right-dJvtWEQO.js} +1 -1
  84. package/dist/assets/{chevron-top-irP2OQ7a.js → chevron-top-Cq9z70-e.js} +1 -1
  85. package/dist/assets/{chrome-store-DGOi0Pji.js → chrome-store-zZ0uWv1q.js} +1 -1
  86. package/dist/assets/{clock-CTld7Iho.js → clock-BnJfjms8.js} +1 -1
  87. package/dist/assets/{close-CJ-b8NWl.js → close-BVSkmDiZ.js} +1 -1
  88. package/dist/assets/{coinPlaceholder-IMIaxRz1.js → coinPlaceholder-G8fFe1gL.js} +1 -1
  89. package/dist/assets/{compass-nRw-yqjd.js → compass-DQbcnfzc.js} +1 -1
  90. package/dist/assets/{copy-ByGMRPWJ.js → copy-Cmh57Ey0.js} +1 -1
  91. package/dist/assets/{createTaskActions-LhkKglzR.js → createTaskActions-P-2DmrOh.js} +1 -1
  92. package/dist/assets/{cursor-Dvqatauk.js → cursor-DkvrzDna.js} +1 -1
  93. package/dist/assets/{cursor-transparent-Ce9Xzmz6.js → cursor-transparent-CNsg0hrQ.js} +1 -1
  94. package/dist/assets/{debounce-B45cyiqt.js → debounce-DBeMKn11.js} +1 -1
  95. package/dist/assets/{desktop-BAwZ7gpt.js → desktop-DYouJkvo.js} +1 -1
  96. package/dist/assets/{disconnect-hH0HDZ9y.js → disconnect-pnM6foVl.js} +1 -1
  97. package/dist/assets/{discord-BmJocJYR.js → discord-CoWlEeWJ.js} +1 -1
  98. package/dist/assets/{distribution-CLlJodqN.js → distribution-CJcqbitH.js} +1 -1
  99. package/dist/assets/{dropdown-CtCq9BcV.js → dropdown-CjQKMXq9.js} +1 -1
  100. package/dist/assets/{etherscan--o_RMHtU.js → etherscan-Ctc0-KXt.js} +1 -1
  101. package/dist/assets/{exclamation-triangle-vZKtLEI2.js → exclamation-triangle-CLxSQi9H.js} +1 -1
  102. package/dist/assets/{extension-B-z9PPhD.js → extension-3Ftw9iYz.js} +1 -1
  103. package/dist/assets/{external-link-HOb8rOwv.js → external-link-DWzDSdHd.js} +1 -1
  104. package/dist/assets/{facebook-CGLEPZ9z.js → facebook-P_yhQXYh.js} +1 -1
  105. package/dist/assets/{farcaster-Cl3M0EoL.js → farcaster-C6D-Y9Ja.js} +1 -1
  106. package/dist/assets/{filters-Cc2yuWDk.js → filters-da1DF9Fp.js} +1 -1
  107. package/dist/assets/{github-CHSX8uGS.js → github-IwtJuUZ4.js} +1 -1
  108. package/dist/assets/{google-K2g0MsxM.js → google-DjH6KSZW.js} +1 -1
  109. package/dist/assets/{help-circle-CzbyFNrb.js → help-circle-DLiOYVb2.js} +1 -1
  110. package/dist/assets/{highlight-CXxI_cFL.js → highlight-BIVpqebW.js} +1 -1
  111. package/dist/assets/{id-DAXdHx5F.js → id-B7sbtS1G.js} +1 -1
  112. package/dist/assets/{image-Cvi3vwBW.js → image-0AU68zRr.js} +1 -1
  113. package/dist/assets/{index-D9wqrKXp.js → index-0u4YGGTa.js} +1 -1
  114. package/dist/assets/{index-B9pdZL34.js → index-2sob-pDv.js} +1 -1
  115. package/dist/assets/{index-C3e-Na98.js → index-2vry-0Si.js} +1 -1
  116. package/dist/assets/{index-C-yvkOm1.js → index-68NaTtAT.js} +1 -1
  117. package/dist/assets/{index-CHmtGf4A.js → index-B5267oqA.js} +4 -4
  118. package/dist/assets/{index-CC-bZZSL.js → index-B5jo7NY3.js} +1 -1
  119. package/dist/assets/{index-0wsHoDKy.css → index-B721S6IB.css} +1 -1
  120. package/dist/assets/{index-GNSuZNP7.js → index-BM3sPBDY.js} +1 -1
  121. package/dist/assets/{index-BE2rVsjE.js → index-BQc3ELHV.js} +1 -1
  122. package/dist/assets/{index-lhh2hApy.js → index-BaIOFWVN.js} +1 -1
  123. package/dist/assets/{index-zQVLPgK6.js → index-Bf3A60rN.js} +1 -1
  124. package/dist/assets/{index-726zqnEk.js → index-BfvgCRfu.js} +1 -1
  125. package/dist/assets/{index-Cmkgk4cE.js → index-Bg3fpyty.js} +1 -1
  126. package/dist/assets/{index-Cst45b4G.js → index-BjAmTjb2.js} +1 -1
  127. package/dist/assets/{index-CGd2QBJF.js → index-Bop7QJNZ.js} +1 -1
  128. package/dist/assets/{index-CBxHrb-8.js → index-Bt0OiCSI.js} +1 -1
  129. package/dist/assets/{index-28HwyzNW.js → index-BvL_bkhW.js} +5 -5
  130. package/dist/assets/{index-ZoHK3Llk.js → index-BwIwFxoe.js} +1 -1
  131. package/dist/assets/{index-D75kmLap.js → index-C09FcKq9.js} +1 -1
  132. package/dist/assets/{index-CQ13KZwH.js → index-C11T6v8N.js} +1 -1
  133. package/dist/assets/{index-rHiaPRV8.js → index-C294PRIl.js} +1 -1
  134. package/dist/assets/{index-3t2i5bKv.js → index-C2Ef9ZKY.js} +1 -1
  135. package/dist/assets/{index-Yn6f93sj.js → index-C3qZe6wM.js} +1 -1
  136. package/dist/assets/{index-BA1RjqVt.js → index-C7rmhYmL.js} +1 -1
  137. package/dist/assets/{index-HPhIhg66.js → index-C94_tKkM.js} +1 -1
  138. package/dist/assets/{index-Bqmf4VPb.js → index-C9CBkm3J.js} +1 -1
  139. package/dist/assets/{index-DLTayQaP.js → index-CCwWrfc4.js} +1 -1
  140. package/dist/assets/{index-DHU9C6A_.js → index-CG7pBdX7.js} +1 -1
  141. package/dist/assets/{index-BeARH5YG.js → index-CKchCVfL.js} +2 -2
  142. package/dist/assets/{index-De86_d76.js → index-CLzy2i_E.js} +1 -1
  143. package/dist/assets/{index-Df2QFpv_.js → index-CQayeKqY.js} +1 -1
  144. package/dist/assets/{index-BZFy8oDc.js → index-CR6ve8Ck.js} +1 -1
  145. package/dist/assets/{index-G418qAXX.js → index-CV49VNqG.js} +1 -1
  146. package/dist/assets/{index-SGLx8zyz.js → index-CYaLupkJ.js} +1 -1
  147. package/dist/assets/{index-CaF6E1ua.js → index-CstN7RKM.js} +1 -1
  148. package/dist/assets/{index-6I9U3YPR.js → index-CzL5AhXP.js} +1 -1
  149. package/dist/assets/{index-DaJc9UN7.js → index-D04OE6ZP.js} +1 -1
  150. package/dist/assets/{index-C1uViU8O.js → index-D3Pn_CC4.js} +1 -1
  151. package/dist/assets/{index-COO2J141.js → index-D8Cs8xk3.js} +1 -1
  152. package/dist/assets/{index-B-w7kFLQ.js → index-DD8o6SGh.js} +1 -1
  153. package/dist/assets/{index-CwLCJ_yY.js → index-DKF6p7_t.js} +1 -1
  154. package/dist/assets/{index-xjSSqcUl.js → index-DKT4kT0z.js} +1 -1
  155. package/dist/assets/{index-By-ocbaa.js → index-DQecjVoC.js} +1 -1
  156. package/dist/assets/{index-z-mp0ifB.js → index-DVPxXPIi.js} +1 -1
  157. package/dist/assets/{index-B0Te_GzJ.js → index-DaJgo_ZX.js} +1 -1
  158. package/dist/assets/{index-D97U5eKN.js → index-DbBDYLLC.js} +1 -1
  159. package/dist/assets/{index-h461vrWW.js → index-DfAn9V8y.js} +1 -1
  160. package/dist/assets/{index-C5dp1Azy.js → index-Dh_hemGT.js} +1 -1
  161. package/dist/assets/{index-BjvFL29K.js → index-DizoYeO3.js} +1 -1
  162. package/dist/assets/{index-Dqmwib7t.js → index-DmI0irY_.js} +3 -3
  163. package/dist/assets/{index-sf_z0KIz.js → index-DxHihOCA.js} +1 -1
  164. package/dist/assets/{index-BWnkfN97.js → index-L0hmNNaW.js} +1 -1
  165. package/dist/assets/{index-BktK_7mb.js → index-Tga9YfTB.js} +1 -1
  166. package/dist/assets/{index-D7YvS7rX.js → index-V-c9hDuN.js} +1 -1
  167. package/dist/assets/{index-h_UVkUAR.js → index-YHAd10KH.js} +1 -1
  168. package/dist/assets/{index-bZPPFBlm.js → index-_dbDaWih.js} +1 -1
  169. package/dist/assets/{index-DhSKHBOv.js → index-bs2QXOh6.js} +1 -1
  170. package/dist/assets/{index-u-xTR0Ry.js → index-dItq9AaI.js} +1 -1
  171. package/dist/assets/{index-thBdpy0K.js → index-ekq_L-ma.js} +1 -1
  172. package/dist/assets/{index-Bw8aFjvo.js → index-h72lxwun.js} +1 -1
  173. package/dist/assets/{index-DODfOEyD.js → index-i3zVFahC.js} +1 -1
  174. package/dist/assets/{index-CFIWr8XW.js → index-ndgg4Xx-.js} +1 -1
  175. package/dist/assets/{index-PT-JBqE9.js → index-qgWZ4gIq.js} +1 -1
  176. package/dist/assets/{index-CjnDrU5u.js → index-ukLW3UKB.js} +1 -1
  177. package/dist/assets/{index.browser.esm-DF3q8cei.js → index.browser.esm-BjveNakI.js} +1 -1
  178. package/dist/assets/{index.es-DOVLdD0a.js → index.es-D8MU6eMk.js} +1 -1
  179. package/dist/assets/{info-circle-D3iKJ6OI.js → info-circle-B_ptqPDa.js} +1 -1
  180. package/dist/assets/{info-8PNCriaE.js → info-dOvxF9_k.js} +1 -1
  181. package/dist/assets/{isEqual-BhXAbDsM.js → isEqual-Dh50OCem.js} +1 -1
  182. package/dist/assets/{isPlainObject-B4UwRldP.js → isPlainObject-dMdaxYmL.js} +1 -1
  183. package/dist/assets/{lightbulb-D_Xlx98r.js → lightbulb-D8KE_ZIV.js} +1 -1
  184. package/dist/assets/{mail-DU-nfgyl.js → mail-DT7Oj5pA.js} +1 -1
  185. package/dist/assets/{midjourney-CIhOb7Rn.js → midjourney-DLKHed76.js} +1 -1
  186. package/dist/assets/{mobile-icT_zvbC.js → mobile-AVtFisqT.js} +1 -1
  187. package/dist/assets/{more-C1upol7f.js → more-DRhObOpy.js} +1 -1
  188. package/dist/assets/{network-placeholder-DlCoDsOy.js → network-placeholder-B_FWgMxk.js} +1 -1
  189. package/dist/assets/{nftPlaceholder-DBRMhSwB.js → nftPlaceholder-_di0fXLf.js} +1 -1
  190. package/dist/assets/{off-DsL-jb5U.js → off-COt_i6CT.js} +1 -1
  191. package/dist/assets/order-1qJ3GxaX.js +1 -0
  192. package/dist/assets/order-B8dtxAZ2.js +1 -0
  193. package/dist/assets/order-BDzghU3p.js +1 -0
  194. package/dist/assets/order-BI5MxfoB.js +1 -0
  195. package/dist/assets/order-BfoUTh90.js +1 -0
  196. package/dist/assets/order-BigJZUm-.js +1 -0
  197. package/dist/assets/order-BulQDrR-.js +1 -0
  198. package/dist/assets/order-CCmLKKdB.js +1 -0
  199. package/dist/assets/{order-BphZtevO.js → order-CJX0GN2m.js} +1 -1
  200. package/dist/assets/order-CSpGh4Zz.js +1 -0
  201. package/dist/assets/order-CVHCRSWI.js +1 -0
  202. package/dist/assets/order-CerH81Qp.js +1 -0
  203. package/dist/assets/order-CgCnV8Wc.js +1 -0
  204. package/dist/assets/order-D8IX-Cp2.js +1 -0
  205. package/dist/assets/order-D8kStYHA.js +1 -0
  206. package/dist/assets/order-DNR8D2Y8.js +1 -0
  207. package/dist/assets/order-EP4isp-N.js +1 -0
  208. package/dist/assets/order-ReEYaOWl.js +1 -0
  209. package/dist/assets/order-XdBUMXLb.js +1 -0
  210. package/dist/assets/{pagination-SH9sghbT.js → pagination-BlJ6xPMo.js} +1 -1
  211. package/dist/assets/{play-store-BkerYAaQ.js → play-store-Cedel5kB.js} +1 -1
  212. package/dist/assets/{plus-CPMq_Cq9.js → plus-Cuj7YYtp.js} +1 -1
  213. package/dist/assets/{price-CsGwkme4.js → price-BDO9ZXFV.js} +1 -1
  214. package/dist/assets/{producer-BwzPA4ml.js → producer-MVbu9J-a.js} +1 -1
  215. package/dist/assets/{qr-code-BA1fK1kN.js → qr-code-BDZGQJwb.js} +1 -1
  216. package/dist/assets/{recycle-horizontal-oio1RVVI.js → recycle-horizontal-C5WjUkxr.js} +1 -1
  217. package/dist/assets/{refresh-B6Pe4E5D.js → refresh-CbTpfLPL.js} +1 -1
  218. package/dist/assets/{reown-logo-BzMT_WjT.js → reown-logo-BXupsXS3.js} +1 -1
  219. package/dist/assets/{search-ClGdg4Zz.js → search-Bsphe-gu.js} +1 -1
  220. package/dist/assets/{secp256k1-Ak_DHr9h.js → secp256k1-DSvuYwWr.js} +1 -1
  221. package/dist/assets/{secp256k1-SdUdY11i.js → secp256k1-gBDfF4Ck.js} +1 -1
  222. package/dist/assets/{seedream-PGWK6v5T.js → seedream-C7eDwzou.js} +1 -1
  223. package/dist/assets/{send-CRjxWwdB.js → send-DTG8ft4a.js} +1 -1
  224. package/dist/assets/{service-CXHeGKjl.js → service-b1ACOrhy.js} +1 -1
  225. package/dist/assets/{solana-wallets-CW_A8jms.js → solana-wallets-YBA_Z6os.js} +2 -2
  226. package/dist/assets/{solana-wallets-vue-C2vIkWWM.js → solana-wallets-vue-SsomcTKH.js} +1 -1
  227. package/dist/assets/{suno-Byi6pNmg.js → suno-BOOKvePt.js} +1 -1
  228. package/dist/assets/{swapHorizontal-DG1NTxwG.js → swapHorizontal-CgIZOiup.js} +1 -1
  229. package/dist/assets/{swapHorizontalBold-BWJvoDf9.js → swapHorizontalBold-B1U0OJbS.js} +1 -1
  230. package/dist/assets/{swapHorizontalMedium-D00mqaXZ.js → swapHorizontalMedium-BvL_ktn0.js} +1 -1
  231. package/dist/assets/{swapHorizontalRoundedBold-CexVaE_K.js → swapHorizontalRoundedBold-DmBo86OS.js} +1 -1
  232. package/dist/assets/{swapVertical-D1ffIW4Y.js → swapVertical-CwUQpp6D.js} +1 -1
  233. package/dist/assets/{telegram-J_urYxO_.js → telegram-CgkGRZUZ.js} +1 -1
  234. package/dist/assets/{three-dots-knKk_r1e.js → three-dots-L8Alh1LI.js} +1 -1
  235. package/dist/assets/{twitch-CAwcWgmF.js → twitch-tqDRvo5X.js} +1 -1
  236. package/dist/assets/{twitterIcon-ChwML-Qc.js → twitterIcon-m-I-o48i.js} +1 -1
  237. package/dist/assets/{typescript-BLCUSKq0.js → typescript-GHEyAG9P.js} +1 -1
  238. package/dist/assets/{use-form-item-CpZ6Xcgf.js → use-form-item-CAmCDDpm.js} +1 -1
  239. package/dist/assets/validator-BY6D6xjR.js +1 -0
  240. package/dist/assets/{verify-DFzG2pPJ.js → verify-DYX5GAvx.js} +1 -1
  241. package/dist/assets/{verify-filled-DNoiiezv.js → verify-filled-Bd1KVQgm.js} +1 -1
  242. package/dist/assets/{w3m-modal-u02sTgM0.js → w3m-modal-CUDhwQSo.js} +1 -1
  243. package/dist/assets/{wallet-DKYLzyPW.js → wallet-fqHipSqw.js} +1 -1
  244. package/dist/assets/{wallet-placeholder-DJW7V9fB.js → wallet-placeholder-BNss7V7Y.js} +1 -1
  245. package/dist/assets/{walletconnect-BDIcweBk.js → walletconnect-Dd02hoMz.js} +1 -1
  246. package/dist/assets/{warning-circle-Qv5JV757.js → warning-circle-Bq66iBvQ.js} +1 -1
  247. package/dist/assets/{web-DTDLVwnM.js → web-By0Q0OWp.js} +1 -1
  248. package/dist/assets/{web-XRXhWR06.js → web-biVkl97I.js} +1 -1
  249. package/dist/assets/{x-Blbo6pZn.js → x-CGbk18ka.js} +1 -1
  250. package/dist/index.html +2 -2
  251. package/package.json +1 -1
  252. package/dist/assets/Detail-3tzOAvs7.js +0 -2
  253. package/dist/assets/order-5qA_Tyh8.js +0 -1
  254. package/dist/assets/order-9nfJ8A90.js +0 -1
  255. package/dist/assets/order-BBkqrzA1.js +0 -1
  256. package/dist/assets/order-BN3dpqvG.js +0 -1
  257. package/dist/assets/order-BTmBLJaK.js +0 -1
  258. package/dist/assets/order-BftLdFGm.js +0 -1
  259. package/dist/assets/order-BjTLjJLs.js +0 -1
  260. package/dist/assets/order-BoZk92NC.js +0 -1
  261. package/dist/assets/order-BtQos6TQ.js +0 -1
  262. package/dist/assets/order-C-eebXs4.js +0 -1
  263. package/dist/assets/order-C1LbxCIE.js +0 -1
  264. package/dist/assets/order-CFConAaV.js +0 -1
  265. package/dist/assets/order-DDY8y6pc.js +0 -1
  266. package/dist/assets/order-DKULBrBK.js +0 -1
  267. package/dist/assets/order-LsX4lEG_.js +0 -1
  268. package/dist/assets/order-RVok9vvs.js +0 -1
  269. package/dist/assets/order-RkmomuXc.js +0 -1
  270. package/dist/assets/order-xKN_YBy7.js +0 -1
  271. package/dist/assets/validator-95g-IPq0.js +0 -1
@@ -1 +1 @@
1
- import{N as E}from"./Navigator-C8vNfGL2.js";import{A as N}from"./Status-CJ8rMfXf.js";import{a4 as d,a5 as u,bp as z,bq as I,H as v,o as k,S as C}from"./index-CHmtGf4A.js";import{a as x}from"./errorCode-Cqj9Td_Z.js";import{E as D}from"./index-D97U5eKN.js";import{E as U}from"./index-3t2i5bKv.js";import{E as L}from"./index-B0Te_GzJ.js";import{E as y}from"./index-DLTayQaP.js";import{d as w,x as _,y as $,E as m,F as h,C as l,I as R,D as a,q as A,c as B,H as V,J as P}from"./vendor-vue-NSDaktjZ.js";import"./midjourney-BpOMf6EO.js";import"./luma-DcySqBv2.js";import"./kling-DwJwIwVI.js";import"./veo-Dg8Zhpd-.js";import"./sora-Dyuoglk1.js";import"./pixverse-g-p4CgDy.js";import"./flux-BDAe6Szo.js";import"./hailuo-C8Dw-0xR.js";import"./suno-B9P6-pqW.js";import"./producer-BGNC4QeM.js";import"./serp-BcjVM9iR.js";import"./wan-DKq-jYOo.js";import"./webextrator-B5rnj1Le.js";import"./fish-B2JG6AjH.js";import"./avatar-CjvjSVdE.js";import"./index.es-DOVLdD0a.js";import"./index-DaJc9UN7.js";import"./index-6I9U3YPR.js";import"./index-HPhIhg66.js";import"./typescript-BLCUSKq0.js";import"./index-D7YvS7rX.js";import"./dropdown-CtCq9BcV.js";import"./castArray-BxqkXJBu.js";import"./byokCredential-CKcPwSHs.js";import"./vendor-axios-B8_nURbH.js";import"./index-Bw8aFjvo.js";import"./strings-beZM2Y-f.js";import"./isEqual-BhXAbDsM.js";import"./_Uint8Array-DPOcqJZd.js";import"./use-form-item-CpZ6Xcgf.js";import"./index-Df2QFpv_.js";import"./index-z-mp0ifB.js";import"./debounce-B45cyiqt.js";import"./_baseIteratee-DhnQF4MK.js";import"./index-h_UVkUAR.js";import"./index-Yn6f93sj.js";import"./_baseClone--7Km2b4u.js";import"./_initCloneObject-B0D57BXH.js";import"./index-bZPPFBlm.js";import"./isPlainObject-B4UwRldP.js";import"./index-C1uViU8O.js";import"./validator-95g-IPq0.js";import"./index-BE2rVsjE.js";import"./index-C3e-Na98.js";import"./index-zQVLPgK6.js";import"./index-BuyEbX8F.js";import"./index-G418qAXX.js";import"./index-CBxHrb-8.js";import"./index-Bqmf4VPb.js";import"./index-ZoHK3Llk.js";import"./CopyToClipboard-DKVOdKXh.js";import"./index-BLjywj98.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";function S(t){if(!t?.expired_at)return!1;try{return new Date(t?.expired_at)<new Date}catch{return!1}}function O(t){return console.debug("application remaining amount",t,t?.remaining_amount),t?.remaining_amount&&t?.remaining_amount<0}function f(t){if(!t)return console.debug("application is undefined, return false"),!1;const i=O(t),o=S(t);return console.debug("is application exhausted",i),console.debug("is application expired",o),!i&&!o}function F(t,i){if(console.debug("start to execute getFinalApplication",t,i),i){const e=t?.find(c=>c.id===i.id);if(e)return console.debug("current application is preserved (respect user selection)",e),e}console.debug("get final application from applications",t);const o=t?.find(e=>e.scope===d.GLOBAL&&e.type===u.PERIOD);if(console.debug("application1",o),f(o))return console.debug("application with global scope and Period type",o),o;const s=t?.find(e=>e.scope===d.GLOBAL&&e.type===u.USAGE);if(console.debug("application2",s),f(s))return console.debug("application with global scope and Usage type",s),s;const p=t?.find(e=>(e.scope===d.INDIVIDUAL&&e?.type)===u.PERIOD);if(console.debug("application3",p),f(p))return console.debug("application with Period type",p),p;const n=t?.find(e=>(e.scope===d.INDIVIDUAL&&e?.type)===u.USAGE);return console.debug("application4",n),f(n)?(console.debug("application with Usage type",n),n):o||s||p||n}const G=w({name:"ApplicationConfirm",components:{ElDialog:I,ElDivider:L,ElCheckbox:U,ElButton:D},props:{visible:{type:Boolean,required:!1,default:!1}},emits:["update:visible","apply"],data(){return{checked:!0}},watch:{},methods:{getBaseUrlPlatform:z,onApply(){if(!this.checked){y.error(this.$t("application.message.notAgreePolicy"));return}this.$emit("apply")}}}),M={class:"content py-[10px] px-[40px]"},T={class:"my-4"},W={class:"policy mb-[10px]"},q={class:"policy-title text-[12px] relative -bottom-[3px]"},H=["href"];function J(t,i,o,s,p,n){const e=a("el-divider"),c=a("el-checkbox"),g=a("el-button"),b=a("el-dialog");return A(),_(b,{"model-value":t.visible,width:"500px",title:t.$t("application.message.welcome"),center:"",onClose:i[1]||(i[1]=r=>t.$emit("update:visible",!1))},{default:$(()=>[m("div",M,[m("p",T,h(t.$t("application.message.notApplied")),1),l(e,{class:"my-2"}),m("div",W,[l(c,{modelValue:t.checked,"onUpdate:modelValue":i[0]||(i[0]=r=>t.checked=r),size:"large",class:"policy-checkbox mr-[10px]"},null,8,["modelValue"]),m("span",q,h(t.$t("application.message.readPolicy")),1),m("a",{class:"policy-title text-[12px] relative -bottom-[3px] text-[var(--el-color-primary)] cursor-pointer no-underline",target:"_blank",href:t.getBaseUrlPlatform()+"/terms"},"  "+h(t.$t("application.message.policy")),9,H)]),l(g,{round:"",type:"primary",onClick:t.onApply},{default:$(()=>[R(h(t.$t("common.button.start")),1)]),_:1},8,["onClick"])])]),_:1},8,["model-value","title"])}const j=v(G,[["render",J]]),K=w({name:"LayoutMain",components:{Navigator:E,ApplicationStatus:N,ApplicationConfirm:j},provide(){return{initialized:B(()=>this.initialized)}},data(){return{initialized:!1,applying:!1,mobile:window.innerWidth<768,initializeRunId:0}},computed:{appName(){return this.$route.meta.appName},application(){return this.$store.state[this.appName]?.application},applications(){const t=this.$store.state[this.appName]?.applications??[];console.debug("individualApplications",t);const i=this.$store.state.applications??[];return console.debug("globalApplications",i),i.concat(t)},loading(){return this.$store.state[this.appName]?.status?.getApplications===C.Request},service(){return this.$store.state[this.appName]?.service},userId(){return this.$store.state.user?.id}},watch:{appName(){this.initialize()},userId(t,i){t&&t!==i&&this.initialize()}},mounted(){this.initialize(),window.addEventListener("resize",this.onResize)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{onResize(){this.mobile=window.innerWidth<768},async initialize(){const t=++this.initializeRunId;if(this.initialized=!1,console.debug("Fetching all individual and global applications for",this.appName),await Promise.allSettled([this.$store.dispatch("getApplications"),this.$store.dispatch(`${this.appName}/getApplications`)]),t!==this.initializeRunId)return;console.debug("Fetched all applications",this.applications),this.$store.state.applications?.length===0&&await this.onAutoApply();const i=this.$store.state[this.appName]?.application;console.debug("current application",i);const o=F(this.applications,i);console.debug("final application",o),o&&(console.debug("set final application",o,o?.type),await this.$store.dispatch(`${this.appName}/setApplication`,o)),console.debug("finished initialization"),this.initialized=!0},onApply(){this.onAutoApply()},async onAutoApply(){try{await k.create({type:u.USAGE,scope:d.GLOBAL,user_id:this.$store.getters.user.id}),this.applying=!1,await this.$store.dispatch("getApplications"),this.showWelcomeToast()}catch(t){t?.response?.data?.code===x?await this.$store.dispatch("getApplications"):y.error(this.$t("application.message.applyFailed"))}},showWelcomeToast(){const t=this.$store.state.applications?.[0],i=Math.floor(t?.remaining_amount??0),o=i>0?this.$t("application.message.welcomeWithCredits",{credits:i}):this.$t("application.message.welcomeNoCredits");y({message:o,type:"success",duration:6e3,showClose:!0})}}}),Q={class:"wrapper"};function X(t,i,o,s,p,n){const e=a("router-view"),c=a("navigator"),g=a("application-status"),b=a("application-confirm");return A(),V("div",Q,[l(e,{class:"main"}),l(c,{class:"navigator",direction:t.mobile?"row":"column"},null,8,["direction"]),t.application?(A(),_(g,{key:0,class:"status-floating fixed right-2 z-[200]",application:t.application,applications:t.applications,"show-price":!1,authenticated:!!t.$store.state.token.access,service:t.service,onSelect:i[0]||(i[0]=r=>t.$store.dispatch(`${t.appName}/setApplication`,r))},null,8,["application","applications","authenticated","service"])):P("",!0),l(b,{modelValue:t.applying,"onUpdate:modelValue":i[1]||(i[1]=r=>t.applying=r),modelModifiers:{visible:!0},onApply:t.onApply},null,8,["modelValue","onApply"])])}const ni=v(K,[["render",X],["__scopeId","data-v-d59ada2a"]]);export{ni as default};
1
+ import{N as E}from"./Navigator-C90p8IJf.js";import{A as N}from"./Status-CUQyGBNT.js";import{a4 as d,a5 as u,bp as z,bq as I,H as v,o as k,S as C}from"./index-B5267oqA.js";import{a as x}from"./errorCode-Cqj9Td_Z.js";import{E as D}from"./index-DbBDYLLC.js";import{E as U}from"./index-C2Ef9ZKY.js";import{E as L}from"./index-DaJgo_ZX.js";import{E as y}from"./index-CCwWrfc4.js";import{d as w,x as _,y as $,E as m,F as h,C as l,I as R,D as a,q as A,c as B,H as V,J as P}from"./vendor-vue-NSDaktjZ.js";import"./midjourney-BpOMf6EO.js";import"./luma-DcySqBv2.js";import"./kling-DwJwIwVI.js";import"./veo-Dg8Zhpd-.js";import"./sora-Dyuoglk1.js";import"./pixverse-g-p4CgDy.js";import"./flux-BDAe6Szo.js";import"./hailuo-C8Dw-0xR.js";import"./suno-B9P6-pqW.js";import"./producer-BGNC4QeM.js";import"./serp-BcjVM9iR.js";import"./wan-DKq-jYOo.js";import"./webextrator-B5rnj1Le.js";import"./fish-B2JG6AjH.js";import"./avatar-jh__YkZL.js";import"./index.es-D8MU6eMk.js";import"./index-D04OE6ZP.js";import"./index-CzL5AhXP.js";import"./index-C94_tKkM.js";import"./typescript-GHEyAG9P.js";import"./index-V-c9hDuN.js";import"./dropdown-CjQKMXq9.js";import"./castArray-tmh9kbwO.js";import"./byokCredential-Co3C1RWX.js";import"./vendor-axios-B8_nURbH.js";import"./index-h72lxwun.js";import"./strings-beZM2Y-f.js";import"./isEqual-Dh50OCem.js";import"./_Uint8Array-pk5G6DXb.js";import"./use-form-item-CAmCDDpm.js";import"./index-CQayeKqY.js";import"./index-DVPxXPIi.js";import"./debounce-DBeMKn11.js";import"./_baseIteratee-DKwNed0n.js";import"./index-YHAd10KH.js";import"./index-C3qZe6wM.js";import"./_baseClone-BEl0SBVQ.js";import"./_initCloneObject-7jYqtSMb.js";import"./index-_dbDaWih.js";import"./isPlainObject-dMdaxYmL.js";import"./index-D3Pn_CC4.js";import"./validator-BY6D6xjR.js";import"./index-BQc3ELHV.js";import"./index-2vry-0Si.js";import"./index-Bf3A60rN.js";import"./index-BuyEbX8F.js";import"./index-CV49VNqG.js";import"./index-Bt0OiCSI.js";import"./index-C9CBkm3J.js";import"./index-BwIwFxoe.js";import"./CopyToClipboard-g4vBpWAA.js";import"./index-BLjywj98.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";function S(t){if(!t?.expired_at)return!1;try{return new Date(t?.expired_at)<new Date}catch{return!1}}function O(t){return console.debug("application remaining amount",t,t?.remaining_amount),t?.remaining_amount&&t?.remaining_amount<0}function f(t){if(!t)return console.debug("application is undefined, return false"),!1;const i=O(t),o=S(t);return console.debug("is application exhausted",i),console.debug("is application expired",o),!i&&!o}function F(t,i){if(console.debug("start to execute getFinalApplication",t,i),i){const e=t?.find(c=>c.id===i.id);if(e)return console.debug("current application is preserved (respect user selection)",e),e}console.debug("get final application from applications",t);const o=t?.find(e=>e.scope===d.GLOBAL&&e.type===u.PERIOD);if(console.debug("application1",o),f(o))return console.debug("application with global scope and Period type",o),o;const s=t?.find(e=>e.scope===d.GLOBAL&&e.type===u.USAGE);if(console.debug("application2",s),f(s))return console.debug("application with global scope and Usage type",s),s;const p=t?.find(e=>(e.scope===d.INDIVIDUAL&&e?.type)===u.PERIOD);if(console.debug("application3",p),f(p))return console.debug("application with Period type",p),p;const n=t?.find(e=>(e.scope===d.INDIVIDUAL&&e?.type)===u.USAGE);return console.debug("application4",n),f(n)?(console.debug("application with Usage type",n),n):o||s||p||n}const G=w({name:"ApplicationConfirm",components:{ElDialog:I,ElDivider:L,ElCheckbox:U,ElButton:D},props:{visible:{type:Boolean,required:!1,default:!1}},emits:["update:visible","apply"],data(){return{checked:!0}},watch:{},methods:{getBaseUrlPlatform:z,onApply(){if(!this.checked){y.error(this.$t("application.message.notAgreePolicy"));return}this.$emit("apply")}}}),M={class:"content py-[10px] px-[40px]"},T={class:"my-4"},W={class:"policy mb-[10px]"},q={class:"policy-title text-[12px] relative -bottom-[3px]"},H=["href"];function J(t,i,o,s,p,n){const e=a("el-divider"),c=a("el-checkbox"),g=a("el-button"),b=a("el-dialog");return A(),_(b,{"model-value":t.visible,width:"500px",title:t.$t("application.message.welcome"),center:"",onClose:i[1]||(i[1]=r=>t.$emit("update:visible",!1))},{default:$(()=>[m("div",M,[m("p",T,h(t.$t("application.message.notApplied")),1),l(e,{class:"my-2"}),m("div",W,[l(c,{modelValue:t.checked,"onUpdate:modelValue":i[0]||(i[0]=r=>t.checked=r),size:"large",class:"policy-checkbox mr-[10px]"},null,8,["modelValue"]),m("span",q,h(t.$t("application.message.readPolicy")),1),m("a",{class:"policy-title text-[12px] relative -bottom-[3px] text-[var(--el-color-primary)] cursor-pointer no-underline",target:"_blank",href:t.getBaseUrlPlatform()+"/terms"},"  "+h(t.$t("application.message.policy")),9,H)]),l(g,{round:"",type:"primary",onClick:t.onApply},{default:$(()=>[R(h(t.$t("common.button.start")),1)]),_:1},8,["onClick"])])]),_:1},8,["model-value","title"])}const j=v(G,[["render",J]]),K=w({name:"LayoutMain",components:{Navigator:E,ApplicationStatus:N,ApplicationConfirm:j},provide(){return{initialized:B(()=>this.initialized)}},data(){return{initialized:!1,applying:!1,mobile:window.innerWidth<768,initializeRunId:0}},computed:{appName(){return this.$route.meta.appName},application(){return this.$store.state[this.appName]?.application},applications(){const t=this.$store.state[this.appName]?.applications??[];console.debug("individualApplications",t);const i=this.$store.state.applications??[];return console.debug("globalApplications",i),i.concat(t)},loading(){return this.$store.state[this.appName]?.status?.getApplications===C.Request},service(){return this.$store.state[this.appName]?.service},userId(){return this.$store.state.user?.id}},watch:{appName(){this.initialize()},userId(t,i){t&&t!==i&&this.initialize()}},mounted(){this.initialize(),window.addEventListener("resize",this.onResize)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{onResize(){this.mobile=window.innerWidth<768},async initialize(){const t=++this.initializeRunId;if(this.initialized=!1,console.debug("Fetching all individual and global applications for",this.appName),await Promise.allSettled([this.$store.dispatch("getApplications"),this.$store.dispatch(`${this.appName}/getApplications`)]),t!==this.initializeRunId)return;console.debug("Fetched all applications",this.applications),this.$store.state.applications?.length===0&&await this.onAutoApply();const i=this.$store.state[this.appName]?.application;console.debug("current application",i);const o=F(this.applications,i);console.debug("final application",o),o&&(console.debug("set final application",o,o?.type),await this.$store.dispatch(`${this.appName}/setApplication`,o)),console.debug("finished initialization"),this.initialized=!0},onApply(){this.onAutoApply()},async onAutoApply(){try{await k.create({type:u.USAGE,scope:d.GLOBAL,user_id:this.$store.getters.user.id}),this.applying=!1,await this.$store.dispatch("getApplications"),this.showWelcomeToast()}catch(t){t?.response?.data?.code===x?await this.$store.dispatch("getApplications"):y.error(this.$t("application.message.applyFailed"))}},showWelcomeToast(){const t=this.$store.state.applications?.[0],i=Math.floor(t?.remaining_amount??0),o=i>0?this.$t("application.message.welcomeWithCredits",{credits:i}):this.$t("application.message.welcomeNoCredits");y({message:o,type:"success",duration:6e3,showClose:!0})}}}),Q={class:"wrapper"};function X(t,i,o,s,p,n){const e=a("router-view"),c=a("navigator"),g=a("application-status"),b=a("application-confirm");return A(),V("div",Q,[l(e,{class:"main"}),l(c,{class:"navigator",direction:t.mobile?"row":"column"},null,8,["direction"]),t.application?(A(),_(g,{key:0,class:"status-floating fixed right-2 z-[200]",application:t.application,applications:t.applications,"show-price":!1,authenticated:!!t.$store.state.token.access,service:t.service,onSelect:i[0]||(i[0]=r=>t.$store.dispatch(`${t.appName}/setApplication`,r))},null,8,["application","applications","authenticated","service"])):P("",!0),l(b,{modelValue:t.applying,"onUpdate:modelValue":i[1]||(i[1]=r=>t.applying=r),modelModifiers:{visible:!0},onApply:t.onApply},null,8,["modelValue","onApply"])])}const ni=v(K,[["render",X],["__scopeId","data-v-d59ada2a"]]);export{ni as default};
@@ -1 +1 @@
1
- import{L as A}from"./Hailuo-CDPCucQa.js";import{F as R}from"./index.es-DOVLdD0a.js";import{bp as T,H as k,ay as B,b7 as L}from"./index-CHmtGf4A.js";import{u as D}from"./uploadTrackerMixin--N-yU8Tl.js";import{a as F}from"./vendor-axios-B8_nURbH.js";import{E as S}from"./index-D97U5eKN.js";import{E as p}from"./index-DLTayQaP.js";import{d as U,H as l,E as t,C as i,F as s,y as a,I as m,J as f,x as b,Q as z,D as n,q as r,M as O,O as N,N as P}from"./vendor-vue-NSDaktjZ.js";import{E as j}from"./index-DhSKHBOv.js";import{E as q}from"./index-C1uViU8O.js";import{a as G,E as H}from"./index-h461vrWW.js";import{E as X}from"./index-Df2QFpv_.js";import{C as Y}from"./CopyToClipboard-DKVOdKXh.js";import{E as J}from"./index-zQVLPgK6.js";import{E as Q}from"./index-CC-bZZSL.js";import{B as Z}from"./BotPlaceholder-BQJ8N2Jf.js";import{T as K}from"./TabSwitcher-XuoN9OvR.js";import{b as W}from"./errorCode-Cqj9Td_Z.js";import"./index-D75kmLap.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./use-form-item-CpZ6Xcgf.js";import"./index-BuyEbX8F.js";import"./typescript-BLCUSKq0.js";import"./index-BktK_7mb.js";import"./_baseClone--7Km2b4u.js";import"./_Uint8Array-DPOcqJZd.js";import"./index-HPhIhg66.js";import"./_initCloneObject-B0D57BXH.js";import"./isEqual-BhXAbDsM.js";import"./validator-95g-IPq0.js";import"./index-z-mp0ifB.js";import"./index-BLjywj98.js";import"./index-6I9U3YPR.js";import"./debounce-B45cyiqt.js";import"./index-C-yvkOm1.js";import"./index-GNSuZNP7.js";import"./strings-beZM2Y-f.js";import"./isPlainObject-B4UwRldP.js";const I=4,x=90,ee=U({name:"FishRecorder",components:{ElButton:S,FontAwesomeIcon:R},emits:["done","cancel","update:script"],data(){return{state:"idle",scriptIndex:0,seconds:0,timerId:0,maxTimerId:0,mediaRecorder:null,stream:null,chunks:[],recordedBlob:null,recordedUrl:"",uploading:!1}},computed:{formattedTime(){const e=Math.floor(this.seconds/60),o=this.seconds%60;return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`},currentScript(){const e=`fish.script.passage${this.scriptIndex%I+1}`;return this.$t(e)}},beforeUnmount(){this.cleanup()},mounted(){this.$emit("update:script",this.currentScript)},methods:{nextScript(){this.scriptIndex=(this.scriptIndex+1)%I,this.$emit("update:script",this.currentScript)},async startRecord(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){p.error(this.$t("fish.message.recorderUnsupported"));return}try{this.stream=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(o){const v=o?.name==="NotAllowedError"||o?.name==="PermissionDeniedError";p.error(this.$t(v?"fish.message.micDenied":"fish.message.micError"));return}this.chunks=[];const e=this.pickMimeType();try{this.mediaRecorder=e?new MediaRecorder(this.stream,{mimeType:e}):new MediaRecorder(this.stream)}catch{this.mediaRecorder=new MediaRecorder(this.stream)}this.mediaRecorder.ondataavailable=o=>{o.data&&o.data.size>0&&this.chunks.push(o.data)},this.mediaRecorder.onstop=()=>{const o=new Blob(this.chunks,{type:this.mediaRecorder?.mimeType||"audio/webm"});this.recordedBlob=o,this.recordedUrl=URL.createObjectURL(o),this.state="recorded",this.releaseStream()},this.mediaRecorder.start(),this.state="recording",this.seconds=0,this.timerId=window.setInterval(()=>{this.seconds++},1e3),this.maxTimerId=window.setTimeout(()=>{this.state==="recording"&&this.stopRecord()},x*1e3)},stopRecord(){this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),window.clearInterval(this.timerId),window.clearTimeout(this.maxTimerId)},reset(){this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl),this.recordedUrl="",this.recordedBlob=null,this.state="idle",this.seconds=0},onCancel(){this.cleanup(),this.$emit("cancel")},cleanup(){this.stopRecord(),this.releaseStream(),this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl)},releaseStream(){this.stream?.getTracks().forEach(e=>e.stop()),this.stream=null},pickMimeType(){const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg"];for(const o of e)if(typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported?.(o))return o},extensionForMime(e){return e.includes("webm")?"webm":e.includes("mp4")?"m4a":e.includes("ogg")?"ogg":e.includes("wav")?"wav":"mp3"},async useRecording(){if(this.recordedBlob){if(this.seconds<3){p.warning(this.$t("fish.message.recordingTooShort"));return}this.uploading=!0;try{const e=this.$store.state.token?.access,o=this.extensionForMime(this.recordedBlob.type||""),v=new File([this.recordedBlob],`recording-${Date.now()}.${o}`,{type:this.recordedBlob.type||"audio/webm"}),h=new FormData;h.append("file",v);const{data:y}=await F.post(`${T()}/api/v1/files/`,h,{headers:{Authorization:`Bearer ${e}`}}),_=y?.file_url;if(!_){p.error(this.$t("fish.message.uploadError"));return}this.$emit("done",{url:_,text:this.currentScript})}catch(e){p.error(this.$t("fish.message.uploadError")),console.error("recorder upload failed",e)}finally{this.uploading=!1}}}}}),oe={class:"recorder"},te={key:0,class:"script"},se={class:"script-header"},ie={class:"label"},re={class:"script-text"},ae={class:"controls"},ne={class:"status"},le={class:"hint"},de={key:1,class:"preview"},ce=["src"],me={class:"preview-actions"},ue={class:"footer"};function pe(e,o,v,h,y,_){const c=n("font-awesome-icon"),d=n("el-button");return r(),l("div",oe,[e.state!=="recorded"?(r(),l("div",te,[t("div",se,[i(c,{icon:"fa-solid fa-book-open",class:"icon mr-1"}),t("span",ie,s(e.$t("fish.description.readScript")),1),i(d,{link:"",size:"small",class:"ml-auto",disabled:e.state==="recording",onClick:e.nextScript},{default:a(()=>[i(c,{icon:"fa-solid fa-shuffle",class:"mr-1"}),m(" "+s(e.$t("fish.button.nextScript")),1)]),_:1},8,["disabled","onClick"])]),t("p",re,s(e.currentScript),1)])):f("",!0),t("div",ae,[e.state==="idle"?(r(),b(d,{key:0,type:"danger",circle:"",size:"large",title:e.$t("fish.button.startRecord"),onClick:e.startRecord},{default:a(()=>[i(c,{icon:"fa-solid fa-microphone"})]),_:1},8,["title","onClick"])):e.state==="recording"?(r(),b(d,{key:1,type:"warning",circle:"",size:"large",title:e.$t("fish.button.stopRecord"),onClick:e.stopRecord},{default:a(()=>[i(c,{icon:"fa-solid fa-stop"})]),_:1},8,["title","onClick"])):f("",!0),t("div",ne,[t("span",{class:z(["timer",e.state==="recording"?"live":""])},s(e.formattedTime),3),t("span",le,s(e.state==="idle"?e.$t("fish.description.recorderIdle"):e.state==="recording"?e.$t("fish.description.recorderRecording"):e.$t("fish.description.recorderRecorded")),1)])]),e.state==="recorded"&&e.recordedUrl?(r(),l("div",de,[t("audio",{src:e.recordedUrl,controls:"",preload:"metadata",class:"w-full"},null,8,ce),t("div",me,[i(d,{size:"small",disabled:e.uploading,onClick:e.reset},{default:a(()=>[i(c,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),m(" "+s(e.$t("fish.button.reRecord")),1)]),_:1},8,["disabled","onClick"]),i(d,{size:"small",type:"primary",loading:e.uploading,onClick:e.useRecording},{default:a(()=>[i(c,{icon:"fa-solid fa-check",class:"mr-1"}),m(" "+s(e.$t("fish.button.useRecording")),1)]),_:1},8,["loading","onClick"])])])):f("",!0),t("div",ue,[i(d,{link:"",size:"small",disabled:e.uploading||e.state==="recording",onClick:e.onCancel},{default:a(()=>[m(s(e.$t("fish.button.cancel")),1)]),_:1},8,["disabled","onClick"])])])}const fe=k(ee,[["render",pe],["__scopeId","data-v-1958e4a1"]]),he=50*1024*1024,M=()=>({title:"",description:"",texts:"",voicesUrl:"",visibility:"unlist",trainMode:"fast",enhanceAudio:!0,generateSample:!1}),ve=U({name:"FishModelConfigPanel",components:{ElButton:S,ElInput:X,ElRadioButton:H,ElRadioGroup:G,ElSwitch:q,ElUpload:j,FontAwesomeIcon:R,Recorder:fe},mixins:[D],emits:["create"],data(){return{form:M(),fileList:[],uploading:!1,creating:!1,recording:!1,textsAuto:!0}},computed:{uploadUrl(){return T()+"/api/v1/files/"},uploadHeaders(){return{Authorization:`Bearer ${this.$store.state.token?.access}`}},canCreate(){return!!this.form.title.trim()&&!!this.form.voicesUrl&&!this.uploading&&!this.creating},supportsRecorder(){return!!(typeof navigator<"u"?navigator.mediaDevices:void 0)?.getUserMedia&&typeof MediaRecorder<"u"}},methods:{onBeforeUpload(e){return e.size>he?(p.warning(this.$t("fish.message.audioSizeExceed")),!1):(this.uploading=!0,!0)},onExceed(){p.warning(this.$t("fish.message.audioOnlyOne"))},onUploadError(){this.uploading=!1,p.error(this.$t("fish.message.uploadError"))},onUploadSuccess(e,o,v){this.uploading=!1;const h=e?.file_url;if(!h){p.error(this.$t("fish.message.uploadError")),this.fileList=[];return}this.form.voicesUrl=h,this.fileList=v},onRecorded(e){this.form.voicesUrl=e.url,this.recording=!1,e.text&&this.textsAuto&&(this.form.texts=e.text)},onStartRecord(){this.recording=!0,this.textsAuto=!this.form.texts.trim()},onScriptChange(e){this.textsAuto&&this.recording&&(this.form.texts=e)},onTextsInput(){this.textsAuto=!1},clearAudio(){this.form.voicesUrl="",this.fileList=[]},onCreate(){const e=this.form.title.trim();if(!e){p.warning(this.$t("fish.message.titleRequired"));return}if(!this.form.voicesUrl){p.warning(this.$t("fish.message.audioRequired"));return}const o={title:e,voices:this.form.voicesUrl,visibility:this.form.visibility,train_mode:this.form.trainMode,enhance_audio_quality:this.form.enhanceAudio,generate_sample:this.form.generateSample};this.form.description.trim()&&(o.description=this.form.description.trim()),this.form.texts.trim()&&(o.texts=[this.form.texts.trim()]),this.creating=!0,this.$emit("create",o),setTimeout(()=>{this.creating=!1,this.form=M(),this.fileList=[]},600)}}}),$e={class:"flex flex-col h-full"},ge={class:"flex-1 overflow-y-auto p-5"},_e={class:"field-block mb-4"},be={class:"title font-bold"},ye={class:"field-block mb-4"},we={class:"flex items-baseline justify-between mb-1"},ke={class:"title font-bold"},Ue={key:0,class:"muted"},Re={class:"hint"},Ce={key:0,class:"audio-actions"},Se={key:1,class:"hint warn"},Ve={key:3,class:"mt-2"},Ee=["src"],Ie={class:"ready-actions"},Me={class:"field-block mb-4"},Te={class:"title font-bold"},Ae={class:"hint"},Be={class:"field-block mb-4"},Le={class:"title font-bold"},De={class:"field-block mb-4"},Fe={class:"title font-bold"},ze={class:"field-block mb-4"},Oe={class:"title font-bold"},Ne={class:"field-block mb-3"},Pe={class:"field-row"},je={class:"title font-bold"},qe={class:"hint mt-0 mb-0"},Ge={class:"field-block mb-2"},He={class:"field-row"},Xe={class:"title font-bold"},Ye={class:"hint mt-0 mb-0"},Je={class:"flex flex-col items-center justify-center px-5 pb-5"};function Qe(e,o,v,h,y,_){const c=n("el-input"),d=n("font-awesome-icon"),$=n("el-button"),g=n("el-upload"),C=n("recorder"),w=n("el-radio-button"),V=n("el-radio-group"),E=n("el-switch");return r(),l("div",$e,[t("div",ge,[t("div",_e,[t("h2",be,[m(s(e.$t("fish.name.voiceTitle"))+" ",1),o[9]||(o[9]=t("span",{class:"required"},"*",-1))]),i(c,{modelValue:e.form.title,"onUpdate:modelValue":o[0]||(o[0]=u=>e.form.title=u),placeholder:e.$t("fish.placeholder.voiceTitle"),maxlength:"60"},null,8,["modelValue","placeholder"])]),t("div",ye,[t("div",we,[t("h2",ke,[m(s(e.$t("fish.name.referenceAudio"))+" ",1),o[10]||(o[10]=t("span",{class:"required"},"*",-1))]),!e.form.voicesUrl&&!e.recording?(r(),l("span",Ue,s(e.$t("fish.description.audioRequired")),1)):f("",!0)]),t("p",Re,s(e.$t("fish.description.uploadAudio")),1),!e.form.voicesUrl&&!e.recording?(r(),l("div",Ce,[i(g,{"file-list":e.fileList,"onUpdate:fileList":o[1]||(o[1]=u=>e.fileList=u),name:"file",limit:1,class:"upload-wrapper",action:e.uploadUrl,accept:".mp3,.wav,.m4a,.ogg,.webm,audio/*","show-file-list":!1,"on-exceed":e.onExceed,"on-error":e.onUploadError,"on-success":e.onUploadSuccess,"before-upload":e.onBeforeUpload,headers:e.uploadHeaders},{default:a(()=>[i($,{type:"primary",plain:"",round:"",loading:e.uploading},{default:a(()=>[i(d,{icon:"fa-solid fa-upload",class:"icon mr-1"}),m(" "+s(e.$t("fish.button.uploadAudio")),1)]),_:1},8,["loading"])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","before-upload","headers"]),i($,{type:"primary",round:"",disabled:!e.supportsRecorder,onClick:e.onStartRecord},{default:a(()=>[i(d,{icon:"fa-solid fa-microphone",class:"icon mr-1"}),m(" "+s(e.$t("fish.button.recordAudio")),1)]),_:1},8,["disabled","onClick"])])):f("",!0),!e.supportsRecorder&&!e.form.voicesUrl&&!e.recording?(r(),l("p",Se,s(e.$t("fish.message.recorderUnsupported")),1)):f("",!0),e.recording?(r(),b(C,{key:2,class:"mt-2",onDone:e.onRecorded,onCancel:o[2]||(o[2]=u=>e.recording=!1),"onUpdate:script":e.onScriptChange},null,8,["onDone","onUpdate:script"])):f("",!0),e.form.voicesUrl&&!e.recording?(r(),l("div",Ve,[t("audio",{src:e.form.voicesUrl,controls:"",preload:"metadata",class:"w-full"},null,8,Ee),t("div",Ie,[i($,{link:"",size:"small",onClick:e.clearAudio},{default:a(()=>[i(d,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),m(" "+s(e.$t("fish.button.replaceAudio")),1)]),_:1},8,["onClick"])])])):f("",!0)]),t("div",Me,[t("h2",Te,s(e.$t("fish.name.audioTexts")),1),t("p",Ae,s(e.$t("fish.description.audioTexts")),1),i(c,{modelValue:e.form.texts,"onUpdate:modelValue":o[3]||(o[3]=u=>e.form.texts=u),type:"textarea",rows:2,placeholder:e.$t("fish.placeholder.audioTexts"),maxlength:"500",onInput:e.onTextsInput},null,8,["modelValue","placeholder","onInput"])]),t("div",Be,[t("h2",Le,s(e.$t("fish.name.voiceDescription")),1),i(c,{modelValue:e.form.description,"onUpdate:modelValue":o[4]||(o[4]=u=>e.form.description=u),type:"textarea",rows:2,placeholder:e.$t("fish.placeholder.voiceDescription"),maxlength:"500"},null,8,["modelValue","placeholder"])]),t("div",De,[t("h2",Fe,s(e.$t("fish.name.visibility")),1),i(V,{modelValue:e.form.visibility,"onUpdate:modelValue":o[5]||(o[5]=u=>e.form.visibility=u),size:"small"},{default:a(()=>[i(w,{label:"private",value:"private"},{default:a(()=>[m(s(e.$t("fish.value.private")),1)]),_:1}),i(w,{label:"unlist",value:"unlist"},{default:a(()=>[m(s(e.$t("fish.value.unlist")),1)]),_:1}),i(w,{label:"public",value:"public"},{default:a(()=>[m(s(e.$t("fish.value.public")),1)]),_:1})]),_:1},8,["modelValue"])]),t("div",ze,[t("h2",Oe,s(e.$t("fish.name.trainMode")),1),i(V,{modelValue:e.form.trainMode,"onUpdate:modelValue":o[6]||(o[6]=u=>e.form.trainMode=u),size:"small"},{default:a(()=>[i(w,{label:"fast",value:"fast"},{default:a(()=>[m(s(e.$t("fish.value.trainModeFast")),1)]),_:1}),i(w,{label:"precise",value:"precise"},{default:a(()=>[m(s(e.$t("fish.value.trainModePrecise")),1)]),_:1})]),_:1},8,["modelValue"])]),t("div",Ne,[t("div",Pe,[t("h2",je,s(e.$t("fish.name.enhanceAudio")),1),i(E,{modelValue:e.form.enhanceAudio,"onUpdate:modelValue":o[7]||(o[7]=u=>e.form.enhanceAudio=u)},null,8,["modelValue"])]),t("p",qe,s(e.$t("fish.description.enhanceAudio")),1)]),t("div",Ge,[t("div",He,[t("h2",Xe,s(e.$t("fish.name.generateSample")),1),i(E,{modelValue:e.form.generateSample,"onUpdate:modelValue":o[8]||(o[8]=u=>e.form.generateSample=u)},null,8,["modelValue"])]),t("p",Ye,s(e.$t("fish.description.generateSample")),1)])]),t("div",Je,[i($,{type:"primary",class:"btn w-full",round:"",disabled:!e.canCreate||e.creating,loading:e.creating,onClick:e.onCreate},{default:a(()=>[i(d,{icon:"fa-solid fa-magic",class:"mr-2"}),m(" "+s(e.$t("fish.button.createModel")),1)]),_:1},8,["disabled","loading","onClick"])])])}const Ze=k(ve,[["render",Qe],["__scopeId","data-v-d8fc0e55"]]),Ke=U({name:"FishVoiceCard",components:{ElAlert:Q,ElButton:S,ElImage:J,CopyToClipboard:Y,FontAwesomeIcon:R},props:{modelValue:{type:Object,required:!0}},computed:{sampleAudioUrl(){const e=this.modelValue?.samples;if(e?.length)return e[0]?.audio},voiceId(){const e=this.modelValue;return(e?.id||e?._id||e?.reference_id||"").toString()},coverSrc(){const e=this.modelValue?.cover_image;return e&&typeof e=="string"?e:void 0},createdAtLabel(){const e=this.modelValue?.created_at;if(e==null||e==="")return null;const o=typeof e=="number"?e:parseFloat(String(e));return!Number.isFinite(o)||o<=0?null:this.$dayjs.format(""+new Date(o*1e3))}},methods:{onUseVoice(){const e=this.voiceId;e&&(this.$store.commit("fish/setConfig",{...this.$store.state.fish?.config,reference_id:e}),this.$router.push({name:B}))}}}),We={class:"card"},xe={class:"left"},eo={class:"main"},oo={class:"header"},to={class:"title"},so={key:0,class:"datetime"},io={key:0,class:"description"},ro={key:1,class:"sample mt-2"},ao=["src"],no={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},lo={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},co={class:"operations mt-2"};function mo(e,o,v,h,y,_){const c=n("el-image"),d=n("font-awesome-icon"),$=n("copy-to-clipboard"),g=n("el-alert"),C=n("el-button");return r(),l("div",We,[t("div",xe,[e.coverSrc?(r(),b(c,{key:0,src:e.coverSrc,class:"cover",fit:"cover"},{error:a(()=>[i(c,{src:"https://cdn.acedata.cloud/e40fccc727.png",class:"cover fallback",fit:"cover"})]),placeholder:a(()=>[...o[0]||(o[0]=[t("div",{class:"cover placeholder"},null,-1)])]),_:1},8,["src"])):(r(),b(c,{key:1,src:"https://cdn.acedata.cloud/e40fccc727.png",class:"cover fallback",fit:"cover"}))]),t("div",eo,[t("div",oo,[t("span",to,s(e.modelValue?.title||e.$t("fish.name.untitledVoice")),1),e.createdAtLabel?(r(),l("span",so,s(e.createdAtLabel),1)):f("",!0)]),e.modelValue?.description?(r(),l("p",io,s(e.modelValue?.description),1)):f("",!0),e.sampleAudioUrl?(r(),l("div",ro,[t("audio",{src:e.sampleAudioUrl,controls:"",preload:"metadata",class:"w-full"},null,8,ao)])):f("",!0),i(g,{closable:!1,class:"mt-2 success"},{default:a(()=>[e.voiceId?(r(),l("p",no,[i(d,{icon:"fa-solid fa-microphone",class:"mr-1"}),m(" "+s(e.$t("fish.name.referenceId"))+": "+s(e.voiceId)+" ",1),i($,{content:e.voiceId},null,8,["content"])])):f("",!0),e.modelValue?.visibility?(r(),l("p",lo,[i(d,{icon:"fa-solid fa-eye",class:"mr-1"}),m(" "+s(e.$t("fish.name.visibility"))+": "+s(e.modelValue?.visibility),1)])):f("",!0)]),_:1}),t("div",co,[i(C,{type:"primary",size:"small",plain:"",disabled:!e.voiceId,onClick:O(e.onUseVoice,["stop"])},{default:a(()=>[i(d,{icon:"fa-solid fa-volume-high",class:"mr-1"}),m(" "+s(e.$t("fish.button.useVoice")),1)]),_:1},8,["disabled","onClick"])])])])}const uo=k(Ke,[["render",mo],["__scopeId","data-v-629e2d04"]]),po=U({name:"FishModelListPanel",components:{VoiceCard:uo,BotPlaceholder:Z,FontAwesomeIcon:R},props:{loading:{type:Boolean,default:!1}},computed:{voices(){return this.$store.state.fish?.voices}}}),fo={class:"model-list-panel flex flex-col h-full"},ho={class:"header"},vo={class:"title"},$o={key:0,class:"count"},go={class:"body flex-1 min-h-0"},_o={key:0,class:"h-full"},bo={key:1,class:"w-full h-full flex flex-col items-center justify-center text-center px-6"},yo={class:"empty-title"},wo={class:"empty-hint"},ko={key:2,class:"w-full h-full overflow-y-auto pr-1"};function Uo(e,o,v,h,y,_){const c=n("bot-placeholder"),d=n("font-awesome-icon"),$=n("voice-card");return r(),l("div",fo,[t("header",ho,[t("h2",vo,s(e.$t("fish.title.myVoices")),1),e.voices?.length?(r(),l("span",$o,s(e.voices?.length),1)):f("",!0)]),t("div",go,[e.voices===void 0?(r(),l("div",_o,[i(c)])):e.voices.length===0?(r(),l("div",bo,[i(d,{icon:"fa-solid fa-microphone-lines",class:"empty-icon"}),t("p",yo,s(e.$t("fish.title.noVoicesYet")),1),t("p",wo,s(e.$t("fish.description.noVoicesYet")),1)])):(r(),l("div",ko,[(r(!0),l(N,null,P(e.voices,g=>(r(),b($,{key:g.id,"model-value":g},null,8,["model-value"]))),128))]))])])}const Ro=k(po,[["render",Uo],["__scopeId","data-v-4aab2294"]]),Co=U({name:"FishModelIndex",components:{ModelConfigPanel:Ze,Layout:A,ModelListPanel:Ro,TabSwitcher:K},inject:["initialized"],data(){return{loading:!1}},computed:{credential(){return this.$store.state.fish?.credential}},watch:{initialized:{async handler(e){e&&await this.onGetVoices()},immediate:!0}},async mounted(){await this.onGetService()},methods:{async onGetService(){await this.$store.dispatch("fish/getService")},async onGetVoices(){await this.$store.dispatch("fish/getVoices")},async onCreate(e){const o=this.credential?.token;if(!o){console.error("no token specified");return}this.loading=!0,p.info(this.$t("fish.message.creatingModel"));try{await L.createModel(e,{token:o}),p.success(this.$t("fish.message.createModelSuccess")),await this.onGetVoices()}catch(v){const h=v?.response?.data;h?.error?.code===W?p.error(this.$t("fish.message.usedUp")):p.error(h?.error?.message||this.$t("fish.message.createModelFailed"))}finally{this.loading=!1}}}}),So={class:"flex flex-col h-full"},Vo={class:"flex-1 min-h-0"};function Eo(e,o,v,h,y,_){const c=n("tab-switcher"),d=n("model-config-panel"),$=n("model-list-panel"),g=n("layout");return r(),b(g,null,{config:a(()=>[t("div",So,[i(c),t("div",Vo,[i(d,{onCreate:e.onCreate},null,8,["onCreate"])])])]),result:a(()=>[i($,{loading:e.loading},null,8,["loading"])]),_:1})}const ht=k(Co,[["render",Eo]]);export{ht as default};
1
+ import{L as A}from"./Hailuo-BsGaxbRH.js";import{F as R}from"./index.es-D8MU6eMk.js";import{bp as T,H as k,ay as B,b7 as L}from"./index-B5267oqA.js";import{u as D}from"./uploadTrackerMixin--N-yU8Tl.js";import{a as F}from"./vendor-axios-B8_nURbH.js";import{E as S}from"./index-DbBDYLLC.js";import{E as p}from"./index-CCwWrfc4.js";import{d as U,H as l,E as t,C as i,F as s,y as a,I as m,J as f,x as b,Q as z,D as n,q as r,M as O,O as N,N as P}from"./vendor-vue-NSDaktjZ.js";import{E as j}from"./index-bs2QXOh6.js";import{E as q}from"./index-D3Pn_CC4.js";import{a as G,E as H}from"./index-DfAn9V8y.js";import{E as X}from"./index-CQayeKqY.js";import{C as Y}from"./CopyToClipboard-g4vBpWAA.js";import{E as J}from"./index-Bf3A60rN.js";import{E as Q}from"./index-B5jo7NY3.js";import{B as Z}from"./BotPlaceholder-DpiZEQow.js";import{T as K}from"./TabSwitcher-2PjIQYYE.js";import{b as W}from"./errorCode-Cqj9Td_Z.js";import"./index-C09FcKq9.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./use-form-item-CAmCDDpm.js";import"./index-BuyEbX8F.js";import"./typescript-GHEyAG9P.js";import"./index-Tga9YfTB.js";import"./_baseClone-BEl0SBVQ.js";import"./_Uint8Array-pk5G6DXb.js";import"./index-C94_tKkM.js";import"./_initCloneObject-7jYqtSMb.js";import"./isEqual-Dh50OCem.js";import"./validator-BY6D6xjR.js";import"./index-DVPxXPIi.js";import"./index-BLjywj98.js";import"./index-CzL5AhXP.js";import"./debounce-DBeMKn11.js";import"./index-68NaTtAT.js";import"./index-BM3sPBDY.js";import"./strings-beZM2Y-f.js";import"./isPlainObject-dMdaxYmL.js";const I=4,x=90,ee=U({name:"FishRecorder",components:{ElButton:S,FontAwesomeIcon:R},emits:["done","cancel","update:script"],data(){return{state:"idle",scriptIndex:0,seconds:0,timerId:0,maxTimerId:0,mediaRecorder:null,stream:null,chunks:[],recordedBlob:null,recordedUrl:"",uploading:!1}},computed:{formattedTime(){const e=Math.floor(this.seconds/60),o=this.seconds%60;return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`},currentScript(){const e=`fish.script.passage${this.scriptIndex%I+1}`;return this.$t(e)}},beforeUnmount(){this.cleanup()},mounted(){this.$emit("update:script",this.currentScript)},methods:{nextScript(){this.scriptIndex=(this.scriptIndex+1)%I,this.$emit("update:script",this.currentScript)},async startRecord(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){p.error(this.$t("fish.message.recorderUnsupported"));return}try{this.stream=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(o){const v=o?.name==="NotAllowedError"||o?.name==="PermissionDeniedError";p.error(this.$t(v?"fish.message.micDenied":"fish.message.micError"));return}this.chunks=[];const e=this.pickMimeType();try{this.mediaRecorder=e?new MediaRecorder(this.stream,{mimeType:e}):new MediaRecorder(this.stream)}catch{this.mediaRecorder=new MediaRecorder(this.stream)}this.mediaRecorder.ondataavailable=o=>{o.data&&o.data.size>0&&this.chunks.push(o.data)},this.mediaRecorder.onstop=()=>{const o=new Blob(this.chunks,{type:this.mediaRecorder?.mimeType||"audio/webm"});this.recordedBlob=o,this.recordedUrl=URL.createObjectURL(o),this.state="recorded",this.releaseStream()},this.mediaRecorder.start(),this.state="recording",this.seconds=0,this.timerId=window.setInterval(()=>{this.seconds++},1e3),this.maxTimerId=window.setTimeout(()=>{this.state==="recording"&&this.stopRecord()},x*1e3)},stopRecord(){this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),window.clearInterval(this.timerId),window.clearTimeout(this.maxTimerId)},reset(){this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl),this.recordedUrl="",this.recordedBlob=null,this.state="idle",this.seconds=0},onCancel(){this.cleanup(),this.$emit("cancel")},cleanup(){this.stopRecord(),this.releaseStream(),this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl)},releaseStream(){this.stream?.getTracks().forEach(e=>e.stop()),this.stream=null},pickMimeType(){const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg"];for(const o of e)if(typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported?.(o))return o},extensionForMime(e){return e.includes("webm")?"webm":e.includes("mp4")?"m4a":e.includes("ogg")?"ogg":e.includes("wav")?"wav":"mp3"},async useRecording(){if(this.recordedBlob){if(this.seconds<3){p.warning(this.$t("fish.message.recordingTooShort"));return}this.uploading=!0;try{const e=this.$store.state.token?.access,o=this.extensionForMime(this.recordedBlob.type||""),v=new File([this.recordedBlob],`recording-${Date.now()}.${o}`,{type:this.recordedBlob.type||"audio/webm"}),h=new FormData;h.append("file",v);const{data:y}=await F.post(`${T()}/api/v1/files/`,h,{headers:{Authorization:`Bearer ${e}`}}),_=y?.file_url;if(!_){p.error(this.$t("fish.message.uploadError"));return}this.$emit("done",{url:_,text:this.currentScript})}catch(e){p.error(this.$t("fish.message.uploadError")),console.error("recorder upload failed",e)}finally{this.uploading=!1}}}}}),oe={class:"recorder"},te={key:0,class:"script"},se={class:"script-header"},ie={class:"label"},re={class:"script-text"},ae={class:"controls"},ne={class:"status"},le={class:"hint"},de={key:1,class:"preview"},ce=["src"],me={class:"preview-actions"},ue={class:"footer"};function pe(e,o,v,h,y,_){const c=n("font-awesome-icon"),d=n("el-button");return r(),l("div",oe,[e.state!=="recorded"?(r(),l("div",te,[t("div",se,[i(c,{icon:"fa-solid fa-book-open",class:"icon mr-1"}),t("span",ie,s(e.$t("fish.description.readScript")),1),i(d,{link:"",size:"small",class:"ml-auto",disabled:e.state==="recording",onClick:e.nextScript},{default:a(()=>[i(c,{icon:"fa-solid fa-shuffle",class:"mr-1"}),m(" "+s(e.$t("fish.button.nextScript")),1)]),_:1},8,["disabled","onClick"])]),t("p",re,s(e.currentScript),1)])):f("",!0),t("div",ae,[e.state==="idle"?(r(),b(d,{key:0,type:"danger",circle:"",size:"large",title:e.$t("fish.button.startRecord"),onClick:e.startRecord},{default:a(()=>[i(c,{icon:"fa-solid fa-microphone"})]),_:1},8,["title","onClick"])):e.state==="recording"?(r(),b(d,{key:1,type:"warning",circle:"",size:"large",title:e.$t("fish.button.stopRecord"),onClick:e.stopRecord},{default:a(()=>[i(c,{icon:"fa-solid fa-stop"})]),_:1},8,["title","onClick"])):f("",!0),t("div",ne,[t("span",{class:z(["timer",e.state==="recording"?"live":""])},s(e.formattedTime),3),t("span",le,s(e.state==="idle"?e.$t("fish.description.recorderIdle"):e.state==="recording"?e.$t("fish.description.recorderRecording"):e.$t("fish.description.recorderRecorded")),1)])]),e.state==="recorded"&&e.recordedUrl?(r(),l("div",de,[t("audio",{src:e.recordedUrl,controls:"",preload:"metadata",class:"w-full"},null,8,ce),t("div",me,[i(d,{size:"small",disabled:e.uploading,onClick:e.reset},{default:a(()=>[i(c,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),m(" "+s(e.$t("fish.button.reRecord")),1)]),_:1},8,["disabled","onClick"]),i(d,{size:"small",type:"primary",loading:e.uploading,onClick:e.useRecording},{default:a(()=>[i(c,{icon:"fa-solid fa-check",class:"mr-1"}),m(" "+s(e.$t("fish.button.useRecording")),1)]),_:1},8,["loading","onClick"])])])):f("",!0),t("div",ue,[i(d,{link:"",size:"small",disabled:e.uploading||e.state==="recording",onClick:e.onCancel},{default:a(()=>[m(s(e.$t("fish.button.cancel")),1)]),_:1},8,["disabled","onClick"])])])}const fe=k(ee,[["render",pe],["__scopeId","data-v-1958e4a1"]]),he=50*1024*1024,M=()=>({title:"",description:"",texts:"",voicesUrl:"",visibility:"unlist",trainMode:"fast",enhanceAudio:!0,generateSample:!1}),ve=U({name:"FishModelConfigPanel",components:{ElButton:S,ElInput:X,ElRadioButton:H,ElRadioGroup:G,ElSwitch:q,ElUpload:j,FontAwesomeIcon:R,Recorder:fe},mixins:[D],emits:["create"],data(){return{form:M(),fileList:[],uploading:!1,creating:!1,recording:!1,textsAuto:!0}},computed:{uploadUrl(){return T()+"/api/v1/files/"},uploadHeaders(){return{Authorization:`Bearer ${this.$store.state.token?.access}`}},canCreate(){return!!this.form.title.trim()&&!!this.form.voicesUrl&&!this.uploading&&!this.creating},supportsRecorder(){return!!(typeof navigator<"u"?navigator.mediaDevices:void 0)?.getUserMedia&&typeof MediaRecorder<"u"}},methods:{onBeforeUpload(e){return e.size>he?(p.warning(this.$t("fish.message.audioSizeExceed")),!1):(this.uploading=!0,!0)},onExceed(){p.warning(this.$t("fish.message.audioOnlyOne"))},onUploadError(){this.uploading=!1,p.error(this.$t("fish.message.uploadError"))},onUploadSuccess(e,o,v){this.uploading=!1;const h=e?.file_url;if(!h){p.error(this.$t("fish.message.uploadError")),this.fileList=[];return}this.form.voicesUrl=h,this.fileList=v},onRecorded(e){this.form.voicesUrl=e.url,this.recording=!1,e.text&&this.textsAuto&&(this.form.texts=e.text)},onStartRecord(){this.recording=!0,this.textsAuto=!this.form.texts.trim()},onScriptChange(e){this.textsAuto&&this.recording&&(this.form.texts=e)},onTextsInput(){this.textsAuto=!1},clearAudio(){this.form.voicesUrl="",this.fileList=[]},onCreate(){const e=this.form.title.trim();if(!e){p.warning(this.$t("fish.message.titleRequired"));return}if(!this.form.voicesUrl){p.warning(this.$t("fish.message.audioRequired"));return}const o={title:e,voices:this.form.voicesUrl,visibility:this.form.visibility,train_mode:this.form.trainMode,enhance_audio_quality:this.form.enhanceAudio,generate_sample:this.form.generateSample};this.form.description.trim()&&(o.description=this.form.description.trim()),this.form.texts.trim()&&(o.texts=[this.form.texts.trim()]),this.creating=!0,this.$emit("create",o),setTimeout(()=>{this.creating=!1,this.form=M(),this.fileList=[]},600)}}}),$e={class:"flex flex-col h-full"},ge={class:"flex-1 overflow-y-auto p-5"},_e={class:"field-block mb-4"},be={class:"title font-bold"},ye={class:"field-block mb-4"},we={class:"flex items-baseline justify-between mb-1"},ke={class:"title font-bold"},Ue={key:0,class:"muted"},Re={class:"hint"},Ce={key:0,class:"audio-actions"},Se={key:1,class:"hint warn"},Ve={key:3,class:"mt-2"},Ee=["src"],Ie={class:"ready-actions"},Me={class:"field-block mb-4"},Te={class:"title font-bold"},Ae={class:"hint"},Be={class:"field-block mb-4"},Le={class:"title font-bold"},De={class:"field-block mb-4"},Fe={class:"title font-bold"},ze={class:"field-block mb-4"},Oe={class:"title font-bold"},Ne={class:"field-block mb-3"},Pe={class:"field-row"},je={class:"title font-bold"},qe={class:"hint mt-0 mb-0"},Ge={class:"field-block mb-2"},He={class:"field-row"},Xe={class:"title font-bold"},Ye={class:"hint mt-0 mb-0"},Je={class:"flex flex-col items-center justify-center px-5 pb-5"};function Qe(e,o,v,h,y,_){const c=n("el-input"),d=n("font-awesome-icon"),$=n("el-button"),g=n("el-upload"),C=n("recorder"),w=n("el-radio-button"),V=n("el-radio-group"),E=n("el-switch");return r(),l("div",$e,[t("div",ge,[t("div",_e,[t("h2",be,[m(s(e.$t("fish.name.voiceTitle"))+" ",1),o[9]||(o[9]=t("span",{class:"required"},"*",-1))]),i(c,{modelValue:e.form.title,"onUpdate:modelValue":o[0]||(o[0]=u=>e.form.title=u),placeholder:e.$t("fish.placeholder.voiceTitle"),maxlength:"60"},null,8,["modelValue","placeholder"])]),t("div",ye,[t("div",we,[t("h2",ke,[m(s(e.$t("fish.name.referenceAudio"))+" ",1),o[10]||(o[10]=t("span",{class:"required"},"*",-1))]),!e.form.voicesUrl&&!e.recording?(r(),l("span",Ue,s(e.$t("fish.description.audioRequired")),1)):f("",!0)]),t("p",Re,s(e.$t("fish.description.uploadAudio")),1),!e.form.voicesUrl&&!e.recording?(r(),l("div",Ce,[i(g,{"file-list":e.fileList,"onUpdate:fileList":o[1]||(o[1]=u=>e.fileList=u),name:"file",limit:1,class:"upload-wrapper",action:e.uploadUrl,accept:".mp3,.wav,.m4a,.ogg,.webm,audio/*","show-file-list":!1,"on-exceed":e.onExceed,"on-error":e.onUploadError,"on-success":e.onUploadSuccess,"before-upload":e.onBeforeUpload,headers:e.uploadHeaders},{default:a(()=>[i($,{type:"primary",plain:"",round:"",loading:e.uploading},{default:a(()=>[i(d,{icon:"fa-solid fa-upload",class:"icon mr-1"}),m(" "+s(e.$t("fish.button.uploadAudio")),1)]),_:1},8,["loading"])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","before-upload","headers"]),i($,{type:"primary",round:"",disabled:!e.supportsRecorder,onClick:e.onStartRecord},{default:a(()=>[i(d,{icon:"fa-solid fa-microphone",class:"icon mr-1"}),m(" "+s(e.$t("fish.button.recordAudio")),1)]),_:1},8,["disabled","onClick"])])):f("",!0),!e.supportsRecorder&&!e.form.voicesUrl&&!e.recording?(r(),l("p",Se,s(e.$t("fish.message.recorderUnsupported")),1)):f("",!0),e.recording?(r(),b(C,{key:2,class:"mt-2",onDone:e.onRecorded,onCancel:o[2]||(o[2]=u=>e.recording=!1),"onUpdate:script":e.onScriptChange},null,8,["onDone","onUpdate:script"])):f("",!0),e.form.voicesUrl&&!e.recording?(r(),l("div",Ve,[t("audio",{src:e.form.voicesUrl,controls:"",preload:"metadata",class:"w-full"},null,8,Ee),t("div",Ie,[i($,{link:"",size:"small",onClick:e.clearAudio},{default:a(()=>[i(d,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),m(" "+s(e.$t("fish.button.replaceAudio")),1)]),_:1},8,["onClick"])])])):f("",!0)]),t("div",Me,[t("h2",Te,s(e.$t("fish.name.audioTexts")),1),t("p",Ae,s(e.$t("fish.description.audioTexts")),1),i(c,{modelValue:e.form.texts,"onUpdate:modelValue":o[3]||(o[3]=u=>e.form.texts=u),type:"textarea",rows:2,placeholder:e.$t("fish.placeholder.audioTexts"),maxlength:"500",onInput:e.onTextsInput},null,8,["modelValue","placeholder","onInput"])]),t("div",Be,[t("h2",Le,s(e.$t("fish.name.voiceDescription")),1),i(c,{modelValue:e.form.description,"onUpdate:modelValue":o[4]||(o[4]=u=>e.form.description=u),type:"textarea",rows:2,placeholder:e.$t("fish.placeholder.voiceDescription"),maxlength:"500"},null,8,["modelValue","placeholder"])]),t("div",De,[t("h2",Fe,s(e.$t("fish.name.visibility")),1),i(V,{modelValue:e.form.visibility,"onUpdate:modelValue":o[5]||(o[5]=u=>e.form.visibility=u),size:"small"},{default:a(()=>[i(w,{label:"private",value:"private"},{default:a(()=>[m(s(e.$t("fish.value.private")),1)]),_:1}),i(w,{label:"unlist",value:"unlist"},{default:a(()=>[m(s(e.$t("fish.value.unlist")),1)]),_:1}),i(w,{label:"public",value:"public"},{default:a(()=>[m(s(e.$t("fish.value.public")),1)]),_:1})]),_:1},8,["modelValue"])]),t("div",ze,[t("h2",Oe,s(e.$t("fish.name.trainMode")),1),i(V,{modelValue:e.form.trainMode,"onUpdate:modelValue":o[6]||(o[6]=u=>e.form.trainMode=u),size:"small"},{default:a(()=>[i(w,{label:"fast",value:"fast"},{default:a(()=>[m(s(e.$t("fish.value.trainModeFast")),1)]),_:1}),i(w,{label:"precise",value:"precise"},{default:a(()=>[m(s(e.$t("fish.value.trainModePrecise")),1)]),_:1})]),_:1},8,["modelValue"])]),t("div",Ne,[t("div",Pe,[t("h2",je,s(e.$t("fish.name.enhanceAudio")),1),i(E,{modelValue:e.form.enhanceAudio,"onUpdate:modelValue":o[7]||(o[7]=u=>e.form.enhanceAudio=u)},null,8,["modelValue"])]),t("p",qe,s(e.$t("fish.description.enhanceAudio")),1)]),t("div",Ge,[t("div",He,[t("h2",Xe,s(e.$t("fish.name.generateSample")),1),i(E,{modelValue:e.form.generateSample,"onUpdate:modelValue":o[8]||(o[8]=u=>e.form.generateSample=u)},null,8,["modelValue"])]),t("p",Ye,s(e.$t("fish.description.generateSample")),1)])]),t("div",Je,[i($,{type:"primary",class:"btn w-full",round:"",disabled:!e.canCreate||e.creating,loading:e.creating,onClick:e.onCreate},{default:a(()=>[i(d,{icon:"fa-solid fa-magic",class:"mr-2"}),m(" "+s(e.$t("fish.button.createModel")),1)]),_:1},8,["disabled","loading","onClick"])])])}const Ze=k(ve,[["render",Qe],["__scopeId","data-v-d8fc0e55"]]),Ke=U({name:"FishVoiceCard",components:{ElAlert:Q,ElButton:S,ElImage:J,CopyToClipboard:Y,FontAwesomeIcon:R},props:{modelValue:{type:Object,required:!0}},computed:{sampleAudioUrl(){const e=this.modelValue?.samples;if(e?.length)return e[0]?.audio},voiceId(){const e=this.modelValue;return(e?.id||e?._id||e?.reference_id||"").toString()},coverSrc(){const e=this.modelValue?.cover_image;return e&&typeof e=="string"?e:void 0},createdAtLabel(){const e=this.modelValue?.created_at;if(e==null||e==="")return null;const o=typeof e=="number"?e:parseFloat(String(e));return!Number.isFinite(o)||o<=0?null:this.$dayjs.format(""+new Date(o*1e3))}},methods:{onUseVoice(){const e=this.voiceId;e&&(this.$store.commit("fish/setConfig",{...this.$store.state.fish?.config,reference_id:e}),this.$router.push({name:B}))}}}),We={class:"card"},xe={class:"left"},eo={class:"main"},oo={class:"header"},to={class:"title"},so={key:0,class:"datetime"},io={key:0,class:"description"},ro={key:1,class:"sample mt-2"},ao=["src"],no={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},lo={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},co={class:"operations mt-2"};function mo(e,o,v,h,y,_){const c=n("el-image"),d=n("font-awesome-icon"),$=n("copy-to-clipboard"),g=n("el-alert"),C=n("el-button");return r(),l("div",We,[t("div",xe,[e.coverSrc?(r(),b(c,{key:0,src:e.coverSrc,class:"cover",fit:"cover"},{error:a(()=>[i(c,{src:"https://cdn.acedata.cloud/e40fccc727.png",class:"cover fallback",fit:"cover"})]),placeholder:a(()=>[...o[0]||(o[0]=[t("div",{class:"cover placeholder"},null,-1)])]),_:1},8,["src"])):(r(),b(c,{key:1,src:"https://cdn.acedata.cloud/e40fccc727.png",class:"cover fallback",fit:"cover"}))]),t("div",eo,[t("div",oo,[t("span",to,s(e.modelValue?.title||e.$t("fish.name.untitledVoice")),1),e.createdAtLabel?(r(),l("span",so,s(e.createdAtLabel),1)):f("",!0)]),e.modelValue?.description?(r(),l("p",io,s(e.modelValue?.description),1)):f("",!0),e.sampleAudioUrl?(r(),l("div",ro,[t("audio",{src:e.sampleAudioUrl,controls:"",preload:"metadata",class:"w-full"},null,8,ao)])):f("",!0),i(g,{closable:!1,class:"mt-2 success"},{default:a(()=>[e.voiceId?(r(),l("p",no,[i(d,{icon:"fa-solid fa-microphone",class:"mr-1"}),m(" "+s(e.$t("fish.name.referenceId"))+": "+s(e.voiceId)+" ",1),i($,{content:e.voiceId},null,8,["content"])])):f("",!0),e.modelValue?.visibility?(r(),l("p",lo,[i(d,{icon:"fa-solid fa-eye",class:"mr-1"}),m(" "+s(e.$t("fish.name.visibility"))+": "+s(e.modelValue?.visibility),1)])):f("",!0)]),_:1}),t("div",co,[i(C,{type:"primary",size:"small",plain:"",disabled:!e.voiceId,onClick:O(e.onUseVoice,["stop"])},{default:a(()=>[i(d,{icon:"fa-solid fa-volume-high",class:"mr-1"}),m(" "+s(e.$t("fish.button.useVoice")),1)]),_:1},8,["disabled","onClick"])])])])}const uo=k(Ke,[["render",mo],["__scopeId","data-v-629e2d04"]]),po=U({name:"FishModelListPanel",components:{VoiceCard:uo,BotPlaceholder:Z,FontAwesomeIcon:R},props:{loading:{type:Boolean,default:!1}},computed:{voices(){return this.$store.state.fish?.voices}}}),fo={class:"model-list-panel flex flex-col h-full"},ho={class:"header"},vo={class:"title"},$o={key:0,class:"count"},go={class:"body flex-1 min-h-0"},_o={key:0,class:"h-full"},bo={key:1,class:"w-full h-full flex flex-col items-center justify-center text-center px-6"},yo={class:"empty-title"},wo={class:"empty-hint"},ko={key:2,class:"w-full h-full overflow-y-auto pr-1"};function Uo(e,o,v,h,y,_){const c=n("bot-placeholder"),d=n("font-awesome-icon"),$=n("voice-card");return r(),l("div",fo,[t("header",ho,[t("h2",vo,s(e.$t("fish.title.myVoices")),1),e.voices?.length?(r(),l("span",$o,s(e.voices?.length),1)):f("",!0)]),t("div",go,[e.voices===void 0?(r(),l("div",_o,[i(c)])):e.voices.length===0?(r(),l("div",bo,[i(d,{icon:"fa-solid fa-microphone-lines",class:"empty-icon"}),t("p",yo,s(e.$t("fish.title.noVoicesYet")),1),t("p",wo,s(e.$t("fish.description.noVoicesYet")),1)])):(r(),l("div",ko,[(r(!0),l(N,null,P(e.voices,g=>(r(),b($,{key:g.id,"model-value":g},null,8,["model-value"]))),128))]))])])}const Ro=k(po,[["render",Uo],["__scopeId","data-v-4aab2294"]]),Co=U({name:"FishModelIndex",components:{ModelConfigPanel:Ze,Layout:A,ModelListPanel:Ro,TabSwitcher:K},inject:["initialized"],data(){return{loading:!1}},computed:{credential(){return this.$store.state.fish?.credential}},watch:{initialized:{async handler(e){e&&await this.onGetVoices()},immediate:!0}},async mounted(){await this.onGetService()},methods:{async onGetService(){await this.$store.dispatch("fish/getService")},async onGetVoices(){await this.$store.dispatch("fish/getVoices")},async onCreate(e){const o=this.credential?.token;if(!o){console.error("no token specified");return}this.loading=!0,p.info(this.$t("fish.message.creatingModel"));try{await L.createModel(e,{token:o}),p.success(this.$t("fish.message.createModelSuccess")),await this.onGetVoices()}catch(v){const h=v?.response?.data;h?.error?.code===W?p.error(this.$t("fish.message.usedUp")):p.error(h?.error?.message||this.$t("fish.message.createModelFailed"))}finally{this.loading=!1}}}}),So={class:"flex flex-col h-full"},Vo={class:"flex-1 min-h-0"};function Eo(e,o,v,h,y,_){const c=n("tab-switcher"),d=n("model-config-panel"),$=n("model-list-panel"),g=n("layout");return r(),b(g,null,{config:a(()=>[t("div",So,[i(c),t("div",Vo,[i(d,{onCreate:e.onCreate},null,8,["onCreate"])])])]),result:a(()=>[i($,{loading:e.loading},null,8,["loading"])]),_:1})}const ht=k(Co,[["render",Eo]]);export{ht as default};