@acedatacloud/nexior 3.224.0 → 3.226.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-vFBpQhMW.js → ApiCodeButton-CkgmddPY.js} +1 -1
- package/dist/assets/{Auth-OefKNMU4.js → Auth-h6N9ZBLa.js} +1 -1
- package/dist/assets/{BotPlaceholder-DlTalbHl.js → BotPlaceholder-s0833dXM.js} +1 -1
- package/dist/assets/{Callback-kB85fb8W.js → Callback-CBljhjFT.js} +1 -1
- package/dist/assets/{Console-Bqk278uc.js → Console-C3Gx64sK.js} +1 -1
- package/dist/assets/{Consumption-DWzDf5NU.js → Consumption-DJb3Zq85.js} +1 -1
- package/dist/assets/{Conversation-DA4YJVeU.js → Conversation-VkhRa_B5.js} +1 -1
- package/dist/assets/{CopyToClipboard-Cyus3kO8.js → CopyToClipboard-DszAErjC.js} +1 -1
- package/dist/assets/{Detail-BatOpojN.js → Detail-DbXyKJAH.js} +2 -2
- package/dist/assets/{Extra-DvkOONc8.js → Extra-D4S1pWsZ.js} +1 -1
- package/dist/assets/{FilePreview-CrbwMyEz.js → FilePreview-a5f4UpE6.js} +1 -1
- package/dist/assets/{Hailuo-WiY9zJFb.js → Hailuo-7_9fVHuN.js} +1 -1
- package/dist/assets/{History-TJFkvqtV.js → History-eaRwqJ8v.js} +1 -1
- package/dist/assets/{ImagePreview-Dk9VNv6D.js → ImagePreview-BKqMFwxZ.js} +1 -1
- package/dist/assets/{ImageWrapper-BO2LU_3M.js → ImageWrapper-Dm7-bIgX.js} +1 -1
- package/dist/assets/{Index-BhDIZEAH.js → Index-B5XRCe1Z.js} +1 -1
- package/dist/assets/Index-BBK-7Gmo.js +1 -0
- package/dist/assets/{Index-DhHDRLu7.js → Index-BMdIXpA_.js} +1 -1
- package/dist/assets/{Index-XfKpTBfL.js → Index-BN47fdme.js} +1 -1
- package/dist/assets/{Index-DL1iFFh2.css → Index-B_HRzev8.css} +1 -1
- package/dist/assets/{Index-CF-8xcHy.js → Index-BdqobCHx.js} +1 -1
- package/dist/assets/{Index-C3czh5gR.js → Index-BjzdB6YT.js} +1 -1
- package/dist/assets/{Index-D2_YHoFu.js → Index-BlEHXaM6.js} +1 -1
- package/dist/assets/{Index-DOgAqSGj.js → Index-Bmxbl7BK.js} +1 -1
- package/dist/assets/{Index-BJAoQZ9S.js → Index-C3P5HTF4.js} +1 -1
- package/dist/assets/{Index-SXYDhhN9.js → Index-C3w9Wt7D.js} +1 -1
- package/dist/assets/{Index-BwR9hXV6.js → Index-C7QvtYVG.js} +1 -1
- package/dist/assets/{Index-sX7vzkX6.js → Index-C7crVbxy.js} +1 -1
- package/dist/assets/{Index-B-FM0PIv.js → Index-C91R35lY.js} +1 -1
- package/dist/assets/{Index-Byhe5rOM.js → Index-CV0ESyQJ.js} +1 -1
- package/dist/assets/{Index-3vDGvpxy.js → Index-CZePZ_IQ.js} +1 -1
- package/dist/assets/{Index-D4dZsvnK.js → Index-CiesuReN.js} +1 -1
- package/dist/assets/{Index-4OXlnmVL.js → Index-CsPREH2f.js} +1 -1
- package/dist/assets/{Index-Dwruwjre.js → Index-DHrvjqNq.js} +1 -1
- package/dist/assets/{Index-CWQEfEJ4.js → Index-GtfMoPB3.js} +1 -1
- package/dist/assets/{Index-STUBtX8K.js → Index-Lhvb0cWT.js} +1 -1
- package/dist/assets/{Index-D_zGdhGL.js → Index-Sx6KWAO1.js} +1 -1
- package/dist/assets/{Index-B3J9CnDG.js → Index-VQEB0VqM.js} +1 -1
- package/dist/assets/{Index-BR_s5Lz4.js → Index-kAbxiEc3.js} +1 -1
- package/dist/assets/{Index-CjVfT3h8.js → Index-xxk4WFkB.js} +1 -1
- package/dist/assets/{Index-B9239QqJ.js → Index-zRRlcw_e.js} +1 -1
- package/dist/assets/{Invitees-mPCaR_8v.js → Invitees-RYbo2VU4.js} +1 -1
- package/dist/assets/{List-CQp55DLW.js → List-CB7EaiaU.js} +1 -1
- package/dist/assets/{List-7-9WIgMP.js → List-CaodU12c.js} +1 -1
- package/dist/assets/{List-nu4ijOpf.js → List-CsTbqM1W.js} +1 -1
- package/dist/assets/{Main-BWKzA-8R.js → Main-SUKzn9hJ.js} +1 -1
- package/dist/assets/{Model-Ciq87vOo.js → Model-kxF-TnJ5.js} +1 -1
- package/dist/assets/{Navigator-C9Go_Ra2.js → Navigator-CQol9KTQ.js} +1 -1
- package/dist/assets/{NoTasks-BdJ5CPA8.js → NoTasks-CF8uilN4.js} +1 -1
- package/dist/assets/{NotFound-CbfiJc8p.js → NotFound-DThEOiTU.js} +1 -1
- package/dist/assets/{Pagination-BQFlKowj.js → Pagination-9j7qKAkP.js} +1 -1
- package/dist/assets/{Player.vue_vue_type_script_setup_true_lang-2GfVsNJK.js → Player.vue_vue_type_script_setup_true_lang-Dr6DTJzX.js} +1 -1
- package/dist/assets/{Status-BnBIt9Cr.js → Status-C5w4Q0oa.js} +1 -1
- package/dist/assets/{Subscribe-rsyN0A-T.js → Subscribe-Cd3WyZRx.js} +1 -1
- package/dist/assets/{TabSwitcher-DM_meLXn.js → TabSwitcher-CMJn8pSW.js} +1 -1
- package/dist/assets/{Tts-E-QAXQHy.js → Tts-C5YaVQGT.js} +1 -1
- package/dist/assets/{VideoPlayer-0-AEVU1T.js → VideoPlayer-B8hJJa4d.js} +1 -1
- package/dist/assets/{_Uint8Array-DA093S-J.js → _Uint8Array-dMcWmqZF.js} +1 -1
- package/dist/assets/{_baseClone-Cq1ABjiw.js → _baseClone-DZKAu36s.js} +1 -1
- package/dist/assets/{_baseIteratee-B7k2YMet.js → _baseIteratee-DulLK_c3.js} +1 -1
- package/dist/assets/{_initCloneObject-BFBVIxx7.js → _initCloneObject-BsCXP6pc.js} +1 -1
- package/dist/assets/{add-2SsJdfJJ.js → add-OK5omDua.js} +1 -1
- package/dist/assets/{all-wallets-DXRzuZcm.js → all-wallets-CjApRqmW.js} +1 -1
- package/dist/assets/{app-store-CMRJyw2H.js → app-store-C6UG4O4e.js} +1 -1
- package/dist/assets/{apple-Cvyc9k6j.js → apple-CG_jtKa2.js} +1 -1
- package/dist/assets/{arrow-bottom-DQNS9xUn.js → arrow-bottom-B72K2hir.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-B_ofnhfJ.js → arrow-bottom-circle-CWG-67_c.js} +1 -1
- package/dist/assets/{arrow-left-BBnpVNSM.js → arrow-left-Dcoju2q0.js} +1 -1
- package/dist/assets/{arrow-right-Cjvr3Xxh.js → arrow-right-Bqsdjmh5.js} +1 -1
- package/dist/assets/{arrow-top-B7GNCeZM.js → arrow-top-CQCwB1lL.js} +1 -1
- package/dist/assets/{avatar-CwyUIgGv.js → avatar-CHqoyrR3.js} +1 -1
- package/dist/assets/{bank-BCoTm8di.js → bank-CF2CeVja.js} +1 -1
- package/dist/assets/{basic-vVCFp-Xy.js → basic-BWq3gIe_.js} +1 -1
- package/dist/assets/{browser-hsvvYdbQ.js → browser-CeaXvNbh.js} +1 -1
- package/dist/assets/{byokCredential-CQMbe3BD.js → byokCredential-BTtsKkzK.js} +1 -1
- package/dist/assets/{card-CjhZxvq1.js → card-DRrDQ1qB.js} +1 -1
- package/dist/assets/{castArray-DUQS9d-B.js → castArray-mD4k-COw.js} +1 -1
- package/dist/assets/{chat-DXly2Poz.js → chat-D8tvhnLb.js} +1 -1
- package/dist/assets/{checkmark-BiDOoS-K.js → checkmark-B6Coes2-.js} +1 -1
- package/dist/assets/{checkmark-bold-BUSaHgKK.js → checkmark-bold-BBu5bhvD.js} +1 -1
- package/dist/assets/{chevron-bottom-COWx42wo.js → chevron-bottom-BPFNICeS.js} +1 -1
- package/dist/assets/{chevron-left-BP3q8fUn.js → chevron-left-BTT7SFx_.js} +1 -1
- package/dist/assets/{chevron-right-Wmv5-AvU.js → chevron-right-CvI5EckA.js} +1 -1
- package/dist/assets/{chevron-top-DiKDJ2oY.js → chevron-top-Bo-El6aA.js} +1 -1
- package/dist/assets/{chrome-store-2scVG9EO.js → chrome-store-Blv8sYWJ.js} +1 -1
- package/dist/assets/{clock-BDCJEpwn.js → clock-VULWe8YY.js} +1 -1
- package/dist/assets/{close-QCYFxi1S.js → close-BqPbfYQc.js} +1 -1
- package/dist/assets/{coinPlaceholder-Bxv-j8sH.js → coinPlaceholder-DUvhzWm6.js} +1 -1
- package/dist/assets/{compass-CNjz87q3.js → compass-D6-ogJsk.js} +1 -1
- package/dist/assets/{copy-D1n2etqt.js → copy-BW_CcWuQ.js} +1 -1
- package/dist/assets/{createTaskActions-DnddwKSH.js → createTaskActions-seQCbTL5.js} +1 -1
- package/dist/assets/{cursor-CuXs6IT0.js → cursor-7DwZX_h1.js} +1 -1
- package/dist/assets/{cursor-transparent-BJvSsXXV.js → cursor-transparent-CFtJpuus.js} +1 -1
- package/dist/assets/{debounce-C03cEkHE.js → debounce-fzRpYvTx.js} +1 -1
- package/dist/assets/{desktop-C-gUdw0i.js → desktop-BvqKJf7a.js} +1 -1
- package/dist/assets/{disconnect-JkccI_7t.js → disconnect-Dh2Q9ng4.js} +1 -1
- package/dist/assets/{discord-BKSdHj3T.js → discord-BPu8g7y2.js} +1 -1
- package/dist/assets/{distribution-ChKyhvBZ.js → distribution-fRp0VqRq.js} +1 -1
- package/dist/assets/{dropdown-BOgDv_H5.js → dropdown-D5iOHOWU.js} +1 -1
- package/dist/assets/{etherscan-Bgcm0XX4.js → etherscan-DzgI5dld.js} +1 -1
- package/dist/assets/{exclamation-triangle-Djj4CNUO.js → exclamation-triangle-D-hBr5tG.js} +1 -1
- package/dist/assets/{extension-C4Ft50Gh.js → extension-BhavRvMH.js} +1 -1
- package/dist/assets/{external-link-D9JmiXp9.js → external-link-DssR47MQ.js} +1 -1
- package/dist/assets/{facebook-D11gInLD.js → facebook-CrLMT2p8.js} +1 -1
- package/dist/assets/{farcaster-DbC3xbe9.js → farcaster-MMwu0mgx.js} +1 -1
- package/dist/assets/{filters-C2ziJxUO.js → filters-BnFMxhRF.js} +1 -1
- package/dist/assets/{github-BLDSlu9C.js → github-DRkAaKu8.js} +1 -1
- package/dist/assets/{google-D3Z_79A3.js → google-ibbI_oFU.js} +1 -1
- package/dist/assets/{help-circle-Bcrp_p-5.js → help-circle-CNZ1Z9lT.js} +1 -1
- package/dist/assets/{highlight-BcWnwsoc.js → highlight-DcfXaBeC.js} +1 -1
- package/dist/assets/{id-DJYWuf_C.js → id-6UboB5fw.js} +1 -1
- package/dist/assets/{image-DDn73YnR.js → image-MEKK89Qk.js} +1 -1
- package/dist/assets/{index-D_aozfnJ.js → index--96oDgPk.js} +1 -1
- package/dist/assets/{index-QBPWH1bb.js → index-B0tmHD6W.js} +1 -1
- package/dist/assets/{index-CX6eQA6G.js → index-B12SAORZ.js} +1 -1
- package/dist/assets/{index-IbaDZHUs.js → index-B5MFdHEY.js} +1 -1
- package/dist/assets/{index-BjRR6BK7.js → index-B8AvA8w1.js} +1 -1
- package/dist/assets/{index-CDdNwPYN.js → index-BCk0BbjD.js} +1 -1
- package/dist/assets/{index-CqQFz7Rl.js → index-BO1HJuEm.js} +2 -2
- package/dist/assets/{index-S7cTyDpA.js → index-BPUUia6V.js} +1 -1
- package/dist/assets/{index-BGLQO0Hh.js → index-BSglm0Mh.js} +1 -1
- package/dist/assets/{index-BHn3eYce.js → index-BUr6thfj.js} +1 -1
- package/dist/assets/{index-BUb9BaJL.js → index-BVkFwr_L.js} +1 -1
- package/dist/assets/{index-C6Jtqa6o.js → index-BVxZYnz6.js} +1 -1
- package/dist/assets/{index-_B-Ww08d.js → index-BWmAvPe7.js} +1 -1
- package/dist/assets/{index-CwF4gfXp.js → index-BZTL3ViV.js} +1 -1
- package/dist/assets/{index-et06AKLX.js → index-B_eA3JZ6.js} +1 -1
- package/dist/assets/{index-BQnTKmOj.js → index-BdD8t8Dh.js} +1 -1
- package/dist/assets/{index-DYLNQy0Z.js → index-BfwtSiqw.js} +1 -1
- package/dist/assets/{index-BSE3Hb43.js → index-BjOiLYfa.js} +1 -1
- package/dist/assets/{index-AZ1hwFTH.js → index-Blt2Omu9.js} +1 -1
- package/dist/assets/{index-BXP23bVk.js → index-BmldmpJ7.js} +1 -1
- package/dist/assets/{index-ysURTHec.js → index-BmpASoJL.js} +1 -1
- package/dist/assets/{index-DO19e835.js → index-BqV7Dywc.js} +1 -1
- package/dist/assets/{index-B_O9HQBQ.js → index-Brl0omIh.js} +1 -1
- package/dist/assets/{index-BTgBoXL3.js → index-Bumd8iDl.js} +1 -1
- package/dist/assets/{index-W9nGx26C.js → index-BzL62eR-.js} +1 -1
- package/dist/assets/{index-DQy4C5L_.js → index-C-pA8pQB.js} +1 -1
- package/dist/assets/{index-DWOR168Z.js → index-C944EN_X.js} +1 -1
- package/dist/assets/{index-CUD-Jxk1.js → index-CAPDePb0.js} +1 -1
- package/dist/assets/{index-8svWm4Od.js → index-CBGglJJ1.js} +1 -1
- package/dist/assets/{index-BzzoCYLQ.js → index-CDRJgwze.js} +1 -1
- package/dist/assets/{index-DNRYAcWg.js → index-CExb-pgq.js} +1 -1
- package/dist/assets/{index-CA4zqZzW.js → index-CFGOjnwV.js} +1 -1
- package/dist/assets/{index-wPegNTFk.js → index-CFGrrV17.js} +1 -1
- package/dist/assets/{index--4zlzrF2.js → index-CGFTjr4j.js} +1 -1
- package/dist/assets/{index-BWmJooWn.js → index-CKC1QXPY.js} +1 -1
- package/dist/assets/{index-DSyym8x6.js → index-CTe-d_6k.js} +1 -1
- package/dist/assets/{index-Bvw4qyVZ.js → index-CV3Lmk-s.js} +1 -1
- package/dist/assets/{index-BUqeO4MP.js → index-CX3Kkhe8.js} +3 -3
- package/dist/assets/{index-BCuaeEwu.js → index-CaN8MHgO.js} +1 -1
- package/dist/assets/{index-m8bf2QwL.js → index-Ck2lWPQ8.js} +1 -1
- package/dist/assets/{index-BaeAu1HD.js → index-CkzdWDJ8.js} +1 -1
- package/dist/assets/{index-a6I0e7O8.js → index-ClLWFUWe.js} +1 -1
- package/dist/assets/{index-BH36Xgk1.js → index-CmJMSATA.js} +1 -1
- package/dist/assets/{index-BvXNTP0I.js → index-Cp-N3Z9d.js} +3 -3
- package/dist/assets/{index-B-PEBieK.js → index-CrIxCDkE.js} +1 -1
- package/dist/assets/{index-9RXZcpru.js → index-Cw2jO3EU.js} +5 -5
- package/dist/assets/{index-CXHbJdGc.js → index-CxCN6BXU.js} +1 -1
- package/dist/assets/{index-DHOAK6hm.js → index-CzmKNTJj.js} +1 -1
- package/dist/assets/{index-CHzu7Hik.js → index-D8d_EiGA.js} +1 -1
- package/dist/assets/{index-BQWGQCKK.js → index-D9BkjAHP.js} +1 -1
- package/dist/assets/{index-DE_D_zw0.js → index-DG0OeiDu.js} +1 -1
- package/dist/assets/{index-ScG4Vs77.js → index-DQOSv-tV.js} +1 -1
- package/dist/assets/{index-DR5czkfE.js → index-DTbR5rAQ.js} +1 -1
- package/dist/assets/{index-C3zCjGNL.js → index-Db9d2-xc.js} +1 -1
- package/dist/assets/{index-BiRwUwH3.js → index-Dj3DVAp3.js} +1 -1
- package/dist/assets/{index-Bf7NxHvu.js → index-DyfY2E-a.js} +1 -1
- package/dist/assets/{index-akALaLFc.js → index-TJBAFmkH.js} +1 -1
- package/dist/assets/{index-BZWEA8K7.js → index-_S-XXu4O.js} +1 -1
- package/dist/assets/{index-7jxrSH-F.js → index-fe6CHwgM.js} +1 -1
- package/dist/assets/{index-DKnKtTd_.js → index-jB6V2dn5.js} +1 -1
- package/dist/assets/{index-4voVrHif.js → index-tO5MdGXt.js} +1 -1
- package/dist/assets/{index-DD14ZV87.js → index-vvF0hkxw.js} +1 -1
- package/dist/assets/{index-CxV9bTZs.js → index-wJ-tzrqi.js} +1 -1
- package/dist/assets/{index.browser.esm-yFzKuf_i.js → index.browser.esm-B_LBdNY3.js} +1 -1
- package/dist/assets/{index.es-D8YU_UyN.js → index.es-C8TbH2BC.js} +1 -1
- package/dist/assets/{info-DBgW_Dwx.js → info-B1ux_wtz.js} +1 -1
- package/dist/assets/{info-circle-dyzvrLGn.js → info-circle-CgDobzgc.js} +1 -1
- package/dist/assets/{isEqual-CTnS11fg.js → isEqual-C_dkvvUP.js} +1 -1
- package/dist/assets/{isPlainObject-C5TiVznJ.js → isPlainObject-aPqrRKoh.js} +1 -1
- package/dist/assets/{lightbulb-CU-WMcbD.js → lightbulb-CVjEyGlE.js} +1 -1
- package/dist/assets/{mail-DNPz9SLU.js → mail-DVy_KzuR.js} +1 -1
- package/dist/assets/{midjourney-CiQVLnQE.js → midjourney-Dtb1E59V.js} +1 -1
- package/dist/assets/{mobile-CobHR7FB.js → mobile-FjF3Gva8.js} +1 -1
- package/dist/assets/{more-CVNVZxOx.js → more-wf3KVvjR.js} +1 -1
- package/dist/assets/{network-placeholder-B97kpbPp.js → network-placeholder-C2sz0QQ2.js} +1 -1
- package/dist/assets/{nftPlaceholder--fJlvkk9.js → nftPlaceholder-Dkp0hc8o.js} +1 -1
- package/dist/assets/{off-9XJ87yPu.js → off-BWK3JRS0.js} +1 -1
- package/dist/assets/{order-DX8BRbvA.js → order-C31aVuXe.js} +1 -1
- package/dist/assets/{pagination-DScfL-bS.js → pagination-BCfNKuC9.js} +2 -2
- package/dist/assets/pagination-CzRYhsIC.css +1 -0
- package/dist/assets/{play-store-UKSbNBmC.js → play-store-DKZ4ZOrX.js} +1 -1
- package/dist/assets/{plus-buFFp6eX.js → plus-DBGuMj_H.js} +1 -1
- package/dist/assets/{price-C6IxoVQq.js → price-DyHd8y4L.js} +1 -1
- package/dist/assets/{producer-B9HnK6PA.js → producer-0q8zUaf1.js} +1 -1
- package/dist/assets/{qr-code-xSgs42Hi.js → qr-code-C2pCAFPz.js} +1 -1
- package/dist/assets/{recycle-horizontal-GETHxGsf.js → recycle-horizontal-C9PvqW6l.js} +1 -1
- package/dist/assets/{refresh-CAGuV8FM.js → refresh-Br0-WzNx.js} +1 -1
- package/dist/assets/{reown-logo-IlNjgjLI.js → reown-logo-DRj9OW9L.js} +1 -1
- package/dist/assets/{search-CCimIT2b.js → search-DLfv3qqA.js} +1 -1
- package/dist/assets/{secp256k1-KmiNEB6l.js → secp256k1-BBUihW2V.js} +1 -1
- package/dist/assets/{secp256k1-BA9dmNVi.js → secp256k1-kqqZ93NX.js} +1 -1
- package/dist/assets/{seedream-B-Gg7tW5.js → seedream-DHwGPmgg.js} +1 -1
- package/dist/assets/{send-rISTUWTj.js → send-B6YM2TSM.js} +1 -1
- package/dist/assets/{service-DOkdcHzO.js → service-9zs_eBMA.js} +1 -1
- package/dist/assets/{solana-wallets-BJQqB_o3.js → solana-wallets-BaFEWG8a.js} +2 -2
- package/dist/assets/{solana-wallets-vue-4KrJOL1J.js → solana-wallets-vue-OtEurO24.js} +1 -1
- package/dist/assets/{suno-C6nMzaN6.js → suno-VziWUZTH.js} +1 -1
- package/dist/assets/{swapHorizontal-DC-AyHEX.js → swapHorizontal-DNcXNhot.js} +1 -1
- package/dist/assets/{swapHorizontalBold-IKK_TffQ.js → swapHorizontalBold-DR-cWctN.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-3hR-ixeX.js → swapHorizontalMedium-BNAr8hX2.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-C1-EFmiu.js → swapHorizontalRoundedBold-TbVsceyO.js} +1 -1
- package/dist/assets/{swapVertical-CvYqehVN.js → swapVertical-yaS8u3rQ.js} +1 -1
- package/dist/assets/{telegram-C5lV7Hvm.js → telegram-Be8gzftz.js} +1 -1
- package/dist/assets/{three-dots-U730BqpH.js → three-dots-BKDwVwYA.js} +1 -1
- package/dist/assets/{twitch-D_ZwU94W.js → twitch-DvKIwM9A.js} +1 -1
- package/dist/assets/{twitterIcon-BDJDkfBn.js → twitterIcon-CINC1tDw.js} +1 -1
- package/dist/assets/{typescript-B8DqjiE0.js → typescript-Jtl3VF26.js} +1 -1
- package/dist/assets/{use-form-item-CN8LkJg1.js → use-form-item-DLYZ0lkO.js} +1 -1
- package/dist/assets/validator-Dc1F-Mud.js +1 -0
- package/dist/assets/{verify-filled-EV2QepfS.js → verify-filled-BdtgzMA7.js} +1 -1
- package/dist/assets/{verify-D4g4UEP6.js → verify-nfw-ePqu.js} +1 -1
- package/dist/assets/{w3m-modal-DJ5jSml1.js → w3m-modal-Df6DCh_B.js} +1 -1
- package/dist/assets/{wallet-DkGPZBgR.js → wallet-DDr071PN.js} +1 -1
- package/dist/assets/{wallet-placeholder-y6BD_Qr7.js → wallet-placeholder-BQslLVSg.js} +1 -1
- package/dist/assets/{walletconnect-r3WWNaBh.js → walletconnect-os1bgmov.js} +1 -1
- package/dist/assets/{warning-circle-DYZ2C1Ee.js → warning-circle-Ct3mqoi0.js} +1 -1
- package/dist/assets/{web-BLNLAzOD.js → web-Zfo0kRRf.js} +1 -1
- package/dist/assets/{web-qeloDK5o.js → web-y3KukLeU.js} +1 -1
- package/dist/assets/{x-DGM6SjJx.js → x-CKSlPvr_.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/Index-CAhdnRn6.js +0 -1
- package/dist/assets/pagination-OsN6LUuX.css +0 -1
- package/dist/assets/validator-CrWd2Qn4.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as L}from"./index.es-D8YU_UyN.js";import{E as M}from"./index-BUb9BaJL.js";import{E as ce}from"./index-BGLQO0Hh.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-BUqeO4MP.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-CXHbJdGc.js";import{E as H}from"./index-B-PEBieK.js";import{E as S}from"./index-8svWm4Od.js";import{I,S as Ee,l as Le}from"./pagination-DScfL-bS.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as O}from"./ImagePreview-Dk9VNv6D.js";import{E as J}from"./index-BWmJooWn.js";import{E as j}from"./index-CHzu7Hik.js";import{C as de}from"./Consumption-DWzDf5NU.js";import{E as me}from"./index-BXP23bVk.js";import{E as ue}from"./index-CxV9bTZs.js";import{E as pe}from"./index-IbaDZHUs.js";import{P as Me,N as Re}from"./NoTasks-BdJ5CPA8.js";import{E as ge}from"./index-DYLNQy0Z.js";import{a as fe}from"./price-C6IxoVQq.js";import{F as Ue}from"./FilePreview-CrbwMyEz.js";import{E as Ae,a as De}from"./index-BaeAu1HD.js";import{E as Pe,a as Ge}from"./index-a6I0e7O8.js";import{b as ie}from"./errorCode-Cqj9Td_Z.js";import{C as Ke}from"./CopyToClipboard-Cyus3kO8.js";import{V as Oe}from"./VideoPlayer-0-AEVU1T.js";import{A as je}from"./ApiCodeButton-vFBpQhMW.js";import{E as Be}from"./index-DSyym8x6.js";import{E as Ne}from"./index-ScG4Vs77.js";import{B as ze}from"./BotPlaceholder-DlTalbHl.js";import"./use-form-item-CN8LkJg1.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./index-S7cTyDpA.js";import"./typescript-B8DqjiE0.js";import"./index-CX6eQA6G.js";import"./strings-beZM2Y-f.js";import"./isEqual-CTnS11fg.js";import"./_Uint8Array-DA093S-J.js";import"./castArray-DUQS9d-B.js";import"./debounce-C03cEkHE.js";import"./_baseIteratee-B7k2YMet.js";import"./index-BTgBoXL3.js";import"./validator-CrWd2Qn4.js";import"./highlight-BcWnwsoc.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./index-QBPWH1bb.js";import"./_baseClone-Cq1ABjiw.js";import"./_initCloneObject-BFBVIxx7.js";import"./index-Cu41y2Fl.js";import"./index-4voVrHif.js";import"./isPlainObject-C5TiVznJ.js";import"./vue-plyr-BO2nlN4c.js";import"./index-akALaLFc.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-4e0e18c9"]]),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};
|
|
1
|
+
import{F as L}from"./index.es-C8TbH2BC.js";import{E as M}from"./index-BVkFwr_L.js";import{E as ce}from"./index-BSglm0Mh.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-CX3Kkhe8.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-CxCN6BXU.js";import{E as H}from"./index-CrIxCDkE.js";import{E as S}from"./index-CBGglJJ1.js";import{I,S as Ee,l as Le}from"./pagination-BCfNKuC9.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as O}from"./ImagePreview-BKqMFwxZ.js";import{E as J}from"./index-CKC1QXPY.js";import{E as j}from"./index-D8d_EiGA.js";import{C as de}from"./Consumption-DJb3Zq85.js";import{E as me}from"./index-BmldmpJ7.js";import{E as ue}from"./index-wJ-tzrqi.js";import{E as pe}from"./index-B5MFdHEY.js";import{P as Me,N as Re}from"./NoTasks-CF8uilN4.js";import{E as ge}from"./index-BfwtSiqw.js";import{a as fe}from"./price-DyHd8y4L.js";import{F as Ue}from"./FilePreview-a5f4UpE6.js";import{E as Ae,a as De}from"./index-CkzdWDJ8.js";import{E as Pe,a as Ge}from"./index-ClLWFUWe.js";import{b as ie}from"./errorCode-Cqj9Td_Z.js";import{C as Ke}from"./CopyToClipboard-DszAErjC.js";import{V as Oe}from"./VideoPlayer-B8hJJa4d.js";import{A as je}from"./ApiCodeButton-CkgmddPY.js";import{E as Be}from"./index-CTe-d_6k.js";import{E as Ne}from"./index-DQOSv-tV.js";import{B as ze}from"./BotPlaceholder-s0833dXM.js";import"./use-form-item-DLYZ0lkO.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./index-BPUUia6V.js";import"./typescript-Jtl3VF26.js";import"./index-B12SAORZ.js";import"./strings-beZM2Y-f.js";import"./isEqual-C_dkvvUP.js";import"./_Uint8Array-dMcWmqZF.js";import"./castArray-mD4k-COw.js";import"./debounce-fzRpYvTx.js";import"./_baseIteratee-DulLK_c3.js";import"./index-Bumd8iDl.js";import"./validator-Dc1F-Mud.js";import"./highlight-DcfXaBeC.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./index-B0tmHD6W.js";import"./_baseClone-DZKAu36s.js";import"./_initCloneObject-BsCXP6pc.js";import"./index-Cu41y2Fl.js";import"./index-tO5MdGXt.js";import"./isPlainObject-aPqrRKoh.js";import"./vue-plyr-BO2nlN4c.js";import"./index-TJBAFmkH.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-4e0e18c9"]]),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};
|