@acedatacloud/nexior 3.374.0 → 3.375.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-DBIIyPcm.js → ApiCodeButton-CpRdry19.js} +1 -1
- package/dist/assets/{ApiCodeDialog-SgTrP35-.js → ApiCodeDialog-DQHdLFaR.js} +1 -1
- package/dist/assets/{Artifacts-Bv8c6c23.js → Artifacts-fyaNSRoG.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-5upmtI3F.js → AskUserQuestionCard-zjS9mzsZ.js} +1 -1
- package/dist/assets/{AudioPreview-CO5m-MPN.js → AudioPreview-Ca5mIJa5.js} +1 -1
- package/dist/assets/{Auth-C_3Q01T9.js → Auth-DPiRRvu4.js} +1 -1
- package/dist/assets/{Bare-Bgcy9ZBE.js → Bare-Vrvyud2o.js} +1 -1
- package/dist/assets/{BotPlaceholder-D9exsWtJ.js → BotPlaceholder-IDq9_Pl7.js} +1 -1
- package/dist/assets/{BottomFooter-Cpt55XyN.js → BottomFooter-B5jPrf43.js} +1 -1
- package/dist/assets/{BrowseConnectors-DDaCrhbs.js → BrowseConnectors-BbaZ-3Gl.js} +1 -1
- package/dist/assets/{BrowserPairingDialog-BrWPFDvv.js → BrowserPairingDialog-DGJRNlEF.js} +1 -1
- package/dist/assets/{Callback-Dxh5oYOa.js → Callback-CAXJEbR2.js} +1 -1
- package/dist/assets/{CodeSnippet-BsfF8y-K.js → CodeSnippet-C6tRl74T.js} +1 -1
- package/dist/assets/{Console-DX8ah6RZ.js → Console-Bxt_sQHu.js} +1 -1
- package/dist/assets/{Conversation-jOky6QFU.js → Conversation-NzkF1Blx.js} +1 -1
- package/dist/assets/{Conversation-CGF5Pv35.js → Conversation-Uf07xeEj.js} +1 -1
- package/dist/assets/{CopyToClipboard-CaPuzTeQ.js → CopyToClipboard-Db0qgR8j.js} +1 -1
- package/dist/assets/{Detail-Do_URYhR.js → Detail-BBG1XhXL.js} +1 -1
- package/dist/assets/{Extra-BALtwRjN.js → Extra-C_ZcHH2P.js} +1 -1
- package/dist/assets/{FilePreview-D9sljXpn.js → FilePreview-D99je5SC.js} +1 -1
- package/dist/assets/{Hailuo-Dqi6oENw.js → Hailuo-DL88nkFd.js} +1 -1
- package/dist/assets/{History-BnMHhtb9.js → History-dm4QC9PX.js} +1 -1
- package/dist/assets/{ImagePreview-DBaF-RWM.js → ImagePreview-BlNKx02Q.js} +1 -1
- package/dist/assets/{ImageWrapper-B7c3P7Rp.js → ImageWrapper-DnHe8CWn.js} +1 -1
- package/dist/assets/{Index-h8LHd7to.js → Index-6xPeGiTS.js} +1 -1
- package/dist/assets/{Index-D6RtTR0S.js → Index-B-tQAqdN.js} +1 -1
- package/dist/assets/{Index-o2Kv6S1v.js → Index-BCPqRkqx.js} +1 -1
- package/dist/assets/{Index-D2u3DAyP.js → Index-BDKr6UVg.js} +1 -1
- package/dist/assets/{Index-DHNhF-7Z.js → Index-BQcKkBQV.js} +1 -1
- package/dist/assets/{Index-B_e8X3lR.js → Index-BUFuoJpW.js} +1 -1
- package/dist/assets/{Index-D2uwTXnV.js → Index-B_lskLcP.js} +1 -1
- package/dist/assets/{Index-CBWvzpUv.js → Index-B_uNsFCN.js} +1 -1
- package/dist/assets/{Index-CgZQ_vHY.js → Index-C2Hutsln.js} +1 -1
- package/dist/assets/{Index-DuK9WzML.js → Index-CAG_Matm.js} +1 -1
- package/dist/assets/{Index-C3Xg5_rD.js → Index-CMkmQzkv.js} +1 -1
- package/dist/assets/{Index-D0VEtNow.js → Index-CPfJIKxq.js} +1 -1
- package/dist/assets/{Index-C5n7st14.js → Index-CUnqIKna.js} +1 -1
- package/dist/assets/{Index-C-MhLOpV.js → Index-CUvYnUrv.js} +1 -1
- package/dist/assets/{Index-BRcf8_aI.js → Index-CcIAplCO.js} +1 -1
- package/dist/assets/{Index-DEg9qoqB.js → Index-CfWu7MOz.js} +1 -1
- package/dist/assets/{Index-6EQp8Djd.js → Index-Cfu97lFN.js} +1 -1
- package/dist/assets/{Index-DZeE-ePv.js → Index-CjTjUpNt.js} +1 -1
- package/dist/assets/{Index-rnPbAWjw.js → Index-Cmn9yVV_.js} +1 -1
- package/dist/assets/{Index-lqpxMyXe.js → Index-Cns2moIZ.js} +1 -1
- package/dist/assets/{Index-LRgJ_nsN.js → Index-CrJEhROj.js} +1 -1
- package/dist/assets/{Index-DNEKHbbD2.js → Index-CysG2Ayn2.js} +1 -1
- package/dist/assets/{Index-N-brMCrR.js → Index-D2Tx3TCq.js} +1 -1
- package/dist/assets/{Index-BfvWsCCs.js → Index-DAlEnN66.js} +1 -1
- package/dist/assets/{Index-Dibj94eG.js → Index-DBDW2JkF.js} +1 -1
- package/dist/assets/{Index-DgOG6dMN.js → Index-DJDMoG-n.js} +1 -1
- package/dist/assets/{Index-DN1YZ-qD.js → Index-DROvjae_.js} +1 -1
- package/dist/assets/{Index-Bn8GR3Dp.js → Index-DT7VoneT.js} +1 -1
- package/dist/assets/{Index-D0dMY9JE.js → Index-DgwZrNrV.js} +1 -1
- package/dist/assets/{Index-DyHHY0TK.js → Index-DjsmPBRY.js} +1 -1
- package/dist/assets/{Index-Cxnk8D6L.js → Index-DpH023Wn.js} +1 -1
- package/dist/assets/{Index-BfEjGMYY.js → Index-DqI9S1Qv.js} +1 -1
- package/dist/assets/{Index-Cioeau9t.js → Index-DtzDibDm.js} +1 -1
- package/dist/assets/{Index-h7_JkwcG.js → Index-Jg0_Ku-L.js} +1 -1
- package/dist/assets/{Index-CH0Qtl-U.js → Index-WsRj_MOo.js} +1 -1
- package/dist/assets/{Index-Dq-UvUyY.js → Index-yNIuTCiR.js} +1 -1
- package/dist/assets/{Invitees-C7Z_tbfl.js → Invitees-DPqPcVpZ.js} +1 -1
- package/dist/assets/{List-neAXCyf2.js → List-BkjalFU4.js} +1 -1
- package/dist/assets/{List-D3pfOeks.js → List-C2WOJkui.js} +1 -1
- package/dist/assets/{List-sKWhZB_b.js → List-sGWA28Vp.js} +1 -1
- package/dist/assets/{LocalTools-Co4IuNQp.js → LocalTools-BsUYypvZ.js} +1 -1
- package/dist/assets/{LocalTools-CURjPTl3.js → LocalTools-DMPBDPUy.js} +1 -1
- package/dist/assets/{Logo-CcnyAHG2.js → Logo-a_IUpjyi.js} +1 -1
- package/dist/assets/{Main-Bh0TsiI3.js → Main-CXPtVUVE.js} +1 -1
- package/dist/assets/{Message-CkA6luHF.js → Message-DiVAOITE.js} +1 -1
- package/dist/assets/{Model-BY0CeF_w.js → Model-DtIwYhY2.js} +1 -1
- package/dist/assets/{Navigator-vxqlT7Zw.js → Navigator-CdBpZH4M.js} +3 -3
- package/dist/assets/{NotFound-DeOf4Lmk.js → NotFound-CXiMJNHM.js} +1 -1
- package/dist/assets/{PageHeader-CoIHTlzp.js → PageHeader-I_IWLi_J.js} +1 -1
- package/dist/assets/{Pay-D1qVtYXO.js → Pay-BWM8ZekE.js} +1 -1
- package/dist/assets/{Player-WwC32zK4.js → Player-BUZdaSKw.js} +1 -1
- package/dist/assets/{Poivelle-w3LUq8sQ.js → Poivelle-CMxBTbVF.js} +1 -1
- package/dist/assets/{RealtimeCall-DEptKr-y.js → RealtimeCall-KU7v4FMN.js} +1 -1
- package/dist/assets/{ReportButton-DqBK7S8_.js → ReportButton-DBohgBX5.js} +1 -1
- package/dist/assets/{ReportDialog-BcyM6Mys.js → ReportDialog-C8y-vb_7.js} +1 -1
- package/dist/assets/{ScenarioPaymentMode-D9JSjV3-.js → ScenarioPaymentMode-Dr25voqT.js} +1 -1
- package/dist/assets/{ScheduledTasks-DlpEvJc3.js → ScheduledTasks-Db4Cgk3f.js} +1 -1
- package/dist/assets/{ServicePricingSummary-C1I-y6dH.js → ServicePricingSummary-CN_kQ9E8.js} +1 -1
- package/dist/assets/{ShowcaseGrid-6Ma1uGZt.js → ShowcaseGrid-D8Kp-zms.js} +1 -1
- package/dist/assets/{ShowcaseResultTabs-rMhxrzq3.js → ShowcaseResultTabs-B_aFfiMi.js} +1 -1
- package/dist/assets/{SolanaWalletPickerDialog-DmzZ-uJQ.js → SolanaWalletPickerDialog-Csxb3VVL.js} +1 -1
- package/dist/assets/{Status-CkzKt4ib.js → Status-rvZfPjPj.js} +1 -1
- package/dist/assets/{Subscribe-BwmBt3UL.js → Subscribe-BvWQReSy.js} +1 -1
- package/dist/assets/{TabSwitcher-Jf2B0-vC.js → TabSwitcher-DSv6B8Qg.js} +1 -1
- package/dist/assets/{Tts-BC01zHR_.js → Tts-CzUoWexU.js} +1 -1
- package/dist/assets/{VideoPlayer-CC3Fzeqq.js → VideoPlayer-ByFIN8Pz.js} +1 -1
- package/dist/assets/{VideoPreview-gtqNXvtJ.js → VideoPreview-DI5UZhOF.js} +1 -1
- package/dist/assets/{WriteSkillDialog-DxKxdZbp.js → WriteSkillDialog-njtydyP6.js} +1 -1
- package/dist/assets/{airwallexCheckout-CdX6OLbg.js → airwallexCheckout-BHNIy2Tw.js} +1 -1
- package/dist/assets/arrow-down-3ZwcPIyd.js +1 -0
- package/dist/assets/{arrow-down-wide-narrow-Bm2Z5o2d.js → arrow-down-wide-narrow-D-uOJGHw.js} +1 -1
- package/dist/assets/arrow-left-BUfU72AI.js +1 -0
- package/dist/assets/arrow-right-DU9hmChJ.js +1 -0
- package/dist/assets/arrow-up-CO5DClih.js +1 -0
- package/dist/assets/{authorizeFlow-IFKM_0Z8.js → authorizeFlow-dn4MchJ4.js} +1 -1
- package/dist/assets/{avatar-B1N5e5xG.js → avatar-D_IhQdl8.js} +1 -1
- package/dist/assets/{basic-7j1i_FPI.js → basic-DfXHoRBw.js} +1 -1
- package/dist/assets/{book-open-CnBkGve5.js → book-open-D4JeSvu4.js} +1 -1
- package/dist/assets/{box-C0GiZ7-u.js → box-BwvfBbaH.js} +1 -1
- package/dist/assets/{boxes-2cg2oc78.js → boxes-AV1PM_5l.js} +1 -1
- package/dist/assets/{brain-De0zKChZ.js → brain-D6NjGmAq.js} +1 -1
- package/dist/assets/{chart-no-axes-combined-DXPCYBnP.js → chart-no-axes-combined-CchjemK1.js} +1 -1
- package/dist/assets/{chat-D6FZdAFD.js → chat-1JKPdNAq.js} +1 -1
- package/dist/assets/{chat-D_cVYex_.js → chat-B7El78KB.js} +1 -1
- package/dist/assets/{chat-CsiZHLys.js → chat-BcTLs_NM.js} +1 -1
- package/dist/assets/{chat-lBYpL1ru.js → chat-Bxi3u7ju.js} +1 -1
- package/dist/assets/{chat-C2uqNw3P.js → chat-C-1vIYv4.js} +1 -1
- package/dist/assets/{chat-B3V3PQNf.js → chat-C0Su2-1J.js} +2 -2
- package/dist/assets/{chat-8q4HYSBH.js → chat-Cd1V35RN.js} +1 -1
- package/dist/assets/{chat-B_H4N5wh.js → chat-ChRpjtn3.js} +1 -1
- package/dist/assets/{chat-woD5EAiM.js → chat-DIPpKhoC.js} +1 -1
- package/dist/assets/{chat-4B5e6M7H.js → chat-DqhoZFnm.js} +1 -1
- package/dist/assets/{chat-Bk_GtTmW.js → chat-ZEPRHnOI.js} +1 -1
- package/dist/assets/{chat-Bi4-iPLs.js → chat-tVSSthP6.js} +1 -1
- package/dist/assets/{chat-CJbcUBPg.js → chat-v0-8emSy.js} +1 -1
- package/dist/assets/check-8okPvRJR.js +1 -0
- package/dist/assets/chevron-down-CE-v7C1Z.js +1 -0
- package/dist/assets/chevron-right-DRnWPhch.js +1 -0
- package/dist/assets/{circle-alert-FynFeKnI.js → circle-alert-CPUqplyh.js} +1 -1
- package/dist/assets/circle-check-PAy9V8Na.js +1 -0
- package/dist/assets/{circle-question-mark-C8xvGTGb.js → circle-question-mark-BdMy3-zg.js} +1 -1
- package/dist/assets/{clipboard-list-841pTGDa.js → clipboard-list-BlrQhAiR.js} +1 -1
- package/dist/assets/clock-BksO_Z0W.js +1 -0
- package/dist/assets/code-D-ejRMRt.js +1 -0
- package/dist/assets/{codingBridge-CyaSQuc1.js → codingBridge-DJQaspTz.js} +1 -1
- package/dist/assets/{codingBridgeNotify-CfKf4JbW.js → codingBridgeNotify-DYB7QEzg.js} +1 -1
- package/dist/assets/{coins-DA-dIOC6.js → coins-zEgi9zer.js} +1 -1
- package/dist/assets/{collapse-B_bQM9KN.js → collapse-ErXMQ5WV.js} +1 -1
- package/dist/assets/constants-C4mNoJOb.js +1 -0
- package/dist/assets/{copy-BNJ4Vvq_.js → copy-7FG4ee2f.js} +1 -1
- package/dist/assets/{createTaskActions-DtPQuKJS.js → createTaskActions-CrzF1_nG.js} +1 -1
- package/dist/assets/{date-picker-DRc3s80w.js → date-picker-ZMpEcBpW.js} +1 -1
- package/dist/assets/{digitalhuman-DsHsrai7.js → digitalhuman-DgMTY8rl.js} +1 -1
- package/dist/assets/{dollar-sign-B7sFSE65.js → dollar-sign-MqotZ43I.js} +1 -1
- package/dist/assets/{download-CAwranau.js → download-hDh-L00F.js} +1 -1
- package/dist/assets/{drawer-CkM_NHcO.js → drawer-fIKO5R-t.js} +1 -1
- package/dist/assets/{dropdown-Dq3sNHZD.js → dropdown-BpdvxDue.js} +1 -1
- package/dist/assets/{dropdown-BpefDnJp.js → dropdown-Br1nVdp7.js} +1 -1
- package/dist/assets/{ellipsis-POyVAzgA.js → ellipsis-DwHZbxHC.js} +1 -1
- package/dist/assets/{esm-Bf4QHayu.js → esm-DclO1JPL.js} +2 -2
- package/dist/assets/{external-link-eI3g6xpp.js → external-link-C29Uuu4h.js} +1 -1
- package/dist/assets/{eye-Ces_jYmy.js → eye-CgU_4WhV.js} +1 -1
- package/dist/assets/{file-COdWS7Yw.js → file-VWYkzRuc.js} +1 -1
- package/dist/assets/{file-output-Rckcbv_F.js → file-output-D92hF3YQ.js} +1 -1
- package/dist/assets/{file-text-DhO9-O7o.js → file-text-BHxDInDT.js} +1 -1
- package/dist/assets/{fish-DDjd2Wg6.js → fish-B9PEbkB-.js} +1 -1
- package/dist/assets/{flux-DepHkctW.js → flux-D8usFLyj.js} +1 -1
- package/dist/assets/{folder-B4Jjo77l.js → folder-C0Vt7TDW.js} +1 -1
- package/dist/assets/gauge-38IC0I72.js +1 -0
- package/dist/assets/{generationInput-Df1upTx9.js → generationInput-ChFil-22.js} +1 -1
- package/dist/assets/{globe-CEk5a0cn.js → globe-DsTAId5U.js} +1 -1
- package/dist/assets/{grokvideo-Co5-RZJD.js → grokvideo-CImTv2UN.js} +1 -1
- package/dist/assets/{hailuo-DMoPPvUl.js → hailuo-CbRlh5hS.js} +1 -1
- package/dist/assets/{headphones-DxEzVzix.js → headphones-DWwur3q7.js} +1 -1
- package/dist/assets/{history-P1COJCLH.js → history-DAREAhUe.js} +1 -1
- package/dist/assets/{house-qa6WrFu9.js → house-C63Sbnaj.js} +1 -1
- package/dist/assets/{i18n-3aZQnVTW.js → i18n-BEtZpGSv.js} +1 -1
- package/dist/assets/{image-DfZ-yD3f.js → image-YNq1hsaX.js} +1 -1
- package/dist/assets/{imageRequests-DIYH9CLr.js → imageRequests-CNbusBG4.js} +1 -1
- package/dist/assets/{index-BHXtbt9o.js → index-Dn-8sNW2.js} +4 -4
- package/dist/assets/{index.es-C_Gq4vgy.js → index.es-O4UnpgB0.js} +1 -1
- package/dist/assets/{info-xIzYgAiV.js → info-CX46K-2a.js} +1 -1
- package/dist/assets/{input-number-VyPGUhHP.js → input-number-DQQ_jclw.js} +1 -1
- package/dist/assets/{key-round-CL1Zurw8.js → key-round-Dx21hPfT.js} +1 -1
- package/dist/assets/{kling-C1-5IiSC.js → kling-CWzyPsGB.js} +1 -1
- package/dist/assets/{languages-CDk9EAaf.js → languages-ry74yECk.js} +1 -1
- package/dist/assets/{laptop-BlMF8fEG.js → laptop-CmGkKcLs.js} +1 -1
- package/dist/assets/{lightbulb-d6wy4poq.js → lightbulb-DEnEsxma.js} +1 -1
- package/dist/assets/{link-6giGq_cF.js → link-S80Vo5YT.js} +1 -1
- package/dist/assets/loader-circle-CMan_y4T.js +1 -0
- package/dist/assets/{lock-cFepzwhs.js → lock-BACuEQud.js} +1 -1
- package/dist/assets/{luma-Eq1wRQnR.js → luma-CsqOTNTl.js} +1 -1
- package/dist/assets/{maestro-0ulY9gMw.js → maestro-Dr6BVUlA.js} +1 -1
- package/dist/assets/{maestroLanguages-CczPeCVu.js → maestroLanguages-BvTWQBEt.js} +1 -1
- package/dist/assets/{mail-NnEBpr3-.js → mail-BjsX70Ra.js} +1 -1
- package/dist/assets/{message-circle-DBJKZmSe.js → message-circle-BnmUAMcf.js} +1 -1
- package/dist/assets/{mic-DPRovWzT.js → mic-Cy088pRc.js} +1 -1
- package/dist/assets/{midjourney-K2rr_-Oi.js → midjourney-C73M_okC.js} +1 -1
- package/dist/assets/{minimax-CauLdfeU.js → minimax-B_1MYCHz.js} +1 -1
- package/dist/assets/{mobileLocalExec-mQzutnPF.js → mobileLocalExec-DBwASoYt.js} +1 -1
- package/dist/assets/{models-CSuuDqRA.js → models-BWtS-s13.js} +1 -1
- package/dist/assets/{monitor-Cf_suH9d.js → monitor-B2Fsh0_H.js} +1 -1
- package/dist/assets/{mouse-pointer-2-CgCiODhx.js → mouse-pointer-2-CdL9cbWa.js} +1 -1
- package/dist/assets/music-2-DaPeZgoi.js +1 -0
- package/dist/assets/{nanobanana-yHjhfh57.js → nanobanana-DiMJfARU.js} +1 -1
- package/dist/assets/{omni-CauuzHoU.js → omni-CoYnCYnO.js} +1 -1
- package/dist/assets/{openaiimage-BR52tx59.js → openaiimage-CTa5az1H.js} +1 -1
- package/dist/assets/{pagination-DuM0KuRQ.js → pagination-BG96U0D_.js} +1 -1
- package/dist/assets/{pagination-SWvC0yg5.js → pagination-CoBnk3Ai.js} +1 -1
- package/dist/assets/{pagination-BeJR0FnO.js → pagination-D8iNbVKJ.js} +1 -1
- package/dist/assets/{palette-DldUt8tv.js → palette-COM7QAlM.js} +1 -1
- package/dist/assets/{paperclip-CWFcTsCu.js → paperclip-CiFF6idQ.js} +1 -1
- package/dist/assets/{pause-CCpGY3qg.js → pause-BOLN-wzc.js} +1 -1
- package/dist/assets/{pencil-CviRmSpy.js → pencil-2LG-UuFD.js} +1 -1
- package/dist/assets/{pika-CGSOn140.js → pika-CAtsFh44.js} +1 -1
- package/dist/assets/{pixverse-hqijNgdF.js → pixverse-DKsGFE5o.js} +1 -1
- package/dist/assets/play-tG5O8bbR.js +1 -0
- package/dist/assets/{plug-CCpoxaDM.js → plug-BRLAjEWN.js} +1 -1
- package/dist/assets/plus-oRS-6XRp.js +1 -0
- package/dist/assets/{poivelle-BetUJVZU.js → poivelle-G50BPl4d.js} +1 -1
- package/dist/assets/{popover-14jHG21y.js → popover-IhXMoX-P.js} +1 -1
- package/dist/assets/{producer-FVRoLWlQ.js → producer-DVOljhLQ.js} +1 -1
- package/dist/assets/{qrart-DyTDi4GZ.js → qrart-Dpl4PdcX.js} +1 -1
- package/dist/assets/{qwenimage-nE6zZ0LS.js → qwenimage-DwUPocYl.js} +1 -1
- package/dist/assets/{realtime-CWG_Ti28.js → realtime-FlQvxNn2.js} +1 -1
- package/dist/assets/{refresh-cw-LcYscKQ-.js → refresh-cw-7WsjAEts.js} +1 -1
- package/dist/assets/rotate-ccw-M5uJlVv8.js +1 -0
- package/dist/assets/rotate-cw-BclxKwik.js +1 -0
- package/dist/assets/{row-D_DEh6Xl.js → row-C3d900Dh.js} +1 -1
- package/dist/assets/search-MoJY2mLN.js +1 -0
- package/dist/assets/{seedance-6PiEj-B2.js → seedance-MsEPFoYf.js} +1 -1
- package/dist/assets/{seedream-yHV_q-Ae.js → seedream-_xRcvVI9.js} +1 -1
- package/dist/assets/{select-CD3MG9sV.js → select-BhxIomVL.js} +1 -1
- package/dist/assets/{serp-Cq0cLf_x.js → serp-C0xhKx9W.js} +1 -1
- package/dist/assets/{shield-Cm7slfR-.js → shield-2D4IamW1.js} +1 -1
- package/dist/assets/{showcase-DYvH5oMm.js → showcase-_a8WgiCY.js} +1 -1
- package/dist/assets/{showcaseRecreateMixin-CT2Cvorb.js → showcaseRecreateMixin-DnJxBt5l.js} +1 -1
- package/dist/assets/{shuffle-B1KYbijI.js → shuffle-CO64087x.js} +1 -1
- package/dist/assets/{siteHome-DDAyaghg.js → siteHome-2MMd6PGi.js} +1 -1
- package/dist/assets/{slider-BIlpcCpb.js → slider-BQmgjRhY.js} +1 -1
- package/dist/assets/{solana-wallets-DR-tBP0Q.js → solana-wallets-DM2n_fl5.js} +2 -2
- package/dist/assets/{sora-D3Oa75Xq.js → sora-E5QXxv5E.js} +1 -1
- package/dist/assets/{sparkles-DP6P2HKD.js → sparkles-BbBPUybn.js} +1 -1
- package/dist/assets/square-N1_hTOAE.js +1 -0
- package/dist/assets/{store-LrvK8rpV.js → store-BRVYdymv.js} +1 -1
- package/dist/assets/{suno-CLaEQFqS.js → suno-8BfJH1ZD.js} +1 -1
- package/dist/assets/{switch-CPDNjdtX.js → switch-CYqcNNsc.js} +1 -1
- package/dist/assets/{table-CTGYIkVp.js → table-C3DgtnsI.js} +1 -1
- package/dist/assets/{tabs-O76shONs.js → tabs-BRZesBUp.js} +1 -1
- package/dist/assets/{tag-CrzKKwWK.js → tag-CGAMSdmM.js} +1 -1
- package/dist/assets/{taskPolling-Cpolqm-4.js → taskPolling-BZB1PW-e.js} +1 -1
- package/dist/assets/terminal-DohjAQkV.js +1 -0
- package/dist/assets/{time-picker-CB3JdUZX.js → time-picker-DFBRIpMK.js} +1 -1
- package/dist/assets/{tooltip-BKeGCQnC.js → tooltip-DnBNFRyX.js} +1 -1
- package/dist/assets/{trash-2-1--IdOz8.js → trash-2-UoD61laP.js} +1 -1
- package/dist/assets/{triangle-alert-CsggA_lm.js → triangle-alert-hKICrvdJ.js} +1 -1
- package/dist/assets/{upload-QoHt30kH.js → upload-BHlKa9Ox.js} +1 -1
- package/dist/assets/{upload-C1ZLDC6M.js → upload-BK5O5g9h.js} +1 -1
- package/dist/assets/user-DsJxBb48.js +1 -0
- package/dist/assets/{veo-DgIXEVsh.js → veo-CiVi874k.js} +1 -1
- package/dist/assets/{video-ByywsO-8.js → video-Bktq2Sxg.js} +1 -1
- package/dist/assets/{volume-2-qWcpmyoS.js → volume-2-BGmJGVXb.js} +1 -1
- package/dist/assets/{wallet-BnFgg2rL.js → wallet-s-F28wTh.js} +1 -1
- package/dist/assets/{wan-CAJwbpzm.js → wan-QsfHInEx.js} +1 -1
- package/dist/assets/{wand-sparkles-D1YhC4me.js → wand-sparkles-C34nh3wP.js} +1 -1
- package/dist/assets/{web-BqjUMapP.js → web-DDV8fE0w.js} +1 -1
- package/dist/assets/{webextrator-D2P5CJFc.js → webextrator-DZfVHymI.js} +1 -1
- package/dist/assets/{zap-B41N3VAA.js → zap-CvvvDO7R.js} +1 -1
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/dist/assets/arrow-down-CSGt9t2E.js +0 -1
- package/dist/assets/arrow-left-l3XZii7G.js +0 -1
- package/dist/assets/arrow-right-DldGU1an.js +0 -1
- package/dist/assets/arrow-up-4Sf4V16e.js +0 -1
- package/dist/assets/check-Cmnz4Bu0.js +0 -1
- package/dist/assets/chevron-down-DHjWJMvN.js +0 -1
- package/dist/assets/chevron-right-hDs_4ftT.js +0 -1
- package/dist/assets/circle-check-CrhnV2f6.js +0 -1
- package/dist/assets/clock-B7yL_XXj.js +0 -1
- package/dist/assets/code-CDH4NELE.js +0 -1
- package/dist/assets/constants-BmcMHgPT.js +0 -1
- package/dist/assets/gauge-CCcCam0v.js +0 -1
- package/dist/assets/loader-circle-B3QYalEy.js +0 -1
- package/dist/assets/music-2-BgZoB-sB.js +0 -1
- package/dist/assets/play-gSzuLJWl.js +0 -1
- package/dist/assets/plus-CwKarPA6.js +0 -1
- package/dist/assets/rotate-ccw-Bo7KtpMu.js +0 -1
- package/dist/assets/rotate-cw-CD8xES6w.js +0 -1
- package/dist/assets/search-b_c_47BV.js +0 -1
- package/dist/assets/square-DuewWOOD.js +0 -1
- package/dist/assets/terminal-TymL8Q-5.js +0 -1
- package/dist/assets/user-avGCO_1o.js +0 -1
package/dist/assets/{SolanaWalletPickerDialog-DmzZ-uJQ.js → SolanaWalletPickerDialog-Csxb3VVL.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Jt as t,M as n,N as r,T as i,at as a,j as o,mt as s,rt as c,tt as l,z as u}from"./vendor-chart-Dw-P17PN.js";import{A as d,Ya as f}from"./index-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Jt as t,M as n,N as r,T as i,at as a,j as o,mt as s,rt as c,tt as l,z as u}from"./vendor-chart-Dw-P17PN.js";import{A as d,Ya as f}from"./index-Dn-8sNW2.js";var p=u({name:`SolanaWalletPickerDialog`,components:{ElDialog:f},props:{modelValue:{type:Boolean,required:!0},wallets:{type:Array,default:()=>[]},connecting:{type:Boolean,default:!1}},emits:[`select`,`update:modelValue`]}),m={class:`wallet-list`},h=[`disabled`,`onClick`],g=[`src`,`alt`],_={class:`wallet-list-name`},v={key:1,class:`wallet-list-status`};function y(u,d,f,p,y,b){let x=a(`el-dialog`);return l(),o(x,{"model-value":u.modelValue,title:u.$t(`order.message.x402ConnectWallet`),width:`420px`,"align-center":``,"onUpdate:modelValue":d[0]||=e=>u.$emit(`update:modelValue`,e)},{default:s(()=>[e(`div`,m,[(l(!0),r(i,null,c(u.wallets,i=>(l(),r(`button`,{key:i.adapter.name,class:`wallet-list-item`,disabled:u.connecting,onClick:e=>u.$emit(`select`,i)},[i.adapter.icon?(l(),r(`img`,{key:0,class:`wallet-list-icon`,src:i.adapter.icon,alt:i.adapter.name},null,8,g)):n(``,!0),e(`span`,_,t(i.adapter.name),1),i.readyState===`Installed`?(l(),r(`span`,v,t(u.$t(`order.message.x402WalletStatusDetected`)),1)):n(``,!0)],8,h))),128))])]),_:1},8,[`model-value`,`title`])}var b=d(p,[[`render`,y],[`__scopeId`,`data-v-1b1e66ba`]]);export{b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,K as a,L as o,M as s,N as c,T as l,at as u,j as d,mt as f,rt as p,tt as m,z as h}from"./vendor-chart-Dw-P17PN.js";import{F as ee}from"./icon-CDmWyIgD.js";import{n as g,t as _}from"./tabs-O76shONs.js";import{a as v,p as y,v as b}from"./models-CSuuDqRA.js";import{n as x,r as S}from"./radio-BNhFzeBO.js";import{t as C}from"./input-number-VyPGUhHP.js";import{t as w}from"./chart-no-axes-combined-DXPCYBnP.js";import{t as T}from"./check-Cmnz4Bu0.js";import{t as E}from"./coins-DA-dIOC6.js";import{t as D}from"./wallet-BnFgg2rL.js";import{O,T as k}from"./i18n-3aZQnVTW.js";import{A,Ai as j,B as M,Di as N,Ei as P,Fi as F,Hi as te,Ii as ne,Li as re,Mi as I,Ni as L,Oi as R,Ot as z,Pi as B,Ri as V,Ti as H,Vi as U,Ya as W,fi as G,io as K,ki as q,lt as J,no as Y,ra as X,ut as ie,wi as ae}from"./index-BHXtbt9o.js";import{t as Z}from"./CopyToClipboard-CaPuzTeQ.js";import{t as oe}from"./SolanaWalletPickerDialog-DmzZ-uJQ.js";var se=h({name:`ApplicationInfo`,components:{AnalyticsIcon:w,ConfirmIcon:T,CreditsIcon:E,ElButton:K,ElIcon:ee,ElTag:Y,CopyToClipboard:Z,WalletIcon:D},props:{application:{type:Object,required:!0},showType:{type:Boolean,default:!1},showId:{type:Boolean,default:!1}},emits:[`buy`,`usage`],computed:{showUsage(){return!this.application?.service||this.application.service.type===v.API},showPayment(){return J(this.application,this.$store.getters.site,{ios:k()})},remainingAmountText(){let e=Number(this.application?.remaining_amount??0);return!Number.isFinite(e)||e<0?`0.00`:e.toFixed(2)}}}),ce={class:`flex flex-col min-w-0`},le={key:0,class:`app-id-row`},ue={class:`icon !mb-0 flex-shrink-0`},de={class:`app-id-line`},fe={class:`app-id-label`},pe={class:`app-id-value`},me={key:1,class:`icon`},he={class:`text-left`},ge={class:`description`},_e={key:0},ve={key:1},ye={class:`value`},be={class:`description2`},xe={key:0},Se={key:1},Ce={class:`actions`};function we(n,a,l,p,h,ee){let g=u(`confirm-icon`),_=u(`el-icon`),v=u(`wallet-icon`),y=u(`copy-to-clipboard`),b=u(`el-tag`),x=u(`analytics-icon`),S=u(`el-button`),C=u(`credits-icon`);return m(),c(`div`,null,[e(`div`,ce,[o(_,{class:`check`},{default:f(()=>[o(g,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1}),n.showId?(m(),c(`div`,le,[e(`div`,ue,[o(v,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),e(`div`,de,[e(`span`,fe,i(n.$t(`application.field.id`))+`:`,1),e(`span`,pe,i(n.application.id),1),n.application.id?(m(),d(y,{key:0,content:n.application.id,class:`copy-small`},null,8,[`content`])):s(``,!0)])])):(m(),c(`div`,me,[o(v,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`div`,he,[e(`p`,ge,[n.application.service?(m(),c(`span`,ve,i(n.$t(`application.title.applicationBalance`,{service:n.application.service?.title})),1)):(m(),c(`span`,_e,i(n.$t(`application.title.globalBalance`)),1)),n.application.role===`grantee`?(m(),d(b,{key:2,class:`shared-badge`,size:`small`,type:`warning`,effect:`dark`,round:``},{default:f(()=>[r(i(n.$t(`application.badge.shared`)),1)]),_:1})):s(``,!0)]),e(`p`,ye,i(n.remainingAmountText)+` `+i(n.$t(`service.unit.`+(n.application?.service?.unit||`credit`)+`s`)),1),e(`p`,be,[n.application.type===`Period`?(m(),c(`span`,xe,i(n.$t(`application.field.expiredAt`))+`: `+i(n.$dayjs.format(n.application.expired_at)),1)):(m(),c(`span`,Se,i(n.$t(`application.message.neverExpire`)),1))])])]),e(`div`,Ce,[n.showUsage?(m(),d(S,{key:0,size:`small`,round:``,onClick:a[0]||=t(e=>n.$emit(`usage`,n.application),[`stop`])},{default:f(()=>[o(x,{class:`mr-1 text-[11px]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`application.button.usage`)),1)]),_:1})):s(``,!0),n.showPayment?(m(),d(S,{key:1,type:`primary`,round:``,size:`small`,onClick:a[1]||=t(e=>n.$emit(`buy`,n.application),[`stop`])},{default:f(()=>[o(C,{class:`mr-1 text-[11px]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`application.button.buyMore`)),1)]),_:1})):s(``,!0)])])}var Te=A(se,[[`render`,we],[`__scopeId`,`data-v-b768857b`]]);function Q(e,t){let n=e?.response?.data?.detail,r=Array.isArray(n)?n.find(e=>typeof e==`string`):n,i=typeof r==`string`&&r||typeof e?.response?.data?.error?.message==`string`&&e.response.data.error.message||typeof e?.message==`string`&&e.message||t,a=e?.response?.data?.trace_id;return typeof a==`string`&&a?`${i} (${a})`:i}var Ee=h({name:`ContinuousPaymentCard`,components:{ElButton:K,ElInputNumber:C,ElRadioButton:x,ElRadioGroup:S},props:{continuousOnly:{type:Boolean,default:!1}},data(){return{method:this.continuousOnly?`continuous`:`confirm`,dailyLimit:2,validDays:30,busy:!1}},computed:{activeAuthorization(){let e=I();return e?.state===`active`?e:void 0},disabledAuthorization(){let e=I();return e?.state===`disabled`?e:void 0},token(){return this.$store.state.token.access}},watch:{method:{immediate:!0,handler(e){V(e===`continuous`)}},activeAuthorization:{immediate:!0,handler(e){e&&(this.method=`continuous`)}}},methods:{formatAtomicUsdc:G,formatDate(e){return new Date(e).toLocaleDateString()},async onEnable(){let e=this.$wallet;if(this.token){this.busy=!0;try{if(this.disabledAuthorization){await F(this.token),b.success(String(this.$t(`common.x402Scenario.continuousPaymentsEnabled`)));return}await B({token:this.token,walletApi:e,dailyLimitAtomic:String(Math.round(this.dailyLimit*1e6)),expiryTs:Math.floor(Date.now()/1e3)+this.validDays*86400}),b.success(String(this.$t(`common.x402Scenario.continuousPaymentsEnabled`)))}catch(e){b.error(Q(e,String(this.$t(`order.message.x402PaymentFailed`))))}finally{this.busy=!1}}},async onDisable(){if(this.token){this.busy=!0;try{await L(this.token),this.method=`confirm`}finally{this.busy=!1}}},async onRevoke(){let e=this.$wallet;if(this.token){this.busy=!0;try{await re(this.token,e),this.method=`confirm`}catch(e){b.error(Q(e,String(this.$t(`order.message.x402PaymentFailed`))))}finally{this.busy=!1}}}}}),De={class:`continuous-payment`},Oe={class:`description`},ke={class:`details`},Ae={class:`actions`},je={class:`form`};function Me(t,n,a,p,h,ee){let g=u(`el-radio-button`),_=u(`el-radio-group`),v=u(`el-button`),y=u(`el-input-number`);return m(),c(`div`,De,[t.continuousOnly?s(``,!0):(m(),d(_,{key:0,modelValue:t.method,"onUpdate:modelValue":n[0]||=e=>t.method=e,size:`small`},{default:f(()=>[o(g,{value:`confirm`},{default:f(()=>[r(i(t.$t(`common.x402Scenario.payEachTime`)),1)]),_:1}),o(g,{value:`continuous`},{default:f(()=>[r(i(t.$t(`common.x402Scenario.continuousPayments`)),1)]),_:1})]),_:1},8,[`modelValue`])),t.method===`continuous`?(m(),c(l,{key:1},[e(`p`,Oe,i(t.$t(`common.x402Scenario.continuousPaymentsDescription`)),1),t.activeAuthorization?(m(),c(l,{key:0},[e(`div`,ke,[e(`span`,null,i(t.$t(`common.x402Scenario.dailyPaymentLimit`)),1),e(`strong`,null,i(t.formatAtomicUsdc(t.activeAuthorization.daily_limit_atomic))+` USDC`,1),e(`span`,null,i(t.$t(`common.x402Scenario.validUntil`)),1),e(`strong`,null,i(t.formatDate(t.activeAuthorization.expires_at)),1)]),e(`div`,Ae,[o(v,{loading:t.busy,onClick:t.onDisable},{default:f(()=>[r(i(t.$t(`common.x402Scenario.disableContinuousPayments`)),1)]),_:1},8,[`loading`,`onClick`]),o(v,{type:`danger`,plain:``,loading:t.busy,onClick:t.onRevoke},{default:f(()=>[r(i(t.$t(`common.x402Scenario.revokeAuthorization`)),1)]),_:1},8,[`loading`,`onClick`])])],64)):(m(),c(l,{key:1},[e(`div`,je,[e(`label`,null,[e(`span`,null,i(t.$t(`common.x402Scenario.dailyPaymentLimit`)),1),o(y,{modelValue:t.dailyLimit,"onUpdate:modelValue":n[1]||=e=>t.dailyLimit=e,min:.1,max:100,step:.1},null,8,[`modelValue`])]),e(`label`,null,[e(`span`,null,i(t.$t(`common.x402Scenario.validDays`)),1),o(y,{modelValue:t.validDays,"onUpdate:modelValue":n[2]||=e=>t.validDays=e,min:1,max:365},null,8,[`modelValue`])])]),o(v,{type:`primary`,loading:t.busy,onClick:t.onEnable},{default:f(()=>[r(i(t.$t(`common.x402Scenario.enableContinuousPayments`)),1)]),_:1},8,[`loading`,`onClick`])],64))],64)):s(``,!0)])}var Ne=h({name:`ApplicationStatus`,components:{WalletIcon:D,QrCode:M,ElButton:K,ElDialog:W,ElRadioButton:x,ElRadioGroup:S,ElTabPane:_,ElTabs:g,ElTag:Y,ApplicationInfo:Te,ContinuousPaymentCard:A(Ee,[[`render`,Me],[`__scopeId`,`data-v-de58361f`]]),CopyToClipboard:Z,SolanaWalletPickerDialog:oe},props:{application:{type:Object,default:void 0},applications:{type:Array,default:void 0},service:{type:Object,required:!0},scenario:{type:String,default:void 0}},emits:[`select`],data(){return{visible:!1,walletPickerVisible:!1,evmWalletPickerVisible:!1,evmWallets:[],walletConnectVisible:!1,walletConnectUri:void 0,walletConnecting:!1,applicationType:y}},computed:{walletAvailable(){return!!this.scenario&&U(this.scenario).walletAvailable},paymentMode:{get(){return this.scenario?U(this.scenario).mode:`credits`},set(e){this.scenario&&(te(e),e===`wallet`&&j(this.walletRail),e===`wallet`&&this.walletRail===`base`&&!this.evmAddress&&this.openEvmWalletPicker(),e===`wallet`&&this.walletRail===`solana`&&!this.solanaConnected&&(this.walletPickerVisible=!0))}},walletRail:{get(){return H()},set(e){j(e),e===`base`&&!this.evmAddress&&this.openEvmWalletPicker(),e===`solana`&&!this.solanaConnected&&(this.walletPickerVisible=!0)}},evmAddress(){return ae()?.address},shortEvmAddress(){let e=this.evmAddress||``;return e?`${e.slice(0,6)}…${e.slice(-4)}`:``},solanaConnected(){return!!this.$wallet?.connected?.value},solanaAddress(){return this.$wallet?.publicKey?.value?.toBase58?.()},shortSolanaAddress(){let e=this.solanaAddress||``;return e?`${e.slice(0,6)}…${e.slice(-6)}`:``},solanaWallets(){let e=this.$wallet?.wallets?.value||[],t=e=>e===`Installed`?0:e===`Loadable`?1:2;return[...e].sort((e,n)=>t(e.readyState)-t(n.readyState))},mobileDevice(){return/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)},shortWalletConnectUri(){let e=this.walletConnectUri||``;return e.length>32?`${e.slice(0,18)}…${e.slice(-10)}`:e},authenticated(){return!!this.$store.state.token.access},user(){return this.$store.state.user},balanceAmount(){return Number(this.application?.remaining_amount??0)},balanceUnit(){if(this.paymentMode===`wallet`)return this.walletConnected?``:this.$t(`common.x402Scenario.wallet`);let e=`service.unit.${this.application?.service?.unit||`credit`}`+(this.balanceAmount===1?``:`s`);return this.$t(e)},walletConnected(){return this.walletRail===`base`?!!this.evmAddress:this.solanaConnected},balanceText(){if(this.paymentMode===`wallet`)return this.walletRail===`base`?this.shortEvmAddress:this.solanaConnected?this.shortSolanaAddress:``;let e=this.balanceAmount;return Number.isFinite(e)?e>=1e3?Math.round(e).toLocaleString():e>=100?e.toFixed(1):e.toFixed(2):`0`},balanceTitle(){return`${this.balanceText} ${this.balanceUnit}`.trim()}},watch:{visible(e){e&&this.authenticated&&ne(this.$store.state.token.access).catch(()=>void 0)}},methods:{async openEvmWalletPicker(){this.evmWallets=await q(),this.evmWalletPickerVisible=!0},async connectEvmWallet(e){if(!this.walletConnecting){if(e.installUrl&&!e.provider){window.open(e.installUrl,`_blank`,`noopener,noreferrer`);return}this.walletConnecting=!0;try{if(e.kind===`walletconnect`)this.walletConnectUri=void 0,this.walletConnectVisible=!0,await N(e=>{this.walletConnectUri=e}),this.walletConnectVisible=!1;else{if(!e.provider)return;await P(e.provider)}j(`base`),this.evmWalletPickerVisible=!1,X(`base`,`scenario_status`)}catch(e){console.warn(`Base wallet connect failed`,e),b.error(String(this.$t(`coin.message.connectError`)))}finally{this.walletConnecting=!1}}},openWalletConnectUri(){this.walletConnectUri&&(window.location.href=this.walletConnectUri)},async disconnectEvmWallet(){await R()},async connectSolanaWallet(e){let t=this.$wallet,n=e?.adapter?.name;if(!(!t||!n||this.walletConnecting)){this.walletConnecting=!0;try{t.select(n),await a(),await t.connect(),j(`solana`),this.walletPickerVisible=!1,X(`solana`,`scenario_status`)}catch(e){console.warn(`wallet connect failed`,e),b.error(String(this.$t(`coin.message.connectError`)))}finally{this.walletConnecting=!1}}},async disconnectSolanaWallet(){await this.$wallet?.disconnect?.()},onGoUsage(e){let t={name:z,query:{application_id:e.id}};if(O()){this.visible=!1,this.$router.push(t);return}window.open(this.$router.resolve(t).href,`_blank`)},onBuyMore(e){let t=ie(e);if(t){if(O()){this.visible=!1,this.$router.push(t);return}window.open(this.$router.resolve(t).href,`_blank`)}},onSelectApplication(e){this.$emit(`select`,e)}}}),Pe={class:`status`},Fe={key:1},Ie={class:`text-center mb-4`},Le={class:`flex flex-col gap-4 mb-6 overflow-y-auto`},Re={key:2,class:`wallet-mode`},ze={class:`wallet-connected`},Be={class:`wallet-address`},Ve={class:`wallet-connected`},He={class:`wallet-address`},Ue={class:`wallet-hint`},We={class:`wallet-list`},Ge=[`disabled`,`onClick`],Ke=[`src`,`alt`],qe={class:`wallet-list-name`},Je={class:`wallet-list-status`},$={key:0,class:`wallet-hint`},Ye={class:`wallet-connect-panel`},Xe={key:0,class:`wallet-connect-qr`},Ze={key:1,class:`wallet-hint`},Qe={key:2,class:`wallet-connect-actions`},$e={class:`wallet-connect-uri`},et={class:`wallet-hint`},tt=[`title`],nt={class:`entry-amount`},rt={class:`entry-unit`};function it(t,a,h,ee,g,_){let v=u(`el-tab-pane`),y=u(`el-tabs`),b=u(`application-info`),x=u(`el-radio-button`),S=u(`el-radio-group`),C=u(`el-tag`),w=u(`el-button`),T=u(`continuous-payment-card`),E=u(`el-dialog`),D=u(`qr-code`),O=u(`copy-to-clipboard`),k=u(`solana-wallet-picker-dialog`),A=u(`wallet-icon`);return m(),c(`div`,Pe,[o(E,{modelValue:t.visible,"onUpdate:modelValue":a[3]||=e=>t.visible=e,class:`mt-12`,width:`450px`},{default:f(()=>[t.walletAvailable?(m(),d(y,{key:0,modelValue:t.paymentMode,"onUpdate:modelValue":a[0]||=e=>t.paymentMode=e,class:`payment-tabs`},{default:f(()=>[o(v,{label:t.$t(`common.x402Scenario.credits`),name:`credits`},null,8,[`label`]),o(v,{label:t.$t(`common.x402Scenario.wallet`),name:`wallet`},null,8,[`label`])]),_:1},8,[`modelValue`])):s(``,!0),t.paymentMode===`credits`&&t.application?(m(),c(`div`,Fe,[e(`p`,Ie,i(t.$t(`application.message.applicationSelection`)),1),e(`div`,Le,[(m(!0),c(l,null,p(t.applications,(e,r)=>(m(),d(b,{key:r,class:n({item:!0,active:t.application?.id===e.id}),application:e,"show-id":``,onClick:n=>t.onSelectApplication(e),onUsage:n=>t.onGoUsage(e),onBuy:n=>t.onBuyMore(e)},null,8,[`class`,`application`,`onClick`,`onUsage`,`onBuy`]))),128))])])):t.paymentMode===`wallet`?(m(),c(`div`,Re,[o(S,{modelValue:t.walletRail,"onUpdate:modelValue":a[1]||=e=>t.walletRail=e,size:`small`},{default:f(()=>[o(x,{value:`base`},{default:f(()=>[...a[8]||=[r(`Base`,-1)]]),_:1}),o(x,{value:`solana`},{default:f(()=>[...a[9]||=[r(`Solana`,-1)]]),_:1})]),_:1},8,[`modelValue`]),t.walletRail===`base`?(m(),c(l,{key:0},[t.evmAddress?(m(),c(l,{key:0},[e(`div`,ze,[o(C,{type:`success`},{default:f(()=>[r(i(t.$t(`order.message.x402WalletConnected`)),1)]),_:1}),e(`span`,Be,i(t.shortEvmAddress),1)]),o(w,{onClick:t.disconnectEvmWallet},{default:f(()=>[r(i(t.$t(`coin.button.disconnect`)),1)]),_:1},8,[`onClick`])],64)):(m(),d(w,{key:1,type:`primary`,onClick:t.openEvmWalletPicker},{default:f(()=>[r(i(t.$t(`order.message.x402ConnectWallet`)),1)]),_:1},8,[`onClick`]))],64)):(m(),c(l,{key:1},[t.solanaConnected&&t.solanaAddress?(m(),c(l,{key:0},[e(`div`,Ve,[o(C,{type:`success`},{default:f(()=>[r(i(t.$t(`order.message.x402WalletConnected`)),1)]),_:1}),e(`span`,He,i(t.shortSolanaAddress),1)]),o(w,{onClick:t.disconnectSolanaWallet},{default:f(()=>[r(i(t.$t(`coin.button.disconnect`)),1)]),_:1},8,[`onClick`]),t.authenticated?(m(),d(T,{key:0,"continuous-only":t.scenario===`chat`},null,8,[`continuous-only`])):s(``,!0)],64)):(m(),d(w,{key:1,type:`primary`,onClick:a[2]||=e=>t.walletPickerVisible=!0},{default:f(()=>[r(i(t.$t(`order.message.x402ConnectWallet`)),1)]),_:1}))],64)),e(`p`,Ue,i(t.$t(`common.x402Scenario.quoteBeforeSigning`)),1)])):s(``,!0)]),_:1},8,[`modelValue`]),o(E,{modelValue:t.evmWalletPickerVisible,"onUpdate:modelValue":a[4]||=e=>t.evmWalletPickerVisible=e,title:`Base`,width:`420px`},{default:f(()=>[e(`div`,We,[(m(!0),c(l,null,p(t.evmWallets,n=>(m(),c(`button`,{key:n.id,class:`wallet-list-item`,disabled:t.walletConnecting,onClick:e=>t.connectEvmWallet(n)},[n.icon?(m(),c(`img`,{key:0,class:`wallet-list-icon`,src:n.icon,alt:n.name},null,8,Ke)):s(``,!0),e(`span`,qe,i(n.name),1),e(`span`,Je,i(t.$t(n.kind===`walletconnect`?`order.message.x402WalletStatusQr`:n.readyState===`Detected`?`order.message.x402WalletStatusDetected`:`order.message.x402WalletStatusInstall`)),1)],8,Ge))),128)),t.evmWallets.length?s(``,!0):(m(),c(`p`,$,i(t.$t(`order.message.x402NoWalletDesc`)),1))])]),_:1},8,[`modelValue`]),o(E,{modelValue:t.walletConnectVisible,"onUpdate:modelValue":a[5]||=e=>t.walletConnectVisible=e,title:t.$t(`order.message.x402WalletConnectTitle`),width:`420px`},{default:f(()=>[e(`div`,Ye,[t.walletConnectUri?(m(),c(`div`,Xe,[o(D,{value:t.walletConnectUri,size:260,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])])):(m(),c(`p`,Ze,i(t.$t(`order.message.x402WalletConnectPreparing`)),1)),t.walletConnectUri?(m(),c(`div`,Qe,[t.mobileDevice?(m(),d(w,{key:0,type:`primary`,onClick:t.openWalletConnectUri},{default:f(()=>[r(i(t.$t(`order.message.x402WalletConnectOpenWallet`)),1)]),_:1},8,[`onClick`])):s(``,!0),e(`span`,$e,[r(i(t.shortWalletConnectUri)+` `,1),o(O,{content:t.walletConnectUri},null,8,[`content`])])])):s(``,!0),e(`p`,et,i(t.$t(`order.message.x402WalletConnectScanHint`)),1)])]),_:1},8,[`modelValue`,`title`]),o(k,{modelValue:t.walletPickerVisible,"onUpdate:modelValue":a[6]||=e=>t.walletPickerVisible=e,wallets:t.solanaWallets,connecting:t.walletConnecting,onSelect:t.connectSolanaWallet},null,8,[`modelValue`,`wallets`,`connecting`,`onSelect`]),e(`button`,{type:`button`,class:`entry`,title:t.balanceTitle,onClick:a[7]||=e=>t.visible=!0},[o(A,{class:`entry-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,nt,i(t.balanceText),1),e(`span`,rt,i(t.balanceUnit),1)],8,tt)])}var at=A(Ne,[[`render`,it],[`__scopeId`,`data-v-54bcdea3`]]);export{at as t};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,K as a,L as o,M as s,N as c,T as l,at as u,j as d,mt as f,rt as p,tt as m,z as h}from"./vendor-chart-Dw-P17PN.js";import{F as ee}from"./icon-CDmWyIgD.js";import{n as g,t as _}from"./tabs-BRZesBUp.js";import{a as v,p as y,v as b}from"./models-BWtS-s13.js";import{n as x,r as S}from"./radio-BNhFzeBO.js";import{t as C}from"./input-number-DQQ_jclw.js";import{t as w}from"./chart-no-axes-combined-CchjemK1.js";import{t as T}from"./check-8okPvRJR.js";import{t as E}from"./coins-zEgi9zer.js";import{t as D}from"./wallet-s-F28wTh.js";import{O,T as k}from"./i18n-BEtZpGSv.js";import{A,Ai as j,B as M,Di as N,Ei as P,Fi as F,Hi as te,Ii as ne,Li as re,Mi as I,Ni as L,Oi as R,Ot as z,Pi as B,Ri as V,Ti as H,Vi as U,Ya as W,fi as G,io as K,ki as q,lt as J,no as Y,ra as X,ut as ie,wi as ae}from"./index-Dn-8sNW2.js";import{t as Z}from"./CopyToClipboard-Db0qgR8j.js";import{t as oe}from"./SolanaWalletPickerDialog-Csxb3VVL.js";var se=h({name:`ApplicationInfo`,components:{AnalyticsIcon:w,ConfirmIcon:T,CreditsIcon:E,ElButton:K,ElIcon:ee,ElTag:Y,CopyToClipboard:Z,WalletIcon:D},props:{application:{type:Object,required:!0},showType:{type:Boolean,default:!1},showId:{type:Boolean,default:!1}},emits:[`buy`,`usage`],computed:{showUsage(){return!this.application?.service||this.application.service.type===v.API},showPayment(){return J(this.application,this.$store.getters.site,{ios:k()})},remainingAmountText(){let e=Number(this.application?.remaining_amount??0);return!Number.isFinite(e)||e<0?`0.00`:e.toFixed(2)}}}),ce={class:`flex flex-col min-w-0`},le={key:0,class:`app-id-row`},ue={class:`icon !mb-0 flex-shrink-0`},de={class:`app-id-line`},fe={class:`app-id-label`},pe={class:`app-id-value`},me={key:1,class:`icon`},he={class:`text-left`},ge={class:`description`},_e={key:0},ve={key:1},ye={class:`value`},be={class:`description2`},xe={key:0},Se={key:1},Ce={class:`actions`};function we(n,a,l,p,h,ee){let g=u(`confirm-icon`),_=u(`el-icon`),v=u(`wallet-icon`),y=u(`copy-to-clipboard`),b=u(`el-tag`),x=u(`analytics-icon`),S=u(`el-button`),C=u(`credits-icon`);return m(),c(`div`,null,[e(`div`,ce,[o(_,{class:`check`},{default:f(()=>[o(g,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1}),n.showId?(m(),c(`div`,le,[e(`div`,ue,[o(v,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),e(`div`,de,[e(`span`,fe,i(n.$t(`application.field.id`))+`:`,1),e(`span`,pe,i(n.application.id),1),n.application.id?(m(),d(y,{key:0,content:n.application.id,class:`copy-small`},null,8,[`content`])):s(``,!0)])])):(m(),c(`div`,me,[o(v,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`div`,he,[e(`p`,ge,[n.application.service?(m(),c(`span`,ve,i(n.$t(`application.title.applicationBalance`,{service:n.application.service?.title})),1)):(m(),c(`span`,_e,i(n.$t(`application.title.globalBalance`)),1)),n.application.role===`grantee`?(m(),d(b,{key:2,class:`shared-badge`,size:`small`,type:`warning`,effect:`dark`,round:``},{default:f(()=>[r(i(n.$t(`application.badge.shared`)),1)]),_:1})):s(``,!0)]),e(`p`,ye,i(n.remainingAmountText)+` `+i(n.$t(`service.unit.`+(n.application?.service?.unit||`credit`)+`s`)),1),e(`p`,be,[n.application.type===`Period`?(m(),c(`span`,xe,i(n.$t(`application.field.expiredAt`))+`: `+i(n.$dayjs.format(n.application.expired_at)),1)):(m(),c(`span`,Se,i(n.$t(`application.message.neverExpire`)),1))])])]),e(`div`,Ce,[n.showUsage?(m(),d(S,{key:0,size:`small`,round:``,onClick:a[0]||=t(e=>n.$emit(`usage`,n.application),[`stop`])},{default:f(()=>[o(x,{class:`mr-1 text-[11px]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`application.button.usage`)),1)]),_:1})):s(``,!0),n.showPayment?(m(),d(S,{key:1,type:`primary`,round:``,size:`small`,onClick:a[1]||=t(e=>n.$emit(`buy`,n.application),[`stop`])},{default:f(()=>[o(C,{class:`mr-1 text-[11px]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`application.button.buyMore`)),1)]),_:1})):s(``,!0)])])}var Te=A(se,[[`render`,we],[`__scopeId`,`data-v-b768857b`]]);function Q(e,t){let n=e?.response?.data?.detail,r=Array.isArray(n)?n.find(e=>typeof e==`string`):n,i=typeof r==`string`&&r||typeof e?.response?.data?.error?.message==`string`&&e.response.data.error.message||typeof e?.message==`string`&&e.message||t,a=e?.response?.data?.trace_id;return typeof a==`string`&&a?`${i} (${a})`:i}var Ee=h({name:`ContinuousPaymentCard`,components:{ElButton:K,ElInputNumber:C,ElRadioButton:x,ElRadioGroup:S},props:{continuousOnly:{type:Boolean,default:!1}},data(){return{method:this.continuousOnly?`continuous`:`confirm`,dailyLimit:2,validDays:30,busy:!1}},computed:{activeAuthorization(){let e=I();return e?.state===`active`?e:void 0},disabledAuthorization(){let e=I();return e?.state===`disabled`?e:void 0},token(){return this.$store.state.token.access}},watch:{method:{immediate:!0,handler(e){V(e===`continuous`)}},activeAuthorization:{immediate:!0,handler(e){e&&(this.method=`continuous`)}}},methods:{formatAtomicUsdc:G,formatDate(e){return new Date(e).toLocaleDateString()},async onEnable(){let e=this.$wallet;if(this.token){this.busy=!0;try{if(this.disabledAuthorization){await F(this.token),b.success(String(this.$t(`common.x402Scenario.continuousPaymentsEnabled`)));return}await B({token:this.token,walletApi:e,dailyLimitAtomic:String(Math.round(this.dailyLimit*1e6)),expiryTs:Math.floor(Date.now()/1e3)+this.validDays*86400}),b.success(String(this.$t(`common.x402Scenario.continuousPaymentsEnabled`)))}catch(e){b.error(Q(e,String(this.$t(`order.message.x402PaymentFailed`))))}finally{this.busy=!1}}},async onDisable(){if(this.token){this.busy=!0;try{await L(this.token),this.method=`confirm`}finally{this.busy=!1}}},async onRevoke(){let e=this.$wallet;if(this.token){this.busy=!0;try{await re(this.token,e),this.method=`confirm`}catch(e){b.error(Q(e,String(this.$t(`order.message.x402PaymentFailed`))))}finally{this.busy=!1}}}}}),De={class:`continuous-payment`},Oe={class:`description`},ke={class:`details`},Ae={class:`actions`},je={class:`form`};function Me(t,n,a,p,h,ee){let g=u(`el-radio-button`),_=u(`el-radio-group`),v=u(`el-button`),y=u(`el-input-number`);return m(),c(`div`,De,[t.continuousOnly?s(``,!0):(m(),d(_,{key:0,modelValue:t.method,"onUpdate:modelValue":n[0]||=e=>t.method=e,size:`small`},{default:f(()=>[o(g,{value:`confirm`},{default:f(()=>[r(i(t.$t(`common.x402Scenario.payEachTime`)),1)]),_:1}),o(g,{value:`continuous`},{default:f(()=>[r(i(t.$t(`common.x402Scenario.continuousPayments`)),1)]),_:1})]),_:1},8,[`modelValue`])),t.method===`continuous`?(m(),c(l,{key:1},[e(`p`,Oe,i(t.$t(`common.x402Scenario.continuousPaymentsDescription`)),1),t.activeAuthorization?(m(),c(l,{key:0},[e(`div`,ke,[e(`span`,null,i(t.$t(`common.x402Scenario.dailyPaymentLimit`)),1),e(`strong`,null,i(t.formatAtomicUsdc(t.activeAuthorization.daily_limit_atomic))+` USDC`,1),e(`span`,null,i(t.$t(`common.x402Scenario.validUntil`)),1),e(`strong`,null,i(t.formatDate(t.activeAuthorization.expires_at)),1)]),e(`div`,Ae,[o(v,{loading:t.busy,onClick:t.onDisable},{default:f(()=>[r(i(t.$t(`common.x402Scenario.disableContinuousPayments`)),1)]),_:1},8,[`loading`,`onClick`]),o(v,{type:`danger`,plain:``,loading:t.busy,onClick:t.onRevoke},{default:f(()=>[r(i(t.$t(`common.x402Scenario.revokeAuthorization`)),1)]),_:1},8,[`loading`,`onClick`])])],64)):(m(),c(l,{key:1},[e(`div`,je,[e(`label`,null,[e(`span`,null,i(t.$t(`common.x402Scenario.dailyPaymentLimit`)),1),o(y,{modelValue:t.dailyLimit,"onUpdate:modelValue":n[1]||=e=>t.dailyLimit=e,min:.1,max:100,step:.1},null,8,[`modelValue`])]),e(`label`,null,[e(`span`,null,i(t.$t(`common.x402Scenario.validDays`)),1),o(y,{modelValue:t.validDays,"onUpdate:modelValue":n[2]||=e=>t.validDays=e,min:1,max:365},null,8,[`modelValue`])])]),o(v,{type:`primary`,loading:t.busy,onClick:t.onEnable},{default:f(()=>[r(i(t.$t(`common.x402Scenario.enableContinuousPayments`)),1)]),_:1},8,[`loading`,`onClick`])],64))],64)):s(``,!0)])}var Ne=h({name:`ApplicationStatus`,components:{WalletIcon:D,QrCode:M,ElButton:K,ElDialog:W,ElRadioButton:x,ElRadioGroup:S,ElTabPane:_,ElTabs:g,ElTag:Y,ApplicationInfo:Te,ContinuousPaymentCard:A(Ee,[[`render`,Me],[`__scopeId`,`data-v-de58361f`]]),CopyToClipboard:Z,SolanaWalletPickerDialog:oe},props:{application:{type:Object,default:void 0},applications:{type:Array,default:void 0},service:{type:Object,required:!0},scenario:{type:String,default:void 0}},emits:[`select`],data(){return{visible:!1,walletPickerVisible:!1,evmWalletPickerVisible:!1,evmWallets:[],walletConnectVisible:!1,walletConnectUri:void 0,walletConnecting:!1,applicationType:y}},computed:{walletAvailable(){return!!this.scenario&&U(this.scenario).walletAvailable},paymentMode:{get(){return this.scenario?U(this.scenario).mode:`credits`},set(e){this.scenario&&(te(e),e===`wallet`&&j(this.walletRail),e===`wallet`&&this.walletRail===`base`&&!this.evmAddress&&this.openEvmWalletPicker(),e===`wallet`&&this.walletRail===`solana`&&!this.solanaConnected&&(this.walletPickerVisible=!0))}},walletRail:{get(){return H()},set(e){j(e),e===`base`&&!this.evmAddress&&this.openEvmWalletPicker(),e===`solana`&&!this.solanaConnected&&(this.walletPickerVisible=!0)}},evmAddress(){return ae()?.address},shortEvmAddress(){let e=this.evmAddress||``;return e?`${e.slice(0,6)}…${e.slice(-4)}`:``},solanaConnected(){return!!this.$wallet?.connected?.value},solanaAddress(){return this.$wallet?.publicKey?.value?.toBase58?.()},shortSolanaAddress(){let e=this.solanaAddress||``;return e?`${e.slice(0,6)}…${e.slice(-6)}`:``},solanaWallets(){let e=this.$wallet?.wallets?.value||[],t=e=>e===`Installed`?0:e===`Loadable`?1:2;return[...e].sort((e,n)=>t(e.readyState)-t(n.readyState))},mobileDevice(){return/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)},shortWalletConnectUri(){let e=this.walletConnectUri||``;return e.length>32?`${e.slice(0,18)}…${e.slice(-10)}`:e},authenticated(){return!!this.$store.state.token.access},user(){return this.$store.state.user},balanceAmount(){return Number(this.application?.remaining_amount??0)},balanceUnit(){if(this.paymentMode===`wallet`)return this.walletConnected?``:this.$t(`common.x402Scenario.wallet`);let e=`service.unit.${this.application?.service?.unit||`credit`}`+(this.balanceAmount===1?``:`s`);return this.$t(e)},walletConnected(){return this.walletRail===`base`?!!this.evmAddress:this.solanaConnected},balanceText(){if(this.paymentMode===`wallet`)return this.walletRail===`base`?this.shortEvmAddress:this.solanaConnected?this.shortSolanaAddress:``;let e=this.balanceAmount;return Number.isFinite(e)?e>=1e3?Math.round(e).toLocaleString():e>=100?e.toFixed(1):e.toFixed(2):`0`},balanceTitle(){return`${this.balanceText} ${this.balanceUnit}`.trim()}},watch:{visible(e){e&&this.authenticated&&ne(this.$store.state.token.access).catch(()=>void 0)}},methods:{async openEvmWalletPicker(){this.evmWallets=await q(),this.evmWalletPickerVisible=!0},async connectEvmWallet(e){if(!this.walletConnecting){if(e.installUrl&&!e.provider){window.open(e.installUrl,`_blank`,`noopener,noreferrer`);return}this.walletConnecting=!0;try{if(e.kind===`walletconnect`)this.walletConnectUri=void 0,this.walletConnectVisible=!0,await N(e=>{this.walletConnectUri=e}),this.walletConnectVisible=!1;else{if(!e.provider)return;await P(e.provider)}j(`base`),this.evmWalletPickerVisible=!1,X(`base`,`scenario_status`)}catch(e){console.warn(`Base wallet connect failed`,e),b.error(String(this.$t(`coin.message.connectError`)))}finally{this.walletConnecting=!1}}},openWalletConnectUri(){this.walletConnectUri&&(window.location.href=this.walletConnectUri)},async disconnectEvmWallet(){await R()},async connectSolanaWallet(e){let t=this.$wallet,n=e?.adapter?.name;if(!(!t||!n||this.walletConnecting)){this.walletConnecting=!0;try{t.select(n),await a(),await t.connect(),j(`solana`),this.walletPickerVisible=!1,X(`solana`,`scenario_status`)}catch(e){console.warn(`wallet connect failed`,e),b.error(String(this.$t(`coin.message.connectError`)))}finally{this.walletConnecting=!1}}},async disconnectSolanaWallet(){await this.$wallet?.disconnect?.()},onGoUsage(e){let t={name:z,query:{application_id:e.id}};if(O()){this.visible=!1,this.$router.push(t);return}window.open(this.$router.resolve(t).href,`_blank`)},onBuyMore(e){let t=ie(e);if(t){if(O()){this.visible=!1,this.$router.push(t);return}window.open(this.$router.resolve(t).href,`_blank`)}},onSelectApplication(e){this.$emit(`select`,e)}}}),Pe={class:`status`},Fe={key:1},Ie={class:`text-center mb-4`},Le={class:`flex flex-col gap-4 mb-6 overflow-y-auto`},Re={key:2,class:`wallet-mode`},ze={class:`wallet-connected`},Be={class:`wallet-address`},Ve={class:`wallet-connected`},He={class:`wallet-address`},Ue={class:`wallet-hint`},We={class:`wallet-list`},Ge=[`disabled`,`onClick`],Ke=[`src`,`alt`],qe={class:`wallet-list-name`},Je={class:`wallet-list-status`},$={key:0,class:`wallet-hint`},Ye={class:`wallet-connect-panel`},Xe={key:0,class:`wallet-connect-qr`},Ze={key:1,class:`wallet-hint`},Qe={key:2,class:`wallet-connect-actions`},$e={class:`wallet-connect-uri`},et={class:`wallet-hint`},tt=[`title`],nt={class:`entry-amount`},rt={class:`entry-unit`};function it(t,a,h,ee,g,_){let v=u(`el-tab-pane`),y=u(`el-tabs`),b=u(`application-info`),x=u(`el-radio-button`),S=u(`el-radio-group`),C=u(`el-tag`),w=u(`el-button`),T=u(`continuous-payment-card`),E=u(`el-dialog`),D=u(`qr-code`),O=u(`copy-to-clipboard`),k=u(`solana-wallet-picker-dialog`),A=u(`wallet-icon`);return m(),c(`div`,Pe,[o(E,{modelValue:t.visible,"onUpdate:modelValue":a[3]||=e=>t.visible=e,class:`mt-12`,width:`450px`},{default:f(()=>[t.walletAvailable?(m(),d(y,{key:0,modelValue:t.paymentMode,"onUpdate:modelValue":a[0]||=e=>t.paymentMode=e,class:`payment-tabs`},{default:f(()=>[o(v,{label:t.$t(`common.x402Scenario.credits`),name:`credits`},null,8,[`label`]),o(v,{label:t.$t(`common.x402Scenario.wallet`),name:`wallet`},null,8,[`label`])]),_:1},8,[`modelValue`])):s(``,!0),t.paymentMode===`credits`&&t.application?(m(),c(`div`,Fe,[e(`p`,Ie,i(t.$t(`application.message.applicationSelection`)),1),e(`div`,Le,[(m(!0),c(l,null,p(t.applications,(e,r)=>(m(),d(b,{key:r,class:n({item:!0,active:t.application?.id===e.id}),application:e,"show-id":``,onClick:n=>t.onSelectApplication(e),onUsage:n=>t.onGoUsage(e),onBuy:n=>t.onBuyMore(e)},null,8,[`class`,`application`,`onClick`,`onUsage`,`onBuy`]))),128))])])):t.paymentMode===`wallet`?(m(),c(`div`,Re,[o(S,{modelValue:t.walletRail,"onUpdate:modelValue":a[1]||=e=>t.walletRail=e,size:`small`},{default:f(()=>[o(x,{value:`base`},{default:f(()=>[...a[8]||=[r(`Base`,-1)]]),_:1}),o(x,{value:`solana`},{default:f(()=>[...a[9]||=[r(`Solana`,-1)]]),_:1})]),_:1},8,[`modelValue`]),t.walletRail===`base`?(m(),c(l,{key:0},[t.evmAddress?(m(),c(l,{key:0},[e(`div`,ze,[o(C,{type:`success`},{default:f(()=>[r(i(t.$t(`order.message.x402WalletConnected`)),1)]),_:1}),e(`span`,Be,i(t.shortEvmAddress),1)]),o(w,{onClick:t.disconnectEvmWallet},{default:f(()=>[r(i(t.$t(`coin.button.disconnect`)),1)]),_:1},8,[`onClick`])],64)):(m(),d(w,{key:1,type:`primary`,onClick:t.openEvmWalletPicker},{default:f(()=>[r(i(t.$t(`order.message.x402ConnectWallet`)),1)]),_:1},8,[`onClick`]))],64)):(m(),c(l,{key:1},[t.solanaConnected&&t.solanaAddress?(m(),c(l,{key:0},[e(`div`,Ve,[o(C,{type:`success`},{default:f(()=>[r(i(t.$t(`order.message.x402WalletConnected`)),1)]),_:1}),e(`span`,He,i(t.shortSolanaAddress),1)]),o(w,{onClick:t.disconnectSolanaWallet},{default:f(()=>[r(i(t.$t(`coin.button.disconnect`)),1)]),_:1},8,[`onClick`]),t.authenticated?(m(),d(T,{key:0,"continuous-only":t.scenario===`chat`},null,8,[`continuous-only`])):s(``,!0)],64)):(m(),d(w,{key:1,type:`primary`,onClick:a[2]||=e=>t.walletPickerVisible=!0},{default:f(()=>[r(i(t.$t(`order.message.x402ConnectWallet`)),1)]),_:1}))],64)),e(`p`,Ue,i(t.$t(`common.x402Scenario.quoteBeforeSigning`)),1)])):s(``,!0)]),_:1},8,[`modelValue`]),o(E,{modelValue:t.evmWalletPickerVisible,"onUpdate:modelValue":a[4]||=e=>t.evmWalletPickerVisible=e,title:`Base`,width:`420px`},{default:f(()=>[e(`div`,We,[(m(!0),c(l,null,p(t.evmWallets,n=>(m(),c(`button`,{key:n.id,class:`wallet-list-item`,disabled:t.walletConnecting,onClick:e=>t.connectEvmWallet(n)},[n.icon?(m(),c(`img`,{key:0,class:`wallet-list-icon`,src:n.icon,alt:n.name},null,8,Ke)):s(``,!0),e(`span`,qe,i(n.name),1),e(`span`,Je,i(t.$t(n.kind===`walletconnect`?`order.message.x402WalletStatusQr`:n.readyState===`Detected`?`order.message.x402WalletStatusDetected`:`order.message.x402WalletStatusInstall`)),1)],8,Ge))),128)),t.evmWallets.length?s(``,!0):(m(),c(`p`,$,i(t.$t(`order.message.x402NoWalletDesc`)),1))])]),_:1},8,[`modelValue`]),o(E,{modelValue:t.walletConnectVisible,"onUpdate:modelValue":a[5]||=e=>t.walletConnectVisible=e,title:t.$t(`order.message.x402WalletConnectTitle`),width:`420px`},{default:f(()=>[e(`div`,Ye,[t.walletConnectUri?(m(),c(`div`,Xe,[o(D,{value:t.walletConnectUri,size:260,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])])):(m(),c(`p`,Ze,i(t.$t(`order.message.x402WalletConnectPreparing`)),1)),t.walletConnectUri?(m(),c(`div`,Qe,[t.mobileDevice?(m(),d(w,{key:0,type:`primary`,onClick:t.openWalletConnectUri},{default:f(()=>[r(i(t.$t(`order.message.x402WalletConnectOpenWallet`)),1)]),_:1},8,[`onClick`])):s(``,!0),e(`span`,$e,[r(i(t.shortWalletConnectUri)+` `,1),o(O,{content:t.walletConnectUri},null,8,[`content`])])])):s(``,!0),e(`p`,et,i(t.$t(`order.message.x402WalletConnectScanHint`)),1)])]),_:1},8,[`modelValue`,`title`]),o(k,{modelValue:t.walletPickerVisible,"onUpdate:modelValue":a[6]||=e=>t.walletPickerVisible=e,wallets:t.solanaWallets,connecting:t.walletConnecting,onSelect:t.connectSolanaWallet},null,8,[`modelValue`,`wallets`,`connecting`,`onSelect`]),e(`button`,{type:`button`,class:`entry`,title:t.balanceTitle,onClick:a[7]||=e=>t.visible=!0},[o(A,{class:`entry-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,nt,i(t.balanceText),1),e(`span`,rt,i(t.balanceUnit),1)],8,tt)])}var at=A(Ne,[[`render`,it],[`__scopeId`,`data-v-54bcdea3`]]);export{at as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{m,p as h,v as g}from"./models-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{m,p as h,v as g}from"./models-BWtS-s13.js";import{t as _}from"./card-IQwqnRJR.js";import{n as v,t as y}from"./row-C3d900Dh.js";import{t as b}from"./empty-C5KjRN0h.js";import{t as x}from"./skeleton-Dj_a_iIP.js";import{t as S}from"./check-8okPvRJR.js";import"./constants-C4mNoJOb.js";import{T as C,c as w,h as T,o as E}from"./i18n-BEtZpGSv.js";import{A as D,Ha as O,Xi as k,Xr as A,bt as j,io as M,no as N,ta as P,ti as F,wn as I,wt as L,yt as R}from"./index-Dn-8sNW2.js";var z=p({name:`ConsoleSubscriptionBuy`,components:{CloseIcon:O,ConfirmIcon:S,ElSkeleton:x,ElRow:y,ElTag:N,ElCol:v,ElCard:_,ElEmpty:b,ElButton:M},data(){return{application:void 0,application2:void 0,usageApplication:void 0,type:h.PERIOD,services:[],loading:!1,loadFailed:!1,creating:!1,creatingUsageApplication:!1,subscription:void 0}},computed:{site(){return this.$store.getters.site},applicationId(){return this.$route.params?.id?.toString()},showPayment(){return!C()},effectiveMarkupRatio(){return w(this.application2,this.site)},pricingAvailable(){return this.effectiveMarkupRatio!==void 0},subscriptions(){let e=[{name:`WEEK`,label:this.$t(`console.subscription.weekly`),description:this.$t(`console.subscription.weekly.description`),duration:10080*60},{name:`MONTH`,label:this.$t(`console.subscription.monthly`),description:this.$t(`console.subscription.monthly.description`),duration:720*60*60},{name:`YEAR`,tag:this.$t(`console.button.suggested`),label:this.$t(`console.subscription.yearly`),description:this.$t(`console.subscription.yearly.description`),duration:365*24*60*60}];for(let t of e){console.log(`item`,t);let e=this.getPackages(t.duration);console.log(`pkgs`,e),t.available=e.length>0&&this.effectiveMarkupRatio!==void 0,t.available&&(t.price=E(e.reduce((e,t)=>e+t.price,0),this.effectiveMarkupRatio));for(let n of e)t.benefits||=[],t.benefits.push({enabled:!0,content:`${n?.service?.title} - ${n.amount} `+this.$t(`service.unit.`+n?.service?.unit+`s`)});t.benefits?.push({enabled:t.name!==`WEEK`,content:this.$t(`console.message.benefit1`)}),t.benefits?.push({enabled:t.name!==`WEEK`,content:this.$t(`console.message.benefit2`)})}return e},service(){return this.application?.service},serviceIds(){return!this.application||!this.application.service?[]:[this.application.service.id]}},async mounted(){if(T(this.$store.getters.site)){this.$router.replace({name:j});return}await this.onInitialize()},methods:{async onInitialize(){this.loading=!0,this.loadFailed=!1;try{if(await this.onFetchApplication(),this.application?.role===`grantee`){this.$router.replace({name:j});return}await this.onFetchApplication2(),this.onFetchUsageApplication(),await this.onCreateApplications(),this.subscription=this.subscriptions.find(e=>e.available)}catch{this.loadFailed=!0}finally{this.loading=!1}},getPriceString:I,async onBuyExtra(){if(!this.creatingUsageApplication){this.creatingUsageApplication=!0;try{if(!this.usageApplication?.id&&this.service?.id)try{let{data:e}=await k.create({service_id:this.service.id,type:h.USAGE});this.usageApplication=e}catch(e){if(e?.response?.data?.code!==`duplication`){g.error(this.$t(`application.message.createFailed`));return}try{await this.onFetchUsageApplication()}catch{g.error(this.$t(`application.message.fetchFailed`));return}}if(!this.usageApplication?.id){g.error(this.$t(`console.message.applicationNotFound`));return}this.$router.push({name:R,params:{id:this.usageApplication.id}})}finally{this.creatingUsageApplication=!1}}},getPackages(e){let t=[];if(!this.service)return[];let n=[this.service].sort((e,t)=>this.serviceIds.indexOf(e.id)-this.serviceIds.indexOf(t.id));for(let r of n){let n=r.packages?.find(t=>t.type===m.PERIOD&&t.duration===e);n&&t.push({...n,service:r})}return t},async onCreateApplications(){let e=[];if(this.application2||e.push(this.application?.service?.id),e.length>0){for(let t of e)await k.create({service_id:t,type:h.PERIOD});await this.onFetchApplication2()}},onChangeType(){console.log(`onChangeType`,this.type),this.$router.push({name:R,params:this.$route.params})},async onFetchServices(){let{data:e}=await A.getAll({id:this.serviceIds});this.services=e.items,console.debug(`services`,this.services)},async onFetchApplication(){let{data:e}=await k.get(this.applicationId);this.application=e,console.debug(`application`,this.application)},async onFetchApplication2(){let{data:e}=await k.getAll({limit:100,offset:0,user_id:this.$store.getters.user.id,ordering:`-created_at`,service_id:this.serviceIds,type:h.PERIOD});this.application2=e.items?.[0],console.debug(`application2`,this.application2)},async onFetchUsageApplication(){let{data:e}=await k.getAll({limit:1,offset:0,user_id:this.$store.getters.user.id,ordering:`-created_at`,service_id:this.serviceIds,type:h.USAGE});this.usageApplication=e.items?.[0]},onCreateOrder(e){let t=this.getPackages(e.duration);if(!(!this.pricingAvailable||!e.available||t.length===0)){if(this.subscription=e,this.creating=!0,!this.application2||!this.application2.id){g.error(this.$t(`console.message.applicationNotFound`)),this.creating=!1;return}P(`payment_initiated`,{service:this.service?.alias,action:`subscribe`,duration:e.duration}),F.create({application_ids:[this.application2.id],package_ids:t.map(e=>e.id),description:this.service?.title+` - `+e.label}).then(({data:e})=>{this.creating=!1,this.$router.push({name:L,params:{id:e.id}})}).catch(e=>{g.error(this.$t(`order.message.createFailed`)),this.creating=!1,P(`payment_failed`,{service:this.service?.alias,action:`subscribe`,error:e?.response?.data?.error?.message??String(e)})})}}}}),B={class:`title`},V={class:`introduction`},H={key:1,class:`text-center`},U={class:`name`},W={class:`price`},G={key:1,class:`text-[var(--el-text-color-secondary)]`},K={class:`description`},q={class:`benefits`},J={class:`operations`},Y={key:3,class:`extra`};function X(p,m,h,g,_,v){let y=c(`el-col`),b=c(`el-row`),x=c(`el-empty`),S=c(`el-skeleton`),C=c(`el-button`),w=c(`el-tag`),T=c(`confirm-icon`),E=c(`close-icon`),D=c(`el-card`);return f(),l(b,{class:`panel`},{default:u(()=>[i(y,{span:24},{default:u(()=>[i(b,null,{default:u(()=>[i(y,{span:24},{default:u(()=>[e(`h2`,B,r(p.$t(`common.title.buyMore`)),1)]),_:1})]),_:1}),i(b,null,{default:u(()=>[i(y,{span:24},{default:u(()=>[i(D,{shadow:`hover`,class:`card`},{default:u(()=>[i(b,null,{default:u(()=>[p.showPayment?(f(),l(y,{key:1,class:`max-w-4xl mx-auto`},{default:u(()=>[e(`p`,V,r(p.$t(`console.subscription.title`)),1),p.loading?(f(),l(S,{key:0})):p.loadFailed?(f(),o(`div`,H,[i(x,{description:p.$t(`common.message.noData`)},null,8,[`description`]),i(C,{type:`primary`,round:``,onClick:p.onInitialize},{default:u(()=>[n(r(p.$t(`common.button.refresh`)),1)]),_:1},8,[`onClick`])])):(f(),l(b,{key:2,gutter:15,class:`subscriptions`},{default:u(()=>[(f(!0),o(s,null,d(p.subscriptions,(c,m)=>(f(),l(y,{key:m,xs:24,md:24/(p.subscriptions?.length||4)},{default:u(()=>[i(D,{shadow:`hover`,class:t({subscription:!0,active:p.subscription?.name===c.name,disabled:!c.available}),onClick:e=>c.available&&(p.subscription=c)},{default:u(()=>[e(`h4`,U,[n(r(c.label)+` `,1),c.tag?(f(),l(w,{key:0,type:`warning`},{default:u(()=>[n(r(c.tag),1)]),_:2},1024)):a(``,!0)]),e(`h2`,W,[c.price===void 0?(f(),o(`span`,G,r(p.$t(`common.message.noData`)),1)):(f(),o(s,{key:0},[n(r(p.getPriceString({value:c.price})),1)],64))]),e(`p`,K,r(c.description),1),e(`div`,q,[(f(!0),o(s,null,d(c.benefits,(t,n)=>(f(),o(`div`,{key:n,class:`benefit`},[t.enabled?(f(),l(T,{key:0,class:`icon icon-check`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(f(),l(E,{key:1,class:`icon icon-xmark`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,r(t.content),1)]))),128))]),e(`div`,J,[p.showPayment?(f(),l(C,{key:0,class:`btn btn-subscribe`,type:p.subscription?.name===c?.name?`primary`:``,disabled:!c.available,round:``,onClick:e=>p.onCreateOrder(c)},{default:u(()=>[n(r(p.$t(`common.button.buy`)),1)]),_:1},8,[`type`,`disabled`,`onClick`])):a(``,!0)])]),_:2},1032,[`class`,`onClick`])]),_:2},1032,[`md`]))),128))]),_:1})),!p.loading&&!p.loadFailed&&p.showPayment?(f(),o(`div`,Y,[e(`span`,null,r(p.$t(`console.message.doNotWantSubscribe`)),1),i(C,{type:`primary`,class:`btn btn-extra`,round:``,size:`small`,loading:p.creatingUsageApplication,onClick:p.onBuyExtra},{default:u(()=>[n(r(p.$t(`console.message.buyExtra`)),1)]),_:1},8,[`loading`,`onClick`])])):a(``,!0)]),_:1})):(f(),l(y,{key:0,class:`max-w-4xl mx-auto`},{default:u(()=>[i(x,{description:p.$t(`common.message.noData`)},null,8,[`description`])]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var Z=D(z,[[`render`,X],[`__scopeId`,`data-v-45345ecd`]]);export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{L as e,at as t,j as n,mt as r,tt as i,z as a}from"./vendor-chart-Dw-P17PN.js";import{n as o,t as s}from"./tabs-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{L as e,at as t,j as n,mt as r,tt as i,z as a}from"./vendor-chart-Dw-P17PN.js";import{n as o,t as s}from"./tabs-BRZesBUp.js";import{A as c,It as l,Lt as u}from"./index-Dn-8sNW2.js";var d=a({name:`FishTabSwitcher`,components:{ElTabs:o,ElTabPane:s},data(){return{ROUTE_FISH_TTS_INDEX:u,ROUTE_FISH_MODEL_INDEX:l}},computed:{active(){return(this.$route?.name||``)===`fish-model-index`?l:u}},methods:{onUpdate(e){let t=String(e);t!==this.active&&this.$router.push({name:t})}}});function f(a,o,s,c,l,u){let d=t(`el-tab-pane`),f=t(`el-tabs`);return i(),n(f,{"model-value":a.active,class:`fish-tabs scenario-tabs scenario-tabs--divided`,"onUpdate:modelValue":a.onUpdate},{default:r(()=>[e(d,{label:a.$t(`fish.tab.tts`),name:a.ROUTE_FISH_TTS_INDEX},null,8,[`label`,`name`]),e(d,{label:a.$t(`fish.tab.model`),name:a.ROUTE_FISH_MODEL_INDEX},null,8,[`label`,`name`])]),_:1},8,[`model-value`,`onUpdate:modelValue`])}var p=c(d,[[`render`,f],[`__scopeId`,`data-v-f942a514`]]);export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,j as u,mt as d,rt as f,tt as p,z as m}from"./vendor-chart-Dw-P17PN.js";import{n as h,r as g,t as _}from"./select-CD3MG9sV.js";import{t as v}from"./upload-QoHt30kH.js";import{t as y}from"./tooltip-BKeGCQnC.js";import{t as b}from"./alert-BprQRUmf.js";import{h as x,v as S}from"./models-CSuuDqRA.js";import{t as C}from"./slider-BIlpcCpb.js";import{t as w}from"./segmented-D0zHdf9D.js";import{t as T}from"./clock-B7yL_XXj.js";import{i as E,n as D,r as O,s as k,t as A}from"./pagination-BeJR0FnO.js";import{t as ee}from"./info-xIzYgAiV.js";import{t as j}from"./mic-DPRovWzT.js";import{t as M}from"./rotate-ccw-Bo7KtpMu.js";import{t as N}from"./trash-2-1--IdOz8.js";import{t as te}from"./triangle-alert-CsggA_lm.js";import{t as ne}from"./upload-C1ZLDC6M.js";import{t as P}from"./wand-sparkles-D1YhC4me.js";import{_t as re,mt as ie,vt as F}from"./constants-BmcMHgPT.js";import{A as I,Ba as L,Cn as R,Gn as z,O as B,Ua as V,Wa as H,at as U,ca as W,ea as G,fo as K,io as q,it as J,ot as Y}from"./index-BHXtbt9o.js";import{t as ae}from"./CopyToClipboard-CaPuzTeQ.js";import{t as oe}from"./ReportButton-DqBK7S8_.js";import{t as se}from"./ServicePricingSummary-C1I-y6dH.js";import{t as ce}from"./ApiCodeButton-DBIIyPcm.js";import{t as le}from"./BotPlaceholder-D9exsWtJ.js";import{t as ue}from"./taskPollingMixin-CcLxtz8z.js";import{t as de}from"./Hailuo-Dqi6oENw.js";import{t as fe}from"./TabSwitcher-Jf2B0-vC.js";import{t as pe}from"./ShowcaseResultTabs-rMhxrzq3.js";import{t as me}from"./showcaseRecreateMixin-CT2Cvorb.js";var he=V(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),ge=m({name:`FishTextInput`,components:{PromptTextarea:E},computed:{text:{get(){return this.$store.state.fish?.config?.text},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,text:e})}}}});function _e(e,t,n,r,i,a){let o=l(`prompt-textarea`);return p(),u(o,{modelValue:e.text,"onUpdate:modelValue":t[0]||=t=>e.text=t,title:e.$t(`fish.name.text`),info:e.$t(`fish.description.text`),placeholder:e.$t(`fish.placeholder.text`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var ve=I(ge,[[`render`,_e]]),ye=m({name:`FishModelSelector`,components:{ElSelect:g,ElOption:_},computed:{options(){return[{value:re,label:this.$t(`fish.button.modelS21Pro`)},{value:F,label:this.$t(`fish.button.modelS2Pro`)},{value:`s1`,label:this.$t(`fish.button.modelS1`)}]},value:{get(){return this.$store.state.fish?.config?.model},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,model:e})}}},mounted(){this.value||=ie}}),be={class:`field`},xe={class:`title font-bold`};function Se(t,n,r,o,m,h){let g=l(`el-option`),_=l(`el-select`);return p(),s(`div`,be,[e(`h2`,xe,i(t.$t(`fish.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`fish.placeholder.select`)},{default:d(()=>[(p(!0),s(c,null,f(t.options,e=>(p(),u(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ce=I(ye,[[`render`,Se],[`__scopeId`,`data-v-78857e08`]]),we=m({name:`FishVoiceOption`,props:{option:{type:Object,required:!0},playing:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:[`preview`]}),Te={class:`voice-option`},Ee=[`aria-label`],De={key:0,class:`spin`,viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`},Oe={key:1,viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`},ke={key:2,viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`},Ae={key:1,class:`preview placeholder`,"aria-hidden":`true`},je={class:`meta`},Me={class:`label`},Ne={key:0,class:`description`};function Pe(r,a,c,l,u,d){return p(),s(`div`,Te,[r.option.audio?(p(),s(`button`,{key:0,type:`button`,class:n([`preview`,{playing:r.playing,loading:r.loading}]),"aria-label":r.playing?`stop preview`:`play preview`,onMousedown:a[0]||=t(()=>{},[`prevent`]),onClick:a[1]||=t(e=>r.$emit(`preview`,r.option),[`stop`,`prevent`])},[r.loading?(p(),s(`svg`,De,[...a[2]||=[e(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`currentColor`,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-dasharray":`42 60`},null,-1)]])):r.playing?(p(),s(`svg`,Oe,[...a[3]||=[e(`rect`,{x:`6`,y:`5`,width:`4`,height:`14`,rx:`1`,fill:`currentColor`},null,-1),e(`rect`,{x:`14`,y:`5`,width:`4`,height:`14`,rx:`1`,fill:`currentColor`},null,-1)]])):(p(),s(`svg`,ke,[...a[4]||=[e(`path`,{d:`M8 5v14l11-7z`,fill:`currentColor`},null,-1)]]))],42,Ee)):(p(),s(`span`,Ae,[...a[5]||=[e(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`},[e(`path`,{d:`M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11z`,fill:`currentColor`})],-1)]])),e(`div`,je,[e(`span`,Me,i(r.option.label),1),r.option.description?(p(),s(`span`,Ne,i(r.option.description),1)):o(``,!0)])])}var Fe=I(we,[[`render`,Pe],[`__scopeId`,`data-v-c16a6a46`]]),Ie=e=>(e.id||e._id||e.reference_id||``).toString(),X=e=>{let t=Ie(e);return{value:t,label:e.title||t,description:e.description,audio:e.samples?.[0]?.audio}},Le=m({name:`FishVoicePicker`,components:{ElSelect:g,ElOption:_,ElOptionGroup:h,VoiceOption:Fe},data(){return{popularVoices:[],searchVoices:[],popularLoading:!1,searchLoading:!1,preloaded:!1,query:``,playingId:null,loadingId:null,labelCache:{},previewAudio:null,searchTimer:null,searchSeq:0}},computed:{remoteLoading(){return this.popularLoading||this.searchLoading},myVoices(){return this.$store.state.fish?.voices??[]},myOptions(){return this.myVoices.map(X).filter(e=>!!e.value)},publicPool(){return this.query&&(this.searchVoices.length||this.searchLoading)?{voices:this.searchVoices,isSearch:!0}:{voices:this.popularVoices,isSearch:!1}},publicOptions(){let e=new Set(this.myOptions.map(e=>e.value));return this.publicPool.voices.map(X).filter(t=>!!t.value&&!e.has(t.value))},filteredMyOptions(){return this.applyQuery(this.myOptions)},filteredPublicOptions(){return this.publicPool.isSearch?this.publicOptions:this.applyQuery(this.publicOptions)},fallbackOption(){let e=this.value;return!e||this.myOptions.some(t=>t.value===e)||this.publicOptions.some(t=>t.value===e)?null:{value:e,label:this.labelCache[e]||e}},noDataText(){return this.remoteLoading?this.$t(`fish.message.searching`):this.credential?.token?this.$t(`fish.message.searchVoiceHint`):this.$t(`fish.message.noVoices`)},credential(){return this.$store.state.fish?.credential},value:{get(){return this.$store.state.fish?.config?.reference_id},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,reference_id:e||void 0})}}},watch:{myOptions:{immediate:!0,handler(e){this.cacheLabels(e)}},publicOptions(e){this.cacheLabels(e)},credential:{immediate:!0,handler(e){if(!e?.token)return;let t=this.$store.state.fish?.voices;(t===void 0||t.length===0)&&this.$store.dispatch(`fish/getVoices`),this.preloaded||this.fetchPopular()}}},beforeUnmount(){this.stopPreview(),this.searchTimer&&clearTimeout(this.searchTimer)},methods:{cacheLabels(e){for(let t of e)this.labelCache[t.value]=t.label},applyQuery(e){let t=this.query.toLowerCase();return t?e.filter(e=>e.label.toLowerCase().includes(t)||(e.description||``).toLowerCase().includes(t)):e},onVisibleChange(e){e&&!this.preloaded&&!this.popularLoading&&this.fetchPopular()},onFilter(e){if(this.query=(e||``).trim(),this.searchTimer&&clearTimeout(this.searchTimer),!this.query){this.searchSeq++,this.searchVoices=[],this.searchLoading=!1;return}this.searchTimer=setTimeout(()=>this.fetchSearch(this.query),350)},async fetchPopular(){let e=this.credential?.token;if(!(!e||this.popularLoading)){this.popularLoading=!0;try{let{data:t}=await z.listModels({self:!1,page_size:30,page_number:1},{token:e});this.popularVoices=t?.items??[],this.preloaded=!0}catch(e){console.error(`fish.loadPopularVoices failed`,e)}finally{this.popularLoading=!1}}},async fetchSearch(e){let t=this.credential?.token;if(!t)return;let n=++this.searchSeq;this.searchLoading=!0;try{let{data:r}=await z.listModels({self:!1,page_size:30,page_number:1,title:e},{token:t});if(n!==this.searchSeq)return;this.searchVoices=r?.items??[]}catch(e){n===this.searchSeq&&(this.searchVoices=[]),console.error(`fish.searchPublicVoices failed`,e)}finally{n===this.searchSeq&&(this.searchLoading=!1)}},togglePreview(e){if(!e.audio)return;if(this.playingId===e.value||this.loadingId===e.value){this.stopPreview();return}this.stopPreview();let t=new Audio(e.audio),n=()=>{this.previewAudio===t&&(this.loadingId=null,this.playingId=e.value)},r=()=>{this.previewAudio===t&&this.stopPreview()};t.addEventListener(`playing`,n),t.addEventListener(`ended`,r),t.addEventListener(`error`,r),this.previewAudio=t,this.loadingId=e.value,this.playingId=null,t.play().catch(()=>{this.previewAudio===t&&this.stopPreview()})},stopPreview(){this.previewAudio&&=(this.previewAudio.pause(),this.previewAudio.src=``,null),this.playingId=null,this.loadingId=null}}}),Re={class:`field`},ze={class:`title font-bold`};function Be(t,n,r,m,h,g){let _=l(`el-option`),v=l(`voice-option`),y=l(`el-option-group`),b=l(`el-select`);return p(),s(`div`,Re,[e(`h2`,ze,i(t.$t(`fish.name.voice`)),1),a(b,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,"popper-class":`fish-voice-popper`,placeholder:t.$t(`fish.placeholder.voice`),clearable:``,filterable:``,"filter-method":t.onFilter,loading:t.remoteLoading,"loading-text":t.$t(`fish.message.searching`),"no-data-text":t.noDataText,onVisibleChange:t.onVisibleChange},{default:d(()=>[t.fallbackOption?(p(),u(_,{key:t.fallbackOption.value,label:t.fallbackOption.label,value:t.fallbackOption.value},null,8,[`label`,`value`])):o(``,!0),t.filteredMyOptions.length?(p(),u(y,{key:1,label:t.$t(`fish.title.myVoices`)},{default:d(()=>[(p(!0),s(c,null,f(t.filteredMyOptions,e=>(p(),u(_,{key:e.value,label:e.label,value:e.value},{default:d(()=>[a(v,{option:e,playing:t.playingId===e.value,loading:t.loadingId===e.value,onPreview:t.togglePreview},null,8,[`option`,`playing`,`loading`,`onPreview`])]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`label`])):o(``,!0),t.filteredPublicOptions.length?(p(),u(y,{key:2,label:t.$t(`fish.group.publicVoices`)},{default:d(()=>[(p(!0),s(c,null,f(t.filteredPublicOptions,e=>(p(),u(_,{key:e.value,label:e.label,value:e.value},{default:d(()=>[a(v,{option:e,playing:t.playingId===e.value,loading:t.loadingId===e.value,onPreview:t.togglePreview},null,8,[`option`,`playing`,`loading`,`onPreview`])]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`label`])):o(``,!0)]),_:1},8,[`modelValue`,`placeholder`,`filter-method`,`loading`,`loading-text`,`no-data-text`,`onVisibleChange`])])}var Ve=I(Le,[[`render`,Be],[`__scopeId`,`data-v-6183b210`]]),He=50*1024*1024,Ue=m({name:`FishReferenceAudioInput`,components:{ElButton:q,ElInput:K,ElUpload:v,UndoIcon:M,UploadIcon:ne},mixins:[U],props:{modelValue:{type:Object,default:void 0}},emits:[`update:modelValue`],data(){return{fileList:[],uploading:!1}},computed:{value(){return this.modelValue},uploadUrl(){return`${L()}/api/v1/files/`},uploadHeaders(){return{Authorization:`Bearer ${this.$store.state.token?.access}`}}},methods:{onBeforeUpload(e){return/\.(mp3|wav)$/i.test(e.name)?e.size>He?(S.warning(this.$t(`fish.message.audioSizeExceed`)),!1):(this.uploading=!0,!0):(S.warning(this.$t(`fish.message.instantAudioFormat`)),!1)},onExceed(){S.warning(this.$t(`fish.message.audioOnlyOne`))},onUploadError(){this.uploading=!1,S.error(this.$t(`fish.message.uploadError`))},onUploadSuccess(e,t,n){if(this.uploading=!1,!e?.file_url){this.fileList=[],S.error(this.$t(`fish.message.uploadError`));return}this.fileList=n,this.emitValue(e.file_url,this.value?.text||``)},updateText(e){this.emitValue(this.value?.audio||``,e)},clear(){this.fileList=[],this.$emit(`update:modelValue`,void 0)},emitValue(e,t){this.$emit(`update:modelValue`,{audio:e,text:t})}}}),We={class:`reference-input`},Ge={class:`field-block mb-3`},Ke={class:`flex items-baseline justify-between mb-1`},qe={class:`title font-bold`},Je={class:`hint`},Ye={key:0,class:`audio-actions`},Xe={key:1,class:`mt-2`},Ze=[`src`],Qe={class:`field-block`},$e={class:`title font-bold`},et={class:`hint`};function tt(t,n,c,u,f,m){let h=l(`upload-icon`),g=l(`el-button`),_=l(`el-upload`),v=l(`undo-icon`),y=l(`el-input`);return p(),s(`div`,We,[e(`div`,Ge,[e(`div`,Ke,[e(`h2`,qe,[r(i(t.$t(`fish.name.referenceAudio`))+` `,1),n[1]||=e(`span`,{class:`required`},`*`,-1)])]),e(`p`,Je,i(t.$t(`fish.description.instantReferenceAudio`)),1),t.value?.audio?o(``,!0):(p(),s(`div`,Ye,[a(_,{"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:1,class:`upload-wrapper`,action:t.uploadUrl,accept:`.mp3,.wav,audio/mpeg,audio/wav`,"show-file-list":!1,"on-exceed":t.onExceed,"on-error":t.onUploadError,"on-success":t.onUploadSuccess,"before-upload":t.onBeforeUpload,headers:t.uploadHeaders},{default:d(()=>[a(g,{type:`primary`,plain:``,round:``,loading:t.uploading},{default:d(()=>[a(h,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`fish.button.uploadAudio`)),1)]),_:1},8,[`loading`])]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`before-upload`,`headers`])])),t.value?.audio?(p(),s(`div`,Xe,[e(`audio`,{src:t.value.audio,controls:``,preload:`metadata`,class:`w-full`},null,8,Ze),a(g,{link:``,size:`small`,onClick:t.clear},{default:d(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`fish.button.replaceAudio`)),1)]),_:1},8,[`onClick`])])):o(``,!0)]),e(`div`,Qe,[e(`h2`,$e,[r(i(t.$t(`fish.name.referenceTranscript`))+` `,1),n[2]||=e(`span`,{class:`required`},`*`,-1)]),e(`p`,et,i(t.$t(`fish.description.referenceTranscript`)),1),a(y,{"model-value":t.value?.text||``,type:`textarea`,rows:2,maxlength:`10000`,placeholder:t.$t(`fish.placeholder.referenceTranscript`),"onUpdate:modelValue":t.updateText},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])])])}var nt=m({name:`FishConfigPanel`,components:{MagicIcon:P,ElButton:q,ElSegmented:w,ElSlider:C,TextInput:ve,ModelSelector:Ce,VoicePicker:Ve,ReferenceAudioInput:I(Ue,[[`render`,tt],[`__scopeId`,`data-v-1039ca6d`]]),ServicePricingSummary:se},emits:[`generate`],computed:{config(){return this.$store.state.fish?.config},consumption(){let e=this.config?.text?.trim()??``;return R({...this.config,model:this.config?.model??`s2-pro`,byte_count:new TextEncoder().encode(e).byteLength},this.service?.cost)},service(){return this.$store.state.fish?.service},canGenerate(){let e=this.config?.text;if(typeof e!=`string`||!e.trim())return!1;if(this.voiceMode!==`instant`)return!0;let t=this.instantReference;return!!t?.audio&&!!t.text?.trim()},voiceModeOptions(){return[{label:this.$t(`fish.value.savedVoice`),value:`saved`},{label:this.$t(`fish.value.instantVoice`),value:`instant`}]},voiceMode:{get(){return this.config?.voiceMode??`saved`},set(e){this.$store.commit(`fish/setConfig`,{...this.config,voiceMode:e,reference_id:void 0,references:void 0})}},instantReference:{get(){return this.config?.references?.[0]},set(e){this.$store.commit(`fish/setConfig`,{...this.config,voiceMode:`instant`,reference_id:void 0,references:e?[e]:void 0})}},speed:{get(){return this.config?.prosody?.speed??1},set(e){this.$store.commit(`fish/setConfig`,{...this.config,prosody:{...this.config?.prosody??{},speed:e}})}}},methods:{onGenerate(){this.$emit(`generate`)}}}),rt={class:`flex flex-col h-full`},it={class:`flex-1 overflow-y-auto p-5`},at={class:`field mb-4`},ot={class:`title font-bold`},st={class:`field mb-4`},ct={class:`title font-bold`},lt={class:`flex flex-col items-center justify-center px-5 pb-5`};function ut(t,n,o,c,f,m){let h=l(`text-input`),g=l(`model-selector`),_=l(`el-segmented`),v=l(`voice-picker`),y=l(`reference-audio-input`),b=l(`el-slider`),x=l(`service-pricing-summary`),S=l(`magic-icon`),C=l(`el-button`);return p(),s(`div`,rt,[e(`div`,it,[a(h,{class:`mb-4`}),a(g,{class:`mb-4`}),e(`div`,at,[e(`h2`,ot,i(t.$t(`fish.name.voiceSource`)),1),a(_,{modelValue:t.voiceMode,"onUpdate:modelValue":n[0]||=e=>t.voiceMode=e,options:t.voiceModeOptions,class:`value`},null,8,[`modelValue`,`options`])]),t.voiceMode===`saved`?(p(),u(v,{key:0,class:`mb-4`})):(p(),u(y,{key:1,modelValue:t.instantReference,"onUpdate:modelValue":n[1]||=e=>t.instantReference=e,class:`mb-4`},null,8,[`modelValue`])),e(`div`,st,[e(`h2`,ct,i(t.$t(`fish.name.speed`)),1),a(b,{modelValue:t.speed,"onUpdate:modelValue":n[2]||=e=>t.speed=e,min:.5,max:2,step:.1,class:`value`,"show-input":``},null,8,[`modelValue`])])]),e(`div`,lt,[a(x,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(C,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:d(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`fish.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var dt=I(nt,[[`render`,ut],[`__scopeId`,`data-v-9f895c4e`]]);function ft(e){if(!e)return;let t=e.error;if(t){let e=typeof t==`string`?t:t.message;if(e)return e.trim()}let n=e.message;if(!(typeof n!=`string`||!n.trim()))return Z(n.trim())}function Z(e){if(e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t)&&t.length){let e=t.map(e=>{let t=typeof e?.msg==`string`?e.msg:void 0;if(!t)return;let n=Array.isArray(e?.loc)?e.loc.filter(e=>e!==`parameters`):[],r=n.length?n[n.length-1]:void 0;return r?`${r}: ${t}`:t}).filter(e=>!!e),n=Array.from(new Set(e));if(n.length)return n.join(`; `)}}catch{}if(e.startsWith(`{`))try{let t=JSON.parse(e);if(t&&typeof t.message==`string`&&t.message.trim())return Z(t.message.trim())}catch{}return e}var pt=m({name:`FishTaskPreview`,components:{DeleteIcon:N,ElTooltip:y,ChannelIcon:k,CpuIcon:he,InfoIcon:ee,MagicIcon:P,MicrophoneIcon:j,TimeIcon:T,WarningIcon:te,CopyToClipboard:ae,ElAlert:b,ElButton:q,ApiCodeButton:ce,ReportButton:oe},props:{modelValue:{type:Object,required:!0}},computed:{prompt(){return this.modelValue?.request?.text},audioUrl(){return this.modelValue?.response?.audio_url},isFailure(){let e=this.modelValue?.response;if(!e||e.audio_url)return!1;if(e.success===!1||e.error)return!0;let t=Number(e.status);return!Number.isNaN(t)&&t>=400||!!e.message},failureReason(){return ft(this.modelValue?.response)}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await H.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`fish/deleteTask`,{id:e}),S.success(this.$t(`common.message.deleteTaskSuccess`))}catch{S.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e){window.open(e,`_blank`)}}}),mt={class:`preview`},ht={class:`left`},gt={class:`main`},_t={class:`bot`},vt={class:`datetime`},yt=[`aria-label`],bt={class:`info`},xt={key:0,class:`prompt mt-2`},St={key:0},Ct={key:0,class:`content`},wt=[`src`],Tt={class:`operations mt-2`},Et={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Dt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ot={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},kt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},At={key:1,class:`content`},jt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Mt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Nt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Pt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Q={key:2,class:`content`},Ft={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function It(n,c,u,f,m,h){let g=l(`capability-presentation`),_=l(`delete-icon`),v=l(`el-tooltip`),y=l(`el-button`),b=l(`api-code-button`),x=l(`report-button`),S=l(`cpu-icon`),C=l(`microphone-icon`),w=l(`copy-to-clipboard`),T=l(`magic-icon`),E=l(`time-icon`),D=l(`el-alert`),O=l(`warning-icon`),k=l(`info-icon`),A=l(`channel-icon`);return p(),s(`div`,mt,[e(`div`,ht,[a(g,{capability:`fish`,part:`avatar`,class:`avatar`})]),e(`div`,gt,[e(`div`,_t,[a(g,{capability:`fish`,part:`name`}),e(`span`,vt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(v,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:d(()=>[n.modelValue?.id?(p(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,yt)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,bt,[n.prompt?(p(),s(`p`,xt,[r(i(n.prompt)+` `,1),n.modelValue?.response?o(``,!0):(p(),s(`span`,St,` - (`+i(n.$t(`fish.status.pending`))+`) `,1))])):o(``,!0)]),n.audioUrl?(p(),s(`div`,Ct,[e(`audio`,{src:n.audioUrl,controls:``,preload:`metadata`,class:`w-full mb-3`},null,8,wt),e(`div`,Tt,[a(y,{type:`info`,size:`small`,class:`btn-action`,onClick:c[1]||=t(e=>n.onDownload(n.audioUrl),[`stop`])},{default:d(()=>[r(i(n.$t(`fish.button.download`)),1)]),_:1}),a(b,{path:`/fish/tts`,body:n.modelValue?.request},null,8,[`body`]),a(x,{service:`fish`,"target-id":n.modelValue?.id,snapshot:{text:n.modelValue?.request?.text}},null,8,[`target-id`,`snapshot`])]),a(D,{closable:!1,class:`mt-2 success`},{default:d(()=>[n.modelValue?.request?.model?(p(),s(`p`,Et,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.modelValue?.request?.reference_id?(p(),s(`p`,Dt,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.referenceId`))+`: `+i(n.modelValue?.request?.reference_id)+` `,1),a(w,{content:n.modelValue?.request?.reference_id},null,8,[`content`])])):o(``,!0),e(`p`,Ot,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(p(),s(`p`,kt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):n.isFailure?(p(),s(`div`,At,[a(D,{closable:!1,class:`failure`},{title:d(()=>[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.failure`)),1)]),default:d(()=>[e(`p`,jt,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])]),n.failureReason?(p(),s(`p`,Mt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.failureReason`))+`: `+i(n.failureReason)+` `,1),a(w,{content:n.failureReason},null,8,[`content`])])):o(``,!0),n.modelValue?.elapsed?(p(),s(`p`,Nt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(p(),s(`p`,Pt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(w,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):(p(),s(`div`,Q,[a(D,{closable:!1,class:`info`},{default:d(()=>[e(`p`,Ft,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})]))])])}var Lt=m({name:`FishRecentPanel`,components:{TaskPreview:I(pt,[[`render`,It],[`__scopeId`,`data-v-79dbfe9e`]]),BotPlaceholder:le,NoTasks:O,ScrollList:D},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.fish?.tasks,items:this.$store.state.fish?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Rt={key:0},zt={key:2,class:`w-full h-full flex items-center justify-center`};function Bt(e,t,n,r,i,m){let h=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return p(),s(c,null,[e.tasks?.items===void 0?(p(),s(`div`,Rt,[a(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(p(),u(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:d(()=>[(p(!0),s(c,null,f(e.tasks?.items,e=>(p(),u(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(p(),s(`div`,zt,[a(v)])):o(``,!0)],64)}var Vt=I(Lt,[[`render`,Bt]]);function $(e,t){let n={text:t,async:!0};return e.voiceMode===`instant`&&e.references?.[0]?n.references=e.references:e.reference_id&&(n.reference_id=e.reference_id),e.format&&(n.format=e.format),e.prosody&&Object.keys(e.prosody).length>0&&(n.prosody=e.prosody),n}var Ht=m({name:`FishTtsIndex`,components:{ConfigPanel:dt,Layout:de,RecentPanel:Vt,ShowcaseResultTabs:pe,TabSwitcher:fe},mixins:[Y,me(`fish`),ue(`fish`)],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.fish?.status?.getApplications===x.Request},tasksLoading(){return this.$store.state.fish?.status?.getTasks===x.Request||this.fetchingTasks},credential(){return this.$store.state.fish?.credential},config(){return this.$store.state.fish?.config},application(){return this.$store.state.fish?.application},tasks(){return this.$store.state.fish?.tasks}},watch:{initialized:{async handler(e){e&&(await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onPollTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService(),await this.$store.dispatch(`fish/getVoices`)},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await A({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){await this.$store.dispatch(`fish/getService`)},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks)return;let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};this.fetchingTasks=!0;try{await this.$store.dispatch(`fish/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!J(this.uploadTracker,e=>this.$t(e),e=>S.warning(e)))return;let e=this.config??{},t=e.text?.trim();if(!t){S.warning(this.$t(`fish.message.textRequired`));return}if(!W())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}let r=e.model||`s2-pro`,i=$(e,t);S.info(this.$t(`fish.message.startingTask`)),G(`fish`,z.generateTts(i,{token:n,model:r})).then(()=>{S.success(this.$t(`fish.message.startTaskSuccess`))}).catch(e=>{B(e,`fish`)||S.error(this.$t(`fish.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}}),Ut={class:`flex flex-col h-full`},Wt={class:`flex-1 min-h-0`};function Gt(t,n,r,i,o,s){let c=l(`tab-switcher`),f=l(`config-panel`),m=l(`recent-panel`),h=l(`showcase-result-tabs`),g=l(`layout`);return p(),u(g,null,{config:d(()=>[e(`div`,Ut,[a(c),e(`div`,Wt,[a(f,{onGenerate:t.onGenerate},null,8,[`onGenerate`])])])]),result:d(()=>[a(h,{service:`fish`},{tasks:d(()=>[a(m,{ref:`recentPanel`,loading:t.loadingMore,onReachTop:t.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})]),_:1})}var Kt=I(Ht,[[`render`,Gt]]);export{$ as buildFishTtsRequest,Kt as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,j as u,mt as d,rt as f,tt as p,z as m}from"./vendor-chart-Dw-P17PN.js";import{n as h,r as g,t as _}from"./select-BhxIomVL.js";import{t as v}from"./upload-BHlKa9Ox.js";import{t as y}from"./tooltip-DnBNFRyX.js";import{t as b}from"./alert-BprQRUmf.js";import{h as x,v as S}from"./models-BWtS-s13.js";import{t as C}from"./slider-BQmgjRhY.js";import{t as w}from"./segmented-D0zHdf9D.js";import{t as T}from"./clock-BksO_Z0W.js";import{i as E,n as D,r as O,s as k,t as A}from"./pagination-D8iNbVKJ.js";import{t as ee}from"./info-CX46K-2a.js";import{t as j}from"./mic-Cy088pRc.js";import{t as M}from"./rotate-ccw-M5uJlVv8.js";import{t as N}from"./trash-2-UoD61laP.js";import{t as te}from"./triangle-alert-hKICrvdJ.js";import{t as ne}from"./upload-BK5O5g9h.js";import{t as P}from"./wand-sparkles-C34nh3wP.js";import{_t as re,mt as ie,vt as F}from"./constants-C4mNoJOb.js";import{A as I,Ba as L,Cn as R,Gn as z,O as B,Ua as V,Wa as H,at as U,ca as W,ea as G,fo as K,io as q,it as J,ot as Y}from"./index-Dn-8sNW2.js";import{t as ae}from"./CopyToClipboard-Db0qgR8j.js";import{t as oe}from"./ReportButton-DBohgBX5.js";import{t as se}from"./ServicePricingSummary-CN_kQ9E8.js";import{t as ce}from"./ApiCodeButton-CpRdry19.js";import{t as le}from"./BotPlaceholder-IDq9_Pl7.js";import{t as ue}from"./taskPollingMixin-CcLxtz8z.js";import{t as de}from"./Hailuo-DL88nkFd.js";import{t as fe}from"./TabSwitcher-DSv6B8Qg.js";import{t as pe}from"./ShowcaseResultTabs-B_aFfiMi.js";import{t as me}from"./showcaseRecreateMixin-DnJxBt5l.js";var he=V(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),ge=m({name:`FishTextInput`,components:{PromptTextarea:E},computed:{text:{get(){return this.$store.state.fish?.config?.text},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,text:e})}}}});function _e(e,t,n,r,i,a){let o=l(`prompt-textarea`);return p(),u(o,{modelValue:e.text,"onUpdate:modelValue":t[0]||=t=>e.text=t,title:e.$t(`fish.name.text`),info:e.$t(`fish.description.text`),placeholder:e.$t(`fish.placeholder.text`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var ve=I(ge,[[`render`,_e]]),ye=m({name:`FishModelSelector`,components:{ElSelect:g,ElOption:_},computed:{options(){return[{value:re,label:this.$t(`fish.button.modelS21Pro`)},{value:F,label:this.$t(`fish.button.modelS2Pro`)},{value:`s1`,label:this.$t(`fish.button.modelS1`)}]},value:{get(){return this.$store.state.fish?.config?.model},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,model:e})}}},mounted(){this.value||=ie}}),be={class:`field`},xe={class:`title font-bold`};function Se(t,n,r,o,m,h){let g=l(`el-option`),_=l(`el-select`);return p(),s(`div`,be,[e(`h2`,xe,i(t.$t(`fish.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`fish.placeholder.select`)},{default:d(()=>[(p(!0),s(c,null,f(t.options,e=>(p(),u(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Ce=I(ye,[[`render`,Se],[`__scopeId`,`data-v-78857e08`]]),we=m({name:`FishVoiceOption`,props:{option:{type:Object,required:!0},playing:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:[`preview`]}),Te={class:`voice-option`},Ee=[`aria-label`],De={key:0,class:`spin`,viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`},Oe={key:1,viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`},ke={key:2,viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`},Ae={key:1,class:`preview placeholder`,"aria-hidden":`true`},je={class:`meta`},Me={class:`label`},Ne={key:0,class:`description`};function Pe(r,a,c,l,u,d){return p(),s(`div`,Te,[r.option.audio?(p(),s(`button`,{key:0,type:`button`,class:n([`preview`,{playing:r.playing,loading:r.loading}]),"aria-label":r.playing?`stop preview`:`play preview`,onMousedown:a[0]||=t(()=>{},[`prevent`]),onClick:a[1]||=t(e=>r.$emit(`preview`,r.option),[`stop`,`prevent`])},[r.loading?(p(),s(`svg`,De,[...a[2]||=[e(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`currentColor`,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-dasharray":`42 60`},null,-1)]])):r.playing?(p(),s(`svg`,Oe,[...a[3]||=[e(`rect`,{x:`6`,y:`5`,width:`4`,height:`14`,rx:`1`,fill:`currentColor`},null,-1),e(`rect`,{x:`14`,y:`5`,width:`4`,height:`14`,rx:`1`,fill:`currentColor`},null,-1)]])):(p(),s(`svg`,ke,[...a[4]||=[e(`path`,{d:`M8 5v14l11-7z`,fill:`currentColor`},null,-1)]]))],42,Ee)):(p(),s(`span`,Ae,[...a[5]||=[e(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`},[e(`path`,{d:`M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11z`,fill:`currentColor`})],-1)]])),e(`div`,je,[e(`span`,Me,i(r.option.label),1),r.option.description?(p(),s(`span`,Ne,i(r.option.description),1)):o(``,!0)])])}var Fe=I(we,[[`render`,Pe],[`__scopeId`,`data-v-c16a6a46`]]),Ie=e=>(e.id||e._id||e.reference_id||``).toString(),X=e=>{let t=Ie(e);return{value:t,label:e.title||t,description:e.description,audio:e.samples?.[0]?.audio}},Le=m({name:`FishVoicePicker`,components:{ElSelect:g,ElOption:_,ElOptionGroup:h,VoiceOption:Fe},data(){return{popularVoices:[],searchVoices:[],popularLoading:!1,searchLoading:!1,preloaded:!1,query:``,playingId:null,loadingId:null,labelCache:{},previewAudio:null,searchTimer:null,searchSeq:0}},computed:{remoteLoading(){return this.popularLoading||this.searchLoading},myVoices(){return this.$store.state.fish?.voices??[]},myOptions(){return this.myVoices.map(X).filter(e=>!!e.value)},publicPool(){return this.query&&(this.searchVoices.length||this.searchLoading)?{voices:this.searchVoices,isSearch:!0}:{voices:this.popularVoices,isSearch:!1}},publicOptions(){let e=new Set(this.myOptions.map(e=>e.value));return this.publicPool.voices.map(X).filter(t=>!!t.value&&!e.has(t.value))},filteredMyOptions(){return this.applyQuery(this.myOptions)},filteredPublicOptions(){return this.publicPool.isSearch?this.publicOptions:this.applyQuery(this.publicOptions)},fallbackOption(){let e=this.value;return!e||this.myOptions.some(t=>t.value===e)||this.publicOptions.some(t=>t.value===e)?null:{value:e,label:this.labelCache[e]||e}},noDataText(){return this.remoteLoading?this.$t(`fish.message.searching`):this.credential?.token?this.$t(`fish.message.searchVoiceHint`):this.$t(`fish.message.noVoices`)},credential(){return this.$store.state.fish?.credential},value:{get(){return this.$store.state.fish?.config?.reference_id},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,reference_id:e||void 0})}}},watch:{myOptions:{immediate:!0,handler(e){this.cacheLabels(e)}},publicOptions(e){this.cacheLabels(e)},credential:{immediate:!0,handler(e){if(!e?.token)return;let t=this.$store.state.fish?.voices;(t===void 0||t.length===0)&&this.$store.dispatch(`fish/getVoices`),this.preloaded||this.fetchPopular()}}},beforeUnmount(){this.stopPreview(),this.searchTimer&&clearTimeout(this.searchTimer)},methods:{cacheLabels(e){for(let t of e)this.labelCache[t.value]=t.label},applyQuery(e){let t=this.query.toLowerCase();return t?e.filter(e=>e.label.toLowerCase().includes(t)||(e.description||``).toLowerCase().includes(t)):e},onVisibleChange(e){e&&!this.preloaded&&!this.popularLoading&&this.fetchPopular()},onFilter(e){if(this.query=(e||``).trim(),this.searchTimer&&clearTimeout(this.searchTimer),!this.query){this.searchSeq++,this.searchVoices=[],this.searchLoading=!1;return}this.searchTimer=setTimeout(()=>this.fetchSearch(this.query),350)},async fetchPopular(){let e=this.credential?.token;if(!(!e||this.popularLoading)){this.popularLoading=!0;try{let{data:t}=await z.listModels({self:!1,page_size:30,page_number:1},{token:e});this.popularVoices=t?.items??[],this.preloaded=!0}catch(e){console.error(`fish.loadPopularVoices failed`,e)}finally{this.popularLoading=!1}}},async fetchSearch(e){let t=this.credential?.token;if(!t)return;let n=++this.searchSeq;this.searchLoading=!0;try{let{data:r}=await z.listModels({self:!1,page_size:30,page_number:1,title:e},{token:t});if(n!==this.searchSeq)return;this.searchVoices=r?.items??[]}catch(e){n===this.searchSeq&&(this.searchVoices=[]),console.error(`fish.searchPublicVoices failed`,e)}finally{n===this.searchSeq&&(this.searchLoading=!1)}},togglePreview(e){if(!e.audio)return;if(this.playingId===e.value||this.loadingId===e.value){this.stopPreview();return}this.stopPreview();let t=new Audio(e.audio),n=()=>{this.previewAudio===t&&(this.loadingId=null,this.playingId=e.value)},r=()=>{this.previewAudio===t&&this.stopPreview()};t.addEventListener(`playing`,n),t.addEventListener(`ended`,r),t.addEventListener(`error`,r),this.previewAudio=t,this.loadingId=e.value,this.playingId=null,t.play().catch(()=>{this.previewAudio===t&&this.stopPreview()})},stopPreview(){this.previewAudio&&=(this.previewAudio.pause(),this.previewAudio.src=``,null),this.playingId=null,this.loadingId=null}}}),Re={class:`field`},ze={class:`title font-bold`};function Be(t,n,r,m,h,g){let _=l(`el-option`),v=l(`voice-option`),y=l(`el-option-group`),b=l(`el-select`);return p(),s(`div`,Re,[e(`h2`,ze,i(t.$t(`fish.name.voice`)),1),a(b,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,"popper-class":`fish-voice-popper`,placeholder:t.$t(`fish.placeholder.voice`),clearable:``,filterable:``,"filter-method":t.onFilter,loading:t.remoteLoading,"loading-text":t.$t(`fish.message.searching`),"no-data-text":t.noDataText,onVisibleChange:t.onVisibleChange},{default:d(()=>[t.fallbackOption?(p(),u(_,{key:t.fallbackOption.value,label:t.fallbackOption.label,value:t.fallbackOption.value},null,8,[`label`,`value`])):o(``,!0),t.filteredMyOptions.length?(p(),u(y,{key:1,label:t.$t(`fish.title.myVoices`)},{default:d(()=>[(p(!0),s(c,null,f(t.filteredMyOptions,e=>(p(),u(_,{key:e.value,label:e.label,value:e.value},{default:d(()=>[a(v,{option:e,playing:t.playingId===e.value,loading:t.loadingId===e.value,onPreview:t.togglePreview},null,8,[`option`,`playing`,`loading`,`onPreview`])]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`label`])):o(``,!0),t.filteredPublicOptions.length?(p(),u(y,{key:2,label:t.$t(`fish.group.publicVoices`)},{default:d(()=>[(p(!0),s(c,null,f(t.filteredPublicOptions,e=>(p(),u(_,{key:e.value,label:e.label,value:e.value},{default:d(()=>[a(v,{option:e,playing:t.playingId===e.value,loading:t.loadingId===e.value,onPreview:t.togglePreview},null,8,[`option`,`playing`,`loading`,`onPreview`])]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`label`])):o(``,!0)]),_:1},8,[`modelValue`,`placeholder`,`filter-method`,`loading`,`loading-text`,`no-data-text`,`onVisibleChange`])])}var Ve=I(Le,[[`render`,Be],[`__scopeId`,`data-v-6183b210`]]),He=50*1024*1024,Ue=m({name:`FishReferenceAudioInput`,components:{ElButton:q,ElInput:K,ElUpload:v,UndoIcon:M,UploadIcon:ne},mixins:[U],props:{modelValue:{type:Object,default:void 0}},emits:[`update:modelValue`],data(){return{fileList:[],uploading:!1}},computed:{value(){return this.modelValue},uploadUrl(){return`${L()}/api/v1/files/`},uploadHeaders(){return{Authorization:`Bearer ${this.$store.state.token?.access}`}}},methods:{onBeforeUpload(e){return/\.(mp3|wav)$/i.test(e.name)?e.size>He?(S.warning(this.$t(`fish.message.audioSizeExceed`)),!1):(this.uploading=!0,!0):(S.warning(this.$t(`fish.message.instantAudioFormat`)),!1)},onExceed(){S.warning(this.$t(`fish.message.audioOnlyOne`))},onUploadError(){this.uploading=!1,S.error(this.$t(`fish.message.uploadError`))},onUploadSuccess(e,t,n){if(this.uploading=!1,!e?.file_url){this.fileList=[],S.error(this.$t(`fish.message.uploadError`));return}this.fileList=n,this.emitValue(e.file_url,this.value?.text||``)},updateText(e){this.emitValue(this.value?.audio||``,e)},clear(){this.fileList=[],this.$emit(`update:modelValue`,void 0)},emitValue(e,t){this.$emit(`update:modelValue`,{audio:e,text:t})}}}),We={class:`reference-input`},Ge={class:`field-block mb-3`},Ke={class:`flex items-baseline justify-between mb-1`},qe={class:`title font-bold`},Je={class:`hint`},Ye={key:0,class:`audio-actions`},Xe={key:1,class:`mt-2`},Ze=[`src`],Qe={class:`field-block`},$e={class:`title font-bold`},et={class:`hint`};function tt(t,n,c,u,f,m){let h=l(`upload-icon`),g=l(`el-button`),_=l(`el-upload`),v=l(`undo-icon`),y=l(`el-input`);return p(),s(`div`,We,[e(`div`,Ge,[e(`div`,Ke,[e(`h2`,qe,[r(i(t.$t(`fish.name.referenceAudio`))+` `,1),n[1]||=e(`span`,{class:`required`},`*`,-1)])]),e(`p`,Je,i(t.$t(`fish.description.instantReferenceAudio`)),1),t.value?.audio?o(``,!0):(p(),s(`div`,Ye,[a(_,{"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,limit:1,class:`upload-wrapper`,action:t.uploadUrl,accept:`.mp3,.wav,audio/mpeg,audio/wav`,"show-file-list":!1,"on-exceed":t.onExceed,"on-error":t.onUploadError,"on-success":t.onUploadSuccess,"before-upload":t.onBeforeUpload,headers:t.uploadHeaders},{default:d(()=>[a(g,{type:`primary`,plain:``,round:``,loading:t.uploading},{default:d(()=>[a(h,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`fish.button.uploadAudio`)),1)]),_:1},8,[`loading`])]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`before-upload`,`headers`])])),t.value?.audio?(p(),s(`div`,Xe,[e(`audio`,{src:t.value.audio,controls:``,preload:`metadata`,class:`w-full`},null,8,Ze),a(g,{link:``,size:`small`,onClick:t.clear},{default:d(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`fish.button.replaceAudio`)),1)]),_:1},8,[`onClick`])])):o(``,!0)]),e(`div`,Qe,[e(`h2`,$e,[r(i(t.$t(`fish.name.referenceTranscript`))+` `,1),n[2]||=e(`span`,{class:`required`},`*`,-1)]),e(`p`,et,i(t.$t(`fish.description.referenceTranscript`)),1),a(y,{"model-value":t.value?.text||``,type:`textarea`,rows:2,maxlength:`10000`,placeholder:t.$t(`fish.placeholder.referenceTranscript`),"onUpdate:modelValue":t.updateText},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])])])}var nt=m({name:`FishConfigPanel`,components:{MagicIcon:P,ElButton:q,ElSegmented:w,ElSlider:C,TextInput:ve,ModelSelector:Ce,VoicePicker:Ve,ReferenceAudioInput:I(Ue,[[`render`,tt],[`__scopeId`,`data-v-1039ca6d`]]),ServicePricingSummary:se},emits:[`generate`],computed:{config(){return this.$store.state.fish?.config},consumption(){let e=this.config?.text?.trim()??``;return R({...this.config,model:this.config?.model??`s2-pro`,byte_count:new TextEncoder().encode(e).byteLength},this.service?.cost)},service(){return this.$store.state.fish?.service},canGenerate(){let e=this.config?.text;if(typeof e!=`string`||!e.trim())return!1;if(this.voiceMode!==`instant`)return!0;let t=this.instantReference;return!!t?.audio&&!!t.text?.trim()},voiceModeOptions(){return[{label:this.$t(`fish.value.savedVoice`),value:`saved`},{label:this.$t(`fish.value.instantVoice`),value:`instant`}]},voiceMode:{get(){return this.config?.voiceMode??`saved`},set(e){this.$store.commit(`fish/setConfig`,{...this.config,voiceMode:e,reference_id:void 0,references:void 0})}},instantReference:{get(){return this.config?.references?.[0]},set(e){this.$store.commit(`fish/setConfig`,{...this.config,voiceMode:`instant`,reference_id:void 0,references:e?[e]:void 0})}},speed:{get(){return this.config?.prosody?.speed??1},set(e){this.$store.commit(`fish/setConfig`,{...this.config,prosody:{...this.config?.prosody??{},speed:e}})}}},methods:{onGenerate(){this.$emit(`generate`)}}}),rt={class:`flex flex-col h-full`},it={class:`flex-1 overflow-y-auto p-5`},at={class:`field mb-4`},ot={class:`title font-bold`},st={class:`field mb-4`},ct={class:`title font-bold`},lt={class:`flex flex-col items-center justify-center px-5 pb-5`};function ut(t,n,o,c,f,m){let h=l(`text-input`),g=l(`model-selector`),_=l(`el-segmented`),v=l(`voice-picker`),y=l(`reference-audio-input`),b=l(`el-slider`),x=l(`service-pricing-summary`),S=l(`magic-icon`),C=l(`el-button`);return p(),s(`div`,rt,[e(`div`,it,[a(h,{class:`mb-4`}),a(g,{class:`mb-4`}),e(`div`,at,[e(`h2`,ot,i(t.$t(`fish.name.voiceSource`)),1),a(_,{modelValue:t.voiceMode,"onUpdate:modelValue":n[0]||=e=>t.voiceMode=e,options:t.voiceModeOptions,class:`value`},null,8,[`modelValue`,`options`])]),t.voiceMode===`saved`?(p(),u(v,{key:0,class:`mb-4`})):(p(),u(y,{key:1,modelValue:t.instantReference,"onUpdate:modelValue":n[1]||=e=>t.instantReference=e,class:`mb-4`},null,8,[`modelValue`])),e(`div`,st,[e(`h2`,ct,i(t.$t(`fish.name.speed`)),1),a(b,{modelValue:t.speed,"onUpdate:modelValue":n[2]||=e=>t.speed=e,min:.5,max:2,step:.1,class:`value`,"show-input":``},null,8,[`modelValue`])])]),e(`div`,lt,[a(x,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(C,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:d(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`fish.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var dt=I(nt,[[`render`,ut],[`__scopeId`,`data-v-9f895c4e`]]);function ft(e){if(!e)return;let t=e.error;if(t){let e=typeof t==`string`?t:t.message;if(e)return e.trim()}let n=e.message;if(!(typeof n!=`string`||!n.trim()))return Z(n.trim())}function Z(e){if(e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t)&&t.length){let e=t.map(e=>{let t=typeof e?.msg==`string`?e.msg:void 0;if(!t)return;let n=Array.isArray(e?.loc)?e.loc.filter(e=>e!==`parameters`):[],r=n.length?n[n.length-1]:void 0;return r?`${r}: ${t}`:t}).filter(e=>!!e),n=Array.from(new Set(e));if(n.length)return n.join(`; `)}}catch{}if(e.startsWith(`{`))try{let t=JSON.parse(e);if(t&&typeof t.message==`string`&&t.message.trim())return Z(t.message.trim())}catch{}return e}var pt=m({name:`FishTaskPreview`,components:{DeleteIcon:N,ElTooltip:y,ChannelIcon:k,CpuIcon:he,InfoIcon:ee,MagicIcon:P,MicrophoneIcon:j,TimeIcon:T,WarningIcon:te,CopyToClipboard:ae,ElAlert:b,ElButton:q,ApiCodeButton:ce,ReportButton:oe},props:{modelValue:{type:Object,required:!0}},computed:{prompt(){return this.modelValue?.request?.text},audioUrl(){return this.modelValue?.response?.audio_url},isFailure(){let e=this.modelValue?.response;if(!e||e.audio_url)return!1;if(e.success===!1||e.error)return!0;let t=Number(e.status);return!Number.isNaN(t)&&t>=400||!!e.message},failureReason(){return ft(this.modelValue?.response)}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await H.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`fish/deleteTask`,{id:e}),S.success(this.$t(`common.message.deleteTaskSuccess`))}catch{S.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e){window.open(e,`_blank`)}}}),mt={class:`preview`},ht={class:`left`},gt={class:`main`},_t={class:`bot`},vt={class:`datetime`},yt=[`aria-label`],bt={class:`info`},xt={key:0,class:`prompt mt-2`},St={key:0},Ct={key:0,class:`content`},wt=[`src`],Tt={class:`operations mt-2`},Et={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Dt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ot={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},kt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},At={key:1,class:`content`},jt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Mt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Nt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Pt={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Q={key:2,class:`content`},Ft={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function It(n,c,u,f,m,h){let g=l(`capability-presentation`),_=l(`delete-icon`),v=l(`el-tooltip`),y=l(`el-button`),b=l(`api-code-button`),x=l(`report-button`),S=l(`cpu-icon`),C=l(`microphone-icon`),w=l(`copy-to-clipboard`),T=l(`magic-icon`),E=l(`time-icon`),D=l(`el-alert`),O=l(`warning-icon`),k=l(`info-icon`),A=l(`channel-icon`);return p(),s(`div`,mt,[e(`div`,ht,[a(g,{capability:`fish`,part:`avatar`,class:`avatar`})]),e(`div`,gt,[e(`div`,_t,[a(g,{capability:`fish`,part:`name`}),e(`span`,vt,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(v,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:d(()=>[n.modelValue?.id?(p(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,yt)):o(``,!0)]),_:1},8,[`content`])]),e(`div`,bt,[n.prompt?(p(),s(`p`,xt,[r(i(n.prompt)+` `,1),n.modelValue?.response?o(``,!0):(p(),s(`span`,St,` - (`+i(n.$t(`fish.status.pending`))+`) `,1))])):o(``,!0)]),n.audioUrl?(p(),s(`div`,Ct,[e(`audio`,{src:n.audioUrl,controls:``,preload:`metadata`,class:`w-full mb-3`},null,8,wt),e(`div`,Tt,[a(y,{type:`info`,size:`small`,class:`btn-action`,onClick:c[1]||=t(e=>n.onDownload(n.audioUrl),[`stop`])},{default:d(()=>[r(i(n.$t(`fish.button.download`)),1)]),_:1}),a(b,{path:`/fish/tts`,body:n.modelValue?.request},null,8,[`body`]),a(x,{service:`fish`,"target-id":n.modelValue?.id,snapshot:{text:n.modelValue?.request?.text}},null,8,[`target-id`,`snapshot`])]),a(D,{closable:!1,class:`mt-2 success`},{default:d(()=>[n.modelValue?.request?.model?(p(),s(`p`,Et,[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.model`))+`: `+i(n.modelValue?.request?.model),1)])):o(``,!0),n.modelValue?.request?.reference_id?(p(),s(`p`,Dt,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.referenceId`))+`: `+i(n.modelValue?.request?.reference_id)+` `,1),a(w,{content:n.modelValue?.request?.reference_id},null,8,[`content`])])):o(``,!0),e(`p`,Ot,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(p(),s(`p`,kt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):n.isFailure?(p(),s(`div`,At,[a(D,{closable:!1,class:`failure`},{title:d(()=>[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.failure`)),1)]),default:d(()=>[e(`p`,jt,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])]),n.failureReason?(p(),s(`p`,Mt,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.failureReason`))+`: `+i(n.failureReason)+` `,1),a(w,{content:n.failureReason},null,8,[`content`])])):o(``,!0),n.modelValue?.elapsed?(p(),s(`p`,Nt,[a(E,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(p(),s(`p`,Pt,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(w,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):(p(),s(`div`,Q,[a(D,{closable:!1,class:`info`},{default:d(()=>[e(`p`,Ft,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`fish.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})]))])])}var Lt=m({name:`FishRecentPanel`,components:{TaskPreview:I(pt,[[`render`,It],[`__scopeId`,`data-v-79dbfe9e`]]),BotPlaceholder:le,NoTasks:O,ScrollList:D},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.fish?.tasks,items:this.$store.state.fish?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Rt={key:0},zt={key:2,class:`w-full h-full flex items-center justify-center`};function Bt(e,t,n,r,i,m){let h=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return p(),s(c,null,[e.tasks?.items===void 0?(p(),s(`div`,Rt,[a(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(p(),u(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:d(()=>[(p(!0),s(c,null,f(e.tasks?.items,e=>(p(),u(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(p(),s(`div`,zt,[a(v)])):o(``,!0)],64)}var Vt=I(Lt,[[`render`,Bt]]);function $(e,t){let n={text:t,async:!0};return e.voiceMode===`instant`&&e.references?.[0]?n.references=e.references:e.reference_id&&(n.reference_id=e.reference_id),e.format&&(n.format=e.format),e.prosody&&Object.keys(e.prosody).length>0&&(n.prosody=e.prosody),n}var Ht=m({name:`FishTtsIndex`,components:{ConfigPanel:dt,Layout:de,RecentPanel:Vt,ShowcaseResultTabs:pe,TabSwitcher:fe},mixins:[Y,me(`fish`),ue(`fish`)],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.fish?.status?.getApplications===x.Request},tasksLoading(){return this.$store.state.fish?.status?.getTasks===x.Request||this.fetchingTasks},credential(){return this.$store.state.fish?.credential},config(){return this.$store.state.fish?.config},application(){return this.$store.state.fish?.application},tasks(){return this.$store.state.fish?.tasks}},watch:{initialized:{async handler(e){e&&(await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onPollTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService(),await this.$store.dispatch(`fish/getVoices`)},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await A({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){await this.$store.dispatch(`fish/getService`)},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks)return;let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};this.fetchingTasks=!0;try{await this.$store.dispatch(`fish/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!J(this.uploadTracker,e=>this.$t(e),e=>S.warning(e)))return;let e=this.config??{},t=e.text?.trim();if(!t){S.warning(this.$t(`fish.message.textRequired`));return}if(!W())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}let r=e.model||`s2-pro`,i=$(e,t);S.info(this.$t(`fish.message.startingTask`)),G(`fish`,z.generateTts(i,{token:n,model:r})).then(()=>{S.success(this.$t(`fish.message.startTaskSuccess`))}).catch(e=>{B(e,`fish`)||S.error(this.$t(`fish.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}}),Ut={class:`flex flex-col h-full`},Wt={class:`flex-1 min-h-0`};function Gt(t,n,r,i,o,s){let c=l(`tab-switcher`),f=l(`config-panel`),m=l(`recent-panel`),h=l(`showcase-result-tabs`),g=l(`layout`);return p(),u(g,null,{config:d(()=>[e(`div`,Ut,[a(c),e(`div`,Wt,[a(f,{onGenerate:t.onGenerate},null,8,[`onGenerate`])])])]),result:d(()=>[a(h,{service:`fish`},{tasks:d(()=>[a(m,{ref:`recentPanel`,loading:t.loadingMore,onReachTop:t.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})]),_:1})}var Kt=I(Ht,[[`render`,Gt]]);export{$ as buildFishTtsRequest,Kt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,I as t,Jt as n,L as r,M as i,N as a,R as o,at as s,j as c,mt as l,tt as u,z as d}from"./vendor-chart-Dw-P17PN.js";import{t as f}from"./external-link-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,I as t,Jt as n,L as r,M as i,N as a,R as o,at as s,j as c,mt as l,tt as u,z as d}from"./vendor-chart-Dw-P17PN.js";import{t as f}from"./external-link-C29Uuu4h.js";import{t as p}from"./preload-helper-zJ_50EbN.js";import{A as m,io as h}from"./index-Dn-8sNW2.js";/* empty css */var g=d({name:`VideoPlayer`,components:{ElButton:h,ExternalLinkIcon:f,VuePlyr:o(()=>p(()=>import(`./index.esm-B6OqqThm.js`),[]))},props:{src:{type:String,required:!0},options:{type:Object,required:!1,default:()=>({})}},data(){return{failed:!1,clientReady:!1,mergedOptions:{controls:[`play-large`,`play`,`progress`,`current-time`,`mute`,`volume`,`captions`,`settings`,`pip`,`fullscreen`],iconUrl:`https://cdn.acedata.cloud/7jq4t0.svg`,quality:{default:1080,options:[1080],...this.options.quality},...this.options}}},computed:{safeSrc(){return this.src.trim()}},watch:{safeSrc(){this.failed=!1}},mounted(){this.clientReady=!0},methods:{onError(){this.failed=!0},onOpen(){window.open(this.safeSrc,`_blank`,`noopener,noreferrer`)}}}),_={class:`video max-w-[800px] max-h-[450px] rounded-[15px] overflow-hidden`},v=[`src`],y={key:1,class:`video-fallback`};function b(o,d,f,p,m,h){let g=s(`vue-plyr`),b=s(`external-link-icon`),x=s(`el-button`);return u(),a(`div`,_,[o.clientReady&&!o.failed&&o.safeSrc?(u(),c(g,{key:o.safeSrc,options:o.mergedOptions},{default:l(()=>[e(`video`,{controls:``,playsinline:``,preload:`metadata`,class:`w-full h-full aspect-[16/9]`,onError:d[0]||=(...e)=>o.onError&&o.onError(...e)},[e(`source`,{size:`1080`,src:o.safeSrc,type:`video/mp4`},null,8,v)],32)]),_:1},8,[`options`])):o.safeSrc?(u(),a(`div`,y,[r(x,{type:`primary`,round:``,onClick:o.onOpen},{default:l(()=>[r(b,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),t(` `+n(o.$t(`common.button.download`)),1)]),_:1},8,[`onClick`])])):i(``,!0)])}var x=m(g,[[`render`,b],[`__scopeId`,`data-v-85a6c48d`]]);export{x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,L as n,N as r,at as i,mt as a,tt as o,z as s}from"./vendor-chart-Dw-P17PN.js";import{t as c}from"./play-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,L as n,N as r,at as i,mt as a,tt as o,z as s}from"./vendor-chart-Dw-P17PN.js";import{t as c}from"./play-tG5O8bbR.js";import{A as l,Ya as u}from"./index-Dn-8sNW2.js";import{t as d}from"./VideoPlayer-ByFIN8Pz.js";var f=s({name:`VideoPreview`,components:{PlayIcon:c,ElDialog:u,VideoPlayer:d},props:{url:{type:String,required:!0},name:{type:String,required:!1,default:`video`}},data(){return{open:!1}}}),p=[`title`],m=[`src`],h={class:`overlay absolute inset-0 flex items-center justify-center bg-[rgba(0,0,0,0.25)]`};function g(s,c,l,u,d,f){let g=i(`play-icon`),_=i(`video-player`),v=i(`el-dialog`);return o(),r(`div`,{class:`video-preview w-[50px] h-[50px] relative rounded-[var(--el-border-radius-base)] overflow-hidden shadow-sm cursor-pointer bg-[var(--el-fill-color-darker)]`,title:s.name,onClick:c[2]||=t(e=>s.open=!0,[`stop`])},[e(`video`,{class:`w-full h-full object-cover`,src:`${s.url}#t=0.1`,muted:``,preload:`metadata`,playsinline:``},null,8,m),e(`div`,h,[n(g,{class:`text-white text-[14px]`,size:`1em`,"aria-hidden":`true`,focusable:`false`})]),n(v,{modelValue:s.open,"onUpdate:modelValue":c[0]||=e=>s.open=e,width:`640`,"align-center":``,"append-to-body":``,"destroy-on-close":``,class:`video-preview-dialog`,onClick:c[1]||=t(()=>{},[`stop`])},{default:a(()=>[n(_,{src:s.url},null,8,[`src`])]),_:1},8,[`modelValue`])],8,p)}var _=l(f,[[`render`,g],[`__scopeId`,`data-v-47ae9a3b`]]);export{_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,j as d,mt as f,ot as p,rt as m,tt as h,z as g}from"./vendor-chart-Dw-P17PN.js";import{r as _,t as v}from"./select-CD3MG9sV.js";import{v as y}from"./models-CSuuDqRA.js";import{t as b}from"./pagination-SWvC0yg5.js";import{t as x}from"./arrow-down-CSGt9t2E.js";import{t as S}from"./arrow-left-l3XZii7G.js";import{t as C}from"./circle-check-CrhnV2f6.js";import{t as w}from"./lock-cFepzwhs.js";import{t as T}from"./plus-CwKarPA6.js";import{t as E}from"./search-b_c_47BV.js";import{S as D,T as O,k,w as A,y as j}from"./i18n-3aZQnVTW.js";import{A as M,Ga as N,Qi as P,Ua as F,Ya as I,Zi as L,fo as R,io as z,za as B}from"./index-BHXtbt9o.js";import{c as V,d as ee,f as te,l as ne,m as H,p as U,u as W}from"./vendor-highlight-Dd94xpKT.js";import{t as G}from"./index.es-C_Gq4vgy.js";import{t as K}from"./VueMarkdown-BgudlQNQ.js";var q=F(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),J=F(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),Y=F(`square-plus`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),X=()=>({baseURL:`${B()}/api/v1`}),Z=new class{key=`skills/installed`;async list(e){return L.get(`/${this.key}/`,{...X(),params:e?{site_id:e}:void 0})}async get(e){return L.get(`/${this.key}/${e}/`,X())}async createMarkdown(e,t){return L.post(`/${this.key}/`,t?{...e,site_id:t}:e,X())}async createTarball(e,t){let n=new FormData;return n.append(`tarball`,e),t&&n.append(`site_id`,t),L.post(`/${this.key}/`,n,{...X(),headers:{"Content-Type":`multipart/form-data`}})}async update(e,t,n){return L.patch(`/${this.key}/${e}/`,t,{...X(),params:n?{site_id:n}:void 0})}async remove(e,t){return L.delete(`/${this.key}/${e}/`,{...X(),params:t?{site_id:t}:void 0})}async enable(e,t){return L.post(`/${this.key}/${e}/enable/`,void 0,{...X(),params:t?{site_id:t}:void 0})}async disable(e,t){return L.post(`/${this.key}/${e}/disable/`,void 0,{...X(),params:t?{site_id:t}:void 0})}async fetchFile(e,t,n){let r=await L.get(`/${this.key}/${e}/files/`,{...X(),params:{path:t,...n?{site_id:n}:{}},responseType:`arraybuffer`}),i=r.headers[`content-type`]||`application/octet-stream`;return{blob:new Blob([r.data],{type:i}),contentType:i}}},Q=new class{key=`skills`;async list(e={}){return P.get(`/${this.key}/`,{...X(),params:e})}async get(e,t){return P.get(`/${this.key}/${e}/`,{...X(),params:t?{site_id:t}:void 0})}async categories(){return P.get(`/${this.key}/categories/`,X())}async install(e,t={}){return L.post(`/${this.key}/${e}/install/`,t,X())}};function re(){let e=new Set;A()&&e.add(`desktop`),O()&&e.add(`ios`),D()&&e.add(`android`),k()&&e.add(`web`);let t=j();if(t===`mac`)e.add(`mac`);else if(t===`windows`)e.add(`windows`);else if(typeof navigator<`u`){let t=navigator.userAgent||``,n=navigator.userAgentData?.platform,r=/macintosh/i.test(t)&&(navigator.maxTouchPoints||0)>1;!O()&&!r&&(n===`macOS`||/mac os x|macintosh/i.test(t))&&e.add(`mac`),(n===`Windows`||/windows nt/i.test(t))&&e.add(`windows`)}return e}var ie=new Set([`mac`,`windows`,`desktop`,`web`,`ios`,`android`]);function ae(e){let t=e.filter(e=>ie.has(e));if(!t.length)return!0;let n=re();return t.some(e=>n.has(e))}H.registerLanguage(`bash`,U),H.registerLanguage(`json`,te),H.registerLanguage(`markdown`,ee),H.registerLanguage(`python`,W),H.registerLanguage(`shell`,ne),H.registerLanguage(`yaml`,V),H.registerAliases([`yml`],{languageName:`yaml`}),H.registerAliases([`py`],{languageName:`python`}),H.registerAliases([`sh`,`zsh`],{languageName:`bash`});var oe=12,se=g({name:`BrowseSkillsDialog`,components:{VueMarkdown:K,ElDialog:I,ElInput:R,ElButton:z,ElPagination:b,ElSelect:_,ElOption:v,FontAwesomeIcon:G,AddIcon:T,BackIcon:S,DownIcon:x,InstallIcon:q,LockIcon:w,SearchIcon:E,SuccessIcon:C},directives:{loading:N},props:{siteId:{type:String,default:``},modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`installed`],data(){return{loading:!1,installing:!1,items:[],total:0,currentPage:1,searchQuery:``,namespaceFilter:``,sortBy:`popular`,selectedItem:null,searchTimer:null,knownNamespaces:[],publisherByNamespace:{}}},computed:{pageSize(){return oe},namespaceOptions(){let e=new Set(this.knownNamespaces);for(let t of this.items)e.add(t.namespace);return Array.from(e).sort().map(e=>({value:e,label:this.publisherForNamespace(e)}))},detailBody(){return this.selectedItem?this.selectedItem.content.replace(/^---\n[\s\S]*?\n---\n?/,``):``}},methods:{onOpen(){this.selectedItem=null,this.searchQuery=``,this.namespaceFilter=``,this.sortBy=`popular`,this.currentPage=1,this.knownNamespaces=[],this.publisherByNamespace={},this.loadFacets(),this.reload()},openDetail(e){this.selectedItem=e},async loadFacets(){try{let{data:e}=await Q.categories(),t=new Set;for(let n of e.namespaces)t.add(n.namespace);this.knownNamespaces=Array.from(t).sort()}catch(e){console.warn(`failed to load skill catalog facets`,e)}},reloadFromFirstPage(){this.currentPage=1,this.reload()},onPageChange(e){this.currentPage=e,this.reload(),this.$nextTick(()=>{let e=this.$el.querySelector(`.directory-grid-wrapper`);e&&(e.scrollTop=0)})},onSearchInput(){this.searchTimer!==null&&window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(()=>{this.searchTimer=null,this.reloadFromFirstPage()},250)},async reload(){this.loading=!0;try{let{data:e}=await Q.list({q:this.searchQuery.trim()||void 0,namespace:this.namespaceFilter||void 0,sort:this.sortBy,limit:this.pageSize,offset:(this.currentPage-1)*this.pageSize});this.items=e.items,this.total=e.total;for(let t of e.items)t.publisher&&(this.publisherByNamespace[t.namespace]=t.publisher)}catch(e){console.error(e),y.error(this.$t(`skill.directory.loadFailed`))}finally{this.loading=!1}},async onInstall(e){if(!this.installing&&!e.installed){if(!this.canInstallOnSurface(e)){y.warning(this.$t(`skill.directory.surfaceBlocked`,{platforms:this.surfaceLabels(e)}));return}this.installing=!0;try{let{data:t}=await Q.install(e.id,this.siteId?{site_id:this.siteId}:{});y.success(this.$t(`skill.directory.installSuccess`,{name:e.slug})),this.$emit(`installed`,t.id),e.installed=!0,e.install_count+=1}catch(t){let n=this.extractError(t);n.includes(`already exists`)?(e.installed=!0,y.warning(this.$t(`skill.directory.alreadyInstalled`,{name:e.slug}))):y.error(this.$t(`skill.directory.installFailed`,{detail:n}))}finally{this.installing=!1}}},extractError(e){return e?.response?.data?.detail||String(e)||`unknown error`},formatCount(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)},publisherForNamespace(e){if(this.publisherByNamespace[e])return this.publisherByNamespace[e];let t=this.items.find(t=>t.namespace===e);return t?t.publisher:e},restrictedSurfaces(e){let t=e.frontmatter?.surfaces;return Array.isArray(t)?t.filter(e=>typeof e==`string`&&e.trim().length>0).map(e=>e.trim().toLowerCase()):[]},surfaceLabel(e){let t=`skill.directory.surface.${e}`,n=this.$t(t);return n===t?e:n},surfaceLabels(e){return this.restrictedSurfaces(e).map(e=>this.surfaceLabel(e)).join(` / `)},canInstallOnSurface(e){return ae(this.restrictedSurfaces(e))}}}),ce={class:`directory`},le={class:`directory-main`},ue={class:`directory-header`},de={class:`directory-controls`},fe={class:`directory-grid-wrapper`},pe={key:0,class:`directory-empty`},me={key:1,class:`directory-grid`},he=[`onClick`],ge={class:`directory-card-head`},_e={class:`directory-card-title`},ve=[`title`],ye=[`title`],be=[`aria-label`,`title`,`onClick`],xe=[`title`],Se={class:`directory-card-meta`},Ce={class:`directory-card-publisher`},we={key:0,class:`directory-card-count`},Te=[`title`],Ee={class:`directory-card-desc`},De={key:0,class:`directory-footer`},Oe={class:`directory-detail-head`},ke={class:`directory-detail-actions`},Ae=[`href`],je={class:`directory-detail-body`},Me={class:`directory-detail-title`},Ne={class:`directory-detail-meta`},Pe={key:0},Fe={key:1},Ie=[`title`],Le={class:`directory-detail-desc`};function Re(g,_,v,y,b,x){let S=l(`search-icon`),C=l(`el-input`),w=l(`el-option`),T=l(`el-select`),E=l(`success-icon`),D=l(`lock-icon`),O=l(`add-icon`),k=l(`down-icon`),A=l(`el-pagination`),j=l(`back-icon`),M=l(`font-awesome-icon`),N=l(`el-button`),P=l(`install-icon`),F=l(`vue-markdown`),I=l(`el-dialog`),L=p(`loading`);return h(),d(I,{"append-to-body":``,"model-value":g.modelValue,title:g.$t(`skill.dialog.directoryTitle`),width:`min(960px, 94vw)`,"align-center":``,class:`directory-dialog`,"close-on-click-modal":!g.installing,"show-close":!g.installing,"onUpdate:modelValue":_[5]||=e=>g.$emit(`update:modelValue`,e),onOpen:g.onOpen},{default:f(()=>[e(`div`,ce,[e(`main`,le,[g.selectedItem?(h(),s(c,{key:1},[e(`header`,Oe,[e(`button`,{class:`directory-back-btn`,onClick:_[3]||=e=>g.selectedItem=null},[a(j,{size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.$t(`skill.directory.back`)),1)]),e(`div`,ke,[g.selectedItem.source_url?(h(),s(`a`,{key:0,href:g.selectedItem.source_url,target:`_blank`,class:`directory-link`},[a(M,{icon:`fa-brands fa-github`}),r(` `+i(g.$t(`skill.directory.viewSource`)),1)],8,Ae)):o(``,!0),g.selectedItem.installed?(h(),d(N,{key:1,disabled:``,type:`success`,plain:``},{default:f(()=>[a(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.$t(`skill.directory.installed`)),1)]),_:1})):g.selectedItem.installable&&!g.canInstallOnSurface(g.selectedItem)?(h(),d(N,{key:2,disabled:``,title:g.$t(`skill.directory.surfaceBlocked`,{platforms:g.surfaceLabels(g.selectedItem)})},{default:f(()=>[a(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.$t(`skill.directory.surfaceUnavailable`)),1)]),_:1},8,[`title`])):g.selectedItem.installable?(h(),d(N,{key:3,type:`primary`,loading:g.installing,onClick:_[4]||=e=>g.onInstall(g.selectedItem)},{default:f(()=>[a(P,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.$t(`skill.directory.install`)),1)]),_:1},8,[`loading`])):(h(),d(N,{key:4,disabled:``,title:g.selectedItem.license},{default:f(()=>[a(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.selectedItem.license||g.$t(`skill.directory.notInstallable`)),1)]),_:1},8,[`title`]))])]),e(`div`,je,[e(`h2`,Me,`/`+i(g.selectedItem.slug),1),e(`div`,Ne,[e(`span`,null,[e(`strong`,null,i(g.$t(`skill.meta.addedBy`))+`:`,1),r(` `+i(g.selectedItem.publisher),1)]),g.selectedItem.license?(h(),s(`span`,Pe,[e(`strong`,null,i(g.$t(`skill.directory.license`))+`:`,1),r(` `+i(g.selectedItem.license),1)])):o(``,!0),g.selectedItem.version?(h(),s(`span`,Fe,`v`+i(g.selectedItem.version),1)):o(``,!0),g.surfaceLabels(g.selectedItem)?(h(),s(`span`,{key:2,class:`directory-detail-surface`,title:g.$t(`skill.directory.surfaceHint`)},i(g.$t(`skill.directory.surfaceOnly`,{platforms:g.surfaceLabels(g.selectedItem)})),9,Ie)):o(``,!0)]),e(`p`,Le,i(g.selectedItem.description),1),a(F,{class:`directory-detail-content`,source:g.detailBody,sanitize:``},null,8,[`source`])])],64)):(h(),s(c,{key:0},[e(`header`,ue,[a(C,{modelValue:g.searchQuery,"onUpdate:modelValue":_[0]||=e=>g.searchQuery=e,class:`directory-search`,size:`default`,clearable:``,placeholder:g.$t(`skill.directory.searchPlaceholder`),onInput:g.onSearchInput},{prefix:f(()=>[a(S,{size:14,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`modelValue`,`placeholder`,`onInput`]),e(`div`,de,[a(T,{modelValue:g.namespaceFilter,"onUpdate:modelValue":_[1]||=e=>g.namespaceFilter=e,class:`directory-select`,placeholder:g.$t(`skill.directory.allPublishers`),clearable:``,size:`default`,onChange:g.reloadFromFirstPage},{default:f(()=>[(h(!0),s(c,null,m(g.namespaceOptions,e=>(h(),d(w,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`onChange`]),a(T,{modelValue:g.sortBy,"onUpdate:modelValue":_[2]||=e=>g.sortBy=e,class:`directory-select directory-select-sm`,size:`default`,onChange:g.reloadFromFirstPage},{default:f(()=>[a(w,{label:g.$t(`skill.directory.sort.popular`),value:`popular`},null,8,[`label`]),a(w,{label:g.$t(`skill.directory.sort.recent`),value:`recent`},null,8,[`label`]),a(w,{label:g.$t(`skill.directory.sort.name`),value:`name`},null,8,[`label`])]),_:1},8,[`modelValue`,`onChange`])])]),u((h(),s(`div`,fe,[!g.loading&&g.total===0?(h(),s(`p`,pe,i(g.$t(`skill.directory.empty`)),1)):(h(),s(`div`,me,[(h(!0),s(c,null,m(g.items,c=>(h(),s(`article`,{key:c.id,class:n([`directory-card`,{"is-installed":c.installed}]),onClick:e=>g.openDetail(c)},[e(`div`,ge,[e(`span`,_e,`/`+i(c.slug),1),c.installed?(h(),s(`span`,{key:0,class:`directory-card-action is-installed`,title:g.$t(`skill.directory.installed`)},[a(E,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ve)):c.installable&&!g.canInstallOnSurface(c)?(h(),s(`span`,{key:1,class:`directory-card-locked`,title:g.$t(`skill.directory.surfaceBlocked`,{platforms:g.surfaceLabels(c)})},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ye)):c.installable?(h(),s(`button`,{key:2,class:`directory-card-action`,"aria-label":g.$t(`skill.directory.install`),title:g.$t(`skill.directory.install`),onClick:t(e=>g.onInstall(c),[`stop`])},[a(O,{size:16,"aria-hidden":`true`,focusable:`false`})],8,be)):(h(),s(`span`,{key:3,class:`directory-card-locked`,title:c.license},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,xe))]),e(`div`,Se,[e(`span`,Ce,i(c.publisher),1),c.install_count>0?(h(),s(`span`,we,[a(k,{size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.formatCount(c.install_count)),1)])):o(``,!0),g.surfaceLabels(c)?(h(),s(`span`,{key:1,class:`directory-card-surface`,title:g.$t(`skill.directory.surfaceHint`)},i(g.surfaceLabels(c)),9,Te)):o(``,!0)]),e(`p`,Ee,i(c.description),1)],10,he))),128))]))])),[[L,g.loading]]),g.total>g.pageSize?(h(),s(`footer`,De,[a(A,{"current-page":g.currentPage,"page-size":g.pageSize,total:g.total,"pager-count":5,background:``,layout:`prev, pager, next, total`,onCurrentChange:g.onPageChange},null,8,[`current-page`,`page-size`,`total`,`onCurrentChange`])])):o(``,!0)],64))])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`show-close`,`onOpen`])}var ze=M(se,[[`render`,Re],[`__scopeId`,`data-v-f17843cb`]]),Be=10*1024*1024,Ve=/\.(tar\.gz|tgz|tar|zip|md)$/i,$=g({name:`UploadSkillDialog`,components:{ElDialog:I,ElButton:z,AddFileIcon:Y,CloudUploadIcon:J},props:{siteId:{type:String,default:``},modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`created`],data(){return{file:null,isDragging:!1,uploading:!1}},methods:{onVisibleChange(e){this.$emit(`update:modelValue`,e)},onClose(){this.uploading||this.$emit(`update:modelValue`,!1)},reset(){this.file=null,this.isDragging=!1;let e=this.$refs.fileInput;e&&(e.value=``)},humanSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`},onPickFile(){this.uploading||this.$refs.fileInput?.click()},onFilePicked(e){let t=e.target.files?.[0]||null;this.acceptFile(t)},onDrop(e){this.isDragging=!1;let t=e.dataTransfer?.files?.[0]||null;this.acceptFile(t)},acceptFile(e){if(!e){this.file=null;return}if(e.size>Be){y.error(this.$t(`skill.message.fileTooLarge`));return}if(!Ve.test(e.name)){y.error(this.$t(`skill.message.fileTypeWrong`));return}this.file=e},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},async onSubmit(){if(this.file){this.uploading=!0;try{if(/\.md$/i.test(this.file.name)){let e=await this.file.text(),{data:t}=await Z.createMarkdown({content:e},this.siteId||void 0);y.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,t.id)}else{let{data:e}=await Z.createTarball(this.file,this.siteId||void 0);y.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id)}this.$emit(`update:modelValue`,!1)}catch(e){y.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.uploading=!1}}}}}),He={key:0,class:`dropzone-hint`},Ue={key:1,class:`dropzone-file`},We={class:`dropzone-file-name`},Ge={class:`dropzone-file-size`},Ke={class:`requirements`},qe={class:`requirements-title`};function Je(o,c,u,p,m,g){let _=l(`add-file-icon`),v=l(`el-button`),y=l(`cloud-upload-icon`),b=l(`el-dialog`);return h(),d(b,{"append-to-body":``,"model-value":o.modelValue,title:o.$t(`skill.dialog.uploadTitle`),width:`min(520px, 94vw)`,"align-center":``,"close-on-click-modal":!o.uploading,"close-on-press-escape":!o.uploading,"show-close":!o.uploading,"onUpdate:modelValue":o.onVisibleChange,onClosed:o.reset},{footer:f(()=>[a(v,{disabled:o.uploading,onClick:o.onClose},{default:f(()=>[r(i(o.$t(`common.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),a(v,{type:`primary`,loading:o.uploading,disabled:!o.file,onClick:o.onSubmit},{default:f(()=>[a(y,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:f(()=>[e(`input`,{ref:`fileInput`,type:`file`,accept:`.tar.gz,.tgz,.tar,.zip,.md,application/gzip,application/zip,application/x-tar,text/markdown`,hidden:``,onChange:c[0]||=(...e)=>o.onFilePicked&&o.onFilePicked(...e)},null,544),e(`div`,{class:n([`dropzone`,{"is-dragging":o.isDragging,"has-file":!!o.file}]),onClick:c[1]||=(...e)=>o.onPickFile&&o.onPickFile(...e),onDragover:c[2]||=t(e=>o.isDragging=!0,[`prevent`]),onDragleave:c[3]||=t(e=>o.isDragging=!1,[`prevent`]),onDrop:c[4]||=t((...e)=>o.onDrop&&o.onDrop(...e),[`prevent`])},[a(_,{class:`dropzone-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),o.file?(h(),s(`p`,Ue,[e(`span`,We,i(o.file.name),1),e(`span`,Ge,i(o.humanSize(o.file.size)),1)])):(h(),s(`p`,He,i(o.$t(`skill.dialog.uploadDrop`)),1))],34),e(`div`,Ke,[e(`p`,qe,i(o.$t(`skill.dialog.fileRequirements`)),1),e(`ul`,null,[e(`li`,null,i(o.$t(`skill.dialog.requirementMd`)),1),e(`li`,null,i(o.$t(`skill.dialog.requirementArchive`)),1)])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var Ye=M($,[[`render`,Je],[`__scopeId`,`data-v-5018f27e`]]),Xe=g({name:`WriteSkillDialog`,components:{ElDialog:I,ElButton:z,ElInput:R,CloudUploadIcon:J},props:{siteId:{type:String,default:``},modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`created`],data(){return{content:``,saving:!1}},methods:{onVisibleChange(e){this.$emit(`update:modelValue`,e)},onClose(){this.saving||this.$emit(`update:modelValue`,!1)},reset(){this.content=``},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},async onSubmit(){if(this.content.trim()){this.saving=!0;try{let{data:e}=await Z.createMarkdown({content:this.content},this.siteId||void 0);y.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id),this.$emit(`update:modelValue`,!1)}catch(e){y.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.saving=!1}}}}}),Ze={class:`hint`};function Qe(t,n,o,s,c,u){let p=l(`el-input`),m=l(`el-button`),g=l(`cloud-upload-icon`),_=l(`el-dialog`);return h(),d(_,{"append-to-body":``,"model-value":t.modelValue,title:t.$t(`skill.dialog.writeTitle`),width:`min(720px, 94vw)`,"align-center":``,"close-on-click-modal":!t.saving,"close-on-press-escape":!t.saving,"show-close":!t.saving,"onUpdate:modelValue":t.onVisibleChange,onClosed:t.reset},{footer:f(()=>[a(m,{disabled:t.saving,onClick:t.onClose},{default:f(()=>[r(i(t.$t(`common.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),a(m,{type:`primary`,loading:t.saving,disabled:!t.content.trim(),onClick:t.onSubmit},{default:f(()=>[a(g,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:f(()=>[e(`p`,Ze,i(t.$t(`skill.dialog.writeHint`)),1),a(p,{modelValue:t.content,"onUpdate:modelValue":n[0]||=e=>t.content=e,type:`textarea`,rows:18,placeholder:t.$t(`skill.placeholder.content`),spellcheck:`false`,class:`editor`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var $e=M(Xe,[[`render`,Qe],[`__scopeId`,`data-v-a5dcdeb8`]]);export{Z as i,Ye as n,ze as r,$e as t};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,j as d,mt as f,ot as p,rt as m,tt as h,z as g}from"./vendor-chart-Dw-P17PN.js";import{r as _,t as v}from"./select-BhxIomVL.js";import{v as y}from"./models-BWtS-s13.js";import{t as b}from"./pagination-CoBnk3Ai.js";import{t as x}from"./arrow-down-3ZwcPIyd.js";import{t as S}from"./arrow-left-BUfU72AI.js";import{t as C}from"./circle-check-PAy9V8Na.js";import{t as w}from"./lock-BACuEQud.js";import{t as T}from"./plus-oRS-6XRp.js";import{t as E}from"./search-MoJY2mLN.js";import{S as D,T as O,k,w as A,y as j}from"./i18n-BEtZpGSv.js";import{A as M,Ga as N,Qi as P,Ua as F,Ya as I,Zi as L,fo as R,io as z,za as B}from"./index-Dn-8sNW2.js";import{c as V,d as ee,f as te,l as ne,m as H,p as U,u as W}from"./vendor-highlight-Dd94xpKT.js";import{t as G}from"./index.es-O4UnpgB0.js";import{t as K}from"./VueMarkdown-BgudlQNQ.js";var q=F(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),J=F(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),Y=F(`square-plus`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),X=()=>({baseURL:`${B()}/api/v1`}),Z=new class{key=`skills/installed`;async list(e){return L.get(`/${this.key}/`,{...X(),params:e?{site_id:e}:void 0})}async get(e){return L.get(`/${this.key}/${e}/`,X())}async createMarkdown(e,t){return L.post(`/${this.key}/`,t?{...e,site_id:t}:e,X())}async createTarball(e,t){let n=new FormData;return n.append(`tarball`,e),t&&n.append(`site_id`,t),L.post(`/${this.key}/`,n,{...X(),headers:{"Content-Type":`multipart/form-data`}})}async update(e,t,n){return L.patch(`/${this.key}/${e}/`,t,{...X(),params:n?{site_id:n}:void 0})}async remove(e,t){return L.delete(`/${this.key}/${e}/`,{...X(),params:t?{site_id:t}:void 0})}async enable(e,t){return L.post(`/${this.key}/${e}/enable/`,void 0,{...X(),params:t?{site_id:t}:void 0})}async disable(e,t){return L.post(`/${this.key}/${e}/disable/`,void 0,{...X(),params:t?{site_id:t}:void 0})}async fetchFile(e,t,n){let r=await L.get(`/${this.key}/${e}/files/`,{...X(),params:{path:t,...n?{site_id:n}:{}},responseType:`arraybuffer`}),i=r.headers[`content-type`]||`application/octet-stream`;return{blob:new Blob([r.data],{type:i}),contentType:i}}},Q=new class{key=`skills`;async list(e={}){return P.get(`/${this.key}/`,{...X(),params:e})}async get(e,t){return P.get(`/${this.key}/${e}/`,{...X(),params:t?{site_id:t}:void 0})}async categories(){return P.get(`/${this.key}/categories/`,X())}async install(e,t={}){return L.post(`/${this.key}/${e}/install/`,t,X())}};function re(){let e=new Set;A()&&e.add(`desktop`),O()&&e.add(`ios`),D()&&e.add(`android`),k()&&e.add(`web`);let t=j();if(t===`mac`)e.add(`mac`);else if(t===`windows`)e.add(`windows`);else if(typeof navigator<`u`){let t=navigator.userAgent||``,n=navigator.userAgentData?.platform,r=/macintosh/i.test(t)&&(navigator.maxTouchPoints||0)>1;!O()&&!r&&(n===`macOS`||/mac os x|macintosh/i.test(t))&&e.add(`mac`),(n===`Windows`||/windows nt/i.test(t))&&e.add(`windows`)}return e}var ie=new Set([`mac`,`windows`,`desktop`,`web`,`ios`,`android`]);function ae(e){let t=e.filter(e=>ie.has(e));if(!t.length)return!0;let n=re();return t.some(e=>n.has(e))}H.registerLanguage(`bash`,U),H.registerLanguage(`json`,te),H.registerLanguage(`markdown`,ee),H.registerLanguage(`python`,W),H.registerLanguage(`shell`,ne),H.registerLanguage(`yaml`,V),H.registerAliases([`yml`],{languageName:`yaml`}),H.registerAliases([`py`],{languageName:`python`}),H.registerAliases([`sh`,`zsh`],{languageName:`bash`});var oe=12,se=g({name:`BrowseSkillsDialog`,components:{VueMarkdown:K,ElDialog:I,ElInput:R,ElButton:z,ElPagination:b,ElSelect:_,ElOption:v,FontAwesomeIcon:G,AddIcon:T,BackIcon:S,DownIcon:x,InstallIcon:q,LockIcon:w,SearchIcon:E,SuccessIcon:C},directives:{loading:N},props:{siteId:{type:String,default:``},modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`installed`],data(){return{loading:!1,installing:!1,items:[],total:0,currentPage:1,searchQuery:``,namespaceFilter:``,sortBy:`popular`,selectedItem:null,searchTimer:null,knownNamespaces:[],publisherByNamespace:{}}},computed:{pageSize(){return oe},namespaceOptions(){let e=new Set(this.knownNamespaces);for(let t of this.items)e.add(t.namespace);return Array.from(e).sort().map(e=>({value:e,label:this.publisherForNamespace(e)}))},detailBody(){return this.selectedItem?this.selectedItem.content.replace(/^---\n[\s\S]*?\n---\n?/,``):``}},methods:{onOpen(){this.selectedItem=null,this.searchQuery=``,this.namespaceFilter=``,this.sortBy=`popular`,this.currentPage=1,this.knownNamespaces=[],this.publisherByNamespace={},this.loadFacets(),this.reload()},openDetail(e){this.selectedItem=e},async loadFacets(){try{let{data:e}=await Q.categories(),t=new Set;for(let n of e.namespaces)t.add(n.namespace);this.knownNamespaces=Array.from(t).sort()}catch(e){console.warn(`failed to load skill catalog facets`,e)}},reloadFromFirstPage(){this.currentPage=1,this.reload()},onPageChange(e){this.currentPage=e,this.reload(),this.$nextTick(()=>{let e=this.$el.querySelector(`.directory-grid-wrapper`);e&&(e.scrollTop=0)})},onSearchInput(){this.searchTimer!==null&&window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(()=>{this.searchTimer=null,this.reloadFromFirstPage()},250)},async reload(){this.loading=!0;try{let{data:e}=await Q.list({q:this.searchQuery.trim()||void 0,namespace:this.namespaceFilter||void 0,sort:this.sortBy,limit:this.pageSize,offset:(this.currentPage-1)*this.pageSize});this.items=e.items,this.total=e.total;for(let t of e.items)t.publisher&&(this.publisherByNamespace[t.namespace]=t.publisher)}catch(e){console.error(e),y.error(this.$t(`skill.directory.loadFailed`))}finally{this.loading=!1}},async onInstall(e){if(!this.installing&&!e.installed){if(!this.canInstallOnSurface(e)){y.warning(this.$t(`skill.directory.surfaceBlocked`,{platforms:this.surfaceLabels(e)}));return}this.installing=!0;try{let{data:t}=await Q.install(e.id,this.siteId?{site_id:this.siteId}:{});y.success(this.$t(`skill.directory.installSuccess`,{name:e.slug})),this.$emit(`installed`,t.id),e.installed=!0,e.install_count+=1}catch(t){let n=this.extractError(t);n.includes(`already exists`)?(e.installed=!0,y.warning(this.$t(`skill.directory.alreadyInstalled`,{name:e.slug}))):y.error(this.$t(`skill.directory.installFailed`,{detail:n}))}finally{this.installing=!1}}},extractError(e){return e?.response?.data?.detail||String(e)||`unknown error`},formatCount(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)},publisherForNamespace(e){if(this.publisherByNamespace[e])return this.publisherByNamespace[e];let t=this.items.find(t=>t.namespace===e);return t?t.publisher:e},restrictedSurfaces(e){let t=e.frontmatter?.surfaces;return Array.isArray(t)?t.filter(e=>typeof e==`string`&&e.trim().length>0).map(e=>e.trim().toLowerCase()):[]},surfaceLabel(e){let t=`skill.directory.surface.${e}`,n=this.$t(t);return n===t?e:n},surfaceLabels(e){return this.restrictedSurfaces(e).map(e=>this.surfaceLabel(e)).join(` / `)},canInstallOnSurface(e){return ae(this.restrictedSurfaces(e))}}}),ce={class:`directory`},le={class:`directory-main`},ue={class:`directory-header`},de={class:`directory-controls`},fe={class:`directory-grid-wrapper`},pe={key:0,class:`directory-empty`},me={key:1,class:`directory-grid`},he=[`onClick`],ge={class:`directory-card-head`},_e={class:`directory-card-title`},ve=[`title`],ye=[`title`],be=[`aria-label`,`title`,`onClick`],xe=[`title`],Se={class:`directory-card-meta`},Ce={class:`directory-card-publisher`},we={key:0,class:`directory-card-count`},Te=[`title`],Ee={class:`directory-card-desc`},De={key:0,class:`directory-footer`},Oe={class:`directory-detail-head`},ke={class:`directory-detail-actions`},Ae=[`href`],je={class:`directory-detail-body`},Me={class:`directory-detail-title`},Ne={class:`directory-detail-meta`},Pe={key:0},Fe={key:1},Ie=[`title`],Le={class:`directory-detail-desc`};function Re(g,_,v,y,b,x){let S=l(`search-icon`),C=l(`el-input`),w=l(`el-option`),T=l(`el-select`),E=l(`success-icon`),D=l(`lock-icon`),O=l(`add-icon`),k=l(`down-icon`),A=l(`el-pagination`),j=l(`back-icon`),M=l(`font-awesome-icon`),N=l(`el-button`),P=l(`install-icon`),F=l(`vue-markdown`),I=l(`el-dialog`),L=p(`loading`);return h(),d(I,{"append-to-body":``,"model-value":g.modelValue,title:g.$t(`skill.dialog.directoryTitle`),width:`min(960px, 94vw)`,"align-center":``,class:`directory-dialog`,"close-on-click-modal":!g.installing,"show-close":!g.installing,"onUpdate:modelValue":_[5]||=e=>g.$emit(`update:modelValue`,e),onOpen:g.onOpen},{default:f(()=>[e(`div`,ce,[e(`main`,le,[g.selectedItem?(h(),s(c,{key:1},[e(`header`,Oe,[e(`button`,{class:`directory-back-btn`,onClick:_[3]||=e=>g.selectedItem=null},[a(j,{size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.$t(`skill.directory.back`)),1)]),e(`div`,ke,[g.selectedItem.source_url?(h(),s(`a`,{key:0,href:g.selectedItem.source_url,target:`_blank`,class:`directory-link`},[a(M,{icon:`fa-brands fa-github`}),r(` `+i(g.$t(`skill.directory.viewSource`)),1)],8,Ae)):o(``,!0),g.selectedItem.installed?(h(),d(N,{key:1,disabled:``,type:`success`,plain:``},{default:f(()=>[a(E,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.$t(`skill.directory.installed`)),1)]),_:1})):g.selectedItem.installable&&!g.canInstallOnSurface(g.selectedItem)?(h(),d(N,{key:2,disabled:``,title:g.$t(`skill.directory.surfaceBlocked`,{platforms:g.surfaceLabels(g.selectedItem)})},{default:f(()=>[a(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.$t(`skill.directory.surfaceUnavailable`)),1)]),_:1},8,[`title`])):g.selectedItem.installable?(h(),d(N,{key:3,type:`primary`,loading:g.installing,onClick:_[4]||=e=>g.onInstall(g.selectedItem)},{default:f(()=>[a(P,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.$t(`skill.directory.install`)),1)]),_:1},8,[`loading`])):(h(),d(N,{key:4,disabled:``,title:g.selectedItem.license},{default:f(()=>[a(D,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.selectedItem.license||g.$t(`skill.directory.notInstallable`)),1)]),_:1},8,[`title`]))])]),e(`div`,je,[e(`h2`,Me,`/`+i(g.selectedItem.slug),1),e(`div`,Ne,[e(`span`,null,[e(`strong`,null,i(g.$t(`skill.meta.addedBy`))+`:`,1),r(` `+i(g.selectedItem.publisher),1)]),g.selectedItem.license?(h(),s(`span`,Pe,[e(`strong`,null,i(g.$t(`skill.directory.license`))+`:`,1),r(` `+i(g.selectedItem.license),1)])):o(``,!0),g.selectedItem.version?(h(),s(`span`,Fe,`v`+i(g.selectedItem.version),1)):o(``,!0),g.surfaceLabels(g.selectedItem)?(h(),s(`span`,{key:2,class:`directory-detail-surface`,title:g.$t(`skill.directory.surfaceHint`)},i(g.$t(`skill.directory.surfaceOnly`,{platforms:g.surfaceLabels(g.selectedItem)})),9,Ie)):o(``,!0)]),e(`p`,Le,i(g.selectedItem.description),1),a(F,{class:`directory-detail-content`,source:g.detailBody,sanitize:``},null,8,[`source`])])],64)):(h(),s(c,{key:0},[e(`header`,ue,[a(C,{modelValue:g.searchQuery,"onUpdate:modelValue":_[0]||=e=>g.searchQuery=e,class:`directory-search`,size:`default`,clearable:``,placeholder:g.$t(`skill.directory.searchPlaceholder`),onInput:g.onSearchInput},{prefix:f(()=>[a(S,{size:14,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`modelValue`,`placeholder`,`onInput`]),e(`div`,de,[a(T,{modelValue:g.namespaceFilter,"onUpdate:modelValue":_[1]||=e=>g.namespaceFilter=e,class:`directory-select`,placeholder:g.$t(`skill.directory.allPublishers`),clearable:``,size:`default`,onChange:g.reloadFromFirstPage},{default:f(()=>[(h(!0),s(c,null,m(g.namespaceOptions,e=>(h(),d(w,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`onChange`]),a(T,{modelValue:g.sortBy,"onUpdate:modelValue":_[2]||=e=>g.sortBy=e,class:`directory-select directory-select-sm`,size:`default`,onChange:g.reloadFromFirstPage},{default:f(()=>[a(w,{label:g.$t(`skill.directory.sort.popular`),value:`popular`},null,8,[`label`]),a(w,{label:g.$t(`skill.directory.sort.recent`),value:`recent`},null,8,[`label`]),a(w,{label:g.$t(`skill.directory.sort.name`),value:`name`},null,8,[`label`])]),_:1},8,[`modelValue`,`onChange`])])]),u((h(),s(`div`,fe,[!g.loading&&g.total===0?(h(),s(`p`,pe,i(g.$t(`skill.directory.empty`)),1)):(h(),s(`div`,me,[(h(!0),s(c,null,m(g.items,c=>(h(),s(`article`,{key:c.id,class:n([`directory-card`,{"is-installed":c.installed}]),onClick:e=>g.openDetail(c)},[e(`div`,ge,[e(`span`,_e,`/`+i(c.slug),1),c.installed?(h(),s(`span`,{key:0,class:`directory-card-action is-installed`,title:g.$t(`skill.directory.installed`)},[a(E,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ve)):c.installable&&!g.canInstallOnSurface(c)?(h(),s(`span`,{key:1,class:`directory-card-locked`,title:g.$t(`skill.directory.surfaceBlocked`,{platforms:g.surfaceLabels(c)})},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,ye)):c.installable?(h(),s(`button`,{key:2,class:`directory-card-action`,"aria-label":g.$t(`skill.directory.install`),title:g.$t(`skill.directory.install`),onClick:t(e=>g.onInstall(c),[`stop`])},[a(O,{size:16,"aria-hidden":`true`,focusable:`false`})],8,be)):(h(),s(`span`,{key:3,class:`directory-card-locked`,title:c.license},[a(D,{size:16,"aria-hidden":`true`,focusable:`false`})],8,xe))]),e(`div`,Se,[e(`span`,Ce,i(c.publisher),1),c.install_count>0?(h(),s(`span`,we,[a(k,{size:14,"aria-hidden":`true`,focusable:`false`}),r(` `+i(g.formatCount(c.install_count)),1)])):o(``,!0),g.surfaceLabels(c)?(h(),s(`span`,{key:1,class:`directory-card-surface`,title:g.$t(`skill.directory.surfaceHint`)},i(g.surfaceLabels(c)),9,Te)):o(``,!0)]),e(`p`,Ee,i(c.description),1)],10,he))),128))]))])),[[L,g.loading]]),g.total>g.pageSize?(h(),s(`footer`,De,[a(A,{"current-page":g.currentPage,"page-size":g.pageSize,total:g.total,"pager-count":5,background:``,layout:`prev, pager, next, total`,onCurrentChange:g.onPageChange},null,8,[`current-page`,`page-size`,`total`,`onCurrentChange`])])):o(``,!0)],64))])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`show-close`,`onOpen`])}var ze=M(se,[[`render`,Re],[`__scopeId`,`data-v-f17843cb`]]),Be=10*1024*1024,Ve=/\.(tar\.gz|tgz|tar|zip|md)$/i,$=g({name:`UploadSkillDialog`,components:{ElDialog:I,ElButton:z,AddFileIcon:Y,CloudUploadIcon:J},props:{siteId:{type:String,default:``},modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`created`],data(){return{file:null,isDragging:!1,uploading:!1}},methods:{onVisibleChange(e){this.$emit(`update:modelValue`,e)},onClose(){this.uploading||this.$emit(`update:modelValue`,!1)},reset(){this.file=null,this.isDragging=!1;let e=this.$refs.fileInput;e&&(e.value=``)},humanSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`},onPickFile(){this.uploading||this.$refs.fileInput?.click()},onFilePicked(e){let t=e.target.files?.[0]||null;this.acceptFile(t)},onDrop(e){this.isDragging=!1;let t=e.dataTransfer?.files?.[0]||null;this.acceptFile(t)},acceptFile(e){if(!e){this.file=null;return}if(e.size>Be){y.error(this.$t(`skill.message.fileTooLarge`));return}if(!Ve.test(e.name)){y.error(this.$t(`skill.message.fileTypeWrong`));return}this.file=e},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},async onSubmit(){if(this.file){this.uploading=!0;try{if(/\.md$/i.test(this.file.name)){let e=await this.file.text(),{data:t}=await Z.createMarkdown({content:e},this.siteId||void 0);y.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,t.id)}else{let{data:e}=await Z.createTarball(this.file,this.siteId||void 0);y.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id)}this.$emit(`update:modelValue`,!1)}catch(e){y.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.uploading=!1}}}}}),He={key:0,class:`dropzone-hint`},Ue={key:1,class:`dropzone-file`},We={class:`dropzone-file-name`},Ge={class:`dropzone-file-size`},Ke={class:`requirements`},qe={class:`requirements-title`};function Je(o,c,u,p,m,g){let _=l(`add-file-icon`),v=l(`el-button`),y=l(`cloud-upload-icon`),b=l(`el-dialog`);return h(),d(b,{"append-to-body":``,"model-value":o.modelValue,title:o.$t(`skill.dialog.uploadTitle`),width:`min(520px, 94vw)`,"align-center":``,"close-on-click-modal":!o.uploading,"close-on-press-escape":!o.uploading,"show-close":!o.uploading,"onUpdate:modelValue":o.onVisibleChange,onClosed:o.reset},{footer:f(()=>[a(v,{disabled:o.uploading,onClick:o.onClose},{default:f(()=>[r(i(o.$t(`common.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),a(v,{type:`primary`,loading:o.uploading,disabled:!o.file,onClick:o.onSubmit},{default:f(()=>[a(y,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:f(()=>[e(`input`,{ref:`fileInput`,type:`file`,accept:`.tar.gz,.tgz,.tar,.zip,.md,application/gzip,application/zip,application/x-tar,text/markdown`,hidden:``,onChange:c[0]||=(...e)=>o.onFilePicked&&o.onFilePicked(...e)},null,544),e(`div`,{class:n([`dropzone`,{"is-dragging":o.isDragging,"has-file":!!o.file}]),onClick:c[1]||=(...e)=>o.onPickFile&&o.onPickFile(...e),onDragover:c[2]||=t(e=>o.isDragging=!0,[`prevent`]),onDragleave:c[3]||=t(e=>o.isDragging=!1,[`prevent`]),onDrop:c[4]||=t((...e)=>o.onDrop&&o.onDrop(...e),[`prevent`])},[a(_,{class:`dropzone-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),o.file?(h(),s(`p`,Ue,[e(`span`,We,i(o.file.name),1),e(`span`,Ge,i(o.humanSize(o.file.size)),1)])):(h(),s(`p`,He,i(o.$t(`skill.dialog.uploadDrop`)),1))],34),e(`div`,Ke,[e(`p`,qe,i(o.$t(`skill.dialog.fileRequirements`)),1),e(`ul`,null,[e(`li`,null,i(o.$t(`skill.dialog.requirementMd`)),1),e(`li`,null,i(o.$t(`skill.dialog.requirementArchive`)),1)])])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var Ye=M($,[[`render`,Je],[`__scopeId`,`data-v-5018f27e`]]),Xe=g({name:`WriteSkillDialog`,components:{ElDialog:I,ElButton:z,ElInput:R,CloudUploadIcon:J},props:{siteId:{type:String,default:``},modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`,`created`],data(){return{content:``,saving:!1}},methods:{onVisibleChange(e){this.$emit(`update:modelValue`,e)},onClose(){this.saving||this.$emit(`update:modelValue`,!1)},reset(){this.content=``},extractError(e){let t=e;return t?.response?.data?.detail||(t?.response?.data?.content||[]).join(`; `)||String(e)||`unknown error`},async onSubmit(){if(this.content.trim()){this.saving=!0;try{let{data:e}=await Z.createMarkdown({content:this.content},this.siteId||void 0);y.success(this.$t(`skill.message.createSuccess`)),this.$emit(`created`,e.id),this.$emit(`update:modelValue`,!1)}catch(e){y.error(this.$t(`skill.message.createFailed`,{detail:this.extractError(e)}))}finally{this.saving=!1}}}}}),Ze={class:`hint`};function Qe(t,n,o,s,c,u){let p=l(`el-input`),m=l(`el-button`),g=l(`cloud-upload-icon`),_=l(`el-dialog`);return h(),d(_,{"append-to-body":``,"model-value":t.modelValue,title:t.$t(`skill.dialog.writeTitle`),width:`min(720px, 94vw)`,"align-center":``,"close-on-click-modal":!t.saving,"close-on-press-escape":!t.saving,"show-close":!t.saving,"onUpdate:modelValue":t.onVisibleChange,onClosed:t.reset},{footer:f(()=>[a(m,{disabled:t.saving,onClick:t.onClose},{default:f(()=>[r(i(t.$t(`common.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),a(m,{type:`primary`,loading:t.saving,disabled:!t.content.trim(),onClick:t.onSubmit},{default:f(()=>[a(g,{class:`mr-1`,size:16,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`skill.button.create`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])]),default:f(()=>[e(`p`,Ze,i(t.$t(`skill.dialog.writeHint`)),1),a(p,{modelValue:t.content,"onUpdate:modelValue":n[0]||=e=>t.content=e,type:`textarea`,rows:18,placeholder:t.$t(`skill.placeholder.content`),spellcheck:`false`,class:`editor`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`model-value`,`title`,`close-on-click-modal`,`close-on-press-escape`,`show-close`,`onUpdate:modelValue`,`onClosed`])}var $e=M(Xe,[[`render`,Qe],[`__scopeId`,`data-v-a5dcdeb8`]]);export{Z as i,Ye as n,ze as r,$e as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,Gt as t,H as n,I as r,Jt as i,L as a,M as o,Mt as s,N as c,T as l,U as u,ht as d,it as f,j as p,k as m,nt as h,rt as g,tt as _,ut as v,z as y}from"./vendor-chart-Dw-P17PN.js";import{$ as b,L as x,Ot as S,X as C,et as w}from"./icon-CDmWyIgD.js";import{a as T,c as E,i as D,t as O}from"./install-Cn-SLM3u.js";import{r as k}from"./use-deprecated-BAB4ggjd.js";import{n as A,r as j}from"./vnode-B_FEx-YD.js";import{S as M,T as N,j as P,w as F}from"./i18n-
|
|
1
|
+
import{A as e,Gt as t,H as n,I as r,Jt as i,L as a,M as o,Mt as s,N as c,T as l,U as u,ht as d,it as f,j as p,k as m,nt as h,rt as g,tt as _,ut as v,z as y}from"./vendor-chart-Dw-P17PN.js";import{$ as b,L as x,Ot as S,X as C,et as w}from"./icon-CDmWyIgD.js";import{a as T,c as E,i as D,t as O}from"./install-Cn-SLM3u.js";import{r as k}from"./use-deprecated-BAB4ggjd.js";import{n as A,r as j}from"./vnode-B_FEx-YD.js";import{S as M,T as N,j as P,w as F}from"./i18n-BEtZpGSv.js";import{t as I}from"./preload-helper-zJ_50EbN.js";import{j as L,q as R}from"./index-Dn-8sNW2.js";var z=Symbol(`elDescriptions`),B=y({name:`ElDescriptionsCell`,props:{cell:{type:Object},tag:{type:String,default:`td`},type:{type:String}},setup(){return{descriptions:u(z,{})}},render(){let e=j(this.cell),t=(this.cell?.dirs||[]).map(e=>{let{dir:t,arg:n,modifiers:r,value:i}=e;return[t,i,n,r]}),{border:r,direction:i}=this.descriptions,a=i===`vertical`,o=()=>{var t;return((t=this.cell?.children)?.label)?.call(t)||e.label},s=()=>{var e;return((e=this.cell?.children)?.default)?.call(e)},c=e.span,l=e.rowspan,u=e.align?`is-${e.align}`:``,f=e.labelAlign?`is-${e.labelAlign}`:u,p=e.className,m=e.labelClassName,h={width:x(this.type===`label`&&(e.labelWidth||this.descriptions.labelWidth)||e.width),minWidth:x(e.minWidth)},g=E(`descriptions`);switch(this.type){case`label`:return d(n(this.tag,{style:h,class:[g.e(`cell`),g.e(`label`),g.is(`bordered-label`,r),g.is(`vertical-label`,a),f,m],colSpan:a?c:1,rowspan:a?1:l},o()),t);case`content`:return d(n(this.tag,{style:h,class:[g.e(`cell`),g.e(`content`),g.is(`bordered-content`,r),g.is(`vertical-content`,a),u,p],colSpan:a?c:c*2-1,rowspan:a?l*2-1:l},s()),t);default:{let r=o(),i={},a=x(e.labelWidth||this.descriptions.labelWidth);return a&&(i.width=a,i.display=`inline-block`),d(n(`td`,{style:h,class:[g.e(`cell`),u],colSpan:c,rowspan:l},[S(r)?void 0:n(`span`,{style:i,class:[g.e(`label`),m]},r),n(`span`,{class:[g.e(`content`),p]},s())]),t)}}}}),V=b({row:{type:w(Array),default:()=>[]}}),H=T(y({...y({name:`ElDescriptionsRow`}),props:V,setup(t){let n=u(z,{});return(t,r)=>s(n).direction===`vertical`?(_(),c(l,{key:0},[e(`tr`,null,[(_(!0),c(l,null,g(t.row,(e,t)=>(_(),p(s(B),{key:`tr1-${t}`,cell:e,tag:`th`,type:`label`},null,8,[`cell`]))),128))]),e(`tr`,null,[(_(!0),c(l,null,g(t.row,(e,t)=>(_(),p(s(B),{key:`tr2-${t}`,cell:e,tag:`td`,type:`content`},null,8,[`cell`]))),128))])],64)):(_(),c(`tr`,{key:1},[(_(!0),c(l,null,g(t.row,(e,t)=>(_(),c(l,{key:`tr3-${t}`},[s(n).border?(_(),c(l,{key:0},[a(s(B),{cell:e,tag:`td`,type:`label`},null,8,[`cell`]),a(s(B),{cell:e,tag:`td`,type:`content`},null,8,[`cell`])],64)):(_(),p(s(B),{key:1,cell:e,tag:`td`,type:`both`},null,8,[`cell`]))],64))),128))]))}}),[[`__file`,`descriptions-row.vue`]]),U=b({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:[`horizontal`,`vertical`],default:`horizontal`},size:C,title:{type:String,default:``},extra:{type:String,default:``},labelWidth:{type:[String,Number],default:``}}),W=`ElDescriptionsItem`,G=T(y({...y({name:`ElDescriptions`}),props:U,setup(n){let a=n,u=E(`descriptions`),d=k(),y=v();h(z,a);let b=m(()=>[u.b(),u.m(d.value)]),x=(e,t,n,r=!1)=>(e.props||={},t>n&&(e.props.span=n),r&&(e.props.span=t),e),S=()=>{if(!y.default)return[];let e=A(y.default()).filter(e=>e?.type?.name===W),t=[],n=[],r=a.column,i=0,o=[];return e.forEach((s,c)=>{var l;let u=s.props?.span||1,d=s.props?.rowspan||1,f=t.length;if(o[f]||(o[f]=0),d>1)for(let e=1;e<d;e++)o[l=f+e]||(o[l]=0),o[f+e]++,i++;if(o[f]>0&&(r-=o[f],o[f]=0),c<e.length-1&&(i+=u>r?r:u),c===e.length-1){let e=a.column-i%a.column;n.push(x(s,e,r,!0)),t.push(n);return}u<r?(r-=u,n.push(s)):(n.push(x(s,u,r)),t.push(n),r=a.column,n=[])}),t};return(n,a)=>(_(),c(`div`,{class:t(s(b))},[n.title||n.extra||n.$slots.title||n.$slots.extra?(_(),c(`div`,{key:0,class:t(s(u).e(`header`))},[e(`div`,{class:t(s(u).e(`title`))},[f(n.$slots,`title`,{},()=>[r(i(n.title),1)])],2),e(`div`,{class:t(s(u).e(`extra`))},[f(n.$slots,`extra`,{},()=>[r(i(n.extra),1)])],2)],2)):o(`v-if`,!0),e(`div`,{class:t(s(u).e(`body`))},[e(`table`,{class:t([s(u).e(`table`),s(u).is(`bordered`,n.border)])},[e(`tbody`,null,[(_(!0),c(l,null,g(S(),(e,t)=>(_(),p(H,{key:t,row:e},null,8,[`row`]))),128))])],2)],2)],2))}}),[[`__file`,`description.vue`]]),K=[`left`,`center`,`right`],q=y({name:W,props:b({label:{type:String,default:``},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:``},minWidth:{type:[String,Number],default:``},labelWidth:{type:[String,Number],default:``},align:{type:String,values:K,default:`left`},labelAlign:{type:String,values:K},className:{type:String,default:``},labelClassName:{type:String,default:``}})}),J=O(G,{DescriptionsItem:q}),Y=D(q);function X(){return typeof navigator>`u`?!1:/MicroMessenger/i.test(navigator.userAgent||``)}function Z(){return typeof navigator>`u`?!1:/(iPhone|iPad|iPod|Android|HarmonyOS|Mobile|Windows Phone|BlackBerry|Opera Mini)/i.test(navigator.userAgent||``)}var Q=`checkout.airwallex.com`;async function $(e){if(e.provider!==`airwallex`)throw Error(`Invalid Airwallex payment provider`);if(e.flow===`billing_checkout`){if(!e.checkout_id||!e.url)throw Error(`Incomplete Airwallex billing checkout`);let t=new URL(e.url);if(t.protocol!==`https:`||t.hostname!==Q||t.username||t.password)throw Error(`Invalid Airwallex billing checkout URL`);let n=t.toString();if(N())throw Error(`Airwallex checkout is unavailable on iOS`);if(M()){await R.open({url:n});return}if(F()){let e=L();if(!e?.openAirwallexCheckout)throw Error(`Airwallex checkout requires a newer desktop app`);await e.openAirwallexCheckout(n);return}window.location.assign(n);return}if(!P())throw Error(`Airwallex PaymentIntent checkout requires HTTPS web`);if(!e.intent_id||!e.client_secret||e.currency!==`USD`||![`demo`,`prod`].includes(e.environment))throw Error(`Incomplete Airwallex PaymentIntent checkout`);let t=new URL(e.success_url);if(t.protocol!==`https:`||t.origin!==window.location.origin||t.username||t.password)throw Error(`Invalid Airwallex success URL`);let{init:n}=await I(async()=>{let{init:e}=await import(`./lib-CsvHzvqw.js`);return{init:e}},[]),{payments:r}=await n({env:e.environment,enabledElements:[`payments`]});if(!r)throw Error(`Airwallex payments SDK unavailable`);let i=r.redirectToCheckout({mode:`payment`,intent_id:e.intent_id,client_secret:e.client_secret,currency:e.currency,methods:[`card`],requiredBillingContactFields:[`name`,`email`,`address`],successUrl:t.toString(),autoCapture:!0});if(typeof i==`string`&&i)throw Error(`Airwallex checkout could not start`)}export{Y as a,J as i,X as n,Z as r,$ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ua as e}from"./index-Dn-8sNW2.js";var t=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]);export{t};
|
package/dist/assets/{arrow-down-wide-narrow-Bm2Z5o2d.js → arrow-down-wide-narrow-D-uOJGHw.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ua as e}from"./index-
|
|
1
|
+
import{Ua as e}from"./index-Dn-8sNW2.js";var t=e(`arrow-down-wide-narrow`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M11 4h10`,key:`1w87gc`}],[`path`,{d:`M11 8h7`,key:`djye34`}],[`path`,{d:`M11 12h4`,key:`q8tih4`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ua as e}from"./index-Dn-8sNW2.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ua as e}from"./index-Dn-8sNW2.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ua as e}from"./index-Dn-8sNW2.js";var t=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as e,w as t}from"./i18n-
|
|
1
|
+
import{O as e,w as t}from"./i18n-BEtZpGSv.js";import{G as n,W as r,j as i,q as a,za as o}from"./index-Dn-8sNW2.js";function s(){return new URL(`/connections/popup-return`,o()).toString()}var c=`popup=yes,width=600,height=760,noopener=no,noreferrer=no`;function l(e){let t=typeof e==`string`?e:`about:blank`,n=window.open(t,`acedata-connect`,c);return n?(typeof e!=`string`&&e.then(e=>n.location.replace(e),()=>n.close()),new Promise(e=>{let t=window.setInterval(()=>{n.closed&&(window.clearInterval(t),e())},500)})):null}async function u(e){if(!t())return{returnUrl:e};let n=i();if(!n?.createConnectorCallback)throw Error(`desktop-authorize-unsupported`);let r=await n.createConnectorCallback();return{returnUrl:r.returnUrl,requestId:r.requestId}}async function d(n,r,i){if(t())return m(n,r,i);if(e()){await p(n,r);return}await f(n,r)}async function f(e,t){let i=t||r(e)?n(e,t):e,a=l(i);if(!a){window.location.href=await i;return}await a}async function p(e,t){let r;try{let i=new Promise(e=>{a.addListener(`browserFinished`,()=>e()).then(e=>{r=e})}),o=await n(e,t);await a.open({url:o}),await i}catch(e){console.warn(`in-app browser failed for connector authorize`,e)}finally{await r?.remove()}}async function m(e,t,r){let a=i();if(!a?.openAuthorizeConnector||!a.onConnectorCallback||!r)throw Error(`desktop-authorize-unsupported`);let o=await n(e,t),s,c,l=new Promise((e,t)=>{c=a.onConnectorCallback(t=>{t.requestId===r&&e(t)}),s=window.setTimeout(()=>t(Error(`desktop-authorize-expired`)),600*1e3)});try{return await a.openAuthorizeConnector(o),await l}finally{c?.(),s!==void 0&&window.clearTimeout(s)}}export{u as n,s as r,d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,B as t,G as n,Gt as r,H as i,I as a,Jt as o,K as s,Mt as c,N as l,Ot as u,Q as d,Rt as f,St as p,T as m,U as h,Vt as g,Wt as _,Y as v,ft as y,ht as b,it as x,j as S,k as C,mt as w,nt as T,p as E,pt as D,tt as O,wt as k,x as ee,z as A}from"./vendor-chart-Dw-P17PN.js";import{$ as j,B as M,Et as N,F as te,I as P,Ot as F,Tt as I,a as L,bt as R,c as z,dt as B,et as V,it as H,o as ne,rt as U,w as W,z as re}from"./icon-CDmWyIgD.js";import{a as G,c as K,i as q,t as ie}from"./install-Cn-SLM3u.js";import{t as ae}from"./tooltip-BKeGCQnC.js";import{b as J,x as oe}from"./models-CSuuDqRA.js";import{r as Y}from"./aria-8oQuUBWy.js";import{n as X}from"./vnode-B_FEx-YD.js";import{t as Z}from"./click-outside-CzJDhMNh.js";import{t as se}from"./collapse-transition-BUGXhx7B.js";import{oo as ce}from"./index-BHXtbt9o.js";var le=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll(`li`),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){let e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,t=>{t.addEventListener(`keydown`,t=>{let n=!1;switch(t.code){case J.down:this.gotoSubIndex(this.subIndex+1),n=!0;break;case J.up:this.gotoSubIndex(this.subIndex-1),n=!0;break;case J.tab:Y(e,`mouseleave`);break;case J.enter:case J.numpadEnter:case J.space:n=!0,t.currentTarget.click();break}return n&&(t.preventDefault(),t.stopPropagation()),!1})})}},ue=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute(`tabindex`,`0`);let t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new le(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener(`keydown`,e=>{let t=!1;switch(e.code){case J.down:Y(e.currentTarget,`mouseenter`),this.submenu&&this.submenu.gotoSubIndex(0),t=!0;break;case J.up:Y(e.currentTarget,`mouseenter`),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),t=!0;break;case J.tab:Y(e.currentTarget,`mouseleave`);break;case J.enter:case J.numpadEnter:case J.space:t=!0,e.currentTarget.click();break}t&&e.preventDefault()})}},de=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){let t=this.domNode.childNodes;Array.from(t).forEach(t=>{t.nodeType===1&&new ue(t,e)})}},fe=G(A({...A({name:`ElMenuCollapseTransition`}),setup(e){let t=K(`menu`),r={onBeforeEnter:e=>e.style.opacity=`0.2`,onEnter(e,n){P(e,`${t.namespace.value}-opacity-transition`),e.style.opacity=`1`,n()},onAfterEnter(e){M(e,`${t.namespace.value}-opacity-transition`),e.style.opacity=``},onBeforeLeave(e){e.dataset||={},re(e,t.m(`collapse`))?(M(e,t.m(`collapse`)),e.dataset.oldOverflow=e.style.overflow,e.dataset.scrollWidth=e.clientWidth.toString(),P(e,t.m(`collapse`))):(P(e,t.m(`collapse`)),e.dataset.oldOverflow=e.style.overflow,e.dataset.scrollWidth=e.clientWidth.toString(),M(e,t.m(`collapse`))),e.style.width=`${e.scrollWidth}px`,e.style.overflow=`hidden`},onLeave(e){P(e,`horizontal-collapse-transition`),e.style.width=`${e.dataset.scrollWidth}px`}};return(e,t)=>(O(),S(E,n({mode:`out-in`},c(r)),{default:w(()=>[x(e.$slots,`default`)]),_:3},16))}}),[[`__file`,`menu-collapse-transition.vue`]]);function pe(e,t){let n=C(()=>{let n=e.parent,r=[t.value];for(;n.type.name!==`ElMenu`;)n.props.index&&r.unshift(n.props.index),n=n.parent;return r});return{parentMenu:C(()=>{let t=e.parent;for(;t&&![`ElMenu`,`ElSubMenu`].includes(t.type.name);)t=t.parent;return t}),indexPath:n}}function me(e){return C(()=>{let t=e.backgroundColor;return t?new ce(t).shade(20).toString():``})}var he=(e,t)=>{let n=K(`menu`);return C(()=>n.cssVarBlock({"text-color":e.textColor||``,"hover-text-color":e.textColor||``,"bg-color":e.backgroundColor||``,"hover-bg-color":me(e).value||``,"active-color":e.activeTextColor||``,level:`${t}`}))},ge=`rootMenu`,Q=`subMenu:`,_e=j({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:L},expandOpenIcon:{type:L},collapseCloseIcon:{type:L},collapseOpenIcon:{type:L}}),ve=`ElSubMenu`,ye=A({name:ve,props:_e,setup(e,{slots:n,expose:r}){let a=t(),{indexPath:o,parentMenu:s}=pe(a,C(()=>e.index)),c=K(`menu`),l=K(`sub-menu`),u=h(ge);u||H(ve,`can not inject root menu`);let f=h(`${Q}${s.value.uid}`);f||H(ve,`can not inject sub menu`);let g=k({}),x=k({}),S,w=k(!1),E=k(),D=k(),O=C(()=>B.value===`horizontal`&&j.value?`bottom-start`:`right-start`),A=C(()=>B.value===`horizontal`&&j.value||B.value===`vertical`&&!u.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?I.value?e.expandOpenIcon:e.expandCloseIcon:ne:e.collapseCloseIcon&&e.collapseOpenIcon?I.value?e.collapseOpenIcon:e.collapseCloseIcon:z),j=C(()=>f.level===0),M=C(()=>{let t=e.teleported;return N(t)?j.value:t}),P=C(()=>u.props.collapse?`${c.namespace.value}-zoom-in-left`:`${c.namespace.value}-zoom-in-top`),F=C(()=>B.value===`horizontal`&&j.value?[`bottom-start`,`bottom-end`,`top-start`,`top-end`,`right-start`,`left-start`]:[`right-start`,`right`,`right-end`,`left-start`,`bottom-start`,`bottom-end`,`top-start`,`top-end`]),I=C(()=>u.openedMenus.includes(e.index)),L=C(()=>[...Object.values(g.value),...Object.values(x.value)].some(({active:e})=>e)),B=C(()=>u.props.mode),V=C(()=>u.props.persistent),U=p({index:e.index,indexPath:o,active:L}),W=he(u.props,f.level+1),re=C(()=>e.popperOffset??u.props.popperOffset),G=C(()=>e.popperClass??u.props.popperClass),q=C(()=>e.showTimeout??u.props.showTimeout),ie=C(()=>e.hideTimeout??u.props.hideTimeout),J=()=>(D.value?.popperRef?.popperInstanceRef)?.destroy(),oe=e=>{e||J()},Y=()=>{u.props.menuTrigger===`hover`&&u.props.mode===`horizontal`||u.props.collapse&&u.props.mode===`vertical`||e.disabled||u.handleSubMenuClick({index:e.index,indexPath:o.value,active:L.value})},X=(t,n=q.value)=>{var r;if(t.type!==`focus`){if(u.props.menuTrigger===`click`&&u.props.mode===`horizontal`||!u.props.collapse&&u.props.mode===`vertical`||e.disabled){f.mouseInChild.value=!0;return}f.mouseInChild.value=!0,S?.(),{stop:S}=R(()=>{u.openMenu(e.index,o.value)},n),M.value&&((r=s.value.vnode.el)==null||r.dispatchEvent(new MouseEvent(`mouseenter`)))}},Z=(t=!1)=>{var n;if(u.props.menuTrigger===`click`&&u.props.mode===`horizontal`||!u.props.collapse&&u.props.mode===`vertical`){f.mouseInChild.value=!1;return}S?.(),f.mouseInChild.value=!1,{stop:S}=R(()=>!w.value&&u.closeMenu(e.index,o.value),ie.value),M.value&&t&&((n=f.handleMouseleave)==null||n.call(f,!0))};return y(()=>u.props.collapse,e=>oe(!!e)),T(`${Q}${a.uid}`,{addSubMenu:e=>{x.value[e.index]=e},removeSubMenu:e=>{delete x.value[e.index]},handleMouseleave:Z,mouseInChild:w,level:f.level+1}),r({opened:I}),d(()=>{u.addSubMenu(U),f.addSubMenu(U)}),v(()=>{f.removeSubMenu(U),u.removeSubMenu(U)}),()=>{let t=[n.title?.call(n),i(te,{class:l.e(`icon-arrow`),style:{transform:I.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&u.props.collapse?`none`:`rotateZ(180deg)`:`none`}},{default:()=>_(A.value)?i(a.appContext.components[A.value]):i(A.value)})],r=u.isMenuPopup?i(ae,{ref:D,visible:I.value,effect:`light`,pure:!0,offset:re.value,showArrow:!1,persistent:V.value,popperClass:G.value,placement:O.value,teleported:M.value,fallbackPlacements:F.value,transition:P.value,gpuAcceleration:!1},{content:()=>i(`div`,{class:[c.m(B.value),c.m(`popup-container`),G.value],onMouseenter:e=>X(e,100),onMouseleave:()=>Z(!0),onFocus:e=>X(e,100)},[i(`ul`,{class:[c.b(),c.m(`popup`),c.m(`popup-${O.value}`)],style:W.value},[n.default?.call(n)])]),default:()=>i(`div`,{class:l.e(`title`),onClick:Y},t)}):i(m,{},[i(`div`,{class:l.e(`title`),ref:E,onClick:Y},t),i(se,{},{default:()=>b(i(`ul`,{role:`menu`,class:[c.b(),c.m(`inline`)],style:W.value},[n.default?.call(n)]),[[ee,I.value]])})]);return i(`li`,{class:[l.b(),l.is(`active`,L.value),l.is(`opened`,I.value),l.is(`disabled`,e.disabled)],role:`menuitem`,ariaHaspopup:!0,ariaExpanded:I.value,onMouseenter:X,onMouseleave:()=>Z(),onFocus:X},[r])}}}),be=j({mode:{type:String,values:[`horizontal`,`vertical`],default:`vertical`},defaultActive:{type:String,default:``},defaultOpeneds:{type:V(Array),default:()=>oe([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:[`hover`,`click`],default:`hover`},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:L,default:()=>W},popperEffect:{type:V(String),default:`dark`},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),xe=e=>f(e)&&e.every(e=>_(e)),Se=A({name:`ElMenu`,props:be,emits:{close:(e,t)=>_(e)&&xe(t),open:(e,t)=>_(e)&&xe(t),select:(e,t,n,r)=>_(e)&&xe(t)&&g(n)&&(N(r)||r instanceof Promise)},setup(e,{emit:n,slots:r,expose:a}){let o=t(),c=o.appContext.config.globalProperties.$router,l=k(),u=K(`menu`),f=K(`sub-menu`),m=k(-1),h=k(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),g=k(e.defaultActive),_=k({}),v=k({}),x=C(()=>e.mode===`horizontal`||e.mode===`vertical`&&e.collapse),S=()=>{let t=g.value&&_.value[g.value];!t||e.mode===`horizontal`||e.collapse||t.indexPath.forEach(e=>{let t=v.value[e];t&&w(e,t.indexPath)})},w=(t,r)=>{h.value.includes(t)||(e.uniqueOpened&&(h.value=h.value.filter(e=>r.includes(e))),h.value.push(t),n(`open`,t,r))},E=e=>{let t=h.value.indexOf(e);t!==-1&&h.value.splice(t,1)},O=(e,t)=>{E(e),n(`close`,e,t)},ee=({index:e,indexPath:t})=>{h.value.includes(e)?O(e,t):w(e,t)},A=t=>{(e.mode===`horizontal`||e.collapse)&&(h.value=[]);let{index:r,indexPath:i}=t;if(!(F(r)||F(i)))if(e.router&&c){let e=t.route||r,a=c.push(e).then(e=>(e||(g.value=r),e));n(`select`,r,i,{index:r,indexPath:i,route:e},a)}else g.value=r,n(`select`,r,i,{index:r,indexPath:i})},j=t=>{let n=_.value;g.value=(n[t]||g.value&&n[g.value]||n[e.defaultActive])?.index??t},M=e=>{let t=getComputedStyle(e),n=Number.parseInt(t.marginLeft,10),r=Number.parseInt(t.marginRight,10);return e.offsetWidth+n+r||0},N=()=>{if(!l.value)return-1;let e=Array.from(l.value?.childNodes??[]).filter(e=>e.nodeName!==`#text`||e.nodeValue),t=getComputedStyle(l.value),n=Number.parseInt(t.paddingLeft,10),r=Number.parseInt(t.paddingRight,10),i=l.value.clientWidth-n-r,a=0,o=0;return e.forEach((e,t)=>{e.nodeName!==`#comment`&&(a+=M(e),a<=i-64&&(o=t+1))}),o===e.length?-1:o},P=e=>v.value[e].indexPath,I=(e,t=33.34)=>{let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{e()},t)}},L=!0,R=()=>{if(m.value===N())return;let e=()=>{m.value=-1,s(()=>{m.value=N()})};L?e():I(e)(),L=!1};y(()=>e.defaultActive,e=>{_.value[e]||(g.value=``),j(e)}),y(()=>e.collapse,e=>{e&&(h.value=[])}),y(_.value,S);let z;D(()=>{e.mode===`horizontal`&&e.ellipsis?z=B(l,R).stop:z?.()});let V=k(!1);{let t=e=>{v.value[e.index]=e},n=e=>{delete v.value[e.index]};T(ge,p({props:e,openedMenus:h,items:_,subMenus:v,activeIndex:g,isMenuPopup:x,addMenuItem:e=>{_.value[e.index]=e},removeMenuItem:e=>{delete _.value[e.index]},addSubMenu:t,removeSubMenu:n,openMenu:w,closeMenu:O,handleMenuItemClick:A,handleSubMenuClick:ee})),T(`${Q}${o.uid}`,{addSubMenu:t,removeSubMenu:n,mouseInChild:V,level:0})}d(()=>{e.mode===`horizontal`&&new de(o.vnode.el,u.namespace.value)}),a({open:e=>{let{indexPath:t}=v.value[e];t.forEach(e=>w(e,t))},close:E,updateActiveIndex:j,handleResize:R});let H=he(e,0);return()=>{let t=r.default?.call(r)??[],a=[];if(e.mode===`horizontal`&&l.value){let n=X(t),r=m.value===-1?n:n.slice(0,m.value),o=m.value===-1?[]:n.slice(m.value);o?.length&&e.ellipsis&&(t=r,a.push(i(ye,{index:`sub-menu-more`,class:f.e(`hide-arrow`),popperOffset:e.popperOffset},{title:()=>i(te,{class:f.e(`icon-more`)},{default:()=>i(e.ellipsisIcon)}),default:()=>o})))}let o=e.closeOnClickOutside?[[Z,()=>{h.value.length&&(V.value||(h.value.forEach(e=>n(`close`,e,P(e))),h.value=[]))}]]:[],s=b(i(`ul`,{key:String(e.collapse),role:`menubar`,ref:l,style:H.value,class:{[u.b()]:!0,[u.m(e.mode)]:!0,[u.m(`collapse`)]:e.collapse}},[...t,...a]),o);return e.collapseTransition&&e.mode===`vertical`?i(fe,()=>s):s}}}),Ce=j({index:{type:V([String,null]),default:null},route:{type:V([String,Object])},disabled:Boolean}),we={click:e=>_(e.index)&&f(e.indexPath)},$=`ElMenuItem`,Te=G(A({...A({name:$}),props:Ce,emits:we,setup(n,{expose:i,emit:a}){let o=n;I(o.index)&&U($,`Missing required prop: "index"`);let s=t(),f=h(ge),g=K(`menu`),_=K(`menu-item`);f||H($,`can not inject root menu`);let{parentMenu:y,indexPath:b}=pe(s,u(o,`index`)),T=h(`${Q}${y.value.uid}`);T||H($,`can not inject sub menu`);let E=C(()=>o.index===f.activeIndex),D=p({index:o.index,indexPath:b,active:E}),k=()=>{o.disabled||(f.handleMenuItemClick({index:o.index,indexPath:b.value,route:o.route}),a(`click`,D))};return d(()=>{T.addSubMenu(D),f.addMenuItem(D)}),v(()=>{T.removeSubMenu(D),f.removeMenuItem(D)}),i({parentMenu:y,rootMenu:f,active:E,nsMenu:g,nsMenuItem:_,handleClick:k}),(t,n)=>(O(),l(`li`,{class:r([c(_).b(),c(_).is(`active`,c(E)),c(_).is(`disabled`,t.disabled)]),role:`menuitem`,tabindex:`-1`,onClick:k},[c(y).type.name===`ElMenu`&&c(f).props.collapse&&t.$slots.title?(O(),S(c(ae),{key:0,effect:c(f).props.popperEffect,placement:`right`,"fallback-placements":[`left`],persistent:c(f).props.persistent},{content:w(()=>[x(t.$slots,`title`)]),default:w(()=>[e(`div`,{class:r(c(g).be(`tooltip`,`trigger`))},[x(t.$slots,`default`)],2)]),_:3},8,[`effect`,`persistent`])):(O(),l(m,{key:1},[x(t.$slots,`default`),x(t.$slots,`title`)],64))],2))}}),[[`__file`,`menu-item.vue`]]),Ee={title:String},De=G(A({...A({name:`ElMenuItemGroup`}),props:Ee,setup(t){let n=K(`menu-item-group`);return(t,i)=>(O(),l(`li`,{class:r(c(n).b())},[e(`div`,{class:r(c(n).e(`title`))},[t.$slots.title?x(t.$slots,`title`,{key:1}):(O(),l(m,{key:0},[a(o(t.title),1)],64))],2),e(`ul`,null,[x(t.$slots,`default`)])],2))}}),[[`__file`,`menu-item-group.vue`]]),Oe=ie(Se,{MenuItem:Te,MenuItemGroup:De,SubMenu:ye}),ke=q(Te);q(De);var Ae=q(ye),je=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAMFBMVEX///+3t7f4+Pi8vLzAwMDExMTS0tLIyMjk5OTz8/PY2NjOzs7u7u7d3d3p6enh4eFVKkJDAAAIfUlEQVR4nNVd15akOAylyRRQ9f9/O02BZJtgBQszfR/2zPahsJCvguVUFJYop35ux66pq6r6+fn9T910bTv3U2najBXK9zw2PxE07fz+n0Qf+raOyetL3g9PS7vgzRUYULfvZyXuR5nAgLF/SuK3UuJN7gf0PbyErDiieuU1zKmLyFJ3Y9u+vmh//V9dXT/b5VN3f+HbFq82nGivHH6999Vv8rC7P+NFzfBlF56xvl/sEy1Xbc8mZ9m3R7bcrO0jl+vXJH7J0YY78UvYKNuDjpWNTQd9tzd5ks9ePUm92u877WMlp4dhR+Y2OYkYdh3XmKclc9iATVwoXyFLZouXIobuBpEXlK+QcYbK7gOF2NpMaN2Vmfdr71LGirAbW5N3lr4F1rckC0GQbQw6cqrM1XACvzOr5EjT+2q+L24Vk6/sRGL7no6t5un9eQE+7JG4r+wk3+e9iGfXwzyeZHLjzDGFt0fEBB564ymOeRwzCg8dHaZ9kx8NZGZ8+UyOv0bSW3o9q5Tac5+0luajjGfqpsT2krIuTeaKZGQf4UUIKpx6xFbo2nGD9HSlpJZAGfSQILVjV02Z4CQsJhD2UdbcJ/dwyRfpNvozwaLo4q/0nMhLIrMThJSZZ4EhiJd6Ugti43SvzCTlPKnZmUNZMV+u4cYKwp85XlfcTBi/s6Z+MZ2LxADhGZzUDU9m5zjIr0woQhLxasAHWS7E9TgZU/Z1EBEIjbzxQYYxOudOxu73qTBcUGEaIzqD1hi96W6JTgzRoDSI/UhmITP7yUPFSYqaagD1R4wJkP8VnT8nTwVQqnauN06QjvtCvYt2IL3Zm/Uk9jjDz0RmMLggwx3SOuIUSniGpJv3bAJo1SAFr9mKH8aI+LqkI0RFtoIh9/L76Cc8GLCDoxxSjyAHgxxFYSEzJ18Ggly4YHQHnCQ2LRoCGINXQirim0JYUJpDatf/p24PP4mVwSblSg6MEhDGuzNVg6J5o8nEvAPAGZiAfk5MDRXNqxcmx/AVHPMprx8G1TEHwOzqTByseTgoDRxYDT6akSh9YSMzr6aLidOeTGCj3EqDkdC8GU9Q9c6voYlyJzxy0sOxOnRs8C3sQpSR92DOO4EDCXkAzoA935bPTy8AIgTBCIIyvyZsExF/uM2Byfk9A7VafuksfdyygFmJcc35NZ7tT5xUYMNwJYcI/FouGP7xOyT1YBOh+aVcsCHHBWCHZHLTxOfxF6ZA8HP82P7ASv4BJj5PMNMO/g3+H9ghqrtnGm4hIJLAd7byVxg5asGCA+AH2N2meYHvKPxZmQRIGtyMaOMweC/ZXJJJdJE0CF27Bm0oK8kWLKSWHxeILB8s7xN8gmxFi0VIFAkNqd5KiI3S7JBqJ7Ssycb70vAL2LAofMiE9hkBrQvX4OTXNLS4eGpwA8KlaxaGKHOy4OWWcSVoXSZz9ohYYLaxpB8bv4V2aFGeFiYOvqTb74V2mHkQ8IXjBKhMuKrMJIoLOQlmVGIiIlyPmXdguwJ6d8J/CZ1H0m4iB1Gr4D569HjCZalPaNoxeWtd5jKf4TRkpy30syh3KbLXPVZsWdIIQUK6dO8Jl+dkbUB6GfRranwIWx3hUzeVi5fRmggtDA6b/dWO3ELkLiF4QldqoXOPxhe8QOjt57LUpXhguGUhtEUFUtq9EBzUQluQWrphIV1oA1JLm0R6VFqh0z21eH30XmjFdofbF14dgC5PG1zS0w9pjuYFF2UYL9KHiXJGYhhXJkwLEk1RvrEMZVWmpgvSVC1XtEtNlYOAL1JYrdESOg3lcGtFQsVGs+Nu++msHdiu0BNEQQ5vYKssIWxQx3JNc1AqnbTFmg3qSoKmYz0mb//S7QDU1k5Vdu+VSnUFyA3aBES1ca9zkqb4PPVQUUVG74OVRfUNSqencXh+UR1sUnfqgy6+qLrVn75QThRt0I26VG0FU4dbRNfE1ULpqVVBIZBTN/kJ0PBDxY6QEbpp5v27JFCxI5xm1k3oIxT+Q+Wowgl93dIJhHzqVrW5erd0QrdIxUE8wFXxcL9IBXSlSRcLuSnq3NR+OZBq4ZWD1FXr8sn9wivVEjcPwtVuKtd6XOKmWUzoQeY/dCczHBcTKpZtnr2QB104gN70ukm+QNaHzBJV7DhbIAt/040ERMMXnbUDAwOtgvZVsUo0KaCi9Omib/SCqleKhE7KSsNIIt7IkFXoi40MSBrNO28X+ooHOKxWqPpuoVHRh7FDo3+pyHsorOZyG5R0w5kPUZmJffYFIrLhTLi1DzFJT0X+aWaZ3JGtfcJNlCvesTOuIpAcLBrdRIms5g4s+jFlM0PFPYY6ul1VtDG4PJzwqQHnGGpKKlA1fVKN0VqxX31Tx1DjOTBXaRFvs3vaWdkniPIEF3hdGgEmxpev0VpeHNf8ZuiROMBhet0hMch9qkogR2wXbeSojHI22jd5ifp1cLbY9dHB8NWhJCbOgkYzBxpFzxH3wu74F++ro8ckWsM7a5l7/IuzVnAxJX1MojGQ3shHslKCPPimY+b+jYfmU0qONPIOj5rzK9lDi33OyQttVpEaglXXMFoabQVmqny3QxaBW4opM3o4CtwDJazWGZtAUMi12ONkAtGMrNGS/1QI5yb+CxciLmc8EwoDKEokefK6CBKPRf47Mj/MEIujvv+MzA/6kKQLCR7y18q5Y8AjiWryrR1T9uwp/RqJ3YUdGWBxYUeR2RzN7gThn6ifCrtLaA7X/dwG4xtusvg+24uVihzKtr/Cqrh7OFPdcVlYcXItmyHS7x67ROwyxxTceAHegqsLHVOQ4WLH00sdE5DhUsev2IbaznR95gKrCnDGi0oXDOmTRrmvhP3i712+u+LvXXO84u9dKL2Cf3V33X7+i6u7N/y5S9IdvOvoF0G/19GP9tfR/wPQ21eEI8clLwAAAABJRU5ErkJggg==`;export{Ae as i,Oe as n,ke as r,je as t};
|
|
1
|
+
import{A as e,B as t,G as n,Gt as r,H as i,I as a,Jt as o,K as s,Mt as c,N as l,Ot as u,Q as d,Rt as f,St as p,T as m,U as h,Vt as g,Wt as _,Y as v,ft as y,ht as b,it as x,j as S,k as C,mt as w,nt as T,p as E,pt as D,tt as O,wt as k,x as ee,z as A}from"./vendor-chart-Dw-P17PN.js";import{$ as j,B as M,Et as N,F as te,I as P,Ot as F,Tt as I,a as L,bt as R,c as z,dt as B,et as V,it as H,o as ne,rt as U,w as W,z as re}from"./icon-CDmWyIgD.js";import{a as G,c as K,i as q,t as ie}from"./install-Cn-SLM3u.js";import{t as ae}from"./tooltip-DnBNFRyX.js";import{b as J,x as oe}from"./models-BWtS-s13.js";import{r as Y}from"./aria-8oQuUBWy.js";import{n as X}from"./vnode-B_FEx-YD.js";import{t as Z}from"./click-outside-CzJDhMNh.js";import{t as se}from"./collapse-transition-BUGXhx7B.js";import{oo as ce}from"./index-Dn-8sNW2.js";var le=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll(`li`),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){let e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,t=>{t.addEventListener(`keydown`,t=>{let n=!1;switch(t.code){case J.down:this.gotoSubIndex(this.subIndex+1),n=!0;break;case J.up:this.gotoSubIndex(this.subIndex-1),n=!0;break;case J.tab:Y(e,`mouseleave`);break;case J.enter:case J.numpadEnter:case J.space:n=!0,t.currentTarget.click();break}return n&&(t.preventDefault(),t.stopPropagation()),!1})})}},ue=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute(`tabindex`,`0`);let t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new le(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener(`keydown`,e=>{let t=!1;switch(e.code){case J.down:Y(e.currentTarget,`mouseenter`),this.submenu&&this.submenu.gotoSubIndex(0),t=!0;break;case J.up:Y(e.currentTarget,`mouseenter`),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),t=!0;break;case J.tab:Y(e.currentTarget,`mouseleave`);break;case J.enter:case J.numpadEnter:case J.space:t=!0,e.currentTarget.click();break}t&&e.preventDefault()})}},de=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){let t=this.domNode.childNodes;Array.from(t).forEach(t=>{t.nodeType===1&&new ue(t,e)})}},fe=G(A({...A({name:`ElMenuCollapseTransition`}),setup(e){let t=K(`menu`),r={onBeforeEnter:e=>e.style.opacity=`0.2`,onEnter(e,n){P(e,`${t.namespace.value}-opacity-transition`),e.style.opacity=`1`,n()},onAfterEnter(e){M(e,`${t.namespace.value}-opacity-transition`),e.style.opacity=``},onBeforeLeave(e){e.dataset||={},re(e,t.m(`collapse`))?(M(e,t.m(`collapse`)),e.dataset.oldOverflow=e.style.overflow,e.dataset.scrollWidth=e.clientWidth.toString(),P(e,t.m(`collapse`))):(P(e,t.m(`collapse`)),e.dataset.oldOverflow=e.style.overflow,e.dataset.scrollWidth=e.clientWidth.toString(),M(e,t.m(`collapse`))),e.style.width=`${e.scrollWidth}px`,e.style.overflow=`hidden`},onLeave(e){P(e,`horizontal-collapse-transition`),e.style.width=`${e.dataset.scrollWidth}px`}};return(e,t)=>(O(),S(E,n({mode:`out-in`},c(r)),{default:w(()=>[x(e.$slots,`default`)]),_:3},16))}}),[[`__file`,`menu-collapse-transition.vue`]]);function pe(e,t){let n=C(()=>{let n=e.parent,r=[t.value];for(;n.type.name!==`ElMenu`;)n.props.index&&r.unshift(n.props.index),n=n.parent;return r});return{parentMenu:C(()=>{let t=e.parent;for(;t&&![`ElMenu`,`ElSubMenu`].includes(t.type.name);)t=t.parent;return t}),indexPath:n}}function me(e){return C(()=>{let t=e.backgroundColor;return t?new ce(t).shade(20).toString():``})}var he=(e,t)=>{let n=K(`menu`);return C(()=>n.cssVarBlock({"text-color":e.textColor||``,"hover-text-color":e.textColor||``,"bg-color":e.backgroundColor||``,"hover-bg-color":me(e).value||``,"active-color":e.activeTextColor||``,level:`${t}`}))},ge=`rootMenu`,Q=`subMenu:`,_e=j({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:L},expandOpenIcon:{type:L},collapseCloseIcon:{type:L},collapseOpenIcon:{type:L}}),ve=`ElSubMenu`,ye=A({name:ve,props:_e,setup(e,{slots:n,expose:r}){let a=t(),{indexPath:o,parentMenu:s}=pe(a,C(()=>e.index)),c=K(`menu`),l=K(`sub-menu`),u=h(ge);u||H(ve,`can not inject root menu`);let f=h(`${Q}${s.value.uid}`);f||H(ve,`can not inject sub menu`);let g=k({}),x=k({}),S,w=k(!1),E=k(),D=k(),O=C(()=>B.value===`horizontal`&&j.value?`bottom-start`:`right-start`),A=C(()=>B.value===`horizontal`&&j.value||B.value===`vertical`&&!u.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?I.value?e.expandOpenIcon:e.expandCloseIcon:ne:e.collapseCloseIcon&&e.collapseOpenIcon?I.value?e.collapseOpenIcon:e.collapseCloseIcon:z),j=C(()=>f.level===0),M=C(()=>{let t=e.teleported;return N(t)?j.value:t}),P=C(()=>u.props.collapse?`${c.namespace.value}-zoom-in-left`:`${c.namespace.value}-zoom-in-top`),F=C(()=>B.value===`horizontal`&&j.value?[`bottom-start`,`bottom-end`,`top-start`,`top-end`,`right-start`,`left-start`]:[`right-start`,`right`,`right-end`,`left-start`,`bottom-start`,`bottom-end`,`top-start`,`top-end`]),I=C(()=>u.openedMenus.includes(e.index)),L=C(()=>[...Object.values(g.value),...Object.values(x.value)].some(({active:e})=>e)),B=C(()=>u.props.mode),V=C(()=>u.props.persistent),U=p({index:e.index,indexPath:o,active:L}),W=he(u.props,f.level+1),re=C(()=>e.popperOffset??u.props.popperOffset),G=C(()=>e.popperClass??u.props.popperClass),q=C(()=>e.showTimeout??u.props.showTimeout),ie=C(()=>e.hideTimeout??u.props.hideTimeout),J=()=>(D.value?.popperRef?.popperInstanceRef)?.destroy(),oe=e=>{e||J()},Y=()=>{u.props.menuTrigger===`hover`&&u.props.mode===`horizontal`||u.props.collapse&&u.props.mode===`vertical`||e.disabled||u.handleSubMenuClick({index:e.index,indexPath:o.value,active:L.value})},X=(t,n=q.value)=>{var r;if(t.type!==`focus`){if(u.props.menuTrigger===`click`&&u.props.mode===`horizontal`||!u.props.collapse&&u.props.mode===`vertical`||e.disabled){f.mouseInChild.value=!0;return}f.mouseInChild.value=!0,S?.(),{stop:S}=R(()=>{u.openMenu(e.index,o.value)},n),M.value&&((r=s.value.vnode.el)==null||r.dispatchEvent(new MouseEvent(`mouseenter`)))}},Z=(t=!1)=>{var n;if(u.props.menuTrigger===`click`&&u.props.mode===`horizontal`||!u.props.collapse&&u.props.mode===`vertical`){f.mouseInChild.value=!1;return}S?.(),f.mouseInChild.value=!1,{stop:S}=R(()=>!w.value&&u.closeMenu(e.index,o.value),ie.value),M.value&&t&&((n=f.handleMouseleave)==null||n.call(f,!0))};return y(()=>u.props.collapse,e=>oe(!!e)),T(`${Q}${a.uid}`,{addSubMenu:e=>{x.value[e.index]=e},removeSubMenu:e=>{delete x.value[e.index]},handleMouseleave:Z,mouseInChild:w,level:f.level+1}),r({opened:I}),d(()=>{u.addSubMenu(U),f.addSubMenu(U)}),v(()=>{f.removeSubMenu(U),u.removeSubMenu(U)}),()=>{let t=[n.title?.call(n),i(te,{class:l.e(`icon-arrow`),style:{transform:I.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&u.props.collapse?`none`:`rotateZ(180deg)`:`none`}},{default:()=>_(A.value)?i(a.appContext.components[A.value]):i(A.value)})],r=u.isMenuPopup?i(ae,{ref:D,visible:I.value,effect:`light`,pure:!0,offset:re.value,showArrow:!1,persistent:V.value,popperClass:G.value,placement:O.value,teleported:M.value,fallbackPlacements:F.value,transition:P.value,gpuAcceleration:!1},{content:()=>i(`div`,{class:[c.m(B.value),c.m(`popup-container`),G.value],onMouseenter:e=>X(e,100),onMouseleave:()=>Z(!0),onFocus:e=>X(e,100)},[i(`ul`,{class:[c.b(),c.m(`popup`),c.m(`popup-${O.value}`)],style:W.value},[n.default?.call(n)])]),default:()=>i(`div`,{class:l.e(`title`),onClick:Y},t)}):i(m,{},[i(`div`,{class:l.e(`title`),ref:E,onClick:Y},t),i(se,{},{default:()=>b(i(`ul`,{role:`menu`,class:[c.b(),c.m(`inline`)],style:W.value},[n.default?.call(n)]),[[ee,I.value]])})]);return i(`li`,{class:[l.b(),l.is(`active`,L.value),l.is(`opened`,I.value),l.is(`disabled`,e.disabled)],role:`menuitem`,ariaHaspopup:!0,ariaExpanded:I.value,onMouseenter:X,onMouseleave:()=>Z(),onFocus:X},[r])}}}),be=j({mode:{type:String,values:[`horizontal`,`vertical`],default:`vertical`},defaultActive:{type:String,default:``},defaultOpeneds:{type:V(Array),default:()=>oe([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:[`hover`,`click`],default:`hover`},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:L,default:()=>W},popperEffect:{type:V(String),default:`dark`},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),xe=e=>f(e)&&e.every(e=>_(e)),Se=A({name:`ElMenu`,props:be,emits:{close:(e,t)=>_(e)&&xe(t),open:(e,t)=>_(e)&&xe(t),select:(e,t,n,r)=>_(e)&&xe(t)&&g(n)&&(N(r)||r instanceof Promise)},setup(e,{emit:n,slots:r,expose:a}){let o=t(),c=o.appContext.config.globalProperties.$router,l=k(),u=K(`menu`),f=K(`sub-menu`),m=k(-1),h=k(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),g=k(e.defaultActive),_=k({}),v=k({}),x=C(()=>e.mode===`horizontal`||e.mode===`vertical`&&e.collapse),S=()=>{let t=g.value&&_.value[g.value];!t||e.mode===`horizontal`||e.collapse||t.indexPath.forEach(e=>{let t=v.value[e];t&&w(e,t.indexPath)})},w=(t,r)=>{h.value.includes(t)||(e.uniqueOpened&&(h.value=h.value.filter(e=>r.includes(e))),h.value.push(t),n(`open`,t,r))},E=e=>{let t=h.value.indexOf(e);t!==-1&&h.value.splice(t,1)},O=(e,t)=>{E(e),n(`close`,e,t)},ee=({index:e,indexPath:t})=>{h.value.includes(e)?O(e,t):w(e,t)},A=t=>{(e.mode===`horizontal`||e.collapse)&&(h.value=[]);let{index:r,indexPath:i}=t;if(!(F(r)||F(i)))if(e.router&&c){let e=t.route||r,a=c.push(e).then(e=>(e||(g.value=r),e));n(`select`,r,i,{index:r,indexPath:i,route:e},a)}else g.value=r,n(`select`,r,i,{index:r,indexPath:i})},j=t=>{let n=_.value;g.value=(n[t]||g.value&&n[g.value]||n[e.defaultActive])?.index??t},M=e=>{let t=getComputedStyle(e),n=Number.parseInt(t.marginLeft,10),r=Number.parseInt(t.marginRight,10);return e.offsetWidth+n+r||0},N=()=>{if(!l.value)return-1;let e=Array.from(l.value?.childNodes??[]).filter(e=>e.nodeName!==`#text`||e.nodeValue),t=getComputedStyle(l.value),n=Number.parseInt(t.paddingLeft,10),r=Number.parseInt(t.paddingRight,10),i=l.value.clientWidth-n-r,a=0,o=0;return e.forEach((e,t)=>{e.nodeName!==`#comment`&&(a+=M(e),a<=i-64&&(o=t+1))}),o===e.length?-1:o},P=e=>v.value[e].indexPath,I=(e,t=33.34)=>{let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{e()},t)}},L=!0,R=()=>{if(m.value===N())return;let e=()=>{m.value=-1,s(()=>{m.value=N()})};L?e():I(e)(),L=!1};y(()=>e.defaultActive,e=>{_.value[e]||(g.value=``),j(e)}),y(()=>e.collapse,e=>{e&&(h.value=[])}),y(_.value,S);let z;D(()=>{e.mode===`horizontal`&&e.ellipsis?z=B(l,R).stop:z?.()});let V=k(!1);{let t=e=>{v.value[e.index]=e},n=e=>{delete v.value[e.index]};T(ge,p({props:e,openedMenus:h,items:_,subMenus:v,activeIndex:g,isMenuPopup:x,addMenuItem:e=>{_.value[e.index]=e},removeMenuItem:e=>{delete _.value[e.index]},addSubMenu:t,removeSubMenu:n,openMenu:w,closeMenu:O,handleMenuItemClick:A,handleSubMenuClick:ee})),T(`${Q}${o.uid}`,{addSubMenu:t,removeSubMenu:n,mouseInChild:V,level:0})}d(()=>{e.mode===`horizontal`&&new de(o.vnode.el,u.namespace.value)}),a({open:e=>{let{indexPath:t}=v.value[e];t.forEach(e=>w(e,t))},close:E,updateActiveIndex:j,handleResize:R});let H=he(e,0);return()=>{let t=r.default?.call(r)??[],a=[];if(e.mode===`horizontal`&&l.value){let n=X(t),r=m.value===-1?n:n.slice(0,m.value),o=m.value===-1?[]:n.slice(m.value);o?.length&&e.ellipsis&&(t=r,a.push(i(ye,{index:`sub-menu-more`,class:f.e(`hide-arrow`),popperOffset:e.popperOffset},{title:()=>i(te,{class:f.e(`icon-more`)},{default:()=>i(e.ellipsisIcon)}),default:()=>o})))}let o=e.closeOnClickOutside?[[Z,()=>{h.value.length&&(V.value||(h.value.forEach(e=>n(`close`,e,P(e))),h.value=[]))}]]:[],s=b(i(`ul`,{key:String(e.collapse),role:`menubar`,ref:l,style:H.value,class:{[u.b()]:!0,[u.m(e.mode)]:!0,[u.m(`collapse`)]:e.collapse}},[...t,...a]),o);return e.collapseTransition&&e.mode===`vertical`?i(fe,()=>s):s}}}),Ce=j({index:{type:V([String,null]),default:null},route:{type:V([String,Object])},disabled:Boolean}),we={click:e=>_(e.index)&&f(e.indexPath)},$=`ElMenuItem`,Te=G(A({...A({name:$}),props:Ce,emits:we,setup(n,{expose:i,emit:a}){let o=n;I(o.index)&&U($,`Missing required prop: "index"`);let s=t(),f=h(ge),g=K(`menu`),_=K(`menu-item`);f||H($,`can not inject root menu`);let{parentMenu:y,indexPath:b}=pe(s,u(o,`index`)),T=h(`${Q}${y.value.uid}`);T||H($,`can not inject sub menu`);let E=C(()=>o.index===f.activeIndex),D=p({index:o.index,indexPath:b,active:E}),k=()=>{o.disabled||(f.handleMenuItemClick({index:o.index,indexPath:b.value,route:o.route}),a(`click`,D))};return d(()=>{T.addSubMenu(D),f.addMenuItem(D)}),v(()=>{T.removeSubMenu(D),f.removeMenuItem(D)}),i({parentMenu:y,rootMenu:f,active:E,nsMenu:g,nsMenuItem:_,handleClick:k}),(t,n)=>(O(),l(`li`,{class:r([c(_).b(),c(_).is(`active`,c(E)),c(_).is(`disabled`,t.disabled)]),role:`menuitem`,tabindex:`-1`,onClick:k},[c(y).type.name===`ElMenu`&&c(f).props.collapse&&t.$slots.title?(O(),S(c(ae),{key:0,effect:c(f).props.popperEffect,placement:`right`,"fallback-placements":[`left`],persistent:c(f).props.persistent},{content:w(()=>[x(t.$slots,`title`)]),default:w(()=>[e(`div`,{class:r(c(g).be(`tooltip`,`trigger`))},[x(t.$slots,`default`)],2)]),_:3},8,[`effect`,`persistent`])):(O(),l(m,{key:1},[x(t.$slots,`default`),x(t.$slots,`title`)],64))],2))}}),[[`__file`,`menu-item.vue`]]),Ee={title:String},De=G(A({...A({name:`ElMenuItemGroup`}),props:Ee,setup(t){let n=K(`menu-item-group`);return(t,i)=>(O(),l(`li`,{class:r(c(n).b())},[e(`div`,{class:r(c(n).e(`title`))},[t.$slots.title?x(t.$slots,`title`,{key:1}):(O(),l(m,{key:0},[a(o(t.title),1)],64))],2),e(`ul`,null,[x(t.$slots,`default`)])],2))}}),[[`__file`,`menu-item-group.vue`]]),Oe=ie(Se,{MenuItem:Te,MenuItemGroup:De,SubMenu:ye}),ke=q(Te);q(De);var Ae=q(ye),je=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAMFBMVEX///+3t7f4+Pi8vLzAwMDExMTS0tLIyMjk5OTz8/PY2NjOzs7u7u7d3d3p6enh4eFVKkJDAAAIfUlEQVR4nNVd15akOAylyRRQ9f9/O02BZJtgBQszfR/2zPahsJCvguVUFJYop35ux66pq6r6+fn9T910bTv3U2najBXK9zw2PxE07fz+n0Qf+raOyetL3g9PS7vgzRUYULfvZyXuR5nAgLF/SuK3UuJN7gf0PbyErDiieuU1zKmLyFJ3Y9u+vmh//V9dXT/b5VN3f+HbFq82nGivHH6999Vv8rC7P+NFzfBlF56xvl/sEy1Xbc8mZ9m3R7bcrO0jl+vXJH7J0YY78UvYKNuDjpWNTQd9tzd5ks9ePUm92u877WMlp4dhR+Y2OYkYdh3XmKclc9iATVwoXyFLZouXIobuBpEXlK+QcYbK7gOF2NpMaN2Vmfdr71LGirAbW5N3lr4F1rckC0GQbQw6cqrM1XACvzOr5EjT+2q+L24Vk6/sRGL7no6t5un9eQE+7JG4r+wk3+e9iGfXwzyeZHLjzDGFt0fEBB564ymOeRwzCg8dHaZ9kx8NZGZ8+UyOv0bSW3o9q5Tac5+0luajjGfqpsT2krIuTeaKZGQf4UUIKpx6xFbo2nGD9HSlpJZAGfSQILVjV02Z4CQsJhD2UdbcJ/dwyRfpNvozwaLo4q/0nMhLIrMThJSZZ4EhiJd6Ugti43SvzCTlPKnZmUNZMV+u4cYKwp85XlfcTBi/s6Z+MZ2LxADhGZzUDU9m5zjIr0woQhLxasAHWS7E9TgZU/Z1EBEIjbzxQYYxOudOxu73qTBcUGEaIzqD1hi96W6JTgzRoDSI/UhmITP7yUPFSYqaagD1R4wJkP8VnT8nTwVQqnauN06QjvtCvYt2IL3Zm/Uk9jjDz0RmMLggwx3SOuIUSniGpJv3bAJo1SAFr9mKH8aI+LqkI0RFtoIh9/L76Cc8GLCDoxxSjyAHgxxFYSEzJ18Ggly4YHQHnCQ2LRoCGINXQirim0JYUJpDatf/p24PP4mVwSblSg6MEhDGuzNVg6J5o8nEvAPAGZiAfk5MDRXNqxcmx/AVHPMprx8G1TEHwOzqTByseTgoDRxYDT6akSh9YSMzr6aLidOeTGCj3EqDkdC8GU9Q9c6voYlyJzxy0sOxOnRs8C3sQpSR92DOO4EDCXkAzoA935bPTy8AIgTBCIIyvyZsExF/uM2Byfk9A7VafuksfdyygFmJcc35NZ7tT5xUYMNwJYcI/FouGP7xOyT1YBOh+aVcsCHHBWCHZHLTxOfxF6ZA8HP82P7ASv4BJj5PMNMO/g3+H9ghqrtnGm4hIJLAd7byVxg5asGCA+AH2N2meYHvKPxZmQRIGtyMaOMweC/ZXJJJdJE0CF27Bm0oK8kWLKSWHxeILB8s7xN8gmxFi0VIFAkNqd5KiI3S7JBqJ7Ssycb70vAL2LAofMiE9hkBrQvX4OTXNLS4eGpwA8KlaxaGKHOy4OWWcSVoXSZz9ohYYLaxpB8bv4V2aFGeFiYOvqTb74V2mHkQ8IXjBKhMuKrMJIoLOQlmVGIiIlyPmXdguwJ6d8J/CZ1H0m4iB1Gr4D569HjCZalPaNoxeWtd5jKf4TRkpy30syh3KbLXPVZsWdIIQUK6dO8Jl+dkbUB6GfRranwIWx3hUzeVi5fRmggtDA6b/dWO3ELkLiF4QldqoXOPxhe8QOjt57LUpXhguGUhtEUFUtq9EBzUQluQWrphIV1oA1JLm0R6VFqh0z21eH30XmjFdofbF14dgC5PG1zS0w9pjuYFF2UYL9KHiXJGYhhXJkwLEk1RvrEMZVWmpgvSVC1XtEtNlYOAL1JYrdESOg3lcGtFQsVGs+Nu++msHdiu0BNEQQ5vYKssIWxQx3JNc1AqnbTFmg3qSoKmYz0mb//S7QDU1k5Vdu+VSnUFyA3aBES1ca9zkqb4PPVQUUVG74OVRfUNSqencXh+UR1sUnfqgy6+qLrVn75QThRt0I26VG0FU4dbRNfE1ULpqVVBIZBTN/kJ0PBDxY6QEbpp5v27JFCxI5xm1k3oIxT+Q+Wowgl93dIJhHzqVrW5erd0QrdIxUE8wFXxcL9IBXSlSRcLuSnq3NR+OZBq4ZWD1FXr8sn9wivVEjcPwtVuKtd6XOKmWUzoQeY/dCczHBcTKpZtnr2QB104gN70ukm+QNaHzBJV7DhbIAt/040ERMMXnbUDAwOtgvZVsUo0KaCi9Omib/SCqleKhE7KSsNIIt7IkFXoi40MSBrNO28X+ooHOKxWqPpuoVHRh7FDo3+pyHsorOZyG5R0w5kPUZmJffYFIrLhTLi1DzFJT0X+aWaZ3JGtfcJNlCvesTOuIpAcLBrdRIms5g4s+jFlM0PFPYY6ul1VtDG4PJzwqQHnGGpKKlA1fVKN0VqxX31Tx1DjOTBXaRFvs3vaWdkniPIEF3hdGgEmxpev0VpeHNf8ZuiROMBhet0hMch9qkogR2wXbeSojHI22jd5ifp1cLbY9dHB8NWhJCbOgkYzBxpFzxH3wu74F++ro8ckWsM7a5l7/IuzVnAxJX1MojGQ3shHslKCPPimY+b+jYfmU0qONPIOj5rzK9lDi33OyQttVpEaglXXMFoabQVmqny3QxaBW4opM3o4CtwDJazWGZtAUMi12ONkAtGMrNGS/1QI5yb+CxciLmc8EwoDKEokefK6CBKPRf47Mj/MEIujvv+MzA/6kKQLCR7y18q5Y8AjiWryrR1T9uwp/RqJ3YUdGWBxYUeR2RzN7gThn6ifCrtLaA7X/dwG4xtusvg+24uVihzKtr/Cqrh7OFPdcVlYcXItmyHS7x67ROwyxxTceAHegqsLHVOQ4WLH00sdE5DhUsev2IbaznR95gKrCnDGi0oXDOmTRrmvhP3i712+u+LvXXO84u9dKL2Cf3V33X7+i6u7N/y5S9IdvOvoF0G/19GP9tfR/wPQ21eEI8clLwAAAABJRU5ErkJggg==`;export{Ae as i,Oe as n,ke as r,je as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e,t}from"./rolldown-runtime--c01j_DQ.js";import{V as n}from"./index-
|
|
1
|
+
import{o as e,t}from"./rolldown-runtime--c01j_DQ.js";import{V as n}from"./index-Dn-8sNW2.js";import{i as r,l as i,n as a,o,t as s}from"./lit-Czpkz5lw.js";import{a as c,i as l,n as u,o as d,r as f,t as p}from"./wui-text-Cn4Xd1Sh.js";import{A as m,C as h,D as g,E as _,O as v,S as y,T as b,a as x,b as S,g as C,i as ee,j as te,k as ne,n as w,p as re,r as T,s as E,u as ie,v as ae,x as D,y as O}from"./ConstantsUtil-CM7Z7qJI.js";import{n as oe,t as se}from"./ConnectorUtil-CEBYBGCR.js";var ce=i`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
background-color: var(--wui-color-gray-glass-002);
|