@acedatacloud/nexior 3.235.0 → 3.236.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ApiCodeButton-B-dufckN.js → ApiCodeButton-CrRtDEA-.js} +1 -1
- package/dist/assets/{Auth-Dq5sJ2mj.js → Auth-DkLzsfmT.js} +1 -1
- package/dist/assets/{BotPlaceholder-DSJFXoiB.js → BotPlaceholder-DshCUMDY.js} +1 -1
- package/dist/assets/{Callback-DcjNgijj.js → Callback-BYFJ1AeD.js} +1 -1
- package/dist/assets/{Console-Cu7VH3rT.js → Console-DFG4J_Jl.js} +1 -1
- package/dist/assets/{Consumption-Cf7JzgYx.js → Consumption-BjI49_Pa.js} +1 -1
- package/dist/assets/{Conversation-SFNUvzg5.css → Conversation-1fUmUeC1.css} +1 -1
- package/dist/assets/{Conversation-B_mDsUmL.js → Conversation-eCZC0Ghs.js} +9 -9
- package/dist/assets/{CopyToClipboard-CoPaGg3O.js → CopyToClipboard-iGf1rugK.js} +1 -1
- package/dist/assets/{Detail-JYTC0aI6.js → Detail-Cd-pcK8S.js} +2 -2
- package/dist/assets/{Extra-CKzHL_D-.js → Extra-DSi3zCdS.js} +1 -1
- package/dist/assets/FilePreview-s1NoIwc1.js +1 -0
- package/dist/assets/{Hailuo-D1_MiFss.js → Hailuo-BXzKxgGb.js} +1 -1
- package/dist/assets/{History-DfGD3tN_.js → History-Bv6LP0W8.js} +1 -1
- package/dist/assets/ImagePreview-CimxR66Y.js +1 -0
- package/dist/assets/{ImageWrapper-K_mMEl0Y.js → ImageWrapper-DcdH0ACg.js} +1 -1
- package/dist/assets/{Index-RQRIBZMy.js → Index-13SSOOb0.js} +2 -2
- package/dist/assets/{Index-BsVoXVJt.js → Index-1asEOZBd.js} +1 -1
- package/dist/assets/Index-2Pm85nKJ.js +1 -0
- package/dist/assets/{Index-CavU_qwV.css → Index-73BCUrjT.css} +1 -1
- package/dist/assets/Index-BA92Ssbm.js +1 -0
- package/dist/assets/{Index-B_HRzev8.css → Index-BTgWeLuA.css} +1 -1
- package/dist/assets/{Index-C9aH44jl.js → Index-BUUmQQLx.js} +1 -1
- package/dist/assets/{Index-CNjVNgUp.css → Index-BWOU3fXv.css} +1 -1
- package/dist/assets/Index-BZ_bltRK.js +1 -0
- package/dist/assets/{Index-oNAHATQB.js → Index-BeJ33zEU.js} +1 -1
- package/dist/assets/Index-Bj4CFLJC.js +1 -0
- package/dist/assets/{Index-CCyaRNQq.css → Index-BtdHbCVR.css} +1 -1
- package/dist/assets/{Index-iZd6ypwE.css → Index-BuIdo5Fe.css} +1 -1
- package/dist/assets/Index-ByBYMPWx.js +1 -0
- package/dist/assets/{Index-CYQZ3ZGX.js → Index-C02epdF-.js} +1 -1
- package/dist/assets/{Index-BEYjoyFC.css → Index-C6vjbR17.css} +1 -1
- package/dist/assets/Index-CBrZfy-_.js +1 -0
- package/dist/assets/Index-CHLG_yhn.js +1 -0
- package/dist/assets/Index-CKdB0Xpt.js +1 -0
- package/dist/assets/{Index-DI1HVcj5.css → Index-CVeNV3ke.css} +1 -1
- package/dist/assets/Index-CipAh56z.js +1 -0
- package/dist/assets/Index-CiqNkIW5.js +1 -0
- package/dist/assets/{Index-BqI6RyZe.css → Index-CoxYGlEn.css} +1 -1
- package/dist/assets/{Index-BI9XSOsZ.css → Index-CqWKokmU.css} +1 -1
- package/dist/assets/{Index-Cnc0MpHR.js → Index-CtIe5XUM.js} +1 -1
- package/dist/assets/{Index-DocyU0M-.css → Index-CussKAgR.css} +1 -1
- package/dist/assets/Index-D04baNsJ.js +1 -0
- package/dist/assets/{Index-CefjXJTr.css → Index-DBppM020.css} +1 -1
- package/dist/assets/{Index-DGGcjNZX.css → Index-DFxs6gvk.css} +1 -1
- package/dist/assets/{Index-D51MqxQE.css → Index-DMKdRYRs.css} +1 -1
- package/dist/assets/Index-DNKsSLye.js +1 -0
- package/dist/assets/{Index-Bt1VQ_CZ.css → Index-DVIIYqUw.css} +1 -1
- package/dist/assets/{Index-7aac82qp.css → Index-DVIWhfvK.css} +1 -1
- package/dist/assets/Index-D_gQjc1L.js +1 -0
- package/dist/assets/{Index-C10y8gLk.css → Index-DkCvUSC-.css} +1 -1
- package/dist/assets/{Index-Cn_D-zTq.js → Index-DvhJLyZW.js} +1 -1
- package/dist/assets/Index-PeHJeb8x.js +1 -0
- package/dist/assets/Index-PyKkuUcV.js +1 -0
- package/dist/assets/Index-__yw529f.js +1 -0
- package/dist/assets/{Index-hZBj6KB9.css → Index-ftYrgoPl.css} +1 -1
- package/dist/assets/{Index-DvGjOe6v.js → Index-xDEKnxjc.js} +1 -1
- package/dist/assets/Index-xNV5pOBL.js +1 -0
- package/dist/assets/{Invitees-ChASlGew.js → Invitees-BLVtmP6n.js} +1 -1
- package/dist/assets/{List-BWlJY8Az.js → List-BBERwTjb.js} +1 -1
- package/dist/assets/{List-DhLnhjAt.js → List-BG2nFZbo.js} +1 -1
- package/dist/assets/{List-eSQMYpiF.js → List-ZqaLpZaQ.js} +1 -1
- package/dist/assets/{Main-aS0kZk_q.js → Main-DW5LCJG2.js} +1 -1
- package/dist/assets/{Model-BhF3HuRW.css → Model-C2LPrW73.css} +1 -1
- package/dist/assets/Model-DxGfMKnq.js +1 -0
- package/dist/assets/{Navigator-DNinF4iU.js → Navigator-DBzh_exJ.js} +1 -1
- package/dist/assets/{NoTasks-BTTicoTH.js → NoTasks-Bbda08Q1.js} +1 -1
- package/dist/assets/{NotFound-DGA695Q_.js → NotFound-_37Kr_1Z.js} +1 -1
- package/dist/assets/{Pagination-t0sFA4nv.js → Pagination-DGQ61fZw.js} +1 -1
- package/dist/assets/{Player.vue_vue_type_script_setup_true_lang-BtD3_4kP.js → Player.vue_vue_type_script_setup_true_lang-DZtWaqFs.js} +1 -1
- package/dist/assets/{Status-gAuKcTP1.js → Status-BngjLqTY.js} +1 -1
- package/dist/assets/{Subscribe-CFZo27pY.js → Subscribe-BG4pml7u.js} +1 -1
- package/dist/assets/{TabSwitcher-DIsNuxc9.js → TabSwitcher-C0BaS157.js} +1 -1
- package/dist/assets/Tts-wXK_UI40.js +1 -0
- package/dist/assets/{VideoPlayer-K7eXLAuz.js → VideoPlayer-CVW6n0qR.js} +1 -1
- package/dist/assets/{_Uint8Array-n_GUsB5q.js → _Uint8Array-BIXfM435.js} +1 -1
- package/dist/assets/{_baseClone-BYVVMiV_.js → _baseClone-DKeYjJkl.js} +1 -1
- package/dist/assets/{_baseIteratee-Dc4q5CLk.js → _baseIteratee-Bt2Y2jN_.js} +1 -1
- package/dist/assets/{_initCloneObject-DoWEnuFI.js → _initCloneObject-DtPLipIO.js} +1 -1
- package/dist/assets/{add-DaXqzkoB.js → add-DP5Syu6f.js} +1 -1
- package/dist/assets/{all-wallets-DCbFLAeI.js → all-wallets-8yVAxmmT.js} +1 -1
- package/dist/assets/{app-store-CTtAHP9E.js → app-store-BOg17Gjl.js} +1 -1
- package/dist/assets/{apple-vmWKcjcD.js → apple-bcuTLrjA.js} +1 -1
- package/dist/assets/{arrow-bottom-C29FLi6O.js → arrow-bottom-BKh0d3eM.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-DR81xYm_.js → arrow-bottom-circle-kwWs6RBF.js} +1 -1
- package/dist/assets/{arrow-left-BC9Kc4da.js → arrow-left-BywpPIZq.js} +1 -1
- package/dist/assets/{arrow-right-CbmuNYtL.js → arrow-right-Ch2ZAinv.js} +1 -1
- package/dist/assets/{arrow-top-D1rt8J69.js → arrow-top-B1IDAg0j.js} +1 -1
- package/dist/assets/{avatar-4t8qXpyr.js → avatar-DUEuHWZY.js} +1 -1
- package/dist/assets/{bank-DhnMg1C6.js → bank-CdaVCgNz.js} +1 -1
- package/dist/assets/{basic-CLqU3JSd.js → basic-BucaJggZ.js} +1 -1
- package/dist/assets/{browser-BTfEt8Ha.js → browser-Jd_ss_AE.js} +1 -1
- package/dist/assets/{byokCredential-W9bM6g_o.js → byokCredential-_EqeEUmA.js} +1 -1
- package/dist/assets/{card-DJ-XJZP5.js → card-g7tegcbv.js} +1 -1
- package/dist/assets/{castArray-CdP6H4P_.js → castArray-BExg_RaC.js} +1 -1
- package/dist/assets/{chat-DIa32nN2.js → chat-Cm8roG0-.js} +1 -1
- package/dist/assets/{checkmark-D0f49c38.js → checkmark-CTEA0GfP.js} +1 -1
- package/dist/assets/{checkmark-bold-CEw2rGo6.js → checkmark-bold-D-S3iZDY.js} +1 -1
- package/dist/assets/{chevron-bottom-k2LY8_7p.js → chevron-bottom-DQzXs88q.js} +1 -1
- package/dist/assets/{chevron-left-CeaY68qm.js → chevron-left-Vi0IndPr.js} +1 -1
- package/dist/assets/{chevron-right-chpm-6Qs.js → chevron-right-BbIfeDRh.js} +1 -1
- package/dist/assets/{chevron-top-818UJ65I.js → chevron-top-sBbj-jMN.js} +1 -1
- package/dist/assets/{chrome-store-CpRQZpXF.js → chrome-store-DI_8qjrM.js} +1 -1
- package/dist/assets/{clock-DkHjfKyz.js → clock-BIxFFmfb.js} +1 -1
- package/dist/assets/{close-DK0BFO12.js → close-9blcGFMO.js} +1 -1
- package/dist/assets/{coinPlaceholder-B_fbJVcK.js → coinPlaceholder-CPNRBLWM.js} +1 -1
- package/dist/assets/{common-CDWbEL9W.js → common-B1iYtnm7.js} +1 -1
- package/dist/assets/{common-qKzQmlCK.js → common-B9mmXaJu.js} +1 -1
- package/dist/assets/{common-Bp33GiaX.js → common-BBa7S57F.js} +1 -1
- package/dist/assets/{common-Ch0wNvaZ.js → common-BO_ooCod.js} +1 -1
- package/dist/assets/{common-BctIqaNn.js → common-BRHihggP.js} +1 -1
- package/dist/assets/{common-BSnswRLq.js → common-B_V0kate.js} +1 -1
- package/dist/assets/{common-BKKIowG4.js → common-Bg-ycLkv.js} +1 -1
- package/dist/assets/{common-Lkcb3Tg5.js → common-C7XIrBr0.js} +1 -1
- package/dist/assets/{common-TVZetej-.js → common-CCXhuCla.js} +1 -1
- package/dist/assets/{common-B_JDDZrK.js → common-CNKvo_Jd.js} +1 -1
- package/dist/assets/{common-avtzMID3.js → common-CQZxk01a.js} +1 -1
- package/dist/assets/{common--Bfm950S.js → common-CvJhgiFK.js} +1 -1
- package/dist/assets/{common-H93wBI8L.js → common-DBDpFiuN.js} +1 -1
- package/dist/assets/{common-iAfvmtSG.js → common-DVNV1lu7.js} +1 -1
- package/dist/assets/{common-DvTktupv.js → common-DW_yosgl.js} +1 -1
- package/dist/assets/{common-D8ail2tX.js → common-Dt948byi.js} +1 -1
- package/dist/assets/{common-SXN6RSGA.js → common-PU8YPUQ_.js} +1 -1
- package/dist/assets/{common-BZ9zvx3P.js → common-wyGy5Og3.js} +1 -1
- package/dist/assets/{compass-DjfTpprT.js → compass-i0HU2h-C.js} +1 -1
- package/dist/assets/{copy-CQujFy2w.js → copy-BluERDb8.js} +1 -1
- package/dist/assets/{createTaskActions-BeXUtb7V.js → createTaskActions-BUn4vcvp.js} +1 -1
- package/dist/assets/{cursor-CxyJYRXw.js → cursor-Bx5Oe8ju.js} +1 -1
- package/dist/assets/{cursor-transparent-Bivi01X7.js → cursor-transparent-EzG9HD-L.js} +1 -1
- package/dist/assets/{debounce-CgIDI9MZ.js → debounce-B5JvncAZ.js} +1 -1
- package/dist/assets/{desktop-ByuMfyJI.js → desktop-DsqWOXwi.js} +1 -1
- package/dist/assets/{disconnect-B6qkMdp_.js → disconnect-C22OblXS.js} +1 -1
- package/dist/assets/{discord-BI2uZX4S.js → discord-meHw7PRp.js} +1 -1
- package/dist/assets/{distribution-C_Dln_Xf.js → distribution-DnXsmqRw.js} +1 -1
- package/dist/assets/{dropdown-C0UNTf2_.js → dropdown-BtVThzlo.js} +1 -1
- package/dist/assets/{etherscan-zAgMf0u_.js → etherscan-LGXYuQ6H.js} +1 -1
- package/dist/assets/{exclamation-triangle-CotdqKhg.js → exclamation-triangle-CiEz9r_4.js} +1 -1
- package/dist/assets/{extension-BftxkvaO.js → extension-D5c_04bR.js} +1 -1
- package/dist/assets/{external-link-B0g-oH-c.js → external-link-CFOp3-_L.js} +1 -1
- package/dist/assets/{facebook-D8oBamrR.js → facebook-DpzF4K3d.js} +1 -1
- package/dist/assets/{farcaster-DSAi6eEv.js → farcaster-Cpv9yoQS.js} +1 -1
- package/dist/assets/{filters-B4RshIsk.js → filters-iri6P30z.js} +1 -1
- package/dist/assets/{github-DAT-1N12.js → github-DWXnHz0G.js} +1 -1
- package/dist/assets/{google-CiazMcDx.js → google-BrBeQVB2.js} +1 -1
- package/dist/assets/{help-circle-B3NdIXiy.js → help-circle-xfW-MzPb.js} +1 -1
- package/dist/assets/{highlight-nd-FM0pM.js → highlight-Cd4Q8Ip_.js} +1 -1
- package/dist/assets/{id--WaX3RpN.js → id-DpKMPdq1.js} +1 -1
- package/dist/assets/{image-3J0GUqZv.js → image-Dixu48We.js} +1 -1
- package/dist/assets/{index-Cn0fmQ3l.js → index-5TS5Jk95.js} +1 -1
- package/dist/assets/{index-CC46RrlJ.js → index-9IEjRM3Q.js} +1 -1
- package/dist/assets/{index-Ct4rxn51.js → index-B0eTyQTH.js} +1 -1
- package/dist/assets/{index-ytYs_30g.js → index-B2WALAp5.js} +1 -1
- package/dist/assets/{index-Cr8l_4Dp.js → index-B8YaNbjH.js} +1 -1
- package/dist/assets/{index-DqEkTwBy.js → index-BM_rafS_.js} +1 -1
- package/dist/assets/{index-DFXYlT2H.js → index-BNoscgvM.js} +1 -1
- package/dist/assets/{index-BiPjwg6M.js → index-BOG4F4Qw.js} +1 -1
- package/dist/assets/{index-CNZYboGy.js → index-BOMdArDy.js} +1 -1
- package/dist/assets/{index-CIJN7037.js → index-BWW2lqnk.js} +1 -1
- package/dist/assets/{index-BNTVi09G.js → index-BkTNHP9z.js} +1 -1
- package/dist/assets/{index-euD8ahpG.js → index-Bo95hXWb.js} +1 -1
- package/dist/assets/{index-BAfXe7Bj.js → index-BocpEQoC.js} +1 -1
- package/dist/assets/{index-C5w9gw4v.js → index-BsgWMyQj.js} +1 -1
- package/dist/assets/{index-CM8xtpW0.js → index-Bt5-RXgT.js} +1 -1
- package/dist/assets/{index-D-xQ-cKq.js → index-BuBDSpZN.js} +1 -1
- package/dist/assets/{index-CGWgpblY.js → index-BubLGEsB.js} +5 -5
- package/dist/assets/{index-Chojkt3K.js → index-BzJ9ycab.js} +1 -1
- package/dist/assets/{index-CxQPkGk5.js → index-C18DxXVU.js} +1 -1
- package/dist/assets/{index-qzLruMik.js → index-C2M-sv6S.js} +1 -1
- package/dist/assets/{index-CfDpnu4d.js → index-C89C7nG9.js} +1 -1
- package/dist/assets/{index-BeS9CDfO.js → index-CCflpVIr.js} +1 -1
- package/dist/assets/{index-DpTMXSsR.js → index-CDJdWaFL.js} +1 -1
- package/dist/assets/{index-BqJ6aJTS.js → index-CG1AViSL.js} +1 -1
- package/dist/assets/{index-CUcAErGH.js → index-C_9yphc-.js} +1 -1
- package/dist/assets/{index-CPMq4xCC.js → index-C_ZyWVYR.js} +1 -1
- package/dist/assets/{index-Cgl_C-b7.js → index-Ceqc9VEg.js} +1 -1
- package/dist/assets/{index-B2AOEMq_.js → index-CgUGJb8-.js} +1 -1
- package/dist/assets/{index-B90YWE_w.js → index-CjIENp6y.js} +1 -1
- package/dist/assets/{index-C4SSkadI.js → index-CjUyXen-.js} +1 -1
- package/dist/assets/{index-CIWRtJwc.js → index-CkDY6kja.js} +1 -1
- package/dist/assets/{index-nJBCaM70.js → index-Clyl-evN.js} +1 -1
- package/dist/assets/{index-DrtKxZ-g.js → index-CmG99V2b.js} +1 -1
- package/dist/assets/{index-DnTx8D91.js → index-CmHsQcx3.js} +1 -1
- package/dist/assets/{index-8WjENKbs.js → index-CmJh3jrM.js} +1 -1
- package/dist/assets/{index-aw39jWwO.js → index-Cx7iXDXZ.js} +1 -1
- package/dist/assets/{index-CDZfZR_d.js → index-CxMk1myK.js} +1 -1
- package/dist/assets/{index-SklJSpHS.js → index-DBnE9R1q.js} +1 -1
- package/dist/assets/{index-CI7cq-N8.js → index-DFXRfmTt.js} +1 -1
- package/dist/assets/{index-hk5mZeDZ.js → index-DMJfKS3G.js} +1 -1
- package/dist/assets/{index-CljsY3Ns.js → index-DNG9pOUN.js} +1 -1
- package/dist/assets/{index-Bg63-6JT.js → index-DVIwA9Ae.js} +1 -1
- package/dist/assets/{index-hoRqwqcA.js → index-DWLmb3Vm.js} +1 -1
- package/dist/assets/{index-CnG8KH7Q.js → index-DXmaMdK_.js} +3 -3
- package/dist/assets/{index-DwqFDavN.js → index-D_2hNSYx.js} +1 -1
- package/dist/assets/{index-D3EQl1GX.js → index-DiPZ2n0W.js} +1 -1
- package/dist/assets/{index-CRISmMcS.js → index-DiXnIqqf.js} +1 -1
- package/dist/assets/{index-BCvZA4VL.js → index-Dihf-9rG.js} +1 -1
- package/dist/assets/{index-DvpiQMLH.js → index-DjLUpjhY.js} +1 -1
- package/dist/assets/{index-S77IYy1Q.js → index-DolGpV2t.js} +1 -1
- package/dist/assets/{index-Dp8CKzl-.js → index-DwC66Fwb.js} +4 -4
- package/dist/assets/{index-B46iV3nA.js → index-DwMBbou4.js} +1 -1
- package/dist/assets/{index-BXlxpk-b.js → index-L1kyDTDU.js} +1 -1
- package/dist/assets/{index-CpJrDr08.js → index-M4EnMXNy.js} +1 -1
- package/dist/assets/{index-Csyk_bTb.js → index-X-1_xsGt.js} +1 -1
- package/dist/assets/{index-BSF9pggp.js → index-X_X2TThs.js} +1 -1
- package/dist/assets/{index-CaH1yCXH.js → index-cOKgHCal.js} +1 -1
- package/dist/assets/{index-DFL62AH2.js → index-gfg_ojKJ.js} +1 -1
- package/dist/assets/{index-yOpa7yWZ.js → index-hI7LZIWp.js} +1 -1
- package/dist/assets/{index-CScuYBl_.js → index-ldjZ5TYG.js} +1 -1
- package/dist/assets/{index-C7btO6o5.js → index-leMa1X7j.js} +2 -2
- package/dist/assets/{index-BBXiA0OI.js → index-yMgoe7cg.js} +1 -1
- package/dist/assets/{index-cSbLmZGM.js → index-zBbrdRKQ.js} +1 -1
- package/dist/assets/{index.browser.esm-Bx119QPK.js → index.browser.esm-DVE6wWGw.js} +1 -1
- package/dist/assets/{index.es-CZEHRs3C.js → index.es-BaOhWH-V.js} +1 -1
- package/dist/assets/{info-z3H0ZFd1.js → info-QCDoF9IJ.js} +1 -1
- package/dist/assets/{info-circle-8gB-T6he.js → info-circle-BBN5AtJ2.js} +1 -1
- package/dist/assets/{isEqual-AI-J6Uj_.js → isEqual-uMzYjeDA.js} +1 -1
- package/dist/assets/{isPlainObject-Cx7-e5go.js → isPlainObject-CQUsyoDX.js} +1 -1
- package/dist/assets/{lightbulb-DfdRhN5T.js → lightbulb-DhfMOA3X.js} +1 -1
- package/dist/assets/{mail-D6m2cDLg.js → mail-7Gwl_ErA.js} +1 -1
- package/dist/assets/{midjourney-BQZEAsiI.js → midjourney-Cft6OjPB.js} +1 -1
- package/dist/assets/{mobile-Cfy5GbF0.js → mobile-DgVxx_R_.js} +1 -1
- package/dist/assets/{more-DWdPxEa0.js → more-BLolMtA2.js} +1 -1
- package/dist/assets/{network-placeholder-DNRnm1h5.js → network-placeholder-oG4Us0QU.js} +1 -1
- package/dist/assets/{nftPlaceholder-D_M7_F8i.js → nftPlaceholder-BQ5emzN4.js} +1 -1
- package/dist/assets/{off-BiGtGoGb.js → off-BPIRIjOI.js} +1 -1
- package/dist/assets/{order-D8zYreOS.js → order-C6MRl1po.js} +1 -1
- package/dist/assets/{pagination-DmoF7bc7.js → pagination-D69V5D3k.js} +1 -1
- package/dist/assets/{play-store-ChlY7Dsp.js → play-store-DGKxYiH0.js} +1 -1
- package/dist/assets/{plus-CIc8rf9s.js → plus-CQMOyp9s.js} +1 -1
- package/dist/assets/{price-W6DU8Z8R.js → price-DV27GZnr.js} +1 -1
- package/dist/assets/{producer-FCqn-vtO.js → producer-LF1GZ9Lo.js} +1 -1
- package/dist/assets/{qr-code-j9DezkmC.js → qr-code-DiDYDYyb.js} +1 -1
- package/dist/assets/{recycle-horizontal-CeVt9WBT.js → recycle-horizontal-350d7OV4.js} +1 -1
- package/dist/assets/{refresh-CBxdH4ks.js → refresh-Dr7uM2Zh.js} +1 -1
- package/dist/assets/{reown-logo-Dqiu5hVC.js → reown-logo-B_hilFfo.js} +1 -1
- package/dist/assets/{search-fGFsotwq.js → search-CSp2BqBD.js} +1 -1
- package/dist/assets/{secp256k1-BhqWHECa.js → secp256k1-CFbI0H2v.js} +1 -1
- package/dist/assets/{secp256k1-6UFXMUYb.js → secp256k1-DV_eQ-_m.js} +1 -1
- package/dist/assets/{seedream-DeJbOVo3.js → seedream-QaEOiyEi.js} +1 -1
- package/dist/assets/{send-SGo9nI_T.js → send-CBwi06V0.js} +1 -1
- package/dist/assets/{service-Djq3ZuRz.js → service-CbfCn1-f.js} +1 -1
- package/dist/assets/{solana-wallets-CRsTifrx.js → solana-wallets-IfFbx2TH.js} +2 -2
- package/dist/assets/{solana-wallets-vue-BQce963A.js → solana-wallets-vue-D-xRGUtg.js} +1 -1
- package/dist/assets/{suno-vFB-_8Zn.js → suno-CnwAtQeI.js} +1 -1
- package/dist/assets/{swapHorizontal-BHt1tsXO.js → swapHorizontal-Be33d-pv.js} +1 -1
- package/dist/assets/{swapHorizontalBold-BNww1YtB.js → swapHorizontalBold-4Z99yQEh.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-CL7M6GQE.js → swapHorizontalMedium-5uGUFgtV.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-DjtZnfq5.js → swapHorizontalRoundedBold-D_y3Xu7Q.js} +1 -1
- package/dist/assets/{swapVertical-DCE7j_Vh.js → swapVertical-DgyDhS6o.js} +1 -1
- package/dist/assets/{telegram-B28x1ZBd.js → telegram-68zct5HC.js} +1 -1
- package/dist/assets/{three-dots-DSOdxmH1.js → three-dots-BvY3GgIL.js} +1 -1
- package/dist/assets/{twitch-DpEujs4k.js → twitch-BOIbdq7O.js} +1 -1
- package/dist/assets/{twitterIcon-BjxKI0k0.js → twitterIcon-DCW3mTwE.js} +1 -1
- package/dist/assets/{typescript-BJ4f2036.js → typescript-D1b6FMjT.js} +1 -1
- package/dist/assets/uploadTrackerMixin--N-yU8Tl.js +1 -0
- package/dist/assets/{use-form-item-qQREZZAi.js → use-form-item-BeeWnEBl.js} +1 -1
- package/dist/assets/validator-Drnv2L_O.js +1 -0
- package/dist/assets/{verify-DX5Spusl.js → verify-COJ52jm7.js} +1 -1
- package/dist/assets/{verify-filled-mOlhQE0R.js → verify-filled-BAFaofJc.js} +1 -1
- package/dist/assets/{w3m-modal-CudmxoL_.js → w3m-modal-D_hxalrk.js} +1 -1
- package/dist/assets/{wallet-Cl2_8wpV.js → wallet-_6_X7A1Z.js} +1 -1
- package/dist/assets/{wallet-placeholder-Briji_us.js → wallet-placeholder-CGn04GBh.js} +1 -1
- package/dist/assets/{walletconnect-D96B9dQW.js → walletconnect-BxBAgIqY.js} +1 -1
- package/dist/assets/{warning-circle-DBL0Zh9a.js → warning-circle-ZzPF2j6w.js} +1 -1
- package/dist/assets/{web-D9BskB8T.js → web-Dd11E95S.js} +1 -1
- package/dist/assets/{web-B8-Cm48A.js → web-ZVY_Bstv.js} +1 -1
- package/dist/assets/{x-CZ20j0Wo.js → x-RkNmOT9S.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/FilePreview-Crc7OAUL.js +0 -1
- package/dist/assets/ImagePreview-CU6sKHvi.js +0 -1
- package/dist/assets/Index-4x2Ba9gU.js +0 -1
- package/dist/assets/Index-B1XW5ZVD.js +0 -1
- package/dist/assets/Index-BR2PwKab.js +0 -1
- package/dist/assets/Index-BTjDb4em.js +0 -1
- package/dist/assets/Index-BbJxyGKd.js +0 -1
- package/dist/assets/Index-BfrdGtzi.js +0 -1
- package/dist/assets/Index-BkYV3y0a.js +0 -1
- package/dist/assets/Index-BthgZ3ud.js +0 -1
- package/dist/assets/Index-CBrjXPZd.js +0 -1
- package/dist/assets/Index-CFYktVnO.js +0 -1
- package/dist/assets/Index-CJGYNxtS.js +0 -1
- package/dist/assets/Index-CXMlBrn9.js +0 -1
- package/dist/assets/Index-Cz6Qx-7z.js +0 -1
- package/dist/assets/Index-Dbf4rn6Q.js +0 -1
- package/dist/assets/Index-DiFsxWMh.js +0 -1
- package/dist/assets/Index-DqotyuBt.js +0 -1
- package/dist/assets/Index-Zb11M87I.js +0 -1
- package/dist/assets/Model-3xa3CU7_.js +0 -1
- package/dist/assets/Tts-B92yesMa.js +0 -1
- package/dist/assets/validator-CdivHOpU.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as q}from"./index.es-CZEHRs3C.js";import{E as P}from"./index-yOpa7yWZ.js";import{E as oe}from"./index-Chojkt3K.js";import{d as k,H as d,E as i,z as G,C as s,y as $,D as a,q as n,x as b,F as r,I as g,O as S,N as A,J as v,M as ae,Q as D}from"./vendor-vue-NSDaktjZ.js";import{H as y,dq as B,dr as R,ds as j,dt as L,du as F,dv as K,dw as O,dx as J,dy as Q,dz as Y,bp as ne,dA as re,dB as Z,dC as ie,dD as le,dE as de,dF as H,dG as ce,dH as me,dI as ee,cs as ue,S as X,ct as pe}from"./index-Dp8CKzl-.js";import{P as fe,N as _e}from"./NoTasks-BTTicoTH.js";import{p as ge}from"./pasteUploadMixin-BurWbGNQ.js";import{I,S as he,l as $e}from"./pagination-DmoF7bc7.js";import{I as te}from"./ImagePreview-CU6sKHvi.js";import{E as ve}from"./index-qzLruMik.js";import{E as z}from"./index-S77IYy1Q.js";import{C as be}from"./Consumption-Cf7JzgYx.js";import{a as Ee}from"./price-W6DU8Z8R.js";import{E as x,a as N,b as ke}from"./index-BqJ6aJTS.js";import{E as ye}from"./index-CIWRtJwc.js";import{E as W}from"./index-hoRqwqcA.js";import{E as Se}from"./index-CIJN7037.js";import{b as we}from"./errorCode-Cqj9Td_Z.js";import{s as Ae}from"./seedream-DeJbOVo3.js";import{C as Ie}from"./CopyToClipboard-CoPaGg3O.js";import{I as Ve}from"./ImageWrapper-K_mMEl0Y.js";import{A as ze}from"./ApiCodeButton-B-dufckN.js";import{E as Te}from"./index-aw39jWwO.js";import{E as Me}from"./index-DFXYlT2H.js";import{E as Re}from"./index-CPMq4xCC.js";import{B as Le}from"./BotPlaceholder-DSJFXoiB.js";import"./use-form-item-qQREZZAi.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./index-CM8xtpW0.js";import"./typescript-BJ4f2036.js";import"./index-DpTMXSsR.js";import"./index-C4SSkadI.js";import"./highlight-nd-FM0pM.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./index-SklJSpHS.js";import"./_baseClone-BYVVMiV_.js";import"./_Uint8Array-n_GUsB5q.js";import"./_initCloneObject-DoWEnuFI.js";import"./isEqual-AI-J6Uj_.js";import"./index-DFL62AH2.js";import"./strings-beZM2Y-f.js";import"./castArray-CdP6H4P_.js";import"./debounce-CgIDI9MZ.js";import"./_baseIteratee-Dc4q5CLk.js";import"./index-CDZfZR_d.js";import"./validator-CdivHOpU.js";import"./index-Cu41y2Fl.js";import"./index-CfDpnu4d.js";const De=k({name:"LayoutSeedream",components:{ElDrawer:oe,ElButton:P,FontAwesomeIcon:q},data(){return{drawer:!1}}}),Ce={class:"main flex flex-row flex-1"},qe={class:"config w-[320px] h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},Pe={class:"result h-full p-6 flex-1 flex flex-col bg-[var(--app-content-bg)]"};function Ue(e,t,c,o,m,p){const u=a("font-awesome-icon"),f=a("el-button"),l=a("el-drawer");return n(),d("div",Ce,[i("div",qe,[G(e.$slots,"config",{},void 0,!0)]),i("div",Pe,[G(e.$slots,"result",{},void 0,!0)]),s(f,{circle:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:$(()=>[s(u,{icon:"fa-solid fa-magic"})]),_:1}),s(l,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=_=>e.drawer=_),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:$(()=>[G(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const Ge=y(De,[["render",Ue],["__scopeId","data-v-f2a6eb9e"]]),Fe="",Oe=k({name:"SeedreamPromptInput",components:{PromptTextarea:fe},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||(this.prompt=Fe)}});function Be(e,t,c,o,m,p){const u=a("prompt-textarea");return n(),b(u,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),title:e.$t("seedream.name.prompt"),info:e.$t("seedream.description.prompt"),placeholder:e.$t("seedream.placeholder.prompt")},null,8,["modelValue","title","info","placeholder"])}const je=y(Oe,[["render",Be]]),xe={image:!0,imageRequired:!1,sizeTiers:[B,R,j,L],sizeAdaptive:!0,sizePixel:!0,sizePixelDefault:void 0,groupGeneration:!1,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};function w(e){switch(e){case Y:return{image:!0,imageRequired:!1,sizeTiers:[R,j,L],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!0,tools:!0};case Q:return{image:!0,imageRequired:!1,sizeTiers:[R,L],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};case J:return{image:!0,imageRequired:!1,sizeTiers:[B,R,L],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};case O:return{image:!1,imageRequired:!1,sizeTiers:[],sizeAdaptive:!1,sizePixel:!0,sizePixelDefault:"1024x1024",groupGeneration:!1,seed:!0,guidanceScale:!0,guidanceScaleDefault:K[O],outputFormat:!1,tools:!1};case F:return{image:!0,imageRequired:!0,sizeTiers:[],sizeAdaptive:!1,sizePixel:!0,sizePixelDefault:"1024x1024",groupGeneration:!1,seed:!1,guidanceScale:!0,guidanceScaleDefault:K[F],outputFormat:!1,tools:!1};default:return xe}}const Ne=[B,R,j,L];function We(e,t){if(!e)return[];const c=t.model??e.model;if(!c)return[];const o=w(c),m=[];Array.isArray(e.image)&&e.image.length>0&&!o.image&&m.push({field:"image",i18nLabel:"seedream.name.imageUrls"});const p=typeof e.size=="string"?e.size:void 0;if(p){const u=p.toUpperCase();Ne.includes(u)&&!o.sizeTiers.includes(u)?m.push({field:"size",i18nLabel:"seedream.name.size"}):p==="adaptive"&&!o.sizeAdaptive&&m.push({field:"size",i18nLabel:"seedream.name.size"})}return e.sequential_image_generation==="auto"&&!o.groupGeneration&&m.push({field:"sequential_image_generation",i18nLabel:"seedream.name.maxImages"}),e.seed!==void 0&&e.seed!==null&&!o.seed&&m.push({field:"seed",i18nLabel:"seedream.name.seed"}),e.guidance_scale!==void 0&&e.guidance_scale!==null&&!o.guidanceScale&&m.push({field:"guidance_scale",i18nLabel:"seedream.name.guidanceScale"}),e.output_format&&!o.outputFormat&&m.push({field:"output_format",i18nLabel:"seedream.name.outputFormat"}),Array.isArray(e.tools)&&e.tools.length>0&&!o.tools&&m.push({field:"tools",i18nLabel:"seedream.name.tools"}),m}function Ke(e,t,c){const o={...e},m=c.model??e.model,p=w(m);for(const u of t)switch(u.field){case"image":delete o.image;break;case"size":p.sizePixelDefault?o.size=p.sizePixelDefault:delete o.size;break;case"sequential_image_generation":o.sequential_image_generation="disabled",delete o.sequential_image_generation_options;break;case"seed":delete o.seed;break;case"guidance_scale":delete o.guidance_scale;break;case"output_format":delete o.output_format;break;case"tools":delete o.tools;break}return o}const Ze=k({name:"SeedreamImageInput",components:{ElUpload:ve,ElButton:P,InfoIcon:I,ImagePreview:te,FontAwesomeIcon:q},mixins:[ge],data(){return{fileList:[],uploadUrl:ne()+"/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 w(this.model).image}},watch:{value:{immediate:!0,handler(e){if(this.suppressWatch)return;if(!e||e.length===0){const o=(this.fileList||[]).filter(m=>!m?.response?.file_url);this.fileList=o.length?o:[];return}const t=[];e.forEach(o=>{const m=this.fileList.find(p=>p?.response?.file_url===o||p?.url===o);m?t.push(m):t.push({name:o.split("/").pop()||o,url:o,status:"success",percentage:100,response:{file_url:o}})}),(this.fileList||[]).filter(o=>!o?.response?.file_url).forEach(o=>{t.some(p=>p===o||p?.url===o?.url||p?.response?.file_url===o?.response?.file_url)||t.push(o)}),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(){z.warning(this.$t("seedream.message.uploadImageExceed"))},onError(){z.error(this.$t("seedream.message.uploadImageError"))},onSetImages(){const 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()}}}),He={key:0},Xe={class:"field"},Je={class:"label"},Qe={class:"box"},Ye={class:"title font-bold"},et={class:"value"},tt={class:"file-list mt-2 flex flex-wrap gap-[10px]"};function st(e,t,c,o,m,p){const u=a("info-icon"),f=a("font-awesome-icon"),l=a("el-button"),_=a("el-upload"),h=a("image-preview");return e.supported?(n(),d("div",He,[i("div",Xe,[i("div",Je,[i("div",Qe,[i("h2",Ye,r(e.$t("seedream.name.imageUrls")),1),s(u,{content:e.$t("seedream.description.imageUrls"),class:"info"},null,8,["content"])])]),i("div",et,[s(_,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=E=>e.fileList=E),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",limit:14,multiple:!0,"show-file-list":!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,"on-change":e.onChange,"on-remove":e.onRemove,headers:e.headers},{default:$(()=>[s(l,{size:"small",type:"primary",round:""},{default:$(()=>[s(f,{icon:"fa-solid fa-upload",class:"mr-1"}),g(" "+r(e.$t("seedream.button.uploadImageUrls")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","on-change","on-remove","headers"])])]),i("div",tt,[(n(!0),d(S,null,A(e.fileList,(E,T)=>(n(),b(h,{key:E.uid||E?.response?.file_url||E.url||T,url:E.url||E?.response?.file_url,name:E.name,percentage:E.percentage,onRemove:C=>e.onRemovePreview(T,E)},null,8,["url","name","percentage","onRemove"]))),128))])])):v("",!0)}const ot=y(Ze,[["render",st],["__scopeId","data-v-2aa4829c"]]),at=k({name:"SeedreamModelSelector",components:{ElSelect:N,ElOption:x,InfoIcon:I},data(){return{revertKey:0,options:[{value:Y,label:this.$t("seedream.model.seedream50")},{value:Q,label:this.$t("seedream.model.seedream45")},{value:J,label:this.$t("seedream.model.seedream40")},{value:O,label:this.$t("seedream.model.seedream30t2i")},{value:F,label:this.$t("seedream.model.seededit30i2i")}]}},computed:{value(){return this.$store.state.seedream?.config?.model}},mounted(){this.value||this.applyModel(re)},methods:{async onChange(e){const t=this.$store.state.seedream?.config||{},c=We(t,{model:e});if(c.length===0){this.applyModel(e);return}const o=c.map(m=>this.$t(m.i18nLabel)).join("、");try{await ye.confirm(this.$t("seedream.message.featureNotSupportedBody",{fields:o}),this.$t("seedream.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("seedream.button.confirmContinue"),cancelButtonText:this.$t("seedream.button.cancelSwitch"),type:"warning"});const m=Ke({...t,model:e},c,{model:e});this.$store.commit("seedream/setConfig",m),z.success(this.$t("seedream.message.featureRemovedNotice",{fields:o}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit("seedream/setConfig",{...this.$store.state.seedream?.config,model:e})}}}),nt={class:"field"},rt={class:"label"},it={class:"box"},lt={class:"title font-bold"};function dt(e,t,c,o,m,p){const u=a("info-icon"),f=a("el-option"),l=a("el-select");return n(),d("div",nt,[i("div",rt,[i("div",it,[i("h2",lt,r(e.$t("seedream.name.model")),1),s(u,{content:e.$t("seedream.description.model"),class:"info"},null,8,["content"])])]),(n(),b(l,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("seedream.placeholder.select"),onChange:e.onChange},{default:$(()=>[(n(!0),d(S,null,A(e.options,_=>(n(),b(f,{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const ct=y(at,[["render",dt],["__scopeId","data-v-8892a12c"]]),mt=k({name:"SeedreamSizeSelector",components:{ElSelect:N,ElOption:x,ElOptionGroup:ke,InfoIcon:I},data(){return{SEEDREAM_SIZE_ADAPTIVE:le,pixelOptions:ie}},computed:{model(){return this.$store.state.seedream?.config?.model},capabilities(){return w(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;const e=this.capabilities;e.sizeTiers.length?this.value=e.sizeTiers.includes(Z)?Z:e.sizeTiers[0]:e.sizePixelDefault&&(this.value=e.sizePixelDefault)}}}}),ut={class:"field"},pt={class:"label"},ft={class:"box"},_t={class:"title font-bold"};function gt(e,t,c,o,m,p){const u=a("info-icon"),f=a("el-option"),l=a("el-option-group"),_=a("el-select");return n(),d("div",ut,[i("div",pt,[i("div",ft,[i("h2",_t,r(e.$t("seedream.name.size")),1),s(u,{content:e.$t("seedream.description.size"),class:"info"},null,8,["content"])])]),s(_,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=h=>e.value=h),class:"value",placeholder:e.$t("seedream.placeholder.size"),filterable:"","allow-create":"","default-first-option":""},{default:$(()=>[e.capabilities.sizeTiers.length?(n(),b(l,{key:0,label:e.$t("seedream.size.group.tier")},{default:$(()=>[(n(!0),d(S,null,A(e.capabilities.sizeTiers,h=>(n(),b(f,{key:h,label:h,value:h},null,8,["label","value"]))),128))]),_:1},8,["label"])):v("",!0),e.capabilities.sizeAdaptive?(n(),b(l,{key:1,label:e.$t("seedream.size.group.adaptive")},{default:$(()=>[(n(),b(f,{key:e.SEEDREAM_SIZE_ADAPTIVE,label:e.$t("seedream.size.adaptive"),value:e.SEEDREAM_SIZE_ADAPTIVE},null,8,["label","value"]))]),_:1},8,["label"])):v("",!0),s(l,{label:e.$t("seedream.size.group.pixel")},{default:$(()=>[(n(!0),d(S,null,A(e.pixelOptions,h=>(n(),b(f,{key:h.value,label:`${h.value} (${h.ratio})`,value:h.value},null,8,["label","value"]))),128))]),_:1},8,["label"])]),_:1},8,["modelValue","placeholder"])])}const ht=y(mt,[["render",gt],["__scopeId","data-v-dd7bd021"]]),$t=k({name:"SeedreamMaxImagesSelector",components:{ElInputNumber:W,InfoIcon:I},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return w(this.config?.model).groupGeneration},referenceImageCount(){const e=this.config?.image;return Array.isArray(e)?e.length:0},effectiveMax(){const e=H-this.referenceImageCount;return Math.max(1,Math.min(H,e))},value:{get(){const e=this.config?.sequential_image_generation_options?.max_images;return typeof e=="number"&&e>=1?e:de},set(e){const t={...this.config||{}},c=Math.max(1,Math.min(this.effectiveMax,Math.floor(e||1)));c>1?(t.sequential_image_generation="auto",t.sequential_image_generation_options={...t.sequential_image_generation_options||{},max_images:c}):(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)}}}),vt={key:0,class:"field"},bt={class:"label"},Et={class:"box"},kt={class:"title font-bold"},yt={class:"value"};function St(e,t,c,o,m,p){const u=a("info-icon"),f=a("el-input-number");return e.supported?(n(),d("div",vt,[i("div",bt,[i("div",Et,[i("h2",kt,r(e.$t("seedream.name.maxImages")),1),s(u,{content:e.$t("seedream.description.maxImages"),class:"info"},null,8,["content"])])]),i("div",yt,[s(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l),min:1,max:e.effectiveMax,step:1,size:"default","controls-position":"right",class:"counter"},null,8,["modelValue","max"])])])):v("",!0)}const wt=y($t,[["render",St],["__scopeId","data-v-f079fd20"]]),At=k({name:"SeedreamOutputFormatSelector",components:{ElSelect:N,ElOption:x,InfoIcon:I},data(){return{options:[...ce]}},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return w(this.config?.model).outputFormat},value:{get(){return this.config?.output_format},set(e){const t={...this.config||{}};t.output_format=e,this.$store.commit("seedream/setConfig",t)}}}}),It={key:0,class:"field"},Vt={class:"label"},zt={class:"box"},Tt={class:"title font-bold"};function Mt(e,t,c,o,m,p){const u=a("info-icon"),f=a("el-option"),l=a("el-select");return e.supported?(n(),d("div",It,[i("div",Vt,[i("div",zt,[i("h2",Tt,r(e.$t("seedream.name.outputFormat")),1),s(u,{content:e.$t("seedream.description.outputFormat"),class:"info"},null,8,["content"])])]),s(l,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=_=>e.value=_),class:"value",placeholder:e.$t("seedream.placeholder.select")},{default:$(()=>[(n(!0),d(S,null,A(e.options,_=>(n(),b(f,{key:_,label:_.toUpperCase(),value:_},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])):v("",!0)}const Rt=y(At,[["render",Mt],["__scopeId","data-v-69ea4c07"]]),Lt=k({name:"SeedreamSeedInput",components:{ElInputNumber:W,InfoIcon:I},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return w(this.config?.model).seed},value:{get(){const e=this.config?.seed;return typeof e=="number"?e:-1},set(e){const t={...this.config||{}},c=typeof e=="number"&&Number.isInteger(e)?e:-1;t.seed=c,this.$store.commit("seedream/setConfig",t)}}}}),Dt={key:0,class:"field"},Ct={class:"label"},qt={class:"box"},Pt={class:"title font-bold"},Ut={class:"value"};function Gt(e,t,c,o,m,p){const u=a("info-icon"),f=a("el-input-number");return e.supported?(n(),d("div",Dt,[i("div",Ct,[i("div",qt,[i("h2",Pt,r(e.$t("seedream.name.seed")),1),s(u,{content:e.$t("seedream.description.seed"),class:"info"},null,8,["content"])])]),i("div",Ut,[s(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l),min:-1,max:2147483647,step:1,size:"default","controls-position":"right",class:"counter"},null,8,["modelValue"])])])):v("",!0)}const Ft=y(Lt,[["render",Gt],["__scopeId","data-v-10cdc1e0"]]),Ot=k({name:"SeedreamGuidanceScaleInput",components:{ElInputNumber:W,InfoIcon:I},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return w(this.config?.model).guidanceScale},defaultValue(){return w(this.config?.model).guidanceScaleDefault??2.5},value:{get(){const e=this.config?.guidance_scale;return typeof e=="number"?e:this.defaultValue},set(e){const t={...this.config||{}},c=typeof e=="number"&&e>=1&&e<=10?e:this.defaultValue;t.guidance_scale=c,this.$store.commit("seedream/setConfig",t)}}}}),Bt={key:0,class:"field"},jt={class:"label"},xt={class:"box"},Nt={class:"title font-bold"},Wt={class:"value"};function Kt(e,t,c,o,m,p){const u=a("info-icon"),f=a("el-input-number");return e.supported?(n(),d("div",Bt,[i("div",jt,[i("div",xt,[i("h2",Nt,r(e.$t("seedream.name.guidanceScale")),1),s(u,{content:e.$t("seedream.description.guidanceScale"),class:"info"},null,8,["content"])])]),i("div",Wt,[s(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l),min:1,max:10,step:.1,precision:1,size:"default","controls-position":"right",class:"counter"},null,8,["modelValue"])])])):v("",!0)}const Zt=y(Ot,[["render",Kt],["__scopeId","data-v-7386f064"]]),Ht=k({name:"SeedreamWatermarkSwitch",components:{ElSwitch:Se,InfoIcon:I},computed:{value:{get(){const e=this.$store.state.seedream?.config?.watermark;return e===void 0?me:!!e},set(e){this.$store.commit("seedream/setConfig",{...this.$store.state.seedream?.config,watermark:e})}}}}),Xt={class:"field"},Jt={class:"label"},Qt={class:"box"},Yt={class:"title font-bold"},es={class:"value"};function ts(e,t,c,o,m,p){const u=a("info-icon"),f=a("el-switch");return n(),d("div",Xt,[i("div",Jt,[i("div",Qt,[i("h2",Yt,r(e.$t("seedream.name.watermark")),1),s(u,{content:e.$t("seedream.description.watermark"),class:"info"},null,8,["content"])])]),i("div",es,[s(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l)},null,8,["modelValue"])])])}const ss=y(Ht,[["render",ts],["__scopeId","data-v-9e2abf0f"]]),os=k({name:"SeedreamConfigPanel",components:{ElButton:P,FontAwesomeIcon:q,PromptInput:je,Consumption:be,ImageInput:ot,ModelSelector:ct,SizeSelector:ht,MaxImagesSelector:wt,OutputFormatSelector:Rt,SeedInput:Ft,GuidanceScaleInput:Zt,WatermarkSwitch:ss},emits:["generate"],computed:{config(){return this.$store.state.seedream?.config},consumption(){const e={...this.config||{}},t=Array.isArray(e?.image)&&e.image.length>0,c=e?.sequential_image_generation==="auto"?Math.max(1,Math.floor(e?.sequential_image_generation_options?.max_images||1)):1;return Ee({...e,action:t?"edit":"generate",model:ee(e?.model),count:c},this.service?.cost)},service(){return this.$store.state.seedream?.service}},methods:{onGenerate(){this.$emit("generate")}}}),as={class:"flex flex-col h-full"},ns={class:"flex-1 overflow-y-auto p-5"},rs={class:"flex flex-col items-center justify-center px-5 pb-5"};function is(e,t,c,o,m,p){const u=a("model-selector"),f=a("size-selector"),l=a("max-images-selector"),_=a("output-format-selector"),h=a("seed-input"),E=a("guidance-scale-input"),T=a("watermark-switch"),C=a("prompt-input"),U=a("image-input"),V=a("consumption"),M=a("font-awesome-icon"),se=a("el-button");return n(),d("div",as,[i("div",ns,[s(u,{class:"mb-4"}),s(f,{class:"mb-4"}),s(l,{class:"mb-4"}),s(_,{class:"mb-4"}),s(h,{class:"mb-4"}),s(E,{class:"mb-4"}),s(T,{class:"mb-4"}),s(C,{class:"mb-4"}),s(U,{class:"mb-4"})]),i("div",rs,[s(V,{value:e.consumption,service:e.service},null,8,["value","service"]),s(se,{type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:$(()=>[s(M,{icon:"fa-solid fa-magic",class:"mr-2"}),g(" "+r(e.$t("seedream.button.generate")),1)]),_:1},8,["onClick"])])])}const ls=y(os,[["render",is]]),ds=k({name:"SeedreamTaskPreview",components:{ElImage:Re,CopyToClipboard:Ie,FontAwesomeIcon:q,ElAlert:Me,ImageWrapper:Ve,ElButton:P,ElTooltip:Te,ImagePreview:te,ApiCodeButton:ze},props:{modelValue:{type:Object,required:!0}},computed:{isEdit(){return Array.isArray(this.modelValue?.request?.image)&&(this.modelValue?.request?.image?.length||0)>0},images(){const e=[];return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(t=>{e.push(t)}),e}},methods:{shortModel(e){return ee(e)||e},onEdit(e){if(!e)return;console.debug("Edit image:",e);const t={...this.$store.state.seedream?.config||{}};t.image=[e],this.$store.commit("seedream/setConfig",t)}}}),cs={class:"preview"},ms={class:"left"},us={class:"main"},ps={class:"bot"},fs={class:"datetime"},_s={class:"info"},gs={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},hs={key:1,class:"prompt mt-2"},$s={key:0},vs={key:0,class:D({content:!0})},bs={class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Es={key:1,class:D({content:!0,failed:!0})},ks={class:"flex justify-start items-center gap-4 w-full overflow-x-auto"},ys={class:D({operations:!0,"mt-2":!0,"mb-2":!0})},Ss={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},As={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Is={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Vs={key:2,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},zs={key:3,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Ts={key:2,class:D({content:!0})},Ms={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Rs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Ls={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Ds={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:2,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},qs={key:3,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Ps={key:4,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Us={key:3,class:D({content:!0})},Gs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Fs={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Os(e,t,c,o,m,p){const u=a("el-image"),f=a("image-preview"),l=a("font-awesome-icon"),_=a("copy-to-clipboard"),h=a("el-alert"),E=a("image-wrapper"),T=a("el-button"),C=a("el-tooltip"),U=a("api-code-button");return n(),d("div",cs,[i("div",ms,[s(u,{src:"https://cdn.acedata.cloud/9egrbn.png",class:"avatar"})]),i("div",us,[i("div",ps,[g(r(e.$t("seedream.name.seedreamBot"))+" ",1),i("span",fs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",_s,[Array.isArray(e.modelValue?.request?.image)&&e.modelValue?.request?.image.length>0?(n(),d("div",gs,[(n(!0),d(S,null,A(e.modelValue?.request?.image,(V,M)=>(n(),b(f,{key:M,url:V,name:`image-${M+1}`,closable:!1},null,8,["url","name"]))),128))])):v("",!0),e.modelValue?.request?.prompt?(n(),d("p",hs,[g(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?v("",!0):(n(),d("span",$s," - ("+r(e.$t("seedream.status.pending"))+") ",1))])):v("",!0)]),e.modelValue?.response?e.modelValue?.response?.success===!0?(n(),d("div",Es,[i("div",ks,[(n(!0),d(S,null,A(e.images,(V,M)=>(n(),b(E,{key:M,src:V?.image_url,"raw-src":V?.image_url},null,8,["src","raw-src"]))),128))]),i("div",ys,[s(C,{class:"box-item",effect:"dark",content:e.$t("common.button.edit"),placement:"top-start"},{default:$(()=>[s(T,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=ae(V=>e.onEdit(e.images?.[0]?.image_url),["stop"]))},{default:$(()=>[g(r(e.$t("common.button.edit")),1)]),_:1})]),_:1},8,["content"]),s(U,{path:"/seedream/images",body:e.modelValue?.request},null,8,["body"])]),s(h,{closable:!1,class:"mt-2 success"},{default:$(()=>[e.modelValue?.request?.model?(n(),d("p",Ss,[s(l,{icon:"fa-solid fa-cube",class:"mr-1"}),g(" "+r(e.$t("seedream.name.model"))+": "+r(e.shortModel(e.modelValue?.request?.model)),1)])):v("",!0),e.modelValue?.request?.size?(n(),d("p",ws,[s(l,{icon:"fa-solid fa-image",class:"mr-1"}),g(" "+r(e.$t("seedream.name.size"))+": "+r(e.modelValue?.request?.size),1)])):v("",!0),i("p",As,[s(l,{icon:"fa-solid fa-bolt",class:"mr-1"}),g(" "+r(e.$t("seedream.name.task"))+": "+r(e.isEdit?e.$t("seedream.name.edits"):e.$t("seedream.name.generate")),1)]),i("p",Is,[s(l,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+r(e.$t("seedream.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),s(_,{content:e.modelValue?.id,class:"btn-copy inline-block"},null,8,["content"])]),e.modelValue?.elapsed?(n(),d("p",Vs,[s(l,{icon:"fa-solid fa-clock",class:"mr-1"}),g(" "+r(e.$t("seedream.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):v("",!0),e.modelValue?.response?.trace_id?(n(),d("p",zs,[s(l,{icon:"fa-solid fa-hashtag",class:"mr-1"}),g(" "+r(e.$t("seedream.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),s(_,{content:e.modelValue?.response?.trace_id,class:"btn-copy inline-block"},null,8,["content"])])):v("",!0)]),_:1})])):e.modelValue?.response?.success===!1?(n(),d("div",Ts,[s(h,{closable:!1,class:"failure"},{template:$(()=>[s(l,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),g(" "+r(e.$t("seedream.name.failure")),1)]),default:$(()=>[e.modelValue?.request?.model?(n(),d("p",Ms,[s(l,{icon:"fa-solid fa-cube",class:"mr-1"}),g(" "+r(e.$t("seedream.name.model"))+": "+r(e.shortModel(e.modelValue?.request?.model)),1)])):v("",!0),e.modelValue?.request?.size?(n(),d("p",Rs,[s(l,{icon:"fa-solid fa-image",class:"mr-1"}),g(" "+r(e.$t("seedream.name.size"))+": "+r(e.modelValue?.request?.size),1)])):v("",!0),i("p",Ls,[s(l,{icon:"fa-solid fa-bolt",class:"mr-1"}),g(" "+r(e.$t("seedream.name.task"))+": "+r(e.isEdit?e.$t("seedream.name.edits"):e.$t("seedream.name.generate")),1)]),i("p",Ds,[s(l,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+r(e.$t("seedream.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),s(_,{content:e.modelValue?.id,class:"btn-copy"},null,8,["content"])]),e.modelValue?.response?.error?.message?(n(),d("p",Cs,[s(l,{icon:"fa-solid fa-circle-info",class:"mr-1"}),g(" "+r(e.$t("seedream.name.failureReason"))+": "+r(e.modelValue?.response?.error?.message)+" ",1),s(_,{content:e.modelValue?.response?.error?.message,class:"btn-copy"},null,8,["content"])])):v("",!0),e.modelValue?.elapsed?(n(),d("p",qs,[s(l,{icon:"fa-solid fa-clock",class:"mr-1"}),g(" "+r(e.$t("seedream.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):v("",!0),e.modelValue?.response?.trace_id?(n(),d("p",Ps,[s(l,{icon:"fa-solid fa-hashtag",class:"mr-1"}),g(" "+r(e.$t("seedream.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),s(_,{content:e.modelValue?.response?.trace_id,class:"btn-copy"},null,8,["content"])])):v("",!0)]),_:1})])):(n(),d("div",Us,[s(h,{closable:!1,class:"info"},{template:$(()=>[s(l,{icon:"fa-solid fa-circle-info",class:"mr-1"}),g(" "+r(e.$t("seedream.name.status")),1)]),default:$(()=>[i("p",Gs,[s(l,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+r(e.$t("seedream.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),s(_,{content:e.modelValue?.id,class:"btn-copy"},null,8,["content"])]),e.modelValue?.response?.trace_id?(n(),d("p",Fs,[s(l,{icon:"fa-solid fa-hashtag",class:"mr-1"}),g(" "+r(e.$t("seedream.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),s(_,{content:e.modelValue?.response?.trace_id,class:"btn-copy"},null,8,["content"])])):v("",!0)]),_:1})])):(n(),d("div",vs,[s(h,{closable:!1,class:"info"},{template:$(()=>[s(l,{icon:"fa-regular fa-clock",class:"mr-1"}),g(" "+r(e.$t("seedream.status.pending")),1)]),default:$(()=>[i("p",bs,[s(l,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+r(e.$t("seedream.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),s(_,{content:e.modelValue?.id,class:"btn-copy inline-block"},null,8,["content"])])]),_:1})]))])])}const Bs=y(ds,[["render",Os],["__scopeId","data-v-1b4654bc"]]),js=k({name:"SeedreamRecentPanel",components:{TaskPreview:Bs,BotPlaceholder:Le,NoTasks:_e,ScrollList:he},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?.()}}}),xs={key:0},Ns={key:2,class:"w-full h-full flex items-center justify-center"};function Ws(e,t,c,o,m,p){const u=a("bot-placeholder"),f=a("task-preview"),l=a("scroll-list"),_=a("no-tasks");return n(),d(S,null,[e.tasks?.items===void 0?(n(),d("div",xs,[s(u)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(n(),b(l,{key:1,ref:"scrollList",class:"tasks h-full w-full overflow-y-auto",loading:e.loading,onReachTop:t[0]||(t[0]=h=>e.$emit("reach-top"))},{default:$(()=>[(n(!0),d(S,null,A(e.tasks?.items,h=>(n(),b(f,{key:h.id,"model-value":h},null,8,["model-value"]))),128))]),_:1},8,["loading"])):v("",!0),e.tasks?.items?.length===0?(n(),d("div",Ns,[s(_)])):v("",!0)],64)}const Ks=y(js,[["render",Ws]]),Zs=pe("seedream"),Hs=k({name:"SeedreamIndex",components:{ConfigPanel:ls,Layout:Ge,RecentPanel:Ks},inject:["initialized"],data(){return{task:void 0,job:0,loading:!1}},computed:{applicationsLoading(){return this.$store.state.seedream?.status?.getApplications===X.Request},tasksLoading(){return this.$store.state.seedream?.status?.getTasks===X.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 $e({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();const 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);const{limit:t=20,createdAtMin:c,createdAtMax:o}=e||{};console.debug("limit",t,"createdAtMin",c,"createdAtMax",o),await this.$store.dispatch("seedream/getTasks",{limit:t,createdAtMin:c,createdAtMax:o})},async onGenerate(){const e={...this.config||{}};!(Array.isArray(e?.image)&&e.image.length>0)&&"image"in e&&delete e.image,e?.size||delete e.size;const c={...e,callback_url:Zs},o=this.credential?.token;if(!o){console.error("no token specified");return}z.info(this.$t("seedream.message.startingTask")),ue("seedream",Ae.generate(c,{token:o})).then(()=>{z.success(this.$t("seedream.message.startTaskSuccess"))}).catch(m=>{const p=m?.response?.data;p?.error?.code===we?z.error(this.$t("seedream.message.usedUp")):z.error(this.$t("seedream.message.startTaskFailed")+(p?.error?.message||""))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function Xs(e,t,c,o,m,p){const u=a("config-panel"),f=a("recent-panel"),l=a("layout");return n(),b(l,null,{config:$(()=>[s(u,{onGenerate:e.onGenerate},null,8,["onGenerate"])]),result:$(()=>[s(f,{ref:"recentPanel",loading:e.loading,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const Xo=y(Hs,[["render",Xs]]);export{Xo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as L}from"./index.es-CZEHRs3C.js";import{E as M}from"./index-yOpa7yWZ.js";import{E as ce}from"./index-Chojkt3K.js";import{d as b,H as m,E as i,z as N,C as n,y as f,D as o,q as l,F as r,x as C,O as V,N as T,Q as R,J as v,R as ve,I as w,M as be}from"./vendor-vue-NSDaktjZ.js";import{H as y,bp as K,ah as ye,I as we,cs as te,aI as oe,S as ne,ct as Ce}from"./index-Dp8CKzl-.js";import{a as Se,b as se,c as q,d as D,e as Ve,f as Ie,g as Te}from"./kling-DwJwIwVI.js";import{E as P,a as G}from"./index-BqJ6aJTS.js";import{E as H}from"./index-CIWRtJwc.js";import{E as S}from"./index-S77IYy1Q.js";import{I,S as Ee,l as Le}from"./pagination-DmoF7bc7.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as O}from"./ImagePreview-CU6sKHvi.js";import{E as J}from"./index-aw39jWwO.js";import{E as j}from"./index-qzLruMik.js";import{C as de}from"./Consumption-Cf7JzgYx.js";import{E as me}from"./index-hoRqwqcA.js";import{E as ue}from"./index-BXlxpk-b.js";import{E as pe}from"./index-CIJN7037.js";import{P as Me,N as Re}from"./NoTasks-BTTicoTH.js";import{E as ge}from"./index-CM8xtpW0.js";import{a as fe}from"./price-W6DU8Z8R.js";import{F as Ue}from"./FilePreview-Crc7OAUL.js";import{E as Ae,a as De}from"./index-DnTx8D91.js";import{E as Pe,a as Ge}from"./index-euD8ahpG.js";import{b as ie}from"./errorCode-Cqj9Td_Z.js";import{C as Ke}from"./CopyToClipboard-CoPaGg3O.js";import{V as Oe}from"./VideoPlayer-K7eXLAuz.js";import{A as je}from"./ApiCodeButton-B-dufckN.js";import{E as Be}from"./index-DFXYlT2H.js";import{E as Ne}from"./index-CPMq4xCC.js";import{B as ze}from"./BotPlaceholder-DSJFXoiB.js";import"./use-form-item-qQREZZAi.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./index-DFL62AH2.js";import"./typescript-BJ4f2036.js";import"./index-DpTMXSsR.js";import"./strings-beZM2Y-f.js";import"./isEqual-AI-J6Uj_.js";import"./_Uint8Array-n_GUsB5q.js";import"./castArray-CdP6H4P_.js";import"./debounce-CgIDI9MZ.js";import"./_baseIteratee-Dc4q5CLk.js";import"./index-CDZfZR_d.js";import"./validator-CdivHOpU.js";import"./highlight-nd-FM0pM.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./index-SklJSpHS.js";import"./_baseClone-BYVVMiV_.js";import"./_initCloneObject-DoWEnuFI.js";import"./index-Cu41y2Fl.js";import"./index-C4SSkadI.js";import"./isPlainObject-Cx7-e5go.js";import"./vue-plyr-BO2nlN4c.js";import"./index-CfDpnu4d.js";const Fe=b({name:"LayoutKling",components:{ElDrawer:ce,ElButton:M,FontAwesomeIcon:L},data(){return{drawer:!1}}}),qe={class:"main flex flex-row flex-1 min-h-0"},He={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},We={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function Je(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("el-drawer");return l(),m("div",qe,[i("div",He,[N(e.$slots,"config",{},void 0,!0)]),i("div",We,[N(e.$slots,"result",{},void 0,!0)]),n(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=c=>e.drawer=!0)},{default:f(()=>[n(d,{icon:"fa-solid fa-magic"})]),_:1}),n(g,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=c=>e.drawer=c),direction:"ltr","with-header":!1,size:"350px"},{default:f(()=>[N(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const Qe=y(Fe,[["render",Je],["__scopeId","data-v-be4bb0df"]]),Ye={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function Q(e,t,s){const a=t||"std",u=s??5;switch(e){case"kling-v1":return{text2video:!0,image2video:!0,endImage:u===5,audio:!1,motionControl:u===5};case"kling-v1-6":case"kling-v2-5-turbo":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:!1,motionControl:!1};case"kling-v2-6":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:a==="pro",motionControl:!1};case"kling-v2-master":case"kling-v2-1-master":return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};case"kling-v3":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:a!=="4k"};case"kling-v3-omni":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1};case"kling-video-o1":return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1};default:return Ye}}function Y(e,t){if(!e)return[];const s=t.model??e.model,a=t.mode??e.mode,u=t.duration??e.duration;if(!s)return[];const $=Q(s,a,u),d=[];return e.end_image_url&&!$.endImage&&d.push({field:"end_image_url",i18nLabel:"kling.name.endImage"}),e.generate_audio&&!$.audio&&d.push({field:"generate_audio",i18nLabel:"kling.name.generateAudio"}),e.camera_control?.type&&(!$.motionControl||e.start_image_url)&&d.push({field:"camera_control",i18nLabel:"kling.name.cameraControl"}),d}function X(e,t){const s={...e};for(const a of t)a.field==="end_image_url"&&(s.end_image_url=void 0),a.field==="generate_audio"&&(s.generate_audio=!1),a.field==="camera_control"&&(s.camera_control=void 0);return s}const Xe=b({name:"ModelSelector",components:{ElSelect:G,ElOption:P},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0,options:[{value:"kling-v3",label:"v3"},{value:"kling-v3-omni",label:"v3-Omni"},{value:"kling-v2-6",label:"v2.6"},{value:"kling-v2-5-turbo",label:"v2.5-Turbo"},{value:"kling-v2-1-master",label:"v2.1-Master"},{value:"kling-v2-master",label:"v2-Master"},{value:"kling-v1-6",label:"v1.6"},{value:"kling-v1",label:"v1"},{value:"kling-video-o1",label:"Video-o1"}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(Se)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{model:e});if(s.length===0){this.applyModel(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,model:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,model:e})}}}),Ze={class:"field"},xe={class:"title font-bold"};function et(e,t,s,a,u,$){const d=o("el-option"),p=o("el-select");return l(),m("div",Ze,[i("h2",xe,r(e.$t("pika.name.model")),1),(l(),C(p,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("pika.placeholder.select"),onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.options,g=>(l(),C(d,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const tt=y(Xe,[["render",et],["__scopeId","data-v-04059875"]]),ot=b({name:"ModeSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},cameraControlSet(){return!!this.$store.state.kling?.config?.camera_control?.type},fourKReason(){return q.includes(this.selectedModel)?this.cameraControlSet?this.$t("kling.description.mode4kIncompatibleCamera"):"":this.$t("kling.description.mode4kRequiresV3")},options(){return[{value:"std",label:this.$t("kling.name.modeStd"),disabled:!1,disabledReason:""},{value:"pro",label:this.$t("kling.name.modePro"),disabled:!1,disabledReason:""},{value:"4k",label:this.$t("kling.name.mode4k"),disabled:!!this.fourKReason,disabledReason:this.fourKReason}]},value(){return this.$store.state.kling?.config?.mode}},watch:{fourKReason(e){e&&this.value==="4k"&&this.applyMode(se)}},mounted(){this.value||this.applyMode(se)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{mode:e});if(s.length===0){this.applyMode(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,mode:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,mode:e})}}}),nt={class:"field"},st={class:"header"},it={class:"title font-bold"},lt={key:0,class:"opt-tip"};function at(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",nt,[i("div",st,[i("h2",it,r(e.$t("kling.name.mode")),1),n(d,{content:e.$t("kling.description.mode"),class:"info-icon"},null,8,["content"])]),(l(),C(g,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("kling.placeholder.select"),clearable:!0,onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.options,c=>(l(),C(p,{key:c.value,label:c.label,value:c.value,disabled:c.disabled},{default:f(()=>[i("span",{class:R({"opt-disabled":c.disabled})},r(c.label),3),c.disabled&&c.disabledReason?(l(),m("span",lt,r(c.disabledReason),1)):v("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const rt=y(ot,[["render",at],["__scopeId","data-v-9a8fa3c5"]]),ct=[3,5,8,10,12,15],dt=[5,10],mt=b({name:"DurationSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},isV3Model(){return q.includes(this.selectedModel)},allowedDurations(){return this.isV3Model?ct:dt},value(){return this.$store.state.kling?.config?.duration??D},selectValue(){const e=this.allowedDurations;return e.includes(this.value)?this.value:e.includes(D)?D:e[0]}},watch:{isV3Model(){this.allowedDurations.includes(this.value)||this.applyDuration(D)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(D)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{duration:e});if(s.length===0){this.applyDuration(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await H.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,duration:e},s);this.$store.commit("kling/setConfig",u),S.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,duration:e})}}}),ut={class:"field"},pt={class:"control"},gt={class:"label"},ft={class:"title font-bold"};function ht(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",ut,[i("div",pt,[i("div",gt,[i("h2",ft,r(e.$t("kling.name.duration")),1),n(d,{content:e.$t("kling.description.duration"),class:"info-icon ml-1"},null,8,["content"])]),(l(),C(g,{key:e.revertKey,"model-value":e.selectValue,class:"value",placeholder:e.$t("kling.placeholder.select"),onChange:e.onChange},{default:f(()=>[(l(!0),m(V,null,T(e.allowedDurations,c=>(l(),C(p,{key:c,label:`${c}s`,value:c},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])])}const _t=y(mt,[["render",ht],["__scopeId","data-v-5ae55e28"]]),$t=b({name:"RatioSelector",data(){return{options:[{value:"1:1",label:"1:1",width:20,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?.kling?.config?.aspect_ratio},set(e){console.debug("set ratio",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,aspect_ratio:e})}}},mounted(){this.value||(this.value=Ve)}}),kt={class:"text-sm font-bold mb-2 block"},vt={class:"items"},bt=["onClick"],yt={class:"name"};function wt(e,t,s,a,u,$){return l(),m("div",null,[i("span",kt,r(e.$t("kling.name.ratio")),1),i("div",vt,[(l(!0),m(V,null,T(e.options,(d,p)=>(l(),m("div",{key:p,class:R({active:e.active===p,item:!0}),onClick:g=>e.value=d.value},[i("div",{class:R(["preview",d.label])},[i("div",{class:"rect",style:ve({width:d.width+"px",height:d.height+"px"})},null,4)],2),i("p",yt,r(d.label),1)],10,bt))),128))])])}const Ct=y($t,[["render",wt],["__scopeId","data-v-cdb14b2f"]]),St=b({name:"StartImage",components:{ElUpload:j,ElButton:M,ElTooltip:J,InfoIcon:I,FontAwesomeIcon:L,ImagePreview:O},mixins:[W],emits:["change"],data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},value:{get(){return this.$store.state?.kling?.config?.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.error(this.$t("kling.message.uploadReferencesError"))},onSetStartImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Vt={class:"relative"},It={class:"flex justify-between"},Tt={class:"flex justify-start items-center"},Et={class:"text-sm font-bold"};function Lt(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-tooltip"),h=o("el-upload");return l(),m("div",Vt,[i("div",It,[i("div",Tt,[i("span",Et,r(e.$t("kling.name.startImage")),1),n(d,{content:e.$t("kling.description.uploadStartImage")},null,8,["content"])])]),n(h,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.reachedLimit,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:_})=>[_.url&&_.percentage!==void 0?(l(),C(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:E=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(k,{content:e.$t("kling.message.uploadReferencesExceed"),disabled:!e.reachedLimit,placement:"top"},{default:f(()=>[i("span",null,[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.reachedLimit},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","on-exceed","on-error","on-success","headers"])])}const Mt=y(St,[["render",Lt],["__scopeId","data-v-68cf38f5"]]),Rt=b({name:"EndImage",components:{ElUpload:j,ElButton:M,ElTooltip:J,ImagePreview:O,InfoIcon:I,FontAwesomeIcon:L},mixins:[W],data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},klingConfig(){return this.$store.state?.kling?.config||{}},endImageSupported(){return Q(this.klingConfig.model,this.klingConfig.mode,this.klingConfig.duration).endImage},hasStartImage(){return!!this.klingConfig.start_image_url},uploadDisabled(){return this.reachedLimit||!this.endImageSupported||!this.hasStartImage},uploadTooltip(){return this.endImageSupported?this.hasStartImage?this.reachedLimit?this.$t("kling.message.uploadReferencesExceed"):"":this.$t("kling.message.endImageRequiresStart"):this.$t("kling.message.endImageNotSupported")},storeValue(){return this.klingConfig.end_image_url},value:{get(){return this.storeValue},set(){}}},watch:{storeValue(e){!e&&this.fileList.length>0&&(this.fileList=[])},hasStartImage(e){!e&&this.storeValue&&(this.fileList=[],this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,end_image_url:void 0}))}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onBeforeUpload(){return this.endImageSupported?this.hasStartImage?!0:(S.warning(this.$t("kling.message.endImageRequiresStart")),!1):(S.warning(this.$t("kling.message.endImageNotSupported")),!1)},onExceed(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.error(this.$t("kling.message.uploadReferencesError"))},onSetEndImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Ut={class:"relative"},At={class:"flex justify-between"},Dt={class:"flex justify-start items-center"},Pt={class:"text-sm font-bold"};function Gt(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-tooltip"),h=o("el-upload");return l(),m("div",Ut,[i("div",At,[i("div",Dt,[i("span",Pt,r(e.$t("kling.name.endImage")),1),n(d,{content:e.$t("kling.description.uploadEndImage")},null,8,["content"])])]),n(h,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.uploadDisabled,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","before-upload":e.onBeforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:_})=>[_.url&&_.percentage!==void 0?(l(),C(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:E=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(k,{content:e.uploadTooltip,disabled:!e.uploadDisabled,placement:"top"},{default:f(()=>[i("span",null,[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.uploadDisabled},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","before-upload","on-exceed","on-error","on-success","headers"])])}const Kt=y(Rt,[["render",Gt],["__scopeId","data-v-593c3bde"]]),Ot=b({name:"CfgScaleSelector",components:{ElSlider:ue,InfoIcon:I,ElInputNumber:me},computed:{value:{get(){return this.$store.state?.kling?.config?.cfg_scale},set(e){console.debug("set cfg_scale",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,cfg_scale:e})}}},mounted(){this.value||(this.value=Ie)}}),jt={class:"flex justify-between"},Bt={class:"flex justify-start items-center"},Nt={class:"text-sm font-bold"},zt={class:"flex justify-end items-center"},Ft={class:"w-full"};function qt(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input-number"),g=o("el-slider");return l(),m("div",null,[i("div",jt,[i("div",Bt,[i("span",Nt,r(e.$t("kling.name.cfgScale")),1),n(d,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",zt,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),"controls-position":"right"},null,8,["modelValue"])])]),i("div",Ft,[n(g,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=c=>e.value=c),min:0,max:1,step:.1},null,8,["modelValue"])])])}const Ht=y(Ot,[["render",qt]]),Wt=b({name:"GenerateAudioSelector",components:{ElSwitch:pe,InfoIcon:I},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},selectedMode(){return this.$store.state.kling?.config?.mode||""},supported(){return!!(q.includes(this.selectedModel)||this.selectedModel==="kling-v2-6"&&this.selectedMode==="pro")},tooltipContent(){return this.supported?this.$t("kling.description.generateAudio"):this.$t("kling.description.generateAudioUnsupported")},value:{get(){return this.supported?this.$store.state.kling?.config?.generate_audio??Te:!1},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:e})}}},watch:{supported(e){!e&&this.$store.state.kling?.config?.generate_audio&&this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:!1})}}}),Jt={class:"relative"},Qt={class:"flex justify-between items-center"},Yt={class:"flex justify-start items-center"},Xt={class:"text-sm font-bold"};function Zt(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-switch");return l(),m("div",Jt,[i("div",Qt,[i("div",Yt,[i("span",Xt,r(e.$t("kling.name.generateAudio")),1),n(d,{content:e.tooltipContent},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=g=>e.value=g),class:"value",disabled:!e.supported},null,8,["modelValue","disabled"])])])}const xt=y(Wt,[["render",Zt]]),eo=["horizontal","vertical","pan","tilt","roll","zoom"],to=b({name:"CameraControlSelector",components:{ElSelect:G,ElOption:P,ElSlider:ue,ElInputNumber:me,InfoIcon:I},data(){return{configKeys:eo}},computed:{typeOptions(){return[{value:"",label:this.$t("kling.name.cameraTypeNone")},{value:"simple",label:this.$t("kling.name.cameraTypeSimple")},{value:"down_back",label:this.$t("kling.name.cameraTypeDownBack")},{value:"forward_up",label:this.$t("kling.name.cameraTypeForwardUp")},{value:"left_turn_forward",label:this.$t("kling.name.cameraTypeLeftTurnForward")},{value:"right_turn_forward",label:this.$t("kling.name.cameraTypeRightTurnForward")}]},selectedMode(){return this.$store.state.kling?.config?.mode||""},selectedModel(){return this.$store.state.kling?.config?.model||""},selectedDuration(){return this.$store.state.kling?.config?.duration},motionControlSupported(){return Q(this.selectedModel,this.selectedMode,this.selectedDuration).motionControl},hasStartImage(){return!!this.$store.state.kling?.config?.start_image_url},disabled(){return!this.motionControlSupported||this.hasStartImage},tooltipContent(){return this.motionControlSupported?this.hasStartImage?this.$t("kling.description.cameraControlDisabledImage2Video"):this.$t("kling.description.cameraControl"):this.$t("kling.description.cameraControlNotSupported")},selectedType(){return this.$store.state.kling?.config?.camera_control?.type},selectedTypeRaw:{get(){return this.selectedType??""},set(e){const t=this.$store.state.kling?.config||{};if(!e){const a={...t};delete a.camera_control,this.$store.commit("kling/setConfig",a);return}const s=e;this.$store.commit("kling/setConfig",{...t,camera_control:{type:s,config:s==="simple"?t.camera_control?.config||{}:void 0}})}},configValues(){return this.$store.state.kling?.config?.camera_control?.config||{}}},watch:{disabled(e){e&&this.selectedType!==void 0&&(this.selectedTypeRaw="")}},methods:{writeConfig(e,t){const s=this.$store.state.kling?.config||{},a=s.camera_control||{type:"simple"},u={...a.config||{}};t==null?delete u[e]:u[e]=t,this.$store.commit("kling/setConfig",{...s,camera_control:{...a,type:"simple",config:u}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),oo={class:"field"},no={class:"header"},so={class:"text-sm font-bold"},io={key:0,class:"config-grid"},lo={class:"cfg-row-head"},ao={class:"cfg-name"};function ro(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select"),c=o("el-input-number"),k=o("el-slider");return l(),m("div",oo,[i("div",no,[i("span",so,r(e.$t("kling.name.cameraControl")),1),n(d,{content:e.tooltipContent},null,8,["content"])]),n(g,{modelValue:e.selectedTypeRaw,"onUpdate:modelValue":t[0]||(t[0]=h=>e.selectedTypeRaw=h),class:"value",placeholder:e.$t("kling.placeholder.cameraType"),clearable:!0,disabled:e.disabled},{default:f(()=>[(l(!0),m(V,null,T(e.typeOptions,h=>(l(),C(p,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"]),e.selectedType==="simple"&&!e.disabled?(l(),m("div",io,[(l(!0),m(V,null,T(e.configKeys,h=>(l(),m("div",{key:h,class:"cfg-row"},[i("div",lo,[i("span",ao,r(e.$t(`kling.name.cc_${h}`)),1),n(c,{modelValue:e.configValues[h],"onUpdate:modelValue":_=>e.configValues[h]=_,min:-1,max:1,step:.1,precision:1,"controls-position":"right",size:"small",class:"cfg-num",onChange:_=>e.onNumberChange(h,_)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),n(k,{"model-value":e.configValues[h]??0,min:-1,max:1,step:.1,onInput:_=>e.onSliderChange(h,_)},null,8,["model-value","onInput"])]))),128))])):v("",!0)])}const co=y(to,[["render",ro],["__scopeId","data-v-cd896060"]]),he=[{groupKey:"cameraMovements",chipKeys:["rotateAround","stationary","handheld","zoomOut","zoomIn","follow","panRight","tiltUp","tiltDown","orbit"]},{groupKey:"cameraSpeed",chipKeys:["speedSlow","speedMedium","speedFast"]},{groupKey:"shotType",chipKeys:["shotClose","shotMedium","shotLong","shotLowAngle","shotHighAngle","shotShallowDof","shotFront","shotProfile","shotCloseUp","shotDrone"]},{groupKey:"light",chipKeys:["lightSunlight","lightSoft","lightNeon","lightWarm","lightNature","lightCandle","lightCityNight"]},{groupKey:"frame",chipKeys:["frameRichDetails","frameSimpleBg"]},{groupKey:"atmosphere",chipKeys:["atmosphereMysterious","atmospherePeaceful","atmosphereHeartwarming","atmosphereVivid","atmosphereColorful"]}],z=", ";function mo(e,t){const s=(e||"").trim();return s?s.includes(t)?s:`${s}${z}${t}`:t}function F(e,t){if(!e||!t)return e||"";const s=[`${t}${z}`,`${z}${t}`,t];let a=e;for(const u of s)if(a.includes(u)){a=a.replace(u,"");break}return a.replace(/(?:,\s*)+$/,"").replace(/^(?:,\s*)+/,"")}const uo=b({name:"InspirationPills",components:{FontAwesomeIcon:L},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return he.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selected(){const e=this.prompt;if(!e)return[];const t=[];for(const s of this.allChipTexts){const a=e.indexOf(s);a!==-1&&t.push({text:s,idx:a})}return t.sort((s,a)=>s.idx-a.idx).map(s=>s.text)}},methods:{onRemove(e){const t=F(this.prompt,e);this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:t})}}}),po={key:0,class:"pills",role:"list"},go={class:"pill-text"},fo=["aria-label","onClick"];function ho(e,t,s,a,u,$){const d=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",po,[(l(!0),m(V,null,T(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",go,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:be(g=>e.onRemove(p),["stop"])},[n(d,{icon:"fa-solid fa-xmark"})],8,fo)]))),128))])):v("",!0)}const _o=y(uo,[["render",ho],["__scopeId","data-v-5fc4fa65"]]),$o="",ko=b({name:"PromptInput",components:{ElButton:M,FontAwesomeIcon:L,PromptTextarea:Me,InspirationPills:_o},emits:["open-inspiration"],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||(this.prompt=$o)}});function vo(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("inspiration-pills"),c=o("prompt-textarea");return l(),C(c,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=k=>e.prompt=k),title:e.$t("kling.name.prompt"),info:e.$t("kling.description.prompt"),placeholder:e.$t("kling.placeholder.prompt")},{actions:f(()=>[n(p,{text:"",size:"small",class:"inspiration-btn",onClick:t[0]||(t[0]=k=>e.$emit("open-inspiration"))},{default:f(()=>[n(d,{icon:"fa-regular fa-lightbulb",class:"mr-1"}),w(" "+r(e.$t("kling.inspiration.openButton")),1)]),_:1})]),before:f(()=>[n(g)]),_:1},8,["modelValue","title","info","placeholder"])}const bo=y(ko,[["render",vo],["__scopeId","data-v-c01fc1a6"]]),yo="",wo=b({name:"NegativePromptInput",components:{ElInput:ge,InfoIcon:I},computed:{prompt:{get(){return this.$store.state.kling?.config?.negative_prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,negative_prompt:e})}}},mounted(){this.prompt||(this.prompt=yo)}}),Co={class:"field"},So={class:"box"},Vo={class:"title font-bold"};function Io(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input");return l(),m("div",Co,[i("div",So,[i("h2",Vo,r(e.$t("kling.name.negativePrompt")),1),n(d,{content:e.$t("kling.description.negativePrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.negativePrompt")},null,8,["modelValue","placeholder"])])}const To=y(wo,[["render",Io],["__scopeId","data-v-de98cf01"]]),Eo=b({name:"InspirationDrawer",components:{ElDrawer:ce,ElButton:M,FontAwesomeIcon:L},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:he,Close:ye}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},drawerSize(){return window.innerWidth<768?"100%":"380px"},prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return this.groups.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selectedCount(){return this.allChipTexts.filter(e=>this.isSelected(e)).length}},methods:{chipText(e){return this.$t(`kling.inspiration.chip.${e}`)},isSelected(e){return e?this.prompt.includes(e):!1},setPrompt(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})},onToggle(e){e&&(this.isSelected(e)?this.setPrompt(F(this.prompt,e)):this.setPrompt(mo(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(const t of this.allChipTexts)for(;e.includes(t);)e=F(e,t);this.setPrompt(e)}}}),Lo={class:"drawer-content"},Mo={class:"drawer-header"},Ro={class:"title-row"},Uo={class:"title"},Ao={class:"hint"},Do={key:0,class:"selected-bar"},Po={class:"selected-text"},Go={class:"groups"},Ko={class:"group-title"},Oo={class:"chip-grid"},jo=["onClick"];function Bo(e,t,s,a,u,$){const d=o("font-awesome-icon"),p=o("el-button"),g=o("el-drawer");return l(),C(g,{modelValue:e.visible,"onUpdate:modelValue":t[1]||(t[1]=c=>e.visible=c),direction:"rtl","with-header":!1,size:e.drawerSize,"custom-class":"kling-inspiration-drawer","destroy-on-close":!1},{default:f(()=>[i("div",Lo,[i("div",Mo,[i("div",Ro,[n(d,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Uo,r(e.$t("kling.inspiration.title")),1)]),n(p,{text:"",icon:e.Close,class:"close-btn",onClick:t[0]||(t[0]=c=>e.visible=!1)},null,8,["icon"])]),i("div",Ao,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Do,[i("span",Po,r(e.$t("kling.inspiration.selectedSummary",{count:e.selectedCount})),1),n(p,{text:"",size:"small",class:"clear-btn",onClick:e.onClearSelected},{default:f(()=>[w(r(e.$t("kling.inspiration.clearSelected")),1)]),_:1},8,["onClick"])])):v("",!0),i("div",Go,[(l(!0),m(V,null,T(e.groups,c=>(l(),m("div",{key:c.groupKey,class:"group"},[i("div",Ko,r(e.$t(`kling.inspiration.group.${c.groupKey}`)),1),i("div",Oo,[(l(!0),m(V,null,T(c.chipKeys,k=>(l(),m("button",{key:k,type:"button",class:R({chip:!0,active:e.isSelected(e.chipText(k))}),onClick:h=>e.onToggle(e.chipText(k))},r(e.chipText(k)),11,jo))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const No=y(Eo,[["render",Bo],["__scopeId","data-v-7d457a69"]]),zo={"kling-v3":"v3","kling-v3-omni":"v3-Omni","kling-v2-6":"v2.6","kling-v2-5-turbo":"v2.5-Turbo","kling-v2-1-master":"v2.1-Master","kling-v2-master":"v2-Master","kling-v1-6":"v1.6","kling-v1":"v1","kling-video-o1":"Video-o1"},Fo={std:"720p",pro:"1080p","4k":"4K"},qo=b({name:"SummaryChip",components:{FontAwesomeIcon:L},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){const e=this.config?.model||"kling-v2-5-turbo";return zo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return Fo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Ho={class:"summary-chip"},Wo=["title"],Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"];function Zo(e,t,s,a,u,$){const d=o("font-awesome-icon");return l(),m("div",Ho,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Wo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Jo),t[1]||(t[1]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.ratio")},r(e.aspectRatio||"16:9"),9,Qo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Yo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(d,{icon:"fa-solid fa-headphones"})],8,Xo)):v("",!0)])}const xo=y(qo,[["render",Zo],["__scopeId","data-v-418a6733"]]),en=b({name:"ConfigPanel",components:{ElButton:M,Consumption:de,FontAwesomeIcon:L,PromptInput:bo,NegativePromptInput:To,ModelSelector:tt,ModeSelector:rt,DurationSelector:_t,RatioSelector:Ct,StartImage:Mt,CfgScaleSelector:Ht,GenerateAudioSelector:xt,CameraControlSelector:co,InspirationDrawer:No,SummaryChip:xo,EndImage:Kt},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return fe(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),tn={class:"flex flex-col h-full"},on={class:"flex-1 overflow-y-auto p-5"},nn={class:"flex flex-col items-center justify-center px-5 pb-5"};function sn(e,t,s,a,u,$){const d=o("prompt-input"),p=o("model-selector"),g=o("ratio-selector"),c=o("start-image"),k=o("end-image"),h=o("duration-selector"),_=o("mode-selector"),E=o("generate-audio-selector"),U=o("camera-control-selector"),A=o("cfg-scale-selector"),B=o("negative-prompt-input"),_e=o("summary-chip"),$e=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),ke=o("inspiration-drawer");return l(),m("div",tn,[i("div",on,[n(d,{class:"mb-4",onOpenInspiration:t[0]||(t[0]=ee=>e.inspirationOpen=!0)}),n(p,{class:"mb-4"}),n(g,{class:"mb-4"}),n(c,{class:"mb-2"}),n(k,{class:"mb-2"}),n(h,{class:"mb-4"}),n(_,{class:"mb-4"}),n(E,{class:"mb-4"}),n(U,{class:"mb-4"}),n(A,{class:"mb-4"}),n(B,{class:"mb-4"})]),i("div",nn,[n(_e),n($e,{value:e.consumption,service:e.service},null,8,["value","service"]),e.config?.video_url!==void 0||e.config?.custom?(l(),C(x,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:f(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.extend")),1)]),_:1},8,["onClick"])):(l(),C(x,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:f(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generate")),1)]),_:1},8,["onClick"]))]),n(ke,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const ln=y(en,[["render",sn]]),an=b({name:"MotionImage",components:{ElUpload:j,ElButton:M,InfoIcon:I,FontAwesomeIcon:L,ImagePreview:O},mixins:[W],data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetImageUrl()},methods:{onExceed(){S.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){S.error(this.$t("kling.message.uploadReferencesError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:void 0})},onSetImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),rn={class:"relative"},cn={class:"flex justify-between"},dn={class:"flex justify-start items-center"},mn={class:"text-sm font-bold"};function un(e,t,s,a,u,$){const d=o("info-icon"),p=o("image-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-upload");return l(),m("div",rn,[i("div",cn,[i("div",dn,[i("span",mn,r(e.$t("kling.name.motionImage")),1),n(d,{content:e.$t("kling.description.motionImage")},null,8,["content"])])]),n(k,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=h=>e.fileList=h),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:h})=>[h.url&&h.percentage!==void 0?(l(),C(p,{key:0,url:h.url,name:h.name,percentage:h.percentage,onRemove:_=>e.onRemove(h)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}const pn=y(an,[["render",un],["__scopeId","data-v-37d42da7"]]),gn=b({name:"MotionVideo",components:{ElUpload:j,ElButton:M,InfoIcon:I,FilePreview:Ue,FontAwesomeIcon:L},data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetVideoUrl()},methods:{onExceed(){S.warning(this.$t("kling.message.uploadVideoExceed"))},onError(){S.error(this.$t("kling.message.uploadVideoError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:void 0})},beforeUpload(e){const t=e.type==="video/mp4"||e.type==="video/quicktime",s=e.size/1024/1024<100;return t?s?!0:(S.error(this.$t("kling.message.uploadVideoSizeExceed")),!1):(S.error(this.$t("kling.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),fn={class:"relative"},hn={class:"flex justify-between"},_n={class:"flex justify-start items-center"},$n={class:"text-sm font-bold"};function kn(e,t,s,a,u,$){const d=o("info-icon"),p=o("file-preview"),g=o("font-awesome-icon"),c=o("el-button"),k=o("el-upload");return l(),m("div",fn,[i("div",hn,[i("div",_n,[i("span",$n,r(e.$t("kling.name.motionVideo")),1),n(d,{content:e.$t("kling.description.motionVideo")},null,8,["content"])])]),n(k,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=h=>e.fileList=h),accept:".mp4,.mov",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:f(({file:h})=>[h.percentage!==void 0?(l(),C(p,{key:0,url:h.url||h.response?.file_url,name:h.name,percentage:h.percentage,onRemove:_=>e.onRemove(h)},null,8,["url","name","percentage","onRemove"])):v("",!0)]),default:f(()=>[n(c,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:f(()=>[n(g,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}const vn=y(gn,[["render",kn],["__scopeId","data-v-5cf93212"]]),bn=b({name:"MotionPromptInput",components:{ElInput:ge,InfoIcon:I},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||""},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),yn={class:"field"},wn={class:"box"},Cn={class:"title font-bold"};function Sn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-input");return l(),m("div",yn,[i("div",wn,[i("h2",Cn,r(e.$t("kling.name.motionPrompt")),1),n(d,{content:e.$t("kling.description.motionPrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.motionPrompt")},null,8,["modelValue","placeholder"])])}const Vn=y(bn,[["render",Sn],["__scopeId","data-v-ca9fdbe5"]]),le="video",In=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:De,ElRadioButton:Ae,InfoIcon:I},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||le},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,character_orientation:e})}}},mounted(){this.$store.state.kling?.motionConfig?.character_orientation||(this.value=le)}}),Tn={class:"field"},En={class:"header"},Ln={class:"text-sm font-bold"};function Mn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-radio-button"),g=o("el-radio-group");return l(),m("div",Tn,[i("div",En,[i("span",Ln,r(e.$t("kling.name.characterOrientation")),1),n(d,{content:e.$t("kling.description.characterOrientation")},null,8,["content"])]),n(g,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),size:"small",class:"value"},{default:f(()=>[n(p,{label:"image"},{default:f(()=>[w(r(e.$t("kling.name.orientationImage")),1)]),_:1}),n(p,{label:"video"},{default:f(()=>[w(r(e.$t("kling.name.orientationVideo")),1)]),_:1})]),_:1},8,["modelValue"])])}const Rn=y(In,[["render",Mn],["__scopeId","data-v-7a91195b"]]),ae="std",Un=b({name:"MotionModeSelector",components:{ElSelect:G,ElOption:P,InfoIcon:I},computed:{options(){return[{value:"std",label:this.$t("kling.name.modeStd")},{value:"pro",label:this.$t("kling.name.modePro")}]},value:{get(){return this.$store.state.kling?.motionConfig?.mode||ae},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=ae)}}),An={class:"field"},Dn={class:"header"},Pn={class:"title font-bold"};function Gn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-option"),g=o("el-select");return l(),m("div",An,[i("div",Dn,[i("h2",Pn,r(e.$t("kling.name.mode")),1),n(d,{content:e.$t("kling.description.motionMode")},null,8,["content"])]),n(g,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=c=>e.value=c),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:f(()=>[(l(!0),m(V,null,T(e.options,c=>(l(),C(p,{key:c.value,label:c.label,value:c.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Kn=y(Un,[["render",Gn],["__scopeId","data-v-1295688c"]]),On=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:pe,InfoIcon:I},computed:{value:{get(){return(this.$store.state.kling?.motionConfig?.keep_original_sound??"yes")==="yes"},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,keep_original_sound:e?"yes":"no"})}}}}),jn={class:"relative"},Bn={class:"flex justify-between items-center"},Nn={class:"flex justify-start items-center"},zn={class:"text-sm font-bold"};function Fn(e,t,s,a,u,$){const d=o("info-icon"),p=o("el-switch");return l(),m("div",jn,[i("div",Bn,[i("div",Nn,[i("span",zn,r(e.$t("kling.name.keepOriginalSound")),1),n(d,{content:e.$t("kling.description.keepOriginalSound")},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=g=>e.value=g)},null,8,["modelValue"])])])}const qn=y(On,[["render",Fn]]),Hn=b({name:"MotionPanel",components:{ElButton:M,FontAwesomeIcon:L,Consumption:de,MotionImage:pn,MotionVideo:vn,MotionPromptInput:Vn,CharacterOrientationSelector:Rn,MotionModeSelector:Kn,KeepOriginalSoundSelector:qn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return fe(this.motionConfig,this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){const e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit("generate")}}}),Wn={class:"flex flex-col h-full"},Jn={class:"flex-1 overflow-y-auto p-5"},Qn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Yn(e,t,s,a,u,$){const d=o("motion-image"),p=o("motion-video"),g=o("motion-prompt-input"),c=o("character-orientation-selector"),k=o("motion-mode-selector"),h=o("keep-original-sound-selector"),_=o("consumption"),E=o("font-awesome-icon"),U=o("el-button");return l(),m("div",Wn,[i("div",Jn,[n(d,{class:"mb-3"}),n(p,{class:"mb-3"}),n(g,{class:"mb-4"}),n(c,{class:"mb-4"}),n(k,{class:"mb-4"}),n(h,{class:"mb-4"})]),i("div",Qn,[n(_,{value:e.consumption,service:e.service},null,8,["value","service"]),n(U,{type:"primary",class:"btn w-full",round:"",disabled:!e.canGenerate,onClick:e.onGenerate},{default:f(()=>[n(E,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generateMotion")),1)]),_:1},8,["disabled","onClick"])])])}const Xn=y(Hn,[["render",Yn]]),Zn=b({name:"KlingTabSwitcher",components:{ElTabs:Ge,ElTabPane:Pe,ElTag:we},props:{modelValue:{type:String,default:"videos"}},emits:["update:modelValue"],computed:{tabs(){return[{value:"videos",label:this.$t("kling.tab.videoGeneration")},{value:"motion",label:this.$t("kling.tab.motionControl")}]}},methods:{onUpdate(e){this.$emit("update:modelValue",e)}}}),xn=["title"],es={class:"text"};function ts(e,t,s,a,u,$){const d=o("el-tag"),p=o("el-tab-pane"),g=o("el-tabs");return l(),C(g,{"model-value":e.modelValue,class:"kling-tabs",stretch:"","onUpdate:modelValue":e.onUpdate},{default:f(()=>[(l(!0),m(V,null,T(e.tabs,c=>(l(),C(p,{key:c.value,name:c.value,disabled:c.disabled},{label:f(()=>[i("span",{class:"tab-label",title:c.disabled?c.disabledReason:void 0},[i("span",es,r(c.label),1),c.badge?(l(),C(d,{key:0,size:"small",type:"warning",class:"badge"},{default:f(()=>[w(r(c.badge),1)]),_:2},1024)):v("",!0)],8,xn)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const os=y(Zn,[["render",ts],["__scopeId","data-v-bf00c27e"]]),ns=b({name:"TaskPreview",components:{ElImage:Ne,CopyToClipboard:Ke,FontAwesomeIcon:L,ElAlert:Be,VideoPlayer:Oe,ElTooltip:J,ElButton:M,ImagePreview:O,ApiCodeButton:je},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},referenceImages(){const e=[],t=this.modelValue?.request?.start_image_url,s=this.modelValue?.request?.end_image_url;return t&&e.push({url:t,name:"start-image"}),s&&e.push({url:s,name:"end-image"}),e}},methods:{onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onOpenVideo(e){window.open(e,"_blank")}}}),ss={class:"preview"},is={class:"left"},ls={class:"main"},as={class:"bot"},rs={class:"datetime"},cs={class:"info"},ds={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ms={key:1,class:"prompt mt-2"},us={key:0},ps={key:1},gs={key:0,class:R({content:!0,failed:!0})},fs={key:0,class:"mb-4"},hs={key:1,class:R({operations:!0,"mt-2":!0})},_s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ks={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},vs={key:1,class:R({content:!0})},bs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Ss={key:2,class:R({content:!0})},Vs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Is={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Ts(e,t,s,a,u,$){const d=o("el-image"),p=o("image-preview"),g=o("video-player"),c=o("el-button"),k=o("el-tooltip"),h=o("api-code-button"),_=o("font-awesome-icon"),E=o("copy-to-clipboard"),U=o("el-alert");return l(),m("div",ss,[i("div",is,[n(d,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",ls,[i("div",as,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",rs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",cs,[e.referenceImages.length>0?(l(),m("div",ds,[(l(!0),m(V,null,T(e.referenceImages,(A,B)=>(l(),C(p,{key:B,url:A.url,name:A.name,closable:!1},null,8,["url","name"]))),128))])):v("",!0),e.modelValue?.request?.prompt?(l(),m("p",ms,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?v("",!0):(l(),m("span",us," - ("+r(e.$t("kling.status.pending"))+") ",1)),e.modelValue?.response?.state==="submitted"||e.modelValue?.response?.state==="processing"||e.modelValue?.response?.state==="pending"||e.modelValue?.response?.state==="completed"?(l(),m("span",ps," - ("+r(e.$t("kling.status.processing"))+") ",1)):v("",!0)])):v("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",gs,[e.modelValue?.response.video_url?(l(),m("div",fs,[n(g,{src:e.modelValue?.response.video_url},null,8,["src"])])):v("",!0),e.modelValue?.response.success?(l(),m("div",hs,[n(k,{class:"box-item",effect:"dark",content:e.$t("kling.message.downloadVideo"),placement:"top-start"},{default:f(()=>[e.modelValue?.response.video_url?(l(),C(c,{key:0,type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=A=>e.onDownload(A,e.modelValue?.response.video_url))},{default:f(()=>[w(r(e.$t("kling.button.download")),1)]),_:1})):v("",!0)]),_:1},8,["content"]),n(h,{path:"/kling/videos",body:e.modelValue?.request},null,8,["body"])])):v("",!0),n(U,{closable:!1,class:"mt-2 success"},{default:f(()=>[i("p",_s,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.model"))+": "+r(e.modelValue?.request?.model),1)]),i("p",$s,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ks,[n(_,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):v("",!0)]),_:1})])):v("",!0),e.modelValue?.response?.success===!1?(l(),m("div",vs,[n(U,{closable:!1,class:"failure"},{template:f(()=>[n(_,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:f(()=>[i("p",bs,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),i("p",ys,[n(_,{icon:"fa-solid fa-circle-info",class:"mr-1"}),w(" "+r(e.$t("kling.name.failureReason"))+": "+r(e.modelValue?.response?.error?.message)+" ",1),n(E,{content:e.modelValue?.response?.error?.message},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ws,[n(_,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):v("",!0),e.modelValue?.response?.trace_id?(l(),m("p",Cs,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(E,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):v("",!0)]),_:1})])):v("",!0),e.modelValue?.response?.success===void 0?(l(),m("div",Ss,[n(U,{closable:!1,class:"info"},{template:f(()=>[n(_,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:f(()=>[i("p",Vs,[n(_,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(E,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.response?.trace_id?(l(),m("p",Is,[n(_,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(E,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):v("",!0)]),_:1})])):v("",!0)])])}const Es=y(ns,[["render",Ts],["__scopeId","data-v-422e2570"]]),Ls=b({name:"RecentPanel",components:{TaskPreview:Es,NoTasks:Re,BotPlaceholder:ze,ScrollList:Ee},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.kling?.tasks,items:this.$store.state.kling?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ms={key:0},Rs={key:2,class:"w-full h-full flex items-center justify-center"};function Us(e,t,s,a,u,$){const d=o("bot-placeholder"),p=o("task-preview"),g=o("scroll-list"),c=o("no-tasks");return l(),m(V,null,[e.tasks?.items===void 0?(l(),m("div",Ms,[n(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(l(),C(g,{key:1,ref:"scrollList",class:"h-full w-full overflow-y-auto tasks",loading:e.loading,onReachTop:t[0]||(t[0]=k=>e.$emit("reach-top"))},{default:f(()=>[(l(!0),m(V,null,T(e.tasks?.items,k=>(l(),C(p,{key:k.id,"model-value":k},null,8,["model-value"]))),128))]),_:1},8,["loading"])):v("",!0),e.tasks?.items?.length===0?(l(),m("div",Rs,[n(c)])):v("",!0)],64)}const As=y(Ls,[["render",Us]]),re=Ce("kling"),Ds=b({name:"KlingIndex",components:{ConfigPanel:ln,MotionPanel:Xn,TabSwitcher:os,Layout:Qe,RecentPanel:As},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===ne.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===ne.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},taskType(){return this.$store.state.kling.taskType||"videos"},tasks(){return this.$store.state.kling.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 Le({tasks: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("kling/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("kling/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();const e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug("loading");return}console.debug("start onGetTasks",e);const{limit:t=5,createdAtMin:s,createdAtMax:a}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",a),this.fetchingTasks=!0;try{await this.$store.dispatch("kling/getTasks",{limit:t,createdAtMin:s,createdAtMax:a})}finally{this.fetchingTasks=!1}},async onGenerate(){const{camera_control:e,...t}=this.config||{},s={...t,callback_url:re};if(!s.video_id&&!t.video_url&&!s.start_image_url&&s.end_image_url){S.warning(this.$t("kling.message.endImageRequiresStart"));return}s.action||(s.video_id||t.video_url?s.action="extend":s.start_image_url?s.action="image2video":s.action="text2video"),s.action==="text2video"&&s.end_image_url&&delete s.end_image_url,e?.type&&(s.camera_control={type:e.type,...e.type==="simple"&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,u])=>u!=null))}:{}});const a=this.credential?.token;if(!a){console.error("no token specified");return}S.info(this.$t("kling.message.startingTask")),te("kling",oe.generate(s,{token:a})).then(()=>{S.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===ie?S.error(this.$t("kling.message.usedUp")):S.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},async onTabChange(e){e!==this.taskType&&(await this.$store.dispatch("kling/setTaskType",e),await this.onGetTasks(),await this.onScrollDown())},async onGenerateMotion(){const e=this.motionConfig||{};if(!e.image_url||!e.video_url){S.warning(this.$t("kling.message.motionMissingInputs"));return}const t={image_url:e.image_url,video_url:e.video_url,character_orientation:e.character_orientation||"video",mode:e.mode||"std",keep_original_sound:e.keep_original_sound??"yes",...e.prompt?{prompt:e.prompt}:{},callback_url:re},s=this.credential?.token;if(!s){console.error("no token specified");return}S.info(this.$t("kling.message.startingTask")),te("kling",oe.motion(t,{token:s})).then(()=>{S.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===ie?S.error(this.$t("kling.message.usedUp")):S.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ps={class:"flex flex-col h-full"},Gs={class:"flex-1 min-h-0"};function Ks(e,t,s,a,u,$){const d=o("tab-switcher"),p=o("config-panel"),g=o("motion-panel"),c=o("recent-panel"),k=o("layout");return l(),C(k,null,{config:f(()=>[i("div",Ps,[n(d,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Gs,[e.taskType==="videos"?(l(),C(p,{key:0,onGenerate:e.onGenerate},null,8,["onGenerate"])):e.taskType==="motion"?(l(),C(g,{key:1,onGenerate:e.onGenerateMotion},null,8,["onGenerate"])):v("",!0)])])]),result:f(()=>[n(c,{ref:"recentPanel",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const zi=y(Ds,[["render",Ks]]);export{zi as default};
|