@acedatacloud/nexior 3.362.3 → 3.362.4

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 (330) hide show
  1. package/dist/assets/{ApiCodeButton-DmY8v9e5.js → ApiCodeButton-BA7mDSbv.js} +1 -1
  2. package/dist/assets/{ApiCodeDialog-ZrQ31cdo.js → ApiCodeDialog-BsRU8WFT.js} +2 -2
  3. package/dist/assets/{Artifacts-DU30PrbA.js → Artifacts-DJBH37uq.js} +1 -1
  4. package/dist/assets/{AskUserQuestionCard-BSkNo5B6.js → AskUserQuestionCard-DjYhfs68.js} +1 -1
  5. package/dist/assets/{AudioPreview-BQFSqic6.js → AudioPreview-4SXEbJja.js} +1 -1
  6. package/dist/assets/{Auth-CSMtUyQe.js → Auth-BOif7xOO.js} +1 -1
  7. package/dist/assets/{Bare-dYKCOh3p.js → Bare-B5Gm4K8P.js} +1 -1
  8. package/dist/assets/{BotPlaceholder-LUNR8KA6.js → BotPlaceholder-C--FHvts.js} +1 -1
  9. package/dist/assets/{BottomFooter-DKo3fulF.js → BottomFooter-Diy1dxTR.js} +1 -1
  10. package/dist/assets/{BrowseConnectors-wm70T8Et.js → BrowseConnectors-BfZCwj7s.js} +1 -1
  11. package/dist/assets/{BrowserPairingDialog-DhsWaXHL.js → BrowserPairingDialog-CwcFHrVH.js} +1 -1
  12. package/dist/assets/{Callback-C4nsgWym.js → Callback-DUubRo9v.js} +1 -1
  13. package/dist/assets/{CodeSnippet-CSaU41R9.js → CodeSnippet-B0neSlgP.js} +1 -1
  14. package/dist/assets/Console-D8pv2zPD.js +1 -0
  15. package/dist/assets/{Consumption-DeigvrPq.js → Consumption-BK4nImFR.js} +1 -1
  16. package/dist/assets/{Conversation-BxOLEd_B.js → Conversation-BXtScsLN.js} +1 -1
  17. package/dist/assets/Conversation-Cv9VbfEe.js +1 -0
  18. package/dist/assets/{CopyToClipboard-B8YmxJt6.js → CopyToClipboard-AvaqCeXT.js} +1 -1
  19. package/dist/assets/Detail-BynbMCsg.js +2 -0
  20. package/dist/assets/Extra-BvK2MPVH.css +1 -0
  21. package/dist/assets/Extra-Dy27Xepl.js +1 -0
  22. package/dist/assets/{FilePreview-BxnxEacb.js → FilePreview-BNtZwLa2.js} +1 -1
  23. package/dist/assets/{Hailuo-BkV2gEuB.js → Hailuo-CUHHmlNz.js} +1 -1
  24. package/dist/assets/{History-BA6LIG06.js → History-BrR8Yf_Z.js} +1 -1
  25. package/dist/assets/{ImagePreview-D8qlrS3J.js → ImagePreview-DPhaVe-K.js} +1 -1
  26. package/dist/assets/{ImageWrapper-BK4v8WW9.js → ImageWrapper-DwDvvMD7.js} +1 -1
  27. package/dist/assets/Index-0tDHczbM.js +1 -0
  28. package/dist/assets/Index-2pUrfZDO.js +1 -0
  29. package/dist/assets/{Index-fWSMR3_L.css → Index-73vCZ5Yt.css} +1 -1
  30. package/dist/assets/Index-7fi1vULC2.js +1 -0
  31. package/dist/assets/Index-B1Kw72wN.js +1 -0
  32. package/dist/assets/Index-B2gSKiZ3.js +1 -0
  33. package/dist/assets/{Index-DWpaenVp.js → Index-B83b9_wi.js} +1 -1
  34. package/dist/assets/{Index-GbP5Md7H.js → Index-BIccEBEN.js} +1 -1
  35. package/dist/assets/{Index-DLlOO9KP.js → Index-BXnU9Nhc.js} +2 -2
  36. package/dist/assets/Index-BadgGV7L.js +1 -0
  37. package/dist/assets/{Index-DOzCKfJ8.js → Index-BgP1xjT5.js} +1 -1
  38. package/dist/assets/Index-BhVRicE6.js +1 -0
  39. package/dist/assets/Index-BmXYFehz.js +1 -0
  40. package/dist/assets/Index-Bm_crXl-.js +1 -0
  41. package/dist/assets/Index-BneErBTq.js +1 -0
  42. package/dist/assets/Index-BthkIMLu.js +1 -0
  43. package/dist/assets/{Index-WBUpB_Pv.css → Index-C3UhM-Gp.css} +1 -1
  44. package/dist/assets/Index-CGEzzwMb.js +1 -0
  45. package/dist/assets/Index-CLKH3TKM.js +1 -0
  46. package/dist/assets/Index-CMSWNfN_.js +1 -0
  47. package/dist/assets/Index-CMu0wO8E.js +2 -0
  48. package/dist/assets/Index-CTZWRaZt.js +1 -0
  49. package/dist/assets/Index-CaIBqmIZ.js +1 -0
  50. package/dist/assets/Index-ChX8EfQ8.js +1 -0
  51. package/dist/assets/Index-CqRMg-uH.js +1 -0
  52. package/dist/assets/Index-Crdhl-Vx.js +1 -0
  53. package/dist/assets/Index-D-kQkhOh.js +1 -0
  54. package/dist/assets/{Index-BbmKEwSG.js → Index-D8Y03OtA.js} +1 -1
  55. package/dist/assets/Index-D948p6ES.js +1 -0
  56. package/dist/assets/Index-DKrXlrk-.js +1 -0
  57. package/dist/assets/Index-DMQ9DZGa.js +1 -0
  58. package/dist/assets/{Index-C7FzcV1a.js → Index-DWCDjaXA.js} +1 -1
  59. package/dist/assets/Index-DaePlNci.js +1 -0
  60. package/dist/assets/Index-DbsIgIEX.js +1 -0
  61. package/dist/assets/{Index-Beu1mmsF.js → Index-DlofPOmV.js} +1 -1
  62. package/dist/assets/Index-DvmQuJd4.js +1 -0
  63. package/dist/assets/{Index-DanHItqS.js → Index-OwzwOsGt.js} +1 -1
  64. package/dist/assets/{Invitees-DMi4xPeC.js → Invitees-DL1P2x5O.js} +1 -1
  65. package/dist/assets/{List-BcUzsCvV.js → List-B7gE17Uu.js} +1 -1
  66. package/dist/assets/List-B7stVodo.css +1 -0
  67. package/dist/assets/{List-CV6ZFpJt.js → List-By1Vg7U3.js} +1 -1
  68. package/dist/assets/List-ByRoWUqS.js +1 -0
  69. package/dist/assets/LocalTools-C0CsQekj.js +5 -0
  70. package/dist/assets/{LocalTools-DoTgbMuT.js → LocalTools-Dw-cSEm5.js} +1 -1
  71. package/dist/assets/{Logo-CusEze2M.js → Logo-B5pb3LXw.js} +1 -1
  72. package/dist/assets/{Main-ONLlInv1.js → Main-gugFahba.js} +1 -1
  73. package/dist/assets/Message-C0-5k24c.js +3 -0
  74. package/dist/assets/Model-DSVl1m8-.js +1 -0
  75. package/dist/assets/{Navigator-Dlh58ndt.js → Navigator-B-NGLAVz.js} +4 -4
  76. package/dist/assets/{NotFound-CwFD4Ksf.js → NotFound-Bp7eiYNh.js} +1 -1
  77. package/dist/assets/{PageHeader-CEF1kkj2.js → PageHeader-5PIb-pRr.js} +1 -1
  78. package/dist/assets/Pay-BXFjGCjg.js +1 -0
  79. package/dist/assets/{Player-CG_qPu9f.js → Player-BDjTM_TZ.js} +1 -1
  80. package/dist/assets/{Poivelle-CFTs0QM2.js → Poivelle-CATRUvJM.js} +1 -1
  81. package/dist/assets/{RealtimeCall-DWa-EMa8.js → RealtimeCall-4hZrsGbX.js} +1 -1
  82. package/dist/assets/{ReportButton-CE99kMuV.js → ReportButton-D07ABYgs.js} +1 -1
  83. package/dist/assets/{ReportDialog-CtH2W2Ml.js → ReportDialog-CZ_kBqmh.js} +1 -1
  84. package/dist/assets/{ScenarioPaymentMode-z1NgjkNu.js → ScenarioPaymentMode-DHx-gf_J.js} +1 -1
  85. package/dist/assets/{ScheduledTasks-BanAkO87.js → ScheduledTasks-BTdAj5bj.js} +2 -2
  86. package/dist/assets/{SolanaWalletPickerDialog-Cf1c9aRy.js → SolanaWalletPickerDialog-Dyf4OrtZ.js} +1 -1
  87. package/dist/assets/{Status-CX7rChDZ.css → Status-7DGGTrl_.css} +1 -1
  88. package/dist/assets/Status-BAOOm7Y6.js +1 -0
  89. package/dist/assets/Subscribe-DGalaHGM.css +1 -0
  90. package/dist/assets/Subscribe-Qqvq4kcb.js +1 -0
  91. package/dist/assets/{TabSwitcher-DFSRi_JU.js → TabSwitcher-SRPkuCQO.js} +1 -1
  92. package/dist/assets/Tts-CiW_3IBs.js +1 -0
  93. package/dist/assets/{VideoPlayer-CWRC_2uk.js → VideoPlayer-89YYttvk.js} +1 -1
  94. package/dist/assets/{VideoPreview-CnkWMQ8C.js → VideoPreview-BlX_PPPl.js} +1 -1
  95. package/dist/assets/arrow-down-M2F1qebD.js +1 -0
  96. package/dist/assets/{arrow-down-wide-narrow-xP4Yk_m9.js → arrow-down-wide-narrow-DaI6Uvy0.js} +1 -1
  97. package/dist/assets/arrow-left-D_2mJNNF.js +1 -0
  98. package/dist/assets/arrow-right-abRRWNmS.js +1 -0
  99. package/dist/assets/arrow-up-DMpA1IsJ.js +1 -0
  100. package/dist/assets/authorizeFlow-CujA2Sko.js +1 -0
  101. package/dist/assets/{avatar-CnQsavBT.js → avatar-C6N1pFHe.js} +1 -1
  102. package/dist/assets/{basic-CqqyRSQ6.js → basic-CPefaDNi.js} +1 -1
  103. package/dist/assets/{book-open-BBto52Hy.js → book-open-DAATULmD.js} +1 -1
  104. package/dist/assets/{box-CjgWzmRH.js → box-BShXku0x.js} +1 -1
  105. package/dist/assets/{boxes-Ch0CdyWt.js → boxes-OOy_NK7l.js} +1 -1
  106. package/dist/assets/{brain-BvsRE_4G.js → brain-Cu-lPJz-.js} +1 -1
  107. package/dist/assets/{chart-no-axes-combined-CCgcomKw.js → chart-no-axes-combined-cFmOkyoL.js} +1 -1
  108. package/dist/assets/{chat-0yFlMYVR.js → chat-2mnC6M1U.js} +1 -1
  109. package/dist/assets/check-TtZdHrlm.js +1 -0
  110. package/dist/assets/chevron-down-DMXTi49q.js +1 -0
  111. package/dist/assets/chevron-right-DIQNv_0r.js +1 -0
  112. package/dist/assets/circle-check-DKBPWCH5.js +1 -0
  113. package/dist/assets/{circle-question-mark-7WsuM54_.js → circle-question-mark-ChtLUjT_.js} +1 -1
  114. package/dist/assets/{clipboard-list-aYWEA39z.js → clipboard-list-BYEYDrSf.js} +1 -1
  115. package/dist/assets/clock-D5NbflY9.js +1 -0
  116. package/dist/assets/code-wKSqPZcq.js +1 -0
  117. package/dist/assets/{codingBridge-DPqwv_Q-.js → codingBridge-DSl0gsJ9.js} +2 -2
  118. package/dist/assets/{codingBridgeNotify-C243XAQ3.js → codingBridgeNotify-kOlSTgx4.js} +2 -2
  119. package/dist/assets/{coins-D7u-P3hE.js → coins-DwMmRk4F.js} +1 -1
  120. package/dist/assets/{collapse-Cn0v0672.js → collapse-GpKda_4j.js} +1 -1
  121. package/dist/assets/{constants-CdZEFH5x.js → constants-COIxBjYU.js} +1 -1
  122. package/dist/assets/{copy-C-eoCqpp.js → copy-BCep57w1.js} +1 -1
  123. package/dist/assets/{createTaskActions-Dpo2FY6E.js → createTaskActions-BXMbF95s.js} +1 -1
  124. package/dist/assets/{digitalhuman-D5Gv4Ils.js → digitalhuman-Bnx1V9mB.js} +1 -1
  125. package/dist/assets/{dollar-sign-CmuBygPk.js → dollar-sign--p8_eDBy.js} +1 -1
  126. package/dist/assets/{download-BQQJGY0e.js → download-Dt0wWdpW.js} +1 -1
  127. package/dist/assets/{drawer-CLmU-Got.js → drawer-BUv2WEZF.js} +1 -1
  128. package/dist/assets/{dropdown-CDlWW8VF.js → dropdown-CBx7fAAp.js} +1 -1
  129. package/dist/assets/{dropdown-CbNRUbfy.js → dropdown-UTgACN7Q.js} +1 -1
  130. package/dist/assets/{ellipsis-C4pNzKVr.js → ellipsis-yuDcWrJ4.js} +1 -1
  131. package/dist/assets/esm-BgUDy7vB.js +1 -0
  132. package/dist/assets/{esm-mQK7-Jmo.js → esm-C9MRpvkK.js} +2 -2
  133. package/dist/assets/{esm-CAyhwU8I.js → esm-D4Ha2HnB.js} +2 -2
  134. package/dist/assets/{external-link-CAB_CNUu.js → external-link-CYfNxhR8.js} +1 -1
  135. package/dist/assets/{eye-DYfNRuif.js → eye-oDfmxiDV.js} +1 -1
  136. package/dist/assets/{file-output-bSrlvRrv.js → file-output-XcBh5O_y.js} +1 -1
  137. package/dist/assets/{file-text-DxPsfXW2.js → file-text-DkDLGLgh.js} +1 -1
  138. package/dist/assets/{file-C6dKDiai.js → file-tjfJc6_R.js} +1 -1
  139. package/dist/assets/fish-Cx9f10Gm.js +1 -0
  140. package/dist/assets/{flux-D02otYqk.js → flux-Bmcbakjy.js} +1 -1
  141. package/dist/assets/{folder--oyQ8nfO.js → folder-DAsfhav6.js} +1 -1
  142. package/dist/assets/gauge-DP9sk0Fe.js +1 -0
  143. package/dist/assets/{globe-BEP94d7V.js → globe-v5rghgGg.js} +1 -1
  144. package/dist/assets/{grokvideo-eP7aiT3d.js → grokvideo-C8TWPKxr.js} +1 -1
  145. package/dist/assets/{hailuo-BtGLIk6L.js → hailuo-C1kObLTr.js} +1 -1
  146. package/dist/assets/{headphones-Dm9heVrC.js → headphones-B3pskUHm.js} +1 -1
  147. package/dist/assets/{history-CU_KyGIV.js → history-BZjtFlQ0.js} +1 -1
  148. package/dist/assets/{house-Dpj9MokZ.js → house-f-R5K_9D.js} +1 -1
  149. package/dist/assets/{i18n-DhQn0Z8p.js → i18n-DBTdUKZz.js} +1 -1
  150. package/dist/assets/{image-C9t8D3m5.js → image-CR04SjVv.js} +1 -1
  151. package/dist/assets/{imageRequests-D36QFGD8.js → imageRequests-CLSZhX1d.js} +1 -1
  152. package/dist/assets/{index-C-w8AJfV.js → index-CTn7SLTr.js} +16 -16
  153. package/dist/assets/{index.es-CpSPskGM.js → index.es-DB6BDgPr.js} +1 -1
  154. package/dist/assets/{info-CifZclsR.js → info-zYDWDLVP.js} +1 -1
  155. package/dist/assets/{input-number-D_PD56K7.js → input-number-B0xcuDnW.js} +1 -1
  156. package/dist/assets/{key-round-DpXGLbCi.js → key-round-BX8FPmcu.js} +1 -1
  157. package/dist/assets/{kling-BdClJllc.js → kling-tUEGRRxO.js} +1 -1
  158. package/dist/assets/{languages-DFIVuRRk.js → languages-DKKUB3AY.js} +1 -1
  159. package/dist/assets/{laptop-RhJDASeF.js → laptop-DSbqbKpY.js} +1 -1
  160. package/dist/assets/{lightbulb-BHpGUYNg.js → lightbulb-NABKBXyu.js} +1 -1
  161. package/dist/assets/{link-Dk_62wni.js → link-ByjYUxSr.js} +1 -1
  162. package/dist/assets/loader-circle-r7o2cOdj.js +1 -0
  163. package/dist/assets/{lock-DNH1WqDy.js → lock-gJ6pDfMu.js} +1 -1
  164. package/dist/assets/{veo-KUI55n_I.js → luma-CfpOdZqb.js} +1 -1
  165. package/dist/assets/maestro-yRubvEFE.js +1 -0
  166. package/dist/assets/{maestroLanguages-Ci01wqmN.js → maestroLanguages-B0F58ijw.js} +1 -1
  167. package/dist/assets/{mail-D90C07ml.js → mail-DZpi5J9I.js} +1 -1
  168. package/dist/assets/{message-circle-DryU-mjQ.js → message-circle-D8K26AlF.js} +1 -1
  169. package/dist/assets/{mic-DpkP8cNS.js → mic-DKCR-fiK.js} +1 -1
  170. package/dist/assets/{midjourney-ClFnrXbL.js → midjourney-DM-JhLuX.js} +1 -1
  171. package/dist/assets/{minimax-CQMZNwrQ.js → minimax-DxlvMTWd.js} +1 -1
  172. package/dist/assets/{mobileLocalExec-D5WUfOvw.js → mobileLocalExec-IQ4ZYo9T.js} +2 -2
  173. package/dist/assets/{models-C4O1HNS0.js → models-DAfyWAqc.js} +1 -1
  174. package/dist/assets/{monitor-CgbJvAA5.js → monitor-dn1EyIUV.js} +1 -1
  175. package/dist/assets/{mouse-pointer-2-DZcCmo__.js → mouse-pointer-2-C7O4LVbr.js} +1 -1
  176. package/dist/assets/music-2-UxfKU68J.js +1 -0
  177. package/dist/assets/{nanobanana-C3e37CBh.js → nanobanana-CxpWeSUn.js} +1 -1
  178. package/dist/assets/{omni-Ck0PEQnQ.js → omni-DxA9Ux8Y.js} +1 -1
  179. package/dist/assets/{openaiimage-BP3YyHY8.js → openaiimage-DlDGJtH4.js} +1 -1
  180. package/dist/assets/{pagination-Cqd6FGMz.js → pagination-C5hWM-uh.js} +1 -1
  181. package/dist/assets/{pagination-C2V-Ik6E.js → pagination-DMwQC4ut.js} +1 -1
  182. package/dist/assets/{pagination-CkF2u9jK.js → pagination-NMff1SYZ.js} +1 -1
  183. package/dist/assets/{palette-xGLHQR5_.js → palette-CRW1qOCG.js} +1 -1
  184. package/dist/assets/{paperclip-Sf7MFEDh.js → paperclip-HA2RNkmq.js} +1 -1
  185. package/dist/assets/{pause-adMkKrSO.js → pause-09GpN31S.js} +1 -1
  186. package/dist/assets/{pencil-DJveEUCk.js → pencil-CD6MLBSx.js} +1 -1
  187. package/dist/assets/{pika-DEskP_8Q.js → pika-CxjINjjD.js} +1 -1
  188. package/dist/assets/pixverse-CzR8RnTd.js +1 -0
  189. package/dist/assets/play-1r8M6tGa.js +1 -0
  190. package/dist/assets/{plug-DIygGUs_.js → plug-D6wUveI9.js} +1 -1
  191. package/dist/assets/plus-Dzhx2WdR.js +1 -0
  192. package/dist/assets/{poivelle-CkRG9K6R.js → poivelle-ChqnXNHp.js} +1 -1
  193. package/dist/assets/{popover-CCbUzZfK.js → popover-8bFfKyEx.js} +1 -1
  194. package/dist/assets/{producer-_LkVoJMc.js → producer-CZdiq23k.js} +1 -1
  195. package/dist/assets/{qrart-BqkocT47.js → qrart-T4a6zkdJ.js} +1 -1
  196. package/dist/assets/realtime-C0bVe3k2.js +1 -0
  197. package/dist/assets/{refresh-cw-Bu2iSphh.js → refresh-cw-3eBUX5Ea.js} +1 -1
  198. package/dist/assets/rotate-ccw-DFETd1JJ.js +1 -0
  199. package/dist/assets/rotate-cw-BLViYEn3.js +1 -0
  200. package/dist/assets/{row-pFT5d-_R.js → row-BQUMxfsY.js} +1 -1
  201. package/dist/assets/search-CiYRAPUv.js +1 -0
  202. package/dist/assets/{seedance-DCWtAWZC.js → seedance-B4xVdEcz.js} +1 -1
  203. package/dist/assets/{seedance-DXfPy2q8.js → seedance-BU87svl9.js} +1 -1
  204. package/dist/assets/{seedance-0TFLzSy1.js → seedance-BUUXPGMG.js} +1 -1
  205. package/dist/assets/{seedance-BBKWD7c_.js → seedance-BqTYtpLG.js} +1 -1
  206. package/dist/assets/{seedance-BtsI-tRM.js → seedance-CHsxg4P4.js} +1 -1
  207. package/dist/assets/{seedance-CyKJmndD.js → seedance-CIQQcSsr.js} +1 -1
  208. package/dist/assets/{seedance-CpMvE3ez.js → seedance-CYdxrUAH.js} +1 -1
  209. package/dist/assets/{seedance-DJdaT6lI.js → seedance-Ch0IqLL8.js} +1 -1
  210. package/dist/assets/{seedance-DXIJarfX.js → seedance-ChfMbvyR.js} +1 -1
  211. package/dist/assets/{seedance-BfNWmADU.js → seedance-D78Q9Dqd.js} +1 -1
  212. package/dist/assets/{seedance-Ck71k2Hk.js → seedance-DRCikQzO.js} +1 -1
  213. package/dist/assets/{seedance-BbHeJ5It.js → seedance-DWR0aqWj.js} +1 -1
  214. package/dist/assets/{seedance-BdCXpI_-.js → seedance-DXAEqQbv.js} +1 -1
  215. package/dist/assets/{seedance-rfU7_6cn.js → seedance-DYRJv_ev.js} +1 -1
  216. package/dist/assets/{seedance-BRVYerFG.js → seedance-Ddun-kkV.js} +1 -1
  217. package/dist/assets/{seedance-TvFOE1iV.js → seedance-Dy5Y-9bL.js} +1 -1
  218. package/dist/assets/{seedance-DryiyZKa.js → seedance-JNM8UN75.js} +1 -1
  219. package/dist/assets/{seedance-CMbd4CPZ.js → seedance-kv4Nb_ME.js} +1 -1
  220. package/dist/assets/{seedance-CDoCt5y2.js → seedance-nNagglok.js} +1 -1
  221. package/dist/assets/{seedream-BMxjvAAA.js → seedream-CMXDmAzS.js} +1 -1
  222. package/dist/assets/{select-K-2CZ3eR.js → select-C0yzkTif.js} +1 -1
  223. package/dist/assets/serp-Dt_PQkXV.js +1 -0
  224. package/dist/assets/{shield-C30JJkad.js → shield-wdrqyAOI.js} +1 -1
  225. package/dist/assets/{shuffle-BPsWcYzJ.js → shuffle-Bqjf3c86.js} +1 -1
  226. package/dist/assets/{slider-CAVbZ4km.js → slider-BDLlDUDz.js} +1 -1
  227. package/dist/assets/{solana-wallets-BPM-gerP.js → solana-wallets-C-BcnEbE.js} +2 -2
  228. package/dist/assets/{wan-BVk2cktb.js → sora-DFX7Ridx.js} +1 -1
  229. package/dist/assets/{sparkles-CmjUgM5X.js → sparkles-BoTKvrNO.js} +1 -1
  230. package/dist/assets/square-B9lxDeHX.js +1 -0
  231. package/dist/assets/{store-CfHokbJJ.js → store-B3O9u73-.js} +1 -1
  232. package/dist/assets/{suno-SgCCjgsb.js → suno-DCe2XW0B.js} +1 -1
  233. package/dist/assets/{switch-BZMevA9h.js → switch-C7dNKdGq.js} +1 -1
  234. package/dist/assets/{table-CYivBc_q.js → table-UhquZYel.js} +1 -1
  235. package/dist/assets/{tabs-BaqfDqfv.js → tabs-BwvMWaWZ.js} +1 -1
  236. package/dist/assets/{tag-BAF7zUb4.js → tag-BJxLMPQ4.js} +1 -1
  237. package/dist/assets/terminal-C5ne2YRf.js +1 -0
  238. package/dist/assets/{time-picker-D-zHadCF.js → time-picker-DoJ_mwqy.js} +1 -1
  239. package/dist/assets/{tooltip-CjkDaYbd.js → tooltip-CY9KP5TS.js} +1 -1
  240. package/dist/assets/{trash-2-zWLkqDxH.js → trash-2-B1wBangj.js} +1 -1
  241. package/dist/assets/{triangle-alert-CCs6VvUs.js → triangle-alert-CAuu6B-W.js} +1 -1
  242. package/dist/assets/{upload-_zFgS7Nh.js → upload-D6AM_V-z.js} +1 -1
  243. package/dist/assets/{upload-Q8MqK29R.js → upload-D_4LkjOW.js} +1 -1
  244. package/dist/assets/user-B3wTOjwB.js +1 -0
  245. package/dist/assets/{luma-DRjMeSc2.js → veo-W71kXy0Z.js} +1 -1
  246. package/dist/assets/{video-CFfCNDdy.js → video-DVgqKgsY.js} +1 -1
  247. package/dist/assets/{volume-2-DE0tnLtn.js → volume-2-DocaJU2F.js} +1 -1
  248. package/dist/assets/{wallet-C-kwFfVY.js → wallet-RBRJCWek.js} +1 -1
  249. package/dist/assets/{sora-Ci3bZEwI.js → wan-CgXklc_4.js} +1 -1
  250. package/dist/assets/{wand-sparkles-BFbcxwi3.js → wand-sparkles-CJH0v5L4.js} +1 -1
  251. package/dist/assets/{web-CBAHqQFG.js → web-9nZX65Vh.js} +1 -1
  252. package/dist/assets/{web-BJPtlBfg.js → web-BjNw9wT3.js} +1 -1
  253. package/dist/assets/{web-DS65bqhf.js → web-D29bO3g4.js} +1 -1
  254. package/dist/assets/{web-DyEvw4UT.js → web-DRJhyBh_.js} +1 -1
  255. package/dist/assets/{web-CABW7ZTT.js → web-nUZelD8c.js} +1 -1
  256. package/dist/assets/webextrator-C1x7ltX3.js +1 -0
  257. package/dist/assets/{zap-Yxjdgccv.js → zap-Bo8Pzpwk.js} +1 -1
  258. package/dist/index.html +4 -4
  259. package/package.json +1 -1
  260. package/dist/assets/Console-BxYtZiKP.js +0 -1
  261. package/dist/assets/Conversation-DxHOnUbb.js +0 -1
  262. package/dist/assets/Detail-gYf9lCLZ.js +0 -2
  263. package/dist/assets/Extra-DOKzdi0p.js +0 -1
  264. package/dist/assets/Extra-DsIHXgRm.css +0 -1
  265. package/dist/assets/Index-7COUDjVu.js +0 -1
  266. package/dist/assets/Index-BHmbPOxX.js +0 -1
  267. package/dist/assets/Index-B_KEsjHe.js +0 -1
  268. package/dist/assets/Index-Bhn0_eJl.js +0 -1
  269. package/dist/assets/Index-C-lKd2nE2.js +0 -1
  270. package/dist/assets/Index-C0vN7uy_.js +0 -1
  271. package/dist/assets/Index-C95E9MNj.js +0 -1
  272. package/dist/assets/Index-CBRCeg0H.js +0 -1
  273. package/dist/assets/Index-CCHqZBcF.js +0 -1
  274. package/dist/assets/Index-CHF28ZI5.js +0 -1
  275. package/dist/assets/Index-CQTE0OSh.js +0 -1
  276. package/dist/assets/Index-CpfPhJzb.js +0 -1
  277. package/dist/assets/Index-CwV8Utkg.js +0 -1
  278. package/dist/assets/Index-Cyz1v4cX.js +0 -1
  279. package/dist/assets/Index-D58ebdDE.js +0 -1
  280. package/dist/assets/Index-DFfu4PfT.js +0 -1
  281. package/dist/assets/Index-DYFrW-_K.js +0 -1
  282. package/dist/assets/Index-DqsV33my.js +0 -1
  283. package/dist/assets/Index-DuhACoUR.js +0 -1
  284. package/dist/assets/Index-Duva2-wr.js +0 -1
  285. package/dist/assets/Index-DvCahpg1.js +0 -1
  286. package/dist/assets/Index-HUbEe1eR.js +0 -1
  287. package/dist/assets/Index-MGIX_apc.js +0 -1
  288. package/dist/assets/Index-dpAwxSxA.js +0 -1
  289. package/dist/assets/Index-gr2b7csS.js +0 -1
  290. package/dist/assets/Index-jDK0-rqq.js +0 -2
  291. package/dist/assets/Index-z86-kR96.js +0 -1
  292. package/dist/assets/List-CgyZMpyx.js +0 -1
  293. package/dist/assets/List-DBsU3TQj.css +0 -1
  294. package/dist/assets/LocalTools-CpzJO__m.js +0 -5
  295. package/dist/assets/Message-CHzrXHAI.js +0 -3
  296. package/dist/assets/Model-DyxkJfAf.js +0 -1
  297. package/dist/assets/Pay-aalIWMIv.js +0 -1
  298. package/dist/assets/Status-4ALebiGo.js +0 -1
  299. package/dist/assets/Subscribe-CRLnja4f.css +0 -1
  300. package/dist/assets/Subscribe-DK8jHK2K.js +0 -1
  301. package/dist/assets/Tts-CAdHV0oP.js +0 -1
  302. package/dist/assets/arrow-down-Dgcv9V1n.js +0 -1
  303. package/dist/assets/arrow-left-DjeyNMjO.js +0 -1
  304. package/dist/assets/arrow-right-yD2bsK_A.js +0 -1
  305. package/dist/assets/arrow-up-Oq-TyfTv.js +0 -1
  306. package/dist/assets/authorizeFlow-BUO5Flgm.js +0 -1
  307. package/dist/assets/check-C6haHp_5.js +0 -1
  308. package/dist/assets/chevron-down-kOQEc1DQ.js +0 -1
  309. package/dist/assets/chevron-right-D4ynMR67.js +0 -1
  310. package/dist/assets/circle-check-DhFuCeIC.js +0 -1
  311. package/dist/assets/clock-DAmpmfMk.js +0 -1
  312. package/dist/assets/code-B_88gzRu.js +0 -1
  313. package/dist/assets/esm-BzkzIXzG.js +0 -1
  314. package/dist/assets/fish-Q2L3z4Al.js +0 -1
  315. package/dist/assets/gauge-BKTV8ItL.js +0 -1
  316. package/dist/assets/loader-circle-BR0zD2Br.js +0 -1
  317. package/dist/assets/maestro-DCbUANt5.js +0 -1
  318. package/dist/assets/music-2-DNsg6C9m.js +0 -1
  319. package/dist/assets/pixverse-DJ8ovsB6.js +0 -1
  320. package/dist/assets/play-BX89pr5h.js +0 -1
  321. package/dist/assets/plus-DsPtzHMZ.js +0 -1
  322. package/dist/assets/realtime-BUOeNyD-.js +0 -1
  323. package/dist/assets/rotate-ccw-IPNYOxzK.js +0 -1
  324. package/dist/assets/rotate-cw-Cw8L_Hve.js +0 -1
  325. package/dist/assets/search-CkC2D5Yj.js +0 -1
  326. package/dist/assets/serp-CAeQ9XXL.js +0 -1
  327. package/dist/assets/square-DymQsvx_.js +0 -1
  328. package/dist/assets/terminal-yXrC2I0y.js +0 -1
  329. package/dist/assets/user-DHY7x-vL.js +0 -1
  330. package/dist/assets/webextrator-C8VyzL3x.js +0 -1
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,bt as u,ht as d,it as f,j as p,mt as m,qt as h,rt as g,st as _,tt as v,x as y,z as b}from"./vendor-chart-Dw-P17PN.js";import{F as x}from"./icon-CDmWyIgD.js";import{r as S,t as C}from"./select-K-2CZ3eR.js";import{n as w,t as T}from"./tabs-BaqfDqfv.js";import{t as E}from"./upload-_zFgS7Nh.js";import{t as D}from"./tooltip-CjkDaYbd.js";import{t as O}from"./alert-BprQRUmf.js";import{c as k,h as A,l as j,s as M,v as N}from"./models-C4O1HNS0.js";import{n as P,r as F}from"./radio-BNhFzeBO.js";import{t as I}from"./drawer-CLmU-Got.js";import{n as L,r as R,t as z}from"./dropdown-CbNRUbfy.js";import{t as B}from"./input-number-D_PD56K7.js";import{t as V}from"./slider-CAVbZ4km.js";import{t as H}from"./switch-BZMevA9h.js";import{t as ee}from"./arrow-down-Dgcv9V1n.js";import{t as te}from"./arrow-left-DjeyNMjO.js";import{t as ne}from"./arrow-right-yD2bsK_A.js";import{t as re}from"./arrow-up-Oq-TyfTv.js";import{t as ie}from"./check-C6haHp_5.js";import{t as ae}from"./chevron-down-kOQEc1DQ.js";import{t as oe}from"./clock-DAmpmfMk.js";import{t as se}from"./gauge-BKTV8ItL.js";import{a as U,i as ce,n as le,r as ue,s as de,t as fe}from"./pagination-CkF2u9jK.js";import{t as pe}from"./image-C9t8D3m5.js";import{t as me}from"./info-CifZclsR.js";import{t as he}from"./refresh-cw-Bu2iSphh.js";import{t as W}from"./upload-Q8MqK29R.js";import{t as ge}from"./wand-sparkles-BFbcxwi3.js";import{t as _e}from"./zap-Yxjdgccv.js";import{Mi as ve,Ni as ye}from"./constants-CdZEFH5x.js";import{$r as be,$t as G,Aa as xe,Ca as Se,Jr as Ce,Jt as K,Kr as we,Ma as q,O as J,Oi as Te,Qt as Ee,Xr as Y,Yr as De,Zr as Oe,_a as ke,en as Ae,hi as je,ia as X,in as Me,mi as Ne,nn as Z,pn as Pe,qr as Fe,tn as Q,va as Ie,xa as Le}from"./index-C-w8AJfV.js";import{t as Re}from"./CopyToClipboard-B8YmxJt6.js";import{t as ze}from"./ReportButton-CE99kMuV.js";import{t as $}from"./ImagePreview-D8qlrS3J.js";import{n as Be}from"./taskDrawerMixin-DyAUhFEq.js";import{t as Ve}from"./Consumption-DeigvrPq.js";import{t as He}from"./VideoPlayer-CWRC_2uk.js";import{t as Ue}from"./ScenarioPaymentMode-z1NgjkNu.js";import{t as We}from"./ApiCodeButton-DmY8v9e5.js";import{t as Ge}from"./BotPlaceholder-LUNR8KA6.js";import{t as Ke}from"./ImageWrapper-BK4v8WW9.js";var qe=ke(`coffee`,[[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M14 2v2`,key:`6buw04`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`,key:`pwadti`}],[`path`,{d:`M6 2v2`,key:`colzsn`}]]),Je=b({name:`LayoutMidjourney`,components:{MagicIcon:ge,ElDrawer:I,ElButton:q},mixins:[Be]}),Ye={class:`main flex-1 h-full flex flex-row`},Xe={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Ze={class:`results flex-1 h-full flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Qe(t,n,r,i,o,c){let u=l(`magic-icon`),p=l(`el-button`),h=l(`el-drawer`);return v(),s(`div`,Ye,[e(`div`,Xe,[f(t.$slots,`config`,{},void 0,!0)]),e(`div`,Ze,[f(t.$slots,`results`,{},void 0,!0)]),d(a(p,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:m(()=>[a(u,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[y,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:m(()=>[f(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var $e=J(Je,[[`render`,Qe],[`__scopeId`,`data-v-fa528a88`]]),et=b({name:`RatioSelector`,data(){return{options:[{value:`1:1`,label:`1:1`,width:20,height:20},{value:`4:3`,label:`4:3`,width:20,height:15},{value:`3:4`,label:`3:4`,width:15,height:20},{value:`16:9`,label:`16:9`,width:25,height:13},{value:`9:16`,label:`9:16`,width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state.midjourney.config.ratio},set(e){console.debug(`set ratio`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,ratio:e})}}},mounted(){this.value||=`1:1`}}),tt={class:`text-sm font-bold mb-2 block`},nt={class:`items`},rt=[`onClick`],it={class:`name`};function at(t,r,a,o,l,u){return v(),s(`div`,null,[e(`span`,tt,i(t.$t(`midjourney.name.ratio`)),1),e(`div`,nt,[(v(!0),s(c,null,g(t.options,(r,a)=>(v(),s(`div`,{key:a,class:n({active:t.active===a,item:!0}),onClick:e=>t.value=r.value},[e(`div`,{class:n([`preview`,r.label])},[e(`div`,{class:`rect`,style:h({width:r.width+`px`,height:r.height+`px`})},null,4)],2),e(`p`,it,i(r.label),1)],10,rt))),128))])])}var ot=J(et,[[`render`,at],[`__scopeId`,`data-v-b1114c34`]]),st=!1,ct=b({name:`AdvancedSelector`,components:{ElSwitch:H},computed:{value:{get(){return this.$store.state.midjourney.config.advanced},set(e){console.debug(`set advanced`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,advanced:e})}}},mounted(){this.value===void 0&&(this.value=st)}}),lt={class:`field`},ut={class:`title`};function dt(t,n,r,o,c,u){let d=l(`el-switch`);return v(),s(`div`,lt,[e(`h2`,ut,i(t.$t(`midjourney.name.advanced`)),1),a(d,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])}var ft=J(ct,[[`render`,dt],[`__scopeId`,`data-v-2d55fce2`]]),pt=b({name:`LoopSelector`,components:{ElSwitch:H,InfoIcon:U},computed:{value:{get(){return this.$store.state.midjourney?.config?.loop},set(e){console.debug(`set loop`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney?.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),mt={class:`relative`},ht={class:`flex justify-between`},gt={class:`flex justify-start items-center`},_t={class:`text-sm font-bold`},vt={class:`flex justify-end items-center`};function yt(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return v(),s(`div`,mt,[e(`div`,ht,[e(`div`,gt,[e(`span`,_t,i(t.$t(`midjourney.name.loop`)),1),a(d,{content:t.$t(`midjourney.description.loop`)},null,8,[`content`])]),e(`div`,vt,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`},null,8,[`modelValue`])])])])}var bt=J(pt,[[`render`,yt]]),xt=`8.1`,St=b({name:`VersionSelector`,components:{ElSelect:S,ElOption:C},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`8.1`,label:`8.1`},{value:`8`,label:`8`},{value:`7`,label:`7`},{value:`6.1`,label:`6.1`},{value:`6.0`,label:`6.0`},{value:`5.2`,label:`5.2`},{value:`5.1`,label:`5.1`},{value:`5.0`,label:`5`},{value:`4`,label:`4`},{value:`3`,label:`3`},{value:`2`,label:`2`},{value:`1`,label:`1`}]}},computed:{value:{get(){return this.$store.state.midjourney.config.version},set(e){let t=this.$store.state.midjourney.config;this.$store.commit(`midjourney/setConfig`,{...t,version:e,...e===`8.1`?{quality:void 0,mode:t.mode===`turbo`?`fast`:t.mode}:{}})}}},watch:{value:{immediate:!0,handler(e){let t=this.$store.state.midjourney.config;e===`8.1`&&(t.quality||t.mode===`turbo`)&&(this.value=e)}}},mounted(){this.value||=xt}}),Ct={class:`field`},wt={class:`text-sm font-bold`};function Tt(t,n,r,o,u,d){let f=l(`el-option`),h=l(`el-select`);return v(),s(`div`,Ct,[e(`span`,wt,i(t.$t(`midjourney.name.version`)),1),a(h,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`midjourney.placeholder.select`)},{default:m(()=>[(v(!0),s(c,null,g(t.options,e=>(v(),p(f,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Et=J(St,[[`render`,Tt],[`__scopeId`,`data-v-c5a62d22`]]),Dt=b({name:`HdSelector`,components:{InfoIcon:me,ElSwitch:H,ElTooltip:D},computed:{value:{get(){return this.$store.state.midjourney.config.hd||!1},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,hd:e})}}}}),Ot={class:`field`},kt={class:`text-sm font-bold`};function At(t,n,o,c,u,d){let f=l(`info-icon`),p=l(`el-tooltip`),h=l(`el-switch`);return v(),s(`div`,Ot,[e(`span`,kt,[r(i(t.$t(`midjourney.name.hd`))+` `,1),a(p,{content:t.$t(`midjourney.description.hd`),placement:`top`},{default:m(()=>[a(f,{class:`info-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`content`])]),a(h,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e},null,8,[`modelValue`])])}var jt=J(Dt,[[`render`,At],[`__scopeId`,`data-v-a97b008b`]]),Mt=b({name:`ReferenceImage`,components:{UploadIcon:W,ElUpload:E,ElButton:q,InfoIcon:U,ImagePreview:$},mixins:[Z,Q,G,K],emits:[`change`],data(){return{fileList:[],uploadUrl:X()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,image_url:e[0]})}}},methods:{onExceed(){N.warning(this.$t(`midjourney.message.uploadStartImageExceed`))},onError(){N.error(this.$t(`midjourney.message.uploadStartImageError`))}}}),Nt={class:`relative`},Pt={class:`flex min-h-8 items-center pr-20`},Ft={class:`flex justify-start items-center`},It={class:`text-sm font-bold`};function Lt(t,n,o,c,u,d){let f=l(`info-icon`),p=l(`image-preview`),h=l(`upload-icon`),g=l(`el-button`),_=l(`el-upload`);return v(),s(`div`,Nt,[e(`div`,Pt,[e(`div`,Ft,[e(`span`,It,[r(i(t.$t(`midjourney.name.imageUrl`))+` `,1),n[1]||=e(`span`,{class:`text-red-500`,"aria-hidden":`true`},`*`,-1)]),a(f,{content:t.$t(`midjourney.description.imageUrl`)},null,8,[`content`])])]),a(_,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,headers:t.headers},{file:m(({file:e})=>[a(p,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:m(()=>[a(g,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:m(()=>[a(h,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`midjourney.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`headers`])])}var Rt=J(Mt,[[`render`,Lt],[`__scopeId`,`data-v-e785a985`]]),zt=b({name:`EndImageUrlInput`,components:{UploadIcon:W,ElUpload:E,ElButton:q,InfoIcon:U,ImagePreview:$},mixins:[Z,Q,G,K],emits:[`change`],data(){return{fileList:[],uploadUrl:X()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,end_image_url:e[0]})}}},methods:{onExceed(){N.warning(this.$t(`midjourney.message.uploadStartImageExceed`))},onError(){N.error(this.$t(`midjourney.message.uploadEndImageError`))}}}),Bt={class:`relative`},Vt={class:`flex min-h-8 items-center pr-20`},Ht={class:`flex justify-start items-center`},Ut={class:`text-sm font-bold`};function Wt(t,n,o,c,u,d){let f=l(`info-icon`),p=l(`image-preview`),h=l(`upload-icon`),g=l(`el-button`),_=l(`el-upload`);return v(),s(`div`,Bt,[e(`div`,Vt,[e(`div`,Ht,[e(`span`,Ut,i(t.$t(`midjourney.name.endImageUrl`)),1),a(f,{content:t.$t(`midjourney.description.endImageUrl`)},null,8,[`content`])])]),a(_,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,headers:t.headers},{file:m(({file:e})=>[a(p,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:m(()=>[a(g,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:m(()=>[a(h,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`midjourney.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`headers`])])}var Gt=J(zt,[[`render`,Wt],[`__scopeId`,`data-v-ab778070`]]),Kt=b({name:`ReferenceImage`,components:{UploadIcon:W,ElUpload:E,ElButton:q,InfoIcon:U,ImagePreview:$},mixins:[Z,Q,G,K],emits:[`change`],data(){return{fileList:[],uploadUrl:X()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,image_url:e[0]})}}},methods:{onExceed(){N.warning(this.$t(`midjourney.message.uploadStartImageExceed`))},onError(){N.error(this.$t(`midjourney.message.uploadStartImageError`))}}}),qt={class:`relative`},Jt={class:`flex min-h-8 items-center pr-20`},Yt={class:`flex justify-start items-center`},Xt={class:`text-sm font-bold`};function Zt(t,n,o,c,u,d){let f=l(`info-icon`),p=l(`image-preview`),h=l(`upload-icon`),g=l(`el-button`),_=l(`el-upload`);return v(),s(`div`,qt,[e(`div`,Jt,[e(`div`,Yt,[e(`span`,Xt,i(t.$t(`midjourney.name.imageUrl2`)),1),a(f,{content:t.$t(`midjourney.description.imageUrl2`)},null,8,[`content`])])]),a(_,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,headers:t.headers},{file:m(({file:e})=>[a(p,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:m(()=>[a(g,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:m(()=>[a(h,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`midjourney.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`headers`])])}var Qt=J(Kt,[[`render`,Zt],[`__scopeId`,`data-v-000610fb`]]),$t=b({name:`StylizeSelector`,components:{ElSlider:V,InfoIcon:U,ElInputNumber:B},computed:{value:{get(){return this.$store.state.midjourney.config.stylize},set(e){console.debug(`set stylize`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,stylize:e})}}},mounted(){this.value||=100}}),en={class:`flex justify-between`},tn={class:`flex justify-start items-center`},nn={class:`text-sm font-bold`},rn={class:`flex justify-end items-center`},an={class:`w-full px-2`};function on(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return v(),s(`div`,null,[e(`div`,en,[e(`div`,tn,[e(`span`,nn,i(t.$t(`midjourney.name.stylize`)),1),a(d,{content:t.$t(`midjourney.description.stylize`)},null,8,[`content`])]),e(`div`,rn,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,an,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:0,max:100,step:1},null,8,[`modelValue`])])])}var sn=J($t,[[`render`,on]]),cn=0,ln=b({name:`ChaosSelector`,components:{ElSlider:V,InfoIcon:U,ElInputNumber:B},computed:{value:{get(){return this.$store.state.midjourney.config.chaos},set(e){console.debug(`set quality`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,chaos:e})}}},mounted(){this.value||=cn}}),un={class:`flex justify-between`},dn={class:`flex justify-start items-center`},fn={class:`text-sm font-bold`},pn={class:`flex justify-end items-center`},mn={class:`w-full px-2`};function hn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return v(),s(`div`,null,[e(`div`,un,[e(`div`,dn,[e(`span`,fn,i(t.$t(`midjourney.name.chaos`)),1),a(d,{content:t.$t(`midjourney.description.chaos`)},null,8,[`content`])]),e(`div`,pn,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,mn,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:0,max:100,step:1},null,8,[`modelValue`])])])}var gn=J(ln,[[`render`,hn],[`__scopeId`,`data-v-ed158765`]]),_n=b({name:`ModelSelector`,components:{ElImage:Le,InfoIcon:U},data(){return{options:[{value:``,label:this.$t(`midjourney.model.general`),image:`https://cdn.acedata.cloud/ebvlwg.png`},{value:`niji 5`,label:this.$t(`midjourney.model.niji`),image:`https://cdn.acedata.cloud/j6v1m7.png`}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)},value:{get(){return this.$store.state.midjourney.config.model},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,model:e})}}},mounted(){this.value===void 0&&(this.value=``)}}),vn={class:`flex justify-start items-center`},yn={class:`text-sm font-bold`},bn={class:`items`},xn=[`onClick`],Sn={class:`name`};function Cn(t,r,o,u,d,f){let p=l(`info-icon`),m=l(`el-image`);return v(),s(`div`,null,[e(`div`,vn,[e(`span`,yn,i(t.$t(`midjourney.name.model`)),1),a(p,{content:t.$t(`midjourney.description.model`)},null,8,[`content`])]),e(`div`,bn,[(v(!0),s(c,null,g(t.options,(r,o)=>(v(),s(`div`,{key:o,class:n({active:t.active===o,item:!0}),onClick:e=>t.value=r.value},[a(m,{src:r.image,fit:`cover`,class:`image`},null,8,[`src`]),e(`p`,Sn,i(r.label),1)],10,xn))),128))])])}var wn=J(_n,[[`render`,Cn],[`__scopeId`,`data-v-ebc6758e`]]),Tn=b({name:`QualitySelector`,components:{ElRadioButton:P,ElRadioGroup:F},computed:{version(){return this.$store.state.midjourney.config.version||``},isV8(){return this.version===`8`},options(){return this.isV8?[{label:this.$t(`midjourney.button.standard`),value:`1`},{label:this.$t(`midjourney.button.ultra`),value:`4`}]:[{label:this.$t(`midjourney.button.low`),value:`.25`},{label:this.$t(`midjourney.button.medium`),value:`.5`},{label:this.$t(`midjourney.button.high`),value:`1`}]},value:{get(){return this.$store.state.midjourney.config.quality},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,quality:e})}}},watch:{isV8(e){(e&&this.value!==`1`&&this.value!==`4`||!e&&this.value===`4`)&&(this.value=`1`)}},mounted(){this.value||=`1`}}),En={class:`field`},Dn={class:`text-sm font-bold`};function On(t,n,o,u,d,f){let h=l(`el-radio-button`),_=l(`el-radio-group`);return v(),s(`div`,En,[e(`span`,Dn,i(t.$t(`midjourney.name.quality`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`quality`},{default:m(()=>[(v(!0),s(c,null,g(t.options,e=>(v(),p(h,{key:e.value,label:e.value},{default:m(()=>[r(i(e.label),1)]),_:2},1032,[`label`]))),128))]),_:1},8,[`modelValue`])])}var kn=J(Tn,[[`render`,On],[`__scopeId`,`data-v-f1efdc92`]]),An=b({name:`ResolutionSelector`,components:{ElSelect:S,ElOption:C},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`480p`,label:`480p`},{value:`720p`,label:`720p`}]}},computed:{value:{get(){return this.$store.state.midjourney?.config?.resolution},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,resolution:e})}}},mounted(){this.value||=ve}}),jn={class:`field`},Mn={class:`title font-bold`};function Nn(t,n,r,o,u,d){let f=l(`el-option`),h=l(`el-select`);return v(),s(`div`,jn,[e(`h2`,Mn,i(t.$t(`midjourney.name.resolution`)),1),a(h,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`midjourney.placeholder.select`)},{default:m(()=>[(v(!0),s(c,null,g(t.options,e=>(v(),p(f,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Pn=J(An,[[`render`,Nn],[`__scopeId`,`data-v-12537f29`]]),Fn=b({name:`ImageWeightSelector`,components:{ElInputNumber:B,ElSlider:V,InfoIcon:U},computed:{value:{get(){return this.$store.state.midjourney.config.iw},set(e){console.debug(`set iw`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,iw:e})}}},mounted(){this.value||=1}}),In={class:`flex justify-between`},Ln={class:`flex justify-start items-center`},Rn={class:`text-sm font-bold`},zn={class:`flex justify-end items-center`},Bn={class:`w-full px-2`};function Vn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return v(),s(`div`,null,[e(`div`,In,[e(`div`,Ln,[e(`span`,Rn,i(t.$t(`midjourney.name.imageWeight`)),1),a(d,{content:t.$t(`midjourney.description.imageWeight`)},null,8,[`content`])]),e(`div`,zn,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,Bn,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:0,max:2,step:.1},null,8,[`modelValue`])])])}var Hn=J(Fn,[[`render`,Vn],[`__scopeId`,`data-v-a02ec063`]]),Un=b({name:`WeirdSelector`,components:{ElSlider:V,ElInputNumber:B,InfoIcon:U},computed:{value:{get(){return this.$store.state.midjourney.config.weird},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,weird:e})}}},mounted(){this.value||=0}}),Wn={class:`flex justify-between`},Gn={class:`flex justify-start items-center`},Kn={class:`text-sm font-bold`},qn={class:`flex justify-end items-center`},Jn={class:`w-full px-2`};function Yn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return v(),s(`div`,null,[e(`div`,Wn,[e(`div`,Gn,[e(`span`,Kn,i(t.$t(`midjourney.name.weird`)),1),a(d,{content:t.$t(`midjourney.description.weird`)},null,8,[`content`])]),e(`div`,qn,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,Jn,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:0,max:1e3,step:1},null,8,[`modelValue`])])])}var Xn=J(Un,[[`render`,Yn]]),Zn=b({name:`VideoFromInput`,components:{VideoPlayer:He},props:{modelValue:{type:Object,required:!1,default:void 0}},data(){return{options:{controls:[`play-large`,`play`,`progress`,`current-time`,`mute`,`captions`,`settings`,`fullscreen`]}}},computed:{config(){return this.$store.state.midjourney?.config}}}),Qn={class:`relative`},$n={class:`flex mb-2`},er={class:`text-sm font-bold`};function tr(t,n,r,a,c,u){let d=l(`video-player`);return v(),s(`div`,Qn,[e(`div`,$n,[e(`span`,er,i(t.$t(`midjourney.name.extend`)),1)]),e(`div`,null,[t.config?.video_url?(v(),p(d,{key:0,src:t.config?.video_url,options:t.options},null,8,[`src`,`options`])):o(``,!0)])])}var nr=J(Zn,[[`render`,tr]]),rr=``,ir=b({name:`StyleSelector`,components:{ElSelect:S,ElOption:C},data(){return{}},computed:{model(){return this.$store.state.midjourney.config.model},options(){return this.model?.includes(`niji`)?[{value:`cute`,label:this.$t(`midjourney.style.cute`)},{value:`expressive`,label:this.$t(`midjourney.style.expressive`)},{value:`scenic`,label:this.$t(`midjourney.style.scenic`)},{value:`original`,label:this.$t(`midjourney.style.original`)}]:[{value:`raw`,label:this.$t(`midjourney.style.raw`)}]},value:{get(){return this.$store.state.midjourney.config.style},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,style:e})}}},watch:{model(){this.value=``}},mounted(){this.value||=rr}}),ar={class:`field`},or={class:`text-sm font-bold title`},sr={class:`float-left`},cr={class:`float-right`};function lr(t,n,r,o,u,d){let f=l(`el-option`),h=l(`el-select`);return v(),s(`div`,ar,[e(`span`,or,i(t.$t(`midjourney.name.style`)),1),a(h,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`midjourney.placeholder.select`),clearable:``},{default:m(()=>[(v(!0),s(c,null,g(t.options,t=>(v(),p(f,{key:t.value,label:t.label,value:t.value},{default:m(()=>[e(`span`,sr,i(t.label),1),e(`span`,cr,i(t.value),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ur=J(ir,[[`render`,lr],[`__scopeId`,`data-v-00d50831`]]),dr=b({name:`ElementsSelector`,components:{Check:ie,ElTabs:w,ElTag:xe,ElIcon:x,ElTabPane:T,ElImage:Le,ElDialog:Se,ElButton:q,InfoIcon:U},emits:[`update:modelValue`],data(){return{tab:`styles`,choosing:!1,elements:{styles:{displayName:this.$t(`midjourney.styleCategory.styles`),items:[{image:`https://cdn.acedata.cloud/94ab394d-2fa3-4fe8-b3b3-41be85720fdb.png`,label:this.$t(`midjourney.styleTag.watercolour`),value:`Watercolour`},{image:`https://cdn.acedata.cloud/c3904cc5-3184-4639-be76-46f4860c1277.png`,label:this.$t(`midjourney.styleTag.oilPainting`),value:`Oil painting`},{image:`https://cdn.acedata.cloud/a0b764bb-13b1-419b-a8e8-855ee7ffc28a.png`,label:this.$t(`midjourney.styleTag.oldPhotograph`),value:`Old Photograph`},{image:`https://cdn.acedata.cloud/04f17d89-d913-4700-a422-99fa97fa79c9.png`,label:this.$t(`midjourney.styleTag.oneLineDrawing`),value:`One-line drawing`},{image:`https://cdn.acedata.cloud/281cfaac-ec59-4f5c-ab2b-f15d7481d752.png`,label:this.$t(`midjourney.styleTag.sketchDrawing`),value:`Sketch Drawing`},{image:`https://cdn.acedata.cloud/091d68cf-533c-4b76-90be-d5983b9ba80b.png`,label:this.$t(`midjourney.styleTag.gouache`),value:`Gouache`},{image:`https://cdn.acedata.cloud/a652c6b2-f0f6-4ef4-bf1b-9053e1daf85b.png`,label:this.$t(`midjourney.styleTag.filmStyle`),value:`Film style`},{image:`https://cdn.acedata.cloud/0aaafc79-9094-4a97-a07d-a01f88d276b1.png`,label:this.$t(`midjourney.styleTag.photorealistic`),value:`Photorealistic`},{image:`https://cdn.acedata.cloud/aa6489ad-8b40-46ae-83a6-f636772084e9.png`,label:this.$t(`midjourney.styleTag.logo`),value:`Logo`},{image:`https://cdn.acedata.cloud/e3e96805-6bcd-4608-b012-a8931e75662a.png`,label:this.$t(`midjourney.styleTag.cartoon`),value:`Cartoon`},{image:`https://cdn.acedata.cloud/11d53af4-ec2d-4256-8ddc-18105df57047.png`,label:this.$t(`midjourney.styleTag.marbleStatue`),value:`Marble Statue`},{image:`https://cdn.acedata.cloud/d0109889-d2a6-49ee-9f5c-49f2033966d8.png`,label:this.$t(`midjourney.styleTag.1800S`),value:`1800s`},{image:`https://cdn.acedata.cloud/86a3fb48-1ef0-422a-809a-580892aa0b9d.png`,label:this.$t(`midjourney.styleTag.1980S`),value:`1980s`},{image:`https://cdn.acedata.cloud/8b07aae4-b6f6-45ad-a556-7206b2945025.png`,label:this.$t(`midjourney.styleTag.isometricAnime`),value:`Isometric anime`,advanced:!0},{image:`https://cdn.acedata.cloud/3be49d3c-e431-4bce-b2bb-fc53f763b348.png`,label:this.$t(`midjourney.styleTag.analyticDrawing`),value:`Analytic drawing`,advanced:!0},{image:`https://cdn.acedata.cloud/4d31c2dc-2a0b-4465-b3e8-bffd7c5fed25.png`,label:this.$t(`midjourney.styleTag.coloringBook`),value:`Coloring book`,advanced:!0},{image:`https://cdn.acedata.cloud/a19dde67-65b2-4923-8895-9e960cf050ee.png`,label:this.$t(`midjourney.styleTag.infographicDrawing`),value:`Infographic drawing`,advanced:!0},{image:`https://cdn.acedata.cloud/f57db729-8692-4524-a373-b495d14ec77e.png`,label:this.$t(`midjourney.styleTag.doubleExposure`),value:`Double exposure`,advanced:!0},{image:`https://cdn.acedata.cloud/f8ff8db0-62dc-4414-b309-7fdf2021e45c.png`,label:this.$t(`midjourney.styleTag.diagrammaticDrawing`),value:`Diagrammatic drawing`,advanced:!0},{image:`https://cdn.acedata.cloud/426447cf-dd10-4c91-b928-e7a3aa4c253a.png`,label:this.$t(`midjourney.styleTag.2DIllustration`),value:`2D illustration`,advanced:!0},{image:`https://cdn.acedata.cloud/25e0edfe-776f-4be0-9791-bb729cca81b3.png`,label:this.$t(`midjourney.styleTag.diagrammaticPortrait`),value:`Diagrammatic portrait`,advanced:!0},{image:`https://cdn.acedata.cloud/819c367c-ad03-4bf8-87a9-38ba53aa00f6.png`,label:this.$t(`midjourney.styleTag.pixelArt`),value:`Pixel art`,advanced:!0},{image:`https://cdn.acedata.cloud/2c4bbd7b-fc59-4f38-b844-762bf2366042.png`,label:this.$t(`midjourney.styleTag.darkFantasy`),value:`Dark fantasy`,advanced:!0},{image:`https://cdn.acedata.cloud/bd786eed-e3ee-4e3a-9473-acbd1ee4306c.png`,label:this.$t(`midjourney.styleTag.ukiyoEArt`),value:`Ukiyo-e art`,advanced:!0},{image:`https://cdn.acedata.cloud/1951d276-5502-428a-8694-1b311d8a5540.png`,label:this.$t(`midjourney.styleTag.paperQuilling`),value:`Paper quilling`,advanced:!0},{image:`https://cdn.acedata.cloud/4f9bcc9c-8b0e-47f4-87b9-4b4d78a8891a.png`,label:this.$t(`midjourney.styleTag.paperCutCraft`),value:`Paper cut craft`},{image:`https://cdn.acedata.cloud/4775f61f-446b-4312-b824-c91c6ecdb372.png`,label:this.$t(`midjourney.styleTag.iridescent`),value:`Iridescent`,advanced:!0},{image:`https://cdn.acedata.cloud/29fbc528-56f0-4eb0-a5a2-2312d53d55b4.png`,label:this.$t(`midjourney.styleTag.patchworkCollage`),value:`Patchwork collage`,advanced:!0},{image:`https://cdn.acedata.cloud/aa03b06a-fac8-45ec-830f-2a6e7ecab5c2.png`,label:this.$t(`midjourney.styleTag.opArt`),value:`Op art`,advanced:!0},{image:`https://cdn.acedata.cloud/29015f2a-3c9c-43c5-808a-23fbbb7bcf2f.png`,label:this.$t(`midjourney.styleTag.japaneseInk`),value:`Japanese ink`,advanced:!0},{image:`https://cdn.acedata.cloud/a65f8f7e-46a9-4ccf-8ee5-720d0c222471.png`,label:this.$t(`midjourney.styleTag.pastelDrawing`),value:`Pastel drawing`},{image:`https://cdn.acedata.cloud/a0cda2b1-b227-4230-8842-feab55edd6c7.png`,label:this.$t(`midjourney.styleTag.drippingArt`),value:`Dripping art`},{image:`https://cdn.acedata.cloud/c4aab372-ec55-4a7e-af94-4469f45c23c5.png`,label:this.$t(`midjourney.styleTag.tattooArt`),value:`Tattoo art`,advanced:!0},{image:`https://cdn.acedata.cloud/5040fbb2-6fa7-4e8f-86ac-f23c1c3e291c.png`,label:this.$t(`midjourney.styleTag.16Bit`),value:`16-Bit`,advanced:!0},{image:`https://cdn.acedata.cloud/b67249a1-36fa-443a-8b41-c167a5002e10.png`,label:this.$t(`midjourney.styleTag.8Bit`),value:`8-Bit`,advanced:!0},{image:`https://cdn.acedata.cloud/1c9600b4-6995-4dcb-b363-40ee38049151.png`,label:this.$t(`midjourney.styleTag.amber`),value:`Amber`,advanced:!0},{image:`https://cdn.acedata.cloud/e2d34946-3148-4f92-ad73-40f6f1208516.png`,label:this.$t(`midjourney.styleTag.anatomicalDrawing`),value:`Anatomical Drawing`,advanced:!0},{image:`https://cdn.acedata.cloud/19940f31-037e-4a8f-a71c-605e16ac9631.png`,label:this.$t(`midjourney.styleTag.ancient`),value:`Ancient`},{image:`https://cdn.acedata.cloud/b714b3d9-2f97-49fb-bf85-99a716bf0c78.png`,label:this.$t(`midjourney.styleTag.anime`),value:`Anime`,advanced:!0},{image:`https://cdn.acedata.cloud/d88c3080-cd54-4342-ac91-dac326ee1060.png`,label:this.$t(`midjourney.styleTag.arabic`),value:`Arabic`,advanced:!0},{image:`https://cdn.acedata.cloud/dc54b749-8e69-4252-9b90-fc1448fa9397.png`,label:this.$t(`midjourney.styleTag.blocky`),value:`Blocky`,advanced:!0},{image:`https://cdn.acedata.cloud/d8009295-2f4b-48d8-896e-46d0f5939923.png`,label:this.$t(`midjourney.styleTag.blueprint`),value:`Blueprint`,advanced:!0},{image:`https://cdn.acedata.cloud/5cc39277-16e0-46d6-9310-b0722479713b.png`,label:this.$t(`midjourney.styleTag.comicbook`),value:`Comicbook`,advanced:!0},{image:`https://cdn.acedata.cloud/b9900d01-20bc-408b-9637-779cc22c493c.png`,label:this.$t(`midjourney.styleTag.caribbean`),value:`Caribbean`,advanced:!0},{image:`https://cdn.acedata.cloud/fedabd4e-a9bb-4bb0-a4ec-8fc48bc74c78.png`,label:this.$t(`midjourney.styleTag.celestial`),value:`Celestial`,advanced:!0},{image:`https://cdn.acedata.cloud/00f1f097-1d72-435f-b47d-656f8e194dc2.png`,label:this.$t(`midjourney.styleTag.cellulose`),value:`Cellulose`,advanced:!0},{image:`https://cdn.acedata.cloud/a002bccf-6287-4b28-a5a7-c1cf5cb07734.png`,label:this.$t(`midjourney.styleTag.charcoalStyle`),value:`Charcoal Style`,advanced:!0},{image:`https://cdn.acedata.cloud/e218ab68-e430-4541-9501-02ee2d7aeda9.png`,label:this.$t(`midjourney.styleTag.chromatic`),value:`Chromatic`,advanced:!0},{image:`https://cdn.acedata.cloud/bd5a79d9-c73d-46c3-974f-932751ff8e46.png`,label:this.$t(`midjourney.styleTag.coral`),value:`Coral`,advanced:!0},{image:`https://cdn.acedata.cloud/58dd439c-cae7-434f-9a83-ac6aefd6e417.png`,label:this.$t(`midjourney.styleTag.conceptArt`),value:`Concept Art`,advanced:!0},{image:`https://cdn.acedata.cloud/767fe9f3-69d0-4e16-9060-41e6cf1b1fe1.png`,label:this.$t(`midjourney.styleTag.fibonacci`),value:`Fibonacci`,advanced:!0},{image:`https://cdn.acedata.cloud/4b78ebb1-5091-43d8-a020-88ffb3719edd.png`,label:this.$t(`midjourney.styleTag.cyberpunk`),value:`Cyberpunk`,advanced:!0},{image:`https://cdn.acedata.cloud/34d35d5c-a2e4-4e8e-aafd-3d3c08499389.png`,label:this.$t(`midjourney.styleTag.diabolic`),value:`Diabolic`,advanced:!0},{image:`https://cdn.acedata.cloud/8e29e2b4-4899-491d-a5dc-5ebbb1ff2758.png`,label:this.$t(`midjourney.styleTag.diffractionGrading`),value:`Diffraction Grading`,advanced:!0},{image:`https://cdn.acedata.cloud/996c6d93-94aa-438a-96d5-278e22e54f5f.png`,label:this.$t(`midjourney.styleTag.lightspeed`),value:`Lightspeed`,advanced:!0},{image:`https://cdn.acedata.cloud/57f3ad49-0940-44e2-a31a-a4872497bae7.png`,label:this.$t(`midjourney.styleTag.liquid`),value:`Liquid`,advanced:!0},{image:`https://cdn.acedata.cloud/a9ff43a9-dadf-4bbc-9a7a-72fd3908d39a.png`,label:this.$t(`midjourney.styleTag.dots`),value:`Dots`,advanced:!0},{image:`https://cdn.acedata.cloud/acff2bf9-1907-4a0f-be23-897c71caf60e.png`,label:this.$t(`midjourney.styleTag.dune`),value:`Dune`,advanced:!0},{image:`https://cdn.acedata.cloud/4a2abc45-ba65-4e2d-8399-8d44491c8a64.png`,label:this.$t(`midjourney.styleTag.drippingPaint`),value:`Dripping Paint`,advanced:!0},{image:`https://cdn.acedata.cloud/7dc4e93f-07a8-45ec-9e8a-89c3f619fd40.png`,label:this.$t(`midjourney.styleTag.electronicCircuitry`),value:`Electronic Circuitry`,advanced:!0},{image:`https://cdn.acedata.cloud/cf502cba-ee64-41fd-a388-93f6357fc7cc.png`,label:this.$t(`midjourney.styleTag.electrical`),value:`Electrical`,advanced:!0},{image:`https://cdn.acedata.cloud/fd6a696b-3102-4301-8fce-5a7fd401231a.png`,label:this.$t(`midjourney.styleTag.futuristic`),value:`Futuristic`,advanced:!0},{image:`https://cdn.acedata.cloud/0fe8fca5-b3d9-4fab-b390-fff7c0f4f594.png`,label:this.$t(`midjourney.styleTag.etching`),value:`Etching`,advanced:!0},{image:`https://cdn.acedata.cloud/46577726-f0ab-4750-81c6-0d4d865ba4bd.png`,label:this.$t(`midjourney.styleTag.extraterrestrial`),value:`Extraterrestrial`,advanced:!0},{image:`https://cdn.acedata.cloud/faa06af4-9988-4e39-9f13-ecdd29e1e20a.png`,label:this.$t(`midjourney.styleTag.glitchart`),value:`Glitchart`,advanced:!0},{image:`https://cdn.acedata.cloud/4380f6af-aaeb-41fd-bcaf-2efadcc3e08f.png`,label:this.$t(`midjourney.styleTag.floral`),value:`Floral`,advanced:!0},{image:`https://cdn.acedata.cloud/096683c4-8e91-4ef0-8211-8a6dcef5298d.png`,label:this.$t(`midjourney.styleTag.fractal`),value:`Fractal`,advanced:!0},{image:`https://cdn.acedata.cloud/10ce713b-a5bc-400b-a0c8-bcec4f7e6548.png`,label:this.$t(`midjourney.styleTag.preHistoric`),value:`Pre Historic`,advanced:!0},{image:`https://cdn.acedata.cloud/6382ad4e-1818-4ab1-b493-10afdb43c196.png`,label:this.$t(`midjourney.styleTag.prokaryotic`),value:`Prokaryotic`,advanced:!0},{image:`https://cdn.acedata.cloud/48205fb3-e48b-4219-ad53-d307e1e686a7.png`,label:this.$t(`midjourney.styleTag.horror`),value:`Horror`,advanced:!0},{image:`https://cdn.acedata.cloud/d0567b20-8f93-4b16-a775-8ca0708a7a50.png`,label:this.$t(`midjourney.styleTag.iceAge`),value:`Ice Age`,advanced:!0},{image:`https://cdn.acedata.cloud/cc1455a5-c139-400d-8a54-121176f196e1.png`,label:this.$t(`midjourney.styleTag.jurassic`),value:`Jurassic`,advanced:!0},{image:`https://cdn.acedata.cloud/84e2bfe2-60bb-4323-936b-18dbb1c8cfa1.png`,label:this.$t(`midjourney.styleTag.knitted`),value:`Knitted`,advanced:!0},{image:`https://cdn.acedata.cloud/2e1ffddf-daa1-4e57-bc92-d16484ef8e34.png`,label:this.$t(`midjourney.styleTag.polka`),value:`Polka`,advanced:!0},{image:`https://cdn.acedata.cloud/9c2670df-3e39-45a7-ad76-ae17502d018f.png`,label:this.$t(`midjourney.styleTag.latex`),value:`Latex`,advanced:!0},{image:`https://cdn.acedata.cloud/d4de1735-235d-461d-b93f-2bf3c280ccfe.png`,label:this.$t(`midjourney.styleTag.pastel`),value:`Pastel`,advanced:!0},{image:`https://cdn.acedata.cloud/37f26555-f634-4964-8bac-ec8a955273d4.png`,label:this.$t(`midjourney.styleTag.mandala`),value:`Mandala`,advanced:!0},{image:`https://cdn.acedata.cloud/f62aa376-1378-45a6-abd0-71bc7bbe49c7.png`,label:this.$t(`midjourney.styleTag.molecular`),value:`Molecular`,advanced:!0},{image:`https://cdn.acedata.cloud/fc135428-1835-453d-afef-aaf72a7cfcbc.png`,label:this.$t(`midjourney.styleTag.merkaba`),value:`Merkaba`,advanced:!0},{image:`https://cdn.acedata.cloud/5caf594b-0f0c-455f-b8a8-8c15a189d0dc.png`,label:this.$t(`midjourney.styleTag.mitochondria`),value:`Mitochondria`,advanced:!0},{image:`https://cdn.acedata.cloud/088e3067-0abe-4f3d-bcb8-f6937e860d1e.png`,label:this.$t(`midjourney.styleTag.graffiti`),value:`Graffiti`,advanced:!0},{image:`https://cdn.acedata.cloud/06230561-916a-4bc5-ad85-9386cf27bf1c.png`,label:this.$t(`midjourney.styleTag.graphicNovel`),value:`Graphic Novel`,advanced:!0},{image:`https://cdn.acedata.cloud/e47f7931-d588-4c4a-87c8-3f7137e7f727.png`,label:this.$t(`midjourney.styleTag.multidimensional`),value:`Multidimensional`,advanced:!0},{image:`https://cdn.acedata.cloud/d2443c93-3227-4216-afd1-b86287ac5140.png`,label:this.$t(`midjourney.styleTag.nasa`),value:`NASA`,advanced:!0},{image:`https://cdn.acedata.cloud/a86a2f67-273c-4edf-9be9-ceecc983c93d.png`,label:this.$t(`midjourney.styleTag.nebula`),value:`Nebula`,advanced:!0},{image:`https://cdn.acedata.cloud/ad1e588c-5892-48ee-a7c2-103c2b4868fc.png`,label:this.$t(`midjourney.styleTag.neon`),value:`Neon`},{image:`https://cdn.acedata.cloud/5a133976-208e-460f-8296-a4ad19809490.png`,label:this.$t(`midjourney.styleTag.nuclear`),value:`Nuclear`,advanced:!0},{image:`https://cdn.acedata.cloud/c99f5082-314b-49e9-8875-b40319ed3cfc.png`,label:this.$t(`midjourney.styleTag.orbital`),value:`Orbital`,advanced:!0},{image:`https://cdn.acedata.cloud/63809059-6ae6-49ff-ad96-ed4ae45a2464.png`,label:this.$t(`midjourney.styleTag.rayTracing`),value:`Ray Tracing`,advanced:!0},{image:`https://cdn.acedata.cloud/cdcf0c05-e7ad-421e-b513-640bcc3d04cc.png`,label:this.$t(`midjourney.styleTag.realistic`),value:`Realistic`},{image:`https://cdn.acedata.cloud/019dc7be-b0e2-4da2-94d4-191226d58dbf.png`,label:this.$t(`midjourney.styleTag.renaissance`),value:`Renaissance`,advanced:!0},{image:`https://cdn.acedata.cloud/d46d3c03-a924-4a0f-b032-e8dbca6ad37e.png`,label:this.$t(`midjourney.styleTag.retro`),value:`Retro`},{image:`https://cdn.acedata.cloud/bc13e200-6865-474b-8fe4-cf0725cf3caf.png`,label:this.$t(`midjourney.styleTag.risograph`),value:`Risograph`,advanced:!0},{image:`https://cdn.acedata.cloud/f8533acc-807b-4f03-8f39-338ee6ff5d53.png`,label:this.$t(`midjourney.styleTag.origami`),value:`Origami`,advanced:!0},{image:`https://cdn.acedata.cloud/b0ff3593-aef3-4dd2-a5f4-548c6febb2e2.png`,label:this.$t(`midjourney.styleTag.ornamental`),value:`Ornamental`,advanced:!0},{image:`https://cdn.acedata.cloud/002c6a5d-b251-43bb-b713-d133f828c0a4.png`,label:this.$t(`midjourney.styleTag.space`),value:`Space`,advanced:!0},{image:`https://cdn.acedata.cloud/641327df-93cc-4746-a55e-667dbb8c1563.png`,label:this.$t(`midjourney.styleTag.splatterPaint`),value:`Splatter Paint`,advanced:!0},{image:`https://cdn.acedata.cloud/42527f9e-6cf0-40a6-bc9b-361d2baf9bf9.png`,label:this.$t(`midjourney.styleTag.sprayPaint`),value:`Spray Paint`,advanced:!0},{image:`https://cdn.acedata.cloud/98bf8e01-9dd8-434b-81df-77cfd3627243.png`,label:this.$t(`midjourney.styleTag.squiggles`),value:`Squiggles`,advanced:!0},{image:`https://cdn.acedata.cloud/26868352-5d9a-4bcc-9926-166927a2be35.png`,label:this.$t(`midjourney.styleTag.stitching`),value:`Stitching`,advanced:!0},{image:`https://cdn.acedata.cloud/23819218-bdbc-4746-a507-7664836a4f59.png`,label:this.$t(`midjourney.styleTag.veins`),value:`Veins`,advanced:!0},{image:`https://cdn.acedata.cloud/2fd3de3d-7211-4cce-b63b-a857d7621c72.png`,label:this.$t(`midjourney.styleTag.streetArt`),value:`Street Art`,advanced:!0},{image:`https://cdn.acedata.cloud/80422ede-79fb-4149-bd0a-85bf0ac75a3d.png`,label:this.$t(`midjourney.styleTag.surreal`),value:`Surreal`},{image:`https://cdn.acedata.cloud/94956306-55de-470b-8a2a-28354d0e556f.png`,label:this.$t(`midjourney.styleTag.symmetric`),value:`Symmetric`,advanced:!0},{image:`https://cdn.acedata.cloud/0098f2a0-b089-4e64-8a86-ffa137605087.png`,label:this.$t(`midjourney.styleTag.synthWave`),value:`Synth-wave`,advanced:!0},{image:`https://cdn.acedata.cloud/f50d33b2-9c91-4939-8f2d-7b5ce185d138.png`,label:this.$t(`midjourney.styleTag.technological`),value:`Technological`,advanced:!0},{image:`https://cdn.acedata.cloud/a446a6eb-444c-4073-8a8e-6f43e65491c2.png`,label:this.$t(`midjourney.styleTag.tron`),value:`Tron`,advanced:!0},{image:`https://cdn.acedata.cloud/8026ccad-aa11-4b0d-ad81-eb870a695a81.png`,label:this.$t(`midjourney.styleTag.tropical`),value:`Tropical`,advanced:!0},{image:`https://cdn.acedata.cloud/22c16c64-068c-470e-9b80-2849297aad9a.png`,label:this.$t(`midjourney.styleTag.ultraModern`),value:`Ultra Modern`},{image:`https://cdn.acedata.cloud/f67bd4b6-3f43-4da8-bdcb-67cd39cb38f9.png`,label:this.$t(`midjourney.styleTag.wormhole`),value:`Wormhole`,advanced:!0},{image:`https://cdn.acedata.cloud/2e2a1ca9-8791-41c6-9ff0-0ac21a13d1c5.png`,label:this.$t(`midjourney.styleTag.wrinkled`),value:`Wrinkled`,advanced:!0},{image:`https://cdn.acedata.cloud/3507c78d-a065-462c-a17c-fd5ed4677644.png`,label:this.$t(`midjourney.styleTag.volcanic`),value:`Volcanic`,advanced:!0},{image:`https://cdn.acedata.cloud/69263783-0610-45b0-9ec4-acac961da092.png`,label:this.$t(`midjourney.styleTag.wetPaint`),value:`Wet Paint`,advanced:!0},{image:`https://cdn.acedata.cloud/9022fc82-d6f7-47e2-90b1-ad96fbba5257.png`,label:this.$t(`midjourney.styleTag.wildWest`),value:`Wild West`,advanced:!0},{image:`https://cdn.acedata.cloud/23de882d-4e5d-40b5-9f00-d0573c443212.png`,label:this.$t(`midjourney.styleTag.wind`),value:`Wind`,advanced:!0},{image:`https://cdn.acedata.cloud/e3a58af1-79bc-48f3-871c-36472da2584b.png`,label:this.$t(`midjourney.styleTag.miniatureFaking`),value:`Miniature Faking`,advanced:!0}]},lighting:{displayName:this.$t(`midjourney.styleCategory.lighting`),items:[{image:`https://cdn.acedata.cloud/a4b9110f-e838-4c52-8ab8-f2637ea753df.png`,label:this.$t(`midjourney.styleTag.accentLighting`),value:`Accent Lighting`},{image:`https://cdn.acedata.cloud/c4c16a69-28d7-4b38-8ea2-3ce49d5c6b07.png`,label:this.$t(`midjourney.styleTag.backlight`),value:`Backlight`},{image:`https://cdn.acedata.cloud/7fd2cd5c-7671-4b40-85a0-230de9c37234.png`,label:this.$t(`midjourney.styleTag.blacklight`),value:`Blacklight`,advanced:!0},{image:`https://cdn.acedata.cloud/a08bff6e-8a0f-4d56-aa91-576f0a9921f2.png`,label:this.$t(`midjourney.styleTag.goldenHourLight`),value:`Golden hour light`,advanced:!0},{image:`https://cdn.acedata.cloud/3cd28696-493f-4b3e-9187-9d1a4c17e95b.png`,label:this.$t(`midjourney.styleTag.candlelight`),value:`Candlelight`},{image:`https://cdn.acedata.cloud/58c9a17e-f7d5-4481-abc8-9e9b66609a4d.png`,label:this.$t(`midjourney.styleTag.concertLighting`),value:`Concert Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/efb8893c-8bd6-4c7d-8e45-6e0626f69479.png`,label:this.$t(`midjourney.styleTag.crepuscularRays`),value:`Crepuscular Rays`,advanced:!0},{image:`https://cdn.acedata.cloud/27b90e83-09b0-4339-9b2c-48fe6fe45bdd.png`,label:this.$t(`midjourney.styleTag.directSunlight`),value:`Direct Sunlight`},{image:`https://cdn.acedata.cloud/d33cb17d-e2a5-4ca3-b68a-93904d2618d7.png`,label:this.$t(`midjourney.styleTag.dust`),value:`Dust`,advanced:!0},{image:`https://cdn.acedata.cloud/3af133d0-5a86-45a9-a16e-f23e6cc68b24.png`,label:this.$t(`midjourney.styleTag.studioLighting`),value:`Studio lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/6bc889b1-a563-4890-9117-7d3ded276caa.png`,label:this.$t(`midjourney.styleTag.rimLight`),value:`Rim light`,advanced:!0},{image:`https://cdn.acedata.cloud/d770265a-066b-413f-a405-a52d68e2f1c7.png`,label:this.$t(`midjourney.styleTag.volumetricLighting`),value:`Volumetric Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/7c83560a-6837-43b2-b296-f74db549accf.png`,label:this.$t(`midjourney.styleTag.fluorescent`),value:`Fluorescent`},{image:`https://cdn.acedata.cloud/6ffc8688-dfd0-4ede-a6bc-91bf8679adc9.png`,label:this.$t(`midjourney.styleTag.glowing`),value:`Glowing`,advanced:!0},{image:`https://cdn.acedata.cloud/63bc0645-ab94-4327-84b8-e226020c6c0f.png`,label:this.$t(`midjourney.styleTag.glowStick`),value:`Glow-stick`,advanced:!0},{image:`https://cdn.acedata.cloud/824111e9-7ebf-47ec-80ef-a6ad0a1d949b.png`,label:this.$t(`midjourney.styleTag.glowRadioactive`),value:`Glow Radioactive`,advanced:!0},{image:`https://cdn.acedata.cloud/9d23de16-57b3-42be-89d2-478de2666483.png`,label:this.$t(`midjourney.styleTag.lavaGlow`),value:`Lava Glow`,advanced:!0},{image:`https://cdn.acedata.cloud/d801ee47-02a0-455d-b333-76ad73a4fdcd.png`,label:this.$t(`midjourney.styleTag.moonlight`),value:`Moonlight`},{image:`https://cdn.acedata.cloud/6d1400a8-e168-46c9-89e8-5e701f8824b2.png`,label:this.$t(`midjourney.styleTag.naturalLighting`),value:`Natural Lighting`},{image:`https://cdn.acedata.cloud/9bb6c4ce-9076-41eb-8ace-43a4fa7e0c03.png`,label:this.$t(`midjourney.styleTag.neonLamp`),value:`Neon Lamp`},{image:`https://cdn.acedata.cloud/ac3fe310-3639-4fc0-b56e-4d69278bc2ca.png`,label:this.$t(`midjourney.styleTag.nightclubLighting`),value:`Nightclub Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/c9331a92-87d2-43b5-9319-24c8629bffd1.png`,label:this.$t(`midjourney.styleTag.nuclearWasteGlo`),value:`Nuclear Waste Glo`,advanced:!0},{image:`https://cdn.acedata.cloud/40ccdbfb-84a7-49f7-9999-92db58802c65.png`,label:this.$t(`midjourney.styleTag.quantumDot`),value:`Quantum Dot`,advanced:!0},{image:`https://cdn.acedata.cloud/d5411604-4e66-4187-9b37-48eb683be65e.png`,label:this.$t(`midjourney.styleTag.spotlight`),value:`Spotlight`},{image:`https://cdn.acedata.cloud/b1f16a4b-fb3d-4783-9c66-c3567e79baeb.png`,label:this.$t(`midjourney.styleTag.edgeLight`),value:`Edge light`,advanced:!0},{image:`https://cdn.acedata.cloud/97fecbc1-a164-48e2-bdf0-c69975c16d63.png`,label:this.$t(`midjourney.styleTag.coldLight`),value:`Cold light`},{image:`https://cdn.acedata.cloud/7087f2fe-f48c-4b72-95bc-c697b56e8b0e.png`,label:this.$t(`midjourney.styleTag.keyLighting`),value:`Key lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/5ab92c7e-bca1-4fbc-8975-6d9fb3f15626.png`,label:this.$t(`midjourney.styleTag.ambientLight`),value:`Ambient Light`,advanced:!0},{image:`https://cdn.acedata.cloud/ac80d283-5532-4664-bbe5-42fbb9582a63.png`,label:this.$t(`midjourney.styleTag.highKeyLighting`),value:`High key lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/add3524d-fc90-45a8-9edc-348bb1f79075.png`,label:this.$t(`midjourney.styleTag.lowKeyLighting`),value:`Low key lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/42174ff8-3080-4004-9ae2-c2ff919e1145.png`,label:this.$t(`midjourney.styleTag.motivatedLighting`),value:`Motivated lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/09f3d509-a366-44dc-be3b-b39712d0fac1.png`,label:this.$t(`midjourney.styleTag.3PointLighting`),value:`3 point lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/794a114e-cd4d-4e83-a187-5e979296d125.png`,label:this.$t(`midjourney.styleTag.strobeLight`),value:`Strobe light`,advanced:!0},{image:`https://cdn.acedata.cloud/9e6ec476-3ac8-4246-964f-a1d89a6d19e9.png`,label:this.$t(`midjourney.styleTag.sunLight`),value:`Sun light`},{image:`https://cdn.acedata.cloud/4360a40b-2126-43c2-be8e-e482978e1ea6.png`,label:this.$t(`midjourney.styleTag.ultraviolet`),value:`Ultraviolet`,advanced:!0},{image:`https://cdn.acedata.cloud/8b6bea86-9ed1-4fc8-9040-8fc2b64abbff.png`,label:this.$t(`midjourney.styleTag.beautifulLighting`),value:`Beautiful Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/a8d1f754-fb35-433d-8a36-e073b0fe6fa2.png`,label:this.$t(`midjourney.styleTag.moodyLighting`),value:`Moody Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/77270807-ca3b-4d02-a9b4-badf8aa48c36.png`,label:this.$t(`midjourney.styleTag.softLighting`),value:`Soft Lighting`}]},artists:{displayName:this.$t(`midjourney.styleCategory.artists`),items:[{image:`https://cdn.acedata.cloud/160cfc29-f258-4795-b663-f687adba19bf.png`,label:this.$t(`midjourney.styleTag.michelangelo`),value:`Michelangelo`},{image:`https://cdn.acedata.cloud/ed0bf2ad-138d-4c8d-bce9-a98299b1ee83.png`,label:this.$t(`midjourney.styleTag.monet`),value:`Monet`},{image:`https://cdn.acedata.cloud/58d9b130-e7b2-4eb8-a71e-7108b3bd4c26.png`,label:this.$t(`midjourney.styleTag.paulCezanne`),value:`Paul Cezanne`,advanced:!0},{image:`https://cdn.acedata.cloud/1247615a-6e75-49e6-842a-b0fb84016d3d.png`,label:this.$t(`midjourney.styleTag.markRothko`),value:`Mark Rothko`,advanced:!0},{image:`https://cdn.acedata.cloud/a7d9d9dd-8add-43d3-942e-8d1199fe277f.png`,label:this.$t(`midjourney.styleTag.paulKlee`),value:`Paul Klee`,advanced:!0},{image:`https://cdn.acedata.cloud/caf5701a-b652-4fab-8467-0c00303d01f3.png`,label:this.$t(`midjourney.styleTag.picasso`),value:`Picasso`},{image:`https://cdn.acedata.cloud/fbb63634-659a-4d2d-bc7b-0fb3399f7061.png`,label:this.$t(`midjourney.styleTag.pietMondrian`),value:`Piet Mondrian`,advanced:!0},{image:`https://cdn.acedata.cloud/29fb173b-17b4-4b05-a63c-e31ce161fe8c.png`,label:this.$t(`midjourney.styleTag.pierreAugusteRer`),value:`Pierre Auguste Rer`,advanced:!0},{image:`https://cdn.acedata.cloud/556f8a48-0b12-49a7-b150-aed40278d3f6.png`,label:this.$t(`midjourney.styleTag.rembrandt`),value:`Rembrandt`},{image:`https://cdn.acedata.cloud/b44d947e-2a14-4db2-880d-332c1aeeb303.png`,label:this.$t(`midjourney.styleTag.reneMagritte`),value:`Rene Magritte`,advanced:!0},{image:`https://cdn.acedata.cloud/0cfcda4a-7e7f-4ec4-ad4f-b4877a900a50.png`,label:this.$t(`midjourney.styleTag.royLichtenstein`),value:`Roy Lichtenstein`,advanced:!0},{image:`https://cdn.acedata.cloud/e592bf88-d9b8-4787-88dd-9ff8e7e9268c.png`,label:this.$t(`midjourney.styleTag.salvadorDali`),value:`Salvador Dali`,advanced:!0},{image:`https://cdn.acedata.cloud/3bbde342-565b-4ea0-8a4c-42b3c109c205.png`,label:this.$t(`midjourney.styleTag.sandroBotticelli`),value:`Sandro Botticelli`,advanced:!0},{image:`https://cdn.acedata.cloud/bfdf6d50-24ab-4b5c-a3de-c8d77d858b04.png`,label:this.$t(`midjourney.styleTag.takashiMurakami`),value:`Takashi Murakami`,advanced:!0},{image:`https://cdn.acedata.cloud/bc67c0ba-614f-46f0-a6ec-047fa561fc01.png`,label:this.$t(`midjourney.styleTag.vanGogh`),value:`Van Gogh`},{image:`https://cdn.acedata.cloud/984a18fa-8050-4084-95d5-732b7ede8e37.png`,label:this.$t(`midjourney.styleTag.wassilyKandinsky`),value:`Wassily Kandinsky`,advanced:!0},{image:`https://cdn.acedata.cloud/48bce45c-6b25-4678-9be8-40707c8e5f43.png`,label:this.$t(`midjourney.styleTag.matCollishaw`),value:`Mat Collishaw`,advanced:!0},{image:`https://cdn.acedata.cloud/6b2851d0-ec8d-4c07-86ed-1eafdd70e1fe.png`,label:this.$t(`midjourney.styleTag.yayoiKusama`),value:`Yayoi Kusama`,advanced:!0},{image:`https://cdn.acedata.cloud/9d691d5c-5560-409b-b998-c979b29902e6.png`,label:this.$t(`midjourney.styleTag.igorMorski`),value:`Igor Morski`,advanced:!0},{image:`https://cdn.acedata.cloud/950cb143-ab40-4bee-80f7-092d0c2a7bc4.png`,label:this.$t(`midjourney.styleTag.shinkaiMakoto`),value:`Shinkai Makoto`},{image:`https://cdn.acedata.cloud/94adf414-a1cc-4b84-b52d-18cd2586df17.png`,label:this.$t(`midjourney.styleTag.pixar`),value:`Pixar`},{image:`https://cdn.acedata.cloud/ccd4d148-e332-4d7e-bbe6-9f1dd68082a8.png`,label:this.$t(`midjourney.styleTag.kyotoAnime`),value:`Kyoto Anime`},{image:`https://cdn.acedata.cloud/b5f5f99a-be40-4fa7-a86a-fd51578a4052.png`,label:this.$t(`midjourney.styleTag.jerryPinkney`),value:`Jerry Pinkney`,advanced:!0},{image:`https://cdn.acedata.cloud/7a4dba74-21ad-4088-89da-6a48104d811d.png`,label:this.$t(`midjourney.styleTag.hayaoMiyazaki`),value:`Hayao Miyazaki`},{image:`https://cdn.acedata.cloud/28477b7e-85d4-4803-b525-938aa2ce3383.png`,label:this.$t(`midjourney.styleTag.beatrixPotter`),value:`Beatrix Potter`,advanced:!0},{image:`https://cdn.acedata.cloud/13854cb8-c478-43c9-9f51-8ac1933b1498.png`,label:this.$t(`midjourney.styleTag.jonKlassen`),value:`Jon Klassen`,advanced:!0},{image:`https://cdn.acedata.cloud/6685c7e0-ea11-488b-a8a0-610032020dfb.png`,label:this.$t(`midjourney.styleTag.kaySage`),value:`Kay Sage`,advanced:!0},{image:`https://cdn.acedata.cloud/cb0c3490-dcd4-488f-96e0-45b9ee671182.png`,label:this.$t(`midjourney.styleTag.jeffreyCatherineJones`),value:`Jeffrey Catherine Jones`,advanced:!0},{image:`https://cdn.acedata.cloud/72f000c5-d8d6-4015-acd4-79961e53ac50.png`,label:this.$t(`midjourney.styleTag.yaacovAgam`),value:`Yaacov Agam`,advanced:!0},{image:`https://cdn.acedata.cloud/f1bd0c4d-af96-4785-99bb-3a70b7f80834.png`,label:this.$t(`midjourney.styleTag.davidHockney`),value:`David Hockney`,advanced:!0},{image:`https://cdn.acedata.cloud/ad0e89d9-214a-4599-90f1-ee5dc0b5592d.png`,label:this.$t(`midjourney.styleTag.victorMoscoso`),value:`Victor Moscoso`,advanced:!0},{image:`https://cdn.acedata.cloud/c3b004e0-f583-4a75-b6cf-0cc60c89b2cf.png`,label:this.$t(`midjourney.styleTag.raphaelite`),value:`Raphaelite`},{image:`https://cdn.acedata.cloud/9c59d174-1e1f-4ef9-b657-1beb57f58088.png`,label:this.$t(`midjourney.styleTag.stefanKoidl`),value:`Stefan Koidl`,advanced:!0},{image:`https://cdn.acedata.cloud/09485865-35a8-4456-a34c-65a8a1c8d2c2.png`,label:this.$t(`midjourney.styleTag.suiIshida`),value:`Sui Ishida`,advanced:!0},{image:`https://cdn.acedata.cloud/31442dfd-d6a8-4674-aade-8543190251b4.png`,label:this.$t(`midjourney.styleTag.swoon`),value:`Swoon`,advanced:!0},{image:`https://cdn.acedata.cloud/842beff4-d333-4388-9880-eec6fd4baa6c.png`,label:this.$t(`midjourney.styleTag.tashaTudor`),value:`Tasha Tudor`,advanced:!0},{image:`https://cdn.acedata.cloud/68c419f3-6f2c-4fbd-a251-ce289d4a9890.png`,label:this.$t(`midjourney.styleTag.tintoretto`),value:`Tintoretto`,advanced:!0},{image:`https://cdn.acedata.cloud/9a3d95da-5019-4fdd-83b9-ec334e609c9d.png`,label:this.$t(`midjourney.styleTag.theodoreRobinsor`),value:`Theodore Robinsor`,advanced:!0},{image:`https://cdn.acedata.cloud/e11cb0a6-2f0e-4d8d-aa0e-8b7378423790.png`,label:this.$t(`midjourney.styleTag.titian`),value:`Titian`,advanced:!0},{image:`https://cdn.acedata.cloud/d3e59ba8-10e6-4d58-a732-e35d579cd3fc.png`,label:this.$t(`midjourney.styleTag.wlop`),value:`WLOP`,advanced:!0},{image:`https://cdn.acedata.cloud/70f22f51-9328-4070-b9aa-578db7d4c502.png`,label:this.$t(`midjourney.styleTag.yanjunCheng`),value:`Yanjun Cheng`,advanced:!0},{image:`https://cdn.acedata.cloud/e1203ff8-cb64-409e-8ba6-06f89645a843.png`,label:this.$t(`midjourney.styleTag.yojiShinkawa`),value:`Yoji Shinkawa`,advanced:!0},{image:`https://cdn.acedata.cloud/6b6d7746-e38b-44db-98d8-51d59ed7531f.png`,label:this.$t(`midjourney.styleTag.zhelongXu`),value:`Zhelong Xu`,advanced:!0},{image:`https://cdn.acedata.cloud/13b9621b-ff7e-4377-9550-0ca82d0f1afb.png`,label:this.$t(`midjourney.styleTag.alenaAenami`),value:`Alena Aenami`,advanced:!0},{image:`https://cdn.acedata.cloud/26d30765-3201-49e9-a4a9-c7c3b8c071ef.png`,label:this.$t(`midjourney.styleTag.anntonFadeevi`),value:`Annton Fadeevi`,advanced:!0},{image:`https://cdn.acedata.cloud/9b4c2bc7-16a8-4807-ad0e-ee9bdc80f1a0.png`,label:this.$t(`midjourney.styleTag.charlieBowater`),value:`Charlie Bowater`,advanced:!0},{image:`https://cdn.acedata.cloud/2f50d67e-3d7e-4e06-a198-5926ce7f357d.png`,label:this.$t(`midjourney.styleTag.coryLoftis`),value:`Cory Loftis`,advanced:!0},{image:`https://cdn.acedata.cloud/47823270-16a6-49cc-a11d-99122a037c68.png`,label:this.$t(`midjourney.styleTag.fenghuaZhong`),value:`Fenghua Zhong`,advanced:!0},{image:`https://cdn.acedata.cloud/1a66b5fd-cbf9-4e09-b817-6effed77b5c2.png`,label:this.$t(`midjourney.styleTag.gregRutkowski`),value:`Greg Rutkowski`,advanced:!0},{image:`https://cdn.acedata.cloud/d05a459a-132b-45a8-b2f3-a978eeeb44af.png`,label:this.$t(`midjourney.styleTag.hongSoonsang`),value:`Hong SoonSang`,advanced:!0},{image:`https://cdn.acedata.cloud/020dbf7f-f026-47bd-90f1-4049407409a1.png`,label:this.$t(`midjourney.styleTag.dennisStock`),value:`Dennis Stock`,advanced:!0},{image:`https://cdn.acedata.cloud/9c1ccc1d-121e-4182-aea0-04eac840869d.png`,label:this.$t(`midjourney.styleTag.michalLisowski`),value:`Michal Lisowski`,advanced:!0},{image:`https://cdn.acedata.cloud/3292404b-e654-4c06-bcd6-5e47a2adf329.png`,label:this.$t(`midjourney.styleTag.paulLehr`),value:`Paul Lehr`,advanced:!0},{image:`https://cdn.acedata.cloud/079c6053-23ad-4dc9-8166-64c5fe2f1e1a.png`,label:this.$t(`midjourney.styleTag.rossTran`),value:`Ross Tran`,advanced:!0},{image:`https://cdn.acedata.cloud/0f267ba1-c031-4008-9ead-630a4bec886a.png`,label:this.$t(`midjourney.styleTag.antonPieck`),value:`Anton Pieck`,advanced:!0},{image:`https://cdn.acedata.cloud/574dd25f-2116-4718-aed6-7d9be3636e22.png`,label:this.$t(`midjourney.styleTag.carlBarks`),value:`Carl Barks`,advanced:!0},{image:`https://cdn.acedata.cloud/38dcdfb5-0003-46f4-8c9d-5857c95f9e59.png`,label:this.$t(`midjourney.styleTag.alphonseMucha`),value:`Alphonse Mucha`,advanced:!0},{image:`https://cdn.acedata.cloud/65f2af96-e875-41f8-9797-3d34dbdf0ea4.png`,label:this.$t(`midjourney.styleTag.andyWarhol`),value:`Andy Warhol`,advanced:!0},{image:`https://cdn.acedata.cloud/801224a0-da77-4095-8799-d288d1ec3c3d.png`,label:this.$t(`midjourney.styleTag.banksy`),value:`Banksy`,advanced:!0},{image:`https://cdn.acedata.cloud/925c6c86-9b69-45ce-a10d-a2c64d4e0db2.png`,label:this.$t(`midjourney.styleTag.franciscoDeGoya`),value:`Francisco De Goya`,advanced:!0},{image:`https://cdn.acedata.cloud/fbb81b10-c579-4dcc-a76a-c099dc0b6c20.png`,label:this.$t(`midjourney.styleTag.caravaggio`),value:`Caravaggio`,advanced:!0},{image:`https://cdn.acedata.cloud/116efedd-42ea-404e-959e-607a9766001a.png`,label:this.$t(`midjourney.styleTag.diegoRivera`),value:`Diego Rivera`,advanced:!0},{image:`https://cdn.acedata.cloud/6f2c1d37-f8ae-4d72-8db1-d9fb04df7114.png`,label:this.$t(`midjourney.styleTag.davidHockney`),value:`David Hockney`,advanced:!0},{image:`https://cdn.acedata.cloud/b74b6b97-f6d7-4a34-840c-a81c69b9d941.png`,label:this.$t(`midjourney.styleTag.marcChagall`),value:`Marc Chagall`},{image:`https://cdn.acedata.cloud/f18ac9a3-a986-4670-813b-6fb81060ed48.png`,label:this.$t(`midjourney.styleTag.edgarDegas`),value:`Edgar Degas`,advanced:!0},{image:`https://cdn.acedata.cloud/275b32e5-9995-46cc-babc-43a0d1aa5d19.png`,label:this.$t(`midjourney.styleTag.eugeneDelacroix`),value:`Eugene Delacroix`,advanced:!0},{image:`https://cdn.acedata.cloud/500edde5-973c-4ba4-aae1-1a3d53a9b27f.png`,label:this.$t(`midjourney.styleTag.francisBacon`),value:`Francis Bacon`,advanced:!0},{image:`https://cdn.acedata.cloud/f7b5cc34-a796-4f45-823c-07122ec46ef6.png`,label:this.$t(`midjourney.styleTag.fridaKahlo`),value:`Frida Kahlo`,advanced:!0},{image:`https://cdn.acedata.cloud/7e41ead3-f54f-4d5f-8353-b2770d75c41b.png`,label:this.$t(`midjourney.styleTag.garaldBrom`),value:`Garald Brom`,advanced:!0},{image:`https://cdn.acedata.cloud/4a46247a-cd9b-48fd-b247-8268d9a891bf.png`,label:this.$t(`midjourney.styleTag.gustavKlimt`),value:`Gustav Klimt`,advanced:!0},{image:`https://cdn.acedata.cloud/3793eae9-61e9-4f16-9c0c-a77c194c45bc.png`,label:this.$t(`midjourney.styleTag.henriMatisse`),value:`Henri Matisse`,advanced:!0},{image:`https://cdn.acedata.cloud/dffa261d-755b-483d-88b7-058c09efd6af.png`,label:this.$t(`midjourney.styleTag.jackKirby`),value:`Jack Kirby`,advanced:!0},{image:`https://cdn.acedata.cloud/4cda1423-455b-463f-981d-b2af8ae1dd95.png`,label:this.$t(`midjourney.styleTag.jacksonPollock`),value:`Jackson Pollock`,advanced:!0},{image:`https://cdn.acedata.cloud/d318e4bc-d69f-4e7a-b6ae-49557e3cd569.png`,label:this.$t(`midjourney.styleTag.johannesVermeer`),value:`Johannes Vermeer`,advanced:!0},{image:`https://cdn.acedata.cloud/4ee7f9d2-01c0-4043-90f3-0174878a2ce7.png`,label:this.$t(`midjourney.styleTag.jeanMichelBasquiat`),value:`Jean Michel Basquiat`,advanced:!0},{image:`https://cdn.acedata.cloud/f60eb307-78b3-4f5e-bfd9-07603bc383c9.png`,label:this.$t(`midjourney.styleTag.marcelDuchamp`),value:`Marcel Duchamp`,advanced:!0}]},material:{displayName:this.$t(`midjourney.styleCategory.material`),items:[{image:`https://cdn.acedata.cloud/f2ce056d-6a89-4b40-b026-5a60cbb1efda.png`,label:this.$t(`midjourney.styleTag.aluminum`),value:`Aluminum`},{image:`https://cdn.acedata.cloud/069c6b1f-0666-4df6-bde6-a1729b33ade1.png`,label:this.$t(`midjourney.styleTag.brick`),value:`Brick`},{image:`https://cdn.acedata.cloud/39f2cbb9-be6a-4669-a7c3-b01dfbb2b563.png`,label:this.$t(`midjourney.styleTag.bronze`),value:`Bronze`},{image:`https://cdn.acedata.cloud/42b30429-2733-41a5-aa4c-e3e0cd50528a.png`,label:this.$t(`midjourney.styleTag.carbonFiber`),value:`Carbon Fiber`},{image:`https://cdn.acedata.cloud/90eeef27-6bdb-4f36-8e17-f1bb49881258.png`,label:this.$t(`midjourney.styleTag.cardboard`),value:`Cardboard`},{image:`https://cdn.acedata.cloud/470235fb-19a8-4ba8-ac9b-236abecf0985.png`,label:this.$t(`midjourney.styleTag.cellulose`),value:`Cellulose`},{image:`https://cdn.acedata.cloud/a8621e16-b046-4300-ab24-09602f734cb9.png`,label:this.$t(`midjourney.styleTag.ceramic`),value:`Ceramic`},{image:`https://cdn.acedata.cloud/af14acf6-92ff-42f8-ae14-ce4b63237bd5.png`,label:this.$t(`midjourney.styleTag.cotton`),value:`Cotton`},{image:`https://cdn.acedata.cloud/d93e6f18-3729-46cc-aa96-9662f2abae3d.png`,label:this.$t(`midjourney.styleTag.fabric`),value:`Fabric`},{image:`https://cdn.acedata.cloud/660533aa-dac7-4968-b27e-0f085b9a67a5.png`,label:this.$t(`midjourney.styleTag.fiberOptic`),value:`Fiber Optic`},{image:`https://cdn.acedata.cloud/94be6d51-5cb3-4362-8274-7d833a88bb79.png`,label:this.$t(`midjourney.styleTag.foil`),value:`Foil`},{image:`https://cdn.acedata.cloud/b89e102d-2fef-4619-8427-94c6bfbeb832.png`,label:this.$t(`midjourney.styleTag.yarn`),value:`Yarn`,advanced:!0},{image:`https://cdn.acedata.cloud/b72ef152-11a7-4c51-b6b4-dc4308995f9e.png`,label:this.$t(`midjourney.styleTag.glass`),value:`Glass`},{image:`https://cdn.acedata.cloud/bca80e91-46ba-4793-b29c-1b5c47b201d7.png`,label:this.$t(`midjourney.styleTag.gold`),value:`Gold`,advanced:!0},{image:`https://cdn.acedata.cloud/3d1e4da5-404b-4f89-8e06-988de47208bd.png`,label:this.$t(`midjourney.styleTag.gummies`),value:`Gummies`,advanced:!0},{image:`https://cdn.acedata.cloud/8afba6b0-a8a5-49c9-bfc5-ebd7b0e12443.png`,label:this.$t(`midjourney.styleTag.latex`),value:`Latex`},{image:`https://cdn.acedata.cloud/d5c39f1c-1be0-4065-80af-e1cb4e627cf2.png`,label:this.$t(`midjourney.styleTag.leather`),value:`Leather`},{image:`https://cdn.acedata.cloud/6e41e8bd-cb0b-4504-8655-a3b1b32ac11c.png`,label:this.$t(`midjourney.styleTag.magma`),value:`Magma`},{image:`https://cdn.acedata.cloud/f816fffa-4a7f-4d60-afcb-e19b0c36d176.png`,label:this.$t(`midjourney.styleTag.metallic`),value:`Metallic`},{image:`https://cdn.acedata.cloud/74c9fe01-37e6-4d05-831a-5778eb34c521.png`,label:this.$t(`midjourney.styleTag.nickel`),value:`Nickel`,advanced:!0},{image:`https://cdn.acedata.cloud/85186eac-1806-4739-9289-8d76aac359b3.png`,label:this.$t(`midjourney.styleTag.nylon`),value:`Nylon`},{image:`https://cdn.acedata.cloud/355d9507-62fa-4c69-986f-def2f2f930c5.png`,label:this.$t(`midjourney.styleTag.paper`),value:`Paper`},{image:`https://cdn.acedata.cloud/6c2626b2-191e-4b85-a97d-e561a2b5c79b.png`,label:this.$t(`midjourney.styleTag.plastic`),value:`Plastic`,advanced:!0},{image:`https://cdn.acedata.cloud/ff0d301d-8181-463c-a276-9b4805321afd.png`,label:this.$t(`midjourney.styleTag.quartz`),value:`Quartz`},{image:`https://cdn.acedata.cloud/7b90754d-2fa5-490e-a73b-d2887525d2e6.png`,label:this.$t(`midjourney.styleTag.wrap`),value:`Wrap`,advanced:!0},{image:`https://cdn.acedata.cloud/7411e62a-546e-4cd2-8446-73c4fb8f103b.png`,label:this.$t(`midjourney.styleTag.wooden`),value:`Wooden`},{image:`https://cdn.acedata.cloud/44e8830f-4be2-471d-a9d4-aaf4913e7451.png`,label:this.$t(`midjourney.styleTag.slime`),value:`Slime`,advanced:!0},{image:`https://cdn.acedata.cloud/16b10e75-a7e7-4b87-804a-2bfc9c18096f.png`,label:this.$t(`midjourney.styleTag.engraving`),value:`Engraving`},{image:`https://cdn.acedata.cloud/b66ec7e2-fd82-4edd-a523-34b87872f544.png`,label:this.$t(`midjourney.styleTag.ivory`),value:`Ivory`},{image:`https://cdn.acedata.cloud/098b954d-1197-414e-b4bd-68e3928b9eb3.png`,label:this.$t(`midjourney.styleTag.basalt`),value:`Basalt`,advanced:!0},{image:`https://cdn.acedata.cloud/b948dd7d-939b-48b5-b37c-09e0ebd6ede6.png`,label:this.$t(`midjourney.styleTag.pine`),value:`Pine`,advanced:!0},{image:`https://cdn.acedata.cloud/4c56fc7d-94c8-4055-9d6e-3bc6662c92d7.png`,label:this.$t(`midjourney.styleTag.diamond`),value:`Diamond`},{image:`https://cdn.acedata.cloud/70de6b75-bb29-4b2a-ae8a-016db33c8184.png`,label:this.$t(`midjourney.styleTag.amethyst`),value:`Amethyst`,advanced:!0},{image:`https://cdn.acedata.cloud/8d2b60e1-c98c-4de2-8a67-4b10c0d2482a.png`,label:this.$t(`midjourney.styleTag.ruby`),value:`Ruby`,advanced:!0},{image:`https://cdn.acedata.cloud/c0f01b99-32a6-4c34-a2d8-448fab08f126.png`,label:this.$t(`midjourney.styleTag.highPolished`),value:`High polished`,advanced:!0},{image:`https://cdn.acedata.cloud/5091142a-3959-40f3-9ea5-f41a29584735.png`,label:this.$t(`midjourney.styleTag.brushed`),value:`Brushed`,advanced:!0},{image:`https://cdn.acedata.cloud/3f84ddc5-5afe-41d1-85cc-2ded7a44d859.png`,label:this.$t(`midjourney.styleTag.matte`),value:`Matte`,advanced:!0},{image:`https://cdn.acedata.cloud/655f5114-b3dd-4b9a-a3cb-94a1a814fb11.png`,label:this.$t(`midjourney.styleTag.satin`),value:`Satin`,advanced:!0},{image:`https://cdn.acedata.cloud/6ec4178e-86e6-4026-aa86-e14eb4e92097.png`,label:this.$t(`midjourney.styleTag.sandblasted`),value:`Sandblasted`,advanced:!0},{image:`https://cdn.acedata.cloud/1c9a4277-5550-4cd4-852a-c785d8505a0f.png`,label:this.$t(`midjourney.styleTag.ebony`),value:`Ebony`,advanced:!0}]},camera:{displayName:this.$t(`midjourney.styleCategory.camera`),items:[{image:`https://cdn.acedata.cloud/9bcf851a-7b94-4554-864b-edcbe0f67017.png`,label:this.$t(`midjourney.styleTag.bokeh`),value:`Bokeh`},{image:`https://cdn.acedata.cloud/f4599568-5889-4da9-8852-8b5361c54412.png`,label:this.$t(`midjourney.styleTag.aerialView`),value:`Aerial view`},{image:`https://cdn.acedata.cloud/bea180e2-9078-42bd-9392-b0ee2b372430.png`,label:this.$t(`midjourney.styleTag.shotByDslr`),value:`Shot by DSLR`,advanced:!0},{image:`https://cdn.acedata.cloud/42444cbd-5442-4093-8911-645272c08863.png`,label:this.$t(`midjourney.styleTag.360Panorama`),value:`360Panorama`},{image:`https://cdn.acedata.cloud/99875464-0be7-44da-adf5-958d2c73eb31.png`,label:this.$t(`midjourney.styleTag.panorama`),value:`Panorama`},{image:`https://cdn.acedata.cloud/e3c3a204-9210-44da-b6fc-5f9a1fea52e0.png`,label:this.$t(`midjourney.styleTag.telephotoLens`),value:`Telephoto Lens`},{image:`https://cdn.acedata.cloud/7bd1f91d-cd6d-48d1-9f07-68382a54a552.png`,label:this.$t(`midjourney.styleTag.macroShot`),value:`Macro shot`},{image:`https://cdn.acedata.cloud/09aca457-2d96-4f60-b5ec-9fedf7a3fcb9.png`,label:this.$t(`midjourney.styleTag.microscopy`),value:`Microscopy`},{image:`https://cdn.acedata.cloud/fb39b4ab-d728-456b-8905-b4c0302f4094.png`,label:this.$t(`midjourney.styleTag.magnification`),value:`Magnification`},{image:`https://cdn.acedata.cloud/b9956b79-70b1-44af-bca3-5eddd412615a.png`,label:this.$t(`midjourney.styleTag.closeUp`),value:`Close up`},{image:`https://cdn.acedata.cloud/2c6b2c92-f790-44e1-bc65-b3182aa484bd.png`,label:this.$t(`midjourney.styleTag.fullBody`),value:`Full body`},{image:`https://cdn.acedata.cloud/05c7f5a8-4a79-4a1c-a4a9-792862ad118c.png`,label:this.$t(`midjourney.styleTag.portrait`),value:`Portrait`},{image:`https://cdn.acedata.cloud/aeb48a08-f0b6-47db-8c5d-ae6f0f92b93d.png`,label:this.$t(`midjourney.styleTag.profile`),value:`Profile`},{image:`https://cdn.acedata.cloud/dd655235-8f80-43b2-823f-bdb44864bee1.png`,label:this.$t(`midjourney.styleTag.pinholeLens`),value:`Pinhole Lens`,advanced:!0},{image:`https://cdn.acedata.cloud/7ad3f221-96f6-4014-953e-853c429d5d57.png`,label:this.$t(`midjourney.styleTag.wideView`),value:`Wide view`},{image:`https://cdn.acedata.cloud/698fbcc7-5ad1-40cb-a926-95189dc9e59b.png`,label:this.$t(`midjourney.styleTag.telescopeLens`),value:`Telescope Lens`,advanced:!0},{image:`https://cdn.acedata.cloud/2e41309b-f006-483f-9843-e15f4ced6be7.png`,label:this.$t(`midjourney.styleTag.satelliteImagery`),value:`Satellite Imagery`},{image:`https://cdn.acedata.cloud/79ad137d-3015-4335-a4e3-2ed29f9b850b.png`,label:this.$t(`midjourney.styleTag.headshot`),value:`Headshot`},{image:`https://cdn.acedata.cloud/d06164a9-ba01-457f-b8cc-f0b38a87b4d5.png`,label:this.$t(`midjourney.styleTag.extremeCloseup`),value:`Extreme closeup`,advanced:!0},{image:`https://cdn.acedata.cloud/b8e10ef3-b37c-45f0-b930-be729c8d17a1.png`,label:this.$t(`midjourney.styleTag.ultrawideShot`),value:`Ultrawide shot`},{image:`https://cdn.acedata.cloud/21eaa8a4-a8f1-448d-9f00-ff8fb0213046.png`,label:this.$t(`midjourney.styleTag.birdView`),value:`Bird view`,advanced:!0},{image:`https://cdn.acedata.cloud/43fadf68-dad1-45d2-bc22-54b1b2792a00.png`,label:this.$t(`midjourney.styleTag.topView`),value:`Top view`,advanced:!0},{image:`https://cdn.acedata.cloud/f8953e9e-6daf-4a70-a691-6f89e91f0b97.png`,label:this.$t(`midjourney.styleTag.frontView`),value:`Front view`,advanced:!0},{image:`https://cdn.acedata.cloud/f2228145-dc8f-4e06-be21-5d18bf50f7cf.png`,label:this.$t(`midjourney.styleTag.sideView`),value:`Side view`,advanced:!0},{image:`https://cdn.acedata.cloud/b218d1cc-60a7-4f62-a719-b852cd6ebf03.png`,label:this.$t(`midjourney.styleTag.backView`),value:`Back view`,advanced:!0},{image:`https://cdn.acedata.cloud/186522ef-7b09-40d8-a712-43dde1266bbf.png`,label:this.$t(`midjourney.styleTag.faceShot`),value:`Face shot`},{image:`https://cdn.acedata.cloud/6a0c1136-2817-42bb-b1e3-c65a130e70cf.png`,label:this.$t(`midjourney.styleTag.chestShot`),value:`Chest shot`},{image:`https://cdn.acedata.cloud/8ac3bf91-2066-420d-8da1-5d6214ad2668.png`,label:this.$t(`midjourney.styleTag.waistShot`),value:`Waist shot`},{image:`https://cdn.acedata.cloud/2558b92f-cb3b-410e-85cd-791eb7d29c60.png`,label:this.$t(`midjourney.styleTag.extraLongShot`),value:`Extra long shot`},{image:`https://cdn.acedata.cloud/0f5c9250-55a4-4eed-8ddf-af18cb52e243.png`,label:this.$t(`midjourney.styleTag.lookUp`),value:`look up`},{image:`https://cdn.acedata.cloud/5e0df52d-e986-4851-b6ae-dc0be744713d.png`,label:this.$t(`midjourney.styleTag.isometricview`),value:`isometricview`,advanced:!0},{image:`https://cdn.acedata.cloud/0d6491dd-1f64-423c-b63b-0f2e96a258e5.png`,label:this.$t(`midjourney.styleTag.highAngleView`),value:`High angle view`,advanced:!0},{image:`https://cdn.acedata.cloud/5b68beee-c079-4a8e-84c5-cb3cc0f6c77b.png`,label:this.$t(`midjourney.styleTag.lowAngleView`),value:`Low angle view`,advanced:!0}]},emotion:{displayName:this.$t(`midjourney.styleCategory.emotion`),items:[{image:`https://cdn.acedata.cloud/033c9cd1-f5cc-448f-8d0a-e6559bbd57e3.png`,label:this.$t(`midjourney.styleTag.happy`),value:`Happy`},{image:`https://cdn.acedata.cloud/d07fbadd-78e4-4a98-bcf8-45b4805c9239.png`,label:this.$t(`midjourney.styleTag.excited`),value:`Excited`},{image:`https://cdn.acedata.cloud/aa94049d-e8fc-4e0e-97b1-afa174d99b88.png`,label:this.$t(`midjourney.styleTag.angry`),value:`Angry`},{image:`https://cdn.acedata.cloud/ede7f1d3-5ce2-4b8f-9cb9-c4bd47b80cae.png`,label:this.$t(`midjourney.styleTag.ped`),value:`ped`},{image:`https://cdn.acedata.cloud/88f9e6ba-2961-497e-ae00-9af36fa2c2d4.png`,label:this.$t(`midjourney.styleTag.disgusted`),value:`Disgusted`},{image:`https://cdn.acedata.cloud/fe91b67b-2430-424a-bf72-1a299e61f049.png`,label:this.$t(`midjourney.styleTag.supnned`),value:`supnned`},{image:`https://cdn.acedata.cloud/24dcfb80-d987-48b0-9595-82276b2a1f94.png`,label:this.$t(`midjourney.styleTag.hopeful`),value:`Hopeful`},{image:`https://cdn.acedata.cloud/f2628539-bdf5-471d-9ceb-f0731c46b593.png`,label:this.$t(`midjourney.styleTag.anxious`),value:`Anxious`},{image:`https://cdn.acedata.cloud/f280d69a-eb1b-4259-b56d-66510f38ec82.png`,label:this.$t(`midjourney.styleTag.elated`),value:`Elated`},{image:`https://cdn.acedata.cloud/94b78236-ba14-4aab-8985-3921b2146fc9.png`,label:this.$t(`midjourney.styleTag.fearful`),value:`Fearful`},{image:`https://cdn.acedata.cloud/68576d87-224f-463f-85c9-5fbeb386a035.png`,label:this.$t(`midjourney.styleTag.hateful`),value:`Hateful`},{image:`https://cdn.acedata.cloud/e0413400-096f-4072-8faf-5ef82f8cc265.png`,label:this.$t(`midjourney.styleTag.apoow`),value:`Apoow`,advanced:!0},{image:`https://cdn.acedata.cloud/c0f4b0f4-1399-468f-873a-a04f4b7929f8.png`,label:this.$t(`midjourney.styleTag.dark`),value:`Dark`,advanced:!0},{image:`https://cdn.acedata.cloud/297d5f3f-ebc9-4c9f-b656-07359b313871.png`,label:this.$t(`midjourney.styleTag.brutal`),value:`Brutal`,advanced:!0}]},chinese:{displayName:this.$t(`midjourney.styleCategory.chinese`),items:[{image:`https://cdn.acedata.cloud/b29020e5-532d-4b30-94b0-cf5405242fc6.png`,label:this.$t(`midjourney.styleTag.hanfu`),value:`Hanfu`},{image:`https://cdn.acedata.cloud/e00eb48c-8240-4468-ac15-1a9d3349b636.png`,label:this.$t(`midjourney.styleTag.cheongsam`),value:`Cheongsam`},{image:`https://cdn.acedata.cloud/87d89bc5-cb61-4780-8894-c1564bdebd66.png`,label:this.$t(`midjourney.styleTag.chineseCostume`),value:`Chinese costume`},{image:`https://cdn.acedata.cloud/811453d2-2715-44fe-8609-b0d184486b19.png`,label:this.$t(`midjourney.styleTag.chineseDress`),value:`Chinese dress`},{image:`https://cdn.acedata.cloud/2463a720-b803-4d0d-9cac-6a7d5b61001d.png`,label:this.$t(`midjourney.styleTag.wuxia`),value:`Wuxia`},{image:`https://cdn.acedata.cloud/2fbee5a1-8a5c-4bfb-a52c-895ff3f53c3c.png`,label:this.$t(`midjourney.styleTag.chinesePhoenix`),value:`Chinese phoenix`},{image:`https://cdn.acedata.cloud/53fd3a51-7739-493f-aff0-daaea74b942c.png`,label:this.$t(`midjourney.styleTag.kungfu`),value:`Kungfu`},{image:`https://cdn.acedata.cloud/bc4c6bb0-82a5-4bbb-b4e3-96a14c52aed3.png`,label:this.$t(`midjourney.styleTag.kunquOpera`),value:`Kunqu opera`,advanced:!0},{image:`https://cdn.acedata.cloud/291ca1c1-069e-4067-8b9d-1c5c11c2ff14.png`,label:this.$t(`midjourney.styleTag.cloisonne`),value:`Cloisonne`,advanced:!0},{image:`https://cdn.acedata.cloud/17e87115-06ec-4f7b-9b8e-daf782cd4d59.png`,label:this.$t(`midjourney.styleTag.porcelain`),value:`Porcelain`},{image:`https://cdn.acedata.cloud/c9cc4712-24b9-4ff8-926b-02bd626df9a9.png`,label:this.$t(`midjourney.styleTag.embroidered`),value:`Embroidered`},{image:`https://cdn.acedata.cloud/7da286ae-d1e6-4a21-8ba5-10ff7bf9d379.png`,label:this.$t(`midjourney.styleTag.jade`),value:`Jade`},{image:`https://cdn.acedata.cloud/11a2d9f8-3c29-4b0b-ae10-525928f71bce.png`,label:this.$t(`midjourney.styleTag.chinesePavilion`),value:`Chinese pavilion`,advanced:!0},{image:`https://cdn.acedata.cloud/639b5e99-8210-4525-b63f-8b89019d07f3.png`,label:this.$t(`midjourney.styleTag.plumFlower`),value:`Plum flower`},{image:`https://cdn.acedata.cloud/cc87764c-2754-4cb7-8bc3-1070b31ec62b.png`,label:this.$t(`midjourney.styleTag.forbiddenCity`),value:`Forbidden city`,advanced:!0},{image:`https://cdn.acedata.cloud/26d2f2aa-ca26-4c0e-a8c7-86a81aafc475.png`,label:this.$t(`midjourney.styleTag.peony`),value:`Peony`,advanced:!0}]},special:{displayName:this.$t(`midjourney.styleCategory.special`),items:[{image:`https://cdn.acedata.cloud/0ca0fd15-cc8d-420e-acf5-6c489e03c7ff.png`,label:this.$t(`midjourney.styleTag.unrealEngine`),value:`Unreal engine`},{image:`https://cdn.acedata.cloud/ead8ba11-6634-409e-8fea-7b31ca3974bc.png`,label:this.$t(`midjourney.styleTag.octaneRender`),value:`Octane render`},{image:`https://cdn.acedata.cloud/209f1bd9-5d44-4699-97ad-fdde73304efb.png`,label:this.$t(`midjourney.styleTag.maxonCinema4D`),value:`Maxon cinema 4D`},{image:`https://cdn.acedata.cloud/93c31b69-7af4-4d1f-99d6-114a34133613.png`,label:this.$t(`midjourney.styleTag.quixelMegascansRender`),value:`Quixel megascans render`},{image:`https://cdn.acedata.cloud/9883f161-5069-414b-9d23-bd63806c5205.png`,label:this.$t(`midjourney.styleTag.coronaRender`),value:`Corona render`},{image:`https://cdn.acedata.cloud/9c28e4af-28b2-4b97-abd4-e4f42d014f3a.png`,label:this.$t(`midjourney.styleTag.vRay`),value:`V-ray`},{image:`https://cdn.acedata.cloud/01d71ceb-7d17-4318-9914-a6a5fe0abc11.png`,label:this.$t(`midjourney.styleTag.architecturalVisualisation`),value:`Architectural visualisation`},{image:`https://cdn.acedata.cloud/e7f2cd21-2efc-4e18-b38d-3c2cbd95c5ec.png`,label:this.$t(`midjourney.styleTag.dramaticContrast`),value:`Dramatic contrast`},{image:`https://cdn.acedata.cloud/8f113377-ba6e-4fb0-bd56-df8635ab6345.png`,label:this.$t(`midjourney.styleTag.goldAndBlackTone`),value:`Gold and black tone`},{image:`https://cdn.acedata.cloud/6da8b72d-5a67-4c06-b915-8c0b5314d9c8.png`,label:this.$t(`midjourney.styleTag.whiteAndPinkTone`),value:`White and pink tone`},{image:`https://cdn.acedata.cloud/09abd535-8ab6-451f-8bce-29859429244b.png`,label:this.$t(`midjourney.styleTag.redAndBlackTone`),value:`Red and black tone`},{image:`https://cdn.acedata.cloud/81115846-7676-4edb-b7cf-df816c90de7f.png`,label:this.$t(`midjourney.styleTag.neonShades`),value:`Neon shades`},{image:`https://cdn.acedata.cloud/dfcc7a8a-e145-4824-b12b-bd29292daa5f.png`,label:this.$t(`midjourney.styleTag.richColor`),value:`Rich color`},{image:`https://cdn.acedata.cloud/38b05148-73c6-4db3-bddd-b972f27f4671.png`,label:this.$t(`midjourney.styleTag.monotone`),value:`Monotone`},{image:`https://cdn.acedata.cloud/6f6704da-1854-43d7-811f-3145fea96909.png`,label:this.$t(`midjourney.styleTag.theLowPurityTone`),value:`The low-purity tone`},{image:`https://cdn.acedata.cloud/3724b5ef-e7dd-4234-b2a2-f71c6b69b4ac.png`,label:this.$t(`midjourney.styleTag.theHighPurityTone`),value:`The high-purity tone`}]}}}},computed:{value:{get(){return this.$store.state.midjourney.config.elements||[]},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,elements:e})}}},methods:{onToggle(e){this.value.includes(e)?this.value=this.value.filter(t=>t!==e):(this.value.push(e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,elements:this.value}))}}}),fr={class:`flex justify-between`},pr={class:`flex justify-start items-center`},mr={class:`text-sm font-bold`},hr={class:`flex justify-end items-center`},gr=[`onClick`],_r={class:`name`};function vr(t,o,u,d,f,h){let _=l(`info-icon`),y=l(`el-button`),b=l(`el-tag`),x=l(`check`),S=l(`el-icon`),C=l(`el-image`),w=l(`el-tab-pane`),T=l(`el-tabs`),E=l(`el-dialog`);return v(),s(`div`,null,[e(`div`,fr,[e(`div`,pr,[e(`span`,mr,i(t.$t(`midjourney.field.elements`)),1),a(_,{content:t.$t(`midjourney.description.elements`)},null,8,[`content`])]),e(`div`,hr,[a(y,{round:``,type:`primary`,size:`small`,onClick:o[0]||=e=>t.choosing=!0},{default:m(()=>[r(i(t.$t(`midjourney.button.select`)),1)]),_:1})])]),e(`div`,null,[(v(!0),s(c,null,g(t.value,(e,n)=>(v(),p(b,{key:n,closable:``,effect:`dark`,round:``,class:`mr-1 mb-1`,onClose:n=>t.onToggle(e)},{default:m(()=>[r(i(e.label),1)]),_:2},1032,[`onClose`]))),128))]),a(E,{modelValue:t.choosing,"onUpdate:modelValue":o[2]||=e=>t.choosing=e,width:`70%`},{default:m(()=>[a(T,{modelValue:t.tab,"onUpdate:modelValue":o[1]||=e=>t.tab=e},{default:m(()=>[(v(!0),s(c,null,g(t.elements,(r,o)=>(v(),p(w,{key:o,label:r.displayName,name:o,class:`pane`},{default:m(()=>[(v(!0),s(c,null,g(r.items,(r,o)=>(v(),s(`div`,{key:o,class:n({hidden:r?.advanced,item:!0,active:t.value.includes(r)}),onClick:e=>t.onToggle(r)},[a(S,{class:`icon`},{default:m(()=>[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1}),a(C,{src:r.image,fit:`fill`,class:`preview`},null,8,[`src`]),e(`span`,_r,i(r.label),1)],10,gr))),128))]),_:2},1032,[`label`,`name`]))),128))]),_:1},8,[`modelValue`])]),_:1},8,[`modelValue`])])}var yr=J(dr,[[`render`,vr],[`__scopeId`,`data-v-ec52a37e`]]),br=`fast`,xr=b({name:`ModeSelector`,components:{ElButton:q,ElDropdown:z,ElDropdownMenu:R,ArrowDown:ae,ElIcon:x,ElDropdownItem:L},data(){return{allOptions:[{label:this.$t(`midjourney.button.fast`),value:`fast`,icon:u(_e),color:`#2dc49c`},{label:this.$t(`midjourney.button.relax`),value:`relax`,icon:u(qe),color:`#ce65e6`},{label:this.$t(`midjourney.button.turbo`),value:`turbo`,icon:u(_e),color:`#ff9900`}]}},computed:{version(){return this.$store.state.midjourney.config.version||``},type(){return this.$store.state.midjourney.config.type||`imagine`},isV81Imagine(){return this.type===`imagine`&&this.version===`8.1`},options(){return this.isV81Imagine?this.allOptions.filter(e=>e.value!==`turbo`):this.allOptions},activeOption(){return this.options.find(e=>e.value===this.value)},value:{get(){return this.$store.state.midjourney.config.mode},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,mode:e})}}},watch:{isV81Imagine:{immediate:!0,handler(e){e&&this.value===`turbo`&&(this.value=br)}}},mounted(){this.value||=br},methods:{onCommand(e){console.log(`command`,e),this.value=e}}}),Sr={class:`ml-2`},Cr={class:`ml-1 text-sm`};function wr(t,n,r,u,d,f){let y=l(`arrow-down`),b=l(`el-icon`),x=l(`el-button`),S=l(`el-dropdown-item`),C=l(`el-dropdown-menu`),w=l(`el-dropdown`);return v(),p(w,{trigger:`click`,onCommand:t.onCommand},{dropdown:m(()=>[a(C,null,{default:m(()=>[(v(!0),s(c,null,g(t.options,(t,n)=>(v(),p(S,{key:n,class:`flex items-center justify-between`,command:t.value},{default:m(()=>[t.icon?(v(),p(_(t.icon),{key:0,style:h({color:t.color}),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`style`])):o(``,!0),e(`span`,Cr,i(t.label),1)]),_:2},1032,[`command`]))),128))]),_:1})]),default:m(()=>[a(x,{round:``},{default:m(()=>[t.activeOption?.icon?(v(),p(_(t.activeOption?.icon),{key:0,style:h({color:t.activeOption?.color}),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`style`])):o(``,!0),e(`span`,Sr,i(t.activeOption?.label),1),a(b,{class:`el-icon--right`},{default:m(()=>[a(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})]),_:1})]),_:1},8,[`onCommand`])}var Tr=J(xr,[[`render`,wr],[`__scopeId`,`data-v-26af51e8`]]),Er=b({name:`PromptInput`,components:{PromptTextarea:ce},computed:{prompt:{get(){return this.$store.state.midjourney?.config.prompt},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Dr(e,t,n,r,i,a){let o=l(`prompt-textarea`);return v(),p(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`midjourney.name.prompt`),info:e.$t(`midjourney.description.prompt`),placeholder:e.$t(`midjourney.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Or=J(Er,[[`render`,Dr]]),kr=b({name:`ReferenceImage`,components:{UploadIcon:W,ElUpload:E,ElButton:q,InfoIcon:U,ImagePreview:$},mixins:[Z,Q,G,K],emits:[`change`],data(){return{fileList:[],uploadUrl:X()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,references:e})}}},methods:{onExceed(){N.warning(this.$t(`midjourney.message.uploadReferencesExceed`))},onError(){N.error(this.$t(`midjourney.message.uploadReferencesError`))}}}),Ar={class:`relative`},jr={class:`flex min-h-8 items-center pr-20`},Mr={class:`flex justify-start items-center`},Nr={class:`text-sm font-bold`};function Pr(t,n,o,c,u,d){let f=l(`info-icon`),p=l(`image-preview`),h=l(`upload-icon`),g=l(`el-button`),_=l(`el-upload`);return v(),s(`div`,Ar,[e(`div`,jr,[e(`div`,Mr,[e(`span`,Nr,i(t.$t(`midjourney.name.referenceImage`)),1),a(f,{content:t.$t(`midjourney.description.uploadReferences`)},null,8,[`content`])])]),a(_,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,headers:t.headers},{file:m(({file:e})=>[a(p,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.fileList.splice(t.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:m(()=>[a(g,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:m(()=>[a(h,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`midjourney.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`headers`])])}var Fr=b({name:`ConfigPanel`,components:{ElButton:q,PromptInput:Or,ModeSelector:Tr,ModelSelector:wn,ElementsSelector:yr,StyleSelector:ur,QualitySelector:kn,RatioSelector:ot,VersionSelector:Et,HdSelector:jt,StylizeSelector:sn,AdvancedSelector:ft,ChaosSelector:gn,WeirdSelector:Xn,ImageWeightSelector:Hn,ReferenceImage:J(kr,[[`render`,Pr],[`__scopeId`,`data-v-16eb82b3`]]),ImageUrlInput:Rt,EndImageUrlInput:Gt,LoopSelector:bt,ResolutionSelector:Pn,ImageUrlInput2:Qt,Consumption:Ve,VideoFromInput:nr,ElTabs:w,ElTabPane:T,ScenarioPaymentMode:Ue},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.midjourney.config},isV8(){return this.config?.version===`8`||this.config?.version===`8.1`},isNiji(){return!!this.config?.model?.includes(`niji`)},type:{get(){return this.$store.state.midjourney.config.type||`imagine`},set(e){console.debug(`set type`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,type:e})}},consumption(){return Me(this.config,this.service?.cost)},service(){return this.$store.state.midjourney?.service},walletMode(){return Ne()&&je(`midjourney`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},mounted(){this.config.type||(this.type=ye)},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=je(`midjourney`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=this.type===`videos`?await Y.quoteVideos(De(this.config)):this.type===`describe`?await Y.quoteDescribe(Fe(this.config)):await Y.quoteImagine(Ce(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}}}}),Ir={class:`flex flex-col h-full`},Lr={class:`flex-1 min-h-0 overflow-hidden`},Rr={class:`p-5`},zr={class:`p-5`},Br={class:`p-5`},Vr={class:`flex flex-col px-5 pb-5`},Hr={class:`flex gap-1`};function Ur(t,n,c,u,f,h){let g=l(`model-selector`),_=l(`prompt-input`),b=l(`reference-image`),x=l(`ratio-selector`),S=l(`quality-selector`),C=l(`version-selector`),w=l(`hd-selector`),T=l(`elements-selector`),E=l(`advanced-selector`),D=l(`stylize-selector`),O=l(`weird-selector`),k=l(`chaos-selector`),A=l(`image-weight-selector`),j=l(`style-selector`),M=l(`el-tab-pane`),N=l(`video-from-input`),P=l(`image-url-input`),F=l(`end-image-url-input`),I=l(`loop-selector`),L=l(`resolution-selector`),R=l(`image-url-input2`),z=l(`el-tabs`),B=l(`scenario-payment-mode`),V=l(`consumption`),H=l(`mode-selector`),ee=l(`el-button`);return v(),s(`div`,Ir,[e(`div`,Lr,[a(z,{modelValue:t.type,"onUpdate:modelValue":n[0]||=e=>t.type=e,class:`demo-tabs scenario-tabs scenario-tabs--scrollable`},{default:m(()=>[a(M,{label:t.$t(`midjourney.tab.images`),name:`imagine`},{default:m(()=>[e(`div`,Rr,[a(g,{class:`mb-2`}),a(_,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`}),t.config?.version===`8.1`?o(``,!0):(v(),p(S,{key:0,class:`mb-4`})),t.isNiji?o(``,!0):(v(),p(C,{key:1,class:`mb-4`})),t.isV8&&!t.isNiji?(v(),p(w,{key:2,class:`mb-4`})):o(``,!0),a(T,{class:`mb-2`}),a(E,{class:`mb-2`}),d(e(`div`,null,[a(D,{class:`mb-2`}),a(O,{class:`mb-2`}),a(k,{class:`mb-2`}),t.isV8?o(``,!0):(v(),p(A,{key:0,class:`mb-2`})),a(j,{class:`mb-2`})],512),[[y,t.config?.advanced]])])]),_:1},8,[`label`]),a(M,{label:t.$t(`midjourney.tab.videos`),name:`videos`},{default:m(()=>[e(`div`,zr,[d(a(N,{class:`mb-4`},null,512),[[y,t.config?.action===`extend`]]),a(P,{class:`mb-4`}),a(F,{class:`mb-4`}),a(I,{class:`mb-2`}),a(L,{class:`mb-4`}),a(_,{class:`mb-4`})])]),_:1},8,[`label`]),a(M,{label:t.$t(`midjourney.tab.describe`),name:`describe`},{default:m(()=>[e(`div`,Br,[a(R,{class:`mb-4`})])]),_:1},8,[`label`])]),_:1},8,[`modelValue`])]),e(`div`,Vr,[a(B,{scenario:`midjourney`}),t.walletMode?o(``,!0):(v(),p(V,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),e(`div`,Hr,[t.type===`describe`?o(``,!0):(v(),p(H,{key:0})),t.config.action===`extend`?(v(),p(ee,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:n[1]||=e=>t.$emit(`generate`)},{default:m(()=>[r(i(t.$t(`midjourney.button.extend`)),1)]),_:1})):(v(),p(ee,{key:2,type:`primary`,class:`btn w-full`,round:``,onClick:n[2]||=e=>t.$emit(`generate`)},{default:m(()=>[r(i(t.$t(`midjourney.button.generate`)),1)]),_:1}))])])])}var Wr=J(Fr,[[`render`,Ur],[`__scopeId`,`data-v-64bdba1b`]]),Gr=b({name:`TaskPreview`,components:{ChannelIcon:de,ImageIcon:pe,InfoIcon:me,LightningIcon:_e,MagicIcon:ge,PerformanceIcon:se,RefreshIcon:he,TimeIcon:oe,ImageWrapper:Ke,ImagePreview:$,ElButton:q,ElTooltip:D,ElAlert:O,ElTag:xe,CopyToClipboard:Re,VideoPlayer:He,ApiCodeButton:We,ReportButton:ze},props:{modelValue:{type:Object,required:!0},full:{type:Boolean,default:!1}},emits:[`custom`],data(){return{midjourneyImagineState:k,actionMapping:{[M.GENERATE]:`Generate`,[M.UPSCALE1]:`U1`,[M.UPSCALE2]:`U2`,[M.UPSCALE3]:`U3`,[M.UPSCALE4]:`U4`,[M.VARIATION1]:`V1`,[M.VARIATION2]:`V2`,[M.VARIATION3]:`V3`,[M.VARIATION4]:`V4`,[M.VARIATION_STRONG]:`Vary (Strong)`,[M.VARIATION_SUBTLE]:`Vary (Subtle)`,[M.UPSCALE_CREATIVE]:`Upscale (Creative)`,[M.UPSCALE_SUBTLE]:`Upscale (Subtle)`,[M.ZOOM_OUT_2X]:`Zoom Out 2x`,[M.ZOOM_OUT_1_5X]:`Zoom Out 1.5x`,[M.UPSCALE_2X]:`Upscale 2x`,[M.UPSCALE_4X]:`Upscale 4x`,[M.REDO_UPSCALE_2X]:`Redo Upscale 2x`,[M.REDO_UPSCALE_4X]:`Redo Upscale 4x`,[M.REDO_UPSCALE_SUBTLE]:`Redo Upscale (Subtle)`,[M.REDO_UPSCALE_CREATIVE]:`Redo Upscale (Creative)`,[M.SQUARE]:`Make Square`,[M.PAN_LEFT]:`Pan Left`,[M.PAN_UP]:`Pan Up`,[M.PAN_DOWN]:`Pan Down`,[M.PAN_RIGHT]:`Pan Right`,[M.REROLL]:`Reroll`},actionIconMapping:{[M.PAN_LEFT]:u(te),[M.PAN_UP]:u(re),[M.PAN_DOWN]:u(ee),[M.PAN_RIGHT]:u(ne),[M.REROLL]:u(he)},descriptionMapping:{[M.GENERATE]:this.$t(`midjourney.action.generate`),[M.UPSCALE1]:this.$t(`midjourney.action.upscale1`),[M.UPSCALE2]:this.$t(`midjourney.action.upscale2`),[M.UPSCALE3]:this.$t(`midjourney.action.upscale3`),[M.UPSCALE4]:this.$t(`midjourney.action.upscale4`),[M.VARIATION1]:this.$t(`midjourney.action.variation1`),[M.VARIATION2]:this.$t(`midjourney.action.variation2`),[M.VARIATION3]:this.$t(`midjourney.action.variation3`),[M.VARIATION4]:this.$t(`midjourney.action.variation4`),[M.VARIATION_STRONG]:this.$t(`midjourney.action.variation_strong`),[M.VARIATION_SUBTLE]:this.$t(`midjourney.action.variation_subtle`),[M.ZOOM_OUT_2X]:this.$t(`midjourney.action.zoom_out_2x`),[M.ZOOM_OUT_1_5X]:this.$t(`midjourney.action.zoom_out_1_5x`),[M.UPSCALE_2X]:this.$t(`midjourney.action.upscale_2x`),[M.UPSCALE_4X]:this.$t(`midjourney.action.upscale_4x`),[M.UPSCALE_SUBTLE]:this.$t(`midjourney.action.upscale_subtle`),[M.UPSCALE_CREATIVE]:this.$t(`midjourney.action.upscale_creative`),[M.REDO_UPSCALE_2X]:this.$t(`midjourney.action.redo_upscale_2x`),[M.REDO_UPSCALE_4X]:this.$t(`midjourney.action.redo_upscale_4x`),[M.REDO_UPSCALE_SUBTLE]:this.$t(`midjourney.action.redo_upscale_subtle`),[M.REDO_UPSCALE_CREATIVE]:this.$t(`midjourney.action.redo_upscale_creative`),[M.SQUARE]:this.$t(`midjourney.action.square`),[M.PAN_LEFT]:this.$t(`midjourney.action.pan_left`),[M.PAN_UP]:this.$t(`midjourney.action.pan_up`),[M.PAN_DOWN]:this.$t(`midjourney.action.pan_down`),[M.PAN_RIGHT]:this.$t(`midjourney.action.pan_right`),[M.REROLL]:this.$t(`midjourney.action.reroll`)}}},computed:{application(){return this.$store.state.midjourney.application},config(){return this.$store.state.midjourney?.config},service(){return this.$store.state.midjourney?.service}},methods:{getActionDescriptionWithPrice(e,t){return`${this.descriptionMapping[e]} (${Me({...this.config,action:e,mode:t},this.service?.cost)} ${this.$t(`service.unit.${this.service?.unit||`credits`}`)})`},onCustom(e){this.modelValue?.type===`imagine`&&this.$emit(`custom`,{action:e,image_id:this.modelValue?.response?.image_id})},onExtend(e,t){console.debug(`set config`,t),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney?.config,video_id:t.video_id,video_url:t.video_urls?.[0],action:`extend`,type:`videos`,is_videos:!0})},onDownload(e){let t=document.createElement(`a`);t.href=e,t.download=e.split(`/`).pop(),t.click()}}}),Kr={key:0,class:`item`},qr={class:`left`},Jr={class:`preview`},Yr={class:`bot`},Xr={class:`datetime`},Zr={class:`info`},Qr={key:0,class:`prompt`},$r={key:0},ei={key:1},ti={key:1,class:`prompt`},ni={key:0},ri={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ii={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ai={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},oi={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},si={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ci={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},li={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ui={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},di={key:2},fi={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},pi={key:1,class:`item`},mi={class:`left`},hi={class:`preview`},gi={class:`bot`},_i={class:`datetime`},vi={class:`info`},yi={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},bi={key:1,class:`prompt`},xi={key:0},Si={key:1},Ci={key:2,class:`prompt`},wi={key:0},Ti={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ei={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Di={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Oi={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ki={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ai={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ji={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Mi={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ni={key:0,class:`mb-4`},Pi={key:1,class:n({operations:!0,"mt-2":!0,"mb-4":!0})},Fi={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ii={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Li={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ri={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},zi={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Bi={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Vi={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Hi={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ui={key:2},Wi={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Gi={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ki={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},qi={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ji={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Yi={key:2,class:`item`},Xi={class:`left`},Zi={class:`preview`},Qi={class:`bot`},$i={class:`datetime`},ea={class:`info`},ta={key:0,class:`prompt`},na={key:0},ra={key:1},ia={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},aa={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},oa={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},sa={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},ca={class:`mb-2`},la={class:`mb-2`},ua={key:0},da={class:`text-sm text-[var(--el-text-color-primary)]`},fa={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},pa={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ma={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ha={key:2},ga={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function _a(u,f,h,b,x,S){let C=l(`capability-presentation`),w=l(`magic-icon`),T=l(`copy-to-clipboard`),E=l(`info-icon`),D=l(`time-icon`),O=l(`channel-icon`),k=l(`el-alert`),A=l(`image-wrapper`),j=l(`el-button`),M=l(`el-tooltip`),N=l(`api-code-button`),P=l(`report-button`),F=l(`image-icon`),I=l(`image-preview`),L=l(`lightning-icon`),R=l(`performance-icon`),z=l(`refresh-icon`),B=l(`video-player`),V=l(`el-tag`);return v(),s(c,null,[u.modelValue?.type===`imagine`?(v(),s(`div`,Kr,[e(`div`,qr,[a(C,{capability:`midjourney`,part:`avatar`,class:`avatar`})]),e(`div`,Jr,[e(`div`,Yr,[a(C,{capability:`midjourney`,part:`name`}),e(`span`,Xr,i(u.$dayjs.format(``+new Date(parseFloat((u.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,Zr,[u.modelValue?.request?.prompt?(v(),s(`p`,Qr,[r(i(u.modelValue?.request?.prompt)+` `,1),u.modelValue?.response?o(``,!0):(v(),s(`span`,$r,` - (`+i(u.$t(`midjourney.status.pending`))+`) `,1)),u.modelValue?.response?.progress!==void 0&&u.modelValue?.response?.progress!==100?(v(),s(`span`,ei,` - (`+i(u.modelValue?.response?.progress)+`%) `,1)):o(``,!0),e(`span`,null,`(`+i(u.modelValue?.request?.mode)+`)`,1)])):o(``,!0),u.modelValue?.request?.image_id?(v(),s(`p`,ti,[r(i(u.modelValue?.request?.image_id)+` - `+i(u.modelValue?.request?.action)+` `,1),u.modelValue?.response?o(``,!0):(v(),s(`span`,ni,` - (`+i(u.$t(`midjourney.status.pending`))+`) `,1)),e(`span`,null,`(`+i(u.modelValue?.request?.mode)+`)`,1)])):o(``,!0)]),u.modelValue?.response?.success===!1?(v(),s(`div`,{key:0,class:n({content:!0,full:u.full,failed:!0})},[a(k,{closable:!1,class:`mt-2 failure`},{default:m(()=>[e(`p`,ri,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])]),e(`p`,ii,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.failureReason`))+`: `+i(u.modelValue?.response?.error?.message)+` `,1),a(T,{content:u.modelValue?.response?.error?.message},null,8,[`content`])]),u.modelValue?.elapsed?(v(),s(`p`,ai,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.elapsed`))+`: `+i(u.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,oi,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.traceId`))+`: `+i(u.modelValue?.response?.trace_id)+` `,1),a(T,{content:u.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})],2)):o(``,!0),u.modelValue?.response?.success===!0?(v(),s(`div`,{key:1,class:n({content:!0,full:u.full})},[u.modelValue?.response?.raw_image_url?(v(),p(A,{key:0,src:u.modelValue?.response?.image_url,"raw-src":u.modelValue?.response?.raw_image_url,class:`mb-4`},null,8,[`src`,`raw-src`])):o(``,!0),u.modelValue?.response?.actions?(v(),s(`div`,{key:1,class:n({operations:!0,full:u.full})},[(v(!0),s(c,null,g(u.modelValue?.response?.actions,(e,t)=>(v(),p(M,{key:t,class:`box-item`,effect:`dark`,content:u.getActionDescriptionWithPrice(e,u.modelValue?.request?.mode),placement:`top-start`},{default:m(()=>[d(a(j,{type:`info`,size:`small`,class:`btn-action`,"aria-label":u.actionIconMapping[e]?u.descriptionMapping[e]:void 0,onClick:t=>u.onCustom(e)},{default:m(()=>[u.actionIconMapping[e]?(v(),p(_(u.actionIconMapping[e]),{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(v(),s(c,{key:1},[r(i(u.actionMapping[e]),1)],64))]),_:2},1032,[`aria-label`,`onClick`]),[[y,u.actionMapping[e]]])]),_:2},1032,[`content`]))),128)),a(N,{path:`/midjourney/imagine`,body:u.modelValue?.request},null,8,[`body`]),a(P,{service:`midjourney`,"target-id":u.modelValue?.id,snapshot:{prompt:u.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])],2)):o(``,!0),a(k,{closable:!1,class:`mt-2 success`},{default:m(()=>[e(`p`,si,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])]),u.modelValue?.elapsed?(v(),s(`p`,ci,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.elapsed`))+`: `+i(u.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,li,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.traceId`))+`: `+i(u.modelValue?.trace_id)+` `,1),a(T,{content:u.modelValue?.trace_id},null,8,[`content`])]),e(`p`,ui,[a(F,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.imageId`))+`: `+i(u.modelValue?.response?.image_id)+` `,1),a(T,{content:u.modelValue?.response?.image_id},null,8,[`content`])])]),_:1})],2)):o(``,!0),u.modelValue?.response?o(``,!0):(v(),s(`div`,di,[a(k,{closable:!1,class:`mt-2 info`},{default:m(()=>[e(`p`,fi,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])])]),_:1})]))])])):o(``,!0),u.modelValue?.type===`videos`?(v(),s(`div`,pi,[e(`div`,mi,[a(C,{capability:`midjourney`,part:`avatar`,class:`avatar`})]),e(`div`,hi,[e(`div`,gi,[a(C,{capability:`midjourney`,part:`name`}),e(`span`,_i,i(u.$dayjs.format(``+new Date(parseFloat((u.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,vi,[u.modelValue?.request?.image_url||u.modelValue?.request?.end_image_url?(v(),s(`div`,yi,[u.modelValue?.request?.image_url?(v(),p(I,{key:0,url:u.modelValue.request.image_url,name:u.$t(`midjourney.name.imageUrl`),closable:!1},null,8,[`url`,`name`])):o(``,!0),u.modelValue?.request?.end_image_url?(v(),p(I,{key:1,url:u.modelValue.request.end_image_url,name:u.$t(`midjourney.name.endImageUrl`),closable:!1},null,8,[`url`,`name`])):o(``,!0)])):o(``,!0),u.modelValue?.request?.prompt?(v(),s(`p`,bi,[r(i(u.modelValue?.request?.prompt)+` `,1),u.modelValue?.response?o(``,!0):(v(),s(`span`,xi,` - (`+i(u.$t(`midjourney.status.pending`))+`) `,1)),u.modelValue?.response?.progress!==void 0&&u.modelValue?.response?.progress!==100?(v(),s(`span`,Si,` - (`+i(u.modelValue?.response?.progress)+`%) `,1)):o(``,!0),e(`span`,null,`(`+i(u.modelValue?.request?.mode)+`)`,1)])):o(``,!0),u.modelValue?.request?.video_id?(v(),s(`p`,Ci,[r(i(u.modelValue?.request?.video_id)+` - `+i(u.modelValue?.request?.action)+` `,1),u.modelValue?.response?o(``,!0):(v(),s(`span`,wi,` - (`+i(u.$t(`midjourney.status.pending`))+`) `,1)),e(`span`,null,`(`+i(u.modelValue?.request?.mode)+`)`,1)])):o(``,!0)]),u.modelValue?.response?.success===!1?(v(),s(`div`,{key:0,class:n({content:!0,full:u.full,failed:!0})},[a(k,{closable:!1,class:`mt-2 failure`},{default:m(()=>[u.modelValue?.request?.action?(v(),s(`p`,Ti,[a(L,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.action`))+`: `+i(u.modelValue?.request?.action),1)])):o(``,!0),u.modelValue?.request?.resolution?(v(),s(`p`,Ei,[a(R,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.resolution`))+`: `+i(u.modelValue?.request?.resolution),1)])):o(``,!0),u.modelValue?.request?.mode?(v(),s(`p`,Di,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.mode`))+`: `+i(u.modelValue?.request?.mode),1)])):o(``,!0),u.modelValue?.request?.loop===void 0?o(``,!0):(v(),s(`p`,Oi,[a(z,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.loop`))+`: `+i(u.modelValue?.request?.loop?u.$t(`midjourney.field.on`):u.$t(`midjourney.field.off`)),1)])),e(`p`,ki,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])]),e(`p`,Ai,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.failureReason`))+`: `+i(u.modelValue?.response?.error?.message)+` `,1),a(T,{content:u.modelValue?.response?.error?.message},null,8,[`content`])]),u.modelValue?.elapsed?(v(),s(`p`,ji,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.elapsed`))+`: `+i(u.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,Mi,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.traceId`))+`: `+i(u.modelValue?.response?.trace_id)+` `,1),a(T,{content:u.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})],2)):o(``,!0),u.modelValue?.response?.success===!0?(v(),s(`div`,{key:1,class:n({content:!0,full:u.full})},[u.modelValue?.response.video_urls?(v(),s(`div`,Ni,[a(B,{src:u.modelValue?.response.video_urls[0]},null,8,[`src`])])):o(``,!0),u.modelValue?.response&&u.modelValue?.response?.video_urls?(v(),s(`div`,Pi,[a(M,{class:`box-item`,effect:`dark`,content:u.$t(`luma.message.extendVideo`),placement:`top-start`},{default:m(()=>[a(j,{type:`info`,size:`small`,class:`btn-action`,onClick:f[0]||=t(e=>u.onExtend(e,u.modelValue?.response),[`stop`])},{default:m(()=>[r(i(u.$t(`midjourney.button.extend`)),1)]),_:1})]),_:1},8,[`content`]),a(M,{class:`box-item`,effect:`dark`,content:u.$t(`luma.message.downloadVideo`),placement:`top-start`},{default:m(()=>[a(j,{type:`info`,size:`small`,class:`btn-action`,onClick:f[1]||=t(e=>u.onDownload(u.modelValue.response.video_urls[0]),[`stop`])},{default:m(()=>[r(i(u.$t(`midjourney.button.download`)),1)]),_:1})]),_:1},8,[`content`]),a(N,{path:`/midjourney/videos`,body:u.modelValue?.request},null,8,[`body`]),a(P,{service:`midjourney`,"target-id":u.modelValue?.id,snapshot:{prompt:u.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(k,{closable:!1,class:`mt-2 success`},{default:m(()=>[u.modelValue?.request?.action?(v(),s(`p`,Fi,[a(L,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.action`))+`: `+i(u.modelValue?.request?.action),1)])):o(``,!0),u.modelValue?.request?.resolution?(v(),s(`p`,Ii,[a(R,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.resolution`))+`: `+i(u.modelValue?.request?.resolution),1)])):o(``,!0),u.modelValue?.request?.mode?(v(),s(`p`,Li,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.mode`))+`: `+i(u.modelValue?.request?.mode),1)])):o(``,!0),u.modelValue?.request?.loop===void 0?o(``,!0):(v(),s(`p`,Ri,[a(z,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.loop`))+`: `+i(u.modelValue?.request?.loop?u.$t(`midjourney.field.on`):u.$t(`midjourney.field.off`)),1)])),e(`p`,zi,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])]),u.modelValue?.elapsed?(v(),s(`p`,Bi,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.elapsed`))+`: `+i(u.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,Vi,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.traceId`))+`: `+i(u.modelValue?.trace_id)+` `,1),a(T,{content:u.modelValue?.trace_id},null,8,[`content`])]),e(`p`,Hi,[a(F,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.videoId`))+`: `+i(u.modelValue?.response?.video_id)+` `,1),a(T,{content:u.modelValue?.response?.video_id},null,8,[`content`])])]),_:1})],2)):o(``,!0),u.modelValue?.response?o(``,!0):(v(),s(`div`,Ui,[a(k,{closable:!1,class:`mt-2 info`},{default:m(()=>[u.modelValue?.request?.action?(v(),s(`p`,Wi,[a(L,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.action`))+`: `+i(u.modelValue?.request?.action),1)])):o(``,!0),u.modelValue?.request?.resolution?(v(),s(`p`,Gi,[a(R,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.resolution`))+`: `+i(u.modelValue?.request?.resolution),1)])):o(``,!0),u.modelValue?.request?.mode?(v(),s(`p`,Ki,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.mode`))+`: `+i(u.modelValue?.request?.mode),1)])):o(``,!0),u.modelValue?.request?.loop===void 0?o(``,!0):(v(),s(`p`,qi,[a(z,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.name.loop`))+`: `+i(u.modelValue?.request?.loop?u.$t(`midjourney.field.on`):u.$t(`midjourney.field.off`)),1)])),e(`p`,Ji,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])])]),_:1})]))])])):o(``,!0),u.modelValue?.type===`describe`?(v(),s(`div`,Yi,[e(`div`,Xi,[a(C,{capability:`midjourney`,part:`avatar`,class:`avatar`})]),e(`div`,Zi,[e(`div`,Qi,[a(C,{capability:`midjourney`,part:`name`}),e(`span`,$i,i(u.$dayjs.format(``+new Date(parseFloat((u.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,ea,[u.modelValue?.request?.image_url?(v(),s(`p`,ta,[r(i(u.modelValue?.request?.image_url)+` `,1),u.modelValue?.response?.descriptions?o(``,!0):(v(),s(`span`,na,` - (`+i(u.$t(`midjourney.status.describePending`))+`) `,1)),u.modelValue?.response?.descriptions?(v(),s(`span`,ra,` - (`+i(u.$t(`midjourney.status.describeComplete`))+`) `,1)):o(``,!0)])):o(``,!0)]),u.modelValue?.response&&!u.modelValue?.response?.descriptions?(v(),s(`div`,{key:0,class:n({content:!0,full:u.full,failed:!0})},[a(k,{closable:!1,class:`mt-2 failure`},{default:m(()=>[e(`p`,ia,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])]),e(`p`,aa,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.failureReason`))+`: `+i(u.modelValue?.response?.error?.message)+` `,1),a(T,{content:u.modelValue?.response?.error?.message},null,8,[`content`])]),u.modelValue?.elapsed?(v(),s(`p`,oa,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.elapsed`))+`: `+i(u.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,sa,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.traceId`))+`: `+i(u.modelValue?.trace_id)+` `,1),a(T,{content:u.modelValue?.trace_id},null,8,[`content`])])]),_:1})],2)):o(``,!0),u.modelValue?.response?.descriptions?(v(),s(`div`,{key:1,class:n({content:!0,full:u.full})},[e(`div`,ca,[e(`div`,la,[(v(!0),s(c,null,g(u.modelValue.response.descriptions,(t,n)=>(v(),s(`div`,{key:n,class:`flex items-start`},[t===``?o(``,!0):(v(),s(`div`,ua,[a(V,{effect:`dark`,size:`small`,type:`primary`,round:``,class:`mr-1`},{default:m(()=>[r(i(n+1),1)]),_:2},1024),e(`span`,da,[r(i(t)+` `,1),a(T,{content:t},null,8,[`content`])])]))]))),128))]),u.modelValue?.request?.image_url?(v(),p(A,{key:0,src:u.modelValue?.request?.image_url,"raw-src":u.modelValue?.request?.image_url,class:`image w-full rounded-lg`},null,8,[`src`,`raw-src`])):o(``,!0)]),e(`div`,{class:n({operations:!0,"mt-2":!0,"mb-2":!0,full:u.full})},[a(N,{path:`/midjourney/describe`,body:u.modelValue?.request},null,8,[`body`]),a(P,{service:`midjourney`,"target-id":u.modelValue?.id,snapshot:{image_url:u.modelValue?.request?.image_url}},null,8,[`target-id`,`snapshot`])],2),a(k,{closable:!1,class:`mt-2 success`},{default:m(()=>[e(`p`,fa,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])]),u.modelValue?.elapsed?(v(),s(`p`,pa,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.elapsed`))+`: `+i(u.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e(`p`,ma,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.traceId`))+`: `+i(u.modelValue?.trace_id)+` `,1),a(T,{content:u.modelValue?.trace_id},null,8,[`content`])])]),_:1})],2)):o(``,!0),u.modelValue?.response?o(``,!0):(v(),s(`div`,ha,[a(k,{closable:!1,class:`mt-2 info`},{default:m(()=>[e(`p`,ga,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(u.$t(`midjourney.field.taskId`))+`: `+i(u.modelValue?.id)+` `,1),a(T,{content:u.modelValue?.id},null,8,[`content`])])]),_:1})]))])])):o(``,!0)],64)}var va=b({name:`TaskList`,components:{TaskItem:J(Gr,[[`render`,_a],[`__scopeId`,`data-v-3db556f3`]]),BotPlaceholder:Ge,NoTasks:ue,ScrollList:le},props:{loading:{type:Boolean,default:!1},floatingLoader:{type:Boolean,default:!0}},emits:[`custom`,`extend`,`reach-top`],data(){return{job:0}},computed:{tasks(){return this.$store.state.midjourney.tasks?.items},application(){return this.$store.state.midjourney.application}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),ya={key:0,class:`p-2 flex flex-col overflow-y-auto`},ba={key:1,class:`w-full h-full flex items-center justify-center`};function xa(e,t,n,r,i,u){let d=l(`bot-placeholder`),f=l(`no-tasks`),h=l(`task-item`),_=l(`scroll-list`);return e.tasks===void 0?(v(),s(`div`,ya,[a(d)])):e.tasks&&e.tasks?.length===0?(v(),s(`div`,ba,[a(f)])):e.tasks.length>0?(v(),p(_,{key:2,ref:`scrollList`,class:`p-2 py-3 h-full flex flex-col overflow-y-auto tasks`,loading:e.loading,"floating-loader":e.floatingLoader,onReachTop:t[2]||=t=>e.$emit(`reach-top`)},{default:m(()=>[(v(!0),s(c,null,g(e.tasks,n=>(v(),p(h,{key:n.id,"model-value":n,onExtend:t[0]||=t=>e.$emit(`extend`,t),onCustom:t[1]||=t=>e.$emit(`custom`,t)},null,8,[`model-value`]))),128))]),_:1},8,[`loading`,`floating-loader`])):o(``,!0)}var Sa=b({name:`MidjourneyIndex`,components:{ConfigPanel:Wr,TaskList:J(va,[[`render`,xa]]),Layout:$e},mixins:[Ae],inject:[`initialized`],data(){return{operating:!1,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{tasks(){return this.$store.state.midjourney.tasks},credential(){return this.$store.state.midjourney.credential},config(){return this.$store.state.midjourney.config},loading(){return this.$store.state.midjourney.status.getApplications===A.Request},tasksLoading(){return this.$store.state.midjourney.status.getTasks===A.Request||this.fetchingTasks},application(){return this.$store.state.midjourney.application},walletMode(){return Ne()&&je(`midjourney`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`midjourney/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onGetTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},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 fe({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.loading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`midjourney/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplications`),await this.$store.dispatch(`midjourney/getApplications`),console.debug(`end onGetApplications`),await this.onGetTasks()},async onStartImagineTask(e){if(!e.prompt&&e.action===M.GENERATE){N.error(this.$t(`midjourney.message.promptRequired`));return}await this.startPaidTask(t=>Y.imagine(e,t),`midjourney.message.startTaskSuccess`,`midjourney.message.startTaskFailed`)},async onStartVideosTask(e){if(!e.prompt){N.error(this.$t(`midjourney.message.promptRequired`));return}if(e.action!==j.EXTEND&&!e.image_url){N.error(this.$t(`midjourney.message.imageUrlRequired`));return}await this.startPaidTask(t=>Y.videos(e,t),`midjourney.message.startVideosTaskSuccess`,`midjourney.message.startVideosTaskFailed`)},async onStartDescribeTask(e){await this.startPaidTask(t=>Y.describe(e,t),`midjourney.message.startDescribeTaskSuccess`,`midjourney.message.startDescribeTaskFailed`)},async onCustom(e){let t=we(this.config,e);this.onStartImagineTask(t)},async onGenerate(){if(Ee(this.uploadTracker,e=>this.$t(e),e=>N.warning(e))){if(console.debug(`onGenerate`,this.config),this.config?.type===`videos`){let e=De(this.config);await this.onStartVideosTask(e)}else if(this.config?.type===`imagine`){let e=Ce(this.config);await this.onStartImagineTask(e)}else if(this.config?.type===`describe`){if(!this.config?.image_url){N.error(this.$t(`midjourney.message.imageUrlRequired`));return}let e=Fe(this.config);await this.onStartDescribeTask(e)}}},paymentOptions(){if(!this.walletMode){if(!Pe())return;let e=this.credential?.token;return e?{token:e}:void 0}let e=this.getWalletContext();if(!e){N.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}return{mode:`x402`,x402:{wallet:e,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}}},async startPaidTask(e,t,n){let r=this.paymentOptions();if(r){N.info(this.$t(`midjourney.message.startingTask`));try{let n=(await Te(`midjourney`,e(r)))?.data?.task_id;this.walletMode&&!this.credential?.token&&n&&!this.walletTaskIds.includes(n)&&this.walletTaskIds.unshift(n),N.success(this.$t(t))}catch(e){if(e instanceof Oe)return;e?.response?.data?.error?.code===`used_up`?N.error(this.$t(`midjourney.message.usedUp`)):this.walletMode?N.error(`${this.$t(`common.x402Scenario.paymentFailed`)} ${e?.message||``}`.trim()):N.error(this.$t(n)+(e?.response?.data?.error?.message||``))}finally{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)}}},getWalletContext(){return be(this.$wallet)},async confirmWalletPayment(e){return Ie.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.loading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`midjourney/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},getTasksScrollElement(){return this.$refs.taskList?.getScrollElement?.()}}});function Ca(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`task-list`),u=l(`layout`);return v(),p(u,null,{config:m(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),results:m(()=>[a(c,{ref:`taskList`,loading:e.loadingMore,onCustom:e.onCustom,onReachTop:e.onReachTop},null,8,[`loading`,`onCustom`,`onReachTop`])]),_:1})}var wa=J(Sa,[[`render`,Ca]]);export{wa as default};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,I as n,Jt as r,L as i,M as a,N as o,S as s,T as c,at as l,ht as u,it as d,j as f,mt as p,ot as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{F as y}from"./icon-CDmWyIgD.js";import{r as b,t as x}from"./select-K-2CZ3eR.js";import{n as S,t as C}from"./tabs-BaqfDqfv.js";import{t as w}from"./upload-_zFgS7Nh.js";import{t as T}from"./tooltip-CjkDaYbd.js";import{t as E}from"./alert-BprQRUmf.js";import{h as D,v as O}from"./models-C4O1HNS0.js";import{t as k}from"./avatar-DEN_WCPo.js";import{n as A,r as j}from"./radio-BNhFzeBO.js";import{n as M,t as N}from"./collapse-Cn0v0672.js";import{t as P}from"./drawer-CLmU-Got.js";import{n as F,r as I,t as L}from"./dropdown-CbNRUbfy.js";import{t as R}from"./input-number-D_PD56K7.js";import{n as ee,t as te}from"./skeleton-Dj_a_iIP.js";import{t as ne}from"./slider-CAVbZ4km.js";import{t as re}from"./switch-BZMevA9h.js";import{i as ie,n as ae,r as z,t as oe}from"./Player-CG_qPu9f.js";import{t as se}from"./code-B_88gzRu.js";import{t as ce}from"./download-BQQJGY0e.js";import{t as le}from"./ellipsis-C4pNzKVr.js";import{a as B,i as ue,n as de,r as fe,s as pe,t as me}from"./pagination-CkF2u9jK.js";import{t as he}from"./image-C9t8D3m5.js";import{t as ge}from"./info-CifZclsR.js";import{t as _e}from"./loader-circle-BR0zD2Br.js";import{t as V}from"./pause-adMkKrSO.js";import{t as H}from"./play-BX89pr5h.js";import{t as ve}from"./triangle-alert-CCs6VvUs.js";import{t as ye}from"./upload-Q8MqK29R.js";import{t as U}from"./wand-sparkles-BFbcxwi3.js";import{tr as be}from"./constants-CdZEFH5x.js";import{$r as W,$t as xe,Ba as G,Jn as Se,Jt as Ce,Ma as K,O as q,Oi as we,Qt as Te,Si as Ee,Yn as J,Zr as Y,_n as De,en as Oe,hi as X,ia as ke,in as Ae,mi as Z,pn as je,tn as Me,va as Q,xa as $}from"./index-C-w8AJfV.js";import{t as Ne}from"./CopyToClipboard-B8YmxJt6.js";import{t as Pe}from"./ReportDialog-CtH2W2Ml.js";import{n as Fe}from"./taskDrawerMixin-DyAUhFEq.js";import{t as Ie}from"./Consumption-DeigvrPq.js";import{t as Le}from"./ScenarioPaymentMode-z1NgjkNu.js";import{t as Re}from"./ApiCodeDialog-ZrQ31cdo.js";var ze=v({name:`LayoutProducer`,components:{MagicIcon:U,ElDrawer:P,ElButton:K},mixins:[Fe],data(){return{preview:!1}},computed:{}}),Be={class:`main flex flex-row flex-1`},Ve={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},He={class:`result h-full flex flex-col flex-1 min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`},Ue={class:`preview h-full w-[300px] flex flex-col`};function We(t,n,r,a,s,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),o(`div`,Be,[e(`div`,Ve,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,He,[d(t.$slots,`result`,{},void 0,!0)]),e(`div`,Ue,[d(t.$slots,`preview`,{},void 0,!0)]),u(i(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[i(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[_,!t.tasksEmpty]]),i(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var Ge=q(ze,[[`render`,We],[`__scopeId`,`data-v-6461643a`]]),Ke=v({name:`TypeSelector`,components:{ElSelect:b,ElOption:x,ElSwitch:re,InfoIcon:B},data(){return{options:[{label:`FUZZ-2.0 Pro`,value:`FUZZ-2.0 Pro`,desc:this.$t(`producer.model.fuzz20proDesc`)},{label:`FUZZ-2.0`,value:`FUZZ-2.0`,desc:this.$t(`producer.model.fuzz20desc`)},{label:`FUZZ-2.0 Raw`,value:`FUZZ-2.0 Raw`,desc:this.$t(`producer.model.fuzz20rawDesc`)},{label:`FUZZ-1.1 Pro`,value:`FUZZ-1.1 Pro`,desc:this.$t(`producer.model.fuzz11proDesc`)},{label:`FUZZ-1.1`,value:`FUZZ-1.1`,desc:this.$t(`producer.model.fuzz11desc`)},{label:`FUZZ-1.0 Pro`,value:`FUZZ-1.0 Pro`,desc:this.$t(`producer.model.fuzz10proDesc`)},{label:`FUZZ-1.0`,value:`FUZZ-1.0`,desc:this.$t(`producer.model.fuzz10desc`)},{label:`FUZZ-0.8`,value:`FUZZ-0.8`,desc:this.$t(`producer.model.fuzz08desc`)}]}},computed:{custom:{get(){return this.$store.state.producer?.config?.custom||!1},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,custom:e})}},instrumental:{get(){return this.$store.state.producer?.config?.instrumental||!1},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,instrumental:e})}},model:{get(){return this.$store.state.producer?.config?.model},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,model:e})}}},mounted(){this.model||=be}}),qe={class:`mb-3`},Je={class:`flex items-center mb-1`},Ye={class:`text-sm font-bold`},Xe={class:`model-option`},Ze={class:`model-option-name`},Qe={class:`model-option-desc`},$e={key:0,class:`flex items-center justify-between mb-3`},et={class:`flex items-center`},tt={class:`text-sm font-bold`};function nt(t,n,s,u,d,m){let _=l(`el-option`),v=l(`el-select`),y=l(`info-icon`),b=l(`el-switch`);return g(),o(`div`,null,[e(`div`,qe,[e(`div`,Je,[e(`span`,Ye,r(t.$t(`producer.name.model`)),1)]),i(v,{modelValue:t.model,"onUpdate:modelValue":n[0]||=e=>t.model=e,class:`w-full model-select`,size:`default`,placeholder:t.$t(`producer.placeholder.select`)},{default:p(()=>[(g(!0),o(c,null,h(t.options,t=>(g(),f(_,{key:t.value,label:t.label,value:t.value},{default:p(()=>[e(`div`,Xe,[e(`span`,Ze,r(t.label),1),e(`span`,Qe,r(t.desc),1)])]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])]),t.custom?(g(),o(`div`,$e,[e(`div`,et,[e(`span`,tt,r(t.$t(`producer.name.instrumental`)),1),i(y,{content:t.$t(`producer.description.instrumental`)},null,8,[`content`])]),i(b,{modelValue:t.instrumental,"onUpdate:modelValue":n[1]||=e=>t.instrumental=e},null,8,[`modelValue`])])):a(``,!0)])}var rt=q(Ke,[[`render`,nt],[`__scopeId`,`data-v-42496b9a`]]),it=v({name:`UploadAudio`,components:{UploadIcon:ye,ElUpload:w,ElButton:K,ElRadioGroup:j,ElRadioButton:A,InfoIcon:B},mixins:[Me,xe,Ce],emits:[`change`],data(){return{fileList:[],uploadUrl:ke()+`/api/v1/files/`,audioPreviewUrl:null,uploading:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},credential(){return this.$store.state.producer.credential},config(){return this.$store.state.producer.config},urls(){return this.fileList.map(e=>e?.response?.file_url)},hasUploadedAudio(){let e=this.$store.state.producer?.config?.action;return e===`upload_extend`||e===`upload_cover`},uploadAction:{get(){return this.$store.state.producer?.config?.action||`upload_extend`},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,action:e})}}},watch:{urls:{handler(e){this.$emit(`change`,e)}}},methods:{onExceed(){O.warning(this.$t(`producer.message.uploadReferencesExceed`))},onError(){this.uploading=!1,O.error(this.$t(`producer.message.uploadReferencesError`))},async onSuccess(){let e=this.urls?.[0];if(!e){this.uploading=!1;return}this.audioPreviewUrl=e,await this.onGenerateAudioId(e)},async onGenerateAudioId(e){let t={audio_url:e},n=this.credential?.token;if(!n){console.error(`no token specified`),this.uploading=!1;return}this.uploading=!0,O.info(this.$t(`producer.message.startingUploadAudio`));try{let e=(await J.upload(t,{token:n})).data?.data.audio_id;this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,audio_id:e,action:`upload_extend`}),O.success(this.$t(`producer.message.startUploadAudioSuccess`))}catch(e){O.error(e?.response?.data?.error?.message||this.$t(`producer.message.startUploadAudioFailed`))}finally{this.uploading=!1}}}}),at={class:`relative`},ot={class:`flex justify-between items-center mb-2`},st={class:`flex justify-start items-center`},ct={class:`text-sm font-bold`},lt={key:0,class:`mb-2`},ut=[`src`],dt={key:1,class:`mt-1`};function ft(t,s,c,u,d,f){let m=l(`info-icon`),h=l(`upload-icon`),_=l(`el-button`),v=l(`el-upload`),y=l(`el-radio-button`),b=l(`el-radio-group`);return g(),o(`div`,at,[e(`div`,ot,[e(`div`,st,[e(`span`,ct,r(t.$t(`producer.name.referenceAudios`)),1),i(m,{content:t.$t(`producer.description.uploadAudios`)},null,8,[`content`])]),i(v,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":s[0]||=e=>t.fileList=e,name:`file`,limit:1,class:`upload-wrapper inline-upload`,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,accept:`.mp3,.wav,.m4a,audio/*`,"show-file-list":!1,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[i(_,{round:``,type:`primary`,size:`small`,loading:t.uploading},{default:p(()=>[i(h,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`producer.button.uploadAudios`)),1)]),_:1},8,[`loading`])]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])]),t.audioPreviewUrl?(g(),o(`div`,lt,[e(`audio`,{src:t.audioPreviewUrl,controls:``,class:`w-full`},null,8,ut)])):a(``,!0),t.hasUploadedAudio?(g(),o(`div`,dt,[i(b,{modelValue:t.uploadAction,"onUpdate:modelValue":s[1]||=e=>t.uploadAction=e,size:`small`},{default:p(()=>[i(y,{value:`upload_extend`},{default:p(()=>[n(r(t.$t(`producer.button.extend`)),1)]),_:1}),i(y,{value:`upload_cover`},{default:p(()=>[n(r(t.$t(`producer.button.cover_music`)),1)]),_:1})]),_:1},8,[`modelValue`])])):a(``,!0)])}var pt=q(it,[[`render`,ft],[`__scopeId`,`data-v-3938abc2`]]),mt=v({name:`PromptInput`,components:{PromptTextarea:ue},computed:{prompt:{get(){return this.$store.state.producer?.config?.prompt},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,prompt:e})}}},mounted(){this.prompt||=``}});function ht(e,t,n,r,i,a){let o=l(`prompt-textarea`);return g(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`producer.name.songDescription`),info:e.$t(`producer.description.prompt`),placeholder:e.$t(`producer.placeholder.prompt`),"min-rows":5,"max-rows":14},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var gt=q(mt,[[`render`,ht]]),_t=v({name:`LyricInput`,components:{MagicIcon:U,ElInput:G,ElButton:K,InfoIcon:B},data(){return{generatingLyrics:!1}},computed:{lyric:{get(){return this.$store.state.producer?.config?.lyric},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,lyric:e})}},config(){return this.$store.state.producer?.config},credential(){return this.$store.state.producer?.credential},walletMode(){return Z()&&X(`producer`).mode===`wallet`}},mounted(){this.lyric||=``},methods:{paymentOptions(){if(!this.walletMode){let e=this.credential?.token;return e?{token:e}:void 0}let e=this.getWalletContext();if(!e){O.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}return{mode:`x402`,x402:{wallet:e,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}}},async onGenerateLyrics(){let e=this.paymentOptions();if(!e)return;let t=this.config?.style||this.config?.title||`a beautiful song`;this.generatingLyrics=!0,O.info(this.$t(`producer.message.generatingLyrics`));try{let n=(await J.lyric({prompt:t},e)).data?.data;n?.text&&(this.lyric=n.text,n?.title&&!this.config?.title&&this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,lyric:n.text,title:n.title}),O.success(this.$t(`producer.message.generateLyricsSuccess`)))}catch(e){if(e instanceof Y)return;O.error(this.$t(`producer.message.generateLyricsFailed`))}finally{this.generatingLyrics=!1}},getWalletContext(){return W(this.$wallet)},async confirmWalletPayment(e){return Q.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)}}}),vt={class:`field`},yt={class:`flex items-center justify-between mb-1`},bt={class:`flex items-center`},xt={class:`text-sm font-bold`};function St(t,s,c,u,d,m){let h=l(`info-icon`),_=l(`magic-icon`),v=l(`el-button`),y=l(`el-input`);return g(),o(`div`,vt,[e(`div`,yt,[e(`div`,bt,[e(`span`,xt,r(t.$t(`producer.name.lyrics`)),1),i(h,{content:t.$t(`producer.description.lyrics`)},null,8,[`content`])]),t.config?.action===`extend`?a(``,!0):(g(),f(v,{key:0,size:`small`,loading:t.generatingLyrics,round:``,onClick:t.onGenerateLyrics},{default:p(()=>[t.generatingLyrics?a(``,!0):(g(),f(_,{key:0,class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),n(` `+r(t.$t(`producer.button.generate_lyrics`)),1)]),_:1},8,[`loading`,`onClick`]))]),t.config?.action===`extend`?(g(),f(y,{key:1,modelValue:t.lyric,"onUpdate:modelValue":s[1]||=e=>t.lyric=e,rows:5,type:`textarea`,class:`lyrics`,placeholder:t.$t(`producer.placeholder.extend.lyrics`)},null,8,[`modelValue`,`placeholder`])):(g(),f(y,{key:0,modelValue:t.lyric,"onUpdate:modelValue":s[0]||=e=>t.lyric=e,rows:5,type:`textarea`,class:`lyrics`,placeholder:t.$t(`producer.placeholder.lyrics`)},null,8,[`modelValue`,`placeholder`]))])}var Ct=q(_t,[[`render`,St],[`__scopeId`,`data-v-548b9253`]]),wt=v({name:`StyleInput`,components:{ElInput:G,InfoIcon:B},computed:{style:{get(){return this.$store.state.producer?.config?.style},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,style:e})}}}}),Tt={class:`field`},Et={class:`flex items-center justify-between mb-1`},Dt={class:`flex items-center`},Ot={class:`text-sm font-bold`};function kt(t,n,a,s,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),o(`div`,Tt,[e(`div`,Et,[e(`div`,Dt,[e(`span`,Ot,r(t.$t(`producer.name.style`)),1),i(d,{content:t.$t(`producer.description.style`)},null,8,[`content`])])]),i(f,{modelValue:t.style,"onUpdate:modelValue":n[0]||=e=>t.style=e,rows:2,type:`textarea`,placeholder:t.$t(`producer.placeholder.style`)},null,8,[`modelValue`,`placeholder`])])}var At=q(wt,[[`render`,kt]]),jt=v({name:`TitleInput`,components:{ElInput:G,InfoIcon:B},computed:{title:{get(){return this.$store.state.producer?.config?.title},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,title:e})}}}}),Mt={class:`field`},Nt={class:`flex items-center mb-1`},Pt={class:`text-sm font-bold`};function Ft(t,n,a,s,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),o(`div`,Mt,[e(`div`,Nt,[e(`span`,Pt,r(t.$t(`producer.name.title`)),1),i(d,{content:t.$t(`producer.description.title`)},null,8,[`content`])]),i(f,{modelValue:t.title,"onUpdate:modelValue":n[0]||=e=>t.title=e,placeholder:t.$t(`producer.placeholder.title`)},null,8,[`modelValue`,`placeholder`])])}var It=q(jt,[[`render`,Ft]]),Lt=v({name:`ExtendFromInput`,components:{ElImage:$,ElIcon:y,ElInputNumber:R,VideoPlay:H,VideoPause:V},data(){return{}},computed:{audio(){return this.$store.state.producer?.config?.audio},value:{get(){return this.$store.state.producer?.config?.continue_at},set(e){console.debug(`set continue_at`,e),this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,continue_at:e?parseInt(e):void 0})}}},mounted(){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:z,onPlay(e){this.$store.dispatch(`producer/setAudio`,{...this.$store.state.producer.audio,...e,state:`playing`}),console.log(`on play`)},onPause(e){this.$store.dispatch(`producer/setAudio`,{...this.$store.state.producer.audio,...e,state:`paused`}),console.log(`on pause`)},onClick(e){this.$store.state?.producer?.audio?.id!==e.id&&this.onPlay({...e,progress:0})}}}),Rt={class:`field`},zt={class:`box`},Bt={class:`title font-bold`},Vt={class:`input-wrapper`},Ht={class:`task`},Ut={class:`left`},Wt=[`aria-label`,`title`],Gt=[`aria-label`,`title`],Kt={key:2,class:`duration`},qt={class:`info`},Jt={class:`title`},Yt={class:`style`};function Xt(n,c,d,f,h,_){let v=l(`el-input-number`),y=l(`el-image`),b=l(`video-pause`),x=l(`el-icon`),S=l(`video-play`),C=m(`loading`);return g(),o(`div`,Rt,[e(`div`,zt,[e(`h2`,Bt,r(n.$t(`producer.name.extend`)),1),e(`div`,Vt,[i(v,{modelValue:n.value,"onUpdate:modelValue":c[0]||=e=>n.value=e,class:`value`,min:0,max:n.audio?.duration,controls:!1,placeholder:n.$t(`producer.placeholder.extend.continue_at`),onChange:n.handleChange},null,8,[`modelValue`,`max`,`placeholder`,`onChange`])])]),e(`div`,Ht,[n.audio?(g(),o(`div`,{key:0,class:`audio`,onClick:c[7]||=e=>n.onClick(n.audio)},[u((g(),o(`div`,Ut,[i(y,{src:n.audio?.image_url,class:`cover`,fit:`cover`},null,8,[`src`]),n.audio?.audio_url&&n.$store.state?.producer?.audio?.id===n.audio.id&&n.$store.state?.producer?.audio?.state===`playing`?(g(),o(`div`,{key:0,class:`overlay`,role:`button`,tabindex:`0`,"aria-label":n.$t(`common.player.pause`),title:n.$t(`common.player.pause`),onClick:c[1]||=e=>n.onPause(n.audio),onKeydown:[c[2]||=s(t(e=>n.onPause(n.audio),[`stop`,`prevent`]),[`enter`]),c[3]||=s(t(e=>n.onPause(n.audio),[`stop`,`prevent`]),[`space`])]},[i(x,null,{default:p(()=>[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})],40,Wt)):a(``,!0),n.audio?.audio_url&&(n.$store.state?.producer?.audio?.id!==n.audio.id||n.$store.state?.producer?.audio?.id===n.audio.id&&n.$store.state?.producer?.audio?.state===`paused`)?(g(),o(`div`,{key:1,class:`overlay`,role:`button`,tabindex:`0`,"aria-label":n.$t(`common.player.play`),title:n.$t(`common.player.play`),onClick:c[4]||=e=>n.onPlay(n.audio),onKeydown:[c[5]||=s(t(e=>n.onPlay(n.audio),[`stop`,`prevent`]),[`enter`]),c[6]||=s(t(e=>n.onPlay(n.audio),[`stop`,`prevent`]),[`space`])]},[i(x,null,{default:p(()=>[i(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})],40,Gt)):a(``,!0),n.audio?.duration?(g(),o(`div`,Kt,r(n.useFormatDuring(n.audio?.duration)),1)):a(``,!0)])),[[C,!n.audio?.audio_url]]),e(`div`,qt,[e(`h2`,Jt,r(n.audio?.title),1),e(`p`,Yt,r(n.audio?.style),1)])])):a(``,!0)])])}var Zt=q(Lt,[[`render`,Xt],[`__scopeId`,`data-v-96005bd8`]]),Qt=v({name:`CoverFromInput`,components:{ElImage:$,ElIcon:y,VideoPlay:H,VideoPause:V},data(){return{}},computed:{audio(){return this.$store.state.producer?.config?.audio},value:{get(){return this.$store.state.producer?.config?.continue_at},set(e){console.debug(`set continue_at`,e),this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,continue_at:e?parseInt(e):void 0})}}},mounted(){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:z,onPlay(e){this.$store.dispatch(`producer/setAudio`,{...this.$store.state.producer.audio,...e,state:`playing`}),console.log(`on play`)},onPause(e){this.$store.dispatch(`producer/setAudio`,{...this.$store.state.producer.audio,...e,state:`paused`}),console.log(`on pause`)},onClick(e){this.$store.state?.producer?.audio?.id!==e.id&&this.onPlay({...e,progress:0})}}}),$t={class:`field`},en={class:`box`},tn={class:`title font-bold`},nn={class:`task`},rn={class:`left`},an=[`aria-label`,`title`],on=[`aria-label`,`title`],sn={key:2,class:`duration`},cn={class:`info`},ln={class:`title`},un={class:`style`};function dn(n,c,d,f,h,_){let v=l(`el-image`),y=l(`video-pause`),b=l(`el-icon`),x=l(`video-play`),S=m(`loading`);return g(),o(`div`,$t,[e(`div`,en,[e(`h2`,tn,r(n.$t(`producer.name.cover`)),1)]),e(`div`,nn,[n.audio?(g(),o(`div`,{key:0,class:`audio`,onClick:c[6]||=e=>n.onClick(n.audio)},[u((g(),o(`div`,rn,[i(v,{src:n.audio?.image_url,class:`cover`,fit:`cover`},null,8,[`src`]),n.audio?.audio_url&&n.$store.state?.producer?.audio?.id===n.audio.id&&n.$store.state?.producer?.audio?.state===`playing`?(g(),o(`div`,{key:0,class:`overlay`,role:`button`,tabindex:`0`,"aria-label":n.$t(`common.player.pause`),title:n.$t(`common.player.pause`),onClick:c[0]||=e=>n.onPause(n.audio),onKeydown:[c[1]||=s(t(e=>n.onPause(n.audio),[`stop`,`prevent`]),[`enter`]),c[2]||=s(t(e=>n.onPause(n.audio),[`stop`,`prevent`]),[`space`])]},[i(b,null,{default:p(()=>[i(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})],40,an)):a(``,!0),n.audio?.audio_url&&(n.$store.state?.producer?.audio?.id!==n.audio.id||n.$store.state?.producer?.audio?.id===n.audio.id&&n.$store.state?.producer?.audio?.state===`paused`)?(g(),o(`div`,{key:1,class:`overlay`,role:`button`,tabindex:`0`,"aria-label":n.$t(`common.player.play`),title:n.$t(`common.player.play`),onClick:c[3]||=e=>n.onPlay(n.audio),onKeydown:[c[4]||=s(t(e=>n.onPlay(n.audio),[`stop`,`prevent`]),[`enter`]),c[5]||=s(t(e=>n.onPlay(n.audio),[`stop`,`prevent`]),[`space`])]},[i(b,null,{default:p(()=>[i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})],40,on)):a(``,!0),n.audio?.duration?(g(),o(`div`,sn,r(n.useFormatDuring(n.audio?.duration)),1)):a(``,!0)])),[[S,!n.audio?.audio_url]]),e(`div`,cn,[e(`h2`,ln,r(n.audio?.title),1),e(`p`,un,r(n.audio?.style),1)])])):a(``,!0)])])}var fn=q(Qt,[[`render`,dn],[`__scopeId`,`data-v-9a4b0b16`]]),pn=v({name:`VocalGenderSelector`,components:{ElRadioGroup:j,ElRadioButton:A,InfoIcon:B},computed:{vocalGender:{get(){return this.$store.state.producer?.config?.vocal_gender||``},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,vocal_gender:e||void 0})}}}}),mn={class:`mb-2`},hn={class:`flex items-center mb-1`},gn={class:`text-sm font-bold`};function _n(t,a,s,c,u,d){let f=l(`info-icon`),m=l(`el-radio-button`),h=l(`el-radio-group`);return g(),o(`div`,mn,[e(`div`,hn,[e(`span`,gn,r(t.$t(`producer.name.vocalGender`)),1),i(f,{content:t.$t(`producer.description.vocalGender`)},null,8,[`content`])]),i(h,{modelValue:t.vocalGender,"onUpdate:modelValue":a[0]||=e=>t.vocalGender=e},{default:p(()=>[i(m,{value:``},{default:p(()=>[n(r(t.$t(`producer.gender.auto`)),1)]),_:1}),i(m,{value:`f`},{default:p(()=>[n(r(t.$t(`producer.gender.female`)),1)]),_:1}),i(m,{value:`m`},{default:p(()=>[n(r(t.$t(`producer.gender.male`)),1)]),_:1})]),_:1},8,[`modelValue`])])}var vn=q(pn,[[`render`,_n]]),yn=v({name:`AdvancedParams`,components:{ElCollapse:N,ElCollapseItem:M,ElInput:G,ElSlider:ne,ElInputNumber:R,InfoIcon:B},data(){return{activeNames:[]}},computed:{config(){return this.$store.state.producer?.config},styleNegative:{get(){return this.$store.state.producer?.config?.style_negative||``},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,style_negative:e||void 0})}},lyricPrompt:{get(){return this.$store.state.producer?.config?.lyric_prompt||``},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,lyric_prompt:e||void 0})}},weirdness:{get(){return this.$store.state.producer?.config?.weirdness??.5},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,weirdness:e})}},soundStrength:{get(){return this.$store.state.producer?.config?.sound_strength??.7},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,sound_strength:e})}},lyricsStrength:{get(){return this.$store.state.producer?.config?.lyrics_strength??.7},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,lyrics_strength:e})}},seed:{get(){return this.$store.state.producer?.config?.seed},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,seed:e})}}},mounted(){let e=this.$store.state.producer?.config;if(!e)return;let t={};typeof e.weirdness==`number`&&e.weirdness>1&&(t.weirdness=e.weirdness/100),typeof e.sound_strength==`number`&&e.sound_strength>1&&(t.sound_strength=e.sound_strength/100),typeof e.lyrics_strength==`number`&&e.lyrics_strength>1&&(t.lyrics_strength=e.lyrics_strength/100),Object.keys(t).length>0&&this.$store.commit(`producer/setConfig`,{...e,...t})}}),bn={key:0,class:`mb-3`},xn={class:`flex items-center mb-1`},Sn={class:`text-xs font-bold`},Cn={key:1,class:`mb-3`},wn={class:`flex items-center mb-1`},Tn={class:`text-xs font-bold`},En={class:`mb-3`},Dn={class:`flex items-center justify-between mb-1`},On={class:`flex items-center`},kn={class:`text-xs font-bold`},An={class:`text-xs text-[var(--el-text-color-secondary)]`},jn={class:`mb-3`},Mn={class:`flex items-center justify-between mb-1`},Nn={class:`flex items-center`},Pn={class:`text-xs font-bold`},Fn={class:`text-xs text-[var(--el-text-color-secondary)]`},In={key:2,class:`mb-3`},Ln={class:`flex items-center justify-between mb-1`},Rn={class:`flex items-center`},zn={class:`text-xs font-bold`},Bn={class:`text-xs text-[var(--el-text-color-secondary)]`},Vn={class:`mb-3`},Hn={class:`flex items-center mb-1`},Un={class:`text-xs font-bold`};function Wn(t,n,s,c,u,d){let m=l(`info-icon`),h=l(`el-input`),_=l(`el-slider`),v=l(`el-input-number`),y=l(`el-collapse-item`),b=l(`el-collapse`);return g(),f(b,{modelValue:t.activeNames,"onUpdate:modelValue":n[6]||=e=>t.activeNames=e,class:`advanced-collapse`},{default:p(()=>[i(y,{title:t.$t(`producer.name.advancedParams`),name:`advanced`},{default:p(()=>[t.config?.custom?(g(),o(`div`,bn,[e(`div`,xn,[e(`span`,Sn,r(t.$t(`producer.name.styleNegative`)),1),i(m,{content:t.$t(`producer.description.styleNegative`)},null,8,[`content`])]),i(h,{modelValue:t.styleNegative,"onUpdate:modelValue":n[0]||=e=>t.styleNegative=e,size:`small`,placeholder:t.$t(`producer.placeholder.styleNegative`)},null,8,[`modelValue`,`placeholder`])])):a(``,!0),t.config?.custom&&!t.config?.instrumental?(g(),o(`div`,Cn,[e(`div`,wn,[e(`span`,Tn,r(t.$t(`producer.name.lyricPrompt`)),1),i(m,{content:t.$t(`producer.description.lyricPrompt`)},null,8,[`content`])]),i(h,{modelValue:t.lyricPrompt,"onUpdate:modelValue":n[1]||=e=>t.lyricPrompt=e,size:`small`,placeholder:t.$t(`producer.placeholder.lyricPrompt`)},null,8,[`modelValue`,`placeholder`])])):a(``,!0),e(`div`,En,[e(`div`,Dn,[e(`div`,On,[e(`span`,kn,r(t.$t(`producer.name.weirdness`)),1),i(m,{content:t.$t(`producer.description.weirdness`)},null,8,[`content`])]),e(`span`,An,r(t.weirdness??.5),1)]),i(_,{modelValue:t.weirdness,"onUpdate:modelValue":n[2]||=e=>t.weirdness=e,min:0,max:1,step:.01},null,8,[`modelValue`])]),e(`div`,jn,[e(`div`,Mn,[e(`div`,Nn,[e(`span`,Pn,r(t.$t(`producer.name.soundStrength`)),1),i(m,{content:t.$t(`producer.description.soundStrength`)},null,8,[`content`])]),e(`span`,Fn,r(t.soundStrength??.7),1)]),i(_,{modelValue:t.soundStrength,"onUpdate:modelValue":n[3]||=e=>t.soundStrength=e,min:.2,max:1,step:.01},null,8,[`modelValue`])]),t.config?.custom&&!t.config?.instrumental?(g(),o(`div`,In,[e(`div`,Ln,[e(`div`,Rn,[e(`span`,zn,r(t.$t(`producer.name.lyricsStrength`)),1),i(m,{content:t.$t(`producer.description.lyricsStrength`)},null,8,[`content`])]),e(`span`,Bn,r(t.lyricsStrength??.7),1)]),i(_,{modelValue:t.lyricsStrength,"onUpdate:modelValue":n[4]||=e=>t.lyricsStrength=e,min:0,max:1,step:.01},null,8,[`modelValue`])])):a(``,!0),e(`div`,Vn,[e(`div`,Hn,[e(`span`,Un,r(t.$t(`producer.name.seed`)),1),i(m,{content:t.$t(`producer.description.seed`)},null,8,[`content`])]),i(v,{modelValue:t.seed,"onUpdate:modelValue":n[5]||=e=>t.seed=e,min:0,controls:!1,size:`small`,placeholder:t.$t(`producer.placeholder.seed`),class:`w-full`},null,8,[`modelValue`,`placeholder`])])]),_:1},8,[`title`])]),_:1},8,[`modelValue`])}var Gn=q(yn,[[`render`,Wn],[`__scopeId`,`data-v-f9296888`]]),Kn=v({name:`ReplaceSectionInput`,components:{ElInputNumber:R,ElImage:$,InfoIcon:B},computed:{audio(){return this.$store.state.producer?.config?.audio},replaceSectionStart:{get(){return this.$store.state.producer?.config?.replace_section_start},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,replace_section_start:e})}},replaceSectionEnd:{get(){return this.$store.state.producer?.config?.replace_section_end},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,replace_section_end:e})}}},methods:{onClick(e){this.$store.dispatch(`producer/setAudio`,{...this.$store.state.producer.audio,...e,state:`playing`})}}}),qn={class:`field`},Jn={class:`flex items-center mb-2`},Yn={class:`text-sm font-bold m-0`},Xn={key:0,class:`task mb-2`},Zn={class:`left relative w-[50px] h-[50px] mr-3 flex-shrink-0`},Qn={class:`info flex-1 min-w-0`},$n={class:`text-sm font-bold m-0 truncate`},er={class:`text-xs text-[var(--el-text-color-secondary)] m-0 truncate`},tr={class:`flex gap-2`};function nr(t,n,s,c,d,f){let p=l(`info-icon`),h=l(`el-image`),_=l(`el-input-number`),v=m(`loading`);return g(),o(`div`,qn,[e(`div`,Jn,[e(`h2`,Yn,r(t.$t(`producer.name.replaceSection`)),1),i(p,{content:t.$t(`producer.description.replaceSection`)},null,8,[`content`])]),t.audio?(g(),o(`div`,Xn,[e(`div`,{class:`audio flex items-center`,onClick:n[0]||=e=>t.onClick(t.audio)},[u((g(),o(`div`,Zn,[i(h,{src:t.audio?.image_url,class:`w-full h-full rounded`,fit:`cover`},null,8,[`src`])])),[[v,!t.audio?.audio_url]]),e(`div`,Qn,[e(`h2`,$n,r(t.audio?.title),1),e(`p`,er,r(t.audio?.style),1)])])])):a(``,!0),e(`div`,tr,[i(_,{modelValue:t.replaceSectionStart,"onUpdate:modelValue":n[1]||=e=>t.replaceSectionStart=e,class:`flex-1`,min:0,max:t.audio?.duration,controls:!1,placeholder:t.$t(`producer.placeholder.replaceSectionStart`)},null,8,[`modelValue`,`max`,`placeholder`]),i(_,{modelValue:t.replaceSectionEnd,"onUpdate:modelValue":n[2]||=e=>t.replaceSectionEnd=e,class:`flex-1`,min:t.replaceSectionStart||0,max:t.audio?.duration,controls:!1,placeholder:t.$t(`producer.placeholder.replaceSectionEnd`)},null,8,[`modelValue`,`min`,`max`,`placeholder`])])])}var rr=v({name:`PresetPanel`,components:{CleanupIcon:ie,MagicIcon:U,TypeSelector:rt,PromptInput:gt,LyricInput:Ct,StyleInput:At,TitleInput:It,ExtendFromInput:Zt,CoverFromInput:fn,UploadAudio:pt,VocalGenderSelector:vn,AdvancedParams:Gn,ReplaceSectionInput:q(Kn,[[`render`,nr]]),ElButton:K,ElTabs:S,ElTabPane:C,Consumption:Ie,ScenarioPaymentMode:Le},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.producer?.config},mode:{get(){return this.$store.state.producer?.config?.custom?`custom`:`simple`},set(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,custom:e===`custom`})}},consumption(){return Ae(this.config,this.service?.cost)},service(){return this.$store.state.producer?.service},walletMode(){return Z()&&X(`producer`).mode===`wallet`},generateButtonText(){let e=this.config?.action;return e===`extend`||e===`upload_extend`?this.$t(`producer.button.extend`):e===`cover`||e===`upload_cover`?this.$t(`producer.button.cover_music`):e===`variation`?this.$t(`producer.button.variation`):e===`replace_section`?this.$t(`producer.button.replace_section`):e===`stems`?this.$t(`producer.button.get_stems`):e===`swap_vocals`?this.$t(`producer.button.swap_vocals`):e===`swap_instrumentals`?this.$t(`producer.button.swap_instrumentals`):this.$t(`producer.button.generate`)}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=X(`producer`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await J.quoteAudio(Se(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)},onClearAll(){this.$store.commit(`producer/setConfig`,{custom:this.$store.state.producer?.config?.custom||!1,instrumental:!1,prompt:``,lyric:``,style:``,title:``,model:this.$store.state.producer?.config?.model})}}}),ir={class:`flex flex-col h-full`},ar={class:`flex-1 min-h-0 overflow-hidden`},or={class:`p-5`},sr={class:`p-5`},cr={class:`flex flex-col items-center justify-center px-5 pb-5 gap-2`},lr={class:`flex gap-2 w-full`};function ur(t,s,c,u,d,m){let h=l(`type-selector`),_=l(`upload-audio`),v=l(`prompt-input`),y=l(`extend-from-input`),b=l(`cover-from-input`),x=l(`replace-section-input`),S=l(`advanced-params`),C=l(`el-tab-pane`),w=l(`lyric-input`),T=l(`style-input`),E=l(`title-input`),D=l(`vocal-gender-selector`),O=l(`el-tabs`),k=l(`scenario-payment-mode`),A=l(`consumption`),j=l(`cleanup-icon`),M=l(`el-button`),N=l(`magic-icon`);return g(),o(`div`,ir,[e(`div`,ar,[i(O,{modelValue:t.mode,"onUpdate:modelValue":s[0]||=e=>t.mode=e,class:`producer-mode-tabs scenario-tabs scenario-tabs--scrollable scenario-tabs--divided`},{default:p(()=>[i(C,{label:t.$t(`producer.mode.simple`),name:`simple`},{default:p(()=>[e(`div`,or,[i(h,{class:`mb-4`}),i(_,{class:`mb-4`}),i(v,{class:`mb-4`}),t.config?.action===`extend`?(g(),f(y,{key:0,class:`mb-4`})):a(``,!0),t.config?.action===`cover`?(g(),f(b,{key:1,class:`mb-4`})):a(``,!0),t.config?.action===`replace_section`?(g(),f(x,{key:2,class:`mb-4`})):a(``,!0),i(S,{class:`mb-4`})])]),_:1},8,[`label`]),i(C,{label:t.$t(`producer.mode.custom`),name:`custom`},{default:p(()=>[e(`div`,sr,[i(h,{class:`mb-4`}),i(_,{class:`mb-4`}),t.config?.instrumental?a(``,!0):(g(),f(w,{key:0,class:`mb-4`})),i(T,{class:`mb-4`}),i(E,{class:`mb-4`}),t.config?.instrumental?a(``,!0):(g(),f(D,{key:1,class:`mb-4`})),t.config?.action===`extend`?(g(),f(y,{key:2,class:`mb-4`})):a(``,!0),t.config?.action===`cover`?(g(),f(b,{key:3,class:`mb-4`})):a(``,!0),t.config?.action===`replace_section`?(g(),f(x,{key:4,class:`mb-4`})):a(``,!0),i(S,{class:`mb-4`})])]),_:1},8,[`label`])]),_:1},8,[`modelValue`])]),e(`div`,cr,[i(k,{scenario:`producer`}),t.walletMode?a(``,!0):(g(),f(A,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),e(`div`,lr,[i(M,{class:`flex-1`,onClick:t.onClearAll},{default:p(()=>[i(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.$t(`producer.button.clear_all`)),1)]),_:1},8,[`onClick`]),i(M,{type:`primary`,class:`flex-1`,round:``,onClick:t.onGenerate},{default:p(()=>[i(N,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(t.generateButtonText),1)]),_:1},8,[`onClick`])])])])}var dr=q(rr,[[`render`,ur],[`__scopeId`,`data-v-983479b0`]]),fr=ae(),pr=v({name:`TaskPreview`,components:{ChannelIcon:pe,CodeIcon:se,DownloadIcon:ce,InfoIcon:ge,MagicIcon:U,MoreIcon:le,WarningIcon:ve,ElAlert:E,ElImage:$,ElIcon:y,ElTooltip:T,VideoPlay:H,VideoPause:V,ElDropdown:L,ElDropdownMenu:I,ElDropdownItem:F,Loading:_e,ApiCodeDialog:Re,ReportDialog:Pe,CopyToClipboard:Ne},props:{modelValue:{type:Object,required:!0}},emits:[`wallet-task`],data(){return{isFetchingVideoUrl:!1,isFetchingWav:!1,apiCodeVisible:!1,reportVisible:!1,reportTargetId:``,reportSnapshot:void 0,apiCodePath:`/producer/audios`,apiCodeBody:{}}},computed:{loading(){return this.$store.state.producer?.status?.getApplications===D.Request},showViewCode(){return De()},credential(){return this.$store.state.producer.credential},walletMode(){return Z()&&X(`producer`).mode===`wallet`},config(){return this.$store.state.producer.config},task(){return this.$store.state.producer?.tasks},audios(){let e=this.modelValue?.response?.data??[],t=this.modelValue?.request?.action;return t?e.map(e=>({...e,action:t})):e},isFailure(){return this.audios.length===0&&(this.modelValue?.response?.success===!1||!!this.modelValue?.response?.error)},failureReason(){let e=this.modelValue?.response?.error;return typeof e==`string`?e:e?.message},traceId(){return this.modelValue?.response?.trace_id||this.modelValue?.trace_id},application(){return this.$store.state.producer?.application},active(){return this.$store.state.producer?.tasks?.active}},methods:{paymentOptions(){if(!this.walletMode){let e=this.credential?.token;return e?{token:e}:void 0}let e=this.getWalletContext();if(!e){O.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}return{mode:`x402`,x402:{wallet:e,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}}},getWalletContext(){return W(this.$wallet)},async confirmWalletPayment(e){return Q.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},onReport(e){this.reportTargetId=e?.id||``,this.reportSnapshot={prompt:e?.prompt,title:e?.title},this.reportVisible=!0},useFormatDuring:z,onViewCode(){let e=this.modelValue?.request||{},t={};Object.entries(e).forEach(([e,n])=>{e===`application_id`||e===`callback_url`||n!=null&&(typeof n==`string`&&n===``||Array.isArray(n)&&n.length===0||(t[e]=n))}),this.apiCodeBody=t,this.apiCodePath=`/producer/audios`,this.apiCodeVisible=!0},onPlay(e){this.$store.dispatch(`producer/setAudio`,{...this.$store.state.producer.audio,...e,state:`playing`}),console.log(`on play`)},onPause(e){this.$store.dispatch(`producer/setAudio`,{...this.$store.state.producer.audio,...e,state:`paused`}),console.log(`on pause`)},onClick(e){this.$store.state?.producer?.audio?.id!==e.id&&this.onPlay({...e,progress:0})},onExtend(e,t){e?.stopPropagation(),console.debug(`set config`,t),this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.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();let n=new URL(t).pathname,r=n.substring(n.lastIndexOf(`/`)+1);fetch(t).then(e=>e.blob()).then(e=>{(0,fr.saveAs)(e,r)})},async handleVideoDownload(e){if(e.video_url){this.onDownload(null,e.video_url);return}if(!this.isFetchingVideoUrl)try{this.isFetchingVideoUrl=!0;let t=await this.fetchVideoUrlFromApi(e?.id);console.log(`get videoUrl: ${t}`),e.video_url=t,this.onDownload(null,t)}catch(e){if(e instanceof Y)return;console.error(`get videoUrl failed:`,e),O.error(this.$t(`producer.message.getVideoUrlFailed`))}finally{this.isFetchingVideoUrl=!1}},async fetchVideoUrlFromApi(e){return new Promise((t,n)=>{let r={audio_id:e},i=this.paymentOptions();if(!i)return n(new Y);J.video(r,i).then(e=>{let r=e.data?.data?.video_url;r?t(r):n(Error(`Video URL not found in response`))}).catch(e=>{n(e)})})},onPreview(e,t){e?.stopPropagation(),window.open(t,`_blank`)},async onGetStems(e){await this.onGenerateAudioUrl(`stems`,e)},onCover(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,model:e.model,custom:!0,instrumental:!1,style:e.style,action:`cover`,audio:e,audio_id:e.id})},onVariation(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.config,model:e.model,custom:!0,style:e.style,action:`variation`,audio:e,audio_id:e.id})},async onSwapVocals(e){await this.onGenerateAudioUrl(`swap_vocals`,e)},async onSwapInstrumentals(e){await this.onGenerateAudioUrl(`swap_instrumentals`,e)},async onGetAllStems(e){await this.onGenerateAudioUrl(`all_stems`,e)},onReplaceSection(e){this.$store.commit(`producer/setConfig`,{...this.$store.state.producer?.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)})},async handleWavDownload(e){if(!e?.id||this.isFetchingWav)return;let t=this.paymentOptions();if(t)try{this.isFetchingWav=!0,O.info(this.$t(`producer.message.fetchingWav`));let n=(await J.wav({audio_id:e.id},t)).data?.data,r=Array.isArray(n)?n[0]?.file_url:n?.file_url||n?.audio_url;r?this.onDownload(null,r):O.error(this.$t(`producer.message.fetchWavFailed`))}catch(e){if(e instanceof Y)return;O.error(this.$t(`producer.message.fetchWavFailed`))}finally{this.isFetchingWav=!1}},async onGenerateAudioUrl(e,t){let n={action:e,audio_id:t,async:!0},r=this.paymentOptions();r&&(O.info(this.$t(`producer.message.startingTask`)),J.audio(n,r).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&this.$emit(`wallet-task`,t),O.success(this.$t(`producer.message.startTaskSuccess`))}).catch(e=>{e instanceof Y||O.error(e?.response?.data?.error?.message||this.$t(`producer.message.startTaskFailed`))}))},async onScrollDown(){setTimeout(()=>{let e=document.querySelector(`.tasks`);e&&(e.scrollTop=e.scrollHeight)},1e3)},async onGetTasks(){if(this.loading){console.debug(`loading`);return}await this.$store.dispatch(`producer/getTasks`,{limit:30,offset:0})}}}),mr={class:`task`},hr={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},gr={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},_r={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},vr=[`onClick`],yr={class:`left`},br=[`aria-label`,`title`,`onClick`,`onKeydown`],xr=[`aria-label`,`title`,`onClick`,`onKeydown`],Sr={key:2,class:`duration`},Cr={class:`info`},wr={class:`title`},Tr={class:`style`},Er={class:`right`},Dr={class:`el-dropdown-link`},Or={class:`flex items-center min-w-[120px]`},kr={class:`flex items-center min-w-[120px]`},Ar={class:`el-dropdown-link`};function jr(d,_,v,y,b,x){let S=l(`warning-icon`),C=l(`magic-icon`),w=l(`copy-to-clipboard`),T=l(`info-icon`),E=l(`channel-icon`),D=l(`el-alert`),O=l(`el-image`),k=l(`video-pause`),A=l(`el-icon`),j=l(`video-play`),M=l(`download-icon`),N=l(`el-tooltip`),P=l(`Loading`),F=l(`el-dropdown-item`),I=l(`el-dropdown-menu`),L=l(`el-dropdown`),R=l(`more-icon`),ee=l(`code-icon`),te=l(`api-code-dialog`),ne=l(`report-dialog`),re=m(`loading`);return g(),o(`div`,mr,[d.isFailure?(g(),f(D,{key:0,closable:!1,class:`task-failure`},{title:p(()=>[i(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(d.$t(`producer.name.failure`)),1)]),default:p(()=>[e(`p`,hr,[i(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(d.$t(`producer.name.taskId`))+`: `+r(d.modelValue?.id)+` `,1),i(w,{content:d.modelValue?.id},null,8,[`content`])]),d.failureReason?(g(),o(`p`,gr,[i(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(d.$t(`producer.name.failureReason`))+`: `+r(d.failureReason)+` `,1),i(w,{content:d.failureReason},null,8,[`content`])])):a(``,!0),d.traceId?(g(),o(`p`,_r,[i(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(d.$t(`producer.name.traceId`))+`: `+r(d.traceId)+` `,1),i(w,{content:d.traceId},null,8,[`content`])])):a(``,!0)]),_:1})):a(``,!0),(g(!0),o(c,null,h(d.audios,c=>(g(),o(`div`,{key:c.id,class:`audio`,onClick:t(e=>d.onClick(c),[`stop`])},[u((g(),o(`div`,yr,[i(O,{src:c?.image_url,class:`cover`,fit:`cover`,lazy:``},null,8,[`src`]),c?.audio_url&&d.$store.state?.producer?.audio?.id===c.id&&d.$store.state?.producer?.audio?.state===`playing`?(g(),o(`div`,{key:0,class:`overlay`,role:`button`,tabindex:`0`,"aria-label":d.$t(`common.player.pause`),title:d.$t(`common.player.pause`),onClick:t(e=>d.onPause(c),[`stop`]),onKeydown:[s(t(e=>d.onPause(c),[`stop`,`prevent`]),[`enter`]),s(t(e=>d.onPause(c),[`stop`,`prevent`]),[`space`])]},[i(A,null,{default:p(()=>[i(k,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})],40,br)):a(``,!0),c?.audio_url&&(d.$store.state?.producer?.audio?.id!==c.id||d.$store.state?.producer?.audio?.id===c.id&&d.$store.state?.producer?.audio?.state===`paused`)?(g(),o(`div`,{key:1,class:`overlay`,role:`button`,tabindex:`0`,"aria-label":d.$t(`common.player.play`),title:d.$t(`common.player.play`),onClick:t(e=>d.onPlay(c),[`stop`]),onKeydown:[s(t(e=>d.onPlay(c),[`stop`,`prevent`]),[`enter`]),s(t(e=>d.onPlay(c),[`stop`,`prevent`]),[`space`])]},[i(A,null,{default:p(()=>[i(j,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})],40,xr)):a(``,!0),c?.duration?(g(),o(`div`,Sr,r(d.useFormatDuring(c?.duration)),1)):a(``,!0)])),[[re,!c?.audio_url]]),e(`div`,Cr,[e(`h2`,wr,r(c?.title),1),e(`p`,Tr,r(c?.style),1)]),e(`div`,Er,[i(L,null,{dropdown:p(()=>[i(I,null,{default:p(()=>[i(F,{disabled:d.isFetchingVideoUrl,onClick:e=>d.handleVideoDownload(c)},{default:p(()=>[e(`div`,Or,[d.isFetchingVideoUrl?(g(),f(A,{key:0,class:`is-loading mr-2`},{default:p(()=>[i(P,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})):a(``,!0),e(`span`,null,r(d.$t(`producer.button.download_video`)),1)])]),_:1},8,[`disabled`,`onClick`]),c?.audio_url?(g(),f(F,{key:0,onClick:t(e=>d.onDownload(e,c?.audio_url),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.download_audio`)),1)]),_:1},8,[`onClick`])):a(``,!0),i(F,{disabled:d.isFetchingWav,onClick:e=>d.handleWavDownload(c)},{default:p(()=>[e(`div`,kr,[d.isFetchingWav?(g(),f(A,{key:0,class:`is-loading mr-2`},{default:p(()=>[i(P,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})):a(``,!0),e(`span`,null,r(d.$t(`producer.button.download_wav`)),1)])]),_:1},8,[`disabled`,`onClick`])]),_:2},1024)]),default:p(()=>[e(`span`,Dr,[i(N,{effect:`dark`,content:d.$t(`producer.button.download`),placement:`top`},{default:p(()=>[c?.audio_url||c?.video_url?(g(),f(M,{key:0,class:`icon icon-download`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):a(``,!0)]),_:2},1032,[`content`])])]),_:2},1024),i(L,null,{dropdown:p(()=>[i(I,null,{default:p(()=>[c?.audio_url?(g(),f(F,{key:0,onClick:t(e=>d.onExtend(e,c),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.extend`)),1)]),_:1},8,[`onClick`])):a(``,!0),c.id?(g(),f(F,{key:1,onClick:t(e=>d.onGetStems(c.id),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.get_stems`)),1)]),_:1},8,[`onClick`])):a(``,!0),c.id?(g(),f(F,{key:2,onClick:t(e=>d.onGetAllStems(c.id),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.all_stems`)),1)]),_:1},8,[`onClick`])):a(``,!0),i(F,{onClick:t(e=>d.onCover(c),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.cover_music`)),1)]),_:1},8,[`onClick`]),c?.id?(g(),f(F,{key:3,onClick:t(e=>d.onVariation(c),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.variation`)),1)]),_:1},8,[`onClick`])):a(``,!0),c?.id?(g(),f(F,{key:4,onClick:t(e=>d.onSwapVocals(c.id),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.swap_vocals`)),1)]),_:1},8,[`onClick`])):a(``,!0),c?.id?(g(),f(F,{key:5,onClick:t(e=>d.onSwapInstrumentals(c.id),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.swap_instrumentals`)),1)]),_:1},8,[`onClick`])):a(``,!0),c?.id?(g(),f(F,{key:6,onClick:t(e=>d.onReplaceSection(c),[`stop`])},{default:p(()=>[n(r(d.$t(`producer.button.replace_section`)),1)]),_:1},8,[`onClick`])):a(``,!0),d.showViewCode?(g(),f(F,{key:7,onClick:t(d.onViewCode,[`stop`])},{default:p(()=>[i(ee,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(d.$t(`common.button.viewCode`)),1)]),_:1},8,[`onClick`])):a(``,!0),c?.id?(g(),f(F,{key:8,onClick:t(e=>d.onReport(c),[`stop`])},{default:p(()=>[i(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),n(` `+r(d.$t(`common.button.report`)),1)]),_:1},8,[`onClick`])):a(``,!0)]),_:2},1024)]),default:p(()=>[e(`span`,Ar,[i(N,{effect:`dark`,content:d.$t(`producer.button.more`),placement:`top`},{default:p(()=>[c?.audio_url||c?.video_url?(g(),f(R,{key:0,class:`icon icon-ellipsis`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):a(``,!0)]),_:2},1032,[`content`])])]),_:2},1024)])],8,vr))),128)),i(te,{visible:d.apiCodeVisible,"onUpdate:visible":_[0]||=e=>d.apiCodeVisible=e,method:`POST`,path:d.apiCodePath,body:d.apiCodeBody,token:d.$store.state.producer?.credential?.token||``},null,8,[`visible`,`path`,`body`,`token`]),i(ne,{visible:d.reportVisible,"onUpdate:visible":_[1]||=e=>d.reportVisible=e,service:`producer`,"target-id":d.reportTargetId,snapshot:d.reportSnapshot},null,8,[`visible`,`target-id`,`snapshot`])])}var Mr=v({name:`RecentPanel`,components:{ElSkeletonItem:ee,ElSkeleton:te,TaskPreview:q(pr,[[`render`,jr]]),Player:oe,NoTasks:fe,ScrollList:de},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`,`wallet-task`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.producer?.tasks,items:this.$store.state.producer?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Nr={key:0,class:`tasks`},Pr={class:`left w-[70px] p-[10px] flex items-center`},Fr={class:`main w-[calc(100%-70px)] flex-1 p-[10px]`},Ir={key:2,class:`w-full flex-1 flex items-center justify-center`},Lr={class:`h-20`};function Rr(t,n,r,s,d,m){let v=l(`el-skeleton-item`),y=l(`el-skeleton`),b=l(`task-preview`),x=l(`scroll-list`),S=l(`no-tasks`),C=l(`player`);return g(),o(c,null,[t.tasks?.items===void 0?(g(),o(`div`,Nr,[(g(),o(c,null,h(3,t=>e(`div`,{key:t,class:`flex`},[e(`div`,Pr,[i(y,{animated:``},{template:p(()=>[i(v,{variant:`image`,class:`avatar w-[50px] h-[50px]`})]),_:1})]),e(`div`,Fr,[i(y,{animated:``},{template:p(()=>[i(v,{variant:`p`,class:`w-[200px] h-[15px] mb-[5px] mt-[10px]`}),i(v,{variant:`text`})]),_:1})])])),64))])):t.tasks?.items?.length&&t.tasks?.items?.length>0?(g(),f(x,{key:1,ref:`scrollList`,class:`flex-1 w-full overflow-y-auto tasks p-2`,loading:t.loading,onReachTop:n[1]||=e=>t.$emit(`reach-top`)},{default:p(()=>[(g(!0),o(c,null,h(t.tasks?.items,(e,r)=>(g(),f(b,{key:r,"model-value":e,class:`preview`,onWalletTask:n[0]||=e=>t.$emit(`wallet-task`,e)},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):a(``,!0),t.tasks?.items?.length===0?(g(),o(`div`,Ir,[i(S)])):a(``,!0),u(e(`div`,Lr,[i(C,{namespace:`producer`})],512),[[_,!!t.$store?.state?.producer?.audio?.object]])],64)}var zr=q(Mr,[[`render`,Rr]]),Br=v({name:`TaskPreview`,components:{IconPicture:he,ElImage:$,ElAvatar:k,ElIcon:y},computed:{audio(){return this.$store.state.producer?.audio}}}),Vr={key:0,class:`size-full overflow-hidden`},Hr={class:`relative h-[300px]`},Ur={class:`flex items-center justify-center size-full bg-[var(--el-bg-color)]`},Wr={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`},Gr={class:`p-4`},Kr={class:`flex items-center font-bold mb-2`},qr={class:`text-[var(--el-text-color-regular)] mb-2`},Jr={class:`text-xs text-[var(--el-text-color-regular)]`},Yr={class:`mt-4 text-sm leading-[25px] whitespace-pre-wrap`},Xr={key:1,class:`w-full h-full`};function Zr(t,n,a,s,c,u){let d=l(`icon-picture`),f=l(`el-icon`),m=l(`el-image`),h=l(`el-avatar`);return t.audio?.object?(g(),o(`div`,Vr,[e(`div`,Hr,[i(m,{src:t.audio.image_url,fit:`cover`,class:`size-full`},{error:p(()=>[e(`div`,Ur,[i(f,{class:`text-3xl`},{default:p(()=>[i(d,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})])]),_:1},8,[`src`]),e(`h2`,Wr,r(t.audio?.title),1)]),e(`div`,Gr,[e(`div`,Kr,[i(h,{size:30,src:t.audio?.image_url,class:`mr-2`},null,8,[`src`]),e(`span`,null,r(t.audio?.title),1)]),e(`p`,qr,r(t.audio?.style),1),e(`p`,Jr,r(t.$dayjs.format(t.audio?.created_at)),1),e(`div`,Yr,[e(`p`,null,r(t.audio?.lyric),1)])])])):(g(),o(`div`,Xr))}var Qr=v({name:`ProducerIndex`,components:{Layout:Ge,ConfigPanel:dr,RecentPanel:zr,PreviewPanel:q(Br,[[`render`,Zr]])},mixins:[Oe],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.producer?.status?.getApplications===D.Request},tasksLoading(){return this.$store.state.producer?.status?.getTasks===D.Request||this.fetchingTasks},service(){return this.$store.state.producer.service},credential(){return this.$store.state.producer.credential},config(){return this.$store.state.producer.config},initializing(){return this.$store.state.producer.status.getApplications===D.Request},needApply(){return this.$store.state.producer.status.getApplications===D.Success&&!this.application},application(){return this.$store.state.producer.application},tasks(){return this.$store.state.producer.tasks},applications(){return this.$store.state.producer.applications},walletMode(){return Z()&&X(`producer`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`producer/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onGetTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},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 me({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(`producer/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplications`),await this.$store.dispatch(`producer/getApplications`),console.debug(`end onGetApplications`),await this.onGetTasks()},onApply(){Ee.create({application:this.application}).then(({data:e})=>{this.application=e,O.success(this.$t(`application.message.applySuccessfully`))}).catch(e=>{e?.response?.data?.code===`duplication`&&O.error(this.$t(`application.message.alreadyApplied`))})},async onScrollDown(){await this.$nextTick();let 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);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`producer/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerateAudio(){if(!Te(this.uploadTracker,e=>this.$t(e),e=>O.warning(e)))return;let e=Se(this.config),t=this.createPaymentOperation(t=>J.audio(e,t));if(t){O.info(this.$t(`producer.message.startingTask`));try{let e=await we(`producer`,t);this.recordWalletTask(e),O.success(this.$t(`producer.message.startTaskSuccess`))}catch(e){this.handlePaymentError(e)}finally{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)}}},createPaymentOperation(e){if(!this.walletMode){if(!je())return;let t=this.credential?.token;return t?e({token:t}):void 0}let t=this.getWalletContext();if(!t){O.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}return e({mode:`x402`,x402:{wallet:t,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})},recordWalletTask(e){this.onWalletTask(e?.data?.task_id)},onWalletTask(e){this.walletMode&&!this.credential?.token&&e&&!this.walletTaskIds.includes(e)&&this.walletTaskIds.unshift(e)},handlePaymentError(e){e instanceof Y||(this.walletMode?O.error(`${this.$t(`common.x402Scenario.paymentFailed`)} ${e?.message||``}`.trim()):O.error(e?.response?.data?.error?.message||this.$t(`producer.message.startTaskFailed`)))},getWalletContext(){return W(this.$wallet)},async confirmWalletPayment(e){return Q.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function $r(e,t,n,r,a,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`preview-panel`),d=l(`layout`);return g(),f(d,null,{config:p(()=>[i(s,{onGenerate:e.onGenerateAudio},null,8,[`onGenerate`])]),result:p(()=>[i(c,{ref:`recentPanel`,class:`panel recent`,loading:e.loadingMore,onReachTop:e.onReachTop,onWalletTask:e.onWalletTask},null,8,[`loading`,`onReachTop`,`onWalletTask`])]),preview:p(()=>[i(u)]),_:1})}var ei=q(Qr,[[`render`,$r],[`__scopeId`,`data-v-32db6f64`]]);export{ei as default};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,rt as m,tt as h,x as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{n as v,r as y,t as b}from"./select-K-2CZ3eR.js";import{t as x}from"./upload-_zFgS7Nh.js";import{t as S}from"./tooltip-CjkDaYbd.js";import{t as C}from"./alert-BprQRUmf.js";import{h as w,v as T}from"./models-C4O1HNS0.js";import{t as E}from"./drawer-CLmU-Got.js";import{t as D}from"./input-number-D_PD56K7.js";import{t as O}from"./box-CjgWzmRH.js";import{t as k}from"./clock-DAmpmfMk.js";import{a as A,i as j,n as M,r as N,s as P,t as F}from"./pagination-CkF2u9jK.js";import{t as I}from"./image-C9t8D3m5.js";import{t as ee}from"./info-CifZclsR.js";import{t as te}from"./trash-2-zWLkqDxH.js";import{t as ne}from"./triangle-alert-CCs6VvUs.js";import{t as re}from"./upload-Q8MqK29R.js";import{t as L}from"./wand-sparkles-BFbcxwi3.js";import{t as ie}from"./zap-Yxjdgccv.js";import{An as ae,Cn as R,Dn as oe,En as z,On as se,Tn as B,jn as V,wn as H,xn as U}from"./constants-CdZEFH5x.js";import{$t as ce,Gn as le,Jt as ue,Ma as W,O as G,Oi as de,Qt as fe,en as pe,ia as me,in as he,nn as ge,pn as _e,tn as ve,va as K}from"./index-C-w8AJfV.js";import{t as ye}from"./CopyToClipboard-B8YmxJt6.js";import{t as be}from"./ReportButton-CE99kMuV.js";import{t as q}from"./ImagePreview-D8qlrS3J.js";import{n as xe}from"./taskDrawerMixin-DyAUhFEq.js";import{t as Se}from"./Consumption-DeigvrPq.js";import{t as Ce}from"./ApiCodeButton-DmY8v9e5.js";import{t as we}from"./BotPlaceholder-LUNR8KA6.js";import{t as Te}from"./ImageWrapper-BK4v8WW9.js";var Ee=_({name:`LayoutSeedream`,components:{MagicIcon:L,ElDrawer:E,ElButton:W},mixins:[xe]}),De={class:`main flex flex-row flex-1`},Oe={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},ke={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ae(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),_=l(`el-drawer`);return h(),s(`div`,De,[e(`div`,Oe,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,ke,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[g,!t.tasksEmpty]]),a(_,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var je=G(Ee,[[`render`,Ae],[`__scopeId`,`data-v-c10167d0`]]),Me=_({name:`SeedreamPromptInput`,components:{PromptTextarea:j},computed:{prompt:{get(){return this.$store.state.seedream?.config?.prompt},set(e){this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Ne(e,t,n,r,i,a){let o=l(`prompt-textarea`);return h(),f(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`seedream.name.prompt`),info:e.$t(`seedream.description.prompt`),placeholder:e.$t(`seedream.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Pe=G(Me,[[`render`,Ne]]),Fe={image:!0,imageRequired:!1,sizeTiers:[`1K`,`2K`,`3K`,`4K`],sizeAdaptive:!0,sizePixel:!0,sizePixelDefault:void 0,groupGeneration:!1,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};function J(e){switch(e){case z:return{image:!0,imageRequired:!1,sizeTiers:[`1K`,`2K`],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!1,seed:!1,guidanceScale:!1,outputFormat:!0,tools:!1};case B:return{image:!0,imageRequired:!1,sizeTiers:[`2K`,`3K`,`4K`],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!0,tools:!0};case H:return{image:!0,imageRequired:!1,sizeTiers:[`2K`,`4K`],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};case R:return{image:!0,imageRequired:!1,sizeTiers:[`1K`,`2K`,`4K`],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};default:return Fe}}function Y(e,t){let n=J(e);return n.imageRequired||n.image&&t?.length?`edit`:`generate`}var Ie=[`1K`,`2K`,`3K`,`4K`];function X(e,t){if(!e)return[];let n=t.model??e.model;if(!n)return[];let r=J(n),i=[];Array.isArray(e.image)&&e.image.length>0&&!r.image&&i.push({field:`image`,i18nLabel:`seedream.name.imageUrls`});let a=typeof e.size==`string`?e.size:void 0;if(a){let e=a.toUpperCase();(Ie.includes(e)&&!r.sizeTiers.includes(e)||a===`adaptive`&&!r.sizeAdaptive)&&i.push({field:`size`,i18nLabel:`seedream.name.size`})}return e.sequential_image_generation===`auto`&&!r.groupGeneration&&i.push({field:`sequential_image_generation`,i18nLabel:`seedream.name.maxImages`}),e.seed!==void 0&&e.seed!==null&&!r.seed&&i.push({field:`seed`,i18nLabel:`seedream.name.seed`}),e.guidance_scale!==void 0&&e.guidance_scale!==null&&!r.guidanceScale&&i.push({field:`guidance_scale`,i18nLabel:`seedream.name.guidanceScale`}),e.output_format&&!r.outputFormat&&i.push({field:`output_format`,i18nLabel:`seedream.name.outputFormat`}),Array.isArray(e.tools)&&e.tools.length>0&&!r.tools&&i.push({field:`tools`,i18nLabel:`seedream.name.tools`}),i}function Z(e,t,n){let r={...e},i=J(n.model??e.model);for(let e of t)switch(e.field){case`image`:delete r.image;break;case`size`:i.sizePixelDefault?r.size=i.sizePixelDefault:delete r.size;break;case`sequential_image_generation`:r.sequential_image_generation=`disabled`,delete r.sequential_image_generation_options;break;case`seed`:delete r.seed;break;case`guidance_scale`:delete r.guidance_scale;break;case`output_format`:delete r.output_format;break;case`tools`:delete r.tools;break}return r}var Le=_({name:`SeedreamImageInput`,components:{UploadIcon:re,ElUpload:x,ElButton:W,InfoIcon:A,ImagePreview:q},mixins:[ge,ve,ce,ue],data(){return{fileList:[],uploadUrl:me()+`/api/v1/files/`,suppressWatch:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url).filter(e=>!!e)},value(){return this.$store.state.seedream?.config?.image},model(){return this.$store.state.seedream?.config?.model},supported(){return J(this.model).image}},watch:{value:{immediate:!0,handler(e){if(this.suppressWatch)return;if(!e||e.length===0){let e=(this.fileList||[]).filter(e=>!e?.response?.file_url);this.fileList=e.length?e:[];return}let t=[];e.forEach(e=>{let n=this.fileList.find(t=>t?.response?.file_url===e||t?.url===e);n?t.push(n):t.push({name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}})}),(this.fileList||[]).filter(e=>!e?.response?.file_url).forEach(e=>{t.some(t=>t===e||t?.url===e?.url||t?.response?.file_url===e?.response?.file_url)||t.push(e)}),this.fileList=t}}},methods:{onChange(e){if(!e?.url&&e?.raw)try{e.url=URL.createObjectURL(e.raw)}catch{}},onRemove(e){if(e?.url&&typeof e.url==`string`&&e.url.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}this.onSetImages()},onExceed(){T.warning(this.$t(`seedream.message.uploadImageExceed`))},onError(){T.error(this.$t(`seedream.message.uploadImageError`))},onSetImages(){let e=this.urls;this.suppressWatch=!0,this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,image:e}),this.$nextTick(()=>{this.suppressWatch=!1})},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.onSetImages()},onRemovePreview(e,t){if(this.fileList.splice(e,1),t?.url&&typeof t.url==`string`&&t.url.startsWith(`blob:`))try{URL.revokeObjectURL(t.url)}catch{}this.onSetImages()}}}),Re={key:0},ze={class:`field`},Be={class:`label`},Ve={class:`box`},He={class:`title font-bold`},Ue={class:`value`},We={class:`file-list mt-2 flex flex-wrap gap-[10px]`};function Ge(t,n,u,d,g,_){let v=l(`info-icon`),y=l(`upload-icon`),b=l(`el-button`),x=l(`el-upload`),S=l(`image-preview`);return t.supported?(h(),s(`div`,Re,[e(`div`,ze,[e(`div`,Be,[e(`div`,Ve,[e(`h2`,He,i(t.$t(`seedream.name.imageUrls`)),1),a(v,{content:t.$t(`seedream.description.imageUrls`),class:`info`},null,8,[`content`])])]),e(`div`,Ue,[a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,limit:14,multiple:!0,"show-file-list":!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,"on-change":t.onChange,"on-remove":t.onRemove,headers:t.headers},{default:p(()=>[a(b,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`seedream.button.uploadImageUrls`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`on-change`,`on-remove`,`headers`])])]),e(`div`,We,[(h(!0),s(c,null,m(t.fileList,(e,n)=>(h(),f(S,{key:e.uid||e?.response?.file_url||e.url||n,url:e.url||e?.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemovePreview(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])])):o(``,!0)}var Ke=G(Le,[[`render`,Ge],[`__scopeId`,`data-v-21f4dd97`]]),qe=_({name:`SeedreamModelSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:A},data(){return{revertKey:0,options:[{value:z,label:this.$t(`seedream.model.seedream50pro`)},{value:B,label:this.$t(`seedream.model.seedream50`)},{value:H,label:this.$t(`seedream.model.seedream45`)},{value:R,label:this.$t(`seedream.model.seedream40`)}]}},computed:{value(){return this.$store.state.seedream?.config?.model}},mounted(){if(this.value&&this.options.some(e=>e.value===this.value))return;let e={...this.$store.state.seedream?.config||{},model:U},t=X(e,{model:U});this.$store.commit(`seedream/setConfig`,Z(e,t,{model:U}))},methods:{async onChange(e){let t=this.$store.state.seedream?.config||{},n=X(t,{model:e});if(n.length===0){this.applyModel(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await K.confirm(this.$t(`seedream.message.featureNotSupportedBody`,{fields:r}),this.$t(`seedream.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`seedream.button.confirmContinue`),cancelButtonText:this.$t(`seedream.button.cancelSwitch`),type:`warning`});let i=Z({...t,model:e},n,{model:e});this.$store.commit(`seedream/setConfig`,i),T.success(this.$t(`seedream.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,model:e})}}}),Je={class:`field`},Ye={class:`label`},Xe={class:`box`},Ze={class:`title font-bold`};function Qe(t,n,r,o,u,d){let g=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return h(),s(`div`,Je,[e(`div`,Ye,[e(`div`,Xe,[e(`h2`,Ze,i(t.$t(`seedream.name.model`)),1),a(g,{content:t.$t(`seedream.description.model`),class:`info`},null,8,[`content`])])]),(h(),f(v,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`seedream.placeholder.select`),onChange:t.onChange},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var $e=G(qe,[[`render`,Qe],[`__scopeId`,`data-v-bb6a29ab`]]),et=_({name:`SeedreamSizeSelector`,components:{ElSelect:y,ElOption:b,ElOptionGroup:v,InfoIcon:A},data(){return{SEEDREAM_SIZE_ADAPTIVE:ae,pixelOptions:se}},computed:{model(){return this.$store.state.seedream?.config?.model},capabilities(){return J(this.model)},value:{get(){return this.$store.state.seedream?.config?.size},set(e){this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,size:e})}}},watch:{model:{immediate:!0,handler(){if(this.value)return;let e=this.capabilities;e.sizeTiers.length?this.value=e.sizeTiers.includes(`2K`)?`2K`:e.sizeTiers[0]:e.sizePixelDefault&&(this.value=e.sizePixelDefault)}}}}),tt={class:`field`},nt={class:`label`},rt={class:`box`},it={class:`title font-bold`};function at(t,n,r,u,d,g){let _=l(`info-icon`),v=l(`el-option`),y=l(`el-option-group`),b=l(`el-select`);return h(),s(`div`,tt,[e(`div`,nt,[e(`div`,rt,[e(`h2`,it,i(t.$t(`seedream.name.size`)),1),a(_,{content:t.$t(`seedream.description.size`),class:`info`},null,8,[`content`])])]),a(b,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`seedream.placeholder.size`),filterable:``,"allow-create":``,"default-first-option":``},{default:p(()=>[t.capabilities.sizeTiers.length?(h(),f(y,{key:0,label:t.$t(`seedream.size.group.tier`)},{default:p(()=>[(h(!0),s(c,null,m(t.capabilities.sizeTiers,e=>(h(),f(v,{key:e,label:e,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`label`])):o(``,!0),t.capabilities.sizeAdaptive?(h(),f(y,{key:1,label:t.$t(`seedream.size.group.adaptive`)},{default:p(()=>[(h(),f(v,{key:t.SEEDREAM_SIZE_ADAPTIVE,label:t.$t(`seedream.size.adaptive`),value:t.SEEDREAM_SIZE_ADAPTIVE},null,8,[`label`,`value`]))]),_:1},8,[`label`])):o(``,!0),a(y,{label:t.$t(`seedream.size.group.pixel`)},{default:p(()=>[(h(!0),s(c,null,m(t.pixelOptions,e=>(h(),f(v,{key:e.value,label:`${e.value} (${e.ratio})`,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`label`])]),_:1},8,[`modelValue`,`placeholder`])])}var ot=G(et,[[`render`,at],[`__scopeId`,`data-v-dd7bd021`]]),st=_({name:`SeedreamMaxImagesSelector`,components:{ElInputNumber:D,InfoIcon:A},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return J(this.config?.model).groupGeneration},referenceImageCount(){let e=this.config?.image;return Array.isArray(e)?e.length:0},effectiveMax(){let e=15-this.referenceImageCount;return Math.max(1,Math.min(15,e))},value:{get(){let e=this.config?.sequential_image_generation_options?.max_images;return typeof e==`number`&&e>=1?e:1},set(e){let t={...this.config||{}},n=Math.max(1,Math.min(this.effectiveMax,Math.floor(e||1)));n>1?(t.sequential_image_generation=`auto`,t.sequential_image_generation_options={...t.sequential_image_generation_options||{},max_images:n}):(t.sequential_image_generation=`disabled`,t.sequential_image_generation_options&&delete t.sequential_image_generation_options),this.$store.commit(`seedream/setConfig`,t)}}},watch:{effectiveMax(e){this.value>e&&(this.value=e)}}}),ct={key:0,class:`field`},lt={class:`label`},ut={class:`box`},dt={class:`title font-bold`},ft={class:`value`};function pt(t,n,r,c,u,d){let f=l(`info-icon`),p=l(`el-input-number`);return t.supported?(h(),s(`div`,ct,[e(`div`,lt,[e(`div`,ut,[e(`h2`,dt,i(t.$t(`seedream.name.maxImages`)),1),a(f,{content:t.$t(`seedream.description.maxImages`),class:`info`},null,8,[`content`])])]),e(`div`,ft,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,min:1,max:t.effectiveMax,step:1,size:`default`,"controls-position":`right`,class:`counter`},null,8,[`modelValue`,`max`])])])):o(``,!0)}var mt=G(st,[[`render`,pt],[`__scopeId`,`data-v-f079fd20`]]),ht=_({name:`SeedreamOutputFormatSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:A},data(){return{options:[...oe]}},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return J(this.config?.model).outputFormat},value:{get(){return this.config?.output_format},set(e){let t={...this.config||{}};t.output_format=e,this.$store.commit(`seedream/setConfig`,t)}}}}),gt={key:0,class:`field`},_t={class:`label`},vt={class:`box`},yt={class:`title font-bold`};function bt(t,n,r,u,d,g){let _=l(`info-icon`),v=l(`el-option`),y=l(`el-select`);return t.supported?(h(),s(`div`,gt,[e(`div`,_t,[e(`div`,vt,[e(`h2`,yt,i(t.$t(`seedream.name.outputFormat`)),1),a(_,{content:t.$t(`seedream.description.outputFormat`),class:`info`},null,8,[`content`])])]),a(y,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`seedream.placeholder.select`)},{default:p(()=>[(h(!0),s(c,null,m(t.options,e=>(h(),f(v,{key:e,label:e.toUpperCase(),value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])):o(``,!0)}var xt=G(ht,[[`render`,bt],[`__scopeId`,`data-v-69ea4c07`]]),St=_({name:`SeedreamSeedInput`,components:{ElInputNumber:D,InfoIcon:A},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return J(this.config?.model).seed},value:{get(){let e=this.config?.seed;return typeof e==`number`?e:-1},set(e){let t={...this.config||{}};t.seed=typeof e==`number`&&Number.isInteger(e)?e:-1,this.$store.commit(`seedream/setConfig`,t)}}}}),Ct={key:0,class:`field`},wt={class:`label`},Tt={class:`box`},Et={class:`title font-bold`},Dt={class:`value`};function Ot(t,n,r,c,u,d){let f=l(`info-icon`),p=l(`el-input-number`);return t.supported?(h(),s(`div`,Ct,[e(`div`,wt,[e(`div`,Tt,[e(`h2`,Et,i(t.$t(`seedream.name.seed`)),1),a(f,{content:t.$t(`seedream.description.seed`),class:`info`},null,8,[`content`])])]),e(`div`,Dt,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,min:-1,max:2147483647,step:1,size:`default`,"controls-position":`right`,class:`counter`},null,8,[`modelValue`])])])):o(``,!0)}var kt=G(St,[[`render`,Ot],[`__scopeId`,`data-v-10cdc1e0`]]),At=_({name:`SeedreamGuidanceScaleInput`,components:{ElInputNumber:D,InfoIcon:A},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return J(this.config?.model).guidanceScale},defaultValue(){return J(this.config?.model).guidanceScaleDefault??2.5},value:{get(){let e=this.config?.guidance_scale;return typeof e==`number`?e:this.defaultValue},set(e){let t={...this.config||{}};t.guidance_scale=typeof e==`number`&&e>=1&&e<=10?e:this.defaultValue,this.$store.commit(`seedream/setConfig`,t)}}}}),jt={key:0,class:`field`},Mt={class:`label`},Nt={class:`box`},Pt={class:`title font-bold`},Ft={class:`value`};function It(t,n,r,c,u,d){let f=l(`info-icon`),p=l(`el-input-number`);return t.supported?(h(),s(`div`,jt,[e(`div`,Mt,[e(`div`,Nt,[e(`h2`,Pt,i(t.$t(`seedream.name.guidanceScale`)),1),a(f,{content:t.$t(`seedream.description.guidanceScale`),class:`info`},null,8,[`content`])])]),e(`div`,Ft,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,min:1,max:10,step:.1,precision:1,size:`default`,"controls-position":`right`,class:`counter`},null,8,[`modelValue`])])])):o(``,!0)}var Lt=G(At,[[`render`,It],[`__scopeId`,`data-v-7386f064`]]),Q=e=>{let t={...e||{}},n=Y(t.model,t.image);return delete t.action,t.watermark=!1,(n!==`edit`||!t.image?.length)&&delete t.image,t.size||delete t.size,t.sequential_image_generation!==`auto`&&delete t.sequential_image_generation_options,{...t,async:!0}},Rt=_({name:`SeedreamConfigPanel`,components:{MagicIcon:L,ElButton:W,PromptInput:Pe,Consumption:Se,ImageInput:Ke,ModelSelector:$e,SizeSelector:ot,MaxImagesSelector:mt,OutputFormatSelector:xt,SeedInput:kt,GuidanceScaleInput:Lt},emits:[`generate`],computed:{action(){return Y(this.config?.model,this.config?.image)},capabilities(){return J(this.config?.model)},config(){return this.$store.state.seedream?.config},consumption(){let e=Q(this.config),t=e.sequential_image_generation===`auto`?Math.max(1,Math.floor(e.sequential_image_generation_options?.max_images||1)):1;return he({...e,action:this.action,model:V(e.model),input_image_count:e.image?.length||0,count:t},this.service?.cost)},service(){return this.$store.state.seedream?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),zt={class:`flex flex-col h-full`},Bt={class:`flex-1 overflow-y-auto p-5`},Vt={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ht(t,n,c,u,d,m){let g=l(`model-selector`),_=l(`size-selector`),v=l(`max-images-selector`),y=l(`output-format-selector`),b=l(`seed-input`),x=l(`guidance-scale-input`),S=l(`prompt-input`),C=l(`image-input`),w=l(`consumption`),T=l(`magic-icon`),E=l(`el-button`);return h(),s(`div`,zt,[e(`div`,Bt,[a(g,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),t.capabilities.image?(h(),f(C,{key:0,class:`mb-4`})):o(``,!0)]),e(`div`,Vt,[a(w,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(E,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(T,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`seedream.button.generate`)),1)]),_:1},8,[`onClick`])])])}var Ut=G(Rt,[[`render`,Ht]]),Wt=_({name:`SeedreamTaskPreview`,components:{DeleteIcon:te,ApplicationIcon:O,ChannelIcon:P,ImageIcon:I,InfoIcon:ee,LightningIcon:ie,MagicIcon:L,TimeIcon:k,WarningIcon:ne,CopyToClipboard:ye,ElAlert:C,ImageWrapper:Te,ElButton:W,ElTooltip:S,ImagePreview:q,ApiCodeButton:Ce,ReportButton:be},props:{modelValue:{type:Object,required:!0}},computed:{apiRequest(){return Q(this.modelValue?.request)},isEdit(){return Array.isArray(this.modelValue?.request?.image)&&(this.modelValue?.request?.image?.length||0)>0},images(){let e=[];return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(t=>{e.push(t)}),e}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await K.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`seedream/deleteTask`,{id:e}),T.success(this.$t(`common.message.deleteTaskSuccess`))}catch{T.error(this.$t(`common.message.deleteTaskFailed`))}}},shortModel(e){return V(e)||e},onEdit(e){if(!e)return;console.debug(`Edit image:`,e);let t={...this.$store.state.seedream?.config||{}};t.image=[e],this.$store.commit(`seedream/setConfig`,t)}}}),Gt={class:`preview`},Kt={class:`left`},qt={class:`main`},Jt={class:`bot`},Yt={class:`datetime`},Xt=[`aria-label`],Zt={class:`info`},Qt={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},$t={key:1,class:`prompt mt-2`},en={key:0},tn={key:0,class:n({content:!0})},nn={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},rn={key:1,class:n({content:!0,failed:!0})},an={class:`flex justify-start items-center gap-4 w-full overflow-x-auto`},on={class:n({operations:!0,"mt-2":!0,"mb-2":!0})},sn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},cn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ln={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},un={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},dn={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},fn={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},pn={key:2,class:`content`},mn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},hn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},gn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},_n={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},vn={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},yn={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},bn={key:3,class:n({content:!0})},xn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Sn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Cn(n,u,d,g,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`image-preview`),C=l(`time-icon`),w=l(`magic-icon`),T=l(`copy-to-clipboard`),E=l(`el-alert`),D=l(`image-wrapper`),O=l(`el-button`),k=l(`api-code-button`),A=l(`report-button`),j=l(`application-icon`),M=l(`image-icon`),N=l(`lightning-icon`),P=l(`channel-icon`),F=l(`warning-icon`),I=l(`info-icon`);return h(),s(`div`,Gt,[e(`div`,Kt,[a(y,{capability:`seedream`,part:`avatar`,class:`avatar`})]),e(`div`,qt,[e(`div`,Jt,[a(y,{capability:`seedream`,part:`name`}),e(`span`,Yt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(h(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Xt)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,Zt,[Array.isArray(n.modelValue?.request?.image)&&n.modelValue?.request?.image.length>0?(h(),s(`div`,Qt,[(h(!0),s(c,null,m(n.modelValue?.request?.image,(e,t)=>(h(),f(S,{key:t,url:e,name:`image-${t+1}`,closable:!1},null,8,[`url`,`name`]))),128))])):o(``,!0),n.modelValue?.request?.prompt?(h(),s(`p`,$t,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(h(),s(`span`,en,` - (`+i(n.$t(`seedream.status.pending`))+`) `,1))])):o(``,!0)]),n.modelValue?.response?n.modelValue?.response?.success===!0?(h(),s(`div`,rn,[e(`div`,an,[(h(!0),s(c,null,m(n.images,(e,t)=>(h(),f(D,{key:t,src:e?.image_url,"raw-src":e?.image_url},null,8,[`src`,`raw-src`]))),128))]),e(`div`,on,[a(x,{class:`box-item`,effect:`dark`,content:n.$t(`common.button.edit`),placement:`top-start`},{default:p(()=>[a(O,{type:`info`,size:`small`,class:`btn-action`,onClick:u[1]||=t(e=>n.onEdit(n.images?.[0]?.image_url),[`stop`])},{default:p(()=>[r(i(n.$t(`common.button.edit`)),1)]),_:1})]),_:1},8,[`content`]),a(k,{path:`/seedream/images`,body:n.apiRequest},null,8,[`body`]),a(A,{service:`seedream`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])]),a(E,{closable:!1,class:`mt-2 success`},{default:p(()=>[n.modelValue?.request?.model?(h(),s(`p`,sn,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.model`))+`: `+i(n.shortModel(n.modelValue?.request?.model)),1)])):o(``,!0),n.modelValue?.request?.size?(h(),s(`p`,cn,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.size`))+`: `+i(n.modelValue?.request?.size),1)])):o(``,!0),e(`p`,ln,[a(N,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.task`))+`: `+i(n.isEdit?n.$t(`seedream.name.edits`):n.$t(`seedream.name.generate`)),1)]),e(`p`,un,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(T,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.elapsed?(h(),s(`p`,dn,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(h(),s(`p`,fn,[a(P,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(T,{content:n.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):n.modelValue?.response?.success===!1?(h(),s(`div`,pn,[a(E,{closable:!1,class:`failure`},{template:p(()=>[a(F,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.failure`)),1)]),default:p(()=>[n.modelValue?.request?.model?(h(),s(`p`,mn,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.model`))+`: `+i(n.shortModel(n.modelValue?.request?.model)),1)])):o(``,!0),n.modelValue?.request?.size?(h(),s(`p`,hn,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.size`))+`: `+i(n.modelValue?.request?.size),1)])):o(``,!0),e(`p`,gn,[a(N,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.task`))+`: `+i(n.isEdit?n.$t(`seedream.name.edits`):n.$t(`seedream.name.generate`)),1)]),e(`p`,_n,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(T,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.response?.error?.message?(h(),s(`p`,vn,[a(I,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(T,{content:n.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])])):o(``,!0),n.modelValue?.elapsed?(h(),s(`p`,yn,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(h(),s(`p`,$,[a(P,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(T,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])):o(``,!0)]),_:1})])):(h(),s(`div`,bn,[a(E,{closable:!1,class:`info`},{template:p(()=>[a(I,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.status`)),1)]),default:p(()=>[e(`p`,xn,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(T,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.response?.trace_id?(h(),s(`p`,Sn,[a(P,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(T,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])):o(``,!0)]),_:1})])):(h(),s(`div`,tn,[a(E,{closable:!1,class:`info`},{template:p(()=>[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.status.pending`)),1)]),default:p(()=>[e(`p`,nn,[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`seedream.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(T,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])])]),_:1})]))])])}var wn=_({name:`SeedreamRecentPanel`,components:{TaskPreview:G(Wt,[[`render`,Cn],[`__scopeId`,`data-v-b0055abb`]]),BotPlaceholder:we,NoTasks:N,ScrollList:M},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.seedream?.tasks,items:this.$store.state.seedream?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Tn={key:0},En={key:2,class:`w-full h-full flex items-center justify-center`};function Dn(e,t,n,r,i,u){let d=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return h(),s(c,null,[e.tasks?.items===void 0?(h(),s(`div`,Tn,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(h(),f(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(h(!0),s(c,null,m(e.tasks?.items,e=>(h(),f(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(h(),s(`div`,En,[a(v)])):o(``,!0)],64)}var On=_({name:`SeedreamIndex`,components:{ConfigPanel:Ut,Layout:je,RecentPanel:G(wn,[[`render`,Dn]])},mixins:[pe],inject:[`initialized`],data(){return{task:void 0,job:0,loading:!1}},computed:{applicationsLoading(){return this.$store.state.seedream?.status?.getApplications===w.Request},tasksLoading(){return this.$store.state.seedream?.status?.getTasks===w.Request},credential(){return this.$store.state.seedream?.credential},config(){return this.$store.state.seedream?.config},application(){return this.$store.state.seedream?.application},tasks(){return this.$store.state.seedream?.tasks}},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 F({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loading,setLoading:e=>this.loading=e,isBlocked:()=>this.tasksLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`seedream/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`seedream/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.tasksLoading){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=20,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),await this.$store.dispatch(`seedream/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})},async onGenerate(){if(!fe(this.uploadTracker,e=>this.$t(e),e=>T.warning(e)))return;if(J(this.config?.model).imageRequired&&!this.config?.image?.length){T.warning(this.$t(`seedream.message.referenceImageRequired`));return}let e=Q(this.config);if(!_e())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}T.info(this.$t(`seedream.message.startingTask`)),de(`seedream`,le.generate(e,{token:t})).then(()=>{T.success(this.$t(`seedream.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?T.error(this.$t(`seedream.message.usedUp`)):T.error(this.$t(`seedream.message.startTaskFailed`)+(t?.error?.message||``))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function kn(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),u=l(`layout`);return h(),f(u,null,{config:p(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(c,{ref:`recentPanel`,loading:e.loading,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var An=G(On,[[`render`,kn]]);export{An as default};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,S as c,T as l,at as u,ht as d,it as f,j as p,mt as m,qt as h,rt as g,tt as _,x as v,z as y}from"./vendor-chart-Dw-P17PN.js";import{r as b,t as x}from"./select-K-2CZ3eR.js";import{t as S}from"./upload-_zFgS7Nh.js";import{t as C}from"./tooltip-CjkDaYbd.js";import{t as w}from"./alert-BprQRUmf.js";import{h as T,v as E}from"./models-C4O1HNS0.js";import{t as D}from"./drawer-CLmU-Got.js";import{t as O}from"./box-CjgWzmRH.js";import{t as k}from"./clock-DAmpmfMk.js";import{t as A}from"./external-link-CAB_CNUu.js";import{a as j,i as M,n as N,r as P,s as F,t as I}from"./pagination-CkF2u9jK.js";import{t as L}from"./image-C9t8D3m5.js";import{t as ee}from"./info-CifZclsR.js";import{t as te}from"./trash-2-zWLkqDxH.js";import{t as R}from"./triangle-alert-CCs6VvUs.js";import{t as z}from"./upload-Q8MqK29R.js";import{t as B}from"./wand-sparkles-BFbcxwi3.js";import{t as ne}from"./zap-Yxjdgccv.js";import{$n as re,Jn as ie,Qn as V,Xn as ae,Zn as oe}from"./constants-CdZEFH5x.js";import{$r as se,$t as H,Jt as U,Ma as W,O as G,Oi as K,Qt as ce,Zr as le,en as ue,hi as q,ia as de,in as fe,mi as J,nn as pe,pn as me,qn as Y,tn as he,va as X}from"./index-C-w8AJfV.js";import{t as ge}from"./CopyToClipboard-B8YmxJt6.js";import{t as _e}from"./ReportButton-CE99kMuV.js";import{t as Z}from"./ImagePreview-D8qlrS3J.js";import{n as ve}from"./taskDrawerMixin-DyAUhFEq.js";import{t as ye}from"./Consumption-DeigvrPq.js";import{t as be}from"./ScenarioPaymentMode-z1NgjkNu.js";import{t as xe}from"./ApiCodeButton-DmY8v9e5.js";import{t as Se}from"./BotPlaceholder-LUNR8KA6.js";import{t as Ce}from"./ImageWrapper-BK4v8WW9.js";import{t as Q}from"./imageRequests-D36QFGD8.js";var we=y({name:`LayoutNanobanana`,components:{MagicIcon:B,ElDrawer:D,ElButton:W},mixins:[ve]}),Te={class:`main flex flex-row flex-1`},Ee={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},De={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Oe(t,n,r,i,o,c){let l=u(`magic-icon`),p=u(`el-button`),h=u(`el-drawer`);return _(),s(`div`,Te,[e(`div`,Ee,[f(t.$slots,`config`,{},void 0,!0)]),e(`div`,De,[f(t.$slots,`result`,{},void 0,!0)]),d(a(p,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:m(()=>[a(l,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[v,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer generator-drawer`},{default:m(()=>[f(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var ke=G(we,[[`render`,Oe],[`__scopeId`,`data-v-6419fc74`]]),Ae=y({name:`PromptInput`,components:{PromptTextarea:M},computed:{prompt:{get(){return this.$store.state.nanobanana?.config?.prompt},set(e){this.$store.commit(`nanobanana/setConfig`,{...this.$store.state.nanobanana?.config,prompt:e})}}},mounted(){this.prompt||=``}});function je(e,t,n,r,i,a){let o=u(`prompt-textarea`);return _(),p(o,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`nanobanana.name.prompt`),info:e.$t(`nanobanana.description.prompt`),placeholder:e.$t(`nanobanana.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Me=G(Ae,[[`render`,je]]),Ne=y({name:`ImageUrlsInput`,components:{UploadIcon:z,ElUpload:S,ElButton:W,InfoIcon:j,ImagePreview:Z},mixins:[pe,he,H,U],data(){return{fileList:[],uploadUrl:de()+`/api/v1/files/`,suppressWatch:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url).filter(e=>!!e)},value(){return this.$store.state.nanobanana?.config?.image_urls}},watch:{value:{immediate:!0,handler(e){if(this.suppressWatch)return;if(!e||e.length===0){let e=(this.fileList||[]).filter(e=>!e?.response?.file_url);this.fileList=e.length?e:[];return}let t=[];e.forEach(e=>{let n=this.fileList.find(t=>t?.response?.file_url===e||t?.url===e);n?t.push(n):t.push({name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}})}),(this.fileList||[]).filter(e=>!e?.response?.file_url).forEach(e=>{t.some(t=>t===e||t?.url===e?.url||t?.response?.file_url===e?.response?.file_url)||t.push(e)}),this.fileList=t}}},mounted(){},methods:{onChange(e){if(!e?.url&&e?.raw)try{e.url=URL.createObjectURL(e.raw)}catch{}},onRemove(e){if(e?.url&&typeof e.url==`string`&&e.url.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}this.onSetImageUrls()},onExceed(){E.warning(this.$t(`nanobanana.message.uploadImageExceed`))},onError(){E.error(this.$t(`nanobanana.message.uploadImageError`))},onSetImageUrls(){let e=this.urls;this.suppressWatch=!0,this.$store.commit(`nanobanana/setConfig`,{...this.$store.state.nanobanana?.config,image_urls:e}),this.$nextTick(()=>{this.suppressWatch=!1})},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.onSetImageUrls()},onRemovePreview(e,t){if(this.fileList.splice(e,1),t?.url&&typeof t.url==`string`&&t.url.startsWith(`blob:`))try{URL.revokeObjectURL(t.url)}catch{}this.onSetImageUrls()}}}),Pe={class:`field mb-[10px] flex min-h-8 w-full items-center justify-between gap-3`},Fe={class:`flex min-w-0 items-center`},Ie={class:`title m-0 text-[14px] font-bold`},Le={class:`file-list flex flex-wrap gap-[10px]`};function Re(t,n,o,c,d,f){let h=u(`info-icon`),v=u(`upload-icon`),y=u(`el-button`),b=u(`el-upload`),x=u(`image-preview`);return _(),s(`div`,null,[e(`div`,Pe,[e(`div`,Fe,[e(`h2`,Ie,i(t.$t(`nanobanana.name.imageUrls`)),1),a(h,{content:t.$t(`nanobanana.description.imageUrls`)},null,8,[`content`])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,class:`value shrink-0`,limit:5,multiple:!0,"show-file-list":!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,"on-change":t.onChange,"on-remove":t.onRemove,headers:t.headers},{default:m(()=>[a(y,{size:`small`,type:`primary`,round:``},{default:m(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`nanobanana.button.uploadImageUrls`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`on-change`,`on-remove`,`headers`])]),e(`div`,Le,[(_(!0),s(l,null,g(t.fileList,(e,n)=>(_(),p(x,{key:e.uid||e?.response?.file_url||e.url||n,url:e.url||e?.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemovePreview(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])])}var ze=G(Ne,[[`render`,Re]]),Be=y({name:`AspectRatioSelector`,components:{InfoIcon:j},data(){return{options:[{value:`1:1`,label:`1:1`,width:20,height:20},{value:`3:2`,label:`3:2`,width:27,height:18},{value:`2:3`,label:`2:3`,width:18,height:27},{value:`16:9`,label:`16:9`,width:25,height:13},{value:`9:16`,label:`9:16`,width:13,height:25},{value:`4:3`,label:`4:3`,width:24,height:18},{value:`3:4`,label:`3:4`,width:18,height:24}]}},computed:{value(){return this.$store.state.nanobanana?.config?.aspect_ratio}},methods:{onSelect(e){let t=this.value===e?void 0:e,n={...this.$store.state.nanobanana?.config||{}};t?n.aspect_ratio=t:delete n.aspect_ratio,this.$store.commit(`nanobanana/setConfig`,n)}}}),Ve={class:`ratio`},He={class:`header`},Ue={class:`title font-bold`},We=[`aria-label`],Ge=[`aria-checked`,`aria-label`,`onClick`,`onKeydown`],Ke={class:`preview`},qe={class:`name`};function Je(r,o,d,f,p,m){let v=u(`info-icon`);return _(),s(`div`,Ve,[e(`div`,He,[e(`h2`,Ue,i(r.$t(`nanobanana.name.aspectRatio`)),1),a(v,{content:r.$t(`nanobanana.description.aspectRatio`),class:`ml-1`},null,8,[`content`])]),e(`div`,{class:`items`,role:`radiogroup`,"aria-label":r.$t(`nanobanana.name.aspectRatio`)},[(_(!0),s(l,null,g(r.options,a=>(_(),s(`div`,{key:a.value,class:n([`item`,{active:r.value===a.value}]),role:`radio`,"aria-checked":r.value===a.value,"aria-label":a.label,tabindex:`0`,onClick:e=>r.onSelect(a.value),onKeydown:[c(t(e=>r.onSelect(a.value),[`prevent`]),[`enter`]),c(t(e=>r.onSelect(a.value),[`prevent`]),[`space`])]},[e(`div`,Ke,[e(`div`,{class:`rect`,style:h({width:a.width+`px`,height:a.height+`px`})},null,4)]),e(`p`,qe,i(a.label),1)],42,Ge))),128))],8,We)])}var Ye=G(Be,[[`render`,Je],[`__scopeId`,`data-v-7131eb97`]]),Xe=y({name:`NanobananaModelSelector`,components:{ElSelect:b,ElOption:x,InfoIcon:j},data(){return{options:[{value:ae,label:this.$t(`nanobanana.model.nanoBanana`)},{value:V,label:V},{value:re,label:this.$t(`nanobanana.model.nanoBananaPro`)},{value:oe,label:this.$t(`nanobanana.model.nanoBanana2`)}]}},computed:{value:{get(){return this.$store.state.nanobanana?.config?.model},set(e){this.$store.commit(`nanobanana/setConfig`,{...this.$store.state.nanobanana?.config,model:e})}},modelDescription(){return this.$t(`nanobanana.description.model`)}},mounted(){this.value||=ie}}),Ze={class:`field`},Qe={class:`label`},$e={class:`box`},et={class:`title font-bold`};function tt(t,n,r,o,c,d){let f=u(`info-icon`),h=u(`el-option`),v=u(`el-select`);return _(),s(`div`,Ze,[e(`div`,Qe,[e(`div`,$e,[e(`h2`,et,i(t.$t(`nanobanana.name.model`)),1),a(f,{content:t.modelDescription,class:`info`},null,8,[`content`])])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`nanobanana.placeholder.select`)},{default:m(()=>[(_(!0),s(l,null,g(t.options,e=>(_(),p(h,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var nt=G(Xe,[[`render`,tt],[`__scopeId`,`data-v-11cb675b`]]),rt=y({name:`NanobananaResolutionSelector`,components:{ElSelect:b,ElOption:x,InfoIcon:j},data(){return{cachedResolution:`1K`,options:[{value:`1K`,label:`1K`},{value:`2K`,label:`2K`},{value:`4K`,label:`4K`}]}},computed:{value:{get(){return this.$store.state.nanobanana?.config?.resolution},set(e){this.$store.commit(`nanobanana/setConfig`,{...this.$store.state.nanobanana?.config,resolution:e})}},supportsResolution(){let e=this.$store.state.nanobanana?.config?.model;return e===`nano-banana-2`||e===`nano-banana-pro`}},watch:{value(e){this.supportsResolution&&e&&(this.cachedResolution=e)},supportsResolution(e){e?this.value||=this.cachedResolution||`1K`:(this.value&&(this.cachedResolution=this.value),this.$store.commit(`nanobanana/setConfig`,{...this.$store.state.nanobanana?.config,resolution:void 0}))}},mounted(){this.supportsResolution&&!this.value&&(this.value=`1K`),!this.supportsResolution&&this.value&&(this.cachedResolution=this.value,this.$store.commit(`nanobanana/setConfig`,{...this.$store.state.nanobanana?.config,resolution:void 0}))}}),it={class:`field`},at={class:`label`},ot={class:`box`},st={class:`title font-bold`};function ct(t,n,r,o,c,d){let f=u(`info-icon`),h=u(`el-option`),v=u(`el-select`);return _(),s(`div`,it,[e(`div`,at,[e(`div`,ot,[e(`h2`,st,i(t.$t(`nanobanana.name.resolution`)),1),a(f,{content:t.$t(`nanobanana.description.resolutionProOnly`),class:`info`},null,8,[`content`])])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`nanobanana.placeholder.select`),disabled:!t.supportsResolution},{default:m(()=>[(_(!0),s(l,null,g(t.options,e=>(_(),p(h,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`disabled`])])}var lt=G(rt,[[`render`,ct],[`__scopeId`,`data-v-7ab9d4d4`]]),ut=350,dt=y({name:`ConfigPanel`,components:{MagicIcon:B,ElButton:W,PromptInput:Me,Consumption:ye,ImageUrlsInput:ze,AspectRatioSelector:Ye,ModelSelector:nt,ResolutionSelector:lt,ScenarioPaymentMode:be},props:{identityToken:{type:String,default:void 0}},emits:[`generate`],data(){return{quoteTimer:0,quoteRunId:0}},computed:{config(){return this.$store.state.nanobanana?.config},consumption(){let e={...this.config||{}},t=Array.isArray(e?.image_urls)&&e.image_urls.length>0;return fe({...e,action:t?`edit`:`generate`},this.service?.cost)},service(){return this.$store.state.nanobanana?.service},walletMode(){return J()&&q(`nanobanana`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(){this.walletMode&&this.scheduleQuote()},deep:!0},identityToken(){this.quoteRunId+=1,this.walletMode&&this.scheduleQuote()}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,ut)},async refreshQuote(){let e=q(`nanobanana`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await Y.quote(Q(this.config),this.identityToken);t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){this.$emit(`generate`)}}}),ft={class:`flex flex-col h-full`},pt={class:`flex-1 overflow-y-auto p-5`},mt={class:`flex flex-col items-center justify-center px-5 pb-5`};function ht(t,n,c,l,d,f){let h=u(`model-selector`),g=u(`resolution-selector`),v=u(`prompt-input`),y=u(`aspect-ratio-selector`),b=u(`image-urls-input`),x=u(`scenario-payment-mode`),S=u(`consumption`),C=u(`magic-icon`),w=u(`el-button`);return _(),s(`div`,ft,[e(`div`,pt,[a(h,{class:`mb-4`}),a(g,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`})]),e(`div`,mt,[a(x,{scenario:`nanobanana`}),t.walletMode?o(``,!0):(_(),p(S,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),a(w,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:m(()=>[a(C,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`nanobanana.button.generate`)),1)]),_:1},8,[`onClick`])])])}var gt=G(dt,[[`render`,ht]]),_t=y({name:`TaskPreview`,components:{ApplicationIcon:O,ChannelIcon:F,DeleteIcon:te,ExternalLinkIcon:A,ImageIcon:L,InfoIcon:ee,LightningIcon:ne,MagicIcon:B,TimeIcon:k,WarningIcon:R,CopyToClipboard:ge,ElAlert:w,ImageWrapper:Ce,ElButton:W,ElTooltip:C,ImagePreview:Z,ApiCodeButton:xe,ReportButton:_e},props:{modelValue:{type:Object,required:!0}},computed:{images(){let e=[];return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(t=>{e.push(t)}),e},hasImages(){return this.images.some(e=>!!e?.image_url)},showResult(){let e=this.modelValue?.response;return e?e.success===!0?!0:this.hasImages&&e.success!==!1:!1}},methods:{onEdit(e){if(!e)return;console.debug(`Edit image:`,e);let t={...this.$store.state.nanobanana?.config||{}};delete t.action,t.image_urls=[e],this.$store.commit(`nanobanana/setConfig`,t)},async onDelete(){let e=this.modelValue?.id;if(e){try{await X.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`nanobanana/deleteTask`,{id:e}),E.success(this.$t(`common.message.deleteTaskSuccess`))}catch{E.error(this.$t(`common.message.deleteTaskFailed`))}}}}}),vt={class:`preview`},yt={class:`left`},bt={class:`main`},xt={class:`bot`},St={class:`datetime`},Ct=[`aria-label`],wt={class:`info`},Tt={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},Et={key:1,class:`prompt mt-2`},Dt={key:0},Ot={key:0,class:n({content:!0,failed:!0})},kt={class:`flex justify-start items-center gap-4 w-full overflow-x-auto`},At={class:n({operations:!0,"mt-2":!0,"mb-2":!0})},jt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Mt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Nt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Pt={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ft={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},It={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Lt={key:5,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Rt={key:1,class:n({content:!0})},zt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Bt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Vt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ht={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ut={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Wt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Gt={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Kt={key:5,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},qt={key:2,class:n({content:!0})},$={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Jt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Yt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Xt={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Zt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`};function Qt(n,c,d,f,h,v){let y=u(`capability-presentation`),b=u(`delete-icon`),x=u(`el-tooltip`),S=u(`image-preview`),C=u(`image-wrapper`),w=u(`el-button`),T=u(`api-code-button`),E=u(`report-button`),D=u(`application-icon`),O=u(`image-icon`),k=u(`external-link-icon`),A=u(`lightning-icon`),j=u(`magic-icon`),M=u(`copy-to-clipboard`),N=u(`time-icon`),P=u(`channel-icon`),F=u(`el-alert`),I=u(`warning-icon`),L=u(`info-icon`);return _(),s(`div`,vt,[e(`div`,yt,[a(y,{capability:`nanobanana`,part:`avatar`,class:`avatar`})]),e(`div`,bt,[e(`div`,xt,[a(y,{capability:`nanobanana`,part:`name`}),e(`span`,St,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:m(()=>[n.modelValue?.id?(_(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Ct)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,wt,[n.modelValue?.request?.image_urls&&n.modelValue?.request?.image_urls.length>0?(_(),s(`div`,Tt,[(_(!0),s(l,null,g(n.modelValue?.request?.image_urls,(e,t)=>(_(),p(S,{key:t,url:e,name:`image-${t+1}`,closable:!1},null,8,[`url`,`name`]))),128))])):o(``,!0),n.modelValue?.request?.prompt?(_(),s(`p`,Et,[r(i(n.modelValue?.request?.prompt)+` `,1),n.modelValue?.response?o(``,!0):(_(),s(`span`,Dt,` - (`+i(n.$t(`nanobanana.status.pending`))+`) `,1))])):o(``,!0)]),n.showResult?(_(),s(`div`,Ot,[e(`div`,kt,[(_(!0),s(l,null,g(n.images,(e,t)=>(_(),p(C,{key:t,src:e?.image_url,"raw-src":e?.image_url},null,8,[`src`,`raw-src`]))),128))]),e(`div`,At,[a(x,{class:`box-item`,effect:`dark`,content:n.$t(`common.button.edit`),placement:`top-start`},{default:m(()=>[a(w,{type:`info`,size:`small`,class:`btn-action`,onClick:c[1]||=t(e=>n.onEdit(n.images?.[0]?.image_url),[`stop`])},{default:m(()=>[r(i(n.$t(`common.button.edit`)),1)]),_:1})]),_:1},8,[`content`]),a(T,{path:`/nano-banana/images`,body:n.modelValue?.request},null,8,[`body`]),a(E,{service:`nanobanana`,"target-id":n.modelValue?.id,snapshot:{prompt:n.modelValue?.request?.prompt}},null,8,[`target-id`,`snapshot`])]),a(F,{closable:!1,class:`mt-2 success`},{default:m(()=>[n.modelValue?.request?.model?(_(),s(`p`,jt,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.modelValue?.request?.resolution?(_(),s(`p`,Mt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.resolution`))+`: `+i(n.modelValue?.request?.resolution),1)])):o(``,!0),n.modelValue?.request?.aspect_ratio?(_(),s(`p`,Nt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.aspectRatio`))+`: `+i(n.modelValue?.request?.aspect_ratio),1)])):o(``,!0),n.modelValue?.request?.action?(_(),s(`p`,Pt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.task`))+`: `+i(n.modelValue?.request?.action===`generate`?n.$t(`nanobanana.name.generate`):n.$t(`nanobanana.name.edits`)),1)])):o(``,!0),e(`p`,Ft,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(M,{content:n.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),n.modelValue?.elapsed?(_(),s(`p`,It,[a(N,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(_(),s(`p`,Lt,[a(P,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(M,{content:n.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):n.modelValue?.response?.success===!1||n.modelValue?.response?.error?(_(),s(`div`,Rt,[a(F,{closable:!1,class:`failure`},{template:m(()=>[a(I,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.failure`)),1)]),default:m(()=>[n.modelValue?.request?.model?(_(),s(`p`,zt,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.modelValue?.request?.resolution?(_(),s(`p`,Bt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.resolution`))+`: `+i(n.modelValue?.request?.resolution),1)])):o(``,!0),n.modelValue?.request?.aspect_ratio?(_(),s(`p`,Vt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.aspectRatio`))+`: `+i(n.modelValue?.request?.aspect_ratio),1)])):o(``,!0),n.modelValue?.request?.action?(_(),s(`p`,Ht,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.task`))+`: `+i(n.modelValue?.request?.action===`generate`?n.$t(`nanobanana.name.generate`):n.$t(`nanobanana.name.edits`)),1)])):o(``,!0),e(`p`,Ut,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(M,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e(`p`,Wt,[a(L,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(M,{content:n.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(_(),s(`p`,Gt,[a(N,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(_(),s(`p`,Kt,[a(P,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(M,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])):o(``,!0)]),_:1})])):(_(),s(`div`,qt,[a(F,{closable:!1,class:`info`},{template:m(()=>[a(N,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.status.pending`)),1)]),default:m(()=>[n.modelValue?.request?.model?(_(),s(`p`,$,[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.modelValue?.request?.resolution?(_(),s(`p`,Jt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.resolution`))+`: `+i(n.modelValue?.request?.resolution),1)])):o(``,!0),n.modelValue?.request?.aspect_ratio?(_(),s(`p`,Yt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.aspectRatio`))+`: `+i(n.modelValue?.request?.aspect_ratio),1)])):o(``,!0),n.modelValue?.request?.action?(_(),s(`p`,Xt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.task`))+`: `+i(n.modelValue?.request?.action===`generate`?n.$t(`nanobanana.name.generate`):n.$t(`nanobanana.name.edits`)),1)])):o(``,!0),e(`p`,Zt,[a(j,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`nanobanana.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(M,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})]))])])}var $t=y({name:`RecentPanel`,components:{TaskPreview:G(_t,[[`render`,Qt],[`__scopeId`,`data-v-45a0e049`]]),BotPlaceholder:Se,NoTasks:P,ScrollList:N},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.nanobanana?.tasks,items:this.$store.state.nanobanana?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),en={key:0},tn={key:2,class:`w-full h-full flex items-center justify-center`};function nn(e,t,n,r,i,c){let d=u(`bot-placeholder`),f=u(`task-preview`),h=u(`scroll-list`),v=u(`no-tasks`);return _(),s(l,null,[e.tasks?.items===void 0?(_(),s(`div`,en,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(_(),p(h,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:m(()=>[(_(!0),s(l,null,g(e.tasks?.items,e=>(_(),p(f,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(_(),s(`div`,tn,[a(v)])):o(``,!0)],64)}var rn=y({name:`NanobananaIndex`,components:{ConfigPanel:gt,Layout:ke,RecentPanel:G($t,[[`render`,nn]])},mixins:[ue],inject:[`initialized`],data(){return{task:void 0,job:0,loading:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.nanobanana?.status?.getApplications===T.Request},tasksLoading(){return this.$store.state.nanobanana?.status?.getTasks===T.Request},credential(){return this.$store.state.nanobanana?.credential},config(){return this.$store.state.nanobanana?.config},application(){return this.$store.state.nanobanana?.application},tasks(){return this.$store.state.nanobanana?.tasks},walletMode(){return J()&&q(`nanobanana`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){t===void 0||e===t||(this.$store.commit(`nanobanana/setTasks`,void 0),await this.onGetTasks(),await this.onScrollDown())}},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 I({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loading,setLoading:e=>this.loading=e,isBlocked:()=>this.tasksLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`nanobanana/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`nanobanana/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.tasksLoading){console.debug(`loading`);return}let{limit:t=20,createdAtMin:n,createdAtMax:r}=e||{};await this.$store.dispatch(`nanobanana/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})},async onGenerate(){if(!ce(this.uploadTracker,e=>this.$t(e),e=>E.warning(e)))return;let e=Q(this.config),t;if(this.walletMode){let n=this.getWalletContext();if(!n){E.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}t=Y.generate(e,{mode:`x402`,x402:{wallet:n,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!me())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}t=Y.generate(e,{token:n})}E.info(this.$t(`nanobanana.message.startingTask`)),K(`nanobanana`,t).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),E.success(this.$t(`nanobanana.message.startTaskSuccess`))}).catch(e=>{if(e instanceof le)return;let t=e?.response?.data;t?.error?.code===`used_up`?E.error(this.$t(`nanobanana.message.usedUp`)):this.walletMode?E.error(`${this.$t(`common.x402Scenario.paymentFailed`)} ${e?.message||``}`.trim()):E.error(this.$t(`nanobanana.message.startTaskFailed`)+(t?.error?.message||``))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return se(this.$wallet)},async confirmWalletPayment(e){return X.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function an(e,t,n,r,i,o){let s=u(`config-panel`),c=u(`recent-panel`),l=u(`layout`);return _(),p(l,null,{config:m(()=>[a(s,{"identity-token":e.credential?.token,onGenerate:e.onGenerate},null,8,[`identity-token`,`onGenerate`])]),result:m(()=>[a(c,{ref:`recentPanel`,loading:e.loading,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var on=G(rn,[[`render`,an]]);export{on as default};