@ibiz-template/mob-vue3-components 0.7.41-alpha.22 → 0.7.41-alpha.23

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 (355) hide show
  1. package/dist/chart-CVnUjHjl.js +2 -0
  2. package/dist/{chart-j1WkpBhc.js.map → chart-CVnUjHjl.js.map} +1 -1
  3. package/dist/ibiz-markdown-editor-MwEhH1r_.js +2 -0
  4. package/dist/ibiz-markdown-editor-MwEhH1r_.js.map +1 -0
  5. package/dist/index-CopTozpr.js +2 -0
  6. package/dist/{index-ChdHGLJI.js.map → index-CopTozpr.js.map} +1 -1
  7. package/dist/index-Cxv8dJIk.js +2 -0
  8. package/dist/index-Cxv8dJIk.js.map +1 -0
  9. package/dist/index-DV0pS0zU.js +2 -0
  10. package/dist/{index-Dd7yiMzY.js.map → index-DV0pS0zU.js.map} +1 -1
  11. package/dist/index.min.css +8 -8
  12. package/dist/index.system.min.js +1 -1
  13. package/dist/quill-CeDXLpcJ.js +2 -0
  14. package/dist/{quill-BOA7ZLOz.js.map → quill-CeDXLpcJ.js.map} +1 -1
  15. package/dist/quill-editor-C5mEMG93.js +2 -0
  16. package/dist/quill-editor-C5mEMG93.js.map +1 -0
  17. package/dist/quill-editor-preview-BPS9uMa7.js +2 -0
  18. package/dist/{quill-editor-preview-DghpeKpg.js.map → quill-editor-preview-BPS9uMa7.js.map} +1 -1
  19. package/dist/tree-SAqvldtV.js +2 -0
  20. package/dist/{tree-BTa0bMPr.js.map → tree-SAqvldtV.js.map} +1 -1
  21. package/dist/xlsx-util-b5CesqYd.js +3 -0
  22. package/dist/xlsx-util-b5CesqYd.js.map +1 -0
  23. package/es/_virtual/index12.mjs +2 -2
  24. package/es/_virtual/index13.mjs +2 -2
  25. package/es/common/action-group/action-group.css +1 -1
  26. package/es/common/action-group/action-group.mjs +44 -43
  27. package/es/common/button-list/button-list.css +1 -1
  28. package/es/common/button-list/button-list.mjs +16 -25
  29. package/es/common/col/col.mjs +1 -1
  30. package/es/common/cropping/cropping.mjs +5 -5
  31. package/es/common/date-range-picker/components/range-picker/range-picker.mjs +2 -4
  32. package/es/common/date-range-picker/components/single-picker/single-picker.mjs +2 -4
  33. package/es/common/date-range-picker/date-range-picker.mjs +2 -2
  34. package/es/common/emoji-select/components/emoji-item/emoji-item.mjs +4 -4
  35. package/es/common/emoji-select/components/emoji-list/emoji-list.mjs +1 -1
  36. package/es/common/emoji-select/icons/categories.mjs +9 -57
  37. package/es/common/float-button/float-button.css +1 -1
  38. package/es/common/float-button/float-button.mjs +12 -7
  39. package/es/common/keep-alive/keep-alive.mjs +2 -2
  40. package/es/common/keep-alive/scheduler.mjs +1 -1
  41. package/es/common/preview-image/preview-image.mjs +4 -4
  42. package/es/common/rawitem/rawitem.mjs +2 -2
  43. package/es/common/row/row.mjs +1 -1
  44. package/es/common/split/split.mjs +9 -9
  45. package/es/common/split-trigger/split-trigger.mjs +1 -1
  46. package/es/common/tab-layout/tab-dropdown/tab-dropdown.mjs +1 -1
  47. package/es/control/app-menu/app-menu.mjs +1 -1
  48. package/es/control/app-menu/custom-menu-design/custom-menu-design.mjs +1 -1
  49. package/es/control/app-menu/menu-render-util.mjs +2 -0
  50. package/es/control/app-menu-icon-view/app-menu-icon-view.mjs +1 -1
  51. package/es/control/app-menu-icon-view/index.mjs +1 -1
  52. package/es/control/app-menu-list-view/app-menu-list-view.mjs +1 -1
  53. package/es/control/app-menu-list-view/index.mjs +1 -1
  54. package/es/control/calendar/calendar.mjs +6 -6
  55. package/es/control/caption-bar/caption-bar.mjs +1 -1
  56. package/es/control/chart/chart.mjs +1 -1
  57. package/es/control/dashboard/dashboard.mjs +3 -1
  58. package/es/control/dashboard/portlet/actionbar-portlet/actionbar-portlet.mjs +1 -1
  59. package/es/control/dashboard/portlet/chart-portlet/chart-portlet.mjs +1 -1
  60. package/es/control/dashboard/portlet/container-portlet/container-portlet.mjs +1 -1
  61. package/es/control/dashboard/portlet/html-portlet/html-portlet.mjs +1 -1
  62. package/es/control/dashboard/portlet/list-portlet/list-portlet.mjs +1 -1
  63. package/es/control/dashboard/portlet/menu-portlet/menu-portlet.mjs +1 -1
  64. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  65. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +4 -4
  66. package/es/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.mjs +1 -1
  67. package/es/control/dashboard/portlet/view-portlet/view-portlet.mjs +1 -1
  68. package/es/control/data-view/data-view.css +1 -1
  69. package/es/control/data-view/data-view.mjs +7 -7
  70. package/es/control/drbar/drbar.mjs +1 -1
  71. package/es/control/drtab/drtab.controller.mjs +1 -1
  72. package/es/control/drtab/drtab.mjs +1 -1
  73. package/es/control/form/edit-form/edit-form.mjs +1 -1
  74. package/es/control/form/form/form.mjs +2 -2
  75. package/es/control/form/form-detail/form-button/form-button.css +1 -1
  76. package/es/control/form/form-detail/form-button/form-button.mjs +1 -1
  77. package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +1 -1
  78. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +1 -1
  79. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +6 -6
  80. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.provider.mjs +2 -2
  81. package/es/control/form/search-form/search-form.mjs +1 -1
  82. package/es/control/list/list/list.mjs +1 -1
  83. package/es/control/list/md-ctrl/md-ctrl.css +1 -1
  84. package/es/control/list/md-ctrl/md-ctrl.mjs +2 -2
  85. package/es/control/pickup-view-panel/pickup-view-panel.mjs +1 -1
  86. package/es/control/search-bar/filter-field-select/filter-field-select.mjs +1 -1
  87. package/es/control/search-bar/filter-mode-select/filter-mode-select.mjs +1 -1
  88. package/es/control/search-bar/filter-tree/filter-tree.css +1 -1
  89. package/es/control/search-bar/filter-tree/filter-tree.mjs +1 -1
  90. package/es/control/search-bar/search-bar.mjs +10 -6
  91. package/es/control/tab-exp-panel/tab-exp-panel.mjs +1 -1
  92. package/es/control/toolbar/float-toolbar/float-toolbar.css +1 -1
  93. package/es/control/toolbar/float-toolbar/float-toolbar.mjs +13 -7
  94. package/es/control/toolbar/toolbar-render-util.mjs +55 -32
  95. package/es/control/toolbar/toolbar.mjs +1 -1
  96. package/es/control/tree/tree.mjs +9 -9
  97. package/es/control/tree-exp-bar/tree-exp-bar.mjs +1 -1
  98. package/es/control/wizard-panel/wizard-panel.mjs +6 -6
  99. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.mjs +2 -2
  100. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.mjs +1 -1
  101. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +2 -2
  102. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +2 -2
  103. package/es/editor/data-picker/picker-editor.controller.mjs +1 -1
  104. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.css +1 -1
  105. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +7 -7
  106. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs +1 -1
  107. package/es/editor/html/html-editor.controller.mjs +26 -9
  108. package/es/editor/html/quill-editor/quill-editor.mjs +12 -3
  109. package/es/editor/html/quill-editor-preview/quill-editor-preview.mjs +4 -4
  110. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +12 -3
  111. package/es/editor/markdown/markdown-editor.controller.mjs +23 -3
  112. package/es/editor/qrcode/ibiz-qrcode/ibiz-qrcode.mjs +1 -1
  113. package/es/editor/slider/ibiz-slider/ibiz-slider.mjs +2 -2
  114. package/es/editor/span/span/span.mjs +7 -7
  115. package/es/editor/span/span-link/span-link.mjs +1 -1
  116. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.mjs +1 -1
  117. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +1 -1
  118. package/es/editor/text-box/input/input.mjs +4 -4
  119. package/es/editor/text-box/signature/signature.mjs +59 -19
  120. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +1 -1
  121. package/es/editor/upload/upload-editor.controller.mjs +18 -1
  122. package/es/editor/upload/use/use-van-upload.mjs +6 -2
  123. package/es/index.mjs +2 -1
  124. package/es/locale/en/index.mjs +26 -23
  125. package/es/locale/zh-CN/index.mjs +3 -0
  126. package/es/mob-app/App.mjs +10 -1
  127. package/es/mob-app/components/modal-router-shell/modal-router-shell.mjs +6 -4
  128. package/es/mob-app/components/router-shell/router-shell.mjs +1 -1
  129. package/es/mob-app/guard/auth-guard/auth-guard.mjs +2 -2
  130. package/es/mob-app/guard/auth-guard/dyna-auth-guard.mjs +2 -2
  131. package/es/mob-app/main.mjs +3 -1
  132. package/es/mob-app/router/index.mjs +131 -76
  133. package/es/mob-app/util/unauthorized-handler/unauthorized-handler.mjs +5 -5
  134. package/es/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.mjs +1 -1
  135. package/es/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.mjs +1 -1
  136. package/es/panel-component/async-action/async-action/async-action.mjs +2 -2
  137. package/es/panel-component/async-action/async-action-preview/async-action-preview.mjs +3 -3
  138. package/es/panel-component/async-action/async-action-result/async-action-result.mjs +1 -1
  139. package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +2 -2
  140. package/es/panel-component/panel-app-title/panel-app-title.mjs +2 -2
  141. package/es/panel-component/panel-button/panel-button.css +1 -1
  142. package/es/panel-component/panel-carousel/panel-carousel.controller.mjs +1 -1
  143. package/es/panel-component/panel-video-player/panel-video-player.controller.mjs +2 -2
  144. package/es/panel-component/split-container/split-container.controller.mjs +1 -1
  145. package/es/panel-component/user-message/common/internal-message-default/internal-message-default.provider.mjs +1 -1
  146. package/es/panel-component/user-message/user-message.mjs +1 -1
  147. package/es/panel-component/user-message/user-message.util.mjs +1 -1
  148. package/es/panel-component/view-content-panel-container/view-content-panel-container.css +1 -1
  149. package/es/panel-component/view-content-panel-container/view-content-panel-container.mjs +12 -12
  150. package/es/platform/ios-platform-provider.mjs +2 -2
  151. package/es/platform/wechat-official-platform-provider.mjs +1 -1
  152. package/es/util/ai-chat-util/ai-chat-util.mjs +204 -41
  153. package/es/util/app-drawer/app-drawer-component.mjs +20 -6
  154. package/es/util/app-modal/app-modal-component.mjs +7 -4
  155. package/es/util/app-popover/app-popover-component.mjs +4 -4
  156. package/es/util/app-util/app-util.mjs +38 -3
  157. package/es/util/button-util/button-util.mjs +33 -1
  158. package/es/util/confirm-util/confirm-util.mjs +4 -4
  159. package/es/util/directive/loading.mjs +1 -1
  160. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  161. package/es/util/index.mjs +2 -1
  162. package/es/util/list-util/list-render-util.mjs +24 -5
  163. package/es/util/loading-util/loading-util.mjs +1 -1
  164. package/es/util/open-view-util/open-view-util.mjs +1 -1
  165. package/es/util/print-preview-util/print-preview-markdown/icon/icon.mjs +46 -0
  166. package/es/util/print-preview-util/print-preview-markdown/print-preview-markdown.css +1 -0
  167. package/es/util/print-preview-util/print-preview-markdown/print-preview-markdown.mjs +62 -0
  168. package/es/util/print-preview-util/print-preview-util.mjs +57 -0
  169. package/es/util/scan-qrcode/scan-qrcode.mjs +1 -1
  170. package/es/util/user-route-util/user-route-util.mjs +4 -4
  171. package/es/util/xlsx-util/xlsx-util.mjs +1 -1
  172. package/es/view-engine/index-view.engine.mjs +4 -0
  173. package/es/view-engine/index.mjs +31 -31
  174. package/es/view-engine/login-view.engine.mjs +1 -1
  175. package/es/view-engine/mob-calendar-view.engine.mjs +8 -1
  176. package/es/view-engine/mob-edit-view.engine.mjs +1 -1
  177. package/es/view-engine/mob-wf-dyna-action-view.engine.mjs +1 -1
  178. package/es/view-engine/mob-wf-dyna-edit-view.engine.mjs +1 -1
  179. package/es/view-engine/mob-wf-dyna-start-view.engine.mjs +1 -1
  180. package/lib/_virtual/index12.cjs +2 -2
  181. package/lib/_virtual/index13.cjs +2 -2
  182. package/lib/common/action-group/action-group.cjs +42 -41
  183. package/lib/common/action-group/action-group.css +1 -1
  184. package/lib/common/button-list/button-list.cjs +14 -23
  185. package/lib/common/button-list/button-list.css +1 -1
  186. package/lib/common/col/col.cjs +1 -1
  187. package/lib/common/cropping/cropping.cjs +5 -5
  188. package/lib/common/date-range-picker/components/range-picker/range-picker.cjs +2 -4
  189. package/lib/common/date-range-picker/components/single-picker/single-picker.cjs +2 -4
  190. package/lib/common/date-range-picker/date-range-picker.cjs +2 -2
  191. package/lib/common/emoji-select/components/emoji-item/emoji-item.cjs +4 -4
  192. package/lib/common/emoji-select/components/emoji-list/emoji-list.cjs +1 -1
  193. package/lib/common/emoji-select/icons/categories.cjs +9 -57
  194. package/lib/common/float-button/float-button.cjs +11 -6
  195. package/lib/common/float-button/float-button.css +1 -1
  196. package/lib/common/keep-alive/keep-alive.cjs +2 -2
  197. package/lib/common/keep-alive/scheduler.cjs +1 -1
  198. package/lib/common/preview-image/preview-image.cjs +4 -4
  199. package/lib/common/rawitem/rawitem.cjs +2 -2
  200. package/lib/common/row/row.cjs +1 -1
  201. package/lib/common/split/split.cjs +9 -9
  202. package/lib/common/split-trigger/split-trigger.cjs +1 -1
  203. package/lib/common/tab-layout/tab-dropdown/tab-dropdown.cjs +1 -1
  204. package/lib/control/app-menu/app-menu.cjs +1 -1
  205. package/lib/control/app-menu/custom-menu-design/custom-menu-design.cjs +1 -1
  206. package/lib/control/app-menu/menu-render-util.cjs +2 -0
  207. package/lib/control/app-menu-icon-view/app-menu-icon-view.cjs +1 -1
  208. package/lib/control/app-menu-icon-view/index.cjs +1 -1
  209. package/lib/control/app-menu-list-view/app-menu-list-view.cjs +1 -1
  210. package/lib/control/app-menu-list-view/index.cjs +1 -1
  211. package/lib/control/calendar/calendar.cjs +6 -6
  212. package/lib/control/caption-bar/caption-bar.cjs +1 -1
  213. package/lib/control/chart/chart.cjs +1 -1
  214. package/lib/control/dashboard/dashboard.cjs +3 -1
  215. package/lib/control/dashboard/portlet/actionbar-portlet/actionbar-portlet.cjs +1 -1
  216. package/lib/control/dashboard/portlet/chart-portlet/chart-portlet.cjs +1 -1
  217. package/lib/control/dashboard/portlet/container-portlet/container-portlet.cjs +1 -1
  218. package/lib/control/dashboard/portlet/html-portlet/html-portlet.cjs +1 -1
  219. package/lib/control/dashboard/portlet/list-portlet/list-portlet.cjs +1 -1
  220. package/lib/control/dashboard/portlet/menu-portlet/menu-portlet.cjs +1 -1
  221. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +4 -4
  222. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  223. package/lib/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.cjs +1 -1
  224. package/lib/control/dashboard/portlet/view-portlet/view-portlet.cjs +1 -1
  225. package/lib/control/data-view/data-view.cjs +7 -7
  226. package/lib/control/data-view/data-view.css +1 -1
  227. package/lib/control/drbar/drbar.cjs +1 -1
  228. package/lib/control/drtab/drtab.cjs +1 -1
  229. package/lib/control/drtab/drtab.controller.cjs +1 -1
  230. package/lib/control/form/edit-form/edit-form.cjs +1 -1
  231. package/lib/control/form/form/form.cjs +2 -2
  232. package/lib/control/form/form-detail/form-button/form-button.cjs +1 -1
  233. package/lib/control/form/form-detail/form-button/form-button.css +1 -1
  234. package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +1 -1
  235. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +1 -1
  236. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +6 -6
  237. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.provider.cjs +2 -2
  238. package/lib/control/form/search-form/search-form.cjs +1 -1
  239. package/lib/control/list/list/list.cjs +1 -1
  240. package/lib/control/list/md-ctrl/md-ctrl.cjs +2 -2
  241. package/lib/control/list/md-ctrl/md-ctrl.css +1 -1
  242. package/lib/control/pickup-view-panel/pickup-view-panel.cjs +1 -1
  243. package/lib/control/search-bar/filter-field-select/filter-field-select.cjs +1 -1
  244. package/lib/control/search-bar/filter-mode-select/filter-mode-select.cjs +1 -1
  245. package/lib/control/search-bar/filter-tree/filter-tree.cjs +1 -1
  246. package/lib/control/search-bar/filter-tree/filter-tree.css +1 -1
  247. package/lib/control/search-bar/search-bar.cjs +10 -6
  248. package/lib/control/tab-exp-panel/tab-exp-panel.cjs +1 -1
  249. package/lib/control/toolbar/float-toolbar/float-toolbar.cjs +13 -7
  250. package/lib/control/toolbar/float-toolbar/float-toolbar.css +1 -1
  251. package/lib/control/toolbar/toolbar-render-util.cjs +55 -32
  252. package/lib/control/toolbar/toolbar.cjs +1 -1
  253. package/lib/control/tree/tree.cjs +9 -9
  254. package/lib/control/tree-exp-bar/tree-exp-bar.cjs +1 -1
  255. package/lib/control/wizard-panel/wizard-panel.cjs +6 -6
  256. package/lib/editor/cascader/ibiz-cascader/ibiz-cascader.cjs +2 -2
  257. package/lib/editor/color-picker/ibiz-color-picker/ibiz-color-picker.cjs +1 -1
  258. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +2 -2
  259. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +2 -2
  260. package/lib/editor/data-picker/picker-editor.controller.cjs +1 -1
  261. package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.css +1 -1
  262. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +7 -7
  263. package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.cjs +1 -1
  264. package/lib/editor/html/html-editor.controller.cjs +26 -9
  265. package/lib/editor/html/quill-editor/quill-editor.cjs +12 -3
  266. package/lib/editor/html/quill-editor-preview/quill-editor-preview.cjs +4 -4
  267. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +12 -3
  268. package/lib/editor/markdown/markdown-editor.controller.cjs +23 -3
  269. package/lib/editor/qrcode/ibiz-qrcode/ibiz-qrcode.cjs +1 -1
  270. package/lib/editor/slider/ibiz-slider/ibiz-slider.cjs +2 -2
  271. package/lib/editor/span/span/span.cjs +7 -7
  272. package/lib/editor/span/span-link/span-link.cjs +1 -1
  273. package/lib/editor/stepper/ibiz-stepper/ibiz-stepper.cjs +1 -1
  274. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +1 -1
  275. package/lib/editor/text-box/input/input.cjs +4 -4
  276. package/lib/editor/text-box/signature/signature.cjs +59 -19
  277. package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +1 -1
  278. package/lib/editor/upload/upload-editor.controller.cjs +18 -1
  279. package/lib/editor/upload/use/use-van-upload.cjs +6 -2
  280. package/lib/index.cjs +3 -0
  281. package/lib/locale/en/index.cjs +26 -23
  282. package/lib/locale/zh-CN/index.cjs +3 -0
  283. package/lib/mob-app/App.cjs +9 -0
  284. package/lib/mob-app/components/modal-router-shell/modal-router-shell.cjs +6 -4
  285. package/lib/mob-app/components/router-shell/router-shell.cjs +1 -1
  286. package/lib/mob-app/guard/auth-guard/auth-guard.cjs +2 -2
  287. package/lib/mob-app/guard/auth-guard/dyna-auth-guard.cjs +2 -2
  288. package/lib/mob-app/main.cjs +3 -1
  289. package/lib/mob-app/router/index.cjs +131 -76
  290. package/lib/mob-app/util/unauthorized-handler/unauthorized-handler.cjs +5 -5
  291. package/lib/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.cjs +1 -1
  292. package/lib/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.cjs +1 -1
  293. package/lib/panel-component/async-action/async-action/async-action.cjs +2 -2
  294. package/lib/panel-component/async-action/async-action-preview/async-action-preview.cjs +3 -3
  295. package/lib/panel-component/async-action/async-action-result/async-action-result.cjs +1 -1
  296. package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +2 -2
  297. package/lib/panel-component/panel-app-title/panel-app-title.cjs +2 -2
  298. package/lib/panel-component/panel-button/panel-button.css +1 -1
  299. package/lib/panel-component/panel-carousel/panel-carousel.controller.cjs +1 -1
  300. package/lib/panel-component/panel-video-player/panel-video-player.controller.cjs +2 -2
  301. package/lib/panel-component/split-container/split-container.controller.cjs +1 -1
  302. package/lib/panel-component/user-message/common/internal-message-default/internal-message-default.provider.cjs +1 -1
  303. package/lib/panel-component/user-message/user-message.cjs +1 -1
  304. package/lib/panel-component/user-message/user-message.util.cjs +1 -1
  305. package/lib/panel-component/view-content-panel-container/view-content-panel-container.cjs +12 -12
  306. package/lib/panel-component/view-content-panel-container/view-content-panel-container.css +1 -1
  307. package/lib/platform/ios-platform-provider.cjs +2 -2
  308. package/lib/platform/wechat-official-platform-provider.cjs +1 -1
  309. package/lib/util/ai-chat-util/ai-chat-util.cjs +204 -41
  310. package/lib/util/app-drawer/app-drawer-component.cjs +20 -6
  311. package/lib/util/app-modal/app-modal-component.cjs +7 -4
  312. package/lib/util/app-popover/app-popover-component.cjs +4 -4
  313. package/lib/util/app-util/app-util.cjs +38 -3
  314. package/lib/util/button-util/button-util.cjs +34 -0
  315. package/lib/util/confirm-util/confirm-util.cjs +4 -4
  316. package/lib/util/directive/loading.cjs +1 -1
  317. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  318. package/lib/util/index.cjs +3 -0
  319. package/lib/util/list-util/list-render-util.cjs +24 -5
  320. package/lib/util/loading-util/loading-util.cjs +1 -1
  321. package/lib/util/open-view-util/open-view-util.cjs +1 -1
  322. package/lib/util/print-preview-util/print-preview-markdown/icon/icon.cjs +52 -0
  323. package/lib/util/print-preview-util/print-preview-markdown/print-preview-markdown.cjs +64 -0
  324. package/lib/util/print-preview-util/print-preview-markdown/print-preview-markdown.css +1 -0
  325. package/lib/util/print-preview-util/print-preview-util.cjs +59 -0
  326. package/lib/util/scan-qrcode/scan-qrcode.cjs +1 -1
  327. package/lib/util/user-route-util/user-route-util.cjs +4 -4
  328. package/lib/util/xlsx-util/xlsx-util.cjs +1 -1
  329. package/lib/view-engine/index-view.engine.cjs +4 -0
  330. package/lib/view-engine/index.cjs +31 -31
  331. package/lib/view-engine/login-view.engine.cjs +1 -1
  332. package/lib/view-engine/mob-calendar-view.engine.cjs +7 -0
  333. package/lib/view-engine/mob-edit-view.engine.cjs +1 -1
  334. package/lib/view-engine/mob-wf-dyna-action-view.engine.cjs +1 -1
  335. package/lib/view-engine/mob-wf-dyna-edit-view.engine.cjs +1 -1
  336. package/lib/view-engine/mob-wf-dyna-start-view.engine.cjs +1 -1
  337. package/package.json +9 -9
  338. package/dist/chart-j1WkpBhc.js +0 -2
  339. package/dist/ibiz-markdown-editor-COU_MxNu.js +0 -2
  340. package/dist/ibiz-markdown-editor-COU_MxNu.js.map +0 -1
  341. package/dist/index-Bn7VkqJp.js +0 -76
  342. package/dist/index-Bn7VkqJp.js.map +0 -1
  343. package/dist/index-ChdHGLJI.js +0 -2
  344. package/dist/index-Dd7yiMzY.js +0 -2
  345. package/dist/index.es-D0mZvSDS.js +0 -14
  346. package/dist/index.es-D0mZvSDS.js.map +0 -1
  347. package/dist/quill-BOA7ZLOz.js +0 -50
  348. package/dist/quill-editor-DcZd_lqh.js +0 -2
  349. package/dist/quill-editor-DcZd_lqh.js.map +0 -1
  350. package/dist/quill-editor-preview-DghpeKpg.js +0 -2
  351. package/dist/tree-BTa0bMPr.js +0 -2
  352. package/dist/xlsx-util-CQaOn5OK.js +0 -105
  353. package/dist/xlsx-util-CQaOn5OK.js.map +0 -1
  354. package/es/node_modules/.pnpm/@ibiz-template-plugin_ibiz-mob-ai-chat@0.0.1_cherry-markdown@0.8.58_interactjs@1.10.27_qx-uti_xgmgjpxet4ghyc7txs4jkjxilq/node_modules/@ibiz-template-plugin/ibiz-mob-ai-chat/dist/index.es.mjs +0 -4425
  355. package/lib/node_modules/.pnpm/@ibiz-template-plugin_ibiz-mob-ai-chat@0.0.1_cherry-markdown@0.8.58_interactjs@1.10.27_qx-uti_xgmgjpxet4ghyc7txs4jkjxilq/node_modules/@ibiz-template-plugin/ibiz-mob-ai-chat/dist/index.es.cjs +0 -4427
@@ -1,2 +0,0 @@
1
- System.register(["@ibiz-template/runtime","@ibiz-template/vue3-util","@ibiz-template/model-helper","@ibiz-template/core"],function(a){"use strict";var o,r,t,n;return{setters:[function(e){o=e.en},function(e){r=e.en},function(e){t=e.en},function(e){n=e.en}],execute:function(){var e=a("default",{app:{noSupport:"Not supported currently",add:"Add",delete:"Delete",retract:"Retract",close:"Close",search:"Search"},component:{actionToolbar:{noSupportDropDown:"The drop-down mode is not supported"},rawItem:{errorConfig:"{type} type custom parameter configuration error",noSupportVideo:"Your browser does not support video tags"},emojiSelect:{frequently:"Frequently",peoples:"Peoples",nature:"Nature",foods:"Foods",activity:"Activity",objects:"Objects",places:"Places",symbols:"Symbols",flags:"Flags"},mdSortSetting:{confirm:"Confirm",sort:"Sort",asc:"ascend",desc:"descend"},dropdown:{pleaseSelect:"Please Select",clear:"Clear",searchPlaceholder:"Search"},dateRangePicker:{headerPlaceholder:"Please select a date range",confirm:"Confirm",today:"Today",startDate:"Start date",endDate:"End date",scopeIsInvalid:"The scope is invalid",overLimit:"Not within the allowed range",year:"Year",month:"Month",day:"Day",formatIsInvalid:"The format is invalid",use:"Use",example:"Example",selectDate:"Please select a date",noSelect:"No Select"},formItemContainer:{more:"More"},mpicker:{simpleErr:"The value of the SIMPLE type address bar {props.value} does not meet the requirements of a JSON string"},signature:{undo:"Undo",rewrite:"Rewrite",confirm:"Confirm",addSignature:"Click here to add signature",signaturePrompt:"Please write horizontally in the blank area"}},control:{common:{loadMore:"Load more...",loadFinish:"I have made it to the end",loadError:"Loading failed. Click to reload",addbtn:"Add"},appmenu:{more:"More",bottomNav:"Bottom Navigation",customNav:"Customize Navigation",save:"Save",noData:"No data"},form:{noSupportDetailType:"Form detail type not supported: {detailType} or corresponding provider cannot be found",formGroupPanel:{showMore:"Show More"},formMDctrlForm:{noFindProvider:"Provider not found for form"},repeaterMultiForm:{confirmTitle:"Tips for deletion",confirmDesc:"Do you want to delete the selection?"},repeaterSingleForm:{errorMessage:"No repeatedForm"},formMDctrlRepeater:{noSupportStyle:"Repeater style {repeaterStyle} is currently not supported"},mdCtrlContainer:{noSlot:"Item slot not provided"},formMDctrl:{errorMessage:"The content type is currently not supported as {contentType}"},searchForm:{search:"Search",reset:"Reset"},repeaterGrid:{index:"Index",noData:"No data"}},list:{expand:"Expand",selectedData:"Selected data",end:"The end~"},searchBar:{confirm:"Confirm",reset:"Reset",filter:"Filter",add:"Add",remove:"Remove",addCond:"Add filter",value:"Value",when:"When",operate:"Operation",property:"property",and:"AND",or:"OR",expand:"Expand",collapse:"Collapse",history:"History",clear:"Clear",more:"More",cancel:"Cancel"},toolbar:{noSupportType:"Toolbar item type: {itemType} is not supported"},tree:{subordinate:"Subordinate"},wizardPanel:{prev:"Previous",next:"Next",finish:"Finish"},calendar:{today:"Today",pickerDate:"Picker Date",customPicker:"Please select a date"},dashboard:{customLayout:"Custom Layout",save:"Save",showList:"Show List",hiddenList:"Hidden List"}},editor:{common:{entityConfigErr:"Please configure entities and entity datasets",selectViewConfigErr:"Please configure the data selection view",linkViewConfigErr:"Please configure the data link view",cancel:"Cancel",confirm:"Confirm"},html:{expand:"Expand",collapse:"Collapse"},cascader:{ibizCascader:{title:"Title {index}"}},datePicker:{title:"Select a date",cancel:"Cancel",confirm:"Confirm",year:"Year",month:"Month",day:"Day",hour:"Hour",min:"Minute",sec:"Second",clear:"Clear"},dropdownList:{noSupportTreePicker:"Drop-down tree selection is not supported",confirm:"confirm"},mapPicker:{searchPlaceholder:"Please enter a keyword to select a location"},markdown:{uploadJsonFormatErr:"The configuration of uploadparams did not follow the standard JSON format",exportJsonFormatErr:"The configuration of exportparams did not follow the standard JSON format",downloadFailedErr:"Download file failed",noExistentErr:"The file stream data does not exist"},notSupportedEditor:{unsupportedType:"Unsupported editor types - {editorType}"},stepper:{pleaseEnter:"Please enter"},upload:{uploadJsonFormatErr:"The configuration of uploadparams did not follow the standard JSON format",exportJsonFormatErr:"The configuration of exportparams did not follow the standard JSON format",cancelUpload:"Cancel Upload",compressError:"Image compression failed"},emojiPicker:{addEmoji:"Add emoji"},dateRangePicker:{selectRange:"Please select a date range"}},locale:{prompt:"Prompt",switchLanguagePrompt:"Switching languages requires refreshing the page, are you sure to switch?"},mobApp:{authGuard:{loginFailed:"Anonymous user login failed",noPermission:"No permission to access!"},unauthorizedHandler:{noFoundEnvParams:"Unable to find environment parameter casLoginUrl",prohibitAccessPrompt:"Access to the current account is prohibited",exitPrompt:"Do you want to exit the current account?"}},panelComponent:{authUserinfo:{visitor:"Visitor"},authSsO:{noSupported:"Login with {type} is not supported",dingLogin:"DingTalk Login in",wechatLogin:"Wechat Login in"},navPosIndex:{noSupportPrompt:"Non routing mode navigation placeholder is not supported"},panelVideoPlayer:{noSupportPrompt:"Your device does not support video tags"},wfStepTrace:{processingComplete:"Processing completion time",processingSteps:"Processing steps",processingPersonnel:"Processing personnel",submissionPath:"Submission path",processInformation:"Process information"},userMessage:{notice:"Notice",backendTasks:"Backend tasks",allRead:"All read",all:"All",unread:"unread",asyncActionPreview:{downloadFailedErr:"Download file failed",noExistentErr:"The file stream data does not exist",importDetailPrompt:"Import data details-{name}",parseImportInfoErr:"Abnormal parsing of import information",downloadErrFile:"Download error file",importTime:"Import time: ",importTotal:"Total number of imports: ",successImport:"Number of successful imports: ",ImportFailed:"Number of import failures: "},asyncActionTab:{noSupportType:"Asynchronous operation type {type} is not supported currently",noAsyncAction:"There are currently no asynchronous operations available"},internalMessageContainer:{markAsRead:"Mark as read"},internalMessageJson:{jumpToView:"Jump to view",missingHtml:"Missing HTML in the content of the data"},internalMessageTab:{noSupportType:"The message type {type} on the site is not currently supported",notificationYet:"Current no notification",loadMore:"Load more({length})",onlyShowUnread:"Only show unread"}},themeToggling:{auto:"Follow system",light:"Light",dark:"Dark"}},util:{loading:"Loading",notAchieved:"Not implemented",unrealized:"Unrealized",cacheWarningPrompt:"There is only one item in the cache stack and it cannot be navigated back",scanQrcode:{notAllowedError:"You need to grant camera access permission",notFoundError:"No camera on this device",notSupportedError:"Secure context required (HTTPS, localhost)",notReadableError:"Is the camera already in use?",overconstrainedError:"Installed cameras are not suitable",streamApiNotSupportedError:"Stream API is not supported in this browser",insecureContextError:"Camera access is only permitted in secure context. use HTTPS or localhost rather than HTTP."}},view:{fillInUserName:"Please fill in user the name",fillInPassword:"Please fill in the password",loginFailed:"Login failed",enterUserName:"Please enter the username",enterPassword:"Please enter the password",userName:"User name",password:"Password",login:"Login",thirdAuthFail:"Third party login authorization failed",downloading:"Download now...",downloadSuccess:"Download successful!",downloadFailed:"Download failed!",noSupportDownload:"This file is not supported for download. Please click the upper right corner to open and download it with your browser!",immediatelyDownload:"Download now",reDownload:"Download again"},viewEngine:{closeRemind:"Close reminder",confirmClosePrompt:"The form data has been modified, are you sure you want to close it?",noExistVersionErr:"The current workflow version does not exist",noFoundFormModel:"Unable to find the model for form {name}",missingToolbarModel:"Missing toolbar component model",notReceivedPrompt:"No appDataElementId received"},aiChartUtil:{feedback:"Feedback",description:"Description",regardingIssue:"Regarding the problem",understandProblem:"Not understanding the problem",forgotContext:"Forgot the previous text",notFollowingRequire:"Not Following Requirements",regardingResponse:"Regarding the effectiveness of the answer",incorrectAswer:"Incorrect answer",logicalConfusion:"Logical confusion",poorTimeliness:"Poor timeliness",poorReadability:"Poor readability",incompleteAnswer:"Incomplete answer",unprofessional:"The answer is vague and unprofessional",report:"Report",pornographicVulgar:"Pornographic Vulgar",politicallySensitive:"Politically sensitive",illegalCriminal:"Illegal crime",discriminationPrejudice:"Discrimination or Prejudice Answer",violationPrivacy:"Violation of Privacy",contentInfringement:"Content infringement",placeholder:"Please enter"},...o,...r,...n,...t})}}});
2
- //# sourceMappingURL=index-ChdHGLJI.js.map
@@ -1,2 +0,0 @@
1
- System.register(["@ibiz-template/runtime","@ibiz-template/vue3-util","@ibiz-template/model-helper","@ibiz-template/core"],function(E){"use strict";var e,F,o,r;return{setters:[function(u){e=u.zhCn},function(u){F=u.zhCn},function(u){o=u.zhCn},function(u){r=u.zhCn}],execute:function(){var u=E("default",{app:{noSupport:"\u6682\u672A\u652F\u6301",add:"\u6DFB\u52A0",delete:"\u5220\u9664",retract:"\u6536\u8D77",close:"\u5173\u95ED",search:"\u641C\u7D22",confirm:"\u786E\u8BA4",cancel:"\u53D6\u6D88"},component:{actionToolbar:{noSupportDropDown:"\u4E0B\u62C9\u6A21\u5F0F\u6682\u4E0D\u652F\u6301"},rawItem:{errorConfig:"{type} \u7C7B\u578B\u81EA\u5B9A\u4E49\u53C2\u6570\u914D\u7F6E\u9519\u8BEF",noSupportVideo:"\u4F60\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301video\u6807\u7B7E"},emojiSelect:{frequently:"\u5E38\u7528",peoples:"\u60C5\u7EEA",nature:"\u81EA\u7136",foods:"\u98DF\u7269\u4E0E\u996E\u6599",activity:"\u6D3B\u52A8",objects:"\u5BF9\u8C61",places:"\u65C5\u884C\u4E0E\u5730\u65B9",symbols:"\u7B26\u53F7",flags:"\u65D7\u5E1C"},mdSortSetting:{confirm:"\u786E\u5B9A",sort:"\u6392\u5E8F",asc:"\u5347\u5E8F",desc:"\u964D\u5E8F"},dateRangePicker:{headerPlaceholder:"\u8BF7\u9009\u62E9\u65E5\u671F\u8303\u56F4",confirm:"\u786E\u8BA4",today:"\u4ECA\u5929",startDate:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65F6\u95F4",scopeIsInvalid:"\u8303\u56F4\u65E0\u6548\u3002",overLimit:"\u4E0D\u5728\u5141\u8BB8\u7684\u8303\u56F4\u5185",year:"\u5E74",month:"\u6708",day:"\u65E5",formatIsInvalid:"\u683C\u5F0F\u65E0\u6548",use:"\u4F7F\u7528",example:"\u793A\u4F8B",selectDate:"\u8BF7\u9009\u62E9\u65E5\u671F",noSelect:"\u6682\u65E0\u9009\u4E2D"},formItemContainer:{more:"\u66F4\u591A"}},control:{common:{loadMore:"\u52A0\u8F7D\u66F4\u591A...",loadFinish:"\u6211\u5DF2\u7ECF\u5230\u5E95\u5566",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D",addbtn:"\u65B0\u589E"},appmenu:{more:"\u66F4\u591A",bottomNav:"\u5E95\u90E8\u5BFC\u822A",customNav:"\u81EA\u5B9A\u4E49\u5BFC\u822A",save:"\u4FDD\u5B58",noData:"\u6682\u65E0\u6570\u636E"},form:{noSupportDetailType:"\u6682\u672A\u652F\u6301\u7684\u8868\u5355\u9879\u7C7B\u578B: {detailType} \u6216\u627E\u4E0D\u5230\u5BF9\u5E94\u9002\u914D\u5668",formGroupPanel:{showMore:"\u663E\u793A\u66F4\u591A"},formMDctrlForm:{noFindProvider:"\u672A\u627E\u5230\u8868\u5355\u7684\u9002\u914D\u5668"},repeaterMultiForm:{confirmTitle:"\u5220\u9664\u63D0\u9192",confirmDesc:"\u662F\u5426\u5220\u9664\u9009\u4E2D\u9879?"},repeaterSingleForm:{errorMessage:"\u6CA1\u6709repeatedForm"},formMDctrlRepeater:{noSupportStyle:"\u6682\u672A\u652F\u6301\u91CD\u590D\u5668\u6837\u5F0F{repeaterStyle}"},mdCtrlContainer:{noSlot:"\u672A\u63D0\u4F9Bitem\u63D2\u69FD"},formMDctrl:{errorMessage:"\u6682\u672A\u652F\u6301\u5185\u5BB9\u7C7B\u578B\u4E3A{contentType}"},searchForm:{search:"\u67E5\u8BE2",reset:"\u91CD\u7F6E"},repeaterGrid:{index:"\u5E8F\u53F7",noData:"\u6682\u65E0\u6570\u636E"}},list:{expand:"\u5C55\u5F00",selectedData:"\u9009\u4E2D\u6570\u636E"},searchBar:{confirm:"\u786E\u8BA4",reset:"\u91CD\u7F6E",filter:"\u7B5B\u9009",add:"\u6DFB\u52A0",remove:"\u5220\u9664",addCond:"\u6DFB\u52A0\u7B5B\u9009\u6761\u4EF6",value:"\u503C",when:"\u5F53",operate:"\u64CD\u4F5C",property:"\u5C5E\u6027",and:"\u4E14",or:"\u6216",expand:"\u5C55\u5F00",collapse:"\u6536\u8D77",history:"\u5386\u53F2\u8BB0\u5F55",clear:"\u6E05\u9664",more:"\u66F4\u591A",cancel:"\u53D6\u6D88"},toolbar:{noSupportType:"\u5DE5\u5177\u680F\u9879\u7C7B\u578B\uFF1A{itemType}\u6682\u4E0D\u652F\u6301"},tree:{subordinate:"\u4E0B\u7EA7"},wizardPanel:{prev:"\u4E0A\u4E00\u6B65",next:"\u4E0B\u4E00\u6B65",finish:"\u5B8C\u6210"},calendar:{today:"\u4ECA\u5929",pickerDate:"\u9009\u62E9\u65E5\u671F",customPicker:"\u8BF7\u9009\u62E9\u65E5\u671F"},dashboard:{customLayout:"\u81EA\u5B9A\u4E49\u5E03\u5C40",save:"\u4FDD\u5B58",showList:"\u663E\u793A\u6E05\u5355",hiddenList:"\u9690\u85CF\u6E05\u5355"}},editor:{common:{entityConfigErr:"\u8BF7\u914D\u7F6E\u5B9E\u4F53\u548C\u5B9E\u4F53\u6570\u636E\u96C6",selectViewConfigErr:"\u8BF7\u914D\u7F6E\u6570\u636E\u9009\u62E9\u89C6\u56FE",linkViewConfigErr:"\u8BF7\u914D\u7F6E\u6570\u636E\u94FE\u63A5\u89C6\u56FE",cancel:"\u53D6\u6D88",confirm:"\u786E\u5B9A"},html:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"},cascader:{ibizCascader:{title:"\u6807\u9898{index}"}},datePicker:{title:"\u9009\u62E9\u65E5\u671F",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4",year:"\u5E74",month:"\u6708",day:"\u65E5",hour:"\u65F6",min:"\u5206",sec:"\u79D2",clear:"\u6E05\u9664"},dropdownList:{noSupportTreePicker:"\u6682\u672A\u652F\u6301\u6811\u5F62\u4E0B\u62C9\u9009\u62E9",confirm:"\u786E\u5B9A"},mapPicker:{searchPlaceholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u9009\u62E9\u5730\u70B9"},markdown:{uploadJsonFormatErr:"\u914D\u7F6Euploadparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",exportJsonFormatErr:"\u914D\u7F6Eexportparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",downloadFailedErr:"\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25",noExistentErr:"\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728"},notSupportedEditor:{unsupportedType:"\u672A\u652F\u6301\u7684\u7F16\u8F91\u5668\u7C7B\u578B - {type}"},stepper:{pleaseEnter:"\u8BF7\u8F93\u5165"},upload:{uploadJsonFormatErr:"\u914D\u7F6Euploadparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",exportJsonFormatErr:"\u914D\u7F6Eexportparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",cancelUpload:"\u53D6\u6D88\u4E0A\u4F20",compressError:"\u56FE\u7247\u538B\u7F29\u5931\u8D25"},emojiPicker:{addEmoji:"\u6DFB\u52A0\u8868\u60C5"},dropdown:{pleaseSelect:"\u8BF7\u9009\u62E9",clear:"\u6E05\u9664",searchPlaceholder:"\u641C\u7D22"},dateRangePicker:{selectRange:"\u8BF7\u9009\u62E9\u65E5\u671F\u8303\u56F4"},mpicker:{simpleErr:"SIMPLE\u7C7B\u578B\u5730\u5740\u680F\u503C\u683C\u5F0F{props.value}\u4E0D\u7B26\u5408JSON\u5B57\u7B26\u4E32\u8981\u6C42"},signature:{undo:"\u64A4\u9500",rewrite:"\u91CD\u5199",confirm:"\u786E\u8BA4",addSignature:"\u70B9\u51FB\u6B64\u5904\u6DFB\u52A0\u7B7E\u540D",signaturePrompt:"\u8BF7\u5728\u7A7A\u767D\u533A\u57DF\u5185\u6A2A\u5411\u4E66\u5199"}},locale:{prompt:"\u63D0\u793A",switchLanguagePrompt:"\u5207\u6362\u8BED\u8A00\u9700\u8981\u5237\u65B0\u9875\u9762\uFF0C\u786E\u8BA4\u5207\u6362?"},mobApp:{authGuard:{loginFailed:"\u533F\u540D\u7528\u6237\u767B\u5F55\u5931\u8D25",noPermission:"\u65E0\u6743\u9650\u8BBF\u95EE\uFF01"},unauthorizedHandler:{noFoundEnvParams:"\u627E\u4E0D\u5230\u73AF\u5883\u53C2\u6570casLoginUrl",prohibitAccessPrompt:"\u5F53\u524D\u8D26\u6237\u88AB\u7981\u6B62\u8BBF\u95EE",exitPrompt:"\u662F\u5426\u8981\u9000\u51FA\u5F53\u524D\u8D26\u6237\uFF1F"}},panelComponent:{authUserinfo:{visitor:"\u6E38\u5BA2"},authSsO:{noSupported:"\u6682\u4E0D\u652F\u6301{type}\u767B\u5F55",dingLogin:"\u9489\u9489\u767B\u5F55",wechatLogin:"\u5FAE\u4FE1\u767B\u5F55"},navPosIndex:{noSupportPrompt:"\u975E\u8DEF\u7531\u6A21\u5F0F\u5BFC\u822A\u5360\u4F4D\u6682\u672A\u652F\u6301"},panelVideoPlayer:{noSupportPrompt:"\u60A8\u7684\u8BBE\u5907\u4E0D\u652F\u6301video\u6807\u7B7E"},wfStepTrace:{processingComplete:"\u5904\u7406\u5B8C\u6210\u65F6\u95F4",processingSteps:"\u5904\u7406\u73AF\u8282",processingPersonnel:"\u5904\u7406\u4EBA",submissionPath:"\u63D0\u4EA4\u8DEF\u5F84",processInformation:"\u5904\u7406\u4FE1\u606F"},userMessage:{notice:"\u901A\u77E5",backendTasks:"\u540E\u53F0\u4F5C\u4E1A",allRead:"\u5168\u90E8\u5DF2\u8BFB",all:"\u5168\u90E8",unread:"\u672A\u8BFB",asyncActionPreview:{downloadFailedErr:"\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25",noExistentErr:"\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728",importDetailPrompt:"\u5BFC\u5165\u6570\u636E\u8BE6\u60C5-{name}",parseImportInfoErr:"\u89E3\u6790\u5BFC\u5165\u4FE1\u606F\u5F02\u5E38",downloadErrFile:"\u4E0B\u8F7D\u9519\u8BEF\u6587\u4EF6",importTime:"\u5BFC\u5165\u65F6\u95F4: ",importTotal:"\u5BFC\u5165\u603B\u6761\u6570: ",successImport:"\u6210\u529F\u5BFC\u5165\u6570: ",ImportFailed:"\u5BFC\u5165\u5931\u8D25\u6570: "},asyncActionTab:{noSupportType:"\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B{type}\u6682\u672A\u652F\u6301",noAsyncAction:"\u6682\u65E0\u5F02\u6B65\u64CD\u4F5C"},internalMessageContainer:{markAsRead:"\u6807\u8BB0\u4E3A\u5DF2\u8BFB"},internalMessageJson:{jumpToView:"\u8DF3\u8F6C\u5230\u89C6\u56FE",missingHtml:"\u6570\u636E\u7684content\u91CC\u7F3A\u5C11html"},internalMessageTab:{noSupportType:"\u7AD9\u5185\u6D88\u606F\u7C7B\u578B{type}\u6682\u672A\u652F\u6301",notificationYet:"\u6682\u65E0\u901A\u77E5",loadMore:"\u52A0\u8F7D\u66F4\u591A({length})",onlyShowUnread:"\u53EA\u663E\u793A\u672A\u8BFB"}},themeToggling:{auto:"\u8DDF\u968F\u7CFB\u7EDF",light:"\u4EAE\u8272\u4E3B\u9898",dark:"\u6697\u8272\u4E3B\u9898"}},util:{loading:"\u52A0\u8F7D\u4E2D",notAchieved:"\u6CA1\u6709\u5B9E\u73B0",unrealized:"\u672A\u5B9E\u73B0",cacheWarningPrompt:"\u5806\u6808\u53EA\u6709\u4E00\u4E2A\u7F13\u5B58\u4E0D\u80FD\u540E\u9000\u4E86",scanQrcode:{notAllowedError:"\u60A8\u9700\u8981\u6388\u4E88\u76F8\u673A\u8BBF\u95EE\u6743\u9650",notFoundError:"\u6B64\u8BBE\u5907\u4E0A\u6CA1\u6709\u6444\u50CF\u5934",notSupportedError:"\u9700\u8981\u5B89\u5168\u4E0A\u4E0B\u6587\uFF08HTTPS\uFF0Clocalhost\uFF09",notReadableError:"\u76F8\u673A\u662F\u5426\u5DF2\u5728\u4F7F\u7528\u4E2D\uFF1F",overconstrainedError:"\u5B89\u88C5\u7684\u6444\u50CF\u5934\u4E0D\u5408\u9002",streamApiNotSupportedError:"\u6B64\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u6D41API",insecureContextError:"\u53EA\u6709\u5728\u5B89\u5168\u7684\u60C5\u51B5\u4E0B\u624D\u5141\u8BB8\u8BBF\u95EE\u6444\u50CF\u5934\u3002\u4F7F\u7528HTTPS\u6216localhost\u800C\u4E0D\u662FHTTP\u3002"},aiChartUtil:{feedback:"\u53CD\u9988",description:"\u63CF\u8FF0",regardingIssue:"\u9488\u5BF9\u95EE\u9898",understandProblem:"\u4E0D\u7406\u89E3\u95EE\u9898",forgotContext:"\u9057\u5FD8\u4E86\u4E0A\u6587",notFollowingRequire:"\u4E0D\u9075\u5FAA\u8981\u6C42",regardingResponse:"\u9488\u5BF9\u56DE\u7B54\u6548\u679C",incorrectAswer:"\u56DE\u7B54\u9519\u8BEF",logicalConfusion:"\u903B\u8F91\u6DF7\u4E71",poorTimeliness:"\u65F6\u6548\u6027\u5DEE",poorReadability:"\u53EF\u8BFB\u6027\u5DEE",incompleteAnswer:"\u56DE\u7B54\u4E0D\u5B8C\u6574",unprofessional:"\u56DE\u7B54\u7B3C\u7EDF\u4E0D\u4E13\u4E1A",report:"\u4E3E\u62A5",pornographicVulgar:"\u8272\u60C5\u4F4E\u4FD7",politicallySensitive:"\u653F\u6CBB\u654F\u611F",illegalCriminal:"\u8FDD\u6CD5\u72AF\u7F6A",discriminationPrejudice:"\u6B67\u89C6\u6216\u504F\u89C1\u56DE\u7B54",violationPrivacy:"\u4FB5\u72AF\u9690\u79C1",contentInfringement:"\u5185\u5BB9\u4FB5\u6743",placeholder:"\u8BF7\u8F93\u5165"}},view:{fillInUserName:"\u8BF7\u586B\u5199\u7528\u6237\u540D",fillInPassword:"\u8BF7\u586B\u5199\u5BC6\u7801",loginFailed:"\u767B\u5F55\u5931\u8D25",enterUserName:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",enterPassword:"\u8BF7\u8F93\u5165\u5BC6\u7801",userName:"\u7528\u6237\u540D",password:"\u5BC6\u7801",login:"\u767B\u5F55",thirdAuthFail:"\u7B2C\u4E09\u65B9\u6388\u6743\u767B\u5F55\u5931\u8D25",downloading:"\u4E0B\u8F7D\u4E2D...",downloadSuccess:"\u4E0B\u8F7D\u6210\u529F\uFF01",downloadFailed:"\u4E0B\u8F7D\u5931\u8D25\uFF01",noSupportDownload:"\u4E0D\u652F\u6301\u4E0B\u8F7D\u8BE5\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2\u4F7F\u7528\u6D4F\u89C8\u5668\u6253\u5F00\u4E0B\u8F7D\uFF01",immediatelyDownload:"\u7ACB\u5373\u4E0B\u8F7D",reDownload:"\u91CD\u65B0\u4E0B\u8F7D"},viewEngine:{closeRemind:"\u5173\u95ED\u63D0\u9192",confirmClosePrompt:"\u8868\u5355\u6570\u636E\u5DF2\u7ECF\u4FEE\u6539\uFF0C\u786E\u5B9A\u8981\u5173\u95ED\uFF1F",noExistVersionErr:"\u5F53\u524D\u5DE5\u4F5C\u6D41\u7248\u672C\u4E0D\u5B58\u5728",noFoundFormModel:"\u627E\u4E0D\u5230\u8868\u5355{name}\u7684\u6A21\u578B",missingToolbarModel:"\u7F3A\u5C11\u5DE5\u5177\u680F\u90E8\u4EF6\u6A21\u578B",notReceivedPrompt:"\u6CA1\u6709\u63A5\u6536\u5230appDataEntityId"},...e,...F,...r,...o})}}});
2
- //# sourceMappingURL=index-Dd7yiMzY.js.map
@@ -1,14 +0,0 @@
1
- System.register(["vue","qx-util","vant","cherry-markdown"],function(ge){"use strict";var U,y,f,r,I,q,K,X,W,z,F,G,_,Z,E,V,ee,J;return{setters:[function(b){U=b.createApp,y=b.defineComponent,f=b.ref,r=b.createVNode,I=b.computed,q=b.watch,K=b.resolveComponent,X=b.withDirectives,W=b.vModelText,z=b.onMounted,F=b.nextTick,G=b.onUnmounted,_=b.createTextVNode},function(b){Z=b.QXEvent,E=b.createUUID,V=b.isString},function(b){ee=b.default},function(b){J=b.default}],execute:function(){var b=Object.defineProperty,me=(i,e,t)=>e in i?b(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,v=(i,e,t)=>(me(i,typeof e!="symbol"?e+"":e,t),t);const ve="ibiz",fe="is-";function D(i,e,t,s,a){let n="".concat(i,"-").concat(e);return t&&(n+="-".concat(t)),s&&(n+="__".concat(s)),a&&(n+="--".concat(a)),n}class T{constructor(e,t){v(this,"namespace"),this.block=e,this.namespace=t||ve}b(e=""){return D(this.namespace,this.block,e,"","")}e(e){return e?D(this.namespace,this.block,"",e,""):""}m(e){return e?D(this.namespace,this.block,"","",e):""}be(e,t){return e&&t?D(this.namespace,this.block,e,t,""):""}em(e,t){return e&&t?D(this.namespace,this.block,"",e,t):""}bm(e,t){return e&&t?D(this.namespace,this.block,e,"",t):""}bem(e,t,s){return e&&t&&s?D(this.namespace,this.block,e,t,s):""}is(e,t){return e&&t?"".concat(fe).concat(e):""}cssVar(e){const t={};for(const s in e)e[s]&&(t[this.cssVarName(s)]=e[s]);return t}cssVarBlock(e){const t={};for(const s in e)e[s]&&(t[this.cssVarBlockName(s)]=e[s]);return t}cssVarName(e){return"--".concat(this.namespace,"-").concat(e)}cssVarBlockName(e){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(e)}}function x(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function te(i,e){for(var t="",s=0,a=-1,n=0,o,l=0;l<=i.length;++l){if(l<i.length)o=i.charCodeAt(l);else{if(o===47)break;o=47}if(o===47){if(!(a===l-1||n===1))if(a!==l-1&&n===2){if(t.length<2||s!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var c=t.lastIndexOf("/");if(c!==t.length-1){c===-1?(t="",s=0):(t=t.slice(0,c),s=t.length-1-t.lastIndexOf("/")),a=l,n=0;continue}}else if(t.length===2||t.length===1){t="",s=0,a=l,n=0;continue}}e&&(t.length>0?t+="/..":t="..",s=2)}else t.length>0?t+="/"+i.slice(a+1,l):t=i.slice(a+1,l),s=l-a-1;a=l,n=0}else o===46&&n!==-1?++n:n=-1}return t}function be(i,e){var t=e.dir||e.root,s=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+s:t+i+s:s}var R={resolve:function(){for(var i="",e=!1,t,s=arguments.length-1;s>=-1&&!e;s--){var a;s>=0?a=arguments[s]:(t===void 0&&(t=process.cwd()),a=t),x(a),a.length!==0&&(i=a+"/"+i,e=a.charCodeAt(0)===47)}return i=te(i,!e),e?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(i){if(x(i),i.length===0)return".";var e=i.charCodeAt(0)===47,t=i.charCodeAt(i.length-1)===47;return i=te(i,!e),i.length===0&&!e&&(i="."),i.length>0&&t&&(i+="/"),e?"/"+i:i},isAbsolute:function(i){return x(i),i.length>0&&i.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var i,e=0;e<arguments.length;++e){var t=arguments[e];x(t),t.length>0&&(i===void 0?i=t:i+="/"+t)}return i===void 0?".":R.normalize(i)},relative:function(i,e){if(x(i),x(e),i===e||(i=R.resolve(i),e=R.resolve(e),i===e))return"";for(var t=1;t<i.length&&i.charCodeAt(t)===47;++t);for(var s=i.length,a=s-t,n=1;n<e.length&&e.charCodeAt(n)===47;++n);for(var o=e.length,l=o-n,c=a<l?a:l,h=-1,d=0;d<=c;++d){if(d===c){if(l>c){if(e.charCodeAt(n+d)===47)return e.slice(n+d+1);if(d===0)return e.slice(n+d)}else a>c&&(i.charCodeAt(t+d)===47?h=d:d===0&&(h=0));break}var u=i.charCodeAt(t+d),m=e.charCodeAt(n+d);if(u!==m)break;u===47&&(h=d)}var p="";for(d=t+h+1;d<=s;++d)(d===s||i.charCodeAt(d)===47)&&(p.length===0?p+="..":p+="/..");return p.length>0?p+e.slice(n+h):(n+=h,e.charCodeAt(n)===47&&++n,e.slice(n))},_makeLong:function(i){return i},dirname:function(i){if(x(i),i.length===0)return".";for(var e=i.charCodeAt(0),t=e===47,s=-1,a=!0,n=i.length-1;n>=1;--n)if(e=i.charCodeAt(n),e===47){if(!a){s=n;break}}else a=!1;return s===-1?t?"/":".":t&&s===1?"//":i.slice(0,s)},basename:function(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');x(i);var t=0,s=-1,a=!0,n;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e.length===i.length&&e===i)return"";var o=e.length-1,l=-1;for(n=i.length-1;n>=0;--n){var c=i.charCodeAt(n);if(c===47){if(!a){t=n+1;break}}else l===-1&&(a=!1,l=n+1),o>=0&&(c===e.charCodeAt(o)?--o===-1&&(s=n):(o=-1,s=l))}return t===s?s=l:s===-1&&(s=i.length),i.slice(t,s)}else{for(n=i.length-1;n>=0;--n)if(i.charCodeAt(n)===47){if(!a){t=n+1;break}}else s===-1&&(a=!1,s=n+1);return s===-1?"":i.slice(t,s)}},extname:function(i){x(i);for(var e=-1,t=0,s=-1,a=!0,n=0,o=i.length-1;o>=0;--o){var l=i.charCodeAt(o);if(l===47){if(!a){t=o+1;break}continue}s===-1&&(a=!1,s=o+1),l===46?e===-1?e=o:n!==1&&(n=1):e!==-1&&(n=-1)}return e===-1||s===-1||n===0||n===1&&e===s-1&&e===t+1?"":i.slice(e,s)},format:function(i){if(i===null||typeof i!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof i);return be("/",i)},parse:function(i){x(i);var e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;var t=i.charCodeAt(0),s=t===47,a;s?(e.root="/",a=1):a=0;for(var n=-1,o=0,l=-1,c=!0,h=i.length-1,d=0;h>=a;--h){if(t=i.charCodeAt(h),t===47){if(!c){o=h+1;break}continue}l===-1&&(c=!1,l=h+1),t===46?n===-1?n=h:d!==1&&(d=1):n!==-1&&(d=-1)}return n===-1||l===-1||d===0||d===1&&n===l-1&&n===o+1?l!==-1&&(o===0&&s?e.base=e.name=i.slice(1,l):e.base=e.name=i.slice(o,l)):(o===0&&s?(e.name=i.slice(1,n),e.base=i.slice(1,l)):(e.name=i.slice(o,n),e.base=i.slice(o,l)),e.ext=i.slice(n,l)),o>0?e.dir=i.slice(0,o-1):s&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};R.posix=R;function S(){return((1+Math.random())*65536|0).toString(16).substring(1)}function we(){return"".concat(S()+S(),"-").concat(S(),"-").concat(S(),"-").concat(S(),"-").concat(S()).concat(S()).concat(S())}function se(i){const e=i.lastIndexOf("@");return e===-1?i:i.substring(0,e)}const Ce=/<svg\b[^>]*>[\s\S]*?<\/svg>/;function ye(i){return Ce.test(i)}const Te="topic",Ae="inline",ke="temp",Me="unknow";function Ie(i,e){let t="";switch(i){case"TOPIC":t+=Te;break;case"INLINE":t+=Ae;break;case"TEMP":t+=ke;break;default:t+=Me;break}return t+="@".concat(we(),"@").concat(new Date().getTime()),t}class ie{static copy(e){return this.inputElement||(this.inputElement=document.createElement("input"),this.inputElement.style.position="absolute",this.inputElement.style.left="-9999px",document.body.appendChild(this.inputElement)),this.inputElement.value=e,this.inputElement.select(),document.execCommand("copy")}}v(ie,"inputElement",null);const P=class g{static async checkDataBaseExists(e){try{return(await indexedDB.databases()).some(t=>t.name===e)}catch(t){return console.error("\u68C0\u67E5\u6570\u636E\u5E93\u662F\u5426\u5B58\u5728\u65F6\u51FA\u9519:",t),!1}}static async deleteDatabase(e){var t,s;return g.lastLink&&((s=(t=g.lastLink).close)==null||s.call(t)),new Promise((a,n)=>{const o=indexedDB.deleteDatabase(e);o.onsuccess=()=>{a(!0)},o.onerror=()=>{a(!1)},o.onblocked=()=>{console.warn("\u5220\u9664\u6570\u636E\u5E93 ".concat(e," \u88AB\u963B\u585E\uFF0C\u53EF\u80FD\u6709\u5176\u4ED6\u8FDE\u63A5\u6B63\u5728\u4F7F\u7528\u8BE5\u6570\u636E\u5E93\u3002")),n(new Error("\u5220\u9664\u6570\u636E\u5E93 ".concat(e," \u88AB\u963B\u585E")))}})}static async checkTableExists(e,t){return await g.checkDataBaseExists(e)?new Promise((s,a)=>{const n=indexedDB.open(e);n.onupgradeneeded=o=>{g.db=o.target.result,g.version=g.db.version},n.onsuccess=o=>{g.db=o.target.result,g.lastLink=n.result;const l=g.db.objectStoreNames.contains(t);n.result.close(),s(l)},n.onerror=o=>{a(o.target.error)}}):!1}static async createTable(e,t,s,a=!1){return new Promise(n=>{var o,l;g.version+=1,g.lastLink&&((l=(o=g.lastLink).close)==null||l.call(o));const c=indexedDB.open(e,g.version);c.onupgradeneeded=h=>{if(g.db=h.target.result,!g.db.objectStoreNames.contains(t)){const d={};s?d.keyPath=s:a&&(d.autoIncrement=!0),g.db.createObjectStore(t,d)}},c.onsuccess=()=>{g.lastLink=c.result,c.result.close(),n(!0)},c.onerror=()=>{n(!1)}})}static async deleteTable(e,t){return new Promise(s=>{var a,n;g.version+=1,g.lastLink&&((n=(a=g.lastLink).close)==null||n.call(a));const o=indexedDB.open(e,g.version);o.onupgradeneeded=l=>{g.db=l.target.result,g.lastLink=o.result,g.db.objectStoreNames.contains(t)&&g.db.deleteObjectStore(t)},o.onsuccess=l=>{g.db=l.target.result,g.lastLink=o.result,o.result.close(),s(!0)},o.onerror=()=>{o.result.close(),s(!1)}})}static async addData(e,t,s){return new Promise((a,n)=>{const o=indexedDB.open(e);o.onsuccess=l=>{if(g.db=l.target.result,g.lastLink=o.result,g.db.objectStoreNames.contains(t)){const c=g.db.transaction([t],"readwrite").objectStore(t).add(s);c.onsuccess=h=>{a(s)},c.onerror=()=>{a(null)}}o.result.close()},o.onerror=()=>{o.result.close(),n()}})}static async deleteData(e,t,s){return new Promise((a,n)=>{const o=indexedDB.open(e);o.onsuccess=l=>{if(g.db=l.target.result,g.lastLink=o.result,g.db.objectStoreNames.contains(t)){const c=g.db.transaction([t],"readwrite").objectStore(t).delete(s);c.onsuccess=h=>{a(!0)},c.onerror=()=>{a(!1)}}o.result.close()},o.onerror=()=>{o.result.close(),n()}})}static async updateData(e,t,s){return new Promise((a,n)=>{const o=indexedDB.open(e);o.onsuccess=l=>{if(g.db=l.target.result,g.lastLink=o.result,g.db.objectStoreNames.contains(t)){const c=g.db.transaction([t],"readwrite").objectStore(t).put(s);c.onsuccess=h=>{a(s)},c.onerror=()=>{a(s)}}o.result.close()},o.onerror=()=>{o.result.close(),n()}})}static async getData(e,t,s){return new Promise((a,n)=>{const o=indexedDB.open(e);o.onsuccess=l=>{if(g.db=l.target.result,g.lastLink=o.result,g.db.objectStoreNames.contains(t)){const c=g.db.transaction([t],"readonly").objectStore(t).get(s);c.onsuccess=h=>{a(c.result)},c.onerror=()=>{n(new Error("\u672A\u627E\u5230\u6570\u636E".concat(s)))}}o.result.close()},o.onerror=()=>{o.result.close(),n()}})}static async getAllData(e,t){return new Promise((s,a)=>{const n=indexedDB.open(e);n.onsuccess=o=>{if(g.db=o.target.result,g.lastLink=n.result,g.db.objectStoreNames.contains(t)){const l=g.db.transaction([t],"readonly").objectStore(t).getAll();l.onsuccess=c=>{s(l.result)},l.onerror=()=>{s([])}}n.result.close()},n.onerror=()=>{n.result.close(),a()}})}};v(P,"version",1),v(P,"db",null),v(P,"lastLink");let L=P;class xe{constructor(e){v(this,"options"),this.options={multiple:!0,accept:"*/*",maxSize:5*1024*1024,...e}}openFilePicker(){const e=document.createElement("input");e.type="file",e.multiple=this.options.multiple,e.accept=this.options.accept||"",e.onchange=t=>{const s=Array.from(t.target.files||[]);this.handleFiles(s)},e.click()}async handleFiles(e){var t,s;if(e.length===0)return;const a=e.filter(n=>{var o,l;return this.options.maxSize&&n.size>this.options.maxSize?((l=(o=this.options).onError)==null||l.call(o,new Error("\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u9650\u5236 (".concat(this.formatSize(n.size)," > ").concat(this.formatSize(this.options.maxSize),")")),n),!1):!0});(s=(t=this.options).onSelect)==null||s.call(t,a),await Promise.all(a.map(n=>this.processFile(n)))}async processFile(e){var t,s,a,n,o,l;try{const c=d=>{var u,m;(m=(u=this.options).onProgress)==null||m.call(u,e,d)},h=await this.options.onUpload(e,c);(s=(t=this.options).onProgress)==null||s.call(t,e,100),(n=(a=this.options).onSuccess)==null||n.call(a,h,e)}catch(c){(l=(o=this.options).onError)==null||l.call(o,c instanceof Error?c:new Error("\u4E0A\u4F20\u5931\u8D25"),e)}}formatSize(e){if(e===0)return"0 B";const t=["B","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/1024**s).toFixed(2)," ").concat(t[s])}}class ${static getCdataContent(e){if(!e)return null;const t=Array.from(e.childNodes).find(s=>s.nodeType===s.CDATA_SECTION_NODE);return t?.nodeValue||e.textContent}static parse(e){const t=new DOMParser().parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("resource")).map(s=>{const a=s.getAttribute("type")||"",n=s.querySelector("data"),o=s.querySelector("metadata");try{const l=this.getCdataContent(n),c=this.getCdataContent(o),h=l?JSON.parse(l):{},d=c?JSON.parse(c):{};return{id:h.id,type:a,data:h,metadata:d}}catch(l){throw new Error("XML \u89E3\u6790\u9519\u8BEF: ".concat(l.message))}})}static parseMixedContent(e){const t=/<resources\b[^>]*>[\s\S]*?<\/resources>/i.exec(e);if(!t)return{resources:[],remainingText:e,hasResources:!1};const[s]=t,a=t.index,n=a+s.length,o=(e.slice(0,a)+e.slice(n)).replace(/\n/g,"").replace(/(!\[[^\]]*\]\([^)]+\))/g,`
2
- $1
3
- `).replace(/\n+/g,`
4
- `).replace(/^\n|\n$/g,"");try{return{resources:this.parse(s),remainingText:o,hasResources:!0}}catch(l){return{resources:[],remainingText:o,hasResources:!0,error:"\u8D44\u6E90\u89E3\u6790\u5931\u8D25: ".concat(l.message)}}}static stringify(e){const t=document.implementation.createDocument(null,null,null),s=t.createElement("resources");s.setAttribute("version","1.0");const a=o=>`
5
- `.concat(" ".repeat(o)),n=1;return e.forEach(o=>{s.appendChild(t.createTextNode(a(n)));const l=t.createElement("resource");l.setAttribute("type",o.type),l.setAttribute("version","1.0");const c=(h,d)=>{const u=t.createElement(h);u.appendChild(t.createTextNode(a(n+1)));const m=t.createCDATASection(JSON.stringify(d));return u.appendChild(m),u.appendChild(t.createTextNode(a(n))),u};l.appendChild(t.createTextNode(a(n+1))),l.appendChild(c("data",o.data)),l.appendChild(t.createTextNode(a(n+1))),l.appendChild(c("metadata",o.metadata)),l.appendChild(t.createTextNode(a(n))),s.appendChild(l)}),s.appendChild(t.createTextNode(`
6
- `)),t.appendChild(s),new XMLSerializer().serializeToString(t).replace(/></g,`>
7
- <`)}}class Oe{static getCdataContent(e){if(!e)return null;const t=Array.from(e.childNodes).find(s=>s.nodeType===s.CDATA_SECTION_NODE);return t?.nodeValue||e.textContent}static parse(e){const t=new DOMParser().parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("suggestion")).map(s=>{const a=s.getAttribute("type")||"",n=s.querySelector("data"),o=s.querySelector("metadata");try{const l=this.getCdataContent(n),c=this.getCdataContent(o),h=l?JSON.parse(l):{},d=c?JSON.parse(c):{};return{type:a,data:h,metadata:d}}catch(l){throw new Error("XML \u89E3\u6790\u9519\u8BEF: ".concat(l.message))}})}static parseMixedContent(e){const t=/<suggestions\b[^>]*>[\s\S]*?<\/suggestions>/i.exec(e);if(!t)return{suggestions:[],remainingText:e,hasSuggestions:!1};const[s]=t,a=t.index,n=a+s.length,o=(e.slice(0,a)+e.slice(n)).replace(/\n/g,"");try{return{suggestions:this.parse(s),remainingText:o,hasSuggestions:!0}}catch(l){return{suggestions:[],remainingText:o,hasSuggestions:!0,error:"\u8D44\u6E90\u89E3\u6790\u5931\u8D25: ".concat(l.message)}}}static stringify(e){const t=document.implementation.createDocument(null,null,null),s=t.createElement("suggestions");s.setAttribute("version","1.0");const a=o=>`
8
- `.concat(" ".repeat(o)),n=1;return e.forEach(o=>{s.appendChild(t.createTextNode(a(n)));const l=t.createElement("suggestion");l.setAttribute("type",o.type),l.setAttribute("version","1.0");const c=(h,d)=>{const u=t.createElement(h);u.appendChild(t.createTextNode(a(n+1)));const m=t.createCDATASection(JSON.stringify(d));return u.appendChild(m),u.appendChild(t.createTextNode(a(n))),u};l.appendChild(t.createTextNode(a(n+1))),l.appendChild(c("data",o.data)),l.appendChild(t.createTextNode(a(n+1))),l.appendChild(c("metadata",o.metadata)),l.appendChild(t.createTextNode(a(n))),s.appendChild(l)}),s.appendChild(t.createTextNode(`
9
- `)),t.appendChild(s),new XMLSerializer().serializeToString(t).replace(/></g,`>
10
- <`)}}class Ee{static parse(e){const t=new RegExp("<tool_call>\\s*({[\\s\\S]*?})\\s*</tool_call>","g"),s=e.matchAll(t),a=[];for(const n of s)try{const o=JSON.parse(n[1]),l={name:o.name,parameters:o.parameters,error:o.error||!1};o.result&&Object.assign(l,{result:o.result}),a.push(l)}catch(o){console.error("\u89E3\u6790\u5DE5\u5177\u8C03\u7528\u5931\u8D25:",o)}return a}}class B{constructor(e){v(this,"toolcalls",[]),v(this,"allcontent",""),this.msg=e,this.toolcalls=e.toolcalls||[],this.allcontent=e.content}get messageid(){return this.msg.messageid}get state(){return this.msg.state}get role(){return this.msg.role}get type(){return this.msg.type}get status(){return this.msg.status}get realcontent(){let e=this.msg.content;if(e.indexOf("<think>")!==-1&&e.indexOf("</think>")===-1||(e=e.replace(new RegExp("\\<think\\>[^]*?\\<\\/think\\>","gs"),"").trim(),e.indexOf("<tool_call>")!==-1&&e.indexOf("</tool_call>")===-1)||(e=e.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>","gs"),"").trim(),e.indexOf("<resources>")!==-1&&e.indexOf("</resources>")===-1))return"";e=e.replace(new RegExp("\\<resources\\>[^]*?\\<\\/resources\\>","gs"),"").trim();const t=e.indexOf("<suggestions>");return t!==-1&&(e=e.substring(0,t).trim()),e}get content(){return this.msg.content}get completed(){return this.msg.completed}get suggestions(){return this.msg.suggestions}get _origin(){return this.msg}get islike(){return this.msg.islike}get isdislike(){return this.msg.isdislike}get feedbackcontent(){return this.msg.feedbackcontent}get realmessageid(){return this.msg.realmessageid}update(e){e.content||(e.content=""),this.allcontent+=e.content,e.content.indexOf("<think>")!==-1&&this.msg.content&&(this.msg.content=""),this.msg.content+=e.content,this.computeToolCalls()}replace(e){this.msg=e}updateCompleted(e){this.msg.completed=e}computeToolCalls(){this.toolcalls=Ee.parse(this.allcontent)}}class N{constructor(e){this.data=e}get appid(){return this.data.appid}get id(){return this.data.id}get type(){return this.data.type}get caption(){return this.data.caption}get sourceCaption(){return this.data.sourceCaption}get url(){return this.data.url}get aiChat(){return this.data.aiChat}get captionMode(){return this.data.captionMode}get captionFilled(){return this.data.captionFilled}get realid(){return this.data.realid}get sequence(){return this.data.sequence}get isTop(){return this.data.isTop}get disableStorage(){return this.data.disableStorage||!1}}class Q{constructor(e){this.material=e}get id(){return this.material.id}get type(){return this.material.type}get metadata(){return this.material.metadata}get data(){return this.material.data}}class Se{constructor(e){this.agent=e}get id(){return this.agent.id}get caption(){return this.agent.caption}get default(){return this.agent.default}get order(){return this.agent.order}get value(){return this.agent.id}get label(){return this.agent.caption}}var k=(i=>(i.DATA_BASE_NAME="ibiz-chat",i.DATA_TABLE_NAME="history-message",i.DATA_TABLE_KEY_NAME="id",i))(k||{});function De(i){switch(i){case"user":return"USER";case"agent":return"ASSISTANT";case"system":return"SYSTEM";default:return"USER"}}function Le(i){switch(i){case"pending":return 20;case"sent":return 30;case"failed":return 40;case"canceled":return 30;default:return 30}}function Be(i){switch(i){case"pending":case"sent":case"canceled":return"DEFAULT";case"failed":return"ERROR";default:return"DEFAULT"}}function ze(i){return{messageid:i.id,state:Le(i.status),type:Be(i.status),role:De(i.sender_type),content:i.content,completed:!0,islike:i.is_like,isdislike:i.is_dislike,feedbackcontent:i.feedback_content,realmessageid:i.id,status:i.status}}class ae{constructor(e,t){v(this,"evt",new Z),v(this,"messages",f([])),v(this,"materials",f([])),v(this,"input",f("")),v(this,"isLoading",f(!1)),v(this,"enableAIAgentChange",!0),v(this,"activeAIAgentID"),v(this,"agentList",f([])),v(this,"context"),v(this,"params"),v(this,"appDataEntityId"),v(this,"topicId"),v(this,"topic"),v(this,"aiTopic"),v(this,"chatSessionid",""),v(this,"chatMode"),this.opts=e,this.resourceOptions=t,this.context=e.context,this.params=e.params,this.appDataEntityId=e.appDataEntityId,this.aiTopic=e.aiTopic,this.topicId=e.topicId,this.topic=e.topic,this.activeAIAgentID=e.activeAIAgentID,this.enableAIAgentChange=!!e.enableAIAgentChange,this.chatMode=e.srfMode,this.chatSessionid=e.sessionid,this.initAIChat()}get resourceMode(){var e;return((e=this.resourceOptions)==null?void 0:e.resourceMode)||"LOCAL"}get currentTopicDisableStorage(){if(this.topicId&&this.aiTopic){const e=this.aiTopic.getCurrentTopicByID(this.topicId);if(e&&e.disableStorage)return!0}return!1}async initAIChat(){this.messages.value=[],await this.initAIChatAgent(),await this.fecthHistory()}async initAIChatAgent(){this.opts.aiAgentlist&&this.opts.aiAgentlist.length>0&&this.opts.aiAgentlist.forEach(e=>{this.agentList.value=[...this.agentList.value,new Se(e)]})}getHistoryStoreKey(e){return"".concat(e)}async fecthHistory(){if(this.topicId){let e={};if(this.currentTopicDisableStorage)e.data=[];else if(this.resourceMode==="LOCAL")e=await L.getData(k.DATA_BASE_NAME,k.DATA_TABLE_NAME,this.getHistoryStoreKey(this.topicId));else if(this.resourceMode==="REMOTE"&&this.resourceOptions){const t=await this.resourceOptions.getMessages({n_session_id_eq:this.chatSessionid});if(t&&t.length>0){const s=[];t.forEach(a=>{s.push(ze(a))}),e.data=s}}if(e&&e.data&&e.data.length>0)return e.data.forEach(t=>{const s={messageid:t.messageid,state:t.state,type:t.type,role:t.role,islike:t.islike,isdislike:t.isdislike,feedbackcontent:t.feedbackcontent,content:t.content,suggestions:t.suggestions,completed:!0,toolcalls:t.toolcalls,realmessageid:t.realmessageid,status:t.status};this.addMessage(s)}),await this.afterFecthHistory(),!0}return await this.opts.history(this.context,this.params,{appDataEntityId:this.appDataEntityId,appendCurData:this.opts.appendCurData,sessionid:this.chatSessionid,srfaiagent:this.activeAIAgentID,srfmode:this.chatMode})&&await this.afterFecthHistory(),!0}async afterFecthHistory(){if(this.opts.appendCurContent&&this.addMessage({state:30,messageid:E(),role:"USER",type:"DEFAULT",content:this.opts.appendCurContent,completed:!0,status:"sent"}),this.opts.appendCurResource){const{hasResources:e,resources:t}=$.parseMixedContent(this.opts.appendCurResource);e&&t&&t.length>0&&t.forEach(s=>{this.replaceMaterial(s.id,s)})}if(this.opts.autoQuestion!==!1){const e=this.messages.value.length-1,t=this.messages.value[e];if(t&&t.role==="USER"){const s=this.stringlyMaterialResource(!1);if(s){const a=s+t.content,n={...t._origin,messageid:E(),content:a};this.messages.value[e]=new B(n),this.messages.value=[...this.messages.value]}try{this.isLoading.value=!0,await this.opts.question(this,this.context,this.params,{appDataEntityId:this.appDataEntityId},this.getMessages(),this.chatSessionid,this.activeAIAgentID,this.chatMode),this.opts.action&&await this.opts.action("question",t.content)}finally{this.isLoading.value=!1}}}await this.updateTopicCaption()}async asyncToIndexDB(){if(!this.topicId||this.resourceMode!=="LOCAL"||this.currentTopicDisableStorage)return;const e={id:this.getHistoryStoreKey(this.topicId),data:this.messages.value.map(t=>({...t._origin,toolcalls:t.toolcalls?[...t.toolcalls]:[]})),timestamp:new Date().getTime()};await L.updateData(k.DATA_BASE_NAME,k.DATA_TABLE_NAME,e)}setInput(e){this.input.value=e||""}addMessage(e){const t=this.messages.value.find(s=>s.messageid===e.messageid);t?(t.update(e),this.messages.value=[...this.messages.value]):this.messages.value=[...this.messages.value,new B(e)],this.asyncToIndexDB()}async completeMessage(e,t){const s=this.messages.value.find(a=>a.messageid===e);if(s&&(s.updateCompleted(t),this.messages.value=[...this.messages.value],await this.asyncToIndexDB()),this.opts.autoFill===!0){const a=s||this.messages.value[this.messages.value.length-1];a.role==="ASSISTANT"&&a.state===30&&this.backfill(a)}this.evt.emit("onCompleteMessage",{messageid:e,completed:t})}replaceMessage(e,t=!0){const s=this.messages.value.findIndex(a=>a.messageid===e.messageid);s!==-1?(this.messages.value[s].replace(e),this.messages.value=[...this.messages.value]):this.messages.value=[...this.messages.value,new B(e)],this.asyncToIndexDB(),e.type==="DEFAULT"&&this.opts.recommendPrompt&&t&&this.opts.recommendPrompt(this.context,this.params,{appDataEntityId:this.appDataEntityId,message:{messages:[e],sessionid:this.chatSessionid,srfaiagent:this.activeAIAgentID}}).then(a=>{a&&a.content&&this.updateRecommendPrompt(e,a.content)})}async stopMessage(e){const t=this.messages.value.findIndex(s=>s.messageid===e.messageid);e.content=e.content||"\u7528\u6237\u4E2D\u65AD",t!==-1?(this.messages.value[t].replace(e),this.messages.value=[...this.messages.value]):this.messages.value=[...this.messages.value,new B(e)],await this.asyncToIndexDB()}stringlyMaterialResource(e=!0){let t="";const s=[];return this.materials.value&&this.materials.value.length>0&&(this.materials.value.forEach(a=>{if(a.type==="ossfile"){const n=a.metadata;n.state&&n.state==="successed"&&s.push(a)}else s.push(a)}),e&&(this.materials.value=[])),s&&s.length>0&&(t=$.stringify(s)),t}getMessages(){const e=this.messages.value.filter(t=>t.type!=="ERROR"&&t.status!=="canceled").map(t=>t._origin);return e.forEach(t=>{t.content=t.content.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>","gs"),"").trim()}),e}getAllMessages(){return this.messages.value.map(e=>e._origin)}async question(e){try{this.isLoading.value=!0,this.messages.value.forEach((s,a)=>{const n=s._origin;n.suggestions&&(n.suggestions=void 0,this.messages.value[a].replace(n))}),this.messages.value=[...this.messages.value],this.asyncToIndexDB();let t=this.stringlyMaterialResource(!1);t?t+=`
11
- `.concat(e):t=e,this.addMessage({state:30,messageid:E(),role:"USER",type:"DEFAULT",content:t,status:"sent"}),await this.opts.question(this,this.context,this.params,{appDataEntityId:this.appDataEntityId},this.getMessages(),this.chatSessionid,this.activeAIAgentID,this.chatMode),await this.updateTopicCaption(),this.opts.action&&this.opts.action("question",e),this.isLoading.value=!1}finally{this.isLoading.value=!1}}async abortQuestion(){try{await this.opts.abortQuestion(this,this.context,this.params,{appDataEntityId:this.appDataEntityId,sessionid:this.chatSessionid,srfaiagent:this.activeAIAgentID,srfmode:this.chatMode})}finally{this.isLoading.value=!1}}backfill(e){this.opts.action&&this.opts.action("backfill",e)}async deleteMessage(e){const t=this.messages.value.findIndex(s=>s.messageid===e.messageid);t!==-1&&(this.messages.value.splice(t,1),this.messages.value=[...this.messages.value]),this.asyncToIndexDB(),this.resourceMode==="REMOTE"&&this.resourceOptions&&e.realmessageid&&await this.resourceOptions.deleteMessage(e.realmessageid),this.opts.action&&this.opts.action("deletemsg",e)}async refreshMessage(e,t=!1){this.isLoading.value=!0;try{const s=this.messages.value.findIndex(a=>a.messageid===e.messageid);if(t)this.messages.value.splice(s+1,this.messages.value.length-s-1),this.messages.value=[...this.messages.value],await this.opts.question(this,this.context,this.params,{appDataEntityId:this.appDataEntityId},this.getMessages(),this.chatSessionid,this.activeAIAgentID,this.chatMode);else if(s===this.messages.value.length-1)this.messages.value.pop(),this.messages.value=[...this.messages.value],await this.opts.question(this,this.context,this.params,{appDataEntityId:this.appDataEntityId},this.getMessages(),this.chatSessionid,this.activeAIAgentID,this.chatMode);else{const a=this.messages.value[s-1].content;this.messages.value.splice(s-1,2),this.question(a)}this.asyncToIndexDB(),this.opts.action&&this.opts.action("refreshmsg",e)}finally{this.isLoading.value=!1}}copyMessage(e){const t=e.realcontent;ie.copy(t),this.opts.action&&this.opts.action("copymsg",e)}async resetTopic(){let e=!0;return e=await this.clearTopic(),e&&(await this.fecthHistory(),e)}async clearTopic(){let e=!0;if(await this.abortQuestion(),this.topicId)this.topicId&&this.aiTopic&&(this.currentTopicDisableStorage?e=!0:this.resourceMode==="LOCAL"?e=await L.deleteData(k.DATA_BASE_NAME,k.DATA_TABLE_NAME,this.getHistoryStoreKey(this.topicId)):this.resourceMode==="REMOTE"&&(e=await this.aiTopic.clearMessagesByTopicId(this.topicId)));else if(this.resourceMode==="REMOTE"&&this.resourceOptions){const t=await this.resourceOptions.getSessionList({n_session_id_eq:this.chatSessionid});t&&t.length>0&&(e=await this.resourceOptions.clearAllMessageBySessionId(t[0].realid))}return e&&(this.messages.value=[],e)}async newTopic(){this.topicId&&this.aiTopic&&this.aiTopic.newTopic(this.topicId,{activeAIAgentID:this.activeAIAgentID,sessionid:"".concat(se(this.chatSessionid),"@").concat(new Date().getTime())})}addMaterial(e){this.materials.value.find(t=>t.id===e.id)?this.materials.value=[...this.materials.value]:this.materials.value=[...this.materials.value,new Q(e)]}replaceMaterial(e,t){const s=this.materials.value.findIndex(a=>a.id===e);s!==-1?(this.materials.value[s]=new Q(t),this.materials.value=[...this.materials.value]):this.materials.value=[...this.materials.value,new Q(t)]}deleteMaterial(e){const t=this.materials.value.findIndex(s=>s.id===e.id);t!==-1&&(this.materials.value.splice(t,1),this.materials.value=[...this.materials.value])}updateRecommendPrompt(e,t){if(!t)return;const s=this.messages.value.findIndex(n=>n.messageid===e.messageid),{suggestions:a}=Oe.parseMixedContent(t);a&&a.length>0&&(e.suggestions=a,s!==-1?(this.messages.value[s]=new B(e),this.messages.value=[...this.messages.value]):this.messages.value=[...this.messages.value,new B(e)],this.asyncToIndexDB())}async handleSuggestionClick(e,t,s){var a;const n=this.messages.value.findIndex(c=>c.messageid===e.messageid);if(n!==-1){const c=this.messages.value[n]._origin;c.suggestions=void 0,this.messages.value[n].replace(c),this.messages.value=[...this.messages.value]}this.asyncToIndexDB();const{type:o,metadata:l}=t;switch(o){case"action":if(this.opts.extendToolbarClick){const c=t.data.actionid,h=t.data.appid;if(!c)throw new Error("actionid\u4E0D\u80FD\u4E3A\u7A7A");this.addMessage({messageid:E(),state:30,type:"DEFAULT",role:"USER",content:l.content_name,status:"sent"});const d={...e};Object.assign(d,{topic:this.topic}),d.msg.realcontent=e.realcontent;const u=await this.opts.extendToolbarClick(s,{id:c,isPluginApp:!!h,appId:h||this.context.srfappid},this.context,this.params,d),m=(a=u?.data)==null?void 0:a[0];m.content&&this.addMessage({messageid:E(),state:30,type:m.type||"DEFAULT",role:m.role||"ASSISTANT",content:m.content,status:"sent"})}break;case"raw":await this.question(t.data.content);break;default:throw new Error("\u4E0D\u652F\u6301".concat(o,"\u63A8\u8350\u7C7B\u578B"))}}async setActiveAIAgentID(e){this.activeAIAgentID=e,this.topicId&&this.aiTopic&&this.aiTopic.updateTopicChatByID(this.topicId,{activeAIAgentID:e})}async updateTopicCaption(){const e=this.messages.value.find(t=>t.role==="USER");if(e){if(this.topicId&&this.aiTopic)this.aiTopic.updateTopicCaption(this.topicId,e.content);else if(this.resourceMode==="REMOTE"&&this.resourceOptions){const t=await this.resourceOptions.getSessionList({n_session_id_eq:this.chatSessionid});if(t&&t.length>0){const s=e.content.substring(0,15)||this.opts.caption;if(t[0].caption===s)return;await this.resourceOptions.updateSession(t[0].realid,{caption:s})}}}}async messageLike(e){const t=e.islike==="1",s=e.realmessageid;!s||!this.resourceOptions||(t?await this.resourceOptions.cancelFeedback(s):await this.resourceOptions.likeMessage(s))&&(e.islike=t?"0":"1",!t&&e.isdislike==="1"&&(e.isdislike="0"),this.replaceMessage(e,!1))}async messageDisLike(e){const t=e.isdislike==="1",s=e.realmessageid,a=e.feedbackcontent;!s||!this.resourceOptions||(t?await this.resourceOptions.cancelFeedback(s):await this.resourceOptions.dislikeMessage(s,a))&&(e.isdislike=t?"0":"1",!t&&e.islike==="1"&&(e.islike="0"),this.replaceMessage(e,!1))}async destroyed(){await this.abortQuestion(),this.evt.reset()}}class Re{constructor(e){v(this,"topics",f([])),v(this,"activedTopic",f(void 0)),v(this,"backupOptions"),v(this,"remoteSessionList",[]),v(this,"resourceMode","LOCAL"),v(this,"resourceOptions"),this.chat=e}injectResourceOptions(e){this.resourceMode=e?.resourceMode||"LOCAL",this.resourceOptions=e}async fetchHistory(e){this.topics.value=[];const t=await e.configService(e.appid,"aitopics",e.type).load();t&&t.length>0&&(this.resourceMode==="REMOTE"&&this.resourceOptions?(this.remoteSessionList=await this.resourceOptions.getSessionList(),await this.asyncRemoteSession(t)):t.forEach((s,a)=>{Object.prototype.hasOwnProperty.call(s,"sequence")||(s.sequence=a),Object.prototype.hasOwnProperty.call(s,"isTop")||(s.isTop=0),this.topics.value=[...this.topics.value,new N(s)]}))}async asyncRemoteSession(e){!this.remoteSessionList||this.remoteSessionList.length===0||!e||e.length===0||this.remoteSessionList.forEach(t=>{const s=e.find(a=>{var n;return((n=a.aiChat)==null?void 0:n.sessionid)===t.session_id});s&&(s.realid=t.realid,s.sequence=t.sequence,s.isTop=t.is_top?t.is_top:0,t.caption&&(s.caption=t.caption),this.topics.value=[...this.topics.value,new N(s)])})}async asyncTopic(e){this.backupOptions=e;const t=this.topics.value.findIndex(a=>a.id===e.id),s=new N(e);t!==-1?this.topics.value.splice(t,1,s):this.topics.value=[...this.topics.value,s],await this.updateTopic(e),this.activedTopic.value=s}getCurrentTopicByID(e){const t=this.topics.value.find(s=>s.id===e);return t&&t.data?new N({...t.data}):void 0}async updateTopicChatByID(e,t){if(!e||!t||!this.backupOptions)return;const s=this.topics.value.findIndex(a=>a.id===e);s===-1||!this.topics.value[s].data.aiChat||(this.topics.value[s].data.aiChat={...this.topics.value[s].data.aiChat,...t},await this.updateTopic(this.backupOptions))}async removeTopic(e,t,s,a,n){var o;let l=!0;if(e.beforeDelete&&(l=await e.beforeDelete(t,s,a,n)),!l)return;let c=!1;if(a&&a.disableStorage)c=!0;else if(this.resourceMode==="LOCAL")c=await L.deleteData(k.DATA_BASE_NAME,k.DATA_TABLE_NAME,a.id);else if(this.resourceMode==="REMOTE"&&this.resourceOptions){if(a.realid)c=await this.resourceOptions.deleteSession(a.realid);else if(a.aiChat&&a.aiChat.sessionid){const d=await this.resourceOptions.getSessionList({n_session_id_eq:a.aiChat.sessionid});d&&d.length>0?c=await this.resourceOptions.deleteSession(d[0].realid):c=!0}}if(!c)return;const h=this.topics.value.findIndex(d=>d.id===a.id);h!==-1&&(this.topics.value.splice(h,1),this.topics.value=[...this.topics.value]),await this.updateTopic(e),this.topics.value.length>0&&a.id===((o=this.activedTopic.value)==null?void 0:o.id)&&this.handleTopicChange(this.topics.value[0])}handleTopicChange(e){var t;((t=this.activedTopic.value)==null?void 0:t.id)!==e.id&&(this.activedTopic.value=e,this.chat.switchAiChatController(e))}async handleTopicAction(e,t,s){var a,n;const o=this.topics.value.find(l=>l.id===t.id);if(this.backupOptions&&o&&o.aiChat){const{context:l,params:c}=o.aiChat;switch(e){case"DELETE":await this.removeTopic(this.backupOptions,l,c,o,s);break;case"RENAME":case"PINNED":if(e==="PINNED"&&(t.data.isTop=t.data.isTop===0?1:0,this.topics.value=[...this.topics.value]),t&&!t.disableStorage&&(await this.updateTopic(this.backupOptions),t&&this.resourceMode==="REMOTE"&&this.resourceOptions)){if(t.realid)await this.resourceOptions.updateSession(t.realid,{caption:t.caption,is_top:t.isTop});else if(t.aiChat&&t.aiChat.sessionid){const h=await this.resourceOptions.getSessionList({n_session_id_eq:t.aiChat.sessionid});h&&h.length>0&&await this.resourceOptions.updateSession(h[0].realid,{caption:t.caption,is_top:t.isTop})}}break}(n=(a=this.backupOptions).action)==null||n.call(a,e,l,c,t,s)}}async clearMessagesByTopicId(e){let t=!0;if(!e||!this.backupOptions)return t;const s=this.topics.value.findIndex(n=>n.id===e);if(s===-1||!this.topics.value[s].data)return t;const a=this.topics.value[s];if(!a||a.disableStorage)return t;if(this.resourceMode==="REMOTE"&&this.resourceOptions){if(a.realid)t=await this.resourceOptions.clearAllMessageBySessionId(a.realid);else if(a.aiChat&&a.aiChat.sessionid){const n=await this.resourceOptions.getSessionList({n_session_id_eq:a.aiChat.sessionid});n&&n.length>0&&(t=await this.resourceOptions.clearAllMessageBySessionId(n[0].realid))}if(!t)return t}return t}async newTopic(e,t){var s;if(!e)return;const a=this.getCurrentTopicByID(e);if(!a)return;const n=se(a.id),o=this.topics.value.filter(u=>u.id.startsWith(n));t&&a.aiChat&&(a.data.aiChat={...a.aiChat,...t});let l="";a.captionMode==="default"?l="".concat((s=a.sourceCaption)==null?void 0:s.split("_")[0],"_").concat(o.length):l="\u65B0\u4F1A\u8BDD";const c=Math.max(...this.topics.value.map(u=>u.sequence)),h={appid:a.appid,id:"".concat(n,"@").concat(Date.now()),type:a.type,captionMode:a.captionMode,captionFilled:!1,caption:l,sourceCaption:a.sourceCaption,url:a.url,aiChat:a.aiChat,sequence:c+1,isTop:0,disableStorage:a.disableStorage},d=new N(h);this.topics.value=[...this.topics.value,d],this.backupOptions&&await this.updateTopic(this.backupOptions),this.handleTopicChange(d)}async clearTopic(){var e;const t=this.topics.value.find(n=>{var o;return n.id===((o=this.activedTopic.value)==null?void 0:o.id)});if(!this.backupOptions||!t)return;let s=!0;if(this.backupOptions.beforeDelete&&(s=await this.backupOptions.beforeDelete(t.aiChat.context,t.aiChat.params,t,void 0,!0)),!s)return;let a=!1;if(this.resourceMode==="LOCAL")await Promise.all(this.topics.value.map(n=>{if(n.id!==t?.id&&!n.disableStorage)return L.deleteData(k.DATA_BASE_NAME,k.DATA_TABLE_NAME,n.id)})),a=!0;else if(this.resourceMode==="REMOTE")if(t&&this.resourceOptions){const n=(e=t.aiChat)==null?void 0:e.sessionid;n?a=await this.resourceOptions.clearAllSession(n):a=!0}else a=!0;a&&(this.topics.value=t?[t]:[],await this.updateTopic(this.backupOptions))}async updateTopicCaption(e,t){const s=this.topics.value.find(a=>a.id===e);if(s&&!s.captionFilled){if(s.captionMode!=="default"){switch(s.captionMode){case"snippet":s.data.caption=t.substring(0,15);break}this.topics.value=[...this.topics.value],this.backupOptions&&await this.updateTopic(this.backupOptions)}if(s.disableStorage)return;if(this.resourceMode==="REMOTE"&&this.resourceOptions){if(s.realid)await this.resourceOptions.updateSession(s.realid,{caption:s.caption});else if(s.aiChat&&s.aiChat.sessionid){const a=await this.resourceOptions.getSessionList({n_session_id_eq:s.aiChat.sessionid});if(a&&a.length>0){if(a[0].caption===s.caption)return;await this.resourceOptions.updateSession(a[0].realid,{caption:s.caption})}}}s.data.captionFilled=!0}}async updateTopic(e){if(!e)return;const t=[];this.topics.value.forEach(a=>{a.disableStorage||t.push({appid:a.appid,id:a.id,type:a.type,captionMode:a.captionMode,captionFilled:a.captionFilled,caption:a.caption||a.sourceCaption,sourceCaption:a.sourceCaption,url:a.url,aiChat:a.aiChat,isTop:a.isTop,sequence:a.sequence})});const s=e.configService(e.appid,"aitopics",e.type);await s?.save(t)}}class ne{constructor(e){this.aiChat=e}}class Ne extends ne{async excuteAction(e,t){let s;if(t&&t.onClick&&typeof t.onClick=="function")s=await t.onClick(e,t,this.aiChat.context,this.aiChat.params);else{const a=this.aiChat.opts.extendToolbarClick;a?s=await a(e,t,this.aiChat.context,this.aiChat.params,{}):console.error("\u672A\u627E\u5230\u6269\u5C55\u5DE5\u5177\u680F\u70B9\u51FB\u4E8B\u4EF6")}if(s&&s.data&&s.data.length>0){const a=s.data[0],n={id:a.id,type:a.type,data:a.data||{},metadata:a.metadata||{}};t.id&&Object.assign(n.metadata,{actionId:t.id}),this.aiChat.addMaterial(n)}}}class je extends ne{async excuteAction(e,t){const s=this.aiChat.opts.uploader,{multiple:a,accept:n,maxSize:o,onSelect:l,onUpload:c,onSuccess:h,onError:d,onProgress:u}=s,m={multiple:a||!0,accept:n||"*/*",maxSize:o||5*1024*1024,onSelect:p=>{l?.(p),p.length>0&&p.forEach(C=>{const A=this.buildMaterialObject(C);Object.assign(A.metadata,{state:"uploading"}),this.aiChat.addMaterial(A)})},onUpload:async(p,C)=>c(p,C,{context:this.aiChat.context,params:this.aiChat.params}),onSuccess:(p,C)=>{const A={id:p.id,type:"ossfile",data:{id:p.id,name:p.name},metadata:{ext:p.ext,fileext:p.fileext,fileid:p.fileid,filename:p.filename,size:p.size,filesize:p.filesize,state:"successed"}};this.aiChat.replaceMaterial(C.name,A),h?.(p,C)},onError:(p,C)=>{const A=this.buildMaterialObject(C);Object.assign(A.metadata,{state:"failed"}),this.aiChat.replaceMaterial(C.name,A),d?.(p,C)},onProgress:(p,C)=>{u?.(p,C)}};new xe(m).openFilePicker()}buildMaterialObject(e){return{id:e.name,type:"ossfile",data:{name:e.name,id:e.name},metadata:{size:e.size,type:e.type,lastModified:e.lastModified}}}}class qe{static getMaterialHelper(e,t){switch(e){case"ossfile":return new je(t);default:return new Ne(t)}}}const Fe=r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[r("path",{d:"M12 19v3"},null),r("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null),r("rect",{x:"9",y:"2",width:"6",height:"13",rx:"3"},null)]),_e=r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[r("path",{d:"M12 19v3"},null),r("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"},null),r("path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2"},null),r("path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2"},null),r("path",{d:"m2 2 20 20"},null),r("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"},null)]),Pe=r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[r("path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"},null),r("path",{d:"m21.854 2.147-10.94 10.939"},null)]),He=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4696",width:"24",height:"24",fill:"currentColor"},[r("path",{d:"M512 960.2c-246 0-447.35-201.73-447.35-448.28S265.94 63.63 512 63.63s447.33 201.73 447.33 448.29S758 960.2 512 960.2z m144.3-104.38A377.09 377.09 0 0 0 855 656.7a371.79 371.79 0 0 0 0-289.57A377.09 377.09 0 0 0 656.3 168a369.15 369.15 0 0 0-288.64 0A377.18 377.18 0 0 0 169 367.13a371.79 371.79 0 0 0 0 289.57 377.18 377.18 0 0 0 198.66 199.12 369.15 369.15 0 0 0 288.64 0z","p-id":"4697"},null),r("path",{d:"M378.19 349.54h265.46a30.66 30.66 0 0 1 30.63 30.69v266a30.66 30.66 0 0 1-30.63 30.69H378.19a30.66 30.66 0 0 1-30.63-30.69v-266a30.66 30.66 0 0 1 30.63-30.69z","p-id":"4698"},null)]),H=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9261",width:"24",height:"24",fill:"currentColor"},[r("path",{d:"M512 20.48c271.36 0 491.52 220.16 491.52 491.52S783.36 1003.52 512 1003.52 20.48 783.36 20.48 512 240.64 20.48 512 20.48m0-20.48C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0z","p-id":"9262"},null),r("path",{d:"M512 226.304l-283.648 143.36v284.672l283.648 143.36L795.648 655.36V369.664L512 226.304z m54.272 370.688h-32.768l-5.12-3.072-20.48-49.152h-95.232l-20.48 49.152-4.096 3.072h-32.768l-4.096-7.168 86.016-198.656 4.096-3.072h37.888l4.096 3.072 86.016 198.656-3.072 7.168z m88.064-5.12l-5.12 5.12h-29.696l-5.12-5.12V394.24l5.12-5.12h29.696l5.12 5.12v197.632z","p-id":"9263"},null),r("path",{d:"M427.008 512h67.584L460.8 427.008z","p-id":"9264"},null)]),Ue=r("svg",{fill:"currentColor",viewBox:"0 0 24 24"},[r("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"},null)]),Ve=r("svg",{width:"16",height:"16",viewBox:"0 0 50 50",xmlns:"http://www.w3.org/2000/svg"},[r("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:"currentColor","stroke-width":"5","stroke-dasharray":"31.415, 31.415","stroke-linecap":"round"},[r("animateTransform",{attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"1s",repeatCount:"indefinite"},null)])]),Je=r("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",focusable:"false"},[r("g",{id:"agptips/check-circle","stroke-width":"1","fill-rule":"evenodd"},[r("path",{d:"M8 16A8 8 0 118 0a8 8 0 010 16zm0-1.2A6.8 6.8 0 108 1.2a6.8 6.8 0 000 13.6zM5.666 7.207l1.8 1.845 3.482-3.554.857.84-4.34 4.43-2.658-2.723.86-.838z",id:"agp\u5F62\u72B6\u7ED3\u5408"},null)])]),$e=r("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",focusable:"false",style:"transform: rotate(-90deg);"},[r("g",{id:"abfnavigation/angle-right","stroke-width":"1","fill-rule":"evenodd"},[r("path",{d:"M7.978 11.498l-.005.005L2.3 5.831 3.13 5l4.848 4.848L12.826 5l.83.831-5.673 5.672-.005-.005z",id:"abf\u5F62\u72B6\u7ED3\u5408",transform:"rotate(-90 7.978 8.252)"},null)])]),oe=r("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",focusable:"false",style:"transform: rotate(90deg);"},[r("g",{id:"abfnavigation/angle-right","stroke-width":"1","fill-rule":"evenodd"},[r("path",{d:"M7.978 11.498l-.005.005L2.3 5.831 3.13 5l4.848 4.848L12.826 5l.83.831-5.673 5.672-.005-.005z",id:"abf\u5F62\u72B6\u7ED3\u5408",transform:"rotate(-90 7.978 8.252)"},null)])]),re=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4832",width:"16",height:"16",fill:"currentColor"},[r("path",{d:"M707.61856 495.14624l-357.5296-357.5296c-9.30816-9.30688-24.40064-9.30688-33.70752 0-9.30816 9.30816-9.30816 24.40064 0 33.7088L657.056 512 316.38144 852.67456c-9.30816 9.30688-9.30816 24.40064 0 33.7088 4.65408 4.65536 10.75328 6.98112 16.85376 6.98112 6.10048 0 12.19968-2.32576 16.85376-6.98112l357.5296-357.5296C716.92672 519.5456 716.92672 504.4544 707.61856 495.14624z","p-id":"4833"},null)]),Qe=r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"red","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[r("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null),r("path",{d:"M12 9v4"},null),r("path",{d:"M12 17h.01"},null)]),le=r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[r("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},null),r("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},null)]),Ye=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M112 268l144 144 144-144M256 392V100"},null)]),Ke=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor"},[r("path",{d:"M938.2 671.3c-13.8 0-25 11.2-25 25v83.1c0 63.3-52.6 114.7-117.3 114.7H230.2c-64.7 0-117.3-51.5-117.3-114.7v-83.1c0-13.8-11.2-25-25-25s-25 11.2-25 25v83.1c0 90.8 75.1 164.7 167.3 164.7h565.7c92.3 0 167.3-73.9 167.3-164.7v-83.1c0-13.8-11.2-25-25-25z","p-id":"7618"},null),r("path",{d:"M494.4 80.8c4.7-4.7 11.1-7.4 17.7-7.4h0.1c6.7 0 13 2.7 17.7 7.4l189.7 192c9.7 9.8 9.6 25.7-0.2 35.4-9.8 9.7-25.7 9.6-35.4-0.2L538.8 161v513.7c0 13.8-11.2 25-25 25s-25-11.2-25-25V157.3L338.5 308.1c-9.7 9.8-25.6 9.8-35.4 0.1-9.8-9.7-9.8-25.6-0.1-35.4l191.4-192z","p-id":"7619"},null)]),Xe=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor"},[r("path",{d:"M842.666667 285.866667l-187.733334-187.733334c-14.933333-14.933333-32-21.333333-53.333333-21.333333H234.666667C194.133333 74.666667 160 108.8 160 149.333333v725.333334c0 40.533333 34.133333 74.666667 74.666667 74.666666h554.666666c40.533333 0 74.666667-34.133333 74.666667-74.666666V337.066667c0-19.2-8.533333-38.4-21.333333-51.2z m-44.8 44.8c-2.133333 2.133333-4.266667 0-8.533334 0h-170.666666c-6.4 0-10.666667-4.266667-10.666667-10.666667V149.333333c0-2.133333 0-6.4-2.133333-8.533333 0 0 2.133333 0 2.133333 2.133333l189.866667 187.733334z m-8.533334 554.666666H234.666667c-6.4 0-10.666667-4.266667-10.666667-10.666666V149.333333c0-6.4 4.266667-10.666667 10.666667-10.666666h311.466666c-2.133333 4.266667-2.133333 6.4-2.133333 10.666666v170.666667c0 40.533333 34.133333 74.666667 74.666667 74.666667h170.666666c4.266667 0 6.4 0 10.666667-2.133334V874.666667c0 6.4-4.266667 10.666667-10.666667 10.666666z"},null),r("path",{d:"M640 693.333333H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM640 522.666667H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM341.333333 416h85.333334c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-85.333334c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32z"},null)]),ce=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor"},[r("path",{d:"M557.248 511.68l135.776-135.744-45.248-45.28L512 466.432l-135.776-135.776-45.248 45.28 135.776 135.744-135.776 135.776 45.248 45.248L512 556.928l135.776 135.776 45.248-45.248-135.776-135.776zM512 64c247.136 0 448 200.864 448 448s-200.864 448-448 448S64 759.136 64 512 264.864 64 512 64z"},null)]),he=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentcolor"},[r("path",{d:"M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z"},null)]),We=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentcolor"},[r("path",{d:"M190.193225 471.411583c14.446014 0 26.139334-11.718903 26.139334-26.13831 0-14.44499-11.69332-26.164916-26.139334-26.164916-0.271176 0-0.490164 0.149403-0.73678 0.149403l-62.496379 0.146333c-1.425466-0.195451-2.90005-0.295735-4.373611-0.295735-19.677155 0-35.621289 16.141632-35.621289 36.114522L86.622358 888.550075c0 19.949354 15.96767 35.597753 35.670407 35.597753 1.916653 0 3.808746 0.292666 5.649674 0l61.022819 0.022513c0.099261 0 0.148379 0.048095 0.24764 0.048095 0.097214 0 0.146333-0.048095 0.24457-0.048095l0.73678 0 0-0.148379c13.413498-0.540306 24.174586-11.422144 24.174586-24.960485 0-13.55983-10.760065-24.441669-24.174586-24.981974l0-0.393973-50.949392 0 1.450025-402.275993L190.193225 471.409536z"},null),r("path",{d:"M926.52241 433.948343c-19.283182-31.445176-47.339168-44.172035-81.289398-45.546336-1.77032-0.246617-3.536546-0.39295-5.380544-0.39295l-205.447139-0.688685c13.462616-39.059598 22.698978-85.58933 22.698978-129.317251 0-28.349675-3.193739-55.962569-9.041934-82.542948l-0.490164 0.049119c-10.638291-46.578852-51.736315-81.31498-100.966553-81.31498-57.264215 0-95.466282 48.15065-95.466282 106.126063 0 3.241834-0.294712 6.387477 0 9.532097-2.996241 108.386546-91.240027 195.548698-196.23636 207.513194l0 54.881958-0.785899 222.227314 0 229.744521 10.709923 0 500.025271 0.222057 8.746198-0.243547c19.35686 0.049119 30.239721-4.817726 47.803749-16.116049 16.682961-10.761088 29.236881-25.50079 37.490869-42.156122 2.260483-3.341095 4.028757-7.075139 5.106298-11.20111l77.018118-344.324116c1.056052-4.053316 1.348718-8.181333 1.056052-12.160971C943.643346 476.446249 938.781618 453.944769 926.52241 433.948343zM893.82573 486.837924l-82.983993 367.783411-0.099261-0.049119c-2.555196 6.141884-6.879688 11.596106-12.872169 15.427364-4.177136 2.727111-8.773827 4.351098-13.414521 4.964058-1.49812-0.195451-3.046383 0-4.620227 0l-477.028511-0.540306-0.171915-407.408897c89.323375-40.266076 154.841577-79.670527 188.596356-173.661202 0.072655 0.024559 0.124843 0.049119 0.195451 0.072655 2.99931-9.137101 6.313799-20.73423 8.697079-33.164331 5.551436-29.185716 5.258771-58.123792 5.258771-58.123792-4.937452-37.98001 25.940812-52.965306 44.364417-52.965306 25.304316 0.860601 50.263777 33.656541 50.263777 52.326762 0 0 5.600555 27.563776 5.649674 57.190537 0.048095 37.366026-4.6673 56.847729-4.6673 56.847729l-0.466628 0c-5.872754 30.879288-16.214287 60.138682-30.464849 86.964654l0.36839 0.342808c-2.358721 4.815679-3.709485 10.220782-3.709485 15.943111 0 19.922748 19.088754 21.742187 38.765909 21.742187l238.761895 0.270153c0 0 14.666024 0.465604 14.690584 0.465604l0 0.100284c12.132318-0.638543 24.221658 5.207605 31.100322 16.409738 5.504364 9.016351 6.437619 19.6045 3.486404 28.988218L893.82573 486.837924z"},null),r("path",{d:"M264.827039 924.31872c0.319272 0.024559 0.441045 0.024559 0.295735-0.024559 0.243547-0.048095 0.367367-0.074701-0.295735-0.074701s-0.539282 0.026606-0.271176 0.074701C264.43409 924.343279 264.532327 924.343279 264.827039 924.31872z"},null)]),Ge=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentcolor"},[r("path",{d:"M190.208 552.576a26.176 26.176 0 0 1 0 52.288L189.44 604.8l-62.464-0.128a35.84 35.84 0 0 1-40-35.84l-0.384-433.28c0-19.968 16-35.648 35.712-35.648 1.92 0 3.84-0.256 5.632 0h62.272v0.128c13.44 0.576 24.192 11.456 24.192 24.96a25.024 25.024 0 0 1-24.192 24.96v0.448h-50.944l1.408 402.24h49.536z m736.32 37.504c-19.264 31.36-47.36 44.16-81.28 45.504a38.656 38.656 0 0 1-5.376 0.384l-205.44 0.704c13.44 39.04 22.656 85.568 22.656 129.28 0 28.416-3.2 56-9.024 82.56h-0.512a103.936 103.936 0 0 1-100.928 81.28c-57.28 0-95.488-48.128-95.488-106.112 0-3.2-0.32-6.4 0-9.536-3.008-108.352-91.264-195.52-196.224-207.488V551.68L254.08 329.6v-229.76h10.688l500.032-0.192 8.704 0.192c19.392 0 30.272 4.864 47.808 16.128 16.704 10.752 29.248 25.536 37.504 42.176 2.304 3.328 4.032 7.04 5.12 11.2l76.992 344.32a37.568 37.568 0 0 1 1.088 12.16c1.536 21.76-3.328 44.288-15.552 64.32z m-32.704-52.928l-83.008-367.744h-0.064a33.408 33.408 0 0 0-26.24-20.352c-1.536 0.192-3.072 0-4.672 0l-477.056 0.512-0.128 407.424c89.28 40.32 154.88 79.68 188.544 173.632h0.256c2.944 9.088 6.272 20.672 8.64 33.088 5.568 29.184 5.312 58.176 5.312 58.176-4.992 37.952 25.92 52.928 44.352 52.928 25.28-0.832 50.24-33.664 50.24-52.288 0 0 5.632-27.584 5.632-57.216 0.064-37.376-4.608-56.832-4.608-56.832h-0.512a307.84 307.84 0 0 0-30.464-87.04l0.384-0.256a36.16 36.16 0 0 1-3.712-16c0-19.84 19.072-21.76 38.784-21.76l238.72-0.192 14.72-0.512v-0.064c12.16 0.64 24.192-5.248 31.104-16.448a35.2 35.2 0 0 0 3.456-28.992h0.32zM267.52 96.768c2.048-0.192 2.816-0.192 1.92 0.128 1.536 0.32 2.304 0.512-1.92 0.512s-3.456-0.192-1.728-0.512c-0.768-0.32-0.192-0.32 1.728-0.128z"},null)]),Ze=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentcolor"},[r("path",{d:"M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z"},null)]),et=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentcolor"},[r("path",{d:"M843.251 424.407l43.828-74.898c10.194-17.946 32.596-22.158 48.956-11.598 16.298 10.499 23.44 32.658 14.223 49.566l-113.11 195.212-61.164-40.044-126.418-82.285c-16.115-11.598-20.632-34.428-10.194-51.702 9.705-17.397 31.009-23.501 47.857-13.734l89.67 59.028C748.576 295.547 615.81 180.667 461.008 180.667c-177.387 0-320.042 148.758-320.042 331.335 0 183.613 143.692 331.334 319.981 331.334 107.861 0.184 208.58-56.158 268.034-149.858 1.099-1.038 1.099-2.075 2.075-2.075 6.348-9.949 17.092-15.871 28.568-15.81 19.35 0 35.648 16.848 35.648 36.93 0 7.508-2.137 14.833-6.104 21.059-72.823 114.698-196.066 183.675-328.099 183.614-216.088 0-391.4-181.478-391.4-405.195 0-223.718 175.312-405.195 391.339-405.195 183.125-0.427 342.016 131.606 382.243 317.601z"},null)]),tt=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentcolor"},[r("path",{d:"M394.688 126.208a32 32 0 0 1 32-32h170.688a32 32 0 0 1 32 32v138.624h288a32 32 0 0 1 32 32v170.688a32 32 0 0 1-32 32H106.688a32 32 0 0 1-32-32V296.832a32 32 0 0 1 32-32h288V126.208z m64 32v138.624a32 32 0 0 1-32 32h-288v106.688h746.688V328.832h-288a32 32 0 0 1-32-32V158.208H458.688z"},null),r("path",{d:"M138.688 469.376a32 32 0 0 1 32-32h682.688a32 32 0 0 1 32 32v384a32 32 0 0 1-32 32H170.688a32 32 0 0 1-32-32v-384z m64 32v320h618.688v-320H202.688z"},null),r("path",{d:"M341.376 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32zM512 691.2a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0v-128a32 32 0 0 1 32-32zM682.688 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32z"},null)]);r("svg",{viewBox:"0 0 18 18",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg"},[r("path",{d:"M5.856 17.121a.979.979 0 0 1-.327-.06.839.839 0 0 1-.283-.177.739.739 0 0 1-.187-.255.724.724 0 0 1-.07-.303l-.02-1.609a4.663 4.663 0 0 1-1.446-.455 4.252 4.252 0 0 1-.637-.401c-.199-.146-.385-.31-.553-.492a4.442 4.442 0 0 1-.45-.577 4.303 4.303 0 0 1-.327-.637 3.823 3.823 0 0 1-.206-.686 3.729 3.729 0 0 1-.064-.704V6.478c0-.261.025-.516.077-.771a4.43 4.43 0 0 1 .244-.747 4.062 4.062 0 0 1 .932-1.28c.2-.183.418-.347.65-.493.23-.145.482-.267.739-.364a4.21 4.21 0 0 1 .81-.225c.27-.054.553-.078.835-.078H8.55c.103 0 .2.018.29.054a.7.7 0 0 1 .411.376.667.667 0 0 1-.161.766.736.736 0 0 1-.25.151.764.764 0 0 1-.29.055H5.573c-.186 0-.366.012-.54.049-.18.03-.353.079-.52.145-.167.061-.328.14-.482.237-.148.091-.29.2-.418.316a2.897 2.897 0 0 0-.347.388c-.097.14-.187.286-.257.444a2.473 2.473 0 0 0-.206.977v4.287c0 .17.013.333.051.503a2.549 2.549 0 0 0 .772 1.33 2.721 2.721 0 0 0 .913.559c.167.066.347.115.527.152.18.03.36.048.546.048a.904.904 0 0 1 .61.23.848.848 0 0 1 .194.262.84.84 0 0 1 .07.303l.007.99 1.915-1.293a2.877 2.877 0 0 1 1.64-.492h2.372c.186 0 .366-.018.54-.048.18-.03.353-.08.52-.146.168-.067.329-.146.483-.237.148-.091.29-.2.418-.316.128-.121.244-.249.347-.388a2.8 2.8 0 0 0 .257-.444 2.47 2.47 0 0 0 .206-.977V8.585a.646.646 0 0 1 .225-.492.679.679 0 0 1 .244-.152.814.814 0 0 1 .585 0c.09.03.174.085.244.152a.657.657 0 0 1 .225.492V10.8c0 .261-.032.516-.083.771a4.192 4.192 0 0 1-.245.74c-.109.244-.244.468-.398.687a3.735 3.735 0 0 1-.534.6c-.2.183-.418.347-.65.493a4.134 4.134 0 0 1-.738.364 4.7 4.7 0 0 1-.81.225c-.27.054-.553.079-.836.079h-1.877c-.604 0-1.144.164-1.633.491l-2.54 1.713a.913.913 0 0 1-.514.157z",fill:"currentColor"},null),r("path",{d:"M15.866 4.125h-4.174c-.41 0-.741.313-.741.7 0 .387.332.7.741.7h4.174c.41 0 .742-.313.742-.7 0-.387-.332-.7-.742-.7z",fill:"currentColor"},null),r("path",{d:"M14.537 2.932c0-.396-.34-.717-.759-.717s-.758.32-.758.717v3.786c0 .396.34.717.758.717.42 0 .76-.321.76-.717V2.932z",fill:"currentColor"},null)]);const st=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15393",width:"24",height:"24",fill:"currentColor"},[r("path",{d:"M896 921.6H128c-70.656 0-128-57.344-128-128V230.4c0-70.656 57.344-128 128-128h768c70.656 0 128 57.344 128 128v563.2c0 70.656-57.344 128-128 128zM128 153.6c-42.496 0-76.8 34.304-76.8 76.8v563.2c0 42.496 34.304 76.8 76.8 76.8h768c42.496 0 76.8-34.304 76.8-76.8V230.4c0-42.496-34.304-76.8-76.8-76.8H128z","p-id":"15394"},null),r("path",{d:"M256 486.4c-70.656 0-128-57.344-128-128s57.344-128 128-128 128 57.344 128 128-57.344 128-128 128z m0-204.8c-42.496 0-76.8 34.304-76.8 76.8s34.304 76.8 76.8 76.8 76.8-34.304 76.8-76.8-34.304-76.8-76.8-76.8zM204.8 742.4c-7.68 0-15.36-3.584-20.48-10.24-8.704-11.264-6.144-27.136 5.12-35.84l181.76-136.192c21.504-15.872 49.664-19.968 74.752-9.728l198.144 79.36c9.728 3.584 20.48 1.536 27.648-5.632l129.536-129.536c10.24-10.24 26.112-10.24 36.352 0s10.24 26.112 0 36.352L708.096 660.48c-21.504 21.504-54.272 28.672-82.944 16.896l-198.144-79.36c-8.192-3.072-17.92-2.048-25.088 3.072L220.16 737.28c-4.608 3.584-10.24 5.12-15.36 5.12z","p-id":"15395"},null)]),it=r("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4645",width:"24",height:"24",fill:"currentColor"},[r("path",{d:"M192.608008 1023.936a192 192 0 0 1-192-192v-640a192 192 0 0 1 192-192h383.296a64 64 0 0 1 0 128H192.608008a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h383.296a64 64 0 0 1 0 128z m544.896-289.6a64 64 0 0 1 0-90.432L805.280008 576H384.352008a64 64 0 1 1 0-128h420.928l-82.688-82.816a64 64 0 0 1 90.368-90.496l192 192a64.576 64.576 0 0 1 13.76 69.824 65.6 65.6 0 0 1-13.76 20.672l-176.896 177.152a64 64 0 0 1-90.368 0z","p-id":"4646"},null)]),at=y({props:{message:{type:Object,required:!0}},setup(i){return{ns:new T("ai-error-message")}},render(){var i,e;return r("div",{class:this.ns.b()},[r("div",{class:this.ns.e("icon")},[H]),r("div",{class:this.ns.e("right")},[r("div",{class:this.ns.em("right","header")},[(e=(i=this.$slots).header)==null?void 0:e.call(i)]),r("div",{class:[this.ns.em("right","content"),"pre-wrap-container"]},[r("p",{class:this.ns.e("message")},[this.message.content])])])])}}),nt=y({props:{message:{type:Object,required:!0}},setup(i){const e=new T("chart-thought-chain"),t=f(!1),s=I(()=>{const n=i.message.content,o=n.indexOf("<think>");if(o===-1)return;const l=n.indexOf("</think>");return l===-1?n.slice(o+7):n.slice(o+7,l)}),a=I(()=>i.message.content.indexOf("</think>")===-1);return{ns:e,think:s,isLoading:a,isCollapse:t,onCollapseChange:()=>{t.value=!t.value}}},render(){if(this.think)return r("div",{class:this.ns.b()},[r("div",{class:this.ns.e("header"),onClick:this.onCollapseChange},[r("div",{class:this.ns.em("header","left")},[r("div",{class:[this.ns.em("header","state-icon"),this.ns.is("loading",this.isLoading)]},[this.isLoading?Ve:Je]),r("div",{class:this.ns.em("header","title")},[this.isLoading?"\u601D\u8003\u4E2D...":"\u601D\u8003\u5B8C\u6210"])]),r("div",{class:this.ns.em("header","right")},[r("div",{class:this.ns.em("header","collapse-icon")},[this.isCollapse?oe:$e])])]),!this.isCollapse&&r("div",{class:this.ns.e("content")},[this.think])])}}),ot=y({props:{toolCall:{type:Object,required:!0}},setup(i){const e=new T("chart-tool-call-item"),t=f(!1),s=()=>{t.value=!t.value},a=h=>{h.stopPropagation(),window.ibiz.util.text.copy(JSON.stringify(i.toolCall,void 0,2)),window.message.success("\u62F7\u8D1D\u6210\u529F")},n=h=>typeof h=="string"?h.includes("Failed")||h.includes("Error")||h.includes("ERR_")?'<span class="'.concat(e.e("error"),'">"').concat(h,'"</span>'):'<span class="'.concat(e.e("string"),'">"').concat(h,'"</span>'):typeof h=="number"?'<span class="'.concat(e.e("number"),'">').concat(h,"</span>"):typeof h=="boolean"?'<span class="'.concat(e.e("boolean"),'">').concat(h,"</span>"):h===null?'<span class="'.concat(e.e("null"),'">null</span>'):"",o=(h,d=0)=>{const u=" ".repeat(d),m=[];if(Array.isArray(h)){if(h.length===0)return["".concat(u,'<span class="').concat(e.e("array"),'">[]</span>')];m.push("".concat(u,'<span class="').concat(e.e("array"),'">[</span>')),h.forEach((p,C)=>{const A=o(p,d+1),M=C<h.length-1?",":"";typeof p=="object"&&p!==null?(m.push(...A.slice(0,-1)),m.push("".concat(A[A.length-1]).concat(M))):m.push("".concat(A[0]).concat(M))}),m.push("".concat(u,'<span class="').concat(e.e("array"),'">]</span>'))}else if(typeof h=="object"&&h!==null){const p=Object.keys(h);if(p.length===0)return["".concat(u,'<span class="').concat(e.e("property"),'">{}</span>')];m.push("".concat(u,'<span class="').concat(e.e("property"),'">{</span>')),p.forEach((C,A)=>{const M=h[C],w=A<p.length-1?",":"",j='<span class="'.concat(e.e("json-key"),'">"').concat(C,'":</span>');if(typeof M=="object"&&M!==null){const O=o(M,d+1);m.push("".concat(u," ").concat(j," ").concat(O[0].trim())),O.length>1&&(m.push(...O.slice(1,-1)),m.push("".concat(O[O.length-1]).concat(w)))}else{const O=n(M);m.push("".concat(u," ").concat(j," ").concat(O).concat(w))}}),m.push("".concat(u,'<span class="').concat(e.e("property"),'">}</span>'))}else m.push("".concat(u).concat(n(h)));return m},l=f([]),c=()=>{const h=o(i.toolCall,0);l.value=h.map((d,u)=>'<span class="'.concat(e.em("code-line","line-number"),'">').concat(u+1,"</span>").concat(d))};return z(()=>{c()}),{ns:e,lines:l,isExpanded:t,onCopy:a,handleExpandChange:s}},render(){var i;return r("div",{class:this.ns.b()},[r("div",{class:this.ns.e("header"),onClick:this.handleExpandChange},[r("div",{class:this.ns.e("header-left")},[r("div",{class:this.ns.em("header-left","caption")},[this.toolCall.name]),r("div",{class:this.ns.em("header-left","desc")},[(i=this.toolCall.parameters)==null?void 0:i.desc])]),r("div",{class:this.ns.e("header-right")},[this.toolCall.error&&r("div",{class:this.ns.em("header-right","error")},[r("span",{class:this.ns.em("header-right","error-text")},[_("\u53D1\u751F\u9519\u8BEF")]),r("div",{class:this.ns.em("header-right","icon")},[Qe])]),r("div",{onClick:this.onCopy,class:this.ns.em("header-right","icon")},[le]),r("div",{class:this.ns.em("header-right","icon")},[this.isExpanded?oe:re])])]),this.isExpanded&&r("div",{class:this.ns.e("content")},[this.lines.map(e=>r("div",{class:this.ns.e("code-line"),innerHTML:e},null))])])}}),rt=y({props:{toolCalls:{type:Array,required:!0}},setup(i){const e=new T("chart-tool-call"),t=f(!1),s=I(()=>i.toolCalls.length>4),a=I(()=>s.value&&!t.value?i.toolCalls.slice(0,4):i.toolCalls);return{ns:e,items:a,showToggle:s,isExpanded:t,handleToggle:()=>{t.value=!t.value}}},render(){if(this.toolCalls.length)return r("div",{class:this.ns.b()},[this.items.map(i=>r(ot,{toolCall:i},null)),this.showToggle&&r("div",{class:this.ns.e("toggle"),onClick:this.handleToggle},[this.isExpanded?"\u6536\u8D77\u5DE5\u5177\u8C03\u7528":"\u5C55\u5F00\u5168\u90E8 ".concat(this.toolCalls.length," \u4E2A\u5DE5\u5177\u8C03\u7528")])])}}),lt=y({props:{suggestions:{type:Array,required:!0}},emits:{itemClick:(i,e)=>!0},setup(i,{emit:e}){return{ns:new T("chart-suggestion"),onItemClick:(t,s)=>{e("itemClick",t,s)}}},render(){return r("div",{class:this.ns.b()},[this.suggestions.map(i=>r("div",{onClick:e=>this.onItemClick(i,e),class:[this.ns.e("item"),this.ns.em("item",i.type)]},[i.metadata.content_name,re]))])}}),ct=y({props:{controller:{type:Object,required:!0},message:{type:Object,required:!0}},setup(i){const e=new T("ai-markdown-message"),t=E(),s=f(null),a=o=>{let l="",c;if(!o)return{content:l,think:c};const h=o.indexOf("<think>"),d=o.indexOf("</think>");return h!==-1?(c=d===-1?o.slice(h+7):o.slice(h+7,d),l=d===-1?"":o.slice(d+8)):l=o.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>","gs"),"").trim(),{think:c,content:l}};q(()=>i.message.content,()=>{var o;const{content:l}=a(i.message.content);(o=s.value)==null||o.setMarkdown(l)},{immediate:!0});const n=()=>{const{content:o}=a(i.message.content);s.value=new J({id:t,value:o,editor:{defaultModel:"previewOnly"},previewer:{enablePreviewerBubble:!1},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}})};return z(()=>{n()}),{ns:e,UUID:t}},render(){var i,e;return r("div",{class:this.ns.b()},[r("div",{class:this.ns.e("icon")},[H]),r("div",{class:this.ns.e("right")},[r("div",{class:this.ns.em("right","header")},[(e=(i=this.$slots).header)==null?void 0:e.call(i)]),r("div",{class:[this.ns.em("right","content"),"pre-wrap-container"]},[this.message.toolcalls&&r(rt,{class:this.ns.e("tool-call"),toolCalls:this.message.toolcalls},null),r(nt,{message:this.message,class:this.ns.e("thought")},null),r("div",{class:this.ns.e("message"),id:this.UUID},null)]),r("div",{class:this.ns.em("right","footer")},[this.message.suggestions&&r(lt,{suggestions:this.message.suggestions,onItemClick:(t,s)=>{this.controller.handleSuggestionClick(this.message,t,s)}},null)])])])}}),ht=y({props:{message:{type:Object,required:!0}},setup(){return{ns:new T("ai-unknown-message")}},render(){var i,e;return r("div",{class:this.ns.b()},[r("div",{class:this.ns.e("icon")},[H]),r("div",{class:this.ns.e("right")},[r("div",{class:this.ns.em("right","header")},[(e=(i=this.$slots).header)==null?void 0:e.call(i)]),r("div",{class:[this.ns.em("right","content"),"pre-wrap-container"]},[r("p",{class:this.ns.e("message")},[_("\u6682\u672A\u652F\u6301\u7684\u6D88\u606F\u7C7B\u578B: "),this.message.type])])])])}}),dt=y({props:{material:{type:Object,required:!0},readonly:{type:Boolean,default:!1}},emits:{remove:()=>!0},setup(i,{emit:e}){const t=new T("chart-material-item"),s=()=>{e("remove")},a=I(()=>{const n=i.material.metadata.state,o={color:"#ff4d4f",label:"\u672A\u77E5\u72B6\u6001"};switch(n){case"successed":Object.assign(o,{color:"#1890ff",label:"\u4E0A\u4F20\u6210\u529F"});break;case"uploading":Object.assign(o,{color:"#52c41a",label:"\u4E0A\u4F20\u4E2D"});break;case"failed":Object.assign(o,{color:"#ff4d4f",label:"\u4E0A\u4F20\u5931\u8D25"});break}return o});return{ns:t,state:a,onRemove:s}},render(){return r("div",{class:this.ns.b()},[!this.readonly&&r("div",{class:this.ns.e("icon"),onClick:this.onRemove},[ce]),r("div",{class:this.ns.e("left")},[Xe]),r("div",{class:this.ns.e("right")},[r("div",{class:this.ns.e("caption")},[this.material.data.name]),r("div",{class:this.ns.e("metadata")},[r("div",{class:this.ns.em("metadata","size")},[this.material.metadata.size,_("B")]),r("div",{class:this.ns.em("metadata","state"),style:{color:this.state.color}},[this.state.label])])])])}}),de=y({props:{materials:{type:Array,required:!0},readonly:{type:Boolean,default:!1}},emits:{remove:i=>!0},setup(i,{emit:e}){return{ns:new T("chart-material"),onRemove:t=>{e("remove",t)}}},render(){if(this.materials.length)return r("div",{class:this.ns.b()},[this.materials.map(i=>r(dt,{material:i,readonly:this.readonly,onRemove:()=>this.onRemove(i)},null))])}}),ut=y({props:{controller:{type:Object,required:!0},message:{type:Object,required:!0}},setup(i){const e=new T("ai-user-message"),t=E(),s=f(null),a=$.parseMixedContent(i.message.content),n=()=>{s.value=new J({id:t,value:a.remainingText,editor:{defaultModel:"previewOnly"},previewer:{enablePreviewerBubble:!1},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}})};return z(()=>{n()}),{ns:e,UUID:t,material:a}},render(){var i,e;return r("div",{class:this.ns.b()},[r("div",{class:this.ns.e("icon")},[Ue]),r("div",{class:this.ns.e("right")},[r("div",{class:this.ns.em("right","header")},[(e=(i=this.$slots).header)==null?void 0:e.call(i)]),r("div",{class:[this.ns.em("right","content"),"pre-wrap-container"]},[this.material.hasResources&&r(de,{readonly:!0,class:this.ns.e("material"),materials:this.material.resources},null),r("div",{class:this.ns.e("message"),id:this.UUID},null)])])])}}),pt=y({props:{target:{type:[String,HTMLElement],default:""},right:{type:[Number,String],default:"1rem"},bottom:{type:[Number,String],default:"1rem"},offset:{type:Number,default:200}},setup(i){const e=new T("back-bottom"),t=f(!1),s=f(),a=f(),n=()=>{var h;if(i.target){if(typeof i.target=="string"){const d=document.querySelector(i.target);if(d)return d}else if(i.target instanceof HTMLElement)return i.target}return(h=a.value)==null?void 0:h.parentElement},o=I(()=>({right:V(i.right)?i.right:"".concat(i.right,"px"),bottom:V(i.bottom)?i.bottom:"".concat(i.bottom,"px")})),l=()=>{const h=s.value;h&&setTimeout(()=>{const{scrollTop:d,scrollHeight:u,clientHeight:m}=h,p=u-(d+m)>i.offset;t.value=p},1e3)},c=()=>{if(!s.value)return;const h=s.value;h?.scrollTo({top:h.scrollHeight,behavior:"smooth"})};return z(async()=>{var h;await F(),s.value=n(),(h=s.value)==null||h.addEventListener("scroll",l),l()}),q(()=>i.target,async()=>{await F(),s.value=n()}),G(()=>{var h;(h=s.value)==null||h.removeEventListener("scroll",l)}),{ns:e,btnRef:a,isShow:t,buttonStyle:o,scrollToBottom:c}},render(){return r("div",{ref:"btnRef",class:[this.ns.b(),this.ns.is("visible",this.isShow)],style:this.buttonStyle,onClick:this.scrollToBottom},[Ye])}});function ue(i){return{handleItemClick:(e,t)=>{const s={...i.data};if(i.data instanceof B?(Object.assign(s,{topic:i.controller.topic}),s.msg.realcontent=i.data.realcontent):(s.data||(s.data={}),Object.assign(s.data,{messages:i.controller.messages.value})),t.onClick&&typeof t.onClick=="function")t.onClick(e,t,i.controller.context,i.controller.params,s);else{const{extendToolbarClick:a}=i.controller.opts;a&&typeof a=="function"&&a(e,t,i.controller.context,i.controller.params,s)}}}}const Y=y({props:{model:{type:Object,required:!0},data:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1}},emits:{click:(i,e)=>!0},setup(i,{emit:e}){const t=new T("chat-toolbar-item"),s=n=>typeof n.hidden=="function"?n.hidden(i.data):n.hidden===!0,a=n=>i.disabled?!0:typeof n.disabled=="function"?n.disabled(i.data):n.disabled===!0;return{ns:t,isHidden:s,isDisabled:a,handleItemClick:(n,o)=>{a(o)||e("click",n,o)},renderIcon:n=>{var o,l,c,h;return typeof n.icon=="function"?n.icon():(o=n.icon)!=null&&o.showIcon&&(l=n.icon)!=null&&l.cssClass?r("i",{class:n.icon.cssClass},null):(c=n.icon)!=null&&c.showIcon&&(h=n.icon)!=null&&h.imagePath?ye(n.icon.imagePath)?r("div",{innerHTML:n.icon.imagePath},null):r("img",{src:n.icon.imagePath},null):null}}},render(){return this.isHidden(this.model)?null:r("div",{class:[this.ns.b(),this.ns.is("disabled",this.isDisabled(this.model)),"".concat(this.model.customClass||"")]},[r("div",{title:this.model.title,class:this.ns.e("content"),onClick:i=>this.handleItemClick(i,this.model)},[r("div",{class:this.ns.em("content","icon")},[this.renderIcon(this.model)]),r("div",{class:this.ns.em("content","label")},[this.model.label])])])}}),gt=y({props:{controller:{type:Object,required:!0},data:{type:Object},items:{type:Array,default:()=>[]}},setup(i){const e=new T("chat-input-toolbar"),{handleItemClick:t}=ue(i),s=[{label:"\u91CD\u7F6E\u5BF9\u8BDD",title:"\u91CD\u7F6E\u5BF9\u8BDD",icon:()=>et,onClick:()=>{i.controller.resetTopic()}},{label:"\u6E05\u7A7A\u5BF9\u8BDD",title:"\u6E05\u7A7A\u5BF9\u8BDD",icon:()=>tt,onClick:()=>{i.controller.clearTopic()}}];return s.push(...i.items),{ns:e,toolbarItems:s,handleItemClick:t}},render(){return r("div",{class:this.ns.b()},[r("div",{class:this.ns.e("wrapper")},[this.toolbarItems.map(i=>r(Y,{data:this.data,model:i,disabled:!1,onClick:this.handleItemClick},null))])])}}),mt=y({props:{controller:{type:Object,required:!0},data:{type:Object,required:!0},items:{type:Array,default:()=>[]},enableBackFill:{type:Boolean,default:!0}},setup(i){const e=new T("chat-message-toolbar"),{handleItemClick:t}=ue(i),s=f([]),a=f([]),n=[{label:"\u5237\u65B0",title:"\u5237\u65B0",icon:()=>he,onClick:()=>{i.controller.refreshMessage(i.data)}},{label:"\u5220\u9664",title:"\u5220\u9664",hidden:()=>{var d;return!((d=i.data)!=null&&d.realmessageid)},icon:()=>ce,onClick:()=>{i.controller.deleteMessage(i.data)}},{label:"\u590D\u5236",title:"\u590D\u5236",icon:()=>le,onClick:()=>{i.controller.copyMessage(i.data)}}];i.enableBackFill&&n.unshift({label:"\u56DE\u586B",title:"\u56DE\u586B",icon:()=>Ze,onClick:()=>{i.controller.backfill(i.data)}});const o=[{label:"\u5237\u65B0",title:"\u5237\u65B0",icon:()=>he,onClick:()=>{i.controller.refreshMessage(i.data,!0)}}],l=()=>i.data.state===20&&i.data.completed!==!0||i.controller.resourceMode!=="REMOTE"||!i.data.realmessageid||i.controller.currentTopicDisableStorage,c=[{id:"islike",label:"\u70B9\u8D5E",title:"\u70B9\u8D5E",icon:()=>We,onClick:()=>{i.controller.messageLike(i.data._origin)},hidden:()=>l()},{id:"isdislike",label:"\u70B9\u8E29",title:"\u70B9\u8E29",icon:()=>Ge,onClick:()=>{i.controller.messageDisLike(i.data._origin)},hidden:()=>l()}];(()=>{switch(i.data.type){case"DEFAULT":i.data.role==="ASSISTANT"?(s.value=[...c],a.value=[...n,...i.items]):a.value=[...o];break;case"ERROR":a.value=[...n,...i.items];break}})();const h=I(()=>{var d,u;return((d=i.data)==null?void 0:d.state)===20&&((u=i.data)==null?void 0:u.completed)!==!0});return{ns:e,isLoadding:h,topItems:s,centerItems:a,handleItemClick:t}},render(){return r("div",{ref:"btnRef",class:this.ns.b()},[this.topItems.length?r("div",{class:this.ns.e("top")},[this.topItems.map(i=>{const e=i.id==="islike"&&this.data.islike==="1"||i.id==="isdislike"&&this.data.isdislike==="1";return r(Y,{data:this.data,model:i,disabled:this.isLoadding,class:[this.ns.em("top","item"),this.ns.is("actived",!!e)],onClick:this.handleItemClick},null)})]):null,this.centerItems.length?r("div",{class:this.ns.e("center")},[this.centerItems.map(i=>r(Y,{data:this.data,model:i,disabled:this.isLoadding,onClick:this.handleItemClick},null))]):null])}}),vt=y({emits:{close:()=>!0},setup(i,{emit:e}){return{ns:new T("custom-modal"),handleMaskClick:()=>{e("close")}}},render(){var i,e;return r("div",{class:this.ns.b(),onClick:this.handleMaskClick},[r("div",{class:this.ns.e("mask")},null),r("div",{id:"modal-wrapper",class:this.ns.e("wrapper")},[(e=(i=this.$slots).default)==null?void 0:e.call(i)])])}});function ft(i){const e=f();let t;const s=a=>{if(!i.value||!i.value.$el)return;const n=6;let o,l;a.touches&&a.touches[0]?(o=a.touches[0].clientX,l=a.touches[0].clientY):(o=a.clientX,l=a.clientY);let c=o+n,h=l+n;const d=i.value.$el.querySelector("#modal-wrapper");if(!d)return;const u=d.getBoundingClientRect(),m=u.width,p=u.height,C=window.innerWidth,A=window.innerHeight,M=8;c+m+M>C?c=o-m-n:c<M&&(c=M),h+p+M>A?h=l-p-n:h<M&&(h=M),d.style.top="".concat(h,"px"),d.style.left="".concat(c,"px"),d.style.visibility="visible"};return{message:e,handleTouchStart:(a,n)=>{clearTimeout(t),t=setTimeout(()=>{e.value=n,F(()=>s(a))},500)},handleTouchEnd:()=>{clearTimeout(t)},closeToolbar:()=>{e.value=void 0}}}const bt=y({props:{controller:{type:Object,required:!0},toolbarItems:{type:Array},enableBackFill:{type:Boolean,default:!0}},setup(i){const e=new T("chat-messages"),t=f(),s=f(),{message:a,handleTouchStart:n,handleTouchEnd:o,closeToolbar:l}=ft(s),c=5,h=f(c),d=f(!1),u=f(!0),m=f(!1),{messages:p}=i.controller,C=I(()=>{const w=Math.max(0,p.value.length-h.value);return p.value.slice(w)}),A=I(()=>h.value<p.value.length),M=()=>{const w=t.value;w&&(m.value=!0,setTimeout(()=>{w.scrollTo({top:w.scrollHeight,behavior:"auto"}),m.value=!1},500))};return q(()=>p.value,()=>{u.value&&M()}),{ns:e,message:a,messages:p,modalRef:s,containerRef:t,visibleMessages:C,handleScroll:()=>{if(m.value)return;const w=t.value;if(!w)return;const{scrollTop:j,scrollHeight:O,clientHeight:yt}=w;j<100&&!d.value&&A.value&&(d.value=!0,setTimeout(()=>{h.value=Math.min(h.value+c,p.value.length);const At=w.scrollHeight;setTimeout(()=>{const kt=w.scrollHeight;w.scrollTop=kt-At+w.scrollTop,d.value=!1},0)},300));const Tt=O-(j+yt)<50;u.value=Tt},closeToolbar:l,renderMessage:w=>{switch(w.type){case"DEFAULT":return w.role==="ASSISTANT"?r(ct,{message:w,controller:i.controller},null):r(ut,{message:w,controller:i.controller},null);case"ERROR":return r(at,{message:w},null);default:return r(ht,{message:w},null)}},handleTouchStart:n,handleTouchEnd:o}},render(){return r("div",{ref:"containerRef",class:this.ns.b(),onScroll:this.handleScroll},[this.visibleMessages.map(i=>r("div",{key:i.messageid,class:this.ns.e("item"),onMouseup:this.handleTouchEnd,onTouchend:this.handleTouchEnd,onMousedown:e=>this.handleTouchStart(e,i),onTouchstart:e=>this.handleTouchStart(e,i)},[this.renderMessage(i)])),r(pt,null,null),this.message&&r(vt,{ref:"modalRef",onClose:this.closeToolbar},{default:()=>[r(mt,{data:this.message,items:this.toolbarItems,controller:this.controller,enableBackFill:this.enableBackFill},null)]})])}}),wt=y({props:{controller:{type:Object,required:!0},toolbarItems:{type:Array}},setup(i){const e=new T("chat-input"),t=f([]),s=f(""),a=f(!1),n=f(),o=I(()=>i.controller.isLoading.value),l=()=>{const c=window.SpeechRecognition||window.webkitSpeechRecognition;c&&(n.value=new c,n.value.onstart=()=>{a.value=!0},n.value.onend=()=>{a.value=!1},n.value.onresult=h=>{var d,u,m;const p=(m=(u=(d=h.results)==null?void 0:d[0])==null?void 0:u[0])==null?void 0:m.transcript;p&&(s.value+="".concat(p))})};return z(()=>{l()}),{ns:e,message:s,isLoading:o,recording:a,imageList:t,uploadImage:async()=>{const c=await window.ibiz.util.file.chooseFileAndUpload(i.controller.context,i.controller.params,{},{multiple:!0,accept:"image/*",extraParams:{enableNoAccess:!0}});if(!c||!Array.isArray(c))return;const{downloadUrl:h}=window.ibiz.util.file.calcFileUpDownUrl(i.controller.context,i.controller.params,{},{enableNoAccess:!0});c.forEach(d=>{t.value.push({isImage:!0,name:d.name,url:h.replace("%fileId%",d.fileid)})})},onSendMessage:async()=>{if(o.value)await i.controller.abortQuestion();else{const c=t.value.map(d=>"![".concat(d.name,"](").concat(d.url,")")).join(`
12
- `),h="".concat(c,`
13
- `).concat(s.value);s.value="",t.value=[],await i.controller.question(h)}},uploadMaterial:async c=>{await qe.getMaterialHelper("ossfile",i.controller).excuteAction(c)},onRemoveMaterial:c=>{i.controller.deleteMaterial(c)},onSpeechRecognition:()=>{n.value&&(a.value?n.value.end():n.value.start())}}},render(){return r("div",{class:this.ns.b()},[r(de,{class:this.ns.e("material"),materials:this.controller.materials.value,onRemove:this.onRemoveMaterial},null),r(K("van-uploader"),{previewSize:"4rem",showUpload:!1,modelValue:this.imageList,"onUpdate:modelValue":i=>this.imageList=i,class:this.ns.e("image")},null),r("div",{class:this.ns.e("content")},[r("div",{class:[this.ns.e("icon"),this.ns.em("icon","voice"),this.ns.is("recording",this.recording)],onClick:this.onSpeechRecognition},[this.recording?_e:Fe]),X(r("textarea",{rows:1,"onUpdate:modelValue":i=>this.message=i,placeholder:"\u8F93\u5165\u6D88\u606F...",class:this.ns.e("input")},null),[[W,this.message]]),r("div",{class:[this.ns.e("icon"),this.ns.em("icon","image")],onClick:this.uploadImage},[st]),r("div",{class:[this.ns.e("icon"),this.ns.em("icon","upload")],onClick:this.uploadMaterial},[Ke]),r("div",{class:[this.ns.e("icon"),this.ns.em("icon","send"),this.ns.is("disabled",!this.message&&!this.isLoading)],onClick:this.onSendMessage},[this.isLoading?He:Pe])])])}}),pe=y({props:{enableBackFill:{type:Boolean,default:!0},aiTopic:{type:Object,required:!0},aiChat:{type:Object,required:!0},openMode:{type:String,default:"default"},caption:{type:String,default:"AI\u52A9\u624B"},contentToolbarItems:{type:Array},footerToolbarItems:{type:Array},questionToolbarItems:{type:Array},containerOptions:{type:Object},autoClose:{type:Object}},emits:{close:()=>!0},setup(i,{emit:e}){var t;const s=new T("chat-container"),a=((t=i.containerOptions)==null?void 0:t.zIndex)||10,n=()=>{e("close")};return i.aiChat.evt.on("onCompleteMessage",()=>{if(i.autoClose){const{mode:o,duration:l=3}=i.autoClose;switch(o){case"close":n();break;case"closetime":setTimeout(()=>{n()},l*1e3);break}}}),{ns:s,zIndex:a,onClose:n,onClickOverlay:()=>{i.openMode!=="default"&&n()}}},render(){return r("div",{style:{zIndex:this.zIndex},class:[this.ns.b(),this.ns.e("overlay")],onClick:this.onClickOverlay},[r("div",{class:[this.ns.e("dialog"),this.ns.em("dialog",this.openMode)],onClick:i=>i.stopPropagation()},[r("div",{class:this.ns.e("header")},[r("div",{class:this.ns.em("header","left")},[r("div",{class:this.ns.em("header","icon")},[H]),r("div",{class:this.ns.em("header","caption")},[this.caption])]),r("div",{class:this.ns.em("header","reght")},[r("div",{class:this.ns.e("icon"),onClick:this.onClose},[it])])]),r("div",{class:this.ns.e("content")},[r(bt,{controller:this.aiChat,toolbarItems:this.contentToolbarItems,enableBackFill:this.enableBackFill},null)]),r("div",{class:this.ns.e("footer")},[r(gt,{data:this.aiTopic.activedTopic.value,controller:this.aiChat,items:this.footerToolbarItems},null),r(wt,{controller:this.aiChat,toolbarItems:this.questionToolbarItems},null)])])])}});class Ct{constructor(){v(this,"App",null),v(this,"container"),v(this,"mode","DEFAULT"),v(this,"resourceOptions"),v(this,"backupChatOptions"),v(this,"aiTopic"),v(this,"aiTopicMap",new Map),this.aiTopic=new Re(this)}get aiChat(){var e;return this.aiTopicMap.get("".concat((e=this.aiTopic.activedTopic.value)==null?void 0:e.id))}async initIndexDB(){await L.checkTableExists(k.DATA_BASE_NAME,k.DATA_TABLE_NAME)||await L.createTable(k.DATA_BASE_NAME,k.DATA_TABLE_NAME,k.DATA_TABLE_KEY_NAME,!1)}async create(e){var t,s,a,n;this.resourceOptions=e.resourceOptions,(((t=e.resourceOptions)==null?void 0:t.resourceMode)||"LOCAL")==="LOCAL"&&await this.initIndexDB(),this.backupChatOptions=e,await this.close(),this.container=document.createElement("div"),this.container.classList.add("ibiz-ai-chat"),document.body.appendChild(this.container);const o=e.chatOptions;let l;e.mode&&e.mode==="TOPIC"?(this.aiTopic.injectResourceOptions(e.resourceOptions),await this.aiTopic.fetchHistory(e.topicOptions),l=e.topicOptions,Object.assign(l,{aiChat:{caption:o.caption,context:o.context,params:o.params,appDataEntityId:o.appDataEntityId,sessionid:o.sessionid,contentToolbarItems:o.contentToolbarItems,footerToolbarItems:o.footerToolbarItems,questionToolbarItems:o.questionToolbarItems,otherToolbarItems:o.otherToolbarItems,appendCurData:o.appendCurData,appendCurContent:o.appendCurContent,enableAIAgentChange:o.enableAIAgentChange,activeAIAgentID:o.activeAIAgentID,aiAgentlist:o.aiAgentlist,srfMode:o.srfMode,appendCurResource:o.appendCurResource}}),this.syncHistoryOptions(l,o,e.resourceOptions),await this.aiTopic.asyncTopic(l)):this.aiTopic.activedTopic.value=void 0,Object.assign(o,{topicId:l?.id,topic:l,aiTopic:this.aiTopic});const c=new ae(o,this.resourceOptions);return this.aiTopicMap.set("".concat(l?.id),c),this.App=U(pe,{aiChat:c,aiTopic:this.aiTopic,mode:e.mode?e.mode:"DEFAULT",containerOptions:e.containerOptions,caption:e.mode&&e.mode==="TOPIC"?"AI\u52A9\u624B":o.caption,autoClose:(s=e.containerOptions)==null?void 0:s.autoClose,enableBackFill:(a=e.containerOptions)==null?void 0:a.enableBackFill,contentToolbarItems:o.contentToolbarItems,footerToolbarItems:o.footerToolbarItems,questionToolbarItems:o.questionToolbarItems,openMode:(n=e.containerOptions)==null?void 0:n.openMode,onClose:async()=>{await this.close(),o.closed&&o.closed(o.context,o.params,c.getAllMessages())}}),this.App.use(ee),this.App.mount(this.container),c}syncHistoryOptions(e,t,s){if(e.disableStorage){const o=Ie("TEMP");t.sessionid=o,e.aiChat.sessionid=o,e.caption="\u4E34\u65F6\u4F1A\u8BDD",e.sourceCaption="\u4E34\u65F6\u4F1A\u8BDD",e.captionFilled=!0;return}const a=this.aiTopic.getCurrentTopicByID(e.id);if(a&&(e.sequence=a.sequence,e.isTop=a.isTop),a&&a.aiChat&&a.aiChat.activeAIAgentID)t.activeAIAgentID=a.aiChat.activeAIAgentID,e.aiChat.activeAIAgentID=a.aiChat.activeAIAgentID;else if(t.aiAgentlist&&t.aiAgentlist.length>0&&!t.activeAIAgentID){const o=t.aiAgentlist.find(l=>l.default===1);o?(t.activeAIAgentID=o.id,e.aiChat.activeAIAgentID=o.id):(t.activeAIAgentID=t.aiAgentlist[0].id,e.aiChat.activeAIAgentID=t.aiAgentlist[0].id)}a&&a.aiChat&&a.aiChat.sessionid&&(t.sessionid=a.aiChat.sessionid,e.aiChat.sessionid=a.aiChat.sessionid);const n=s.resourceMode;n==="LOCAL"?e.captionMode!=="default"?(e.sourceCaption="\u65B0\u4F1A\u8BDD",a&&a.captionFilled&&a.caption?(e.captionFilled=a.captionFilled,e.caption=a.caption):e.caption="\u65B0\u4F1A\u8BDD"):(e.sourceCaption=e.caption,e.captionFilled=!0):n==="REMOTE"&&(e.sourceCaption=e.caption,a&&a.caption&&(e.caption=a.caption),e.captionFilled=!1),n==="REMOTE"&&a&&a.realid&&(e.realid=a.realid)}switchAiChatController(e){var t,s,a,n,o,l,c,h,d;const u={...this.backupChatOptions.chatOptions};e.aiChat&&Object.assign(u,{caption:e.aiChat.caption,context:e.aiChat.context,params:e.aiChat.params,sessionid:e.aiChat.sessionid,contentToolbarItems:e.aiChat.contentToolbarItems,footerToolbarItems:e.aiChat.footerToolbarItems,questionToolbarItems:e.aiChat.questionToolbarItems,otherToolbarItems:e.aiChat.otherToolbarItems,appendCurData:e.aiChat.appendCurData,appendCurContent:e.aiChat.appendCurContent,aiAgentlist:e.aiChat.aiAgentlist,activeAIAgentID:e.aiChat.activeAIAgentID,enableAIAgentChange:e.aiChat.enableAIAgentChange,srfMode:e.aiChat.srfMode,appendCurResource:e.aiChat.appendCurResource,appDataEntityId:e.aiChat.appDataEntityId,topicId:e.id,topic:e,aiTopic:this.aiTopic,extendToolbarClick:this.backupChatOptions.chatOptions.extendToolbarClick,recommendPrompt:this.backupChatOptions.chatOptions.recommendPrompt});let m;this.aiTopicMap.has("".concat(e.id))?m=this.aiTopicMap.get("".concat(e.id)):(m=new ae(u,this.resourceOptions),this.aiTopicMap.set("".concat(e.id),m)),this.container&&this.App&&(this.App.unmount(),this.App=U(pe,{aiChat:m,aiTopic:this.aiTopic,mode:(t=this.backupChatOptions)!=null&&t.mode?this.backupChatOptions.mode:"DEFAULT",containerOptions:(s=this.backupChatOptions)==null?void 0:s.containerOptions,caption:(a=this.backupChatOptions)!=null&&a.mode&&this.backupChatOptions.mode==="TOPIC"?"AI\u52A9\u624B":u.caption,enableBackFill:(o=(n=this.backupChatOptions)==null?void 0:n.containerOptions)==null?void 0:o.enableBackFill,autoClose:(c=(l=this.backupChatOptions)==null?void 0:l.containerOptions)==null?void 0:c.autoClose,contentToolbarItems:u.contentToolbarItems,footerToolbarItems:u.footerToolbarItems,questionToolbarItems:u.questionToolbarItems,openMode:(d=(h=this.backupChatOptions)==null?void 0:h.containerOptions)==null?void 0:d.openMode,onClose:async()=>{await this.close(),u.closed&&u.closed(u.context,u.params,m.getAllMessages())}}),this.App.mount(this.container))}hidden(){this.container&&(this.container.style.display="none")}show(){this.container&&(this.container.style.display="flex")}async close(){await Promise.all(Array.from(this.aiTopicMap).map(e=>e[1].destroyed())),this.App&&this.container&&(this.App.unmount(),this.App=null),this.container&&document.body.contains(this.container)&&(document.body.removeChild(this.container),this.container=void 0)}}const Mt=ge("chat",new Ct)}}});
14
- //# sourceMappingURL=index.es-D0mZvSDS.js.map