@8wave/ai-elements 0.119.0-beta.22 → 0.119.0-beta.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/_chunks/{Agent-D8YrsP52.js → Agent-Gdgpd3LA.js} +66 -66
  2. package/dist/_chunks/Agent-Gdgpd3LA.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-Bry3y6Ru.js → PkStreamingMarkdown-BK9O_NLx.js} +889 -852
  4. package/dist/_chunks/{PkStreamingMarkdown-Bry3y6Ru.js.map → PkStreamingMarkdown-BK9O_NLx.js.map} +1 -1
  5. package/dist/_chunks/{PkToolEditSpreadsheet-5vHzEy4P.js → PkToolEditSpreadsheet-D-RCfnrN.js} +2 -2
  6. package/dist/_chunks/{PkToolEditSpreadsheet-5vHzEy4P.js.map → PkToolEditSpreadsheet-D-RCfnrN.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestGeolocation-Cj8hTfNF.js → PkToolRequestGeolocation-PxhQxMP1.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestGeolocation-Cj8hTfNF.js.map → PkToolRequestGeolocation-PxhQxMP1.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestOAuthConnection-BWxR1hV4.js → PkToolRequestOAuthConnection-QYDJPUFF.js} +5 -4
  10. package/dist/_chunks/PkToolRequestOAuthConnection-QYDJPUFF.js.map +1 -0
  11. package/dist/_chunks/{PkToolShowArtifact-CfJLe8vD.js → PkToolShowArtifact-DGUj8f1k.js} +3 -3
  12. package/dist/_chunks/PkToolShowArtifact-DGUj8f1k.js.map +1 -0
  13. package/dist/_chunks/{PkToolShowCalendarEvent-Bp_yv8S7.js → PkToolShowCalendarEvent-BEjPZC1F.js} +4 -3
  14. package/dist/_chunks/PkToolShowCalendarEvent-BEjPZC1F.js.map +1 -0
  15. package/dist/_chunks/{PkToolShowComparison-Bvd4f4tJ.js → PkToolShowComparison-DLC22e1W.js} +4 -3
  16. package/dist/_chunks/PkToolShowComparison-DLC22e1W.js.map +1 -0
  17. package/dist/_chunks/{PkToolShowContactForm--9XOVqNB.js → PkToolShowContactForm-DXJI0MPZ.js} +5 -4
  18. package/dist/_chunks/PkToolShowContactForm-DXJI0MPZ.js.map +1 -0
  19. package/dist/_chunks/{PkToolShowDiagram-C-pNbC9n.js → PkToolShowDiagram-C5mSqZDp.js} +9 -8
  20. package/dist/_chunks/PkToolShowDiagram-C5mSqZDp.js.map +1 -0
  21. package/dist/_chunks/{PkToolShowEmail-BKel_O29.js → PkToolShowEmail-C7mUCqGL.js} +4 -3
  22. package/dist/_chunks/PkToolShowEmail-C7mUCqGL.js.map +1 -0
  23. package/dist/_chunks/{PkToolShowForm-CGAc1O6K.js → PkToolShowForm-UQo0Xdiq.js} +6 -5
  24. package/dist/_chunks/PkToolShowForm-UQo0Xdiq.js.map +1 -0
  25. package/dist/_chunks/{PkToolShowImageGallery-CIhIrIcY.js → PkToolShowImageGallery-rZ3AtIEP.js} +2 -2
  26. package/dist/_chunks/{PkToolShowImageGallery-CIhIrIcY.js.map → PkToolShowImageGallery-rZ3AtIEP.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowLocation-78C7jFiV.js → PkToolShowLocation-BOmxHZKd.js} +4 -3
  28. package/dist/_chunks/PkToolShowLocation-BOmxHZKd.js.map +1 -0
  29. package/dist/_chunks/{PkToolShowMessage-BScy-w4J.js → PkToolShowMessage-vw4XS4TR.js} +4 -3
  30. package/dist/_chunks/PkToolShowMessage-vw4XS4TR.js.map +1 -0
  31. package/dist/_chunks/{PkToolShowProductList-BjWKnbyD.js → PkToolShowProductList-ByeSoIwq.js} +2 -2
  32. package/dist/_chunks/{PkToolShowProductList-BjWKnbyD.js.map → PkToolShowProductList-ByeSoIwq.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowQrCode-B70jPHDw.js → PkToolShowQrCode-BhcAUXSZ.js} +4 -3
  34. package/dist/_chunks/PkToolShowQrCode-BhcAUXSZ.js.map +1 -0
  35. package/dist/_chunks/{PkToolShowSources-BJ-XFrLD.js → PkToolShowSources-q4XBOwJl.js} +51 -50
  36. package/dist/_chunks/PkToolShowSources-q4XBOwJl.js.map +1 -0
  37. package/dist/_chunks/{PkToolShowSuggestedReply-0KahUIlw.js → PkToolShowSuggestedReply-BISQY1ce.js} +2 -2
  38. package/dist/_chunks/{PkToolShowSuggestedReply-0KahUIlw.js.map → PkToolShowSuggestedReply-BISQY1ce.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowVideo-_V_d-PDr.js → PkToolShowVideo-BmHHW4Ep.js} +2 -2
  40. package/dist/_chunks/{PkToolShowVideo-_V_d-PDr.js.map → PkToolShowVideo-BmHHW4Ep.js.map} +1 -1
  41. package/dist/_chunks/{PkToolShowWebPages-D55VEPjK.js → PkToolShowWebPages-BaapF0CC.js} +2 -2
  42. package/dist/_chunks/{PkToolShowWebPages-D55VEPjK.js.map → PkToolShowWebPages-BaapF0CC.js.map} +1 -1
  43. package/dist/_chunks/VvButtonLocalized-DV-zbH9b.js +21 -0
  44. package/dist/_chunks/VvButtonLocalized-DV-zbH9b.js.map +1 -0
  45. package/dist/_chunks/{chatImagePolicy-DXkhb-N_.js → chatImagePolicy-CDNkMKdT.js} +2 -2
  46. package/dist/_chunks/{chatImagePolicy-DXkhb-N_.js.map → chatImagePolicy-CDNkMKdT.js.map} +1 -1
  47. package/dist/_chunks/{markdown-DpoAzJSk.js → markdown-BbaLt57-.js} +8 -8
  48. package/dist/_chunks/{markdown-DpoAzJSk.js.map → markdown-BbaLt57-.js.map} +1 -1
  49. package/dist/_chunks/text-BHCGblDQ.js +6 -0
  50. package/dist/_chunks/text-BHCGblDQ.js.map +1 -0
  51. package/dist/ai-elements.es.js +2819 -2544
  52. package/dist/ai-elements.es.js.map +1 -1
  53. package/dist-vue/PkChatbot.js +1 -1
  54. package/dist-vue/PkChatbotAuth.js +1 -1
  55. package/dist-vue/PkChatbotEmptyState.js +1 -1
  56. package/dist-vue/PkChatbotError.js +1 -1
  57. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  58. package/dist-vue/PkChatbotInput.js +1 -1
  59. package/dist-vue/PkChatbotMessages.js +1 -1
  60. package/dist-vue/PkChatbotStepPayload.js +1 -1
  61. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  62. package/dist-vue/PkChatbotSteps.js +1 -1
  63. package/dist-vue/PkChatbotViewChat.js +1 -1
  64. package/dist-vue/PkChatbotViewConversations.js +1 -1
  65. package/dist-vue/PkChatbotViewFiles.js +1 -1
  66. package/dist-vue/PkChatbotViewProfile.js +1 -1
  67. package/dist-vue/PkChatbotWakeupBar.js +1 -1
  68. package/dist-vue/_chunks/{Agent-dGF8mkG9.js → Agent-DU1WWaHR.js} +87 -87
  69. package/dist-vue/_chunks/Agent-DU1WWaHR.js.map +1 -0
  70. package/dist-vue/_chunks/{Document-CV-RJu_p.js → Document-Cto-Qws0.js} +2 -2
  71. package/dist-vue/_chunks/{Document-CV-RJu_p.js.map → Document-Cto-Qws0.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkChatbot-536vsOfp.js → PkChatbot-D0BQ3VnX.js} +86 -85
  73. package/dist-vue/_chunks/PkChatbot-D0BQ3VnX.js.map +1 -0
  74. package/dist-vue/_chunks/{PkChatbotAuth-BMLLTSwK.js → PkChatbotAuth-BVZzjbK9.js} +4 -3
  75. package/dist-vue/_chunks/PkChatbotAuth-BVZzjbK9.js.map +1 -0
  76. package/dist-vue/_chunks/{PkChatbotEmptyState-Toj4CqXV.js → PkChatbotEmptyState-CGjFcwwB.js} +2 -2
  77. package/dist-vue/_chunks/{PkChatbotEmptyState-Toj4CqXV.js.map → PkChatbotEmptyState-CGjFcwwB.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkChatbotError-CRGbK09-.js → PkChatbotError-BV5ga7hk.js} +4 -3
  79. package/dist-vue/_chunks/PkChatbotError-BV5ga7hk.js.map +1 -0
  80. package/dist-vue/_chunks/{PkChatbotFeedbackForm-CMFXjoKR.js → PkChatbotFeedbackForm-B5cYsWBr.js} +8 -7
  81. package/dist-vue/_chunks/PkChatbotFeedbackForm-B5cYsWBr.js.map +1 -0
  82. package/dist-vue/_chunks/{PkChatbotInput-BfZqRpQ2.js → PkChatbotInput-BVBQY0V5.js} +8 -7
  83. package/dist-vue/_chunks/PkChatbotInput-BVBQY0V5.js.map +1 -0
  84. package/dist-vue/_chunks/PkChatbotMessages-CK0lhcDj.js +876 -0
  85. package/dist-vue/_chunks/PkChatbotMessages-CK0lhcDj.js.map +1 -0
  86. package/dist-vue/_chunks/{PkChatbotStepPayload-D0eoPBQ8.js → PkChatbotStepPayload-l57qHqVf.js} +2 -2
  87. package/dist-vue/_chunks/{PkChatbotStepPayload-D0eoPBQ8.js.map → PkChatbotStepPayload-l57qHqVf.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CMx4cw1D.js → PkChatbotStepToolDetail-ChrOa4W4.js} +16 -16
  89. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CMx4cw1D.js.map → PkChatbotStepToolDetail-ChrOa4W4.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkChatbotSteps-DeZQhGRU.js → PkChatbotSteps-DnU9r4XT.js} +40 -40
  91. package/dist-vue/_chunks/{PkChatbotSteps-DeZQhGRU.js.map → PkChatbotSteps-DnU9r4XT.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkChatbotViewChat-CVT6OUIv.js → PkChatbotViewChat-DIx3nwEg.js} +12 -12
  93. package/dist-vue/_chunks/{PkChatbotViewChat-CVT6OUIv.js.map → PkChatbotViewChat-DIx3nwEg.js.map} +1 -1
  94. package/dist-vue/_chunks/PkChatbotViewConversations-DDWO1Ci_.js +199 -0
  95. package/dist-vue/_chunks/PkChatbotViewConversations-DDWO1Ci_.js.map +1 -0
  96. package/dist-vue/_chunks/{PkChatbotViewFiles-CA20TBFY.js → PkChatbotViewFiles-O9YjrGP0.js} +18 -17
  97. package/dist-vue/_chunks/PkChatbotViewFiles-O9YjrGP0.js.map +1 -0
  98. package/dist-vue/_chunks/{PkChatbotViewProfile-CyzRxE3D.js → PkChatbotViewProfile-BoImMMj2.js} +11 -10
  99. package/dist-vue/_chunks/PkChatbotViewProfile-BoImMMj2.js.map +1 -0
  100. package/dist-vue/_chunks/{PkChatbotWakeupBar-jBti21FQ.js → PkChatbotWakeupBar-Cjgarxnw.js} +3 -2
  101. package/dist-vue/_chunks/PkChatbotWakeupBar-Cjgarxnw.js.map +1 -0
  102. package/dist-vue/_chunks/{PkStreamingMarkdown-C55Fi0Pd.js → PkStreamingMarkdown-JEkbkY5k.js} +23 -23
  103. package/dist-vue/_chunks/{PkStreamingMarkdown-C55Fi0Pd.js.map → PkStreamingMarkdown-JEkbkY5k.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkSvgViewer-Ts3gQ1hB.js → PkSvgViewer-DrA4yi8Q.js} +7 -6
  105. package/dist-vue/_chunks/PkSvgViewer-DrA4yi8Q.js.map +1 -0
  106. package/dist-vue/_chunks/{PkToolEditSpreadsheet-HAskd6d3.js → PkToolEditSpreadsheet-BX_h8Hut.js} +2 -2
  107. package/dist-vue/_chunks/{PkToolEditSpreadsheet-HAskd6d3.js.map → PkToolEditSpreadsheet-BX_h8Hut.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkToolRequestGeolocation-BE22qwxB.js → PkToolRequestGeolocation-JZYgc-2X.js} +2 -2
  109. package/dist-vue/_chunks/{PkToolRequestGeolocation-BE22qwxB.js.map → PkToolRequestGeolocation-JZYgc-2X.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-GfSalEJG.js → PkToolRequestOAuthConnection-Bwj84qHq.js} +11 -10
  111. package/dist-vue/_chunks/PkToolRequestOAuthConnection-Bwj84qHq.js.map +1 -0
  112. package/dist-vue/_chunks/{PkToolShowArtifact-z1qTnFkA.js → PkToolShowArtifact-BIvl5I2I.js} +5 -5
  113. package/dist-vue/_chunks/PkToolShowArtifact-BIvl5I2I.js.map +1 -0
  114. package/dist-vue/_chunks/{PkToolShowCalendarEvent-Dv_rss26.js → PkToolShowCalendarEvent-ve1I0xaV.js} +7 -6
  115. package/dist-vue/_chunks/PkToolShowCalendarEvent-ve1I0xaV.js.map +1 -0
  116. package/dist-vue/_chunks/{PkToolShowComparison-DQs3E6-k.js → PkToolShowComparison-c2e239T4.js} +3 -2
  117. package/dist-vue/_chunks/PkToolShowComparison-c2e239T4.js.map +1 -0
  118. package/dist-vue/_chunks/{PkToolShowContactForm-Y0lrHXhr.js → PkToolShowContactForm-CddxrLBZ.js} +13 -12
  119. package/dist-vue/_chunks/PkToolShowContactForm-CddxrLBZ.js.map +1 -0
  120. package/dist-vue/_chunks/{PkToolShowDiagram-7WxDObZ6.js → PkToolShowDiagram-DdR4x6pP.js} +10 -9
  121. package/dist-vue/_chunks/PkToolShowDiagram-DdR4x6pP.js.map +1 -0
  122. package/dist-vue/_chunks/{PkToolShowEmail-C591LR5N.js → PkToolShowEmail-CUgZN0J5.js} +8 -7
  123. package/dist-vue/_chunks/PkToolShowEmail-CUgZN0J5.js.map +1 -0
  124. package/dist-vue/_chunks/{PkToolShowForm-CZFWZub7.js → PkToolShowForm-DiXcYws_.js} +14 -13
  125. package/dist-vue/_chunks/PkToolShowForm-DiXcYws_.js.map +1 -0
  126. package/dist-vue/_chunks/{PkToolShowImageGallery-CkfXP_lD.js → PkToolShowImageGallery-COrJEjSv.js} +2 -2
  127. package/dist-vue/_chunks/{PkToolShowImageGallery-CkfXP_lD.js.map → PkToolShowImageGallery-COrJEjSv.js.map} +1 -1
  128. package/dist-vue/_chunks/{PkToolShowLocation-Dyz6h_0n.js → PkToolShowLocation-CHi_cONJ.js} +13 -12
  129. package/dist-vue/_chunks/PkToolShowLocation-CHi_cONJ.js.map +1 -0
  130. package/dist-vue/_chunks/{PkToolShowMessage-CbXERPHI.js → PkToolShowMessage-ATTN5Hac.js} +8 -7
  131. package/dist-vue/_chunks/PkToolShowMessage-ATTN5Hac.js.map +1 -0
  132. package/dist-vue/_chunks/{PkToolShowProductList-De-PtmD-.js → PkToolShowProductList-BIvJlpMT.js} +2 -2
  133. package/dist-vue/_chunks/{PkToolShowProductList-De-PtmD-.js.map → PkToolShowProductList-BIvJlpMT.js.map} +1 -1
  134. package/dist-vue/_chunks/{PkToolShowQrCode-DEAvfLFu.js → PkToolShowQrCode-D_5VUtEB.js} +3 -2
  135. package/dist-vue/_chunks/PkToolShowQrCode-D_5VUtEB.js.map +1 -0
  136. package/dist-vue/_chunks/{PkToolShowSources-CSN7S0zo.js → PkToolShowSources-CC-0Oh4K.js} +57 -56
  137. package/dist-vue/_chunks/PkToolShowSources-CC-0Oh4K.js.map +1 -0
  138. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DjutyiEi.js → PkToolShowSuggestedReply-I6FBos-F.js} +2 -2
  139. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DjutyiEi.js.map → PkToolShowSuggestedReply-I6FBos-F.js.map} +1 -1
  140. package/dist-vue/_chunks/{PkToolShowVideo-B_Q93E2y.js → PkToolShowVideo-UUNkUlrg.js} +2 -2
  141. package/dist-vue/_chunks/{PkToolShowVideo-B_Q93E2y.js.map → PkToolShowVideo-UUNkUlrg.js.map} +1 -1
  142. package/dist-vue/_chunks/{PkToolShowWebPages-D3CdjJUc.js → PkToolShowWebPages-CLYx_PgL.js} +2 -2
  143. package/dist-vue/_chunks/{PkToolShowWebPages-D3CdjJUc.js.map → PkToolShowWebPages-CLYx_PgL.js.map} +1 -1
  144. package/dist-vue/_chunks/VvButtonLocalized-BuzLsXp3.js +20 -0
  145. package/dist-vue/_chunks/VvButtonLocalized-BuzLsXp3.js.map +1 -0
  146. package/dist-vue/_chunks/{createChatbotApiClient-DSLxswr4.js → createChatbotApiClient-BdmGCAQR.js} +17 -17
  147. package/dist-vue/_chunks/{createChatbotApiClient-DSLxswr4.js.map → createChatbotApiClient-BdmGCAQR.js.map} +1 -1
  148. package/dist-vue/_chunks/{useChatbotStore-rtl-oKqU.js → useChatbotStore-BAv5K91p.js} +3 -3
  149. package/dist-vue/_chunks/{useChatbotStore-rtl-oKqU.js.map → useChatbotStore-BAv5K91p.js.map} +1 -1
  150. package/dist-vue/_chunks/{utils-CwIMEuAv.js → utils-BqPJ6DJT.js} +142 -78
  151. package/dist-vue/_chunks/utils-BqPJ6DJT.js.map +1 -0
  152. package/dist-vue/api.js +1 -1
  153. package/dist-vue/composables.js +306 -42
  154. package/dist-vue/composables.js.map +1 -1
  155. package/dist-vue/index.js +4215 -4187
  156. package/dist-vue/index.js.map +1 -1
  157. package/dist-vue/locales.js +48 -12
  158. package/dist-vue/packages/ability/src/index.d.ts +4 -0
  159. package/dist-vue/packages/components/src/PkEditorMarkdown.d.ts +3 -2
  160. package/dist-vue/packages/components/src/VvButtonLocalized.d.ts +11 -0
  161. package/dist-vue/packages/components/src/agentGlyphs.d.ts +5 -3
  162. package/dist-vue/packages/components/src/chat/index.d.ts +1 -0
  163. package/dist-vue/packages/components/src/chat/utils.d.ts +30 -0
  164. package/dist-vue/packages/components/src/index.d.ts +1 -0
  165. package/dist-vue/packages/models/src/schema/Invitation.d.ts +1 -1
  166. package/package.json +1 -1
  167. package/dist/_chunks/Agent-D8YrsP52.js.map +0 -1
  168. package/dist/_chunks/PkToolRequestOAuthConnection-BWxR1hV4.js.map +0 -1
  169. package/dist/_chunks/PkToolShowArtifact-CfJLe8vD.js.map +0 -1
  170. package/dist/_chunks/PkToolShowCalendarEvent-Bp_yv8S7.js.map +0 -1
  171. package/dist/_chunks/PkToolShowComparison-Bvd4f4tJ.js.map +0 -1
  172. package/dist/_chunks/PkToolShowContactForm--9XOVqNB.js.map +0 -1
  173. package/dist/_chunks/PkToolShowDiagram-C-pNbC9n.js.map +0 -1
  174. package/dist/_chunks/PkToolShowEmail-BKel_O29.js.map +0 -1
  175. package/dist/_chunks/PkToolShowForm-CGAc1O6K.js.map +0 -1
  176. package/dist/_chunks/PkToolShowLocation-78C7jFiV.js.map +0 -1
  177. package/dist/_chunks/PkToolShowMessage-BScy-w4J.js.map +0 -1
  178. package/dist/_chunks/PkToolShowQrCode-B70jPHDw.js.map +0 -1
  179. package/dist/_chunks/PkToolShowSources-BJ-XFrLD.js.map +0 -1
  180. package/dist/_chunks/text-DbSEK8si.js +0 -6
  181. package/dist/_chunks/text-DbSEK8si.js.map +0 -1
  182. package/dist-vue/_chunks/Agent-dGF8mkG9.js.map +0 -1
  183. package/dist-vue/_chunks/PkChatbot-536vsOfp.js.map +0 -1
  184. package/dist-vue/_chunks/PkChatbotAuth-BMLLTSwK.js.map +0 -1
  185. package/dist-vue/_chunks/PkChatbotError-CRGbK09-.js.map +0 -1
  186. package/dist-vue/_chunks/PkChatbotFeedbackForm-CMFXjoKR.js.map +0 -1
  187. package/dist-vue/_chunks/PkChatbotInput-BfZqRpQ2.js.map +0 -1
  188. package/dist-vue/_chunks/PkChatbotMessages-CnI3e9wF.js +0 -869
  189. package/dist-vue/_chunks/PkChatbotMessages-CnI3e9wF.js.map +0 -1
  190. package/dist-vue/_chunks/PkChatbotViewConversations-DHeFtAfN.js +0 -197
  191. package/dist-vue/_chunks/PkChatbotViewConversations-DHeFtAfN.js.map +0 -1
  192. package/dist-vue/_chunks/PkChatbotViewFiles-CA20TBFY.js.map +0 -1
  193. package/dist-vue/_chunks/PkChatbotViewProfile-CyzRxE3D.js.map +0 -1
  194. package/dist-vue/_chunks/PkChatbotWakeupBar-jBti21FQ.js.map +0 -1
  195. package/dist-vue/_chunks/PkSvgViewer-Ts3gQ1hB.js.map +0 -1
  196. package/dist-vue/_chunks/PkToolRequestOAuthConnection-GfSalEJG.js.map +0 -1
  197. package/dist-vue/_chunks/PkToolShowArtifact-z1qTnFkA.js.map +0 -1
  198. package/dist-vue/_chunks/PkToolShowCalendarEvent-Dv_rss26.js.map +0 -1
  199. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +0 -1
  200. package/dist-vue/_chunks/PkToolShowContactForm-Y0lrHXhr.js.map +0 -1
  201. package/dist-vue/_chunks/PkToolShowDiagram-7WxDObZ6.js.map +0 -1
  202. package/dist-vue/_chunks/PkToolShowEmail-C591LR5N.js.map +0 -1
  203. package/dist-vue/_chunks/PkToolShowForm-CZFWZub7.js.map +0 -1
  204. package/dist-vue/_chunks/PkToolShowLocation-Dyz6h_0n.js.map +0 -1
  205. package/dist-vue/_chunks/PkToolShowMessage-CbXERPHI.js.map +0 -1
  206. package/dist-vue/_chunks/PkToolShowQrCode-DEAvfLFu.js.map +0 -1
  207. package/dist-vue/_chunks/PkToolShowSources-CSN7S0zo.js.map +0 -1
  208. package/dist-vue/_chunks/utils-CwIMEuAv.js.map +0 -1
@@ -1,50 +1,51 @@
1
1
  import { C as e, F as t, J as n, L as r, N as i, O as a, P as o, X as s, it as c, m as l, v as u, vt as d } from "./vue.runtime.esm-bundler-DKVd2gci.js";
2
2
  import { r as f } from "./vue-i18n-CooVjJjT.js";
3
3
  import { n as p, t as ee } from "./cdn-css-JUUNhyQ6.js";
4
- import { d as m } from "./Agent-D8YrsP52.js";
4
+ import { c as m, m as te, t as ne, u as re } from "./Agent-Gdgpd3LA.js";
5
5
  import "./src-Dt4rhhPN.js";
6
- import { n as te } from "./url-validation-9DstIfq2.js";
7
- import { v as ne } from "./dist-DxtbpUdI.js";
8
- import { n as re } from "./useShortUrlResolver-qFJHKHwE.js";
9
- import { t as ie } from "./_plugin-vue_export-helper-B3ysoDQm.js";
10
- import { n as ae } from "./chatImagePolicy-DXkhb-N_.js";
6
+ import { n as ie, t as h } from "./text-BHCGblDQ.js";
7
+ import { n as ae } from "./url-validation-9DstIfq2.js";
8
+ import { v as oe } from "./dist-DxtbpUdI.js";
9
+ import { n as g } from "./useShortUrlResolver-qFJHKHwE.js";
10
+ import { t as _ } from "./_plugin-vue_export-helper-B3ysoDQm.js";
11
+ import { n as se } from "./chatImagePolicy-CDNkMKdT.js";
11
12
  //#region ../../packages/utils/src/citations.ts
12
- var h = /[ \t]*\uE200[^\uE201]*\uE201/g, oe = /(?<![ \t])[ \t]*(?:cite|filecite|videocite|audiocite|imagecite|screenshot)(?:turn\d+[a-z]+\d+)+/gi, g = /[\uE200-\uE20F]/g;
13
- function se(e) {
14
- return e && e.replace(h, "").replace(oe, "").replace(g, "");
13
+ var ce = /[ \t]*\uE200[^\uE201]*\uE201/g, v = /(?<![ \t])[ \t]*(?:cite|filecite|videocite|audiocite|imagecite|screenshot)(?:turn\d+[a-z]+\d+)+/gi, y = /[\uE200-\uE20F]/g;
14
+ function le(e) {
15
+ return e && e.replace(ce, "").replace(v, "").replace(y, "");
15
16
  }
16
17
  //#endregion
17
18
  //#region ../../packages/utils/src/message.ts
18
- function ce(e) {
19
+ function ue(e) {
19
20
  return e ? e.type === "text" : !1;
20
21
  }
21
- function _(e) {
22
+ function b(e) {
22
23
  return e ? e.type.startsWith("tool-") : !1;
23
24
  }
24
- function v(e) {
25
- return _(e) ? e.type.slice(5) : "";
25
+ function de(e) {
26
+ return b(e) ? e.type.slice(5) : "";
26
27
  }
27
- function y(e) {
28
+ function x(e) {
28
29
  return e ? e.type === "file" : !1;
29
30
  }
30
- function le(e) {
31
- if (!y(e)) return;
31
+ function fe(e) {
32
+ if (!x(e)) return;
32
33
  let t = e.providerMetadata?.["8bot"]?.media;
33
34
  return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
34
35
  }
35
- function ue(e) {
36
- if (!y(e)) return;
36
+ function S(e) {
37
+ if (!x(e)) return;
37
38
  let t = e.providerMetadata?.["8bot"]?.transcript;
38
39
  return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
39
40
  }
40
- function de(e, t) {
41
+ function pe(e, t) {
41
42
  return e.map((e) => {
42
43
  let n = t.filter((t) => t.messageId === e.id);
43
44
  return n.length === 0 ? e : {
44
45
  ...e,
45
46
  parts: e.parts.map((e) => {
46
- let t = n.find(({ storedFileName: t }) => t === le(e)?.storedFileName);
47
- return t && y(e) ? {
47
+ let t = n.find(({ storedFileName: t }) => t === fe(e)?.storedFileName);
48
+ return t && x(e) ? {
48
49
  ...e,
49
50
  providerMetadata: {
50
51
  ...e.providerMetadata,
@@ -58,54 +59,54 @@ function de(e, t) {
58
59
  };
59
60
  });
60
61
  }
61
- function fe(e) {
62
+ function me(e) {
62
63
  return e ? e.type === "reasoning" : !1;
63
64
  }
64
- function pe(e) {
65
+ function he(e) {
65
66
  if (!e) return;
66
67
  let t = e.parts;
67
- if (Array.isArray(t)) return t.find((e) => ce(e))?.text;
68
+ if (Array.isArray(t)) return t.find((e) => ue(e))?.text;
68
69
  }
69
70
  //#endregion
70
71
  //#region ../../packages/components/src/chat/utils.ts
71
- function me(e) {
72
+ function ge(e) {
72
73
  let t = [];
73
74
  for (let n of e) {
74
- if (!ce(n)) {
75
+ if (!ue(n)) {
75
76
  t.push(n);
76
77
  continue;
77
78
  }
78
79
  let e = t[t.length - 1];
79
- e && ce(e) ? t[t.length - 1] = {
80
+ e && ue(e) ? t[t.length - 1] = {
80
81
  ...e,
81
82
  text: e.text + n.text
82
83
  } : t.push(n);
83
84
  }
84
85
  return t;
85
86
  }
86
- var b = (e) => _(e) && m(v(e));
87
- function he(e) {
87
+ var _e = (e) => b(e) && te(de(e));
88
+ function ve(e) {
88
89
  let t = /* @__PURE__ */ new Map();
89
- for (let [n, r] of e.entries()) b(r) && r.state !== "output-error" && !ye(r) && t.set(r.type, n);
90
- return e.filter((e, n) => !(b(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
90
+ for (let [n, r] of e.entries()) _e(r) && r.state !== "output-error" && !xe(r) && t.set(r.type, n);
91
+ return e.filter((e, n) => !(_e(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
91
92
  }
92
- var ge = /* @__PURE__ */ new Set(["tool-editSpreadsheet"]);
93
- function _e(e) {
94
- let t = e.filter((e) => ge.has(e.type));
95
- return t.length > 0 ? [...e.filter((e) => !ge.has(e.type)), ...t] : e;
93
+ var C = /* @__PURE__ */ new Set(["tool-editSpreadsheet"]);
94
+ function ye(e) {
95
+ let t = e.filter((e) => C.has(e.type));
96
+ return t.length > 0 ? [...e.filter((e) => !C.has(e.type)), ...t] : e;
96
97
  }
97
- function ve(e, t) {
98
+ function be(e, t) {
98
99
  let n = e.toolCallId;
99
- return ge.has(e.type) && n ? `file-${n}` : t;
100
+ return C.has(e.type) && n ? `file-${n}` : t;
100
101
  }
101
- function ye(e) {
102
+ function xe(e) {
102
103
  return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
103
104
  }
104
- var be = 4e3, x = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
105
- function xe(e, t) {
105
+ var Se = 4e3, Ce = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
106
+ function we(e, t) {
106
107
  if (e.length <= t) return e;
107
108
  let n = e.length - t, r = n + t / 2, i = (e, t) => e !== -1 && e < r ? e + t : void 0, a = i(e.indexOf("\n\n", n), 2) ?? i(e.indexOf("\n", n), 1) ?? n, o;
108
- for (let t of e.matchAll(x)) {
109
+ for (let t of e.matchAll(Ce)) {
109
110
  if (t.index >= a) break;
110
111
  let [, e, n] = t;
111
112
  if (o) e[0] === o[0] && e.length >= o.length && !n.trim() && (o = void 0);
@@ -116,37 +117,37 @@ function xe(e, t) {
116
117
  }
117
118
  return `…\n\n${o ? `${o}\n` : ""}${e.slice(a)}`;
118
119
  }
119
- var Se = /* @__PURE__ */ new Set([
120
+ var Te = /* @__PURE__ */ new Set([
120
121
  "approval-requested",
121
122
  "approval-responded",
122
123
  "output-denied"
123
124
  ]);
124
- function Ce(e) {
125
- return _(e) ? Se.has(e.state) ? !0 : e.approval != null : !1;
126
- }
127
- var we = "requestConfirm";
128
- function Te(e) {
129
- return _(e) && e.type === "tool-requestConfirm";
130
- }
131
125
  function Ee(e) {
132
- return Ce(e) || Te(e);
126
+ return b(e) ? Te.has(e.state) ? !0 : e.approval != null : !1;
133
127
  }
134
- function De(e) {
135
- if (_(e)) return e.approval?.id;
128
+ var De = "requestConfirm";
129
+ function w(e) {
130
+ return b(e) && e.type === "tool-requestConfirm";
136
131
  }
137
132
  function Oe(e) {
133
+ return Ee(e) || w(e);
134
+ }
135
+ function T(e) {
136
+ if (b(e)) return e.approval?.id;
137
+ }
138
+ function ke(e) {
138
139
  if (e && "state" in e) return e.state;
139
140
  }
140
- function ke(e = "000000") {
141
+ function E(e = "000000") {
141
142
  let t = e.replace("#", "");
142
143
  t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
143
144
  let n = parseInt(t.substring(0, 2), 16) / 255, r = parseInt(t.substring(2, 4), 16) / 255, i = parseInt(t.substring(4, 6), 16) / 255, a = (e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
144
145
  return .2126 * a(n) + .7152 * a(r) + .0722 * a(i) > .179 ? "black" : "white";
145
146
  }
146
- function S(e, t) {
147
- return e === "white" || e === "black" ? e : ke(t);
148
- }
149
147
  function Ae(e, t) {
148
+ return e === "white" || e === "black" ? e : E(t);
149
+ }
150
+ function je(e, t) {
150
151
  if (e) return {
151
152
  "--chatbot-main-color": e,
152
153
  "--chatbot-contrast-color": t,
@@ -155,10 +156,10 @@ function Ae(e, t) {
155
156
  "--input-focus-color": "var(--color-brand-graphic)"
156
157
  };
157
158
  }
158
- function C(e, t) {
159
+ function Me(e, t) {
159
160
  if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
160
161
  }
161
- function je(e) {
162
+ function Ne(e) {
162
163
  if (e !== void 0) {
163
164
  if (typeof e == "string") return e.trim() || void 0;
164
165
  try {
@@ -169,10 +170,10 @@ function je(e) {
169
170
  }
170
171
  }
171
172
  }
172
- function w(e) {
173
- return je(e) !== void 0;
173
+ function Pe(e) {
174
+ return Ne(e) !== void 0;
174
175
  }
175
- function Me(e, t) {
176
+ function Fe(e, t) {
176
177
  let n = e?.input;
177
178
  if (typeof t == "string") {
178
179
  let e = n?.question ?? n?.steps?.[0]?.question;
@@ -184,14 +185,14 @@ function Me(e, t) {
184
185
  return i ? `${i} ${n}` : n;
185
186
  }).join(". ");
186
187
  }
187
- function Ne(e) {
188
+ function Ie(e) {
188
189
  return e?.options ? e.options.map((e) => ({
189
190
  label: e.label,
190
191
  value: e.label,
191
192
  description: e.description
192
193
  })) : [];
193
194
  }
194
- function Pe(e, t) {
195
+ function Le(e, t) {
195
196
  let n = {};
196
197
  if (t == null) return n;
197
198
  if (typeof t == "string") return e.length === 1 && (n[0] = t), n;
@@ -207,12 +208,12 @@ function Pe(e, t) {
207
208
  for (let [e, n] of Object.entries(t)) n !== void 0 && r(e, n);
208
209
  return n;
209
210
  }
210
- var Fe = [
211
+ var D = [
211
212
  "tool-perplexity_search",
212
213
  "tool-parallel_search",
213
214
  "tool-web_search",
214
215
  "tool-google_search"
215
- ], Ie = /* @__PURE__ */ new Set([
216
+ ], Re = /* @__PURE__ */ new Set([
216
217
  "tool-searchInKnowledgeBase",
217
218
  "tool-retrieveRevisedAnswers",
218
219
  "tool-expandChunkContext",
@@ -221,78 +222,114 @@ var Fe = [
221
222
  "tool-geocode",
222
223
  "tool-recallUserMemory",
223
224
  "tool-saveUserMemory",
224
- ...Fe
225
+ ...D
225
226
  ]);
226
- function Le(e) {
227
- return _(e) && Ie.has(e.type);
227
+ function ze(e) {
228
+ return b(e) && Re.has(e.type);
228
229
  }
229
- var Re = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, T = (e, ...t) => {
230
+ var Be = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, O = (e, ...t) => {
230
231
  for (let n of t) {
231
232
  let t = e?.[n];
232
233
  if (typeof t == "string" && t.trim()) return t;
233
234
  }
234
235
  };
235
- function ze(e) {
236
- if (!_(e)) return;
237
- let t = Re("input" in e ? e.input : void 0), n = Re("output" in e ? e.output : void 0);
238
- if (e.type === "tool-searchInKnowledgeBase" || Fe.includes(e.type)) {
236
+ function Ve(e) {
237
+ if (!b(e)) return;
238
+ let t = Be("input" in e ? e.input : void 0), n = Be("output" in e ? e.output : void 0);
239
+ if (e.type === "tool-searchInKnowledgeBase" || D.includes(e.type)) {
239
240
  let e = t?.queries;
240
241
  if (Array.isArray(e)) {
241
242
  let t = e.filter((e) => typeof e == "string" && !!e.trim());
242
243
  return t.length ? t.join(" · ") : void 0;
243
244
  }
244
- return T(t, "query", "objective");
245
+ return O(t, "query", "objective");
245
246
  }
246
- if (e.type === "tool-retrieveRevisedAnswers") return T(t, "query");
247
- if (e.type === "tool-getWeather") return T(n, "location") ?? T(t, "locationName");
248
- if (e.type === "tool-geocode") return T(t, "locationName");
249
- if (e.type === "tool-expandChunkContext") return T(n, "documentName");
250
- if (e.type === "tool-readDocumentFile") return T(n, "name");
247
+ if (e.type === "tool-retrieveRevisedAnswers") return O(t, "query");
248
+ if (e.type === "tool-getWeather") return O(n, "location") ?? O(t, "locationName");
249
+ if (e.type === "tool-geocode") return O(t, "locationName");
250
+ if (e.type === "tool-expandChunkContext") return O(n, "documentName");
251
+ if (e.type === "tool-readDocumentFile") return O(n, "name");
251
252
  if (e.type === "tool-readSpreadsheet") {
252
- let e = T(t, "sheet"), n = T(t, "range");
253
+ let e = O(t, "sheet"), n = O(t, "range");
253
254
  return e && n ? `${e}!${n}` : e;
254
255
  }
255
- if (e.type === "tool-editSpreadsheet") return T(n, "filename");
256
- if (e.type === "tool-querySpreadsheet") return T(n, "file");
257
- if (e.type === "tool-recallUserMemory") return T(t, "query");
258
- if (e.type === "tool-saveUserMemory") return T(t, "content", "query");
259
- }
260
- function Be(e) {
261
- if (_(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-requestAccountLink" ? "ri:link" : e.type === "tool-unlinkAccount" ? "ri:link-unlink" : e.type === "tool-perplexity_search" || e.type === "tool-parallel_search" || e.type === "tool-web_search" || e.type === "tool-google_search" ? "ri:global-line" : "ri:tools-line";
262
- if (fe(e)) return "ri:lightbulb-line";
263
- if (ce(e)) return "ri:double-quotes-r";
256
+ if (e.type === "tool-editSpreadsheet") return O(n, "filename");
257
+ if (e.type === "tool-querySpreadsheet") return O(n, "file");
258
+ if (e.type === "tool-recallUserMemory") return O(t, "query");
259
+ if (e.type === "tool-saveUserMemory") return O(t, "content", "query");
260
+ }
261
+ function He(e) {
262
+ if (b(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-requestAccountLink" ? "ri:link" : e.type === "tool-unlinkAccount" ? "ri:link-unlink" : e.type === "tool-perplexity_search" || e.type === "tool-parallel_search" || e.type === "tool-web_search" || e.type === "tool-google_search" ? "ri:global-line" : "ri:tools-line";
263
+ if (me(e)) return "ri:lightbulb-line";
264
+ if (ue(e)) return "ri:double-quotes-r";
265
+ }
266
+ var Ue = [
267
+ ne,
268
+ m,
269
+ re
270
+ ];
271
+ function We(e, { t, te: n }) {
272
+ if (n(`agent.tool.${e}`)) return t(`agent.tool.${e}`);
273
+ let r = Ue.find((t) => e.startsWith(t)), i = r ? e.slice(r.length) : e;
274
+ return h(ie(i).trim().toLowerCase());
275
+ }
276
+ var Ge = {
277
+ custom: (e) => e("messagePart.type.custom"),
278
+ data: (e) => e("messagePart.type.data"),
279
+ file: (e) => e("messagePart.type.file"),
280
+ reasoning: (e) => e("messagePart.type.reasoning"),
281
+ "source-document": (e) => e("messagePart.type.sourceDocument"),
282
+ "source-url": (e) => e("messagePart.type.sourceUrl"),
283
+ "step-start": (e) => e("messagePart.type.stepStart"),
284
+ text: (e) => e("messagePart.type.text")
285
+ };
286
+ function Ke(e, t) {
287
+ if (b(e)) return We(de(e), t);
288
+ if (e.type === "dynamic-tool") return We(e.toolName, t);
289
+ let n = Ge[e.type.startsWith("data-") ? "data" : e.type];
290
+ return n ? n(t.t) : h(ie(e.type));
291
+ }
292
+ function qe(e, t) {
293
+ if (!e) return e;
294
+ let n = {
295
+ Intent: t("conversationSummary.intent"),
296
+ "Topics covered": t("conversationSummary.topicsCovered"),
297
+ "Key facts": t("conversationSummary.keyFacts"),
298
+ "Open questions": t("conversationSummary.openQuestions")
299
+ };
300
+ return e.replace(/\*\*(Intent|Topics covered|Key facts|Open questions)(:?)\*\*/g, (e, t, r) => `**${n[t]}${r}**`);
264
301
  }
265
- function Ve(e, t) {
266
- return _(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : t.type === "tool-requestAccountLink" ? e("messagePart.requestAccountLink") : t.type === "tool-unlinkAccount" ? e("messagePart.unlinkAccount") : Fe.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : fe(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
302
+ function Je(e, t) {
303
+ return b(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : t.type === "tool-requestAccountLink" ? e("messagePart.requestAccountLink") : t.type === "tool-unlinkAccount" ? e("messagePart.unlinkAccount") : D.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : me(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
267
304
  }
268
305
  //#endregion
269
306
  //#region ../../node_modules/.pnpm/remend@1.4.0/node_modules/remend/dist/index.js
270
- var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwnPropertyDescriptors, Ge = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, qe = Object.prototype.propertyIsEnumerable, Je = (e, t, n) => t in e ? He(e, t, {
307
+ var Ye = Object.defineProperty, Xe = Object.defineProperties, Ze = Object.getOwnPropertyDescriptors, Qe = Object.getOwnPropertySymbols, $e = Object.prototype.hasOwnProperty, et = Object.prototype.propertyIsEnumerable, tt = (e, t, n) => t in e ? Ye(e, t, {
271
308
  enumerable: !0,
272
309
  configurable: !0,
273
310
  writable: !0,
274
311
  value: n
275
- }) : e[t] = n, Ye = (e, t) => {
276
- for (var n in t ||= {}) Ke.call(t, n) && Je(e, n, t[n]);
277
- if (Ge) for (var n of Ge(t)) qe.call(t, n) && Je(e, n, t[n]);
312
+ }) : e[t] = n, nt = (e, t) => {
313
+ for (var n in t ||= {}) $e.call(t, n) && tt(e, n, t[n]);
314
+ if (Qe) for (var n of Qe(t)) et.call(t, n) && tt(e, n, t[n]);
278
315
  return e;
279
- }, Xe = (e, t) => Ue(e, We(t)), E = {
316
+ }, rt = (e, t) => Xe(e, Ze(t)), k = {
280
317
  PROSE: 0,
281
318
  FENCE_MARKER: 1,
282
319
  FENCE_INFO: 2,
283
320
  FENCE_BODY: 3,
284
321
  CODE_SPAN: 4,
285
322
  CODE_SPAN_OPEN: 5
286
- }, Ze = /^(`{3,}|~{3,})(.*)$/, Qe = (e) => e !== void 0 && e >= "0" && e <= "9", $e = (e, t) => {
323
+ }, it = /^(`{3,}|~{3,})(.*)$/, A = (e) => e !== void 0 && e >= "0" && e <= "9", at = (e, t) => {
287
324
  let n = t;
288
325
  if (e[n] === "-" || e[n] === "*" || e[n] === "+") n += 1;
289
326
  else {
290
- for (; Qe(e[n]) && n - t < 9;) n += 1;
327
+ for (; A(e[n]) && n - t < 9;) n += 1;
291
328
  if (n === t || e[n] !== "." && e[n] !== ")") return -1;
292
329
  n += 1;
293
330
  }
294
331
  return e[n] === " " ? n + 1 : -1;
295
- }, et = (e, t, n) => {
332
+ }, ot = (e, t, n) => {
296
333
  let r = 0, i = t, a = !1, o = t;
297
334
  for (;;) {
298
335
  for (; o < n && e[o] === " ";) o += 1;
@@ -300,7 +337,7 @@ var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwn
300
337
  r += 1, o += e[o + 1] === " " ? 2 : 1, i = o, a = !1;
301
338
  continue;
302
339
  }
303
- let t = o < n ? $e(e, o) : -1;
340
+ let t = o < n ? at(e, o) : -1;
304
341
  if (t === -1) return {
305
342
  contentStart: o,
306
343
  listIndent: a ? o - i : 0,
@@ -308,7 +345,7 @@ var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwn
308
345
  };
309
346
  o = t, a = !0;
310
347
  }
311
- }, tt = (e, t, n, r) => {
348
+ }, st = (e, t, n, r) => {
312
349
  let i = t;
313
350
  for (let t = 0; t < r; t += 1) {
314
351
  for (; i < n && e[i] === " ";) i += 1;
@@ -316,10 +353,10 @@ var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwn
316
353
  i += 1, e[i] === " " && (i += 1);
317
354
  }
318
355
  return i;
319
- }, nt = (e, t, n, r, i) => {
356
+ }, ct = (e, t, n, r, i) => {
320
357
  let a = t + r;
321
- e.fill(E.FENCE_MARKER, a, a + i), e.fill(E.FENCE_INFO, a + i, Math.min(n + 1, e.length));
322
- }, rt = (e, t, n, r) => {
358
+ e.fill(k.FENCE_MARKER, a, a + i), e.fill(k.FENCE_INFO, a + i, Math.min(n + 1, e.length));
359
+ }, lt = (e, t, n, r) => {
323
360
  let i = t;
324
361
  for (; i < n && e[i] === " ";) i += 1;
325
362
  let a = 0;
@@ -330,62 +367,62 @@ var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwn
330
367
  i += 1;
331
368
  }
332
369
  return !0;
333
- }, it = (e, t, n, r) => {
334
- let i = r > n && e[r - 1] === "\r" ? r - 1 : r, a = et(e, n, i), o = e.slice(a.contentStart, i).match(Ze);
370
+ }, ut = (e, t, n, r) => {
371
+ let i = r > n && e[r - 1] === "\r" ? r - 1 : r, a = ot(e, n, i), o = e.slice(a.contentStart, i).match(it);
335
372
  if (!o) return null;
336
373
  let [, s, c] = o, l = s[0];
337
- return l === "`" && c.includes("`") ? null : (nt(t, n, r, a.contentStart - n, s.length), {
374
+ return l === "`" && c.includes("`") ? null : (ct(t, n, r, a.contentStart - n, s.length), {
338
375
  char: l,
339
376
  length: s.length,
340
377
  listIndent: a.listIndent,
341
378
  quoteDepth: a.quoteDepth
342
379
  });
343
- }, at = (e, t, n, r) => {
344
- let i = tt(e, t, n, r.quoteDepth);
380
+ }, dt = (e, t, n, r) => {
381
+ let i = st(e, t, n, r.quoteDepth);
345
382
  if (i === -1 || r.listIndent === 0) return i;
346
383
  let a = i;
347
384
  for (; a < n && e[a] === " ";) a += 1;
348
385
  return a === n || e[a] === "\r" && a + 1 === n || a - i >= r.listIndent ? i : -1;
349
- }, ot = (e, t) => {
386
+ }, ft = (e, t) => {
350
387
  let n = e.length, r = null, i = 0;
351
388
  for (; i < n;) {
352
389
  let a = e.indexOf("\n", i);
353
390
  a === -1 && (a = n);
354
- let o = r ? at(e, i, a, r) : -1;
355
- r && o === -1 && (r = null), r ? rt(e, o, a, r) ? (t.fill(E.FENCE_MARKER, i, a), r = null) : t.fill(E.FENCE_BODY, i, Math.min(a + 1, n)) : r = it(e, t, i, a), i = a + 1;
391
+ let o = r ? dt(e, i, a, r) : -1;
392
+ r && o === -1 && (r = null), r ? lt(e, o, a, r) ? (t.fill(k.FENCE_MARKER, i, a), r = null) : t.fill(k.FENCE_BODY, i, Math.min(a + 1, n)) : r = ut(e, t, i, a), i = a + 1;
356
393
  }
357
394
  return r;
358
- }, st = (e, t) => {
395
+ }, pt = (e, t) => {
359
396
  let n = t + 1;
360
397
  for (; n < e.length && e[n] === "`";) n += 1;
361
398
  return n;
362
- }, D = (e, t) => {
399
+ }, mt = (e, t) => {
363
400
  let n = t + 1;
364
401
  for (; n < e.length && (e[n] === " " || e[n] === " " || e[n] === "\r");) n += 1;
365
402
  return n < e.length && e[n] === "\n";
366
- }, ct = (e, t, n) => {
403
+ }, ht = (e, t, n) => {
367
404
  let r = n;
368
405
  for (;;) {
369
406
  let n = e.indexOf("`", r);
370
407
  if (n === -1) return -1;
371
- let i = n > r && e[n - 1] === "\\" && t[n - 1] === E.PROSE;
372
- if (t[n] === E.PROSE && !i) return n;
408
+ let i = n > r && e[n - 1] === "\\" && t[n - 1] === k.PROSE;
409
+ if (t[n] === k.PROSE && !i) return n;
373
410
  r = n + 1;
374
411
  }
375
- }, lt = (e, t) => {
412
+ }, j = (e, t) => {
376
413
  let n = e.length, r = -1, i = 0, a = 0;
377
414
  for (; a < n;) {
378
415
  if (r < 0) {
379
- if (a = ct(e, t, a), a === -1) break;
380
- let n = st(e, a);
416
+ if (a = ht(e, t, a), a === -1) break;
417
+ let n = pt(e, a);
381
418
  r = a, i = n - a, a = n;
382
419
  continue;
383
420
  }
384
- if (t[a] !== E.PROSE) {
385
- t.fill(E.CODE_SPAN_OPEN, r, a), r = -1, a += 1;
421
+ if (t[a] !== k.PROSE) {
422
+ t.fill(k.CODE_SPAN_OPEN, r, a), r = -1, a += 1;
386
423
  continue;
387
424
  }
388
- if (e[a] === "\n" && D(e, a)) {
425
+ if (e[a] === "\n" && mt(e, a)) {
389
426
  r = -1, a += 1;
390
427
  continue;
391
428
  }
@@ -393,79 +430,79 @@ var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwn
393
430
  a += 1;
394
431
  continue;
395
432
  }
396
- let n = st(e, a);
397
- n - a === i && (t.fill(E.CODE_SPAN, r, n), r = -1), a = n;
433
+ let n = pt(e, a);
434
+ n - a === i && (t.fill(k.CODE_SPAN, r, n), r = -1), a = n;
398
435
  }
399
- return r >= 0 ? (t.fill(E.CODE_SPAN_OPEN, r, n), {
436
+ return r >= 0 ? (t.fill(k.CODE_SPAN_OPEN, r, n), {
400
437
  start: r,
401
438
  runLength: i
402
439
  }) : null;
403
- }, ut = (e) => {
440
+ }, gt = (e) => {
404
441
  let t = new Uint8Array(e.length);
405
442
  return {
406
443
  text: e,
407
444
  regions: t,
408
- openFence: ot(e, t),
409
- openSpan: lt(e, t),
445
+ openFence: ft(e, t),
446
+ openSpan: j(e, t),
410
447
  mathMask: null,
411
448
  linkUrlMask: null,
412
449
  htmlTagMask: null
413
450
  };
414
- }, dt = null, ft = null, O = (e) => {
415
- if (ft !== null && e === dt) return ft;
416
- let t = ut(e);
417
- return dt = e, ft = t, t;
418
- }, pt = () => {
419
- dt = null, ft = null;
420
- }, mt = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== E.PROSE, ht = (e, t) => e.regions[t] === E.CODE_SPAN, gt = (e, t) => {
421
- let n = O(e), r = t + t, i = 0;
422
- for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] === E.PROSE ? (i += 1, t += 2) : t += 1;
451
+ }, _t = null, vt = null, M = (e) => {
452
+ if (vt !== null && e === _t) return vt;
453
+ let t = gt(e);
454
+ return _t = e, vt = t, t;
455
+ }, yt = () => {
456
+ _t = null, vt = null;
457
+ }, bt = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== k.PROSE, xt = (e, t) => e.regions[t] === k.CODE_SPAN, St = (e, t) => {
458
+ let n = M(e), r = t + t, i = 0;
459
+ for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] === k.PROSE ? (i += 1, t += 2) : t += 1;
423
460
  return i;
424
- }, _t = /* @__PURE__ */ new Uint8Array(), k = (e) => e === "inlineLatex" || e === "blockLatex", vt = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, yt = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar", bt = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), xt = (e, t, n) => {
461
+ }, Ct = /* @__PURE__ */ new Uint8Array(), wt = (e) => e === "inlineLatex" || e === "blockLatex", Tt = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, Et = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar", Dt = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), Ot = (e, t, n) => {
425
462
  let r = e[t + 1];
426
463
  if (e[t] === "\\") {
427
464
  if (r === "$") return {
428
465
  context: n,
429
466
  length: 2
430
467
  };
431
- let e = vt(n, r);
468
+ let e = Tt(n, r);
432
469
  return e === null ? null : {
433
470
  context: e,
434
471
  length: 2
435
472
  };
436
473
  }
437
- if (e[t] === "$" && !k(n)) {
474
+ if (e[t] === "$" && !wt(n)) {
438
475
  let e = r === "$";
439
476
  return {
440
- context: yt(n, e),
477
+ context: Et(n, e),
441
478
  length: e ? 2 : 1
442
479
  };
443
480
  }
444
481
  return null;
445
- }, St = (e) => {
482
+ }, kt = (e) => {
446
483
  let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = "none", o = 0;
447
484
  for (; o < r;) {
448
485
  i[o] = a === "none" ? 0 : 1;
449
- let e = n[o] === E.PROSE ? xt(t, o, a) : null;
486
+ let e = n[o] === k.PROSE ? Ot(t, o, a) : null;
450
487
  e === null ? o += 1 : (a = e.context, e.length === 2 && (i[o + 1] = a === "none" ? 0 : 1), o += e.length);
451
488
  }
452
489
  return i;
453
- }, Ct = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = bt(e.text) ? St(e) : _t), e.mathMask[t] === 1), wt = (e, t, n, r) => {
490
+ }, At = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = Dt(e.text) ? kt(e) : Ct), e.mathMask[t] === 1), jt = (e, t, n, r) => {
454
491
  let { text: i, regions: a } = e, o = new Uint8Array(n - t), s = 0;
455
- for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] === E.PROSE && (s = 1), o[e - t] = s;
492
+ for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] === k.PROSE && (s = 1), o[e - t] = s;
456
493
  let c = !1;
457
- for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] === E.PROSE && (i[e] === ")" ? c = !1 : i[e] === "(" && (c = e > 0 && i[e - 1] === "]"));
458
- }, Tt = (e) => {
494
+ for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] === k.PROSE && (i[e] === ")" ? c = !1 : i[e] === "(" && (c = e > 0 && i[e - 1] === "]"));
495
+ }, Mt = (e) => {
459
496
  let { text: t } = e, n = t.length, r = new Uint8Array(n), i = 0;
460
497
  for (; i < n;) {
461
498
  let a = t.indexOf("\n", i);
462
- a === -1 && (a = n), wt(e, i, a, r), i = a + 1;
499
+ a === -1 && (a = n), jt(e, i, a, r), i = a + 1;
463
500
  }
464
501
  return r;
465
- }, Et = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.linkUrlMask === null && (e.linkUrlMask = e.text.includes("](") ? Tt(e) : _t), e.linkUrlMask[t] === 1), Dt = (e) => {
502
+ }, Nt = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.linkUrlMask === null && (e.linkUrlMask = e.text.includes("](") ? Mt(e) : Ct), e.linkUrlMask[t] === 1), Pt = (e) => {
466
503
  let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = !1;
467
504
  for (let e = 0; e < r; e += 1) if (t[e] === "\n") a = !1;
468
- else if (i[e] = +!!a, n[e] === E.PROSE) {
505
+ else if (i[e] = +!!a, n[e] === k.PROSE) {
469
506
  if (t[e] === ">") a = !1;
470
507
  else if (t[e] === "<") {
471
508
  let n = t[e + 1];
@@ -473,56 +510,56 @@ var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwn
473
510
  }
474
511
  }
475
512
  return i;
476
- }, A = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? Dt(e) : _t), e.htmlTagMask[t] === 1), j = (e, t) => mt(O(e), t), M = (e, t) => ht(O(e), t), Ot = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, kt = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(Ot, (t, n, r, i) => j(e, i) ? t : `${n}\\>${r}`), N = (e, { delimiter: t, markerLength: n, regex: r }) => {
513
+ }, Ft = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? Pt(e) : Ct), e.htmlTagMask[t] === 1), N = (e, t) => bt(M(e), t), It = (e, t) => xt(M(e), t), Lt = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, Rt = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(Lt, (t, n, r, i) => N(e, i) ? t : `${n}\\>${r}`), P = (e, { delimiter: t, markerLength: n, regex: r }) => {
477
514
  let i = e.lastIndexOf(t, e.length - 2), a = i === -1 ? e.length - 1 : i;
478
515
  return e.slice(Math.max(0, a - n + 1)).match(r);
479
- }, At = {
516
+ }, zt = {
480
517
  delimiter: "*",
481
518
  markerLength: 2,
482
519
  regex: /(\*\*)([^*]*\*?)$/
483
- }, jt = {
520
+ }, Bt = {
484
521
  delimiter: "_",
485
522
  markerLength: 2,
486
523
  regex: /(__)([^_]*?)$/
487
- }, Mt = {
524
+ }, Vt = {
488
525
  delimiter: "*",
489
526
  markerLength: 3,
490
527
  regex: /(\*\*\*)([^*]*?)$/
491
- }, Nt = {
528
+ }, Ht = {
492
529
  delimiter: "*",
493
530
  markerLength: 1,
494
531
  regex: /(\*)([^*]*?)$/
495
- }, Pt = {
532
+ }, Ut = {
496
533
  delimiter: "_",
497
534
  markerLength: 1,
498
535
  regex: /(_)([^_]*?)$/
499
- }, Ft = {
536
+ }, Wt = {
500
537
  delimiter: "~",
501
538
  markerLength: 2,
502
539
  regex: /(~~)([^~]*?)$/
503
- }, It = {
540
+ }, Gt = {
504
541
  delimiter: "_",
505
542
  markerLength: 2,
506
543
  regex: /(__)([^_]+)_$/
507
- }, Lt = {
544
+ }, F = {
508
545
  delimiter: "~",
509
546
  markerLength: 2,
510
547
  regex: /(~~)([^~]+)~$/
511
- }, Rt = /^[\s_~*`]*$/, zt = /^[\s]*[-*+][\s]+$/, Bt = /[\p{L}\p{N}_]/u, Vt = /^\*{4,}$/, P = (e) => {
548
+ }, Kt = /^[\s_~*`]*$/, qt = /^[\s]*[-*+][\s]+$/, Jt = /[\p{L}\p{N}_]/u, Yt = /^\*{4,}$/, I = (e) => {
512
549
  if (!e) return !1;
513
550
  let t = e.charCodeAt(0);
514
- return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || Bt.test(e);
515
- }, Ht = (e, t) => {
551
+ return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || Jt.test(e);
552
+ }, Xt = (e, t) => {
516
553
  let n = 1;
517
554
  for (let r = t - 1; r >= 0; --r) if (e[r] === "]") n += 1;
518
555
  else if (e[r] === "[" && (--n, n === 0)) return r;
519
556
  return -1;
520
- }, Ut = (e, t) => {
557
+ }, Zt = (e, t) => {
521
558
  let n = 1;
522
559
  for (let r = t + 1; r < e.length; r += 1) if (e[r] === "[") n += 1;
523
560
  else if (e[r] === "]" && (--n, n === 0)) return r;
524
561
  return -1;
525
- }, F = (e, t) => Ct(O(e), t), Wt = (e, t, n) => {
562
+ }, Qt = (e, t) => At(M(e), t), $t = (e, t, n) => {
526
563
  let r = 0;
527
564
  for (let n = t - 1; n >= 0; --n) if (e[n] === "\n") {
528
565
  r = n + 1;
@@ -540,184 +577,184 @@ var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwn
540
577
  break;
541
578
  }
542
579
  return o >= 3 && !s;
543
- }, I = (e, t, n, r) => n === "\\" || Ct(e, t) ? !0 : n !== "*" && r === "*" ? (t < e.text.length - 2 ? e.text[t + 2] : "") !== "*" : n === "*" || (!n || n === " " || n === " " || n === "\n") && (!r || r === " " || r === " " || r === "\n"), Gt = (e) => e === " " || e === " " || e === "\n", Kt = (e, t) => !!(e && t && P(e) && P(t)), qt = (e, t, n, r) => {
544
- let i = Kt(e, t), a = !!t && !Gt(t), o = !!e && !Gt(e);
580
+ }, en = (e, t, n, r) => n === "\\" || At(e, t) ? !0 : n !== "*" && r === "*" ? (t < e.text.length - 2 ? e.text[t + 2] : "") !== "*" : n === "*" || (!n || n === " " || n === " " || n === "\n") && (!r || r === " " || r === " " || r === "\n"), tn = (e) => e === " " || e === " " || e === "\n", nn = (e, t) => !!(e && t && I(e) && I(t)), rn = (e, t, n, r) => {
581
+ let i = nn(e, t), a = !!t && !tn(t), o = !!e && !tn(e);
545
582
  return i && n % 2 == 0 && !r ? { count: !1 } : o && n % 2 == 1 || a ? {
546
583
  count: !0,
547
584
  inWordAsteriskChain: i
548
585
  } : { count: !1 };
549
- }, Jt = (e) => {
550
- let t = O(e), n = 0, r = !1, i = e.length;
586
+ }, an = (e) => {
587
+ let t = M(e), n = 0, r = !1, i = e.length;
551
588
  for (let a = 0; a < i; a += 1) {
552
- if (e[a] !== "*" || t.regions[a] !== E.PROSE) {
553
- P(e[a]) || (r = !1);
589
+ if (e[a] !== "*" || t.regions[a] !== k.PROSE) {
590
+ I(e[a]) || (r = !1);
554
591
  continue;
555
592
  }
556
593
  let o = a > 0 ? e[a - 1] : "", s = a < i - 1 ? e[a + 1] : "";
557
- if (I(t, a, o, s)) continue;
558
- let c = qt(o, s, n, r);
594
+ if (en(t, a, o, s)) continue;
595
+ let c = rn(o, s, n, r);
559
596
  c.count && (n += 1, r = c.inWordAsteriskChain);
560
597
  }
561
598
  return n;
562
- }, Yt = (e, t, n, r) => !!(n === "\\" || Ct(e, t) || Et(e, t) || A(e, t) || n === "_" || r === "_" || n && r && P(n) && P(r)), Xt = (e) => {
563
- let t = O(e), n = 0, r = e.length;
599
+ }, on = (e, t, n, r) => !!(n === "\\" || At(e, t) || Nt(e, t) || Ft(e, t) || n === "_" || r === "_" || n && r && I(n) && I(r)), sn = (e) => {
600
+ let t = M(e), n = 0, r = e.length;
564
601
  for (let i = 0; i < r; i += 1) {
565
- if (e[i] !== "_" || t.regions[i] !== E.PROSE) continue;
602
+ if (e[i] !== "_" || t.regions[i] !== k.PROSE) continue;
566
603
  let a = i > 0 ? e[i - 1] : "", o = i < r - 1 ? e[i + 1] : "";
567
- Yt(t, i, a, o) || (n += 1);
604
+ on(t, i, a, o) || (n += 1);
568
605
  }
569
606
  return n;
570
- }, Zt = (e) => {
571
- let t = O(e), n = 0, r = 0;
572
- for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] === E.PROSE ? r += 1 : (r >= 3 && (n += Math.floor(r / 3)), r = 0);
607
+ }, cn = (e) => {
608
+ let t = M(e), n = 0, r = 0;
609
+ for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] === k.PROSE ? r += 1 : (r >= 3 && (n += Math.floor(r / 3)), r = 0);
573
610
  return r >= 3 && (n += Math.floor(r / 3)), n;
574
- }, Qt = (e) => gt(e, "*"), $t = (e) => e === "" || e === " " || e === " " || e === "\n", en = (e, t, n, r, i) => {
575
- if (!($t(n) && $t(r))) return !1;
611
+ }, ln = (e) => St(e, "*"), un = (e) => e === "" || e === " " || e === " " || e === "\n", dn = (e, t, n, r, i) => {
612
+ if (!(un(n) && un(r))) return !1;
576
613
  if (t > i.lineEnd) {
577
614
  let n = e.indexOf("\n", t);
578
- i.lineEnd = n === -1 ? e.length : n, i.result = Wt(e, t, "_");
615
+ i.lineEnd = n === -1 ? e.length : n, i.result = $t(e, t, "_");
579
616
  }
580
617
  return i.result;
581
- }, tn = (e, t, n, r) => {
618
+ }, fn = (e, t, n, r) => {
582
619
  let i = e.text, a = t, o = !1;
583
620
  a > 0 && i[a - 1] === "\\" && (a += 1, o = !0);
584
621
  let s = n - a;
585
622
  if (s < 2) return !1;
586
623
  let c = a > 0 ? i[a - 1] : "", l = o ? "\\" : c, u = n < i.length ? i[n] : "";
587
- return P(l) && P(u) || en(i, a, l, u, r) || Ct(e, a) || Et(e, a) || A(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
588
- }, nn = (e) => {
589
- let t = O(e), n = e.length, r = {
624
+ return I(l) && I(u) || dn(i, a, l, u, r) || At(e, a) || Nt(e, a) || Ft(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
625
+ }, pn = (e) => {
626
+ let t = M(e), n = e.length, r = {
590
627
  lineEnd: -1,
591
628
  result: !1
592
629
  }, i = !1, a = 0;
593
630
  for (; a < n;) {
594
- if (e[a] !== "_" || t.regions[a] !== E.PROSE) {
631
+ if (e[a] !== "_" || t.regions[a] !== k.PROSE) {
595
632
  a += 1;
596
633
  continue;
597
634
  }
598
635
  let o = a, s = a + 1;
599
- for (; s < n && e[s] === "_" && t.regions[s] === E.PROSE;) s += 1;
600
- a = s, tn(t, o, s, r) && (i = !i);
636
+ for (; s < n && e[s] === "_" && t.regions[s] === k.PROSE;) s += 1;
637
+ a = s, fn(t, o, s, r) && (i = !i);
601
638
  }
602
639
  return i;
603
- }, rn = (e, t, n) => {
604
- if (!t || Rt.test(t)) return !0;
640
+ }, mn = (e, t, n) => {
641
+ if (!t || Kt.test(t)) return !0;
605
642
  let r = e.substring(0, n).lastIndexOf("\n"), i = r === -1 ? 0 : r + 1, a = e.substring(i, n);
606
- return zt.test(a) && t.includes("\n") ? !0 : Wt(e, n, "*");
607
- }, an = (e) => {
608
- let t = N(e, At);
643
+ return qt.test(a) && t.includes("\n") ? !0 : $t(e, n, "*");
644
+ }, hn = (e) => {
645
+ let t = P(e, zt);
609
646
  if (!t) return e;
610
647
  let n = t[2], r = e.lastIndexOf(t[1]);
611
- return j(e, r) || M(e, r) || rn(e, n, r) ? e : Qt(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
612
- }, on = (e, t, n) => {
613
- if (!t || Rt.test(t)) return !0;
648
+ return N(e, r) || It(e, r) || mn(e, n, r) ? e : ln(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
649
+ }, gn = (e, t, n) => {
650
+ if (!t || Kt.test(t)) return !0;
614
651
  let r = e.substring(0, n).lastIndexOf("\n"), i = r === -1 ? 0 : r + 1, a = e.substring(i, n);
615
- return zt.test(a) && t.includes("\n") ? !0 : Wt(e, n, "_");
616
- }, sn = (e) => {
617
- let t = N(e, jt);
652
+ return qt.test(a) && t.includes("\n") ? !0 : $t(e, n, "_");
653
+ }, _n = (e) => {
654
+ let t = P(e, Bt);
618
655
  if (!t) {
619
- let t = N(e, It);
656
+ let t = P(e, Gt);
620
657
  if (t) {
621
658
  let n = e.lastIndexOf(t[1]);
622
- if (!(j(e, n) || M(e, n)) && nn(e)) return `${e}_`;
659
+ if (!(N(e, n) || It(e, n)) && pn(e)) return `${e}_`;
623
660
  }
624
661
  return e;
625
662
  }
626
663
  let n = t[2], r = e.lastIndexOf(t[1]);
627
- return j(e, r) || M(e, r) || on(e, n, r) ? e : nn(e) ? `${e}__` : e;
628
- }, cn = (e, t) => {
664
+ return N(e, r) || It(e, r) || gn(e, n, r) ? e : pn(e) ? `${e}__` : e;
665
+ }, vn = (e, t) => {
629
666
  let { text: n } = e;
630
- return n[t] === "*" && e.regions[t] === E.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !Ct(e, t);
631
- }, ln = (e) => {
632
- let t = O(e);
667
+ return n[t] === "*" && e.regions[t] === k.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !At(e, t);
668
+ }, yn = (e) => {
669
+ let t = M(e);
633
670
  for (let n = e.indexOf("*"); n !== -1; n = e.indexOf("*", n + 1)) {
634
- if (!cn(t, n)) continue;
635
- let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || Gt(r), o = !i || Gt(i);
636
- if (!(a && o) && !(r && i && P(r) && P(i)) && !o) return n;
671
+ if (!vn(t, n)) continue;
672
+ let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || tn(r), o = !i || tn(i);
673
+ if (!(a && o) && !(r && i && I(r) && I(i)) && !o) return n;
637
674
  }
638
675
  return -1;
639
- }, un = (e) => {
640
- if (!N(e, Nt)) return e;
641
- let t = ln(e);
642
- if (t === -1 || j(e, t) || M(e, t)) return e;
676
+ }, bn = (e) => {
677
+ if (!P(e, Ht)) return e;
678
+ let t = yn(e);
679
+ if (t === -1 || N(e, t) || It(e, t)) return e;
643
680
  let n = e.substring(t + 1);
644
- return !n || Rt.test(n) ? e : Jt(e) % 2 == 1 ? `${e}*` : e;
645
- }, dn = (e) => {
646
- let t = O(e);
647
- for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === E.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !Ct(t, n) && !Et(t, n)) {
681
+ return !n || Kt.test(n) ? e : an(e) % 2 == 1 ? `${e}*` : e;
682
+ }, xn = (e) => {
683
+ let t = M(e);
684
+ for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === k.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !At(t, n) && !Nt(t, n)) {
648
685
  let t = n > 0 ? e[n - 1] : "", r = n < e.length - 1 ? e[n + 1] : "";
649
- if (t && r && P(t) && P(r)) continue;
686
+ if (t && r && I(t) && I(r)) continue;
650
687
  return n;
651
688
  }
652
689
  return -1;
653
- }, fn = (e) => {
690
+ }, Sn = (e) => {
654
691
  let t = e.length;
655
692
  for (; t > 0 && e[t - 1] === "\n";) --t;
656
693
  return t < e.length ? `${e.slice(0, t)}_${e.slice(t)}` : `${e}_`;
657
- }, pn = (e) => {
694
+ }, Cn = (e) => {
658
695
  if (!e.endsWith("**")) return null;
659
696
  let t = e.slice(0, -2);
660
- if (Qt(t) % 2 != 1) return null;
661
- let n = t.indexOf("**"), r = dn(t);
697
+ if (ln(t) % 2 != 1) return null;
698
+ let n = t.indexOf("**"), r = xn(t);
662
699
  return n !== -1 && r !== -1 && n < r ? `${t}_**` : null;
663
- }, mn = (e) => {
664
- if (!N(e, Pt)) return e;
665
- let t = dn(e);
700
+ }, wn = (e) => {
701
+ if (!P(e, Ut)) return e;
702
+ let t = xn(e);
666
703
  if (t === -1) return e;
667
704
  let n = e.substring(t + 1);
668
- if (!n || Rt.test(n) || j(e, t) || M(e, t)) return e;
669
- if (Xt(e) % 2 == 1) {
670
- let t = pn(e);
671
- return t === null ? fn(e) : t;
705
+ if (!n || Kt.test(n) || N(e, t) || It(e, t)) return e;
706
+ if (sn(e) % 2 == 1) {
707
+ let t = Cn(e);
708
+ return t === null ? Sn(e) : t;
672
709
  }
673
710
  return e;
674
- }, hn = (e) => {
675
- let t = Qt(e), n = Jt(e);
711
+ }, Tn = (e) => {
712
+ let t = ln(e), n = an(e);
676
713
  return t % 2 == 0 && n % 2 == 0;
677
- }, gn = (e, t, n) => !t || Rt.test(t) || j(e, n) || M(e, n) ? !0 : Wt(e, n, "*"), _n = (e) => {
678
- if (Vt.test(e)) return e;
679
- let t = N(e, Mt);
714
+ }, En = (e, t, n) => !t || Kt.test(t) || N(e, n) || It(e, n) ? !0 : $t(e, n, "*"), Dn = (e) => {
715
+ if (Yt.test(e)) return e;
716
+ let t = P(e, Vt);
680
717
  if (!t) return e;
681
718
  let n = t[2];
682
- return gn(e, n, e.lastIndexOf(t[1])) ? e : Zt(e) % 2 == 1 ? hn(e) ? e : `${e}***` : e;
683
- }, vn = /<[a-zA-Z/][^>]*$/, yn = /[a-zA-Z/]/, bn = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), xn = (e, t) => {
719
+ return En(e, n, e.lastIndexOf(t[1])) ? e : cn(e) % 2 == 1 ? Tn(e) ? e : `${e}***` : e;
720
+ }, On = /<[a-zA-Z/][^>]*$/, kn = /[a-zA-Z/]/, An = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), jn = (e, t) => {
684
721
  let n = e[t + 1];
685
- return n !== void 0 && yn.test(n);
686
- }, Sn = (e) => {
687
- let t = e.match(vn);
722
+ return n !== void 0 && kn.test(n);
723
+ }, Mn = (e) => {
724
+ let t = e.match(On);
688
725
  if (!t || t.index === void 0) return e;
689
- let n = bn(e);
690
- for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && xn(e, r) && !j(e, r) && !(n && F(e, r))) return e.substring(0, r).trimEnd();
726
+ let n = An(e);
727
+ for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && jn(e, r) && !N(e, r) && !(n && Qt(e, r))) return e.substring(0, r).trimEnd();
691
728
  return e;
692
- }, Cn = (e) => {
693
- let t = O(e);
729
+ }, Nn = (e) => {
730
+ let t = M(e);
694
731
  if (t.openFence) return e;
695
732
  let n = t.openSpan;
696
733
  if (!n) return e;
697
734
  let r = e.slice(n.start + n.runLength);
698
- if (!r || Rt.test(r)) return e;
735
+ if (!r || Kt.test(r)) return e;
699
736
  let i = 0, a = e.length - 1;
700
737
  for (; a >= 0 && e[a] === "`";) i += 1, --a;
701
738
  return i >= n.runLength ? e : e + "`".repeat(n.runLength - i);
702
- }, wn = (e) => gt(e, "$"), Tn = (e) => {
703
- let t = O(e), n = 0;
704
- for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] === E.PROSE && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : n += 1);
739
+ }, Pn = (e) => St(e, "$"), Fn = (e) => {
740
+ let t = M(e), n = 0;
741
+ for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] === k.PROSE && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : n += 1);
705
742
  return n;
706
- }, En = (e) => {
743
+ }, In = (e) => {
707
744
  if (e.endsWith("$") && !e.endsWith("$$")) return `${e}$`;
708
745
  let t = e.indexOf("$$");
709
746
  return t !== -1 && e.indexOf("\n", t) !== -1 && !e.endsWith("\n") ? `${e}
710
747
  $$` : `${e}$$`;
711
- }, Dn = (e) => wn(e) % 2 == 0 ? e : En(e), On = (e) => Tn(e) % 2 == 1 ? `${e}$` : e, kn = "streamdown:incomplete-image", An = (e, t, n) => {
748
+ }, Ln = (e) => Pn(e) % 2 == 0 ? e : In(e), Rn = (e) => Fn(e) % 2 == 1 ? `${e}$` : e, zn = "streamdown:incomplete-image", Bn = (e, t, n) => {
712
749
  if (e.substring(t + 2).includes(")")) return null;
713
- let r = Ht(e, t);
714
- if (r === -1 || j(e, r)) return null;
750
+ let r = Xt(e, t);
751
+ if (r === -1 || N(e, r)) return null;
715
752
  let i = r > 0 && e[r - 1] === "!", a = i ? r - 1 : r, o = e.substring(0, a), s = e.substring(r + 1, t);
716
- return i ? `${o}![${s}](${kn})` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
717
- }, jn = (e, t) => {
718
- for (let n = 0; n < t; n++) if (e[n] === "[" && !j(e, n)) {
753
+ return i ? `${o}![${s}](${zn})` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
754
+ }, Vn = (e, t) => {
755
+ for (let n = 0; n < t; n++) if (e[n] === "[" && !N(e, n)) {
719
756
  if (n > 0 && e[n - 1] === "!") continue;
720
- let t = Ut(e, n);
757
+ let t = Zt(e, n);
721
758
  if (t === -1) return n;
722
759
  if (t + 1 < e.length && e[t + 1] === "(") {
723
760
  let r = e.indexOf(")", t + 2);
@@ -725,69 +762,69 @@ $$` : `${e}$$`;
725
762
  }
726
763
  }
727
764
  return t;
728
- }, Mn = (e, t, n) => {
765
+ }, Hn = (e, t, n) => {
729
766
  let r = t > 0 && e[t - 1] === "!", i = r ? t - 1 : t;
730
- if (!e.substring(t + 1).includes("]") || Ut(e, t) === -1) {
767
+ if (!e.substring(t + 1).includes("]") || Zt(e, t) === -1) {
731
768
  let a = e.substring(0, i);
732
- if (r) return `${a}![${e.substring(t + 1)}](${kn})`;
769
+ if (r) return `${a}![${e.substring(t + 1)}](${zn})`;
733
770
  if (n === "text-only") {
734
- let n = jn(e, t);
771
+ let n = Vn(e, t);
735
772
  return e.substring(0, n) + e.substring(n + 1);
736
773
  }
737
774
  return `${e}](streamdown:incomplete-link)`;
738
775
  }
739
776
  return null;
740
- }, Nn = (e, t) => {
777
+ }, Un = (e, t) => {
741
778
  let n = e.lastIndexOf("](");
742
- if (n !== -1 && !j(e, n)) {
743
- let r = An(e, n, t);
779
+ if (n !== -1 && !N(e, n)) {
780
+ let r = Bn(e, n, t);
744
781
  if (r !== null) return r;
745
782
  }
746
- for (let n = e.lastIndexOf("["); n !== -1; n = n === 0 ? -1 : e.lastIndexOf("[", n - 1)) if (!j(e, n)) {
747
- let r = Mn(e, n, t);
783
+ for (let n = e.lastIndexOf("["); n !== -1; n = n === 0 ? -1 : e.lastIndexOf("[", n - 1)) if (!N(e, n)) {
784
+ let r = Hn(e, n, t);
748
785
  if (r !== null) return r;
749
786
  }
750
787
  return e;
751
- }, Pn = 32, Fn = (e, t = "protocol") => {
788
+ }, Wn = 32, Gn = (e, t = "protocol") => {
752
789
  let n = e;
753
- for (let e = 0; e < Pn; e += 1) {
754
- let e = Nn(n, t);
790
+ for (let e = 0; e < Wn; e += 1) {
791
+ let e = Un(n, t);
755
792
  if (e.length >= n.length) return e;
756
793
  n = e;
757
794
  }
758
795
  return n;
759
- }, In = /^-{1,2}$/, Ln = /^[\s]*-{1,2}[\s]+$/, Rn = /^={1,2}$/, zn = /^[\s]*={1,2}[\s]+$/, Bn = (e) => {
796
+ }, Kn = /^-{1,2}$/, qn = /^[\s]*-{1,2}[\s]+$/, Jn = /^={1,2}$/, Yn = /^[\s]*={1,2}[\s]+$/, Xn = (e) => {
760
797
  if (!e || typeof e != "string") return e;
761
798
  let t = e.lastIndexOf("\n");
762
799
  if (t === -1) return e;
763
800
  let n = e.substring(t + 1), r = e.substring(0, t), i = n.trim();
764
- if (In.test(i) && !n.match(Ln)) {
801
+ if (Kn.test(i) && !n.match(qn)) {
765
802
  let t = r.split("\n").at(-1);
766
803
  if (t && t.trim().length > 0) return `${e}\u200B`;
767
804
  }
768
- if (Rn.test(i) && !n.match(zn)) {
805
+ if (Jn.test(i) && !n.match(Yn)) {
769
806
  let t = r.split("\n").at(-1);
770
807
  if (t && t.trim().length > 0) return `${e}\u200B`;
771
808
  }
772
809
  return e;
773
- }, Vn = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, Hn = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(Vn, (t, n, r) => j(e, r + n.length) ? t : `${n}\\~`), Un = (e) => gt(e, "~"), Wn = (e) => {
774
- let t = N(e, Ft);
810
+ }, Zn = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, Qn = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(Zn, (t, n, r) => N(e, r + n.length) ? t : `${n}\\~`), $n = (e) => St(e, "~"), er = (e) => {
811
+ let t = P(e, Wt);
775
812
  if (t) {
776
813
  let n = t[2];
777
- if (!n || Rt.test(n)) return e;
814
+ if (!n || Kt.test(n)) return e;
778
815
  let r = e.lastIndexOf(t[1]);
779
- if (j(e, r) || M(e, r)) return e;
780
- if (Un(e) % 2 == 1) return `${e}~~`;
816
+ if (N(e, r) || It(e, r)) return e;
817
+ if ($n(e) % 2 == 1) return `${e}~~`;
781
818
  } else {
782
- let t = N(e, Lt);
819
+ let t = P(e, F);
783
820
  if (t) {
784
821
  let n = e.lastIndexOf(t[0].slice(0, 2));
785
- if (j(e, n) || M(e, n)) return e;
786
- if (Un(e) % 2 == 1) return `${e}~`;
822
+ if (N(e, n) || It(e, n)) return e;
823
+ if ($n(e) % 2 == 1) return `${e}~`;
787
824
  }
788
825
  }
789
826
  return e;
790
- }, Gn = (e) => e !== !1, Kn = (e) => e === !0, L = {
827
+ }, tr = (e) => e !== !1, nr = (e) => e === !0, L = {
791
828
  SINGLE_TILDE: 0,
792
829
  COMPARISON_OPERATORS: 5,
793
830
  HTML_TAGS: 10,
@@ -803,11 +840,11 @@ $$` : `${e}$$`;
803
840
  KATEX: 70,
804
841
  INLINE_KATEX: 75,
805
842
  DEFAULT: 100
806
- }, qn = [
843
+ }, rr = [
807
844
  {
808
845
  handler: {
809
846
  name: "singleTilde",
810
- handle: Hn,
847
+ handle: Qn,
811
848
  priority: L.SINGLE_TILDE
812
849
  },
813
850
  optionKey: "singleTilde"
@@ -815,7 +852,7 @@ $$` : `${e}$$`;
815
852
  {
816
853
  handler: {
817
854
  name: "comparisonOperators",
818
- handle: kt,
855
+ handle: Rt,
819
856
  priority: L.COMPARISON_OPERATORS
820
857
  },
821
858
  optionKey: "comparisonOperators"
@@ -823,7 +860,7 @@ $$` : `${e}$$`;
823
860
  {
824
861
  handler: {
825
862
  name: "htmlTags",
826
- handle: Sn,
863
+ handle: Mn,
827
864
  priority: L.HTML_TAGS
828
865
  },
829
866
  optionKey: "htmlTags"
@@ -831,7 +868,7 @@ $$` : `${e}$$`;
831
868
  {
832
869
  handler: {
833
870
  name: "setextHeadings",
834
- handle: Bn,
871
+ handle: Xn,
835
872
  priority: L.SETEXT_HEADINGS
836
873
  },
837
874
  optionKey: "setextHeadings"
@@ -839,7 +876,7 @@ $$` : `${e}$$`;
839
876
  {
840
877
  handler: {
841
878
  name: "links",
842
- handle: Fn,
879
+ handle: Gn,
843
880
  priority: L.LINKS
844
881
  },
845
882
  optionKey: "links",
@@ -848,7 +885,7 @@ $$` : `${e}$$`;
848
885
  {
849
886
  handler: {
850
887
  name: "boldItalic",
851
- handle: _n,
888
+ handle: Dn,
852
889
  priority: L.BOLD_ITALIC
853
890
  },
854
891
  optionKey: "boldItalic"
@@ -856,7 +893,7 @@ $$` : `${e}$$`;
856
893
  {
857
894
  handler: {
858
895
  name: "bold",
859
- handle: an,
896
+ handle: hn,
860
897
  priority: L.BOLD
861
898
  },
862
899
  optionKey: "bold"
@@ -864,7 +901,7 @@ $$` : `${e}$$`;
864
901
  {
865
902
  handler: {
866
903
  name: "italicDoubleUnderscore",
867
- handle: sn,
904
+ handle: _n,
868
905
  priority: L.ITALIC_DOUBLE_UNDERSCORE
869
906
  },
870
907
  optionKey: "italic"
@@ -872,7 +909,7 @@ $$` : `${e}$$`;
872
909
  {
873
910
  handler: {
874
911
  name: "italicSingleAsterisk",
875
- handle: un,
912
+ handle: bn,
876
913
  priority: L.ITALIC_SINGLE_ASTERISK
877
914
  },
878
915
  optionKey: "italic"
@@ -880,7 +917,7 @@ $$` : `${e}$$`;
880
917
  {
881
918
  handler: {
882
919
  name: "italicSingleUnderscore",
883
- handle: mn,
920
+ handle: wn,
884
921
  priority: L.ITALIC_SINGLE_UNDERSCORE
885
922
  },
886
923
  optionKey: "italic"
@@ -888,7 +925,7 @@ $$` : `${e}$$`;
888
925
  {
889
926
  handler: {
890
927
  name: "inlineCode",
891
- handle: Cn,
928
+ handle: Nn,
892
929
  priority: L.INLINE_CODE
893
930
  },
894
931
  optionKey: "inlineCode"
@@ -896,7 +933,7 @@ $$` : `${e}$$`;
896
933
  {
897
934
  handler: {
898
935
  name: "strikethrough",
899
- handle: Wn,
936
+ handle: er,
900
937
  priority: L.STRIKETHROUGH
901
938
  },
902
939
  optionKey: "strikethrough"
@@ -904,7 +941,7 @@ $$` : `${e}$$`;
904
941
  {
905
942
  handler: {
906
943
  name: "katex",
907
- handle: Dn,
944
+ handle: Ln,
908
945
  priority: L.KATEX
909
946
  },
910
947
  optionKey: "katex"
@@ -912,36 +949,36 @@ $$` : `${e}$$`;
912
949
  {
913
950
  handler: {
914
951
  name: "inlineKatex",
915
- handle: On,
952
+ handle: Rn,
916
953
  priority: L.INLINE_KATEX
917
954
  },
918
955
  optionKey: "inlineKatex"
919
956
  }
920
- ], Jn = (e) => {
957
+ ], ir = (e) => {
921
958
  let t = e?.linkMode ?? "protocol";
922
- return qn.filter(({ handler: t, optionKey: n }) => t.name === "links" ? Gn(e?.links) || Gn(e?.images) : t.name === "inlineKatex" ? Kn(e?.inlineKatex) : Gn(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
923
- handler: Xe(Ye({}, e), { handle: (e) => Fn(e, t) }),
959
+ return rr.filter(({ handler: t, optionKey: n }) => t.name === "links" ? tr(e?.links) || tr(e?.images) : t.name === "inlineKatex" ? nr(e?.inlineKatex) : tr(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
960
+ handler: rt(nt({}, e), { handle: (e) => Gn(e, t) }),
924
961
  earlyReturn: t === "protocol" ? n : void 0
925
962
  } : {
926
963
  handler: e,
927
964
  earlyReturn: n
928
965
  });
929
- }, Yn = (e, t) => {
966
+ }, ar = (e, t) => {
930
967
  if (!e || typeof e != "string") return e;
931
- let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = Jn(t), i = (t?.handlers ?? []).map((e) => ({
932
- handler: Xe(Ye({}, e), { priority: e.priority ?? L.DEFAULT }),
968
+ let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = ir(t), i = (t?.handlers ?? []).map((e) => ({
969
+ handler: rt(nt({}, e), { priority: e.priority ?? L.DEFAULT }),
933
970
  earlyReturn: void 0
934
971
  })), a = [...r, ...i].sort((e, t) => (e.handler.priority ?? 0) - (t.handler.priority ?? 0));
935
972
  try {
936
973
  for (let { handler: e, earlyReturn: t } of a) if (n = e.handle(n), t != null && t(n)) return n;
937
974
  return n.endsWith(" ") && !n.endsWith(" ") ? n.slice(0, -1) : n;
938
975
  } finally {
939
- pt();
976
+ yt();
940
977
  }
941
978
  };
942
979
  //#endregion
943
980
  //#region ../../node_modules/.pnpm/marked@18.1.1/node_modules/marked/lib/marked.esm.js
944
- function Xn() {
981
+ function or() {
945
982
  return {
946
983
  async: !1,
947
984
  breaks: !1,
@@ -955,12 +992,12 @@ function Xn() {
955
992
  walkTokens: null
956
993
  };
957
994
  }
958
- var Zn = Xn();
959
- function Qn(e) {
960
- Zn = e;
995
+ var sr = or();
996
+ function cr(e) {
997
+ sr = e;
961
998
  }
962
- var $n = { exec: () => null };
963
- function er(e) {
999
+ var lr = { exec: () => null };
1000
+ function ur(e) {
964
1001
  let t = [];
965
1002
  return (n) => {
966
1003
  let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
@@ -977,7 +1014,7 @@ function R(e, t = "") {
977
1014
  };
978
1015
  return r;
979
1016
  }
980
- var tr = ((e = "") => {
1017
+ var dr = ((e = "") => {
981
1018
  try {
982
1019
  return !!RegExp("(?<=1)(?<!1)" + e);
983
1020
  } catch {
@@ -1038,113 +1075,113 @@ var tr = ((e = "") => {
1038
1075
  notSpaceStart: /^\S*/,
1039
1076
  endingNewline: /\n$/,
1040
1077
  listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
1041
- nextBulletRegex: er((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
1042
- hrRegex: er((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
1043
- fencesBeginRegex: er((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
1044
- headingBeginRegex: er((e) => RegExp(`^ {0,${e}}#`)),
1045
- htmlBeginRegex: er((e) => RegExp(`^ {0,${e}}(?:</?(?:${gr})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
1046
- blockquoteBeginRegex: er((e) => RegExp(`^ {0,${e}}>`))
1047
- }, nr = /^(?:[ \t]*(?:\n|$))+/, rr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ir = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ar = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, or = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sr = / {0,3}(?:[*+-]|\d{1,9}[.)])/, cr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, lr = R(cr).replace(/bull/g, sr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ur = R(cr).replace(/bull/g, sr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), dr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, fr = /^[^\n]+/, pr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, mr = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hr = R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, sr).getRegex(), gr = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", _r = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, vr = R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", _r).replace("tag", gr).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), yr = (e) => R(dr).replace("hr", ar).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", gr).getRegex(), br = yr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), xr = yr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Sr = {
1048
- blockquote: R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", xr).getRegex(),
1049
- code: rr,
1050
- def: mr,
1051
- fences: ir,
1052
- heading: or,
1053
- hr: ar,
1054
- html: vr,
1055
- lheading: lr,
1056
- list: hr,
1057
- newline: nr,
1058
- paragraph: br,
1059
- table: $n,
1060
- text: fr
1061
- }, Cr = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ar).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", gr).getRegex(), wr = {
1062
- ...Sr,
1063
- lheading: ur,
1064
- table: Cr,
1065
- paragraph: R(dr).replace("hr", ar).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Cr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", gr).getRegex()
1066
- }, Tr = {
1067
- ...Sr,
1068
- html: R("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", _r).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
1078
+ nextBulletRegex: ur((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
1079
+ hrRegex: ur((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
1080
+ fencesBeginRegex: ur((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
1081
+ headingBeginRegex: ur((e) => RegExp(`^ {0,${e}}#`)),
1082
+ htmlBeginRegex: ur((e) => RegExp(`^ {0,${e}}(?:</?(?:${Er})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
1083
+ blockquoteBeginRegex: ur((e) => RegExp(`^ {0,${e}}>`))
1084
+ }, fr = /^(?:[ \t]*(?:\n|$))+/, pr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, mr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, gr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, _r = / {0,3}(?:[*+-]|\d{1,9}[.)])/, vr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, yr = R(vr).replace(/bull/g, _r).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), br = R(vr).replace(/bull/g, _r).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), xr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Sr = /^[^\n]+/, Cr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, wr = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Cr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Tr = R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, _r).getRegex(), Er = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Dr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Or = R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Dr).replace("tag", Er).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), kr = (e) => R(xr).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", Er).getRegex(), Ar = kr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), jr = kr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Mr = {
1085
+ blockquote: R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", jr).getRegex(),
1086
+ code: pr,
1087
+ def: wr,
1088
+ fences: mr,
1089
+ heading: gr,
1090
+ hr,
1091
+ html: Or,
1092
+ lheading: yr,
1093
+ list: Tr,
1094
+ newline: fr,
1095
+ paragraph: Ar,
1096
+ table: lr,
1097
+ text: Sr
1098
+ }, Nr = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", Er).getRegex(), Pr = {
1099
+ ...Mr,
1100
+ lheading: br,
1101
+ table: Nr,
1102
+ paragraph: R(xr).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Nr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", Er).getRegex()
1103
+ }, Fr = {
1104
+ ...Mr,
1105
+ html: R("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Dr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
1069
1106
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1070
1107
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
1071
- fences: $n,
1108
+ fences: lr,
1072
1109
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1073
- paragraph: R(dr).replace("hr", ar).replace("heading", " *#{1,6} *[^\n]").replace("lheading", lr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1074
- }, Er = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Dr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Or = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, kr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, Ar = /[\s\p{P}\p{S}]/u, jr = /[^\s\p{P}\p{S}]/u, Mr = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ar).getRegex(), Nr = /[\p{Pi}\p{Ps}"']/u, Pr = /(?!~)[\p{P}\p{S}]/u, Fr = /(?!~)[\s\p{P}\p{S}]/u, Ir = /(?:[^\s\p{P}\p{S}]|~)/u, Lr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", tr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Rr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, zr = R(Rr, "u").replace(/punct/g, B).getRegex(), Br = R(Rr, "u").replace(/punct/g, Pr).getRegex(), Vr = R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Nr).replace(/punct/g, B).getRegex(), Hr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ur = R(Hr, "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), Wr = R(Hr, "gu").replace(/notPunctSpace/g, Ir).replace(/punctSpace/g, Fr).replace(/punct/g, Pr).getRegex(), Gr = R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), Kr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), qr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), Jr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, B).getRegex(), Yr = R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), Xr = R(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Zr = R(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Qr = R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), $r = R(_r).replace("(?:-->|$)", "-->").getRegex(), ei = R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", $r).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ti = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, ni = R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", ti).getRegex(), ri = R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", ni).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ii = R(/^!?\[(label)\]\[(ref)\]/).replace("label", ni).replace("ref", pr).getRegex(), ai = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", pr).getRegex(), oi = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, si = R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", ti).getRegex(), ci = R("reflink|nolink(?!\\()", "g").replace("reflink", R(/^!?\[(label)\]\[(ref)\]/).replace("label", si).replace("ref", oi).getRegex()).replace("nolink", R(/^!?\[(ref)\](?:\[\])?/).replace("ref", oi).getRegex()).getRegex(), li = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ui = R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), di = {
1075
- _backpedal: $n,
1076
- anyPunctuation: Xr,
1077
- anyPunctuationOutsideCode: Zr,
1078
- autolink: Qr,
1079
- blockSkip: Lr,
1080
- br: Or,
1081
- code: Dr,
1082
- del: $n,
1083
- delLDelim: $n,
1084
- delRDelim: $n,
1085
- emStrongLDelim: zr,
1086
- emStrongRDelimAst: Ur,
1087
- emStrongRDelimUnd: Kr,
1088
- escape: Er,
1089
- link: ri,
1090
- nolink: ai,
1091
- punctuation: Mr,
1092
- reflink: ii,
1093
- reflinkSearch: ci,
1094
- tag: ei,
1095
- text: kr,
1096
- url: $n
1097
- }, fi = {
1098
- ...di,
1099
- emStrongLDelim: Vr,
1100
- emStrongRDelimAst: Gr,
1101
- emStrongRDelimUnd: qr,
1102
- link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", ni).getRegex(),
1103
- reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ni).getRegex()
1104
- }, pi = {
1105
- ...di,
1106
- emStrongRDelimAst: Wr,
1107
- emStrongLDelim: Br,
1108
- delLDelim: Jr,
1109
- delRDelim: Yr,
1110
- url: R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", ui).replace("protocol", li).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
1110
+ paragraph: R(xr).replace("hr", hr).replace("heading", " *#{1,6} *[^\n]").replace("lheading", yr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1111
+ }, Ir = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Lr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Rr = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, zr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, Br = /[\s\p{P}\p{S}]/u, Vr = /[^\s\p{P}\p{S}]/u, Hr = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Br).getRegex(), Ur = /[\p{Pi}\p{Ps}"']/u, Wr = /(?!~)[\p{P}\p{S}]/u, Gr = /(?!~)[\s\p{P}\p{S}]/u, Kr = /(?:[^\s\p{P}\p{S}]|~)/u, qr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", dr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Jr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Yr = R(Jr, "u").replace(/punct/g, B).getRegex(), Xr = R(Jr, "u").replace(/punct/g, Wr).getRegex(), Zr = R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Ur).replace(/punct/g, B).getRegex(), Qr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", $r = R(Qr, "gu").replace(/notPunctSpace/g, Vr).replace(/punctSpace/g, Br).replace(/punct/g, B).getRegex(), ei = R(Qr, "gu").replace(/notPunctSpace/g, Kr).replace(/punctSpace/g, Gr).replace(/punct/g, Wr).getRegex(), ti = R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Vr).replace(/punctSpace/g, Br).replace(/punct/g, B).getRegex(), ni = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Vr).replace(/punctSpace/g, Br).replace(/punct/g, B).getRegex(), ri = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Vr).replace(/punctSpace/g, Br).replace(/punct/g, B).getRegex(), ii = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, B).getRegex(), ai = R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Vr).replace(/punctSpace/g, Br).replace(/punct/g, B).getRegex(), oi = R(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), si = R(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, B).getRegex(), ci = R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), li = R(Dr).replace("(?:-->|$)", "-->").getRegex(), ui = R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", li).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), di = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, fi = R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", di).getRegex(), pi = R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", fi).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), mi = R(/^!?\[(label)\]\[(ref)\]/).replace("label", fi).replace("ref", Cr).getRegex(), hi = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", Cr).getRegex(), gi = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, _i = R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", di).getRegex(), vi = R("reflink|nolink(?!\\()", "g").replace("reflink", R(/^!?\[(label)\]\[(ref)\]/).replace("label", _i).replace("ref", gi).getRegex()).replace("nolink", R(/^!?\[(ref)\](?:\[\])?/).replace("ref", gi).getRegex()).getRegex(), yi = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, bi = R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), xi = {
1112
+ _backpedal: lr,
1113
+ anyPunctuation: oi,
1114
+ anyPunctuationOutsideCode: si,
1115
+ autolink: ci,
1116
+ blockSkip: qr,
1117
+ br: Rr,
1118
+ code: Lr,
1119
+ del: lr,
1120
+ delLDelim: lr,
1121
+ delRDelim: lr,
1122
+ emStrongLDelim: Yr,
1123
+ emStrongRDelimAst: $r,
1124
+ emStrongRDelimUnd: ni,
1125
+ escape: Ir,
1126
+ link: pi,
1127
+ nolink: hi,
1128
+ punctuation: Hr,
1129
+ reflink: mi,
1130
+ reflinkSearch: vi,
1131
+ tag: ui,
1132
+ text: zr,
1133
+ url: lr
1134
+ }, Si = {
1135
+ ...xi,
1136
+ emStrongLDelim: Zr,
1137
+ emStrongRDelimAst: ti,
1138
+ emStrongRDelimUnd: ri,
1139
+ link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", fi).getRegex(),
1140
+ reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", fi).getRegex()
1141
+ }, Ci = {
1142
+ ...xi,
1143
+ emStrongRDelimAst: ei,
1144
+ emStrongLDelim: Xr,
1145
+ delLDelim: ii,
1146
+ delRDelim: ai,
1147
+ url: R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", bi).replace("protocol", yi).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
1111
1148
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1112
1149
  del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
1113
- text: R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", li).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
1114
- }, mi = {
1115
- ...pi,
1116
- br: R(Or).replace("{2,}", "*").getRegex(),
1117
- text: R(pi.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1118
- }, hi = {
1119
- normal: Sr,
1120
- gfm: wr,
1121
- pedantic: Tr
1122
- }, gi = {
1123
- normal: di,
1124
- gfm: pi,
1125
- breaks: mi,
1126
- pedantic: fi
1127
- }, _i = {
1150
+ text: R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", yi).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
1151
+ }, wi = {
1152
+ ...Ci,
1153
+ br: R(Rr).replace("{2,}", "*").getRegex(),
1154
+ text: R(Ci.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1155
+ }, Ti = {
1156
+ normal: Mr,
1157
+ gfm: Pr,
1158
+ pedantic: Fr
1159
+ }, Ei = {
1160
+ normal: xi,
1161
+ gfm: Ci,
1162
+ breaks: wi,
1163
+ pedantic: Si
1164
+ }, Di = {
1128
1165
  "&": "&amp;",
1129
1166
  "<": "&lt;",
1130
1167
  ">": "&gt;",
1131
1168
  "\"": "&quot;",
1132
1169
  "'": "&#39;"
1133
- }, vi = (e) => _i[e];
1170
+ }, Oi = (e) => Di[e];
1134
1171
  function V(e, t) {
1135
1172
  if (t) {
1136
- if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, vi);
1137
- } else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, vi);
1173
+ if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, Oi);
1174
+ } else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, Oi);
1138
1175
  return e;
1139
1176
  }
1140
- function yi(e) {
1177
+ function ki(e) {
1141
1178
  return z.numericCharacterReference.test(e) ? e.replace(z.numericCharacterReferenceOrAmpersand, (e, t, n) => {
1142
1179
  if (t === void 0 && n === void 0) return "&amp;";
1143
1180
  let r = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
1144
1181
  return r === 0 || r > 1114111 || r >= 55296 && r <= 57343 ? "�" : r === 38 ? "&amp;" : String.fromCodePoint(r);
1145
1182
  }) : e;
1146
1183
  }
1147
- function bi(e) {
1184
+ function Ai(e) {
1148
1185
  try {
1149
1186
  e = encodeURI(e).replace(z.percentDecode, "%");
1150
1187
  } catch {
@@ -1152,7 +1189,7 @@ function bi(e) {
1152
1189
  }
1153
1190
  return e;
1154
1191
  }
1155
- function xi(e, t) {
1192
+ function ji(e, t) {
1156
1193
  let n = e.replace(z.findPipe, (e, t, n) => {
1157
1194
  let r = !1, i = t;
1158
1195
  for (; --i >= 0 && n[i] === "\\";) r = !r;
@@ -1165,7 +1202,7 @@ function xi(e, t) {
1165
1202
  for (; r < n.length; r++) n[r] = n[r].trim().replace(z.slashPipe, "|");
1166
1203
  return n;
1167
1204
  }
1168
- function Si(e, t, n) {
1205
+ function Mi(e, t, n) {
1169
1206
  let r = e.length;
1170
1207
  if (r === 0) return "";
1171
1208
  let i = 0;
@@ -1177,15 +1214,15 @@ function Si(e, t, n) {
1177
1214
  }
1178
1215
  return e.slice(0, r - i);
1179
1216
  }
1180
- function Ci(e) {
1217
+ function Ni(e) {
1181
1218
  let t = e.split("\n"), n = t.length - 1;
1182
1219
  for (; n >= 0 && z.blankLine.test(t[n]);) n--;
1183
1220
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
1184
1221
  }
1185
- function wi(e) {
1222
+ function Pi(e) {
1186
1223
  return e.trim().toLowerCase().toUpperCase().toLowerCase();
1187
1224
  }
1188
- function Ti(e, t) {
1225
+ function Fi(e, t) {
1189
1226
  if (e.indexOf(t[0]) === -1 && e.indexOf(t[1]) === -1) return -1;
1190
1227
  let n = 0;
1191
1228
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
@@ -1193,7 +1230,7 @@ function Ti(e, t) {
1193
1230
  else if (e[r] === t[1] && (n--, n < 0)) return r;
1194
1231
  return n > 0 ? -2 : -1;
1195
1232
  }
1196
- function Ei(e, t = 0) {
1233
+ function Ii(e, t = 0) {
1197
1234
  let n = t, r = "";
1198
1235
  for (let t of e) if (t === " ") {
1199
1236
  let e = 4 - n % 4;
@@ -1201,7 +1238,7 @@ function Ei(e, t = 0) {
1201
1238
  } else r += t, n++;
1202
1239
  return r;
1203
1240
  }
1204
- function Di(e, t, n, r, i) {
1241
+ function Li(e, t, n, r, i) {
1205
1242
  let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1"), c = e[0].charAt(0) === "!", l = r.state.inLink, u = r.state.linkEmitted, d = r.state.inRawBlock;
1206
1243
  r.state.inLink = !0, r.state.linkEmitted = !1;
1207
1244
  let f = r.inlineTokens(s), p = r.state.linkEmitted;
@@ -1221,7 +1258,7 @@ function Di(e, t, n, r, i) {
1221
1258
  tokens: f
1222
1259
  };
1223
1260
  }
1224
- function Oi(e, t, n) {
1261
+ function Ri(e, t, n) {
1225
1262
  let r = e.match(n.other.indentCodeCompensation);
1226
1263
  if (r === null) return t;
1227
1264
  let i = r[1];
@@ -1232,7 +1269,7 @@ function Oi(e, t, n) {
1232
1269
  return e.slice(Math.min(r.length, i.length));
1233
1270
  }).join("\n");
1234
1271
  }
1235
- function ki(e, t, n, r) {
1272
+ function zi(e, t, n, r) {
1236
1273
  if (!t.includes("<")) return !1;
1237
1274
  for (let i = 0; i < t.length; i++) {
1238
1275
  if (t[i] === "\\") {
@@ -1255,12 +1292,12 @@ function ki(e, t, n, r) {
1255
1292
  }
1256
1293
  return !1;
1257
1294
  }
1258
- var Ai = class {
1295
+ var Bi = class {
1259
1296
  options;
1260
1297
  rules;
1261
1298
  lexer;
1262
1299
  constructor(e) {
1263
- this.options = e || Zn;
1300
+ this.options = e || sr;
1264
1301
  }
1265
1302
  space(e) {
1266
1303
  let t = this.rules.block.newline.exec(e);
@@ -1272,7 +1309,7 @@ var Ai = class {
1272
1309
  code(e) {
1273
1310
  let t = this.rules.block.code.exec(e);
1274
1311
  if (t) {
1275
- let e = this.options.pedantic ? t[0] : Ci(t[0]);
1312
+ let e = this.options.pedantic ? t[0] : Ni(t[0]);
1276
1313
  return {
1277
1314
  type: "code",
1278
1315
  raw: e,
@@ -1284,7 +1321,7 @@ var Ai = class {
1284
1321
  fences(e) {
1285
1322
  let t = this.rules.block.fences.exec(e);
1286
1323
  if (t) {
1287
- let e = t[0], n = Oi(e, t[3] || "", this.rules);
1324
+ let e = t[0], n = Ri(e, t[3] || "", this.rules);
1288
1325
  return {
1289
1326
  type: "code",
1290
1327
  raw: e,
@@ -1298,12 +1335,12 @@ var Ai = class {
1298
1335
  if (t) {
1299
1336
  let e = t[2].trim();
1300
1337
  if (this.rules.other.endingHash.test(e)) {
1301
- let t = Si(e, "#");
1338
+ let t = Mi(e, "#");
1302
1339
  (this.options.pedantic || !t || this.rules.other.endingSpaceTabChar.test(t)) && (e = t.trim());
1303
1340
  }
1304
1341
  return {
1305
1342
  type: "heading",
1306
- raw: Si(t[0], "\n"),
1343
+ raw: Mi(t[0], "\n"),
1307
1344
  depth: t[1].length,
1308
1345
  text: e,
1309
1346
  tokens: this.lexer.inline(e)
@@ -1314,13 +1351,13 @@ var Ai = class {
1314
1351
  let t = this.rules.block.hr.exec(e);
1315
1352
  if (t) return {
1316
1353
  type: "hr",
1317
- raw: Si(t[0], "\n")
1354
+ raw: Mi(t[0], "\n")
1318
1355
  };
1319
1356
  }
1320
1357
  blockquote(e) {
1321
1358
  let t = this.rules.block.blockquote.exec(e);
1322
1359
  if (t) {
1323
- let e = Si(t[0], "\n").split("\n"), n = "", r = "", i = [];
1360
+ let e = Mi(t[0], "\n").split("\n"), n = "", r = "", i = [];
1324
1361
  for (; e.length > 0;) {
1325
1362
  let t = !1, a = [], o = 0;
1326
1363
  for (; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
@@ -1374,12 +1411,12 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1374
1411
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
1375
1412
  let l = r();
1376
1413
  e = e.substring(t[0].length);
1377
- let u = t[2].split("\n", 1)[0], d = t[1].length, f = this.options.pedantic ? Ei(u, d) : u.replace(this.rules.other.leadingSpaceTab, (e) => Ei(e, d)), p = e.split("\n", 1)[0], ee = !f.trim(), m = 0;
1414
+ let u = t[2].split("\n", 1)[0], d = t[1].length, f = this.options.pedantic ? Ii(u, d) : u.replace(this.rules.other.leadingSpaceTab, (e) => Ii(e, d)), p = e.split("\n", 1)[0], ee = !f.trim(), m = 0;
1378
1415
  if (this.options.pedantic ? (m = 2, a = f.trimStart()) : ee ? m = d + 1 : (m = f.search(this.rules.other.nonSpaceChar), m = m > 4 ? 1 : m, a = f.slice(m), m += d), ee && this.rules.other.blankLine.test(p) && (e = e.substring(p.length + 1), i = !0), !i) {
1379
1416
  let t = this.rules.other.nextBulletRegex(m), n = this.rules.other.hrRegex(m), r = this.rules.other.fencesBeginRegex(m), i = this.rules.other.headingBeginRegex(m), o = this.rules.other.htmlBeginRegex(m), s = this.rules.other.blockquoteBeginRegex(m);
1380
1417
  for (; e;) {
1381
1418
  let c = e.split("\n", 1)[0], l;
1382
- if (p = c, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), l = p) : l = p.replace(this.rules.other.leadingSpaceTab, (e) => Ei(e)), r.test(p) || i.test(p) || o.test(p) || s.test(p) || t.test(p) || n.test(p)) break;
1419
+ if (p = c, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), l = p) : l = p.replace(this.rules.other.leadingSpaceTab, (e) => Ii(e)), r.test(p) || i.test(p) || o.test(p) || s.test(p) || t.test(p) || n.test(p)) break;
1383
1420
  if (l.search(this.rules.other.nonSpaceChar) >= m || !p.trim()) a += "\n" + l.slice(m);
1384
1421
  else {
1385
1422
  if (ee || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || r.test(f) || i.test(f) || n.test(f)) break;
@@ -1440,7 +1477,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1440
1477
  html(e) {
1441
1478
  let t = this.rules.block.html.exec(e);
1442
1479
  if (t) {
1443
- let e = Ci(t[0]);
1480
+ let e = Ni(t[0]);
1444
1481
  return {
1445
1482
  type: "html",
1446
1483
  block: !0,
@@ -1453,12 +1490,12 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1453
1490
  def(e) {
1454
1491
  let t = this.rules.block.def.exec(e);
1455
1492
  if (t) {
1456
- if (!this.rules.other.startAngleBracket.test(t[2]) && Ti(t[2], "()") !== -1) return;
1457
- let e = wi(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1493
+ if (!this.rules.other.startAngleBracket.test(t[2]) && Fi(t[2], "()") !== -1) return;
1494
+ let e = Pi(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1458
1495
  return {
1459
1496
  type: "def",
1460
1497
  tag: e,
1461
- raw: Si(t[0], "\n"),
1498
+ raw: Mi(t[0], "\n"),
1462
1499
  href: n,
1463
1500
  title: r
1464
1501
  };
@@ -1467,9 +1504,9 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1467
1504
  table(e) {
1468
1505
  let t = this.rules.block.table.exec(e);
1469
1506
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1470
- let n = xi(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1507
+ let n = ji(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1471
1508
  type: "table",
1472
- raw: Si(t[0], "\n"),
1509
+ raw: Mi(t[0], "\n"),
1473
1510
  header: [],
1474
1511
  align: [],
1475
1512
  rows: []
@@ -1482,7 +1519,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1482
1519
  header: !0,
1483
1520
  align: a.align[e]
1484
1521
  });
1485
- for (let e of i) a.rows.push(xi(e, a.header.length).map((e, t) => ({
1522
+ for (let e of i) a.rows.push(ji(e, a.header.length).map((e, t) => ({
1486
1523
  text: e,
1487
1524
  tokens: this.lexer.inline(e),
1488
1525
  header: !1,
@@ -1497,7 +1534,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1497
1534
  let e = t[1].trim();
1498
1535
  return {
1499
1536
  type: "heading",
1500
- raw: Si(t[0], "\n"),
1537
+ raw: Mi(t[0], "\n"),
1501
1538
  depth: t[2].charAt(0) === "=" ? 1 : 2,
1502
1539
  text: e,
1503
1540
  tokens: this.lexer.inline(e)
@@ -1549,14 +1586,14 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1549
1586
  let t = this.rules.inline.link.exec(e);
1550
1587
  if (t) {
1551
1588
  let n = t[0].charAt(0) === "!" ? 2 : 1;
1552
- if (!this.options.pedantic && ki(e, t[1], n, this.rules)) return;
1589
+ if (!this.options.pedantic && zi(e, t[1], n, this.rules)) return;
1553
1590
  let r = t[2].trim();
1554
1591
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
1555
1592
  if (!this.rules.other.endAngleBracket.test(r)) return;
1556
- let e = Si(r.slice(0, -1), "\\");
1593
+ let e = Mi(r.slice(0, -1), "\\");
1557
1594
  if ((r.length - e.length) % 2 == 0) return;
1558
1595
  } else {
1559
- let e = Ti(t[2], "()");
1596
+ let e = Fi(t[2], "()");
1560
1597
  if (e === -2) return;
1561
1598
  if (e > -1) {
1562
1599
  let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
@@ -1568,7 +1605,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1568
1605
  let e = this.rules.other.pedanticHrefTitle.exec(i);
1569
1606
  e && (i = e[1], a = e[3]);
1570
1607
  } else a = t[3] ? t[3].slice(1, -1) : "";
1571
- return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (i = this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i.slice(1) : i.slice(1, -1)), Di(t, {
1608
+ return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (i = this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i.slice(1) : i.slice(1, -1)), Li(t, {
1572
1609
  href: i && i.replace(this.rules.inline.anyPunctuation, "$1"),
1573
1610
  title: a && a.replace(this.rules.inline.anyPunctuation, "$1")
1574
1611
  }, t[0], this.lexer, this.rules);
@@ -1578,8 +1615,8 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1578
1615
  let n;
1579
1616
  if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1580
1617
  let r = n[0].charAt(0) === "!" ? 2 : 1;
1581
- if (!this.options.pedantic && ki(e, n[1], r, this.rules)) return;
1582
- let i = t[wi((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
1618
+ if (!this.options.pedantic && zi(e, n[1], r, this.rules)) return;
1619
+ let i = t[Pi((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
1583
1620
  if (!i) {
1584
1621
  let e = n[0].charAt(0);
1585
1622
  return {
@@ -1588,7 +1625,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1588
1625
  text: e
1589
1626
  };
1590
1627
  }
1591
- return Di(n, i, n[0], this.lexer, this.rules);
1628
+ return Li(n, i, n[0], this.lexer, this.rules);
1592
1629
  }
1593
1630
  }
1594
1631
  emStrong(e, t, n = "") {
@@ -1721,7 +1758,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1721
1758
  return {
1722
1759
  type: "text",
1723
1760
  raw: t[0],
1724
- text: e ? t[0] : yi(t[0]),
1761
+ text: e ? t[0] : ki(t[0]),
1725
1762
  escaped: e
1726
1763
  };
1727
1764
  }
@@ -1733,7 +1770,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1733
1770
  inlineQueue;
1734
1771
  tokenizer;
1735
1772
  constructor(e) {
1736
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || Zn, this.options.tokenizer = this.options.tokenizer || new Ai(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1773
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || sr, this.options.tokenizer = this.options.tokenizer || new Bi(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1737
1774
  inLink: !1,
1738
1775
  inRawBlock: !1,
1739
1776
  linkEmitted: !1,
@@ -1742,15 +1779,15 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1742
1779
  };
1743
1780
  let t = {
1744
1781
  other: z,
1745
- block: hi.normal,
1746
- inline: gi.normal
1782
+ block: Ti.normal,
1783
+ inline: Ei.normal
1747
1784
  };
1748
- this.options.pedantic ? (t.block = hi.pedantic, t.inline = gi.pedantic) : this.options.gfm && (t.block = hi.gfm, t.inline = this.options.breaks ? gi.breaks : gi.gfm), this.tokenizer.rules = t;
1785
+ this.options.pedantic ? (t.block = Ti.pedantic, t.inline = Ei.pedantic) : this.options.gfm && (t.block = Ti.gfm, t.inline = this.options.breaks ? Ei.breaks : Ei.gfm), this.tokenizer.rules = t;
1749
1786
  }
1750
1787
  static get rules() {
1751
1788
  return {
1752
- block: hi,
1753
- inline: gi
1789
+ block: Ti,
1790
+ inline: Ei
1754
1791
  };
1755
1792
  }
1756
1793
  static lex(t, n) {
@@ -1840,7 +1877,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1840
1877
  for (let n of e.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t.test(n[0]) && e.charAt(n.index - 1) !== "!") return !0;
1841
1878
  for (let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
1842
1879
  let e = t[0], n = e.lastIndexOf("[");
1843
- if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, wi(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
1880
+ if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, Pi(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
1844
1881
  }
1845
1882
  return !1;
1846
1883
  }
@@ -1859,7 +1896,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1859
1896
  if (this.tokens.links && e.includes("[")) {
1860
1897
  let e = this.tokenizer.rules.inline.reflinkSearch, t = (n) => {
1861
1898
  let r = n.lastIndexOf("[");
1862
- if (!Object.hasOwn(this.tokens.links, wi(n.slice(r + 1, -1)))) return n;
1899
+ if (!Object.hasOwn(this.tokens.links, Pi(n.slice(r + 1, -1)))) return n;
1863
1900
  if (r > 1 && n.charAt(0) !== "!") {
1864
1901
  let i = n.slice(1, r - 1);
1865
1902
  if (this.linkInText(i)) return "[" + i.replace(e, t) + "][" + "a".repeat(n.length - r - 2) + "]";
@@ -1919,11 +1956,11 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1919
1956
  if (this.options.silent) console.error(t);
1920
1957
  else throw Error(t);
1921
1958
  }
1922
- }, ji = class {
1959
+ }, Vi = class {
1923
1960
  options;
1924
1961
  parser;
1925
1962
  constructor(e) {
1926
- this.options = e || Zn;
1963
+ this.options = e || sr;
1927
1964
  }
1928
1965
  space(e) {
1929
1966
  return "";
@@ -2009,7 +2046,7 @@ ${e}</tr>
2009
2046
  return `<del>${this.parser.parseInline(e)}</del>`;
2010
2047
  }
2011
2048
  link({ href: e, title: t, text: n, tokens: r, autolink: i }) {
2012
- let a = i ? V(n, !0) : this.parser.parseInline(r), o = bi(e);
2049
+ let a = i ? V(n, !0) : this.parser.parseInline(r), o = Ai(e);
2013
2050
  if (o === null) return a;
2014
2051
  e = V(o, i);
2015
2052
  let s = "<a href=\"" + e + "\"";
@@ -2017,7 +2054,7 @@ ${e}</tr>
2017
2054
  }
2018
2055
  image({ href: e, title: t, text: n, tokens: r }) {
2019
2056
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
2020
- let i = bi(e);
2057
+ let i = Ai(e);
2021
2058
  if (i === null) return V(n);
2022
2059
  e = i;
2023
2060
  let a = `<img src="${V(e)}" alt="${V(n)}"`;
@@ -2026,7 +2063,7 @@ ${e}</tr>
2026
2063
  text(e) {
2027
2064
  return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : V(e.text);
2028
2065
  }
2029
- }, Mi = class {
2066
+ }, Hi = class {
2030
2067
  strong({ text: e }) {
2031
2068
  return e;
2032
2069
  }
@@ -2062,7 +2099,7 @@ ${e}</tr>
2062
2099
  renderer;
2063
2100
  textRenderer;
2064
2101
  constructor(e) {
2065
- this.options = e || Zn, this.options.renderer = this.options.renderer || new ji(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Mi();
2102
+ this.options = e || sr, this.options.renderer = this.options.renderer || new Vi(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Hi();
2066
2103
  }
2067
2104
  static parse(t, n) {
2068
2105
  return new e(n).parse(t);
@@ -2210,11 +2247,11 @@ ${e}</tr>
2210
2247
  }
2211
2248
  return n;
2212
2249
  }
2213
- }, Ni = class {
2250
+ }, Ui = class {
2214
2251
  options;
2215
2252
  block;
2216
2253
  constructor(e) {
2217
- this.options = e || Zn;
2254
+ this.options = e || sr;
2218
2255
  }
2219
2256
  static passThroughHooks = /* @__PURE__ */ new Set([
2220
2257
  "preprocess",
@@ -2246,44 +2283,44 @@ ${e}</tr>
2246
2283
  return e ? U.parse : U.parseInline;
2247
2284
  }
2248
2285
  };
2249
- function Pi(e, t) {
2286
+ function Wi(e, t) {
2250
2287
  if (Array.isArray(t)) for (let n = 0; n < t.length; n++) e.push(t[n]);
2251
2288
  else e.push(t);
2252
2289
  }
2253
- var Fi = new class {
2254
- defaults = Xn();
2290
+ var Gi = new class {
2291
+ defaults = or();
2255
2292
  options = this.setOptions;
2256
2293
  parse = this.parseMarkdown(!0);
2257
2294
  parseInline = this.parseMarkdown(!1);
2258
2295
  Parser = U;
2259
- Renderer = ji;
2260
- TextRenderer = Mi;
2296
+ Renderer = Vi;
2297
+ TextRenderer = Hi;
2261
2298
  Lexer = H;
2262
- Tokenizer = Ai;
2263
- Hooks = Ni;
2299
+ Tokenizer = Bi;
2300
+ Hooks = Ui;
2264
2301
  constructor(...e) {
2265
2302
  this.use(...e);
2266
2303
  }
2267
2304
  walkTokens(e, t) {
2268
2305
  let n = [];
2269
- for (let r of e) switch (Pi(n, t.call(this, r)), r.type) {
2306
+ for (let r of e) switch (Wi(n, t.call(this, r)), r.type) {
2270
2307
  case "table": {
2271
2308
  let e = r;
2272
- for (let r of e.header) Pi(n, this.walkTokens(r.tokens, t));
2273
- for (let r of e.rows) for (let e of r) Pi(n, this.walkTokens(e.tokens, t));
2309
+ for (let r of e.header) Wi(n, this.walkTokens(r.tokens, t));
2310
+ for (let r of e.rows) for (let e of r) Wi(n, this.walkTokens(e.tokens, t));
2274
2311
  break;
2275
2312
  }
2276
2313
  case "list": {
2277
2314
  let e = r;
2278
- Pi(n, this.walkTokens(e.items, t));
2315
+ Wi(n, this.walkTokens(e.items, t));
2279
2316
  break;
2280
2317
  }
2281
2318
  default: {
2282
2319
  let e = r;
2283
2320
  this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2284
2321
  let i = e[r].flat(1 / 0);
2285
- Pi(n, this.walkTokens(i, t));
2286
- }) : e.tokens && Pi(n, this.walkTokens(e.tokens, t));
2322
+ Wi(n, this.walkTokens(i, t));
2323
+ }) : e.tokens && Wi(n, this.walkTokens(e.tokens, t));
2287
2324
  }
2288
2325
  }
2289
2326
  return n;
@@ -2311,7 +2348,7 @@ var Fi = new class {
2311
2348
  }
2312
2349
  "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2313
2350
  }), n.extensions = t), e.renderer) {
2314
- let t = this.defaults.renderer || new ji(this.defaults);
2351
+ let t = this.defaults.renderer || new Vi(this.defaults);
2315
2352
  for (let n in e.renderer) {
2316
2353
  if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2317
2354
  if (["options", "parser"].includes(n)) continue;
@@ -2324,7 +2361,7 @@ var Fi = new class {
2324
2361
  n.renderer = t;
2325
2362
  }
2326
2363
  if (e.tokenizer) {
2327
- let t = this.defaults.tokenizer || new Ai(this.defaults);
2364
+ let t = this.defaults.tokenizer || new Bi(this.defaults);
2328
2365
  for (let n in e.tokenizer) {
2329
2366
  if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2330
2367
  if ([
@@ -2341,13 +2378,13 @@ var Fi = new class {
2341
2378
  n.tokenizer = t;
2342
2379
  }
2343
2380
  if (e.hooks) {
2344
- let t = this.defaults.hooks || new Ni();
2381
+ let t = this.defaults.hooks || new Ui();
2345
2382
  for (let n in e.hooks) {
2346
2383
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2347
2384
  if (["options", "block"].includes(n)) continue;
2348
2385
  let r = n, i = e.hooks[r], a = t[r];
2349
- t[r] = Ni.passThroughHooks.has(n) ? (e) => {
2350
- if (this.defaults.async && Ni.passThroughHooksRespectAsync.has(n)) return (async () => {
2386
+ t[r] = Ui.passThroughHooks.has(n) ? (e) => {
2387
+ if (this.defaults.async && Ui.passThroughHooksRespectAsync.has(n)) return (async () => {
2351
2388
  let n = await i.call(t, e);
2352
2389
  return a.call(t, n);
2353
2390
  })();
@@ -2368,7 +2405,7 @@ var Fi = new class {
2368
2405
  let t = this.defaults.walkTokens, r = e.walkTokens;
2369
2406
  n.walkTokens = function(e) {
2370
2407
  let n = [];
2371
- return n.push(r.call(this, e)), t && Pi(n, t.call(this, e)), n;
2408
+ return n.push(r.call(this, e)), t && Wi(n, t.call(this, e)), n;
2372
2409
  };
2373
2410
  }
2374
2411
  this.defaults = {
@@ -2427,31 +2464,31 @@ var Fi = new class {
2427
2464
  }
2428
2465
  }();
2429
2466
  function W(e, t) {
2430
- return Fi.parse(e, t);
2467
+ return Gi.parse(e, t);
2431
2468
  }
2432
2469
  W.options = W.setOptions = function(e) {
2433
- return Fi.setOptions(e), W.defaults = Fi.defaults, Qn(W.defaults), W;
2434
- }, W.getDefaults = Xn, W.defaults = Zn;
2435
- function Ii(...e) {
2436
- return Fi.use(...e), W.defaults = Fi.defaults, Qn(W.defaults), W;
2437
- }
2438
- W.use = Ii, W.walkTokens = function(e, t) {
2439
- return Fi.walkTokens(e, t);
2440
- }, W.parseInline = Fi.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = ji, W.TextRenderer = Mi, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = Ai, W.Hooks = Ni, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
2470
+ return Gi.setOptions(e), W.defaults = Gi.defaults, cr(W.defaults), W;
2471
+ }, W.getDefaults = or, W.defaults = sr;
2472
+ function Ki(...e) {
2473
+ return Gi.use(...e), W.defaults = Gi.defaults, cr(W.defaults), W;
2474
+ }
2475
+ W.use = Ki, W.walkTokens = function(e, t) {
2476
+ return Gi.walkTokens(e, t);
2477
+ }, W.parseInline = Gi.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = Vi, W.TextRenderer = Hi, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = Bi, W.Hooks = Ui, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
2441
2478
  //#endregion
2442
2479
  //#region ../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs
2443
- function Li(e, t) {
2480
+ function qi(e, t) {
2444
2481
  this.v = e, this.k = t;
2445
2482
  }
2446
- function Ri(e, t) {
2483
+ function Ji(e, t) {
2447
2484
  (t == null || t > e.length) && (t = e.length);
2448
2485
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
2449
2486
  return r;
2450
2487
  }
2451
- function zi(e) {
2488
+ function Yi(e) {
2452
2489
  if (Array.isArray(e)) return e;
2453
2490
  }
2454
- function Bi(e, t) {
2491
+ function Xi(e, t) {
2455
2492
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2456
2493
  if (n != null) {
2457
2494
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -2472,24 +2509,24 @@ function Bi(e, t) {
2472
2509
  return s;
2473
2510
  }
2474
2511
  }
2475
- function Vi() {
2512
+ function Zi() {
2476
2513
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2477
2514
  }
2478
- function Hi(e, t) {
2479
- return zi(e) || Bi(e, t) || Ui(e, t) || Vi();
2515
+ function Qi(e, t) {
2516
+ return Yi(e) || Xi(e, t) || $i(e, t) || Zi();
2480
2517
  }
2481
- function Ui(e, t) {
2518
+ function $i(e, t) {
2482
2519
  if (e) {
2483
- if (typeof e == "string") return Ri(e, t);
2520
+ if (typeof e == "string") return Ji(e, t);
2484
2521
  var n = {}.toString.call(e).slice(8, -1);
2485
- return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ri(e, t) : void 0;
2522
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ji(e, t) : void 0;
2486
2523
  }
2487
2524
  }
2488
- function Wi(e) {
2525
+ function ea(e) {
2489
2526
  var t, n;
2490
2527
  function r(t, n) {
2491
2528
  try {
2492
- var a = e[t](n), o = a.value, s = o instanceof Li;
2529
+ var a = e[t](n), o = a.value, s = o instanceof qi;
2493
2530
  Promise.resolve(s ? o.v : o).then(function(n) {
2494
2531
  if (s) {
2495
2532
  var c = t === "return" && o.k ? t : "next";
@@ -2523,119 +2560,119 @@ function Wi(e) {
2523
2560
  });
2524
2561
  }, typeof e.return != "function" && (this.return = void 0);
2525
2562
  }
2526
- Wi.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
2563
+ ea.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
2527
2564
  return this;
2528
- }, Wi.prototype.next = function(e) {
2565
+ }, ea.prototype.next = function(e) {
2529
2566
  return this._invoke("next", e);
2530
- }, Wi.prototype.throw = function(e) {
2567
+ }, ea.prototype.throw = function(e) {
2531
2568
  return this._invoke("throw", e);
2532
- }, Wi.prototype.return = function(e) {
2569
+ }, ea.prototype.return = function(e) {
2533
2570
  return this._invoke("return", e);
2534
2571
  };
2535
- var Gi = Object.entries, Ki = Object.setPrototypeOf, qi = Object.isFrozen, Ji = Object.getPrototypeOf, Yi = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, Xi = Object.create, Zi = typeof Reflect < "u" && Reflect, Qi = Zi.apply, $i = Zi.construct;
2572
+ var ta = Object.entries, na = Object.setPrototypeOf, ra = Object.isFrozen, ia = Object.getPrototypeOf, aa = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, oa = Object.create, sa = typeof Reflect < "u" && Reflect, ca = sa.apply, la = sa.construct;
2536
2573
  G ||= function(e) {
2537
2574
  return e;
2538
2575
  }, K ||= function(e) {
2539
2576
  return e;
2540
- }, Qi ||= function(e, t) {
2577
+ }, ca ||= function(e, t) {
2541
2578
  var n = [...arguments].slice(2);
2542
2579
  return e.apply(t, n);
2543
- }, $i ||= function(e) {
2580
+ }, la ||= function(e) {
2544
2581
  return new e(...[...arguments].slice(1));
2545
2582
  };
2546
- var ea = Y(Array.prototype.forEach);
2583
+ var ua = Y(Array.prototype.forEach);
2547
2584
  Array.prototype.indexOf;
2548
- var ta = Y(Array.prototype.lastIndexOf), na = Y(Array.prototype.pop), ra = Y(Array.prototype.push), ia = Y(Array.prototype.slice), aa = Y(Array.prototype.splice), oa = Array.isArray, sa = Sa(Set), ca = Y(Set.prototype.add), la = Y(Set.prototype.has), ua = Y(String.prototype.toLowerCase), da = Y(String.prototype.toString), fa = Y(String.prototype.match), pa = Y(String.prototype.replace), ma = Y(String.prototype.indexOf), ha = Y(String.prototype.trim), ga = Y(Number.prototype.toString), _a = Y(Boolean.prototype.toString), va = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), ya = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), ba = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), xa = Sa(TypeError);
2585
+ var da = Y(Array.prototype.lastIndexOf), fa = Y(Array.prototype.pop), pa = Y(Array.prototype.push), ma = Y(Array.prototype.slice), ha = Y(Array.prototype.splice), ga = Array.isArray, _a = Ma(Set), va = Y(Set.prototype.add), ya = Y(Set.prototype.has), ba = Y(String.prototype.toLowerCase), xa = Y(String.prototype.toString), Sa = Y(String.prototype.match), Ca = Y(String.prototype.replace), wa = Y(String.prototype.indexOf), Ta = Y(String.prototype.trim), Ea = Y(Number.prototype.toString), Da = Y(Boolean.prototype.toString), Oa = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), ka = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), Aa = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), ja = Ma(TypeError);
2549
2586
  function Y(e) {
2550
2587
  return function(t) {
2551
2588
  t instanceof RegExp && (t.lastIndex = 0);
2552
2589
  var n = [...arguments].slice(1);
2553
- return Qi(e, t, n);
2590
+ return ca(e, t, n);
2554
2591
  };
2555
2592
  }
2556
- function Sa(e) {
2593
+ function Ma(e) {
2557
2594
  return function() {
2558
- return $i(e, [...arguments]);
2595
+ return la(e, [...arguments]);
2559
2596
  };
2560
2597
  }
2561
2598
  function X(e, t) {
2562
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ua;
2563
- if (Ki && Ki(e, null), !oa(t)) return e;
2599
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ba;
2600
+ if (na && na(e, null), !ga(t)) return e;
2564
2601
  let r = t.length;
2565
2602
  for (; r--;) {
2566
2603
  let i = t[r];
2567
2604
  if (typeof i == "string") {
2568
2605
  let e = n(i);
2569
- e !== i && (qi(t) || (t[r] = e), i = e);
2606
+ e !== i && (ra(t) || (t[r] = e), i = e);
2570
2607
  }
2571
2608
  e[i] = !0;
2572
2609
  }
2573
2610
  return e;
2574
2611
  }
2575
- function Ca(e) {
2612
+ function Na(e) {
2576
2613
  for (let t = 0; t < e.length; t++) q(e, t) || (e[t] = null);
2577
2614
  return e;
2578
2615
  }
2579
2616
  function Z(e) {
2580
- let t = Xi(null);
2581
- for (let r of Gi(e)) {
2582
- var n = Hi(r, 2);
2617
+ let t = oa(null);
2618
+ for (let r of ta(e)) {
2619
+ var n = Qi(r, 2);
2583
2620
  let i = n[0], a = n[1];
2584
- q(e, i) && (t[i] = oa(a) ? Ca(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
2621
+ q(e, i) && (t[i] = ga(a) ? Na(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
2585
2622
  }
2586
2623
  return t;
2587
2624
  }
2588
- function wa(e) {
2625
+ function Pa(e) {
2589
2626
  switch (typeof e) {
2590
2627
  case "string": return e;
2591
- case "number": return ga(e);
2592
- case "boolean": return _a(e);
2593
- case "bigint": return va ? va(e) : "0";
2594
- case "symbol": return ya ? ya(e) : "Symbol()";
2595
- case "undefined": return ba(e);
2628
+ case "number": return Ea(e);
2629
+ case "boolean": return Da(e);
2630
+ case "bigint": return Oa ? Oa(e) : "0";
2631
+ case "symbol": return ka ? ka(e) : "Symbol()";
2632
+ case "undefined": return Aa(e);
2596
2633
  case "function":
2597
2634
  case "object": {
2598
- if (e === null) return ba(e);
2635
+ if (e === null) return Aa(e);
2599
2636
  let t = e, n = Q(t, "toString");
2600
2637
  if (typeof n == "function") {
2601
2638
  let e = n(t);
2602
- return typeof e == "string" ? e : ba(e);
2639
+ return typeof e == "string" ? e : Aa(e);
2603
2640
  }
2604
- return ba(e);
2641
+ return Aa(e);
2605
2642
  }
2606
- default: return ba(e);
2643
+ default: return Aa(e);
2607
2644
  }
2608
2645
  }
2609
2646
  function Q(e, t) {
2610
2647
  for (; e !== null;) {
2611
- let n = Yi(e, t);
2648
+ let n = aa(e, t);
2612
2649
  if (n) {
2613
2650
  if (n.get) return Y(n.get);
2614
2651
  if (typeof n.value == "function") return Y(n.value);
2615
2652
  }
2616
- e = Ji(e);
2653
+ e = ia(e);
2617
2654
  }
2618
2655
  function n() {
2619
2656
  return null;
2620
2657
  }
2621
2658
  return n;
2622
2659
  }
2623
- function Ta(e, t) {
2660
+ function Fa(e, t) {
2624
2661
  for (; e !== null;) {
2625
- let n = Yi(e, t);
2662
+ let n = aa(e, t);
2626
2663
  if (n) return n.get ? Y(n.get) : null;
2627
- e = Ji(e);
2664
+ e = ia(e);
2628
2665
  }
2629
2666
  return null;
2630
2667
  }
2631
- function Ea(e) {
2668
+ function Ia(e) {
2632
2669
  try {
2633
2670
  return J(e, ""), !0;
2634
2671
  } catch {
2635
2672
  return !1;
2636
2673
  }
2637
2674
  }
2638
- var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Oa = G(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), ka = G([
2675
+ var La = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ra = G(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), za = G([
2639
2676
  "feBlend",
2640
2677
  "feColorMatrix",
2641
2678
  "feComponentTransfer",
@@ -2661,7 +2698,7 @@ var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2661
2698
  "feSpotLight",
2662
2699
  "feTile",
2663
2700
  "feTurbulence"
2664
- ]), Aa = G([
2701
+ ]), Ba = G([
2665
2702
  "animate",
2666
2703
  "color-profile",
2667
2704
  "cursor",
@@ -2684,7 +2721,7 @@ var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2684
2721
  "solidcolor",
2685
2722
  "unknown",
2686
2723
  "use"
2687
- ]), ja = G(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ma = G([
2724
+ ]), Va = G(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ha = G([
2688
2725
  "maction",
2689
2726
  "maligngroup",
2690
2727
  "malignmark",
@@ -2700,13 +2737,13 @@ var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2700
2737
  "annotation-xml",
2701
2738
  "mprescripts",
2702
2739
  "none"
2703
- ]), Na = G(["#text"]), Pa = G(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Fa = G(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ia = G(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), La = G([
2740
+ ]), Ua = G(["#text"]), Wa = G(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Ga = G(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ka = G(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), qa = G([
2704
2741
  "xlink:href",
2705
2742
  "xml:id",
2706
2743
  "xlink:title",
2707
2744
  "xml:space",
2708
2745
  "xmlns:xlink"
2709
- ]), Ra = K(/{{[\w\W]*|^[\w\W]*}}/g), za = K(/<%[\w\W]*|^[\w\W]*%>/g), Ba = K(/\${[\w\W]*/g), Va = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ha = K(/^aria-[\-\w]+$/), Ua = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Wa = K(/^(?:\w+script|data):/i), Ga = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ka = K(/^html$/i), qa = K(/^[a-z][.\w]*(-[.\w]+)+$/i), Ja = K(/<[/\w!]/g), Ya = K(/<[/\w]/g), Xa = K(/<\/no(script|embed|frames)/i), Za = K(/\/>/i), $ = {
2746
+ ]), Ja = K(/{{[\w\W]*|^[\w\W]*}}/g), Ya = K(/<%[\w\W]*|^[\w\W]*%>/g), Xa = K(/\${[\w\W]*/g), Za = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), Qa = K(/^aria-[\-\w]+$/), $a = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), eo = K(/^(?:\w+script|data):/i), to = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), no = K(/^html$/i), ro = K(/^[a-z][.\w]*(-[.\w]+)+$/i), io = K(/<[/\w!]/g), ao = K(/<[/\w]/g), oo = K(/<\/no(script|embed|frames)/i), so = K(/\/>/i), $ = {
2710
2747
  element: 1,
2711
2748
  attribute: 2,
2712
2749
  text: 3,
@@ -2719,7 +2756,7 @@ var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2719
2756
  documentType: 10,
2720
2757
  documentFragment: 11,
2721
2758
  notation: 12
2722
- }, Qa = G(X({}, [
2759
+ }, co = G(X({}, [
2723
2760
  "style",
2724
2761
  "script",
2725
2762
  "xmp",
@@ -2728,9 +2765,9 @@ var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2728
2765
  "noframes",
2729
2766
  "plaintext",
2730
2767
  "noscript"
2731
- ])), $a = function() {
2768
+ ])), lo = function() {
2732
2769
  return typeof window > "u" ? null : window;
2733
- }, eo = function(e, t) {
2770
+ }, uo = function(e, t) {
2734
2771
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
2735
2772
  let n = null, r = "data-tt-policy-suffix";
2736
2773
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -2747,7 +2784,7 @@ var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2747
2784
  } catch {
2748
2785
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
2749
2786
  }
2750
- }, to = function() {
2787
+ }, fo = function() {
2751
2788
  return {
2752
2789
  afterSanitizeAttributes: [],
2753
2790
  afterSanitizeElements: [],
@@ -2759,62 +2796,62 @@ var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2759
2796
  uponSanitizeElement: [],
2760
2797
  uponSanitizeShadowNode: []
2761
2798
  };
2762
- }, no = function(e, t, n, r) {
2763
- return q(e, t) && oa(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
2764
- }, ro = function(e, t, n) {
2799
+ }, po = function(e, t, n, r) {
2800
+ return q(e, t) && ga(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
2801
+ }, mo = function(e, t, n) {
2765
2802
  let r = q(e, t) ? e[t] : void 0;
2766
2803
  return r && typeof r == "object" ? Z(r) : n();
2767
2804
  };
2768
- function io() {
2769
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $a(), t = (e) => io(e);
2805
+ function ho() {
2806
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : lo(), t = (e) => ho(e);
2770
2807
  if (t.version = "3.4.17", t.removed = [], !e || !e.document || e.document.nodeType !== $.document || !e.Element) return t.isSupported = !1, t;
2771
2808
  let n = e.document, r = n, i = r.currentScript;
2772
2809
  e.DocumentFragment;
2773
2810
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
2774
2811
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
2775
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Q(d, "cloneNode"), p = Q(d, "remove"), ee = Q(d, "removeAttributeNode"), m = Q(d, "nextSibling"), te = Q(d, "childNodes"), ne = Q(d, "parentNode"), re = Q(d, "shadowRoot"), ie = Q(d, "attributes"), ae = o && o.prototype ? Q(o.prototype, "nodeType") : null, h = o && o.prototype ? Q(o.prototype, "nodeName") : null, oe = o && o.prototype ? Q(o.prototype, "ownerDocument") : null, g = function(e) {
2776
- return ae ? ae(e) : e.nodeType;
2777
- }, se = function(e) {
2778
- return h ? h(e) : e.nodeName;
2779
- }, ce = Ta(d, "namespaceURI"), _ = function(e) {
2780
- return ce ? ce(e) : e.namespaceURI;
2812
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Q(d, "cloneNode"), p = Q(d, "remove"), ee = Q(d, "removeAttributeNode"), m = Q(d, "nextSibling"), te = Q(d, "childNodes"), ne = Q(d, "parentNode"), re = Q(d, "shadowRoot"), ie = Q(d, "attributes"), h = o && o.prototype ? Q(o.prototype, "nodeType") : null, ae = o && o.prototype ? Q(o.prototype, "nodeName") : null, oe = o && o.prototype ? Q(o.prototype, "ownerDocument") : null, g = function(e) {
2813
+ return h ? h(e) : e.nodeType;
2814
+ }, _ = function(e) {
2815
+ return ae ? ae(e) : e.nodeName;
2816
+ }, se = Fa(d, "namespaceURI"), ce = function(e) {
2817
+ return se ? se(e) : e.namespaceURI;
2781
2818
  };
2782
2819
  if (typeof a == "function") {
2783
2820
  let e = n.createElement("template");
2784
2821
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
2785
2822
  }
2786
- let v, y = "", le, ue = !1, de = 0, fe = function() {
2787
- if (de > 0) throw xa("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
2788
- }, pe = function(e) {
2789
- fe(), de++;
2823
+ let v, y = "", le, ue = !1, b = 0, de = function() {
2824
+ if (b > 0) throw ja("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
2825
+ }, x = function(e) {
2826
+ de(), b++;
2790
2827
  try {
2791
2828
  return v.createHTML(e);
2792
2829
  } finally {
2793
- de--;
2830
+ b--;
2794
2831
  }
2795
- }, me = function(e) {
2796
- fe(), de++;
2832
+ }, fe = function(e) {
2833
+ de(), b++;
2797
2834
  try {
2798
2835
  return v.createScriptURL(e);
2799
2836
  } finally {
2800
- de--;
2801
- }
2802
- }, b = function() {
2803
- return ue ||= (le = eo(u, i), !0), le;
2804
- }, he = n, ge = he.implementation, _e = he.createNodeIterator, ve = he.createDocumentFragment, ye = he.getElementsByTagName, be = r.importNode, x = to();
2805
- t.isSupported = typeof Gi == "function" && typeof ne == "function" && ge && ge.createHTMLDocument !== void 0;
2806
- let xe = Ra, Se = za, Ce = Ba, we = Va, Te = Ha, Ee = Wa, De = Ga, Oe = qa, ke = Ua, S = null, Ae = X({}, [
2807
- ...Da,
2808
- ...Oa,
2809
- ...ka,
2810
- ...ja,
2811
- ...Na
2812
- ]), C = null, je = X({}, [
2813
- ...Pa,
2814
- ...Fa,
2815
- ...Ia,
2816
- ...La
2817
- ]), w = Object.seal(Xi(null, {
2837
+ b--;
2838
+ }
2839
+ }, S = function() {
2840
+ return ue ||= (le = uo(u, i), !0), le;
2841
+ }, pe = n, me = pe.implementation, he = pe.createNodeIterator, ge = pe.createDocumentFragment, _e = pe.getElementsByTagName, ve = r.importNode, C = fo();
2842
+ t.isSupported = typeof ta == "function" && typeof ne == "function" && me && me.createHTMLDocument !== void 0;
2843
+ let ye = Ja, be = Ya, xe = Xa, Se = Za, Ce = Qa, we = eo, Te = to, Ee = ro, De = $a, w = null, Oe = X({}, [
2844
+ ...La,
2845
+ ...Ra,
2846
+ ...za,
2847
+ ...Va,
2848
+ ...Ua
2849
+ ]), T = null, ke = X({}, [
2850
+ ...Wa,
2851
+ ...Ga,
2852
+ ...Ka,
2853
+ ...qa
2854
+ ]), E = Object.seal(oa(null, {
2818
2855
  tagNameCheck: {
2819
2856
  writable: !0,
2820
2857
  configurable: !1,
@@ -2833,7 +2870,7 @@ function io() {
2833
2870
  enumerable: !0,
2834
2871
  value: !1
2835
2872
  }
2836
- })), Me = null, Ne = null, Pe = Object.seal(Xi(null, {
2873
+ })), Ae = null, je = null, Me = Object.seal(oa(null, {
2837
2874
  tagCheck: {
2838
2875
  writable: !0,
2839
2876
  configurable: !1,
@@ -2846,14 +2883,14 @@ function io() {
2846
2883
  enumerable: !0,
2847
2884
  value: null
2848
2885
  }
2849
- })), Fe = !0, Ie = !0, Le = !1, Re = !0, T = !1, ze = !0, Be = !1, Ve = !1, He = null, Ue = null, We = !1, Ge = !1, Ke = !1, qe = !1, Je = !0, Ye = !1, Xe = "user-content-", E = !0, Ze = !1, Qe = null, $e = {}, et = null, tt = X({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), nt = null, rt = X({}, [
2886
+ })), Ne = !0, Pe = !0, Fe = !1, Ie = !0, Le = !1, D = !0, Re = !1, ze = !1, Be = null, O = null, Ve = !1, He = !1, Ue = !1, We = !1, Ge = !0, Ke = !1, qe = "user-content-", Je = !0, Ye = !1, Xe = null, Ze = {}, Qe = null, $e = X({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), et = null, tt = X({}, [
2850
2887
  "audio",
2851
2888
  "video",
2852
2889
  "img",
2853
2890
  "source",
2854
2891
  "image",
2855
2892
  "track"
2856
- ]), it = null, at = X({}, [
2893
+ ]), nt = null, rt = X({}, [
2857
2894
  "alt",
2858
2895
  "class",
2859
2896
  "for",
@@ -2868,72 +2905,72 @@ function io() {
2868
2905
  "value",
2869
2906
  "style",
2870
2907
  "xmlns"
2871
- ]), ot = "http://www.w3.org/1998/Math/MathML", st = "http://www.w3.org/2000/svg", D = "http://www.w3.org/1999/xhtml", ct = D, lt = !1, ut = null, dt = X({}, [
2872
- ot,
2873
- st,
2874
- D
2875
- ], da), ft = G([
2908
+ ]), k = "http://www.w3.org/1998/Math/MathML", it = "http://www.w3.org/2000/svg", A = "http://www.w3.org/1999/xhtml", at = A, ot = !1, st = null, ct = X({}, [
2909
+ k,
2910
+ it,
2911
+ A
2912
+ ], xa), lt = G([
2876
2913
  "mi",
2877
2914
  "mo",
2878
2915
  "mn",
2879
2916
  "ms",
2880
2917
  "mtext"
2881
- ]), O = X({}, ft), pt = G(["annotation-xml"]), mt = X({}, pt), ht = X({}, [
2918
+ ]), ut = X({}, lt), dt = G(["annotation-xml"]), ft = X({}, dt), pt = X({}, [
2882
2919
  "title",
2883
2920
  "style",
2884
2921
  "font",
2885
2922
  "a",
2886
2923
  "script"
2887
- ]), gt = null, _t = ["application/xhtml+xml", "text/html"], k = null, vt = null, yt = n.createElement("form"), bt = function(e) {
2924
+ ]), mt = null, ht = ["application/xhtml+xml", "text/html"], j = null, gt = null, _t = n.createElement("form"), vt = function(e) {
2888
2925
  return e instanceof RegExp || e instanceof Function;
2889
- }, xt = function() {
2926
+ }, M = function() {
2890
2927
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2891
- if (vt && vt === e) return;
2892
- (!e || typeof e != "object") && (e = {}), e = Z(e), gt = _t.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, k = gt === "application/xhtml+xml" ? da : ua, S = no(e, "ALLOWED_TAGS", Ae, { transform: k }), C = no(e, "ALLOWED_ATTR", je, { transform: k }), ut = no(e, "ALLOWED_NAMESPACES", dt, { transform: da }), it = no(e, "ADD_URI_SAFE_ATTR", at, {
2893
- transform: k,
2894
- base: at
2895
- }), nt = no(e, "ADD_DATA_URI_TAGS", rt, {
2896
- transform: k,
2928
+ if (gt && gt === e) return;
2929
+ (!e || typeof e != "object") && (e = {}), e = Z(e), mt = ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, j = mt === "application/xhtml+xml" ? xa : ba, w = po(e, "ALLOWED_TAGS", Oe, { transform: j }), T = po(e, "ALLOWED_ATTR", ke, { transform: j }), st = po(e, "ALLOWED_NAMESPACES", ct, { transform: xa }), nt = po(e, "ADD_URI_SAFE_ATTR", rt, {
2930
+ transform: j,
2897
2931
  base: rt
2898
- }), et = no(e, "FORBID_CONTENTS", tt, { transform: k }), Me = no(e, "FORBID_TAGS", Z({}), { transform: k }), Ne = no(e, "FORBID_ATTR", Z({}), { transform: k }), $e = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, Fe = e.ALLOW_ARIA_ATTR !== !1, Ie = e.ALLOW_DATA_ATTR !== !1, Le = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Re = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, T = e.SAFE_FOR_TEMPLATES || !1, ze = e.SAFE_FOR_XML !== !1, Be = e.WHOLE_DOCUMENT || !1, Ge = e.RETURN_DOM || !1, Ke = e.RETURN_DOM_FRAGMENT || !1, qe = e.RETURN_TRUSTED_TYPE || !1, We = e.FORCE_BODY || !1, Je = e.SANITIZE_DOM !== !1, Ye = e.SANITIZE_NAMED_PROPS || !1, E = e.KEEP_CONTENT !== !1, Ze = e.IN_PLACE || !1, ke = Ea(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ua, ct = typeof e.NAMESPACE == "string" ? e.NAMESPACE : D, O = ro(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, ft)), mt = ro(e, "HTML_INTEGRATION_POINTS", () => X({}, pt));
2899
- let t = ro(e, "CUSTOM_ELEMENT_HANDLING", () => Xi(null));
2900
- if (w = Xi(null), q(t, "tagNameCheck") && bt(t.tagNameCheck) && (w.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && bt(t.attributeNameCheck) && (w.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (w.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(w), T && (Ie = !1), Ke && (Ge = !0), $e && (S = X({}, Na), C = Xi(null), $e.html === !0 && (X(S, Da), X(C, Pa)), $e.svg === !0 && (X(S, Oa), X(C, Fa), X(C, La)), $e.svgFilters === !0 && (X(S, ka), X(C, Fa), X(C, La)), $e.mathMl === !0 && (X(S, ja), X(C, Ia), X(C, La))), Pe.tagCheck = null, Pe.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Pe.tagCheck = e.ADD_TAGS : oa(e.ADD_TAGS) && (S === Ae && (S = Z(S)), X(S, e.ADD_TAGS, k))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Pe.attributeCheck = e.ADD_ATTR : oa(e.ADD_ATTR) && (C === je && (C = Z(C)), X(C, e.ADD_ATTR, k))), q(e, "ADD_FORBID_CONTENTS") && oa(e.ADD_FORBID_CONTENTS) && (et === tt && (et = Z(et)), X(et, e.ADD_FORBID_CONTENTS, k)), E && (S["#text"] = !0), Be && X(S, [
2932
+ }), et = po(e, "ADD_DATA_URI_TAGS", tt, {
2933
+ transform: j,
2934
+ base: tt
2935
+ }), Qe = po(e, "FORBID_CONTENTS", $e, { transform: j }), Ae = po(e, "FORBID_TAGS", Z({}), { transform: j }), je = po(e, "FORBID_ATTR", Z({}), { transform: j }), Ze = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, Ne = e.ALLOW_ARIA_ATTR !== !1, Pe = e.ALLOW_DATA_ATTR !== !1, Fe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ie = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Le = e.SAFE_FOR_TEMPLATES || !1, D = e.SAFE_FOR_XML !== !1, Re = e.WHOLE_DOCUMENT || !1, He = e.RETURN_DOM || !1, Ue = e.RETURN_DOM_FRAGMENT || !1, We = e.RETURN_TRUSTED_TYPE || !1, Ve = e.FORCE_BODY || !1, Ge = e.SANITIZE_DOM !== !1, Ke = e.SANITIZE_NAMED_PROPS || !1, Je = e.KEEP_CONTENT !== !1, Ye = e.IN_PLACE || !1, De = Ia(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : $a, at = typeof e.NAMESPACE == "string" ? e.NAMESPACE : A, ut = mo(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, lt)), ft = mo(e, "HTML_INTEGRATION_POINTS", () => X({}, dt));
2936
+ let t = mo(e, "CUSTOM_ELEMENT_HANDLING", () => oa(null));
2937
+ if (E = oa(null), q(t, "tagNameCheck") && vt(t.tagNameCheck) && (E.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && vt(t.attributeNameCheck) && (E.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (E.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(E), Le && (Pe = !1), Ue && (He = !0), Ze && (w = X({}, Ua), T = oa(null), Ze.html === !0 && (X(w, La), X(T, Wa)), Ze.svg === !0 && (X(w, Ra), X(T, Ga), X(T, qa)), Ze.svgFilters === !0 && (X(w, za), X(T, Ga), X(T, qa)), Ze.mathMl === !0 && (X(w, Va), X(T, Ka), X(T, qa))), Me.tagCheck = null, Me.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Me.tagCheck = e.ADD_TAGS : ga(e.ADD_TAGS) && (w === Oe && (w = Z(w)), X(w, e.ADD_TAGS, j))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Me.attributeCheck = e.ADD_ATTR : ga(e.ADD_ATTR) && (T === ke && (T = Z(T)), X(T, e.ADD_ATTR, j))), q(e, "ADD_FORBID_CONTENTS") && ga(e.ADD_FORBID_CONTENTS) && (Qe === $e && (Qe = Z(Qe)), X(Qe, e.ADD_FORBID_CONTENTS, j)), Je && (w["#text"] = !0), Re && X(w, [
2901
2938
  "html",
2902
2939
  "head",
2903
2940
  "body"
2904
- ]), S.table && (X(S, ["tbody"]), delete Me.tbody), e.TRUSTED_TYPES_POLICY) {
2905
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw xa("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2906
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw xa("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2941
+ ]), w.table && (X(w, ["tbody"]), delete Ae.tbody), e.TRUSTED_TYPES_POLICY) {
2942
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw ja("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2943
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw ja("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2907
2944
  let t = v;
2908
2945
  v = e.TRUSTED_TYPES_POLICY;
2909
2946
  try {
2910
- y = pe("");
2947
+ y = x("");
2911
2948
  } catch (e) {
2912
2949
  throw v = t, e;
2913
2950
  }
2914
- } else e.TRUSTED_TYPES_POLICY === null ? (v = void 0, y = "") : (v === void 0 && (v = b()), v && typeof y == "string" && (y = pe("")));
2915
- G && G(e), vt = e;
2916
- }, St = X({}, [
2917
- ...Oa,
2918
- ...ka,
2919
- ...Aa
2920
- ]), Ct = X({}, [...ja, ...Ma]), wt = function(e, t, n) {
2921
- return t.namespaceURI === D ? e === "svg" : t.namespaceURI === ot ? e === "svg" && (n === "annotation-xml" || O[n]) : !!St[e];
2922
- }, Tt = function(e, t, n) {
2923
- return t.namespaceURI === D ? e === "math" : t.namespaceURI === st ? e === "math" && mt[n] : !!Ct[e];
2924
- }, Et = function(e, t, n) {
2925
- return t.namespaceURI === st && !mt[n] || t.namespaceURI === ot && !O[n] ? !1 : !Ct[e] && (ht[e] || !St[e]);
2926
- }, Dt = function(e) {
2927
- let t = _(e), n = ua(se(e)), r = ne(e), i, a;
2928
- return r && g(r) === $.element ? (i = { namespaceURI: _(r) }, a = ua(se(r))) : (i = { namespaceURI: ct }, a = "template"), ut[t] ? t === st ? wt(n, i, a) : t === ot ? Tt(n, i, a) : t === D ? Et(n, i, a) : !!(gt === "application/xhtml+xml" && ut[t]) : !1;
2929
- }, A = function(e) {
2930
- ra(t.removed, { element: e });
2951
+ } else e.TRUSTED_TYPES_POLICY === null ? (v = void 0, y = "") : (v === void 0 && (v = S()), v && typeof y == "string" && (y = x("")));
2952
+ G && G(e), gt = e;
2953
+ }, yt = X({}, [
2954
+ ...Ra,
2955
+ ...za,
2956
+ ...Ba
2957
+ ]), bt = X({}, [...Va, ...Ha]), xt = function(e, t, n) {
2958
+ return t.namespaceURI === A ? e === "svg" : t.namespaceURI === k ? e === "svg" && (n === "annotation-xml" || ut[n]) : !!yt[e];
2959
+ }, St = function(e, t, n) {
2960
+ return t.namespaceURI === A ? e === "math" : t.namespaceURI === it ? e === "math" && ft[n] : !!bt[e];
2961
+ }, Ct = function(e, t, n) {
2962
+ return t.namespaceURI === it && !ft[n] || t.namespaceURI === k && !ut[n] ? !1 : !bt[e] && (pt[e] || !yt[e]);
2963
+ }, wt = function(e) {
2964
+ let t = ce(e), n = ba(_(e)), r = ne(e), i, a;
2965
+ return r && g(r) === $.element ? (i = { namespaceURI: ce(r) }, a = ba(_(r))) : (i = { namespaceURI: at }, a = "template"), st[t] ? t === it ? xt(n, i, a) : t === k ? St(n, i, a) : t === A ? Ct(n, i, a) : !!(mt === "application/xhtml+xml" && st[t]) : !1;
2966
+ }, Tt = function(e) {
2967
+ pa(t.removed, { element: e });
2931
2968
  try {
2932
2969
  ne(e).removeChild(e);
2933
2970
  } catch {
2934
- if (p(e), !ne(e)) throw xa("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2971
+ if (p(e), !ne(e)) throw ja("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2935
2972
  }
2936
- }, j = function(e, t, n) {
2973
+ }, Et = function(e, t, n) {
2937
2974
  try {
2938
2975
  ee(e, t);
2939
2976
  } catch {
@@ -2941,10 +2978,10 @@ function io() {
2941
2978
  e.removeAttribute(n);
2942
2979
  } catch {}
2943
2980
  }
2944
- }, M = function(e) {
2945
- At(e);
2981
+ }, Dt = function(e) {
2982
+ jt(e);
2946
2983
  let t = te(e);
2947
- t && ea(ia(t), (e) => {
2984
+ t && ua(ma(t), (e) => {
2948
2985
  try {
2949
2986
  p(e);
2950
2987
  } catch {}
@@ -2952,7 +2989,7 @@ function io() {
2952
2989
  let n = g(e) === $.element ? ie(e) : null;
2953
2990
  if (n) for (let t = n.length - 1; t >= 0; --t) {
2954
2991
  let r = n[t], i = r && r.name;
2955
- typeof i == "string" && j(e, r, i);
2992
+ typeof i == "string" && Et(e, r, i);
2956
2993
  }
2957
2994
  }, Ot = function(e, n, r) {
2958
2995
  if (!r) try {
@@ -2960,7 +2997,7 @@ function io() {
2960
2997
  } catch {
2961
2998
  r = null;
2962
2999
  }
2963
- ra(t.removed, {
3000
+ pa(t.removed, {
2964
3001
  attribute: r || null,
2965
3002
  from: n
2966
3003
  });
@@ -2972,8 +3009,8 @@ function io() {
2972
3009
  } catch {}
2973
3010
  }
2974
3011
  if (e === "is") {
2975
- if (Ge || Ke) try {
2976
- A(n);
3012
+ if (He || Ue) try {
3013
+ Tt(n);
2977
3014
  } catch {}
2978
3015
  else try {
2979
3016
  n.setAttribute(e, "");
@@ -2983,144 +3020,144 @@ function io() {
2983
3020
  let t = ie(e);
2984
3021
  if (t) for (let n = t.length - 1; n >= 0; --n) {
2985
3022
  let r = t[n], i = r && r.name;
2986
- typeof i != "string" || C[k(i)] || j(e, r, i);
3023
+ typeof i != "string" || T[j(i)] || Et(e, r, i);
2987
3024
  }
2988
- }, N = function(e, t) {
3025
+ }, At = function(e, t) {
2989
3026
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = [e];
2990
3027
  for (; r.length > 0;) {
2991
3028
  let e = r.pop();
2992
3029
  if (t(e) === !1) continue;
2993
3030
  if (n && g(e) === $.element) {
2994
3031
  let t = re(e);
2995
- F(t) && r.push(t);
3032
+ Wt(t) && r.push(t);
2996
3033
  }
2997
3034
  let i = te(e);
2998
3035
  if (i) for (let e = i.length - 1; e >= 0; --e) r.push(i[e]);
2999
3036
  }
3000
- }, At = function(e) {
3001
- N(e, (e) => {
3037
+ }, jt = function(e) {
3038
+ At(e, (e) => {
3002
3039
  g(e) === $.element && kt(e);
3003
3040
  });
3004
- }, jt = function(e) {
3041
+ }, Mt = function(e) {
3005
3042
  let t = [];
3006
- return N(e, (e) => {
3043
+ return At(e, (e) => {
3007
3044
  t.push(e);
3008
3045
  }, !0), t;
3009
- }, Mt = function(e, t) {
3010
- let n = sa();
3011
- ea(jt(e), (e) => {
3012
- g(e) === $.element && ca(n, e);
3013
- }), ea(t, (e) => {
3014
- g(e) === $.element && !la(n, e) && kt(e);
3046
+ }, Nt = function(e, t) {
3047
+ let n = _a();
3048
+ ua(Mt(e), (e) => {
3049
+ g(e) === $.element && va(n, e);
3050
+ }), ua(t, (e) => {
3051
+ g(e) === $.element && !ya(n, e) && kt(e);
3015
3052
  });
3016
- }, Nt = function(e, n) {
3053
+ }, Pt = function(e, n) {
3017
3054
  let r = !1;
3018
- return ea(t.removed, (t) => {
3019
- t.element && (r ||= t.element === e, At(t.element));
3020
- }), Mt(e, n), r;
3021
- }, Pt = function(e, t) {
3022
- let n = Qe, r = null, i = () => (r || (r = sa(), ea(t, (e) => {
3023
- ca(r, e);
3055
+ return ua(t.removed, (t) => {
3056
+ t.element && (r ||= t.element === e, jt(t.element));
3057
+ }), Nt(e, n), r;
3058
+ }, Ft = function(e, t) {
3059
+ let n = Xe, r = null, i = () => (r || (r = _a(), ua(t, (e) => {
3060
+ va(r, e);
3024
3061
  })), r);
3025
3062
  for (let t = 0;; t++) {
3026
- let r = jt(e), a = [e], o = !1;
3027
- if (ea(r, (e) => {
3028
- g(e) === $.documentFragment ? ra(a, e) : !o && !la(n, e) && (o = la(i(), e));
3063
+ let r = Mt(e), a = [e], o = !1;
3064
+ if (ua(r, (e) => {
3065
+ g(e) === $.documentFragment ? pa(a, e) : !o && !ya(n, e) && (o = ya(i(), e));
3029
3066
  }), !o) return;
3030
- if (t >= 8) throw xa("the tree kept changing during in-place sanitization; refusing to return it");
3031
- ea(a, (t, n) => {
3032
- Ft(t, n > 0, e, i());
3067
+ if (t >= 8) throw ja("the tree kept changing during in-place sanitization; refusing to return it");
3068
+ ua(a, (t, n) => {
3069
+ N(t, n > 0, e, i());
3033
3070
  });
3034
3071
  }
3035
- }, Ft = function(e, t, n, r) {
3036
- let i = Bt(e), a;
3037
- for (; a = i.nextNode();) la(r, a) && !la(Qe, a) && (t && I(x.uponSanitizeShadowNode, a, null), Xt(a, n), rn(a, n), F(a.content) && an(a.content));
3072
+ }, N = function(e, t, n, r) {
3073
+ let i = zt(e), a;
3074
+ for (; a = i.nextNode();) ya(r, a) && !ya(Xe, a) && (t && F(C.uponSanitizeShadowNode, a, null), Xt(a, n), rn(a, n), Wt(a.content) && an(a.content));
3038
3075
  }, It = function(e) {
3039
- Qe && ca(Qe, e);
3076
+ Xe && va(Xe, e);
3040
3077
  }, Lt = function(e, t) {
3041
- return ze ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
3078
+ return D ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
3042
3079
  }, Rt = function(e) {
3043
- ze && N(e, (e) => {
3080
+ D && At(e, (e) => {
3044
3081
  let t = g(e);
3045
- if (t === $.processingInstruction || t === $.comment && J(Ya, e.data)) {
3082
+ if (t === $.processingInstruction || t === $.comment && J(ao, e.data)) {
3046
3083
  try {
3047
3084
  p(e);
3048
3085
  } catch {}
3049
3086
  return !1;
3050
3087
  }
3051
3088
  if (t === $.element) {
3052
- let t = e, n = k(se(e));
3089
+ let t = e, n = j(_(e));
3053
3090
  try {
3054
3091
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Lt("for", n) && t.removeAttribute("for");
3055
3092
  } catch {}
3056
3093
  }
3057
3094
  return !0;
3058
3095
  });
3059
- }, zt = function(e) {
3096
+ }, P = function(e) {
3060
3097
  let t = null, r = null;
3061
- if (We) e = "<remove></remove>" + e;
3098
+ if (Ve) e = "<remove></remove>" + e;
3062
3099
  else {
3063
- let t = fa(e, /^[\r\n\t ]+/);
3100
+ let t = Sa(e, /^[\r\n\t ]+/);
3064
3101
  r = t && t[0];
3065
3102
  }
3066
- gt === "application/xhtml+xml" && ct === D && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
3067
- let i = v ? pe(e) : e;
3068
- if (ct === D) try {
3069
- t = new l().parseFromString(i, gt);
3103
+ mt === "application/xhtml+xml" && at === A && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
3104
+ let i = v ? x(e) : e;
3105
+ if (at === A) try {
3106
+ t = new l().parseFromString(i, mt);
3070
3107
  } catch {}
3071
3108
  if (!t || !t.documentElement) {
3072
- t = ge.createDocument(ct, "template", null);
3109
+ t = me.createDocument(at, "template", null);
3073
3110
  try {
3074
- t.documentElement.innerHTML = lt ? y : i;
3111
+ t.documentElement.innerHTML = ot ? y : i;
3075
3112
  } catch {}
3076
3113
  }
3077
3114
  let a = t.body || t.documentElement;
3078
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), ct === D ? ye.call(t, Be ? "html" : "body")[0] : Be ? t.documentElement : a;
3079
- }, Bt = function(e) {
3115
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), at === A ? _e.call(t, Re ? "html" : "body")[0] : Re ? t.documentElement : a;
3116
+ }, zt = function(e) {
3080
3117
  let t = oe ? oe(e) : e.ownerDocument;
3081
- return _e.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
3118
+ return he.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
3119
+ }, Bt = function(e) {
3120
+ return e = Ca(e, ye, " "), e = Ca(e, be, " "), e = Ca(e, xe, " "), e;
3082
3121
  }, Vt = function(e) {
3083
- return e = pa(e, xe, " "), e = pa(e, Se, " "), e = pa(e, Ce, " "), e;
3084
- }, P = function(e) {
3085
3122
  Ht(e);
3086
3123
  let t = e.querySelectorAll?.call(e, "template");
3087
- t && ea(t, (e) => {
3088
- F(e.content) && P(e.content);
3124
+ t && ua(t, (e) => {
3125
+ Wt(e.content) && Vt(e.content);
3089
3126
  });
3090
3127
  }, Ht = function(e) {
3091
3128
  e.normalize();
3092
- let t = oe ? oe(e) : e.ownerDocument, n = _e.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
3093
- for (; r;) r.data = Vt(r.data), r = n.nextNode();
3129
+ let t = oe ? oe(e) : e.ownerDocument, n = he.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
3130
+ for (; r;) r.data = Bt(r.data), r = n.nextNode();
3094
3131
  }, Ut = function(e) {
3095
- let t = h ? h(e) : null;
3096
- return typeof t != "string" || k(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ie(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== ae(e) || e.childNodes !== te(e);
3097
- }, F = function(e) {
3098
- if (!ae || typeof e != "object" || !e) return !1;
3132
+ let t = ae ? ae(e) : null;
3133
+ return typeof t != "string" || j(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ie(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== h(e) || e.childNodes !== te(e);
3134
+ }, Wt = function(e) {
3135
+ if (!h || typeof e != "object" || !e) return !1;
3099
3136
  try {
3100
- return ae(e) === $.documentFragment;
3137
+ return h(e) === $.documentFragment;
3101
3138
  } catch {
3102
3139
  return !1;
3103
3140
  }
3104
- }, Wt = function(e) {
3105
- if (!ae || typeof e != "object" || !e) return !1;
3141
+ }, Gt = function(e) {
3142
+ if (!h || typeof e != "object" || !e) return !1;
3106
3143
  try {
3107
- return typeof ae(e) == "number";
3144
+ return typeof h(e) == "number";
3108
3145
  } catch {
3109
3146
  return !1;
3110
3147
  }
3111
3148
  };
3112
- function I(e, n, r) {
3113
- e.length !== 0 && ea(e, (e) => {
3114
- e.call(t, n, r, vt);
3149
+ function F(e, n, r) {
3150
+ e.length !== 0 && ua(e, (e) => {
3151
+ e.call(t, n, r, gt);
3115
3152
  });
3116
3153
  }
3117
- let Gt = function(e, t) {
3118
- return !!(ze && e.hasChildNodes() && !Wt(e.firstElementChild) && J(Ja, e.textContent) && J(Ja, e.innerHTML) || ze && Qa[t] && g(e) === $.element && _(e) === D && (Wt(e.firstElementChild) || typeof e.textContent == "string" && J(Ja, e.textContent)) || e.nodeType === $.processingInstruction || ze && e.nodeType === $.comment && J(Ya, e.data));
3119
- }, Kt = function(e, t) {
3154
+ let Kt = function(e, t) {
3155
+ return !!(D && e.hasChildNodes() && !Gt(e.firstElementChild) && J(io, e.textContent) && J(io, e.innerHTML) || D && co[t] && g(e) === $.element && ce(e) === A && (Gt(e.firstElementChild) || typeof e.textContent == "string" && J(io, e.textContent)) || e.nodeType === $.processingInstruction || D && e.nodeType === $.comment && J(ao, e.data));
3156
+ }, qt = function(e, t) {
3120
3157
  return e instanceof RegExp ? J(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
3121
- }, qt = function(e, t, n) {
3122
- if (!Me[t] && $t(t) && Kt(w.tagNameCheck, t)) return !1;
3123
- if (E && !et[t] && !et[ua(t)]) {
3158
+ }, Jt = function(e, t, n) {
3159
+ if (!Ae[t] && $t(t) && qt(E.tagNameCheck, t)) return !1;
3160
+ if (Je && !Qe[t] && !Qe[ba(t)]) {
3124
3161
  let t = ne(e), r = te(e);
3125
3162
  if (r && t) {
3126
3163
  let i = r.length;
@@ -3130,34 +3167,34 @@ function io() {
3130
3167
  }
3131
3168
  }
3132
3169
  }
3133
- return A(e), !0;
3134
- }, Jt = function(e, t, n, r) {
3170
+ return Tt(e), !0;
3171
+ }, Yt = function(e, t, n, r) {
3135
3172
  return e.length === 0 ? t : t === n || t === r ? Z(t) : t;
3136
- }, Yt = function(e, t) {
3137
- return e === t || ne(e) !== null ? !1 : (Ze && At(e), !0);
3173
+ }, I = function(e, t) {
3174
+ return e === t || ne(e) !== null ? !1 : (Ye && jt(e), !0);
3138
3175
  }, Xt = function(e, n) {
3139
- if (It(e), I(x.beforeSanitizeElements, e, null), Yt(e, n)) return !0;
3140
- if (Ut(e)) return A(e), !0;
3141
- let r = k(se(e));
3142
- if (S = Jt(x.uponSanitizeElement, S, Ae, He), I(x.uponSanitizeElement, e, {
3176
+ if (It(e), F(C.beforeSanitizeElements, e, null), I(e, n)) return !0;
3177
+ if (Ut(e)) return Tt(e), !0;
3178
+ let r = j(_(e));
3179
+ if (w = Yt(C.uponSanitizeElement, w, Oe, Be), F(C.uponSanitizeElement, e, {
3143
3180
  tagName: r,
3144
- allowedTags: S
3145
- }), Yt(e, n)) return !0;
3146
- if (Gt(e, r)) return A(e), !0;
3147
- if (Me[r] || !(Pe.tagCheck instanceof Function && Pe.tagCheck(r)) && !S[r]) {
3148
- let t = qt(e, r, n);
3149
- return t === !1 && (I(x.afterSanitizeElements, e, null), Yt(e, n)) ? !0 : t;
3150
- }
3151
- if (g(e) === $.element && !Dt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(Xa, e.innerHTML)) return A(e), !0;
3152
- if (T && e.nodeType === $.text) {
3153
- let n = Vt(e.textContent);
3154
- e.textContent !== n && (ra(t.removed, { element: e.cloneNode() }), e.textContent = n);
3155
- }
3156
- return I(x.afterSanitizeElements, e, null), Yt(e, n);
3181
+ allowedTags: w
3182
+ }), I(e, n)) return !0;
3183
+ if (Kt(e, r)) return Tt(e), !0;
3184
+ if (Ae[r] || !(Me.tagCheck instanceof Function && Me.tagCheck(r)) && !w[r]) {
3185
+ let t = Jt(e, r, n);
3186
+ return t === !1 && (F(C.afterSanitizeElements, e, null), I(e, n)) ? !0 : t;
3187
+ }
3188
+ if (g(e) === $.element && !wt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(oo, e.innerHTML)) return Tt(e), !0;
3189
+ if (Le && e.nodeType === $.text) {
3190
+ let n = Bt(e.textContent);
3191
+ e.textContent !== n && (pa(t.removed, { element: e.cloneNode() }), e.textContent = n);
3192
+ }
3193
+ return F(C.afterSanitizeElements, e, null), I(e, n);
3157
3194
  }, Zt = function(e, t, r) {
3158
- if (Ne[t] || Lt(t, e) || Je && (t === "id" || t === "name") && (r in n || r in yt)) return !1;
3159
- let i = C[t] || Pe.attributeCheck instanceof Function && Pe.attributeCheck(t, e);
3160
- return Ie && J(we, t) || Fe && J(Te, t) ? !0 : i ? it[t] || J(ke, pa(r, De, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ma(r, "data:") === 0 && nt[e] || Le && !J(Ee, pa(r, De, "")) ? !0 : !r : $t(e) && Kt(w.tagNameCheck, e) && Kt(w.attributeNameCheck, t, e) || t === "is" && w.allowCustomizedBuiltInElements && Kt(w.tagNameCheck, r);
3195
+ if (je[t] || Lt(t, e) || Ge && (t === "id" || t === "name") && (r in n || r in _t)) return !1;
3196
+ let i = T[t] || Me.attributeCheck instanceof Function && Me.attributeCheck(t, e);
3197
+ return Pe && J(Se, t) || Ne && J(Ce, t) ? !0 : i ? nt[t] || J(De, Ca(r, Te, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && wa(r, "data:") === 0 && et[e] || Fe && !J(we, Ca(r, Te, "")) ? !0 : !r : $t(e) && qt(E.tagNameCheck, e) && qt(E.attributeNameCheck, t, e) || t === "is" && E.allowCustomizedBuiltInElements && qt(E.tagNameCheck, r);
3161
3198
  }, Qt = X({}, [
3162
3199
  "annotation-xml",
3163
3200
  "color-profile",
@@ -3168,45 +3205,45 @@ function io() {
3168
3205
  "font-face-uri",
3169
3206
  "missing-glyph"
3170
3207
  ]), $t = function(e) {
3171
- return !Qt[ua(e)] && J(Oe, e);
3208
+ return !Qt[ba(e)] && J(Ee, e);
3172
3209
  }, en = function(e, t, n, r) {
3173
3210
  if (v && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
3174
- case "TrustedHTML": return pe(r);
3175
- case "TrustedScriptURL": return me(r);
3211
+ case "TrustedHTML": return x(r);
3212
+ case "TrustedScriptURL": return fe(r);
3176
3213
  }
3177
3214
  return r;
3178
3215
  }, tn = function(e, t, n, r) {
3179
3216
  try {
3180
- return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Ut(e) || (A(e), !1);
3217
+ return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Ut(e) || (Tt(e), !1);
3181
3218
  } catch {
3182
3219
  return Ot(t, e), !1;
3183
3220
  }
3184
3221
  }, nn = function(e, t) {
3185
- return ze && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : ua(e) === "attributename" && fa(t, "href") !== null;
3222
+ return D && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : ba(e) === "attributename" && Sa(t, "href") !== null;
3186
3223
  }, rn = function(e, n) {
3187
- if (I(x.beforeSanitizeAttributes, e, null), Yt(e, n)) return;
3224
+ if (F(C.beforeSanitizeAttributes, e, null), I(e, n)) return;
3188
3225
  let r = e.attributes;
3189
3226
  if (!r || Ut(e)) return;
3190
- C = Jt(x.uponSanitizeAttribute, C, je, Ue);
3227
+ T = Yt(C.uponSanitizeAttribute, T, ke, O);
3191
3228
  let i = {
3192
3229
  attrName: "",
3193
3230
  attrValue: "",
3194
3231
  keepAttr: !0,
3195
- allowedAttributes: C,
3232
+ allowedAttributes: T,
3196
3233
  forceKeepAttr: void 0
3197
- }, a = r.length, o = k(e.nodeName);
3234
+ }, a = r.length, o = j(e.nodeName);
3198
3235
  for (; a--;) {
3199
- let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = k(s), d = l, f = s === "value" ? d : ha(d), p = !1;
3200
- i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, I(x.uponSanitizeAttribute, e, i), f = i.attrValue, Ye && (u === "id" || u === "name") && ma(f, Xe) !== 0 && (Ot(s, e, n), f = Xe + f, p = !0), nn(s, f) ? Ot(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Re && J(Za, f) ? Ot(s, e, n) : (T && (f = Vt(f)), Zt(o, u, f) ? (f = en(o, u, c, f), f !== d && tn(e, s, c, f) && p && na(t.removed)) : Ot(s, e, n)) : Ot(s, e, n));
3236
+ let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = j(s), d = l, f = s === "value" ? d : Ta(d), p = !1;
3237
+ i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, F(C.uponSanitizeAttribute, e, i), f = i.attrValue, Ke && (u === "id" || u === "name") && wa(f, qe) !== 0 && (Ot(s, e, n), f = qe + f, p = !0), nn(s, f) ? Ot(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Ie && J(so, f) ? Ot(s, e, n) : (Le && (f = Bt(f)), Zt(o, u, f) ? (f = en(o, u, c, f), f !== d && tn(e, s, c, f) && p && fa(t.removed)) : Ot(s, e, n)) : Ot(s, e, n));
3201
3238
  }
3202
- I(x.afterSanitizeAttributes, e, null), Yt(e, n);
3239
+ F(C.afterSanitizeAttributes, e, null), I(e, n);
3203
3240
  }, an = function(e) {
3204
- let t = null, n = Bt(e);
3205
- for (I(x.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (I(x.uponSanitizeShadowNode, t, null), Xt(t, e), rn(t, e), F(t.content) && an(t.content), g(t) === $.element) {
3241
+ let t = null, n = zt(e);
3242
+ for (F(C.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (F(C.uponSanitizeShadowNode, t, null), Xt(t, e), rn(t, e), Wt(t.content) && an(t.content), g(t) === $.element) {
3206
3243
  let e = re(t);
3207
- F(e) && (on(e), an(e));
3244
+ Wt(e) && (on(e), an(e));
3208
3245
  }
3209
- T && Ht(e), I(x.afterSanitizeShadowDOM, e, null);
3246
+ Le && Ht(e), F(C.afterSanitizeShadowDOM, e, null);
3210
3247
  }, on = function(e) {
3211
3248
  let t = [{
3212
3249
  node: e,
@@ -3224,10 +3261,10 @@ function io() {
3224
3261
  shadow: null
3225
3262
  });
3226
3263
  if (r) {
3227
- let e = h ? h(n) : null;
3228
- if (typeof e == "string" && k(e) === "template") {
3264
+ let e = ae ? ae(n) : null;
3265
+ if (typeof e == "string" && j(e) === "template") {
3229
3266
  let e = n.content;
3230
- F(e) && t.push({
3267
+ Wt(e) && t.push({
3231
3268
  node: e,
3232
3269
  shadow: null
3233
3270
  });
@@ -3235,7 +3272,7 @@ function io() {
3235
3272
  }
3236
3273
  if (r) {
3237
3274
  let e = re(n);
3238
- F(e) && t.push({
3275
+ Wt(e) && t.push({
3239
3276
  node: null,
3240
3277
  shadow: e
3241
3278
  }, {
@@ -3247,82 +3284,82 @@ function io() {
3247
3284
  };
3248
3285
  return t.sanitize = function(e) {
3249
3286
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
3250
- if (lt = !e, lt && (e = "<!-->"), typeof e != "string" && !Wt(e) && (e = wa(e), typeof e != "string")) throw xa("dirty is not a string, aborting");
3287
+ if (ot = !e, ot && (e = "<!-->"), typeof e != "string" && !Gt(e) && (e = Pa(e), typeof e != "string")) throw ja("dirty is not a string, aborting");
3251
3288
  if (!t.isSupported) return e;
3252
- Ve ? (S = He, C = Ue) : xt(n), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (S = Z(S)), x.uponSanitizeAttribute.length > 0 && (C = Z(C)), t.removed = [];
3253
- let c = Ze && typeof e != "string" && Wt(e), l = [], u = Qe;
3289
+ ze ? (w = Be, T = O) : M(n), (C.uponSanitizeElement.length > 0 || C.uponSanitizeAttribute.length > 0) && (w = Z(w)), C.uponSanitizeAttribute.length > 0 && (T = Z(T)), t.removed = [];
3290
+ let c = Ye && typeof e != "string" && Gt(e), l = [], u = Xe;
3254
3291
  if (c) {
3255
3292
  Rt(e);
3256
- let t = se(e);
3293
+ let t = _(e);
3257
3294
  if (typeof t == "string") {
3258
- let n = k(t);
3259
- if (!S[n] || Me[n]) throw M(e), xa("root node is forbidden and cannot be sanitized in-place");
3295
+ let n = j(t);
3296
+ if (!w[n] || Ae[n]) throw Dt(e), ja("root node is forbidden and cannot be sanitized in-place");
3260
3297
  }
3261
- if (Ut(e)) throw M(e), xa("root node is clobbered and cannot be sanitized in-place");
3262
- l = jt(e), Qe = sa();
3263
- } else if (Wt(e)) i = zt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), on(i);
3298
+ if (Ut(e)) throw Dt(e), ja("root node is clobbered and cannot be sanitized in-place");
3299
+ l = Mt(e), Xe = _a();
3300
+ } else if (Gt(e)) i = P("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), on(i);
3264
3301
  else {
3265
- if (!Ge && !T && !Be && e.indexOf("<") === -1) return v && qe ? pe(e) : e;
3266
- if (i = zt(e), !i) return Ge ? null : qe ? y : "";
3302
+ if (!He && !Le && !Re && e.indexOf("<") === -1) return v && We ? x(e) : e;
3303
+ if (i = P(e), !i) return He ? null : We ? y : "";
3267
3304
  }
3268
- i && We && A(i.firstChild);
3305
+ i && Ve && Tt(i.firstChild);
3269
3306
  let d = c ? e : i;
3270
3307
  try {
3271
3308
  c && on(e);
3272
- let t = Bt(d);
3273
- for (; o = t.nextNode();) Xt(o, d), rn(o, d), F(o.content) && an(o.content);
3274
- c && Pt(e, l);
3309
+ let t = zt(d);
3310
+ for (; o = t.nextNode();) Xt(o, d), rn(o, d), Wt(o.content) && an(o.content);
3311
+ c && Ft(e, l);
3275
3312
  } catch (t) {
3276
- throw c && (M(e), Nt(e, l)), t;
3313
+ throw c && (Dt(e), Pt(e, l)), t;
3277
3314
  } finally {
3278
- Qe = u;
3315
+ Xe = u;
3279
3316
  }
3280
3317
  if (c) {
3281
- if (Nt(e, l)) throw xa("a node selected for removal could not be safely returned; refusing to sanitize in place");
3282
- return T && P(e), e;
3318
+ if (Pt(e, l)) throw ja("a node selected for removal could not be safely returned; refusing to sanitize in place");
3319
+ return Le && Vt(e), e;
3283
3320
  }
3284
- if (Ge) {
3285
- if (T && P(i), Ke) for (s = ve.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
3321
+ if (He) {
3322
+ if (Le && Vt(i), Ue) for (s = ge.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
3286
3323
  else s = i;
3287
- return (C.shadowroot || C.shadowrootmode) && (s = be.call(r, s, !0)), s;
3324
+ return (T.shadowroot || T.shadowrootmode) && (s = ve.call(r, s, !0)), s;
3288
3325
  }
3289
- let f = Be ? i.outerHTML : i.innerHTML;
3290
- return Be && S["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(Ka, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), T && (f = Vt(f)), v && qe ? pe(f) : f;
3326
+ let f = Re ? i.outerHTML : i.innerHTML;
3327
+ return Re && w["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(no, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), Le && (f = Bt(f)), v && We ? x(f) : f;
3291
3328
  }, t.setConfig = function() {
3292
3329
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3293
- xt(e), Ve = !0, He = S, Ue = C;
3330
+ M(e), ze = !0, Be = w, O = T;
3294
3331
  }, t.clearConfig = function() {
3295
- vt = null, Ve = !1, He = null, Ue = null, v = le, y = "";
3332
+ gt = null, ze = !1, Be = null, O = null, v = le, y = "";
3296
3333
  }, t.isValidAttribute = function(e, t, n) {
3297
- vt || xt({});
3298
- let r = k(e), i = k(t);
3299
- return typeof n == "string" && (nn(t, n) || !Re && J(Za, n)) ? !1 : Zt(r, i, n);
3334
+ gt || M({});
3335
+ let r = j(e), i = j(t);
3336
+ return typeof n == "string" && (nn(t, n) || !Ie && J(so, n)) ? !1 : Zt(r, i, n);
3300
3337
  }, t.addHook = function(e, t) {
3301
- typeof t == "function" && q(x, e) && ra(x[e], t);
3338
+ typeof t == "function" && q(C, e) && pa(C[e], t);
3302
3339
  }, t.removeHook = function(e, t) {
3303
- if (q(x, e)) {
3340
+ if (q(C, e)) {
3304
3341
  if (t !== void 0) {
3305
- let n = ta(x[e], t);
3306
- return n === -1 ? void 0 : aa(x[e], n, 1)[0];
3342
+ let n = da(C[e], t);
3343
+ return n === -1 ? void 0 : ha(C[e], n, 1)[0];
3307
3344
  }
3308
- return na(x[e]);
3345
+ return fa(C[e]);
3309
3346
  }
3310
3347
  }, t.removeHooks = function(e) {
3311
- q(x, e) && (x[e] = []);
3348
+ q(C, e) && (C[e] = []);
3312
3349
  }, t.removeAllHooks = function() {
3313
- x = to();
3350
+ C = fo();
3314
3351
  }, t;
3315
3352
  }
3316
- var ao = io();
3353
+ var go = ho();
3317
3354
  //#endregion
3318
3355
  //#region ../../packages/components/src/chat/markdownHtml.ts
3319
- function oo(e) {
3356
+ function _o(e) {
3320
3357
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3321
3358
  }
3322
- function so(e, t) {
3359
+ function vo(e, t) {
3323
3360
  return `<span class="katex-pending" data-katex="${encodeURIComponent(e)}" data-display="${t}"></span>`;
3324
3361
  }
3325
- var co = {
3362
+ var yo = {
3326
3363
  ADD_ATTR: ["target"],
3327
3364
  ALLOW_UNKNOWN_PROTOCOLS: !0,
3328
3365
  FORBID_TAGS: [
@@ -3343,21 +3380,21 @@ var co = {
3343
3380
  "background"
3344
3381
  ]
3345
3382
  };
3346
- ao.addHook("uponSanitizeAttribute", (e, t) => {
3383
+ go.addHook("uponSanitizeAttribute", (e, t) => {
3347
3384
  t.attrName === "src" && e.nodeName !== "IMG" && (t.keepAttr = !1);
3348
3385
  });
3349
- var lo = "data-held-src";
3350
- function uo(e, t) {
3351
- if (!t) return ao.sanitize(e, co);
3352
- let n = ao.sanitize(e, {
3353
- ...co,
3386
+ var bo = "data-held-src";
3387
+ function xo(e, t) {
3388
+ if (!t) return go.sanitize(e, yo);
3389
+ let n = go.sanitize(e, {
3390
+ ...yo,
3354
3391
  RETURN_DOM_FRAGMENT: !0
3355
3392
  });
3356
3393
  for (let e of Array.from(n.querySelectorAll("img"))) {
3357
3394
  let n = e.getAttribute("src") ?? "";
3358
3395
  if (t.canLoad(n)) continue;
3359
3396
  let r = e.ownerDocument.createElement("button");
3360
- r.type = "button", r.className = "markdown-held-image", r.setAttribute(lo, n), r.textContent = t.label(t.hostOf(n) ?? n), e.replaceWith(r);
3397
+ r.type = "button", r.className = "markdown-held-image", r.setAttribute(bo, n), r.textContent = t.label(t.hostOf(n) ?? n), e.replaceWith(r);
3361
3398
  }
3362
3399
  let r = n.ownerDocument.createElement("div");
3363
3400
  return r.append(n), r.innerHTML;
@@ -3365,7 +3402,7 @@ function uo(e, t) {
3365
3402
  //#endregion
3366
3403
  //#region ../../packages/components/src/chat/PkStreamingMarkdown.vue?vue&type=script&setup=true&lang.ts
3367
3404
  a(), c();
3368
- var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3405
+ var So = ["innerHTML"], Co = 100, wo = /*#__PURE__*/ _(/* @__PURE__ */ e({
3369
3406
  __name: "PkStreamingMarkdown",
3370
3407
  props: {
3371
3408
  markdown: {
@@ -3395,14 +3432,14 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3395
3432
  },
3396
3433
  setup(e) {
3397
3434
  let a = e, { t: c } = f({ useScope: "global" }), m = null;
3398
- function ie() {
3435
+ function te() {
3399
3436
  return m ||= import("./dist-BK6ru3gS.js"), m;
3400
3437
  }
3401
- let h = null;
3402
- function oe() {
3403
- return h ||= import("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.mjs").then((e) => e.default), h;
3438
+ let ne = null;
3439
+ function re() {
3440
+ return ne ||= import("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.mjs").then((e) => e.default), ne;
3404
3441
  }
3405
- let g = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, ce = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
3442
+ let ie = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, h = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
3406
3443
  W.use({ extensions: [{
3407
3444
  name: "inlineKatex",
3408
3445
  level: "inline",
@@ -3411,7 +3448,7 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3411
3448
  if (t !== -1 && (t === 0 || e.charAt(t - 1) === " ")) return t;
3412
3449
  },
3413
3450
  tokenizer(e) {
3414
- let t = e.match(g);
3451
+ let t = e.match(ie);
3415
3452
  if (t) return {
3416
3453
  type: "inlineKatex",
3417
3454
  raw: t[0],
@@ -3420,13 +3457,13 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3420
3457
  };
3421
3458
  },
3422
3459
  renderer(e) {
3423
- return so(e.text, e.displayMode);
3460
+ return vo(e.text, e.displayMode);
3424
3461
  }
3425
3462
  }, {
3426
3463
  name: "blockKatex",
3427
3464
  level: "block",
3428
3465
  tokenizer(e) {
3429
- let t = e.match(ce);
3466
+ let t = e.match(h);
3430
3467
  if (t) return {
3431
3468
  type: "blockKatex",
3432
3469
  raw: t[0],
@@ -3435,7 +3472,7 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3435
3472
  };
3436
3473
  },
3437
3474
  renderer(e) {
3438
- return so(e.text, e.displayMode) + "\n";
3475
+ return vo(e.text, e.displayMode) + "\n";
3439
3476
  }
3440
3477
  }] }), W.use({ extensions: [{
3441
3478
  name: "thinking",
@@ -3456,30 +3493,30 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3456
3493
  return `<div class="thinking-block">${this.parser.parse(e.tokens ?? [])}</div>`;
3457
3494
  }
3458
3495
  }] });
3459
- let _ = new W.Renderer(), v = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), y = /^(?:javascript|data|vbscript|file):/i, le = !1, ue = (e) => v(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
3496
+ let _ = new W.Renderer(), ce = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), v = /^(?:javascript|data|vbscript|file):/i, y = !1, ue = (e) => ce(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
3460
3497
  _.link = function({ href: e, title: t, text: n, tokens: r }) {
3461
3498
  let i = this.parser.parseInline(r), a = (e ?? "").trim().replace(/[\x00-\x1f]/g, "");
3462
- if (!a || y.test(a)) return i;
3463
- let o = le && n === a, s = t || (o ? a : ""), c = s ? ` title="${v(s)}"` : "", l = te(a) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
3464
- return `<a href="${v(a)}"${c}${l}>${o ? ue(a) : i}</a>`;
3499
+ if (!a || v.test(a)) return i;
3500
+ let o = y && n === a, s = t || (o ? a : ""), c = s ? ` title="${ce(s)}"` : "", l = ae(a) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
3501
+ return `<a href="${ce(a)}"${c}${l}>${o ? ue(a) : i}</a>`;
3465
3502
  }, _.table = function(e) {
3466
- le = !0;
3503
+ y = !0;
3467
3504
  try {
3468
- let t = e.header.map((e) => v(this.parser.parseInline(e.tokens, this.parser.textRenderer))), n = (e) => `<tr role="row">${e.map((e, n) => {
3505
+ let t = e.header.map((e) => ce(this.parser.parseInline(e.tokens, this.parser.textRenderer))), n = (e) => `<tr role="row">${e.map((e, n) => {
3469
3506
  let r = this.parser.parseInline(e.tokens), i = e.align ? ` align="${e.align}"` : "";
3470
3507
  return e.header ? `<th role="columnheader"${i}>${r}</th>` : `<td role="cell" data-label="${t[n] ?? ""}"${i}><span>${r}</span></td>`;
3471
3508
  }).join("")}</tr>`, r = e.rows.length ? `<tbody role="rowgroup">${e.rows.map(n).join("")}</tbody>` : "";
3472
3509
  return `<div class="table-wrapper u-table-scroll"><table class="${e.header.length >= 3 && e.rows.length ? "u-table u-table--stack" : "u-table"}" role="table"><thead role="rowgroup">${n(e.header)}</thead>${r}</table></div>\n`;
3473
3510
  } finally {
3474
- le = !1;
3511
+ y = !1;
3475
3512
  }
3476
3513
  };
3477
- let de = /^(sequenceDiagram|graph|classDiagram|stateDiagram|erDiagram|flowchart|xychart-beta)/;
3478
- _.code = ({ text: e }) => de.test(e) ? `<pre class="mermaid">${oo(e)}</pre>` : `<pre><code>${oo(e)}</code></pre>`;
3479
- function fe(e) {
3514
+ let b = /^(sequenceDiagram|graph|classDiagram|stateDiagram|erDiagram|flowchart|xychart-beta)/;
3515
+ _.code = ({ text: e }) => b.test(e) ? `<pre class="mermaid">${_o(e)}</pre>` : `<pre><code>${_o(e)}</code></pre>`;
3516
+ function de(e) {
3480
3517
  return e.replace(/\\\[([\s\S]*?)\\\]/g, (e, t) => `$$${t}$$`).replace(/\\\(([\s\S]*?)\\\)/g, (e, t) => `$${t}$`).replace(/^(\d+)\.(?!\s)/gm, "$1\\.");
3481
3518
  }
3482
- function pe(e) {
3519
+ function x(e) {
3483
3520
  let t = /* @__PURE__ */ new Set(), n = /^(`{3,}|~{3,})[^\n]*\n([\s\S]*?)\n\1/gm, r;
3484
3521
  for (; (r = n.exec(e)) !== null;) for (let e = r.index; e < r.index + r[0].length; e++) t.add(e);
3485
3522
  return e.replace(/[{[]([\s\S]*?)[}\]]/g, (e, n, r) => {
@@ -3491,33 +3528,33 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3491
3528
  }
3492
3529
  }).replace(/\n{3,}/g, "\n\n");
3493
3530
  }
3494
- let me = [
3495
- se,
3496
- pe,
3497
- Yn,
3498
- fe
3499
- ], b = n("container"), he = ne(d(a, "markdown"), po), ge = l(() => a.tailLength ? xe(he.value, a.tailLength) : he.value), { resolveText: _e } = re(), ve = _e(ge), ye = ae(), be = l(() => {
3500
- let e = me.reduce((e, t) => t(e), ve.value);
3501
- return uo(W.parse(e, {
3531
+ let fe = [
3532
+ le,
3533
+ x,
3534
+ ar,
3535
+ de
3536
+ ], S = n("container"), pe = oe(d(a, "markdown"), Co), me = l(() => a.tailLength ? we(pe.value, a.tailLength) : pe.value), { resolveText: he } = g(), ge = he(me), _e = se(), ve = l(() => {
3537
+ let e = fe.reduce((e, t) => t(e), ge.value);
3538
+ return xo(W.parse(e, {
3502
3539
  async: !1,
3503
3540
  breaks: !0,
3504
3541
  renderer: _
3505
- }), ye.isGated.value ? {
3506
- canLoad: ye.canLoad,
3507
- hostOf: ye.hostOf,
3542
+ }), _e.isGated.value ? {
3543
+ canLoad: _e.canLoad,
3544
+ hostOf: _e.hostOf,
3508
3545
  label: (e) => c("label.imageHeld", { host: e })
3509
3546
  } : void 0);
3510
3547
  });
3511
- function x(e) {
3512
- let t = (e.target?.closest?.(`[${lo}]`))?.getAttribute(lo);
3513
- t && (e.preventDefault(), e.stopPropagation(), ye.release(t));
3548
+ function C(e) {
3549
+ let t = (e.target?.closest?.(`[${bo}]`))?.getAttribute(bo);
3550
+ t && (e.preventDefault(), e.stopPropagation(), _e.release(t));
3514
3551
  }
3515
- async function Se() {
3552
+ async function ye() {
3516
3553
  if (a.loading) return;
3517
3554
  await i();
3518
- let e = b.value?.querySelectorAll("pre.mermaid:not([data-rendered])");
3555
+ let e = S.value?.querySelectorAll("pre.mermaid:not([data-rendered])");
3519
3556
  if (!e?.length) return;
3520
- let { renderMermaidSVG: t, THEMES: n } = await ie(), r = a.isDark ? n["github-dark"] : n["github-light"];
3557
+ let { renderMermaidSVG: t, THEMES: n } = await te(), r = a.isDark ? n["github-dark"] : n["github-light"];
3521
3558
  for (let n of Array.from(e)) {
3522
3559
  if (!n.isConnected) continue;
3523
3560
  let e = n.textContent?.trim();
@@ -3527,19 +3564,19 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3527
3564
  } catch {}
3528
3565
  }
3529
3566
  }
3530
- async function Ce() {
3567
+ async function be() {
3531
3568
  await i();
3532
- let e = b.value?.querySelectorAll("pre:not(.mermaid) > code:not([data-highlighted])");
3569
+ let e = S.value?.querySelectorAll("pre:not(.mermaid) > code:not([data-highlighted])");
3533
3570
  if (!e?.length) return;
3534
3571
  let t = (await import("https://cdn.jsdelivr.net/npm/highlight.js@11/es/common.js")).default;
3535
3572
  for (let n of e) t.highlightElement(n), n.setAttribute("data-highlighted", "true");
3536
3573
  }
3537
- async function we() {
3574
+ async function xe() {
3538
3575
  await i();
3539
- let e = b.value?.querySelectorAll(".katex-pending");
3576
+ let e = S.value?.querySelectorAll(".katex-pending");
3540
3577
  if (!e?.length) return;
3541
- let t = await oe();
3542
- p("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.min.css", ee(b.value));
3578
+ let t = await re();
3579
+ p("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.min.css", ee(S.value));
3543
3580
  for (let n of Array.from(e)) {
3544
3581
  if (!n.isConnected) continue;
3545
3582
  let e = n.dataset.katex;
@@ -3553,11 +3590,11 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3553
3590
  } catch {}
3554
3591
  }
3555
3592
  }
3556
- async function Te() {
3593
+ async function Se() {
3557
3594
  await i();
3558
- let e = b.value?.querySelectorAll("pre.mermaid[data-rendered]");
3595
+ let e = S.value?.querySelectorAll("pre.mermaid[data-rendered]");
3559
3596
  if (!e?.length) return;
3560
- let { renderMermaidSVG: t, THEMES: n } = await ie(), r = a.isDark ? n["github-dark"] : n["github-light"];
3597
+ let { renderMermaidSVG: t, THEMES: n } = await te(), r = a.isDark ? n["github-dark"] : n["github-light"];
3561
3598
  for (let n of Array.from(e)) {
3562
3599
  if (!n.isConnected) continue;
3563
3600
  let e = n.dataset.code;
@@ -3566,7 +3603,7 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3566
3603
  } catch {}
3567
3604
  }
3568
3605
  }
3569
- function Ee(e) {
3606
+ function Ce(e) {
3570
3607
  let t = e.target;
3571
3608
  if (!(t instanceof HTMLImageElement) || t.dataset.broken) return;
3572
3609
  t.dataset.broken = "true";
@@ -3574,60 +3611,60 @@ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3574
3611
  n.className = "markdown-broken-image", n.textContent = t.alt || c("label.imageLoadError"), n.title = t.src, t.replaceWith(n);
3575
3612
  }
3576
3613
  t(() => {
3577
- b.value?.addEventListener("error", Ee, !0);
3614
+ S.value?.addEventListener("error", Ce, !0);
3578
3615
  }), o(() => {
3579
- b.value?.removeEventListener("error", Ee, !0);
3580
- }), s([be, () => a.loading], Se, { immediate: !0 }), s(() => a.isDark, Te), s(be, Ce, { immediate: !0 }), s(be, we, { immediate: !0 });
3581
- let De = 0;
3582
- function Oe(e, t) {
3616
+ S.value?.removeEventListener("error", Ce, !0);
3617
+ }), s([ve, () => a.loading], ye, { immediate: !0 }), s(() => a.isDark, Se), s(ve, be, { immediate: !0 }), s(ve, xe, { immediate: !0 });
3618
+ let Te = 0;
3619
+ function Ee(e, t) {
3583
3620
  let n = document.createElement("span");
3584
3621
  return n.style.cssText = `animation:ft-${a.animation} ${a.animationDuration} ease-out ${t}ms both;display:inline-block`, n.textContent = e, n.addEventListener("animationend", () => {
3585
3622
  let t = n.parentNode;
3586
3623
  t && (t.replaceChild(document.createTextNode(e), n), t.normalize());
3587
3624
  }, { once: !0 }), n;
3588
3625
  }
3589
- function ke(e, t, n, r) {
3626
+ function De(e, t, n, r) {
3590
3627
  let i = r, a = e.split(/(\s+)/);
3591
- for (let e of a) e && (/^\s+$/.test(e) ? t.insertBefore(document.createTextNode(e), n) : (t.insertBefore(Oe(e, i * 30), n), i++));
3628
+ for (let e of a) e && (/^\s+$/.test(e) ? t.insertBefore(document.createTextNode(e), n) : (t.insertBefore(Ee(e, i * 30), n), i++));
3592
3629
  return i;
3593
3630
  }
3594
- function S(e) {
3631
+ function w(e) {
3595
3632
  let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode(e) {
3596
3633
  return e.parentElement?.closest("pre, code, .katex-pending, .markdown-broken-image") ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3597
3634
  } }), n = [];
3598
3635
  for (; t.nextNode();) n.push(t.currentNode);
3599
3636
  return n;
3600
3637
  }
3601
- function Ae() {
3602
- if (!b.value || !a.loading || !a.animation) return;
3603
- let e = S(b.value), t = 0, n = 0;
3638
+ function Oe() {
3639
+ if (!S.value || !a.loading || !a.animation) return;
3640
+ let e = w(S.value), t = 0, n = 0;
3604
3641
  for (let r of e) {
3605
3642
  let e = r.textContent || "", i = t, a = t + e.length;
3606
- if (t = a, a <= De) continue;
3643
+ if (t = a, a <= Te) continue;
3607
3644
  let o = r.parentNode;
3608
3645
  if (!o) continue;
3609
- if (i >= De) {
3646
+ if (i >= Te) {
3610
3647
  let t = r.nextSibling;
3611
- o.removeChild(r), n = ke(e, o, t, n);
3648
+ o.removeChild(r), n = De(e, o, t, n);
3612
3649
  continue;
3613
3650
  }
3614
- let s = De - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
3615
- o.removeChild(c), n = ke(l, o, u, n);
3651
+ let s = Te - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
3652
+ o.removeChild(c), n = De(l, o, u, n);
3616
3653
  }
3617
- De = t;
3654
+ Te = t;
3618
3655
  }
3619
- return s(be, async () => {
3620
- await i(), Ae();
3656
+ return s(ve, async () => {
3657
+ await i(), Oe();
3621
3658
  }, { immediate: !0 }), s(() => a.markdown, (e, t) => {
3622
- (!e || t && e.length < t.length) && (De = 0);
3659
+ (!e || t && e.length < t.length) && (Te = 0);
3623
3660
  }), (e, t) => (r(), u("div", {
3624
3661
  ref: "container",
3625
- onClick: x,
3626
- innerHTML: be.value
3627
- }, null, 8, fo));
3662
+ onClick: C,
3663
+ innerHTML: ve.value
3664
+ }, null, 8, So));
3628
3665
  }
3629
3666
  }), [["styles", [".markdown-held-image{max-width:100%;padding:var(--spacing-4) var(--spacing-8);border:var(--border) dashed var(--color-surface-4);border-radius:var(--rounded-md);background-color:var(--color-surface-1);color:var(--color-word-3);font:inherit;font-size:var(--text-12);vertical-align:middle;cursor:pointer;align-items:center;display:inline-flex}.markdown-held-image:hover,.markdown-held-image:focus-visible{background-color:var(--color-surface-2);color:var(--color-word-2)}.markdown-broken-image{align-items:center;gap:var(--spacing-4);max-width:100%;padding:var(--spacing-4) var(--spacing-8);border:var(--border) dashed var(--color-surface-4);border-radius:var(--rounded-md);background-color:var(--color-surface-1);color:var(--color-word-4);font-size:var(--text-12);vertical-align:middle;display:inline-flex}@keyframes ft-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes ft-blurIn{0%{opacity:0;filter:blur(4px)}to{opacity:1;filter:blur()}}@keyframes ft-dropIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes ft-slideUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes ft-fadeAndScale{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}"]]]);
3630
3667
  //#endregion
3631
- export { y as A, _e as C, ue as D, le as E, ce as M, _ as N, pe as O, de as P, me as S, je as T, w as _, Ae as a, ye as b, Me as c, C as d, Be as f, ze as g, Ve as h, Fe as i, fe as j, v as k, Pe as l, De as m, we as n, he as o, Oe as p, be as r, ve as s, mo as t, Ne as u, Le as v, S as w, Te as x, Ee as y };
3668
+ export { S as A, qe as C, Ne as D, Ae as E, ue as F, b as I, pe as L, de as M, x as N, We as O, me as P, w as S, ye as T, Ve as _, je as a, Oe as b, Fe as c, Me as d, He as f, Je as g, T as h, D as i, he as j, fe as k, Le as l, Ke as m, De as n, ve as o, ke as p, Se as r, be as s, wo as t, Ie as u, Pe as v, ge as w, xe as x, ze as y };
3632
3669
 
3633
- //# sourceMappingURL=PkStreamingMarkdown-Bry3y6Ru.js.map
3670
+ //# sourceMappingURL=PkStreamingMarkdown-BK9O_NLx.js.map