hermes-web-ui 0.6.40 → 0.6.41
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/client/assets/js/{AppSidebar-CaSVcbCW.js → AppSidebar-CNkSiv3l.js} +1 -1
- package/dist/client/assets/js/{ChannelsView-hdAXa1hf.js → ChannelsView-6rEo6RBl.js} +1 -1
- package/dist/client/assets/js/{ChatPanel-C6sX6idm.js → ChatPanel-ANAZWluc.js} +3 -3
- package/dist/client/assets/js/{ChatView-B68k_-D9.js → ChatView-DFcPsmRF.js} +1 -1
- package/dist/client/assets/js/{CodingAgentsView-CsIjwbXR.js → CodingAgentsView-CpIY0SHT.js} +1 -1
- package/dist/client/assets/js/{DefaultCredentialPrompt-BRhb4DOa.js → DefaultCredentialPrompt-DmNeotSW.js} +1 -1
- package/dist/client/assets/js/{DesktopBrowserPanel-BlBfS64w.js → DesktopBrowserPanel-CWjTU-3y.js} +1 -1
- package/dist/client/assets/js/{DesktopBrowserView-JukL0QuS.js → DesktopBrowserView-D9Qb3fIV.js} +1 -1
- package/dist/client/assets/js/{DesktopPetView-DWq4EiRU.js → DesktopPetView-B7REtC57.js} +1 -1
- package/dist/client/assets/js/{DesktopTitleBar-DphP4oa6.js → DesktopTitleBar-Dej_16hB.js} +1 -1
- package/dist/client/assets/js/{DevicesView-BFtrfqJs.js → DevicesView--d4HCkch.js} +1 -1
- package/dist/client/assets/js/{DocxFilePreview-CmVJ9Jxx.js → DocxFilePreview-BQz6WC7r.js} +2 -2
- package/dist/client/assets/js/{FileEditor-CdkNYp7b.js → FileEditor-BBegs-5i.js} +2 -2
- package/dist/client/assets/js/{FilePreview-CJrVRPRs.js → FilePreview-B7WqYvZs.js} +2 -2
- package/dist/client/assets/js/{FileRenameModal-mghyEXU4.js → FileRenameModal-82RkAZkd.js} +1 -1
- package/dist/client/assets/js/{FilesPanel-B9cKB5lX.js → FilesPanel-BHcg6CpC.js} +2 -2
- package/dist/client/assets/js/{FilesView-iKZu70E9.js → FilesView-Dl15WTar.js} +2 -2
- package/dist/client/assets/js/{GlobalAgentView-JZsss0gx.js → GlobalAgentView-dxEX611f.js} +1 -1
- package/dist/client/assets/js/{GlobalPendingActions-BRQIt5vl.js → GlobalPendingActions-CeK96C3G.js} +1 -1
- package/dist/client/assets/js/{GroupChatLinkView-CNrV8lnT.js → GroupChatLinkView-CJhI9DVE.js} +1 -1
- package/dist/client/assets/js/{GroupChatPanel-WK4zBasl.js → GroupChatPanel-CLa3s08V.js} +3 -3
- package/dist/client/assets/js/{GroupChatView-BlMUD1MW.js → GroupChatView-CUwvu-6F.js} +1 -1
- package/dist/client/assets/js/{HistoryMessageList-D8zoQ1Zs.js → HistoryMessageList-BdD8GJYM.js} +1 -1
- package/dist/client/assets/js/{HistoryView-Bpr8N2lC.js → HistoryView-Ro92tP5R.js} +1 -1
- package/dist/client/assets/js/{HtmlFilePreview-Bj3_-hMo.js → HtmlFilePreview-xYn7YtmC.js} +1 -1
- package/dist/client/assets/js/{JobsView-CZK26gTw.js → JobsView-BaNA1Yaa.js} +2 -2
- package/dist/client/assets/js/{JourneyView-BPUsLj4o.js → JourneyView-Bw-05mCF.js} +1 -1
- package/dist/client/assets/js/{KanbanView-B7d-2_z9.js → KanbanView-BYC32l2Q.js} +1 -1
- package/dist/client/assets/js/{LoginView-BpYyv831.js → LoginView-KrpCkwOr.js} +1 -1
- package/dist/client/assets/js/{LogsView-CabFHk0v.js → LogsView-Dgm4v5sN.js} +1 -1
- package/dist/client/assets/js/{MarkdownRenderer-CVtmHZwc.js → MarkdownRenderer-BIPowjr-.js} +3 -3
- package/dist/client/assets/js/{McpManagerView-C-ou8vf3.js → McpManagerView-DTtkUIvq.js} +1 -1
- package/dist/client/assets/js/{MemoryView-QGFW4iZo.js → MemoryView-BnL7xzux.js} +2 -2
- package/dist/client/assets/js/{MessageList-DZR-TFjD.js → MessageList-5tytzhb0.js} +3 -3
- package/dist/client/assets/js/{ModelsView-DiWdSWOW.js → ModelsView-ComCz0Ce.js} +1 -1
- package/dist/client/assets/js/{OutlinePanel-Dlr5svMY.js → OutlinePanel-CF_XPCRn.js} +1 -1
- package/dist/client/assets/js/{PageSidebarFooter-Bic1fUmG.js → PageSidebarFooter-dvLzcTIm.js} +1 -1
- package/dist/client/assets/js/{PdfFilePreview-Dkpan1ay.js → PdfFilePreview-COOAoJ4V.js} +2 -2
- package/dist/client/assets/js/{PerformanceView-LrZaED_Z.js → PerformanceView-D6dKifJh.js} +1 -1
- package/dist/client/assets/js/{PetdexView-Bv8RioGL.js → PetdexView-CmvzDYwf.js} +1 -1
- package/dist/client/assets/js/{PluginsView-CbtdIGlq.js → PluginsView-zJV9FE9c.js} +1 -1
- package/dist/client/assets/js/{PptxFilePreview-5if_GbU6.js → PptxFilePreview-dC4JxV6j.js} +2 -2
- package/dist/client/assets/js/{ProfileAvatar-DI9ciJxS.js → ProfileAvatar-C8xoALCI.js} +1 -1
- package/dist/client/assets/js/{ProfilesView-C-FSiKMU.js → ProfilesView-CxVxJRN_.js} +1 -1
- package/dist/client/assets/js/{ProviderConfigurationPrompt-BUoWC41Y.js → ProviderConfigurationPrompt-zwk1UwoP.js} +1 -1
- package/dist/client/assets/js/{SessionSearchModal-CEKvSihp.js → SessionSearchModal-DhwGsV-i.js} +1 -1
- package/dist/client/assets/js/{SettingRow-CSfiJmxx.js → SettingRow-DHqhLX3M.js} +1 -1
- package/dist/client/assets/js/{SettingsCircuitBadge-DHIEFyTR.js → SettingsCircuitBadge-CnWSfQZd.js} +1 -1
- package/dist/client/assets/js/{SettingsView-DbNJroV3.js → SettingsView-Cbroga25.js} +1 -1
- package/dist/client/assets/js/{SharedGroupChatView-CTYjqWcO.js → SharedGroupChatView-DXfqtQ33.js} +1 -1
- package/dist/client/assets/js/{SkillsUsageView-BqZ3GtfT.js → SkillsUsageView-C34i3lOQ.js} +1 -1
- package/dist/client/assets/js/{SkillsView-Bhla7821.js → SkillsView-DRG_1esx.js} +2 -2
- package/dist/client/assets/js/{SpreadsheetFilePreview-CGK8HDAx.js → SpreadsheetFilePreview-DRw4kIx5.js} +1 -1
- package/dist/client/assets/js/{TerminalPanel-CtBTLOwq.js → TerminalPanel-Da1nL9P8.js} +1 -1
- package/dist/client/assets/js/{TerminalView-BID7fupB.js → TerminalView-B6z-VaGq.js} +1 -1
- package/dist/client/assets/js/{ThemeView-Cx3ucIus.js → ThemeView-CAaJ9MH-.js} +1 -1
- package/dist/client/assets/js/{UsageView-ByGCsw7o.js → UsageView-B_hLsp0k.js} +1 -1
- package/dist/client/assets/js/{VersionPreviewView-DiAK1ind.js → VersionPreviewView-DKXL6anl.js} +1 -1
- package/dist/client/assets/js/{WebPet-CdIqrnp1.js → WebPet-BUvrfjpq.js} +1 -1
- package/dist/client/assets/js/{WorkflowView-DmBOhSuq.js → WorkflowView-r46Ap9FY.js} +1 -1
- package/dist/client/assets/js/{WorkspaceDiffPreview-dHIGp-9F.js → WorkspaceDiffPreview-EwZAE18F.js} +2 -2
- package/dist/client/assets/js/{abap-Dj8IFKiF.js → abap-C7gkFu-A.js} +1 -1
- package/dist/client/assets/js/{aiden0z-pptx-renderer.es-6vi5-jAN.js → aiden0z-pptx-renderer.es-DOpVaH_k.js} +1 -1
- package/dist/client/assets/js/{apex-C3INPUEt.js → apex-DZOtRowu.js} +1 -1
- package/dist/client/assets/js/{ar-Gk9y3ZfO.js → ar-8iThLSJQ.js} +1 -1
- package/dist/client/assets/js/architecture-7EHR7CIX-BrfhYGuP.js +1 -0
- package/dist/client/assets/js/{architectureDiagram-3BPJPVTR-DLZYeivB.js → architectureDiagram-3BPJPVTR-DEsTTzKd.js} +1 -1
- package/dist/client/assets/js/{auth-D1ZFqv22.js → auth-B52zm2Ir.js} +1 -1
- package/dist/client/assets/js/{azcli-UBzLhJq5.js → azcli-KxuicZQh.js} +1 -1
- package/dist/client/assets/js/{bat-P3O4jldt.js → bat-DfFP4HF-.js} +1 -1
- package/dist/client/assets/js/{bicep-DdQR9RxE.js → bicep-Co4bntVh.js} +1 -1
- package/dist/client/assets/js/{blockDiagram-GPEHLZMM-UWFo8sm5.js → blockDiagram-GPEHLZMM-NsxYeUKd.js} +1 -1
- package/dist/client/assets/js/{c4Diagram-AAUBKEIU-jgyj0wOb.js → c4Diagram-AAUBKEIU-D68asSzm.js} +1 -1
- package/dist/client/assets/js/{cameligo-Bb4ubW_C.js → cameligo-Xi0l_9Wr.js} +1 -1
- package/dist/client/assets/js/{chat-DdHii4Qz.js → chat-fUZW3YFa.js} +1 -1
- package/dist/client/assets/js/{chat-input-height-CSPwB9it.js → chat-input-height-lvFawuv9.js} +1 -1
- package/dist/client/assets/js/{chat-timestamp-DGQ8fmtT.js → chat-timestamp-4wWFcZWv.js} +1 -1
- package/dist/client/assets/js/{chunk-2J33WTMH-Br9OWF5a.js → chunk-2J33WTMH-CEU5sLIh.js} +1 -1
- package/dist/client/assets/js/{chunk-3OPIFGDE-Cb40LuI4.js → chunk-3OPIFGDE-DEhbKkCl.js} +1 -1
- package/dist/client/assets/js/{chunk-4BX2VUAB-jYtdiafd.js → chunk-4BX2VUAB-OIZUstuy.js} +1 -1
- package/dist/client/assets/js/{chunk-55IACEB6-CBtymeHY.js → chunk-55IACEB6-DQHKZCBG.js} +1 -1
- package/dist/client/assets/js/{chunk-5ZQYHXKU-yj9xqmex.js → chunk-5ZQYHXKU-BU3pQVVl.js} +1 -1
- package/dist/client/assets/js/{chunk-727SXJPM-er_5tB5X.js → chunk-727SXJPM-jj97gdnP.js} +1 -1
- package/dist/client/assets/js/{chunk-AQP2D5EJ-C4mDD6xK.js → chunk-AQP2D5EJ-jv-oWlkb.js} +1 -1
- package/dist/client/assets/js/{chunk-BSJP7CBP-QZesZe57.js → chunk-BSJP7CBP-DkKsepNF.js} +1 -1
- package/dist/client/assets/js/{chunk-CSCIHK7Q-5LH118bT.js → chunk-CSCIHK7Q-CLgoBoCF.js} +3 -3
- package/dist/client/assets/js/{chunk-FMBD7UC4-CQho6QZ5.js → chunk-FMBD7UC4-Bx1bCKUR.js} +1 -1
- package/dist/client/assets/js/{chunk-KSCS5N6A-DONM1Omv.js → chunk-KSCS5N6A-CZHZ6pBd.js} +1 -1
- package/dist/client/assets/js/{chunk-L5ZTLDWV-FN_zFWkp.js → chunk-L5ZTLDWV-dz9D3kOb.js} +1 -1
- package/dist/client/assets/js/{chunk-LZXEDZCA-CEEUVvpS.js → chunk-LZXEDZCA-CQiSQehC.js} +2 -2
- package/dist/client/assets/js/{chunk-ND2GUHAM-DWckpxQD.js → chunk-ND2GUHAM-mWODKb8v.js} +1 -1
- package/dist/client/assets/js/{chunk-NZK2D7GU-0mKZmkuV.js → chunk-NZK2D7GU-ivCkjCOR.js} +1 -1
- package/dist/client/assets/js/{chunk-O5CBEL6O-DIDAOkT_.js → chunk-O5CBEL6O-BRUisK47.js} +1 -1
- package/dist/client/assets/js/{chunk-QZHKN3VN-D3c-TMz-.js → chunk-QZHKN3VN-BHjgTrzY.js} +1 -1
- package/dist/client/assets/js/{chunk-WU5MYG2G-BZvSpwm4.js → chunk-WU5MYG2G-CNW1rcpL.js} +1 -1
- package/dist/client/assets/js/{chunk-XPW4576I-xdyJtk-s.js → chunk-XPW4576I-DP3dJbOu.js} +1 -1
- package/dist/client/assets/js/classDiagram-4FO5ZUOK-BVBBe3DQ.js +1 -0
- package/dist/client/assets/js/classDiagram-v2-Q7XG4LA2-DJUe3i9Y.js +1 -0
- package/dist/client/assets/js/{clipboard-DQ_A8ns-.js → clipboard-DHZFaAvO.js} +1 -1
- package/dist/client/assets/js/{clipboard-files-bDrcGKPe.js → clipboard-files-CBDy-02Y.js} +1 -1
- package/dist/client/assets/js/{clojure-ku7aCU1_.js → clojure-DuyGwS8X.js} +1 -1
- package/dist/client/assets/js/{coding-agents-DfHyBvky.js → coding-agents-BNTHD6kd.js} +1 -1
- package/dist/client/assets/js/{codingAgentProviders-BM18FAW9.js → codingAgentProviders-DM_ouxbL.js} +1 -1
- package/dist/client/assets/js/{coffee-DnRIdJlY.js → coffee-C5p7vzpa.js} +1 -1
- package/dist/client/assets/js/{completion-notification-XxjbntI8.js → completion-notification-CzdnhuX3.js} +1 -1
- package/dist/client/assets/js/{cose-bilkent-S5V4N54A-w891sIF1.js → cose-bilkent-S5V4N54A-De_ZdqY0.js} +1 -1
- package/dist/client/assets/js/{cpp-CN8i6ISX.js → cpp-II5hDbTe.js} +1 -1
- package/dist/client/assets/js/{csharp-B-fxig7O.js → csharp-D0POzSpv.js} +1 -1
- package/dist/client/assets/js/{csp-Bar9LGt4.js → csp-CwtuRkR3.js} +1 -1
- package/dist/client/assets/js/{css-DFtC5xZN.js → css-Dc2fJIqQ.js} +1 -1
- package/dist/client/assets/js/{cssMode-DH5XKKL2.js → cssMode-CC6jRvHF.js} +1 -1
- package/dist/client/assets/js/{cypher-BkJexWsv.js → cypher-DBcQoWDH.js} +1 -1
- package/dist/client/assets/js/{cytoscape.esm-BDsvr8Aq.js → cytoscape.esm-C9FMRqxM.js} +1 -1
- package/dist/client/assets/js/{dagre-BM42HDAG-BuT885pa.js → dagre-BM42HDAG-CvJIC410.js} +1 -1
- package/dist/client/assets/js/{dagre-BVUDh8Sh.js → dagre-BtgEsAtK.js} +1 -1
- package/dist/client/assets/js/{dart-B7W8hAtN.js → dart-Jf_Hmp2o.js} +1 -1
- package/dist/client/assets/js/{de-LDpd8WHJ.js → de-7hLSwCEx.js} +1 -1
- package/dist/client/assets/js/{defineProperty-DdPu4ZVv.js → defineProperty-DHkErCmG.js} +1 -1
- package/dist/client/assets/js/{desktop-browser-xrRFPNUg.js → desktop-browser-C6AhY0uu.js} +1 -1
- package/dist/client/assets/js/{diagram-2AECGRRQ-B1sSf-09.js → diagram-2AECGRRQ-CvPeU5Lm.js} +1 -1
- package/dist/client/assets/js/{diagram-5GNKFQAL-BffX22pf.js → diagram-5GNKFQAL-CBniYlkH.js} +1 -1
- package/dist/client/assets/js/{diagram-KO2AKTUF-D8QvpUpn.js → diagram-KO2AKTUF-C_yFaVRj.js} +1 -1
- package/dist/client/assets/js/{diagram-LMA3HP47-DkG7p3lQ.js → diagram-LMA3HP47-BzM1IxNe.js} +1 -1
- package/dist/client/assets/js/{diagram-OG6HWLK6-RjvNNvXM.js → diagram-OG6HWLK6-yvmf_3ax.js} +1 -1
- package/dist/client/assets/js/{dist-Bk0VKtV3.js → dist-BHzBn3v7.js} +1 -1
- package/dist/client/assets/js/{dockerfile-C4m7j8sy.js → dockerfile-J3d6ZPDJ.js} +1 -1
- package/dist/client/assets/js/{docx-preview-BpTW-GN7.js → docx-preview-Rqt8wMjQ.js} +1 -1
- package/dist/client/assets/js/{download-CX8EG48r.js → download-xhRMWMda.js} +1 -1
- package/dist/client/assets/js/{ecl-EHV358Ls.js → ecl-XnlT0p97.js} +1 -1
- package/dist/client/assets/js/{editor.api2-CnHBqh_d.js → editor.api2-ChO5nUQb.js} +1 -1
- package/dist/client/assets/js/{elixir-DLfp2Dwn.js → elixir-BEJbxH-B.js} +1 -1
- package/dist/client/assets/js/{en-D6VVFwFU.js → en-D2WSXgkM.js} +1 -1
- package/dist/client/assets/js/{erDiagram-TEJ5UH35-CLlLC6xx.js → erDiagram-TEJ5UH35-DZysD9r9.js} +1 -1
- package/dist/client/assets/js/{es-BIMLuyVP.js → es-B7Mq1P0U.js} +1 -1
- package/dist/client/assets/js/{esm-C8D4M0Yn.js → esm-DnZPPtmx.js} +1 -1
- package/dist/client/assets/js/eventmodeling-FCH6USID-vlE3-g2j.js +1 -0
- package/dist/client/assets/js/{file-preview-BvgwVZXh.js → file-preview-C417aixJ.js} +1 -1
- package/dist/client/assets/js/{files-CJkCqsUx.js → files-DjI-npgn.js} +1 -1
- package/dist/client/assets/js/{flow9-CtBaUnAi.js → flow9-j5XT_8TQ.js} +1 -1
- package/dist/client/assets/js/{flowDiagram-I6XJVG4X-VTRTPnqD.js → flowDiagram-I6XJVG4X-Dt5ZtyHz.js} +1 -1
- package/dist/client/assets/js/{fr-C2lf0cY2.js → fr-DvClrDOw.js} +1 -1
- package/dist/client/assets/js/{freemarker2-XLeMvhl_.js → freemarker2-BzCf_0SN.js} +1 -1
- package/dist/client/assets/js/{fsharp-Db0uaBQv.js → fsharp-ClU_Sdjr.js} +1 -1
- package/dist/client/assets/js/{ganttDiagram-6RSMTGT7-CdKcIZ8_.js → ganttDiagram-6RSMTGT7-Bca3rPWi.js} +1 -1
- package/dist/client/assets/js/gitGraph-WXDBUCRP-Cyd4P6XH.js +1 -0
- package/dist/client/assets/js/{gitGraphDiagram-PVQCEYII-Bcuyw6fo.js → gitGraphDiagram-PVQCEYII-Co29qnTg.js} +1 -1
- package/dist/client/assets/js/{go-DwaTlB-B.js → go-D3iUyCM0.js} +1 -1
- package/dist/client/assets/js/{graphlib-vAI4Pw7R.js → graphlib-Bln6qd-Z.js} +1 -1
- package/dist/client/assets/js/{graphql-Cf2XhNJR.js → graphql-z8koqyyL.js} +1 -1
- package/dist/client/assets/js/{group-agent-avatar-CPehpiK0.js → group-agent-avatar-CwqtaKGw.js} +1 -1
- package/dist/client/assets/js/{group-chat-CY62vc77.js → group-chat-Buz8HP-N.js} +1 -1
- package/dist/client/assets/js/{group-chat-xkdjC2Jt.js → group-chat-CgFAwCtr.js} +1 -1
- package/dist/client/assets/js/{group-chat-agent-link-DdSNKasF.js → group-chat-agent-link-N5IFeN_j.js} +1 -1
- package/dist/client/assets/js/{handlebars-CNEKu_p8.js → handlebars-C_JvhUYs.js} +1 -1
- package/dist/client/assets/js/{hcl-6UZbq6h2.js → hcl-X7TzviIX.js} +1 -1
- package/dist/client/assets/js/{highlight-DwtBT6t1.js → highlight-C4yUBxwQ.js} +1 -1
- package/dist/client/assets/js/{html-DfSIHhKA.js → html-B-rCQB0N.js} +1 -1
- package/dist/client/assets/js/{htmlMode-iGw9-O-W.js → htmlMode-CAeEf_yf.js} +1 -1
- package/dist/client/assets/js/{index-DnjQJzX4.js → index-DN4SafrP.js} +5 -5
- package/dist/client/assets/js/info-J43DQDTF-B9tkQ2Sb.js +1 -0
- package/dist/client/assets/js/{infoDiagram-5YYISTIA-85450Zam.js → infoDiagram-5YYISTIA-BWQGayms.js} +1 -1
- package/dist/client/assets/js/{ini-8em8V_Af.js → ini-LTHHN4J-.js} +1 -1
- package/dist/client/assets/js/{ishikawaDiagram-YF4QCWOH-BZ4az7UA.js → ishikawaDiagram-YF4QCWOH-Dhuplz_z.js} +1 -1
- package/dist/client/assets/js/{ja-C1bBXgr_.js → ja-D7BeX2_D.js} +1 -1
- package/dist/client/assets/js/{java-CP1MdIkO.js → java-BRFX-ya0.js} +1 -1
- package/dist/client/assets/js/{javascript-Cr8_LHYa.js → javascript-ZXiVmjXn.js} +1 -1
- package/dist/client/assets/js/{journeyDiagram-JHISSGLW-DGMB8Tgc.js → journeyDiagram-JHISSGLW-CJeatAU9.js} +1 -1
- package/dist/client/assets/js/{jsonMode-HCZ-1lFH.js → jsonMode-C6FcMe0o.js} +1 -1
- package/dist/client/assets/js/{jszip.min-BkR6b8DY.js → jszip.min-skZCUzWf.js} +1 -1
- package/dist/client/assets/js/{julia-DMTMxa5q.js → julia-Bph8N3CL.js} +1 -1
- package/dist/client/assets/js/{kanban-definition-UN3LZRKU-F5cH_RpB.js → kanban-definition-UN3LZRKU-tvWuOdSr.js} +1 -1
- package/dist/client/assets/js/{katex-CYbEJAbZ.js → katex-hSGJNERm.js} +1 -1
- package/dist/client/assets/js/{ko-qgOeHd8L.js → ko-BsVa-If_.js} +1 -1
- package/dist/client/assets/js/{kotlin-Blzus47W.js → kotlin-_c4-tPQp.js} +1 -1
- package/dist/client/assets/js/{less-DWCHpDyf.js → less-5oVo4jfQ.js} +1 -1
- package/dist/client/assets/js/{lexon-YXdlYGbJ.js → lexon-DE4YtGwF.js} +1 -1
- package/dist/client/assets/js/{liquid-DSQgvRwe.js → liquid-BGfieGMG.js} +1 -1
- package/dist/client/assets/js/{lspLanguageFeatures-0Hx2Vnc-.js → lspLanguageFeatures-DU_1H2uW.js} +1 -1
- package/dist/client/assets/js/{lua-Cyv3mTkg.js → lua-7WJSZJqD.js} +1 -1
- package/dist/client/assets/js/{m3-CPY3Ym7_.js → m3-gZlfoR19.js} +1 -1
- package/dist/client/assets/js/{markdown-DaPQ1nuG.js → markdown-BYF71orA.js} +1 -1
- package/dist/client/assets/js/{mdx-BqA6Xr9V.js → mdx-CunEIV3g.js} +1 -1
- package/dist/client/assets/js/{mermaid-parser.core-D4HRUOce.js → mermaid-parser.core-DU_SX15F.js} +3 -3
- package/dist/client/assets/js/{mermaid.core-w6kHmgOG.js → mermaid.core-8vsbhG5J.js} +3 -3
- package/dist/client/assets/js/{message-scroll-position-C5yRCyBU.js → message-scroll-position-C9_YO3pX.js} +2 -2
- package/dist/client/assets/js/{mindmap-definition-RKZ34NQL-CnzhnJ7Z.js → mindmap-definition-RKZ34NQL-HPtlKqL1.js} +1 -1
- package/dist/client/assets/js/{mips-BfqBfLvN.js → mips-DXkvw9aZ.js} +1 -1
- package/dist/client/assets/js/{models-wrytxWnf.js → models-BILDy2sV.js} +1 -1
- package/dist/client/assets/js/{monaco.contribution-Bc-DesyO.js → monaco.contribution-DDqeHGl3.js} +2 -2
- package/dist/client/assets/js/{msdax-DgMip49g.js → msdax-BbHEBDvP.js} +1 -1
- package/dist/client/assets/js/{mysql-DPUvF1g2.js → mysql-7I1rlwh7.js} +1 -1
- package/dist/client/assets/js/{objective-c-BQ3llrPW.js → objective-c-Dk03REAv.js} +1 -1
- package/dist/client/assets/js/packet-YPE3B663-DlTFK3Wo.js +1 -0
- package/dist/client/assets/js/{pascal-bFWHV7MZ.js → pascal-BCfNkzYY.js} +1 -1
- package/dist/client/assets/js/{pascaligo-C8Qza2pK.js → pascaligo-D-DslS98.js} +1 -1
- package/dist/client/assets/js/{pdf-Cb7x495t.js → pdf-B_OYWxSy.js} +1 -1
- package/dist/client/assets/js/{pdf.worker.min-DDUKJ6cJ.js → pdf.worker.min--q2RLEHa.js} +1 -1
- package/dist/client/assets/js/{perl-x25gw0_p.js → perl-MUnuTclx.js} +1 -1
- package/dist/client/assets/js/{pets-BfRsvl7D.js → pets-D74G2jqA.js} +1 -1
- package/dist/client/assets/js/{pgsql-DAUcGeRq.js → pgsql-BxCBktNe.js} +1 -1
- package/dist/client/assets/js/{php-nri1eqb2.js → php-zp9UgH03.js} +1 -1
- package/dist/client/assets/js/pie-LRSECV5Y-BtnBGhFZ.js +1 -0
- package/dist/client/assets/js/{pieDiagram-4H26LBE5-4LODdtT_.js → pieDiagram-4H26LBE5-CG8_pcHr.js} +1 -1
- package/dist/client/assets/js/{pla-CHi5LWNL.js → pla-DGCtmYZC.js} +1 -1
- package/dist/client/assets/js/{postiats-Bk7jD0AA.js → postiats-DHSW8gnY.js} +1 -1
- package/dist/client/assets/js/{powerquery-UTqJ0Vs7.js → powerquery-BGsPEmJe.js} +1 -1
- package/dist/client/assets/js/{powershell-CuPY3Rqk.js → powershell-BItlb0hE.js} +1 -1
- package/dist/client/assets/js/{profiles-D-vlI-Ec.js → profiles-BK5JKD7h.js} +1 -1
- package/dist/client/assets/js/{protobuf-Be4AIz9j.js → protobuf-BIhm6JYx.js} +1 -1
- package/dist/client/assets/js/{pt-D7_udWb3.js → pt-BSORCDMm.js} +1 -1
- package/dist/client/assets/js/{pug-CZFx15Ey.js → pug-BtnM7KZj.js} +1 -1
- package/dist/client/assets/js/{python-BgRg6Ez6.js → python-DxzTx1Q_.js} +1 -1
- package/dist/client/assets/js/{qsharp-BiBiLhRS.js → qsharp-B_8MSfaB.js} +1 -1
- package/dist/client/assets/js/{quadrantDiagram-W4KKPZXB-g_q9-dXx.js → quadrantDiagram-W4KKPZXB-CsbkMYuV.js} +1 -1
- package/dist/client/assets/js/{r-DM7NVSbZ.js → r-kvKC59jk.js} +1 -1
- package/dist/client/assets/js/radar-GUYGQ44K-BTKMKX4G.js +1 -0
- package/dist/client/assets/js/{razor-CiWy0jCW.js → razor-BwZ0MkaL.js} +1 -1
- package/dist/client/assets/js/{redis-BR2LPmFL.js → redis-5j1U_i85.js} +1 -1
- package/dist/client/assets/js/{redshift-B0sdAV16.js → redshift-CX1dFLA1.js} +1 -1
- package/dist/client/assets/js/{requirementDiagram-4Y6WPE33-EedCclad.js → requirementDiagram-4Y6WPE33-CKC7CQCX.js} +1 -1
- package/dist/client/assets/js/{restructuredtext-kQOBLN1M.js → restructuredtext-MV0-Naya.js} +1 -1
- package/dist/client/assets/js/{rough.esm-Dyx_2DON.js → rough.esm-CV1rL6PC.js} +1 -1
- package/dist/client/assets/js/{ru-CVQQmreT.js → ru-JsH6TKyg.js} +1 -1
- package/dist/client/assets/js/{ruby-CbdJXy6J.js → ruby-Bhyejf9X.js} +1 -1
- package/dist/client/assets/js/{rust-DZanYksk.js → rust-CR8d_FC1.js} +1 -1
- package/dist/client/assets/js/{sankeyDiagram-5OEKKPKP-DFC0nzsd.js → sankeyDiagram-5OEKKPKP-CKlqlvAe.js} +1 -1
- package/dist/client/assets/js/{sb-C5-WiqDZ.js → sb-hLW2EM2L.js} +1 -1
- package/dist/client/assets/js/{scala-Bk7i9nV-.js → scala-DVUhALEZ.js} +1 -1
- package/dist/client/assets/js/{scheme-CaZSWmJ2.js → scheme-BS6yNanr.js} +1 -1
- package/dist/client/assets/js/{scss-ByOYuc7K.js → scss-BfoRsElt.js} +1 -1
- package/dist/client/assets/js/{sequenceDiagram-3UESZ5HK-hWjPfqXt.js → sequenceDiagram-3UESZ5HK-CTimhD6H.js} +1 -1
- package/dist/client/assets/js/{session-browser-prefs-Br8OYA4_.js → session-browser-prefs-BT1woDux.js} +1 -1
- package/dist/client/assets/js/{sessions-iGK9S6zk.js → sessions-IkLKgnN6.js} +1 -1
- package/dist/client/assets/js/{settings-pbanANH0.js → settings-roYY6G3W.js} +1 -1
- package/dist/client/assets/js/{shell-Di0TEySc.js → shell-BO_Lyczz.js} +1 -1
- package/dist/client/assets/js/{skills-DC-UPcXj.js → skills-a5LPwmiT.js} +1 -1
- package/dist/client/assets/js/{solidity-BNTjAuuA.js → solidity-D3T2Ki4l.js} +1 -1
- package/dist/client/assets/js/{sophia-LY__8Yob.js → sophia-iJmIEvi8.js} +1 -1
- package/dist/client/assets/js/{sparql-CWnLfgGS.js → sparql-C2HCEExr.js} +1 -1
- package/dist/client/assets/js/{sql-B0ypQ9lR.js → sql-DM6_3GBc.js} +1 -1
- package/dist/client/assets/js/{src-BihFroE7.js → src-DD_TpJde.js} +1 -1
- package/dist/client/assets/js/{st-CqVFKTbZ.js → st-DSb39Fm5.js} +1 -1
- package/dist/client/assets/js/{stateDiagram-AJRCARHV-B7wEnYVe.js → stateDiagram-AJRCARHV-DwBGmBj6.js} +1 -1
- package/dist/client/assets/js/stateDiagram-v2-BHNVJYJU-5bNcwBne.js +1 -0
- package/dist/client/assets/js/{style-DDAg_jVj.js → style-B5xXhBlp.js} +1 -1
- package/dist/client/assets/js/{swift-B4ZZmDxc.js → swift-DrZYSZK3.js} +1 -1
- package/dist/client/assets/js/{systemverilog-zLt-O1mT.js → systemverilog-BAWNCaf6.js} +1 -1
- package/dist/client/assets/js/{tcl-DCSZmA-l.js → tcl-DY15ex6v.js} +1 -1
- package/dist/client/assets/js/{timeline-definition-PNZ67QCA-BN_LfleE.js → timeline-definition-PNZ67QCA-B8xuIu6g.js} +1 -1
- package/dist/client/assets/js/treeView-BLDUP644-DvZPUnGM.js +1 -0
- package/dist/client/assets/js/treemap-LRROVOQU-Bis1djYh.js +1 -0
- package/dist/client/assets/js/{tsMode-BjUcuHrq.js → tsMode-BE8JCSCE.js} +1 -1
- package/dist/client/assets/js/{ttsHelpers-BLunFYsq.js → ttsHelpers-BLNiQExI.js} +1 -1
- package/dist/client/assets/js/{twig-CuJlVpUG.js → twig-BpHF_18K.js} +1 -1
- package/dist/client/assets/js/{typescript-De40YVFt.js → typescript-FQ3z9hVG.js} +1 -1
- package/dist/client/assets/js/{typespec-8QcsIc3c.js → typespec-BKvcn6aE.js} +1 -1
- package/dist/client/assets/js/{useSttSettings-B1-KXN44.js → useSttSettings-DHX06G8A.js} +1 -1
- package/dist/client/assets/js/{vb-DEGTdhxf.js → vb-B74ucE43.js} +1 -1
- package/dist/client/assets/js/{vennDiagram-CIIHVFJN-hL8ax7wF.js → vennDiagram-CIIHVFJN-DtEu04QR.js} +1 -1
- package/dist/client/assets/js/wardley-L42UT6IY-CD4dIN63.js +1 -0
- package/dist/client/assets/js/{wardleyDiagram-YWT4CUSO-BIR-RA6Y.js → wardleyDiagram-YWT4CUSO-DdNKCPsp.js} +1 -1
- package/dist/client/assets/js/{wgsl-CmbiucmY.js → wgsl-DEf5Vdqv.js} +1 -1
- package/dist/client/assets/js/{workers-BgWBq4qY.js → workers-BbaiLVxx.js} +1 -1
- package/dist/client/assets/js/{workflow-socket-DZ9Ceffc.js → workflow-socket-DH402vxO.js} +1 -1
- package/dist/client/assets/js/{xml-SZLdwDmk.js → xml-zjE51I7v.js} +1 -1
- package/dist/client/assets/js/{xterm-D6CotCNH.js → xterm-Djy4rCx0.js} +1 -1
- package/dist/client/assets/js/{xychartDiagram-2RQKCTM6-DHa486uP.js → xychartDiagram-2RQKCTM6-CKqN7g7r.js} +1 -1
- package/dist/client/assets/js/{yaml-CgQpCgM5.js → yaml-DabeGoTc.js} +1 -1
- package/dist/client/assets/js/{zh-BDlMioZr.js → zh-CI4-L3JY.js} +1 -1
- package/dist/client/assets/js/{zh-TW-DTbLWR1A.js → zh-TW-wYlj-uOZ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/openapi.json +1 -1
- package/package.json +9 -1
- package/dist/client/assets/js/architecture-7EHR7CIX-Cl4Qi40R.js +0 -1
- package/dist/client/assets/js/classDiagram-4FO5ZUOK-DC0BcY8x.js +0 -1
- package/dist/client/assets/js/classDiagram-v2-Q7XG4LA2-BfDDH_fm.js +0 -1
- package/dist/client/assets/js/eventmodeling-FCH6USID-Bgzwnvkn.js +0 -1
- package/dist/client/assets/js/gitGraph-WXDBUCRP-CwFrpI3e.js +0 -1
- package/dist/client/assets/js/info-J43DQDTF-wMwkmIWM.js +0 -1
- package/dist/client/assets/js/packet-YPE3B663-DYmKXJOE.js +0 -1
- package/dist/client/assets/js/pie-LRSECV5Y-Dx0hbcjV.js +0 -1
- package/dist/client/assets/js/radar-GUYGQ44K-D-t-QJhi.js +0 -1
- package/dist/client/assets/js/stateDiagram-v2-BHNVJYJU-CoMhBVvo.js +0 -1
- package/dist/client/assets/js/treeView-BLDUP644-CMJGhbWk.js +0 -1
- package/dist/client/assets/js/treemap-LRROVOQU-_j4KoVDh.js +0 -1
- package/dist/client/assets/js/wardley-L42UT6IY-BeOvmJoM.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{wa as D}from"./index-DnjQJzX4.js";import{$ as P,A as I,B as O,C as N,Ct as M,D as R,Dt as K,E,Et as H,F as W,G as V,H as j,I as B,J as U,K as $,L as z,M as Q,N as G,O as J,Ot as Z,P as q,Q as X,R as Y,S as ee,St as te,T as ie,Tt as se,U as re,V as ne,W as oe,X as ae,Y as le,Z as ce,_ as ue,_t as de,a as Ze,at as pe,b as ge,bt as fe,c as h,ct as be,d,dt as me,et as he,f as _e,ft as we,g as ye,gt as ke,h as Se,ht as xe,i as S,it as Ce,j as ve,k as Ae,kt as De,lt as Fe,m as Te,mt as Le,nt as Pe,o as qe,ot as Ie,p as Oe,pt as Ne,q as Me,rt as Re,s as v,st as Ke,tt as Ee,u as He,ut as We,v as Ve,vt as je,w as Be,wt as Ue,x as $e,xt as ze,y as Qe,yt as Ge,z as Je}from"./editor.api2-CnHBqh_d.js";import{n as ht,t as _t}from"./workers-BgWBq4qY.js";import{r as wt,t as yt}from"./monaco.contribution-Bc-DesyO.js";var Ye,kt=D((()=>{De(),Z(),K(),H(),se(),Ue(),M(),ze(),je(),de(),Le(),Ne(),we(),me(),We(),Fe(),be(),Ke(),Ie(),pe(),Ce(),Re(),P(),te(),ke(),X(),xe(),ce(),ae(),le(),U(),Me(),$(),V(),Pe(),oe(),re(),j(),ne(),O(),Je(),Y(),z(),B(),W(),q(),G(),Ee(),Q(),he(),ve(),I(),Ae(),J(),R(),E(),ie(),Be(),N(),ee(),$e(),ge(),fe(),Ge(),Qe(),Ve(),ue(),ye(),Se(),Te(),Oe(),_e(),He(),ht(),Ye=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=_t({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-M1Aw0PPZ.js",""+import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(h.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}})),i,St=D((()=>{i={},i["lib.d.ts"]=!0,i["lib.decorators.d.ts"]=!0,i["lib.decorators.legacy.d.ts"]=!0,i["lib.dom.asynciterable.d.ts"]=!0,i["lib.dom.d.ts"]=!0,i["lib.dom.iterable.d.ts"]=!0,i["lib.es2015.collection.d.ts"]=!0,i["lib.es2015.core.d.ts"]=!0,i["lib.es2015.d.ts"]=!0,i["lib.es2015.generator.d.ts"]=!0,i["lib.es2015.iterable.d.ts"]=!0,i["lib.es2015.promise.d.ts"]=!0,i["lib.es2015.proxy.d.ts"]=!0,i["lib.es2015.reflect.d.ts"]=!0,i["lib.es2015.symbol.d.ts"]=!0,i["lib.es2015.symbol.wellknown.d.ts"]=!0,i["lib.es2016.array.include.d.ts"]=!0,i["lib.es2016.d.ts"]=!0,i["lib.es2016.full.d.ts"]=!0,i["lib.es2016.intl.d.ts"]=!0,i["lib.es2017.arraybuffer.d.ts"]=!0,i["lib.es2017.d.ts"]=!0,i["lib.es2017.date.d.ts"]=!0,i["lib.es2017.full.d.ts"]=!0,i["lib.es2017.intl.d.ts"]=!0,i["lib.es2017.object.d.ts"]=!0,i["lib.es2017.sharedmemory.d.ts"]=!0,i["lib.es2017.string.d.ts"]=!0,i["lib.es2017.typedarrays.d.ts"]=!0,i["lib.es2018.asyncgenerator.d.ts"]=!0,i["lib.es2018.asynciterable.d.ts"]=!0,i["lib.es2018.d.ts"]=!0,i["lib.es2018.full.d.ts"]=!0,i["lib.es2018.intl.d.ts"]=!0,i["lib.es2018.promise.d.ts"]=!0,i["lib.es2018.regexp.d.ts"]=!0,i["lib.es2019.array.d.ts"]=!0,i["lib.es2019.d.ts"]=!0,i["lib.es2019.full.d.ts"]=!0,i["lib.es2019.intl.d.ts"]=!0,i["lib.es2019.object.d.ts"]=!0,i["lib.es2019.string.d.ts"]=!0,i["lib.es2019.symbol.d.ts"]=!0,i["lib.es2020.bigint.d.ts"]=!0,i["lib.es2020.d.ts"]=!0,i["lib.es2020.date.d.ts"]=!0,i["lib.es2020.full.d.ts"]=!0,i["lib.es2020.intl.d.ts"]=!0,i["lib.es2020.number.d.ts"]=!0,i["lib.es2020.promise.d.ts"]=!0,i["lib.es2020.sharedmemory.d.ts"]=!0,i["lib.es2020.string.d.ts"]=!0,i["lib.es2020.symbol.wellknown.d.ts"]=!0,i["lib.es2021.d.ts"]=!0,i["lib.es2021.full.d.ts"]=!0,i["lib.es2021.intl.d.ts"]=!0,i["lib.es2021.promise.d.ts"]=!0,i["lib.es2021.string.d.ts"]=!0,i["lib.es2021.weakref.d.ts"]=!0,i["lib.es2022.array.d.ts"]=!0,i["lib.es2022.d.ts"]=!0,i["lib.es2022.error.d.ts"]=!0,i["lib.es2022.full.d.ts"]=!0,i["lib.es2022.intl.d.ts"]=!0,i["lib.es2022.object.d.ts"]=!0,i["lib.es2022.regexp.d.ts"]=!0,i["lib.es2022.string.d.ts"]=!0,i["lib.es2023.array.d.ts"]=!0,i["lib.es2023.collection.d.ts"]=!0,i["lib.es2023.d.ts"]=!0,i["lib.es2023.full.d.ts"]=!0,i["lib.es2023.intl.d.ts"]=!0,i["lib.es2024.arraybuffer.d.ts"]=!0,i["lib.es2024.collection.d.ts"]=!0,i["lib.es2024.d.ts"]=!0,i["lib.es2024.full.d.ts"]=!0,i["lib.es2024.object.d.ts"]=!0,i["lib.es2024.promise.d.ts"]=!0,i["lib.es2024.regexp.d.ts"]=!0,i["lib.es2024.sharedmemory.d.ts"]=!0,i["lib.es2024.string.d.ts"]=!0,i["lib.es5.d.ts"]=!0,i["lib.es6.d.ts"]=!0,i["lib.esnext.array.d.ts"]=!0,i["lib.esnext.collection.d.ts"]=!0,i["lib.esnext.d.ts"]=!0,i["lib.esnext.decorators.d.ts"]=!0,i["lib.esnext.disposable.d.ts"]=!0,i["lib.esnext.error.d.ts"]=!0,i["lib.esnext.float16.d.ts"]=!0,i["lib.esnext.full.d.ts"]=!0,i["lib.esnext.intl.d.ts"]=!0,i["lib.esnext.iterator.d.ts"]=!0,i["lib.esnext.promise.d.ts"]=!0,i["lib.esnext.sharedmemory.d.ts"]=!0,i["lib.scripthost.d.ts"]=!0,i["lib.webworker.asynciterable.d.ts"]=!0,i["lib.webworker.d.ts"]=!0,i["lib.webworker.importscripts.d.ts"]=!0,i["lib.webworker.iterable.d.ts"]=!0}));function F(e,t,r=0){if(typeof e=="string")return e;if(e===void 0)return"";let o="";if(r){o+=t;for(let n=0;n<r;n++)o+=" "}if(o+=e.messageText,r++,e.next)for(const n of e.next)o+=F(n,t,r);return o}function w(e){return e?e.map(t=>t.text).join(""):""}function Xe(e){let t=`*@${e.name}*`;if(e.name==="param"&&e.text){const[r,...o]=e.text;t+=`\`${r.text}\``,o.length>0&&(t+=` — ${o.map(n=>n.text).join(" ")}`)}else Array.isArray(e.text)?t+=` — ${e.text.map(r=>r.text).join(" ")}`:e.text&&(t+=` — ${e.text}`);return t}var _,et,tt,it,st,rt,nt,ot,at,lt,a,b,y,ct,ut,dt,pt,gt,xt=D((()=>{yt(),St(),De(),Z(),K(),H(),se(),Ue(),M(),ze(),je(),de(),Le(),Ne(),we(),me(),We(),Fe(),be(),Ke(),Ie(),pe(),Ce(),Re(),P(),te(),ke(),X(),xe(),ce(),ae(),le(),U(),Me(),$(),V(),Pe(),oe(),re(),j(),ne(),O(),Je(),Y(),z(),B(),W(),q(),G(),Ee(),Q(),he(),ve(),I(),Ae(),J(),R(),E(),ie(),Be(),N(),ee(),$e(),ge(),fe(),Ge(),Qe(),Ve(),ue(),ye(),Se(),Te(),Oe(),_e(),He(),_=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let r=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.length),{lineNumber:n,column:u}=r,{lineNumber:c,column:s}=o;return{startLineNumber:n,startColumn:u,endLineNumber:c,endColumn:s}}},et=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!i[e.path.slice(1)]:!1}getOrCreateModel(e){const t=v.parse(e),r=h.getModel(t);if(r)return r;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return h.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const o=wt.getExtraLibs()[e];return o?h.createModel(o.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},tt=class extends _{constructor(e,t,r,o){super(o),this._libFiles=e,this._defaults=t,this._selector=r,this._disposables=[],this._listener=Object.create(null);const n=s=>{if(s.getLanguageId()!==r)return;const l=()=>{const{onlyVisible:m}=this._defaults.getDiagnosticsOptions();m?s.isAttachedToEditor()&&this._doValidate(s):this._doValidate(s)};let p;const f=s.onDidChangeContent(()=>{clearTimeout(p),p=window.setTimeout(l,500)}),g=s.onDidChangeAttached(()=>{const{onlyVisible:m}=this._defaults.getDiagnosticsOptions();m&&(s.isAttachedToEditor()?l():h.setModelMarkers(s,this._selector,[]))});this._listener[s.uri.toString()]={dispose(){f.dispose(),g.dispose(),clearTimeout(p)}},l()},u=s=>{h.setModelMarkers(s,this._selector,[]);const l=s.uri.toString();this._listener[l]&&(this._listener[l].dispose(),delete this._listener[l])};this._disposables.push(h.onDidCreateModel(s=>n(s))),this._disposables.push(h.onWillDisposeModel(u)),this._disposables.push(h.onDidChangeModelLanguage(s=>{u(s.model),n(s.model)})),this._disposables.push({dispose(){for(const s of h.getModels())u(s)}});const c=()=>{for(const s of h.getModels())u(s),n(s)};this._disposables.push(this._defaults.onDidChange(c)),this._disposables.push(this._defaults.onDidExtraLibsChange(c)),h.getModels().forEach(s=>n(s))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const r=[],{noSyntaxValidation:o,noSemanticValidation:n,noSuggestionDiagnostics:u}=this._defaults.getDiagnosticsOptions();o||r.push(t.getSyntacticDiagnostics(e.uri.toString())),n||r.push(t.getSemanticDiagnostics(e.uri.toString())),u||r.push(t.getSuggestionDiagnostics(e.uri.toString()));const c=await Promise.all(r);if(!c||e.isDisposed())return;const s=c.reduce((p,f)=>f.concat(p),[]).filter(p=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(p.code)===-1),l=s.map(p=>p.relatedInformation||[]).reduce((p,f)=>f.concat(p),[]).map(p=>p.file?v.parse(p.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(l),!e.isDisposed()&&h.setModelMarkers(e,this._selector,s.map(p=>this._convertDiagnostics(e,p)))}_convertDiagnostics(e,t){const r=t.start||0,o=t.length||1,{lineNumber:n,column:u}=e.getPositionAt(r),{lineNumber:c,column:s}=e.getPositionAt(r+o),l=[];return t.reportsUnnecessary&&l.push(Ze.Unnecessary),t.reportsDeprecated&&l.push(Ze.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:u,endLineNumber:c,endColumn:s,message:F(t.messageText,`
|
|
1
|
+
import{wa as D}from"./index-DN4SafrP.js";import{$ as P,A as I,B as O,C as N,Ct as M,D as R,Dt as K,E,Et as H,F as W,G as V,H as j,I as B,J as U,K as $,L as z,M as Q,N as G,O as J,Ot as Z,P as q,Q as X,R as Y,S as ee,St as te,T as ie,Tt as se,U as re,V as ne,W as oe,X as ae,Y as le,Z as ce,_ as ue,_t as de,a as Ze,at as pe,b as ge,bt as fe,c as h,ct as be,d,dt as me,et as he,f as _e,ft as we,g as ye,gt as ke,h as Se,ht as xe,i as S,it as Ce,j as ve,k as Ae,kt as De,lt as Fe,m as Te,mt as Le,nt as Pe,o as qe,ot as Ie,p as Oe,pt as Ne,q as Me,rt as Re,s as v,st as Ke,tt as Ee,u as He,ut as We,v as Ve,vt as je,w as Be,wt as Ue,x as $e,xt as ze,y as Qe,yt as Ge,z as Je}from"./editor.api2-ChO5nUQb.js";import{n as ht,t as _t}from"./workers-BbaiLVxx.js";import{r as wt,t as yt}from"./monaco.contribution-DDqeHGl3.js";var Ye,kt=D((()=>{De(),Z(),K(),H(),se(),Ue(),M(),ze(),je(),de(),Le(),Ne(),we(),me(),We(),Fe(),be(),Ke(),Ie(),pe(),Ce(),Re(),P(),te(),ke(),X(),xe(),ce(),ae(),le(),U(),Me(),$(),V(),Pe(),oe(),re(),j(),ne(),O(),Je(),Y(),z(),B(),W(),q(),G(),Ee(),Q(),he(),ve(),I(),Ae(),J(),R(),E(),ie(),Be(),N(),ee(),$e(),ge(),fe(),Ge(),Qe(),Ve(),ue(),ye(),Se(),Te(),Oe(),_e(),He(),ht(),Ye=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=_t({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-M1Aw0PPZ.js",""+import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(h.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}})),i,St=D((()=>{i={},i["lib.d.ts"]=!0,i["lib.decorators.d.ts"]=!0,i["lib.decorators.legacy.d.ts"]=!0,i["lib.dom.asynciterable.d.ts"]=!0,i["lib.dom.d.ts"]=!0,i["lib.dom.iterable.d.ts"]=!0,i["lib.es2015.collection.d.ts"]=!0,i["lib.es2015.core.d.ts"]=!0,i["lib.es2015.d.ts"]=!0,i["lib.es2015.generator.d.ts"]=!0,i["lib.es2015.iterable.d.ts"]=!0,i["lib.es2015.promise.d.ts"]=!0,i["lib.es2015.proxy.d.ts"]=!0,i["lib.es2015.reflect.d.ts"]=!0,i["lib.es2015.symbol.d.ts"]=!0,i["lib.es2015.symbol.wellknown.d.ts"]=!0,i["lib.es2016.array.include.d.ts"]=!0,i["lib.es2016.d.ts"]=!0,i["lib.es2016.full.d.ts"]=!0,i["lib.es2016.intl.d.ts"]=!0,i["lib.es2017.arraybuffer.d.ts"]=!0,i["lib.es2017.d.ts"]=!0,i["lib.es2017.date.d.ts"]=!0,i["lib.es2017.full.d.ts"]=!0,i["lib.es2017.intl.d.ts"]=!0,i["lib.es2017.object.d.ts"]=!0,i["lib.es2017.sharedmemory.d.ts"]=!0,i["lib.es2017.string.d.ts"]=!0,i["lib.es2017.typedarrays.d.ts"]=!0,i["lib.es2018.asyncgenerator.d.ts"]=!0,i["lib.es2018.asynciterable.d.ts"]=!0,i["lib.es2018.d.ts"]=!0,i["lib.es2018.full.d.ts"]=!0,i["lib.es2018.intl.d.ts"]=!0,i["lib.es2018.promise.d.ts"]=!0,i["lib.es2018.regexp.d.ts"]=!0,i["lib.es2019.array.d.ts"]=!0,i["lib.es2019.d.ts"]=!0,i["lib.es2019.full.d.ts"]=!0,i["lib.es2019.intl.d.ts"]=!0,i["lib.es2019.object.d.ts"]=!0,i["lib.es2019.string.d.ts"]=!0,i["lib.es2019.symbol.d.ts"]=!0,i["lib.es2020.bigint.d.ts"]=!0,i["lib.es2020.d.ts"]=!0,i["lib.es2020.date.d.ts"]=!0,i["lib.es2020.full.d.ts"]=!0,i["lib.es2020.intl.d.ts"]=!0,i["lib.es2020.number.d.ts"]=!0,i["lib.es2020.promise.d.ts"]=!0,i["lib.es2020.sharedmemory.d.ts"]=!0,i["lib.es2020.string.d.ts"]=!0,i["lib.es2020.symbol.wellknown.d.ts"]=!0,i["lib.es2021.d.ts"]=!0,i["lib.es2021.full.d.ts"]=!0,i["lib.es2021.intl.d.ts"]=!0,i["lib.es2021.promise.d.ts"]=!0,i["lib.es2021.string.d.ts"]=!0,i["lib.es2021.weakref.d.ts"]=!0,i["lib.es2022.array.d.ts"]=!0,i["lib.es2022.d.ts"]=!0,i["lib.es2022.error.d.ts"]=!0,i["lib.es2022.full.d.ts"]=!0,i["lib.es2022.intl.d.ts"]=!0,i["lib.es2022.object.d.ts"]=!0,i["lib.es2022.regexp.d.ts"]=!0,i["lib.es2022.string.d.ts"]=!0,i["lib.es2023.array.d.ts"]=!0,i["lib.es2023.collection.d.ts"]=!0,i["lib.es2023.d.ts"]=!0,i["lib.es2023.full.d.ts"]=!0,i["lib.es2023.intl.d.ts"]=!0,i["lib.es2024.arraybuffer.d.ts"]=!0,i["lib.es2024.collection.d.ts"]=!0,i["lib.es2024.d.ts"]=!0,i["lib.es2024.full.d.ts"]=!0,i["lib.es2024.object.d.ts"]=!0,i["lib.es2024.promise.d.ts"]=!0,i["lib.es2024.regexp.d.ts"]=!0,i["lib.es2024.sharedmemory.d.ts"]=!0,i["lib.es2024.string.d.ts"]=!0,i["lib.es5.d.ts"]=!0,i["lib.es6.d.ts"]=!0,i["lib.esnext.array.d.ts"]=!0,i["lib.esnext.collection.d.ts"]=!0,i["lib.esnext.d.ts"]=!0,i["lib.esnext.decorators.d.ts"]=!0,i["lib.esnext.disposable.d.ts"]=!0,i["lib.esnext.error.d.ts"]=!0,i["lib.esnext.float16.d.ts"]=!0,i["lib.esnext.full.d.ts"]=!0,i["lib.esnext.intl.d.ts"]=!0,i["lib.esnext.iterator.d.ts"]=!0,i["lib.esnext.promise.d.ts"]=!0,i["lib.esnext.sharedmemory.d.ts"]=!0,i["lib.scripthost.d.ts"]=!0,i["lib.webworker.asynciterable.d.ts"]=!0,i["lib.webworker.d.ts"]=!0,i["lib.webworker.importscripts.d.ts"]=!0,i["lib.webworker.iterable.d.ts"]=!0}));function F(e,t,r=0){if(typeof e=="string")return e;if(e===void 0)return"";let o="";if(r){o+=t;for(let n=0;n<r;n++)o+=" "}if(o+=e.messageText,r++,e.next)for(const n of e.next)o+=F(n,t,r);return o}function w(e){return e?e.map(t=>t.text).join(""):""}function Xe(e){let t=`*@${e.name}*`;if(e.name==="param"&&e.text){const[r,...o]=e.text;t+=`\`${r.text}\``,o.length>0&&(t+=` — ${o.map(n=>n.text).join(" ")}`)}else Array.isArray(e.text)?t+=` — ${e.text.map(r=>r.text).join(" ")}`:e.text&&(t+=` — ${e.text}`);return t}var _,et,tt,it,st,rt,nt,ot,at,lt,a,b,y,ct,ut,dt,pt,gt,xt=D((()=>{yt(),St(),De(),Z(),K(),H(),se(),Ue(),M(),ze(),je(),de(),Le(),Ne(),we(),me(),We(),Fe(),be(),Ke(),Ie(),pe(),Ce(),Re(),P(),te(),ke(),X(),xe(),ce(),ae(),le(),U(),Me(),$(),V(),Pe(),oe(),re(),j(),ne(),O(),Je(),Y(),z(),B(),W(),q(),G(),Ee(),Q(),he(),ve(),I(),Ae(),J(),R(),E(),ie(),Be(),N(),ee(),$e(),ge(),fe(),Ge(),Qe(),Ve(),ue(),ye(),Se(),Te(),Oe(),_e(),He(),_=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let r=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.length),{lineNumber:n,column:u}=r,{lineNumber:c,column:s}=o;return{startLineNumber:n,startColumn:u,endLineNumber:c,endColumn:s}}},et=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!i[e.path.slice(1)]:!1}getOrCreateModel(e){const t=v.parse(e),r=h.getModel(t);if(r)return r;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return h.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const o=wt.getExtraLibs()[e];return o?h.createModel(o.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},tt=class extends _{constructor(e,t,r,o){super(o),this._libFiles=e,this._defaults=t,this._selector=r,this._disposables=[],this._listener=Object.create(null);const n=s=>{if(s.getLanguageId()!==r)return;const l=()=>{const{onlyVisible:m}=this._defaults.getDiagnosticsOptions();m?s.isAttachedToEditor()&&this._doValidate(s):this._doValidate(s)};let p;const f=s.onDidChangeContent(()=>{clearTimeout(p),p=window.setTimeout(l,500)}),g=s.onDidChangeAttached(()=>{const{onlyVisible:m}=this._defaults.getDiagnosticsOptions();m&&(s.isAttachedToEditor()?l():h.setModelMarkers(s,this._selector,[]))});this._listener[s.uri.toString()]={dispose(){f.dispose(),g.dispose(),clearTimeout(p)}},l()},u=s=>{h.setModelMarkers(s,this._selector,[]);const l=s.uri.toString();this._listener[l]&&(this._listener[l].dispose(),delete this._listener[l])};this._disposables.push(h.onDidCreateModel(s=>n(s))),this._disposables.push(h.onWillDisposeModel(u)),this._disposables.push(h.onDidChangeModelLanguage(s=>{u(s.model),n(s.model)})),this._disposables.push({dispose(){for(const s of h.getModels())u(s)}});const c=()=>{for(const s of h.getModels())u(s),n(s)};this._disposables.push(this._defaults.onDidChange(c)),this._disposables.push(this._defaults.onDidExtraLibsChange(c)),h.getModels().forEach(s=>n(s))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const r=[],{noSyntaxValidation:o,noSemanticValidation:n,noSuggestionDiagnostics:u}=this._defaults.getDiagnosticsOptions();o||r.push(t.getSyntacticDiagnostics(e.uri.toString())),n||r.push(t.getSemanticDiagnostics(e.uri.toString())),u||r.push(t.getSuggestionDiagnostics(e.uri.toString()));const c=await Promise.all(r);if(!c||e.isDisposed())return;const s=c.reduce((p,f)=>f.concat(p),[]).filter(p=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(p.code)===-1),l=s.map(p=>p.relatedInformation||[]).reduce((p,f)=>f.concat(p),[]).map(p=>p.file?v.parse(p.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(l),!e.isDisposed()&&h.setModelMarkers(e,this._selector,s.map(p=>this._convertDiagnostics(e,p)))}_convertDiagnostics(e,t){const r=t.start||0,o=t.length||1,{lineNumber:n,column:u}=e.getPositionAt(r),{lineNumber:c,column:s}=e.getPositionAt(r+o),l=[];return t.reportsUnnecessary&&l.push(Ze.Unnecessary),t.reportsDeprecated&&l.push(Ze.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:u,endLineNumber:c,endColumn:s,message:F(t.messageText,`
|
|
2
2
|
`),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const r=[];return t.forEach(o=>{let n=e;if(o.file&&(n=this._libFiles.getOrCreateModel(o.file.fileName)),!n)return;const u=o.start||0,c=o.length||1,{lineNumber:s,column:l}=n.getPositionAt(u),{lineNumber:p,column:f}=n.getPositionAt(u+c);r.push({resource:n.uri,startLineNumber:s,startColumn:l,endLineNumber:p,endColumn:f,message:F(o.messageText,`
|
|
3
3
|
`)})}),r}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return S.Error;case 3:return S.Info;case 0:return S.Warning;case 2:return S.Hint}return S.Info}},it=class A extends _{get triggerCharacters(){return["."]}async provideCompletionItems(t,r,o,n){const u=t.getWordUntilPosition(r),c=new qe(r.lineNumber,u.startColumn,r.lineNumber,u.endColumn),s=t.uri,l=t.getOffsetAt(r),p=await this._worker(s);if(t.isDisposed())return;const f=await p.getCompletionsAtPosition(s.toString(),l);if(!(!f||t.isDisposed()))return{suggestions:f.entries.map(g=>{let m=c;if(g.replacementSpan){const C=t.getPositionAt(g.replacementSpan.start),k=t.getPositionAt(g.replacementSpan.start+g.replacementSpan.length);m=new qe(C.lineNumber,C.column,k.lineNumber,k.column)}const x=[];return g.kindModifiers!==void 0&&g.kindModifiers.indexOf("deprecated")!==-1&&x.push(d.CompletionItemTag.Deprecated),{uri:s,position:r,offset:l,range:m,label:g.name,insertText:g.name,sortText:g.sortText,kind:A.convertKind(g.kind),tags:x}})}}async resolveCompletionItem(t,r){const o=t,n=o.uri,u=o.position,c=o.offset,s=await(await this._worker(n)).getCompletionEntryDetails(n.toString(),c,o.label);return s?{uri:n,position:u,label:s.name,kind:A.convertKind(s.kind),detail:w(s.displayParts),documentation:{value:A.createDocumentationString(s)}}:o}static convertKind(t){switch(t){case a.primitiveType:case a.keyword:return d.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return d.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return d.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return d.CompletionItemKind.Function;case a.enum:return d.CompletionItemKind.Enum;case a.module:return d.CompletionItemKind.Module;case a.class:return d.CompletionItemKind.Class;case a.interface:return d.CompletionItemKind.Interface;case a.warning:return d.CompletionItemKind.File}return d.CompletionItemKind.Property}static createDocumentationString(t){let r=w(t.documentation);if(t.tags)for(const o of t.tags)r+=`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Gr as ui,Kr as si,Qr as ci,Vi as fi,Zi as mi,gi as E,si as Le,ua as u,wa as de}from"./index-DnjQJzX4.js";function wi(e){return typeof e=="string"&&He.has(e)}async function je(e){try{const n=await e.clone().json(),o=typeof n.error=="string"?n.error:"TTS request failed",s=typeof n.detail=="string"&&n.detail.trim()?n.detail.trim():"";return s?`${o}: ${s}`:`${o}: ${e.status}`}catch{const n=await e.text().catch(()=>"");return n?`TTS request failed: ${e.status} ${n.slice(0,300)}`:`TTS request failed: ${e.status}`}}function $e(e){const n={"Content-Type":"application/json"},o=si();o&&(n.Authorization=`Bearer ${o}`);const s=e?.trim()||ui();return s&&(n["X-Hermes-Profile"]=s),n}async function di(e){const n=await fetch(`${localStorage.getItem("hermes_server_url")||""}/api/hermes/tts`,{method:"POST",headers:$e(),body:JSON.stringify(e)});if(!n.ok)throw new Error(await je(n));return{audio:await n.blob(),engine:n.headers.get("X-TTS-Engine")||"unknown"}}async function Fe(e){const n=await fetch(`${localStorage.getItem("hermes_server_url")||""}/api/hermes/tts/synthesize`,{method:"POST",headers:$e(e.profile),body:JSON.stringify({provider:e.provider,text:e.text,options:e.options||{}}),signal:e.signal});if(!n.ok)throw new Error(await je(n));return{audio:await n.blob(),engine:n.headers.get("X-TTS-Engine")||"unknown",provider:n.headers.get("X-TTS-Provider")||e.provider||"unknown"}}function vi(e){const n=URL.createObjectURL(e),o=new Audio(n);return o.play(),o.onended=()=>URL.revokeObjectURL(n),o}var He,pi=de((()=>{ci(),He=new Set(["edge","openai","custom","mimo","doubao","elevenlabs","gemini","xai","mistral","minimax","deepinfra"])}));function gi(){const e=typeof window<"u"?window.speechSynthesis:void 0,n=u([]),o=u({isPlaying:!1,isPaused:!1,currentMessageId:null,progress:0,engine:"none"});let s=null,g=null,d=0;const _=[],C=[],z=new Set,ve=new Set,O=[],Pe=new Set;let we=0,ce=0,Ve=!1,fe=null;const b=u(!1),p=u(!1),S=u(null);function Te(){try{n.value=typeof e?.getVoices=="function"?e.getVoices():[]}catch{n.value=[]}}typeof e?.addEventListener=="function"&&e.addEventListener("voiceschanged",Te),Te();function P(i){if(!i)return"";let a=i;return a=a.replace(/<thinking[^>]*>[\s\S]*?<\/thinking>/gi,""),a=a.replace(/<thinking[^>]*>[\s\S]*/gi,""),a=a.replace(/```[\s\S]*?```/g,""),a=a.replace(/`[^`]+`/g,""),a=a.replace(/<[^>]+>/g,""),a=a.replace(/[^\p{L}\p{N}\s.。!?;,,。!?;:、""''()【】《》\n一-鿿㐀-䶿]/gu,""),a=a.replace(/\s+/g," ").trim(),a}const Ce=E(()=>!!(typeof window<"u"&&window.speechSynthesis&&typeof window.speechSynthesis.speak=="function"&&typeof window.SpeechSynthesisUtterance=="function"));function ze(){const i=n.value;if(i.length===0)return null;const a=i.find(t=>t.lang.startsWith("zh"));if(a)return a;const l=i.find(t=>t.lang.startsWith("en"));return l||i[0]}function y(i=!0){d+=1,i&&(ce+=1,Ye(),_.length=0,C.length=0,z.clear()),xe(),g&&(g.pause(),g.src="",g=null),x?.abort(),x=null,me(),k(),e&&(e.speaking||e.pending||e.paused)&&typeof e.cancel=="function"&&e.cancel(),s=null,o.value={isPlaying:!1,isPaused:!1,currentMessageId:null,progress:0,engine:"none"},i||w()}async function Qe(i,a,l,t){o.value.isPlaying=!0,o.value.isPaused=!1,o.value.currentMessageId=i,o.value.progress=0,o.value.engine="tts";try{const{audio:f}=await di({text:a,lang:l.lang||"zh-CN"});if(t!==d)return;g=vi(f),g.onended=()=>{t===d&&(o.value.isPlaying=!1,o.value.isPaused=!1,o.value.currentMessageId=null,o.value.progress=a.length,o.value.engine="none",g=null,_.length>0&&setTimeout(A,0),w())},g.onerror=()=>{t===d&&(console.warn("[useSpeech] TTS audio playback error, falling back to browser"),pe(i,a,l,t))}}catch(f){if(t!==d)return;console.warn("[useSpeech] TTS API failed, falling back to browser:",f),pe(i,a,l,t)}}function pe(i,a,l,t){if(t=t||++d,!Ce.value||!e){o.value={isPlaying:!1,isPaused:!1,currentMessageId:null,progress:0,engine:"none"},w();return}s=new window.SpeechSynthesisUtterance(a);const f=s;if(s.rate=1,s.pitch=1,s.volume=1,l.voiceName){const v=n.value.find(U=>U.name===l.voiceName);v&&(s.voice=v)}s.voice||(s.voice=ze()),l.lang?s.lang=l.lang:s.voice&&(s.lang=s.voice.lang),o.value.engine="browser",o.value.isPlaying=!0,o.value.isPaused=!1,o.value.currentMessageId=i,o.value.progress=0,s.onboundary=v=>{t!==d||s!==f||v.name==="word"&&(o.value.progress=v.charIndex)},s.onend=()=>{t!==d||s!==f||(o.value.isPlaying=!1,o.value.isPaused=!1,o.value.currentMessageId=null,o.value.progress=a.length,o.value.engine="none",s=null,_.length>0&&setTimeout(A,0),w())},s.onerror=()=>{t!==d||s!==f||(o.value.isPlaying=!1,o.value.isPaused=!1,o.value.currentMessageId=null,o.value.engine="none",s=null,_.length>0&&setTimeout(A,0),w())},e.speak(s)}let h=null,T=null,x=null;function Oe(i){return i instanceof Error&&i.name==="AbortError"}function k(){b.value=!1,p.value=!1,S.value=null}function Ge(){T&&(URL.revokeObjectURL(T),T=null)}function me(){h&&(h.pause(),h.src="",h=null),Ge()}function We(i){return i.provider?i.provider:i.baseUrl?.startsWith("/api/tts/proxy")?"edge":i.model?"openai":"custom"}function qe(i,a,l,t){i.onended=()=>{if(a!==d){t?.();return}me(),k(),t?.(),_.length>0&&setTimeout(A,0),w()},i.onerror=()=>{if(a!==d){t?.();return}me(),console.warn(l),k(),t?.(),_.length>0&&setTimeout(A,0),w()}}async function Ae(i,a,l,t,f,v,U,V){x?.abort(),xe(),me(),b.value=!0,p.value=!1,S.value=i;const M=new AbortController;x=M;try{const{audio:I}=await Fe({provider:l,profile:U,text:a,options:t,signal:M.signal});if(f!==d){V?.();return}T=URL.createObjectURL(I);const D=new Audio(T);h=D,qe(D,f,v,V),await D.play()}catch(I){if(f!==d){V?.();return}if(me(),k(),V?.(),_.length>0&&setTimeout(A,0),w(),Oe(I))return;throw I}finally{x===M&&(x=null)}}function Ue(){return o.value.isPlaying||o.value.isPaused||b.value||p.value}function xe(){const i=fe;fe=null,i?.()}function Ye(){for(const a of ve)a.abort();ve.clear();const i=new DOMException("Profile speech synthesis cancelled","AbortError");for(;O.length>0;)O.shift()?.resolve({ok:!1,error:i})}function ke(){for(;we<Je&&O.length>0;){const i=O.findIndex(t=>t.generation!==ce||!Pe.has(t.profile));if(i<0)break;const[a]=O.splice(i,1);if(!a)break;if(a.generation!==ce){a.resolve({ok:!1,error:new DOMException("Stale Profile speech synthesis","AbortError")});continue}const l=new AbortController;we+=1,Pe.add(a.profile),ve.add(l),Fe({profile:a.profile,text:a.text,signal:l.signal}).then(({audio:t})=>a.resolve({ok:!0,audio:t})).catch(t=>a.resolve({ok:!1,error:t})).finally(()=>{we-=1,Pe.delete(a.profile),ve.delete(l),ke()})}}function Ze(i,a,l){return new Promise(t=>{O.push({text:i,profile:a,generation:l,resolve:t}),ke()})}function ei(i,a){const l=++d,t=URL.createObjectURL(a),f=new Audio(t);return h=f,T=t,b.value=!0,p.value=!1,S.value=i.messageId,new Promise((v,U)=>{let V=!1;const M=D=>{V||(V=!0,f.onended=null,f.onerror=null,h===f&&(h=null),T===t&&(T=null),fe===I&&(fe=null),URL.revokeObjectURL(t),l===d&&S.value===i.messageId&&k(),D?U(D):v())},I=()=>{f.pause(),f.src="",M()};fe=I,f.onended=()=>M(),f.onerror=()=>M(new Error("Profile TTS audio playback failed")),f.play().catch(M)})}function w(){setTimeout(()=>{De()},0)}async function De(){if(!(Ve||Ue())){Ve=!0;try{for(;C.length>0;){const i=C.shift();if(!i)continue;const a=await i.synthesis;if(i.generation!==ce){z.delete(i.messageId);continue}if(Ue()){C.unshift(i);return}if(!a.ok){z.delete(i.messageId),Oe(a.error)||console.warn("[useSpeech] Profile TTS autoplay failed:",a.error);continue}try{await ei(i,a.audio)}catch(l){console.warn("[useSpeech] Profile TTS autoplay failed:",l)}finally{z.delete(i.messageId)}}}finally{Ve=!1,C.length>0&&w()}}}function ii(i,a,l){const t=l.trim(),f=P(a);if(!t||!f||z.has(i)||S.value===i)return;const v=ce,U={messageId:i,content:a,profile:t,generation:v,synthesis:Ze(f,t,v)};z.add(i),C.push(U),De()}async function Ee(i,a,l){const t=P(a),f=l.trim();!t||!f||await Ae(i,t,void 0,{},++d,"[useSpeech] Profile TTS audio playback error",f)}function ai(i,a,l){S.value===i&&b.value?p.value?ge():he():(y(!1),Me(Ee(i,a,l)))}async function Ke(i,a,l){const t=P(a);if(!t)return;const f=++d,v=We(l),{provider:U,...V}=l;await Ae(i,t,v,V,f,"[useSpeech] Custom TTS audio playback error")}function ge(){if(!h){k();return}h.play().then(()=>{p.value=!1}).catch(i=>{console.warn("[useSpeech] Custom TTS audio resume failed:",i),p.value=!0})}function he(){return!b.value||p.value?!1:h?(h.pause(),p.value=!0,!0):(y(!1),!0)}function Me(i){i.catch(()=>{})}function oi(i,a,l){S.value===i&&b.value?p.value?ge():he():(y(!1),Me(Ke(i,a,l)))}async function Re(i,a,l){const t=P(a);t&&await Ae(i,t,"mimo",l,++d,"[useSpeech] MiMo TTS audio playback error")}function ti(i,a,l){S.value===i&&b.value?p.value?ge():he():(y(!1),Me(Re(i,a,l)))}function Be(i,a,l={}){Qe(i,a,l,++d)}function A(){if(Ue())return;const i=_.shift();if(!i)return;const a=P(i.content);if(!a){setTimeout(A,0);return}Be(i.messageId,a,i.options)}function Ne(i,a,l={}){if(o.value.currentMessageId&&o.value.currentMessageId!==i&&y(),o.value.currentMessageId===i){o.value.isPaused?ye():o.value.isPlaying&&be();return}const t=P(a);t&&(y(),Be(i,t,l))}function li(i,a,l={}){if(o.value.currentMessageId&&o.value.currentMessageId!==i&&y(!1),o.value.currentMessageId===i){o.value.isPaused?ye():o.value.isPlaying&&be();return}const t=P(a);t&&(y(!1),pe(i,t,l))}function ni(i,a,l={}){P(a)&&(_.push({messageId:i,content:a,options:l}),A())}function be(){he()||(o.value.engine==="tts"&&g?(g.pause(),o.value.isPaused=!0):o.value.engine==="browser"&&!o.value.isPaused&&typeof e?.pause=="function"&&(e.pause(),o.value.isPaused=!0))}function ye(){if(b.value&&p.value){ge();return}o.value.isPaused&&(o.value.engine==="tts"&&g?g.play():typeof e?.resume=="function"&&e.resume(),o.value.isPaused=!1)}function ri(i,a,l={}){o.value.currentMessageId===i&&o.value.isPlaying?o.value.isPaused?ye():be():Ne(i,a,l)}return fi(()=>{y(),typeof e?.removeEventListener=="function"&&e.removeEventListener("voiceschanged",Te)}),{isSupported:Ce,availableVoices:n,isPlaying:E(()=>o.value.isPlaying),isPaused:E(()=>o.value.isPaused),currentMessageId:E(()=>o.value.currentMessageId),progress:E(()=>o.value.progress),engine:E(()=>o.value.engine),isCustomPlaying:b,isCustomPaused:p,currentCustomMessageId:S,play:Ne,pause:be,resume:ye,stop:y,toggle:ri,toggleBrowser:li,enqueue:ni,enqueueProfileSpeech:ii,getDefaultVoice:ze,extractReadableText:P,openaiPlay:Ke,openaiToggle:oi,mimoPlay:Re,mimoToggle:ti,profilePlay:Ee,profileToggle:ai,speakViaBrowser:pe}}function Vi(){return _e||(_e=gi()),_e}var Je,_e,Ti=de((()=>{Le(),pi(),Je=5,_e=null}));function Ai(e){return Xe.find(n=>n.value===e)?.resourceId||""}var c,Ie,Xe,hi=de((()=>{c="seed-tts-2.0",Ie="zh_female_xiaohe_uranus_bigtts",Xe=[{label:"小何 2.0",value:Ie,resourceId:c},{label:"Vivi 2.0",value:"zh_female_vv_uranus_bigtts",resourceId:c},{label:"云舟 2.0",value:"zh_male_m191_uranus_bigtts",resourceId:c},{label:"小天 2.0",value:"zh_male_taocheng_uranus_bigtts",resourceId:c},{label:"刘飞 2.0",value:"zh_male_liufei_uranus_bigtts",resourceId:c},{label:"魅力苏菲 2.0",value:"zh_male_sophie_uranus_bigtts",resourceId:c},{label:"清新女声 2.0",value:"zh_female_qingxinnvsheng_uranus_bigtts",resourceId:c},{label:"知性灿灿 2.0",value:"zh_female_cancan_uranus_bigtts",resourceId:c},{label:"撒娇学妹 2.0",value:"zh_female_sajiaoxuemei_uranus_bigtts",resourceId:c},{label:"甜美小源 2.0",value:"zh_female_tianmeixiaoyuan_uranus_bigtts",resourceId:c},{label:"甜美桃子 2.0",value:"zh_female_tianmeitaozi_uranus_bigtts",resourceId:c},{label:"爽快思思 2.0",value:"zh_female_shuangkuaisisi_uranus_bigtts",resourceId:c},{label:"佩奇猪 2.0",value:"zh_female_peiqi_uranus_bigtts",resourceId:c},{label:"邻家女孩 2.0",value:"zh_female_linjianvhai_uranus_bigtts",resourceId:c},{label:"少年梓辛 2.0",value:"zh_male_shaonianzixin_uranus_bigtts",resourceId:c},{label:"猴哥 2.0",value:"zh_male_sunwukong_uranus_bigtts",resourceId:c},{label:"Tina老师 2.0",value:"zh_female_yingyujiaoxue_uranus_bigtts",resourceId:c},{label:"暖阳女声 2.0",value:"zh_female_kefunvsheng_uranus_bigtts",resourceId:c},{label:"儿童绘本 2.0",value:"zh_female_xiaoxue_uranus_bigtts",resourceId:c},{label:"大壹 2.0",value:"zh_male_dayi_uranus_bigtts",resourceId:c},{label:"黑猫侦探社咪仔 2.0",value:"zh_female_mizai_uranus_bigtts",resourceId:c},{label:"鸡汤女 2.0",value:"zh_female_jitangnv_uranus_bigtts",resourceId:c},{label:"魅力女友 2.0",value:"zh_female_meilinvyou_uranus_bigtts",resourceId:c},{label:"流畅女声 2.0",value:"zh_female_liuchangnv_uranus_bigtts",resourceId:c},{label:"儒雅逸辰 2.0",value:"zh_male_ruyayichen_uranus_bigtts",resourceId:c},{label:"Timen 2.0",value:"timen_male_tim_uranus_bigtts",resourceId:c},{label:"Dacey 2.0",value:"en_female_dacey_uranus_bigtts",resourceId:c},{label:"Stokie 2.0",value:"en_female_stokie_uranus_bigtts",resourceId:c}]}));function bi(){const e="hermes-tts-settings";try{const n=localStorage.getItem(e);if(n){const o=JSON.parse(n);o.provider==="gptsovits"&&(o.provider="custom",o.gptsovitsUrl&&!o.customUrl&&(o.customUrl=o.gptsovitsUrl));const s={...r,...o};localStorage.setItem(Se,JSON.stringify(s)),localStorage.removeItem(e)}}catch{}}function yi(e){return e.edgeUrl&&e.edgeUrl!==""&&(e.edgeUrl=""),e.mimoAuthMode!=="api-key"&&e.mimoAuthMode!=="bearer"&&e.mimoAuthMode!=="both"&&(e.mimoAuthMode=r.mimoAuthMode),e.mimoVoiceCloneFormat!=="mp3"&&e.mimoVoiceCloneFormat!=="wav"&&(e.mimoVoiceCloneFormat=r.mimoVoiceCloneFormat),e}function m(){try{const e=localStorage.getItem(Se);if(e)return yi({...r,...JSON.parse(e)})}catch{}return{...r}}function Ui(){return{provider:K,webspeechVoice:R,openaiApiKey:B,openaiBaseUrl:N,openaiModel:F,openaiVoice:L,customUrl:j,customApiKey:$,edgeUrl:H,edgeVoice:J,edgeRate:X,edgePitchHz:Q,mimoApiKey:G,mimoAuthMode:W,mimoBaseUrl:q,mimoModel:Y,mimoVoice:Z,mimoVoiceDesignDesc:ee,mimoVoiceCloneDataUri:ie,mimoVoiceCloneFileName:ae,mimoVoiceCloneFormat:oe,mimoStylePrompt:te,doubaoApiKey:le,doubaoBaseUrl:ne,doubaoModel:re,doubaoVoice:ue,doubaoStylePrompt:se,setProvider(e){K.value=e},setWebSpeechVoice(e){R.value=e},setOpenaiApiKey(e){B.value=e},setOpenaiBaseUrl(e){N.value=e},setOpenaiModel(e){F.value=e},setOpenaiVoice(e){L.value=e},setCustomUrl(e){j.value=e},setCustomApiKey(e){$.value=e},setEdgeUrl(e){H.value=e},setEdgeVoice(e){J.value=e},setEdgeRate(e){X.value=e},setEdgePitchHz(e){Q.value=e},setMimoApiKey(e){G.value=e},setMimoAuthMode(e){W.value=e},setMimoBaseUrl(e){q.value=e},setMimoModel(e){Y.value=e},setMimoVoice(e){Z.value=e},setMimoVoiceDesignDesc(e){ee.value=e},setMimoVoiceCloneDataUri(e){ie.value=e},setMimoVoiceCloneFileName(e){ae.value=e},setMimoVoiceCloneFormat(e){oe.value=e},setMimoStylePrompt(e){te.value=e},setDoubaoApiKey(e){le.value=e},setDoubaoBaseUrl(e){ne.value=e},setDoubaoModel(e){re.value=e},setDoubaoVoice(e){ue.value=e},setDoubaoStylePrompt(e){se.value=e},reset(){K.value=r.provider,R.value=r.webspeechVoice,B.value=r.openaiApiKey,N.value=r.openaiBaseUrl,F.value=r.openaiModel,L.value=r.openaiVoice,j.value=r.customUrl,$.value=r.customApiKey,H.value=r.edgeUrl,J.value=r.edgeVoice,X.value=r.edgeRate,Q.value=r.edgePitchHz,G.value=r.mimoApiKey,W.value=r.mimoAuthMode,q.value=r.mimoBaseUrl,Y.value=r.mimoModel,Z.value=r.mimoVoice,ee.value=r.mimoVoiceDesignDesc,ie.value=r.mimoVoiceCloneDataUri,ae.value=r.mimoVoiceCloneFileName,oe.value=r.mimoVoiceCloneFormat,te.value=r.mimoStylePrompt,le.value=r.doubaoApiKey,ne.value=r.doubaoBaseUrl,re.value=r.doubaoModel,ue.value=r.doubaoVoice,se.value=r.doubaoStylePrompt}}}var Se,r,K,R,B,N,F,L,j,$,H,J,X,Q,G,W,q,Y,Z,ee,ie,ae,oe,te,le,ne,re,ue,se,Mi=de((()=>{Le(),hi(),Se="hermes-tts-settings-v2",r={provider:"webspeech",webspeechVoice:"",openaiApiKey:"",openaiBaseUrl:"",openaiModel:"tts-1",openaiVoice:"alloy",customUrl:"",customApiKey:"",edgeUrl:"",edgeVoice:"zh-CN-XiaoxiaoNeural",edgeRate:1,edgePitchHz:0,mimoApiKey:"",mimoAuthMode:"bearer",mimoBaseUrl:"https://api.xiaomimimo.com/v1",mimoModel:"mimo-v2.5-tts",mimoVoice:"冰糖",mimoVoiceDesignDesc:"",mimoVoiceCloneDataUri:"",mimoVoiceCloneFileName:"",mimoVoiceCloneFormat:"wav",mimoStylePrompt:"",doubaoApiKey:"",doubaoBaseUrl:"https://openspeech.bytedance.com/api/v3/tts/unidirectional",doubaoModel:c,doubaoVoice:Ie,doubaoStylePrompt:""},bi(),K=u(m().provider),R=u(m().webspeechVoice),B=u(m().openaiApiKey),N=u(m().openaiBaseUrl),F=u(m().openaiModel),L=u(m().openaiVoice),j=u(m().customUrl),$=u(m().customApiKey),H=u(m().edgeUrl),J=u(m().edgeVoice),X=u(m().edgeRate),Q=u(m().edgePitchHz),G=u(m().mimoApiKey),W=u(m().mimoAuthMode),q=u(m().mimoBaseUrl),Y=u(m().mimoModel),Z=u(m().mimoVoice),ee=u(m().mimoVoiceDesignDesc),ie=u(m().mimoVoiceCloneDataUri),ae=u(m().mimoVoiceCloneFileName),oe=u(m().mimoVoiceCloneFormat),te=u(m().mimoStylePrompt),le=u(m().doubaoApiKey),ne=u(m().doubaoBaseUrl),re=u(m().doubaoModel),ue=u(m().doubaoVoice),se=u(m().doubaoStylePrompt),mi([K,R,B,N,F,L,j,$,H,J,X,Q,G,W,q,Y,Z,ee,ie,ae,oe,te,le,ne,re,ue,se],()=>{try{localStorage.setItem(Se,JSON.stringify({provider:K.value,webspeechVoice:R.value,openaiApiKey:B.value,openaiBaseUrl:N.value,openaiModel:F.value,openaiVoice:L.value,customUrl:j.value,customApiKey:$.value,edgeUrl:H.value,edgeVoice:J.value,edgeRate:X.value,edgePitchHz:Q.value,mimoApiKey:G.value,mimoAuthMode:W.value,mimoBaseUrl:q.value,mimoModel:Y.value,mimoVoice:Z.value,mimoVoiceDesignDesc:ee.value,mimoVoiceCloneDataUri:ie.value,mimoVoiceCloneFileName:ae.value,mimoVoiceCloneFormat:oe.value,mimoStylePrompt:te.value,doubaoApiKey:le.value,doubaoBaseUrl:ne.value,doubaoModel:re.value,doubaoVoice:ue.value,doubaoStylePrompt:se.value}))}catch(e){console.warn("[useVoiceSettings] Failed to persist voice settings:",e)}})}));function Ii(e){const n=Math.round((e-1)*100);return n>=0?`+${n}%`:`${n}%`}function Ci(e){return e>=0?`+${e}Hz`:`${e}Hz`}var zi=de((()=>{}));export{Ui as a,Xe as c,Ti as d,Vi as f,Fe as g,wi as h,Mi as i,Ai as l,pi as m,zi as n,c as o,gi as p,Ii as r,Ie as s,Ci as t,hi as u};
|
|
1
|
+
import{Gr as ui,Kr as si,Qr as ci,Vi as fi,Zi as mi,gi as E,si as Le,ua as u,wa as de}from"./index-DN4SafrP.js";function wi(e){return typeof e=="string"&&He.has(e)}async function je(e){try{const n=await e.clone().json(),o=typeof n.error=="string"?n.error:"TTS request failed",s=typeof n.detail=="string"&&n.detail.trim()?n.detail.trim():"";return s?`${o}: ${s}`:`${o}: ${e.status}`}catch{const n=await e.text().catch(()=>"");return n?`TTS request failed: ${e.status} ${n.slice(0,300)}`:`TTS request failed: ${e.status}`}}function $e(e){const n={"Content-Type":"application/json"},o=si();o&&(n.Authorization=`Bearer ${o}`);const s=e?.trim()||ui();return s&&(n["X-Hermes-Profile"]=s),n}async function di(e){const n=await fetch(`${localStorage.getItem("hermes_server_url")||""}/api/hermes/tts`,{method:"POST",headers:$e(),body:JSON.stringify(e)});if(!n.ok)throw new Error(await je(n));return{audio:await n.blob(),engine:n.headers.get("X-TTS-Engine")||"unknown"}}async function Fe(e){const n=await fetch(`${localStorage.getItem("hermes_server_url")||""}/api/hermes/tts/synthesize`,{method:"POST",headers:$e(e.profile),body:JSON.stringify({provider:e.provider,text:e.text,options:e.options||{}}),signal:e.signal});if(!n.ok)throw new Error(await je(n));return{audio:await n.blob(),engine:n.headers.get("X-TTS-Engine")||"unknown",provider:n.headers.get("X-TTS-Provider")||e.provider||"unknown"}}function vi(e){const n=URL.createObjectURL(e),o=new Audio(n);return o.play(),o.onended=()=>URL.revokeObjectURL(n),o}var He,pi=de((()=>{ci(),He=new Set(["edge","openai","custom","mimo","doubao","elevenlabs","gemini","xai","mistral","minimax","deepinfra"])}));function gi(){const e=typeof window<"u"?window.speechSynthesis:void 0,n=u([]),o=u({isPlaying:!1,isPaused:!1,currentMessageId:null,progress:0,engine:"none"});let s=null,g=null,d=0;const _=[],C=[],z=new Set,ve=new Set,O=[],Pe=new Set;let we=0,ce=0,Ve=!1,fe=null;const b=u(!1),p=u(!1),S=u(null);function Te(){try{n.value=typeof e?.getVoices=="function"?e.getVoices():[]}catch{n.value=[]}}typeof e?.addEventListener=="function"&&e.addEventListener("voiceschanged",Te),Te();function P(i){if(!i)return"";let a=i;return a=a.replace(/<thinking[^>]*>[\s\S]*?<\/thinking>/gi,""),a=a.replace(/<thinking[^>]*>[\s\S]*/gi,""),a=a.replace(/```[\s\S]*?```/g,""),a=a.replace(/`[^`]+`/g,""),a=a.replace(/<[^>]+>/g,""),a=a.replace(/[^\p{L}\p{N}\s.。!?;,,。!?;:、""''()【】《》\n一-鿿㐀-䶿]/gu,""),a=a.replace(/\s+/g," ").trim(),a}const Ce=E(()=>!!(typeof window<"u"&&window.speechSynthesis&&typeof window.speechSynthesis.speak=="function"&&typeof window.SpeechSynthesisUtterance=="function"));function ze(){const i=n.value;if(i.length===0)return null;const a=i.find(t=>t.lang.startsWith("zh"));if(a)return a;const l=i.find(t=>t.lang.startsWith("en"));return l||i[0]}function y(i=!0){d+=1,i&&(ce+=1,Ye(),_.length=0,C.length=0,z.clear()),xe(),g&&(g.pause(),g.src="",g=null),x?.abort(),x=null,me(),k(),e&&(e.speaking||e.pending||e.paused)&&typeof e.cancel=="function"&&e.cancel(),s=null,o.value={isPlaying:!1,isPaused:!1,currentMessageId:null,progress:0,engine:"none"},i||w()}async function Qe(i,a,l,t){o.value.isPlaying=!0,o.value.isPaused=!1,o.value.currentMessageId=i,o.value.progress=0,o.value.engine="tts";try{const{audio:f}=await di({text:a,lang:l.lang||"zh-CN"});if(t!==d)return;g=vi(f),g.onended=()=>{t===d&&(o.value.isPlaying=!1,o.value.isPaused=!1,o.value.currentMessageId=null,o.value.progress=a.length,o.value.engine="none",g=null,_.length>0&&setTimeout(A,0),w())},g.onerror=()=>{t===d&&(console.warn("[useSpeech] TTS audio playback error, falling back to browser"),pe(i,a,l,t))}}catch(f){if(t!==d)return;console.warn("[useSpeech] TTS API failed, falling back to browser:",f),pe(i,a,l,t)}}function pe(i,a,l,t){if(t=t||++d,!Ce.value||!e){o.value={isPlaying:!1,isPaused:!1,currentMessageId:null,progress:0,engine:"none"},w();return}s=new window.SpeechSynthesisUtterance(a);const f=s;if(s.rate=1,s.pitch=1,s.volume=1,l.voiceName){const v=n.value.find(U=>U.name===l.voiceName);v&&(s.voice=v)}s.voice||(s.voice=ze()),l.lang?s.lang=l.lang:s.voice&&(s.lang=s.voice.lang),o.value.engine="browser",o.value.isPlaying=!0,o.value.isPaused=!1,o.value.currentMessageId=i,o.value.progress=0,s.onboundary=v=>{t!==d||s!==f||v.name==="word"&&(o.value.progress=v.charIndex)},s.onend=()=>{t!==d||s!==f||(o.value.isPlaying=!1,o.value.isPaused=!1,o.value.currentMessageId=null,o.value.progress=a.length,o.value.engine="none",s=null,_.length>0&&setTimeout(A,0),w())},s.onerror=()=>{t!==d||s!==f||(o.value.isPlaying=!1,o.value.isPaused=!1,o.value.currentMessageId=null,o.value.engine="none",s=null,_.length>0&&setTimeout(A,0),w())},e.speak(s)}let h=null,T=null,x=null;function Oe(i){return i instanceof Error&&i.name==="AbortError"}function k(){b.value=!1,p.value=!1,S.value=null}function Ge(){T&&(URL.revokeObjectURL(T),T=null)}function me(){h&&(h.pause(),h.src="",h=null),Ge()}function We(i){return i.provider?i.provider:i.baseUrl?.startsWith("/api/tts/proxy")?"edge":i.model?"openai":"custom"}function qe(i,a,l,t){i.onended=()=>{if(a!==d){t?.();return}me(),k(),t?.(),_.length>0&&setTimeout(A,0),w()},i.onerror=()=>{if(a!==d){t?.();return}me(),console.warn(l),k(),t?.(),_.length>0&&setTimeout(A,0),w()}}async function Ae(i,a,l,t,f,v,U,V){x?.abort(),xe(),me(),b.value=!0,p.value=!1,S.value=i;const M=new AbortController;x=M;try{const{audio:I}=await Fe({provider:l,profile:U,text:a,options:t,signal:M.signal});if(f!==d){V?.();return}T=URL.createObjectURL(I);const D=new Audio(T);h=D,qe(D,f,v,V),await D.play()}catch(I){if(f!==d){V?.();return}if(me(),k(),V?.(),_.length>0&&setTimeout(A,0),w(),Oe(I))return;throw I}finally{x===M&&(x=null)}}function Ue(){return o.value.isPlaying||o.value.isPaused||b.value||p.value}function xe(){const i=fe;fe=null,i?.()}function Ye(){for(const a of ve)a.abort();ve.clear();const i=new DOMException("Profile speech synthesis cancelled","AbortError");for(;O.length>0;)O.shift()?.resolve({ok:!1,error:i})}function ke(){for(;we<Je&&O.length>0;){const i=O.findIndex(t=>t.generation!==ce||!Pe.has(t.profile));if(i<0)break;const[a]=O.splice(i,1);if(!a)break;if(a.generation!==ce){a.resolve({ok:!1,error:new DOMException("Stale Profile speech synthesis","AbortError")});continue}const l=new AbortController;we+=1,Pe.add(a.profile),ve.add(l),Fe({profile:a.profile,text:a.text,signal:l.signal}).then(({audio:t})=>a.resolve({ok:!0,audio:t})).catch(t=>a.resolve({ok:!1,error:t})).finally(()=>{we-=1,Pe.delete(a.profile),ve.delete(l),ke()})}}function Ze(i,a,l){return new Promise(t=>{O.push({text:i,profile:a,generation:l,resolve:t}),ke()})}function ei(i,a){const l=++d,t=URL.createObjectURL(a),f=new Audio(t);return h=f,T=t,b.value=!0,p.value=!1,S.value=i.messageId,new Promise((v,U)=>{let V=!1;const M=D=>{V||(V=!0,f.onended=null,f.onerror=null,h===f&&(h=null),T===t&&(T=null),fe===I&&(fe=null),URL.revokeObjectURL(t),l===d&&S.value===i.messageId&&k(),D?U(D):v())},I=()=>{f.pause(),f.src="",M()};fe=I,f.onended=()=>M(),f.onerror=()=>M(new Error("Profile TTS audio playback failed")),f.play().catch(M)})}function w(){setTimeout(()=>{De()},0)}async function De(){if(!(Ve||Ue())){Ve=!0;try{for(;C.length>0;){const i=C.shift();if(!i)continue;const a=await i.synthesis;if(i.generation!==ce){z.delete(i.messageId);continue}if(Ue()){C.unshift(i);return}if(!a.ok){z.delete(i.messageId),Oe(a.error)||console.warn("[useSpeech] Profile TTS autoplay failed:",a.error);continue}try{await ei(i,a.audio)}catch(l){console.warn("[useSpeech] Profile TTS autoplay failed:",l)}finally{z.delete(i.messageId)}}}finally{Ve=!1,C.length>0&&w()}}}function ii(i,a,l){const t=l.trim(),f=P(a);if(!t||!f||z.has(i)||S.value===i)return;const v=ce,U={messageId:i,content:a,profile:t,generation:v,synthesis:Ze(f,t,v)};z.add(i),C.push(U),De()}async function Ee(i,a,l){const t=P(a),f=l.trim();!t||!f||await Ae(i,t,void 0,{},++d,"[useSpeech] Profile TTS audio playback error",f)}function ai(i,a,l){S.value===i&&b.value?p.value?ge():he():(y(!1),Me(Ee(i,a,l)))}async function Ke(i,a,l){const t=P(a);if(!t)return;const f=++d,v=We(l),{provider:U,...V}=l;await Ae(i,t,v,V,f,"[useSpeech] Custom TTS audio playback error")}function ge(){if(!h){k();return}h.play().then(()=>{p.value=!1}).catch(i=>{console.warn("[useSpeech] Custom TTS audio resume failed:",i),p.value=!0})}function he(){return!b.value||p.value?!1:h?(h.pause(),p.value=!0,!0):(y(!1),!0)}function Me(i){i.catch(()=>{})}function oi(i,a,l){S.value===i&&b.value?p.value?ge():he():(y(!1),Me(Ke(i,a,l)))}async function Re(i,a,l){const t=P(a);t&&await Ae(i,t,"mimo",l,++d,"[useSpeech] MiMo TTS audio playback error")}function ti(i,a,l){S.value===i&&b.value?p.value?ge():he():(y(!1),Me(Re(i,a,l)))}function Be(i,a,l={}){Qe(i,a,l,++d)}function A(){if(Ue())return;const i=_.shift();if(!i)return;const a=P(i.content);if(!a){setTimeout(A,0);return}Be(i.messageId,a,i.options)}function Ne(i,a,l={}){if(o.value.currentMessageId&&o.value.currentMessageId!==i&&y(),o.value.currentMessageId===i){o.value.isPaused?ye():o.value.isPlaying&&be();return}const t=P(a);t&&(y(),Be(i,t,l))}function li(i,a,l={}){if(o.value.currentMessageId&&o.value.currentMessageId!==i&&y(!1),o.value.currentMessageId===i){o.value.isPaused?ye():o.value.isPlaying&&be();return}const t=P(a);t&&(y(!1),pe(i,t,l))}function ni(i,a,l={}){P(a)&&(_.push({messageId:i,content:a,options:l}),A())}function be(){he()||(o.value.engine==="tts"&&g?(g.pause(),o.value.isPaused=!0):o.value.engine==="browser"&&!o.value.isPaused&&typeof e?.pause=="function"&&(e.pause(),o.value.isPaused=!0))}function ye(){if(b.value&&p.value){ge();return}o.value.isPaused&&(o.value.engine==="tts"&&g?g.play():typeof e?.resume=="function"&&e.resume(),o.value.isPaused=!1)}function ri(i,a,l={}){o.value.currentMessageId===i&&o.value.isPlaying?o.value.isPaused?ye():be():Ne(i,a,l)}return fi(()=>{y(),typeof e?.removeEventListener=="function"&&e.removeEventListener("voiceschanged",Te)}),{isSupported:Ce,availableVoices:n,isPlaying:E(()=>o.value.isPlaying),isPaused:E(()=>o.value.isPaused),currentMessageId:E(()=>o.value.currentMessageId),progress:E(()=>o.value.progress),engine:E(()=>o.value.engine),isCustomPlaying:b,isCustomPaused:p,currentCustomMessageId:S,play:Ne,pause:be,resume:ye,stop:y,toggle:ri,toggleBrowser:li,enqueue:ni,enqueueProfileSpeech:ii,getDefaultVoice:ze,extractReadableText:P,openaiPlay:Ke,openaiToggle:oi,mimoPlay:Re,mimoToggle:ti,profilePlay:Ee,profileToggle:ai,speakViaBrowser:pe}}function Vi(){return _e||(_e=gi()),_e}var Je,_e,Ti=de((()=>{Le(),pi(),Je=5,_e=null}));function Ai(e){return Xe.find(n=>n.value===e)?.resourceId||""}var c,Ie,Xe,hi=de((()=>{c="seed-tts-2.0",Ie="zh_female_xiaohe_uranus_bigtts",Xe=[{label:"小何 2.0",value:Ie,resourceId:c},{label:"Vivi 2.0",value:"zh_female_vv_uranus_bigtts",resourceId:c},{label:"云舟 2.0",value:"zh_male_m191_uranus_bigtts",resourceId:c},{label:"小天 2.0",value:"zh_male_taocheng_uranus_bigtts",resourceId:c},{label:"刘飞 2.0",value:"zh_male_liufei_uranus_bigtts",resourceId:c},{label:"魅力苏菲 2.0",value:"zh_male_sophie_uranus_bigtts",resourceId:c},{label:"清新女声 2.0",value:"zh_female_qingxinnvsheng_uranus_bigtts",resourceId:c},{label:"知性灿灿 2.0",value:"zh_female_cancan_uranus_bigtts",resourceId:c},{label:"撒娇学妹 2.0",value:"zh_female_sajiaoxuemei_uranus_bigtts",resourceId:c},{label:"甜美小源 2.0",value:"zh_female_tianmeixiaoyuan_uranus_bigtts",resourceId:c},{label:"甜美桃子 2.0",value:"zh_female_tianmeitaozi_uranus_bigtts",resourceId:c},{label:"爽快思思 2.0",value:"zh_female_shuangkuaisisi_uranus_bigtts",resourceId:c},{label:"佩奇猪 2.0",value:"zh_female_peiqi_uranus_bigtts",resourceId:c},{label:"邻家女孩 2.0",value:"zh_female_linjianvhai_uranus_bigtts",resourceId:c},{label:"少年梓辛 2.0",value:"zh_male_shaonianzixin_uranus_bigtts",resourceId:c},{label:"猴哥 2.0",value:"zh_male_sunwukong_uranus_bigtts",resourceId:c},{label:"Tina老师 2.0",value:"zh_female_yingyujiaoxue_uranus_bigtts",resourceId:c},{label:"暖阳女声 2.0",value:"zh_female_kefunvsheng_uranus_bigtts",resourceId:c},{label:"儿童绘本 2.0",value:"zh_female_xiaoxue_uranus_bigtts",resourceId:c},{label:"大壹 2.0",value:"zh_male_dayi_uranus_bigtts",resourceId:c},{label:"黑猫侦探社咪仔 2.0",value:"zh_female_mizai_uranus_bigtts",resourceId:c},{label:"鸡汤女 2.0",value:"zh_female_jitangnv_uranus_bigtts",resourceId:c},{label:"魅力女友 2.0",value:"zh_female_meilinvyou_uranus_bigtts",resourceId:c},{label:"流畅女声 2.0",value:"zh_female_liuchangnv_uranus_bigtts",resourceId:c},{label:"儒雅逸辰 2.0",value:"zh_male_ruyayichen_uranus_bigtts",resourceId:c},{label:"Timen 2.0",value:"timen_male_tim_uranus_bigtts",resourceId:c},{label:"Dacey 2.0",value:"en_female_dacey_uranus_bigtts",resourceId:c},{label:"Stokie 2.0",value:"en_female_stokie_uranus_bigtts",resourceId:c}]}));function bi(){const e="hermes-tts-settings";try{const n=localStorage.getItem(e);if(n){const o=JSON.parse(n);o.provider==="gptsovits"&&(o.provider="custom",o.gptsovitsUrl&&!o.customUrl&&(o.customUrl=o.gptsovitsUrl));const s={...r,...o};localStorage.setItem(Se,JSON.stringify(s)),localStorage.removeItem(e)}}catch{}}function yi(e){return e.edgeUrl&&e.edgeUrl!==""&&(e.edgeUrl=""),e.mimoAuthMode!=="api-key"&&e.mimoAuthMode!=="bearer"&&e.mimoAuthMode!=="both"&&(e.mimoAuthMode=r.mimoAuthMode),e.mimoVoiceCloneFormat!=="mp3"&&e.mimoVoiceCloneFormat!=="wav"&&(e.mimoVoiceCloneFormat=r.mimoVoiceCloneFormat),e}function m(){try{const e=localStorage.getItem(Se);if(e)return yi({...r,...JSON.parse(e)})}catch{}return{...r}}function Ui(){return{provider:K,webspeechVoice:R,openaiApiKey:B,openaiBaseUrl:N,openaiModel:F,openaiVoice:L,customUrl:j,customApiKey:$,edgeUrl:H,edgeVoice:J,edgeRate:X,edgePitchHz:Q,mimoApiKey:G,mimoAuthMode:W,mimoBaseUrl:q,mimoModel:Y,mimoVoice:Z,mimoVoiceDesignDesc:ee,mimoVoiceCloneDataUri:ie,mimoVoiceCloneFileName:ae,mimoVoiceCloneFormat:oe,mimoStylePrompt:te,doubaoApiKey:le,doubaoBaseUrl:ne,doubaoModel:re,doubaoVoice:ue,doubaoStylePrompt:se,setProvider(e){K.value=e},setWebSpeechVoice(e){R.value=e},setOpenaiApiKey(e){B.value=e},setOpenaiBaseUrl(e){N.value=e},setOpenaiModel(e){F.value=e},setOpenaiVoice(e){L.value=e},setCustomUrl(e){j.value=e},setCustomApiKey(e){$.value=e},setEdgeUrl(e){H.value=e},setEdgeVoice(e){J.value=e},setEdgeRate(e){X.value=e},setEdgePitchHz(e){Q.value=e},setMimoApiKey(e){G.value=e},setMimoAuthMode(e){W.value=e},setMimoBaseUrl(e){q.value=e},setMimoModel(e){Y.value=e},setMimoVoice(e){Z.value=e},setMimoVoiceDesignDesc(e){ee.value=e},setMimoVoiceCloneDataUri(e){ie.value=e},setMimoVoiceCloneFileName(e){ae.value=e},setMimoVoiceCloneFormat(e){oe.value=e},setMimoStylePrompt(e){te.value=e},setDoubaoApiKey(e){le.value=e},setDoubaoBaseUrl(e){ne.value=e},setDoubaoModel(e){re.value=e},setDoubaoVoice(e){ue.value=e},setDoubaoStylePrompt(e){se.value=e},reset(){K.value=r.provider,R.value=r.webspeechVoice,B.value=r.openaiApiKey,N.value=r.openaiBaseUrl,F.value=r.openaiModel,L.value=r.openaiVoice,j.value=r.customUrl,$.value=r.customApiKey,H.value=r.edgeUrl,J.value=r.edgeVoice,X.value=r.edgeRate,Q.value=r.edgePitchHz,G.value=r.mimoApiKey,W.value=r.mimoAuthMode,q.value=r.mimoBaseUrl,Y.value=r.mimoModel,Z.value=r.mimoVoice,ee.value=r.mimoVoiceDesignDesc,ie.value=r.mimoVoiceCloneDataUri,ae.value=r.mimoVoiceCloneFileName,oe.value=r.mimoVoiceCloneFormat,te.value=r.mimoStylePrompt,le.value=r.doubaoApiKey,ne.value=r.doubaoBaseUrl,re.value=r.doubaoModel,ue.value=r.doubaoVoice,se.value=r.doubaoStylePrompt}}}var Se,r,K,R,B,N,F,L,j,$,H,J,X,Q,G,W,q,Y,Z,ee,ie,ae,oe,te,le,ne,re,ue,se,Mi=de((()=>{Le(),hi(),Se="hermes-tts-settings-v2",r={provider:"webspeech",webspeechVoice:"",openaiApiKey:"",openaiBaseUrl:"",openaiModel:"tts-1",openaiVoice:"alloy",customUrl:"",customApiKey:"",edgeUrl:"",edgeVoice:"zh-CN-XiaoxiaoNeural",edgeRate:1,edgePitchHz:0,mimoApiKey:"",mimoAuthMode:"bearer",mimoBaseUrl:"https://api.xiaomimimo.com/v1",mimoModel:"mimo-v2.5-tts",mimoVoice:"冰糖",mimoVoiceDesignDesc:"",mimoVoiceCloneDataUri:"",mimoVoiceCloneFileName:"",mimoVoiceCloneFormat:"wav",mimoStylePrompt:"",doubaoApiKey:"",doubaoBaseUrl:"https://openspeech.bytedance.com/api/v3/tts/unidirectional",doubaoModel:c,doubaoVoice:Ie,doubaoStylePrompt:""},bi(),K=u(m().provider),R=u(m().webspeechVoice),B=u(m().openaiApiKey),N=u(m().openaiBaseUrl),F=u(m().openaiModel),L=u(m().openaiVoice),j=u(m().customUrl),$=u(m().customApiKey),H=u(m().edgeUrl),J=u(m().edgeVoice),X=u(m().edgeRate),Q=u(m().edgePitchHz),G=u(m().mimoApiKey),W=u(m().mimoAuthMode),q=u(m().mimoBaseUrl),Y=u(m().mimoModel),Z=u(m().mimoVoice),ee=u(m().mimoVoiceDesignDesc),ie=u(m().mimoVoiceCloneDataUri),ae=u(m().mimoVoiceCloneFileName),oe=u(m().mimoVoiceCloneFormat),te=u(m().mimoStylePrompt),le=u(m().doubaoApiKey),ne=u(m().doubaoBaseUrl),re=u(m().doubaoModel),ue=u(m().doubaoVoice),se=u(m().doubaoStylePrompt),mi([K,R,B,N,F,L,j,$,H,J,X,Q,G,W,q,Y,Z,ee,ie,ae,oe,te,le,ne,re,ue,se],()=>{try{localStorage.setItem(Se,JSON.stringify({provider:K.value,webspeechVoice:R.value,openaiApiKey:B.value,openaiBaseUrl:N.value,openaiModel:F.value,openaiVoice:L.value,customUrl:j.value,customApiKey:$.value,edgeUrl:H.value,edgeVoice:J.value,edgeRate:X.value,edgePitchHz:Q.value,mimoApiKey:G.value,mimoAuthMode:W.value,mimoBaseUrl:q.value,mimoModel:Y.value,mimoVoice:Z.value,mimoVoiceDesignDesc:ee.value,mimoVoiceCloneDataUri:ie.value,mimoVoiceCloneFileName:ae.value,mimoVoiceCloneFormat:oe.value,mimoStylePrompt:te.value,doubaoApiKey:le.value,doubaoBaseUrl:ne.value,doubaoModel:re.value,doubaoVoice:ue.value,doubaoStylePrompt:se.value}))}catch(e){console.warn("[useVoiceSettings] Failed to persist voice settings:",e)}})}));function Ii(e){const n=Math.round((e-1)*100);return n>=0?`+${n}%`:`${n}%`}function Ci(e){return e>=0?`+${e}Hz`:`${e}Hz`}var zi=de((()=>{}));export{Ui as a,Xe as c,Ti as d,Vi as f,Fe as g,wi as h,Mi as i,Ai as l,pi as m,zi as n,c as o,gi as p,Ii as r,Ie as s,Ci as t,hi as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wa as t}from"./index-
|
|
1
|
+
import{wa as t}from"./index-DN4SafrP.js";var e,i,r=t((()=>{e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["(",")"],["[","]"],["<!--","-->"],["<",">"]],autoClosingPairs:[{open:"{# ",close:" #}"},{open:"{% ",close:" %}"},{open:"{{ ",close:" }}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},i={defaultToken:"",tokenPostfix:"",ignoreCase:!0,keywords:["apply","autoescape","block","deprecated","do","embed","extends","flush","for","from","if","import","include","macro","sandbox","set","use","verbatim","with","endapply","endautoescape","endblock","endembed","endfor","endif","endmacro","endsandbox","endset","endwith","true","false"],tokenizer:{root:[[/\s+/],[/{#/,"comment.twig","@commentState"],[/{%[-~]?/,"delimiter.twig","@blockState"],[/{{[-~]?/,"delimiter.twig","@variableState"],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter.html","tag.html","","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/[^<{]+/]],commentState:[[/#}/,"comment.twig","@pop"],[/./,"comment.twig"]],blockState:[[/[-~]?%}/,"delimiter.twig","@pop"],[/\s+/],[/(verbatim)(\s*)([-~]?%})/,["keyword.twig","",{token:"delimiter.twig",next:"@rawDataState"}]],{include:"expression"}],rawDataState:[[/({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/,["delimiter.twig","","keyword.twig","",{token:"delimiter.twig",next:"@popall"}]],[/./,"string.twig"]],variableState:[[/[-~]?}}/,"delimiter.twig","@pop"],{include:"expression"}],stringState:[[/"/,"string.twig","@pop"],[/#{\s*/,"string.twig","@interpolationState"],[/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/,"string.twig"]],interpolationState:[[/}/,"string.twig","@pop"],{include:"expression"}],expression:[[/\s+/],[/\+|-|\/{1,2}|%|\*{1,2}/,"operators.twig"],[/(and|or|not|b-and|b-xor|b-or)(\s+)/,["operators.twig",""]],[/==|!=|<|>|>=|<=/,"operators.twig"],[/(starts with|ends with|matches)(\s+)/,["operators.twig",""]],[/(in)(\s+)/,["operators.twig",""]],[/(is)(\s+)/,["operators.twig",""]],[/\||~|:|\.{1,2}|\?{1,2}/,"operators.twig"],[/[^\W\d][\w]*/,{cases:{"@keywords":"keyword.twig","@default":"variable.twig"}}],[/\d+(\.\d+)?/,"number.twig"],[/\(|\)|\[|\]|{|}|,/,"delimiter.twig"],[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/,"string.twig"],[/"/,"string.twig","@stringState"],[/=>/,"operators.twig"],[/=/,"operators.twig"]],doctype:[[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name.html","@scriptAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter.html","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name.html","@styleAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter.html","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}}));r();export{e as conf,i as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wa as t}from"./index-
|
|
1
|
+
import{wa as t}from"./index-DN4SafrP.js";import{$ as i,A as n,B as o,C as s,Ct as a,D as r,Dt as c,E as l,Et as d,F as p,G as g,H as m,I as _,J as u,K as b,L as x,M as f,N as k,O as y,Ot as w,P as A,Q as h,R as C,S as v,St as T,T as $,Tt as S,U as E,V as I,W as P,X as F,Y as H,Z as O,_ as R,_t as L,at as M,b as N,bt as Q,ct as j,d as e,dt as z,et as D,f as Z,ft as q,g as B,gt as G,h as U,ht as W,it as K,j as X,k as J,kt as V,lt as Y,m as ee,mt as te,nt as ie,ot as ne,p as oe,pt as se,q as ae,rt as re,st as ce,tt as le,u as de,ut as pe,v as ge,vt as me,w as _e,wt as ue,x as be,xt as xe,y as fe,yt as ke,z as ye}from"./editor.api2-ChO5nUQb.js";var we,Ae,he=t((()=>{V(),w(),c(),d(),S(),ue(),a(),xe(),me(),L(),te(),se(),q(),z(),pe(),Y(),j(),ce(),ne(),M(),K(),re(),i(),T(),G(),h(),W(),O(),F(),H(),u(),ae(),b(),g(),ie(),P(),E(),m(),I(),o(),ye(),C(),x(),_(),p(),A(),k(),le(),f(),D(),X(),n(),J(),y(),r(),l(),$(),_e(),s(),v(),be(),N(),Q(),ke(),fe(),ge(),R(),B(),U(),ee(),oe(),Z(),de(),we={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},Ae={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}}));he();export{we as conf,Ae as language,he as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wa as g}from"./index-
|
|
1
|
+
import{wa as g}from"./index-DN4SafrP.js";var n,t,o,i,r,a,s,c,l,k,m=g((()=>{n=e=>`\\b${e}\\b`,t=e=>`(?!${e})`,o=n("[_a-zA-Z][_a-zA-Z0-9]*"),i=n("[_a-zA-Z-0-9]+"),r=["import","model","scalar","namespace","op","interface","union","using","is","extends","enum","alias","return","void","if","else","projection","dec","extern","fn"],a=["true","false","null","unknown","never"],s="[ \\t\\r\\n]",c="[0-9]+",l={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],indentationRules:{decreaseIndentPattern:new RegExp("^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$"),increaseIndentPattern:new RegExp("^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"),unIndentedLinePattern:new RegExp("^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$")}},k={defaultToken:"",tokenPostfix:".tsp",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=:;<>]+/,keywords:r,namedLiterals:a,escapes:'\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|"|\\${)',tokenizer:{root:[{include:"@expression"},{include:"@whitespace"}],stringVerbatim:[{regex:'(|"|"")[^"]',action:{token:"string"}},{regex:`"""${t('"')}`,action:{token:"string",next:"@pop"}}],stringLiteral:[{regex:"\\${",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:'[^\\\\"$]+',action:{token:"string"}},{regex:"@escapes",action:{token:"string.escape"}},{regex:"\\\\.",action:{token:"string.escape.invalid"}},{regex:'"',action:{token:"string",next:"@pop"}}],bracketCounting:[{regex:"{",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"}",action:{token:"delimiter.bracket",next:"@pop"}},{include:"@expression"}],comment:[{regex:"[^\\*]+",action:{token:"comment"}},{regex:"\\*\\/",action:{token:"comment",next:"@pop"}},{regex:"[\\/*]",action:{token:"comment"}}],whitespace:[{regex:s},{regex:"\\/\\*",action:{token:"comment",next:"@comment"}},{regex:"\\/\\/.*$",action:{token:"comment"}}],expression:[{regex:'"""',action:{token:"string",next:"@stringVerbatim"}},{regex:`"${t('""')}`,action:{token:"string",next:"@stringLiteral"}},{regex:c,action:{token:"number"}},{regex:o,action:{cases:{"@keywords":{token:"keyword"},"@namedLiterals":{token:"keyword"},"@default":{token:"identifier"}}}},{regex:`@${o}`,action:{token:"tag"}},{regex:`#${i}`,action:{token:"directive"}}]}}}));m();export{l as conf,k as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Qr as me,Zi as De,ei as C,fa as Be,gi as ke,si as pe,ua as m,wa as X}from"./index-DnjQJzX4.js";function ie(e,t,n=ue){const o=Ne(Fe(e,t,n)),g=new ArrayBuffer(44+o.length*2),u=new DataView(g);j(u,0,"RIFF"),u.setUint32(4,36+o.length*2,!0),j(u,8,"WAVE"),j(u,12,"fmt "),u.setUint32(16,16,!0),u.setUint16(20,1,!0),u.setUint16(22,1,!0),u.setUint32(24,n,!0),u.setUint32(28,n*2,!0),u.setUint16(32,2,!0),u.setUint16(34,16,!0),j(u,36,"data"),u.setUint32(40,o.length*2,!0);for(let l=0;l<o.length;l+=1){const h=Math.max(-1,Math.min(1,o[l]||0));u.setInt16(44+l*2,h<0?h*32768:h*32767,!0)}return new Blob([g],{type:"audio/wav"})}function nt(e={}){const t=m("idle"),n=m(null),o=m(0),g=m(!1),u=Be(null),l=ke(()=>t.value==="recording");let h=null,T=null,U=null,D=null,f=ue,N=[],d=0,b=0,R=!1,x=0,K=0,re=0,J=0,B=0,k=null;function le(s){const r=s instanceof Error?s:new Error(e.messages?.recordingFailed||String(s));return n.value=r,t.value="error",r}function ae(s){for(const r of s?.getTracks()||[])r.stop()}function Ue(){k?.(),U&&(U.onaudioprocess=null);try{U?.disconnect()}catch{}try{T?.disconnect()}catch{}U=null,T=null}async function oe(){Ue();const s=h;h=null,ae(D),D=null,u.value=null,o.value=0,s&&s.state!=="closed"&&await s.close().catch(()=>{})}function ce(){N=[],d=0,b=0,R=!1,x=0,K=0}function se(){ce(),re=0,J=0,g.value=!1}function $(s){const r=new Float32Array(s);let a=0;for(;a<s&&N.length>0;){const c=N[0],v=c.length-b,p=Math.min(v,s-a);r.set(c.subarray(b,b+p),a),a+=p,b+=p,d-=p,b>=c.length&&(N.shift(),b=0)}return r}function Ee(){const s=f*Math.max(250,e.minSegmentDurationMs??fe)/1e3,r=Math.floor(f*Math.max(1e3,e.maxSegmentDurationMs??ge)/1e3),a=f*Math.max(200,e.speechEndSilenceMs??de)/1e3,c=f*Math.max(0,e.preRollMs??ve)/1e3,v=f*Y/1e3;if(e.continuous&&e.onChunk){for(;d>=r;)e.onChunk(ie($(r),f,e.targetSampleRate));return}if(!R){if(!e.onChunk)return;d>c&&$(d-Math.floor(c));return}if(!e.onChunk||!(d>=s&&x>=v&&K>=a)&&d<r)return;if(x<v){ce();return}const p=$(d);e.onChunk(ie(p,f,e.targetSampleRate)),R=!1,x=0,K=0}function Te(s){const r=s.inputBuffer;if(!r.length||!r.numberOfChannels)return;const a=new Float32Array(r.length);let c=0;for(let E=0;E<r.numberOfChannels;E+=1){const Ie=r.getChannelData(E);for(let W=0;W<r.length;W+=1)a[W]+=Ie[W]/r.numberOfChannels}for(let E=0;E<a.length;E+=1)c+=a[E]*a[E];const v=Math.sqrt(c/a.length),p=Math.min(1,v*5);o.value+=(p-o.value)*.45,re+=a.length;const z=e.onChunk?f*ye/1e3:0;re>z&&p>=(e.voiceActivityThreshold??he)?(J+=a.length,x+=a.length,J>=f*Y/1e3&&(g.value=!0,R=!0),R&&(K=0)):(J=0,R?K+=a.length:x=0),N.push(a),d+=a.length,Ee(),k?.()}function be(){const s=h,r=U;return!s||s.state!=="running"||!r?Promise.resolve():new Promise(a=>{let c=!1;const v=r.bufferSize||4096,p=setTimeout(z,Math.ceil(v/f*1e3)+Me);function z(){c||(c=!0,clearTimeout(p),k===z&&(k=null),a())}k?.(),k=z})}async function Re(){if(t.value==="requesting"||t.value==="recording")return;const s=window.AudioContext;if(!navigator.mediaDevices?.getUserMedia||!s)throw le(new Error(e.messages?.unsupported||Pe));const r=++B;t.value="requesting",n.value=null,se();try{const a=await navigator.mediaDevices.getUserMedia(e.constraints??{audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});if(r!==B){ae(a);return}const c=new s,v=c.createMediaStreamSource(a),p=c.createScriptProcessor(4096,1,1);if(p.onaudioprocess=Te,v.connect(p),p.connect(c.destination),h=c,T=v,U=p,D=a,u.value=a,f=c.sampleRate,await c.resume(),r!==B){p.onaudioprocess=null,v.disconnect(),p.disconnect(),ae(a),await c.close().catch(()=>{});return}t.value="recording"}catch(a){if(r!==B)return;throw await oe(),le(a)}}async function xe(){B+=1,await be();const s=d/f*1e3,r=e.continuous&&e.onChunk&&d>0||s>=Se&&R&&x>=f*Y/1e3?ie($(d),f,e.targetSampleRate):null;return se(),await oe(),t.value="idle",n.value=null,r}function Oe(){B+=1,se(),oe(),t.value="idle",n.value=null}return{status:t,error:n,level:o,hasSpeech:g,stream:u,isRecording:l,start:Re,stop:xe,cancel:Oe}}function Fe(e,t,n){if(!e.length||t===n)return e;const o=Math.max(1,Math.round(e.length*n/t)),g=new Float32Array(o),u=t/n;for(let l=0;l<o;l+=1){const h=l*u,T=Math.floor(h),U=Math.min(e.length-1,T+1),D=h-T;g[l]=e[T]*(1-D)+e[U]*D}return g}function Ne(e){if(!e.length)return e;let t=0,n=0;for(const l of e)t=Math.max(t,Math.abs(l)),n+=l*l;const o=Math.sqrt(n/e.length);if(t<=0||o<=0)return e;const g=Math.min(8,.92/t,.1/o);if(g<=1.05)return e;const u=new Float32Array(e.length);for(let l=0;l<e.length;l+=1)u[l]=Math.max(-1,Math.min(1,e[l]*g));return u}function j(e,t,n){for(let o=0;o<n.length;o+=1)e.setUint8(t+o,n.charCodeAt(o))}var fe,ge,de,ve,ue,he,Se,Y,ye,Me,Pe,rt=X((()=>{pe(),fe=700,ge=8e3,de=700,ve=250,ue=16e3,he=.035,Se=350,Y=350,ye=500,Me=50,Pe="Streaming microphone capture is not supported in this browser."}));async function at(){return C("/api/hermes/stt/local-stream",{method:"POST"})}async function ot(e,t){return C(`/api/hermes/stt/local-stream/${encodeURIComponent(e)}/chunk`,{method:"POST",headers:{"Content-Type":t.type||"audio/wav"},body:t})}async function st(e){return C(`/api/hermes/stt/local-stream/${encodeURIComponent(e)}/finish`,{method:"POST"})}async function it(e){return C(`/api/hermes/stt/local-stream/${encodeURIComponent(e)}`,{method:"DELETE"})}async function ut(e){if(!e.provider)throw new Error("STT provider is required");const t=new FormData;return t.append("audio",e.audio,Ke(e.audio.type)),t.append("provider",e.provider),typeof e.language=="string"&&e.language&&t.append("language",e.language),typeof e.prompt=="string"&&e.prompt&&t.append("prompt",e.prompt),C("/api/hermes/stt/transcribe",{method:"POST",body:t})}function Ke(e){const t=e.split(";")[0]?.trim().toLowerCase();return t==="audio/wav"||t==="audio/x-wav"||t==="audio/wave"?"speech.wav":t==="audio/mpeg"||t==="audio/mp3"?"speech.mp3":t==="audio/mp4"||t==="audio/x-m4a"?"speech.m4a":t==="audio/ogg"?"speech.ogg":"speech.webm"}var lt=X((()=>{me()}));function ze(e){return e==="browser"||e==="local"||e==="openai"||e==="custom"||e==="doubao"||e==="groq"||e==="mistral"||e==="xai"||e==="elevenlabs"||e==="deepinfra"?e:null}function Ge(e){if(e&&typeof e=="object"){const t=e,n=ze(t.activeProvider);if(Array.isArray(t.providers))return{providers:t.providers,activeProvider:n};if(Array.isArray(t.settings))return{providers:t.settings,activeProvider:n}}return{providers:[],activeProvider:null}}async function Ve(){return Ge(await C("/api/hermes/stt/settings"))}async function ct(e,t){const n=await C(`/api/hermes/stt/settings/${e}`,{method:"PUT",body:JSON.stringify(t)});return typeof n=="object"&&n!==null&&"setting"in n?n.setting:n}async function mt(e){return(await C("/api/hermes/stt/settings/active",{method:"PUT",body:JSON.stringify({provider:e})})).activeProvider}async function pt(e){return C(`/api/hermes/stt/settings/${e}`,{method:"DELETE"})}var He=X((()=>{me()}));function Je(){if(typeof window>"u")return!1;const e=window;return typeof e.SpeechRecognition<"u"||typeof e.webkitSpeechRecognition<"u"}function Ae(){return Je()?"browser":"openai"}function $e(e){return{provider:e.provider==="browser"||e.provider==="local"||e.provider==="openai"||e.provider==="custom"||e.provider==="doubao"||e.provider==="groq"||e.provider==="mistral"||e.provider==="xai"||e.provider==="elevenlabs"||e.provider==="deepinfra"?e.provider:i.provider,openaiModel:typeof e.openaiModel=="string"&&e.openaiModel.trim()?e.openaiModel:i.openaiModel,openaiLanguage:typeof e.openaiLanguage=="string"?e.openaiLanguage:i.openaiLanguage,openaiPrompt:typeof e.openaiPrompt=="string"?e.openaiPrompt:i.openaiPrompt,customBaseUrl:typeof e.customBaseUrl=="string"?e.customBaseUrl:i.customBaseUrl,customModel:typeof e.customModel=="string"&&e.customModel.trim()?e.customModel:i.customModel,customLanguage:typeof e.customLanguage=="string"?e.customLanguage:i.customLanguage,customPrompt:typeof e.customPrompt=="string"?e.customPrompt:i.customPrompt}}function We(){try{const e=localStorage.getItem(G);if(e){const t=$e(JSON.parse(e)),n=JSON.stringify(t);return e!==n&&localStorage.setItem(G,n),t}}catch{}return{...i}}function je(){return{provider:I.value,openaiModel:y.value,openaiLanguage:M.value,openaiPrompt:P.value,customBaseUrl:A.value,customModel:_.value,customLanguage:w.value,customPrompt:L.value}}function Ye(){try{localStorage.setItem(G,JSON.stringify(je()))}catch(e){console.warn("[useSttSettings] Failed to persist STT settings:",e)}}function _e(){y.value=i.openaiModel,M.value=i.openaiLanguage,P.value=i.openaiPrompt,V.value="",Z.value="",ee.value=!1,A.value=i.customBaseUrl,F.value=[],_.value=i.customModel,w.value=i.customLanguage,L.value=i.customPrompt,H.value="",te.value="",ne.value=!1}function qe(){I.value=Ae(),y.value=i.openaiModel,M.value=i.openaiLanguage,P.value=i.openaiPrompt,A.value=i.customBaseUrl,F.value=[],_.value=i.customModel,w.value=i.customLanguage,L.value=i.customPrompt}function we(){Q+=1,q=!1,O=null,qe(),_e();try{localStorage.removeItem(G)}catch{}}function Le(e){return Array.isArray(e)?Array.from(new Set(e.filter(t=>typeof t=="string"&&!!t.trim()).map(t=>t.trim()))):[]}function Qe(e){e.provider==="openai"&&(y.value=typeof e.settings.model=="string"&&e.settings.model.trim()?e.settings.model:y.value,M.value=typeof e.settings.language=="string"?e.settings.language:M.value,P.value=typeof e.settings.prompt=="string"?e.settings.prompt:P.value,Z.value=e.secrets.apiKey||"",ee.value=!!e.secrets.apiKey,V.value=""),e.provider==="custom"&&(A.value=typeof e.settings.baseUrl=="string"?e.settings.baseUrl:A.value,F.value=Le(e.settings.baseUrlPresets),_.value=typeof e.settings.model=="string"&&e.settings.model.trim()?e.settings.model:_.value,w.value=typeof e.settings.language=="string"?e.settings.language:w.value,L.value=typeof e.settings.prompt=="string"?e.settings.prompt:L.value,te.value=e.secrets.apiKey||"",ne.value=!!e.secrets.apiKey,H.value="")}function Ce(e,t=!1){t&&_e();const n=Array.isArray(e)?e:e.providers;for(const o of n)Qe(o);!Array.isArray(e)&&e.activeProvider&&(I.value=e.activeProvider)}async function Xe(e=!1){if(q&&!e)return;if(O&&!e)return O;const t=Q,n=Ve().then(o=>{t===Q&&(Ce(o,!0),q=!0)}).finally(()=>{O===n&&(O=null)});return O=n,n}function ft(){return{provider:I,openaiModel:y,openaiLanguage:M,openaiPrompt:P,openaiApiKey:V,openaiApiKeyPreview:Z,openaiHasApiKey:ee,customBaseUrl:A,customBaseUrlPresets:F,customModel:_,customLanguage:w,customPrompt:L,customApiKey:H,customApiKeyPreview:te,customHasApiKey:ne,setProvider(e){I.value=e},setOpenaiModel(e){y.value=e},setOpenaiLanguage(e){M.value=e},setOpenaiPrompt(e){P.value=e},setOpenaiApiKey(e){V.value=e},setCustomBaseUrl(e){A.value=e},setCustomBaseUrlPresets(e){F.value=Le(e)},setCustomModel(e){_.value=e},setCustomLanguage(e){w.value=e},setCustomPrompt(e){L.value=e},setCustomApiKey(e){H.value=e},applyServerSttSettings:Ce,loadServerSttSettings:Xe,reset(){we()}}}var G,i,S,I,y,M,P,V,Z,ee,A,F,_,w,L,H,te,ne,q,O,Q,gt=X((()=>{pe(),He(),G="hermes-stt-settings-v1",i={provider:Ae(),openaiModel:"gpt-4o-transcribe",openaiLanguage:"",openaiPrompt:"",customBaseUrl:"",customModel:"gpt-4o-transcribe",customLanguage:"",customPrompt:""},S=We(),I=m(S.provider),y=m(S.openaiModel),M=m(S.openaiLanguage),P=m(S.openaiPrompt),V=m(""),Z=m(""),ee=m(!1),A=m(S.customBaseUrl),F=m([]),_=m(S.customModel),w=m(S.customLanguage),L=m(S.customPrompt),H=m(""),te=m(""),ne=m(!1),q=!1,O=null,Q=0,typeof window<"u"&&window.addEventListener("hermes-auth-cleared",we),De([I,y,M,P,A,_,w,L],Ye)}));export{He as a,it as c,ot as d,at as f,nt as h,Ve as i,st as l,rt as m,ft as n,mt as o,ut as p,pt as r,ct as s,gt as t,lt as u};
|
|
1
|
+
import{Qr as me,Zi as De,ei as C,fa as Be,gi as ke,si as pe,ua as m,wa as X}from"./index-DN4SafrP.js";function ie(e,t,n=ue){const o=Ne(Fe(e,t,n)),g=new ArrayBuffer(44+o.length*2),u=new DataView(g);j(u,0,"RIFF"),u.setUint32(4,36+o.length*2,!0),j(u,8,"WAVE"),j(u,12,"fmt "),u.setUint32(16,16,!0),u.setUint16(20,1,!0),u.setUint16(22,1,!0),u.setUint32(24,n,!0),u.setUint32(28,n*2,!0),u.setUint16(32,2,!0),u.setUint16(34,16,!0),j(u,36,"data"),u.setUint32(40,o.length*2,!0);for(let l=0;l<o.length;l+=1){const h=Math.max(-1,Math.min(1,o[l]||0));u.setInt16(44+l*2,h<0?h*32768:h*32767,!0)}return new Blob([g],{type:"audio/wav"})}function nt(e={}){const t=m("idle"),n=m(null),o=m(0),g=m(!1),u=Be(null),l=ke(()=>t.value==="recording");let h=null,T=null,U=null,D=null,f=ue,N=[],d=0,b=0,R=!1,x=0,K=0,re=0,J=0,B=0,k=null;function le(s){const r=s instanceof Error?s:new Error(e.messages?.recordingFailed||String(s));return n.value=r,t.value="error",r}function ae(s){for(const r of s?.getTracks()||[])r.stop()}function Ue(){k?.(),U&&(U.onaudioprocess=null);try{U?.disconnect()}catch{}try{T?.disconnect()}catch{}U=null,T=null}async function oe(){Ue();const s=h;h=null,ae(D),D=null,u.value=null,o.value=0,s&&s.state!=="closed"&&await s.close().catch(()=>{})}function ce(){N=[],d=0,b=0,R=!1,x=0,K=0}function se(){ce(),re=0,J=0,g.value=!1}function $(s){const r=new Float32Array(s);let a=0;for(;a<s&&N.length>0;){const c=N[0],v=c.length-b,p=Math.min(v,s-a);r.set(c.subarray(b,b+p),a),a+=p,b+=p,d-=p,b>=c.length&&(N.shift(),b=0)}return r}function Ee(){const s=f*Math.max(250,e.minSegmentDurationMs??fe)/1e3,r=Math.floor(f*Math.max(1e3,e.maxSegmentDurationMs??ge)/1e3),a=f*Math.max(200,e.speechEndSilenceMs??de)/1e3,c=f*Math.max(0,e.preRollMs??ve)/1e3,v=f*Y/1e3;if(e.continuous&&e.onChunk){for(;d>=r;)e.onChunk(ie($(r),f,e.targetSampleRate));return}if(!R){if(!e.onChunk)return;d>c&&$(d-Math.floor(c));return}if(!e.onChunk||!(d>=s&&x>=v&&K>=a)&&d<r)return;if(x<v){ce();return}const p=$(d);e.onChunk(ie(p,f,e.targetSampleRate)),R=!1,x=0,K=0}function Te(s){const r=s.inputBuffer;if(!r.length||!r.numberOfChannels)return;const a=new Float32Array(r.length);let c=0;for(let E=0;E<r.numberOfChannels;E+=1){const Ie=r.getChannelData(E);for(let W=0;W<r.length;W+=1)a[W]+=Ie[W]/r.numberOfChannels}for(let E=0;E<a.length;E+=1)c+=a[E]*a[E];const v=Math.sqrt(c/a.length),p=Math.min(1,v*5);o.value+=(p-o.value)*.45,re+=a.length;const z=e.onChunk?f*ye/1e3:0;re>z&&p>=(e.voiceActivityThreshold??he)?(J+=a.length,x+=a.length,J>=f*Y/1e3&&(g.value=!0,R=!0),R&&(K=0)):(J=0,R?K+=a.length:x=0),N.push(a),d+=a.length,Ee(),k?.()}function be(){const s=h,r=U;return!s||s.state!=="running"||!r?Promise.resolve():new Promise(a=>{let c=!1;const v=r.bufferSize||4096,p=setTimeout(z,Math.ceil(v/f*1e3)+Me);function z(){c||(c=!0,clearTimeout(p),k===z&&(k=null),a())}k?.(),k=z})}async function Re(){if(t.value==="requesting"||t.value==="recording")return;const s=window.AudioContext;if(!navigator.mediaDevices?.getUserMedia||!s)throw le(new Error(e.messages?.unsupported||Pe));const r=++B;t.value="requesting",n.value=null,se();try{const a=await navigator.mediaDevices.getUserMedia(e.constraints??{audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});if(r!==B){ae(a);return}const c=new s,v=c.createMediaStreamSource(a),p=c.createScriptProcessor(4096,1,1);if(p.onaudioprocess=Te,v.connect(p),p.connect(c.destination),h=c,T=v,U=p,D=a,u.value=a,f=c.sampleRate,await c.resume(),r!==B){p.onaudioprocess=null,v.disconnect(),p.disconnect(),ae(a),await c.close().catch(()=>{});return}t.value="recording"}catch(a){if(r!==B)return;throw await oe(),le(a)}}async function xe(){B+=1,await be();const s=d/f*1e3,r=e.continuous&&e.onChunk&&d>0||s>=Se&&R&&x>=f*Y/1e3?ie($(d),f,e.targetSampleRate):null;return se(),await oe(),t.value="idle",n.value=null,r}function Oe(){B+=1,se(),oe(),t.value="idle",n.value=null}return{status:t,error:n,level:o,hasSpeech:g,stream:u,isRecording:l,start:Re,stop:xe,cancel:Oe}}function Fe(e,t,n){if(!e.length||t===n)return e;const o=Math.max(1,Math.round(e.length*n/t)),g=new Float32Array(o),u=t/n;for(let l=0;l<o;l+=1){const h=l*u,T=Math.floor(h),U=Math.min(e.length-1,T+1),D=h-T;g[l]=e[T]*(1-D)+e[U]*D}return g}function Ne(e){if(!e.length)return e;let t=0,n=0;for(const l of e)t=Math.max(t,Math.abs(l)),n+=l*l;const o=Math.sqrt(n/e.length);if(t<=0||o<=0)return e;const g=Math.min(8,.92/t,.1/o);if(g<=1.05)return e;const u=new Float32Array(e.length);for(let l=0;l<e.length;l+=1)u[l]=Math.max(-1,Math.min(1,e[l]*g));return u}function j(e,t,n){for(let o=0;o<n.length;o+=1)e.setUint8(t+o,n.charCodeAt(o))}var fe,ge,de,ve,ue,he,Se,Y,ye,Me,Pe,rt=X((()=>{pe(),fe=700,ge=8e3,de=700,ve=250,ue=16e3,he=.035,Se=350,Y=350,ye=500,Me=50,Pe="Streaming microphone capture is not supported in this browser."}));async function at(){return C("/api/hermes/stt/local-stream",{method:"POST"})}async function ot(e,t){return C(`/api/hermes/stt/local-stream/${encodeURIComponent(e)}/chunk`,{method:"POST",headers:{"Content-Type":t.type||"audio/wav"},body:t})}async function st(e){return C(`/api/hermes/stt/local-stream/${encodeURIComponent(e)}/finish`,{method:"POST"})}async function it(e){return C(`/api/hermes/stt/local-stream/${encodeURIComponent(e)}`,{method:"DELETE"})}async function ut(e){if(!e.provider)throw new Error("STT provider is required");const t=new FormData;return t.append("audio",e.audio,Ke(e.audio.type)),t.append("provider",e.provider),typeof e.language=="string"&&e.language&&t.append("language",e.language),typeof e.prompt=="string"&&e.prompt&&t.append("prompt",e.prompt),C("/api/hermes/stt/transcribe",{method:"POST",body:t})}function Ke(e){const t=e.split(";")[0]?.trim().toLowerCase();return t==="audio/wav"||t==="audio/x-wav"||t==="audio/wave"?"speech.wav":t==="audio/mpeg"||t==="audio/mp3"?"speech.mp3":t==="audio/mp4"||t==="audio/x-m4a"?"speech.m4a":t==="audio/ogg"?"speech.ogg":"speech.webm"}var lt=X((()=>{me()}));function ze(e){return e==="browser"||e==="local"||e==="openai"||e==="custom"||e==="doubao"||e==="groq"||e==="mistral"||e==="xai"||e==="elevenlabs"||e==="deepinfra"?e:null}function Ge(e){if(e&&typeof e=="object"){const t=e,n=ze(t.activeProvider);if(Array.isArray(t.providers))return{providers:t.providers,activeProvider:n};if(Array.isArray(t.settings))return{providers:t.settings,activeProvider:n}}return{providers:[],activeProvider:null}}async function Ve(){return Ge(await C("/api/hermes/stt/settings"))}async function ct(e,t){const n=await C(`/api/hermes/stt/settings/${e}`,{method:"PUT",body:JSON.stringify(t)});return typeof n=="object"&&n!==null&&"setting"in n?n.setting:n}async function mt(e){return(await C("/api/hermes/stt/settings/active",{method:"PUT",body:JSON.stringify({provider:e})})).activeProvider}async function pt(e){return C(`/api/hermes/stt/settings/${e}`,{method:"DELETE"})}var He=X((()=>{me()}));function Je(){if(typeof window>"u")return!1;const e=window;return typeof e.SpeechRecognition<"u"||typeof e.webkitSpeechRecognition<"u"}function Ae(){return Je()?"browser":"openai"}function $e(e){return{provider:e.provider==="browser"||e.provider==="local"||e.provider==="openai"||e.provider==="custom"||e.provider==="doubao"||e.provider==="groq"||e.provider==="mistral"||e.provider==="xai"||e.provider==="elevenlabs"||e.provider==="deepinfra"?e.provider:i.provider,openaiModel:typeof e.openaiModel=="string"&&e.openaiModel.trim()?e.openaiModel:i.openaiModel,openaiLanguage:typeof e.openaiLanguage=="string"?e.openaiLanguage:i.openaiLanguage,openaiPrompt:typeof e.openaiPrompt=="string"?e.openaiPrompt:i.openaiPrompt,customBaseUrl:typeof e.customBaseUrl=="string"?e.customBaseUrl:i.customBaseUrl,customModel:typeof e.customModel=="string"&&e.customModel.trim()?e.customModel:i.customModel,customLanguage:typeof e.customLanguage=="string"?e.customLanguage:i.customLanguage,customPrompt:typeof e.customPrompt=="string"?e.customPrompt:i.customPrompt}}function We(){try{const e=localStorage.getItem(G);if(e){const t=$e(JSON.parse(e)),n=JSON.stringify(t);return e!==n&&localStorage.setItem(G,n),t}}catch{}return{...i}}function je(){return{provider:I.value,openaiModel:y.value,openaiLanguage:M.value,openaiPrompt:P.value,customBaseUrl:A.value,customModel:_.value,customLanguage:w.value,customPrompt:L.value}}function Ye(){try{localStorage.setItem(G,JSON.stringify(je()))}catch(e){console.warn("[useSttSettings] Failed to persist STT settings:",e)}}function _e(){y.value=i.openaiModel,M.value=i.openaiLanguage,P.value=i.openaiPrompt,V.value="",Z.value="",ee.value=!1,A.value=i.customBaseUrl,F.value=[],_.value=i.customModel,w.value=i.customLanguage,L.value=i.customPrompt,H.value="",te.value="",ne.value=!1}function qe(){I.value=Ae(),y.value=i.openaiModel,M.value=i.openaiLanguage,P.value=i.openaiPrompt,A.value=i.customBaseUrl,F.value=[],_.value=i.customModel,w.value=i.customLanguage,L.value=i.customPrompt}function we(){Q+=1,q=!1,O=null,qe(),_e();try{localStorage.removeItem(G)}catch{}}function Le(e){return Array.isArray(e)?Array.from(new Set(e.filter(t=>typeof t=="string"&&!!t.trim()).map(t=>t.trim()))):[]}function Qe(e){e.provider==="openai"&&(y.value=typeof e.settings.model=="string"&&e.settings.model.trim()?e.settings.model:y.value,M.value=typeof e.settings.language=="string"?e.settings.language:M.value,P.value=typeof e.settings.prompt=="string"?e.settings.prompt:P.value,Z.value=e.secrets.apiKey||"",ee.value=!!e.secrets.apiKey,V.value=""),e.provider==="custom"&&(A.value=typeof e.settings.baseUrl=="string"?e.settings.baseUrl:A.value,F.value=Le(e.settings.baseUrlPresets),_.value=typeof e.settings.model=="string"&&e.settings.model.trim()?e.settings.model:_.value,w.value=typeof e.settings.language=="string"?e.settings.language:w.value,L.value=typeof e.settings.prompt=="string"?e.settings.prompt:L.value,te.value=e.secrets.apiKey||"",ne.value=!!e.secrets.apiKey,H.value="")}function Ce(e,t=!1){t&&_e();const n=Array.isArray(e)?e:e.providers;for(const o of n)Qe(o);!Array.isArray(e)&&e.activeProvider&&(I.value=e.activeProvider)}async function Xe(e=!1){if(q&&!e)return;if(O&&!e)return O;const t=Q,n=Ve().then(o=>{t===Q&&(Ce(o,!0),q=!0)}).finally(()=>{O===n&&(O=null)});return O=n,n}function ft(){return{provider:I,openaiModel:y,openaiLanguage:M,openaiPrompt:P,openaiApiKey:V,openaiApiKeyPreview:Z,openaiHasApiKey:ee,customBaseUrl:A,customBaseUrlPresets:F,customModel:_,customLanguage:w,customPrompt:L,customApiKey:H,customApiKeyPreview:te,customHasApiKey:ne,setProvider(e){I.value=e},setOpenaiModel(e){y.value=e},setOpenaiLanguage(e){M.value=e},setOpenaiPrompt(e){P.value=e},setOpenaiApiKey(e){V.value=e},setCustomBaseUrl(e){A.value=e},setCustomBaseUrlPresets(e){F.value=Le(e)},setCustomModel(e){_.value=e},setCustomLanguage(e){w.value=e},setCustomPrompt(e){L.value=e},setCustomApiKey(e){H.value=e},applyServerSttSettings:Ce,loadServerSttSettings:Xe,reset(){we()}}}var G,i,S,I,y,M,P,V,Z,ee,A,F,_,w,L,H,te,ne,q,O,Q,gt=X((()=>{pe(),He(),G="hermes-stt-settings-v1",i={provider:Ae(),openaiModel:"gpt-4o-transcribe",openaiLanguage:"",openaiPrompt:"",customBaseUrl:"",customModel:"gpt-4o-transcribe",customLanguage:"",customPrompt:""},S=We(),I=m(S.provider),y=m(S.openaiModel),M=m(S.openaiLanguage),P=m(S.openaiPrompt),V=m(""),Z=m(""),ee=m(!1),A=m(S.customBaseUrl),F=m([]),_=m(S.customModel),w=m(S.customLanguage),L=m(S.customPrompt),H=m(""),te=m(""),ne=m(!1),q=!1,O=null,Q=0,typeof window<"u"&&window.addEventListener("hermes-auth-cleared",we),De([I,y,M,P,A,_,w,L],Ye)}));export{He as a,it as c,ot as d,at as f,nt as h,Ve as i,st as l,rt as m,ft as n,mt as o,ut as p,pt as r,ct as s,gt as t,lt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wa as e}from"./index-
|
|
1
|
+
import{wa as e}from"./index-DN4SafrP.js";var n,t,o=e((()=>{n={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*#Region\\b"),end:new RegExp("^\\s*#End Region\\b")}}},t={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=><!~?;\.,:&|+\-*\/\^%]+/,integersuffix:/U?[DI%L&S@]?/,floatsuffix:/[R#F!]?/,tokenizer:{root:[{include:"@whitespace"},[/next(?!\w)/,{token:"keyword.tag-for"}],[/loop(?!\w)/,{token:"keyword.tag-do"}],[/end\s+(?!for|do)(addhandler|class|enum|event|function|get|if|interface|module|namespace|operator|property|raiseevent|removehandler|select|set|structure|sub|synclock|try|while|with|using)/,{token:"keyword.tag-$1"}],[/[a-zA-Z_]\w*/,{cases:{"@tagwords":{token:"keyword.tag-$0"},"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/^\s*#\w+/,"keyword"],[/\d*\d+e([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+(e[\-+]?\d+)?(@floatsuffix)/,"number.float"],[/&H[0-9a-f]+(@integersuffix)/,"number.hex"],[/&0[0-7]+(@integersuffix)/,"number.octal"],[/\d+(@integersuffix)/,"number"],[/#.*#/,"number"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/["\u201c\u201d]/,{token:"string.quote",next:"@string"}]],whitespace:[[/[ \t\r\n]+/,""],[/(\'|REM(?!\w)).*$/,"comment"]],string:[[/[^"\u201c\u201d]+/,"string"],[/["\u201c\u201d]{2}/,"string.escape"],[/["\u201c\u201d]C?/,{token:"string.quote",next:"@pop"}]]}}}));o();export{n as conf,t as language};
|
package/dist/client/assets/js/{vennDiagram-CIIHVFJN-hL8ax7wF.js → vennDiagram-CIIHVFJN-DtEu04QR.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{wa as Wt}from"./index-DnjQJzX4.js";import{Bt as S,Vt as le,jt as ht,t as ce}from"./src-BihFroE7.js";import{U as ue,W as fe,a as he,at as de,b as Ht,c as ge,ct as ye,f as xe,it as St,j as pe,nt as me,q as be,ut as ve,v as ke,w as Ie,y as Me}from"./chunk-CSCIHK7Q-5LH118bT.js";import{n as _e,t as Se}from"./chunk-WU5MYG2G-BZvSpwm4.js";import{d as we,i as Te}from"./chunk-5ZQYHXKU-yj9xqmex.js";import{n as Ee,t as ze}from"./rough.esm-Dyx_2DON.js";function ut(t,n){const s=Ce(t),e=s.filter(c=>Ae(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Xt(e);for(let l=0;l<e.length;++l){const u=e[l];u.angle=Math.atan2(u.x-c.x,u.y-c.y)}e.sort((l,u)=>u.angle-l.angle);let f=e[e.length-1];for(let l=0;l<e.length;++l){const u=e[l];o+=(f.x+u.x)*(u.y-f.y);const y={x:(u.x+f.x)/2,y:(u.y+f.y)/2};let h=null;for(let b=0;b<u.parentIndex.length;++b)if(f.parentIndex.includes(u.parentIndex[b])){const d=t[u.parentIndex[b]],_=Math.atan2(u.x-d.x,u.y-d.y),T=Math.atan2(f.x-d.x,f.y-d.y);let m=T-_;m<0&&(m+=2*Math.PI);const x=T-m/2;let v=U(y,{x:d.x+d.radius*Math.sin(x),y:d.y+d.radius*Math.cos(x)});v>d.radius*2&&(v=d.radius*2),(h==null||h.width>v)&&(h={circle:d,width:v,p1:u,p2:f,large:v>d.radius,sweep:!0})}h!=null&&(a.push(h),i+=xt(h.circle.radius,h.width),f=u)}}else{let c=t[0];for(let l=1;l<t.length;++l)t[l].radius<c.radius&&(c=t[l]);let f=!1;for(let l=0;l<t.length;++l)if(U(t[l],c)>Math.abs(c.radius-t[l].radius)){f=!0;break}f?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-Mt,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function Ae(t,n){return n.every(s=>U(t,s)<s.radius+Mt)}function Ce(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Yt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function xt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function U(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function It(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return xt(t,e)+xt(n,i)}function Yt(t,n){const s=U(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,l=-(n.y-t.y)*(a/s),u=-(n.x-t.x)*(a/s);return[{x:c+l,y:f-u},{x:c-l,y:f+u}]}function Xt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function De(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let f=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let l=0;l<i;++l){f/=2;const u=n+f,y=t(u);if(y*a>=0&&(n=u),Math.abs(f)<o||y===0)return u}return n+f}function pt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function wt(t,n){return pt(t).map(()=>pt(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function mt(t){return Math.sqrt(tt(t,t))}function bt(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Y(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function Zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,l=s.chi!==void 0?s.chi:2,u=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,d=new Array(b+1);d[0]=n,d[0].fx=t(n),d[0].id=0;for(let g=0;g<b;++g){const p=n.slice();p[g]=p[g]?p[g]*i:o,d[g+1]=p,d[g+1].fx=t(p),d[g+1].id=g+1}function _(g){for(let p=0;p<g.length;p++)d[b][p]=g[p];d[b].fx=g.fx}const T=(g,p)=>g.fx-p.fx,m=n.slice(),x=n.slice(),v=n.slice(),k=n.slice();for(let g=0;g<e;++g){if(d.sort(T),s.history){const r=d.map(w=>{const I=w.slice();return I.fx=w.fx,I.id=w.id,I});r.sort((w,I)=>w.id-I.id),s.history.push({x:d[0].slice(),fx:d[0].fx,simplex:r})}h=0;for(let r=0;r<b;++r)h=Math.max(h,Math.abs(d[0][r]-d[1][r]));if(Math.abs(d[0].fx-d[b].fx)<a&&h<c)break;for(let r=0;r<b;++r){m[r]=0;for(let w=0;w<b;++w)m[r]+=d[w][r];m[r]/=b}const p=d[b];if(Y(x,1+f,m,-f,p),x.fx=t(x),x.fx<d[0].fx)Y(k,1+l,m,-l,p),k.fx=t(k),k.fx<x.fx?_(k):_(x);else if(x.fx>=d[b-1].fx){let r=!1;if(x.fx>p.fx?(Y(v,1+u,m,-u,p),v.fx=t(v),v.fx<p.fx?_(v):r=!0):(Y(v,1-u*f,m,u*f,p),v.fx=t(v),v.fx<x.fx?_(v):r=!0),r){if(y>=1)break;for(let w=1;w<d.length;++w)Y(d[w],1-y,d[0],y,d[w]),d[w].fx=t(d[w])}}else _(x)}return d.sort(T),{fx:d[0].fx,x:d[0]}}function Re(t,n,s,e,i,o,a){const c=s.fx,f=tt(s.fxprime,n);let l=c,u=c,y=f,h=0;i=i||1,o=o||1e-6,a=a||.1;function b(d,_,T){for(let m=0;m<16;++m)if(i=(d+_)/2,Y(e.x,1,s.x,i,n),l=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),l>c+o*i*f||l>=T)_=i;else{if(Math.abs(y)<=-a*f)return i;y*(_-d)>=0&&(_=d),d=i,T=l}return 0}for(let d=0;d<10;++d){if(Y(e.x,1,s.x,i,n),l=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),l>c+o*i*f||d&&l>=u)return b(h,i,u);if(Math.abs(y)<=-a*f)return i;if(y>=0)return b(i,h,l);u=l,h=i,i*=2}return i}function Ne(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,f=1,l;s=s||{},l=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),bt(a,e.fxprime,-1);for(let u=0;u<l;++u){if(f=Re(t,a,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)bt(a,e.fxprime,-1);else{Y(o,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),h=Math.max(0,tt(o,i.fxprime)/y);Y(a,h,a,-1,i.fxprime),c=e,e=i,i=c}if(mt(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function Jt(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||Pe,e=n.lossFunction||et,i=Oe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const l of a)c.push(o[l].x),c.push(o[l].y);const f=Zt(l=>{const u={};for(let y=0;y<a.length;++y){const h=a[y];u[h]={x:l[2*y],y:l[2*y+1],radius:o[h].radius}}return e(u,i)},c,n).x;for(let l=0;l<a.length;++l){const u=a[l];o[u].x=f[2*l],o[u].y=f[2*l+1]}return o}function vt(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+_t?Math.abs(t-n):De(e=>It(t,n,e)-s,0,t+n)}function Oe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let l=0;l<f.sets.length;l++){const u=String(f.sets[l]);c.set(u,f.size+(c.get(u)||0));for(let y=l+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${u};${h}`,d=`${h};${u}`;c.set(b,f.size+(c.get(b)||0)),c.set(d,f.size+(c.get(d)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],l=c.sets[1];a.add(i(c.sets)),a.add(i([l,f]))}o.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<o.length;++c){const f=o[c];for(let l=c+1;l<o.length;++l){const u=o[l];a.has(i([f,u]))||e.push({sets:[f,u],size:0})}}return e}function Fe(t,n,s){const e=wt(n.length,n.length),i=wt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],f=vt(Math.sqrt(n[a].size/Math.PI),Math.sqrt(n[c].size/Math.PI),o.size);e[a][c]=e[c][a]=f;let l=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?l=1:o.size<=1e-10&&(l=-1),i[a][c]=i[c][a]=l}),{distances:e,constraints:i}}function je(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let f=o+1;f<s.length;++f){const l=t[2*f],u=t[2*f+1],y=s[o][f],h=e[o][f],b=(l-a)*(l-a)+(u-c)*(u-c),d=Math.sqrt(b),_=b-y*y;h>0&&d<=y||h<0&&d>=y||(i+=2*_*_,n[2*o]+=4*_*(a-l),n[2*o+1]+=4*_*(c-u),n[2*f]+=4*_*(l-a),n[2*f+1]+=4*_*(u-c))}}return i}function Pe(t,n={}){let s=Ve(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=Le(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function Le(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:a}=Fe(t,e,i);const c=mt(o.map(mt))/o.length;o=o.map(h=>h.map(b=>b/c));const f=(h,b)=>je(h,b,o,a);let l=null;for(let h=0;h<s;++h){const b=Ne(f,pt(o.length*2).map(Math.random),n);(!l||b.fx<l.fx)&&(l=b)}const u=l.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:u[2*h]*c,y:u[2*h+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)bt(h.x,c);return y}function Ve(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],d=y.sets[1];y.size+_t>=Math.min(e[b].size,e[d].size)&&(h=0),i[b].push({set:d,size:y.size,weight:h}),i[d].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function a(y,h){return h.size-y.size}o.sort(a);const c={};function f(y){return y.set in c}function l(y,h){e[h].x=y.x,e[h].y=y.y,c[h]=!0}l({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),d=e[h];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const _=[];for(var u=0;u<b.length;++u){const x=e[b[u].set],v=vt(d.radius,x.radius,b[u].size);_.push({x:x.x+v,y:x.y}),_.push({x:x.x-v,y:x.y}),_.push({y:x.y+v,x:x.x}),_.push({y:x.y-v,x:x.x});for(let k=u+1;k<b.length;++k){const g=e[b[k].set],p=vt(d.radius,g.radius,b[k].size),r=Yt({x:x.x,y:x.y,radius:v},{x:g.x,y:g.y,radius:p});_.push(...r)}}let T=1e50,m=_[0];for(const x of _){e[h].x=x.x,e[h].y=x.y;const v=s(e,t);v<T&&(T=v,m=x)}l(m,h)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=It(a.radius,c.radius,U(a,c))}else i=ut(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Qt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=It(c.radius,f.radius,U(c,f))}else i=ut(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function Be(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&U(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const f=c.x,l=c.y;c.x=o*f-a*l,c.y=a*f+o*l}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function Ue(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i);a.parent=n(o)}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;U(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function kt(t){const n=s=>({max:t.reduce((e,i)=>Math.max(e,i[s]+i.radius),Number.NEGATIVE_INFINITY),min:t.reduce((e,i)=>Math.min(e,i[s]-i.radius),Number.POSITIVE_INFINITY)});return{xRange:n("x"),yRange:n("y")}}function $t(t,n,s){n==null&&(n=Math.PI/2);let e=ne(t).map(l=>Object.assign({},l));const i=Ue(e);for(const l of i){Be(l,n,s);const u=kt(l);l.size=(u.xRange.max-u.xRange.min)*(u.yRange.max-u.yRange.min),l.bounds=u}i.sort((l,u)=>u.size-l.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(l,u,y){if(!l)return;const h=l.bounds;let b,d;if(u)b=o.xRange.max-h.xRange.min+a;else{b=o.xRange.max-h.xRange.max;const _=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;_<0&&(b+=_)}if(y)d=o.yRange.max-h.yRange.min+a;else{d=o.yRange.max-h.yRange.max;const _=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;_<0&&(d+=_)}for(const _ of l)_.x+=b,_.y+=d,e.push(_)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,o=kt(e);return ee(e)}function te(t,n,s,e,i){const o=ne(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=kt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,l;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,l=s/b}else f=n/(a.max-a.min),l=s/(c.max-c.min);const u=Math.min(l,f),y=(n-(a.max-a.min)*u)/2,h=(s-(c.max-c.min)*u)/2;return ee(o.map(b=>({radius:u*b.radius,x:e+y+(b.x-a.min)*u,y:e+h+(b.y-c.min)*u,setid:b.setid})))}function ee(t){const n={};for(const s of t)n[s.setid]=s;return n}function ne(t){return Object.keys(t).map(n=>Object.assign(t[n],{setid:n}))}function qe(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,f=null,l=!0,u=!0,y=null,h=null,b=!1,d=null,_=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},m=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],x=0,v=function(r){if(r in T)return T[r];var w=T[r]=m[x];return x+=1,x>=m.length&&(x=0),w},k=Jt,g=et;function p(r){let w=r.datum();const I=new Set;w.forEach(M=>{M.size==0&&M.sets.length==1&&I.add(M.sets[0])}),w=w.filter(M=>!M.sets.some(O=>I.has(O)));let z={},F={};if(w.length>0){let M=k(w,{lossFunction:g,distinct:b});c&&(M=$t(M,a,h)),z=te(M,s,e,i,f),F=ie(z,w,_)}const L={};w.forEach(M=>{M.label&&(L[M.sets]=M.label)});function D(M){if(M.sets in L)return L[M.sets];if(M.sets.length==1)return""+M.sets[0]}r.selectAll("svg").data([z]).enter().append("svg");const A=r.select("svg");n?A.attr("viewBox",`0 0 ${s} ${e}`):A.attr("width",s).attr("height",e);const j={};let E=!1;A.selectAll(".venn-area path").each(function(M){const O=this.getAttribute("d");M.sets.length==1&&O&&!b&&(E=!0,j[M.sets[0]]=We(O))});function R(M){return O=>Tt(M.sets.map(Q=>{let P=j[Q],X=z[Q];return P||(P={x:s/2,y:e/2,radius:1}),X||(X={x:s/2,y:e/2,radius:1}),{x:P.x*(1-O)+X.x*O,y:P.y*(1-O)+X.y*O,radius:P.radius*(1-O)+X.radius*O}}),d)}const N=A.selectAll(".venn-area").data(w,M=>M.sets),V=N.enter().append("g").attr("class",M=>`venn-area venn-${M.sets.length==1?"circle":"intersection"}${M.colour||M.color?" venn-coloured":""}`).attr("data-venn-sets",M=>M.sets.join("_")),H=V.append("path"),K=V.append("text").attr("class","label").text(M=>D(M)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);u&&(H.style("fill-opacity","0").filter(M=>M.sets.length==1).style("fill",M=>M.colour?M.colour:M.color?M.color:v(M.sets)).style("fill-opacity",".25"),K.style("fill",M=>M.colour||M.color?"#FFF":t.textFill?t.textFill:M.sets.length==1?v(M.sets):"#444"));function J(M){return typeof M.transition=="function"?M.transition("venn").duration(o):M}let C=r;E&&typeof C.transition=="function"?(C=J(r),C.selectAll("path").attrTween("d",R)):C.selectAll("path").attr("d",M=>Tt(M.sets.map(O=>z[O])),d);const q=C.selectAll("text").filter(M=>M.sets in F).text(M=>D(M)).attr("x",M=>Math.floor(F[M.sets].x)).attr("y",M=>Math.floor(F[M.sets].y));l&&(E?"on"in q?q.on("end",dt(z,D)):q.each("end",dt(z,D)):q.each(dt(z,D)));const G=J(N.exit()).remove();typeof N.transition=="function"&&G.selectAll("path").attrTween("d",R);const B=G.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(K.style("font-size","0px"),q.style("font-size",y),B.style("font-size","0px")),{circles:z,textCentres:F,nodes:N,enter:V,update:C,exit:G}}return p.wrap=function(r){return arguments.length?(l=r,p):l},p.useViewBox=function(){return n=!0,p},p.width=function(r){return arguments.length?(s=r,p):s},p.height=function(r){return arguments.length?(e=r,p):e},p.padding=function(r){return arguments.length?(i=r,p):i},p.distinct=function(r){return arguments.length?(b=r,p):b},p.colours=function(r){return arguments.length?(v=r,p):v},p.colors=function(r){return arguments.length?(v=r,p):v},p.fontSize=function(r){return arguments.length?(y=r,p):y},p.round=function(r){return arguments.length?(d=r,p):d},p.duration=function(r){return arguments.length?(o=r,p):o},p.layoutFunction=function(r){return arguments.length?(k=r,p):k},p.normalize=function(r){return arguments.length?(c=r,p):c},p.scaleToFit=function(r){return arguments.length?(f=r,p):f},p.styled=function(r){return arguments.length?(u=r,p):u},p.orientation=function(r){return arguments.length?(a=r,p):a},p.orientationOrder=function(r){return arguments.length?(h=r,p):h},p.lossFunction=function(r){return arguments.length?(g=r==="default"?et:r==="logRatio"?Qt:r,p):g},p}function dt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),c=(o.length+a.length)/3;let f=a.pop(),l=[f],u=0;const y=1.1;e.textContent=null;const h=[];function b(x){const v=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return v.textContent=x,h.push(v),e.append(v),v}let d=b(f);for(;f=a.pop(),!!f;){l.push(f);const x=l.join(" ");d.textContent=x,x.length>c&&d.getComputedTextLength()>i&&(l.pop(),d.textContent=l.join(" "),l=[f],d=b(f),u++)}const _=.35-u*y/2,T=e.getAttribute("x"),m=e.getAttribute("y");h.forEach((x,v)=>{x.setAttribute("x",T),x.setAttribute("y",m),x.setAttribute("dy",`${_+v*y}em`)})}}function gt(t,n,s){let e=n[0].radius-U(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-U(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=U(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function se(t,n,s){const e=[];for(const u of t)e.push({x:u.x,y:u.y}),e.push({x:u.x+u.radius/2,y:u.y}),e.push({x:u.x-u.radius/2,y:u.y}),e.push({x:u.x,y:u.y+u.radius/2}),e.push({x:u.x,y:u.y-u.radius/2});let i=e[0],o=gt(e[0],t,n);for(let u=1;u<e.length;++u){const y=gt(e[u],t,n);y>=o&&(i=e[u],o=y)}const a=Zt(u=>-1*gt({x:u[0],y:u[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let f=!0;for(const u of t)if(U(c,u)>u.radius){f=!1;break}for(const u of n)if(U(c,u)<u.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const l={};return ut(t,l),l.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:l.arcs.length==1?{x:l.arcs[0].circle.x,y:l.arcs[0].circle.y}:n.length?se(t,[]):Xt(l.arcs.map(u=>u.p1))}function Ge(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],f=t[c],l=U(o,f);l+f.radius<=o.radius+1e-10?n[c].push(i):l+o.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function ie(t,n,s){const e={},i=Ge(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},f={};for(let h=0;h<a.length;++h){c[a[h]]=!0;const b=i[a[h]];for(let d=0;d<b.length;++d)f[b[d]]=!0}const l=[],u=[];for(let h in t)h in c?l.push(t[h]):h in f||u.push(t[h]);const y=se(l,u,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ke(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{wa as Wt}from"./index-DN4SafrP.js";import{Bt as S,Vt as le,jt as ht,t as ce}from"./src-DD_TpJde.js";import{U as ue,W as fe,a as he,at as de,b as Ht,c as ge,ct as ye,f as xe,it as St,j as pe,nt as me,q as be,ut as ve,v as ke,w as Ie,y as Me}from"./chunk-CSCIHK7Q-CLgoBoCF.js";import{n as _e,t as Se}from"./chunk-WU5MYG2G-CNW1rcpL.js";import{d as we,i as Te}from"./chunk-5ZQYHXKU-BU3pQVVl.js";import{n as Ee,t as ze}from"./rough.esm-CV1rL6PC.js";function ut(t,n){const s=Ce(t),e=s.filter(c=>Ae(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Xt(e);for(let l=0;l<e.length;++l){const u=e[l];u.angle=Math.atan2(u.x-c.x,u.y-c.y)}e.sort((l,u)=>u.angle-l.angle);let f=e[e.length-1];for(let l=0;l<e.length;++l){const u=e[l];o+=(f.x+u.x)*(u.y-f.y);const y={x:(u.x+f.x)/2,y:(u.y+f.y)/2};let h=null;for(let b=0;b<u.parentIndex.length;++b)if(f.parentIndex.includes(u.parentIndex[b])){const d=t[u.parentIndex[b]],_=Math.atan2(u.x-d.x,u.y-d.y),T=Math.atan2(f.x-d.x,f.y-d.y);let m=T-_;m<0&&(m+=2*Math.PI);const x=T-m/2;let v=U(y,{x:d.x+d.radius*Math.sin(x),y:d.y+d.radius*Math.cos(x)});v>d.radius*2&&(v=d.radius*2),(h==null||h.width>v)&&(h={circle:d,width:v,p1:u,p2:f,large:v>d.radius,sweep:!0})}h!=null&&(a.push(h),i+=xt(h.circle.radius,h.width),f=u)}}else{let c=t[0];for(let l=1;l<t.length;++l)t[l].radius<c.radius&&(c=t[l]);let f=!1;for(let l=0;l<t.length;++l)if(U(t[l],c)>Math.abs(c.radius-t[l].radius)){f=!0;break}f?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-Mt,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function Ae(t,n){return n.every(s=>U(t,s)<s.radius+Mt)}function Ce(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Yt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function xt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function U(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function It(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return xt(t,e)+xt(n,i)}function Yt(t,n){const s=U(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,l=-(n.y-t.y)*(a/s),u=-(n.x-t.x)*(a/s);return[{x:c+l,y:f-u},{x:c-l,y:f+u}]}function Xt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function De(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let f=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let l=0;l<i;++l){f/=2;const u=n+f,y=t(u);if(y*a>=0&&(n=u),Math.abs(f)<o||y===0)return u}return n+f}function pt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function wt(t,n){return pt(t).map(()=>pt(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function mt(t){return Math.sqrt(tt(t,t))}function bt(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Y(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function Zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,l=s.chi!==void 0?s.chi:2,u=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,d=new Array(b+1);d[0]=n,d[0].fx=t(n),d[0].id=0;for(let g=0;g<b;++g){const p=n.slice();p[g]=p[g]?p[g]*i:o,d[g+1]=p,d[g+1].fx=t(p),d[g+1].id=g+1}function _(g){for(let p=0;p<g.length;p++)d[b][p]=g[p];d[b].fx=g.fx}const T=(g,p)=>g.fx-p.fx,m=n.slice(),x=n.slice(),v=n.slice(),k=n.slice();for(let g=0;g<e;++g){if(d.sort(T),s.history){const r=d.map(w=>{const I=w.slice();return I.fx=w.fx,I.id=w.id,I});r.sort((w,I)=>w.id-I.id),s.history.push({x:d[0].slice(),fx:d[0].fx,simplex:r})}h=0;for(let r=0;r<b;++r)h=Math.max(h,Math.abs(d[0][r]-d[1][r]));if(Math.abs(d[0].fx-d[b].fx)<a&&h<c)break;for(let r=0;r<b;++r){m[r]=0;for(let w=0;w<b;++w)m[r]+=d[w][r];m[r]/=b}const p=d[b];if(Y(x,1+f,m,-f,p),x.fx=t(x),x.fx<d[0].fx)Y(k,1+l,m,-l,p),k.fx=t(k),k.fx<x.fx?_(k):_(x);else if(x.fx>=d[b-1].fx){let r=!1;if(x.fx>p.fx?(Y(v,1+u,m,-u,p),v.fx=t(v),v.fx<p.fx?_(v):r=!0):(Y(v,1-u*f,m,u*f,p),v.fx=t(v),v.fx<x.fx?_(v):r=!0),r){if(y>=1)break;for(let w=1;w<d.length;++w)Y(d[w],1-y,d[0],y,d[w]),d[w].fx=t(d[w])}}else _(x)}return d.sort(T),{fx:d[0].fx,x:d[0]}}function Re(t,n,s,e,i,o,a){const c=s.fx,f=tt(s.fxprime,n);let l=c,u=c,y=f,h=0;i=i||1,o=o||1e-6,a=a||.1;function b(d,_,T){for(let m=0;m<16;++m)if(i=(d+_)/2,Y(e.x,1,s.x,i,n),l=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),l>c+o*i*f||l>=T)_=i;else{if(Math.abs(y)<=-a*f)return i;y*(_-d)>=0&&(_=d),d=i,T=l}return 0}for(let d=0;d<10;++d){if(Y(e.x,1,s.x,i,n),l=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),l>c+o*i*f||d&&l>=u)return b(h,i,u);if(Math.abs(y)<=-a*f)return i;if(y>=0)return b(i,h,l);u=l,h=i,i*=2}return i}function Ne(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,f=1,l;s=s||{},l=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),bt(a,e.fxprime,-1);for(let u=0;u<l;++u){if(f=Re(t,a,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)bt(a,e.fxprime,-1);else{Y(o,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),h=Math.max(0,tt(o,i.fxprime)/y);Y(a,h,a,-1,i.fxprime),c=e,e=i,i=c}if(mt(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function Jt(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||Pe,e=n.lossFunction||et,i=Oe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const l of a)c.push(o[l].x),c.push(o[l].y);const f=Zt(l=>{const u={};for(let y=0;y<a.length;++y){const h=a[y];u[h]={x:l[2*y],y:l[2*y+1],radius:o[h].radius}}return e(u,i)},c,n).x;for(let l=0;l<a.length;++l){const u=a[l];o[u].x=f[2*l],o[u].y=f[2*l+1]}return o}function vt(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+_t?Math.abs(t-n):De(e=>It(t,n,e)-s,0,t+n)}function Oe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let l=0;l<f.sets.length;l++){const u=String(f.sets[l]);c.set(u,f.size+(c.get(u)||0));for(let y=l+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${u};${h}`,d=`${h};${u}`;c.set(b,f.size+(c.get(b)||0)),c.set(d,f.size+(c.get(d)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],l=c.sets[1];a.add(i(c.sets)),a.add(i([l,f]))}o.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<o.length;++c){const f=o[c];for(let l=c+1;l<o.length;++l){const u=o[l];a.has(i([f,u]))||e.push({sets:[f,u],size:0})}}return e}function Fe(t,n,s){const e=wt(n.length,n.length),i=wt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],f=vt(Math.sqrt(n[a].size/Math.PI),Math.sqrt(n[c].size/Math.PI),o.size);e[a][c]=e[c][a]=f;let l=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?l=1:o.size<=1e-10&&(l=-1),i[a][c]=i[c][a]=l}),{distances:e,constraints:i}}function je(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let f=o+1;f<s.length;++f){const l=t[2*f],u=t[2*f+1],y=s[o][f],h=e[o][f],b=(l-a)*(l-a)+(u-c)*(u-c),d=Math.sqrt(b),_=b-y*y;h>0&&d<=y||h<0&&d>=y||(i+=2*_*_,n[2*o]+=4*_*(a-l),n[2*o+1]+=4*_*(c-u),n[2*f]+=4*_*(l-a),n[2*f+1]+=4*_*(u-c))}}return i}function Pe(t,n={}){let s=Ve(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=Le(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function Le(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:a}=Fe(t,e,i);const c=mt(o.map(mt))/o.length;o=o.map(h=>h.map(b=>b/c));const f=(h,b)=>je(h,b,o,a);let l=null;for(let h=0;h<s;++h){const b=Ne(f,pt(o.length*2).map(Math.random),n);(!l||b.fx<l.fx)&&(l=b)}const u=l.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:u[2*h]*c,y:u[2*h+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)bt(h.x,c);return y}function Ve(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],d=y.sets[1];y.size+_t>=Math.min(e[b].size,e[d].size)&&(h=0),i[b].push({set:d,size:y.size,weight:h}),i[d].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function a(y,h){return h.size-y.size}o.sort(a);const c={};function f(y){return y.set in c}function l(y,h){e[h].x=y.x,e[h].y=y.y,c[h]=!0}l({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),d=e[h];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const _=[];for(var u=0;u<b.length;++u){const x=e[b[u].set],v=vt(d.radius,x.radius,b[u].size);_.push({x:x.x+v,y:x.y}),_.push({x:x.x-v,y:x.y}),_.push({y:x.y+v,x:x.x}),_.push({y:x.y-v,x:x.x});for(let k=u+1;k<b.length;++k){const g=e[b[k].set],p=vt(d.radius,g.radius,b[k].size),r=Yt({x:x.x,y:x.y,radius:v},{x:g.x,y:g.y,radius:p});_.push(...r)}}let T=1e50,m=_[0];for(const x of _){e[h].x=x.x,e[h].y=x.y;const v=s(e,t);v<T&&(T=v,m=x)}l(m,h)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=It(a.radius,c.radius,U(a,c))}else i=ut(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Qt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=It(c.radius,f.radius,U(c,f))}else i=ut(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function Be(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&U(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const f=c.x,l=c.y;c.x=o*f-a*l,c.y=a*f+o*l}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function Ue(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i);a.parent=n(o)}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;U(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function kt(t){const n=s=>({max:t.reduce((e,i)=>Math.max(e,i[s]+i.radius),Number.NEGATIVE_INFINITY),min:t.reduce((e,i)=>Math.min(e,i[s]-i.radius),Number.POSITIVE_INFINITY)});return{xRange:n("x"),yRange:n("y")}}function $t(t,n,s){n==null&&(n=Math.PI/2);let e=ne(t).map(l=>Object.assign({},l));const i=Ue(e);for(const l of i){Be(l,n,s);const u=kt(l);l.size=(u.xRange.max-u.xRange.min)*(u.yRange.max-u.yRange.min),l.bounds=u}i.sort((l,u)=>u.size-l.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(l,u,y){if(!l)return;const h=l.bounds;let b,d;if(u)b=o.xRange.max-h.xRange.min+a;else{b=o.xRange.max-h.xRange.max;const _=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;_<0&&(b+=_)}if(y)d=o.yRange.max-h.yRange.min+a;else{d=o.yRange.max-h.yRange.max;const _=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;_<0&&(d+=_)}for(const _ of l)_.x+=b,_.y+=d,e.push(_)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,o=kt(e);return ee(e)}function te(t,n,s,e,i){const o=ne(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=kt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,l;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,l=s/b}else f=n/(a.max-a.min),l=s/(c.max-c.min);const u=Math.min(l,f),y=(n-(a.max-a.min)*u)/2,h=(s-(c.max-c.min)*u)/2;return ee(o.map(b=>({radius:u*b.radius,x:e+y+(b.x-a.min)*u,y:e+h+(b.y-c.min)*u,setid:b.setid})))}function ee(t){const n={};for(const s of t)n[s.setid]=s;return n}function ne(t){return Object.keys(t).map(n=>Object.assign(t[n],{setid:n}))}function qe(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,f=null,l=!0,u=!0,y=null,h=null,b=!1,d=null,_=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},m=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],x=0,v=function(r){if(r in T)return T[r];var w=T[r]=m[x];return x+=1,x>=m.length&&(x=0),w},k=Jt,g=et;function p(r){let w=r.datum();const I=new Set;w.forEach(M=>{M.size==0&&M.sets.length==1&&I.add(M.sets[0])}),w=w.filter(M=>!M.sets.some(O=>I.has(O)));let z={},F={};if(w.length>0){let M=k(w,{lossFunction:g,distinct:b});c&&(M=$t(M,a,h)),z=te(M,s,e,i,f),F=ie(z,w,_)}const L={};w.forEach(M=>{M.label&&(L[M.sets]=M.label)});function D(M){if(M.sets in L)return L[M.sets];if(M.sets.length==1)return""+M.sets[0]}r.selectAll("svg").data([z]).enter().append("svg");const A=r.select("svg");n?A.attr("viewBox",`0 0 ${s} ${e}`):A.attr("width",s).attr("height",e);const j={};let E=!1;A.selectAll(".venn-area path").each(function(M){const O=this.getAttribute("d");M.sets.length==1&&O&&!b&&(E=!0,j[M.sets[0]]=We(O))});function R(M){return O=>Tt(M.sets.map(Q=>{let P=j[Q],X=z[Q];return P||(P={x:s/2,y:e/2,radius:1}),X||(X={x:s/2,y:e/2,radius:1}),{x:P.x*(1-O)+X.x*O,y:P.y*(1-O)+X.y*O,radius:P.radius*(1-O)+X.radius*O}}),d)}const N=A.selectAll(".venn-area").data(w,M=>M.sets),V=N.enter().append("g").attr("class",M=>`venn-area venn-${M.sets.length==1?"circle":"intersection"}${M.colour||M.color?" venn-coloured":""}`).attr("data-venn-sets",M=>M.sets.join("_")),H=V.append("path"),K=V.append("text").attr("class","label").text(M=>D(M)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);u&&(H.style("fill-opacity","0").filter(M=>M.sets.length==1).style("fill",M=>M.colour?M.colour:M.color?M.color:v(M.sets)).style("fill-opacity",".25"),K.style("fill",M=>M.colour||M.color?"#FFF":t.textFill?t.textFill:M.sets.length==1?v(M.sets):"#444"));function J(M){return typeof M.transition=="function"?M.transition("venn").duration(o):M}let C=r;E&&typeof C.transition=="function"?(C=J(r),C.selectAll("path").attrTween("d",R)):C.selectAll("path").attr("d",M=>Tt(M.sets.map(O=>z[O])),d);const q=C.selectAll("text").filter(M=>M.sets in F).text(M=>D(M)).attr("x",M=>Math.floor(F[M.sets].x)).attr("y",M=>Math.floor(F[M.sets].y));l&&(E?"on"in q?q.on("end",dt(z,D)):q.each("end",dt(z,D)):q.each(dt(z,D)));const G=J(N.exit()).remove();typeof N.transition=="function"&&G.selectAll("path").attrTween("d",R);const B=G.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(K.style("font-size","0px"),q.style("font-size",y),B.style("font-size","0px")),{circles:z,textCentres:F,nodes:N,enter:V,update:C,exit:G}}return p.wrap=function(r){return arguments.length?(l=r,p):l},p.useViewBox=function(){return n=!0,p},p.width=function(r){return arguments.length?(s=r,p):s},p.height=function(r){return arguments.length?(e=r,p):e},p.padding=function(r){return arguments.length?(i=r,p):i},p.distinct=function(r){return arguments.length?(b=r,p):b},p.colours=function(r){return arguments.length?(v=r,p):v},p.colors=function(r){return arguments.length?(v=r,p):v},p.fontSize=function(r){return arguments.length?(y=r,p):y},p.round=function(r){return arguments.length?(d=r,p):d},p.duration=function(r){return arguments.length?(o=r,p):o},p.layoutFunction=function(r){return arguments.length?(k=r,p):k},p.normalize=function(r){return arguments.length?(c=r,p):c},p.scaleToFit=function(r){return arguments.length?(f=r,p):f},p.styled=function(r){return arguments.length?(u=r,p):u},p.orientation=function(r){return arguments.length?(a=r,p):a},p.orientationOrder=function(r){return arguments.length?(h=r,p):h},p.lossFunction=function(r){return arguments.length?(g=r==="default"?et:r==="logRatio"?Qt:r,p):g},p}function dt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),c=(o.length+a.length)/3;let f=a.pop(),l=[f],u=0;const y=1.1;e.textContent=null;const h=[];function b(x){const v=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return v.textContent=x,h.push(v),e.append(v),v}let d=b(f);for(;f=a.pop(),!!f;){l.push(f);const x=l.join(" ");d.textContent=x,x.length>c&&d.getComputedTextLength()>i&&(l.pop(),d.textContent=l.join(" "),l=[f],d=b(f),u++)}const _=.35-u*y/2,T=e.getAttribute("x"),m=e.getAttribute("y");h.forEach((x,v)=>{x.setAttribute("x",T),x.setAttribute("y",m),x.setAttribute("dy",`${_+v*y}em`)})}}function gt(t,n,s){let e=n[0].radius-U(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-U(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=U(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function se(t,n,s){const e=[];for(const u of t)e.push({x:u.x,y:u.y}),e.push({x:u.x+u.radius/2,y:u.y}),e.push({x:u.x-u.radius/2,y:u.y}),e.push({x:u.x,y:u.y+u.radius/2}),e.push({x:u.x,y:u.y-u.radius/2});let i=e[0],o=gt(e[0],t,n);for(let u=1;u<e.length;++u){const y=gt(e[u],t,n);y>=o&&(i=e[u],o=y)}const a=Zt(u=>-1*gt({x:u[0],y:u[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let f=!0;for(const u of t)if(U(c,u)>u.radius){f=!1;break}for(const u of n)if(U(c,u)<u.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const l={};return ut(t,l),l.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:l.arcs.length==1?{x:l.arcs[0].circle.x,y:l.arcs[0].circle.y}:n.length?se(t,[]):Xt(l.arcs.map(u=>u.p1))}function Ge(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],f=t[c],l=U(o,f);l+f.radius<=o.radius+1e-10?n[c].push(i):l+o.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function ie(t,n,s){const e={},i=Ge(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},f={};for(let h=0;h<a.length;++h){c[a[h]]=!0;const b=i[a[h]];for(let d=0;d<b.length;++d)f[b[d]]=!0}const l=[],u=[];for(let h in t)h in c?l.push(t[h]):h in f||u.push(t[h]);const y=se(l,u,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ke(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wa as a}from"./index-DN4SafrP.js";import{N as r,a as i,i as t}from"./mermaid-parser.core-DU_SX15F.js";var e=a((()=>{i(),r()}));e();export{t as createWardleyServices};
|